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

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

Issue 779393002: Turn DocumentParser::pinToMainThread into a cleaner api (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years 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') | Source/core/dom/Document.cpp » ('J')
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 29 matching lines...) Expand all
40 #include "core/dom/DocumentTiming.h" 40 #include "core/dom/DocumentTiming.h"
41 #include "core/dom/ExecutionContext.h" 41 #include "core/dom/ExecutionContext.h"
42 #include "core/dom/MutationObserver.h" 42 #include "core/dom/MutationObserver.h"
43 #include "core/dom/TextLinkColors.h" 43 #include "core/dom/TextLinkColors.h"
44 #include "core/dom/TreeScope.h" 44 #include "core/dom/TreeScope.h"
45 #include "core/dom/UserActionElementSet.h" 45 #include "core/dom/UserActionElementSet.h"
46 #include "core/dom/ViewportDescription.h" 46 #include "core/dom/ViewportDescription.h"
47 #include "core/dom/custom/CustomElement.h" 47 #include "core/dom/custom/CustomElement.h"
48 #include "core/frame/LocalDOMWindow.h" 48 #include "core/frame/LocalDOMWindow.h"
49 #include "core/html/CollectionType.h" 49 #include "core/html/CollectionType.h"
50 #include "core/html/parser/ParserSynchronizationPolicy.h"
50 #include "core/page/FocusType.h" 51 #include "core/page/FocusType.h"
51 #include "core/page/PageVisibilityState.h" 52 #include "core/page/PageVisibilityState.h"
52 #include "platform/Length.h" 53 #include "platform/Length.h"
53 #include "platform/Timer.h" 54 #include "platform/Timer.h"
54 #include "platform/heap/Handle.h" 55 #include "platform/heap/Handle.h"
55 #include "platform/weborigin/KURL.h" 56 #include "platform/weborigin/KURL.h"
56 #include "platform/weborigin/ReferrerPolicy.h" 57 #include "platform/weborigin/ReferrerPolicy.h"
57 #include "wtf/HashSet.h" 58 #include "wtf/HashSet.h"
58 #include "wtf/OwnPtr.h" 59 #include "wtf/OwnPtr.h"
59 #include "wtf/PassOwnPtr.h" 60 #include "wtf/PassOwnPtr.h"
(...skipping 444 matching lines...) Expand 10 before | Expand all | Expand 10 after
504 void clearAXObjectCache(); 505 void clearAXObjectCache();
505 506
506 // to get visually ordered hebrew and arabic pages right 507 // to get visually ordered hebrew and arabic pages right
507 bool visuallyOrdered() const { return m_visuallyOrdered; } 508 bool visuallyOrdered() const { return m_visuallyOrdered; }
508 509
509 DocumentLoader* loader() const; 510 DocumentLoader* loader() const;
510 511
511 void open(Document* ownerDocument = nullptr, ExceptionState& = ASSERT_NO_EXC EPTION); 512 void open(Document* ownerDocument = nullptr, ExceptionState& = ASSERT_NO_EXC EPTION);
512 PassRefPtrWillBeRawPtr<DocumentParser> implicitOpen(); 513 PassRefPtrWillBeRawPtr<DocumentParser> implicitOpen();
513 514
515 void forceSynchronousParsing();
516
514 // close() is the DOM API document.close() 517 // close() is the DOM API document.close()
515 void close(ExceptionState& = ASSERT_NO_EXCEPTION); 518 void close(ExceptionState& = ASSERT_NO_EXCEPTION);
516 // In some situations (see the code), we ignore document.close(). 519 // In some situations (see the code), we ignore document.close().
517 // explicitClose() bypass these checks and actually tries to close the 520 // explicitClose() bypass these checks and actually tries to close the
518 // input stream. 521 // input stream.
519 void explicitClose(); 522 void explicitClose();
520 // implicitClose() actually does the work of closing the input stream. 523 // implicitClose() actually does the work of closing the input stream.
521 void implicitClose(); 524 void implicitClose();
522 525
523 bool dispatchBeforeUnloadEvent(Chrome&, bool&); 526 bool dispatchBeforeUnloadEvent(Chrome&, bool&);
(...skipping 851 matching lines...) Expand 10 before | Expand all | Expand 10 after
1375 1378
1376 WillBeHeapHashSet<RawPtrWillBeMember<SVGUseElement>> m_useElementsNeedingUpd ate; 1379 WillBeHeapHashSet<RawPtrWillBeMember<SVGUseElement>> m_useElementsNeedingUpd ate;
1377 WillBeHeapHashSet<RawPtrWillBeMember<Element>> m_layerUpdateSVGFilterElement s; 1380 WillBeHeapHashSet<RawPtrWillBeMember<Element>> m_layerUpdateSVGFilterElement s;
1378 1381
1379 bool m_hasViewportUnits; 1382 bool m_hasViewportUnits;
1380 1383
1381 using DocumentVisibilityObserverSet = WillBeHeapHashSet<RawPtrWillBeWeakMemb er<DocumentVisibilityObserver>>; 1384 using DocumentVisibilityObserverSet = WillBeHeapHashSet<RawPtrWillBeWeakMemb er<DocumentVisibilityObserver>>;
1382 DocumentVisibilityObserverSet m_visibilityObservers; 1385 DocumentVisibilityObserverSet m_visibilityObservers;
1383 1386
1384 int m_styleRecalcElementCounter; 1387 int m_styleRecalcElementCounter;
1388
1389 ParserSynchronizationPolicy m_backgroundParsingPolicy;
1385 }; 1390 };
1386 1391
1387 inline bool Document::shouldOverrideLegacyDescription(ViewportDescription::Type origin) 1392 inline bool Document::shouldOverrideLegacyDescription(ViewportDescription::Type origin)
1388 { 1393 {
1389 // The different (legacy) meta tags have different priorities based on the t ype 1394 // The different (legacy) meta tags have different priorities based on the t ype
1390 // regardless of which order they appear in the DOM. The priority is given b y the 1395 // regardless of which order they appear in the DOM. The priority is given b y the
1391 // ViewportDescription::Type enum. 1396 // ViewportDescription::Type enum.
1392 return origin >= m_legacyViewportDescription.type; 1397 return origin >= m_legacyViewportDescription.type;
1393 } 1398 }
1394 1399
(...skipping 27 matching lines...) Expand all
1422 DEFINE_TYPE_CASTS(TreeScope, Document, document, true, true); 1427 DEFINE_TYPE_CASTS(TreeScope, Document, document, true, true);
1423 1428
1424 } // namespace blink 1429 } // namespace blink
1425 1430
1426 #ifndef NDEBUG 1431 #ifndef NDEBUG
1427 // Outside the WebCore namespace for ease of invocation from gdb. 1432 // Outside the WebCore namespace for ease of invocation from gdb.
1428 void showLiveDocumentInstances(); 1433 void showLiveDocumentInstances();
1429 #endif 1434 #endif
1430 1435
1431 #endif // Document_h 1436 #endif // Document_h
OLDNEW
« no previous file with comments | « no previous file | Source/core/dom/Document.cpp » ('j') | Source/core/dom/Document.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698