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

Unified Diff: Source/core/css/resolver/StyleResolver.cpp

Issue 203413008: Revert of Web Animations API: Load resources referenced in element.animate() (Closed) Base URL: svn://svn.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/css/resolver/StyleResolver.h ('k') | Source/core/css/resolver/StyleResourceLoader.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/resolver/StyleResolver.cpp
diff --git a/Source/core/css/resolver/StyleResolver.cpp b/Source/core/css/resolver/StyleResolver.cpp
index 1d9400695a121a2b7a7681cc5389b71e06b49586..7e1c31e0da08dd383102ea50b86456382287758f 100644
--- a/Source/core/css/resolver/StyleResolver.cpp
+++ b/Source/core/css/resolver/StyleResolver.cpp
@@ -629,13 +629,6 @@
features.addAttributeInASelector(contentAttrValues[i]);
}
-// Start loading resources referenced by this style.
-void StyleResolver::loadPendingResources(StyleResolverState& state)
-{
- m_styleResourceLoader.loadPendingResources(state.style(), state.elementStyleResources());
- document().styleEngine()->fontSelector()->loadPendingFonts();
-}
-
PassRefPtr<RenderStyle> StyleResolver::styleForElement(Element* element, RenderStyle* defaultParent, StyleSharingBehavior sharingBehavior,
RuleMatchingBehavior matchingBehavior)
{
@@ -790,7 +783,9 @@
// go ahead and update it a second time.
updateFont(state);
- loadPendingResources(state);
+ // Start loading resources referenced by this style.
+ m_styleResourceLoader.loadPendingResources(state.style(), state.elementStyleResources());
+ document().styleEngine()->fontSelector()->loadPendingFonts();
didAccess();
@@ -813,7 +808,6 @@
keyframes[i]->setPropertyValue(id, CSSAnimatableValueFactory::create(id, *state.style()).get());
}
}
-
return KeyframeEffectModel::create(keyframes);
}
@@ -961,7 +955,9 @@
addContentAttrValuesToFeatures(state.contentAttrValues(), m_features);
- loadPendingResources(state);
+ // Start loading resources referenced by this style.
+ m_styleResourceLoader.loadPendingResources(state.style(), state.elementStyleResources());
+ document().styleEngine()->fontSelector()->loadPendingFonts();
didAccess();
@@ -1089,9 +1085,6 @@
RenderStyle* style = state.style();
if (style->hasAutoZIndex() && (style->opacity() < 1.0f || style->hasTransform()))
style->setZIndex(0);
-
- // Start loading resources used by animations.
- loadPendingResources(state);
}
template <StyleResolver::StyleApplicationPass pass>
@@ -1336,7 +1329,9 @@
applyMatchedProperties<LowPriorityProperties>(state, matchResult, true, matchResult.ranges.firstUserRule, matchResult.ranges.lastUserRule, applyInheritedOnly);
applyMatchedProperties<LowPriorityProperties>(state, matchResult, true, matchResult.ranges.firstUARule, matchResult.ranges.lastUARule, applyInheritedOnly);
- loadPendingResources(state);
+ // Start loading resources referenced by this style.
+ m_styleResourceLoader.loadPendingResources(state.style(), state.elementStyleResources());
+ document().styleEngine()->fontSelector()->loadPendingFonts();
if (!cachedMatchedProperties && cacheHash && MatchedPropertiesCache::isCacheable(element, state.style(), state.parentStyle())) {
INCREMENT_STYLE_STATS_COUNTER(*this, matchedPropertyCacheAdded);
« no previous file with comments | « Source/core/css/resolver/StyleResolver.h ('k') | Source/core/css/resolver/StyleResourceLoader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698