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

Unified Diff: Source/core/css/CSSToStyleMap.cpp

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
« no previous file with comments | « Source/core/css/CSSToStyleMap.h ('k') | Source/core/css/resolver/FontBuilder.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/CSSToStyleMap.cpp
diff --git a/Source/core/css/CSSToStyleMap.cpp b/Source/core/css/CSSToStyleMap.cpp
index 43227c9f06db6241f4dfacfe420f8302e93eb7db..e473703aa8b5979595bf6b33987395416f4c37b2 100644
--- a/Source/core/css/CSSToStyleMap.cpp
+++ b/Source/core/css/CSSToStyleMap.cpp
@@ -41,12 +41,12 @@
namespace WebCore {
-RenderStyle* CSSToStyleMap::style() const
+const RenderStyle* CSSToStyleMap::style() const
{
return m_state.style();
}
-RenderStyle* CSSToStyleMap::rootElementStyle() const
+const RenderStyle* CSSToStyleMap::rootElementStyle() const
{
return m_state.rootElementStyle();
}
@@ -503,7 +503,7 @@ void CSSToStyleMap::mapAnimationTimingFunction(CSSAnimationData* animation, CSSV
animation->setTimingFunction(LinearTimingFunction::create());
}
-void CSSToStyleMap::mapNinePieceImage(CSSPropertyID property, CSSValue* value, NinePieceImage& image)
+void CSSToStyleMap::mapNinePieceImage(RenderStyle* mutableStyle, CSSPropertyID property, CSSValue* value, NinePieceImage& image)
{
// If we're not a value list, then we are "none" and don't need to alter the empty image at all.
if (!value || !value->isValueList())
@@ -552,13 +552,13 @@ void CSSToStyleMap::mapNinePieceImage(CSSPropertyID property, CSSValue* value, N
// also set the border widths. We don't need to worry about percentages, since we don't even support
// those on real borders yet.
if (image.borderSlices().top().isFixed())
- style()->setBorderTopWidth(image.borderSlices().top().value());
+ mutableStyle->setBorderTopWidth(image.borderSlices().top().value());
if (image.borderSlices().right().isFixed())
- style()->setBorderRightWidth(image.borderSlices().right().value());
+ mutableStyle->setBorderRightWidth(image.borderSlices().right().value());
if (image.borderSlices().bottom().isFixed())
- style()->setBorderBottomWidth(image.borderSlices().bottom().value());
+ mutableStyle->setBorderBottomWidth(image.borderSlices().bottom().value());
if (image.borderSlices().left().isFixed())
- style()->setBorderLeftWidth(image.borderSlices().left().value());
+ mutableStyle->setBorderLeftWidth(image.borderSlices().left().value());
}
}
« no previous file with comments | « Source/core/css/CSSToStyleMap.h ('k') | Source/core/css/resolver/FontBuilder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698