Changeset 86364 in webkit


Ignore:
Timestamp:
May 12, 2011 11:29:01 AM (13 years ago)
Author:
abarth@webkit.org
Message:

2011-05-12 Adam Barth <abarth@webkit.org>

Reviewed by Darin Adler.

REGRESSION (r65868): createContextualFragment does not work with <style>
https://bugs.webkit.org/show_bug.cgi?id=60155

These test results match Firefox.

  • fast/parser/style-in-create-contextual-fragment-expected.txt: Added.
  • fast/parser/style-in-create-contextual-fragment-head-expected.txt: Added.
  • fast/parser/style-in-create-contextual-fragment-head.html: Added.
  • fast/parser/style-in-create-contextual-fragment.html: Added.

2011-05-12 Adam Barth <abarth@webkit.org>

Reviewed by Darin Adler.

REGRESSION (r65868): createContextualFragment does not work with <style>
https://bugs.webkit.org/show_bug.cgi?id=60155

createContextualFragment doesn't have a spec, so it's hard to tell what
we're supposed to do exactly. This patch appears to make our behavior
more like Firefox and should fix the compat issue with this site.

Tests: fast/parser/style-in-create-contextual-fragment-head.html

fast/parser/style-in-create-contextual-fragment.html

  • dom/Element.cpp: (WebCore::Element::deprecatedCreateContextualFragment):
Location:
trunk
Files:
4 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r86363 r86364  
     12011-05-12  Adam Barth  <abarth@webkit.org>
     2
     3        Reviewed by Darin Adler.
     4
     5        REGRESSION (r65868): createContextualFragment does not work with <style>
     6        https://bugs.webkit.org/show_bug.cgi?id=60155
     7
     8        These test results match Firefox.
     9
     10        * fast/parser/style-in-create-contextual-fragment-expected.txt: Added.
     11        * fast/parser/style-in-create-contextual-fragment-head-expected.txt: Added.
     12        * fast/parser/style-in-create-contextual-fragment-head.html: Added.
     13        * fast/parser/style-in-create-contextual-fragment.html: Added.
     14
    1152011-05-12  David Grogan  <dgrogan@chromium.org>
    216
  • trunk/Source/WebCore/ChangeLog

    r86360 r86364  
     12011-05-12  Adam Barth  <abarth@webkit.org>
     2
     3        Reviewed by Darin Adler.
     4
     5        REGRESSION (r65868): createContextualFragment does not work with <style>
     6        https://bugs.webkit.org/show_bug.cgi?id=60155
     7
     8        createContextualFragment doesn't have a spec, so it's hard to tell what
     9        we're supposed to do exactly.  This patch appears to make our behavior
     10        more like Firefox and should fix the compat issue with this site.
     11
     12        Tests: fast/parser/style-in-create-contextual-fragment-head.html
     13               fast/parser/style-in-create-contextual-fragment.html
     14
     15        * dom/Element.cpp:
     16        (WebCore::Element::deprecatedCreateContextualFragment):
     17
    1182011-05-12  Ryosuke Niwa  <rniwa@webkit.org>
    219
  • trunk/Source/WebCore/dom/Element.cpp

    r85751 r86364  
    155155    for (RefPtr<Node> node = fragment->firstChild(); node; node = nextNode) {
    156156        nextNode = node->nextSibling();
    157         if (node->hasTagName(htmlTag) || node->hasTagName(bodyTag)) {
     157        if (node->hasTagName(htmlTag) || node->hasTagName(headTag) || node->hasTagName(bodyTag)) {
    158158            HTMLElement* element = toHTMLElement(node.get());
    159159            Node* firstChild = element->firstChild();
     
    170170            fragment->removeChild(element, ignoredExceptionCode);
    171171            ASSERT(!ignoredExceptionCode);
    172         } else if (node->hasTagName(headTag)) {
    173             fragment->removeChild(node.get(), ignoredExceptionCode);
    174             ASSERT(!ignoredExceptionCode);
    175172        }
    176173    }
    177174    return fragment.release();
    178175}
    179    
     176
    180177PassRefPtr<Node> Element::cloneNode(bool deep)
    181178{
Note: See TracChangeset for help on using the changeset viewer.