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

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

Issue 21012002: Web Animations: Trigger and update CSS Animations backed by the Web Animations model (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Recompute and apply updates to active animations after style resolution. Created 7 years, 4 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 | Annotate | Revision Log
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. All rights reserved. 5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights reserved.
6 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> 6 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org>
7 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> 7 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org>
8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/)
9 * Copyright (c) 2011, Code Aurora Forum. All rights reserved. 9 * Copyright (c) 2011, Code Aurora Forum. All rights reserved.
10 * Copyright (C) Research In Motion Limited 2011. All rights reserved. 10 * Copyright (C) Research In Motion Limited 2011. All rights reserved.
(...skipping 18 matching lines...) Expand all
29 #include "config.h" 29 #include "config.h"
30 #include "core/css/resolver/StyleResolver.h" 30 #include "core/css/resolver/StyleResolver.h"
31 31
32 #include "CSSPropertyNames.h" 32 #include "CSSPropertyNames.h"
33 #include "HTMLNames.h" 33 #include "HTMLNames.h"
34 #include "RuntimeEnabledFeatures.h" 34 #include "RuntimeEnabledFeatures.h"
35 #include "StylePropertyShorthand.h" 35 #include "StylePropertyShorthand.h"
36 #include "core/animation/AnimatableValue.h" 36 #include "core/animation/AnimatableValue.h"
37 #include "core/animation/Animation.h" 37 #include "core/animation/Animation.h"
38 #include "core/animation/DocumentTimeline.h" 38 #include "core/animation/DocumentTimeline.h"
39 #include "core/animation/css/CSSAnimations.h"
39 #include "core/css/CSSCalculationValue.h" 40 #include "core/css/CSSCalculationValue.h"
40 #include "core/css/CSSDefaultStyleSheets.h" 41 #include "core/css/CSSDefaultStyleSheets.h"
41 #include "core/css/CSSFontSelector.h" 42 #include "core/css/CSSFontSelector.h"
42 #include "core/css/CSSKeyframeRule.h" 43 #include "core/css/CSSKeyframeRule.h"
43 #include "core/css/CSSKeyframesRule.h" 44 #include "core/css/CSSKeyframesRule.h"
44 #include "core/css/CSSParser.h" 45 #include "core/css/CSSParser.h"
45 #include "core/css/CSSReflectValue.h" 46 #include "core/css/CSSReflectValue.h"
46 #include "core/css/CSSRuleList.h" 47 #include "core/css/CSSRuleList.h"
47 #include "core/css/CSSSelector.h" 48 #include "core/css/CSSSelector.h"
48 #include "core/css/CSSStyleRule.h" 49 #include "core/css/CSSStyleRule.h"
(...skipping 567 matching lines...) Expand 10 before | Expand all | Expand 10 after
616 // FIXME: Shouldn't this be on RenderBody::styleDidChange? 617 // FIXME: Shouldn't this be on RenderBody::styleDidChange?
617 if (element->hasTagName(bodyTag)) 618 if (element->hasTagName(bodyTag))
618 document()->textLinkColors().setTextColor(state.style()->visitedDependen tColor(CSSPropertyColor)); 619 document()->textLinkColors().setTextColor(state.style()->visitedDependen tColor(CSSPropertyColor));
619 620
620 // Now return the style. 621 // Now return the style.
621 return state.takeStyle(); 622 return state.takeStyle();
622 } 623 }
623 624
624 PassRefPtr<RenderStyle> StyleResolver::styleForKeyframe(Element* e, const Render Style* elementStyle, const StyleKeyframe* keyframe, KeyframeValue& keyframeValue ) 625 PassRefPtr<RenderStyle> StyleResolver::styleForKeyframe(Element* e, const Render Style* elementStyle, const StyleKeyframe* keyframe, KeyframeValue& keyframeValue )
625 { 626 {
627 ASSERT(!RuntimeEnabledFeatures::webAnimationsCSSEnabled());
626 ASSERT(document()->frame()); 628 ASSERT(document()->frame());
627 ASSERT(documentSettings()); 629 ASSERT(documentSettings());
628 630
629 if (e == document()->documentElement()) 631 if (e == document()->documentElement())
630 resetDirectionAndWritingModeOnDocument(document()); 632 resetDirectionAndWritingModeOnDocument(document());
631 StyleResolverState state(document(), e); 633 StyleResolverState state(document(), e);
632 634
633 MatchResult result; 635 MatchResult result;
634 if (keyframe->properties()) 636 if (keyframe->properties())
635 result.addMatchedProperties(keyframe->properties()); 637 result.addMatchedProperties(keyframe->properties());
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
679 if (property != CSSPropertyWebkitAnimationTimingFunction) 681 if (property != CSSPropertyWebkitAnimationTimingFunction)
680 keyframeValue.addProperty(property); 682 keyframeValue.addProperty(property);
681 } 683 }
682 } 684 }
683 685
684 document()->didAccessStyleResolver(); 686 document()->didAccessStyleResolver();
685 687
686 return state.takeStyle(); 688 return state.takeStyle();
687 } 689 }
688 690
689 const StyleRuleKeyframes* StyleResolver::matchScopedKeyframesRule(Element* e, co nst StringImpl* animationName) 691 const StyleRuleKeyframes* StyleResolver::matchScopedKeyframesRule(const Element* e, const StringImpl* animationName)
690 { 692 {
691 if (m_styleTree.hasOnlyScopedResolverForDocument()) 693 if (m_styleTree.hasOnlyScopedResolverForDocument())
692 return m_styleTree.scopedStyleResolverForDocument()->keyframeStylesForAn imation(animationName); 694 return m_styleTree.scopedStyleResolverForDocument()->keyframeStylesForAn imation(animationName);
693 695
694 Vector<ScopedStyleResolver*, 8> stack; 696 Vector<ScopedStyleResolver*, 8> stack;
695 m_styleTree.resolveScopedKeyframesRules(e, stack); 697 m_styleTree.resolveScopedKeyframesRules(e, stack);
696 if (stack.isEmpty()) 698 if (stack.isEmpty())
697 return 0; 699 return 0;
698 700
699 for (size_t i = 0; i < stack.size(); ++i) { 701 for (size_t i = 0; i < stack.size(); ++i) {
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
969 matchAuthorRules(state.element(), collector, rulesToInclude & EmptyCSSRu les); 971 matchAuthorRules(state.element(), collector, rulesToInclude & EmptyCSSRu les);
970 } 972 }
971 973
972 return collector.matchedRuleList(); 974 return collector.matchedRuleList();
973 } 975 }
974 976
975 // ----------------------------------------------------------------------------- -------- 977 // ----------------------------------------------------------------------------- --------
976 // this is mostly boring stuff on how to apply a certain rule to the renderstyle ... 978 // this is mostly boring stuff on how to apply a certain rule to the renderstyle ...
977 979
978 template <StyleResolver::StyleApplicationPass pass> 980 template <StyleResolver::StyleApplicationPass pass>
979 void StyleResolver::applyAnimatedProperties(StyleResolverState& state, const Ele ment* target, const DocumentTimeline* timeline) 981 void StyleResolver::applyAnimatedProperties(StyleResolverState& state, const Ele ment* target, const DocumentTimeline* timeline, const CSSAnimationUpdate* update )
980 { 982 {
981 ASSERT(pass != VariableDefinitions); 983 ASSERT(pass != VariableDefinitions);
982 ASSERT(pass != AnimationProperties); 984 ASSERT(pass != AnimationProperties);
985 if (update && update->styles()) {
986 bool applyInheritedOnly = false;
987 bool isImportant = false;
988 StyleRule* rule = 0;
989 applyProperties<pass>(state, update->styles(), rule, isImportant, applyI nheritedOnly, PropertyWhitelistNone);
990 isImportant = true;
991 applyProperties<pass>(state, update->styles(), rule, isImportant, applyI nheritedOnly, PropertyWhitelistNone);
992 }
983 AnimationStack* animationStack = timeline->animationStack(target); 993 AnimationStack* animationStack = timeline->animationStack(target);
984 if (!animationStack) 994 if (!animationStack)
985 return; 995 return;
986 const Vector<Animation*>& animations = animationStack->activeAnimations(targ et); 996 const Vector<Animation*>& animations = animationStack->activeAnimations(targ et);
987 997
988 for (size_t i = 0; i < animations.size(); ++i) { 998 for (size_t i = 0; i < animations.size(); ++i) {
989 RefPtr<Animation> animation = animations.at(i); 999 RefPtr<Animation> animation = animations.at(i);
1000 if (update && update->isFiltered(animation->player()))
1001 continue;
990 const AnimationEffect::CompositableValueMap* compositableValues = animat ion->compositableValues(); 1002 const AnimationEffect::CompositableValueMap* compositableValues = animat ion->compositableValues();
991 for (AnimationEffect::CompositableValueMap::const_iterator iter = compos itableValues->begin(); iter != compositableValues->end(); ++iter) { 1003 for (AnimationEffect::CompositableValueMap::const_iterator iter = compos itableValues->begin(); iter != compositableValues->end(); ++iter) {
992 CSSPropertyID property = iter->key; 1004 CSSPropertyID property = iter->key;
993 if (!isPropertyForPass<pass>(property)) 1005 if (!isPropertyForPass<pass>(property))
994 continue; 1006 continue;
995 RefPtr<AnimatableValue> animatableValue = iter->value->compositeOnto (AnimatableValue::neutralValue()); 1007 RefPtr<AnimatableValue> animatableValue = iter->value->compositeOnto (AnimatableValue::neutralValue());
996 if (animatableValue->isDeferredSnapshot()) 1008 if (animatableValue->isDeferredSnapshot())
997 continue; 1009 continue;
998 RefPtr<CSSValue> cssValue = animatableValue->toCSSValue(); 1010 RefPtr<CSSValue> cssValue = animatableValue->toCSSValue();
999 if (pass == HighPriorityProperties && property == CSSPropertyLineHei ght) 1011 if (pass == HighPriorityProperties && property == CSSPropertyLineHei ght)
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
1181 static unsigned computeMatchedPropertiesHash(const MatchedProperties* properties , unsigned size) 1193 static unsigned computeMatchedPropertiesHash(const MatchedProperties* properties , unsigned size)
1182 { 1194 {
1183 return StringHasher::hashMemory(properties, sizeof(MatchedProperties) * size ); 1195 return StringHasher::hashMemory(properties, sizeof(MatchedProperties) * size );
1184 } 1196 }
1185 1197
1186 void StyleResolver::invalidateMatchedPropertiesCache() 1198 void StyleResolver::invalidateMatchedPropertiesCache()
1187 { 1199 {
1188 m_matchedPropertiesCache.clear(); 1200 m_matchedPropertiesCache.clear();
1189 } 1201 }
1190 1202
1203 PassOwnPtr<CSSAnimationUpdate> StyleResolver::calculateCSSAnimationUpdate(StyleR esolverState& state)
dglazkov 2013/08/01 16:12:46 This guy sits awkwardly here. Ideally, it would ta
dstockwell 2013/08/02 00:11:01 Done.
1204 {
1205 if (!RuntimeEnabledFeatures::webAnimationsCSSEnabled())
1206 return nullptr;
1207
1208 const Element* element = state.element();
1209 ASSERT(element);
1210
1211 if (CSSAnimations::needsUpdate(element, state.style())) {
dglazkov 2013/08/01 16:12:46 early return?
dstockwell 2013/08/02 00:11:01 Done.
1212 ActiveAnimations* activeAnimations = element->activeAnimations();
1213 const CSSAnimationDataList* animations = state.style()->animations();
1214 const CSSAnimations* cssAnimations = activeAnimations ? activeAnimations ->cssAnimations() : nullptr;
1215 EDisplay display = state.style()->display();
1216 return CSSAnimations::calculateUpdate(element, display, cssAnimations, a nimations, this);
1217 }
1218 return nullptr;
1219 }
1220
1191 void StyleResolver::applyMatchedProperties(StyleResolverState& state, const Matc hResult& matchResult) 1221 void StyleResolver::applyMatchedProperties(StyleResolverState& state, const Matc hResult& matchResult)
1192 { 1222 {
1193 const Element* element = state.element(); 1223 const Element* element = state.element();
1194 ASSERT(element); 1224 ASSERT(element);
1195 STYLE_STATS_ADD_MATCHED_PROPERTIES_SEARCH(); 1225 STYLE_STATS_ADD_MATCHED_PROPERTIES_SEARCH();
1196 1226
1197 unsigned cacheHash = matchResult.isCacheable ? computeMatchedPropertiesHash( matchResult.matchedProperties.data(), matchResult.matchedProperties.size()) : 0; 1227 unsigned cacheHash = matchResult.isCacheable ? computeMatchedPropertiesHash( matchResult.matchedProperties.data(), matchResult.matchedProperties.size()) : 0;
1198 bool applyInheritedOnly = false; 1228 bool applyInheritedOnly = false;
1199 const CachedMatchedProperties* cachedMatchedProperties = 0; 1229 const CachedMatchedProperties* cachedMatchedProperties = 0;
1200 1230
(...skipping 23 matching lines...) Expand all
1224 applyMatchedProperties<VariableDefinitions>(state, matchResult, false, 0, ma tchResult.matchedProperties.size() - 1, applyInheritedOnly); 1254 applyMatchedProperties<VariableDefinitions>(state, matchResult, false, 0, ma tchResult.matchedProperties.size() - 1, applyInheritedOnly);
1225 applyMatchedProperties<VariableDefinitions>(state, matchResult, true, matchR esult.ranges.firstAuthorRule, matchResult.ranges.lastAuthorRule, applyInheritedO nly); 1255 applyMatchedProperties<VariableDefinitions>(state, matchResult, true, matchR esult.ranges.firstAuthorRule, matchResult.ranges.lastAuthorRule, applyInheritedO nly);
1226 applyMatchedProperties<VariableDefinitions>(state, matchResult, true, matchR esult.ranges.firstUserRule, matchResult.ranges.lastUserRule, applyInheritedOnly) ; 1256 applyMatchedProperties<VariableDefinitions>(state, matchResult, true, matchR esult.ranges.firstUserRule, matchResult.ranges.lastUserRule, applyInheritedOnly) ;
1227 applyMatchedProperties<VariableDefinitions>(state, matchResult, true, matchR esult.ranges.firstUARule, matchResult.ranges.lastUARule, applyInheritedOnly); 1257 applyMatchedProperties<VariableDefinitions>(state, matchResult, true, matchR esult.ranges.firstUARule, matchResult.ranges.lastUARule, applyInheritedOnly);
1228 1258
1229 // Apply animation properties in order to apply animation results and trigge r transitions below. 1259 // Apply animation properties in order to apply animation results and trigge r transitions below.
1230 applyMatchedProperties<AnimationProperties>(state, matchResult, false, 0, ma tchResult.matchedProperties.size() - 1, applyInheritedOnly); 1260 applyMatchedProperties<AnimationProperties>(state, matchResult, false, 0, ma tchResult.matchedProperties.size() - 1, applyInheritedOnly);
1231 applyMatchedProperties<AnimationProperties>(state, matchResult, true, matchR esult.ranges.firstAuthorRule, matchResult.ranges.lastAuthorRule, applyInheritedO nly); 1261 applyMatchedProperties<AnimationProperties>(state, matchResult, true, matchR esult.ranges.firstAuthorRule, matchResult.ranges.lastAuthorRule, applyInheritedO nly);
1232 applyMatchedProperties<AnimationProperties>(state, matchResult, true, matchR esult.ranges.firstUserRule, matchResult.ranges.lastUserRule, applyInheritedOnly) ; 1262 applyMatchedProperties<AnimationProperties>(state, matchResult, true, matchR esult.ranges.firstUserRule, matchResult.ranges.lastUserRule, applyInheritedOnly) ;
1233 applyMatchedProperties<AnimationProperties>(state, matchResult, true, matchR esult.ranges.firstUARule, matchResult.ranges.lastUARule, applyInheritedOnly); 1263 applyMatchedProperties<AnimationProperties>(state, matchResult, true, matchR esult.ranges.firstUARule, matchResult.ranges.lastUARule, applyInheritedOnly);
1234 // FIXME: animations should be triggered here 1264
1265 OwnPtr<CSSAnimationUpdate> cssAnimationUpdate = calculateCSSAnimationUpdate( state);
1235 1266
1236 // Now we have all of the matched rules in the appropriate order. Walk the r ules and apply 1267 // Now we have all of the matched rules in the appropriate order. Walk the r ules and apply
1237 // high-priority properties first, i.e., those properties that other propert ies depend on. 1268 // high-priority properties first, i.e., those properties that other propert ies depend on.
1238 // The order is (1) high-priority not important, (2) high-priority important , (3) normal not important 1269 // The order is (1) high-priority not important, (2) high-priority important , (3) normal not important
1239 // and (4) normal important. 1270 // and (4) normal important.
1240 state.setLineHeightValue(0); 1271 state.setLineHeightValue(0);
1241 applyMatchedProperties<HighPriorityProperties>(state, matchResult, false, 0, matchResult.matchedProperties.size() - 1, applyInheritedOnly); 1272 applyMatchedProperties<HighPriorityProperties>(state, matchResult, false, 0, matchResult.matchedProperties.size() - 1, applyInheritedOnly);
1242 // Animation contributions are processed here because CSS Animations are ove rridable by user !important rules. 1273 // Animation contributions are processed here because CSS Animations are ove rridable by user !important rules.
1243 if (RuntimeEnabledFeatures::webAnimationsEnabled()) 1274 if (RuntimeEnabledFeatures::webAnimationsEnabled() && !applyInheritedOnly)
1244 applyAnimatedProperties<HighPriorityProperties>(state, element, element- >document()->timeline()); 1275 applyAnimatedProperties<HighPriorityProperties>(state, element, element- >document()->timeline(), cssAnimationUpdate.get());
1245 applyMatchedProperties<HighPriorityProperties>(state, matchResult, true, mat chResult.ranges.firstAuthorRule, matchResult.ranges.lastAuthorRule, applyInherit edOnly); 1276 applyMatchedProperties<HighPriorityProperties>(state, matchResult, true, mat chResult.ranges.firstAuthorRule, matchResult.ranges.lastAuthorRule, applyInherit edOnly);
1246 applyMatchedProperties<HighPriorityProperties>(state, matchResult, true, mat chResult.ranges.firstUserRule, matchResult.ranges.lastUserRule, applyInheritedOn ly); 1277 applyMatchedProperties<HighPriorityProperties>(state, matchResult, true, mat chResult.ranges.firstUserRule, matchResult.ranges.lastUserRule, applyInheritedOn ly);
1247 applyMatchedProperties<HighPriorityProperties>(state, matchResult, true, mat chResult.ranges.firstUARule, matchResult.ranges.lastUARule, applyInheritedOnly); 1278 applyMatchedProperties<HighPriorityProperties>(state, matchResult, true, mat chResult.ranges.firstUARule, matchResult.ranges.lastUARule, applyInheritedOnly);
1248 1279
1249 if (cachedMatchedProperties && cachedMatchedProperties->renderStyle->effecti veZoom() != state.style()->effectiveZoom()) { 1280 if (cachedMatchedProperties && cachedMatchedProperties->renderStyle->effecti veZoom() != state.style()->effectiveZoom()) {
1250 state.fontBuilder().setFontDirty(true); 1281 state.fontBuilder().setFontDirty(true);
1251 applyInheritedOnly = false; 1282 applyInheritedOnly = false;
1252 } 1283 }
1253 1284
1254 // If our font got dirtied, go ahead and update it now. 1285 // If our font got dirtied, go ahead and update it now.
1255 updateFont(state); 1286 updateFont(state);
1256 1287
1257 // Line-height is set when we are sure we decided on the font-size. 1288 // Line-height is set when we are sure we decided on the font-size.
1258 if (state.lineHeightValue()) 1289 if (state.lineHeightValue())
1259 applyProperty(state, CSSPropertyLineHeight, state.lineHeightValue()); 1290 applyProperty(state, CSSPropertyLineHeight, state.lineHeightValue());
1260 1291
1261 // Many properties depend on the font. If it changes we just apply all prope rties. 1292 // Many properties depend on the font. If it changes we just apply all prope rties.
1262 if (cachedMatchedProperties && cachedMatchedProperties->renderStyle->fontDes cription() != state.style()->fontDescription()) 1293 if (cachedMatchedProperties && cachedMatchedProperties->renderStyle->fontDes cription() != state.style()->fontDescription())
1263 applyInheritedOnly = false; 1294 applyInheritedOnly = false;
1264 1295
1265 // Now do the normal priority UA properties. 1296 // Now do the normal priority UA properties.
1266 applyMatchedProperties<LowPriorityProperties>(state, matchResult, false, mat chResult.ranges.firstUARule, matchResult.ranges.lastUARule, applyInheritedOnly); 1297 applyMatchedProperties<LowPriorityProperties>(state, matchResult, false, mat chResult.ranges.firstUARule, matchResult.ranges.lastUARule, applyInheritedOnly);
1267 1298
1268 // Cache the UA properties to pass them to RenderTheme in adjustRenderStyle. 1299 // Cache the UA properties to pass them to RenderTheme in adjustRenderStyle.
1269 state.cacheUserAgentBorderAndBackground(); 1300 state.cacheUserAgentBorderAndBackground();
1270 1301
1271 // Now do the author and user normal priority properties and all the !import ant properties. 1302 // Now do the author and user normal priority properties and all the !import ant properties.
1272 applyMatchedProperties<LowPriorityProperties>(state, matchResult, false, mat chResult.ranges.lastUARule + 1, matchResult.matchedProperties.size() - 1, applyI nheritedOnly); 1303 applyMatchedProperties<LowPriorityProperties>(state, matchResult, false, mat chResult.ranges.lastUARule + 1, matchResult.matchedProperties.size() - 1, applyI nheritedOnly);
1273 if (RuntimeEnabledFeatures::webAnimationsEnabled()) 1304 if (RuntimeEnabledFeatures::webAnimationsEnabled() && !applyInheritedOnly)
1274 applyAnimatedProperties<LowPriorityProperties>(state, element, element-> document()->timeline()); 1305 applyAnimatedProperties<LowPriorityProperties>(state, element, element-> document()->timeline(), cssAnimationUpdate.get());
1275 applyMatchedProperties<LowPriorityProperties>(state, matchResult, true, matc hResult.ranges.firstAuthorRule, matchResult.ranges.lastAuthorRule, applyInherite dOnly); 1306 applyMatchedProperties<LowPriorityProperties>(state, matchResult, true, matc hResult.ranges.firstAuthorRule, matchResult.ranges.lastAuthorRule, applyInherite dOnly);
1276 applyMatchedProperties<LowPriorityProperties>(state, matchResult, true, matc hResult.ranges.firstUserRule, matchResult.ranges.lastUserRule, applyInheritedOnl y); 1307 applyMatchedProperties<LowPriorityProperties>(state, matchResult, true, matc hResult.ranges.firstUserRule, matchResult.ranges.lastUserRule, applyInheritedOnl y);
1277 applyMatchedProperties<LowPriorityProperties>(state, matchResult, true, matc hResult.ranges.firstUARule, matchResult.ranges.lastUARule, applyInheritedOnly); 1308 applyMatchedProperties<LowPriorityProperties>(state, matchResult, true, matc hResult.ranges.firstUARule, matchResult.ranges.lastUARule, applyInheritedOnly);
1278 1309
1279 // Start loading resources referenced by this style. 1310 // Start loading resources referenced by this style.
1280 m_styleResourceLoader.loadPendingResources(state.style(), state.elementStyle Resources()); 1311 m_styleResourceLoader.loadPendingResources(state.style(), state.elementStyle Resources());
1281 1312
1282 ASSERT(!state.fontBuilder().fontDirty()); 1313 ASSERT(!state.fontBuilder().fontDirty());
1283 1314
1284 #ifdef STYLE_STATS 1315 #ifdef STYLE_STATS
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
1460 m_matchedPropertiesSearches, m_matchedPropertiesHit, m_matchedProperties SharedInheritedHit, m_matchedPropertiesToCache, m_matchedPropertiesEnteredIntoCa che); 1491 m_matchedPropertiesSearches, m_matchedPropertiesHit, m_matchedProperties SharedInheritedHit, m_matchedPropertiesToCache, m_matchedPropertiesEnteredIntoCa che);
1461 1492
1462 fprintf(stderr, "Total:\n"); 1493 fprintf(stderr, "Total:\n");
1463 printStyleStats(m_totalSearches, m_totalElementsEligibleForSharing, m_totalS tylesShared, m_totalSearchFoundSiblingForSharing, m_totalSearchesMissedSharing, 1494 printStyleStats(m_totalSearches, m_totalElementsEligibleForSharing, m_totalS tylesShared, m_totalSearchFoundSiblingForSharing, m_totalSearchesMissedSharing,
1464 m_totalMatchedPropertiesSearches, m_totalMatchedPropertiesHit, m_totalMa tchedPropertiesSharedInheritedHit, m_totalMatchedPropertiesToCache, m_totalMatch edPropertiesEnteredIntoCache); 1495 m_totalMatchedPropertiesSearches, m_totalMatchedPropertiesHit, m_totalMa tchedPropertiesSharedInheritedHit, m_totalMatchedPropertiesToCache, m_totalMatch edPropertiesEnteredIntoCache);
1465 fprintf(stderr, "----------------------------------------------------------- ---------------------\n"); 1496 fprintf(stderr, "----------------------------------------------------------- ---------------------\n");
1466 } 1497 }
1467 #endif 1498 #endif
1468 1499
1469 } // namespace WebCore 1500 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698