| OLD | NEW |
| 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 361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 372 void setIsViewSource(bool); | 372 void setIsViewSource(bool); |
| 373 | 373 |
| 374 bool sawElementsInKnownNamespaces() const { return m_sawElementsInKnownNames
paces; } | 374 bool sawElementsInKnownNamespaces() const { return m_sawElementsInKnownNames
paces; } |
| 375 | 375 |
| 376 bool isRenderingReady() const { return haveImportsLoaded() && haveStylesheet
sLoaded(); } | 376 bool isRenderingReady() const { return haveImportsLoaded() && haveStylesheet
sLoaded(); } |
| 377 bool isScriptExecutionReady() const { return isRenderingReady(); } | 377 bool isScriptExecutionReady() const { return isRenderingReady(); } |
| 378 | 378 |
| 379 // This is a DOM function. | 379 // This is a DOM function. |
| 380 StyleSheetList* styleSheets(); | 380 StyleSheetList* styleSheets(); |
| 381 | 381 |
| 382 StyleEngine& styleEngine() { ASSERT(m_styleEngine.get()); return *m_styleEng
ine.get(); } | 382 StyleEngine& styleEngine() { DCHECK(m_styleEngine.get()); return *m_styleEng
ine.get(); } |
| 383 | 383 |
| 384 bool gotoAnchorNeededAfterStylesheetsLoad() { return m_gotoAnchorNeededAfter
StylesheetsLoad; } | 384 bool gotoAnchorNeededAfterStylesheetsLoad() { return m_gotoAnchorNeededAfter
StylesheetsLoad; } |
| 385 void setGotoAnchorNeededAfterStylesheetsLoad(bool b) { m_gotoAnchorNeededAft
erStylesheetsLoad = b; } | 385 void setGotoAnchorNeededAfterStylesheetsLoad(bool b) { m_gotoAnchorNeededAft
erStylesheetsLoad = b; } |
| 386 | 386 |
| 387 void scheduleUseShadowTreeUpdate(SVGUseElement&); | 387 void scheduleUseShadowTreeUpdate(SVGUseElement&); |
| 388 void unscheduleUseShadowTreeUpdate(SVGUseElement&); | 388 void unscheduleUseShadowTreeUpdate(SVGUseElement&); |
| 389 | 389 |
| 390 // FIXME: SVG filters should change to store the filter on the ComputedStyle | 390 // FIXME: SVG filters should change to store the filter on the ComputedStyle |
| 391 // instead of the LayoutObject so we can get rid of this hack. | 391 // instead of the LayoutObject so we can get rid of this hack. |
| 392 void scheduleSVGFilterLayerUpdateHack(Element&); | 392 void scheduleSVGFilterLayerUpdateHack(Element&); |
| (...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 791 ScriptRunner* scriptRunner() { return m_scriptRunner.get(); } | 791 ScriptRunner* scriptRunner() { return m_scriptRunner.get(); } |
| 792 | 792 |
| 793 HTMLScriptElement* currentScript() const { return !m_currentScriptStack.isEm
pty() ? m_currentScriptStack.last().get() : nullptr; } | 793 HTMLScriptElement* currentScript() const { return !m_currentScriptStack.isEm
pty() ? m_currentScriptStack.last().get() : nullptr; } |
| 794 HTMLScriptElement* currentScriptForBinding() const; | 794 HTMLScriptElement* currentScriptForBinding() const; |
| 795 void pushCurrentScript(RawPtr<HTMLScriptElement>); | 795 void pushCurrentScript(RawPtr<HTMLScriptElement>); |
| 796 void popCurrentScript(); | 796 void popCurrentScript(); |
| 797 | 797 |
| 798 void setTransformSource(PassOwnPtr<TransformSource>); | 798 void setTransformSource(PassOwnPtr<TransformSource>); |
| 799 TransformSource* transformSource() const { return m_transformSource.get(); } | 799 TransformSource* transformSource() const { return m_transformSource.get(); } |
| 800 | 800 |
| 801 void incDOMTreeVersion() { ASSERT(m_lifecycle.stateAllowsTreeMutations()); m
_domTreeVersion = ++s_globalTreeVersion; } | 801 void incDOMTreeVersion() { DCHECK(m_lifecycle.stateAllowsTreeMutations()); m
_domTreeVersion = ++s_globalTreeVersion; } |
| 802 uint64_t domTreeVersion() const { return m_domTreeVersion; } | 802 uint64_t domTreeVersion() const { return m_domTreeVersion; } |
| 803 | 803 |
| 804 uint64_t styleVersion() const { return m_styleVersion; } | 804 uint64_t styleVersion() const { return m_styleVersion; } |
| 805 | 805 |
| 806 enum PendingSheetLayout { NoLayoutWithPendingSheets, DidLayoutWithPendingShe
ets, IgnoreLayoutWithPendingSheets }; | 806 enum PendingSheetLayout { NoLayoutWithPendingSheets, DidLayoutWithPendingShe
ets, IgnoreLayoutWithPendingSheets }; |
| 807 | 807 |
| 808 bool didLayoutWithPendingStylesheets() const { return m_pendingSheetLayout =
= DidLayoutWithPendingSheets; } | 808 bool didLayoutWithPendingStylesheets() const { return m_pendingSheetLayout =
= DidLayoutWithPendingSheets; } |
| 809 bool ignoreLayoutWithPendingStylesheets() const { return m_pendingSheetLayou
t == IgnoreLayoutWithPendingSheets; } | 809 bool ignoreLayoutWithPendingStylesheets() const { return m_pendingSheetLayou
t == IgnoreLayoutWithPendingSheets; } |
| 810 | 810 |
| 811 bool hasNodesWithPlaceholderStyle() const { return m_hasNodesWithPlaceholder
Style; } | 811 bool hasNodesWithPlaceholderStyle() const { return m_hasNodesWithPlaceholder
Style; } |
| (...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1041 CanvasFontCache* canvasFontCache(); | 1041 CanvasFontCache* canvasFontCache(); |
| 1042 | 1042 |
| 1043 // Used by unit tests so that all parsing will be main thread for | 1043 // Used by unit tests so that all parsing will be main thread for |
| 1044 // controlling parsing and chunking precisely. | 1044 // controlling parsing and chunking precisely. |
| 1045 static void setThreadedParsingEnabledForTesting(bool); | 1045 static void setThreadedParsingEnabledForTesting(bool); |
| 1046 static bool threadedParsingEnabledForTesting(); | 1046 static bool threadedParsingEnabledForTesting(); |
| 1047 | 1047 |
| 1048 void incrementNodeCount() { m_nodeCount++; } | 1048 void incrementNodeCount() { m_nodeCount++; } |
| 1049 void decrementNodeCount() | 1049 void decrementNodeCount() |
| 1050 { | 1050 { |
| 1051 ASSERT(m_nodeCount > 0); | 1051 DCHECK_GT(m_nodeCount, 0); |
| 1052 m_nodeCount--; | 1052 m_nodeCount--; |
| 1053 } | 1053 } |
| 1054 int nodeCount() const { return m_nodeCount; } | 1054 int nodeCount() const { return m_nodeCount; } |
| 1055 | 1055 |
| 1056 using WeakDocumentSet = HeapHashSet<WeakMember<Document>>; | 1056 using WeakDocumentSet = HeapHashSet<WeakMember<Document>>; |
| 1057 static WeakDocumentSet& liveDocumentSet(); | 1057 static WeakDocumentSet& liveDocumentSet(); |
| 1058 | 1058 |
| 1059 WebTaskRunner* loadingTaskRunner() const; | 1059 WebTaskRunner* loadingTaskRunner() const; |
| 1060 WebTaskRunner* timerTaskRunner() const; | 1060 WebTaskRunner* timerTaskRunner() const; |
| 1061 | 1061 |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1150 void clearFocusedElementTimerFired(Timer<Document>*); | 1150 void clearFocusedElementTimerFired(Timer<Document>*); |
| 1151 | 1151 |
| 1152 bool haveStylesheetsLoaded() const; | 1152 bool haveStylesheetsLoaded() const; |
| 1153 void styleResolverMayHaveChanged(); | 1153 void styleResolverMayHaveChanged(); |
| 1154 | 1154 |
| 1155 void setHoverNode(RawPtr<Node>); | 1155 void setHoverNode(RawPtr<Node>); |
| 1156 | 1156 |
| 1157 using EventFactorySet = HashSet<OwnPtr<EventFactoryBase>>; | 1157 using EventFactorySet = HashSet<OwnPtr<EventFactoryBase>>; |
| 1158 static EventFactorySet& eventFactories(); | 1158 static EventFactorySet& eventFactories(); |
| 1159 | 1159 |
| 1160 void setNthIndexCache(NthIndexCache* nthIndexCache) { ASSERT(!m_nthIndexCach
e || !nthIndexCache); m_nthIndexCache = nthIndexCache; } | 1160 void setNthIndexCache(NthIndexCache* nthIndexCache) { DCHECK(!m_nthIndexCach
e || !nthIndexCache); m_nthIndexCache = nthIndexCache; } |
| 1161 | 1161 |
| 1162 const OriginAccessEntry& accessEntryFromURL(); | 1162 const OriginAccessEntry& accessEntryFromURL(); |
| 1163 | 1163 |
| 1164 DocumentLifecycle m_lifecycle; | 1164 DocumentLifecycle m_lifecycle; |
| 1165 | 1165 |
| 1166 bool m_hasNodesWithPlaceholderStyle; | 1166 bool m_hasNodesWithPlaceholderStyle; |
| 1167 bool m_evaluateMediaQueriesOnStyleRecalc; | 1167 bool m_evaluateMediaQueriesOnStyleRecalc; |
| 1168 | 1168 |
| 1169 // If we do ignore the pending stylesheet count, then we need to add a boole
an | 1169 // If we do ignore the pending stylesheet count, then we need to add a boole
an |
| 1170 // to track that this happened so that we can do a full repaint when the sty
lesheets | 1170 // to track that this happened so that we can do a full repaint when the sty
lesheets |
| (...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1443 DEFINE_TYPE_CASTS(TreeScope, Document, document, true, true); | 1443 DEFINE_TYPE_CASTS(TreeScope, Document, document, true, true); |
| 1444 | 1444 |
| 1445 } // namespace blink | 1445 } // namespace blink |
| 1446 | 1446 |
| 1447 #ifndef NDEBUG | 1447 #ifndef NDEBUG |
| 1448 // Outside the WebCore namespace for ease of invocation from gdb. | 1448 // Outside the WebCore namespace for ease of invocation from gdb. |
| 1449 CORE_EXPORT void showLiveDocumentInstances(); | 1449 CORE_EXPORT void showLiveDocumentInstances(); |
| 1450 #endif | 1450 #endif |
| 1451 | 1451 |
| 1452 #endif // Document_h | 1452 #endif // Document_h |
| OLD | NEW |