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 Apple Inc. All r
ights reserved. | 5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All r
ights 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 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
243 void RuleFeatureSet::clear() | 243 void RuleFeatureSet::clear() |
244 { | 244 { |
245 m_metadata.clear(); | 245 m_metadata.clear(); |
246 siblingRules.clear(); | 246 siblingRules.clear(); |
247 uncommonAttributeRules.clear(); | 247 uncommonAttributeRules.clear(); |
248 } | 248 } |
249 | 249 |
250 void RuleFeatureSet::scheduleStyleInvalidationForClassChange(const SpaceSplitStr
ing& changedClasses, Element* element) | 250 void RuleFeatureSet::scheduleStyleInvalidationForClassChange(const SpaceSplitStr
ing& changedClasses, Element* element) |
251 { | 251 { |
252 if (computeInvalidationSetsForClassChange(changedClasses, element) && !m_tar
getedStyleRecalcEnabled) | 252 if (computeInvalidationSetsForClassChange(changedClasses, element) && !m_tar
getedStyleRecalcEnabled) |
253 element->setNeedsStyleRecalc(); | 253 element->setNeedsStyleRecalc(SubtreeStyleChange); |
254 } | 254 } |
255 | 255 |
256 void RuleFeatureSet::scheduleStyleInvalidationForClassChange(const SpaceSplitStr
ing& oldClasses, const SpaceSplitString& newClasses, Element* element) | 256 void RuleFeatureSet::scheduleStyleInvalidationForClassChange(const SpaceSplitStr
ing& oldClasses, const SpaceSplitString& newClasses, Element* element) |
257 { | 257 { |
258 if (computeInvalidationSetsForClassChange(oldClasses, newClasses, element) &
& !m_targetedStyleRecalcEnabled) | 258 if (computeInvalidationSetsForClassChange(oldClasses, newClasses, element) &
& !m_targetedStyleRecalcEnabled) |
259 element->setNeedsStyleRecalc(); | 259 element->setNeedsStyleRecalc(SubtreeStyleChange); |
260 } | 260 } |
261 | 261 |
262 bool RuleFeatureSet::computeInvalidationSetsForClassChange(const SpaceSplitStrin
g& changedClasses, Element* element) | 262 bool RuleFeatureSet::computeInvalidationSetsForClassChange(const SpaceSplitStrin
g& changedClasses, Element* element) |
263 { | 263 { |
264 unsigned changedSize = changedClasses.size(); | 264 unsigned changedSize = changedClasses.size(); |
265 for (unsigned i = 0; i < changedSize; ++i) { | 265 for (unsigned i = 0; i < changedSize; ++i) { |
266 if (m_targetedStyleRecalcEnabled) | 266 if (m_targetedStyleRecalcEnabled) |
267 addClassToInvalidationSet(changedClasses[i], element); | 267 addClassToInvalidationSet(changedClasses[i], element); |
268 else if (m_metadata.classesInRules.contains(changedClasses[i])) | 268 else if (m_metadata.classesInRules.contains(changedClasses[i])) |
269 return true; | 269 return true; |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
404 | 404 |
405 if (thisElementNeedsStyleRecalc) | 405 if (thisElementNeedsStyleRecalc) |
406 element->setNeedsStyleRecalc(LocalStyleChange); | 406 element->setNeedsStyleRecalc(LocalStyleChange); |
407 | 407 |
408 invalidationClasses.remove(oldSize, invalidationClasses.size() - oldSize); | 408 invalidationClasses.remove(oldSize, invalidationClasses.size() - oldSize); |
409 element->clearChildNeedsStyleInvalidation(); | 409 element->clearChildNeedsStyleInvalidation(); |
410 return thisElementNeedsStyleRecalc; | 410 return thisElementNeedsStyleRecalc; |
411 } | 411 } |
412 | 412 |
413 } // namespace WebCore | 413 } // namespace WebCore |
OLD | NEW |