Changeset 168843 in webkit


Ignore:
Timestamp:
May 14, 2014 10:24:47 AM (10 years ago)
Author:
jhoneycutt@apple.com
Message:

Revert "Don't dispatch 'beforeload' event inside FrameView::layout()",
commit 84fe8cf6fbe8b5de9a06300ca3ef6d0ffc96948c, and associated
follow-up fixes:

"platform/mac/plugins/testplugin-onnew-onpaint.html failing after

r168668", commit c17be3bf5127baf94310af4b4b9bf5a57d29aaf4

"[Win] Unreviewed build fix after r168668.", commit

4fa470ad12c38ee7d4c114541b6dd321181a8bc9

The original merged patch appears to have caused a regression in
fast/dom/HTMLObjectElement/object-as-frame.html.

<https://bugs.webkit.org/show_bug.cgi?id=132886>

Reviewed by Alexey Proskuryakov.

Source/WebCore:

  • WebCore.exp.in:
  • dom/Document.cpp:

(WebCore::Document::updateLayoutIgnorePendingStylesheets):

  • dom/Document.h:
  • html/HTMLAppletElement.cpp:

(WebCore::HTMLAppletElement::renderWidgetForJSBindings):

  • html/HTMLEmbedElement.cpp:

(WebCore::HTMLEmbedElement::renderWidgetForJSBindings):

  • html/HTMLObjectElement.cpp:

(WebCore::HTMLObjectElement::renderWidgetForJSBindings):

  • page/FrameView.cpp:

(WebCore::FrameView::FrameView):
(WebCore::FrameView::reset):
(WebCore::FrameView::flushAnyPendingPostLayoutTasks):
(WebCore::FrameView::performPostLayoutTasks):
(WebCore::FrameView::updateEmbeddedObjectsTimerFired): Deleted.

  • page/FrameView.h:
  • testing/Internals.cpp:

(WebCore::Internals::updateLayoutIgnorePendingStylesheetsAndRunPostLayoutTasks): Deleted.

  • testing/Internals.h:
  • testing/Internals.idl:

Source/WebKit:

  • WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in:

LayoutTests:

  • compositing/plugins/composited-plugin.html:
  • compositing/plugins/no-backing-store.html:
  • fast/dom/beforeload/flash-before-load.html:
  • fast/events/beforeload-assertion-expected.txt: Removed.
  • fast/events/beforeload-assertion.html: Removed.
  • fast/events/beforeload-iframe-crash-expected.txt: Removed.
  • fast/events/beforeload-iframe-crash.html: Removed.
  • fast/events/beforeload-input-time-crash-expected.txt: Removed.
  • fast/events/beforeload-input-time-crash.html: Removed.
  • http/tests/security/contentSecurityPolicy/1.1/plugintypes-notype-data.html:
  • http/tests/security/contentSecurityPolicy/1.1/plugintypes-nourl-blocked.html:
  • http/tests/security/contentSecurityPolicy/object-src-no-url-allowed.html:
  • http/tests/security/contentSecurityPolicy/object-src-no-url-blocked.html:
  • http/tests/security/contentSecurityPolicy/object-src-none-allowed.html:
  • http/tests/security/contentSecurityPolicy/object-src-none-blocked.html:
  • http/tests/security/contentSecurityPolicy/resources/multiple-iframe-plugin-test.js:

(testImpl.iframe.onload):
(testImpl):

  • http/tests/security/mixedContent/insecure-plugin-in-iframe.html:
  • platform/mac/plugins/supports-carbon-event-model.html:
  • platform/mac/plugins/testplugin-onnew-onpaint.html:
  • plugins/get-user-agent-with-null-npp-from-npp-new.html:
  • plugins/mouse-click-plugin-clears-selection.html:
  • plugins/netscape-plugin-map-data-to-src.html:
  • plugins/no-mime-with-valid-extension.html:
  • plugins/plugin-initiate-popup-window.html:
  • plugins/windowless_plugin_paint_test.html:
  • resources/plugin.js: Removed.
Location:
trunk
Files:
7 deleted
34 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r168842 r168843  
     12014-05-13  Jon Honeycutt  <jhoneycutt@apple.com>
     2
     3        Revert "Don't dispatch 'beforeload' event inside FrameView::layout()",
     4        commit 84fe8cf6fbe8b5de9a06300ca3ef6d0ffc96948c, and associated
     5        follow-up fixes:
     6
     7            "platform/mac/plugins/testplugin-onnew-onpaint.html failing after
     8                r168668", commit c17be3bf5127baf94310af4b4b9bf5a57d29aaf4
     9            "[Win] Unreviewed build fix after r168668.", commit
     10                4fa470ad12c38ee7d4c114541b6dd321181a8bc9
     11
     12        The original merged patch appears to have caused a regression in
     13        fast/dom/HTMLObjectElement/object-as-frame.html.
     14
     15        <https://bugs.webkit.org/show_bug.cgi?id=132886>
     16
     17        Reviewed by Alexey Proskuryakov.
     18
     19        * compositing/plugins/composited-plugin.html:
     20        * compositing/plugins/no-backing-store.html:
     21        * fast/dom/beforeload/flash-before-load.html:
     22        * fast/events/beforeload-assertion-expected.txt: Removed.
     23        * fast/events/beforeload-assertion.html: Removed.
     24        * fast/events/beforeload-iframe-crash-expected.txt: Removed.
     25        * fast/events/beforeload-iframe-crash.html: Removed.
     26        * fast/events/beforeload-input-time-crash-expected.txt: Removed.
     27        * fast/events/beforeload-input-time-crash.html: Removed.
     28        * http/tests/security/contentSecurityPolicy/1.1/plugintypes-notype-data.html:
     29        * http/tests/security/contentSecurityPolicy/1.1/plugintypes-nourl-blocked.html:
     30        * http/tests/security/contentSecurityPolicy/object-src-no-url-allowed.html:
     31        * http/tests/security/contentSecurityPolicy/object-src-no-url-blocked.html:
     32        * http/tests/security/contentSecurityPolicy/object-src-none-allowed.html:
     33        * http/tests/security/contentSecurityPolicy/object-src-none-blocked.html:
     34        * http/tests/security/contentSecurityPolicy/resources/multiple-iframe-plugin-test.js:
     35        (testImpl.iframe.onload):
     36        (testImpl):
     37        * http/tests/security/mixedContent/insecure-plugin-in-iframe.html:
     38        * platform/mac/plugins/supports-carbon-event-model.html:
     39        * platform/mac/plugins/testplugin-onnew-onpaint.html:
     40        * plugins/get-user-agent-with-null-npp-from-npp-new.html:
     41        * plugins/mouse-click-plugin-clears-selection.html:
     42        * plugins/netscape-plugin-map-data-to-src.html:
     43        * plugins/no-mime-with-valid-extension.html:
     44        * plugins/plugin-initiate-popup-window.html:
     45        * plugins/windowless_plugin_paint_test.html:
     46        * resources/plugin.js: Removed.
     47
    1482014-05-14  Kiran  <kiran.guduru@samsung.com>
    249
  • trunk/LayoutTests/compositing/plugins/composited-plugin.html

    r168668 r168843  
    22<html>
    33<body>
    4   <script src="../../resources/plugin.js"></script>
    5   <script>runAfterPluginLoad(null, NotifyDone);</script>
    64  <embed type="application/x-webkit-test-netscape" drawingmodel="coreanimation">
    75</body>
  • trunk/LayoutTests/compositing/plugins/no-backing-store.html

    r168668 r168843  
    77    }
    88  </style>
    9   <script src="../../resources/plugin.js"></script>
    109  <script type="text/javascript" charset="utf-8">
    11     if (window.testRunner)
     10    if (window.testRunner) {
    1211        testRunner.dumpAsText();
    13 
    14     runAfterPluginLoad(doTest, DoNotNotifyDone);
     12        testRunner.waitUntilDone();
     13    }
    1514
    1615    function doTest()
     
    2423        }, 0)
    2524    }
     25    window.addEventListener('load', doTest, false);
    2626  </script>
    2727</head>
  • trunk/LayoutTests/fast/dom/beforeload/flash-before-load.html

    r168668 r168843  
    55<body>
    66<div id="console"></div>
    7 <script src="../../../resources/plugin.js"></script>
    87<script>
    9     if (window.testRunner)
    10         testRunner.dumpAsText();
    11 
    12     runAfterPluginLoad(null, NotifyDone);
     8if (window.testRunner)
     9    testRunner.dumpAsText();
    1310</script>
    1411
  • trunk/LayoutTests/http/tests/security/contentSecurityPolicy/1.1/plugintypes-notype-data.html

    r168668 r168843  
    22<html>
    33<head>
    4 <script src="/js-test-resources/plugin.js"></script>
    54<script>
    6     if (window.testRunner) {
    7         testRunner.dumpAsText();
    8         testRunner.dumpChildFramesAsText();
    9     }
    10 
    11     runAfterPluginLoad(null, NotifyDone);
     5if (window.testRunner) {
     6    testRunner.dumpAsText();
     7    testRunner.dumpChildFramesAsText();
     8}
    129</script>
    1310<script src="/plugins/resources/mock-plugin-logger.js"></script>
  • trunk/LayoutTests/http/tests/security/contentSecurityPolicy/1.1/plugintypes-nourl-blocked.html

    r168668 r168843  
    22<html>
    33<head>
    4 <script src="/js-test-resources/plugin.js"></script>
    54<script>
    6     if (window.testRunner)
    7         testRunner.dumpAsText();
    8 
    9     runAfterPluginLoad(null, NotifyDone);
     5if (window.testRunner)
     6    testRunner.dumpAsText();
    107</script>
    118<meta http-equiv="X-WebKit-CSP" content="plugin-types text/plain">
  • trunk/LayoutTests/http/tests/security/contentSecurityPolicy/object-src-no-url-allowed.html

    r168668 r168843  
    22<html>
    33<head>
    4 <script src="/js-test-resources/plugin.js"></script>
    54<script>
    6     if (window.testRunner)
    7         testRunner.dumpAsText();
    8 
    9     runAfterPluginLoad(null, NotifyDone);
     5if (window.testRunner)
     6  testRunner.dumpAsText();
    107</script>
    118<meta http-equiv="Content-Security-Policy" content="object-src 'self'">
  • trunk/LayoutTests/http/tests/security/contentSecurityPolicy/object-src-no-url-blocked.html

    r168668 r168843  
    22<html>
    33<head>
    4 <script src="/js-test-resources/plugin.js"></script>
    54<script>
    6     if (window.testRunner)
    7         testRunner.dumpAsText();
    8 
    9     runAfterPluginLoad(null, NotifyDone);
     5if (window.testRunner)
     6  testRunner.dumpAsText();
    107</script>
    118<meta http-equiv="Content-Security-Policy" content="object-src 'none'">
  • trunk/LayoutTests/http/tests/security/contentSecurityPolicy/object-src-none-allowed.html

    r168668 r168843  
    22<html>
    33<head>
    4 <script src="/js-test-resources/plugin.js"></script>
     4<script>
     5if (window.testRunner) {
     6  testRunner.dumpAsText();
     7  testRunner.dumpChildFramesAsText();
     8}
     9</script>
    510</head>
    611<body>
    712  <iframe src="http://127.0.0.1:8000/security/contentSecurityPolicy/resources/echo-object-data.pl?plugin=data:application/x-webkit-test-netscape,logifloaded&log=PASS!&csp=img-src%20'none'"></iframe>
    813</body>
    9 <script>
    10     if (window.testRunner) {
    11         testRunner.dumpAsText();
    12         testRunner.dumpChildFramesAsText();
    13     }
    14 
    15     runAfterPluginLoad(null, NotifyDone, document.getElementsByTagName("iframe")[0]);
    16 </script>
    1714</html>
  • trunk/LayoutTests/http/tests/security/contentSecurityPolicy/object-src-none-blocked.html

    r168668 r168843  
    22<html>
    33<head>
    4 <script src="/js-test-resources/plugin.js"></script>
     4<script>
     5if (window.testRunner) {
     6  testRunner.dumpAsText();
     7  testRunner.dumpChildFramesAsText();
     8}
     9</script>
    510</head>
    611<body>
    712  <iframe src="http://127.0.0.1:8000/security/contentSecurityPolicy/resources/echo-object-data.pl?plugin=data:application/x-webkit-test-netscape,logifloaded&log=FAIL&csp=object-src%20'none'"></iframe>
    813</body>
    9 <script>
    10     if (window.testRunner) {
    11         testRunner.dumpAsText();
    12         testRunner.dumpChildFramesAsText();
    13     }
    14 
    15     runAfterPluginLoad(null, NotifyDone, document.getElementsByTagName("iframe")[0]);
    16 </script>
    1714</html>
  • trunk/LayoutTests/http/tests/security/contentSecurityPolicy/resources/multiple-iframe-plugin-test.js

    r168668 r168843  
    3939        iframe.src += "&type=application/x-webkit-test-netscape";
    4040
    41     iframe.onload = function() {
    42         if (window.internals)
    43             internals.updateLayoutIgnorePendingStylesheetsAndRunPostLayoutTasks(iframe);
    44         testImpl(experimental);
    45     };
     41    iframe.onload = function() { testImpl(experimental); };
    4642    document.body.appendChild(iframe);
    4743}
  • trunk/LayoutTests/http/tests/security/mixedContent/insecure-plugin-in-iframe.html

    r168668 r168843  
    44if (window.testRunner)
    55    testRunner.dumpAsText();
    6 
    7 onload = function() {
    8     if (window.internals)
    9         internals.updateLayoutIgnorePendingStylesheetsAndRunPostLayoutTasks(document.querySelector('iframe'));
    10 };
    116</script>
    127<p>This test loads a secure iframe that loads an insecure plugin.  We should
  • trunk/LayoutTests/platform/mac/plugins/supports-carbon-event-model.html

    r168668 r168843  
    1 <script src="../../../resources/plugin.js"></script>
    21<script>
    3     if (window.testRunner)
    4         testRunner.dumpAsText();
    5 
    6     runAfterPluginLoad(null, NotifyDone);
     2if (window.testRunner)
     3    testRunner.dumpAsText();
    74</script>
    85
  • trunk/LayoutTests/platform/mac/plugins/testplugin-onnew-onpaint.html

    r168743 r168843  
    33<html>
    44<head>
    5     <script src="../../../resources/plugin.js"></script>
    65    <script type="text/javascript" charset="utf-8">
    76        if (window.testRunner)
     
    2726            }
    2827        }
    29 
    30         runAfterPluginLoad(null, NotifyDone);
    3128    </script>
    3229</head>
  • trunk/LayoutTests/plugins/get-user-agent-with-null-npp-from-npp-new.html

    r168668 r168843  
    22<html>
    33<head>
    4     <script src="../resources/plugin.js"></script>
    54    <script>
    65        if (window.testRunner)
    76            testRunner.dumpAsText();
    8         runAfterPluginLoad(null, NotifyDone);
    97    </script>
    108</head>
  • trunk/LayoutTests/plugins/mouse-click-plugin-clears-selection.html

    r168668 r168843  
    11<html>
    22<head>
    3 <script src="../resources/plugin.js"></script>
    43<script>
    54
    6 runAfterPluginLoad(function() {
     5function runTest() {
    76    inputElement = document.getElementById('frame');
    87    inputElement.focus();
     
    1615        eventSender.mouseUp();
    1716    }
    18 }, NotifyDone);
     17}
    1918</script>
    2019</head>
    21 <body>
     20<body onload="runTest();">
    2221<embed id="plg" type="application/x-webkit-test-netscape" width="100" height="100" windowedplugin="false"></embed><br>
    2322<input id="frame" value="hello"/>
  • trunk/LayoutTests/plugins/netscape-plugin-map-data-to-src.html

    r168668 r168843  
    11<html>
    22<head>
    3 <script src="../resources/plugin.js"></script>
    43<script>
    54    if (window.testRunner)
    65        testRunner.dumpAsText();
    7     runAfterPluginLoad(null, NotifyDone);
    86</script>
    97<body style="margin:0px;overflow:hidden">
  • trunk/LayoutTests/plugins/no-mime-with-valid-extension.html

    r168668 r168843  
    1 <script src="../resources/plugin.js"></script>
    21<script>
    3     if (window.testRunner)
     2    if (window.testRunner) {
    43        testRunner.dumpAsText();
    5     runAfterPluginLoad(null, NotifyDone);
     4        testRunner.waitUntilDone();
     5    }
    66</script>
    77<p>
     
    1414<!-- Embed tag with missing type="" parameter -->
    1515<embed id="plugin" name="plugin" src="resources/test.testnetscape" logSrc="1">
     16<script>
     17    if (window.testRunner)
     18        testRunner.notifyDone();
     19</script>
  • trunk/LayoutTests/plugins/plugin-initiate-popup-window.html

    r168668 r168843  
    6565</script>
    6666</head>
    67 <body onload="internals.updateLayoutIgnorePendingStylesheetsAndRunPostLayoutTasks(); test();">
     67<body onload="window.setTimeout(test, 0);">
    6868<embed type="application/x-webkit-test-netscape" width=100 height=40 evaluatescript="mouse::popup_by_mousedown()" windowedplugin="false"></embed><br>
    6969<embed type="application/x-webkit-test-netscape" width=100 height=40 evaluatescript="key::popup_by_keydown()" windowedplugin="false"></embed><br>
  • trunk/LayoutTests/plugins/windowless_plugin_paint_test.html

    r168668 r168843  
    1515        // Create the plugin in the middle of the page.
    1616        pluginDiv.innerHTML = "<embed id=\"testPlugin\" type=\"application/x-webkit-test-netscape\" width=\"200\" height=\"200\" onpaintevent=\"didPaint()\" windowedPlugin=\"false\"></embed>";
    17         if (window.internals)
    18             internals.updateLayoutIgnorePendingStylesheetsAndRunPostLayoutTasks();
    1917        testRunner.displayInvalidatedRegion();
    2018      }
  • trunk/Source/WebCore/ChangeLog

    r168842 r168843  
     12014-05-13  Jon Honeycutt  <jhoneycutt@apple.com>
     2
     3        Revert "Don't dispatch 'beforeload' event inside FrameView::layout()",
     4        commit 84fe8cf6fbe8b5de9a06300ca3ef6d0ffc96948c, and associated
     5        follow-up fixes:
     6
     7            "platform/mac/plugins/testplugin-onnew-onpaint.html failing after
     8                r168668", commit c17be3bf5127baf94310af4b4b9bf5a57d29aaf4
     9            "[Win] Unreviewed build fix after r168668.", commit
     10                4fa470ad12c38ee7d4c114541b6dd321181a8bc9
     11
     12        The original merged patch appears to have caused a regression in
     13        fast/dom/HTMLObjectElement/object-as-frame.html.
     14
     15        <https://bugs.webkit.org/show_bug.cgi?id=132886>
     16
     17        Reviewed by Alexey Proskuryakov.
     18
     19        * WebCore.exp.in:
     20        * dom/Document.cpp:
     21        (WebCore::Document::updateLayoutIgnorePendingStylesheets):
     22        * dom/Document.h:
     23        * html/HTMLAppletElement.cpp:
     24        (WebCore::HTMLAppletElement::renderWidgetForJSBindings):
     25        * html/HTMLEmbedElement.cpp:
     26        (WebCore::HTMLEmbedElement::renderWidgetForJSBindings):
     27        * html/HTMLObjectElement.cpp:
     28        (WebCore::HTMLObjectElement::renderWidgetForJSBindings):
     29        * page/FrameView.cpp:
     30        (WebCore::FrameView::FrameView):
     31        (WebCore::FrameView::reset):
     32        (WebCore::FrameView::flushAnyPendingPostLayoutTasks):
     33        (WebCore::FrameView::performPostLayoutTasks):
     34        (WebCore::FrameView::updateEmbeddedObjectsTimerFired): Deleted.
     35        * page/FrameView.h:
     36        * testing/Internals.cpp:
     37        (WebCore::Internals::updateLayoutIgnorePendingStylesheetsAndRunPostLayoutTasks): Deleted.
     38        * testing/Internals.h:
     39        * testing/Internals.idl:
     40
    1412014-05-14  Kiran  <kiran.guduru@samsung.com>
    242
  • trunk/Source/WebCore/WebCore.exp.in

    r168830 r168843  
    12571257__ZN7WebCore8Document26pageSizeAndMarginsInPixelsEiRNS_7IntSizeERiS3_S3_S3_
    12581258__ZN7WebCore8Document27removeMediaCanStartListenerEPNS_21MediaCanStartListenerE
    1259 __ZN7WebCore8Document36updateLayoutIgnorePendingStylesheetsENS0_18RunPostLayoutTasksE
     1259__ZN7WebCore8Document36updateLayoutIgnorePendingStylesheetsEv
    12601260__ZN7WebCore8Document4headEv
    12611261__ZN7WebCore8Document8iconURLsEi
     
    17751775__ZNK7WebCore21BackForwardController18canGoBackOrForwardEi
    17761776__ZNK7WebCore21BackForwardController9backCountEv
    1777 __ZNK7WebCore21HTMLFrameOwnerElement15contentDocumentEv
    17781777__ZNK7WebCore21NetworkStorageSession13cookieStorageEv
    17791778__ZNK7WebCore21RenderLayerCompositor11scrollLayerEv
  • trunk/Source/WebCore/dom/Document.cpp

    r168761 r168843  
    18321832// lets us get reasonable answers. The long term solution to this problem is
    18331833// to instead suspend JavaScript execution.
    1834 void Document::updateLayoutIgnorePendingStylesheets(Document::RunPostLayoutTasks runPostLayoutTasks)
     1834void Document::updateLayoutIgnorePendingStylesheets()
    18351835{
    18361836    bool oldIgnore = m_ignorePendingStylesheets;
    1837 
     1837   
    18381838    if (!haveStylesheetsLoaded()) {
    18391839        m_ignorePendingStylesheets = true;
     
    18561856
    18571857    updateLayout();
    1858 
    1859     if (runPostLayoutTasks == RunPostLayoutTasksSynchronously && view())
    1860         view()->flushAnyPendingPostLayoutTasks();
    18611858
    18621859    m_ignorePendingStylesheets = oldIgnore;
  • trunk/Source/WebCore/dom/Document.h

    r168761 r168843  
    588588    bool updateStyleIfNeededForNode(const Node&);
    589589    void updateLayout();
    590     enum RunPostLayoutTasks {
    591         RunPostLayoutTasksAsyhnchronously,
    592         RunPostLayoutTasksSynchronously,
    593     };
    594     void updateLayoutIgnorePendingStylesheets(RunPostLayoutTasks = RunPostLayoutTasksAsyhnchronously);
     590    void updateLayoutIgnorePendingStylesheets();
    595591    PassRef<RenderStyle> styleForElementIgnoringPendingStylesheets(Element*);
    596592
  • trunk/Source/WebCore/html/HTMLAppletElement.cpp

    r168668 r168843  
    8989        return 0;
    9090
    91     // Needs to load the plugin immediatedly because this function is called
    92     // when JavaScript code accesses the plugin.
    93     // FIXME: <rdar://16893708> Check if dispatching events here is safe.
    94     document().updateLayoutIgnorePendingStylesheets(Document::RunPostLayoutTasksSynchronously);
     91    document().updateLayoutIgnorePendingStylesheets();
    9592    return renderWidget();
    9693}
  • trunk/Source/WebCore/html/HTMLEmbedElement.cpp

    r168668 r168843  
    7272{
    7373    FrameView* view = document().view();
    74     if (!view || (!view->isInLayout() && !view->isPainting())) {
    75         // Needs to load the plugin immediatedly because this function is called
    76         // when JavaScript code accesses the plugin.
    77         // FIXME: <rdar://16893708> Check if dispatching events here is safe.
    78         document().updateLayoutIgnorePendingStylesheets(Document::RunPostLayoutTasksSynchronously);
    79     }
     74    if (!view || (!view->isInLayout() && !view->isPainting()))
     75        document().updateLayoutIgnorePendingStylesheets();
    8076    return findWidgetRenderer(this);
    8177}
  • trunk/Source/WebCore/html/HTMLObjectElement.cpp

    r168668 r168843  
    8484RenderWidget* HTMLObjectElement::renderWidgetForJSBindings() const
    8585{
    86     // Needs to load the plugin immediatedly because this function is called
    87     // when JavaScript code accesses the plugin.
    88     // FIXME: <rdar://16893708> Check if dispatching events here is safe.
    89     document().updateLayoutIgnorePendingStylesheets(Document::RunPostLayoutTasksSynchronously);
     86    document().updateLayoutIgnorePendingStylesheets();
    9087    return renderWidget(); // This will return 0 if the renderer is not a RenderWidget.
    9188}
  • trunk/Source/WebCore/page/FrameView.cpp

    r168763 r168843  
    161161    , m_inSynchronousPostLayout(false)
    162162    , m_postLayoutTasksTimer(this, &FrameView::postLayoutTimerFired)
    163     , m_updateEmbeddedObjectsTimer(this, &FrameView::updateEmbeddedObjectsTimerFired)
    164163    , m_isTransparent(false)
    165164    , m_baseBackgroundColor(Color::white)
     
    252251    m_nestedLayoutCount = 0;
    253252    m_postLayoutTasksTimer.stop();
    254     m_updateEmbeddedObjectsTimer.stop();
    255253    m_firstLayout = true;
    256254    m_firstLayoutCallbackPending = false;
     
    27452743}
    27462744
    2747 void FrameView::updateEmbeddedObjectsTimerFired(Timer<FrameView>*)
    2748 {
    2749     RefPtr<FrameView> protect(this);
    2750     m_updateEmbeddedObjectsTimer.stop();
    2751     for (unsigned i = 0; i < maxUpdateEmbeddedObjectsIterations; i++) {
    2752         if (updateEmbeddedObjects())
    2753             break;
    2754     }
    2755 }
    2756 
    27572745void FrameView::flushAnyPendingPostLayoutTasks()
    27582746{
    2759     if (m_postLayoutTasksTimer.isActive())
    2760         performPostLayoutTasks();
    2761     if (m_updateEmbeddedObjectsTimer.isActive())
    2762         updateEmbeddedObjectsTimerFired(nullptr);
     2747    if (!m_postLayoutTasksTimer.isActive())
     2748        return;
     2749
     2750    performPostLayoutTasks();
    27632751}
    27642752
    27652753void FrameView::performPostLayoutTasks()
    27662754{
    2767     // FIXME: We should not run any JavaScript code in this function.
    2768 
    27692755    m_postLayoutTasksTimer.stop();
    27702756
     
    27972783    Ref<FrameView> protect(*this);
    27982784
    2799     m_updateEmbeddedObjectsTimer.startOneShot(0);
     2785    for (unsigned i = 0; i < maxUpdateEmbeddedObjectsIterations; i++) {
     2786        if (updateEmbeddedObjects())
     2787            break;
     2788    }
    28002789
    28012790    if (auto* page = frame().page()) {
  • trunk/Source/WebCore/page/FrameView.h

    r168668 r168843  
    592592    void speculativeTilingEnableTimerFired(Timer<FrameView>&);
    593593
    594     void updateEmbeddedObjectsTimerFired(Timer<FrameView>*);
    595594    bool updateEmbeddedObjects();
    596595    void updateEmbeddedObject(RenderEmbeddedObject&);
     
    647646    unsigned m_nestedLayoutCount;
    648647    Timer<FrameView> m_postLayoutTasksTimer;
    649     Timer<FrameView> m_updateEmbeddedObjectsTimer;
    650648    bool m_firstLayoutCallbackPending;
    651649
  • trunk/Source/WebCore/testing/Internals.cpp

    r168668 r168843  
    5151#include "FrameLoader.h"
    5252#include "FrameView.h"
    53 #include "HTMLIFrameElement.h"
    5453#include "HTMLInputElement.h"
    5554#include "HTMLNames.h"
     
    18971896}
    18981897
    1899 void Internals::updateLayoutIgnorePendingStylesheetsAndRunPostLayoutTasks(ExceptionCode& ec)
    1900 {
    1901     updateLayoutIgnorePendingStylesheetsAndRunPostLayoutTasks(nullptr, ec);
    1902 }
    1903 
    1904 void Internals::updateLayoutIgnorePendingStylesheetsAndRunPostLayoutTasks(Node* node, ExceptionCode& ec)
    1905 {
    1906     Document* document;
    1907     if (!node)
    1908         document = contextDocument();
    1909     else if (node->isDocumentNode())
    1910         document = toDocument(node);
    1911     else if (node->hasTagName(HTMLNames::iframeTag))
    1912         document = toHTMLIFrameElement(node)->contentDocument();
    1913     else {
    1914         ec = TypeError;
    1915         return;
    1916     }
    1917 
    1918     document->updateLayoutIgnorePendingStylesheets(Document::RunPostLayoutTasksSynchronously);
    1919 }
    1920 
    19211898#if !PLATFORM(IOS)
    19221899static const char* cursorTypeToString(Cursor::Type cursorType)
  • trunk/Source/WebCore/testing/Internals.h

    r168668 r168843  
    271271    void startTrackingRepaints(ExceptionCode&);
    272272    void stopTrackingRepaints(ExceptionCode&);
    273     void updateLayoutIgnorePendingStylesheetsAndRunPostLayoutTasks(ExceptionCode&);
    274     void updateLayoutIgnorePendingStylesheetsAndRunPostLayoutTasks(Node*, ExceptionCode&);
    275273
    276274    PassRefPtr<ArrayBuffer> serializeObject(PassRefPtr<SerializedScriptValue>) const;
  • trunk/Source/WebCore/testing/Internals.idl

    r168668 r168843  
    232232    [RaisesException] void stopTrackingRepaints();
    233233
    234     // |node| should be Document, HTMLIFrameElement, or unspecified.
    235     // If |node| is an HTMLIFrameElement, it assumes node.contentDocument is
    236     // specified without security checks. Unspecified means this document.
    237     [RaisesException] void updateLayoutIgnorePendingStylesheetsAndRunPostLayoutTasks(optional Node node);
    238 
    239234    // Returns a string with information about the mouse cursor used at the specified client location.
    240235    [RaisesException] DOMString getCurrentCursorInfo();
  • trunk/Source/WebKit/ChangeLog

    r168766 r168843  
     12014-05-13  Jon Honeycutt  <jhoneycutt@apple.com>
     2
     3        Revert "Don't dispatch 'beforeload' event inside FrameView::layout()",
     4        commit 84fe8cf6fbe8b5de9a06300ca3ef6d0ffc96948c, and associated
     5        follow-up fixes:
     6
     7            "platform/mac/plugins/testplugin-onnew-onpaint.html failing after
     8                r168668", commit c17be3bf5127baf94310af4b4b9bf5a57d29aaf4
     9            "[Win] Unreviewed build fix after r168668.", commit
     10                4fa470ad12c38ee7d4c114541b6dd321181a8bc9
     11
     12        The original merged patch appears to have caused a regression in
     13        fast/dom/HTMLObjectElement/object-as-frame.html.
     14
     15        <https://bugs.webkit.org/show_bug.cgi?id=132886>
     16
     17        Reviewed by Alexey Proskuryakov.
     18
     19        * WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in:
     20
    1212014-05-13  Dean Jackson  <dino@apple.com>
    222
  • trunk/Source/WebKit/WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in

    r168766 r168843  
    176176        symbolWithPointer(?create@Range@WebCore@@SA?AV?$PassRefPtr@VRange@WebCore@@@WTF@@AAVDocument@2@V?$PassRefPtr@VNode@WebCore@@@4@H1H@Z, ?create@Range@WebCore@@SA?AV?$PassRefPtr@VRange@WebCore@@@WTF@@AEAVDocument@2@V?$PassRefPtr@VNode@WebCore@@@4@H1H@Z)
    177177        symbolWithPointer(?commonVM@JSDOMWindowBase@WebCore@@SAAAVVM@JSC@@XZ, ?commonVM@JSDOMWindowBase@WebCore@@SAAEAVVM@JSC@@XZ)
    178                 symbolWithPointer(?contentDocument@HTMLFrameOwnerElement@WebCore@@QBEPAVDocument@2@XZ, ?contentDocument@HTMLFrameOwnerElement@WebCore@@QEBAPEAVDocument@2@XZ)
    179178        symbolWithPointer(?create@SerializedScriptValue@WebCore@@SA?AV?$PassRefPtr@VSerializedScriptValue@WebCore@@@WTF@@ABVString@4@@Z, ?create@SerializedScriptValue@WebCore@@SA?AV?$PassRefPtr@VSerializedScriptValue@WebCore@@@WTF@@AEBVString@4@@Z)
    180179#if USE(CF)
     
    205204        symbolWithPointer(?hitTest@RenderView@WebCore@@QAE_NABVHitTestRequest@2@AAVHitTestResult@2@@Z, ?hitTest@RenderView@WebCore@@QEAA_NAEBVHitTestRequest@2@AEAVHitTestResult@2@@Z)
    206205        ?inputTag@HTMLNames@WebCore@@3VHTMLQualifiedName@2@B
    207                 symbolWithPointer(?iframeTag@HTMLNames@WebCore@@3VHTMLQualifiedName@2@B,?iframeTag@HTMLNames@WebCore@@3VHTMLQualifiedName@2@B)
    208206        symbolWithPointer(?intersects@IntRect@WebCore@@QBE_NABV12@@Z, ?intersects@IntRect@WebCore@@QEBA_NAEBV12@@Z)
    209207        symbolWithPointer(?item@StaticNodeList@WebCore@@UBEPAVNode@2@I@Z, ?item@StaticNodeList@WebCore@@UEBAPEAVNode@2@I@Z)
     
    326324        symbolWithPointer(?isTreeScope@Node@WebCore@@QBE_NXZ, ?isTreeScope@Node@WebCore@@QEBA_NXZ)
    327325        symbolWithPointer(?updateEditorUINowIfScheduled@Editor@WebCore@@QAEXXZ, ?updateEditorUINowIfScheduled@Editor@WebCore@@QEAAXXZ)
    328         symbolWithPointer(?updateLayoutIgnorePendingStylesheets@Document@WebCore@@QAEXW4RunPostLayoutTasks@12@@Z, ?updateLayoutIgnorePendingStylesheets@Document@WebCore@@QEAAXW4RunPostLayoutTasks@12@@Z)
     326        symbolWithPointer(?updateLayoutIgnorePendingStylesheets@Document@WebCore@@QAEXXZ, ?updateLayoutIgnorePendingStylesheets@Document@WebCore@@QEAAXXZ)
    329327        symbolWithPointer(?updateStyleIfNeeded@Document@WebCore@@QAEXXZ, ?updateStyleIfNeeded@Document@WebCore@@QEAAXXZ)
    330328        symbolWithPointer(?view@Document@WebCore@@QBEPAVFrameView@2@XZ, ?view@Document@WebCore@@QEBAPEAVFrameView@2@XZ)
Note: See TracChangeset for help on using the changeset viewer.