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

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

Issue 2837763003: Reland "Move most of FrameLoader::CheckCompleted() to Document" (Closed)
Patch Set: Fix comment typos Created 3 years, 7 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 /* 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 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All
7 * rights reserved. 7 * rights reserved.
8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved.
9 * (http://www.torchmobile.com/) 9 * (http://www.torchmobile.com/)
10 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) 10 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
(...skipping 548 matching lines...) Expand 10 before | Expand all | Expand 10 after
559 // document of the entry settings object. 559 // document of the entry settings object.
560 void open(Document* entered_document, ExceptionState&); 560 void open(Document* entered_document, ExceptionState&);
561 // This is used internally and does not handle exceptions. 561 // This is used internally and does not handle exceptions.
562 void open(); 562 void open();
563 DocumentParser* ImplicitOpen(ParserSynchronizationPolicy); 563 DocumentParser* ImplicitOpen(ParserSynchronizationPolicy);
564 564
565 // This is the DOM API document.close() 565 // This is the DOM API document.close()
566 void close(ExceptionState&); 566 void close(ExceptionState&);
567 // This is used internally and does not handle exceptions. 567 // This is used internally and does not handle exceptions.
568 void close(); 568 void close();
569 // implicitClose() actually does the work of closing the input stream. 569
570 void ImplicitClose(); 570 void CheckCompleted();
571 571
572 bool DispatchBeforeUnloadEvent(ChromeClient&, 572 bool DispatchBeforeUnloadEvent(ChromeClient&,
573 bool is_reload, 573 bool is_reload,
574 bool& did_allow_navigation); 574 bool& did_allow_navigation);
575 void DispatchUnloadEvents(); 575 void DispatchUnloadEvents();
576 576
577 enum PageDismissalType { 577 enum PageDismissalType {
578 kNoDismissal, 578 kNoDismissal,
579 kBeforeUnloadDismissal, 579 kBeforeUnloadDismissal,
580 kPageHideDismissal, 580 kPageHideDismissal,
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
673 673
674 // https://html.spec.whatwg.org/multipage/dom.html#documentreadystate 674 // https://html.spec.whatwg.org/multipage/dom.html#documentreadystate
675 enum DocumentReadyState { kLoading, kInteractive, kComplete }; 675 enum DocumentReadyState { kLoading, kInteractive, kComplete };
676 676
677 void SetReadyState(DocumentReadyState); 677 void SetReadyState(DocumentReadyState);
678 bool IsLoadCompleted(); 678 bool IsLoadCompleted();
679 679
680 enum ParsingState { kParsing, kInDOMContentLoaded, kFinishedParsing }; 680 enum ParsingState { kParsing, kInDOMContentLoaded, kFinishedParsing };
681 void SetParsingState(ParsingState); 681 void SetParsingState(ParsingState);
682 bool Parsing() const { return parsing_state_ == kParsing; } 682 bool Parsing() const { return parsing_state_ == kParsing; }
683 bool IsInDOMContentLoaded() const {
684 return parsing_state_ == kInDOMContentLoaded;
685 }
686 bool HasFinishedParsing() const { return parsing_state_ == kFinishedParsing; } 683 bool HasFinishedParsing() const { return parsing_state_ == kFinishedParsing; }
687 684
688 bool ShouldScheduleLayout() const; 685 bool ShouldScheduleLayout() const;
689 int ElapsedTime() const; 686 int ElapsedTime() const;
690 687
691 bool CanCreateHistoryEntry() const; 688 bool CanCreateHistoryEntry() const;
692 689
693 TextLinkColors& GetTextLinkColors() { return text_link_colors_; } 690 TextLinkColors& GetTextLinkColors() { return text_link_colors_; }
694 VisitedLinkState& GetVisitedLinkState() const { return *visited_link_state_; } 691 VisitedLinkState& GetVisitedLinkState() const { return *visited_link_state_; }
695 692
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after
1044 kBeforeUnloadEventInProgress, 1041 kBeforeUnloadEventInProgress,
1045 kBeforeUnloadEventCompleted, 1042 kBeforeUnloadEventCompleted,
1046 kPageHideInProgress, 1043 kPageHideInProgress,
1047 kUnloadVisibilityChangeInProgress, 1044 kUnloadVisibilityChangeInProgress,
1048 kUnloadEventInProgress, 1045 kUnloadEventInProgress,
1049 kUnloadEventHandled 1046 kUnloadEventHandled
1050 }; 1047 };
1051 bool LoadEventStillNeeded() const { 1048 bool LoadEventStillNeeded() const {
1052 return load_event_progress_ == kLoadEventNotRun; 1049 return load_event_progress_ == kLoadEventNotRun;
1053 } 1050 }
1054 bool ProcessingLoadEvent() const {
1055 return load_event_progress_ == kLoadEventInProgress;
1056 }
1057 bool LoadEventFinished() const { 1051 bool LoadEventFinished() const {
1058 return load_event_progress_ >= kLoadEventCompleted; 1052 return load_event_progress_ >= kLoadEventCompleted;
1059 } 1053 }
1060 bool UnloadStarted() const { 1054 bool UnloadStarted() const {
1061 return load_event_progress_ >= kPageHideInProgress; 1055 return load_event_progress_ >= kPageHideInProgress;
1062 } 1056 }
1063 bool ProcessingBeforeUnload() const { 1057 bool ProcessingBeforeUnload() const {
1064 return load_event_progress_ == kBeforeUnloadEventInProgress; 1058 return load_event_progress_ == kBeforeUnloadEventInProgress;
1065 } 1059 }
1066 void SuppressLoadEvent(); 1060 void SuppressLoadEvent();
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
1157 } 1151 }
1158 V0CustomElementMicrotaskRunQueue* CustomElementMicrotaskRunQueue(); 1152 V0CustomElementMicrotaskRunQueue* CustomElementMicrotaskRunQueue();
1159 1153
1160 void ClearImportsController(); 1154 void ClearImportsController();
1161 void CreateImportsController(); 1155 void CreateImportsController();
1162 HTMLImportsController* ImportsController() const { 1156 HTMLImportsController* ImportsController() const {
1163 return imports_controller_; 1157 return imports_controller_;
1164 } 1158 }
1165 HTMLImportLoader* ImportLoader() const; 1159 HTMLImportLoader* ImportLoader() const;
1166 1160
1167 bool HaveImportsLoaded() const;
1168 void DidLoadAllImports(); 1161 void DidLoadAllImports();
1169 1162
1170 void AdjustFloatQuadsForScrollAndAbsoluteZoom(Vector<FloatQuad>&, 1163 void AdjustFloatQuadsForScrollAndAbsoluteZoom(Vector<FloatQuad>&,
1171 LayoutObject&); 1164 LayoutObject&);
1172 void AdjustFloatRectForScrollAndAbsoluteZoom(FloatRect&, LayoutObject&); 1165 void AdjustFloatRectForScrollAndAbsoluteZoom(FloatRect&, LayoutObject&);
1173 1166
1174 void SetContextFeatures(ContextFeatures&); 1167 void SetContextFeatures(ContextFeatures&);
1175 ContextFeatures& GetContextFeatures() const { return *context_features_; } 1168 ContextFeatures& GetContextFeatures() const { return *context_features_; }
1176 1169
1177 ElementDataCache* GetElementDataCache() { return element_data_cache_.Get(); } 1170 ElementDataCache* GetElementDataCache() { return element_data_cache_.Get(); }
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
1367 1360
1368 void InheritHtmlAndBodyElementStyles(StyleRecalcChange); 1361 void InheritHtmlAndBodyElementStyles(StyleRecalcChange);
1369 1362
1370 void UpdateUseShadowTreesIfNeeded(); 1363 void UpdateUseShadowTreesIfNeeded();
1371 void EvaluateMediaQueryListIfNeeded(); 1364 void EvaluateMediaQueryListIfNeeded();
1372 1365
1373 void UpdateStyleInvalidationIfNeeded(); 1366 void UpdateStyleInvalidationIfNeeded();
1374 void UpdateStyle(); 1367 void UpdateStyle();
1375 void NotifyLayoutTreeOfSubtreeChanges(); 1368 void NotifyLayoutTreeOfSubtreeChanges();
1376 1369
1370 // ImplicitClose() actually does the work of closing the input stream.
1371 void ImplicitClose();
1372 bool ShouldComplete();
1373
1377 void DetachParser(); 1374 void DetachParser();
1378 1375
1379 void BeginLifecycleUpdatesIfRenderingReady(); 1376 void BeginLifecycleUpdatesIfRenderingReady();
1380 1377
1381 bool IsDocument() const final { return true; } 1378 bool IsDocument() const final { return true; }
1382 1379
1383 void ChildrenChanged(const ChildrenChange&) override; 1380 void ChildrenChanged(const ChildrenChange&) override;
1384 1381
1385 String nodeName() const final; 1382 String nodeName() const final;
1386 NodeType getNodeType() const final; 1383 NodeType getNodeType() const final;
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
1432 } 1429 }
1433 1430
1434 const OriginAccessEntry& AccessEntryFromURL(); 1431 const OriginAccessEntry& AccessEntryFromURL();
1435 1432
1436 void SendSensitiveInputVisibility(); 1433 void SendSensitiveInputVisibility();
1437 void SendSensitiveInputVisibilityInternal(); 1434 void SendSensitiveInputVisibilityInternal();
1438 1435
1439 void RunExecutionContextTask(std::unique_ptr<ExecutionContextTask>, 1436 void RunExecutionContextTask(std::unique_ptr<ExecutionContextTask>,
1440 bool instrumenting); 1437 bool instrumenting);
1441 1438
1439 bool HaveImportsLoaded() const;
1440
1442 DocumentLifecycle lifecycle_; 1441 DocumentLifecycle lifecycle_;
1443 1442
1444 bool has_nodes_with_placeholder_style_; 1443 bool has_nodes_with_placeholder_style_;
1445 bool evaluate_media_queries_on_style_recalc_; 1444 bool evaluate_media_queries_on_style_recalc_;
1446 1445
1447 // If we do ignore the pending stylesheet count, then we need to add a boolean 1446 // If we do ignore the pending stylesheet count, then we need to add a boolean
1448 // to track that this happened so that we can do a full repaint when the 1447 // to track that this happened so that we can do a full repaint when the
1449 // stylesheets do eventually load. 1448 // stylesheets do eventually load.
1450 PendingSheetLayout pending_sheet_layout_; 1449 PendingSheetLayout pending_sheet_layout_;
1451 1450
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
1733 DEFINE_TYPE_CASTS(TreeScope, Document, document, true, true); 1732 DEFINE_TYPE_CASTS(TreeScope, Document, document, true, true);
1734 1733
1735 } // namespace blink 1734 } // namespace blink
1736 1735
1737 #ifndef NDEBUG 1736 #ifndef NDEBUG
1738 // Outside the WebCore namespace for ease of invocation from gdb. 1737 // Outside the WebCore namespace for ease of invocation from gdb.
1739 CORE_EXPORT void showLiveDocumentInstances(); 1738 CORE_EXPORT void showLiveDocumentInstances();
1740 #endif 1739 #endif
1741 1740
1742 #endif // Document_h 1741 #endif // Document_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698