Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(264)

Side by Side Diff: Source/core/css/resolver/StyleResolverState.h

Issue 5216392399814656: Clear StyleResolverState after each resolve. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved. 3 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved.
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 public: 62 public:
63 void initForStyleResolve(Document*, Element*, RenderStyle* parentStyle = 0, RenderRegion* regionForStyling = 0); 63 void initForStyleResolve(Document*, Element*, RenderStyle* parentStyle = 0, RenderRegion* regionForStyling = 0);
64 void clear(); 64 void clear();
65 65
66 Document* document() const { return m_element->document(); } 66 Document* document() const { return m_element->document(); }
67 Element* element() const { return m_element; } 67 Element* element() const { return m_element; }
68 Element* styledElement() const { return m_styledElement; } 68 Element* styledElement() const { return m_styledElement; }
69 void setStyle(PassRefPtr<RenderStyle> style) { m_style = style; } 69 void setStyle(PassRefPtr<RenderStyle> style) { m_style = style; }
70 RenderStyle* style() const { return m_style.get(); } 70 RenderStyle* style() const { return m_style.get(); }
71 PassRefPtr<RenderStyle> takeStyle() { return m_style.release(); } 71 PassRefPtr<RenderStyle> takeStyle() { return m_style.release(); }
72 PassRefPtr<RenderStyle> takeStyleAndClear();
72 73
73 const ContainerNode* parentNode() const { return m_parentNode; } 74 const ContainerNode* parentNode() const { return m_parentNode; }
74 void setParentStyle(PassRefPtr<RenderStyle> parentStyle) { m_parentStyle = p arentStyle; } 75 void setParentStyle(PassRefPtr<RenderStyle> parentStyle) { m_parentStyle = p arentStyle; }
75 RenderStyle* parentStyle() const { return m_parentStyle.get(); } 76 RenderStyle* parentStyle() const { return m_parentStyle.get(); }
76 RenderStyle* rootElementStyle() const { return m_rootElementStyle; } 77 RenderStyle* rootElementStyle() const { return m_rootElementStyle; }
77 78
78 const RenderRegion* regionForStyling() const { return m_regionForStyling; } 79 const RenderRegion* regionForStyling() const { return m_regionForStyling; }
79 EInsideLink elementLinkState() const { return m_elementLinkState; } 80 EInsideLink elementLinkState() const { return m_elementLinkState; }
80 bool distributedToInsertionPoint() const { return m_distributedToInsertionPo int; } 81 bool distributedToInsertionPoint() const { return m_distributedToInsertionPo int; }
81 void setElementAffectedByClassRules(bool isAffected) { m_elementAffectedByCl assRules = isAffected; } 82 void setElementAffectedByClassRules(bool isAffected) { m_elementAffectedByCl assRules = isAffected; }
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 CachedUAStyle m_cachedUAStyle; 169 CachedUAStyle m_cachedUAStyle;
169 ElementStyleResources m_elementStyleResources; 170 ElementStyleResources m_elementStyleResources;
170 // CSSToStyleMap is a pure-logic class and only contains 171 // CSSToStyleMap is a pure-logic class and only contains
171 // a back-pointer to this object. 172 // a back-pointer to this object.
172 CSSToStyleMap m_styleMap; 173 CSSToStyleMap m_styleMap;
173 }; 174 };
174 175
175 } // namespace WebCore 176 } // namespace WebCore
176 177
177 #endif // StyleResolverState_h 178 #endif // StyleResolverState_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698