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

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

Issue 837633003: Delete dead painting code around m_pendingSheetLayout. (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/rendering/RenderBlock.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 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 DEFINE_STATIC_LOCAL(OwnPtr<WeakDocumentSet>, set, (adoptPtr(new WeakDocument Set()))); 235 DEFINE_STATIC_LOCAL(OwnPtr<WeakDocumentSet>, set, (adoptPtr(new WeakDocument Set())));
236 return *set; 236 return *set;
237 } 237 }
238 #endif 238 #endif
239 239
240 Document::Document(const DocumentInit& initializer, DocumentClassFlags documentC lasses) 240 Document::Document(const DocumentInit& initializer, DocumentClassFlags documentC lasses)
241 : ContainerNode(0, CreateDocument) 241 : ContainerNode(0, CreateDocument)
242 , TreeScope(*this) 242 , TreeScope(*this)
243 , m_module(nullptr) 243 , m_module(nullptr)
244 , m_evaluateMediaQueriesOnStyleRecalc(false) 244 , m_evaluateMediaQueriesOnStyleRecalc(false)
245 , m_pendingSheetLayout(NoLayoutWithPendingSheets)
246 , m_frame(initializer.frame()) 245 , m_frame(initializer.frame())
247 , m_domWindow(m_frame ? m_frame->domWindow() : 0) 246 , m_domWindow(m_frame ? m_frame->domWindow() : 0)
248 , m_importsController(initializer.importsController()) 247 , m_importsController(initializer.importsController())
249 , m_activeParserCount(0) 248 , m_activeParserCount(0)
250 , m_resumeParserWaitingForResourcesTimer(this, &Document::resumeParserWaitin gForResourcesTimerFired) 249 , m_resumeParserWaitingForResourcesTimer(this, &Document::resumeParserWaitin gForResourcesTimerFired)
251 , m_clearFocusedElementTimer(this, &Document::clearFocusedElementTimerFired) 250 , m_clearFocusedElementTimer(this, &Document::clearFocusedElementTimerFired)
252 , m_listenerTypes(0) 251 , m_listenerTypes(0)
253 , m_mutationObserverTypes(0) 252 , m_mutationObserverTypes(0)
254 , m_readyState(Complete) 253 , m_readyState(Complete)
255 , m_isParsing(false) 254 , m_isParsing(false)
(...skipping 1377 matching lines...) Expand 10 before | Expand all | Expand 10 after
1633 ensureStyleResolver().notifyResizeForViewportUnits(); 1632 ensureStyleResolver().notifyResizeForViewportUnits();
1634 setNeedsStyleRecalcForViewportUnits(); 1633 setNeedsStyleRecalcForViewportUnits();
1635 } 1634 }
1636 1635
1637 void Document::styleResolverChanged() 1636 void Document::styleResolverChanged()
1638 { 1637 {
1639 // styleResolverChanged() can be invoked during Document destruction. 1638 // styleResolverChanged() can be invoked during Document destruction.
1640 // We just skip that case. 1639 // We just skip that case.
1641 if (!m_styleEngine) 1640 if (!m_styleEngine)
1642 return; 1641 return;
1643
1644 m_styleEngine->resolverChanged(); 1642 m_styleEngine->resolverChanged();
1645
1646 // FIXME(sky): didLayoutWithPendingStylesheets never returns true anymore. R emove this.
1647 if (didLayoutWithPendingStylesheets()) {
1648 // We need to manually repaint because we avoid doing all repaints in la yout or style
1649 // recalc while sheets are still loading to avoid FOUC.
1650 m_pendingSheetLayout = IgnoreLayoutWithPendingSheets;
1651 }
1652 } 1643 }
1653 1644
1654 void Document::setHoverNode(PassRefPtr<Node> newHoverNode) 1645 void Document::setHoverNode(PassRefPtr<Node> newHoverNode)
1655 { 1646 {
1656 m_hoverNode = newHoverNode; 1647 m_hoverNode = newHoverNode;
1657 } 1648 }
1658 1649
1659 void Document::setActiveHoverElement(PassRefPtr<Element> newActiveElement) 1650 void Document::setActiveHoverElement(PassRefPtr<Element> newActiveElement)
1660 { 1651 {
1661 if (!newActiveElement) { 1652 if (!newActiveElement) {
(...skipping 1046 matching lines...) Expand 10 before | Expand all | Expand 10 after
2708 using namespace blink; 2699 using namespace blink;
2709 void showLiveDocumentInstances() 2700 void showLiveDocumentInstances()
2710 { 2701 {
2711 WeakDocumentSet& set = liveDocumentSet(); 2702 WeakDocumentSet& set = liveDocumentSet();
2712 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); 2703 fprintf(stderr, "There are %u documents currently alive:\n", set.size());
2713 for (WeakDocumentSet::const_iterator it = set.begin(); it != set.end(); ++it ) { 2704 for (WeakDocumentSet::const_iterator it = set.begin(); it != set.end(); ++it ) {
2714 fprintf(stderr, "- Document %p URL: %s\n", *it, (*it)->url().string().ut f8().data()); 2705 fprintf(stderr, "- Document %p URL: %s\n", *it, (*it)->url().string().ut f8().data());
2715 } 2706 }
2716 } 2707 }
2717 #endif 2708 #endif
OLDNEW
« no previous file with comments | « sky/engine/core/dom/Document.h ('k') | sky/engine/core/rendering/RenderBlock.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698