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

Side by Side Diff: sky/engine/core/dom/Document.cpp

Issue 846183002: Remove tracking of pending sheets. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 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
« no previous file with comments | « sky/engine/core/dom/Document.h ('k') | sky/engine/core/dom/StyleEngine.h » ('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 1086 matching lines...) Expand 10 before | Expand all | Expand 10 after
1097 if (documentElement->shouldCallRecalcStyle(change)) 1097 if (documentElement->shouldCallRecalcStyle(change))
1098 documentElement->recalcStyle(change); 1098 documentElement->recalcStyle(change);
1099 } 1099 }
1100 1100
1101 ensureStyleResolver().printStats(); 1101 ensureStyleResolver().printStats();
1102 1102
1103 view()->recalcOverflowAfterStyleChange(); 1103 view()->recalcOverflowAfterStyleChange();
1104 1104
1105 clearChildNeedsStyleRecalc(); 1105 clearChildNeedsStyleRecalc();
1106 1106
1107 if (m_styleEngine->hasResolver()) { 1107 m_styleEngine->resolver().clearStyleSharingList();
1108 StyleResolver& resolver = m_styleEngine->ensureResolver();
1109 resolver.clearStyleSharingList();
1110 }
1111 1108
1112 ASSERT(!needsStyleRecalc()); 1109 ASSERT(!needsStyleRecalc());
1113 ASSERT(!childNeedsStyleRecalc()); 1110 ASSERT(!childNeedsStyleRecalc());
1114 ASSERT(inStyleRecalc()); 1111 ASSERT(inStyleRecalc());
1115 m_lifecycle.advanceTo(DocumentLifecycle::StyleClean); 1112 m_lifecycle.advanceTo(DocumentLifecycle::StyleClean);
1116 } 1113 }
1117 1114
1118 void Document::updateRenderTreeForNodeIfNeeded(Node* node) 1115 void Document::updateRenderTreeForNodeIfNeeded(Node* node)
1119 { 1116 {
1120 bool needsRecalc = needsFullRenderTreeUpdate(); 1117 bool needsRecalc = needsFullRenderTreeUpdate();
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
1168 m_clearFocusedElementTimer.stop(); 1165 m_clearFocusedElementTimer.stop();
1169 1166
1170 if (m_focusedElement && !m_focusedElement->isFocusable()) 1167 if (m_focusedElement && !m_focusedElement->isFocusable())
1171 m_focusedElement->blur(); 1168 m_focusedElement->blur();
1172 } 1169 }
1173 1170
1174 StyleResolver* Document::styleResolver() const 1171 StyleResolver* Document::styleResolver() const
1175 { 1172 {
1176 if (!isActive()) 1173 if (!isActive())
1177 return 0; 1174 return 0;
1178 return m_styleEngine->resolver(); 1175 return &m_styleEngine->resolver();
1179 } 1176 }
1180 1177
1181 StyleResolver& Document::ensureStyleResolver() const 1178 StyleResolver& Document::ensureStyleResolver() const
1182 { 1179 {
1183 ASSERT(isActive()); 1180 ASSERT(isActive());
1184 return m_styleEngine->ensureResolver(); 1181 return m_styleEngine->resolver();
1185 }
1186
1187 void Document::clearStyleResolver()
1188 {
1189 m_styleEngine->clearResolver();
1190 } 1182 }
1191 1183
1192 void Document::attach(const AttachContext& context) 1184 void Document::attach(const AttachContext& context)
1193 { 1185 {
1194 ASSERT(m_lifecycle.state() == DocumentLifecycle::Inactive); 1186 ASSERT(m_lifecycle.state() == DocumentLifecycle::Inactive);
1195 1187
1196 m_styleEngine = StyleEngine::create(*this); 1188 m_styleEngine = StyleEngine::create(*this);
1197 1189
1198 m_renderView = new RenderView(this); 1190 m_renderView = new RenderView(this);
1199 setRenderer(m_renderView); 1191 setRenderer(m_renderView);
(...skipping 1499 matching lines...) Expand 10 before | Expand all | Expand 10 after
2699 using namespace blink; 2691 using namespace blink;
2700 void showLiveDocumentInstances() 2692 void showLiveDocumentInstances()
2701 { 2693 {
2702 WeakDocumentSet& set = liveDocumentSet(); 2694 WeakDocumentSet& set = liveDocumentSet();
2703 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); 2695 fprintf(stderr, "There are %u documents currently alive:\n", set.size());
2704 for (WeakDocumentSet::const_iterator it = set.begin(); it != set.end(); ++it ) { 2696 for (WeakDocumentSet::const_iterator it = set.begin(); it != set.end(); ++it ) {
2705 fprintf(stderr, "- Document %p URL: %s\n", *it, (*it)->url().string().ut f8().data()); 2697 fprintf(stderr, "- Document %p URL: %s\n", *it, (*it)->url().string().ut f8().data());
2706 } 2698 }
2707 } 2699 }
2708 #endif 2700 #endif
OLDNEW
« no previous file with comments | « sky/engine/core/dom/Document.h ('k') | sky/engine/core/dom/StyleEngine.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698