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

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

Issue 128203003: Teach mapFill{X,Y}Position about initial values to individual background layers (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 11 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/CSSToStyleMap.cpp
diff --git a/Source/core/css/resolver/CSSToStyleMap.cpp b/Source/core/css/resolver/CSSToStyleMap.cpp
index 276ced6386f87c2830361249f62b68d59affde1c..6aa5733c56e9f201ea22f7a09d3ca108c284dc03 100644
--- a/Source/core/css/resolver/CSSToStyleMap.cpp
+++ b/Source/core/css/resolver/CSSToStyleMap.cpp
@@ -218,6 +218,11 @@ void CSSToStyleMap::mapFillSize(CSSPropertyID, FillLayer* layer, CSSValue* value
void CSSToStyleMap::mapFillXPosition(CSSPropertyID propertyID, FillLayer* layer, CSSValue* value) const
{
+ if (value->isInitialValue()) {
Julien - ping for review 2014/01/10 13:37:03 Shouldn't you also handle the keyword 'inherit' he
davve 2014/01/10 14:09:49 Hm, I don't think so. The added code is for handli
+ layer->setXPosition(FillLayer::initialFillXPosition(layer->type()));
+ return;
+ }
+
if (!value->isPrimitiveValue())
return;
@@ -237,6 +242,11 @@ void CSSToStyleMap::mapFillXPosition(CSSPropertyID propertyID, FillLayer* layer,
void CSSToStyleMap::mapFillYPosition(CSSPropertyID propertyID, FillLayer* layer, CSSValue* value) const
{
+ if (value->isInitialValue()) {
+ layer->setYPosition(FillLayer::initialFillYPosition(layer->type()));
+ return;
+ }
+
if (!value->isPrimitiveValue())
return;

Powered by Google App Engine
This is Rietveld 408576698