[webkit-reviews] review granted: [Bug 146161] Web Inspector: DOM.highlightSelector should work for "a:visited" : [Attachment 383405] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Nov 13 12:33:34 PST 2019


Antti Koivisto <koivisto at iki.fi> has granted Devin Rousso <drousso at apple.com>'s
request for review:
Bug 146161: Web Inspector: DOM.highlightSelector should work for "a:visited"
https://bugs.webkit.org/show_bug.cgi?id=146161

Attachment 383405: Patch

https://bugs.webkit.org/attachment.cgi?id=383405&action=review




--- Comment #9 from Antti Koivisto <koivisto at iki.fi> ---
Comment on attachment 383405
  --> https://bugs.webkit.org/attachment.cgi?id=383405
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=383405&action=review

> Source/WebCore/inspector/agents/InspectorDOMAgent.cpp:1276
> +	       if (isInUserAgentShadowTree && (selector->match() !=
CSSSelector::PseudoElement || selector->serializingValue() != pseudo))

I thin that you can test 'CSSSelector::pseudoId(selector->pseudoElementType()))
== pseudoId' instead of going via serializingValue. You won't need 'pseudo'
variable either.

> Source/WebCore/inspector/agents/InspectorDOMAgent.cpp:1306
> +		   if (pseudoIDs) {
> +		       nodes.append(descendantElement);
> +		       break;
> +		   }

Not sure if this is the right thing to do for pseudo elements that don't match
any element (::first-line etc). Maybe it is?


More information about the webkit-reviews mailing list