Summary: | Web Inspector: Layers tab mistakenly throws out the root element's layer. | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Ross Kirsling <ross.kirsling> | ||||||
Component: | Web Inspector | Assignee: | Nobody <webkit-unassigned> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | bburg, commit-queue, don.olmstead, inspector-bugzilla-changes, webkit-bug-importer | ||||||
Priority: | P2 | Keywords: | InRadar | ||||||
Version: | WebKit Nightly Build | ||||||||
Hardware: | All | ||||||||
OS: | All | ||||||||
Bug Depends on: | |||||||||
Bug Blocks: | 174176 | ||||||||
Attachments: |
|
Description
Ross Kirsling
2017-10-12 12:03:05 PDT
Created attachment 323542 [details]
Patch
Comment on attachment 323542 [details]
Patch
Can you write a test for the manager level change?
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? (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. Created attachment 323627 [details]
Patch
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. Comment on attachment 323627 [details] Patch Clearing flags on attachment: 323627 Committed r223428: <https://trac.webkit.org/changeset/223428> All reviewed patches have been landed. Closing bug. |