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

Side by Side Diff: Source/core/dom/Document.h

Issue 672843002: Delay dispatching DOMContentLoaded event to next event loop. Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: hmm Created 6 years, 2 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
« no previous file with comments | « no previous file | Source/core/dom/Document.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org)
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All r ights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All r ights reserved.
7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/)
8 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) 8 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
9 * Copyright (C) 2011 Google Inc. All rights reserved. 9 * Copyright (C) 2011 Google Inc. All rights reserved.
10 * 10 *
(...skipping 958 matching lines...) Expand 10 before | Expand all | Expand 10 after
969 void didLoadAllImports(); 969 void didLoadAllImports();
970 970
971 void adjustFloatQuadsForScrollAndAbsoluteZoom(Vector<FloatQuad>&, RenderObje ct&); 971 void adjustFloatQuadsForScrollAndAbsoluteZoom(Vector<FloatQuad>&, RenderObje ct&);
972 void adjustFloatRectForScrollAndAbsoluteZoom(FloatRect&, RenderObject&); 972 void adjustFloatRectForScrollAndAbsoluteZoom(FloatRect&, RenderObject&);
973 973
974 bool hasActiveParser(); 974 bool hasActiveParser();
975 unsigned activeParserCount() { return m_activeParserCount; } 975 unsigned activeParserCount() { return m_activeParserCount; }
976 void incrementActiveParserCount() { ++m_activeParserCount; } 976 void incrementActiveParserCount() { ++m_activeParserCount; }
977 void decrementActiveParserCount(); 977 void decrementActiveParserCount();
978 978
979 bool hasFiredDOMContentLoadedEvent() const { return m_hasFiredDOMContentLoad edEvent; }
980
979 void setContextFeatures(ContextFeatures&); 981 void setContextFeatures(ContextFeatures&);
980 ContextFeatures& contextFeatures() const { return *m_contextFeatures; } 982 ContextFeatures& contextFeatures() const { return *m_contextFeatures; }
981 983
982 ElementDataCache* elementDataCache() { return m_elementDataCache.get(); } 984 ElementDataCache* elementDataCache() { return m_elementDataCache.get(); }
983 985
984 void didLoadAllScriptBlockingResources(); 986 void didLoadAllScriptBlockingResources();
985 void didRemoveAllPendingStylesheet(); 987 void didRemoveAllPendingStylesheet();
986 void clearStyleResolver(); 988 void clearStyleResolver();
987 989
988 bool inStyleRecalc() const { return m_lifecycle.state() == DocumentLifecycle ::InStyleRecalc; } 990 bool inStyleRecalc() const { return m_lifecycle.state() == DocumentLifecycle ::InStyleRecalc; }
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
1114 virtual KURL virtualCompleteURL(const String&) const override final; // Same as completeURL() for the same reason as above. 1116 virtual KURL virtualCompleteURL(const String&) const override final; // Same as completeURL() for the same reason as above.
1115 1117
1116 virtual void reportBlockedScriptExecutionToInspector(const String& directive Text) override final; 1118 virtual void reportBlockedScriptExecutionToInspector(const String& directive Text) override final;
1117 1119
1118 virtual double timerAlignmentInterval() const override final; 1120 virtual double timerAlignmentInterval() const override final;
1119 1121
1120 void updateTitle(const String&); 1122 void updateTitle(const String&);
1121 void updateFocusAppearanceTimerFired(Timer<Document>*); 1123 void updateFocusAppearanceTimerFired(Timer<Document>*);
1122 void updateBaseURL(); 1124 void updateBaseURL();
1123 1125
1126 void dispatchDOMContentLoadedTimerFired(Timer<Document>*);
1124 void executeScriptsWaitingForResourcesTimerFired(Timer<Document>*); 1127 void executeScriptsWaitingForResourcesTimerFired(Timer<Document>*);
1125 1128
1126 void loadEventDelayTimerFired(Timer<Document>*); 1129 void loadEventDelayTimerFired(Timer<Document>*);
1127 void pluginLoadingTimerFired(Timer<Document>*); 1130 void pluginLoadingTimerFired(Timer<Document>*);
1128 1131
1129 PageVisibilityState pageVisibilityState() const; 1132 PageVisibilityState pageVisibilityState() const;
1130 1133
1131 // Note that dispatching a window load event may cause the LocalDOMWindow to be detached from 1134 // Note that dispatching a window load event may cause the LocalDOMWindow to be detached from
1132 // the LocalFrame, so callers should take a reference to the LocalDOMWindow (which owns us) to 1135 // the LocalFrame, so callers should take a reference to the LocalDOMWindow (which owns us) to
1133 // prevent the Document from getting blown away from underneath them. 1136 // prevent the Document from getting blown away from underneath them.
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
1195 OwnPtrWillBeMember<DOMImplementation> m_implementation; 1198 OwnPtrWillBeMember<DOMImplementation> m_implementation;
1196 1199
1197 RefPtrWillBeMember<CSSStyleSheet> m_elemSheet; 1200 RefPtrWillBeMember<CSSStyleSheet> m_elemSheet;
1198 1201
1199 bool m_printing; 1202 bool m_printing;
1200 bool m_paginatedForScreen; 1203 bool m_paginatedForScreen;
1201 1204
1202 CompatibilityMode m_compatibilityMode; 1205 CompatibilityMode m_compatibilityMode;
1203 bool m_compatibilityModeLocked; // This is cheaper than making setCompatibil ityMode virtual. 1206 bool m_compatibilityModeLocked; // This is cheaper than making setCompatibil ityMode virtual.
1204 1207
1208 bool m_hasFiredDOMContentLoadedEvent;
1209 Timer<Document> m_dispatchDOMContentLoadedTimer;
1205 Timer<Document> m_executeScriptsWaitingForResourcesTimer; 1210 Timer<Document> m_executeScriptsWaitingForResourcesTimer;
1206 1211
1207 bool m_hasAutofocused; 1212 bool m_hasAutofocused;
1208 Timer<Document> m_clearFocusedElementTimer; 1213 Timer<Document> m_clearFocusedElementTimer;
1209 RefPtrWillBeMember<Element> m_autofocusElement; 1214 RefPtrWillBeMember<Element> m_autofocusElement;
1210 RefPtrWillBeMember<Element> m_focusedElement; 1215 RefPtrWillBeMember<Element> m_focusedElement;
1211 RefPtrWillBeMember<Node> m_hoverNode; 1216 RefPtrWillBeMember<Node> m_hoverNode;
1212 RefPtrWillBeMember<Element> m_activeHoverElement; 1217 RefPtrWillBeMember<Element> m_activeHoverElement;
1213 RefPtrWillBeMember<Element> m_documentElement; 1218 RefPtrWillBeMember<Element> m_documentElement;
1214 UserActionElementSet m_userActionElements; 1219 UserActionElementSet m_userActionElements;
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
1415 Node* eventTargetNodeForDocument(Document*); 1420 Node* eventTargetNodeForDocument(Document*);
1416 1421
1417 } // namespace blink 1422 } // namespace blink
1418 1423
1419 #ifndef NDEBUG 1424 #ifndef NDEBUG
1420 // Outside the WebCore namespace for ease of invocation from gdb. 1425 // Outside the WebCore namespace for ease of invocation from gdb.
1421 void showLiveDocumentInstances(); 1426 void showLiveDocumentInstances();
1422 #endif 1427 #endif
1423 1428
1424 #endif // Document_h 1429 #endif // Document_h
OLDNEW
« no previous file with comments | « no previous file | Source/core/dom/Document.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698