WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
178222
Web Inspector: Layers tab mistakenly throws out the root element's layer.
https://bugs.webkit.org/show_bug.cgi?id=178222
Summary
Web Inspector: Layers tab mistakenly throws out the root element's layer.
Ross Kirsling
Reported
2017-10-12 12:03:05 PDT
Whoops, the Layers tab is currently always throwing out the layer for the root element. (This means any worries about "no layers available" UX are moot...) This should be fixed in LayerTreeManager#layersForNode, as the API is currently overtailored to the legacy sidebar.
Attachments
Patch
(4.29 KB, patch)
2017-10-12 12:07 PDT
,
Ross Kirsling
no flags
Details
Formatted Diff
Diff
Patch
(10.22 KB, patch)
2017-10-12 20:52 PDT
,
Ross Kirsling
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Ross Kirsling
Comment 1
2017-10-12 12:07:32 PDT
Created
attachment 323542
[details]
Patch
Blaze Burg
Comment 2
2017-10-12 13:28:46 PDT
Comment on
attachment 323542
[details]
Patch Can you write a test for the manager level change?
Ross Kirsling
Comment 3
2017-10-12 14:54:09 PDT
It looks like there are protocol tests for LayerTree (which are not affected by this change) but no inspector tests for the manager. I'm really just trying to make the manager method a simple passthrough for the agent method -- do you know of an existing example where both get tested?
Blaze Burg
Comment 4
2017-10-12 15:15:21 PDT
(In reply to Ross Kirsling from
comment #3
)
> It looks like there are protocol tests for LayerTree (which are not affected > by this change) but no inspector tests for the manager. I'm really just > trying to make the manager method a simple passthrough for the agent method > -- do you know of an existing example where both get tested?
Tests in LayoutTests/inspector/layers/ are protocol tests, so they don't use the manager. That said, all you need to do is borrow the same test content from those tests and dump out the layers for root node. Sorry to force you into writing tests, but we have to start somewhere. Fortunately there is test content you can already use.
Ross Kirsling
Comment 5
2017-10-12 20:52:41 PDT
Created
attachment 323627
[details]
Patch
Blaze Burg
Comment 6
2017-10-16 12:57:11 PDT
Comment on
attachment 323627
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=323627&action=review
r=me
> Source/WebInspectorUI/UserInterface/Views/LayerTreeDetailsSidebarPanel.js:83 > + let layerForNode = layers[0] && layers[0].nodeId === this.domNode.id && !layers[0].isGeneratedContent ? layers[0] : null;
This is kind of complicated for one line, but that's okay I guess.
WebKit Commit Bot
Comment 7
2017-10-16 13:25:33 PDT
Comment on
attachment 323627
[details]
Patch Clearing flags on attachment: 323627 Committed
r223428
: <
https://trac.webkit.org/changeset/223428
>
WebKit Commit Bot
Comment 8
2017-10-16 13:25:35 PDT
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 9
2017-10-16 13:28:17 PDT
<
rdar://problem/35013279
>
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