| Differences between
and this patch
- a/LayoutTests/ChangeLog +10 lines
Lines 1-3 a/LayoutTests/ChangeLog_sec1
1
2011-05-31  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
        * fast/exclusions/parse-wrap-shape-expected.txt: Added.
9
        * fast/exclusions/parse-wrap-shape.html: Added.
10
1
2011-05-30  Ryan Sleevi  <rsleevi@chromium.org>
11
2011-05-30  Ryan Sleevi  <rsleevi@chromium.org>
2
12
3
        Reviewed by Darin Adler.
13
        Reviewed by Darin Adler.
- a/LayoutTests/fast/exclusions/parse-wrap-shape-expected.txt +37 lines
Line 0 a/LayoutTests/fast/exclusions/parse-wrap-shape-expected.txt_sec1
1
none: auto
2
rect: rect(10px, 20px, 30px, 40px)
3
rect1: rect(10px, 20px, 30px, 40px, 5px)
4
rect2: rect(10px, 20px, 30px, 40px, 5px, 10px)
5
circle: circle(10px, 20px, 30px)
6
ellipse: ellipse(10px, 20px, 30px, 40px)
7
polygon: polygon(nonzero, 10px, 20px 30px, 40px 40px, 50px)
8
polygon1: polygon(evenodd, 10px, 20px 30px, 40px 40px, 50px)
9
polygon2: polygon(nonzero, 10px, 20px 30px, 40px 40px, 50px)
10
invalid_n1: auto
11
invalid_n2: auto
12
rect_n1: auto
13
rect_n2: auto
14
rect_n3: auto
15
rect_n4: auto
16
rect_n5: auto
17
rect_n6: auto
18
circle_n1: auto
19
circle_n2: auto
20
circle_n3: auto
21
circle_n4: auto
22
circle_n5: auto
23
ellipse_n1: auto
24
ellipse_n2: auto
25
ellipse_n3: auto
26
ellipse_n4: auto
27
ellipse_n5: auto
28
polygon_n1: auto
29
polygon_n2: auto
30
polygon_n3: auto
31
polygon_n4: auto
32
polygon_n5: auto
33
polygon_n6: auto
34
polygon_n7: auto
35
polygon_n8: auto
36
polygon_n9: auto
37
- a/LayoutTests/fast/exclusions/parse-wrap-shape.html +117 lines
Line 0 a/LayoutTests/fast/exclusions/parse-wrap-shape.html_sec1
1
<!DOCTYPE html>
2
<html>
3
    <head>
4
        <title>CSS Exclusion Test: Parse wrap-shape</title>
5
6
        <style type="text/css">
7
            #none { -webkit-wrap-shape: auto; }
8
            
9
            #rect { -webkit-wrap-shape: rect(10px, 20px, 30px, 40px); }
10
            #rect1 { -webkit-wrap-shape: rect(10px, 20px, 30px, 40px, 5px); }
11
            #rect2 { -webkit-wrap-shape: rect(10px, 20px, 30px, 40px, 5px, 10px); }
12
13
            #circle { -webkit-wrap-shape: circle(10px, 20px, 30px); }
14
15
            #ellipse { -webkit-wrap-shape: ellipse(10px, 20px, 30px, 40px); }
16
            
17
            #polygon { -webkit-wrap-shape: polygon(10px, 20px 30px, 40px 40px, 50px); }
18
            #polygon1 { -webkit-wrap-shape: polygon(evenodd, 10px, 20px 30px, 40px 40px, 50px); }
19
            #polygon2 { -webkit-wrap-shape: polygon(nonzero, 10px, 20px 30px, 40px 40px, 50px); }
20
            
21
            /* negative tests */
22
23
            #invalid_n1 { -webkit-wrap-shape: calc(); }
24
            #invalid_n2 { -webkit-wrap-shape: none; }
25
26
            #rect_n1 { -webkit-wrap-shape: rect(); }
27
            #rect_n2 { -webkit-wrap-shape: rect(10px); }
28
            #rect_n3 { -webkit-wrap-shape: rect(10px, 10px); }
29
            #rect_n4 { -webkit-wrap-shape: rect(10px, 20px, 30px); }
30
            #rect_n5 { -webkit-wrap-shape: rect(10px 20px 30px 40px); }
31
            #rect_n6 { -webkit-wrap-shape: rect(10px, 20px, 30px, 40px, 50px, 60px, 70px); }
32
            
33
            #circle_n1 { -webkit-wrap-shape: circle(); }
34
            #circle_n2 { -webkit-wrap-shape: circle(10px); }
35
            #circle_n3 { -webkit-wrap-shape: circle(10px, 20px); }
36
            #circle_n4 { -webkit-wrap-shape: circle(10px 20px 30px); }
37
            #circle_n5 { -webkit-wrap-shape: circle(10px, 20px, 30px, 40px); }
38
            
39
            #ellipse_n1 { -webkit-wrap-shape: ellipse(); }
40
            #ellipse_n2 { -webkit-wrap-shape: ellipse(10px); }
41
            #ellipse_n3 { -webkit-wrap-shape: ellipse(10px, 20px); }
42
            #ellipse_n4 { -webkit-wrap-shape: ellipse(10px, 20px, 30px); }
43
            #ellipse_n5 { -webkit-wrap-shape: ellipse(10px 20px 30px 40px); }
44
            
45
            #polygon_n1 { -webkit-wrap-shape: polygon(); }
46
            #polygon_n2 { -webkit-wrap-shape: polygon(evenodd 10px, 20px 30px, 40px 40px, 50px); }
47
            #polygon_n3 { -webkit-wrap-shape: polygon(nonzero 10px, 20px 30px, 40px 40px, 50px); }
48
            #polygon_n4 { -webkit-wrap-shape: polygon(nonzero); }
49
            #polygon_n5 { -webkit-wrap-shape: polygon(evenodd); }
50
            #polygon_n6 { -webkit-wrap-shape: polygon(10px); }
51
            #polygon_n7 { -webkit-wrap-shape: polygon(nonzero,10px); }
52
            #polygon_n8 { -webkit-wrap-shape: polygon(evenodd,12px); }
53
            #polygon_n9 { -webkit-wrap-shape: polygon(10px, 20px, 30px, 40px, 40px, 50px); }
54
                        
55
        </style>
56
        <script>
57
            if (window.layoutTestController)
58
              window.layoutTestController.dumpAsText()
59
        </script>
60
    </head>
61
    <body>
62
        <div id="none"></div>
63
        <div id="rect"></div>
64
        <div id="rect1"></div>
65
        <div id="rect2"></div>
66
67
        <div id="circle"></div>
68
        
69
        <div id="ellipse"></div>
70
        
71
        <div id="polygon"></div>
72
        <div id="polygon1"></div>
73
        <div id="polygon2"></div>
74
        
75
        <div id="invalid_n1"></div>
76
        <div id="invalid_n2"></div>
77
        
78
        <div id="rect_n1"></div>
79
        <div id="rect_n2"></div>
80
        <div id="rect_n3"></div>
81
        <div id="rect_n4"></div>
82
        <div id="rect_n5"></div>
83
        <div id="rect_n6"></div>
84
        
85
        <div id="circle_n1"></div>
86
        <div id="circle_n2"></div>
87
        <div id="circle_n3"></div>
88
        <div id="circle_n4"></div>
89
        <div id="circle_n5"></div>
90
        
91
        <div id="ellipse_n1"></div>
92
        <div id="ellipse_n2"></div>
93
        <div id="ellipse_n3"></div>
94
        <div id="ellipse_n4"></div>
95
        <div id="ellipse_n5"></div>
96
97
        <div id="polygon_n1"></div>
98
        <div id="polygon_n2"></div>
99
        <div id="polygon_n3"></div>
100
        <div id="polygon_n4"></div>
101
        <div id="polygon_n5"></div>
102
        <div id="polygon_n6"></div>
103
        <div id="polygon_n7"></div>
104
        <div id="polygon_n8"></div>
105
        <div id="polygon_n9"></div>        
106
        
107
        <script>
108
            function dumpWrapShapeCSSValue(el) {
109
                var style = window.getComputedStyle(el);
110
                document.write(el.id + ": " +style.webkitWrapShape + "<br />");
111
            }
112
            var shapes = document.getElementsByTagName("div");
113
            for (var i = 0; i < shapes.length; ++i)
114
                dumpWrapShapeCSSValue(shapes[i]);
115
        </script>
116
    </body>
117
</html>
- a/LayoutTests/platform/mac/Skipped +3 lines
Lines 365-367 http/tests/media/video-cross-site.html a/LayoutTests/platform/mac/Skipped_sec1
365
365
366
# JSC does not support setIsolatedWorldSecurityOrigin (http://webkit.org/b/61540)
366
# JSC does not support setIsolatedWorldSecurityOrigin (http://webkit.org/b/61540)
367
http/tests/security/isolatedWorld/cross-origin-xhr.html
367
http/tests/security/isolatedWorld/cross-origin-xhr.html
368
369
# CSS Exclusions request ENABLE(EXCLUSIONS) support
370
fast/exclusions/
- a/LayoutTests/platform/win/Skipped +3 lines
Lines 1309-1311 loader/navigation-while-deferring-loads.html a/LayoutTests/platform/win/Skipped_sec1
1309
1309
1310
# JSC does not support setIsolatedWorldSecurityOrigin (http://webkit.org/b/61540)
1310
# JSC does not support setIsolatedWorldSecurityOrigin (http://webkit.org/b/61540)
1311
http/tests/security/isolatedWorld/cross-origin-xhr.html
1311
http/tests/security/isolatedWorld/cross-origin-xhr.html
1312
1313
# CSS Exclusions request ENABLE(EXCLUSIONS) support
1314
fast/exclusions/
- a/Source/WebCore/ChangeLog +97 lines
Lines 1-3 a/Source/WebCore/ChangeLog_sec1
1
2011-05-31  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
        Test: fast/exclusions/parse-wrap-shape.html
9
10
        * WebCore.vcproj/WebCore.vcproj:
11
        * WebCore.xcodeproj/project.pbxproj:
12
        * css/CSSComputedStyleDeclaration.cpp:
13
        (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
14
        * css/CSSParser.cpp:
15
        (WebCore::CSSParser::parseValue):
16
        (WebCore::CSSParser::parseWrapShapeRect):
17
        (WebCore::CSSParser::parseWrapShapeCircle):
18
        (WebCore::CSSParser::parseWrapShapeEllipse):
19
        (WebCore::CSSParser::parseWrapShapePolygon):
20
        (WebCore::CSSParser::parseWrapShape):
21
        * css/CSSParser.h:
22
        * css/CSSPrimitiveValue.cpp:
23
        (WebCore::CSSPrimitiveValue::init):
24
        (WebCore::CSSPrimitiveValue::cleanup):
25
        (WebCore::CSSPrimitiveValue::getShapeValue):
26
        (WebCore::CSSPrimitiveValue::cssText):
27
        * css/CSSPrimitiveValue.h:
28
        (WebCore::CSSPrimitiveValue::getShapeValue):
29
        * css/CSSPropertyNames.in:
30
        * css/CSSStyleSelector.cpp:
31
        (WebCore::CSSStyleSelector::applyProperty):
32
        * css/CSSValueKeywords.in:
33
        * css/SVGCSSValueKeywords.in:
34
        * css/Shape.cpp: Added.
35
        (WebCore::RectShape::cssText):
36
        (WebCore::CircleShape::cssText):
37
        (WebCore::EllipseShape::cssText):
38
        (WebCore::PolygonShape::cssText):
39
        * css/Shape.h: Added.
40
        (WebCore::Shape::~Shape):
41
        (WebCore::Shape::Shape):
42
        (WebCore::RectShape::create):
43
        (WebCore::RectShape::left):
44
        (WebCore::RectShape::top):
45
        (WebCore::RectShape::width):
46
        (WebCore::RectShape::height):
47
        (WebCore::RectShape::radiusX):
48
        (WebCore::RectShape::radiusY):
49
        (WebCore::RectShape::setLeft):
50
        (WebCore::RectShape::setTop):
51
        (WebCore::RectShape::setWidth):
52
        (WebCore::RectShape::setHeight):
53
        (WebCore::RectShape::setRadiusX):
54
        (WebCore::RectShape::setRadiusY):
55
        (WebCore::RectShape::type):
56
        (WebCore::RectShape::RectShape):
57
        (WebCore::CircleShape::create):
58
        (WebCore::CircleShape::left):
59
        (WebCore::CircleShape::top):
60
        (WebCore::CircleShape::radius):
61
        (WebCore::CircleShape::setLeft):
62
        (WebCore::CircleShape::setTop):
63
        (WebCore::CircleShape::setRadius):
64
        (WebCore::CircleShape::type):
65
        (WebCore::CircleShape::CircleShape):
66
        (WebCore::EllipseShape::create):
67
        (WebCore::EllipseShape::left):
68
        (WebCore::EllipseShape::top):
69
        (WebCore::EllipseShape::radiusX):
70
        (WebCore::EllipseShape::radiusY):
71
        (WebCore::EllipseShape::setLeft):
72
        (WebCore::EllipseShape::setTop):
73
        (WebCore::EllipseShape::setRadiusX):
74
        (WebCore::EllipseShape::setRadiusY):
75
        (WebCore::EllipseShape::type):
76
        (WebCore::EllipseShape::EllipseShape):
77
        (WebCore::PolygonShape::create):
78
        (WebCore::PolygonShape::appendPoint):
79
        (WebCore::PolygonShape::getXAt):
80
        (WebCore::PolygonShape::getYAt):
81
        (WebCore::PolygonShape::setWindRule):
82
        (WebCore::PolygonShape::windRule):
83
        (WebCore::PolygonShape::type):
84
        (WebCore::PolygonShape::PolygonShape):
85
        * platform/graphics/Path.h:
86
        * platform/graphics/WindRule.h: Added.
87
        * rendering/style/RenderStyle.cpp:
88
        (WebCore::RenderStyle::diff):
89
        * rendering/style/RenderStyle.h:
90
        (WebCore::InheritedFlags::setWrapShape):
91
        (WebCore::InheritedFlags::wrapShape):
92
        (WebCore::InheritedFlags::initialWrapShape):
93
        * rendering/style/StyleRareNonInheritedData.cpp:
94
        (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
95
        (WebCore::StyleRareNonInheritedData::operator==):
96
        * rendering/style/StyleRareNonInheritedData.h:
97
1
2011-05-30  Alexandru Chiculita  <achicu@adobe.com>
98
2011-05-30  Alexandru Chiculita  <achicu@adobe.com>
2
99
3
        Reviewed by NOBODY (OOPS!).
100
        Reviewed by NOBODY (OOPS!).
- a/Source/WebCore/WebCore.vcproj/WebCore.vcproj +12 lines
Lines 27441-27446 a/Source/WebCore/WebCore.vcproj/WebCore.vcproj_sec1
27441
					>
27441
					>
27442
				</File>
27442
				</File>
27443
				<File
27443
				<File
27444
					RelativePath="..\platform\graphics\WindRule.h"
27445
					>
27446
				</File>
27447
				<File
27444
					RelativePath="..\platform\graphics\WOFFFileFormat.cpp"
27448
					RelativePath="..\platform\graphics\WOFFFileFormat.cpp"
27445
					>
27449
					>
27446
				</File>
27450
				</File>
Lines 32610-32615 a/Source/WebCore/WebCore.vcproj/WebCore.vcproj_sec2
32610
				>
32614
				>
32611
			</File>
32615
			</File>
32612
			<File
32616
			<File
32617
				RelativePath="..\css\Shape.cpp"
32618
				>
32619
			</File>
32620
			<File
32621
				RelativePath="..\css\Shape.h"
32622
				>
32623
			</File>
32624
			<File
32613
				RelativePath="..\css\StyleBase.cpp"
32625
				RelativePath="..\css\StyleBase.cpp"
32614
				>
32626
				>
32615
			</File>
32627
			</File>
- a/Source/WebCore/WebCore.xcodeproj/project.pbxproj +12 lines
Lines 1225-1230 a/Source/WebCore/WebCore.xcodeproj/project.pbxproj_sec1
1225
		4FA3B90B125CD12200300BAD /* InspectorState.h in Headers */ = {isa = PBXBuildFile; fileRef = 4FA3B909125CD12200300BAD /* InspectorState.h */; };
1225
		4FA3B90B125CD12200300BAD /* InspectorState.h in Headers */ = {isa = PBXBuildFile; fileRef = 4FA3B909125CD12200300BAD /* InspectorState.h */; };
1226
		4FD8D0F2119C718B002FA825 /* ScriptGCEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4FD8D0F0119C718B002FA825 /* ScriptGCEvent.cpp */; };
1226
		4FD8D0F2119C718B002FA825 /* ScriptGCEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4FD8D0F0119C718B002FA825 /* ScriptGCEvent.cpp */; };
1227
		4FD8D0F3119C718B002FA825 /* ScriptGCEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 4FD8D0F1119C718B002FA825 /* ScriptGCEvent.h */; };
1227
		4FD8D0F3119C718B002FA825 /* ScriptGCEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 4FD8D0F1119C718B002FA825 /* ScriptGCEvent.h */; };
1228
		501BA9E21393CEA000F7ACEB /* Shape.h in Headers */ = {isa = PBXBuildFile; fileRef = 501BA9E11393CEA000F7ACEB /* Shape.h */; settings = {ATTRIBUTES = (Private, ); }; };
1229
		501BAAA913950E2C00F7ACEB /* WindRule.h in Headers */ = {isa = PBXBuildFile; fileRef = 501BAAA813950E2C00F7ACEB /* WindRule.h */; settings = {ATTRIBUTES = (Private, ); }; };
1230
		501BAAB21395114B00F7ACEB /* Shape.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 501BAAB11395114B00F7ACEB /* Shape.cpp */; };
1228
		510184690B08602A004A825F /* CachedPage.h in Headers */ = {isa = PBXBuildFile; fileRef = 510184670B08602A004A825F /* CachedPage.h */; settings = {ATTRIBUTES = (Private, ); }; };
1231
		510184690B08602A004A825F /* CachedPage.h in Headers */ = {isa = PBXBuildFile; fileRef = 510184670B08602A004A825F /* CachedPage.h */; settings = {ATTRIBUTES = (Private, ); }; };
1229
		5101846A0B08602A004A825F /* CachedPage.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 510184680B08602A004A825F /* CachedPage.cpp */; };
1232
		5101846A0B08602A004A825F /* CachedPage.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 510184680B08602A004A825F /* CachedPage.cpp */; };
1230
		510D4A33103165EE0049EA54 /* SocketStreamErrorBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 510D4A2D103165EE0049EA54 /* SocketStreamErrorBase.cpp */; };
1233
		510D4A33103165EE0049EA54 /* SocketStreamErrorBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 510D4A2D103165EE0049EA54 /* SocketStreamErrorBase.cpp */; };
Lines 7796-7801 a/Source/WebCore/WebCore.xcodeproj/project.pbxproj_sec2
7796
		4FA3B909125CD12200300BAD /* InspectorState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InspectorState.h; sourceTree = "<group>"; };
7799
		4FA3B909125CD12200300BAD /* InspectorState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InspectorState.h; sourceTree = "<group>"; };
7797
		4FD8D0F0119C718B002FA825 /* ScriptGCEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ScriptGCEvent.cpp; sourceTree = "<group>"; };
7800
		4FD8D0F0119C718B002FA825 /* ScriptGCEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ScriptGCEvent.cpp; sourceTree = "<group>"; };
7798
		4FD8D0F1119C718B002FA825 /* ScriptGCEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScriptGCEvent.h; sourceTree = "<group>"; };
7801
		4FD8D0F1119C718B002FA825 /* ScriptGCEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScriptGCEvent.h; sourceTree = "<group>"; };
7802
		501BA9E11393CEA000F7ACEB /* Shape.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Shape.h; sourceTree = "<group>"; };
7803
		501BAAA813950E2C00F7ACEB /* WindRule.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WindRule.h; sourceTree = "<group>"; };
7804
		501BAAB11395114B00F7ACEB /* Shape.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Shape.cpp; sourceTree = "<group>"; };
7799
		510184670B08602A004A825F /* CachedPage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CachedPage.h; sourceTree = "<group>"; };
7805
		510184670B08602A004A825F /* CachedPage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CachedPage.h; sourceTree = "<group>"; };
7800
		510184680B08602A004A825F /* CachedPage.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CachedPage.cpp; sourceTree = "<group>"; };
7806
		510184680B08602A004A825F /* CachedPage.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CachedPage.cpp; sourceTree = "<group>"; };
7801
		510D4A2D103165EE0049EA54 /* SocketStreamErrorBase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SocketStreamErrorBase.cpp; sourceTree = "<group>"; };
7807
		510D4A2D103165EE0049EA54 /* SocketStreamErrorBase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SocketStreamErrorBase.cpp; sourceTree = "<group>"; };
Lines 17786-17791 a/Source/WebCore/WebCore.xcodeproj/project.pbxproj_sec3
17786
		B2A015910AF6CD53006BCE0E /* graphics */ = {
17792
		B2A015910AF6CD53006BCE0E /* graphics */ = {
17787
			isa = PBXGroup;
17793
			isa = PBXGroup;
17788
			children = (
17794
			children = (
17795
				501BAAA813950E2C00F7ACEB /* WindRule.h */,
17789
				076F0D0812B8192700C26AA4 /* avfoundation */,
17796
				076F0D0812B8192700C26AA4 /* avfoundation */,
17790
				499B3EC0128CCC1800E726C2 /* ca */,
17797
				499B3EC0128CCC1800E726C2 /* ca */,
17791
				B27535290B053814002CE64F /* cg */,
17798
				B27535290B053814002CE64F /* cg */,
Lines 18898-18903 a/Source/WebCore/WebCore.xcodeproj/project.pbxproj_sec4
18898
		F523D18402DE42E8018635CA /* css */ = {
18905
		F523D18402DE42E8018635CA /* css */ = {
18899
			isa = PBXGroup;
18906
			isa = PBXGroup;
18900
			children = (
18907
			children = (
18908
				501BA9E11393CEA000F7ACEB /* Shape.h */,
18901
				93CA4C9C09DF93FA00DF8677 /* maketokenizer */,
18909
				93CA4C9C09DF93FA00DF8677 /* maketokenizer */,
18902
				A80E6CDA0A1989CA007FB8C5 /* Counter.h */,
18910
				A80E6CDA0A1989CA007FB8C5 /* Counter.h */,
18903
				930705C709E0C95F00B17FE4 /* Counter.idl */,
18911
				930705C709E0C95F00B17FE4 /* Counter.idl */,
Lines 19088-19093 a/Source/WebCore/WebCore.xcodeproj/project.pbxproj_sec5
19088
				BC9ADD7F0CC4092200098C4C /* WebKitCSSTransformValue.cpp */,
19096
				BC9ADD7F0CC4092200098C4C /* WebKitCSSTransformValue.cpp */,
19089
				BC9ADD220CC4032600098C4C /* WebKitCSSTransformValue.h */,
19097
				BC9ADD220CC4032600098C4C /* WebKitCSSTransformValue.h */,
19090
				31611E540E1C4D4A00F6A579 /* WebKitCSSTransformValue.idl */,
19098
				31611E540E1C4D4A00F6A579 /* WebKitCSSTransformValue.idl */,
19099
				501BAAB11395114B00F7ACEB /* Shape.cpp */,
19091
			);
19100
			);
19092
			path = css;
19101
			path = css;
19093
			sourceTree = "<group>";
19102
			sourceTree = "<group>";
Lines 23008-23013 a/Source/WebCore/WebCore.xcodeproj/project.pbxproj_sec6
23008
				B12D236E1356034D002A28D4 /* JSMultipleTrackList.h in Headers */,
23017
				B12D236E1356034D002A28D4 /* JSMultipleTrackList.h in Headers */,
23009
				8C0E334D138A92C7008DA94F /* LevelDBTransaction.h in Headers */,
23018
				8C0E334D138A92C7008DA94F /* LevelDBTransaction.h in Headers */,
23010
				8C0E334F138A92C7008DA94F /* LevelDBWriteBatch.h in Headers */,
23019
				8C0E334F138A92C7008DA94F /* LevelDBWriteBatch.h in Headers */,
23020
				501BA9E21393CEA000F7ACEB /* Shape.h in Headers */,
23021
				501BAAA913950E2C00F7ACEB /* WindRule.h in Headers */,
23011
			);
23022
			);
23012
			runOnlyForDeploymentPostprocessing = 0;
23023
			runOnlyForDeploymentPostprocessing = 0;
23013
		};
23024
		};
Lines 25704-25709 a/Source/WebCore/WebCore.xcodeproj/project.pbxproj_sec7
25704
				B12D236D1356034D002A28D4 /* JSMultipleTrackList.cpp in Sources */,
25715
				B12D236D1356034D002A28D4 /* JSMultipleTrackList.cpp in Sources */,
25705
				8C0E334C138A92C7008DA94F /* LevelDBTransaction.cpp in Sources */,
25716
				8C0E334C138A92C7008DA94F /* LevelDBTransaction.cpp in Sources */,
25706
				8C0E334E138A92C7008DA94F /* LevelDBWriteBatch.cpp in Sources */,
25717
				8C0E334E138A92C7008DA94F /* LevelDBWriteBatch.cpp in Sources */,
25718
				501BAAB21395114B00F7ACEB /* Shape.cpp in Sources */,
25707
			);
25719
			);
25708
			runOnlyForDeploymentPostprocessing = 0;
25720
			runOnlyForDeploymentPostprocessing = 0;
25709
		};
25721
		};
- a/Source/WebCore/css/CSSComputedStyleDeclaration.cpp +9 lines
Lines 1766-1771 PassRefPtr<CSSValue> CSSComputedStyleDeclaration::getPropertyCSSValue(int proper a/Source/WebCore/css/CSSComputedStyleDeclaration.cpp_sec1
1766
        case CSSPropertyWebkitTransformOriginZ:
1766
        case CSSPropertyWebkitTransformOriginZ:
1767
        case CSSPropertyWebkitTransition:
1767
        case CSSPropertyWebkitTransition:
1768
            break;
1768
            break;
1769
1770
#if ENABLE(EXCLUSIONS)
1771
        case CSSPropertyWebkitWrapShape:
1772
            if (!style->wrapShape())
1773
                return primitiveValueCache->createIdentifierValue(CSSValueAuto);
1774
1775
            return primitiveValueCache->createValue(style->wrapShape());
1776
#endif
1777
1769
#if ENABLE(SVG)
1778
#if ENABLE(SVG)
1770
        case CSSPropertyClipPath:
1779
        case CSSPropertyClipPath:
1771
        case CSSPropertyClipRule:
1780
        case CSSPropertyClipRule:
- a/Source/WebCore/css/CSSParser.cpp +227 lines
Lines 81-86 a/Source/WebCore/css/CSSParser.cpp_sec1
81
#include "DashboardRegion.h"
81
#include "DashboardRegion.h"
82
#endif
82
#endif
83
83
84
#if ENABLE(EXCLUSIONS)
85
#include "Shape.h"
86
#endif
87
84
#define YYDEBUG 0
88
#define YYDEBUG 0
85
89
86
#if YYDEBUG > 0
90
#if YYDEBUG > 0
Lines 2038-2043 bool CSSParser::parseValue(int propId, bool important) a/Source/WebCore/css/CSSParser.cpp_sec2
2038
            return parseLineBoxContain(important);
2042
            return parseLineBoxContain(important);
2039
        break;
2043
        break;
2040
2044
2045
#if ENABLE(EXCLUSIONS)
2046
    case CSSPropertyWebkitWrapShape:
2047
        if (id == CSSValueAuto)
2048
            validPrimitive = true;
2049
        else if (value->unit == CSSParserValue::Function)
2050
            return parseWrapShape(important);
2051
        break;
2052
#endif
2053
2041
#if ENABLE(SVG)
2054
#if ENABLE(SVG)
2042
    default:
2055
    default:
2043
        return parseSVGValue(propId, important);
2056
        return parseSVGValue(propId, important);
Lines 3617-3622 bool CSSParser::parseShape(int propId, bool important) a/Source/WebCore/css/CSSParser.cpp_sec3
3617
    return false;
3630
    return false;
3618
}
3631
}
3619
3632
3633
#if ENABLE(EXCLUSIONS)
3634
PassRefPtr<Shape> CSSParser::parseWrapShapeRect(CSSParserValueList* args)
3635
{
3636
    // rect(x, y, width, height, [[rx], ry])
3637
    if (args->size() != 7 && args->size() != 9 && args->size() != 11)
3638
        return 0;
3639
        
3640
    bool valid = true;
3641
    
3642
    RefPtr<RectShape> shape = RectShape::create();
3643
    
3644
    int i = 0;
3645
    CSSParserValue* a = args->current();
3646
    while (a) {
3647
        valid = validUnit(a, FLength, m_strict);
3648
        if (!valid)
3649
            break;
3650
        RefPtr<CSSPrimitiveValue> length = primitiveValueCache()->createValue(a->fValue, (CSSPrimitiveValue::UnitTypes) a->unit);
3651
        if (!i)
3652
            shape->setLeft(length);
3653
        else if (i == 1)
3654
            shape->setTop(length);
3655
        else if (i == 2)
3656
            shape->setWidth(length);
3657
        else if (i == 3)
3658
            shape->setHeight(length);
3659
        else if (i == 4)
3660
            shape->setRadiusX(length);
3661
        else if (i == 5)
3662
            shape->setRadiusY(length);
3663
        else {
3664
            valid = false;
3665
            break;
3666
        }
3667
        a = args->next();
3668
        if (a) {
3669
            if (a->unit == CSSParserValue::Operator && a->iValue == ',')
3670
                a = args->next();
3671
            else {
3672
                valid = false;
3673
                break;
3674
            }
3675
        }
3676
        i++;
3677
    }
3678
    if (!valid || i < 4)
3679
        return 0;    
3680
    return shape;
3681
}
3682
3683
PassRefPtr<Shape> CSSParser::parseWrapShapeCircle(CSSParserValueList* args)
3684
{
3685
    // circle(x, y, r)
3686
    if (args->size() != 5)
3687
        return 0;
3688
        
3689
    bool valid = true;
3690
    
3691
    RefPtr<CircleShape> shape = CircleShape::create();
3692
    
3693
    int i = 0;
3694
    CSSParserValue* a = args->current();
3695
    while (a) {
3696
        valid = validUnit(a, FLength, m_strict);
3697
        if (!valid)
3698
            break;
3699
        RefPtr<CSSPrimitiveValue> length = primitiveValueCache()->createValue(a->fValue, (CSSPrimitiveValue::UnitTypes) a->unit);
3700
        if (!i)
3701
            shape->setLeft(length);
3702
        else if (i == 1)
3703
            shape->setTop(length);
3704
        else if (i == 2)
3705
            shape->setRadius(length);
3706
        else {
3707
            valid = false;
3708
            break;
3709
        }        
3710
        a = args->next();
3711
        if (a) {
3712
            if (a->unit == CSSParserValue::Operator && a->iValue == ',')
3713
                a = args->next();
3714
            else {
3715
                valid = false;
3716
                break;
3717
            }
3718
        }
3719
        i++;
3720
    }
3721
    if (!valid || i < 3)
3722
        return 0;    
3723
    return shape;
3724
}
3725
3726
PassRefPtr<Shape> CSSParser::parseWrapShapeEllipse(CSSParserValueList* args)
3727
{
3728
    // ellipse(x, y, rx, ry)
3729
    if (args->size() != 7)
3730
        return 0;
3731
        
3732
    bool valid = false;
3733
    
3734
    RefPtr<EllipseShape> shape = EllipseShape::create();
3735
    int i = 0;
3736
    CSSParserValue* a = args->current();
3737
    while (a) {
3738
        valid = validUnit(a, FLength, m_strict);
3739
        if (!valid)
3740
            break;
3741
        RefPtr<CSSPrimitiveValue> length = primitiveValueCache()->createValue(a->fValue, (CSSPrimitiveValue::UnitTypes) a->unit);
3742
        if (!i)
3743
            shape->setLeft(length);
3744
        else if (i == 1)
3745
            shape->setTop(length);
3746
        else if (i == 2)
3747
            shape->setRadiusX(length);
3748
        else if (i == 3)
3749
            shape->setRadiusY(length);
3750
        else {
3751
            valid = false;
3752
            break;
3753
        }
3754
        a = args->next();
3755
        if (a) {
3756
            if (a && a->unit == CSSParserValue::Operator && a->iValue == ',')
3757
                a = args->next();
3758
            else {
3759
                valid = false;
3760
                break;
3761
            }
3762
        }
3763
        i++;
3764
    }
3765
    if (!valid || i < 4)
3766
        return 0;
3767
    return shape;
3768
}
3769
3770
PassRefPtr<Shape> CSSParser::parseWrapShapePolygon(CSSParserValueList* args)
3771
{
3772
    if (!args->size())
3773
        return 0;
3774
    
3775
    RefPtr<PolygonShape> shape = PolygonShape::create();
3776
3777
    CSSParserValue* a = args->current();
3778
3779
    unsigned size = args->size();
3780
    
3781
    if (a->id == CSSValueEvenodd || a->id == CSSValueNonzero) {
3782
        shape->setWindRule(a->id == CSSValueEvenodd ? RULE_EVENODD : RULE_NONZERO);
3783
3784
        CSSParserValue* comma = args->next();
3785
        if (!comma || comma->unit != CSSParserValue::Operator || comma->iValue != ',')
3786
            return 0;
3787
        a = args->next();
3788
        size -= 2;
3789
    }
3790
    
3791
    // <length>, <length> ... <length>, <length> -> each pair has 3 elements
3792
    if (!size || (size % 3))
3793
        return 0;
3794
    
3795
    while (a) {
3796
        if (!validUnit(a, FLength, m_strict))
3797
            return 0;
3798
        
3799
        CSSParserValue* comma = args->next();
3800
        if (!comma || comma->unit != CSSParserValue::Operator || comma->iValue != ',')
3801
            return 0;
3802
        
3803
        CSSParserValue* b = args->next();
3804
        if (!b || !validUnit(b, FLength, m_strict))
3805
            return 0;
3806
        
3807
        RefPtr<CSSPrimitiveValue> xLength = primitiveValueCache()->createValue(a->fValue, (CSSPrimitiveValue::UnitTypes) a->unit);
3808
        RefPtr<CSSPrimitiveValue> yLength = primitiveValueCache()->createValue(b->fValue, (CSSPrimitiveValue::UnitTypes) b->unit);
3809
        
3810
        shape->appendPoint(xLength.release(), yLength.release());
3811
        
3812
        a = args->next();
3813
    }
3814
    
3815
    return shape;
3816
}
3817
3818
bool CSSParser::parseWrapShape(bool important)
3819
{
3820
    CSSParserValue* value = m_valueList->current();
3821
    CSSParserValueList* args = value->function->args.get();
3822
3823
    if (!args)
3824
        return false;
3825
    
3826
    RefPtr<Shape> shape;
3827
    
3828
    if (equalIgnoringCase(value->function->name, "rect("))
3829
        shape = parseWrapShapeRect(args);
3830
    else if (equalIgnoringCase(value->function->name, "circle("))
3831
        shape = parseWrapShapeCircle(args);
3832
    else if (equalIgnoringCase(value->function->name, "ellipse("))
3833
        shape = parseWrapShapeEllipse(args);
3834
    else if (equalIgnoringCase(value->function->name, "polygon("))
3835
        shape = parseWrapShapePolygon(args);
3836
3837
    if (shape) {
3838
        addProperty(CSSPropertyWebkitWrapShape, primitiveValueCache()->createValue(shape.release()), important);
3839
        m_valueList->next();
3840
        return true;
3841
    }
3842
3843
    return false;
3844
}
3845
#endif
3846
3620
// [ 'font-style' || 'font-variant' || 'font-weight' ]? 'font-size' [ / 'line-height' ]? 'font-family'
3847
// [ 'font-style' || 'font-variant' || 'font-weight' ]? 'font-size' [ / 'line-height' ]? 'font-family'
3621
bool CSSParser::parseFont(bool important)
3848
bool CSSParser::parseFont(bool important)
3622
{
3849
{
- a/Source/WebCore/css/CSSParser.h +12 lines
Lines 53-58 namespace WebCore { a/Source/WebCore/css/CSSParser.h_sec1
53
    class WebKitCSSKeyframeRule;
53
    class WebKitCSSKeyframeRule;
54
    class WebKitCSSKeyframesRule;
54
    class WebKitCSSKeyframesRule;
55
55
56
#if ENABLE(EXCLUSIONS)
57
    class Shape;
58
#endif
59
56
    class CSSParser {
60
    class CSSParser {
57
    public:
61
    public:
58
        CSSParser(bool strictParsing = true);
62
        CSSParser(bool strictParsing = true);
Lines 124-129 namespace WebCore { a/Source/WebCore/css/CSSParser.h_sec2
124
128
125
        bool parseShape(int propId, bool important);
129
        bool parseShape(int propId, bool important);
126
130
131
#if ENABLE(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
127
        bool parseFont(bool important);
139
        bool parseFont(bool important);
128
        PassRefPtr<CSSValueList> parseFontFamily();
140
        PassRefPtr<CSSValueList> parseFontFamily();
129
141
- a/Source/WebCore/css/CSSPrimitiveValue.cpp +36 lines
Lines 44-49 a/Source/WebCore/css/CSSPrimitiveValue.cpp_sec1
44
#include "DashboardRegion.h"
44
#include "DashboardRegion.h"
45
#endif
45
#endif
46
46
47
#if ENABLE(EXCLUSIONS)
48
#include "Shape.h"
49
#endif
50
47
using namespace WTF;
51
using namespace WTF;
48
52
49
namespace WebCore {
53
namespace WebCore {
Lines 208-213 void CSSPrimitiveValue::init(PassRefPtr<Pair> p) a/Source/WebCore/css/CSSPrimitiveValue.cpp_sec2
208
    m_value.pair = p.releaseRef();
212
    m_value.pair = p.releaseRef();
209
}
213
}
210
214
215
#if ENABLE(EXCLUSIONS)
216
void 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
211
CSSPrimitiveValue::~CSSPrimitiveValue()
224
CSSPrimitiveValue::~CSSPrimitiveValue()
212
{
225
{
213
    cleanup();
226
    cleanup();
Lines 238-243 void CSSPrimitiveValue::cleanup() a/Source/WebCore/css/CSSPrimitiveValue.cpp_sec3
238
                m_value.region->deref();
251
                m_value.region->deref();
239
            break;
252
            break;
240
#endif
253
#endif
254
#if ENABLE(EXCLUSIONS)
255
        case CSS_SHAPE:
256
            m_value.shape->deref();
257
            break;
258
#endif
241
        default:
259
        default:
242
            break;
260
            break;
243
    }
261
    }
Lines 584-589 Pair* CSSPrimitiveValue::getPairValue(ExceptionCode& ec) const a/Source/WebCore/css/CSSPrimitiveValue.cpp_sec4
584
    return m_value.pair;
602
    return m_value.pair;
585
}
603
}
586
604
605
#if ENABLE(EXCLUSIONS)
606
Shape* CSSPrimitiveValue::getShapeValue(ExceptionCode& ec) const
607
{
608
    ec = 0;
609
    if (m_type != CSS_SHAPE) {
610
        ec = INVALID_ACCESS_ERR;
611
        return 0;
612
    }
613
614
    return m_value.shape;
615
}
616
#endif
617
587
unsigned short CSSPrimitiveValue::cssValueType() const
618
unsigned short CSSPrimitiveValue::cssValueType() const
588
{
619
{
589
    return CSS_PRIMITIVE_VALUE;
620
    return CSS_PRIMITIVE_VALUE;
Lines 823-828 String CSSPrimitiveValue::cssText() const a/Source/WebCore/css/CSSPrimitiveValue.cpp_sec5
823
        case CSS_PARSER_IDENTIFIER:
854
        case CSS_PARSER_IDENTIFIER:
824
            text = quoteCSSStringIfNeeded(m_value.string);
855
            text = quoteCSSStringIfNeeded(m_value.string);
825
            break;
856
            break;
857
#if ENABLE(EXCLUSIONS)
858
        case CSS_SHAPE:
859
            text = m_value.shape->cssText();
860
            break;
861
#endif
826
    }
862
    }
827
863
828
    ASSERT(!cssTextCache().contains(this));
864
    ASSERT(!cssTextCache().contains(this));
- a/Source/WebCore/css/CSSPrimitiveValue.h -1 / +19 lines
Lines 36-41 class RGBColor; a/Source/WebCore/css/CSSPrimitiveValue.h_sec1
36
class Rect;
36
class Rect;
37
class RenderStyle;
37
class RenderStyle;
38
38
39
#if ENABLE(EXCLUSIONS)
40
class Shape;
41
#endif
42
39
struct Length;
43
struct Length;
40
44
41
template<typename T, T max, T min> inline T roundForImpreciseConversion(double value)
45
template<typename T, T max, T min> inline T roundForImpreciseConversion(double value)
Lines 93-99 public: a/Source/WebCore/css/CSSPrimitiveValue.h_sec2
93
        CSS_REMS = 108,
97
        CSS_REMS = 108,
94
98
95
        // This is used internally for counter names (as opposed to counter values)
99
        // 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
97
    };
104
    };
98
    
105
    
99
    // This enum follows the CSSParser::Units enum augmented with UNIT_FREQUENCY for frequencies.
106
    // This enum follows the CSSParser::Units enum augmented with UNIT_FREQUENCY for frequencies.
Lines 180-185 public: a/Source/WebCore/css/CSSPrimitiveValue.h_sec3
180
187
181
    DashboardRegion* getDashboardRegionValue() const { return m_type != CSS_DASHBOARD_REGION ? 0 : m_value.region; }
188
    DashboardRegion* getDashboardRegionValue() const { return m_type != CSS_DASHBOARD_REGION ? 0 : m_value.region; }
182
189
190
#if ENABLE(EXCLUSIONS)
191
    Shape* getShapeValue(ExceptionCode&) const;
192
    Shape* getShapeValue() const { return m_type != CSS_SHAPE ? 0 : m_value.shape; }
193
#endif
194
183
    int getIdent() const;
195
    int getIdent() const;
184
    template<typename T> inline operator T() const; // Defined in CSSPrimitiveValueMappings.h
196
    template<typename T> inline operator T() const; // Defined in CSSPrimitiveValueMappings.h
185
197
Lines 219-224 private: a/Source/WebCore/css/CSSPrimitiveValue.h_sec4
219
    void init(PassRefPtr<Rect>);
231
    void init(PassRefPtr<Rect>);
220
    void init(PassRefPtr<Pair>);
232
    void init(PassRefPtr<Pair>);
221
    void init(PassRefPtr<DashboardRegion>); // FIXME: Dashboard region should not be a primitive value.
233
    void init(PassRefPtr<DashboardRegion>); // FIXME: Dashboard region should not be a primitive value.
234
#if ENABLE(EXCLUSIONS)
235
    void init(PassRefPtr<Shape>);
236
#endif
222
    bool getDoubleValueInternal(UnitTypes targetUnitType, double* result) const;
237
    bool getDoubleValueInternal(UnitTypes targetUnitType, double* result) const;
223
238
224
    virtual bool isPrimitiveValue() const { return true; }
239
    virtual bool isPrimitiveValue() const { return true; }
Lines 236-241 private: a/Source/WebCore/css/CSSPrimitiveValue.h_sec5
236
        unsigned rgbcolor;
251
        unsigned rgbcolor;
237
        Pair* pair;
252
        Pair* pair;
238
        DashboardRegion* region;
253
        DashboardRegion* region;
254
#if ENABLE(EXCLUSIONS)
255
        Shape* shape;
256
#endif
239
    } m_value;
257
    } m_value;
240
};
258
};
241
259
- a/Source/WebCore/css/CSSPropertyNames.in +1 lines
Lines 297-302 z-index a/Source/WebCore/css/CSSPropertyNames.in_sec1
297
-webkit-perspective-origin-x
297
-webkit-perspective-origin-x
298
-webkit-perspective-origin-y
298
-webkit-perspective-origin-y
299
-webkit-rtl-ordering
299
-webkit-rtl-ordering
300
-webkit-wrap-shape
300
-webkit-text-combine
301
-webkit-text-combine
301
-epub-text-combine = -webkit-text-combine
302
-epub-text-combine = -webkit-text-combine
302
-webkit-text-decorations-in-effect
303
-webkit-text-decorations-in-effect
- a/Source/WebCore/css/CSSStyleSelector.cpp +17 lines
Lines 5380-5385 void CSSStyleSelector::applyProperty(int id, CSSValue *value) a/Source/WebCore/css/CSSStyleSelector.cpp_sec1
5380
        m_style->setLineBoxContain(lineBoxContainValue->value());
5380
        m_style->setLineBoxContain(lineBoxContainValue->value());
5381
        return;
5381
        return;
5382
    }
5382
    }
5383
    
5384
#if ENABLE(EXCLUSIONS)
5385
    case CSSPropertyWebkitWrapShape:
5386
        if (isInitial) {
5387
            HANDLE_INITIAL_COND(CSSPropertyWebkitWrapShape, WrapShape)
5388
            return;
5389
        }
5390
        
5391
        if (primitiveValue && primitiveValue->getIdent() == CSSValueAuto)
5392
            m_style->setWrapShape(0);
5393
        
5394
        if (primitiveValue && primitiveValue->primitiveType() == CSSPrimitiveValue::CSS_SHAPE)
5395
            m_style->setWrapShape(primitiveValue->getShapeValue());
5396
        
5397
        return;
5398
        
5399
#endif
5383
5400
5384
    // These properties are implemented in the CSSStyleApplyProperty lookup table.
5401
    // These properties are implemented in the CSSStyleApplyProperty lookup table.
5385
    case CSSPropertyColor:
5402
    case CSSPropertyColor:
- a/Source/WebCore/css/CSSValueKeywords.in +4 lines
Lines 808-810 replaced a/Source/WebCore/css/CSSValueKeywords.in_sec1
808
#optimizeSpeed
808
#optimizeSpeed
809
optimizeQuality
809
optimizeQuality
810
-webkit-optimize-contrast
810
-webkit-optimize-contrast
811
812
# -webkit-wrap-shape
813
nonzero
814
evenodd
- a/Source/WebCore/css/SVGCSSValueKeywords.in -2 / +2 lines
Lines 162-169 yellowgreen a/Source/WebCore/css/SVGCSSValueKeywords.in_sec1
162
162
163
# CSS_PROP_CLIP_PATH
163
# CSS_PROP_CLIP_PATH
164
# CSS_PROP_CLIP_RULE
164
# CSS_PROP_CLIP_RULE
165
nonzero
165
# nonzero
166
evenodd
166
# evenodd
167
167
168
# CSS_PROP_MASK
168
# CSS_PROP_MASK
169
# CSS_PROP_OPACITY
169
# CSS_PROP_OPACITY
- a/Source/WebCore/css/Shape.cpp +144 lines
Line 0 a/Source/WebCore/css/Shape.cpp_sec1
1
/*
2
 * The MIT License
3
 * 
4
 * Copyright (c) 2011 Adobe Systems Incorporated 
5
 * 
6
 * Permission is hereby granted, free of charge, to any person obtaining a copy
7
 * of this software and associated documentation files (the "Software"), to deal
8
 * in the Software without restriction, including without limitation the rights
9
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
 * copies of the Software, and to permit persons to whom the Software is
11
 * furnished to do so, subject to the following conditions:
12
 * The above copyright notice and this permission notice shall be included in
13
 * all copies or substantial portions of the Software.
14
 * 
15
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
 * THE SOFTWARE.
22
 */
23
24
#include "config.h"
25
26
#if ENABLE(EXCLUSIONS)
27
28
#include "Shape.h"
29
30
using namespace WTF;
31
32
namespace WebCore {
33
34
String RectShape::cssText() const
35
{
36
    DEFINE_STATIC_LOCAL(const String, rectParen, ("rect("));
37
    DEFINE_STATIC_LOCAL(const String, comma, (", "));
38
    
39
    Vector<UChar> result;
40
    result.reserveInitialCapacity(32);
41
    append(result, rectParen);
42
43
    append(result, m_left->cssText());
44
    append(result, comma);
45
46
    append(result, m_top->cssText());
47
    append(result, comma);
48
49
    append(result, m_width->cssText());
50
    append(result, comma);
51
52
    append(result, m_height->cssText());
53
    
54
    if (m_radiusX.get()) {
55
        append(result, comma);
56
        append(result, m_radiusX->cssText());
57
58
        if (m_radiusY.get()) {
59
            append(result, comma);
60
            append(result, m_radiusY->cssText());
61
        }
62
    }
63
    
64
    result.append(')');
65
            
66
    return String::adopt(result);
67
}
68
69
String CircleShape::cssText() const
70
{
71
    DEFINE_STATIC_LOCAL(const String, circleParen, ("circle("));
72
    DEFINE_STATIC_LOCAL(const String, comma, (", "));
73
    
74
    Vector<UChar> result;
75
    result.reserveInitialCapacity(32);
76
    append(result, circleParen);
77
78
    append(result, m_left->cssText());
79
    append(result, comma);
80
81
    append(result, m_top->cssText());
82
    append(result, comma);
83
84
    append(result, m_radius->cssText());
85
    result.append(')');
86
            
87
    return String::adopt(result);
88
}
89
90
String EllipseShape::cssText() const
91
{
92
    DEFINE_STATIC_LOCAL(const String, ellipseParen, ("ellipse("));
93
    DEFINE_STATIC_LOCAL(const String, comma, (", "));
94
    
95
    Vector<UChar> result;
96
    result.reserveInitialCapacity(32);
97
    append(result, ellipseParen);
98
99
    append(result, m_left->cssText());
100
    append(result, comma);
101
102
    append(result, m_top->cssText());
103
    append(result, comma);
104
105
    append(result, m_radiusX->cssText());
106
    append(result, comma);
107
108
    append(result, m_radiusY->cssText());
109
    result.append(')');
110
            
111
    return String::adopt(result);
112
}
113
114
String PolygonShape::cssText() const
115
{
116
    DEFINE_STATIC_LOCAL(const String, polygonParenEvenOdd, ("polygon(evenodd, "));
117
    DEFINE_STATIC_LOCAL(const String, polygonParenNonZero, ("polygon(nonzero, "));
118
    DEFINE_STATIC_LOCAL(const String, comma, (", "));
119
    
120
    Vector<UChar> result;
121
    result.reserveInitialCapacity(32);
122
    if (m_windRule == RULE_EVENODD)
123
        append(result, polygonParenEvenOdd);
124
    else
125
        append(result, polygonParenNonZero);
126
127
    ASSERT(!(m_values.size() % 2));
128
129
    for (unsigned i = 0; i < m_values.size(); i += 2) {
130
        if (i)
131
            result.append(' ');
132
        append(result, m_values.at(i)->cssText());
133
        append(result, comma);
134
        append(result, m_values.at(i + 1)->cssText());
135
    }
136
    
137
    result.append(')');
138
            
139
    return String::adopt(result);
140
}
141
142
} // namespace WebCore
143
144
#endif // ENABLE(EXCLUSIONS)
- a/Source/WebCore/css/Shape.h +167 lines
Line 0 a/Source/WebCore/css/Shape.h_sec1
1
/*
2
 * The MIT License
3
 * 
4
 * Copyright (c) 2011 Adobe Systems Incorporated 
5
 * 
6
 * Permission is hereby granted, free of charge, to any person obtaining a copy
7
 * of this software and associated documentation files (the "Software"), to deal
8
 * in the Software without restriction, including without limitation the rights
9
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
 * copies of the Software, and to permit persons to whom the Software is
11
 * furnished to do so, subject to the following conditions:
12
 * The above copyright notice and this permission notice shall be included in
13
 * all copies or substantial portions of the Software.
14
 * 
15
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
 * THE SOFTWARE.
22
 */
23
24
#ifndef Shape_h
25
#define Shape_h
26
27
#include "CSSPrimitiveValue.h"
28
#include "PlatformString.h"
29
#include "WindRule.h"
30
#include <wtf/RefPtr.h>
31
#include <wtf/Vector.h>
32
33
namespace WebCore {
34
35
class Shape : public RefCounted<Shape> {
36
public:
37
    enum Type {
38
        SHAPE_RECT = 1,
39
        SHAPE_CIRCLE = 2,
40
        SHAPE_ELLIPSE = 3,
41
        SHAPE_POLYGON = 4,
42
        SHAPE_PATH = 5        
43
    };
44
    
45
    virtual Type type() = 0;
46
    virtual String cssText() const = 0;
47
48
public:
49
    virtual ~Shape() { }
50
    
51
protected:
52
    Shape() { }
53
};
54
55
class RectShape : public Shape {
56
public:
57
    static PassRefPtr<RectShape> create() { return adoptRef(new RectShape); }
58
59
    CSSPrimitiveValue* left() const { return m_left.get(); }
60
    CSSPrimitiveValue* top() const { return m_top.get(); }
61
    CSSPrimitiveValue* width() const { return m_width.get(); }
62
    CSSPrimitiveValue* height() const { return m_height.get(); }
63
    CSSPrimitiveValue* radiusX() const { return m_radiusX.get(); }
64
    CSSPrimitiveValue* radiusY() const { return m_radiusY.get(); }
65
    
66
    void setLeft(PassRefPtr<CSSPrimitiveValue> left) { m_left = left; }
67
    void setTop(PassRefPtr<CSSPrimitiveValue> top) { m_top = top; }
68
    void setWidth(PassRefPtr<CSSPrimitiveValue> width) { m_width = width; }
69
    void setHeight(PassRefPtr<CSSPrimitiveValue> height) { m_height = height; }
70
    void setRadiusX(PassRefPtr<CSSPrimitiveValue> radiusX) { m_radiusX = radiusX; }
71
    void setRadiusY(PassRefPtr<CSSPrimitiveValue> radiusY) { m_radiusY = radiusY; }
72
73
    virtual Type type() { return SHAPE_RECT; }
74
    virtual String cssText() const;
75
    
76
private:
77
    RectShape() { }
78
    
79
    RefPtr<CSSPrimitiveValue> m_top;
80
    RefPtr<CSSPrimitiveValue> m_left;
81
    RefPtr<CSSPrimitiveValue> m_width;
82
    RefPtr<CSSPrimitiveValue> m_height;
83
    RefPtr<CSSPrimitiveValue> m_radiusX;
84
    RefPtr<CSSPrimitiveValue> m_radiusY;
85
};
86
87
class CircleShape : public Shape {
88
public:
89
    static PassRefPtr<CircleShape> create() { return adoptRef(new CircleShape); }
90
91
    CSSPrimitiveValue* left() const { return m_left.get(); }
92
    CSSPrimitiveValue* top() const { return m_top.get(); }
93
    CSSPrimitiveValue* radius() const { return m_radius.get(); }
94
    
95
    void setLeft(PassRefPtr<CSSPrimitiveValue> left) { m_left = left; }
96
    void setTop(PassRefPtr<CSSPrimitiveValue> top) { m_top = top; }
97
    void setRadius(PassRefPtr<CSSPrimitiveValue> radius) { m_radius = radius; }
98
99
    virtual Type type() { return SHAPE_CIRCLE; }
100
    virtual String cssText() const;
101
    
102
private:
103
    CircleShape() { }
104
    
105
    RefPtr<CSSPrimitiveValue> m_top;
106
    RefPtr<CSSPrimitiveValue> m_left;
107
    RefPtr<CSSPrimitiveValue> m_radius;
108
};
109
110
class EllipseShape : public Shape {
111
public:
112
    static PassRefPtr<EllipseShape> create() { return adoptRef(new EllipseShape); }
113
114
    CSSPrimitiveValue* left() const { return m_left.get(); }
115
    CSSPrimitiveValue* top() const { return m_top.get(); }
116
    CSSPrimitiveValue* radiusX() const { return m_radiusX.get(); }
117
    CSSPrimitiveValue* radiusY() const { return m_radiusY.get(); }
118
    
119
    void setLeft(PassRefPtr<CSSPrimitiveValue> left) { m_left = left; }
120
    void setTop(PassRefPtr<CSSPrimitiveValue> top) { m_top = top; }
121
    void setRadiusX(PassRefPtr<CSSPrimitiveValue> radiusX) { m_radiusX = radiusX; }
122
    void setRadiusY(PassRefPtr<CSSPrimitiveValue> radiusY) { m_radiusY = radiusY; }
123
124
    virtual Type type() { return SHAPE_ELLIPSE; }
125
    virtual String cssText() const;
126
    
127
private:
128
    EllipseShape() { }
129
    
130
    RefPtr<CSSPrimitiveValue> m_top;
131
    RefPtr<CSSPrimitiveValue> m_left;
132
    RefPtr<CSSPrimitiveValue> m_radiusX;
133
    RefPtr<CSSPrimitiveValue> m_radiusY;
134
};
135
136
class PolygonShape : public Shape {
137
public:
138
    static PassRefPtr<PolygonShape> create() { return adoptRef(new PolygonShape); }
139
    
140
    void appendPoint(PassRefPtr<CSSPrimitiveValue> x, PassRefPtr<CSSPrimitiveValue> y)
141
    { 
142
        m_values.append(x);
143
        m_values.append(y);
144
    }
145
    
146
    PassRefPtr<CSSPrimitiveValue> getXAt(unsigned i) { return m_values.at(i << 1); }
147
    PassRefPtr<CSSPrimitiveValue> getYAt(unsigned i) { return m_values.at((i << 1) & 1); }
148
    
149
    void setWindRule(WindRule w) { m_windRule = w; }
150
    WindRule windRule() const { return m_windRule; }
151
    
152
    virtual Type type() { return SHAPE_POLYGON; }
153
    virtual String cssText() const;
154
    
155
private:
156
    PolygonShape()
157
        : m_windRule(RULE_NONZERO)
158
    {
159
    }
160
    
161
    Vector<RefPtr<CSSPrimitiveValue> > m_values;
162
    WindRule m_windRule;    
163
};
164
165
} // namespace WebCore
166
167
#endif // Shape_h
- a/Source/WebCore/platform/graphics/Path.h -5 / +1 lines
Lines 29-34 a/Source/WebCore/platform/graphics/Path.h_sec1
29
#define Path_h
29
#define Path_h
30
30
31
#include "RoundedIntRect.h"
31
#include "RoundedIntRect.h"
32
#include "WindRule.h"
32
#include <wtf/FastAllocBase.h>
33
#include <wtf/FastAllocBase.h>
33
#include <wtf/Forward.h>
34
#include <wtf/Forward.h>
34
35
Lines 81-91 namespace WebCore { a/Source/WebCore/platform/graphics/Path.h_sec2
81
    class GraphicsContext;
82
    class GraphicsContext;
82
    class StrokeStyleApplier;
83
    class StrokeStyleApplier;
83
84
84
    enum WindRule {
85
        RULE_NONZERO = 0,
86
        RULE_EVENODD = 1
87
    };
88
89
    enum PathElementType {
85
    enum PathElementType {
90
        PathElementMoveToPoint,
86
        PathElementMoveToPoint,
91
        PathElementAddLineToPoint,
87
        PathElementAddLineToPoint,
- a/Source/WebCore/platform/graphics/WindRule.h +41 lines
Line 0 a/Source/WebCore/platform/graphics/WindRule.h_sec1
1
/*
2
 * Copyright (C) 2003, 2006, 2009 Apple Inc. All rights reserved.
3
 *               2006 Rob Buis <buis@kde.org>
4
 * Copyright (C) 2007-2008 Torch Mobile, Inc.
5
 *
6
 * Redistribution and use in source and binary forms, with or without
7
 * modification, are permitted provided that the following conditions
8
 * are met:
9
 * 1. Redistributions of source code must retain the above copyright
10
 *    notice, this list of conditions and the following disclaimer.
11
 * 2. Redistributions in binary form must reproduce the above copyright
12
 *    notice, this list of conditions and the following disclaimer in the
13
 *    documentation and/or other materials provided with the distribution.
14
 *
15
 * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
16
 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
18
 * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
19
 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
20
 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
21
 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
22
 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
23
 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
25
 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
26
 */
27
28
#ifndef WindRule_h
29
#define WindRule_h
30
31
namespace WebCore {
32
33
enum WindRule {
34
    RULE_NONZERO = 0,
35
    RULE_EVENODD = 1
36
};
37
38
}
39
40
#endif // WindRule_h
41
- a/Source/WebCore/rendering/style/RenderStyle.cpp +10 lines
Lines 36-41 a/Source/WebCore/rendering/style/RenderStyle.cpp_sec1
36
#include <wtf/StdLibExtras.h>
36
#include <wtf/StdLibExtras.h>
37
#include <algorithm>
37
#include <algorithm>
38
38
39
#if ENABLE(EXCLUSION)
40
#include "Shape.h"
41
#endif
42
39
using namespace std;
43
using namespace std;
40
44
41
namespace WebCore {
45
namespace WebCore {
Lines 563-568 StyleDifference RenderStyle::diff(const RenderStyle* other, unsigned& changedCon a/Source/WebCore/rendering/style/RenderStyle.cpp_sec2
563
        || rareInheritedData->textEmphasisFill != other->rareInheritedData->textEmphasisFill
567
        || rareInheritedData->textEmphasisFill != other->rareInheritedData->textEmphasisFill
564
        || rareInheritedData->m_imageRendering != other->rareInheritedData->m_imageRendering)
568
        || rareInheritedData->m_imageRendering != other->rareInheritedData->m_imageRendering)
565
        return StyleDifferenceRepaint;
569
        return StyleDifferenceRepaint;
570
        
571
#if ENABLE(EXCLUSIONS)
572
        // FIXME: use the correct diff result
573
        if (rareNonInheritedData->m_wrapShape != other->rareNonInheritedData->m_wrapShape)
574
            return StyleDifferenceRepaint;
575
#endif
566
576
567
#if USE(ACCELERATED_COMPOSITING)
577
#if USE(ACCELERATED_COMPOSITING)
568
    if (rareNonInheritedData.get() != other->rareNonInheritedData.get()) {
578
    if (rareNonInheritedData.get() != other->rareNonInheritedData.get()) {
- a/Source/WebCore/rendering/style/RenderStyle.h +10 lines
Lines 1145-1150 public: a/Source/WebCore/rendering/style/RenderStyle.h_sec1
1145
    void setFloodOpacity(float f) { accessSVGStyle()->setFloodOpacity(f); }
1145
    void setFloodOpacity(float f) { accessSVGStyle()->setFloodOpacity(f); }
1146
#endif
1146
#endif
1147
1147
1148
#if ENABLE(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
1148
    const ContentData* contentData() const { return rareNonInheritedData->m_content.get(); }
1158
    const ContentData* contentData() const { return rareNonInheritedData->m_content.get(); }
1149
    bool contentDataEquivalent(const RenderStyle* otherStyle) const { return const_cast<RenderStyle*>(this)->rareNonInheritedData->contentDataEquivalent(*const_cast<RenderStyle*>(otherStyle)->rareNonInheritedData); }
1159
    bool contentDataEquivalent(const RenderStyle* otherStyle) const { return const_cast<RenderStyle*>(this)->rareNonInheritedData->contentDataEquivalent(*const_cast<RenderStyle*>(otherStyle)->rareNonInheritedData); }
1150
    void clearContent();
1160
    void clearContent();
- a/Source/WebCore/rendering/style/StyleRareNonInheritedData.cpp +10 lines
Lines 55-60 StyleRareNonInheritedData::StyleRareNonInheritedData() a/Source/WebCore/rendering/style/StyleRareNonInheritedData.cpp_sec1
55
    , m_perspectiveOriginY(RenderStyle::initialPerspectiveOriginY())
55
    , m_perspectiveOriginY(RenderStyle::initialPerspectiveOriginY())
56
    , m_pageSize()
56
    , m_pageSize()
57
    , m_pageSizeType(PAGE_SIZE_AUTO)
57
    , m_pageSizeType(PAGE_SIZE_AUTO)
58
#if ENABLE(EXCLUSIONS)
59
    , m_wrapShape(RenderStyle::initialWrapShape())
60
#endif
58
{
61
{
59
}
62
}
60
63
Lines 92-97 StyleRareNonInheritedData::StyleRareNonInheritedData(const StyleRareNonInherited a/Source/WebCore/rendering/style/StyleRareNonInheritedData.cpp_sec2
92
    , m_perspectiveOriginY(o.m_perspectiveOriginY)
95
    , m_perspectiveOriginY(o.m_perspectiveOriginY)
93
    , m_pageSize(o.m_pageSize)
96
    , m_pageSize(o.m_pageSize)
94
    , m_pageSizeType(o.m_pageSizeType)
97
    , m_pageSizeType(o.m_pageSizeType)
98
#if ENABLE(EXCLUSIONS)
99
    , m_wrapShape(o.m_wrapShape)
100
#endif
101
95
{
102
{
96
}
103
}
97
104
Lines 138-143 bool StyleRareNonInheritedData::operator==(const StyleRareNonInheritedData& o) c a/Source/WebCore/rendering/style/StyleRareNonInheritedData.cpp_sec3
138
        && (m_perspectiveOriginY == o.m_perspectiveOriginY)
145
        && (m_perspectiveOriginY == o.m_perspectiveOriginY)
139
        && (m_pageSize == o.m_pageSize)
146
        && (m_pageSize == o.m_pageSize)
140
        && (m_pageSizeType == o.m_pageSizeType)
147
        && (m_pageSizeType == o.m_pageSizeType)
148
#if ENABLE(EXCLUSIONS)
149
        && (m_wrapShape == o.m_wrapShape)
150
#endif
141
        ;
151
        ;
142
}
152
}
143
153
- a/Source/WebCore/rendering/style/StyleRareNonInheritedData.h +8 lines
Lines 36-41 a/Source/WebCore/rendering/style/StyleRareNonInheritedData.h_sec1
36
#include <wtf/PassRefPtr.h>
36
#include <wtf/PassRefPtr.h>
37
#include <wtf/Vector.h>
37
#include <wtf/Vector.h>
38
38
39
#if ENABLE(EXCLUSIONS)
40
#include "Shape.h"
41
#endif
42
39
namespace WebCore {
43
namespace WebCore {
40
44
41
class AnimationList;
45
class AnimationList;
Lines 129-134 public: a/Source/WebCore/rendering/style/StyleRareNonInheritedData.h_sec2
129
133
130
    LengthSize m_pageSize;
134
    LengthSize m_pageSize;
131
    PageSizeType m_pageSizeType;
135
    PageSizeType m_pageSizeType;
136
    
137
#if ENABLE(EXCLUSIONS)
138
    RefPtr<Shape> m_wrapShape;
139
#endif
132
140
133
private:
141
private:
134
    StyleRareNonInheritedData();
142
    StyleRareNonInheritedData();

Return to Bug 61726