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

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

Issue 2346193002: Split CSSPrimitiveValue into CSSPrimitiveValue and CSSIdentifierValue (Closed)
Patch Set: Replaced ASSERTs with DCHECKS in presubmit warnings Created 4 years, 3 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, 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 27 matching lines...) Expand all
38 #include "core/animation/InvalidatableInterpolation.h" 38 #include "core/animation/InvalidatableInterpolation.h"
39 #include "core/animation/KeyframeEffect.h" 39 #include "core/animation/KeyframeEffect.h"
40 #include "core/animation/StyleInterpolation.h" 40 #include "core/animation/StyleInterpolation.h"
41 #include "core/animation/animatable/AnimatableValue.h" 41 #include "core/animation/animatable/AnimatableValue.h"
42 #include "core/animation/css/CSSAnimatableValueFactory.h" 42 #include "core/animation/css/CSSAnimatableValueFactory.h"
43 #include "core/animation/css/CSSAnimations.h" 43 #include "core/animation/css/CSSAnimations.h"
44 #include "core/css/CSSCalculationValue.h" 44 #include "core/css/CSSCalculationValue.h"
45 #include "core/css/CSSCustomIdentValue.h" 45 #include "core/css/CSSCustomIdentValue.h"
46 #include "core/css/CSSDefaultStyleSheets.h" 46 #include "core/css/CSSDefaultStyleSheets.h"
47 #include "core/css/CSSFontSelector.h" 47 #include "core/css/CSSFontSelector.h"
48 #include "core/css/CSSIdentifierValue.h"
48 #include "core/css/CSSKeyframeRule.h" 49 #include "core/css/CSSKeyframeRule.h"
49 #include "core/css/CSSKeyframesRule.h" 50 #include "core/css/CSSKeyframesRule.h"
50 #include "core/css/CSSReflectValue.h" 51 #include "core/css/CSSReflectValue.h"
51 #include "core/css/CSSRuleList.h" 52 #include "core/css/CSSRuleList.h"
52 #include "core/css/CSSSelector.h" 53 #include "core/css/CSSSelector.h"
53 #include "core/css/CSSStyleRule.h" 54 #include "core/css/CSSStyleRule.h"
54 #include "core/css/CSSValueList.h" 55 #include "core/css/CSSValueList.h"
55 #include "core/css/ElementRuleCollector.h" 56 #include "core/css/ElementRuleCollector.h"
56 #include "core/css/FontFace.h" 57 #include "core/css/FontFace.h"
57 #include "core/css/MediaQueryEvaluator.h" 58 #include "core/css/MediaQueryEvaluator.h"
(...skipping 732 matching lines...) Expand 10 before | Expand all | Expand 10 after
790 791
791 ElementRuleCollector collector(state.elementContext(), m_selectorFilter, state.style()); 792 ElementRuleCollector collector(state.elementContext(), m_selectorFilter, state.style());
792 793
793 matchAllRules(state, collector, matchingBehavior != MatchAllRulesExcludi ngSMIL); 794 matchAllRules(state, collector, matchingBehavior != MatchAllRulesExcludi ngSMIL);
794 795
795 // TODO(dominicc): Remove this counter when Issue 590014 is fixed. 796 // TODO(dominicc): Remove this counter when Issue 590014 is fixed.
796 if (element->hasTagName(HTMLNames::summaryTag)) { 797 if (element->hasTagName(HTMLNames::summaryTag)) {
797 MatchedPropertiesRange properties = collector.matchedResult().author Rules(); 798 MatchedPropertiesRange properties = collector.matchedResult().author Rules();
798 for (auto it = properties.begin(); it != properties.end(); ++it) { 799 for (auto it = properties.begin(); it != properties.end(); ++it) {
799 const CSSValue* value = it->properties->getPropertyCSSValue(CSSP ropertyDisplay); 800 const CSSValue* value = it->properties->getPropertyCSSValue(CSSP ropertyDisplay);
800 if (value && value->isPrimitiveValue() && toCSSPrimitiveValue(*v alue).getValueID() == CSSValueBlock) 801 if (value && value->isIdentifierValue() && toCSSIdentifierValue( *value).getValueID() == CSSValueBlock)
801 UseCounter::count(element->document(), UseCounter::SummaryEl ementWithDisplayBlockAuthorRule); 802 UseCounter::count(element->document(), UseCounter::SummaryEl ementWithDisplayBlockAuthorRule);
802 } 803 }
803 } 804 }
804 805
805 if (element->computedStyle() && element->computedStyle()->textAutosizing Multiplier() != state.style()->textAutosizingMultiplier()) { 806 if (element->computedStyle() && element->computedStyle()->textAutosizing Multiplier() != state.style()->textAutosizingMultiplier()) {
806 // Preserve the text autosizing multiplier on style recalc. Autosize r will update it during layout if needed. 807 // Preserve the text autosizing multiplier on style recalc. Autosize r will update it during layout if needed.
807 // NOTE: this must occur before applyMatchedProperties for correct c omputation of font-relative lengths. 808 // NOTE: this must occur before applyMatchedProperties for correct c omputation of font-relative lengths.
808 state.style()->setTextAutosizingMultiplier(element->computedStyle()- >textAutosizingMultiplier()); 809 state.style()->setTextAutosizingMultiplier(element->computedStyle()- >textAutosizingMultiplier());
809 state.style()->setUnique(); 810 state.style()->setUnique();
810 } 811 }
(...skipping 932 matching lines...) Expand 10 before | Expand all | Expand 10 after
1743 visitor->trace(m_siblingRuleSet); 1744 visitor->trace(m_siblingRuleSet);
1744 visitor->trace(m_uncommonAttributeRuleSet); 1745 visitor->trace(m_uncommonAttributeRuleSet);
1745 visitor->trace(m_watchedSelectorsRules); 1746 visitor->trace(m_watchedSelectorsRules);
1746 visitor->trace(m_treeBoundaryCrossingScopes); 1747 visitor->trace(m_treeBoundaryCrossingScopes);
1747 visitor->trace(m_styleSharingLists); 1748 visitor->trace(m_styleSharingLists);
1748 visitor->trace(m_pendingStyleSheets); 1749 visitor->trace(m_pendingStyleSheets);
1749 visitor->trace(m_document); 1750 visitor->trace(m_document);
1750 } 1751 }
1751 1752
1752 } // namespace blink 1753 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698