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

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

Issue 26155004: Rename WebCore::StyleResolverUpdateType to RecalcStyleTime (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/dom/Document.h ('k') | Source/core/dom/StyleSheetCollection.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, 2011, 2012 Apple Inc. All r ights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 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) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. 8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved.
9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) 9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved. 10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved.
(...skipping 3120 matching lines...) Expand 10 before | Expand all | Expand 10 after
3131 m_styleEngine->setSelectedStylesheetSetName(aString); 3131 m_styleEngine->setSelectedStylesheetSetName(aString);
3132 styleResolverChanged(RecalcStyleDeferred); 3132 styleResolverChanged(RecalcStyleDeferred);
3133 } 3133 }
3134 3134
3135 void Document::evaluateMediaQueryList() 3135 void Document::evaluateMediaQueryList()
3136 { 3136 {
3137 if (m_mediaQueryMatcher) 3137 if (m_mediaQueryMatcher)
3138 m_mediaQueryMatcher->styleResolverChanged(); 3138 m_mediaQueryMatcher->styleResolverChanged();
3139 } 3139 }
3140 3140
3141 void Document::styleResolverChanged(StyleResolverUpdateType updateType, StyleRes olverUpdateMode updateMode) 3141 void Document::styleResolverChanged(RecalcStyleTime updateTime, StyleResolverUpd ateMode updateMode)
3142 { 3142 {
3143 // Don't bother updating, since we haven't loaded all our style info yet 3143 // Don't bother updating, since we haven't loaded all our style info yet
3144 // and haven't calculated the style selector for the first time. 3144 // and haven't calculated the style selector for the first time.
3145 if (!isActive() || (!m_didCalculateStyleResolver && !haveStylesheetsLoaded() )) { 3145 if (!isActive() || (!m_didCalculateStyleResolver && !haveStylesheetsLoaded() )) {
3146 m_styleResolver.clear(); 3146 m_styleResolver.clear();
3147 return; 3147 return;
3148 } 3148 }
3149 m_didCalculateStyleResolver = true; 3149 m_didCalculateStyleResolver = true;
3150 3150
3151 bool needsRecalc = m_styleEngine->updateActiveStyleSheets(updateMode); 3151 bool needsRecalc = m_styleEngine->updateActiveStyleSheets(updateMode);
3152 3152
3153 if (didLayoutWithPendingStylesheets() && !m_styleEngine->hasPendingSheets()) { 3153 if (didLayoutWithPendingStylesheets() && !m_styleEngine->hasPendingSheets()) {
3154 // We need to manually repaint because we avoid doing all repaints in la yout or style 3154 // We need to manually repaint because we avoid doing all repaints in la yout or style
3155 // recalc while sheets are still loading to avoid FOUC. 3155 // recalc while sheets are still loading to avoid FOUC.
3156 m_pendingSheetLayout = IgnoreLayoutWithPendingSheets; 3156 m_pendingSheetLayout = IgnoreLayoutWithPendingSheets;
3157 renderView()->repaintViewAndCompositedLayers(); 3157 renderView()->repaintViewAndCompositedLayers();
3158 } 3158 }
3159 3159
3160 if (!needsRecalc) 3160 if (!needsRecalc)
3161 return; 3161 return;
3162 3162
3163 m_evaluateMediaQueriesOnStyleRecalc = true; 3163 m_evaluateMediaQueriesOnStyleRecalc = true;
3164 setNeedsStyleRecalc(); 3164 setNeedsStyleRecalc();
3165 3165
3166 if (updateType == RecalcStyleImmediately) 3166 if (updateTime == RecalcStyleImmediately)
3167 updateStyleIfNeeded(); 3167 updateStyleIfNeeded();
3168 } 3168 }
3169 3169
3170 void Document::notifySeamlessChildDocumentsOfStylesheetUpdate() const 3170 void Document::notifySeamlessChildDocumentsOfStylesheetUpdate() const
3171 { 3171 {
3172 // If we're not in a frame yet any potential child documents won't have a St yleResolver to update. 3172 // If we're not in a frame yet any potential child documents won't have a St yleResolver to update.
3173 if (!frame()) 3173 if (!frame())
3174 return; 3174 return;
3175 3175
3176 // Seamless child frames are expected to notify their seamless children recu rsively, so we only do direct children. 3176 // Seamless child frames are expected to notify their seamless children recu rsively, so we only do direct children.
(...skipping 2107 matching lines...) Expand 10 before | Expand all | Expand 10 after
5284 { 5284 {
5285 return DocumentLifecycleNotifier::create(this); 5285 return DocumentLifecycleNotifier::create(this);
5286 } 5286 }
5287 5287
5288 DocumentLifecycleNotifier* Document::lifecycleNotifier() 5288 DocumentLifecycleNotifier* Document::lifecycleNotifier()
5289 { 5289 {
5290 return static_cast<DocumentLifecycleNotifier*>(ExecutionContext::lifecycleNo tifier()); 5290 return static_cast<DocumentLifecycleNotifier*>(ExecutionContext::lifecycleNo tifier());
5291 } 5291 }
5292 5292
5293 } // namespace WebCore 5293 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/dom/Document.h ('k') | Source/core/dom/StyleSheetCollection.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698