Changeset 95169 in webkit


Ignore:
Timestamp:
Sep 14, 2011 10:26:45 PM (13 years ago)
Author:
commit-queue@webkit.org
Message:

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.

Patch by Jeffrey Pfau <jeffrey@endrift.com> on 2011-09-14
Reviewed by Eric Seidel.

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.

Patch by Jeffrey Pfau <jeffrey@endrift.com> on 2011-09-14
Reviewed by Eric Seidel.

  • fast/parser/innerhtml-with-prefixed-elements.xhtml: Added.
  • platform/mac/fast/parser/innerhtml-with-prefixed-elements-expected.png: Added.
  • platform/mac/fast/parser/innerhtml-with-prefixed-elements-expected.txt: Added.
Location:
trunk
Files:
3 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r95164 r95169  
     12011-09-14  Jeffrey Pfau  <jeffrey@endrift.com>
     2
     3        libxml2 fragment parser loses prefix namespaces
     4        https://bugs.webkit.org/show_bug.cgi?id=66423
     5
     6        Added a test to ensure that elements inserted when the prefix is already declared are inserted properly.
     7
     8        Reviewed by Eric Seidel.
     9
     10        * fast/parser/innerhtml-with-prefixed-elements.xhtml: Added.
     11        * platform/mac/fast/parser/innerhtml-with-prefixed-elements-expected.png: Added.
     12        * platform/mac/fast/parser/innerhtml-with-prefixed-elements-expected.txt: Added.
     13
    1142011-09-14  Keishi Hattori  <keishi@webkit.org>
    215
  • trunk/Source/WebCore/ChangeLog

    r95166 r95169  
     12011-09-14  Jeffrey Pfau  <jeffrey@endrift.com>
     2
     3        libxml2 fragment parser loses prefix namespaces
     4        https://bugs.webkit.org/show_bug.cgi?id=66423
     5
     6        This makes the loop over the elements outside of the context actually update the element it's processing.
     7
     8        Reviewed by Eric Seidel.
     9
     10        Test: fast/parser/innerhtml-with-prefixed-elements.xhtml
     11
     12        * xml/parser/XMLDocumentParserLibxml2.cpp:
     13        (WebCore::XMLDocumentParser::XMLDocumentParser):
     14
    1152011-09-14  Nate Chapin  <japhet@chromium.org>
    216
  • trunk/Source/WebCore/xml/parser/XMLDocumentParserLibxml2.cpp

    r94044 r95169  
    611611        return;
    612612
    613     for (Element* element = elemStack.last(); !elemStack.isEmpty(); elemStack.removeLast()) {
     613    for (; !elemStack.isEmpty(); elemStack.removeLast()) {
     614        Element* element = elemStack.last();
    614615        if (NamedNodeMap* attrs = element->attributes()) {
    615616            for (unsigned i = 0; i < attrs->length(); i++) {
Note: See TracChangeset for help on using the changeset viewer.