Summary: | Web Inspector: Layer mutations should be purely based on layerId, not based on nodeId | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Ross Kirsling <ross.kirsling> | ||||||||
Component: | Web Inspector | Assignee: | Nobody <webkit-unassigned> | ||||||||
Status: | RESOLVED FIXED | ||||||||||
Severity: | Normal | CC: | commit-queue, hi, 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-19 17:13:36 PDT
Created attachment 324320 [details]
Patch
Comment on attachment 324320 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=324320&action=review > Source/WebInspectorUI/ChangeLog:9 > + * UserInterface/Controllers/LayerTreeManager.js: > + (WI.LayerTreeManager.prototype.layerTreeMutations): This could use an explanation as to why this is needed or what the problem originally was. > Source/WebInspectorUI/UserInterface/Controllers/LayerTreeManager.js:-59 > - return layer.isGeneratedContent ? layer.pseudoElementId : layer.nodeId; Does this patch still work with pseudo-elements? Adding a test for this would be awesome =D > Source/WebInspectorUI/UserInterface/Controllers/LayerTreeManager.js:-73 > - if (layer.isReflection) Is the concept of `isReflection` no longer valid/useful? (In reply to Devin Rousso from comment #2) > > + * UserInterface/Controllers/LayerTreeManager.js: > > + (WI.LayerTreeManager.prototype.layerTreeMutations): > > This could use an explanation as to why this is needed or what the problem > originally was. Can do. > > Source/WebInspectorUI/UserInterface/Controllers/LayerTreeManager.js:-59 > > - return layer.isGeneratedContent ? layer.pseudoElementId : layer.nodeId; > > Does this patch still work with pseudo-elements? Adding a test for this > would be awesome =D > > > Source/WebInspectorUI/UserInterface/Controllers/LayerTreeManager.js:-73 > > - if (layer.isReflection) > > Is the concept of `isReflection` no longer valid/useful? Sorry if this wasn't all clear above: It was incorrect to be looking for special cases involving nodeIds at all (as these need not be unique in the layer list). A preserved layer should be nothing more or less than a recycled layerId (the thing that *is* unique). Pseudo-elements were actually the very thing being mishandled on your website, as a result of this special-casing. :) Reflections should follow suit. Created attachment 324564 [details]
Patch
Comment on attachment 324564 [details]
Patch
Made ChangeLog and test more informative.
Comment on attachment 324564 [details]
Patch
r=me
Comment on attachment 324564 [details] Patch Clearing flags on attachment: 324564 Committed r223914: <https://trac.webkit.org/changeset/223914> All reviewed patches have been landed. Closing bug. |