d20f7d68bf
https://bugs.webkit.org/show_bug.cgi?id=204306 Reviewed by Brian Burg. .: * ManualTests/inspector/overlay-selectors.html: Added. Source/WebCore: In r252436, the implementation of `DOM.highlightSelector` was changed from just calling `document.querySelectorAll` to actually attempting to mimic what the CSS selector matching engine does. Basically, this meant adding logic to walk the entire DOM tree and for each node test each `CSSSelector` of the given `selector` string to see if it matched. At the time, I had incorrectly assumed that once a selector was found that matched the current node, it wouldn't need to be checked against ever again. This would be a fine assumption if we didn't care about `:before`/`:after`, but since `DOM.highlightSelector` also wants to match those, it is necessary to test every `CSSSelector` in case a later one in the given `selector` string matches a pseudo-element (e.g. `div, div:before`). The fix is simply to change `break` to `continue` and to ensure that every item in the generated `NodeList` is unique (otherwise the overlay for a node may be drawn twice). * inspector/agents/InspectorDOMAgent.cpp: (WebCore::InspectorDOMAgent::highlightSelector): Canonical link: https://commits.webkit.org/217666@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@252682 268f45cc-cd09-0410-ab3c-d52691b4dbfc |
||
---|---|---|
.. | ||
resources | ||
bp-in-named-eval-after-reload.html | ||
command-line-api.html | ||
console-assert.html | ||
console-call-line-numbers.html | ||
console-dir.html | ||
console-log-formatting.html | ||
console-time.html | ||
debugger-execution-while-paused.html | ||
debugger-pause-during-load.html | ||
debugger-pause-on-else-statements.html | ||
debugger-pause-on-for-in-statements.html | ||
debugger-pause-on-for-statements.html | ||
debugger-scopes-inspection.html | ||
debugger-shortcuts-with-console-opened.html | ||
debugger-status-bar-buttons-state.html | ||
debugger-step-on-do-while-statements.html | ||
debugger-step-on-for-in-statements.html | ||
debugger-step-on-for-statements.html | ||
debugger-step-on-while-statements.html | ||
debugger-watch-expressions.html | ||
display-form-data.html | ||
display-sql-null.html | ||
display-sql-transaction-error.html | ||
dom-mutation.html | ||
duplicate-resource-urls.html | ||
error-warning-count.html | ||
errors-with-space in-url.html | ||
escape-links.html | ||
forzen-ui-while-paused.html | ||
hidden-evals.html | ||
highlight-nodes.html | ||
highlight-source-line.html | ||
multiple-console-messages.html | ||
named-evals.html | ||
overlay-nodes.html | ||
overlay-rulers.html | ||
overlay-selectors.html | ||
remember-last-script.html | ||
returnEvent-crash.html | ||
styled-error-bubbles-in-scripts.html | ||
webinspector-log.html |