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

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

Issue 2122613002: Add a use counter for author rules setting display: block on summary. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Bring patch to head. Update counter value in test. 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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 #include "core/dom/CSSSelectorWatch.h" 73 #include "core/dom/CSSSelectorWatch.h"
74 #include "core/dom/FirstLetterPseudoElement.h" 74 #include "core/dom/FirstLetterPseudoElement.h"
75 #include "core/dom/NodeComputedStyle.h" 75 #include "core/dom/NodeComputedStyle.h"
76 #include "core/dom/StyleEngine.h" 76 #include "core/dom/StyleEngine.h"
77 #include "core/dom/Text.h" 77 #include "core/dom/Text.h"
78 #include "core/dom/shadow/ElementShadow.h" 78 #include "core/dom/shadow/ElementShadow.h"
79 #include "core/dom/shadow/ShadowRoot.h" 79 #include "core/dom/shadow/ShadowRoot.h"
80 #include "core/frame/FrameView.h" 80 #include "core/frame/FrameView.h"
81 #include "core/frame/LocalFrame.h" 81 #include "core/frame/LocalFrame.h"
82 #include "core/frame/Settings.h" 82 #include "core/frame/Settings.h"
83 #include "core/frame/UseCounter.h"
83 #include "core/html/HTMLIFrameElement.h" 84 #include "core/html/HTMLIFrameElement.h"
84 #include "core/html/HTMLSlotElement.h" 85 #include "core/html/HTMLSlotElement.h"
85 #include "core/inspector/InspectorInstrumentation.h" 86 #include "core/inspector/InspectorInstrumentation.h"
86 #include "core/layout/GeneratedChildren.h" 87 #include "core/layout/GeneratedChildren.h"
87 #include "core/layout/LayoutView.h" 88 #include "core/layout/LayoutView.h"
88 #include "core/style/StyleVariableData.h" 89 #include "core/style/StyleVariableData.h"
89 #include "core/svg/SVGDocumentExtensions.h" 90 #include "core/svg/SVGDocumentExtensions.h"
90 #include "core/svg/SVGElement.h" 91 #include "core/svg/SVGElement.h"
91 #include "platform/RuntimeEnabledFeatures.h" 92 #include "platform/RuntimeEnabledFeatures.h"
92 #include "wtf/StdLibExtras.h" 93 #include "wtf/StdLibExtras.h"
(...skipping 691 matching lines...) Expand 10 before | Expand all | Expand 10 after
784 785
785 bool needsCollection = false; 786 bool needsCollection = false;
786 CSSDefaultStyleSheets::instance().ensureDefaultStyleSheetsForElement(*el ement, needsCollection); 787 CSSDefaultStyleSheets::instance().ensureDefaultStyleSheetsForElement(*el ement, needsCollection);
787 if (needsCollection) 788 if (needsCollection)
788 collectFeatures(); 789 collectFeatures();
789 790
790 ElementRuleCollector collector(state.elementContext(), m_selectorFilter, state.style()); 791 ElementRuleCollector collector(state.elementContext(), m_selectorFilter, state.style());
791 792
792 matchAllRules(state, collector, matchingBehavior != MatchAllRulesExcludi ngSMIL); 793 matchAllRules(state, collector, matchingBehavior != MatchAllRulesExcludi ngSMIL);
793 794
795 // TODO(dominicc): Remove this counter when Issue 590014 is fixed.
796 if (element->hasTagName(HTMLNames::summaryTag)) {
797 MatchedPropertiesRange properties = collector.matchedResult().author Rules();
798 for (auto it = properties.begin(); it != properties.end(); ++it) {
799 CSSValue* value = it->properties->getPropertyCSSValue(CSSPropert yDisplay);
800 if (value && value->isPrimitiveValue() && toCSSPrimitiveValue(*v alue).getValueID() == CSSValueBlock)
801 UseCounter::count(element->document(), UseCounter::SummaryEl ementWithDisplayBlockAuthorRule);
802 }
803 }
804
794 if (element->computedStyle() && element->computedStyle()->textAutosizing Multiplier() != state.style()->textAutosizingMultiplier()) { 805 if (element->computedStyle() && element->computedStyle()->textAutosizing Multiplier() != state.style()->textAutosizingMultiplier()) {
795 // Preserve the text autosizing multiplier on style recalc. Autosize r will update it during layout if needed. 806 // Preserve the text autosizing multiplier on style recalc. Autosize r will update it during layout if needed.
796 // NOTE: this must occur before applyMatchedProperties for correct c omputation of font-relative lengths. 807 // NOTE: this must occur before applyMatchedProperties for correct c omputation of font-relative lengths.
797 state.style()->setTextAutosizingMultiplier(element->computedStyle()- >textAutosizingMultiplier()); 808 state.style()->setTextAutosizingMultiplier(element->computedStyle()- >textAutosizingMultiplier());
798 state.style()->setUnique(); 809 state.style()->setUnique();
799 } 810 }
800 811
801 if (state.hasDirAutoAttribute()) 812 if (state.hasDirAutoAttribute())
802 state.style()->setSelfOrAncestorHasDirAutoAttribute(true); 813 state.style()->setSelfOrAncestorHasDirAutoAttribute(true);
803 814
(...skipping 930 matching lines...) Expand 10 before | Expand all | Expand 10 after
1734 visitor->trace(m_siblingRuleSet); 1745 visitor->trace(m_siblingRuleSet);
1735 visitor->trace(m_uncommonAttributeRuleSet); 1746 visitor->trace(m_uncommonAttributeRuleSet);
1736 visitor->trace(m_watchedSelectorsRules); 1747 visitor->trace(m_watchedSelectorsRules);
1737 visitor->trace(m_treeBoundaryCrossingScopes); 1748 visitor->trace(m_treeBoundaryCrossingScopes);
1738 visitor->trace(m_styleSharingLists); 1749 visitor->trace(m_styleSharingLists);
1739 visitor->trace(m_pendingStyleSheets); 1750 visitor->trace(m_pendingStyleSheets);
1740 visitor->trace(m_document); 1751 visitor->trace(m_document);
1741 } 1752 }
1742 1753
1743 } // namespace blink 1754 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698