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

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

Issue 2035373002: Made StylePropertySet::getPropertyCSSValue return a const CSSValue* (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@_fix_cssparser_font_face_descriptor_to_return_const
Patch Set: Rebase Created 4 years, 5 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 779 matching lines...) Expand 10 before | Expand all | Expand 10 after
790 collectFeatures(); 790 collectFeatures();
791 791
792 ElementRuleCollector collector(state.elementContext(), m_selectorFilter, state.style()); 792 ElementRuleCollector collector(state.elementContext(), m_selectorFilter, state.style());
793 793
794 matchAllRules(state, collector, matchingBehavior != MatchAllRulesExcludi ngSMIL); 794 matchAllRules(state, collector, matchingBehavior != MatchAllRulesExcludi ngSMIL);
795 795
796 // TODO(dominicc): Remove this counter when Issue 590014 is fixed. 796 // TODO(dominicc): Remove this counter when Issue 590014 is fixed.
797 if (element->hasTagName(HTMLNames::summaryTag)) { 797 if (element->hasTagName(HTMLNames::summaryTag)) {
798 MatchedPropertiesRange properties = collector.matchedResult().author Rules(); 798 MatchedPropertiesRange properties = collector.matchedResult().author Rules();
799 for (auto it = properties.begin(); it != properties.end(); ++it) { 799 for (auto it = properties.begin(); it != properties.end(); ++it) {
800 CSSValue* value = it->properties->getPropertyCSSValue(CSSPropert yDisplay); 800 const CSSValue* value = it->properties->getPropertyCSSValue(CSSP ropertyDisplay);
801 if (value && value->isPrimitiveValue() && toCSSPrimitiveValue(*v alue).getValueID() == CSSValueBlock) 801 if (value && value->isPrimitiveValue() && toCSSPrimitiveValue(*v alue).getValueID() == CSSValueBlock)
802 UseCounter::count(element->document(), UseCounter::SummaryEl ementWithDisplayBlockAuthorRule); 802 UseCounter::count(element->document(), UseCounter::SummaryEl ementWithDisplayBlockAuthorRule);
803 } 803 }
804 } 804 }
805 805
806 if (element->computedStyle() && element->computedStyle()->textAutosizing Multiplier() != state.style()->textAutosizingMultiplier()) { 806 if (element->computedStyle() && element->computedStyle()->textAutosizing Multiplier() != state.style()->textAutosizingMultiplier()) {
807 // 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.
808 // 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.
809 state.style()->setTextAutosizingMultiplier(element->computedStyle()- >textAutosizingMultiplier()); 809 state.style()->setTextAutosizingMultiplier(element->computedStyle()- >textAutosizingMultiplier());
810 state.style()->setUnique(); 810 state.style()->setUnique();
(...skipping 935 matching lines...) Expand 10 before | Expand all | Expand 10 after
1746 visitor->trace(m_siblingRuleSet); 1746 visitor->trace(m_siblingRuleSet);
1747 visitor->trace(m_uncommonAttributeRuleSet); 1747 visitor->trace(m_uncommonAttributeRuleSet);
1748 visitor->trace(m_watchedSelectorsRules); 1748 visitor->trace(m_watchedSelectorsRules);
1749 visitor->trace(m_treeBoundaryCrossingScopes); 1749 visitor->trace(m_treeBoundaryCrossingScopes);
1750 visitor->trace(m_styleSharingLists); 1750 visitor->trace(m_styleSharingLists);
1751 visitor->trace(m_pendingStyleSheets); 1751 visitor->trace(m_pendingStyleSheets);
1752 visitor->trace(m_document); 1752 visitor->trace(m_document);
1753 } 1753 }
1754 1754
1755 } // namespace blink 1755 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698