Chromium Code Reviews| Index: Source/core/rendering/style/RenderStyle.h |
| diff --git a/Source/core/rendering/style/RenderStyle.h b/Source/core/rendering/style/RenderStyle.h |
| index 72362f753b3287e3a93d7785ce6d6e0d3942f4d2..c43d9a2c63ffc39b78599b314209bec4bc9a4c63 100644 |
| --- a/Source/core/rendering/style/RenderStyle.h |
| +++ b/Source/core/rendering/style/RenderStyle.h |
| @@ -257,6 +257,10 @@ protected: |
| unsigned firstChildState : 1; |
| unsigned lastChildState : 1; |
| + // This is set if we ysed viewport units when resolving a length. |
|
esprehn
2013/12/04 06:02:28
typo: used
Timothy Loh
2013/12/04 07:17:39
Done.
|
| + // It is mutable so we can pass around const RenderStyles to resolve lengths. |
| + mutable unsigned hasViewportUnits : 1; |
| + |
| bool affectedByFocus() const { return _affectedByFocus; } |
| void setAffectedByFocus(bool value) { _affectedByFocus = value; } |
| bool affectedByHover() const { return _affectedByHover; } |
| @@ -274,7 +278,7 @@ protected: |
| unsigned _affectedByDrag : 1; |
| unsigned _isLink : 1; |
| // If you add more style bits here, you will also need to update RenderStyle::copyNonInheritedFrom() |
| - // 60 bits |
| + // 63 bits |
| } noninherited_flags; |
| // !END SYNC! |
| @@ -321,6 +325,7 @@ protected: |
| noninherited_flags.emptyState = false; |
| noninherited_flags.firstChildState = false; |
| noninherited_flags.lastChildState = false; |
| + noninherited_flags.hasViewportUnits = false; |
| noninherited_flags.setAffectedByFocus(false); |
| noninherited_flags.setAffectedByHover(false); |
| noninherited_flags.setAffectedByActive(false); |
| @@ -362,6 +367,9 @@ public: |
| const PseudoStyleCache* cachedPseudoStyles() const { return m_cachedPseudoStyles.get(); } |
| + void setHasViewportUnits(bool hasViewportUnits = true) const { noninherited_flags.hasViewportUnits = hasViewportUnits; } |
| + bool hasViewportUnits() const { return noninherited_flags.hasViewportUnits; } |
| + |
| void setVariable(const AtomicString& name, const String& value) { rareInheritedData.access()->m_variables.access()->setVariable(name, value); } |
| const HashMap<AtomicString, String>* variables() { return &(rareInheritedData->m_variables->m_data); } |
| @@ -572,7 +580,7 @@ public: |
| Length specifiedLineHeight() const; |
| Length lineHeight() const; |
| - int computedLineHeight(RenderView* = 0) const; |
| + int computedLineHeight() const; |
| EWhiteSpace whiteSpace() const { return static_cast<EWhiteSpace>(inherited_flags._white_space); } |
| static bool autoWrap(EWhiteSpace ws) |
| @@ -1019,7 +1027,7 @@ public: |
| setBorderRadius(LengthSize(Length(s.width(), Fixed), Length(s.height(), Fixed))); |
| } |
| - RoundedRect getRoundedBorderFor(const LayoutRect& borderRect, RenderView* = 0, bool includeLogicalLeftEdge = true, bool includeLogicalRightEdge = true) const; |
| + RoundedRect getRoundedBorderFor(const LayoutRect& borderRect, bool includeLogicalLeftEdge = true, bool includeLogicalRightEdge = true) const; |
| RoundedRect getRoundedInnerBorderFor(const LayoutRect& borderRect, bool includeLogicalLeftEdge = true, bool includeLogicalRightEdge = true) const; |
| RoundedRect getRoundedInnerBorderFor(const LayoutRect& borderRect, |