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

Unified Diff: Source/core/css/resolver/StyleResolverState.h

Issue 20112002: Have const StyleResolverState return const RenderStyle (Closed) Base URL: svn://svn.chromium.org/blink/trunk
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 side-by-side diff with in-line comments
Download patch
Index: Source/core/css/resolver/StyleResolverState.h
diff --git a/Source/core/css/resolver/StyleResolverState.h b/Source/core/css/resolver/StyleResolverState.h
index 3a911bbdc40fd4922be1ed83b37711a1901609f9..e4c04c66d34839f3840df6c8b046661af78ce9ca 100644
--- a/Source/core/css/resolver/StyleResolverState.h
+++ b/Source/core/css/resolver/StyleResolverState.h
@@ -82,18 +82,20 @@ public:
Document* document() const { return m_elementContext.document(); }
Element* element() const { return m_elementContext.element(); }
const ContainerNode* parentNode() const { return m_elementContext.parentNode(); }
- RenderStyle* rootElementStyle() const { return m_elementContext.rootElementStyle(); }
+ const RenderStyle* rootElementStyle() const { return m_elementContext.rootElementStyle(); }
EInsideLink elementLinkState() const { return m_elementContext.elementLinkState(); }
bool distributedToInsertionPoint() const { return m_elementContext.distributedToInsertionPoint(); }
const ElementResolveContext& elementContext() const { return m_elementContext; }
void setStyle(PassRefPtr<RenderStyle> style) { m_style = style; }
- RenderStyle* style() const { return m_style.get(); }
+ const RenderStyle* style() const { return m_style.get(); }
+ RenderStyle* style() { return m_style.get(); }
PassRefPtr<RenderStyle> takeStyle() { return m_style.release(); }
void setParentStyle(PassRefPtr<RenderStyle> parentStyle) { m_parentStyle = parentStyle; }
- RenderStyle* parentStyle() const { return m_parentStyle.get(); }
+ const RenderStyle* parentStyle() const { return m_parentStyle.get(); }
+ RenderStyle* parentStyle() { return m_parentStyle.get(); }
const RenderRegion* regionForStyling() const { return m_regionForStyling; }
« no previous file with comments | « Source/core/css/resolver/StyleBuilderCustom.cpp ('k') | Source/core/scripts/templates/StyleBuilderFunctions.cpp.tmpl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698