Chromium Code Reviews| Index: Source/core/css/resolver/ElementResolveContext.h |
| diff --git a/Source/core/css/resolver/ElementResolveContext.h b/Source/core/css/resolver/ElementResolveContext.h |
| index 09b8cd105c0b09a52401488136873f525f23432d..46e46149a1ad751ac57715d8464996570bfe348f 100644 |
| --- a/Source/core/css/resolver/ElementResolveContext.h |
| +++ b/Source/core/css/resolver/ElementResolveContext.h |
| @@ -36,19 +36,26 @@ class RenderStyle; |
| class ElementResolveContext { |
| STACK_ALLOCATED(); |
| public: |
| - explicit ElementResolveContext(const Document&); |
| - |
| - explicit ElementResolveContext(Element&); |
| - |
| + ElementResolveContext(Document&, Element*, RenderStyle* parentStyle); |
|
rune
2014/10/29 13:02:14
I liked it better when the construction for Docume
andersr
2014/10/29 13:29:47
OK.
|
| + Document& document() const { return m_document; } |
| Element* element() const { return m_element; } |
| const ContainerNode* parentNode() const { return m_parentNode; } |
| + RenderStyle* parentStyle() const { return m_parentStyle; } |
| + ActiveAnimations* activeAnimations() const { return m_activeAnimations; } |
| + const RenderStyle* baseRenderStyle() const { return m_baseRenderStyle; } |
| const RenderStyle* rootElementStyle() const { return m_rootElementStyle; } |
| EInsideLink elementLinkState() const { return m_elementLinkState; } |
| bool distributedToInsertionPoint() const { return m_distributedToInsertionPoint; } |
| private: |
| + // In FontFaceSet and CanvasRenderingContext2D, we don't have an element to grab the document from. |
| + // This is why we have to store the document separately. |
| + Document& m_document; |
| RawPtrWillBeMember<Element> m_element; |
| RawPtrWillBeMember<ContainerNode> m_parentNode; |
| + RenderStyle* m_parentStyle; |
| + ActiveAnimations* m_activeAnimations; |
| + const RenderStyle* m_baseRenderStyle; |
| RenderStyle* m_rootElementStyle; |
| EInsideLink m_elementLinkState; |
| bool m_distributedToInsertionPoint; |