Web Inspector: REGRESSION: no context menu items work when context menu clicking...
[WebKit-https.git] / Source / WebInspectorUI / ChangeLog
index d242867..27f0f8d 100644 (file)
@@ -1,3 +1,202 @@
+2019-07-24  Devin Rousso  <drousso@apple.com>
+
+        Web Inspector: REGRESSION: no context menu items work when context menu clicking on "Add Breakpoint"
+        https://bugs.webkit.org/show_bug.cgi?id=199953
+
+        Reviewed by Joseph Pecoraro.
+
+        * UserInterface/Views/ContextMenuUtilities.js:
+        (WI.addMouseDownContextMenuHandlers): Added.
+        Create a helper function for managing elements that show a context menu on "mousedown".
+
+        * UserInterface/Base/SearchUtilities.js:
+        (WI.SearchUtilities.createSettingsButton):
+        * UserInterface/Views/CanvasContentView.js:
+        (WI.CanvasContentView.prototype.initialLayout):
+        (WI.CanvasContentView.prototype._populateCanvasElementButtonContextMenu): Added.
+        (WI.CanvasContentView.prototype._populateViewShaderButtonContextMenu): Added.
+        (WI.CanvasContentView.prototype._populateViewRecordingButtonContextMenu): Added.
+        (WI.CanvasContentView.prototype._handleCanvasElementButtonMouseDown): Deleted.
+        (WI.CanvasContentView.prototype._handleViewShaderButtonMouseDown): Deleted.
+        (WI.CanvasContentView.prototype._handleViewRecordingButtonMouseDown): Deleted.
+        * UserInterface/Views/DebuggerSidebarPanel.js:
+        (WI.DebuggerSidebarPanel):
+        (WI.DebuggerSidebarPanel.prototype._populateCreateBreakpointContextMenu): Added.
+        (WI.DebuggerSidebarPanel.prototype._handleCreateBreakpointMouseDown): Deleted.
+        * UserInterface/Views/SourcesNavigationSidebarPanel.js:
+        (WI.SourcesNavigationSidebarPanel):
+        (WI.SourcesNavigationSidebarPanel.prototype._populateResourceGroupingModeContextMenu): Added.
+        (WI.SourcesNavigationSidebarPanel.prototype._populateCreateBreakpointContextMenu): Added.
+        (WI.SourcesNavigationSidebarPanel.prototype._handleResourceGroupingModeMouseDown): Deleted.
+        (WI.SourcesNavigationSidebarPanel.prototype._handleCreateBreakpointMouseDown): Deleted.
+
+        * UserInterface/Views/TabBar.js:
+        (WI.TabBar):
+        (WI.TabBar.prototype._handleTabPickerTabContextMenu): Deleted.
+        * UserInterface/Views/LegacyTabBar.js:
+        (WI.LegacyTabBar):
+        (WI.LegacyTabBar.prototype._handleTabPickerTabContextMenu): Deleted.
+        Remove the "contextmenu" handler on the tab picker, as that's already used by the entire
+        tab bar to show/hide tabs.
+
+2019-07-24  Devin Rousso  <drousso@apple.com>
+
+        Web Inspector: print the target of `console.screenshot` last so the target is the closest item to the image
+        https://bugs.webkit.org/show_bug.cgi?id=199308
+
+        Reviewed by Joseph Pecoraro.
+
+        * UserInterface/Views/ConsoleMessageView.js:
+        (WI.ConsoleMessageView.prototype.render):
+        (WI.ConsoleMessageView.prototype._appendMessageTextAndArguments):
+        (WI.ConsoleMessageView.prototype._handleContextMenu):
+        * UserInterface/Views/ConsoleMessageView.css:
+        (.console-image > .console-message-body > :matches(hr, img)): Added.
+        (.console-image > .console-message-body > hr): Added.
+        (.console-image > .console-message-body > img): Added.
+        (.console-log-level.console-image::before): Added.
+        (.console-message-body > .console-image): Deleted.
+        (.console-log-level.console-image-container::before): Deleted.
+        Allow `ConsoleMessage.MessageType.Image` to be an `ConsoleMessage.MessageLevel.Error`, and
+        print the message (and extra parameters) in that case.
+        Drive-by: reorganize the switch-case so all paths have the same `default` case.
+
+        * Localizations/en.lproj/localizedStrings.js:
+
+2019-07-23  Nikita Vasilyev  <nvasilyev@apple.com>
+
+        Web Inspector: Styles: Command-X should cut selected properties
+        https://bugs.webkit.org/show_bug.cgi?id=199341
+
+        Reviewed by Devin Rousso.
+
+        Implement cutting of selected CSS properties in the style editor.
+        Unify cutting and copying logic wherever possible.
+
+        * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
+        (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.initialLayout):
+        (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.placeTextCaretInFocusedProperty): Added.
+        Cut/copy events could only fire on SpreadsheetCSSStyleDeclarationEditor element if it
+        has selection inside of it. Placing text caret at the beginning of the focused property
+        ensures that.
+
+        (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.spreadsheetStylePropertyCopy): Deleted.
+        (WI.SpreadsheetCSSStyleDeclarationEditor.prototype._handleKeyDown):
+        (WI.SpreadsheetCSSStyleDeclarationEditor.prototype._copySelectedProperties): Added.
+        (WI.SpreadsheetCSSStyleDeclarationEditor.prototype._removeSelectedProperties): Added.
+        * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:
+        (WI.SpreadsheetCSSStyleDeclarationSection.prototype._stopSelection):
+        * UserInterface/Views/SpreadsheetStyleProperty.js:
+        Remove old copying logic.
+
+2019-07-23  Nikita Vasilyev  <nvasilyev@apple.com>
+
+        Web Inspector: Display "Resource has no content" for about:blank iframes instead of an error
+        https://bugs.webkit.org/show_bug.cgi?id=198029
+
+        Reviewed by Devin Rousso.
+
+        Display "about:blank" in the middle of the content view when selecting "about:blank" resources.
+        Previoulsly, we showed a misleading "An error occurred trying to load the resource" error
+        message.
+
+        * UserInterface/Models/CSSStyleSheet.js:
+        (WI.CSSStyleSheet.prototype.requestContentFromBackend):
+        * UserInterface/Models/Resource.js:
+        (WI.Resource.prototype.requestContentFromBackend):
+        * UserInterface/Models/Script.js:
+        (WI.Script.prototype.requestContentFromBackend):
+        * UserInterface/Models/SourceCode.js:
+        (WI.SourceCode.generateSpecialContentForURL):
+        (WI.SourceCode.prototype._processContent):
+        (WI.SourceCode):
+        * UserInterface/Views/ResourceContentView.js:
+        (WI.ResourceContentView.prototype._contentAvailable):
+
+        * UserInterface/Views/SourceCodeTextEditor.js:
+        (WI.SourceCodeTextEditor.prototype._contentAvailable):
+        (WI.SourceCodeTextEditor.prototype._showMessage):
+        * UserInterface/Views/TextResourceContentView.js:
+        (WI.TextResourceContentView.prototype._contentDidPopulate):
+        Display empty text editor when it has no content instead of "Resource has no content" message.
+
+2019-07-22  Devin Rousso  <drousso@apple.com>
+
+        Web Inspector: Uncaught Exception: Breakpoint at specified location already exists.
+        https://bugs.webkit.org/show_bug.cgi?id=197034
+        <rdar://problem/50049004>
+
+        Reviewed by Joseph Pecoraro.
+
+        When "adjusting" a `WI.Breakpoint` (e.g. removing and then re-adding with a different
+        configuration), make sure to only re-add the `WI.Breakpoint` to the `WI.Target` it was just
+        removed from, rather to all `WI.targets`.
+
+        Since we iterate over `WI.targets` in both `WI.DebuggerManager.prototype._setBreakpoint` and
+        `WI.DebuggerManager.prototype._removeBreakpoint`, we ended up iterating `WI.targets` twice.
+
+        Each time the `WI.Breakpoint` is removed from a `WI.Target`, pass the `WI.Target` to the
+        `callback` given to `WI.DebuggerManager.prototype._removeBreakpoint`, so that the eventual
+        call to `WI.DebuggerManager.prototype._setBreakpoint` can reuse it as the `specificTarget`,
+        instead of iterating `WI.targets` (meaning we only iterate it once).
+
+        * UserInterface/Controllers/DebuggerManager.js:
+        (WI.DebuggerManager.prototype.addBreakpoint):
+        (WI.DebuggerManager.prototype._removeBreakpoint.didRemoveBreakpoint):
+        (WI.DebuggerManager.prototype._breakpointDisplayLocationDidChange):
+        (WI.DebuggerManager.prototype._breakpointEditablePropertyDidChange):
+
+2019-07-22  Devin Rousso  <drousso@apple.com>
+
+        Localization: change fps to FPS
+        <rdar://problem/53342508>
+
+        Rubber-stamped by Joseph Pecoraro.
+
+        * UserInterface/Views/RenderingFrameTimelineOverviewGraph.js:
+        (WI.RenderingFrameTimelineOverviewGraph.prototype._updateDividers.createDividerAtPosition):
+
+        * Localizations/en.lproj/localizedStrings.js:
+
+2019-07-19  Devin Rousso  <drousso@apple.com>
+
+        Web Inspector: Issues toggling multiple breakpoints on one line
+        https://bugs.webkit.org/show_bug.cgi?id=199918
+
+        Reviewed by Joseph Pecoraro.
+
+        * UserInterface/Views/SourceCodeTextEditor.js:
+        (WI.SourceCodeTextEditor):
+        (WI.SourceCodeTextEditor.prototype.close):
+        (WI.SourceCodeTextEditor.prototype.textEditorGutterContextMenu):
+        (WI.SourceCodeTextEditor.prototype.textEditorUpdatedFormatting):
+        (WI.SourceCodeTextEditor.prototype._handleFormatterDidChange): Added.
+        Listen for `WI.SourceCode.Event.FormatterDidChange` events as there may be multiple content
+        views for the same `WI.SourceCode`. Previously, if there were, only the active one would
+        properly update it's "line -> column -> breakpoint" mapping, causing an error to be thrown
+        when the non-active content views tried to retrieve the breakpoint for the new line/column.
+
+2019-07-17  Olivier Blin  <olivier.blin@softathome.com>
+
+        Web Inspector: application/xml content not shown
+        https://bugs.webkit.org/show_bug.cgi?id=199861
+
+        Reviewed by Devin Rousso.
+
+        application/xml content from XHR requests was not shown in the
+        inspector, an error message was displayed instead.
+
+        application/xml content should be treated as text, since
+        application/xml is the standard mimetype for XML content.
+        Apache serves XML content with the application/xml mimetype by
+        default.
+
+        * UserInterface/Base/MIMETypeUtilities.js:
+        (WI.fileExtensionForMIMEType):
+        Report "xml" extension for "application/xml" mimetype.
+        (WI.shouldTreatMIMETypeAsText):
+        Treat XML files as text.
+
 2019-07-16  Nikita Vasilyev  <nvasilyev@apple.com>
 
         Web Inspector: Changes panel should be strictly LTR