Title: [251499] trunk
Revision
251499
Author
commit-qu...@webkit.org
Date
2019-10-23 14:22:40 -0700 (Wed, 23 Oct 2019)

Log Message

[SVG2] Fix SVGElement to conform with SVG2
https://bugs.webkit.org/show_bug.cgi?id=203280

Patch by Said Abou-Hallawa <sabouhall...@apple.com> on 2019-10-23
Reviewed by Simon Fraser.

LayoutTests/imported/w3c:

* web-platform-tests/svg/historical-expected.txt:
Some sub-tests are now passing with this change.

Source/WebCore:

The interface of SVGElement is defined here:
    https://www.w3.org/TR/SVG2/types.html#InterfaceSVGElement.

-- Remove SVGElement.getPresentationAttribute.
-- Remove the SVGElement attributes xmllang and xmlspace.
-- Remove the class SVGLangSpace

* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* svg/SVGComponentTransferFunctionElement.cpp:
(WebCore::SVGComponentTransferFunctionElement::svgAttributeChanged):
Fix a bug. This function was calling SVGLangSpace::isKnownAttribute()
instead of calling PropertyRegistry::isKnownAttribute().

* svg/SVGElement.cpp:
(WebCore::SVGElement::SVGElement):
(WebCore::SVGElement::parseAttribute):
(WebCore::SVGElement::svgAttributeChanged):
(WebCore::SVGElement::getPresentationAttribute): Deleted.
* svg/SVGElement.h:
* svg/SVGElement.idl:
* svg/SVGFilterPrimitiveStandardAttributes.cpp:
(WebCore::SVGFilterPrimitiveStandardAttributes::svgAttributeChanged):
Fix a bug. This function was calling SVGLangSpace::isKnownAttribute()
instead of calling PropertyRegistry::isKnownAttribute().

* svg/SVGLangSpace.cpp: Removed.
* svg/SVGLangSpace.h: Removed.
* svg/SVGUseElement.cpp:
(WebCore::SVGUseElement::svgAttributeChanged):

LayoutTests:

* platform/gtk/svg/custom/getPresentationAttribute-expected.png: Removed.
* platform/gtk/svg/custom/getPresentationAttribute-expected.txt: Removed.
* platform/ios/svg/custom/getPresentationAttribute-expected.txt: Removed.
* platform/mac/svg/custom/getPresentationAttribute-expected.png: Removed.
* platform/mac/svg/custom/getPresentationAttribute-expected.txt: Removed.
* platform/mac/svg/custom/getPresentationAttribute-modify-expected.png: Removed.
* platform/win/svg/custom/getPresentationAttribute-expected.txt: Removed.
* platform/wincairo/svg/custom/getPresentationAttribute-expected.txt: Removed.
* platform/wpe/svg/custom/getPresentationAttribute-expected.txt: Removed.
* svg/custom/getPresentationAttribute.svg: Removed.
* svg/custom/path-getPresentationAttribute-crash-expected.txt: Removed.
* svg/custom/path-getPresentationAttribute-crash.html: Removed.
SVGElement.getPresentationAttribute has to be removed.

Modified Paths

Removed Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (251498 => 251499)


--- trunk/LayoutTests/ChangeLog	2019-10-23 20:59:52 UTC (rev 251498)
+++ trunk/LayoutTests/ChangeLog	2019-10-23 21:22:40 UTC (rev 251499)
@@ -1,3 +1,24 @@
+2019-10-23  Said Abou-Hallawa  <sabouhall...@apple.com>
+
+        [SVG2] Fix SVGElement to conform with SVG2
+        https://bugs.webkit.org/show_bug.cgi?id=203280
+
+        Reviewed by Simon Fraser.
+
+        * platform/gtk/svg/custom/getPresentationAttribute-expected.png: Removed.
+        * platform/gtk/svg/custom/getPresentationAttribute-expected.txt: Removed.
+        * platform/ios/svg/custom/getPresentationAttribute-expected.txt: Removed.
+        * platform/mac/svg/custom/getPresentationAttribute-expected.png: Removed.
+        * platform/mac/svg/custom/getPresentationAttribute-expected.txt: Removed.
+        * platform/mac/svg/custom/getPresentationAttribute-modify-expected.png: Removed.
+        * platform/win/svg/custom/getPresentationAttribute-expected.txt: Removed.
+        * platform/wincairo/svg/custom/getPresentationAttribute-expected.txt: Removed.
+        * platform/wpe/svg/custom/getPresentationAttribute-expected.txt: Removed.
+        * svg/custom/getPresentationAttribute.svg: Removed.
+        * svg/custom/path-getPresentationAttribute-crash-expected.txt: Removed.
+        * svg/custom/path-getPresentationAttribute-crash.html: Removed.
+        SVGElement.getPresentationAttribute has to be removed.
+
 2019-10-23  Chris Dumez  <cdu...@apple.com>
 
         FetchRequest should not prevent entering the back/forward cache

Modified: trunk/LayoutTests/imported/w3c/ChangeLog (251498 => 251499)


--- trunk/LayoutTests/imported/w3c/ChangeLog	2019-10-23 20:59:52 UTC (rev 251498)
+++ trunk/LayoutTests/imported/w3c/ChangeLog	2019-10-23 21:22:40 UTC (rev 251499)
@@ -1,3 +1,13 @@
+2019-10-23  Said Abou-Hallawa  <sabouhall...@apple.com>
+
+        [SVG2] Fix SVGElement to conform with SVG2
+        https://bugs.webkit.org/show_bug.cgi?id=203280
+
+        Reviewed by Simon Fraser.
+
+        * web-platform-tests/svg/historical-expected.txt:
+        Some sub-tests are now passing with this change.
+
 2019-10-23  Rob Buis  <rb...@igalia.com>
 
         Be strict on request's Content-Type

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/svg/historical-expected.txt (251498 => 251499)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/svg/historical-expected.txt	2019-10-23 20:59:52 UTC (rev 251498)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/svg/historical-expected.txt	2019-10-23 21:22:40 UTC (rev 251499)
@@ -21,10 +21,10 @@
 PASS SVGTests mixin interface must not be exposed 
 PASS SVGURIReference mixin interface must not be exposed 
 PASS SVGZoomAndPan mixin interface must not be exposed 
-FAIL SVGElement.prototype.getPresentationAttribute must be removed assert_false: expected false got true
+PASS SVGElement.prototype.getPresentationAttribute must be removed 
 PASS SVGElement.prototype.xmlbase must be removed 
-FAIL SVGElement.prototype.xmllang must be removed assert_false: expected false got true
-FAIL SVGElement.prototype.xmlspace must be removed assert_false: expected false got true
+PASS SVGElement.prototype.xmllang must be removed 
+PASS SVGElement.prototype.xmlspace must be removed 
 FAIL SVGGraphicsElement.prototype.getTransformToElement must be removed assert_false: expected false got true
 FAIL SVGGraphicsElement.prototype.hasExtension must be removed assert_false: expected false got true
 FAIL SVGGraphicsElement.prototype.requiredFeatures must be removed assert_false: expected false got true

Deleted: trunk/LayoutTests/platform/gtk/svg/custom/getPresentationAttribute-expected.png


(Binary files differ)

Deleted: trunk/LayoutTests/platform/gtk/svg/custom/getPresentationAttribute-expected.txt (251498 => 251499)


--- trunk/LayoutTests/platform/gtk/svg/custom/getPresentationAttribute-expected.txt	2019-10-23 20:59:52 UTC (rev 251498)
+++ trunk/LayoutTests/platform/gtk/svg/custom/getPresentationAttribute-expected.txt	2019-10-23 21:22:40 UTC (rev 251499)
@@ -1,17 +0,0 @@
-layer at (0,0) size 800x600
-  RenderView at (0,0) size 800x600
-layer at (0,0) size 800x600
-  RenderSVGRoot {svg} at (0,0) size 800x600
-    RenderSVGContainer {a} at (0,0) size 0x0
-    RenderSVGForeignObject {foreignObject} at (0,0) size 800x600
-      RenderBlock {html} at (0,0) size 800x36
-        RenderBlock {div} at (0,0) size 800x36
-          RenderText {#text} at (0,0) size 791x35
-            text run at (0,0) width 791: "This test tests that getPresentationAttribute succesfully returns SVG presentation attributes, but not ones that are defined in the"
-            text run at (0,18) width 380: "inline style and not non SVG css properties like border. See "
-          RenderInline {a} at (0,0) size 72x17 [color=#0000EE]
-            RenderText {#text} at (379,18) size 72x17
-              text run at (379,18) width 72: "Bug 13976"
-          RenderText {#text} at (450,18) size 5x17
-            text run at (450,18) width 5: "."
-    RenderSVGRect {rect} at (10,50) size 100x100 [fill={[type=SOLID] [color=#008000]}] [x=10.00] [y=50.00] [width=100.00] [height=100.00]

Deleted: trunk/LayoutTests/platform/ios/svg/custom/getPresentationAttribute-expected.txt (251498 => 251499)


--- trunk/LayoutTests/platform/ios/svg/custom/getPresentationAttribute-expected.txt	2019-10-23 20:59:52 UTC (rev 251498)
+++ trunk/LayoutTests/platform/ios/svg/custom/getPresentationAttribute-expected.txt	2019-10-23 21:22:40 UTC (rev 251499)
@@ -1,17 +0,0 @@
-layer at (0,0) size 800x600
-  RenderView at (0,0) size 800x600
-layer at (0,0) size 800x600
-  RenderSVGRoot {svg} at (0,0) size 800x600
-    RenderSVGContainer {a} at (0,0) size 0x0
-    RenderSVGForeignObject {foreignObject} at (0,0) size 800x600
-      RenderBlock {html} at (0,0) size 800x40
-        RenderBlock {div} at (0,0) size 800x40
-          RenderText {#text} at (0,0) size 788x39
-            text run at (0,0) width 788: "This test tests that getPresentationAttribute succesfully returns SVG presentation attributes, but not ones that are defined in"
-            text run at (0,20) width 410: "the inline style and not non SVG css properties like border. See "
-          RenderInline {a} at (0,0) size 71x19 [color=#0000EE]
-            RenderText {#text} at (409,20) size 71x19
-              text run at (409,20) width 71: "Bug 13976"
-          RenderText {#text} at (479,20) size 5x19
-            text run at (479,20) width 5: "."
-    RenderSVGRect {rect} at (10,50) size 100x100 [fill={[type=SOLID] [color=#008000]}] [x=10.00] [y=50.00] [width=100.00] [height=100.00]

Deleted: trunk/LayoutTests/platform/mac/svg/custom/getPresentationAttribute-expected.png


(Binary files differ)

Deleted: trunk/LayoutTests/platform/mac/svg/custom/getPresentationAttribute-expected.txt (251498 => 251499)


--- trunk/LayoutTests/platform/mac/svg/custom/getPresentationAttribute-expected.txt	2019-10-23 20:59:52 UTC (rev 251498)
+++ trunk/LayoutTests/platform/mac/svg/custom/getPresentationAttribute-expected.txt	2019-10-23 21:22:40 UTC (rev 251499)
@@ -1,17 +0,0 @@
-layer at (0,0) size 800x600
-  RenderView at (0,0) size 800x600
-layer at (0,0) size 800x600
-  RenderSVGRoot {svg} at (0,0) size 800x600
-    RenderSVGContainer {a} at (0,0) size 0x0
-    RenderSVGForeignObject {foreignObject} at (0,0) size 800x600
-      RenderBlock {html} at (0,0) size 800x36
-        RenderBlock {div} at (0,0) size 800x36
-          RenderText {#text} at (0,0) size 787x36
-            text run at (0,0) width 787: "This test tests that getPresentationAttribute succesfully returns SVG presentation attributes, but not ones that are defined in"
-            text run at (0,18) width 410: "the inline style and not non SVG css properties like border. See "
-          RenderInline {a} at (0,0) size 71x18 [color=#0000EE]
-            RenderText {#text} at (409,18) size 71x18
-              text run at (409,18) width 71: "Bug 13976"
-          RenderText {#text} at (479,18) size 5x18
-            text run at (479,18) width 5: "."
-    RenderSVGRect {rect} at (10,50) size 100x100 [fill={[type=SOLID] [color=#008000]}] [x=10.00] [y=50.00] [width=100.00] [height=100.00]

Deleted: trunk/LayoutTests/platform/mac/svg/custom/getPresentationAttribute-modify-expected.png


(Binary files differ)

Deleted: trunk/LayoutTests/platform/win/svg/custom/getPresentationAttribute-expected.txt (251498 => 251499)


--- trunk/LayoutTests/platform/win/svg/custom/getPresentationAttribute-expected.txt	2019-10-23 20:59:52 UTC (rev 251498)
+++ trunk/LayoutTests/platform/win/svg/custom/getPresentationAttribute-expected.txt	2019-10-23 21:22:40 UTC (rev 251499)
@@ -1,17 +0,0 @@
-layer at (0,0) size 800x600
-  RenderView at (0,0) size 800x600
-layer at (0,0) size 800x600
-  RenderSVGRoot {svg} at (0,0) size 800x600
-    RenderSVGContainer {a} at (0,0) size 0x0
-    RenderSVGForeignObject {foreignObject} at (0,0) size 800x600
-      RenderBlock {html} at (0,0) size 800x36
-        RenderBlock {div} at (0,0) size 800x36
-          RenderText {#text} at (0,0) size 791x36
-            text run at (0,0) width 791: "This test tests that getPresentationAttribute succesfully returns SVG presentation attributes, but not ones that are defined in the"
-            text run at (0,18) width 380: "inline style and not non SVG css properties like border. See "
-          RenderInline {a} at (0,0) size 71x18 [color=#0000EE]
-            RenderText {#text} at (380,18) size 71x18
-              text run at (380,18) width 71: "Bug 13976"
-          RenderText {#text} at (451,18) size 4x18
-            text run at (451,18) width 4: "."
-    RenderSVGRect {rect} at (10,50) size 100x100 [fill={[type=SOLID] [color=#008000]}] [x=10.00] [y=50.00] [width=100.00] [height=100.00]

Deleted: trunk/LayoutTests/platform/wincairo/svg/custom/getPresentationAttribute-expected.txt (251498 => 251499)


--- trunk/LayoutTests/platform/wincairo/svg/custom/getPresentationAttribute-expected.txt	2019-10-23 20:59:52 UTC (rev 251498)
+++ trunk/LayoutTests/platform/wincairo/svg/custom/getPresentationAttribute-expected.txt	2019-10-23 21:22:40 UTC (rev 251499)
@@ -1,17 +0,0 @@
-layer at (0,0) size 800x600
-  RenderView at (0,0) size 800x600
-layer at (0,0) size 800x600
-  RenderSVGRoot {svg} at (0,0) size 800x600
-    RenderSVGContainer {a} at (0,0) size 0x0
-    RenderSVGForeignObject {foreignObject} at (0,0) size 800x600
-      RenderBlock {html} at (0,0) size 800x40
-        RenderBlock {div} at (0,0) size 800x40
-          RenderText {#text} at (0,0) size 789x39
-            text run at (0,0) width 789: "This test tests that getPresentationAttribute succesfully returns SVG presentation attributes, but not ones that are defined in the inline"
-            text run at (0,20) width 330: "style and not non SVG css properties like border. See "
-          RenderInline {a} at (0,0) size 68x19 [color=#0000EE]
-            RenderText {#text} at (330,20) size 68x19
-              text run at (330,20) width 68: "Bug 13976"
-          RenderText {#text} at (398,20) size 4x19
-            text run at (398,20) width 4: "."
-    RenderSVGRect {rect} at (10,50) size 100x100 [fill={[type=SOLID] [color=#008000]}] [x=10.00] [y=50.00] [width=100.00] [height=100.00]

Deleted: trunk/LayoutTests/platform/wpe/svg/custom/getPresentationAttribute-expected.txt (251498 => 251499)


--- trunk/LayoutTests/platform/wpe/svg/custom/getPresentationAttribute-expected.txt	2019-10-23 20:59:52 UTC (rev 251498)
+++ trunk/LayoutTests/platform/wpe/svg/custom/getPresentationAttribute-expected.txt	2019-10-23 21:22:40 UTC (rev 251499)
@@ -1,17 +0,0 @@
-layer at (0,0) size 800x600
-  RenderView at (0,0) size 800x600
-layer at (0,0) size 800x600
-  RenderSVGRoot {svg} at (0,0) size 800x600
-    RenderSVGContainer {a} at (0,0) size 0x0
-    RenderSVGForeignObject {foreignObject} at (0,0) size 800x600
-      RenderBlock {html} at (0,0) size 800x36
-        RenderBlock {div} at (0,0) size 800x36
-          RenderText {#text} at (0,0) size 791x35
-            text run at (0,0) width 791: "This test tests that getPresentationAttribute succesfully returns SVG presentation attributes, but not ones that are defined in the"
-            text run at (0,18) width 380: "inline style and not non SVG css properties like border. See "
-          RenderInline {a} at (0,0) size 71x17 [color=#0000EE]
-            RenderText {#text} at (380,18) size 71x17
-              text run at (380,18) width 71: "Bug 13976"
-          RenderText {#text} at (451,18) size 4x17
-            text run at (451,18) width 4: "."
-    RenderSVGRect {rect} at (10,50) size 100x100 [fill={[type=SOLID] [color=#008000]}] [x=10.00] [y=50.00] [width=100.00] [height=100.00]

Deleted: trunk/LayoutTests/svg/custom/getPresentationAttribute.svg (251498 => 251499)


--- trunk/LayoutTests/svg/custom/getPresentationAttribute.svg	2019-10-23 20:59:52 UTC (rev 251498)
+++ trunk/LayoutTests/svg/custom/getPresentationAttribute.svg	2019-10-23 21:22:40 UTC (rev 251499)
@@ -1,43 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
-<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
-<svg xmlns="http://www.w3.org/2000/svg" _onload_="runTest()">
-
-<script>
-<![CDATA[
-    function log(string) {
-      var newDiv = document.createElementNS("http://www.w3.org/1999/xhtml", "div");
-      newDiv.textContent = string;
-      document.getElementById('log').appendChild(newDiv);
-    }
-    function runTest()
-    {
-        var rect = document.rootElement.lastChild.previousSibling;
-        if (rect.getPresentationAttribute('fill') == null) {
-            log("Failed getting the fill PA");
-            return;
-        }
-        if (rect.getPresentationAttribute('color') != null) {
-            log("There should be no color PA");
-            return;
-        }
-        if (rect.getPresentationAttribute('border-top') != null) {
-            log("There should be no border-top PA");
-            return;
-        }
-        rect.setAttribute("fill", "green");
-    }
-    ]]>
-</script>
-This test tests that getPresentationAttribute succefully returns SVG presentation attributes, but not ones that are defined in the inline style and not non SVG css properties like border.
-See <a href="" 13976</a>.
-<foreignObject width="100%" height="100%">
-    <html xmlns="http://www.w3.org/1999/xhtml">
-        <div id="log">
-This test tests that getPresentationAttribute succesfully returns SVG presentation attributes, but not ones that are defined in the inline style and not non SVG css properties like border.
-See <a href="" 13976</a>.
-        </div>
-    </html>
-</foreignObject>
-
-    <rect x="10" y="50" width="100" height="100" fill="red" style="color:yellow" border-top="10"/>
-</svg>

Deleted: trunk/LayoutTests/svg/custom/path-getPresentationAttribute-crash-expected.txt (251498 => 251499)


--- trunk/LayoutTests/svg/custom/path-getPresentationAttribute-crash-expected.txt	2019-10-23 20:59:52 UTC (rev 251498)
+++ trunk/LayoutTests/svg/custom/path-getPresentationAttribute-crash-expected.txt	2019-10-23 21:22:40 UTC (rev 251499)
@@ -1 +0,0 @@
-PASSED -- WebKit did not crash!

Deleted: trunk/LayoutTests/svg/custom/path-getPresentationAttribute-crash.html (251498 => 251499)


--- trunk/LayoutTests/svg/custom/path-getPresentationAttribute-crash.html	2019-10-23 20:59:52 UTC (rev 251498)
+++ trunk/LayoutTests/svg/custom/path-getPresentationAttribute-crash.html	2019-10-23 21:22:40 UTC (rev 251499)
@@ -1,8 +0,0 @@
-<script>
-if (window.testRunner)
-    testRunner.dumpAsText();
-
-var path = document.createElementNS("http://www.w3.org/2000/svg", "path");
-path.getPresentationAttribute("");
-document.write("PASSED -- WebKit did not crash!");
-</script>

Modified: trunk/Source/WebCore/ChangeLog (251498 => 251499)


--- trunk/Source/WebCore/ChangeLog	2019-10-23 20:59:52 UTC (rev 251498)
+++ trunk/Source/WebCore/ChangeLog	2019-10-23 21:22:40 UTC (rev 251499)
@@ -1,3 +1,41 @@
+2019-10-23  Said Abou-Hallawa  <sabouhall...@apple.com>
+
+        [SVG2] Fix SVGElement to conform with SVG2
+        https://bugs.webkit.org/show_bug.cgi?id=203280
+
+        Reviewed by Simon Fraser.
+
+        The interface of SVGElement is defined here:
+            https://www.w3.org/TR/SVG2/types.html#InterfaceSVGElement.
+
+        -- Remove SVGElement.getPresentationAttribute.
+        -- Remove the SVGElement attributes xmllang and xmlspace.
+        -- Remove the class SVGLangSpace
+
+        * Sources.txt:
+        * WebCore.xcodeproj/project.pbxproj:
+        * svg/SVGComponentTransferFunctionElement.cpp:
+        (WebCore::SVGComponentTransferFunctionElement::svgAttributeChanged):
+        Fix a bug. This function was calling SVGLangSpace::isKnownAttribute()
+        instead of calling PropertyRegistry::isKnownAttribute().
+
+        * svg/SVGElement.cpp:
+        (WebCore::SVGElement::SVGElement):
+        (WebCore::SVGElement::parseAttribute):
+        (WebCore::SVGElement::svgAttributeChanged):
+        (WebCore::SVGElement::getPresentationAttribute): Deleted.
+        * svg/SVGElement.h:
+        * svg/SVGElement.idl:
+        * svg/SVGFilterPrimitiveStandardAttributes.cpp:
+        (WebCore::SVGFilterPrimitiveStandardAttributes::svgAttributeChanged):
+        Fix a bug. This function was calling SVGLangSpace::isKnownAttribute()
+        instead of calling PropertyRegistry::isKnownAttribute().
+
+        * svg/SVGLangSpace.cpp: Removed.
+        * svg/SVGLangSpace.h: Removed.
+        * svg/SVGUseElement.cpp:
+        (WebCore::SVGUseElement::svgAttributeChanged):
+
 2019-10-22  Jiewen Tan  <jiewen_...@apple.com>
 
         [WebAuthn] Add more information to _WKWebAuthenticationPanel

Modified: trunk/Source/WebCore/Sources.txt (251498 => 251499)


--- trunk/Source/WebCore/Sources.txt	2019-10-23 20:59:52 UTC (rev 251498)
+++ trunk/Source/WebCore/Sources.txt	2019-10-23 21:22:40 UTC (rev 251499)
@@ -2414,7 +2414,6 @@
 svg/SVGHKernElement.cpp
 svg/SVGImageElement.cpp
 svg/SVGImageLoader.cpp
-svg/SVGLangSpace.cpp
 svg/SVGLengthContext.cpp
 svg/SVGLengthValue.cpp
 svg/SVGLineElement.cpp

Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (251498 => 251499)


--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2019-10-23 20:59:52 UTC (rev 251498)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2019-10-23 21:22:40 UTC (rev 251499)
@@ -3451,7 +3451,6 @@
 		B2227A270D00BF220071B782 /* SVGGElement.h in Headers */ = {isa = PBXBuildFile; fileRef = B22278910D00BF200071B782 /* SVGGElement.h */; };
 		B2227A2A0D00BF220071B782 /* SVGGradientElement.h in Headers */ = {isa = PBXBuildFile; fileRef = B22278940D00BF200071B782 /* SVGGradientElement.h */; };
 		B2227A2D0D00BF220071B782 /* SVGImageElement.h in Headers */ = {isa = PBXBuildFile; fileRef = B22278970D00BF200071B782 /* SVGImageElement.h */; };
-		B2227A300D00BF220071B782 /* SVGLangSpace.h in Headers */ = {isa = PBXBuildFile; fileRef = B222789A0D00BF200071B782 /* SVGLangSpace.h */; };
 		B2227A360D00BF220071B782 /* SVGLengthList.h in Headers */ = {isa = PBXBuildFile; fileRef = B22278A00D00BF200071B782 /* SVGLengthList.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		B2227A390D00BF220071B782 /* SVGLinearGradientElement.h in Headers */ = {isa = PBXBuildFile; fileRef = B22278A30D00BF200071B782 /* SVGLinearGradientElement.h */; };
 		B2227A3C0D00BF220071B782 /* SVGLineElement.h in Headers */ = {isa = PBXBuildFile; fileRef = B22278A60D00BF200071B782 /* SVGLineElement.h */; };
@@ -12340,8 +12339,6 @@
 		B22278960D00BF200071B782 /* SVGImageElement.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = SVGImageElement.cpp; sourceTree = "<group>"; };
 		B22278970D00BF200071B782 /* SVGImageElement.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SVGImageElement.h; sourceTree = "<group>"; };
 		B22278980D00BF200071B782 /* SVGImageElement.idl */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = SVGImageElement.idl; sourceTree = "<group>"; };
-		B22278990D00BF200071B782 /* SVGLangSpace.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = SVGLangSpace.cpp; sourceTree = "<group>"; };
-		B222789A0D00BF200071B782 /* SVGLangSpace.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SVGLangSpace.h; sourceTree = "<group>"; };
 		B222789E0D00BF200071B782 /* SVGLength.idl */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = SVGLength.idl; sourceTree = "<group>"; };
 		B22278A00D00BF200071B782 /* SVGLengthList.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SVGLengthList.h; sourceTree = "<group>"; };
 		B22278A10D00BF200071B782 /* SVGLengthList.idl */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = SVGLengthList.idl; sourceTree = "<group>"; };
@@ -24376,8 +24373,6 @@
 				B22278980D00BF200071B782 /* SVGImageElement.idl */,
 				B28C6A200D00C44800334AA4 /* SVGImageLoader.cpp */,
 				B28C6A210D00C44800334AA4 /* SVGImageLoader.h */,
-				B22278990D00BF200071B782 /* SVGLangSpace.cpp */,
-				B222789A0D00BF200071B782 /* SVGLangSpace.h */,
 				7CE58D511DD7B09300128552 /* SVGLength.h */,
 				B222789E0D00BF200071B782 /* SVGLength.idl */,
 				7134496B146941B300720312 /* SVGLengthContext.cpp */,
@@ -32191,7 +32186,6 @@
 				B28C6A2A0D00C44800334AA4 /* SVGImageLoader.h in Headers */,
 				0854B01F1255E4E600B9CDD0 /* SVGInlineFlowBox.h in Headers */,
 				0854B0211255E4E600B9CDD0 /* SVGInlineTextBox.h in Headers */,
-				B2227A300D00BF220071B782 /* SVGLangSpace.h in Headers */,
 				7134496E146941B300720312 /* SVGLengthContext.h in Headers */,
 				B2227A360D00BF220071B782 /* SVGLengthList.h in Headers */,
 				7CCEBFC01DD8F6AB002C40B8 /* SVGLengthValue.h in Headers */,

Modified: trunk/Source/WebCore/svg/SVGComponentTransferFunctionElement.cpp (251498 => 251499)


--- trunk/Source/WebCore/svg/SVGComponentTransferFunctionElement.cpp	2019-10-23 20:59:52 UTC (rev 251498)
+++ trunk/Source/WebCore/svg/SVGComponentTransferFunctionElement.cpp	2019-10-23 21:22:40 UTC (rev 251499)
@@ -90,7 +90,7 @@
 
 void SVGComponentTransferFunctionElement::svgAttributeChanged(const QualifiedName& attrName)
 {
-    if (isKnownAttribute(attrName)) {
+    if (PropertyRegistry::isKnownAttribute(attrName)) {
         InstanceInvalidationGuard guard(*this);
         invalidateFilterPrimitiveParent(this);
         return;

Modified: trunk/Source/WebCore/svg/SVGElement.cpp (251498 => 251499)


--- trunk/Source/WebCore/svg/SVGElement.cpp	2019-10-23 20:59:52 UTC (rev 251498)
+++ trunk/Source/WebCore/svg/SVGElement.cpp	2019-10-23 21:22:40 UTC (rev 251499)
@@ -160,7 +160,6 @@
 
 SVGElement::SVGElement(const QualifiedName& tagName, Document& document)
     : StyledElement(tagName, document, CreateSVGElement)
-    , SVGLangSpace(this)
     , m_propertyAnimatorFactory(makeUnique<SVGPropertyAnimatorFactory>())
 {
     static std::once_flag onceFlag;
@@ -354,8 +353,6 @@
         setAttributeEventListener(eventName, name, value);
         return;
     }
-
-    SVGLangSpace::parseAttribute(name, value);
 }
 
 bool SVGElement::haveLoadedRequiredResources()
@@ -834,8 +831,6 @@
         invalidateInstances();
         return;
     }
-
-    SVGLangSpace::svgAttributeChanged(attrName);
 }
 
 Node::InsertedIntoAncestorResult SVGElement::insertedIntoAncestor(InsertionType insertionType, ContainerNode& parentOfInsertedTree)
@@ -878,25 +873,6 @@
     invalidateInstances();
 }
 
-RefPtr<DeprecatedCSSOMValue> SVGElement::getPresentationAttribute(const String& name)
-{
-    if (!hasAttributesWithoutUpdate())
-        return 0;
-
-    QualifiedName attributeName(nullAtom(), name, nullAtom());
-    const Attribute* attribute = findAttributeByName(attributeName);
-    if (!attribute)
-        return 0;
-
-    auto style = MutableStyleProperties::create(SVGAttributeMode);
-    CSSPropertyID propertyID = cssPropertyIdForSVGAttributeName(attribute->name());
-    style->setProperty(propertyID, attribute->value());
-    auto cssValue = style->getPropertyCSSValue(propertyID);
-    if (!cssValue)
-        return nullptr;
-    return cssValue->createDeprecatedCSSOMWrapper(style->ensureCSSStyleDeclaration());
-}
-
 bool SVGElement::instanceUpdatesBlocked() const
 {
     return m_svgRareData && m_svgRareData->instanceUpdatesBlocked();

Modified: trunk/Source/WebCore/svg/SVGElement.h (251498 => 251499)


--- trunk/Source/WebCore/svg/SVGElement.h	2019-10-23 20:59:52 UTC (rev 251498)
+++ trunk/Source/WebCore/svg/SVGElement.h	2019-10-23 21:22:40 UTC (rev 251499)
@@ -23,7 +23,6 @@
 #pragma once
 
 #include "SVGAnimatedPropertyImpl.h"
-#include "SVGLangSpace.h"
 #include "SVGLocatable.h"
 #include "SVGNames.h"
 #include "SVGParsingError.h"
@@ -47,7 +46,7 @@
 
 void mapAttributeToCSSProperty(HashMap<AtomStringImpl*, CSSPropertyID>* propertyNameToIdMap, const QualifiedName& attrName);
 
-class SVGElement : public StyledElement, public SVGLangSpace, public SVGPropertyOwner {
+class SVGElement : public StyledElement, public SVGPropertyOwner {
     WTF_MAKE_ISO_ALLOCATED(SVGElement);
 public:
     bool isOutermostSVGSVGElement() const;
@@ -56,7 +55,6 @@
     SVGElement* viewportElement() const;
 
     String title() const override;
-    RefPtr<DeprecatedCSSOMValue> getPresentationAttribute(const String& name);
     virtual bool supportsMarkers() const { return false; }
     bool hasRelativeLengths() const { return !m_elementsWithRelativeLengths.isEmpty(); }
     virtual bool needsPendingResourceHandling() const { return true; }

Modified: trunk/Source/WebCore/svg/SVGElement.idl (251498 => 251499)


--- trunk/Source/WebCore/svg/SVGElement.idl	2019-10-23 20:59:52 UTC (rev 251498)
+++ trunk/Source/WebCore/svg/SVGElement.idl	2019-10-23 21:22:40 UTC (rev 251499)
@@ -23,17 +23,11 @@
 [
     JSGenerateToNativeObject,
 ] interface SVGElement : Element {
-    readonly attribute SVGSVGElement ownerSVGElement;
-    readonly attribute SVGElement viewportElement;
 
-    attribute DOMString xmllang;
-    attribute DOMString xmlspace;
-
     readonly attribute SVGAnimatedString className;
 
-    // FIXME: Using "undefined" as default parameter value is wrong.
-    // This method is deprecated, and we'd like to remove it someday.
-    DeprecatedCSSOMValue getPresentationAttribute(optional DOMString name = "undefined");
+    readonly attribute SVGSVGElement? ownerSVGElement;
+    readonly attribute SVGElement? viewportElement;
 };
 
 SVGElement implements ElementCSSInlineStyle;

Modified: trunk/Source/WebCore/svg/SVGFilterPrimitiveStandardAttributes.cpp (251498 => 251499)


--- trunk/Source/WebCore/svg/SVGFilterPrimitiveStandardAttributes.cpp	2019-10-23 20:59:52 UTC (rev 251498)
+++ trunk/Source/WebCore/svg/SVGFilterPrimitiveStandardAttributes.cpp	2019-10-23 21:22:40 UTC (rev 251499)
@@ -75,7 +75,7 @@
 
 void SVGFilterPrimitiveStandardAttributes::svgAttributeChanged(const QualifiedName& attrName)
 {
-    if (isKnownAttribute(attrName)) {
+    if (PropertyRegistry::isKnownAttribute(attrName)) {
         InstanceInvalidationGuard guard(*this);
         invalidate();
         return;

Deleted: trunk/Source/WebCore/svg/SVGLangSpace.cpp (251498 => 251499)


--- trunk/Source/WebCore/svg/SVGLangSpace.cpp	2019-10-23 20:59:52 UTC (rev 251498)
+++ trunk/Source/WebCore/svg/SVGLangSpace.cpp	2019-10-23 21:22:40 UTC (rev 251499)
@@ -1,74 +0,0 @@
-/*
- * Copyright (C) 2004, 2005, 2007, 2008 Nikolas Zimmermann <zimmerm...@kde.org>
- * Copyright (C) 2004, 2005, 2006 Rob Buis <b...@kde.org>
- * Copyright (C) 2018-2019 Apple Inc. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#include "config.h"
-#include "SVGLangSpace.h"
-
-#include "RenderSVGResource.h"
-#include "RenderSVGShape.h"
-#include "SVGGeometryElement.h"
-#include "XMLNames.h"
-#include <wtf/NeverDestroyed.h>
-
-namespace WebCore {
-
-SVGLangSpace::SVGLangSpace(SVGElement* contextElement)
-    : m_contextElement(*contextElement)
-{
-}
-
-const AtomString& SVGLangSpace::xmlspace() const
-{
-    if (!m_space) {
-        static NeverDestroyed<const AtomString> defaultString("default", AtomString::ConstructFromLiteral);
-        return defaultString;
-    }
-    return m_space;
-}
-    
-bool SVGLangSpace::isKnownAttribute(const QualifiedName& attributeName)
-{
-    return attributeName.matches(XMLNames::langAttr) || attributeName.matches(XMLNames::spaceAttr);
-}
-
-void SVGLangSpace::parseAttribute(const QualifiedName& name, const AtomString& value)
-{
-    if (name.matches(XMLNames::langAttr))
-        setXmllang(value);
-    if (name.matches(XMLNames::spaceAttr))
-        setXmlspace(value);
-}
-
-void SVGLangSpace::svgAttributeChanged(const QualifiedName& attributeName)
-{
-    if (!isKnownAttribute(attributeName))
-        return;
-
-    auto* renderer = m_contextElement.renderer();
-    if (!is<RenderSVGShape>(renderer))
-        return;
-
-    ASSERT(is<SVGGeometryElement>(m_contextElement));
-    SVGElement::InstanceInvalidationGuard guard(m_contextElement);
-    RenderSVGResource::markForLayoutAndParentResourceInvalidation(*renderer);
-}
-
-}

Deleted: trunk/Source/WebCore/svg/SVGLangSpace.h (251498 => 251499)


--- trunk/Source/WebCore/svg/SVGLangSpace.h	2019-10-23 20:59:52 UTC (rev 251498)
+++ trunk/Source/WebCore/svg/SVGLangSpace.h	2019-10-23 21:22:40 UTC (rev 251499)
@@ -1,54 +0,0 @@
-/*
- * Copyright (C) 2004, 2005, 2007, 2008 Nikolas Zimmermann <zimmerm...@kde.org>
- * Copyright (C) 2004, 2005, 2006 Rob Buis <b...@kde.org>
- * Copyright (C) 2018-2019 Apple Inc. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#pragma once
-
-#include "QualifiedName.h"
-#include <wtf/HashSet.h>
-
-namespace WebCore {
-
-class SVGElement;
-
-class SVGLangSpace {
-public:
-    const AtomString& xmllang() const { return m_lang; }
-    void setXmllang(const AtomString& xmlLang) { m_lang = xmlLang; }
-
-    const AtomString& xmlspace() const;
-    void setXmlspace(const AtomString& xmlSpace) { m_space = xmlSpace; }
-
-    void parseAttribute(const QualifiedName&, const AtomString&);
-
-    void svgAttributeChanged(const QualifiedName&);
-
-    static bool isKnownAttribute(const QualifiedName&);
-
-protected:
-    SVGLangSpace(SVGElement* contextElement);
-
-private:
-    SVGElement& m_contextElement;
-    AtomString m_lang;
-    AtomString m_space;
-};
-
-} // namespace WebCore

Modified: trunk/Source/WebCore/svg/SVGUseElement.cpp (251498 => 251499)


--- trunk/Source/WebCore/svg/SVGUseElement.cpp	2019-10-23 20:59:52 UTC (rev 251498)
+++ trunk/Source/WebCore/svg/SVGUseElement.cpp	2019-10-23 21:22:40 UTC (rev 251499)
@@ -174,9 +174,6 @@
         return;
     }
 
-    if (SVGLangSpace::isKnownAttribute(attrName))
-        invalidateShadowTree();
-
     SVGGraphicsElement::svgAttributeChanged(attrName);
 }
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to