Title: [145744] trunk
Revision
145744
Author
[email protected]
Date
2013-03-13 13:24:51 -0700 (Wed, 13 Mar 2013)

Log Message

Source/WebCore: Handle XHTML entities in XHTML Mobile Profile 1.1 and 1.2. We previously only handled them in XHTML Mobile Profile 1.0.
https://bugs.webkit.org/show_bug.cgi?id=112174
RIM PR 309038

Patch by Liam Quinn <[email protected]> on 2013-03-13
Reviewed by Rob Buis.
Internally reviewed by Leo Yang.

Check for the 1.1 and 1.2 doctypes alongside the 1.0 doctype.

Tests: fast/doctypes/xhtml-with-xhtmlmp11-doctype.xhtml
       fast/doctypes/xhtml-with-xhtmlmp12-doctype.xhtml

* xml/parser/XMLDocumentParserLibxml2.cpp:
(WebCore::externalSubsetHandler):
* xml/parser/XMLDocumentParserQt.cpp:
(WebCore::XMLDocumentParser::parseDtd):

LayoutTests: New tests to check that XHTML entities are supported in XHTML Mobile Profile 1.1 and 1.2.
https://bugs.webkit.org/show_bug.cgi?id=112174
RIM PR 309038

Patch by Liam Quinn <[email protected]> on 2013-03-13
Reviewed by Rob Buis.
Internally reviewed by Leo Yang.

* fast/doctypes/xhtml-with-xhtmlmp11-doctype-expected.txt: Added.
* fast/doctypes/xhtml-with-xhtmlmp11-doctype.xhtml: Added.
* fast/doctypes/xhtml-with-xhtmlmp12-doctype-expected.txt: Added.
* fast/doctypes/xhtml-with-xhtmlmp12-doctype.xhtml: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (145743 => 145744)


--- trunk/LayoutTests/ChangeLog	2013-03-13 20:23:27 UTC (rev 145743)
+++ trunk/LayoutTests/ChangeLog	2013-03-13 20:24:51 UTC (rev 145744)
@@ -1,3 +1,17 @@
+2013-03-13  Liam Quinn  <[email protected]>
+
+        New tests to check that XHTML entities are supported in XHTML Mobile Profile 1.1 and 1.2.
+        https://bugs.webkit.org/show_bug.cgi?id=112174
+        RIM PR 309038
+
+        Reviewed by Rob Buis.
+        Internally reviewed by Leo Yang.
+
+        * fast/doctypes/xhtml-with-xhtmlmp11-doctype-expected.txt: Added.
+        * fast/doctypes/xhtml-with-xhtmlmp11-doctype.xhtml: Added.
+        * fast/doctypes/xhtml-with-xhtmlmp12-doctype-expected.txt: Added.
+        * fast/doctypes/xhtml-with-xhtmlmp12-doctype.xhtml: Added.
+
 2013-03-13  Tim Horton  <[email protected]>
 
         Unreviewed, fix a path in TestExpectations.

Added: trunk/LayoutTests/fast/doctypes/xhtml-with-xhtmlmp11-doctype-expected.txt (0 => 145744)


--- trunk/LayoutTests/fast/doctypes/xhtml-with-xhtmlmp11-doctype-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/fast/doctypes/xhtml-with-xhtmlmp11-doctype-expected.txt	2013-03-13 20:24:51 UTC (rev 145744)
@@ -0,0 +1,3 @@
+Test that XHTML entities are recognized in documents with xhtml-mobile11 DTD.
+
+SUCCESS (unless there is clear sign of failure nearby, like a big red error box). 

Added: trunk/LayoutTests/fast/doctypes/xhtml-with-xhtmlmp11-doctype.xhtml (0 => 145744)


--- trunk/LayoutTests/fast/doctypes/xhtml-with-xhtmlmp11-doctype.xhtml	                        (rev 0)
+++ trunk/LayoutTests/fast/doctypes/xhtml-with-xhtmlmp11-doctype.xhtml	2013-03-13 20:24:51 UTC (rev 145744)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.1//EN"
+"http://www.openmobilealliance.org/tech/DTD/xhtml-mobile11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title/>
+</head>
+<body>
+<p>Test that XHTML entities are recognized in documents with xhtml-mobile11 DTD.</p>
+<script>
+if (window.testRunner)
+    testRunner.dumpAsText();
+</script>
+<p style="display:none">FAIL - not treated as XHTML.</p>
+<p>SUCCESS (unless there is clear sign of failure nearby, like a big red error box).&nbsp;</p>
+</body>
+</html>

Added: trunk/LayoutTests/fast/doctypes/xhtml-with-xhtmlmp12-doctype-expected.txt (0 => 145744)


--- trunk/LayoutTests/fast/doctypes/xhtml-with-xhtmlmp12-doctype-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/fast/doctypes/xhtml-with-xhtmlmp12-doctype-expected.txt	2013-03-13 20:24:51 UTC (rev 145744)
@@ -0,0 +1,3 @@
+Test that XHTML entities are recognized in documents with xhtml-mobile12 DTD.
+
+SUCCESS (unless there is clear sign of failure nearby, like a big red error box). 

Added: trunk/LayoutTests/fast/doctypes/xhtml-with-xhtmlmp12-doctype.xhtml (0 => 145744)


--- trunk/LayoutTests/fast/doctypes/xhtml-with-xhtmlmp12-doctype.xhtml	                        (rev 0)
+++ trunk/LayoutTests/fast/doctypes/xhtml-with-xhtmlmp12-doctype.xhtml	2013-03-13 20:24:51 UTC (rev 145744)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.2//EN"
+"http://www.openmobilealliance.org/tech/DTD/xhtml-mobile12.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title/>
+</head>
+<body>
+<p>Test that XHTML entities are recognized in documents with xhtml-mobile12 DTD.</p>
+<script>
+if (window.testRunner)
+    testRunner.dumpAsText();
+</script>
+<p style="display:none">FAIL - not treated as XHTML.</p>
+<p>SUCCESS (unless there is clear sign of failure nearby, like a big red error box).&nbsp;</p>
+</body>
+</html>

Modified: trunk/Source/WebCore/ChangeLog (145743 => 145744)


--- trunk/Source/WebCore/ChangeLog	2013-03-13 20:23:27 UTC (rev 145743)
+++ trunk/Source/WebCore/ChangeLog	2013-03-13 20:24:51 UTC (rev 145744)
@@ -1,3 +1,22 @@
+2013-03-13  Liam Quinn  <[email protected]>
+
+        Handle XHTML entities in XHTML Mobile Profile 1.1 and 1.2. We previously only handled them in XHTML Mobile Profile 1.0.
+        https://bugs.webkit.org/show_bug.cgi?id=112174
+        RIM PR 309038
+
+        Reviewed by Rob Buis.
+        Internally reviewed by Leo Yang.
+
+        Check for the 1.1 and 1.2 doctypes alongside the 1.0 doctype.
+
+        Tests: fast/doctypes/xhtml-with-xhtmlmp11-doctype.xhtml
+               fast/doctypes/xhtml-with-xhtmlmp12-doctype.xhtml
+
+        * xml/parser/XMLDocumentParserLibxml2.cpp:
+        (WebCore::externalSubsetHandler):
+        * xml/parser/XMLDocumentParserQt.cpp:
+        (WebCore::XMLDocumentParser::parseDtd):
+
 2013-03-13  Christophe Dumez  <[email protected]>
 
         [EFL] Better error handling in NetworkStateNotifierEfl

Modified: trunk/Source/WebCore/xml/parser/XMLDocumentParserLibxml2.cpp (145743 => 145744)


--- trunk/Source/WebCore/xml/parser/XMLDocumentParserLibxml2.cpp	2013-03-13 20:23:27 UTC (rev 145743)
+++ trunk/Source/WebCore/xml/parser/XMLDocumentParserLibxml2.cpp	2013-03-13 20:24:51 UTC (rev 145744)
@@ -1291,7 +1291,9 @@
         || (extId == "-//W3C//DTD XHTML Basic 1.0//EN")
         || (extId == "-//W3C//DTD XHTML 1.1 plus MathML 2.0//EN")
         || (extId == "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN")
-        || (extId == "-//WAPFORUM//DTD XHTML Mobile 1.0//EN"))
+        || (extId == "-//WAPFORUM//DTD XHTML Mobile 1.0//EN")
+        || (extId == "-//WAPFORUM//DTD XHTML Mobile 1.1//EN")
+        || (extId == "-//WAPFORUM//DTD XHTML Mobile 1.2//EN"))
         getParser(closure)->setIsXHTMLDocument(true); // controls if we replace entities or not.
 }
 

Modified: trunk/Source/WebCore/xml/parser/XMLDocumentParserQt.cpp (145743 => 145744)


--- trunk/Source/WebCore/xml/parser/XMLDocumentParserQt.cpp	2013-03-13 20:23:27 UTC (rev 145743)
+++ trunk/Source/WebCore/xml/parser/XMLDocumentParserQt.cpp	2013-03-13 20:24:51 UTC (rev 145744)
@@ -640,7 +640,9 @@
         || (publicId == QLatin1String("-//W3C//DTD XHTML Basic 1.0//EN"))
         || (publicId == QLatin1String("-//W3C//DTD XHTML 1.1 plus MathML 2.0//EN"))
         || (publicId == QLatin1String("-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN"))
-        || (publicId == QLatin1String("-//WAPFORUM//DTD XHTML Mobile 1.0//EN"))
+        || (publicId == QLatin1String("-//WAPFORUM//DTD XHTML Mobile 1.0//EN")
+        || (publicId == QLatin1String("-//WAPFORUM//DTD XHTML Mobile 1.1//EN")
+        || (publicId == QLatin1String("-//WAPFORUM//DTD XHTML Mobile 1.2//EN"))
        )
         setIsXHTMLDocument(true); // controls if we replace entities or not.
     if (!m_parsingFragment)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to