Changeset 65396 in webkit


Ignore:
Timestamp:
Aug 16, 2010 1:04:17 AM (14 years ago)
Author:
abarth@webkit.org
Message:

2010-08-16 Adam Barth <abarth@webkit.org>

Reviewed by Alexey Proskuryakov.

HTML5 fragment parsing doesn't load iframes
https://bugs.webkit.org/show_bug.cgi?id=44038

Test that iframes created in detached documents actually get loaded
when they're adopted into attached documents (or, rather, when they're
inserted into the DOM).

  • fast/frames/adopt-from-created-document-expected.txt: Added.
  • fast/frames/adopt-from-created-document.html: Added.

2010-08-16 Adam Barth <abarth@webkit.org>

Reviewed by Alexey Proskuryakov.

HTML5 fragment parsing doesn't load iframes
https://bugs.webkit.org/show_bug.cgi?id=44038

Previously, this code assumed that every source iframe was actually
attached to a render tree. It tried to "keep the iframe alive" as it
moved documents. However, if the iframe wasn't attached to begin with,
it was never "alive," so trying to keep a dead iframe alive lead to a
... zombie iframe.

Test: fast/frames/adopt-from-created-document.html

  • dom/Document.cpp: (WebCore::Document::adoptNode):
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r65395 r65396  
     12010-08-16  Adam Barth  <abarth@webkit.org>
     2
     3        Reviewed by Alexey Proskuryakov.
     4
     5        HTML5 fragment parsing doesn't load iframes
     6        https://bugs.webkit.org/show_bug.cgi?id=44038
     7
     8        Test that iframes created in detached documents actually get loaded
     9        when they're adopted into attached documents (or, rather, when they're
     10        inserted into the DOM).
     11
     12        * fast/frames/adopt-from-created-document-expected.txt: Added.
     13        * fast/frames/adopt-from-created-document.html: Added.
     14
    1152010-08-13  MORITA Hajime  <morrita@google.com>
    216
  • trunk/WebCore/ChangeLog

    r65395 r65396  
     12010-08-16  Adam Barth  <abarth@webkit.org>
     2
     3        Reviewed by Alexey Proskuryakov.
     4
     5        HTML5 fragment parsing doesn't load iframes
     6        https://bugs.webkit.org/show_bug.cgi?id=44038
     7
     8        Previously, this code assumed that every source iframe was actually
     9        attached to a render tree.  It tried to "keep the iframe alive" as it
     10        moved documents.  However, if the iframe wasn't attached to begin with,
     11        it was never "alive," so trying to keep a dead iframe alive lead to a
     12        ...  zombie iframe.
     13
     14        Test: fast/frames/adopt-from-created-document.html
     15
     16        * dom/Document.cpp:
     17        (WebCore::Document::adoptNode):
     18
    1192010-08-13  MORITA Hajime  <morrita@google.com>
    220
  • trunk/WebCore/dom/Document.cpp

    r65273 r65396  
    831831    default:
    832832        if (source->hasTagName(iframeTag))
    833             static_cast<HTMLIFrameElement*>(source.get())->setRemainsAliveOnRemovalFromTree(attached());
     833            static_cast<HTMLIFrameElement*>(source.get())->setRemainsAliveOnRemovalFromTree(attached() && source->attached());
    834834
    835835        if (source->parentNode())
Note: See TracChangeset for help on using the changeset viewer.