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

Unified Diff: Source/core/css/resolver/SharedStyleFinder.cpp

Issue 889563002: Make RenderObject::style() return a const object (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Updated change after Doug's review. Created 5 years, 10 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
« no previous file with comments | « Source/core/css/resolver/ElementResolveContext.cpp ('k') | Source/core/css/resolver/StyleResolver.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/resolver/SharedStyleFinder.cpp
diff --git a/Source/core/css/resolver/SharedStyleFinder.cpp b/Source/core/css/resolver/SharedStyleFinder.cpp
index d5fd5d746acaf35d311efa19fd03544851583fe1..beb3b0e00303a19cd44876b8b1a9425c893e7b78 100644
--- a/Source/core/css/resolver/SharedStyleFinder.cpp
+++ b/Source/core/css/resolver/SharedStyleFinder.cpp
@@ -198,7 +198,7 @@ bool SharedStyleFinder::canShareStyleWithElement(Element& candidate) const
if (element() == candidate)
return false;
Element* parent = candidate.parentOrShadowHostElement();
- LayoutStyle* style = candidate.layoutStyle();
+ const LayoutStyle* style = candidate.layoutStyle();
if (!style)
return false;
if (!style->isSharable())
@@ -344,7 +344,7 @@ LayoutStyle* SharedStyleFinder::findSharedStyle()
return 0;
}
- return shareElement->layoutStyle();
+ return shareElement->mutableLayoutStyle();
}
}
« no previous file with comments | « Source/core/css/resolver/ElementResolveContext.cpp ('k') | Source/core/css/resolver/StyleResolver.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698