2011-02-04 Adam Barth <abarth@webkit.org>
authorabarth@webkit.org <abarth@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 5 Feb 2011 00:50:04 +0000 (00:50 +0000)
committerabarth@webkit.org <abarth@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 5 Feb 2011 00:50:04 +0000 (00:50 +0000)
commitc4c33cd8b7afedeb8f6364fc20745bba807adf45
tree58a0f285553c40d9d3a3888d1f54c6dd625aa43a
parent5c71e63dc38d42011aca26d98141494c69cf84a8
2011-02-04  Adam Barth  <abarth@webkit.org>

        Reviewed by Eric Seidel.

        PluginDocuments don't create widgets for plugins on back/forward
        https://bugs.webkit.org/show_bug.cgi?id=53474

        Test that plugin loads when in a plugin document on back-forward.

        * plugins/plugin-document-back-forward-expected.txt: Added.
        * plugins/plugin-document-back-forward.html: Added.
2011-02-04  Adam Barth  <abarth@webkit.org>

        Reviewed by Eric Seidel.

        PluginDocuments don't create widgets for plugins on back/forward
        https://bugs.webkit.org/show_bug.cgi?id=53474

        Long ago, PluginDocument always caused the HTMLEmbedElement to create
        its widget synchronously during a post-layout task.  Recently, however,
        some changes to the HistroyController caused layout on back/forward to
        become slightly more complicated (and added an extra level of recursion
        to layout).  This extra level of recursion triggered the "I've recursed
        too many times" condition in the post-layout task queue, causing the
        FrameView to run the remainder of the tasks asynchronously.
        Unfortunately, that broke PluginDocument because it needs its the
        HTMLEmbedElement's updateWidget task to run synchronously.

        This patch adds a mechanism for "kicking off" the pending post-layout
        tasks synchronously (instead of waiting for the timer to fire).
        PluginDocument then uses that facility to ensure that the
        HTMLEmbedElement's updateWidget task happens.

        Test: plugins/plugin-document-back-forward.html

        * html/PluginDocument.cpp:
        (WebCore::PluginDocumentParser::appendBytes):
        * page/FrameView.cpp:
        (WebCore::FrameView::flushAnyPendingPostLayoutTasks):
        * page/FrameView.h:
2011-02-04  Adam Barth  <abarth@webkit.org>

        Reviewed by Eric Seidel.

        PluginDocuments don't create widgets for plugins on back/forward
        https://bugs.webkit.org/show_bug.cgi?id=53474

        Teach the test plugin how to call alert on load.

        * DumpRenderTree/TestNetscapePlugIn/main.cpp:
        (NPP_New):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@77706 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/plugins/plugin-document-back-forward-expected.txt [new file with mode: 0644]
LayoutTests/plugins/plugin-document-back-forward.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/html/PluginDocument.cpp
Source/WebCore/page/FrameView.cpp
Source/WebCore/page/FrameView.h
Tools/ChangeLog
Tools/DumpRenderTree/TestNetscapePlugIn/main.cpp