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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
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 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public 9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 2573 matching lines...) Expand 10 before | Expand all | Expand 10 after
2584 return cssValuePool().createValue(style->regionOverflow()); 2584 return cssValuePool().createValue(style->regionOverflow());
2585 case CSSPropertyWebkitWrapFlow: 2585 case CSSPropertyWebkitWrapFlow:
2586 return cssValuePool().createValue(style->wrapFlow()); 2586 return cssValuePool().createValue(style->wrapFlow());
2587 case CSSPropertyWebkitShapeMargin: 2587 case CSSPropertyWebkitShapeMargin:
2588 return cssValuePool().createValue(style->shapeMargin()); 2588 return cssValuePool().createValue(style->shapeMargin());
2589 case CSSPropertyWebkitShapePadding: 2589 case CSSPropertyWebkitShapePadding:
2590 return cssValuePool().createValue(style->shapePadding()); 2590 return cssValuePool().createValue(style->shapePadding());
2591 case CSSPropertyWebkitShapeInside: 2591 case CSSPropertyWebkitShapeInside:
2592 if (!style->shapeInside()) 2592 if (!style->shapeInside())
2593 return cssValuePool().createIdentifierValue(CSSValueAuto); 2593 return cssValuePool().createIdentifierValue(CSSValueAuto);
2594 else if (style->shapeInside()->type() == ExclusionShapeValue::OUTSID E) 2594 if (style->shapeInside()->type() == ExclusionShapeValue::Outside)
2595 return cssValuePool().createIdentifierValue(CSSValueOutsideShape ); 2595 return cssValuePool().createIdentifierValue(CSSValueOutsideShape );
2596 ASSERT(style->shapeInside()->type() == ExclusionShapeValue::SHAPE); 2596 if (style->shapeInside()->type() == ExclusionShapeValue::Image) {
2597 if (style->shapeInside()->image())
2598 return style->shapeInside()->image()->cssValue();
2599 return cssValuePool().createIdentifierValue(CSSValueNone);
2600 }
2601 ASSERT(style->shapeInside()->type() == ExclusionShapeValue::Shape);
2597 return valueForBasicShape(style->shapeInside()->shape()); 2602 return valueForBasicShape(style->shapeInside()->shape());
2598 case CSSPropertyWebkitShapeOutside: 2603 case CSSPropertyWebkitShapeOutside:
2599 if (!style->shapeOutside()) 2604 if (!style->shapeOutside())
2600 return cssValuePool().createIdentifierValue(CSSValueAuto); 2605 return cssValuePool().createIdentifierValue(CSSValueAuto);
2601 ASSERT(style->shapeOutside()->type() == ExclusionShapeValue::SHAPE); 2606 if (style->shapeOutside()->type() == ExclusionShapeValue::Image) {
2607 if (style->shapeOutside()->image())
2608 return style->shapeOutside()->image()->cssValue();
2609 return cssValuePool().createIdentifierValue(CSSValueNone);
2610 }
2611 ASSERT(style->shapeOutside()->type() == ExclusionShapeValue::Shape);
2602 return valueForBasicShape(style->shapeOutside()->shape()); 2612 return valueForBasicShape(style->shapeOutside()->shape());
2603 case CSSPropertyWebkitWrapThrough: 2613 case CSSPropertyWebkitWrapThrough:
2604 return cssValuePool().createValue(style->wrapThrough()); 2614 return cssValuePool().createValue(style->wrapThrough());
2605 case CSSPropertyWebkitFilter: 2615 case CSSPropertyWebkitFilter:
2606 return valueForFilter(renderer, style.get()); 2616 return valueForFilter(renderer, style.get());
2607 case CSSPropertyMixBlendMode: 2617 case CSSPropertyMixBlendMode:
2608 return cssValuePool().createValue(style->blendMode()); 2618 return cssValuePool().createValue(style->blendMode());
2609 2619
2610 case CSSPropertyBackgroundBlendMode: { 2620 case CSSPropertyBackgroundBlendMode: {
2611 const FillLayer* layers = style->backgroundLayers(); 2621 const FillLayer* layers = style->backgroundLayers();
(...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after
2990 static const CSSPropertyID propertiesAfterSlashSeperator[3] = { CSSPropertyB ackgroundSize, CSSPropertyBackgroundOrigin, 3000 static const CSSPropertyID propertiesAfterSlashSeperator[3] = { CSSPropertyB ackgroundSize, CSSPropertyBackgroundOrigin,
2991 CSSPropertyB ackgroundClip }; 3001 CSSPropertyB ackgroundClip };
2992 3002
2993 RefPtr<CSSValueList> list = CSSValueList::createSlashSeparated(); 3003 RefPtr<CSSValueList> list = CSSValueList::createSlashSeparated();
2994 list->append(getCSSPropertyValuesForShorthandProperties(StylePropertyShortha nd(propertiesBeforeSlashSeperator, WTF_ARRAY_LENGTH(propertiesBeforeSlashSeperat or)))); 3004 list->append(getCSSPropertyValuesForShorthandProperties(StylePropertyShortha nd(propertiesBeforeSlashSeperator, WTF_ARRAY_LENGTH(propertiesBeforeSlashSeperat or))));
2995 list->append(getCSSPropertyValuesForShorthandProperties(StylePropertyShortha nd(propertiesAfterSlashSeperator, WTF_ARRAY_LENGTH(propertiesAfterSlashSeperator )))); 3005 list->append(getCSSPropertyValuesForShorthandProperties(StylePropertyShortha nd(propertiesAfterSlashSeperator, WTF_ARRAY_LENGTH(propertiesAfterSlashSeperator ))));
2996 return list.release(); 3006 return list.release();
2997 } 3007 }
2998 3008
2999 } // namespace WebCore 3009 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698