Changeset 93218 in webkit
- Timestamp:
- Aug 17, 2011, 10:45:40 AM (15 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 4 edited
-
ChangeLog (modified) (1 diff)
-
css/CSSStyleSelector.cpp (modified) (1 diff)
-
css/CSSStyleSelector.h (modified) (1 diff)
-
rendering/style/RenderStyle.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r93216 r93218 1 2011-08-17 Luke Macpherson <macpherson@chromium.org> 2 3 Only set m_fontDirty if TextSizeAdjust is actually changed. 4 https://bugs.webkit.org/show_bug.cgi?id=66022 5 6 Reviewed by Darin Adler. 7 8 No new tests. Refactoring only. 9 10 Reduces instances where the font information is dirtied to save recalculation where it is not necessary. 11 12 * css/CSSStyleSelector.cpp: 13 (WebCore::CSSStyleSelector::applyProperty): 14 Call new setTextSizeAdjust function. 15 * css/CSSStyleSelector.h: 16 (WebCore::CSSStyleSelector::setTextSizeAdjust): 17 Add wrapper for RenderStyle::setTextSizeAdjust() that automatically updates m_fontDirty. 18 * rendering/style/RenderStyle.h: 19 (WebCore::RenderStyle::setTextSizeAdjust): 20 Make setTextSizeAdjust return true if the unlderlying value was changed. 21 1 22 2011-08-17 Kenichi Ishibashi <bashi@chromium.org> 2 23 -
trunk/Source/WebCore/css/CSSStyleSelector.cpp
r93195 r93218 4748 4748 case CSSPropertyWebkitTextSizeAdjust: { 4749 4749 HANDLE_INHERIT_AND_INITIAL(textSizeAdjust, TextSizeAdjust) 4750 if (!primitiveValue || !primitiveValue->getIdent()) return;4751 m_style->setTextSizeAdjust(primitiveValue->getIdent() == CSSValueAuto);4752 m_fontDirty = true;4750 if (!primitiveValue || !primitiveValue->getIdent()) 4751 return; 4752 setTextSizeAdjust(primitiveValue->getIdent() == CSSValueAuto); 4753 4753 return; 4754 4754 } -
trunk/Source/WebCore/css/CSSStyleSelector.h
r93122 r93218 119 119 void setZoom(float f) { m_fontDirty |= style()->setZoom(f); } 120 120 void setEffectiveZoom(float f) { m_fontDirty |= style()->setEffectiveZoom(f); } 121 void setTextSizeAdjust(bool b) { m_fontDirty |= style()->setTextSizeAdjust(b); } 121 122 122 123 private: -
trunk/Source/WebCore/rendering/style/RenderStyle.h
r93195 r93218 1150 1150 void setLineBoxContain(LineBoxContain c) { SET_VAR(rareInheritedData, m_lineBoxContain, c); } 1151 1151 void setLineClamp(LineClampValue c) { SET_VAR(rareNonInheritedData, lineClamp, c); } 1152 void setTextSizeAdjust(bool b) { SET_VAR(rareInheritedData, textSizeAdjust, b); }1152 bool setTextSizeAdjust(bool); 1153 1153 void setTextSecurity(ETextSecurity aTextSecurity) { SET_VAR(rareInheritedData, textSecurity, aTextSecurity); } 1154 1154 … … 1442 1442 } 1443 1443 1444 inline bool RenderStyle::setTextSizeAdjust(bool b) 1445 { 1446 if (compareEqual(rareInheritedData->textSizeAdjust, b)) 1447 return false; 1448 rareInheritedData.access()->textSizeAdjust = b; 1449 return true; 1450 } 1451 1444 1452 } // namespace WebCore 1445 1453
Note:
See TracChangeset
for help on using the changeset viewer.