Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Web Inspector: Sources: creating a local override when viewing a reso…
…urce should automatically place the cursor where it was before https://bugs.webkit.org/show_bug.cgi?id=218301 <rdar://problem/70773143> Reviewed by Patrick Angle. * Source/WebInspectorUI/UserInterface/Base/Main.js: (WI.showLocalResourceOverride): If the overridden `WI.Resource` is also provided, grab the selected text and scroll position from the `WI.ContentView` created for it (if it exists) and pass it along when showing the `WI.ContentView` for the given `WI.LocalResourceOverride`. * Source/WebInspectorUI/UserInterface/Views/ContextMenuUtilities.js: (WI.appendContextMenuItemsForSourceCode): * Source/WebInspectorUI/UserInterface/Views/FontResourceContentView.js: (WI.FontResourceContentView.prototype.dropZoneHandleDrop): * Source/WebInspectorUI/UserInterface/Views/ImageResourceContentView.js: (WI.ImageResourceContentView.prototype.dropZoneHandleDrop): * Source/WebInspectorUI/UserInterface/Views/LocalResourceOverrideTreeElement.js: (WI.LocalResourceOverrideTreeElement.prototype.willDismissPopover): * Source/WebInspectorUI/UserInterface/Views/LocalResourceOverrideWarningView.js: (WI.LocalResourceOverrideWarningView.prototype.initialLayout): * Source/WebInspectorUI/UserInterface/Views/ResourceContentView.js: (WI.ResourceContentView.prototype.async _createAndShowLocalResourceOverride): (WI.ResourceContentView.prototype._handleImportLocalResourceOverride): Pass along the overridden `WI.Resource`. * Source/WebInspectorUI/UserInterface/Views/TextEditor.js: (WI.TextEditor.prototype.get scrollOffset): Added. (WI.TextEditor.prototype.set scrollOffset): Added. (WI.TextEditor.prototype.revealPosition): (WI.TextEditor.prototype.revealPosition.revealAndHighlightLine): (WI.TextEditor.prototype._updateAfterFormatting): (WI.TextEditor.prototype._revealPendingPositionIfPossible): Add a way for callers to get/set the scroll position. Allow callers of `revealPosition` to also `focus` for instant editability. Drive-by: Rework the structure of the parameters to make it easier to add new one. * Source/WebInspectorUI/UserInterface/Views/ResourceClusterContentView.js: (WI.ResourceClusterContentView.prototype.restoreFromCookie): (WI.ResourceClusterContentView.prototype.showResponse): (WI.ResourceClusterContentView.prototype._resourceLoadingDidFinish): Teach `restoreFromCookie` how to pull out more things (e.g. `WI.TextRange`, `WI.Point`, etc.). Drive-by: Remove parameters from `showResponse` as they're not used anywhere. * Source/WebInspectorUI/UserInterface/Views/ScriptContentView.js: (WI.ScriptContentView.prototype.revealPosition): (WI.ScriptContentView.prototype.restoreFromCookie): * Source/WebInspectorUI/UserInterface/Views/ShaderProgramContentView.js: (WI.ShaderProgramContentView.prototype.revealPosition): * Source/WebInspectorUI/UserInterface/Views/SourceCodeTextEditor.js: (WI.SourceCodeTextEditor.prototype.dialogWasDismissedWithRepresentedObject): * Source/WebInspectorUI/UserInterface/Views/TextContentView.js: (WI.TextContentView.prototype.revealPosition): * Source/WebInspectorUI/UserInterface/Views/TextResourceContentView.js: (WI.TextResourceContentView.prototype.revealPosition): Adjust `revealPosition` to simply pass along parameters instead of trying to do things with them. Canonical link: https://commits.webkit.org/251279@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@295224 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
Showing
14 changed files
with
141 additions
and
83 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.