Bug 86196

Summary: Web Inspector: Search box doesn't allow CSS selectors anymore
Product: WebKit Reporter: Alexander Pavlov (apavlov) <apavlov>
Component: Web Inspector (Deprecated)Assignee: Alexander Pavlov (apavlov) <apavlov>
Status: RESOLVED FIXED    
Severity: Normal CC: apavlov, bweinstein, joepeck, keishi, loislo, pfeldman, pmuellr, rik, timothy, twotwotwo+webkitbugs, yurys
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Patch
none
Patch
none
Patch pfeldman: review+

Description Alexander Pavlov (apavlov) 2012-05-11 04:58:02 PDT
What steps will reproduce the problem?
1. Open the Chrome Developer Tools (F12)
2. Click on the search box (Ctrl+F)
3. Type a valid CSS selector present in the current DOM e.g. ".classname", "div + div", ".classname:last-child".

What is the expected result?
  Results are displayed next to the search box, e.g. "1 of 38 matches" and every element that matches the selector is highlighted in the Elements view.

What happens instead?
  No elements are found ("Not Found" is displayed).

Please provide any additional information below. Attach a screenshot if
possible.

UserAgentString: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.168 Safari/535.19

  This feature used to work in Chrome a few versions back. It still works in Safari 5.1.5 (OS X).

Upstreaming http://code.google.com/p/chromium/issues/detail?id=127440
Comment 1 Alexander Pavlov (apavlov) 2012-05-11 04:58:26 PDT
This is a regression from http://trac.webkit.org/changeset/99983
Comment 2 Alexander Pavlov (apavlov) 2012-05-11 05:18:23 PDT
Created attachment 141381 [details]
Patch
Comment 3 Alexander Pavlov (apavlov) 2012-05-11 05:40:39 PDT
Created attachment 141385 [details]
Patch
Comment 4 Pavel Feldman 2012-05-11 05:42:04 PDT
Comment on attachment 141381 [details]
Patch

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

A test please!

> Source/WebCore/inspector/InspectorDOMAgent.cpp:899
> +                if (node->nodeType() == Node::ELEMENT_NODE)

Why this check?
Comment 5 Alexander Pavlov (apavlov) 2012-05-11 05:43:55 PDT
Created attachment 141387 [details]
Patch
Comment 6 Alexander Pavlov (apavlov) 2012-05-11 05:47:12 PDT
Committed r116755: <http://trac.webkit.org/changeset/116755>
Comment 7 Pavel Feldman 2012-07-19 00:29:08 PDT
*** Bug 91713 has been marked as a duplicate of this bug. ***