Repository navigation
Implement CSSOM View GeometryUtils - #71448
Draft
jogibear9988 wants to merge 4 commits into
Draft
jogibear9988 wants to merge 4 commits into
jogibear9988 wants to merge 4 commits into
Conversation
https://bugs.webkit.org/show_bug.cgi?id=321597 Reviewed by NOBODY (OOPS!). Implement getBoxQuads(), convertQuadFromNode(), convertRectFromNode(), and convertPointFromNode() for Document, Element, and Text. Keep geometry reads synchronized with style, layout, transforms, content-visibility subtrees, and same-origin frame boundaries. Add the Web IDL dictionaries and enum, integrate the generated sources with all build systems, update the existing CSSOM View WPT expectations, and add lifecycle coverage. CSSPseudoElement remains unsupported because WebKit does not yet expose that interface.
Author
|
The implementation also landed in current chrome: https://chromium-review.googlesource.com/c/chromium/src/+/8039580/31 |
Collaborator
|
EWS run on previous version of this PR (hash dfe6d78) Details |
Collaborator
iOS Safer C++ Build #46816 (dfe6d78)❌ Found 1 failing file with 35 issues. Please address these issues before landing. See WebKit Guidelines for Safer C++ Programming. |
https://bugs.webkit.org/show_bug.cgi?id=321597 Reviewed by NOBODY (OOPS!). Protect ref-counted DOM objects and checked renderer/style objects across non-trivial GeometryUtils operations, satisfying the Safer C++ checks. Also terminate the lifecycle test baseline consistently with the WPT harness output.
Collaborator
|
EWS run on previous version of this PR (hash 2f67705) Details |
weinig
reviewed
Aug 12, 2026
Collaborator
macOS Safer C++ Build #126834 (dfe6d78)❌ Found 1 failing file with 35 issues. Please address these issues before landing. See WebKit Guidelines for Safer C++ Programming. |
https://bugs.webkit.org/show_bug.cgi?id=321597 Reviewed by NOBODY (OOPS!). Replace the abbreviated LGPL notices on the new GeometryUtils source files with the preferred WebCore BSD-style license.
Collaborator
|
EWS run on previous version of this PR (hash 1614af2) Details |
https://bugs.webkit.org/show_bug.cgi?id=321597 Reviewed by NOBODY (OOPS!). Update the CSSOM View IDL harness expectations now that GeometryUtils is exposed, and update the inspector remote-object preview expected properties for Text.
Collaborator
|
EWS run on current version of this PR (hash ad41116) Details |
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.
🧪 api-mac
Summary
GeometryUtilsmixin forDocument,Element, andText.getBoxQuads(),convertQuadFromNode(),convertRectFromNode(), andconvertPointFromNode()with support for CSS box selection and relative coordinate spaces.content-visibilitysubtrees, and same-origin frame boundaries.Scope note
The current CSSOM View specification also includes
CSSPseudoElementinGeometryNode. WebKit does not yet expose aCSSPseudoElementinterface, so this change implements the full API for the geometry node types currently available in WebKit:Document,Element, andText.Bug: https://bugs.webkit.org/show_bug.cgi?id=321597
Spec: https://drafts.csswg.org/cssom-view/#the-geometryutils-interface
Testing
Tools/Scripts/run-webkit-tests --release --no-build imported/w3c/web-platform-tests/css/cssom-view/cssom-getBoxQuads-001.html imported/w3c/web-platform-tests/css/cssom-view/cssom-getBoxQuads-002.html imported/w3c/web-platform-tests/css/cssom-view/cssom-geometryutils-lifecycle.html— all 3 tests ran as expected.Tools/Scripts/check-webkit-style --git-commit=HEAD— zero errors.git diff --check— clean.ad41116
🛠 playstation