summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/page/PageGroupLoadDeferrer.cpp
diff options
context:
space:
mode:
authorBen Murdoch <benm@google.com>2011-05-24 11:24:40 +0100
committerBen Murdoch <benm@google.com>2011-06-02 09:53:15 +0100
commit81bc750723a18f21cd17d1b173cd2a4dda9cea6e (patch)
tree7a9e5ed86ff429fd347a25153107221543909b19 /Source/WebCore/page/PageGroupLoadDeferrer.cpp
parent94088a6d336c1dd80a1e734af51e96abcbb689a7 (diff)
downloadexternal_webkit-81bc750723a18f21cd17d1b173cd2a4dda9cea6e.zip
external_webkit-81bc750723a18f21cd17d1b173cd2a4dda9cea6e.tar.gz
external_webkit-81bc750723a18f21cd17d1b173cd2a4dda9cea6e.tar.bz2
Merge WebKit at r80534: Intial merge by Git
Change-Id: Ia7a83357124c9e1cdb1debf55d9661ec0bd09a61
Diffstat (limited to 'Source/WebCore/page/PageGroupLoadDeferrer.cpp')
-rw-r--r--Source/WebCore/page/PageGroupLoadDeferrer.cpp28
1 files changed, 3 insertions, 25 deletions
diff --git a/Source/WebCore/page/PageGroupLoadDeferrer.cpp b/Source/WebCore/page/PageGroupLoadDeferrer.cpp
index 781bc34..292b4cd 100644
--- a/Source/WebCore/page/PageGroupLoadDeferrer.cpp
+++ b/Source/WebCore/page/PageGroupLoadDeferrer.cpp
@@ -39,22 +39,8 @@ PageGroupLoadDeferrer::PageGroupLoadDeferrer(Page* page, bool deferSelf)
HashSet<Page*>::const_iterator end = pages.end();
for (HashSet<Page*>::const_iterator it = pages.begin(); it != end; ++it) {
Page* otherPage = *it;
- if ((deferSelf || otherPage != page)) {
- if (!otherPage->defersLoading()) {
- m_deferredFrames.append(otherPage->mainFrame());
-
- // This code is not logically part of load deferring, but we do not want JS code executed beneath modal
- // windows or sheets, which is exactly when PageGroupLoadDeferrer is used.
- // NOTE: if PageGroupLoadDeferrer is ever used for tasks other than showing a modal window or sheet,
- // the constructor will need to take a ActiveDOMObject::ReasonForSuspension.
- for (Frame* frame = otherPage->mainFrame(); frame; frame = frame->tree()->traverseNext()) {
- frame->document()->suspendActiveDOMObjects(ActiveDOMObject::WillShowDialog);
- frame->document()->asyncScriptRunner()->suspend();
- if (DocumentParser* parser = frame->document()->parser())
- parser->suspendScheduledTasks();
- }
- }
- }
+ if ((deferSelf || otherPage != page) && !otherPage->defersLoading())
+ m_deferredFrames.append(otherPage->mainFrame());
}
size_t count = m_deferredFrames.size();
@@ -66,16 +52,8 @@ PageGroupLoadDeferrer::PageGroupLoadDeferrer(Page* page, bool deferSelf)
PageGroupLoadDeferrer::~PageGroupLoadDeferrer()
{
for (size_t i = 0; i < m_deferredFrames.size(); ++i) {
- if (Page* page = m_deferredFrames[i]->page()) {
+ if (Page* page = m_deferredFrames[i]->page())
page->setDefersLoading(false);
-
- for (Frame* frame = page->mainFrame(); frame; frame = frame->tree()->traverseNext()) {
- frame->document()->resumeActiveDOMObjects();
- frame->document()->asyncScriptRunner()->resume();
- if (DocumentParser* parser = frame->document()->parser())
- parser->resumeScheduledTasks();
- }
- }
}
}