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

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

Issue 2624893003: Move the FontFaceCache stored in CSSFontSelector to be stored in Document. (Closed)
Patch Set: Add a helper function Created 3 years, 11 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 16 matching lines...) Expand all
27 * 27 *
28 */ 28 */
29 29
30 #ifndef Document_h 30 #ifndef Document_h
31 #define Document_h 31 #define Document_h
32 32
33 #include "bindings/core/v8/ExceptionState.h" 33 #include "bindings/core/v8/ExceptionState.h"
34 #include "bindings/core/v8/ScriptValue.h" 34 #include "bindings/core/v8/ScriptValue.h"
35 #include "bindings/core/v8/TraceWrapperMember.h" 35 #include "bindings/core/v8/TraceWrapperMember.h"
36 #include "core/CoreExport.h" 36 #include "core/CoreExport.h"
37 #include "core/css/FontFaceCache.h"
37 #include "core/dom/ContainerNode.h" 38 #include "core/dom/ContainerNode.h"
38 #include "core/dom/DocumentEncodingData.h" 39 #include "core/dom/DocumentEncodingData.h"
39 #include "core/dom/DocumentInit.h" 40 #include "core/dom/DocumentInit.h"
40 #include "core/dom/DocumentLifecycle.h" 41 #include "core/dom/DocumentLifecycle.h"
41 #include "core/dom/DocumentTiming.h" 42 #include "core/dom/DocumentTiming.h"
42 #include "core/dom/ExecutionContext.h" 43 #include "core/dom/ExecutionContext.h"
43 #include "core/dom/MutationObserver.h" 44 #include "core/dom/MutationObserver.h"
44 #include "core/dom/StyleReattachData.h" 45 #include "core/dom/StyleReattachData.h"
45 #include "core/dom/SynchronousMutationNotifier.h" 46 #include "core/dom/SynchronousMutationNotifier.h"
46 #include "core/dom/SynchronousMutationObserver.h" 47 #include "core/dom/SynchronousMutationObserver.h"
(...skipping 1202 matching lines...) Expand 10 before | Expand all | Expand 10 after
1249 bool isSecureContext( 1250 bool isSecureContext(
1250 String& errorMessage, 1251 String& errorMessage,
1251 const SecureContextCheck = StandardSecureContextCheck) const override; 1252 const SecureContextCheck = StandardSecureContextCheck) const override;
1252 bool isSecureContext( 1253 bool isSecureContext(
1253 const SecureContextCheck = StandardSecureContextCheck) const override; 1254 const SecureContextCheck = StandardSecureContextCheck) const override;
1254 1255
1255 ClientHintsPreferences& clientHintsPreferences() { 1256 ClientHintsPreferences& clientHintsPreferences() {
1256 return m_clientHintsPreferences; 1257 return m_clientHintsPreferences;
1257 } 1258 }
1258 1259
1260 FontFaceCache* fontFaceCache() { return &m_fontFaceCache; }
1261 void incrementFontFaceVersion() { m_fontFaceCache.incrementVersion(); }
1259 CanvasFontCache* canvasFontCache(); 1262 CanvasFontCache* canvasFontCache();
1260 1263
1261 // Used by unit tests so that all parsing will be main thread for 1264 // Used by unit tests so that all parsing will be main thread for
1262 // controlling parsing and chunking precisely. 1265 // controlling parsing and chunking precisely.
1263 static void setThreadedParsingEnabledForTesting(bool); 1266 static void setThreadedParsingEnabledForTesting(bool);
1264 static bool threadedParsingEnabledForTesting(); 1267 static bool threadedParsingEnabledForTesting();
1265 1268
1266 void incrementNodeCount() { m_nodeCount++; } 1269 void incrementNodeCount() { m_nodeCount++; }
1267 void decrementNodeCount() { 1270 void decrementNodeCount() {
1268 DCHECK_GT(m_nodeCount, 0); 1271 DCHECK_GT(m_nodeCount, 0);
(...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after
1645 DOMTimerCoordinator m_timers; 1648 DOMTimerCoordinator m_timers;
1646 1649
1647 bool m_hasViewportUnits; 1650 bool m_hasViewportUnits;
1648 1651
1649 ParserSynchronizationPolicy m_parserSyncPolicy; 1652 ParserSynchronizationPolicy m_parserSyncPolicy;
1650 1653
1651 HostsUsingFeatures::Value m_hostsUsingFeaturesValue; 1654 HostsUsingFeatures::Value m_hostsUsingFeaturesValue;
1652 1655
1653 ClientHintsPreferences m_clientHintsPreferences; 1656 ClientHintsPreferences m_clientHintsPreferences;
1654 1657
1658 FontFaceCache m_fontFaceCache;
sashab 2017/01/11 04:20:35 What is FontFaceCache? Should this be a Member<>
meade_UTC10 2017/01/11 05:15:49 FontFaceCache is essentially a map of StyleRuleFon
1655 Member<CanvasFontCache> m_canvasFontCache; 1659 Member<CanvasFontCache> m_canvasFontCache;
1656 1660
1657 Member<IntersectionObserverController> m_intersectionObserverController; 1661 Member<IntersectionObserverController> m_intersectionObserverController;
1658 Member<ResizeObserverController> m_resizeObserverController; 1662 Member<ResizeObserverController> m_resizeObserverController;
1659 1663
1660 int m_nodeCount; 1664 int m_nodeCount;
1661 1665
1662 bool m_mayContainV0Shadow = false; 1666 bool m_mayContainV0Shadow = false;
1663 1667
1664 Member<SnapCoordinator> m_snapCoordinator; 1668 Member<SnapCoordinator> m_snapCoordinator;
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
1719 DEFINE_TYPE_CASTS(TreeScope, Document, document, true, true); 1723 DEFINE_TYPE_CASTS(TreeScope, Document, document, true, true);
1720 1724
1721 } // namespace blink 1725 } // namespace blink
1722 1726
1723 #ifndef NDEBUG 1727 #ifndef NDEBUG
1724 // Outside the WebCore namespace for ease of invocation from gdb. 1728 // Outside the WebCore namespace for ease of invocation from gdb.
1725 CORE_EXPORT void showLiveDocumentInstances(); 1729 CORE_EXPORT void showLiveDocumentInstances();
1726 #endif 1730 #endif
1727 1731
1728 #endif // Document_h 1732 #endif // Document_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/resolver/ScopedStyleResolver.cpp ('k') | third_party/WebKit/Source/core/dom/Document.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698