Work in progress: Web Inspector: Layers 3D view does not re-snapshot preserved layers after repaint#62306
Merged
webkit-commit-queue merged 1 commit intoWebKit:mainfrom Apr 10, 2026
Conversation
Collaborator
|
EWS run on previous version of this PR (hash 4d0bf5a) Details |
dcrousso
approved these changes
Apr 9, 2026
Comment on lines
+291
to
+297
| for (let child of layerGroup.children) { | ||
| child.geometry?.dispose(); | ||
| child.material?.map?.dispose(); | ||
| child.material?.dispose(); | ||
| } | ||
| while (layerGroup.children.length > 0) | ||
| layerGroup.remove(layerGroup.children[0]); |
Comment on lines
+555
to
+556
| if (layerGroup) | ||
| layerGroup.position.set(0, 0, index * zInterval); |
Member
There was a problem hiding this comment.
NIT: we could use optional chaining here
Suggested change
| if (layerGroup) | |
| layerGroup.position.set(0, 0, index * zInterval); | |
| layerGroup?.position.set(0, 0, index * zInterval); |
Comment on lines
+559
to
+560
| this._boundingBox.setFromObject(this._scene); | ||
| this._controls.maxDistance = this._boundingBox.max.z + WI.Layers3DContentView._zPadding; |
Member
There was a problem hiding this comment.
can you elaborate why these are needed?
4d0bf5a to
650714f
Compare
Collaborator
|
EWS run on current version of this PR (hash 650714f) Details |
…preserved layers after repaint https://bugs.webkit.org/show_bug.cgi?id=311767 rdar://174358757 Reviewed by Devin Rousso. When layerTreeDidChange fires and layers have the same IDs as before, they are classified as "preserved" and keep their existing textures indefinitely — even if their content has been repainted. Compare each preserved layer's paintCount to detect repaints and re-snapshot when it changes. Toggling the layer contents setting rebuilds meshes but does not reposition layer groups at the new z-interval (10 for textured, 25 for non-textured). Add z-position update and bounding box recalculation after refresh. * Source/WebInspectorUI/UserInterface/Views/Layers3DContentView.js: (WI.Layers3DContentView.prototype._updateLayers): (WI.Layers3DContentView.prototype._disposeLayerGroupChildren): (WI.Layers3DContentView.prototype._handleLayerContentsSettingChanged): Canonical link: https://commits.webkit.org/310892@main
650714f to
787ecfc
Compare
Collaborator
|
Committed 310892@main (787ecfc): https://commits.webkit.org/310892@main Reviewed commits have been landed. Closing PR #62306 and removing active labels. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🛠 mac-apple
787ecfc
650714f
🛠 win🧪 win-tests🧪 api-mac-debug🛠 ios-safer-cpp🛠 playstation🧪 mac-intel-wk2🛠 watch