Commit 6c250526 authored by dimich@chromium.org's avatar dimich@chromium.org

2009-04-13 Dmitry Titov <dimich@chromium.org>

        Reviewed by Darin Adler.

        https://bugs.webkit.org/show_bug.cgi?id=24453
        REGRESSION: If setTimeout is called on a iframe's window, the DOM changes to
        the main document that timer callback makes are not flushed.

        * bindings/js/ScheduledAction.cpp:
        (WebCore::ScheduledAction::execute):
        Use Document::updateStyleForAllDocuments() instead of document->updateStyleIfNeeded()
        since timers may affect documents other then their own.

git-svn-id: svn://svn.chromium.org/blink/trunk@42474 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 25c89d2d
2009-04-13 Dmitry Titov <dimich@chromium.org>
Reviewed by Darin Adler.
https://bugs.webkit.org/show_bug.cgi?id=24453
REGRESSION: If setTimeout is called on a iframe's window, the DOM changes to
the main document that timer callback makes are not flushed.
* bindings/js/ScheduledAction.cpp:
(WebCore::ScheduledAction::execute):
Use Document::updateStyleForAllDocuments() instead of document->updateStyleIfNeeded()
since timers may affect documents other then their own.
2009-04-13 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
Reviewed by David Hyatt.
......@@ -125,18 +125,12 @@ void ScheduledAction::execute(Document* document)
frame->script()->setProcessingTimerCallback(true);
if (m_function)
if (m_function) {
executeFunctionInContext(window, window->shell());
else
Document::updateStyleForAllDocuments();
} else
frame->loader()->executeScript(m_code);
// Update our document's rendering following the execution of the timeout callback.
// FIXME: Why not use updateStyleForAllDocuments to update rendering of all documents?
// FIXME: Is this really the right point to do the update? We need a place that works
// for all possible entry points that might possibly execute script, but this seems
// to be a bit too low-level.
frame->document()->updateStyleIfNeeded();
frame->script()->setProcessingTimerCallback(false);
}
......
......@@ -100,14 +100,12 @@ void ScheduledAction::execute(ScriptExecutionContext* context)
proxy->setTimerCallback(true);
if (!m_function.IsEmpty() && m_function->IsFunction())
if (!m_function.IsEmpty() && m_function->IsFunction()) {
proxy->CallFunction(v8::Persistent<v8::Function>::Cast(m_function), v8Context->Global(), m_argc, m_argv);
else
Document::updateStyleForAllDocuments();
} else
proxy->evaluate(m_code, 0);
if (context->isDocument())
static_cast<Document*>(context)->updateStyleIfNeeded();
proxy->setTimerCallback(false);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment