Allow MathML in dashboard compatibility mode
authorweinig@apple.com <weinig@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 7 Jan 2015 00:34:17 +0000 (00:34 +0000)
committerweinig@apple.com <weinig@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 7 Jan 2015 00:34:17 +0000 (00:34 +0000)
https://bugs.webkit.org/show_bug.cgi?id=140153

Reviewed by Alexey Proskuryakov.

Source/WebCore:

In what seems like an accident due to the way we used to disable SVG in
dashboard, MathML has been disable in dashboard compatibility mode. There
does not seem to be any reason to keep this accidental quirk.

Test: mathml/mathml-in-dashboard.html

* dom/make_names.pl:
(printFactoryCppFile):

LayoutTests:

* mathml/mathml-in-dashboard-expected.txt: Added.
* mathml/mathml-in-dashboard.html: Added.
* platform/mac/mathml/mathml-in-dashboard-expected.png: Added.

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

LayoutTests/ChangeLog
LayoutTests/mathml/mathml-in-dashboard-expected.txt [new file with mode: 0644]
LayoutTests/mathml/mathml-in-dashboard.html [new file with mode: 0644]
LayoutTests/platform/mac/mathml/mathml-in-dashboard-expected.png [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/dom/make_names.pl

index 225dff6..ac590db 100644 (file)
@@ -1,3 +1,14 @@
+2015-01-06  Sam Weinig  <sam@webkit.org>
+
+        Allow MathML in dashboard compatibility mode
+        https://bugs.webkit.org/show_bug.cgi?id=140153
+
+        Reviewed by Alexey Proskuryakov.
+
+        * mathml/mathml-in-dashboard-expected.txt: Added.
+        * mathml/mathml-in-dashboard.html: Added.
+        * platform/mac/mathml/mathml-in-dashboard-expected.png: Added.
+
 2015-01-06  Simon Fraser  <simon.fraser@apple.com>
 
         Fix this test to wait for the load event before dumping. Expected image
diff --git a/LayoutTests/mathml/mathml-in-dashboard-expected.txt b/LayoutTests/mathml/mathml-in-dashboard-expected.txt
new file mode 100644 (file)
index 0000000..4f437fa
--- /dev/null
@@ -0,0 +1,13 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  RenderBlock {HTML} at (0,0) size 800x600
+    RenderBody {BODY} at (8,8) size 784x584
+      RenderBlock {P} at (0,0) size 784x36
+        RenderText {#text} at (0,0) size 664x36
+          text run at (0,0) width 214: "This tests that MathML works in "
+          text run at (213,0) width 451: "dashboard compatibility mode. The render tree dump should include a"
+          text run at (0,18) width 142: "RenderMathMLMath."
+      RenderBlock (anonymous) at (0,52) size 784x0
+        RenderMathMLMath {math} at (0,0) size 2x0 [padding: 0 1 0 1]
+        RenderText {#text} at (0,0) size 0x0
diff --git a/LayoutTests/mathml/mathml-in-dashboard.html b/LayoutTests/mathml/mathml-in-dashboard.html
new file mode 100644 (file)
index 0000000..f644725
--- /dev/null
@@ -0,0 +1,7 @@
+<script>
+    if (window.testRunner)
+        testRunner.setUseDashboardCompatibilityMode(true);
+
+</script>
+<p>This tests that MathML works in  dashboard compatibility mode. The render tree dump should include a RenderMathMLMath.</p>
+<math></math>
diff --git a/LayoutTests/platform/mac/mathml/mathml-in-dashboard-expected.png b/LayoutTests/platform/mac/mathml/mathml-in-dashboard-expected.png
new file mode 100644 (file)
index 0000000..3b5292d
Binary files /dev/null and b/LayoutTests/platform/mac/mathml/mathml-in-dashboard-expected.png differ
index f911d5c..bd21a4d 100644 (file)
@@ -1,3 +1,19 @@
+2015-01-06  Sam Weinig  <sam@webkit.org>
+
+        Allow MathML in dashboard compatibility mode
+        https://bugs.webkit.org/show_bug.cgi?id=140153
+
+        Reviewed by Alexey Proskuryakov.
+
+        In what seems like an accident due to the way we used to disable SVG in 
+        dashboard, MathML has been disable in dashboard compatibility mode. There
+        does not seem to be any reason to keep this accidental quirk.
+
+        Test: mathml/mathml-in-dashboard.html
+
+        * dom/make_names.pl:
+        (printFactoryCppFile):
+
 2015-01-06  Simon Fraser  <simon.fraser@apple.com>
 
         Some composting reflections tests are broken
index d146df0..f4ed6d0 100755 (executable)
@@ -991,21 +991,6 @@ END
 
 $smartPointerType<$parameters{namespace}Element> $parameters{namespace}ElementFactory::createElement(const QualifiedName& name, Document& document$formElementArgumentForDefinition, bool createdByParser)
 {
-END
-    ;
-
-    if ($parameters{namespace} ne "HTML" and $parameters{namespace} ne "SVG") {
-        print F <<END
-#if ENABLE(DASHBOARD_SUPPORT)
-    Settings* settings = document.settings();
-    if (settings && settings->usesDashboardBackwardCompatibilityMode())
-        return 0;
-#endif
-END
-        ;
-    }
-
-    print F <<END
     static NeverDestroyed<HashMap<AtomicStringImpl*, $parameters{namespace}ConstructorFunction>> functions;
     if (functions.get().isEmpty())
         populate$parameters{namespace}FactoryMap(functions);