Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: fcd2b36fa9f947a3182686b28c5af0f3f553b188 https://github.com/WebKit/WebKit/commit/fcd2b36fa9f947a3182686b28c5af0f3f553b188 Author: Devin Rousso <drou...@apple.com> Date: 2022-10-05 (Wed, 05 Oct 2022)
Changed paths: A LayoutTests/inspector/dom-debugger/event-listener-breakpoints-all-events-expected.txt A LayoutTests/inspector/dom-debugger/event-listener-breakpoints-all-events.html A LayoutTests/inspector/dom-debugger/event-listener-breakpoints-builtin-exact-case-insensitive-expected.txt A LayoutTests/inspector/dom-debugger/event-listener-breakpoints-builtin-exact-case-insensitive.html A LayoutTests/inspector/dom-debugger/event-listener-breakpoints-builtin-exact-case-sensitive-expected.txt A LayoutTests/inspector/dom-debugger/event-listener-breakpoints-builtin-exact-case-sensitive.html A LayoutTests/inspector/dom-debugger/event-listener-breakpoints-builtin-regex-case-insensitive-expected.txt A LayoutTests/inspector/dom-debugger/event-listener-breakpoints-builtin-regex-case-insensitive.html A LayoutTests/inspector/dom-debugger/event-listener-breakpoints-builtin-regex-case-sensitive-expected.txt A LayoutTests/inspector/dom-debugger/event-listener-breakpoints-builtin-regex-case-sensitive.html A LayoutTests/inspector/dom-debugger/event-listener-breakpoints-custom-exact-case-insensitive-expected.txt A LayoutTests/inspector/dom-debugger/event-listener-breakpoints-custom-exact-case-insensitive.html A LayoutTests/inspector/dom-debugger/event-listener-breakpoints-custom-exact-case-sensitive-expected.txt A LayoutTests/inspector/dom-debugger/event-listener-breakpoints-custom-exact-case-sensitive.html A LayoutTests/inspector/dom-debugger/event-listener-breakpoints-custom-regex-case-insensitive-expected.txt A LayoutTests/inspector/dom-debugger/event-listener-breakpoints-custom-regex-case-insensitive.html A LayoutTests/inspector/dom-debugger/event-listener-breakpoints-custom-regex-case-sensitive-expected.txt A LayoutTests/inspector/dom-debugger/event-listener-breakpoints-custom-regex-case-sensitive.html M LayoutTests/inspector/dom-debugger/event-listener-breakpoints-expected.txt M LayoutTests/inspector/dom-debugger/event-listener-breakpoints.html M LayoutTests/inspector/dom-debugger/resources/event-breakpoint-utilities.js M Source/JavaScriptCore/inspector/protocol/DOMDebugger.json M Source/WebCore/inspector/agents/InspectorDOMDebuggerAgent.cpp M Source/WebCore/inspector/agents/InspectorDOMDebuggerAgent.h M Source/WebInspectorUI/UserInterface/Controllers/CodeMirrorCompletionController.js M Source/WebInspectorUI/UserInterface/Controllers/DOMDebuggerManager.js M Source/WebInspectorUI/UserInterface/Main.html M Source/WebInspectorUI/UserInterface/Models/EventBreakpoint.js M Source/WebInspectorUI/UserInterface/Views/BreakpointPopover.css M Source/WebInspectorUI/UserInterface/Views/BreakpointPopover.js R Source/WebInspectorUI/UserInterface/Views/EventBreakpointPopover.css M Source/WebInspectorUI/UserInterface/Views/EventBreakpointPopover.js M Source/WebInspectorUI/UserInterface/Views/SourcesNavigationSidebarPanel.js R Source/WebInspectorUI/UserInterface/Views/SymbolicBreakpointPopover.css R Source/WebInspectorUI/UserInterface/Views/URLBreakpointPopover.css Log Message: ----------- Web Inspector: DOMDebugger: event breakpoints should support case insensitive and regex matching https://bugs.webkit.org/show_bug.cgi?id=246090 Reviewed by Patrick Angle. This allows developers to create breakpoints for entire groups of events (e.g. `mouse*`) instead of having to create separate ones for each item in the group (e.g. `mousedown`, `mouseup`, etc.). This also allows for easier sharing of any actions since there's only one breakpoint instead of multiple. * Source/JavaScriptCore/inspector/protocol/DOMDebugger.json: * Source/WebCore/inspector/agents/InspectorDOMDebuggerAgent.h: (WebCore::InspectorDOMDebuggerAgent::EventBreakpoint::operator== const): Added. * Source/WebCore/inspector/agents/InspectorDOMDebuggerAgent.cpp: (WebCore::InspectorDOMDebuggerAgent::mainFrameNavigated): (WebCore::InspectorDOMDebuggerAgent::setEventBreakpoint): (WebCore::InspectorDOMDebuggerAgent::removeEventBreakpoint): (WebCore::InspectorDOMDebuggerAgent::willHandleEvent): (WebCore::InspectorDOMDebuggerAgent::didHandleEvent): (WebCore::InspectorDOMDebuggerAgent::EventBreakpoint::matches): Added. * Source/WebInspectorUI/UserInterface/Controllers/DOMDebuggerManager.js: (WI.DOMDebuggerManager.prototype.listenerBreakpointsForEventName): Added. (WI.DOMDebuggerManager.prototype.addEventBreakpoint): (WI.DOMDebuggerManager.prototype._commandArgumentsForEventBreakpoint): (WI.DOMDebuggerManager.prototype.listenerBreakpointForEventName): Deleted. * Source/WebInspectorUI/UserInterface/Models/EventBreakpoint.js: (WI.EventBreakpoint): (WI.EventBreakpoint.get supportsCaseSensitive): Added. (WI.EventBreakpoint.get supportsIsRegex): Added. (WI.EventBreakpoint.fromJSON): (WI.EventBreakpoint.prototype.get caseSensitive): Added. (WI.EventBreakpoint.prototype.get isRegex): Added. (WI.EventBreakpoint.prototype.get displayName): (WI.EventBreakpoint.prototype.matches): Added. (WI.EventBreakpoint.prototype.equals): Added. (WI.EventBreakpoint.prototype.saveIdentityToCookie): (WI.EventBreakpoint.prototype.toJSON): * Source/WebInspectorUI/UserInterface/Views/EventBreakpointPopover.js: (WI.EventBreakpointPopover): (WI.EventBreakpointPopover.prototype.completionControllerCompletionsNeeded): Added. (WI.EventBreakpointPopover.prototype.populateContent): (WI.EventBreakpointPopover.prototype.createBreakpoint): (WI.EventBreakpointPopover.prototype._updateDOMEventNameCodeMirrorMode): Added. (WI.EventBreakpointPopover.prototype.dismiss): Deleted. (WI.EventBreakpointPopover.prototype.completionSuggestionsClickedCompletion): Deleted. (WI.EventBreakpointPopover.prototype._showSuggestionsView): Deleted. (WI.EventBreakpointPopover.prototype._handleEventInputKeydown): Deleted. (WI.EventBreakpointPopover.prototype._handleEventInputInput): Deleted. (WI.EventBreakpointPopover.prototype._handleEventInputBlur): Deleted. Rework how builtin event name autocomplete works now that the event name input is a CodeMirror. * Source/WebInspectorUI/UserInterface/Views/SourcesNavigationSidebarPanel.js: (WI.SourcesNavigationSidebarPanel.prototype._updatePauseReasonSection): It's now possible for multiple `WI.EventBreakpoint` to match a given event name. * Source/WebInspectorUI/UserInterface/Views/BreakpointPopover.css: (.popover .edit-breakpoint-popover-content > table > tr > td > .editor): Added. (.popover .edit-breakpoint-popover-content > table > tr:last-child > td > .editor): Added. (.popover .edit-breakpoint-popover-content > table > tr > td > .editor > .CodeMirror): Added. (.popover .edit-breakpoint-popover-content.wide > table > tr > td > .editor > .CodeMirror): Added. (.popover .edit-breakpoint-popover-content > table > tr > td > .editor + label + label): Added. (@media (prefers-color-scheme: dark) .popover .edit-breakpoint-popover-content > table > tr > td > .editor): Added. (.popover .edit-breakpoint-popover-content > table > tr.condition > td > .editor): Deleted. (.popover .edit-breakpoint-popover-content > table > tr.condition > td > .editor > .CodeMirror): Deleted. (.popover .edit-breakpoint-popover-content.wide .condition > .CodeMirror): Deleted. * Source/WebInspectorUI/UserInterface/Views/EventBreakpointPopover.css: Removed. * Source/WebInspectorUI/UserInterface/Views/SymbolicBreakpointPopover.css: Removed. * Source/WebInspectorUI/UserInterface/Views/URLBreakpointPopover.css: Removed. * Source/WebInspectorUI/UserInterface/Main.html: Unify the styling across all `WI.BreakpointPopover` subclasses. * Source/WebInspectorUI/UserInterface/Controllers/CodeMirrorCompletionController.js: (WI.CodeMirrorCompletionController.prototype.commitCurrentCompletion): Added. (WI.CodeMirrorCompletionController.prototype.get _currentReplacementText): (WI.CodeMirrorCompletionController.prototype._commitCompletionHint): (WI.CodeMirrorCompletionController.prototype._commitCompletionHint.update): Deleted. Drive-by: Add utility methods for forcing the current completion to commit, as well as fixing a bug where unset variables would result in a completion of `"undefined"`. * Source/WebInspectorUI/UserInterface/Views/BreakpointPopover.js: (WI.BreakpointPopover.prototype._handleAddActionButtonClick): Drive-by: Wait to `update` so that CodeMirror has a chance to render first (which avoids scrollbars). * LayoutTests/inspector/dom-debugger/event-listener-breakpoints.html: * LayoutTests/inspector/dom-debugger/event-listener-breakpoints-expected.txt: * LayoutTests/inspector/dom-debugger/event-listener-breakpoints-all-events.html: Added. * LayoutTests/inspector/dom-debugger/event-listener-breakpoints-all-events-expected.txt: Added. * LayoutTests/inspector/dom-debugger/event-listener-breakpoints-builtin-exact-case-insensitive.html: Added. * LayoutTests/inspector/dom-debugger/event-listener-breakpoints-builtin-exact-case-insensitive-expected.txt: Added. * LayoutTests/inspector/dom-debugger/event-listener-breakpoints-builtin-exact-case-sensitive.html: Added. * LayoutTests/inspector/dom-debugger/event-listener-breakpoints-builtin-exact-case-sensitive-expected.txt: Added. * LayoutTests/inspector/dom-debugger/event-listener-breakpoints-builtin-regex-case-insensitive.html: Added. * LayoutTests/inspector/dom-debugger/event-listener-breakpoints-builtin-regex-case-insensitive-expected.txt: Added. * LayoutTests/inspector/dom-debugger/event-listener-breakpoints-builtin-regex-case-sensitive.html: Added. * LayoutTests/inspector/dom-debugger/event-listener-breakpoints-builtin-regex-case-sensitive-expected.txt: Added. * LayoutTests/inspector/dom-debugger/event-listener-breakpoints-custom-exact-case-insensitive.html: Added. * LayoutTests/inspector/dom-debugger/event-listener-breakpoints-custom-exact-case-insensitive-expected.txt: Added. * LayoutTests/inspector/dom-debugger/event-listener-breakpoints-custom-exact-case-sensitive.html: Added. * LayoutTests/inspector/dom-debugger/event-listener-breakpoints-custom-exact-case-sensitive-expected.txt: Added. * LayoutTests/inspector/dom-debugger/event-listener-breakpoints-custom-regex-case-insensitive.html: Added. * LayoutTests/inspector/dom-debugger/event-listener-breakpoints-custom-regex-case-insensitive-expected.txt: Added. * LayoutTests/inspector/dom-debugger/event-listener-breakpoints-custom-regex-case-sensitive.html: Added. * LayoutTests/inspector/dom-debugger/event-listener-breakpoints-custom-regex-case-sensitive-expected.txt: Added. * LayoutTests/inspector/dom-debugger/resources/event-breakpoint-utilities.js: (TestPage.registerInitializer.InspectorTest.EventBreakpoint.createBreakpoint): Split tests for `WI.EventBreakpoint` into multiple files for better sharding. Canonical link: https://commits.webkit.org/255196@main _______________________________________________ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes