Unreviewed, rolling out r161629.
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 10 Jan 2014 18:59:28 +0000 (18:59 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 10 Jan 2014 18:59:28 +0000 (18:59 +0000)
http://trac.webkit.org/changeset/161629
https://bugs.webkit.org/show_bug.cgi?id=126762

Fails svg/custom/conditional-processing-2.html (Requested by
ap on #webkit).

Source/WebCore:

* svg/SVGSwitchElement.cpp:
(WebCore::SVGSwitchElement::childShouldCreateRenderer):
* svg/SVGTests.cpp:
(WebCore::SVGTests::hasExtension):
(WebCore::SVGTests::isValid):

LayoutTests:

* svg/custom/conditional-processing-1-expected.txt: Removed.
* svg/custom/conditional-processing-1.svg: Removed.
* svg/custom/conditional-processing-2-expected.txt: Removed.
* svg/custom/conditional-processing-2.html: Removed.
* svg/dom/SVGTests-expected.txt: Removed.
* svg/dom/SVGTests.html: Removed.
* svg/dom/script-tests/SVGTests.js: Removed.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@161653 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/svg/custom/conditional-processing-1-expected.txt [deleted file]
LayoutTests/svg/custom/conditional-processing-1.svg [deleted file]
LayoutTests/svg/custom/conditional-processing-2-expected.txt [deleted file]
LayoutTests/svg/custom/conditional-processing-2.html [deleted file]
LayoutTests/svg/dom/SVGTests-expected.txt [deleted file]
LayoutTests/svg/dom/SVGTests.html [deleted file]
LayoutTests/svg/dom/script-tests/SVGTests.js [deleted file]
Source/WebCore/ChangeLog
Source/WebCore/svg/SVGSwitchElement.cpp
Source/WebCore/svg/SVGTests.cpp

index 571eb0b..46cc759 100644 (file)
@@ -1,3 +1,20 @@
+2014-01-10  Commit Queue  <commit-queue@webkit.org>
+
+        Unreviewed, rolling out r161629.
+        http://trac.webkit.org/changeset/161629
+        https://bugs.webkit.org/show_bug.cgi?id=126762
+
+        Fails svg/custom/conditional-processing-2.html (Requested by
+        ap on #webkit).
+
+        * svg/custom/conditional-processing-1-expected.txt: Removed.
+        * svg/custom/conditional-processing-1.svg: Removed.
+        * svg/custom/conditional-processing-2-expected.txt: Removed.
+        * svg/custom/conditional-processing-2.html: Removed.
+        * svg/dom/SVGTests-expected.txt: Removed.
+        * svg/dom/SVGTests.html: Removed.
+        * svg/dom/script-tests/SVGTests.js: Removed.
+
 2014-01-10  Brent Fulgham  <bfulgham@apple.com>
 
         Unreviewed test correction after r161605.
diff --git a/LayoutTests/svg/custom/conditional-processing-1-expected.txt b/LayoutTests/svg/custom/conditional-processing-1-expected.txt
deleted file mode 100644 (file)
index 9ff7d15..0000000
+++ /dev/null
@@ -1,6 +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 100x100
-    RenderSVGContainer {switch} at (0,0) size 100x100
-      RenderSVGRect {rect} at (0,0) size 100x100 [fill={[type=SOLID] [color=#008000]}] [x=0.00] [y=0.00] [width=100.00] [height=100.00]
diff --git a/LayoutTests/svg/custom/conditional-processing-1.svg b/LayoutTests/svg/custom/conditional-processing-1.svg
deleted file mode 100644 (file)
index 63fdf6d..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0"?>
-<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%">
-  <switch>
-    <!-- This test passes if a renderer is only created for the first valid SVG child. -->
-    <span xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; width: 100px; height: 100px; background: red"/>
-    <mspace xmlns="http://www.w3.org/1998/Math/MathML" width="100px" height="100px" mathbackground="red"/>
-    <foreignObject requiredExtensions="unknownExtension" height="100" width="100">
-       <span xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; width: 100px; height: 100px; background: red"/>
-    </foreignObject>
-    <rect width="100" height="100" fill="green"/>
-    <rect width="100" height="100" fill="red"/>
-    <rect width="100" height="100" fill="red"/>
-    <rect width="100" height="100" fill="red"/>
-    <rect width="100" height="100" fill="red"/>
-  </switch>
-</svg>
diff --git a/LayoutTests/svg/custom/conditional-processing-2-expected.txt b/LayoutTests/svg/custom/conditional-processing-2-expected.txt
deleted file mode 100644 (file)
index 7bd51b0..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-layer at (0,0) size 800x600
-  RenderView at (0,0) size 800x600
-layer at (0,0) size 800x160
-  RenderBlock {HTML} at (0,0) size 800x160
-    RenderBody {BODY} at (8,16) size 784x136
-      RenderBlock {P} at (0,0) size 784x17
-        RenderText {#text} at (0,0) size 321x17
-          text run at (0,0) width 321: "This test passes if four green squares are displayed:"
-      RenderBlock (anonymous) at (0,33) size 784x103
-        RenderSVGRoot {svg} at (8,49) size 100x100
-          RenderSVGContainer {switch} at (8,49) size 100x100
-            RenderSVGForeignObject {foreignObject} at (0,0) size 100x100
-              RenderBlock {SPAN} at (0,0) size 100x100 [bgcolor=#008000]
-              RenderText {#text} at (0,0) size 0x0
-        RenderText {#text} at (100,86) size 4x17
-          text run at (100,86) width 4: " "
-        RenderText {#text} at (0,0) size 0x0
-        RenderSVGRoot {svg} at (112,49) size 100x100
-          RenderSVGContainer {switch} at (112,49) size 100x100
-            RenderSVGForeignObject {foreignObject} at (0,0) size 100x100
-              RenderMathMLMath {math} at (0,0) size 102x100 [padding: 0 1 0 1]
-                RenderMathMLSpace {mspace} at (1,0) size 100x100 [bgcolor=#008000]
-              RenderText {#text} at (0,0) size 0x0
-        RenderText {#text} at (204,86) size 4x17
-          text run at (204,86) width 4: " "
-        RenderText {#text} at (0,0) size 0x0
-        RenderSVGRoot {svg} at (216,49) size 100x100
-          RenderSVGContainer {switch} at (216,49) size 100x100
-            RenderSVGForeignObject {foreignObject} at (0,0) size 100x100
-              RenderBlock {SPAN} at (0,0) size 100x100
-                RenderMathMLMath {math} at (0,0) size 102x100 [padding: 0 1 0 1]
-                  RenderMathMLSpace {mspace} at (1,0) size 100x100 [bgcolor=#008000]
-                RenderText {#text} at (0,0) size 0x0
-              RenderText {#text} at (0,0) size 0x0
-        RenderText {#text} at (308,86) size 4x17
-          text run at (308,86) width 4: " "
-        RenderText {#text} at (0,0) size 0x0
-        RenderSVGRoot {svg} at (320,49) size 100x100
-          RenderSVGContainer {switch} at (320,49) size 100x100
-            RenderSVGRect {rect} at (320,49) size 100x100 [fill={[type=SOLID] [color=#008000]}] [x=0.00] [y=0.00] [width=100.00] [height=100.00]
-        RenderText {#text} at (0,0) size 0x0
diff --git a/LayoutTests/svg/custom/conditional-processing-2.html b/LayoutTests/svg/custom/conditional-processing-2.html
deleted file mode 100644 (file)
index 7021299..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-<!doctype html>
-<html>
-  <head>
-    <title>requiredExtensions</title>
-    <meta charset="utf-8"/>
-  </head>
-  <body>
-
-    <!-- The following elements contain foreignObject with a list of required extensions. We should only display it when the list contains MathML or XHTML namespaces. -->
-
-    <p>This test passes if four green squares are displayed:</p>
-
-    <!-- This tests a required XHTML extension. -->
-    <svg width="100px" height="100px">
-      <switch>
-        <foreignObject requiredExtensions="http://www.w3.org/1999/xhtml" height="100" width="100">
-          <span style="display: inline-block; width: 100px; height: 100px; background: green"></span>
-        </foreignObject>
-        <rect width="100" height="100" fill="red"/>
-      </switch>
-    </svg>
-
-    <!-- This tests a required MathML extension. -->
-    <svg width="100px" height="100px">
-      <switch>
-        <foreignObject requiredExtensions="http://www.w3.org/1998/Math/MathML" height="100" width="100">
-          <math>
-            <mspace width="100px" height="100px" mathbackground="green"/>
-          </math>
-        </foreignObject>
-        <rect width="100" height="100" fill="red"/>
-      </switch>
-    </svg>
-
-    <!-- This tests required XHTML and MathML extensions. -->
-    <svg width="100px" height="100px">
-      <switch>
-        <foreignObject requiredExtensions="http://www.w3.org/1998/Math/MathML http://www.w3.org/1999/xhtml" height="100" width="100">
-          <span style="display: inline-block; width: 100px; height: 100px;">
-            <math>
-              <mspace width="100px" height="100px" mathbackground="green"/>
-            </math>
-          </span>
-        </foreignObject>
-        <rect width="100" height="100" fill="red"/>
-      </switch>
-    </svg>
-
-    <!-- This tests an unknown required extension. -->
-    <svg width="100px" height="100px">
-      <switch>
-        <foreignObject requiredExtensions="http://www.w3.org/1998/Math/MathML http://www.w3.org/1999/xhtml unknownExtension" height="100" width="100">
-          <span style="display: inline-block; width: 100px; height: 100px; background: red"></span>
-        </foreignObject>
-        <rect width="100" height="100" fill="green"/>
-      </switch>
-    </svg>
-
-  </body>
-</html>
diff --git a/LayoutTests/svg/dom/SVGTests-expected.txt b/LayoutTests/svg/dom/SVGTests-expected.txt
deleted file mode 100644 (file)
index 8fd148c..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-This test checks the SVGTests API
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-
-Check the requiredFeatures, requiredExtensions and systemLanguage attributes
-PASS foreignObject.requiredFeatures instanceof SVGStringList is true
-PASS foreignObject.requiredExtensions instanceof SVGStringList is true
-PASS foreignObject.systemLanguage instanceof SVGStringList is true
-
-Check the hasExtension function
-PASS foreignObject.hasExtension('http://www.w3.org/1998/Math/MathML') is true
-PASS foreignObject.hasExtension('http://www.w3.org/1999/xhtml') is true
-PASS foreignObject.hasExtension('') is false
-PASS foreignObject.hasExtension('unknownExtension') is false
-PASS foreignObject.hasExtension('HTTP://WWW.W3.ORG/1999/XHTML') is false
-PASS foreignObject.hasExtension('http://www.w3.org/1998/Math/MathML http://www.w3.org/1999/xhtml') is false
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
diff --git a/LayoutTests/svg/dom/SVGTests.html b/LayoutTests/svg/dom/SVGTests.html
deleted file mode 100644 (file)
index 0bcfb99..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
-<head>
-<script src="../../resources/js-test-pre.js"></script>
-</head>
-<body>
-<p id="description"></p>
-<div id="console"></div>
-<script src="script-tests/SVGTests.js"></script>
-<script src="../../resources/js-test-post.js"></script>
-</body>
-</html>
diff --git a/LayoutTests/svg/dom/script-tests/SVGTests.js b/LayoutTests/svg/dom/script-tests/SVGTests.js
deleted file mode 100644 (file)
index f2c893b..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-description("This test checks the SVGTests API");
-
-var svgElement = document.createElementNS("http://www.w3.org/2000/svg", "svg");
-var foreignObject = document.createElementNS("http://www.w3.org/2000/svg", "foreignObject");
-
-debug("");
-debug("Check the requiredFeatures, requiredExtensions and systemLanguage attributes");
-shouldBeTrue("foreignObject.requiredFeatures instanceof SVGStringList");
-shouldBeTrue("foreignObject.requiredExtensions instanceof SVGStringList");
-shouldBeTrue("foreignObject.systemLanguage instanceof SVGStringList");
-
-debug("");
-debug("Check the hasExtension function");
-shouldBeTrue("foreignObject.hasExtension('http://www.w3.org/1998/Math/MathML')");
-shouldBeTrue("foreignObject.hasExtension('http://www.w3.org/1999/xhtml')");
-shouldBeFalse("foreignObject.hasExtension('')");
-shouldBeFalse("foreignObject.hasExtension('unknownExtension')");
-shouldBeFalse("foreignObject.hasExtension('HTTP://WWW.W3.ORG/1999/XHTML')");
-shouldBeFalse("foreignObject.hasExtension('http://www.w3.org/1998/Math/MathML http://www.w3.org/1999/xhtml')");
-
-successfullyParsed = true;
index ae4032d..1965e3f 100644 (file)
@@ -1,3 +1,18 @@
+2014-01-10  Commit Queue  <commit-queue@webkit.org>
+
+        Unreviewed, rolling out r161629.
+        http://trac.webkit.org/changeset/161629
+        https://bugs.webkit.org/show_bug.cgi?id=126762
+
+        Fails svg/custom/conditional-processing-2.html (Requested by
+        ap on #webkit).
+
+        * svg/SVGSwitchElement.cpp:
+        (WebCore::SVGSwitchElement::childShouldCreateRenderer):
+        * svg/SVGTests.cpp:
+        (WebCore::SVGTests::hasExtension):
+        (WebCore::SVGTests::isValid):
+
 2014-01-10  ChangSeok Oh  <changseok.oh@collabora.com>
 
         Unreviewed build fix since r161589.
index 0276bcd..9d76b9f 100644 (file)
@@ -51,8 +51,8 @@ PassRefPtr<SVGSwitchElement> SVGSwitchElement::create(const QualifiedName& tagNa
 
 bool SVGSwitchElement::childShouldCreateRenderer(const Node& child) const
 {
-    // We create a renderer for the first valid SVG element child.
-    // FIXME: The renderer must be updated after dynamic change of the requiredFeatures, requiredExtensions and systemLanguage attributes (http://wkb.ug/74749).
+    // FIXME: This function does not do what the comment below implies it does.
+    // It will create a renderer for any valid SVG element children, not just the first one.
     for (auto& element : childrenOfType<SVGElement>(*this)) {
         if (!element.isValid())
             continue;
index 06a3824..6ac8f7b 100644 (file)
 
 #include "Attribute.h"
 #include "DOMImplementation.h"
-#include "HTMLNames.h"
 #include "Language.h"
-#if ENABLE(MATHML)
-#include "MathMLNames.h"
-#endif
 #include "SVGElement.h"
 #include "SVGNames.h"
 #include "SVGStringList.h"
@@ -99,14 +95,10 @@ SVGAttributeToPropertyMap& SVGTests::attributeToPropertyMap()
     return map;
 }
 
-bool SVGTests::hasExtension(const String& extension) const
+bool SVGTests::hasExtension(const String&) const
 {
-    // We recognize XHTML and MathML, as implemented in Gecko and suggested in the SVG Tiny recommendation (http://www.w3.org/TR/SVG11/struct.html#RequiredExtensionsAttribute).
-#if ENABLE(MATHML)
-    return extension == HTMLNames::xhtmlNamespaceURI || extension == MathMLNames::mathmlNamespaceURI;
-#else
-    return extension == HTMLNames::xhtmlNamespaceURI;
-#endif
+    // FIXME: Implement me!
+    return false;
 }
 
 bool SVGTests::isValid() const
@@ -125,12 +117,8 @@ bool SVGTests::isValid() const
             return false;
     }
 
-    unsigned extensionsSize = m_requiredExtensions.value.size();
-    for (unsigned i = 0; i < extensionsSize; ++i) {
-        String value = m_requiredExtensions.value.at(i);
-        if (!hasExtension(value))
-            return false;
-    }
+    if (!m_requiredExtensions.value.isEmpty())
+        return false;
 
     return true;
 }