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

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

Issue 725593004: Prevent the load event from firing inside DOMContentLoaded (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 1 month 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 | Annotate | Revision Log
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 574 matching lines...) Expand 10 before | Expand all | Expand 10 after
585 bool inNoQuirksMode() const { return m_compatibilityMode == NoQuirksMode; } 585 bool inNoQuirksMode() const { return m_compatibilityMode == NoQuirksMode; }
586 586
587 enum ReadyState { 587 enum ReadyState {
588 Loading, 588 Loading,
589 Interactive, 589 Interactive,
590 Complete 590 Complete
591 }; 591 };
592 void setReadyState(ReadyState); 592 void setReadyState(ReadyState);
593 bool isLoadCompleted(); 593 bool isLoadCompleted();
594 594
595 void setParsing(bool); 595 enum ParsingState {
596 bool parsing() const { return m_isParsing; } 596 Parsing,
597 InDOMContentLoaded,
598 Done
sof 2014/11/14 21:34:02 Done is a bit short & generic... DoneParsing, Fini
Nate Chapin 2014/11/14 22:05:25 Good point. FinishedParsing is probably the most c
599 };
600 void setParsingState(ParsingState);
601 bool parsing() const { return m_parsingState == Parsing; }
602 bool isInDOMContentLoaded() const { return m_parsingState == InDOMContentLoa ded; }
597 603
598 bool shouldScheduleLayout() const; 604 bool shouldScheduleLayout() const;
599 int elapsedTime() const; 605 int elapsedTime() const;
600 606
601 TextLinkColors& textLinkColors() { return m_textLinkColors; } 607 TextLinkColors& textLinkColors() { return m_textLinkColors; }
602 VisitedLinkState& visitedLinkState() const { return *m_visitedLinkState; } 608 VisitedLinkState& visitedLinkState() const { return *m_visitedLinkState; }
603 609
604 MouseEventWithHitTestResults prepareMouseEvent(const HitTestRequest&, const LayoutPoint&, const PlatformMouseEvent&); 610 MouseEventWithHitTestResults prepareMouseEvent(const HitTestRequest&, const LayoutPoint&, const PlatformMouseEvent&);
605 611
606 /* Newly proposed CSS3 mechanism for selecting alternate 612 /* Newly proposed CSS3 mechanism for selecting alternate
(...skipping 635 matching lines...) Expand 10 before | Expand all | Expand 10 after
1242 OwnPtrWillBeMember<StyleEngine> m_styleEngine; 1248 OwnPtrWillBeMember<StyleEngine> m_styleEngine;
1243 RefPtrWillBeMember<StyleSheetList> m_styleSheetList; 1249 RefPtrWillBeMember<StyleSheetList> m_styleSheetList;
1244 1250
1245 OwnPtrWillBeMember<FormController> m_formController; 1251 OwnPtrWillBeMember<FormController> m_formController;
1246 1252
1247 TextLinkColors m_textLinkColors; 1253 TextLinkColors m_textLinkColors;
1248 const OwnPtrWillBeMember<VisitedLinkState> m_visitedLinkState; 1254 const OwnPtrWillBeMember<VisitedLinkState> m_visitedLinkState;
1249 1255
1250 bool m_visuallyOrdered; 1256 bool m_visuallyOrdered;
1251 ReadyState m_readyState; 1257 ReadyState m_readyState;
1252 bool m_isParsing; 1258 ParsingState m_parsingState;
1253 1259
1254 bool m_gotoAnchorNeededAfterStylesheetsLoad; 1260 bool m_gotoAnchorNeededAfterStylesheetsLoad;
1255 bool m_isDNSPrefetchEnabled; 1261 bool m_isDNSPrefetchEnabled;
1256 bool m_haveExplicitlyDisabledDNSPrefetch; 1262 bool m_haveExplicitlyDisabledDNSPrefetch;
1257 bool m_containsValidityStyleRules; 1263 bool m_containsValidityStyleRules;
1258 bool m_updateFocusAppearanceRestoresSelection; 1264 bool m_updateFocusAppearanceRestoresSelection;
1259 bool m_containsPlugins; 1265 bool m_containsPlugins;
1260 1266
1261 // http://www.whatwg.org/specs/web-apps/current-work/#ignore-destructive-wri tes-counter 1267 // http://www.whatwg.org/specs/web-apps/current-work/#ignore-destructive-wri tes-counter
1262 unsigned m_ignoreDestructiveWriteCount; 1268 unsigned m_ignoreDestructiveWriteCount;
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
1431 DEFINE_TYPE_CASTS(TreeScope, Document, document, true, true); 1437 DEFINE_TYPE_CASTS(TreeScope, Document, document, true, true);
1432 1438
1433 } // namespace blink 1439 } // namespace blink
1434 1440
1435 #ifndef NDEBUG 1441 #ifndef NDEBUG
1436 // Outside the WebCore namespace for ease of invocation from gdb. 1442 // Outside the WebCore namespace for ease of invocation from gdb.
1437 void showLiveDocumentInstances(); 1443 void showLiveDocumentInstances();
1438 #endif 1444 #endif
1439 1445
1440 #endif // Document_h 1446 #endif // Document_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698