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 c484bf59f0f1baaf49c6d6d8d91e3fa6b70613e5..f414c21963b950a852f7792f21f9c4d7a30c2c35 100644 |
| --- a/Source/core/css/resolver/StyleResolverState.h |
| +++ b/Source/core/css/resolver/StyleResolverState.h |
| @@ -42,11 +42,13 @@ class RenderRegion; |
| class StyleResolverState { |
| WTF_MAKE_NONCOPYABLE(StyleResolverState); |
| public: |
| - StyleResolverState(const Document*, Element*, RenderStyle* parentStyle = 0, RenderRegion* regionForStyling = 0); |
| + StyleResolverState(Document*, Element*, RenderStyle* parentStyle = 0, RenderRegion* regionForStyling = 0); |
| ~StyleResolverState(); |
| + // In FontLoader and CanvasRenderingContext2D, we don't have an element to grab the document from. |
| + // This is why we have to store the document separately. |
| + Document* document() const { return m_document; } |
|
dglazkov
2013/08/01 22:19:41
This is where things got a bit funky. StyleResolve
eseidel
2013/08/01 22:53:48
Seems like we should have a bug filed, or some sor
|
| // These are all just pass-through methods to ElementResolveContext. |
| - Document* document() const { return m_elementContext.document(); } |
| Element* element() const { return m_elementContext.element(); } |
| const ContainerNode* parentNode() const { return m_elementContext.parentNode(); } |
| const RenderStyle* rootElementStyle() const { return m_elementContext.rootElementStyle(); } |
| @@ -124,6 +126,7 @@ private: |
| void initElement(Element*); |
| + Document* m_document; |
| ElementResolveContext m_elementContext; |
| // m_style is the primary output for each element's style resolve. |