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

Unified Diff: third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp

Issue 1506883004: Fixes incorrect values seen in clip property (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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 | « third_party/WebKit/LayoutTests/fast/css/getComputedStyle/computed-style-clip.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp
diff --git a/third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp b/third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp
index 8f17a4de2006207683ff831aaf1faae1ad05e55f..574240702b7390dbdb67969bd3e58b898aee9837 100644
--- a/third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp
+++ b/third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp
@@ -2258,10 +2258,18 @@ PassRefPtrWillBeRawPtr<CSSValue> ComputedStyleCSSValueMapping::get(CSSPropertyID
case CSSPropertyClip: {
if (style.hasAutoClip())
return cssValuePool().createIdentifierValue(CSSValueAuto);
- RefPtrWillBeRawPtr<CSSPrimitiveValue> top = zoomAdjustedPixelValue(style.clip().top().value(), style);
- RefPtrWillBeRawPtr<CSSPrimitiveValue> right = zoomAdjustedPixelValue(style.clip().right().value(), style);
- RefPtrWillBeRawPtr<CSSPrimitiveValue> bottom = zoomAdjustedPixelValue(style.clip().bottom().value(), style);
- RefPtrWillBeRawPtr<CSSPrimitiveValue> left = zoomAdjustedPixelValue(style.clip().left().value(), style);
+ RefPtrWillBeRawPtr<CSSPrimitiveValue> top = style.clip().top().isAuto()
+ ? cssValuePool().createIdentifierValue(CSSValueAuto)
+ : zoomAdjustedPixelValue(style.clip().top().value(), style);
+ RefPtrWillBeRawPtr<CSSPrimitiveValue> right = style.clip().right().isAuto()
+ ? cssValuePool().createIdentifierValue(CSSValueAuto)
+ : zoomAdjustedPixelValue(style.clip().right().value(), style);
+ RefPtrWillBeRawPtr<CSSPrimitiveValue> bottom = style.clip().bottom().isAuto()
+ ? cssValuePool().createIdentifierValue(CSSValueAuto)
+ : zoomAdjustedPixelValue(style.clip().bottom().value(), style);
+ RefPtrWillBeRawPtr<CSSPrimitiveValue> left = style.clip().left().isAuto()
+ ? cssValuePool().createIdentifierValue(CSSValueAuto)
+ : zoomAdjustedPixelValue(style.clip().left().value(), style);
return CSSQuadValue::create(top.release(), right.release(), bottom.release(), left.release(), CSSQuadValue::SerializeAsRect);
}
case CSSPropertySpeak:
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/css/getComputedStyle/computed-style-clip.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698