Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(353)

Side by Side Diff: third_party/WebKit/Source/core/html/imports/HTMLImportTreeRoot.cpp

Issue 1475863005: [Async][WIP] Call FrameLoader::checkCompleted() asynchronously to avoid sync body.onload() Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/html/imports/HTMLImportTreeRoot.h" 5 #include "core/html/imports/HTMLImportTreeRoot.h"
6 6
7 #include "core/dom/Document.h" 7 #include "core/dom/Document.h"
8 #include "core/dom/StyleEngine.h" 8 #include "core/dom/StyleEngine.h"
9 #include "core/frame/LocalFrame.h" 9 #include "core/frame/LocalFrame.h"
10 #include "core/html/imports/HTMLImportChild.h" 10 #include "core/html/imports/HTMLImportChild.h"
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 scheduleRecalcState(); 55 scheduleRecalcState();
56 } 56 }
57 57
58 void HTMLImportTreeRoot::stateDidChange() 58 void HTMLImportTreeRoot::stateDidChange()
59 { 59 {
60 HTMLImport::stateDidChange(); 60 HTMLImport::stateDidChange();
61 61
62 if (!state().isReady()) 62 if (!state().isReady())
63 return; 63 return;
64 if (LocalFrame* frame = m_document->frame()) 64 if (LocalFrame* frame = m_document->frame())
65 frame->loader().checkCompleted(); 65 frame->loader().checkCompleted(10);
66 } 66 }
67 67
68 void HTMLImportTreeRoot::scheduleRecalcState() 68 void HTMLImportTreeRoot::scheduleRecalcState()
69 { 69 {
70 #if ENABLE(OILPAN) 70 #if ENABLE(OILPAN)
71 ASSERT(m_document); 71 ASSERT(m_document);
72 if (m_recalcTimer.isActive() || !m_document->isActive()) 72 if (m_recalcTimer.isActive() || !m_document->isActive())
73 return; 73 return;
74 #else 74 #else
75 if (m_recalcTimer.isActive() || !m_document) 75 if (m_recalcTimer.isActive() || !m_document)
(...skipping 27 matching lines...) Expand all
103 } 103 }
104 104
105 DEFINE_TRACE(HTMLImportTreeRoot) 105 DEFINE_TRACE(HTMLImportTreeRoot)
106 { 106 {
107 visitor->trace(m_document); 107 visitor->trace(m_document);
108 visitor->trace(m_imports); 108 visitor->trace(m_imports);
109 HTMLImport::trace(visitor); 109 HTMLImport::trace(visitor);
110 } 110 }
111 111
112 } // namespace blink 112 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/Document.cpp ('k') | third_party/WebKit/Source/core/loader/FrameFetchContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698