Commit 60885077 authored by jpfau@apple.com's avatar jpfau@apple.com

libxml2 fragment parser loses prefix namespaces

https://bugs.webkit.org/show_bug.cgi?id=66423

Source/WebCore:

This makes the loop over the elements outside of the context actually update the element it's processing.

Reviewed by Darin Adler.

Test: fast/parser/innerhtml-with-prefixed-elements.xhtml

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

LayoutTests:

Added a test to ensure that elements inserted when the prefix is already declared are inserted properly.

Reviewed by Darin Adler.

* fast/parser/innerhtml-with-prefixed-elements.xhtml: Added.
* platform/chromium/test_expectations.txt:
* platform/mac/fast/parser/innerhtml-with-prefixed-elements-expected.png: Added.
* platform/mac/fast/parser/innerhtml-with-prefixed-elements-expected.txt: Added.


git-svn-id: svn://svn.chromium.org/blink/trunk@93452 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 74bbbd49
2011-08-19 Jeffrey Pfau <jpfau@apple.com>
libxml2 fragment parser loses prefix namespaces
https://bugs.webkit.org/show_bug.cgi?id=66423
Added a test to ensure that elements inserted when the prefix is already declared are inserted properly.
Reviewed by Darin Adler.
* fast/parser/innerhtml-with-prefixed-elements.xhtml: Added.
* platform/chromium/test_expectations.txt:
* platform/mac/fast/parser/innerhtml-with-prefixed-elements-expected.png: Added.
* platform/mac/fast/parser/innerhtml-with-prefixed-elements-expected.txt: Added.
2011-08-19 Tony Chang <tony@chromium.org> 2011-08-19 Tony Chang <tony@chromium.org>
[chromium] Cleanup some old plugin tests. Rebase plugin-javascript-access.html [chromium] Cleanup some old plugin tests. Rebase plugin-javascript-access.html
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Namespace chaining</title>
</head>
<body>
<div id="d" xmlns:math="http://www.w3.org/1998/Math/MathML">
TEST FAILED
</div>
<script type="text/javascript"><![CDATA[
var div = document.getElementById("d");
div.innerHTML = "<math:math><math:msup><math:mtext>a</math:mtext><math:mtext>b</math:mtext></math:msup></math:math>";
]]></script>
</body>
</html>
\ No newline at end of file
...@@ -3568,6 +3568,9 @@ BUGCR89474 : fast/js/call-base-resolution.html = PASS TEXT ...@@ -3568,6 +3568,9 @@ BUGCR89474 : fast/js/call-base-resolution.html = PASS TEXT
BUGWK64675 LINUX WIN : svg/custom/zero-path-square-cap-rendering.svg = IMAGE+TEXT BUGWK64675 LINUX WIN : svg/custom/zero-path-square-cap-rendering.svg = IMAGE+TEXT
// New test added for bug 66423, needs rebaselining
BUGWK66423 : fast/parser/innerhtml-with-prefixed-elements.xhtml = FAIL
// WebKit roll 80564:80631: rendering on Leopard is shifted to the top right // WebKit roll 80564:80631: rendering on Leopard is shifted to the top right
// started at some point at or after WK r80582 (Dave Hyatt's vertical text change - a very likely candidate) // started at some point at or after WK r80582 (Dave Hyatt's vertical text change - a very likely candidate)
//BUGCR75424 LEOPARD : fast/writing-mode/broken-ideograph-small-caps.html = IMAGE //BUGCR75424 LEOPARD : fast/writing-mode/broken-ideograph-small-caps.html = IMAGE
......
layer at (0,0) size 800x600
RenderView at (0,0) size 800x600
layer at (0,0) size 800x36
RenderBlock {html} at (0,0) size 800x36
RenderBody {body} at (8,8) size 784x20
RenderBlock {div} at (0,0) size 784x20
RenderBlock {math:math} at (0,1) size 16x19
RenderBlock {math:msup} at (1,0) size 14x19
RenderBlock {math:msup} at (0,3) size 8x16
RenderInline {math:mtext} at (0,0) size 8x24
RenderText {#text} at (0,-4) size 8x24
text run at (0,-4) width 8: "a"
RenderInline {math:mtext} at (0,0) size 6x18
RenderText {#text} at (8,-3) size 6x18
text run at (8,-3) width 6: "b"
2011-08-19 Jeffrey Pfau <jpfau@apple.com>
libxml2 fragment parser loses prefix namespaces
https://bugs.webkit.org/show_bug.cgi?id=66423
This makes the loop over the elements outside of the context actually update the element it's processing.
Reviewed by Darin Adler.
Test: fast/parser/innerhtml-with-prefixed-elements.xhtml
* xml/parser/XMLDocumentParserLibxml2.cpp:
(WebCore::XMLDocumentParser::XMLDocumentParser):
2011-08-19 Beth Dakin <bdakin@apple.com> 2011-08-19 Beth Dakin <bdakin@apple.com>
https://bugs.webkit.org/show_bug.cgi?id=66590 https://bugs.webkit.org/show_bug.cgi?id=66590
...@@ -610,7 +610,8 @@ XMLDocumentParser::XMLDocumentParser(DocumentFragment* fragment, Element* parent ...@@ -610,7 +610,8 @@ XMLDocumentParser::XMLDocumentParser(DocumentFragment* fragment, Element* parent
if (elemStack.isEmpty()) if (elemStack.isEmpty())
return; return;
for (Element* element = elemStack.last(); !elemStack.isEmpty(); elemStack.removeLast()) { for (; !elemStack.isEmpty(); elemStack.removeLast()) {
Element* element = elemStack.last();
if (NamedNodeMap* attrs = element->attributes()) { if (NamedNodeMap* attrs = element->attributes()) {
for (unsigned i = 0; i < attrs->length(); i++) { for (unsigned i = 0; i < attrs->length(); i++) {
Attribute* attr = attrs->attributeItem(i); Attribute* attr = attrs->attributeItem(i);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment