Web Inspector: Search: allow DOM searches to be case sensitive
[WebKit-https.git] / Source / WebCore / ChangeLog
index 36e99b0..755ae1b 100644 (file)
@@ -1,3 +1,35 @@
+2019-03-20  Devin Rousso  <drousso@apple.com>
+
+        Web Inspector: Search: allow DOM searches to be case sensitive
+        https://bugs.webkit.org/show_bug.cgi?id=194673
+        <rdar://problem/48087577>
+
+        Reviewed by Timothy Hatcher.
+
+        Tests: inspector/dom/dom-search.html
+               inspector/dom/dom-search-caseSensitive.html
+
+        Since `DOM.performSearch` also searches by selector and XPath, some results may appear
+        as unexpected. As an example, searching for "BoDy" will still return the <body> as a result,
+        as although the literal node name ("BODY") didn't match, it did match via selector/XPath.
+
+        * inspector/agents/InspectorDOMAgent.h:
+        * inspector/agents/InspectorDOMAgent.cpp:
+        (WebCore::InspectorDOMAgent::performSearch):
+
+        * inspector/InspectorNodeFinder.h:
+        * inspector/InspectorNodeFinder.cpp:
+        (WebCore::InspectorNodeFinder::InspectorNodeFinder):
+        (WebCore::InspectorNodeFinder::searchUsingDOMTreeTraversal):
+        (WebCore::InspectorNodeFinder::checkEquals): Added.
+        (WebCore::InspectorNodeFinder::checkContains): Added.
+        (WebCore::InspectorNodeFinder::checkStartsWith): Added.
+        (WebCore::InspectorNodeFinder::checkEndsWith): Added.
+        (WebCore::InspectorNodeFinder::matchesAttribute):
+        (WebCore::InspectorNodeFinder::matchesElement):
+        (WebCore::InspectorNodeFinder::searchUsingXPath):
+        (WebCore::InspectorNodeFinder::searchUsingCSSSelectors):
+
 2019-03-20  Michael Catanzaro  <mcatanzaro@igalia.com>
 
         Remove copyRef() calls added in r243163