Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 6bae8554f35d8bae4df1929726f60f9adbc40eca
      
https://github.com/WebKit/WebKit/commit/6bae8554f35d8bae4df1929726f60f9adbc40eca
  Author: Alexey Proskuryakov <[email protected]>
  Date:   2026-10-11 (Sun, 11 Oct 2026)

  Changed paths:
    A LayoutTests/inspector/unit-tests/search-utilities-expected.txt
    A LayoutTests/inspector/unit-tests/search-utilities.html
    M Source/WebInspectorUI/UserInterface/Base/SearchUtilities.js
    M Source/WebInspectorUI/UserInterface/Test.html
    M Source/WebInspectorUI/UserInterface/Views/DOMTreeElement.js
    M Source/WebInspectorUI/UserInterface/Views/LogContentView.js
    M Source/WebInspectorUI/UserInterface/Views/ResourceHeadersContentView.js
    M Source/WebInspectorUI/UserInterface/Views/ResourceSecurityContentView.js
    M Source/WebInspectorUI/UserInterface/Views/SearchSidebarPanel.js
    M Source/WebInspectorUI/UserInterface/Views/SourceCodeTextEditor.js

  Log Message:
  -----------
  Web Inspector becomes unresponsive when searching '**'
https://bugs.webkit.org/show_bug.cgi?id=326990
rdar://189614148

Reviewed by Devin Rousso.

Apply the infinite looping fix from bug 251622 to more places that need it, 
sharing it
via a new WI.SearchUtilities.forEachMatch helper.

Test: inspector/unit-tests/search-utilities.html

* LayoutTests/inspector/unit-tests/search-utilities-expected.txt: Added.
* LayoutTests/inspector/unit-tests/search-utilities.html: Added.
This is a unit test for the new method, as we don't have a good way to test end 
to end.

* Source/WebInspectorUI/UserInterface/Base/SearchUtilities.js:
(WI.SearchUtilities.forEachMatch): Added.

* Source/WebInspectorUI/UserInterface/Test.html: Added Base/SearchUtilities.js

* Source/WebInspectorUI/UserInterface/Views/DOMTreeElement.js:
(WI.DOMTreeElement.prototype._highlightSearchResults):
* Source/WebInspectorUI/UserInterface/Views/LogContentView.js:
(WI.LogContentView.prototype.performSearch):
* Source/WebInspectorUI/UserInterface/Views/ResourceHeadersContentView.js:
(WI.ResourceHeadersContentView.prototype._perfomSearchOnKeyValuePairs):
* Source/WebInspectorUI/UserInterface/Views/ResourceSecurityContentView.js:
(WI.ResourceSecurityContentView.prototype._perfomSearchOnKeyValuePairs):
* Source/WebInspectorUI/UserInterface/Views/SearchSidebarPanel.js:
(WI.SearchSidebarPanel.prototype.performSearch):
Removed the local forEachMatch, which is now in WI.SearchUtilities. The new 
function
also resets lastIndex for each line, which was added here in bug 326959.
(WI.SearchSidebarPanel.prototype.performSearch.resourceCallback):
(WI.SearchSidebarPanel.prototype.performSearch.scriptCallback):
(WI.SearchSidebarPanel.prototype.performSearch.domSearchResultsCallback):
* Source/WebInspectorUI/UserInterface/Views/SourceCodeTextEditor.js:
(WI.SourceCodeTextEditor.prototype.customPerformSearch.searchResultCallback):

Canonical link: https://commits.webkit.org/323376@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to