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

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

Issue 16358010: [CSS Exclusions] Add CSS parsing support for image URI shape-inside and shape-outside values (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 6 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/CSSComputedStyleDeclaration.cpp
diff --git a/Source/core/css/CSSComputedStyleDeclaration.cpp b/Source/core/css/CSSComputedStyleDeclaration.cpp
index 474c08442c1adfff7c3a03a2874bbfed574fbe43..4fc0fc5eb0af68b411368978d8741df06c0adade 100644
--- a/Source/core/css/CSSComputedStyleDeclaration.cpp
+++ b/Source/core/css/CSSComputedStyleDeclaration.cpp
@@ -2591,14 +2591,24 @@ PassRefPtr<CSSValue> CSSComputedStyleDeclaration::getPropertyCSSValue(CSSPropert
case CSSPropertyWebkitShapeInside:
if (!style->shapeInside())
return cssValuePool().createIdentifierValue(CSSValueAuto);
- else if (style->shapeInside()->type() == ExclusionShapeValue::OUTSIDE)
+ if (style->shapeInside()->type() == ExclusionShapeValue::Outside)
return cssValuePool().createIdentifierValue(CSSValueOutsideShape);
- ASSERT(style->shapeInside()->type() == ExclusionShapeValue::SHAPE);
+ if (style->shapeInside()->type() == ExclusionShapeValue::Image) {
+ if (style->shapeInside()->image())
+ return style->shapeInside()->image()->cssValue();
+ return cssValuePool().createIdentifierValue(CSSValueNone);
+ }
+ ASSERT(style->shapeInside()->type() == ExclusionShapeValue::Shape);
return valueForBasicShape(style->shapeInside()->shape());
case CSSPropertyWebkitShapeOutside:
if (!style->shapeOutside())
return cssValuePool().createIdentifierValue(CSSValueAuto);
- ASSERT(style->shapeOutside()->type() == ExclusionShapeValue::SHAPE);
+ if (style->shapeOutside()->type() == ExclusionShapeValue::Image) {
+ if (style->shapeOutside()->image())
+ return style->shapeOutside()->image()->cssValue();
+ return cssValuePool().createIdentifierValue(CSSValueNone);
+ }
+ ASSERT(style->shapeOutside()->type() == ExclusionShapeValue::Shape);
return valueForBasicShape(style->shapeOutside()->shape());
case CSSPropertyWebkitWrapThrough:
return cssValuePool().createValue(style->wrapThrough());

Powered by Google App Engine
This is Rietveld 408576698