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

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

Issue 202683005: optimizing layout performance when only transform3d matrix changed by Base URL: http://src.chromium.org/blink/trunk/
Patch Set: Created 6 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
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 461 matching lines...) Expand 10 before | Expand all | Expand 10 after
472 , m_elementDataCacheClearTimer(this, &Document::elementDataCacheClearTimerFi red) 472 , m_elementDataCacheClearTimer(this, &Document::elementDataCacheClearTimerFi red)
473 #ifndef NDEBUG 473 #ifndef NDEBUG
474 , m_didDispatchViewportPropertiesChanged(false) 474 , m_didDispatchViewportPropertiesChanged(false)
475 #endif 475 #endif
476 , m_animationClock(AnimationClock::create()) 476 , m_animationClock(AnimationClock::create())
477 , m_timeline(DocumentTimeline::create(this)) 477 , m_timeline(DocumentTimeline::create(this))
478 , m_transitionTimeline(TransitionTimeline::create(this)) 478 , m_transitionTimeline(TransitionTimeline::create(this))
479 , m_templateDocumentHost(0) 479 , m_templateDocumentHost(0)
480 , m_didAssociateFormControlsTimer(this, &Document::didAssociateFormControlsT imerFired) 480 , m_didAssociateFormControlsTimer(this, &Document::didAssociateFormControlsT imerFired)
481 , m_hasViewportUnits(false) 481 , m_hasViewportUnits(false)
482 , m_fastCompositing(false)
482 { 483 {
483 setClient(this); 484 setClient(this);
484 ScriptWrappable::init(this); 485 ScriptWrappable::init(this);
485 486
486 if (m_frame) { 487 if (m_frame) {
487 ASSERT(m_frame->page()); 488 ASSERT(m_frame->page());
488 provideContextFeaturesToDocumentFrom(*this, *m_frame->page()); 489 provideContextFeaturesToDocumentFrom(*this, *m_frame->page());
489 490
490 m_fetcher = m_frame->loader().documentLoader()->fetcher(); 491 m_fetcher = m_frame->loader().documentLoader()->fetcher();
491 } 492 }
(...skipping 1298 matching lines...) Expand 10 before | Expand all | Expand 10 after
1790 if (StyleResolverStats* stats = ensureStyleResolver().stats()) 1791 if (StyleResolverStats* stats = ensureStyleResolver().stats())
1791 stats->reset(); 1792 stats->reset();
1792 1793
1793 if (Element* documentElement = this->documentElement()) { 1794 if (Element* documentElement = this->documentElement()) {
1794 inheritHtmlAndBodyElementStyles(change); 1795 inheritHtmlAndBodyElementStyles(change);
1795 if (documentElement->shouldCallRecalcStyle(change)) 1796 if (documentElement->shouldCallRecalcStyle(change))
1796 documentElement->recalcStyle(change); 1797 documentElement->recalcStyle(change);
1797 } 1798 }
1798 1799
1799 ensureStyleResolver().printStats(); 1800 ensureStyleResolver().printStats();
1800 1801 view()->updateCompositingLayersAfterStyleChange(m_fastCompositing);
1801 view()->updateCompositingLayersAfterStyleChange(); 1802 m_fastCompositing = true;
1802 1803
1803 clearChildNeedsStyleRecalc(); 1804 clearChildNeedsStyleRecalc();
1804 1805
1805 if (m_styleEngine->hasResolver()) { 1806 if (m_styleEngine->hasResolver()) {
1806 // Pseudo element removal and similar may only work with these flags still set. Reset them after the style recalc. 1807 // Pseudo element removal and similar may only work with these flags still set. Reset them after the style recalc.
1807 StyleResolver& resolver = m_styleEngine->ensureResolver(); 1808 StyleResolver& resolver = m_styleEngine->ensureResolver();
1808 m_styleEngine->resetCSSFeatureFlags(resolver.ensureUpdatedRuleFeatur eSet()); 1809 m_styleEngine->resetCSSFeatureFlags(resolver.ensureUpdatedRuleFeatur eSet());
1809 resolver.clearStyleSharingList(); 1810 resolver.clearStyleSharingList();
1810 } 1811 }
1811 1812
(...skipping 3631 matching lines...) Expand 10 before | Expand all | Expand 10 after
5443 } 5444 }
5444 5445
5445 void Document::invalidateNodeListCaches(const QualifiedName* attrName) 5446 void Document::invalidateNodeListCaches(const QualifiedName* attrName)
5446 { 5447 {
5447 HashSet<LiveNodeListBase*>::iterator end = m_listsInvalidatedAtDocument.end( ); 5448 HashSet<LiveNodeListBase*>::iterator end = m_listsInvalidatedAtDocument.end( );
5448 for (HashSet<LiveNodeListBase*>::iterator it = m_listsInvalidatedAtDocument. begin(); it != end; ++it) 5449 for (HashSet<LiveNodeListBase*>::iterator it = m_listsInvalidatedAtDocument. begin(); it != end; ++it)
5449 (*it)->invalidateCache(attrName); 5450 (*it)->invalidateCache(attrName);
5450 } 5451 }
5451 5452
5452 } // namespace WebCore 5453 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698