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

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

Issue 2032243003: Make CSSValueList store const CSSValues (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@_make_computedstyledeclaration_return_const
Patch Set: Small fix n CSSOM Created 4 years, 6 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
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 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 379 matching lines...) Expand 10 before | Expand all | Expand 10 after
390 390
391 StylePropertySet::PropertyReference contentProperty = propertySet.propertyAt (propertyIndex); 391 StylePropertySet::PropertyReference contentProperty = propertySet.propertyAt (propertyIndex);
392 CSSValue* contentValue = contentProperty.value(); 392 CSSValue* contentValue = contentProperty.value();
393 393
394 if (!contentValue->isValueList()) 394 if (!contentValue->isValueList())
395 return; 395 return;
396 396
397 for (auto& item : toCSSValueList(*contentValue)) { 397 for (auto& item : toCSSValueList(*contentValue)) {
398 if (!item->isFunctionValue()) 398 if (!item->isFunctionValue())
399 continue; 399 continue;
400 CSSFunctionValue* functionValue = toCSSFunctionValue(item.get()); 400 const CSSFunctionValue* functionValue = toCSSFunctionValue(item.get());
401 if (functionValue->functionType() != CSSValueAttr) 401 if (functionValue->functionType() != CSSValueAttr)
402 continue; 402 continue;
403 ensureAttributeInvalidationSet(AtomicString(toCSSCustomIdentValue(functi onValue->item(0))->value()), InvalidateDescendants).setInvalidatesSelf(); 403 ensureAttributeInvalidationSet(AtomicString(toCSSCustomIdentValue(functi onValue->item(0))->value()), InvalidateDescendants).setInvalidatesSelf();
404 } 404 }
405 } 405 }
406 406
407 std::pair<const CSSSelector*, RuleFeatureSet::UseFeaturesType> 407 std::pair<const CSSSelector*, RuleFeatureSet::UseFeaturesType>
408 RuleFeatureSet::extractInvalidationSetFeatures(const CSSSelector& selector, Inva lidationSetFeatures& features, PositionType position, CSSSelector::PseudoType ps eudo) 408 RuleFeatureSet::extractInvalidationSetFeatures(const CSSSelector& selector, Inva lidationSetFeatures& features, PositionType position, CSSSelector::PseudoType ps eudo)
409 { 409 {
410 bool foundFeatures = false; 410 bool foundFeatures = false;
(...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after
784 } 784 }
785 } 785 }
786 786
787 DEFINE_TRACE(RuleFeatureSet) 787 DEFINE_TRACE(RuleFeatureSet)
788 { 788 {
789 visitor->trace(siblingRules); 789 visitor->trace(siblingRules);
790 visitor->trace(uncommonAttributeRules); 790 visitor->trace(uncommonAttributeRules);
791 } 791 }
792 792
793 } // namespace blink 793 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698