Changeset 142555 in webkit


Ignore:
Timestamp:
Feb 11, 2013 5:07:33 PM (11 years ago)
Author:
abarth@webkit.org
Message:

Load event fires too early with threaded HTML parser (take 2)
https://bugs.webkit.org/show_bug.cgi?id=109485

Reviewed by Eric Seidel.

Source/WebCore:

This patch restores the code that was removed in
http://trac.webkit.org/changeset/142492 and adds code to
DocumentLoader.cpp to avoid the regression.

  • dom/Document.cpp:

(WebCore::Document::hasActiveParser):
(WebCore::Document::decrementActiveParserCount):

  • loader/DocumentLoader.cpp:

(WebCore::DocumentLoader::isLoadingInAPISense):

LayoutTests:

This patch also fixes a bug whereby removing an iframe during the load
event would trigger DumpRenderTree to dump the test in the middle of
the load event. We now wait until the load event is over.

  • compositing/iframes/remove-iframe-crash-expected.txt:
  • fast/frames/iframe-access-screen-of-deleted-expected.txt:
  • fast/frames/remove-frame-during-load-event-expected.txt: Added.
  • fast/frames/remove-frame-during-load-event.html: Added.
  • http/tests/misc/xslt-bad-import-expected.txt:
Location:
trunk
Files:
2 added
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r142549 r142555  
     12013-02-11  Adam Barth  <abarth@webkit.org>
     2
     3        Load event fires too early with threaded HTML parser (take 2)
     4        https://bugs.webkit.org/show_bug.cgi?id=109485
     5
     6        Reviewed by Eric Seidel.
     7
     8        This patch also fixes a bug whereby removing an iframe during the load
     9        event would trigger DumpRenderTree to dump the test in the middle of
     10        the load event. We now wait until the load event is over.
     11
     12        * compositing/iframes/remove-iframe-crash-expected.txt:
     13        * fast/frames/iframe-access-screen-of-deleted-expected.txt:
     14        * fast/frames/remove-frame-during-load-event-expected.txt: Added.
     15        * fast/frames/remove-frame-during-load-event.html: Added.
     16        * http/tests/misc/xslt-bad-import-expected.txt:
     17
    1182013-02-11  Nico Weber  <thakis@chromium.org>
    219
  • trunk/LayoutTests/compositing/iframes/remove-iframe-crash-expected.txt

    r61205 r142555  
    1 
    21This test should not crash.
  • trunk/LayoutTests/fast/frames/iframe-access-screen-of-deleted-expected.txt

    r55748 r142555  
    1 
    21This tests that accessing screen attributes doesn't crash even if containing frame is removed from the parent.
  • trunk/LayoutTests/http/tests/misc/xslt-bad-import-expected.txt

    r99972 r142555  
    1  
    21This test passes if it does not crash.
  • trunk/LayoutTests/platform/chromium-win/compositing/iframes/remove-iframe-crash-expected.txt

    r100337 r142555  
    1 
    21This test should not crash.
  • trunk/Source/WebCore/ChangeLog

    r142552 r142555  
     12013-02-11  Adam Barth  <abarth@webkit.org>
     2
     3        Load event fires too early with threaded HTML parser (take 2)
     4        https://bugs.webkit.org/show_bug.cgi?id=109485
     5
     6        Reviewed by Eric Seidel.
     7
     8        This patch restores the code that was removed in
     9        http://trac.webkit.org/changeset/142492 and adds code to
     10        DocumentLoader.cpp to avoid the regression.
     11
     12        * dom/Document.cpp:
     13        (WebCore::Document::hasActiveParser):
     14        (WebCore::Document::decrementActiveParserCount):
     15        * loader/DocumentLoader.cpp:
     16        (WebCore::DocumentLoader::isLoadingInAPISense):
     17
    1182013-02-11  Eric Seidel  <eric@webkit.org>
    219
  • trunk/Source/WebCore/dom/Document.cpp

    r142492 r142555  
    57725772bool Document::hasActiveParser()
    57735773{
    5774     return m_parser && m_parser->processingData();
     5774    return m_activeParserCount || (m_parser && m_parser->processingData());
    57755775}
    57765776
     
    57785778{
    57795779    --m_activeParserCount;
     5780    if (!frame())
     5781        return;
     5782    frame()->loader()->checkLoadComplete();
    57805783}
    57815784
  • trunk/Source/WebCore/loader/DocumentLoader.cpp

    r142378 r142555  
    479479        if (m_cachedResourceLoader->requestCount())
    480480            return true;
     481        if (doc->processingLoadEvent())
     482            return true;
    481483        if (doc->hasActiveParser())
    482484            return true;
Note: See TracChangeset for help on using the changeset viewer.