| OLD | NEW |
| 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 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 201 | 201 |
| 202 if (root) | 202 if (root) |
| 203 m_rootDefaultStyle = styleForElement(root, 0, DisallowStyleSharing, Matc
hOnlyUserAgentRules); | 203 m_rootDefaultStyle = styleForElement(root, 0, DisallowStyleSharing, Matc
hOnlyUserAgentRules); |
| 204 | 204 |
| 205 if (m_rootDefaultStyle && view) | 205 if (m_rootDefaultStyle && view) |
| 206 m_medium = adoptPtr(new MediaQueryEvaluator(view->mediaType(), view->fra
me(), m_rootDefaultStyle.get())); | 206 m_medium = adoptPtr(new MediaQueryEvaluator(view->mediaType(), view->fra
me(), m_rootDefaultStyle.get())); |
| 207 | 207 |
| 208 m_styleTree.clear(); | 208 m_styleTree.clear(); |
| 209 | 209 |
| 210 DocumentStyleSheetCollection* styleSheetCollection = document->styleSheetCol
lection(); | 210 DocumentStyleSheetCollection* styleSheetCollection = document->styleSheetCol
lection(); |
| 211 m_ruleSets.initUserStyle(styleSheetCollection, *m_medium, *this); | 211 m_ruleSets.initUserStyle(styleSheetCollection, document->watchedCallbackSele
ctors(), *m_medium, *this); |
| 212 | 212 |
| 213 #if ENABLE(SVG_FONTS) | 213 #if ENABLE(SVG_FONTS) |
| 214 if (document->svgExtensions()) { | 214 if (document->svgExtensions()) { |
| 215 const HashSet<SVGFontFaceElement*>& svgFontFaceElements = document->svgE
xtensions()->svgFontFaceElements(); | 215 const HashSet<SVGFontFaceElement*>& svgFontFaceElements = document->svgE
xtensions()->svgFontFaceElements(); |
| 216 HashSet<SVGFontFaceElement*>::const_iterator end = svgFontFaceElements.e
nd(); | 216 HashSet<SVGFontFaceElement*>::const_iterator end = svgFontFaceElements.e
nd(); |
| 217 for (HashSet<SVGFontFaceElement*>::const_iterator it = svgFontFaceElemen
ts.begin(); it != end; ++it) | 217 for (HashSet<SVGFontFaceElement*>::const_iterator it = svgFontFaceElemen
ts.begin(); it != end; ++it) |
| 218 fontSelector()->addFontFaceRule((*it)->fontFaceRule()); | 218 fontSelector()->addFontFaceRule((*it)->fontFaceRule()); |
| 219 } | 219 } |
| 220 #endif | 220 #endif |
| 221 | 221 |
| (...skipping 845 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1067 s_styleNotYetAvailable->setDisplay(NONE); | 1067 s_styleNotYetAvailable->setDisplay(NONE); |
| 1068 s_styleNotYetAvailable->font().update(m_fontSelector); | 1068 s_styleNotYetAvailable->font().update(m_fontSelector); |
| 1069 } | 1069 } |
| 1070 element->document()->setHasNodesWithPlaceholderStyle(); | 1070 element->document()->setHasNodesWithPlaceholderStyle(); |
| 1071 return s_styleNotYetAvailable; | 1071 return s_styleNotYetAvailable; |
| 1072 } | 1072 } |
| 1073 | 1073 |
| 1074 StyleResolverState& state = m_state; | 1074 StyleResolverState& state = m_state; |
| 1075 state.initForStyleResolve(document(), element, defaultParent, regionForStyli
ng); | 1075 state.initForStyleResolve(document(), element, defaultParent, regionForStyli
ng); |
| 1076 if (sharingBehavior == AllowStyleSharing && !state.distributedToInsertionPoi
nt()) { | 1076 if (sharingBehavior == AllowStyleSharing && !state.distributedToInsertionPoi
nt()) { |
| 1077 RenderStyle* sharedStyle = locateSharedStyle(); | 1077 RefPtr<RenderStyle> sharedStyle = locateSharedStyle(); |
| 1078 if (sharedStyle) { | 1078 if (sharedStyle) { |
| 1079 state.clear(); | 1079 state.clear(); |
| 1080 return sharedStyle; | 1080 return sharedStyle.release(); |
| 1081 } | 1081 } |
| 1082 } | 1082 } |
| 1083 | 1083 |
| 1084 if (state.parentStyle()) { | 1084 if (state.parentStyle()) { |
| 1085 state.setStyle(RenderStyle::create()); | 1085 state.setStyle(RenderStyle::create()); |
| 1086 state.style()->inheritFrom(state.parentStyle(), isAtShadowBoundary(eleme
nt) ? RenderStyle::AtShadowBoundary : RenderStyle::NotAtShadowBoundary); | 1086 state.style()->inheritFrom(state.parentStyle(), isAtShadowBoundary(eleme
nt) ? RenderStyle::AtShadowBoundary : RenderStyle::NotAtShadowBoundary); |
| 1087 } else { | 1087 } else { |
| 1088 state.setStyle(defaultStyleForElement()); | 1088 state.setStyle(defaultStyleForElement()); |
| 1089 state.setParentStyle(RenderStyle::clone(state.style())); | 1089 state.setParentStyle(RenderStyle::clone(state.style())); |
| 1090 } | 1090 } |
| (...skipping 30 matching lines...) Expand all Loading... |
| 1121 if (matchingBehavior == MatchOnlyUserAgentRules) | 1121 if (matchingBehavior == MatchOnlyUserAgentRules) |
| 1122 matchUARules(collector); | 1122 matchUARules(collector); |
| 1123 else | 1123 else |
| 1124 matchAllRules(collector, m_matchAuthorAndUserStyles, matchingBehavior !=
MatchAllRulesExcludingSMIL); | 1124 matchAllRules(collector, m_matchAuthorAndUserStyles, matchingBehavior !=
MatchAllRulesExcludingSMIL); |
| 1125 | 1125 |
| 1126 applyMatchedProperties(collector.matchedResult(), element); | 1126 applyMatchedProperties(collector.matchedResult(), element); |
| 1127 | 1127 |
| 1128 // Clean up our style object's display and text decorations (among other fix
ups). | 1128 // Clean up our style object's display and text decorations (among other fix
ups). |
| 1129 adjustRenderStyle(state.style(), state.parentStyle(), element); | 1129 adjustRenderStyle(state.style(), state.parentStyle(), element); |
| 1130 | 1130 |
| 1131 state.clear(); // Clear out for the next resolve. | |
| 1132 | |
| 1133 document()->didAccessStyleResolver(); | 1131 document()->didAccessStyleResolver(); |
| 1134 | 1132 |
| 1135 if (element->hasTagName(bodyTag)) | 1133 if (element->hasTagName(bodyTag)) |
| 1136 document()->textLinkColors().setTextColor(state.style()->visitedDependen
tColor(CSSPropertyColor)); | 1134 document()->textLinkColors().setTextColor(state.style()->visitedDependen
tColor(CSSPropertyColor)); |
| 1137 | 1135 |
| 1138 // Now return the style. | 1136 // Now return the style and clear out for the next resolve. |
| 1139 return state.takeStyle(); | 1137 return state.takeStyleAndClear(); |
| 1140 } | 1138 } |
| 1141 | 1139 |
| 1142 PassRefPtr<RenderStyle> StyleResolver::styleForKeyframe(const RenderStyle* eleme
ntStyle, const StyleKeyframe* keyframe, KeyframeValue& keyframeValue) | 1140 PassRefPtr<RenderStyle> StyleResolver::styleForKeyframe(const RenderStyle* eleme
ntStyle, const StyleKeyframe* keyframe, KeyframeValue& keyframeValue) |
| 1143 { | 1141 { |
| 1144 MatchResult result; | 1142 MatchResult result; |
| 1145 if (keyframe->properties()) | 1143 if (keyframe->properties()) |
| 1146 result.addMatchedProperties(keyframe->properties()); | 1144 result.addMatchedProperties(keyframe->properties()); |
| 1147 | 1145 |
| 1148 ASSERT(!m_state.style()); | 1146 ASSERT(!m_state.style()); |
| 1149 | 1147 |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1247 if (initialListSize > 0 && (list[list.size() - 1].key() != 1)) { | 1245 if (initialListSize > 0 && (list[list.size() - 1].key() != 1)) { |
| 1248 static StyleKeyframe* hundredPercentKeyframe; | 1246 static StyleKeyframe* hundredPercentKeyframe; |
| 1249 if (!hundredPercentKeyframe) { | 1247 if (!hundredPercentKeyframe) { |
| 1250 hundredPercentKeyframe = StyleKeyframe::create().leakRef(); | 1248 hundredPercentKeyframe = StyleKeyframe::create().leakRef(); |
| 1251 hundredPercentKeyframe->setKeyText("100%"); | 1249 hundredPercentKeyframe->setKeyText("100%"); |
| 1252 } | 1250 } |
| 1253 KeyframeValue keyframeValue(1, 0); | 1251 KeyframeValue keyframeValue(1, 0); |
| 1254 keyframeValue.setStyle(styleForKeyframe(elementStyle, hundredPercentKeyf
rame, keyframeValue)); | 1252 keyframeValue.setStyle(styleForKeyframe(elementStyle, hundredPercentKeyf
rame, keyframeValue)); |
| 1255 list.insert(keyframeValue); | 1253 list.insert(keyframeValue); |
| 1256 } | 1254 } |
| 1255 m_state.clear(); |
| 1257 } | 1256 } |
| 1258 | 1257 |
| 1259 PassRefPtr<RenderStyle> StyleResolver::pseudoStyleForElement(Element* e, const P
seudoStyleRequest& pseudoStyleRequest, RenderStyle* parentStyle) | 1258 PassRefPtr<RenderStyle> StyleResolver::pseudoStyleForElement(Element* e, const P
seudoStyleRequest& pseudoStyleRequest, RenderStyle* parentStyle) |
| 1260 { | 1259 { |
| 1261 ASSERT(parentStyle); | 1260 ASSERT(parentStyle); |
| 1262 if (!e) | 1261 if (!e) |
| 1263 return 0; | 1262 return 0; |
| 1264 | 1263 |
| 1265 StyleResolverState& state = m_state; | 1264 StyleResolverState& state = m_state; |
| 1266 | 1265 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 1280 // Check UA, user and author rules. | 1279 // Check UA, user and author rules. |
| 1281 ElementRuleCollector collector(this, state); | 1280 ElementRuleCollector collector(this, state); |
| 1282 collector.setPseudoStyleRequest(pseudoStyleRequest); | 1281 collector.setPseudoStyleRequest(pseudoStyleRequest); |
| 1283 matchUARules(collector); | 1282 matchUARules(collector); |
| 1284 | 1283 |
| 1285 if (m_matchAuthorAndUserStyles) { | 1284 if (m_matchAuthorAndUserStyles) { |
| 1286 matchUserRules(collector, false); | 1285 matchUserRules(collector, false); |
| 1287 matchAuthorRules(collector, false); | 1286 matchAuthorRules(collector, false); |
| 1288 } | 1287 } |
| 1289 | 1288 |
| 1290 if (collector.matchedResult().matchedProperties.isEmpty()) | 1289 if (collector.matchedResult().matchedProperties.isEmpty()) { |
| 1290 state.clear(); |
| 1291 return 0; | 1291 return 0; |
| 1292 } |
| 1292 | 1293 |
| 1293 state.style()->setStyleType(pseudoStyleRequest.pseudoId); | 1294 state.style()->setStyleType(pseudoStyleRequest.pseudoId); |
| 1294 | 1295 |
| 1295 applyMatchedProperties(collector.matchedResult(), e); | 1296 applyMatchedProperties(collector.matchedResult(), e); |
| 1296 | 1297 |
| 1297 // Clean up our style object's display and text decorations (among other fix
ups). | 1298 // Clean up our style object's display and text decorations (among other fix
ups). |
| 1298 adjustRenderStyle(state.style(), m_state.parentStyle(), 0); | 1299 adjustRenderStyle(state.style(), m_state.parentStyle(), 0); |
| 1299 | 1300 |
| 1300 // Start loading resources referenced by this style. | 1301 // Start loading resources referenced by this style. |
| 1301 m_styleResourceLoader.loadPendingResources(m_state.style(), m_state.elementS
tyleResources()); | 1302 m_styleResourceLoader.loadPendingResources(m_state.style(), m_state.elementS
tyleResources()); |
| 1302 | 1303 |
| 1303 document()->didAccessStyleResolver(); | 1304 document()->didAccessStyleResolver(); |
| 1304 | 1305 |
| 1305 // Now return the style. | 1306 // Now return the style. |
| 1306 return state.takeStyle(); | 1307 return state.takeStyleAndClear(); |
| 1307 } | 1308 } |
| 1308 | 1309 |
| 1309 PassRefPtr<RenderStyle> StyleResolver::styleForPage(int pageIndex) | 1310 PassRefPtr<RenderStyle> StyleResolver::styleForPage(int pageIndex) |
| 1310 { | 1311 { |
| 1311 m_state.initForStyleResolve(document(), document()->documentElement()); // m
_rootElementStyle will be set to the document style. | 1312 m_state.initForStyleResolve(document(), document()->documentElement()); // m
_rootElementStyle will be set to the document style. |
| 1312 | 1313 |
| 1313 m_state.setStyle(RenderStyle::create()); | 1314 m_state.setStyle(RenderStyle::create()); |
| 1314 m_state.style()->inheritFrom(m_state.rootElementStyle()); | 1315 m_state.style()->inheritFrom(m_state.rootElementStyle()); |
| 1315 | 1316 |
| 1316 PageRuleCollector collector(m_state, pageIndex); | 1317 PageRuleCollector collector(m_state, pageIndex); |
| (...skipping 19 matching lines...) Expand all Loading... |
| 1336 applyProperty(CSSPropertyLineHeight, m_state.lineHeightValue()); | 1337 applyProperty(CSSPropertyLineHeight, m_state.lineHeightValue()); |
| 1337 | 1338 |
| 1338 applyMatchedProperties<LowPriorityProperties>(result, false, 0, result.match
edProperties.size() - 1, inheritedOnly); | 1339 applyMatchedProperties<LowPriorityProperties>(result, false, 0, result.match
edProperties.size() - 1, inheritedOnly); |
| 1339 | 1340 |
| 1340 // Start loading resources referenced by this style. | 1341 // Start loading resources referenced by this style. |
| 1341 m_styleResourceLoader.loadPendingResources(m_state.style(), m_state.elementS
tyleResources()); | 1342 m_styleResourceLoader.loadPendingResources(m_state.style(), m_state.elementS
tyleResources()); |
| 1342 | 1343 |
| 1343 document()->didAccessStyleResolver(); | 1344 document()->didAccessStyleResolver(); |
| 1344 | 1345 |
| 1345 // Now return the style. | 1346 // Now return the style. |
| 1346 return m_state.takeStyle(); | 1347 return m_state.takeStyleAndClear(); |
| 1347 } | 1348 } |
| 1348 | 1349 |
| 1349 PassRefPtr<RenderStyle> StyleResolver::defaultStyleForElement() | 1350 PassRefPtr<RenderStyle> StyleResolver::defaultStyleForElement() |
| 1350 { | 1351 { |
| 1351 m_state.setStyle(RenderStyle::create()); | 1352 m_state.setStyle(RenderStyle::create()); |
| 1352 // Make sure our fonts are initialized if we don't inherit them from our par
ent style. | 1353 // Make sure our fonts are initialized if we don't inherit them from our par
ent style. |
| 1353 if (Settings* settings = documentSettings()) { | 1354 if (Settings* settings = documentSettings()) { |
| 1354 initializeFontStyle(settings); | 1355 initializeFontStyle(settings); |
| 1355 m_state.style()->font().update(fontSelector()); | 1356 m_state.style()->font().update(fontSelector()); |
| 1356 } else | 1357 } else |
| (...skipping 422 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1779 matchUserRules(collector, rulesToInclude & EmptyCSSRules); | 1780 matchUserRules(collector, rulesToInclude & EmptyCSSRules); |
| 1780 } | 1781 } |
| 1781 | 1782 |
| 1782 if (m_matchAuthorAndUserStyles && (rulesToInclude & AuthorCSSRules)) { | 1783 if (m_matchAuthorAndUserStyles && (rulesToInclude & AuthorCSSRules)) { |
| 1783 collector.setSameOriginOnly(!(rulesToInclude & CrossOriginCSSRules)); | 1784 collector.setSameOriginOnly(!(rulesToInclude & CrossOriginCSSRules)); |
| 1784 | 1785 |
| 1785 // Check the rules in author sheets. | 1786 // Check the rules in author sheets. |
| 1786 matchAuthorRules(collector, rulesToInclude & EmptyCSSRules); | 1787 matchAuthorRules(collector, rulesToInclude & EmptyCSSRules); |
| 1787 } | 1788 } |
| 1788 | 1789 |
| 1790 m_state.clear(); |
| 1789 return collector.matchedRuleList(); | 1791 return collector.matchedRuleList(); |
| 1790 } | 1792 } |
| 1791 | 1793 |
| 1792 // -----------------------------------------------------------------------------
-------- | 1794 // -----------------------------------------------------------------------------
-------- |
| 1793 // this is mostly boring stuff on how to apply a certain rule to the renderstyle
... | 1795 // this is mostly boring stuff on how to apply a certain rule to the renderstyle
... |
| 1794 | 1796 |
| 1795 Length StyleResolver::convertToIntLength(CSSPrimitiveValue* primitiveValue, Rend
erStyle* style, RenderStyle* rootStyle, double multiplier) | 1797 Length StyleResolver::convertToIntLength(CSSPrimitiveValue* primitiveValue, Rend
erStyle* style, RenderStyle* rootStyle, double multiplier) |
| 1796 { | 1798 { |
| 1797 return primitiveValue ? primitiveValue->convertToLength<FixedIntegerConversi
on | PercentConversion | CalculatedConversion | FractionConversion | ViewportPer
centageConversion>(style, rootStyle, multiplier) : Length(Undefined); | 1799 return primitiveValue ? primitiveValue->convertToLength<FixedIntegerConversi
on | PercentConversion | CalculatedConversion | FractionConversion | ViewportPer
centageConversion>(style, rootStyle, multiplier) : Length(Undefined); |
| 1798 } | 1800 } |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1916 break; | 1918 break; |
| 1917 } | 1919 } |
| 1918 return false; | 1920 return false; |
| 1919 } | 1921 } |
| 1920 | 1922 |
| 1921 template <StyleResolver::StyleApplicationPass pass> | 1923 template <StyleResolver::StyleApplicationPass pass> |
| 1922 void StyleResolver::applyProperties(const StylePropertySet* properties, StyleRul
e* rule, bool isImportant, bool inheritedOnly, PropertyWhitelistType propertyWhi
telistType) | 1924 void StyleResolver::applyProperties(const StylePropertySet* properties, StyleRul
e* rule, bool isImportant, bool inheritedOnly, PropertyWhitelistType propertyWhi
telistType) |
| 1923 { | 1925 { |
| 1924 ASSERT((propertyWhitelistType != PropertyWhitelistRegion) || m_state.regionF
orStyling()); | 1926 ASSERT((propertyWhitelistType != PropertyWhitelistRegion) || m_state.regionF
orStyling()); |
| 1925 InspectorInstrumentationCookie cookie = InspectorInstrumentation::willProces
sRule(document(), rule, this); | 1927 InspectorInstrumentationCookie cookie = InspectorInstrumentation::willProces
sRule(document(), rule, this); |
| 1928 #if ENABLE(CSS_CALLBACKS) |
| 1929 m_state.setRule(rule); |
| 1930 #endif |
| 1926 | 1931 |
| 1927 unsigned propertyCount = properties->propertyCount(); | 1932 unsigned propertyCount = properties->propertyCount(); |
| 1928 for (unsigned i = 0; i < propertyCount; ++i) { | 1933 for (unsigned i = 0; i < propertyCount; ++i) { |
| 1929 StylePropertySet::PropertyReference current = properties->propertyAt(i); | 1934 StylePropertySet::PropertyReference current = properties->propertyAt(i); |
| 1930 if (isImportant != current.isImportant()) | 1935 if (isImportant != current.isImportant()) |
| 1931 continue; | 1936 continue; |
| 1932 if (inheritedOnly && !current.isInherited()) { | 1937 if (inheritedOnly && !current.isInherited()) { |
| 1933 // If the property value is explicitly inherited, we need to apply f
urther non-inherited properties | 1938 // If the property value is explicitly inherited, we need to apply f
urther non-inherited properties |
| 1934 // as they might override the value inherited here. For this reason
we don't allow declarations with | 1939 // as they might override the value inherited here. For this reason
we don't allow declarations with |
| 1935 // explicitly inherited properties to be cached. | 1940 // explicitly inherited properties to be cached. |
| (...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2179 if (!isCacheableInMatchedPropertiesCache(state.element(), state.style(), sta
te.parentStyle())) | 2184 if (!isCacheableInMatchedPropertiesCache(state.element(), state.style(), sta
te.parentStyle())) |
| 2180 return; | 2185 return; |
| 2181 addToMatchedPropertiesCache(state.style(), state.parentStyle(), cacheHash, m
atchResult); | 2186 addToMatchedPropertiesCache(state.style(), state.parentStyle(), cacheHash, m
atchResult); |
| 2182 } | 2187 } |
| 2183 | 2188 |
| 2184 void StyleResolver::applyPropertyToStyle(CSSPropertyID id, CSSValue* value, Rend
erStyle* style) | 2189 void StyleResolver::applyPropertyToStyle(CSSPropertyID id, CSSValue* value, Rend
erStyle* style) |
| 2185 { | 2190 { |
| 2186 m_state.initForStyleResolve(document(), 0, style); | 2191 m_state.initForStyleResolve(document(), 0, style); |
| 2187 m_state.setStyle(style); | 2192 m_state.setStyle(style); |
| 2188 applyPropertyToCurrentStyle(id, value); | 2193 applyPropertyToCurrentStyle(id, value); |
| 2194 m_state.clear(); |
| 2189 } | 2195 } |
| 2190 | 2196 |
| 2191 void StyleResolver::applyPropertyToCurrentStyle(CSSPropertyID id, CSSValue* valu
e) | 2197 void StyleResolver::applyPropertyToCurrentStyle(CSSPropertyID id, CSSValue* valu
e) |
| 2192 { | 2198 { |
| 2193 if (value) | 2199 if (value) |
| 2194 applyProperty(id, value); | 2200 applyProperty(id, value); |
| 2195 } | 2201 } |
| 2196 | 2202 |
| 2197 bool StyleResolver::useSVGZoomRules() | 2203 bool StyleResolver::useSVGZoomRules() |
| 2198 { | 2204 { |
| (...skipping 607 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2806 } | 2812 } |
| 2807 case CSSPropertyWebkitTapHighlightColor: { | 2813 case CSSPropertyWebkitTapHighlightColor: { |
| 2808 HANDLE_INHERIT_AND_INITIAL(tapHighlightColor, TapHighlightColor); | 2814 HANDLE_INHERIT_AND_INITIAL(tapHighlightColor, TapHighlightColor); |
| 2809 if (!primitiveValue) | 2815 if (!primitiveValue) |
| 2810 break; | 2816 break; |
| 2811 | 2817 |
| 2812 Color col = m_state.resolveColorFromPrimitiveValue(primitiveValue); | 2818 Color col = m_state.resolveColorFromPrimitiveValue(primitiveValue); |
| 2813 state.style()->setTapHighlightColor(col); | 2819 state.style()->setTapHighlightColor(col); |
| 2814 return; | 2820 return; |
| 2815 } | 2821 } |
| 2822 #if ENABLE(CSS_CALLBACKS) |
| 2823 case CSSPropertyInternalCallback: { |
| 2824 if (isInherit || isInitial) |
| 2825 return; |
| 2826 if (primitiveValue) { |
| 2827 switch (primitiveValue->getValueID()) { |
| 2828 case CSSValueInternalPresence: |
| 2829 state.style()->addCallbackSelector( |
| 2830 state.rule()->selectorList().selectorsText(), |
| 2831 state.element()->document()); |
| 2832 return; |
| 2833 default: |
| 2834 break; |
| 2835 } |
| 2836 } |
| 2837 break; |
| 2838 } |
| 2839 #endif |
| 2816 case CSSPropertyInvalid: | 2840 case CSSPropertyInvalid: |
| 2817 return; | 2841 return; |
| 2818 // Directional properties are resolved by resolveDirectionAwareProperty() be
fore the switch. | 2842 // Directional properties are resolved by resolveDirectionAwareProperty() be
fore the switch. |
| 2819 case CSSPropertyWebkitBorderEndColor: | 2843 case CSSPropertyWebkitBorderEndColor: |
| 2820 case CSSPropertyWebkitBorderEndStyle: | 2844 case CSSPropertyWebkitBorderEndStyle: |
| 2821 case CSSPropertyWebkitBorderEndWidth: | 2845 case CSSPropertyWebkitBorderEndWidth: |
| 2822 case CSSPropertyWebkitBorderStartColor: | 2846 case CSSPropertyWebkitBorderStartColor: |
| 2823 case CSSPropertyWebkitBorderStartStyle: | 2847 case CSSPropertyWebkitBorderStartStyle: |
| 2824 case CSSPropertyWebkitBorderStartWidth: | 2848 case CSSPropertyWebkitBorderStartWidth: |
| 2825 case CSSPropertyWebkitBorderBeforeColor: | 2849 case CSSPropertyWebkitBorderBeforeColor: |
| (...skipping 605 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3431 info.addMember(m_state, "state"); | 3455 info.addMember(m_state, "state"); |
| 3432 | 3456 |
| 3433 // FIXME: move this to a place where it would be called only once? | 3457 // FIXME: move this to a place where it would be called only once? |
| 3434 info.addMember(CSSDefaultStyleSheets::defaultStyle, "defaultStyle"); | 3458 info.addMember(CSSDefaultStyleSheets::defaultStyle, "defaultStyle"); |
| 3435 info.addMember(CSSDefaultStyleSheets::defaultQuirksStyle, "defaultQuirksStyl
e"); | 3459 info.addMember(CSSDefaultStyleSheets::defaultQuirksStyle, "defaultQuirksStyl
e"); |
| 3436 info.addMember(CSSDefaultStyleSheets::defaultPrintStyle, "defaultPrintStyle"
); | 3460 info.addMember(CSSDefaultStyleSheets::defaultPrintStyle, "defaultPrintStyle"
); |
| 3437 info.addMember(CSSDefaultStyleSheets::defaultViewSourceStyle, "defaultViewSo
urceStyle"); | 3461 info.addMember(CSSDefaultStyleSheets::defaultViewSourceStyle, "defaultViewSo
urceStyle"); |
| 3438 } | 3462 } |
| 3439 | 3463 |
| 3440 } // namespace WebCore | 3464 } // namespace WebCore |
| OLD | NEW |