Diff
Modified: trunk/Source/WebCore/ChangeLog (197778 => 197779)
--- trunk/Source/WebCore/ChangeLog 2016-03-08 18:09:40 UTC (rev 197778)
+++ trunk/Source/WebCore/ChangeLog 2016-03-08 18:11:17 UTC (rev 197779)
@@ -1,3 +1,68 @@
+2016-03-08 Antti Koivisto <[email protected]>
+
+ Make Element const in ElementRuleCollector
+ https://bugs.webkit.org/show_bug.cgi?id=155170
+
+ Reviewed by Andreas Kling.
+
+ More const.
+
+ * css/ElementRuleCollector.cpp:
+ (WebCore::ElementRuleCollector::ElementRuleCollector):
+ (WebCore::ElementRuleCollector::matchAllRules):
+ * css/ElementRuleCollector.h:
+ * css/SelectorChecker.cpp:
+ (WebCore::SelectorChecker::checkOne):
+ (WebCore::SelectorChecker::matchesFocusPseudoClass):
+ * cssjit/SelectorCompiler.cpp:
+ (WebCore::SelectorCompiler::SelectorCodeGenerator::generateAddStyleRelationIfResolvingStyle):
+ (WebCore::SelectorCompiler::addStyleRelationFunction):
+ (WebCore::SelectorCompiler::SelectorCodeGenerator::generateContextFunctionCallTest):
+ (WebCore::SelectorCompiler::elementIsActive):
+ (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsFirstChild):
+ (WebCore::SelectorCompiler::elementIsHovered):
+ (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsOnlyChild):
+ (WebCore::SelectorCompiler::makeContextStyleUniqueIfNecessaryAndTestIsPlaceholderShown):
+ (WebCore::SelectorCompiler::isPlaceholderShown):
+ * cssjit/SelectorCompiler.h:
+ * dom/StyledElement.h:
+ (WebCore::StyledElement::additionalPresentationAttributeStyle):
+ (WebCore::StyledElement::inlineStyle):
+ (WebCore::StyledElement::collectStyleForPresentationAttribute):
+ (WebCore::StyledElement::invalidateStyleAttribute):
+ (WebCore::StyledElement::presentationAttributeStyle):
+ * html/HTMLTableCellElement.cpp:
+ (WebCore::HTMLTableCellElement::parseAttribute):
+ (WebCore::HTMLTableCellElement::additionalPresentationAttributeStyle):
+ * html/HTMLTableCellElement.h:
+ * html/HTMLTableColElement.cpp:
+ (WebCore::HTMLTableColElement::parseAttribute):
+ (WebCore::HTMLTableColElement::additionalPresentationAttributeStyle):
+ * html/HTMLTableColElement.h:
+ * html/HTMLTableElement.cpp:
+ (WebCore::leakBorderStyle):
+ (WebCore::HTMLTableElement::additionalPresentationAttributeStyle):
+ * html/HTMLTableElement.h:
+ * html/HTMLTableSectionElement.cpp:
+ (WebCore::HTMLTableSectionElement::create):
+ (WebCore::HTMLTableSectionElement::additionalPresentationAttributeStyle):
+ * html/HTMLTableSectionElement.h:
+ * inspector/InspectorCSSAgent.cpp:
+ (WebCore::InspectorCSSAgent::didUnregisterNamedFlowContentElement):
+ (WebCore::InspectorCSSAgent::forcePseudoState):
+ * inspector/InspectorCSSAgent.h:
+ * inspector/InspectorDOMAgent.cpp:
+ (WebCore::InspectorDOMAgent::pushNodePathToFrontend):
+ (WebCore::InspectorDOMAgent::boundNodeId):
+ (WebCore::InspectorDOMAgent::backendNodeIdForNode):
+ * inspector/InspectorDOMAgent.h:
+ * inspector/InspectorInstrumentation.cpp:
+ (WebCore::InspectorInstrumentation::handleMousePressImpl):
+ (WebCore::InspectorInstrumentation::forcePseudoStateImpl):
+ * inspector/InspectorInstrumentation.h:
+ (WebCore::InspectorInstrumentation::handleMousePress):
+ (WebCore::InspectorInstrumentation::forcePseudoState):
+
2016-03-08 Youenn Fablet <[email protected]>
[Fetch API] Commonalize handling of FetchBody by FetchRequest and FetchResponse
Modified: trunk/Source/WebCore/css/ElementRuleCollector.cpp (197778 => 197779)
--- trunk/Source/WebCore/css/ElementRuleCollector.cpp 2016-03-08 18:09:40 UTC (rev 197778)
+++ trunk/Source/WebCore/css/ElementRuleCollector.cpp 2016-03-08 18:11:17 UTC (rev 197779)
@@ -78,7 +78,7 @@
const bool includeEmptyRules;
};
-ElementRuleCollector::ElementRuleCollector(Element& element, const DocumentRuleSets& ruleSets, const SelectorFilter* selectorFilter)
+ElementRuleCollector::ElementRuleCollector(const Element& element, const DocumentRuleSets& ruleSets, const SelectorFilter* selectorFilter)
: m_element(element)
, m_authorStyle(*ruleSets.authorStyle())
, m_userStyle(ruleSets.userStyle())
@@ -87,7 +87,7 @@
ASSERT(!m_selectorFilter || m_selectorFilter->parentStackIsConsistent(element.parentNode()));
}
-ElementRuleCollector::ElementRuleCollector(Element& element, const RuleSet& authorStyle, const SelectorFilter* selectorFilter)
+ElementRuleCollector::ElementRuleCollector(const Element& element, const RuleSet& authorStyle, const SelectorFilter* selectorFilter)
: m_element(element)
, m_authorStyle(authorStyle)
, m_selectorFilter(selectorFilter)
@@ -520,7 +520,7 @@
// Now check author rules, beginning first with presentational attributes mapped from HTML.
if (is<StyledElement>(m_element)) {
- StyledElement& styledElement = downcast<StyledElement>(m_element);
+ auto& styledElement = downcast<StyledElement>(m_element);
addElementStyleProperties(styledElement.presentationAttributeStyle());
// Now we check additional mapped declarations.
@@ -541,7 +541,7 @@
matchAuthorRules(false);
if (matchAuthorAndUserStyles && is<StyledElement>(m_element)) {
- StyledElement& styledElement = downcast<StyledElement>(m_element);
+ auto& styledElement = downcast<StyledElement>(m_element);
// Now check our inline style attribute.
if (styledElement.inlineStyle()) {
// Inline style is immutable as long as there is no CSSOM wrapper.
Modified: trunk/Source/WebCore/css/ElementRuleCollector.h (197778 => 197779)
--- trunk/Source/WebCore/css/ElementRuleCollector.h 2016-03-08 18:09:40 UTC (rev 197778)
+++ trunk/Source/WebCore/css/ElementRuleCollector.h 2016-03-08 18:11:17 UTC (rev 197779)
@@ -45,8 +45,8 @@
class ElementRuleCollector {
public:
- ElementRuleCollector(Element&, const DocumentRuleSets&, const SelectorFilter*);
- ElementRuleCollector(Element&, const RuleSet& authorStyle, const SelectorFilter*);
+ ElementRuleCollector(const Element&, const DocumentRuleSets&, const SelectorFilter*);
+ ElementRuleCollector(const Element&, const RuleSet& authorStyle, const SelectorFilter*);
void matchAllRules(bool matchAuthorAndUserStyles, bool includeSMILProperties);
void matchUARules();
@@ -91,7 +91,7 @@
void addMatchedRule(const MatchedRule&);
- Element& m_element;
+ const Element& m_element;
const RuleSet& m_authorStyle;
const RuleSet* m_userStyle { nullptr };
const SelectorFilter* m_selectorFilter { nullptr };
Modified: trunk/Source/WebCore/css/SelectorChecker.cpp (197778 => 197779)
--- trunk/Source/WebCore/css/SelectorChecker.cpp 2016-03-08 18:09:40 UTC (rev 197778)
+++ trunk/Source/WebCore/css/SelectorChecker.cpp 2016-03-08 18:11:17 UTC (rev 197779)
@@ -913,7 +913,7 @@
if (m_strictParsing || element.isLink() || canMatchHoverOrActiveInQuirksMode(context)) {
addStyleRelation(checkingContext, element, Style::Relation::AffectedByHover);
- if (element.hovered() || InspectorInstrumentation::forcePseudoState(const_cast<Element&>(element), CSSSelector::PseudoClassHover))
+ if (element.hovered() || InspectorInstrumentation::forcePseudoState(element, CSSSelector::PseudoClassHover))
return true;
}
break;
@@ -921,7 +921,7 @@
if (m_strictParsing || element.isLink() || canMatchHoverOrActiveInQuirksMode(context)) {
addStyleRelation(checkingContext, element, Style::Relation::AffectedByActive);
- if (element.active() || InspectorInstrumentation::forcePseudoState(const_cast<Element&>(element), CSSSelector::PseudoClassActive))
+ if (element.active() || InspectorInstrumentation::forcePseudoState(element, CSSSelector::PseudoClassActive))
return true;
}
break;
@@ -1150,7 +1150,7 @@
bool SelectorChecker::matchesFocusPseudoClass(const Element& element)
{
- if (InspectorInstrumentation::forcePseudoState(const_cast<Element&>(element), CSSSelector::PseudoClassFocus))
+ if (InspectorInstrumentation::forcePseudoState(element, CSSSelector::PseudoClassFocus))
return true;
return element.focused() && isFrameFocused(element);
}
Modified: trunk/Source/WebCore/cssjit/SelectorCompiler.cpp (197778 => 197779)
--- trunk/Source/WebCore/cssjit/SelectorCompiler.cpp 2016-03-08 18:09:40 UTC (rev 197778)
+++ trunk/Source/WebCore/cssjit/SelectorCompiler.cpp 2016-03-08 18:11:17 UTC (rev 197779)
@@ -2184,7 +2184,7 @@
notResolvingStyle.link(&m_assembler);
}
-static void addStyleRelationFunction(SelectorChecker::CheckingContext* checkingContext, Element* element)
+static void addStyleRelationFunction(SelectorChecker::CheckingContext* checkingContext, const Element* element)
{
checkingContext->styleRelations.append({ *element, Style::Relation::AffectedByActive, 1 });
}
@@ -3048,7 +3048,7 @@
failureCases.append(functionCall.callAndBranchOnBooleanReturnValue(Assembler::Zero));
}
-static bool elementIsActive(Element* element)
+static bool elementIsActive(const Element* element)
{
return element->active() || InspectorInstrumentation::forcePseudoState(*element, CSSSelector::PseudoClassActive);
}
@@ -3154,7 +3154,7 @@
failureCases.append(m_assembler.branchTest32(Assembler::NonZero, isFirstChildRegister));
}
-static bool elementIsHovered(Element* element)
+static bool elementIsHovered(const Element* element)
{
return element->hovered() || InspectorInstrumentation::forcePseudoState(*element, CSSSelector::PseudoClassHover);
}
@@ -3300,7 +3300,7 @@
failureCases.append(m_assembler.branchTest32(Assembler::NonZero, isOnlyChildRegister));
}
-static bool makeContextStyleUniqueIfNecessaryAndTestIsPlaceholderShown(Element* element, SelectorChecker::CheckingContext* checkingContext)
+static bool makeContextStyleUniqueIfNecessaryAndTestIsPlaceholderShown(const Element* element, SelectorChecker::CheckingContext* checkingContext)
{
if (is<HTMLTextFormControlElement>(*element)) {
if (checkingContext->resolvingMode == SelectorChecker::Mode::ResolvingStyle)
@@ -3310,7 +3310,7 @@
return false;
}
-static bool isPlaceholderShown(Element* element)
+static bool isPlaceholderShown(const Element* element)
{
return is<HTMLTextFormControlElement>(*element) && downcast<HTMLTextFormControlElement>(*element).isPlaceholderVisible();
}
Modified: trunk/Source/WebCore/cssjit/SelectorCompiler.h (197778 => 197779)
--- trunk/Source/WebCore/cssjit/SelectorCompiler.h 2016-03-08 18:09:40 UTC (rev 197778)
+++ trunk/Source/WebCore/cssjit/SelectorCompiler.h 2016-03-08 18:11:17 UTC (rev 197779)
@@ -77,11 +77,11 @@
QuerySelector
};
-typedef unsigned (*RuleCollectorSimpleSelectorChecker)(Element*, unsigned*);
-typedef unsigned (*QuerySelectorSimpleSelectorChecker)(Element*);
+typedef unsigned (*RuleCollectorSimpleSelectorChecker)(const Element*, unsigned*);
+typedef unsigned (*QuerySelectorSimpleSelectorChecker)(const Element*);
-typedef unsigned (*RuleCollectorSelectorCheckerWithCheckingContext)(Element*, const SelectorChecker::CheckingContext*, unsigned*);
-typedef unsigned (*QuerySelectorSelectorCheckerWithCheckingContext)(Element*, const SelectorChecker::CheckingContext*);
+typedef unsigned (*RuleCollectorSelectorCheckerWithCheckingContext)(const Element*, const SelectorChecker::CheckingContext*, unsigned*);
+typedef unsigned (*QuerySelectorSelectorCheckerWithCheckingContext)(const Element*, const SelectorChecker::CheckingContext*);
SelectorCompilationStatus compileSelector(const CSSSelector*, JSC::VM*, SelectorContext, JSC::MacroAssemblerCodeRef& outputCodeRef);
Modified: trunk/Source/WebCore/dom/StyledElement.h (197778 => 197779)
--- trunk/Source/WebCore/dom/StyledElement.h 2016-03-08 18:09:40 UTC (rev 197778)
+++ trunk/Source/WebCore/dom/StyledElement.h 2016-03-08 18:11:17 UTC (rev 197779)
@@ -43,7 +43,7 @@
public:
virtual ~StyledElement();
- virtual const StyleProperties* additionalPresentationAttributeStyle() { return 0; }
+ virtual const StyleProperties* additionalPresentationAttributeStyle() const { return nullptr; }
void invalidateStyleAttribute();
const StyleProperties* inlineStyle() const { return elementData() ? elementData()->m_inlineStyle.get() : nullptr; }
@@ -60,7 +60,7 @@
CSSStyleDeclaration* cssomStyle() final;
- const StyleProperties* presentationAttributeStyle();
+ const StyleProperties* presentationAttributeStyle() const;
virtual void collectStyleForPresentationAttribute(const QualifiedName&, const AtomicString&, MutableStyleProperties&) { }
static void clearPresentationAttributeCache();
@@ -100,12 +100,12 @@
setNeedsStyleRecalc(InlineStyleChange);
}
-inline const StyleProperties* StyledElement::presentationAttributeStyle()
+inline const StyleProperties* StyledElement::presentationAttributeStyle() const
{
if (!elementData())
return nullptr;
if (elementData()->presentationAttributeStyleIsDirty())
- rebuildPresentationAttributeStyle();
+ const_cast<StyledElement&>(*this).rebuildPresentationAttributeStyle();
return elementData()->presentationAttributeStyle();
}
Modified: trunk/Source/WebCore/html/HTMLTableCellElement.cpp (197778 => 197779)
--- trunk/Source/WebCore/html/HTMLTableCellElement.cpp 2016-03-08 18:09:40 UTC (rev 197778)
+++ trunk/Source/WebCore/html/HTMLTableCellElement.cpp 2016-03-08 18:11:17 UTC (rev 197779)
@@ -117,7 +117,7 @@
HTMLTablePartElement::parseAttribute(name, value);
}
-const StyleProperties* HTMLTableCellElement::additionalPresentationAttributeStyle()
+const StyleProperties* HTMLTableCellElement::additionalPresentationAttributeStyle() const
{
if (HTMLTableElement* table = findParentTable())
return table->additionalCellStyle();
Modified: trunk/Source/WebCore/html/HTMLTableCellElement.h (197778 => 197779)
--- trunk/Source/WebCore/html/HTMLTableCellElement.h 2016-03-08 18:09:40 UTC (rev 197778)
+++ trunk/Source/WebCore/html/HTMLTableCellElement.h 2016-03-08 18:11:17 UTC (rev 197779)
@@ -55,7 +55,7 @@
void parseAttribute(const QualifiedName&, const AtomicString&) override;
bool isPresentationAttribute(const QualifiedName&) const override;
void collectStyleForPresentationAttribute(const QualifiedName&, const AtomicString&, MutableStyleProperties&) override;
- const StyleProperties* additionalPresentationAttributeStyle() override;
+ const StyleProperties* additionalPresentationAttributeStyle() const override;
bool isURLAttribute(const Attribute&) const override;
Modified: trunk/Source/WebCore/html/HTMLTableColElement.cpp (197778 => 197779)
--- trunk/Source/WebCore/html/HTMLTableColElement.cpp 2016-03-08 18:09:40 UTC (rev 197778)
+++ trunk/Source/WebCore/html/HTMLTableColElement.cpp 2016-03-08 18:11:17 UTC (rev 197779)
@@ -81,7 +81,7 @@
HTMLTablePartElement::parseAttribute(name, value);
}
-const StyleProperties* HTMLTableColElement::additionalPresentationAttributeStyle()
+const StyleProperties* HTMLTableColElement::additionalPresentationAttributeStyle() const
{
if (!hasTagName(colgroupTag))
return nullptr;
Modified: trunk/Source/WebCore/html/HTMLTableColElement.h (197778 => 197779)
--- trunk/Source/WebCore/html/HTMLTableColElement.h 2016-03-08 18:09:40 UTC (rev 197778)
+++ trunk/Source/WebCore/html/HTMLTableColElement.h 2016-03-08 18:11:17 UTC (rev 197779)
@@ -45,7 +45,7 @@
void parseAttribute(const QualifiedName&, const AtomicString&) override;
bool isPresentationAttribute(const QualifiedName&) const override;
void collectStyleForPresentationAttribute(const QualifiedName&, const AtomicString&, MutableStyleProperties&) override;
- const StyleProperties* additionalPresentationAttributeStyle() override;
+ const StyleProperties* additionalPresentationAttributeStyle() const override;
unsigned m_span;
};
Modified: trunk/Source/WebCore/html/HTMLTableElement.cpp (197778 => 197779)
--- trunk/Source/WebCore/html/HTMLTableElement.cpp 2016-03-08 18:09:40 UTC (rev 197778)
+++ trunk/Source/WebCore/html/HTMLTableElement.cpp 2016-03-08 18:11:17 UTC (rev 197779)
@@ -443,7 +443,7 @@
return style.release().leakRef();
}
-const StyleProperties* HTMLTableElement::additionalPresentationAttributeStyle()
+const StyleProperties* HTMLTableElement::additionalPresentationAttributeStyle() const
{
if (m_frameAttr)
return 0;
Modified: trunk/Source/WebCore/html/HTMLTableElement.h (197778 => 197779)
--- trunk/Source/WebCore/html/HTMLTableElement.h 2016-03-08 18:09:40 UTC (rev 197778)
+++ trunk/Source/WebCore/html/HTMLTableElement.h 2016-03-08 18:11:17 UTC (rev 197779)
@@ -78,7 +78,7 @@
bool isURLAttribute(const Attribute&) const override;
// Used to obtain either a solid or outset border decl and to deal with the frame and rules attributes.
- const StyleProperties* additionalPresentationAttributeStyle() override;
+ const StyleProperties* additionalPresentationAttributeStyle() const override;
void addSubresourceAttributeURLs(ListHashSet<URL>&) const override;
Modified: trunk/Source/WebCore/html/HTMLTableSectionElement.cpp (197778 => 197779)
--- trunk/Source/WebCore/html/HTMLTableSectionElement.cpp 2016-03-08 18:09:40 UTC (rev 197778)
+++ trunk/Source/WebCore/html/HTMLTableSectionElement.cpp 2016-03-08 18:11:17 UTC (rev 197779)
@@ -49,7 +49,7 @@
return adoptRef(*new HTMLTableSectionElement(tagName, document));
}
-const StyleProperties* HTMLTableSectionElement::additionalPresentationAttributeStyle()
+const StyleProperties* HTMLTableSectionElement::additionalPresentationAttributeStyle() const
{
if (HTMLTableElement* table = findParentTable())
return table->additionalGroupStyle(true);
Modified: trunk/Source/WebCore/html/HTMLTableSectionElement.h (197778 => 197779)
--- trunk/Source/WebCore/html/HTMLTableSectionElement.h 2016-03-08 18:09:40 UTC (rev 197778)
+++ trunk/Source/WebCore/html/HTMLTableSectionElement.h 2016-03-08 18:11:17 UTC (rev 197779)
@@ -58,7 +58,7 @@
private:
HTMLTableSectionElement(const QualifiedName& tagName, Document&);
- const StyleProperties* additionalPresentationAttributeStyle() override;
+ const StyleProperties* additionalPresentationAttributeStyle() const override;
};
} // namespace WebCore
Modified: trunk/Source/WebCore/inspector/InspectorCSSAgent.cpp (197778 => 197779)
--- trunk/Source/WebCore/inspector/InspectorCSSAgent.cpp 2016-03-08 18:09:40 UTC (rev 197778)
+++ trunk/Source/WebCore/inspector/InspectorCSSAgent.cpp 2016-03-08 18:11:17 UTC (rev 197779)
@@ -529,7 +529,7 @@
m_frontendDispatcher->unregisteredNamedFlowContentElement(documentNodeId, namedFlow.name().string(), contentElementNodeId);
}
-bool InspectorCSSAgent::forcePseudoState(Element& element, CSSSelector::PseudoClassType pseudoClassType)
+bool InspectorCSSAgent::forcePseudoState(const Element& element, CSSSelector::PseudoClassType pseudoClassType)
{
if (m_nodeIdToForcedPseudoState.isEmpty())
return false;
Modified: trunk/Source/WebCore/inspector/InspectorCSSAgent.h (197778 => 197779)
--- trunk/Source/WebCore/inspector/InspectorCSSAgent.h 2016-03-08 18:09:40 UTC (rev 197778)
+++ trunk/Source/WebCore/inspector/InspectorCSSAgent.h 2016-03-08 18:11:17 UTC (rev 197779)
@@ -103,7 +103,7 @@
void didChangeRegionOverset(Document&, WebKitNamedFlow&);
void didRegisterNamedFlowContentElement(Document&, WebKitNamedFlow&, Node& contentElement, Node* nextContentElement = nullptr);
void didUnregisterNamedFlowContentElement(Document&, WebKitNamedFlow&, Node& contentElement);
- bool forcePseudoState(Element&, CSSSelector::PseudoClassType);
+ bool forcePseudoState(const Element&, CSSSelector::PseudoClassType);
void getComputedStyleForNode(ErrorString&, int nodeId, RefPtr<Inspector::Protocol::Array<Inspector::Protocol::CSS::CSSComputedStyleProperty>>&) override;
void getInlineStylesForNode(ErrorString&, int nodeId, RefPtr<Inspector::Protocol::CSS::CSSStyle>& inlineStyle, RefPtr<Inspector::Protocol::CSS::CSSStyle>& attributes) override;
Modified: trunk/Source/WebCore/inspector/InspectorDOMAgent.cpp (197778 => 197779)
--- trunk/Source/WebCore/inspector/InspectorDOMAgent.cpp 2016-03-08 18:09:40 UTC (rev 197778)
+++ trunk/Source/WebCore/inspector/InspectorDOMAgent.cpp 2016-03-08 18:11:17 UTC (rev 197779)
@@ -603,9 +603,9 @@
return map->get(nodeToPush);
}
-int InspectorDOMAgent::boundNodeId(Node* node)
+int InspectorDOMAgent::boundNodeId(const Node* node)
{
- return m_documentNodeToIdMap.get(node);
+ return m_documentNodeToIdMap.get(const_cast<Node*>(node));
}
BackendNodeId InspectorDOMAgent::backendNodeIdForNode(Node* node, const String& nodeGroup)
Modified: trunk/Source/WebCore/inspector/InspectorDOMAgent.h (197778 => 197779)
--- trunk/Source/WebCore/inspector/InspectorDOMAgent.h 2016-03-08 18:09:40 UTC (rev 197778)
+++ trunk/Source/WebCore/inspector/InspectorDOMAgent.h 2016-03-08 18:11:17 UTC (rev 197779)
@@ -179,7 +179,7 @@
int pushNodeToFrontend(ErrorString&, int documentNodeId, Node*);
Node* nodeForId(int nodeId);
- int boundNodeId(Node*);
+ int boundNodeId(const Node*);
void setDOMListener(DOMListener*);
BackendNodeId backendNodeIdForNode(Node*, const String& nodeGroup);
Modified: trunk/Source/WebCore/inspector/InspectorInstrumentation.cpp (197778 => 197779)
--- trunk/Source/WebCore/inspector/InspectorInstrumentation.cpp 2016-03-08 18:09:40 UTC (rev 197778)
+++ trunk/Source/WebCore/inspector/InspectorInstrumentation.cpp 2016-03-08 18:11:17 UTC (rev 197779)
@@ -291,7 +291,7 @@
return false;
}
-bool InspectorInstrumentation::forcePseudoStateImpl(InstrumentingAgents& instrumentingAgents, Element& element, CSSSelector::PseudoClassType pseudoState)
+bool InspectorInstrumentation::forcePseudoStateImpl(InstrumentingAgents& instrumentingAgents, const Element& element, CSSSelector::PseudoClassType pseudoState)
{
if (InspectorCSSAgent* cssAgent = instrumentingAgents.inspectorCSSAgent())
return cssAgent->forcePseudoState(element, pseudoState);
Modified: trunk/Source/WebCore/inspector/InspectorInstrumentation.h (197778 => 197779)
--- trunk/Source/WebCore/inspector/InspectorInstrumentation.h 2016-03-08 18:09:40 UTC (rev 197778)
+++ trunk/Source/WebCore/inspector/InspectorInstrumentation.h 2016-03-08 18:11:17 UTC (rev 197779)
@@ -137,7 +137,7 @@
static void mouseDidMoveOverElement(Page&, const HitTestResult&, unsigned modifierFlags);
static bool handleMousePress(Frame&);
static bool handleTouchEvent(Frame&, Node&);
- static bool forcePseudoState(Element&, CSSSelector::PseudoClassType);
+ static bool forcePseudoState(const Element&, CSSSelector::PseudoClassType);
static void willSendXMLHttpRequest(ScriptExecutionContext*, const String& url);
static void didInstallTimer(ScriptExecutionContext*, int timerId, std::chrono::milliseconds timeout, bool singleShot);
@@ -306,7 +306,7 @@
static void mouseDidMoveOverElementImpl(InstrumentingAgents&, const HitTestResult&, unsigned modifierFlags);
static bool handleTouchEventImpl(InstrumentingAgents&, Node&);
static bool handleMousePressImpl(InstrumentingAgents&);
- static bool forcePseudoStateImpl(InstrumentingAgents&, Element&, CSSSelector::PseudoClassType);
+ static bool forcePseudoStateImpl(InstrumentingAgents&, const Element&, CSSSelector::PseudoClassType);
static void willSendXMLHttpRequestImpl(InstrumentingAgents&, const String& url);
static void didInstallTimerImpl(InstrumentingAgents&, int timerId, std::chrono::milliseconds timeout, bool singleShot, ScriptExecutionContext*);
@@ -626,7 +626,7 @@
return false;
}
-inline bool InspectorInstrumentation::forcePseudoState(Element& element, CSSSelector::PseudoClassType pseudoState)
+inline bool InspectorInstrumentation::forcePseudoState(const Element& element, CSSSelector::PseudoClassType pseudoState)
{
FAST_RETURN_IF_NO_FRONTENDS(false);
if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForDocument(element.document()))