diff --git a/Macaw.xcodeproj/project.pbxproj b/Macaw.xcodeproj/project.pbxproj index 06b80715..51617a0c 100644 --- a/Macaw.xcodeproj/project.pbxproj +++ b/Macaw.xcodeproj/project.pbxproj @@ -508,6 +508,8 @@ A718CD4F1F45C28F00966E06 /* MDisplayLink_macOS.swift in Sources */ = {isa = PBXBuildFile; fileRef = A718CD4B1F45C28F00966E06 /* MDisplayLink_macOS.swift */; }; A718CD501F45C28F00966E06 /* MView_macOS.swift in Sources */ = {isa = PBXBuildFile; fileRef = A718CD4C1F45C28F00966E06 /* MView_macOS.swift */; }; A718CD521F45C2A400966E06 /* MBezierPath+Extension_macOS.swift in Sources */ = {isa = PBXBuildFile; fileRef = A718CD511F45C2A400966E06 /* MBezierPath+Extension_macOS.swift */; }; + A74C81EC229284790085A832 /* struct-use-01-t-manual.reference in Resources */ = {isa = PBXBuildFile; fileRef = A74C81EA229284780085A832 /* struct-use-01-t-manual.reference */; }; + A74C81ED229284790085A832 /* struct-use-01-t-manual.svg in Resources */ = {isa = PBXBuildFile; fileRef = A74C81EB229284780085A832 /* struct-use-01-t-manual.svg */; }; A74C81F12292B3940085A832 /* color-prop-05-t-manual.svg in Resources */ = {isa = PBXBuildFile; fileRef = A74C81F02292B3940085A832 /* color-prop-05-t-manual.svg */; }; A74C81F32292B45E0085A832 /* color-prop-05-t-manual.reference in Resources */ = {isa = PBXBuildFile; fileRef = A74C81F22292B45D0085A832 /* color-prop-05-t-manual.reference */; }; A7E675561EC4213500BD9ECB /* NodeBoundsTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7E675551EC4213500BD9ECB /* NodeBoundsTests.swift */; }; @@ -927,6 +929,8 @@ A718CD511F45C2A400966E06 /* MBezierPath+Extension_macOS.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = "MBezierPath+Extension_macOS.swift"; path = "Source/platform/macOS/MBezierPath+Extension_macOS.swift"; sourceTree = SOURCE_ROOT; }; A74C81F02292B3940085A832 /* color-prop-05-t-manual.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "color-prop-05-t-manual.svg"; sourceTree = ""; }; A74C81F22292B45D0085A832 /* color-prop-05-t-manual.reference */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "color-prop-05-t-manual.reference"; sourceTree = ""; }; + A74C81EA229284780085A832 /* struct-use-01-t-manual.reference */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "struct-use-01-t-manual.reference"; sourceTree = ""; }; + A74C81EB229284780085A832 /* struct-use-01-t-manual.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "struct-use-01-t-manual.svg"; sourceTree = ""; }; A7E675551EC4213500BD9ECB /* NodeBoundsTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = NodeBoundsTests.swift; path = Bounds/NodeBoundsTests.swift; sourceTree = ""; }; C410148D1F834D280022EE44 /* style.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = style.svg; sourceTree = ""; }; C4153A8E1F8793DD001BA5EE /* small-logo.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "small-logo.png"; sourceTree = ""; }; @@ -1550,6 +1554,8 @@ 5B1AE1C420B6A669007EECCB /* struct-frag-06-t-manual.svg */, 5B1AE1CA20B6A669007EECCB /* struct-group-01-t-manual.reference */, 5B1AE22420B6A669007EECCB /* struct-group-01-t-manual.svg */, + A74C81EA229284780085A832 /* struct-use-01-t-manual.reference */, + A74C81EB229284780085A832 /* struct-use-01-t-manual.svg */, 5B1AE1BB20B6A669007EECCB /* struct-use-03-t-manual.reference */, 5B1AE20120B6A669007EECCB /* struct-use-03-t-manual.svg */, 5B1AE18D20B6A669007EECCB /* struct-use-12-f-manual.reference */, @@ -1768,6 +1774,7 @@ 57CAB1361D7832E000FD8E47 /* triangle.svg in Resources */, 5B7E79CF20CBE69700C50BCF /* masking-path-02-b-manual.svg in Resources */, 5BFEF5D620BC1C1F008DAC11 /* paths-data-18-f-manual.svg in Resources */, + A74C81ED229284790085A832 /* struct-use-01-t-manual.svg in Resources */, 5B1AE23620B6A669007EECCB /* paths-data-07-t-manual.svg in Resources */, 5B1AE27720B6A669007EECCB /* coords-trans-03-t-manual.reference in Resources */, 5B1AE26420B6A669007EECCB /* painting-fill-03-t-manual.svg in Resources */, @@ -1914,6 +1921,7 @@ 5B1AE23820B6A669007EECCB /* color-prop-01-b-manual.svg in Resources */, 5B1AE24620B6A669007EECCB /* painting-control-01-f-manual.svg in Resources */, 5B1AE2B120B6A669007EECCB /* color-prop-03-t-manual.svg in Resources */, + A74C81EC229284790085A832 /* struct-use-01-t-manual.reference in Resources */, 5B1AE23B20B6A669007EECCB /* struct-use-12-f-manual.reference in Resources */, 5B1AE29F20B6A669007EECCB /* painting-stroke-09-t-manual.svg in Resources */, 5B1AE27D20B6A669007EECCB /* shapes-polygon-03-t-manual.svg in Resources */, diff --git a/MacawTests/MacawSVGTests.swift b/MacawTests/MacawSVGTests.swift index edc15bb6..97a25ac9 100644 --- a/MacawTests/MacawSVGTests.swift +++ b/MacawTests/MacawSVGTests.swift @@ -477,14 +477,18 @@ class MacawSVGTests: XCTestCase { validateJSON("struct-frag-03-t-manual") } - func testStructUse12() { - validateJSON("struct-use-12-f-manual") + func testStructUse01() { + validateJSON("struct-use-01-t-manual") } func testStructUse03() { validateJSON("struct-use-03-t-manual") } + func testStructUse12() { + validateJSON("struct-use-12-f-manual") + } + func testColorProp03() { validateJSON("color-prop-03-t-manual") } diff --git a/MacawTests/w3c-test-suite.md b/MacawTests/w3c-test-suite.md index f52175fe..132e66c9 100644 --- a/MacawTests/w3c-test-suite.md +++ b/MacawTests/w3c-test-suite.md @@ -10,12 +10,12 @@ There are [521 SVG tests](https://github.com/web-platform-tests/wpt/tree/master/ * [switch/object](https://www.w3.org/TR/SVG11/backward.html) (7) The rest 306 tests can be split into following categories: -* 30.7% passed (94) +* 31.0% passed (95) * 14.1% filters (43) [#390](https://github.com/exyte/Macaw/issues/390) * 7.8% images (24) [wpt issue](https://github.com/web-platform-tests/wpt/issues/11178) * 2.6% markers (8) [#392](https://github.com/exyte/Macaw/issues/392) * 19.9% text (61) [#391](https://github.com/exyte/Macaw/issues/391) -* 25.2% blocked by issues (77) +* 24.8% blocked by issues (76) Status of each test: @@ -274,7 +274,8 @@ Status of each test: |[struct-image-19-f-manual](w3cSVGTests/struct-image-19-f-manual.svg) | [wpt issue](https://github.com/web-platform-tests/wpt/issues/11178) | |[struct-svg-03-f-manual](w3cSVGTests/struct-svg-03-f-manual.svg) | [#344](https://github.com/exyte/Macaw/issues/344) | |[struct-symbol-01-b-manual](w3cSVGTests/struct-symbol-01-b-manual.svg) | [#398](https://github.com/exyte/Macaw/issues/398) | -|[struct-use-01-t-manual](w3cSVGTests/struct-use-01-t-manual.svg) | [#399](https://github.com/exyte/Macaw/issues/399) | +|[struct-use-01-t-manual](w3cSVGTests/struct-use-01-t-manual.svg) | +✅ |[struct-use-03-t-manual](w3cSVGTests/struct-use-03-t-manual.svg) | ✅ | |[struct-use-09-b-manual](w3cSVGTests/struct-use-09-b-manual.svg) | [#398](https://github.com/exyte/Macaw/issues/398) | |[struct-use-12-f-manual](w3cSVGTests/struct-use-12-f-manual.svg) | ✅ | diff --git a/MacawTests/w3cSVGTests/struct-use-01-t-manual.reference b/MacawTests/w3cSVGTests/struct-use-01-t-manual.reference new file mode 100644 index 00000000..183b4045 --- /dev/null +++ b/MacawTests/w3cSVGTests/struct-use-01-t-manual.reference @@ -0,0 +1,503 @@ +{ + "contents" : [ + { + "contents" : [ + { + "contents" : [ + { + "contents" : [ + { + "align" : "max", + "baseline" : "bottom", + "fill" : { + "type" : "Color", + "val" : 0 + }, + "font" : { + "name" : "SVGFreeSansASCII,sans-serif", + "size" : 20, + "weight" : "normal" + }, + "node" : "Text", + "text" : "" + }, + { + "align" : "max", + "baseline" : "bottom", + "fill" : { + "type" : "Color", + "val" : 0 + }, + "font" : { + "name" : "SVGFreeSansASCII,sans-serif", + "size" : 20, + "weight" : "normal" + }, + "node" : "Text", + "place" : "1, 0, 0, 1, 0, 30", + "text" : "" + }, + { + "align" : "max", + "baseline" : "bottom", + "fill" : { + "type" : "Color", + "val" : 0 + }, + "font" : { + "name" : "SVGFreeSansASCII,sans-serif", + "size" : 20, + "weight" : "normal" + }, + "node" : "Text", + "place" : "1, 0, 0, 1, 0, 60", + "text" : "" + }, + { + "align" : "max", + "baseline" : "bottom", + "fill" : { + "type" : "Color", + "val" : 0 + }, + "font" : { + "name" : "SVGFreeSansASCII,sans-serif", + "size" : 20, + "weight" : "normal" + }, + "node" : "Text", + "place" : "1, 0, 0, 1, 0, 90", + "text" : "" + }, + { + "align" : "max", + "baseline" : "bottom", + "fill" : { + "type" : "Color", + "val" : 0 + }, + "font" : { + "name" : "SVGFreeSansASCII,sans-serif", + "size" : 20, + "weight" : "normal" + }, + "node" : "Text", + "place" : "1, 0, 0, 1, 0, 120", + "text" : "" + }, + { + "align" : "max", + "baseline" : "bottom", + "fill" : { + "type" : "Color", + "val" : 0 + }, + "font" : { + "name" : "SVGFreeSansASCII,sans-serif", + "size" : 20, + "weight" : "normal" + }, + "node" : "Text", + "place" : "1, 0, 0, 1, 0, 150", + "text" : "" + }, + { + "align" : "max", + "baseline" : "bottom", + "fill" : { + "type" : "Color", + "val" : 0 + }, + "font" : { + "name" : "SVGFreeSansASCII,sans-serif", + "size" : 20, + "weight" : "normal" + }, + "node" : "Text", + "place" : "1, 0, 0, 1, 0, 180", + "text" : "" + }, + { + "align" : "max", + "baseline" : "bottom", + "fill" : { + "type" : "Color", + "val" : 0 + }, + "font" : { + "name" : "SVGFreeSansASCII,sans-serif", + "size" : 20, + "weight" : "normal" + }, + "node" : "Text", + "place" : "1, 0, 0, 1, 0, 210", + "text" : "" + }, + { + "align" : "max", + "baseline" : "bottom", + "fill" : { + "type" : "Color", + "val" : 0 + }, + "font" : { + "name" : "SVGFreeSansASCII,sans-serif", + "size" : 20, + "weight" : "normal" + }, + "node" : "Text", + "place" : "1, 0, 0, 1, 0, 240", + "text" : "" + } + ], + "node" : "Group", + "place" : "1, 0, 0, 1, 130, 40" + }, + { + "contents" : [ + { + "align" : "max", + "baseline" : "bottom", + "fill" : { + "type" : "Color", + "val" : 0 + }, + "font" : { + "name" : "SVGFreeSansASCII,sans-serif", + "size" : 20, + "weight" : "normal" + }, + "node" : "Text", + "text" : "" + }, + { + "align" : "max", + "baseline" : "bottom", + "fill" : { + "type" : "Color", + "val" : 0 + }, + "font" : { + "name" : "SVGFreeSansASCII,sans-serif", + "size" : 20, + "weight" : "normal" + }, + "node" : "Text", + "place" : "1, 0, 0, 1, 0, 30", + "text" : "" + } + ], + "node" : "Group", + "place" : "1, 0, 0, 1, 310, 40" + } + ], + "node" : "Group" + }, + { + "contents" : [ + { + "fill" : { + "type" : "Color", + "val" : 65280 + }, + "form" : { + "h" : 20, + "type" : "Rect", + "w" : 20, + "x" : 0, + "y" : 0 + }, + "node" : "Shape" + }, + { + "fill" : { + "type" : "Color", + "val" : 65280 + }, + "form" : { + "cx" : 10, + "cy" : 10, + "r" : 10, + "type" : "Circle" + }, + "node" : "Shape", + "place" : "1, 0, 0, 1, 0, 30" + }, + { + "fill" : { + "type" : "Color", + "val" : 65280 + }, + "form" : { + "ellipse" : { + "cx" : 10, + "cy" : 10, + "rx" : 10, + "ry" : 10, + "type" : "Ellipse" + }, + "extent" : 6.2831853071795862, + "shift" : 0, + "type" : "Arc" + }, + "node" : "Shape", + "place" : "1, 0, 0, 1, 0, 60" + }, + { + "fill" : { + "type" : "Color", + "val" : 0 + }, + "form" : { + "type" : "Line", + "x1" : 0, + "x2" : 20, + "y1" : 10, + "y2" : 10 + }, + "node" : "Shape", + "place" : "1, 0, 0, 1, 0, 90", + "stroke" : { + "cap" : "butt", + "dashes" : [ + + ], + "fill" : { + "type" : "Color", + "val" : 65280 + }, + "join" : "miter", + "width" : 2 + } + }, + { + "form" : { + "points" : [ + 0, + 0, + 20, + 0, + 20, + 20 + ], + "type" : "Polyline" + }, + "node" : "Shape", + "place" : "1, 0, 0, 1, 0, 120", + "stroke" : { + "cap" : "butt", + "dashes" : [ + + ], + "fill" : { + "type" : "Color", + "val" : 65280 + }, + "join" : "miter", + "width" : 2 + } + }, + { + "fill" : { + "type" : "Color", + "val" : 65280 + }, + "form" : { + "points" : [ + 0, + 0, + 20, + 0, + 20, + 20, + 0, + 20, + 0, + 0 + ], + "type" : "Polygon" + }, + "node" : "Shape", + "place" : "1, 0, 0, 1, 0, 150" + }, + { + "fill" : { + "type" : "Color", + "val" : 65280 + }, + "form" : { + "segments" : [ + { + "data" : [ + 0, + 0 + ], + "type" : "M" + }, + { + "data" : [ + 20, + 0 + ], + "type" : "L" + }, + { + "data" : [ + 20, + 20 + ], + "type" : "L" + }, + { + "data" : [ + 0, + 20 + ], + "type" : "L" + }, + { + "data" : [ + + ], + "type" : "z" + } + ], + "type" : "Path" + }, + "node" : "Shape", + "place" : "1, 0, 0, 1, 0, 180" + }, + { + "align" : "min", + "baseline" : "bottom", + "fill" : { + "type" : "Color", + "val" : 65280 + }, + "font" : { + "name" : "FreeSerif,serif", + "size" : 25, + "weight" : "bold" + }, + "node" : "Text", + "place" : "1, 0, 0, 1, 0, 260", + "text" : "Text" + }, + { + "contents" : [ + { + "fill" : { + "type" : "Color", + "val" : 65280 + }, + "form" : { + "h" : 20, + "type" : "Rect", + "w" : 10, + "x" : 0, + "y" : 0 + }, + "node" : "Shape" + }, + { + "fill" : { + "type" : "Color", + "val" : 32768 + }, + "form" : { + "h" : 20, + "type" : "Rect", + "w" : 10, + "x" : 10, + "y" : 0 + }, + "node" : "Shape" + } + ], + "node" : "Group", + "place" : "1, 0, 0, 1, 180, 0" + }, + { + "fill" : { + "type" : "Color", + "val" : 52224 + }, + "form" : { + "h" : 20, + "type" : "Rect", + "w" : 20, + "x" : 0, + "y" : 0 + }, + "node" : "Shape", + "place" : "1, 0, 0, 1, 180, 30" + } + ], + "node" : "Group", + "place" : "1, 0, 0, 1, 150, 25" + } + ], + "node" : "Group" + }, + { + "contents" : [ + { + "align" : "min", + "baseline" : "bottom", + "fill" : { + "type" : "Color", + "val" : 0 + }, + "font" : { + "name" : "SVGFreeSansASCII,sans-serif", + "size" : 32, + "weight" : "normal" + }, + "node" : "Text", + "place" : "1, 0, 0, 1, 10, 340", + "text" : "$Revision: 1.5 $" + } + ], + "node" : "Group" + }, + { + "form" : { + "h" : 358, + "type" : "Rect", + "w" : 478, + "x" : 1, + "y" : 1 + }, + "node" : "Shape", + "stroke" : { + "cap" : "butt", + "dashes" : [ + + ], + "fill" : { + "type" : "Color", + "val" : 0 + }, + "join" : "miter", + "width" : 1 + } + } + ], + "layout" : { + "scalingMode" : "meet", + "svgSize" : { + "height" : "100.0%", + "width" : "100.0%" + }, + "viewBox" : { + "h" : 360, + "type" : "Rect", + "w" : 480, + "x" : 0, + "y" : 0 + }, + "xAligningMode" : "mid", + "yAligningMode" : "mid" + }, + "node" : "Canvas" +} \ No newline at end of file diff --git a/MacawTests/w3cSVGTests/struct-use-01-t-manual.svg b/MacawTests/w3cSVGTests/struct-use-01-t-manual.svg new file mode 100644 index 00000000..92e5175f --- /dev/null +++ b/MacawTests/w3cSVGTests/struct-use-01-t-manual.svg @@ -0,0 +1,111 @@ + + + + + + + + + + + + +

+ The purpose of this test is to validate proper handling of + the use element. In particular, the test checks the proper inheritance + of properties through the shadow tree (rather than through the document + tree). +

+ + +

+ Run the test. No interaction required. +

+
+ +

+ The test should display various elements in different shades of green. + If an element is not displayed in green, but in red fill and/or yellow + stroke, then it is in error. +

+
+ + $RCSfile: struct-use-01-t.svg,v $ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Text + + + + + + <rect> + <circle> + <ellipse> + <line> + <polyline> + <polygon> + <path> + <image> + <text> + + + <g> + <use> + + + + + + + + + + + + + + + + + + $Revision: 1.5 $ + + + + +