WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
190275
Web Inspector: use iframe's name attribute for FrameTreeElement
https://bugs.webkit.org/show_bug.cgi?id=190275
Summary
Web Inspector: use iframe's name attribute for FrameTreeElement
Devin Rousso
Reported
2018-10-03 22:00:26 PDT
Some iframe use the `srcdoc` attribute to set their content instead of a URL. As a result, the main resource has no "real" URL, meaning we are unable to show anything meaningful. For those cases (and those that have a `name` regardless), we should show the `name` somewhere in the `FrameTreeElement`s text.
Attachments
Patch
(3.19 KB, patch)
2018-10-03 22:02 PDT
,
Devin Rousso
no flags
Details
Formatted Diff
Diff
[Image] After Patch is applied
(236.11 KB, image/png)
2018-10-04 23:18 PDT
,
Devin Rousso
no flags
Details
Patch
(4.31 KB, patch)
2018-10-05 13:34 PDT
,
Devin Rousso
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Devin Rousso
Comment 1
2018-10-03 22:02:44 PDT
Created
attachment 351582
[details]
Patch
Radar WebKit Bug Importer
Comment 2
2018-10-03 22:03:30 PDT
<
rdar://problem/44998609
>
Joseph Pecoraro
Comment 3
2018-10-04 11:40:03 PDT
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?
Devin Rousso
Comment 4
2018-10-04 23:15:56 PDT
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.
Devin Rousso
Comment 5
2018-10-04 23:18:01 PDT
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`.
Joseph Pecoraro
Comment 6
2018-10-05 12:14:55 PDT
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.
Joseph Pecoraro
Comment 7
2018-10-05 12:15:21 PDT
You may want to move the Execution Context Picker in the Quick Console to this kind of formatting so we are consistent.
Devin Rousso
Comment 8
2018-10-05 13:34:55 PDT
Created
attachment 351696
[details]
Patch
WebKit Commit Bot
Comment 9
2018-10-05 14:12:56 PDT
Comment on
attachment 351696
[details]
Patch Clearing flags on attachment: 351696 Committed
r236885
: <
https://trac.webkit.org/changeset/236885
>
WebKit Commit Bot
Comment 10
2018-10-05 14:12:57 PDT
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug