LayoutTests/ChangeLog

 12011-06-07 Alexandru Chiculita <achicu@adobe.com>
 2
 3 Reviewed by NOBODY (OOPS!).
 4
 5 [CSS Exclusions] Parse wrap-shape property
 6 https://bugs.webkit.org/show_bug.cgi?id=61726
 7
 8 * platform/gtk/Skipped:
 9 * platform/mac/Skipped:
 10 * platform/qt/Skipped:
 11 * platform/win/Skipped:
 12
1132011-06-07 MORITA Hajime <morrita@google.com>
214
315 Unreviewed Skipped entry addition following r88225.

LayoutTests/platform/gtk/Skipped

@@http/tests/eventsource/workers/eventsource-simple.html
15271527
15281528# failing dropzone test(http://bugs.webkit.org/show_bug.cgi?id=61630)
15291529fast/events/dropzone-002.html
 1530
 1531# CSS Exclusions request ENABLE(CSS_EXCLUSIONS) support
 1532fast/exclusions/

LayoutTests/platform/mac/Skipped

@@svg/zoom/page/zoom-svg-through-object-with-text.xhtml
374374
375375# JSC does not support setIsolatedWorldSecurityOrigin (http://webkit.org/b/61540)
376376http/tests/security/isolatedWorld/cross-origin-xhr.html
 377
 378# CSS Exclusions request ENABLE(CSS_EXCLUSIONS) support
 379fast/exclusions/

LayoutTests/platform/qt/Skipped

@@svg/filters/feConvolveFilter-y-bounds.svg
25472547svg/zoom/page/zoom-svg-through-object-with-absolute-size-2.xhtml
25482548svg/zoom/page/zoom-svg-through-object-with-auto-size.html
25492549http/tests/misc/object-embedding-svg-delayed-size-negotiation.xhtml
 2550
 2551# CSS Exclusions request ENABLE(CSS_EXCLUSIONS) support
 2552fast/exclusions/

LayoutTests/platform/win/Skipped

@@loader/navigation-while-deferring-loads.html
13231323
13241324# JSC does not support setIsolatedWorldSecurityOrigin (http://webkit.org/b/61540)
13251325http/tests/security/isolatedWorld/cross-origin-xhr.html
 1326
 1327# CSS Exclusions request ENABLE(CSS_EXCLUSIONS) support
 1328fast/exclusions/

Source/WebCore/ChangeLog

 12011-06-07 Alexandru Chiculita <achicu@adobe.com>
 2
 3 Reviewed by NOBODY (OOPS!).
 4
 5 [CSS Exclusions] Parse wrap-shape property
 6 https://bugs.webkit.org/show_bug.cgi?id=61726
 7
 8 * WebCore.vcproj/WebCore.vcproj:
 9 * WebCore.xcodeproj/project.pbxproj:
 10 * css/CSSComputedStyleDeclaration.cpp:
 11 (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
 12 * css/CSSParser.cpp:
 13 (WebCore::CSSParser::parseValue):
 14 (WebCore::CSSParser::parseWrapShapeRect):
 15 (WebCore::CSSParser::parseWrapShapeCircle):
 16 (WebCore::CSSParser::parseWrapShapeEllipse):
 17 (WebCore::CSSParser::parseWrapShapePolygon):
 18 (WebCore::CSSParser::parseWrapShape):
 19 * css/CSSParser.h:
 20 * css/CSSPrimitiveValue.cpp:
 21 (WebCore::CSSPrimitiveValue::init):
 22 (WebCore::CSSPrimitiveValue::cleanup):
 23 (WebCore::CSSPrimitiveValue::cssText):
 24 * css/CSSPrimitiveValue.h:
 25 (WebCore::CSSPrimitiveValue::getShapeValue):
 26 * css/CSSPropertyNames.in:
 27 * css/CSSStyleSelector.cpp:
 28 (WebCore::CSSStyleSelector::applyProperty):
 29 * css/CSSValueKeywords.in:
 30 * css/SVGCSSValueKeywords.in:
 31 * platform/graphics/Path.h:
 32 * rendering/style/RenderStyle.cpp:
 33 (WebCore::RenderStyle::diff):
 34 * rendering/style/RenderStyle.h:
 35 (WebCore::InheritedFlags::setWrapShape):
 36 (WebCore::InheritedFlags::wrapShape):
 37 (WebCore::InheritedFlags::initialWrapShape):
 38 * rendering/style/StyleRareNonInheritedData.cpp:
 39 (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
 40 (WebCore::StyleRareNonInheritedData::operator==):
 41 * rendering/style/StyleRareNonInheritedData.h:
 42
1432011-06-07 MORITA Hajime <morrita@google.com>
244
345 Unreviewed, rolling out r88212 and r88219.

Source/WebCore/WebCore.vcproj/WebCore.vcproj

2756127561 >
2756227562 </File>
2756327563 <File
 27564 RelativePath="..\platform\graphics\WindRule.h"
 27565 >
 27566 </File>
 27567 <File
2756427568 RelativePath="..\platform\graphics\WOFFFileFormat.cpp"
2756527569 >
2756627570 </File>

3273032734 >
3273132735 </File>
3273232736 <File
 32737 RelativePath="..\css\Shape.cpp"
 32738 >
 32739 </File>
 32740 <File
 32741 RelativePath="..\css\Shape.h"
 32742 >
 32743 </File>
 32744 <File
3273332745 RelativePath="..\css\StyleBase.cpp"
3273432746 >
3273532747 </File>

Source/WebCore/WebCore.xcodeproj/project.pbxproj

12521252 4FA3B90B125CD12200300BAD /* InspectorState.h in Headers */ = {isa = PBXBuildFile; fileRef = 4FA3B909125CD12200300BAD /* InspectorState.h */; };
12531253 4FD8D0F2119C718B002FA825 /* ScriptGCEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4FD8D0F0119C718B002FA825 /* ScriptGCEvent.cpp */; };
12541254 4FD8D0F3119C718B002FA825 /* ScriptGCEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 4FD8D0F1119C718B002FA825 /* ScriptGCEvent.h */; };
 1255 501BA9E21393CEA000F7ACEB /* Shape.h in Headers */ = {isa = PBXBuildFile; fileRef = 501BA9E11393CEA000F7ACEB /* Shape.h */; settings = {ATTRIBUTES = (Private, ); }; };
 1256 501BAAA913950E2C00F7ACEB /* WindRule.h in Headers */ = {isa = PBXBuildFile; fileRef = 501BAAA813950E2C00F7ACEB /* WindRule.h */; settings = {ATTRIBUTES = (Private, ); }; };
 1257 50E566D6139E38C500214433 /* Shape.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 501BAAB11395114B00F7ACEB /* Shape.cpp */; };
12551258 510184690B08602A004A825F /* CachedPage.h in Headers */ = {isa = PBXBuildFile; fileRef = 510184670B08602A004A825F /* CachedPage.h */; settings = {ATTRIBUTES = (Private, ); }; };
12561259 5101846A0B08602A004A825F /* CachedPage.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 510184680B08602A004A825F /* CachedPage.cpp */; };
12571260 510D4A33103165EE0049EA54 /* SocketStreamErrorBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 510D4A2D103165EE0049EA54 /* SocketStreamErrorBase.cpp */; };

78637866 4FA3B909125CD12200300BAD /* InspectorState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InspectorState.h; sourceTree = "<group>"; };
78647867 4FD8D0F0119C718B002FA825 /* ScriptGCEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ScriptGCEvent.cpp; sourceTree = "<group>"; };
78657868 4FD8D0F1119C718B002FA825 /* ScriptGCEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScriptGCEvent.h; sourceTree = "<group>"; };
 7869 501BA9E11393CEA000F7ACEB /* Shape.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Shape.h; sourceTree = "<group>"; };
 7870 501BAAA813950E2C00F7ACEB /* WindRule.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WindRule.h; sourceTree = "<group>"; };
 7871 501BAAB11395114B00F7ACEB /* Shape.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Shape.cpp; sourceTree = "<group>"; };
78667872 510184670B08602A004A825F /* CachedPage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CachedPage.h; sourceTree = "<group>"; };
78677873 510184680B08602A004A825F /* CachedPage.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CachedPage.cpp; sourceTree = "<group>"; };
78687874 510D4A2D103165EE0049EA54 /* SocketStreamErrorBase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SocketStreamErrorBase.cpp; sourceTree = "<group>"; };

1790517911 B2A015910AF6CD53006BCE0E /* graphics */ = {
1790617912 isa = PBXGroup;
1790717913 children = (
 17914 501BAAA813950E2C00F7ACEB /* WindRule.h */,
1790817915 076F0D0812B8192700C26AA4 /* avfoundation */,
1790917916 499B3EC0128CCC1800E726C2 /* ca */,
1791017917 B27535290B053814002CE64F /* cg */,

1901719024 F523D18402DE42E8018635CA /* css */ = {
1901819025 isa = PBXGroup;
1901919026 children = (
 19027 501BA9E11393CEA000F7ACEB /* Shape.h */,
1902019028 93CA4C9C09DF93FA00DF8677 /* maketokenizer */,
1902119029 A80E6CDA0A1989CA007FB8C5 /* Counter.h */,
1902219030 930705C709E0C95F00B17FE4 /* Counter.idl */,

1920719215 BC9ADD7F0CC4092200098C4C /* WebKitCSSTransformValue.cpp */,
1920819216 BC9ADD220CC4032600098C4C /* WebKitCSSTransformValue.h */,
1920919217 31611E540E1C4D4A00F6A579 /* WebKitCSSTransformValue.idl */,
 19218 501BAAB11395114B00F7ACEB /* Shape.cpp */,
1921019219 );
1921119220 path = css;
1921219221 sourceTree = "<group>";

2313623145 B12D236E1356034D002A28D4 /* JSMultipleTrackList.h in Headers */,
2313723146 8C0E334D138A92C7008DA94F /* LevelDBTransaction.h in Headers */,
2313823147 8C0E334F138A92C7008DA94F /* LevelDBWriteBatch.h in Headers */,
 23148 501BA9E21393CEA000F7ACEB /* Shape.h in Headers */,
 23149 501BAAA913950E2C00F7ACEB /* WindRule.h in Headers */,
2313923150 FD359190138DB22000E1EBEC /* AudioParamTimeline.h in Headers */,
2314023151 4496E39E1398136C003EE32A /* JSSVGAnimateMotionElement.h in Headers */,
2314123152 4496E3A0139813A5003EE32A /* JSSVGMPathElement.h in Headers */,

2587025881 4496E39D1398136C003EE32A /* JSSVGAnimateMotionElement.cpp in Sources */,
2587125882 4496E3A2139813CB003EE32A /* JSSVGMPathElement.cpp in Sources */,
2587225883 2E24476813959173004B6C19 /* JSOperationNotAllowedException.cpp in Sources */,
 25884 50E566D6139E38C500214433 /* Shape.cpp in Sources */,
2587325885 );
2587425886 runOnlyForDeploymentPostprocessing = 0;
2587525887 };

Source/WebCore/css/CSSComputedStyleDeclaration.cpp

@@PassRefPtr<CSSValue> CSSComputedStyleDeclaration::getPropertyCSSValue(int proper
17661766 case CSSPropertyWebkitTransformOriginZ:
17671767 case CSSPropertyWebkitTransition:
17681768 break;
 1769
 1770
 1771 case CSSPropertyWebkitWrapShape:
 1772#if ENABLE(CSS_EXCLUSIONS)
 1773 if (!style->wrapShape())
 1774 return primitiveValueCache->createIdentifierValue(CSSValueAuto);
 1775
 1776 return primitiveValueCache->createValue(style->wrapShape());
 1777#else
 1778 break;
 1779#endif
 1780
17691781#if ENABLE(SVG)
17701782 case CSSPropertyClipPath:
17711783 case CSSPropertyClipRule:

Source/WebCore/css/CSSParser.cpp

8181#include "DashboardRegion.h"
8282#endif
8383
 84#if ENABLE(CSS_EXCLUSIONS)
 85#include "Shape.h"
 86#endif
 87
8488#define YYDEBUG 0
8589
8690#if YYDEBUG > 0

@@bool CSSParser::parseValue(int propId, bool important)
20382042 return parseLineBoxContain(important);
20392043 break;
20402044
 2045 case CSSPropertyWebkitWrapShape:
 2046#if ENABLE(CSS_EXCLUSIONS)
 2047 if (id == CSSValueAuto)
 2048 validPrimitive = true;
 2049 else if (value->unit == CSSParserValue::Function)
 2050 return parseWrapShape(important);
 2051#endif
 2052 break;
 2053
20412054#if ENABLE(SVG)
20422055 default:
20432056 return parseSVGValue(propId, important);

@@bool CSSParser::parseShape(int propId, bool important)
36173630 return false;
36183631}
36193632
 3633#if ENABLE(CSS_EXCLUSIONS)
 3634PassRefPtr<Shape> CSSParser::parseWrapShapeRect(CSSParserValueList* args)
 3635{
 3636 ASSERT(args);
 3637
 3638 // rect(x, y, width, height, [[rx], ry])
 3639 if (args->size() != 7 && args->size() != 9 && args->size() != 11)
 3640 return 0;
 3641
 3642 bool valid = true;
 3643
 3644 RefPtr<RectShape> shape = RectShape::create();
 3645
 3646 int i = 0;
 3647 CSSParserValue* a = args->current();
 3648 while (a) {
 3649 valid = validUnit(a, FLength, m_strict);
 3650 if (!valid)
 3651 break;
 3652 RefPtr<CSSPrimitiveValue> length = primitiveValueCache()->createValue(a->fValue, (CSSPrimitiveValue::UnitTypes) a->unit);
 3653 if (!i)
 3654 shape->setLeft(length);
 3655 else if (i == 1)
 3656 shape->setTop(length);
 3657 else if (i == 2)
 3658 shape->setWidth(length);
 3659 else if (i == 3)
 3660 shape->setHeight(length);
 3661 else if (i == 4)
 3662 shape->setRadiusX(length);
 3663 else if (i == 5)
 3664 shape->setRadiusY(length);
 3665 else {
 3666 valid = false;
 3667 break;
 3668 }
 3669 a = args->next();
 3670 if (a) {
 3671 if (a->unit == CSSParserValue::Operator && a->iValue == ',')
 3672 a = args->next();
 3673 else {
 3674 valid = false;
 3675 break;
 3676 }
 3677 }
 3678 i++;
 3679 }
 3680 if (!valid || i < 4)
 3681 return 0;
 3682 return shape;
 3683}
 3684
 3685PassRefPtr<Shape> CSSParser::parseWrapShapeCircle(CSSParserValueList* args)
 3686{
 3687 ASSERT(args);
 3688
 3689 // circle(x, y, r)
 3690 if (args->size() != 5)
 3691 return 0;
 3692
 3693 bool valid = true;
 3694
 3695 RefPtr<CircleShape> shape = CircleShape::create();
 3696
 3697 int i = 0;
 3698 CSSParserValue* a = args->current();
 3699 while (a) {
 3700 valid = validUnit(a, FLength, m_strict);
 3701 if (!valid)
 3702 break;
 3703 RefPtr<CSSPrimitiveValue> length = primitiveValueCache()->createValue(a->fValue, (CSSPrimitiveValue::UnitTypes) a->unit);
 3704 if (!i)
 3705 shape->setLeft(length);
 3706 else if (i == 1)
 3707 shape->setTop(length);
 3708 else if (i == 2)
 3709 shape->setRadius(length);
 3710 else {
 3711 valid = false;
 3712 break;
 3713 }
 3714 a = args->next();
 3715 if (a) {
 3716 if (a->unit == CSSParserValue::Operator && a->iValue == ',')
 3717 a = args->next();
 3718 else {
 3719 valid = false;
 3720 break;
 3721 }
 3722 }
 3723 i++;
 3724 }
 3725 if (!valid || i < 3)
 3726 return 0;
 3727 return shape;
 3728}
 3729
 3730PassRefPtr<Shape> CSSParser::parseWrapShapeEllipse(CSSParserValueList* args)
 3731{
 3732 ASSERT(args);
 3733
 3734 // ellipse(x, y, rx, ry)
 3735 if (args->size() != 7)
 3736 return 0;
 3737
 3738 bool valid = false;
 3739
 3740 RefPtr<EllipseShape> shape = EllipseShape::create();
 3741 int i = 0;
 3742 CSSParserValue* a = args->current();
 3743 while (a) {
 3744 valid = validUnit(a, FLength, m_strict);
 3745 if (!valid)
 3746 break;
 3747 RefPtr<CSSPrimitiveValue> length = primitiveValueCache()->createValue(a->fValue, (CSSPrimitiveValue::UnitTypes) a->unit);
 3748 if (!i)
 3749 shape->setLeft(length);
 3750 else if (i == 1)
 3751 shape->setTop(length);
 3752 else if (i == 2)
 3753 shape->setRadiusX(length);
 3754 else if (i == 3)
 3755 shape->setRadiusY(length);
 3756 else {
 3757 valid = false;
 3758 break;
 3759 }
 3760 a = args->next();
 3761 if (a) {
 3762 if (a && a->unit == CSSParserValue::Operator && a->iValue == ',')
 3763 a = args->next();
 3764 else {
 3765 valid = false;
 3766 break;
 3767 }
 3768 }
 3769 i++;
 3770 }
 3771 if (!valid || i < 4)
 3772 return 0;
 3773 return shape;
 3774}
 3775
 3776PassRefPtr<Shape> CSSParser::parseWrapShapePolygon(CSSParserValueList* args)
 3777{
 3778 ASSERT(args);
 3779
 3780 unsigned size = args->size();
 3781 if (!size)
 3782 return 0;
 3783
 3784 RefPtr<PolygonShape> shape = PolygonShape::create();
 3785
 3786 CSSParserValue* a = args->current();
 3787 if (a->id == CSSValueEvenodd || a->id == CSSValueNonzero) {
 3788 shape->setWindRule(a->id == CSSValueEvenodd ? RULE_EVENODD : RULE_NONZERO);
 3789
 3790 CSSParserValue* comma = args->next();
 3791 if (!comma || comma->unit != CSSParserValue::Operator || comma->iValue != ',')
 3792 return 0;
 3793
 3794 a = args->next();
 3795 size -= 2;
 3796 }
 3797
 3798 // <length>, <length> ... <length>, <length> -> each pair has 3 elements
 3799 if (!size || (size % 3))
 3800 return 0;
 3801
 3802 while (a) {
 3803 if (!validUnit(a, FLength, m_strict))
 3804 return 0;
 3805
 3806 CSSParserValue* comma = args->next();
 3807 if (!comma || comma->unit != CSSParserValue::Operator || comma->iValue != ',')
 3808 return 0;
 3809
 3810 CSSParserValue* b = args->next();
 3811 if (!b || !validUnit(b, FLength, m_strict))
 3812 return 0;
 3813
 3814 RefPtr<CSSPrimitiveValue> xLength = primitiveValueCache()->createValue(a->fValue, (CSSPrimitiveValue::UnitTypes) a->unit);
 3815 RefPtr<CSSPrimitiveValue> yLength = primitiveValueCache()->createValue(b->fValue, (CSSPrimitiveValue::UnitTypes) b->unit);
 3816
 3817 shape->appendPoint(xLength.release(), yLength.release());
 3818
 3819 a = args->next();
 3820 }
 3821
 3822 return shape;
 3823}
 3824
 3825bool CSSParser::parseWrapShape(bool important)
 3826{
 3827 CSSParserValue* value = m_valueList->current();
 3828 CSSParserValueList* args = value->function->args.get();
 3829
 3830 if (!args)
 3831 return false;
 3832
 3833 RefPtr<Shape> shape;
 3834
 3835 if (equalIgnoringCase(value->function->name, "rect("))
 3836 shape = parseWrapShapeRect(args);
 3837 else if (equalIgnoringCase(value->function->name, "circle("))
 3838 shape = parseWrapShapeCircle(args);
 3839 else if (equalIgnoringCase(value->function->name, "ellipse("))
 3840 shape = parseWrapShapeEllipse(args);
 3841 else if (equalIgnoringCase(value->function->name, "polygon("))
 3842 shape = parseWrapShapePolygon(args);
 3843
 3844 if (shape) {
 3845 addProperty(CSSPropertyWebkitWrapShape, primitiveValueCache()->createValue(shape.release()), important);
 3846 m_valueList->next();
 3847 return true;
 3848 }
 3849
 3850 return false;
 3851}
 3852#endif // ENABLE(CSS_EXCLUSIONS)
 3853
36203854// [ 'font-style' || 'font-variant' || 'font-weight' ]? 'font-size' [ / 'line-height' ]? 'font-family'
36213855bool CSSParser::parseFont(bool important)
36223856{

Source/WebCore/css/CSSParser.h

@@namespace WebCore {
5353 class WebKitCSSKeyframeRule;
5454 class WebKitCSSKeyframesRule;
5555
 56#if ENABLE(CSS_EXCLUSIONS)
 57 class Shape;
 58#endif
 59
5660 class CSSParser {
5761 public:
5862 CSSParser(bool strictParsing = true);

@@namespace WebCore {
124128
125129 bool parseShape(int propId, bool important);
126130
 131#if ENABLE(CSS_EXCLUSIONS)
 132 bool parseWrapShape(bool important);
 133 PassRefPtr<Shape> parseWrapShapeRect(CSSParserValueList* args);
 134 PassRefPtr<Shape> parseWrapShapeCircle(CSSParserValueList* args);
 135 PassRefPtr<Shape> parseWrapShapeEllipse(CSSParserValueList* args);
 136 PassRefPtr<Shape> parseWrapShapePolygon(CSSParserValueList* args);
 137#endif
 138
127139 bool parseFont(bool important);
128140 PassRefPtr<CSSValueList> parseFontFamily();
129141

Source/WebCore/css/CSSPrimitiveValue.cpp

4444#include "DashboardRegion.h"
4545#endif
4646
 47#if ENABLE(CSS_EXCLUSIONS)
 48#include "Shape.h"
 49#endif
 50
4751using namespace WTF;
4852
4953namespace WebCore {

@@void CSSPrimitiveValue::init(PassRefPtr<Pair> p)
208212 m_value.pair = p.releaseRef();
209213}
210214
 215#if ENABLE(CSS_EXCLUSIONS)
 216void CSSPrimitiveValue::init(PassRefPtr<Shape> shape)
 217{
 218 m_type = CSS_SHAPE;
 219 m_hasCachedCSSText = false;
 220 m_value.shape = shape.releaseRef();
 221}
 222#endif
 223
211224CSSPrimitiveValue::~CSSPrimitiveValue()
212225{
213226 cleanup();

@@void CSSPrimitiveValue::cleanup()
238251 m_value.region->deref();
239252 break;
240253#endif
 254#if ENABLE(CSS_EXCLUSIONS)
 255 case CSS_SHAPE:
 256 m_value.shape->deref();
 257 break;
 258#endif
241259 default:
242260 break;
243261 }

@@String CSSPrimitiveValue::cssText() const
823841 case CSS_PARSER_IDENTIFIER:
824842 text = quoteCSSStringIfNeeded(m_value.string);
825843 break;
 844#if ENABLE(CSS_EXCLUSIONS)
 845 case CSS_SHAPE:
 846 text = m_value.shape->cssText();
 847 break;
 848#endif
826849 }
827850
828851 ASSERT(!cssTextCache().contains(this));

Source/WebCore/css/CSSPrimitiveValue.h

@@class RGBColor;
3636class Rect;
3737class RenderStyle;
3838
 39#if ENABLE(CSS_EXCLUSIONS)
 40class Shape;
 41#endif
 42
3943struct Length;
4044
4145template<typename T, T max, T min> inline T roundForImpreciseConversion(double value)

@@public:
9397 CSS_REMS = 108,
9498
9599 // This is used internally for counter names (as opposed to counter values)
96  CSS_COUNTER_NAME = 109
 100 CSS_COUNTER_NAME = 109,
 101
 102 // This is used by the CSS Exclusions draft
 103 CSS_SHAPE = 110
97104 };
98105
99106 // This enum follows the CSSParser::Units enum augmented with UNIT_FREQUENCY for frequencies.

@@public:
180187
181188 DashboardRegion* getDashboardRegionValue() const { return m_type != CSS_DASHBOARD_REGION ? 0 : m_value.region; }
182189
 190#if ENABLE(CSS_EXCLUSIONS)
 191 Shape* getShapeValue() const { return m_type != CSS_SHAPE ? 0 : m_value.shape; }
 192#endif
 193
183194 int getIdent() const;
184195 template<typename T> inline operator T() const; // Defined in CSSPrimitiveValueMappings.h
185196

@@private:
219230 void init(PassRefPtr<Rect>);
220231 void init(PassRefPtr<Pair>);
221232 void init(PassRefPtr<DashboardRegion>); // FIXME: Dashboard region should not be a primitive value.
 233#if ENABLE(CSS_EXCLUSIONS)
 234 void init(PassRefPtr<Shape>);
 235#endif
222236 bool getDoubleValueInternal(UnitTypes targetUnitType, double* result) const;
223237
224238 virtual bool isPrimitiveValue() const { return true; }

@@private:
236250 unsigned rgbcolor;
237251 Pair* pair;
238252 DashboardRegion* region;
 253#if ENABLE(CSS_EXCLUSIONS)
 254 Shape* shape;
 255#endif
239256 } m_value;
240257};
241258

Source/WebCore/css/CSSPropertyNames.in

@@z-index
297297-webkit-perspective-origin-x
298298-webkit-perspective-origin-y
299299-webkit-rtl-ordering
 300-webkit-wrap-shape
300301-webkit-text-combine
301302-epub-text-combine = -webkit-text-combine
302303-webkit-text-decorations-in-effect

Source/WebCore/css/CSSStyleSelector.cpp

@@void CSSStyleSelector::applyProperty(int id, CSSValue *value)
53835383 m_style->setLineBoxContain(lineBoxContainValue->value());
53845384 return;
53855385 }
 5386
 5387 case CSSPropertyWebkitWrapShape:
 5388#if ENABLE(CSS_EXCLUSIONS)
 5389 if (isInitial) {
 5390 HANDLE_INITIAL_COND(CSSPropertyWebkitWrapShape, WrapShape)
 5391 return;
 5392 }
 5393
 5394 if (primitiveValue && primitiveValue->getIdent() == CSSValueAuto)
 5395 m_style->setWrapShape(0);
 5396
 5397 if (primitiveValue && primitiveValue->primitiveType() == CSSPrimitiveValue::CSS_SHAPE)
 5398 m_style->setWrapShape(primitiveValue->getShapeValue());
 5399#endif
 5400 return;
53865401
53875402 // These properties are implemented in the CSSStyleApplyProperty lookup table.
53885403 case CSSPropertyColor:

Source/WebCore/css/CSSValueKeywords.in

@@replaced
807807#optimizeSpeed
808808optimizeQuality
809809-webkit-optimize-contrast
 810
 811# -webkit-wrap-shape
 812nonzero
 813evenodd

Source/WebCore/css/SVGCSSValueKeywords.in

@@yellowgreen
162162
163163# CSS_PROP_CLIP_PATH
164164# CSS_PROP_CLIP_RULE
165 nonzero
166 evenodd
 165# nonzero
 166# evenodd
167167
168168# CSS_PROP_MASK
169169# CSS_PROP_OPACITY

Source/WebCore/platform/graphics/Path.h

2929#define Path_h
3030
3131#include "RoundedIntRect.h"
 32#include "WindRule.h"
3233#include <wtf/FastAllocBase.h>
3334#include <wtf/Forward.h>
3435

@@namespace WebCore {
8182 class GraphicsContext;
8283 class StrokeStyleApplier;
8384
84  enum WindRule {
85  RULE_NONZERO = 0,
86  RULE_EVENODD = 1
87  };
88 
8985 enum PathElementType {
9086 PathElementMoveToPoint,
9187 PathElementAddLineToPoint,

Source/WebCore/rendering/style/RenderStyle.cpp

3636#include <wtf/StdLibExtras.h>
3737#include <algorithm>
3838
 39#if ENABLE(EXCLUSION)
 40#include "Shape.h"
 41#endif
 42
3943using namespace std;
4044
4145namespace WebCore {

@@StyleDifference RenderStyle::diff(const RenderStyle* other, unsigned& changedCon
563567 || rareInheritedData->textEmphasisFill != other->rareInheritedData->textEmphasisFill
564568 || rareInheritedData->m_imageRendering != other->rareInheritedData->m_imageRendering)
565569 return StyleDifferenceRepaint;
 570
 571#if ENABLE(CSS_EXCLUSIONS)
 572 // FIXME: use the correct diff result
 573 if (rareNonInheritedData->m_wrapShape != other->rareNonInheritedData->m_wrapShape)
 574 return StyleDifferenceRepaint;
 575#endif
566576
567577#if USE(ACCELERATED_COMPOSITING)
568578 if (rareNonInheritedData.get() != other->rareNonInheritedData.get()) {

Source/WebCore/rendering/style/RenderStyle.h

@@public:
11451145 void setFloodOpacity(float f) { accessSVGStyle()->setFloodOpacity(f); }
11461146#endif
11471147
 1148#if ENABLE(CSS_EXCLUSIONS)
 1149 void setWrapShape(PassRefPtr<Shape> shape)
 1150 {
 1151 if (rareNonInheritedData->m_wrapShape != shape)
 1152 rareNonInheritedData.access()->m_wrapShape = shape;
 1153 }
 1154 Shape* wrapShape() const { return rareNonInheritedData->m_wrapShape.get(); }
 1155 static Shape* initialWrapShape() { return 0; }
 1156#endif
 1157
11481158 const ContentData* contentData() const { return rareNonInheritedData->m_content.get(); }
11491159 bool contentDataEquivalent(const RenderStyle* otherStyle) const { return const_cast<RenderStyle*>(this)->rareNonInheritedData->contentDataEquivalent(*const_cast<RenderStyle*>(otherStyle)->rareNonInheritedData); }
11501160 void clearContent();

Source/WebCore/rendering/style/StyleRareNonInheritedData.cpp

@@StyleRareNonInheritedData::StyleRareNonInheritedData()
5555 , m_perspectiveOriginY(RenderStyle::initialPerspectiveOriginY())
5656 , m_pageSize()
5757 , m_pageSizeType(PAGE_SIZE_AUTO)
 58#if ENABLE(CSS_EXCLUSIONS)
 59 , m_wrapShape(RenderStyle::initialWrapShape())
 60#endif
5861{
5962}
6063

@@StyleRareNonInheritedData::StyleRareNonInheritedData(const StyleRareNonInherited
9295 , m_perspectiveOriginY(o.m_perspectiveOriginY)
9396 , m_pageSize(o.m_pageSize)
9497 , m_pageSizeType(o.m_pageSizeType)
 98#if ENABLE(CSS_EXCLUSIONS)
 99 , m_wrapShape(o.m_wrapShape)
 100#endif
 101
95102{
96103}
97104

@@bool StyleRareNonInheritedData::operator==(const StyleRareNonInheritedData& o) c
138145 && (m_perspectiveOriginY == o.m_perspectiveOriginY)
139146 && (m_pageSize == o.m_pageSize)
140147 && (m_pageSizeType == o.m_pageSizeType)
 148#if ENABLE(CSS_EXCLUSIONS)
 149 && (m_wrapShape == o.m_wrapShape)
 150#endif
141151 ;
142152}
143153

Source/WebCore/rendering/style/StyleRareNonInheritedData.h

3636#include <wtf/PassRefPtr.h>
3737#include <wtf/Vector.h>
3838
 39#if ENABLE(CSS_EXCLUSIONS)
 40#include "Shape.h"
 41#endif
 42
3943namespace WebCore {
4044
4145class AnimationList;

@@public:
129133
130134 LengthSize m_pageSize;
131135 PageSizeType m_pageSizeType;
 136
 137#if ENABLE(CSS_EXCLUSIONS)
 138 RefPtr<Shape> m_wrapShape;
 139#endif
132140
133141private:
134142 StyleRareNonInheritedData();