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 b8fce1c06eea82f7852039964551e7588a03e575..047afe9b3ac65d76c4ad8ffad28ab979ceb3c36d 100644 |
| --- a/Source/core/css/resolver/StyleResolverState.h |
| +++ b/Source/core/css/resolver/StyleResolverState.h |
| @@ -60,8 +60,14 @@ public: |
| , m_styleMap(*this, m_elementStyleResources) |
| { } |
| - void initForStyleResolve(Document*, Element*, int childIndex = 0, RenderStyle* parentStyle = 0, RenderRegion* regionForStyling = 0); |
| - void clear(); |
| +public: |
| + class ScopedStyleResolution { |
|
dglazkov
2013/07/12 16:45:47
Can we un-nest this?
Jeffrey Yasskin
2013/07/12 19:41:28
Yep, done.
|
| + public: |
| + ScopedStyleResolution(StyleResolverState*, Document*, Element*, int childIndex = 0, RenderStyle* parentStyle = 0, RenderRegion* regionForStyling = 0); |
| + ~ScopedStyleResolution(); |
| + private: |
| + StyleResolverState* m_state; |
| + }; |
| Document* document() const { return m_element->document(); } |
| Element* element() const { return m_element; } |
| @@ -142,6 +148,9 @@ public: |
| bool useSVGZoomRules() const { return m_element && m_element->isSVGElement(); } |
| private: |
| + void initForStyleResolve(Document*, Element*, int childIndex = 0, RenderStyle* parentStyle = 0, RenderRegion* regionForStyling = 0); |
| + void clear(); |
| + |
| void initElement(Element*, int childIndex); |
| Element* m_element; |