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

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

Issue 24077007: Add support for the object-position CSS property. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase master again Created 7 years, 3 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/animation/css/CSSAnimations.cpp ('k') | Source/core/css/CSSParser.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/CSSComputedStyleDeclaration.cpp
diff --git a/Source/core/css/CSSComputedStyleDeclaration.cpp b/Source/core/css/CSSComputedStyleDeclaration.cpp
index 01985b62e0649bf5720624fe0fe4c2f01833f7e9..37ef5411c1276260eda79819bbcf5ce26747665b 100644
--- a/Source/core/css/CSSComputedStyleDeclaration.cpp
+++ b/Source/core/css/CSSComputedStyleDeclaration.cpp
@@ -157,6 +157,8 @@ static const CSSPropertyID staticComputableProperties[] = {
CSSPropertyMinHeight,
CSSPropertyMinWidth,
CSSPropertyMixBlendMode,
+ CSSPropertyObjectFit,
+ CSSPropertyObjectPosition,
CSSPropertyOpacity,
CSSPropertyOrphans,
CSSPropertyOutlineColor,
@@ -519,7 +521,7 @@ static PassRefPtr<CSSValue> valueForNinePieceImageRepeat(const NinePieceImage& i
verticalRepeat = horizontalRepeat;
else
verticalRepeat = cssValuePool().createIdentifierValue(valueForRepeatRule(image.verticalRule()));
- return cssValuePool().createValue(Pair::create(horizontalRepeat.release(), verticalRepeat.release()));
+ return cssValuePool().createValue(Pair::create(horizontalRepeat.release(), verticalRepeat.release(), Pair::DropIdenticalValues));
}
static PassRefPtr<CSSValue> valueForNinePieceImage(const NinePieceImage& image, const RenderStyle* style)
@@ -2173,6 +2175,12 @@ PassRefPtr<CSSValue> CSSComputedStyleDeclaration::getPropertyCSSValue(CSSPropert
return zoomAdjustedPixelValueForLength(style->minWidth(), style.get());
case CSSPropertyObjectFit:
return cssValuePool().createValue(style->objectFit());
+ case CSSPropertyObjectPosition:
+ return cssValuePool().createValue(
+ Pair::create(
+ cssValuePool().createValue(style->objectPosition().x()),
+ cssValuePool().createValue(style->objectPosition().y()),
+ Pair::KeepIdenticalValues));
case CSSPropertyOpacity:
return cssValuePool().createValue(style->opacity(), CSSPrimitiveValue::CSS_NUMBER);
case CSSPropertyOrphans:
« no previous file with comments | « Source/core/animation/css/CSSAnimations.cpp ('k') | Source/core/css/CSSParser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698