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

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

Issue 22839023: Add support for the object-position CSS property. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 4 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/StyleBuilderCustom.cpp
diff --git a/Source/core/css/resolver/StyleBuilderCustom.cpp b/Source/core/css/resolver/StyleBuilderCustom.cpp
index 5eaec6e755b633616f55bed8a545a1324abb2ae7..8878b2ad9f38db0980e47f10de05ef0dcf4d9c09 100644
--- a/Source/core/css/resolver/StyleBuilderCustom.cpp
+++ b/Source/core/css/resolver/StyleBuilderCustom.cpp
@@ -870,6 +870,15 @@ Length StyleBuilderConverter::convertLengthMaxSizing(StyleResolverState& state,
return convertLengthSizing(state, value);
}
+LengthPoint StyleBuilderConverter::convertLengthPoint(StyleResolverState& state, CSSValue* value)
+{
+ CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value);
+ Pair* pair = primitiveValue->getPairValue();
+ Length x = pair->first()->convertToLength<FixedIntegerConversion | PercentConversion>(state.style(), state.rootElementStyle(), state.style()->effectiveZoom());
+ Length y = pair->second()->convertToLength<FixedIntegerConversion | PercentConversion>(state.style(), state.rootElementStyle(), state.style()->effectiveZoom());
+ return LengthPoint(x, y);
+}
+
LengthSize StyleBuilderConverter::convertRadius(StyleResolverState& state, CSSValue* value)
{
CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value);
@@ -1440,6 +1449,7 @@ void StyleBuilder::oldApplyProperty(CSSPropertyID id, StyleResolverState& state,
case CSSPropertyBorderWidth:
case CSSPropertyListStyle:
case CSSPropertyMargin:
+ case CSSPropertyObjectPosition:
case CSSPropertyOutline:
case CSSPropertyOverflow:
case CSSPropertyPadding:

Powered by Google App Engine
This is Rietveld 408576698