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

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

Issue 975933002: Return reference from styleEngine() accessor. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 9 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
« no previous file with comments | « Source/core/dom/ContainerNode.cpp ('k') | Source/core/dom/Document.cpp » ('j') | no next file with comments »
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 403 matching lines...) Expand 10 before | Expand all | Expand 10 after
414 void setIsViewSource(bool); 414 void setIsViewSource(bool);
415 415
416 bool sawElementsInKnownNamespaces() const { return m_sawElementsInKnownNames paces; } 416 bool sawElementsInKnownNamespaces() const { return m_sawElementsInKnownNames paces; }
417 417
418 bool isRenderingReady() const { return haveImportsLoaded() && haveStylesheet sLoaded(); } 418 bool isRenderingReady() const { return haveImportsLoaded() && haveStylesheet sLoaded(); }
419 bool isScriptExecutionReady() const { return isRenderingReady(); } 419 bool isScriptExecutionReady() const { return isRenderingReady(); }
420 420
421 // This is a DOM function. 421 // This is a DOM function.
422 StyleSheetList* styleSheets(); 422 StyleSheetList* styleSheets();
423 423
424 StyleEngine* styleEngine() { return m_styleEngine.get(); } 424 StyleEngine& styleEngine() { ASSERT(m_styleEngine.get()); return *m_styleEng ine.get(); }
425 425
426 bool gotoAnchorNeededAfterStylesheetsLoad() { return m_gotoAnchorNeededAfter StylesheetsLoad; } 426 bool gotoAnchorNeededAfterStylesheetsLoad() { return m_gotoAnchorNeededAfter StylesheetsLoad; }
427 void setGotoAnchorNeededAfterStylesheetsLoad(bool b) { m_gotoAnchorNeededAft erStylesheetsLoad = b; } 427 void setGotoAnchorNeededAfterStylesheetsLoad(bool b) { m_gotoAnchorNeededAft erStylesheetsLoad = b; }
428 428
429 // Called when one or more stylesheets in the document may have been added, removed, or changed. 429 // Called when one or more stylesheets in the document may have been added, removed, or changed.
430 void styleResolverChanged(StyleResolverUpdateMode = FullStyleUpdate); 430 void styleResolverChanged(StyleResolverUpdateMode = FullStyleUpdate);
431 void styleResolverMayHaveChanged(); 431 void styleResolverMayHaveChanged();
432 432
433 // FIXME: Switch all callers of styleResolverChanged to these or better ones and then make them 433 // FIXME: Switch all callers of styleResolverChanged to these or better ones and then make them
434 // do something smarter. 434 // do something smarter.
(...skipping 548 matching lines...) Expand 10 before | Expand all | Expand 10 after
983 void incrementActiveParserCount() { ++m_activeParserCount; } 983 void incrementActiveParserCount() { ++m_activeParserCount; }
984 void decrementActiveParserCount() { --m_activeParserCount; } 984 void decrementActiveParserCount() { --m_activeParserCount; }
985 985
986 void setContextFeatures(ContextFeatures&); 986 void setContextFeatures(ContextFeatures&);
987 ContextFeatures& contextFeatures() const { return *m_contextFeatures; } 987 ContextFeatures& contextFeatures() const { return *m_contextFeatures; }
988 988
989 ElementDataCache* elementDataCache() { return m_elementDataCache.get(); } 989 ElementDataCache* elementDataCache() { return m_elementDataCache.get(); }
990 990
991 void didLoadAllScriptBlockingResources(); 991 void didLoadAllScriptBlockingResources();
992 void didRemoveAllPendingStylesheet(); 992 void didRemoveAllPendingStylesheet();
993 void clearStyleResolver();
994 993
995 bool inStyleRecalc() const { return m_lifecycle.state() == DocumentLifecycle ::InStyleRecalc; } 994 bool inStyleRecalc() const { return m_lifecycle.state() == DocumentLifecycle ::InStyleRecalc; }
996 995
997 // Return a Locale for the default locale if the argument is null or empty. 996 // Return a Locale for the default locale if the argument is null or empty.
998 Locale& getCachedLocale(const AtomicString& locale = nullAtom); 997 Locale& getCachedLocale(const AtomicString& locale = nullAtom);
999 998
1000 AnimationClock& animationClock() { return m_animationClock; } 999 AnimationClock& animationClock() { return m_animationClock; }
1001 AnimationTimeline& timeline() const { return *m_timeline; } 1000 AnimationTimeline& timeline() const { return *m_timeline; }
1002 CompositorPendingAnimations& compositorPendingAnimations() { return m_compos itorPendingAnimations; } 1001 CompositorPendingAnimations& compositorPendingAnimations() { return m_compos itorPendingAnimations; }
1003 1002
(...skipping 428 matching lines...) Expand 10 before | Expand all | Expand 10 after
1432 DEFINE_TYPE_CASTS(TreeScope, Document, document, true, true); 1431 DEFINE_TYPE_CASTS(TreeScope, Document, document, true, true);
1433 1432
1434 } // namespace blink 1433 } // namespace blink
1435 1434
1436 #ifndef NDEBUG 1435 #ifndef NDEBUG
1437 // Outside the WebCore namespace for ease of invocation from gdb. 1436 // Outside the WebCore namespace for ease of invocation from gdb.
1438 void showLiveDocumentInstances(); 1437 void showLiveDocumentInstances();
1439 #endif 1438 #endif
1440 1439
1441 #endif // Document_h 1440 #endif // Document_h
OLDNEW
« no previous file with comments | « Source/core/dom/ContainerNode.cpp ('k') | Source/core/dom/Document.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698