WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
185187
Web Inspector: simplify the WI.Collection interface
https://bugs.webkit.org/show_bug.cgi?id=185187
Summary
Web Inspector: simplify the WI.Collection interface
Devin Rousso
Reported
2018-05-01 22:32:55 PDT
Instead of using `toArray`, we should make use of `Symbol.iterator` and other such things for a cleaner API.
Attachments
Patch
(51.98 KB, patch)
2018-05-01 22:36 PDT
,
Devin Rousso
no flags
Details
Formatted Diff
Diff
Archive of layout-test-results from ews104 for mac-sierra-wk2
(3.21 MB, application/zip)
2018-05-01 23:28 PDT
,
EWS Watchlist
no flags
Details
Archive of layout-test-results from ews102 for mac-sierra
(2.25 MB, application/zip)
2018-05-01 23:39 PDT
,
EWS Watchlist
no flags
Details
Archive of layout-test-results from ews114 for mac-sierra
(3.13 MB, application/zip)
2018-05-02 01:00 PDT
,
EWS Watchlist
no flags
Details
Patch
(54.29 KB, patch)
2018-05-02 01:29 PDT
,
Devin Rousso
no flags
Details
Formatted Diff
Diff
Archive of layout-test-results from ews104 for mac-sierra-wk2
(2.71 MB, application/zip)
2018-05-02 02:38 PDT
,
EWS Watchlist
no flags
Details
Patch
(57.43 KB, patch)
2018-05-04 11:40 PDT
,
Devin Rousso
no flags
Details
Formatted Diff
Diff
Show Obsolete
(6)
View All
Add attachment
proposed patch, testcase, etc.
Devin Rousso
Comment 1
2018-05-01 22:36:18 PDT
Created
attachment 339280
[details]
Patch
EWS Watchlist
Comment 2
2018-05-01 23:28:15 PDT
Comment hidden (obsolete)
Comment on
attachment 339280
[details]
Patch
Attachment 339280
[details]
did not pass mac-wk2-ews (mac-wk2): Output:
http://webkit-queues.webkit.org/results/7534207
New failing tests: http/tests/inspector/network/har/har-page.html http/tests/inspector/dom/cross-domain-inspected-node-access.html http/tests/inspector/dom/disconnect-dom-tree-after-main-frame-navigation.html
EWS Watchlist
Comment 3
2018-05-01 23:28:16 PDT
Comment hidden (obsolete)
Created
attachment 339282
[details]
Archive of layout-test-results from ews104 for mac-sierra-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews104 Port: mac-sierra-wk2 Platform: Mac OS X 10.12.6
EWS Watchlist
Comment 4
2018-05-01 23:39:52 PDT
Comment hidden (obsolete)
Comment on
attachment 339280
[details]
Patch
Attachment 339280
[details]
did not pass mac-ews (mac): Output:
http://webkit-queues.webkit.org/results/7534282
New failing tests: http/tests/inspector/dom/cross-domain-inspected-node-access.html http/tests/inspector/dom/disconnect-dom-tree-after-main-frame-navigation.html
EWS Watchlist
Comment 5
2018-05-01 23:39:54 PDT
Comment hidden (obsolete)
Created
attachment 339283
[details]
Archive of layout-test-results from ews102 for mac-sierra The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews102 Port: mac-sierra Platform: Mac OS X 10.12.6
EWS Watchlist
Comment 6
2018-05-02 01:00:41 PDT
Comment hidden (obsolete)
Comment on
attachment 339280
[details]
Patch
Attachment 339280
[details]
did not pass mac-debug-ews (mac): Output:
http://webkit-queues.webkit.org/results/7534614
New failing tests: http/tests/inspector/dom/cross-domain-inspected-node-access.html http/tests/inspector/dom/disconnect-dom-tree-after-main-frame-navigation.html
EWS Watchlist
Comment 7
2018-05-02 01:00:42 PDT
Comment hidden (obsolete)
Created
attachment 339288
[details]
Archive of layout-test-results from ews114 for mac-sierra The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews114 Port: mac-sierra Platform: Mac OS X 10.12.6
Devin Rousso
Comment 8
2018-05-02 01:29:17 PDT
Created
attachment 339290
[details]
Patch
EWS Watchlist
Comment 9
2018-05-02 02:38:34 PDT
Comment hidden (obsolete)
Comment on
attachment 339290
[details]
Patch
Attachment 339290
[details]
did not pass mac-wk2-ews (mac-wk2): Output:
http://webkit-queues.webkit.org/results/7535365
New failing tests: http/tests/inspector/network/har/har-page.html
EWS Watchlist
Comment 10
2018-05-02 02:38:35 PDT
Comment hidden (obsolete)
Created
attachment 339293
[details]
Archive of layout-test-results from ews104 for mac-sierra-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews104 Port: mac-sierra-wk2 Platform: Mac OS X 10.12.6
Blaze Burg
Comment 11
2018-05-03 09:36:40 PDT
Comment on
attachment 339290
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=339290&action=review
r=me, nice cleanup
> Source/WebInspectorUI/UserInterface/Views/OpenResourceDialog.js:289 > + for (let resource of currentFrame.resourceCollection)
Maybe a dumb question, but why isn't the main resource in the resource collection?
> LayoutTests/http/tests/inspector/network/har/har-page.html:77 > + for (let resource of WI.frameResourceManager.mainFrame.resourceCollection)
You should just push with destructuring, the loop isn't needed here. And somehow this test is failing on EWS?
Devin Rousso
Comment 12
2018-05-03 16:23:20 PDT
Comment on
attachment 339290
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=339290&action=review
>> Source/WebInspectorUI/UserInterface/Views/OpenResourceDialog.js:289 >> + for (let resource of currentFrame.resourceCollection) > > Maybe a dumb question, but why isn't the main resource in the resource collection?
I'm not sure actually 😅. I will check to see if the `mainResource` is part of the `resourceCollection.` If I had to guess as to why not (if that's the case), I think it might be that `resourceCollection` holds all the resources associated with the `mainResource` (e.g. CSS and JS files loaded by the main HTML).
>> LayoutTests/http/tests/inspector/network/har/har-page.html:77 >> + for (let resource of WI.frameResourceManager.mainFrame.resourceCollection) > > You should just push with destructuring, the loop isn't needed here. And somehow this test is failing on EWS?
Ah I missed this one. Not really sure why the test is failing 🤔. The diff suggest that the size of the resulting HAR is different, so maybe my changes affected that?
Blaze Burg
Comment 13
2018-05-03 16:51:31 PDT
(In reply to Devin Rousso from
comment #12
)
> Comment on
attachment 339290
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=339290&action=review
> > >> Source/WebInspectorUI/UserInterface/Views/OpenResourceDialog.js:289 > >> + for (let resource of currentFrame.resourceCollection) > > > > Maybe a dumb question, but why isn't the main resource in the resource collection? > > I'm not sure actually 😅. I will check to see if the `mainResource` is part > of the `resourceCollection.` If I had to guess as to why not (if that's the > case), I think it might be that `resourceCollection` holds all the resources > associated with the `mainResource` (e.g. CSS and JS files loaded by the main > HTML). > > >> LayoutTests/http/tests/inspector/network/har/har-page.html:77 > >> + for (let resource of WI.frameResourceManager.mainFrame.resourceCollection) > > > > You should just push with destructuring, the loop isn't needed here. And somehow this test is failing on EWS? > > Ah I missed this one. Not really sure why the test is failing 🤔. The diff > suggest that the size of the resulting HAR is different, so maybe my changes > affected that?
Ah yeah, that is dumb. We should be filtering that out, but feel free to take the easy way out this time.
Devin Rousso
Comment 14
2018-05-04 11:40:39 PDT
Created
attachment 339575
[details]
Patch
WebKit Commit Bot
Comment 15
2018-05-04 16:56:16 PDT
Comment on
attachment 339575
[details]
Patch Clearing flags on attachment: 339575 Committed
r231391
: <
https://trac.webkit.org/changeset/231391
>
WebKit Commit Bot
Comment 16
2018-05-04 16:56:17 PDT
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 17
2018-05-04 16:57:34 PDT
<
rdar://problem/39994475
>
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