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

Side by Side Diff: third_party/WebKit/Source/core/css/resolver/StyleResolver.cpp

Issue 2557533005: Collect active stylesheets and and apply asynchronously. (Closed)
Patch Set: [Mac] Missing style recalc for device scale change Created 4 years 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) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com) 3 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com)
4 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com) 4 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com)
5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. 5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc.
6 * All rights reserved. 6 * All rights reserved.
7 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> 7 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org>
8 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> 8 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org>
9 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. 9 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved.
10 * (http://www.torchmobile.com/) 10 * (http://www.torchmobile.com/)
(...skipping 1602 matching lines...) Expand 10 before | Expand all | Expand 10 after
1613 const MatchedProperties* properties, 1613 const MatchedProperties* properties,
1614 unsigned size) { 1614 unsigned size) {
1615 return StringHasher::hashMemory(properties, sizeof(MatchedProperties) * size); 1615 return StringHasher::hashMemory(properties, sizeof(MatchedProperties) * size);
1616 } 1616 }
1617 1617
1618 void StyleResolver::invalidateMatchedPropertiesCache() { 1618 void StyleResolver::invalidateMatchedPropertiesCache() {
1619 m_matchedPropertiesCache.clear(); 1619 m_matchedPropertiesCache.clear();
1620 } 1620 }
1621 1621
1622 void StyleResolver::notifyResizeForViewportUnits() { 1622 void StyleResolver::notifyResizeForViewportUnits() {
1623 document().styleEngine().updateActiveStyle();
1623 m_matchedPropertiesCache.clearViewportDependent(); 1624 m_matchedPropertiesCache.clearViewportDependent();
1624 } 1625 }
1625 1626
1626 void StyleResolver::applyMatchedPropertiesAndCustomPropertyAnimations( 1627 void StyleResolver::applyMatchedPropertiesAndCustomPropertyAnimations(
1627 StyleResolverState& state, 1628 StyleResolverState& state,
1628 const MatchResult& matchResult, 1629 const MatchResult& matchResult,
1629 const Element* animatingElement) { 1630 const Element* animatingElement) {
1630 CacheSuccess cacheSuccess = applyMatchedCache(state, matchResult); 1631 CacheSuccess cacheSuccess = applyMatchedCache(state, matchResult);
1631 NeedsApplyPass needsApplyPass; 1632 NeedsApplyPass needsApplyPass;
1632 if (!cacheSuccess.isFullCacheHit()) { 1633 if (!cacheSuccess.isFullCacheHit()) {
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after
1967 DEFINE_TRACE(StyleResolver) { 1968 DEFINE_TRACE(StyleResolver) {
1968 visitor->trace(m_matchedPropertiesCache); 1969 visitor->trace(m_matchedPropertiesCache);
1969 visitor->trace(m_selectorFilter); 1970 visitor->trace(m_selectorFilter);
1970 visitor->trace(m_styleSharingLists); 1971 visitor->trace(m_styleSharingLists);
1971 visitor->trace(m_pendingStyleSheets); 1972 visitor->trace(m_pendingStyleSheets);
1972 visitor->trace(m_document); 1973 visitor->trace(m_document);
1973 visitor->trace(m_tracker); 1974 visitor->trace(m_tracker);
1974 } 1975 }
1975 1976
1976 } // namespace blink 1977 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698