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

Side by Side 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2004 Zack Rusin <zack@kde.org> 2 * Copyright (C) 2004 Zack Rusin <zack@kde.org>
3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved. 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved.
4 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> 4 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org>
5 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com> 5 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com>
6 * Copyright (C) 2011 Sencha, Inc. All rights reserved. 6 * Copyright (C) 2011 Sencha, Inc. All rights reserved.
7 * Copyright (C) 2015 Google Inc. All rights reserved. 7 * Copyright (C) 2015 Google Inc. All rights reserved.
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Lesser General Public 10 * modify it under the terms of the GNU Lesser General Public
(...skipping 2240 matching lines...) Expand 10 before | Expand all | Expand 10 after
2251 return valueForBorderRadiusCorner(style.borderBottomLeftRadius(), style) ; 2251 return valueForBorderRadiusCorner(style.borderBottomLeftRadius(), style) ;
2252 case CSSPropertyBorderBottomRightRadius: 2252 case CSSPropertyBorderBottomRightRadius:
2253 return valueForBorderRadiusCorner(style.borderBottomRightRadius(), style ); 2253 return valueForBorderRadiusCorner(style.borderBottomRightRadius(), style );
2254 case CSSPropertyBorderTopLeftRadius: 2254 case CSSPropertyBorderTopLeftRadius:
2255 return valueForBorderRadiusCorner(style.borderTopLeftRadius(), style); 2255 return valueForBorderRadiusCorner(style.borderTopLeftRadius(), style);
2256 case CSSPropertyBorderTopRightRadius: 2256 case CSSPropertyBorderTopRightRadius:
2257 return valueForBorderRadiusCorner(style.borderTopRightRadius(), style); 2257 return valueForBorderRadiusCorner(style.borderTopRightRadius(), style);
2258 case CSSPropertyClip: { 2258 case CSSPropertyClip: {
2259 if (style.hasAutoClip()) 2259 if (style.hasAutoClip())
2260 return cssValuePool().createIdentifierValue(CSSValueAuto); 2260 return cssValuePool().createIdentifierValue(CSSValueAuto);
2261 RefPtrWillBeRawPtr<CSSPrimitiveValue> top = zoomAdjustedPixelValue(style .clip().top().value(), style); 2261 RefPtrWillBeRawPtr<CSSPrimitiveValue> top = style.clip().top().isAuto()
2262 RefPtrWillBeRawPtr<CSSPrimitiveValue> right = zoomAdjustedPixelValue(sty le.clip().right().value(), style); 2262 ? cssValuePool().createIdentifierValue(CSSValueAuto)
2263 RefPtrWillBeRawPtr<CSSPrimitiveValue> bottom = zoomAdjustedPixelValue(st yle.clip().bottom().value(), style); 2263 : zoomAdjustedPixelValue(style.clip().top().value(), style);
2264 RefPtrWillBeRawPtr<CSSPrimitiveValue> left = zoomAdjustedPixelValue(styl e.clip().left().value(), style); 2264 RefPtrWillBeRawPtr<CSSPrimitiveValue> right = style.clip().right().isAut o()
2265 ? cssValuePool().createIdentifierValue(CSSValueAuto)
2266 : zoomAdjustedPixelValue(style.clip().right().value(), style);
2267 RefPtrWillBeRawPtr<CSSPrimitiveValue> bottom = style.clip().bottom().isA uto()
2268 ? cssValuePool().createIdentifierValue(CSSValueAuto)
2269 : zoomAdjustedPixelValue(style.clip().bottom().value(), style);
2270 RefPtrWillBeRawPtr<CSSPrimitiveValue> left = style.clip().left().isAuto( )
2271 ? cssValuePool().createIdentifierValue(CSSValueAuto)
2272 : zoomAdjustedPixelValue(style.clip().left().value(), style);
2265 return CSSQuadValue::create(top.release(), right.release(), bottom.relea se(), left.release(), CSSQuadValue::SerializeAsRect); 2273 return CSSQuadValue::create(top.release(), right.release(), bottom.relea se(), left.release(), CSSQuadValue::SerializeAsRect);
2266 } 2274 }
2267 case CSSPropertySpeak: 2275 case CSSPropertySpeak:
2268 return cssValuePool().createValue(style.speak()); 2276 return cssValuePool().createValue(style.speak());
2269 case CSSPropertyTransform: 2277 case CSSPropertyTransform:
2270 return computedTransform(layoutObject, style); 2278 return computedTransform(layoutObject, style);
2271 case CSSPropertyTransformOrigin: { 2279 case CSSPropertyTransformOrigin: {
2272 RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSeparat ed(); 2280 RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSeparat ed();
2273 if (layoutObject) { 2281 if (layoutObject) {
2274 LayoutRect box; 2282 LayoutRect box;
(...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after
2690 case CSSPropertyAll: 2698 case CSSPropertyAll:
2691 return nullptr; 2699 return nullptr;
2692 default: 2700 default:
2693 break; 2701 break;
2694 } 2702 }
2695 ASSERT_NOT_REACHED(); 2703 ASSERT_NOT_REACHED();
2696 return nullptr; 2704 return nullptr;
2697 } 2705 }
2698 2706
2699 } 2707 }
OLDNEW
« 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