Changeset 34721 in webkit


Ignore:
Timestamp:
Jun 21, 2008 2:42:09 PM (16 years ago)
Author:
weinig@apple.com
Message:

WebCore:

2008-06-21 Sam Weinig <sam@webkit.org>

Reviewed by Dan Bernstein.

Fix for https://bugs.webkit.org/show_bug.cgi?id=19647
REGRESSION: Problem with extjs (insertAdjacentHTML)

Test: fast/dynamic/insertAdjacentHTML-allowed-parents.html

  • html/HTMLElement.cpp: (WebCore::HTMLElement::insertAdjacentHTML): Don't use innerHTML logic for creating the DocumentFragment from the html string.

LayoutTests:

2008-06-21 Sam Weinig <sam@webkit.org>

Reviewed by Dan Bernstein.

Test for https://bugs.webkit.org/show_bug.cgi?id=19647
REGRESSION: Problem with extjs (insertAdjacentHTML)

  • fast/dynamic/insertAdjacentHTML-allowed-parents-expected.txt: Added.
  • fast/dynamic/insertAdjacentHTML-allowed-parents.html: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r34719 r34721  
     12008-06-21  Sam Weinig  <sam@webkit.org>
     2
     3        Reviewed by Dan Bernstein.
     4
     5        Test for https://bugs.webkit.org/show_bug.cgi?id=19647
     6        REGRESSION: Problem with extjs (insertAdjacentHTML)
     7
     8        * fast/dynamic/insertAdjacentHTML-allowed-parents-expected.txt: Added.
     9        * fast/dynamic/insertAdjacentHTML-allowed-parents.html: Added.
     10
    1112008-06-21  Adam Barth  <abarth@webkit.org>
    212
  • trunk/WebCore/ChangeLog

    r34720 r34721  
     12008-06-21  Sam Weinig  <sam@webkit.org>
     2
     3        Reviewed by Dan Bernstein.
     4
     5        Fix for https://bugs.webkit.org/show_bug.cgi?id=19647
     6        REGRESSION: Problem with extjs (insertAdjacentHTML)
     7
     8        Test: fast/dynamic/insertAdjacentHTML-allowed-parents.html
     9
     10        * html/HTMLElement.cpp:
     11        (WebCore::HTMLElement::insertAdjacentHTML): Don't use innerHTML logic for creating
     12        the DocumentFragment from the html string.
     13
    1142008-06-21  Adam Barth  <abarth@webkit.org>
    215
  • trunk/WebCore/html/HTMLElement.cpp

    r34543 r34721  
    540540void HTMLElement::insertAdjacentHTML(const String& where, const String& html, ExceptionCode& ec)
    541541{
    542     // FIXME: perhaps this should use createFragmentFromMarkup() instead as
    543     // createContextualFragment() has all sorts of odd rules in it.
    544     RefPtr<DocumentFragment> fragment = createContextualFragment(html);
    545     if (!fragment) {
    546         ec = NO_MODIFICATION_ALLOWED_ERR;
    547         return;
     542    RefPtr<DocumentFragment> fragment = document()->createDocumentFragment();
     543    if (document()->isHTMLDocument())
     544         parseHTMLDocumentFragment(html, fragment.get());
     545    else {
     546        if (!parseXMLDocumentFragment(html, fragment.get(), this))
     547            // FIXME: We should propagate a syntax error exception out here.
     548            return;
    548549    }
    549550
Note: See TracChangeset for help on using the changeset viewer.