Summary: | Web Inspector: use iframe's name attribute for FrameTreeElement | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Devin Rousso <hi> | ||||||||
Component: | Web Inspector | Assignee: | Devin Rousso <hi> | ||||||||
Status: | RESOLVED FIXED | ||||||||||
Severity: | Normal | CC: | commit-queue, inspector-bugzilla-changes, joepeck, webkit-bug-importer | ||||||||
Priority: | P2 | Keywords: | InRadar | ||||||||
Version: | WebKit Nightly Build | ||||||||||
Hardware: | All | ||||||||||
OS: | All | ||||||||||
Attachments: |
|
Description
Devin Rousso
2018-10-03 22:00:26 PDT
Created attachment 351582 [details]
Patch
Comment on attachment 351582 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=351582&action=review I like the idea of this. Seems we could have a test for this. Do you have a screenshot of a before/after with this as well? > Source/WebInspectorUI/UserInterface/Views/FrameTreeElement.js:203 > + // We can't assume that `this._frame` exists since this may be called before that is set. > + if (this.resource.parentFrame.name) Is this.resource.parentFrame guaranteed to not be null? Comment on attachment 351582 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=351582&action=review >> Source/WebInspectorUI/UserInterface/Views/FrameTreeElement.js:203 >> + if (this.resource.parentFrame.name) > > Is this.resource.parentFrame guaranteed to not be null? It should always be valid. `WI.Frame.prototype.initialize` sets the `_parentFrame`, and `this.resource` is equal to the `WI.Frame.prototype.mainResource`. Additionally, every resource that get's added to a frame has it's `_parentFrame` set as well. Created attachment 351658 [details]
[Image] After Patch is applied
Any `WI.TreeElement` that follows a "%s (%s)" pattern is affected by this patch, where the first "%s" is the `name` of the `WI.Frame` and the second is the previously shown `url`.
Comment on attachment 351582 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=351582&action=review r=me > Source/WebInspectorUI/UserInterface/Views/ResourceTreeElement.js:136 > + get _mainTitleText() I think the underscore is unnecessary. I think of underscore'd things as properties, not as getters, so this messes with my brain a bit. You may want to move the Execution Context Picker in the Quick Console to this kind of formatting so we are consistent. Created attachment 351696 [details]
Patch
Comment on attachment 351696 [details] Patch Clearing flags on attachment: 351696 Committed r236885: <https://trac.webkit.org/changeset/236885> All reviewed patches have been landed. Closing bug. |