WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
194673
Web Inspector: Search: allow DOM searches to be case sensitive
https://bugs.webkit.org/show_bug.cgi?id=194673
Summary
Web Inspector: Search: allow DOM searches to be case sensitive
Devin Rousso
Reported
2019-02-14 14:07:51 PST
When searching for "DIV", we're still matching <div>.
Attachments
Patch
(26.38 KB, patch)
2019-03-12 12:43 PDT
,
Devin Rousso
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2019-02-14 14:08:21 PST
<
rdar://problem/48087577
>
Nikita Vasilyev
Comment 2
2019-02-14 14:19:19 PST
(In reply to Devin Rousso from
comment #0
)
> When searching for "DIV", we're still matching <div>.
This seems fine to me. What's the real-world use case here?
Devin Rousso
Comment 3
2019-02-14 14:23:28 PST
(In reply to Nikita Vasilyev from
comment #2
)
> (In reply to Devin Rousso from
comment #0
) > > When searching for "DIV", we're still matching <div>. > > This seems fine to me. What's the real-world use case here?
Ok maybe that was a bad example. If I have <div class="CLASS">CONTENT"</div> and I searched for "class" or "content", it would still match. We are unable to do any sort of case sensitivity (we convert all queries to lowercase, as well as the text through which we're searching). We could also _try_ to make regex searching work, but that's much harder to search across nodes (e.g. /><div>(\w+)<\/div/ wouldn't work). If we limit the regex search to within a specific node (as it does now), then that shouldn't be too hard.
Devin Rousso
Comment 4
2019-03-12 12:43:50 PDT
Created
attachment 364427
[details]
Patch
EWS Watchlist
Comment 5
2019-03-12 12:45:35 PDT
This patch modifies the inspector protocol. Please ensure that any frontend changes appropriately use feature checks for new protocol features.
WebKit Commit Bot
Comment 6
2019-03-20 09:21:43 PDT
Comment on
attachment 364427
[details]
Patch Clearing flags on attachment: 364427 Committed
r243207
: <
https://trac.webkit.org/changeset/243207
>
WebKit Commit Bot
Comment 7
2019-03-20 09:21:45 PDT
All reviewed patches have been landed. Closing bug.
Joseph Pecoraro
Comment 8
2019-03-20 11:35:45 PDT
Comment on
attachment 364427
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=364427&action=review
Awesome!
> Source/WebCore/inspector/InspectorNodeFinder.h:67 > + bool m_caseSensitive; > + > + ListHashSet<Node*> m_results; > bool m_startTagFound;
Nit: Maybe group the bools together.
> Source/WebCore/inspector/agents/InspectorDOMAgent.h:137 > - void performSearch(ErrorString&, const String& whitespaceTrimmedQuery, const JSON::Array* nodeIds, String* searchId, int* resultCount) override; > + void performSearch(ErrorString&, const String& query, const JSON::Array* nodeIds, const bool* caseSensitive, String* searchId, int* resultCount) override;
Should notify ITMLKit folks.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug