Chromium Code Reviews| Index: Source/core/css/resolver/StyleResolverState.h |
| diff --git a/Source/core/css/resolver/StyleResolverState.h b/Source/core/css/resolver/StyleResolverState.h |
| index e04ed7a3d084d161d5f85cf66cbb408f7312f994..7ccc4e0afde15534fcbf85447f24e5204e3c99e0 100644 |
| --- a/Source/core/css/resolver/StyleResolverState.h |
| +++ b/Source/core/css/resolver/StyleResolverState.h |
| @@ -38,6 +38,7 @@ namespace WebCore { |
| class FontDescription; |
| class RenderRegion; |
| +class StyleRule; |
| // ElementResolveContext is immutable and serves as an input to the style resolve process. |
| class ElementResolveContext { |
| @@ -101,6 +102,9 @@ public: |
| , m_lineHeightValue(0) |
| , m_fontDirty(false) |
| , m_styleMap(*this, m_elementStyleResources) |
| +#if ENABLE(CSS_CALLBACKS) |
| + , m_rule(0) |
| +#endif |
| { } |
| // These are all just pass-through methods to ElementResolveContext. |
| @@ -122,6 +126,11 @@ public: |
| const RenderRegion* regionForStyling() const { return m_regionForStyling; } |
| +#if ENABLE(CSS_CALLBACKS) |
| + void setRule(StyleRule* rule) { m_rule = rule; } |
| + const StyleRule* rule() const { return m_rule; } |
|
esprehn
2013/07/13 01:43:01
currentRule() ?
Jeffrey Yasskin
2013/08/13 00:29:29
Done.
|
| +#endif |
| + |
| // FIXME: These are effectively side-channel "out parameters" for the various |
| // map functions. When we map from CSS to style objects we use this state object |
| // to track various meta-data about that mapping (e.g. if it's cache-able). |
| @@ -221,8 +230,11 @@ private: |
| // CSSToStyleMap is a pure-logic class and only contains |
| // a back-pointer to this object. |
| CSSToStyleMap m_styleMap; |
| -}; |
| +#if ENABLE(CSS_CALLBACKS) |
| + StyleRule* m_rule; |
| +#endif |
| +}; |
| } // namespace WebCore |
| #endif // StyleResolverState_h |