Skip to content

Include Element attributes in render tree output #47415

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

smfr
Copy link
Contributor

@smfr smfr commented Jul 1, 2025

301af9a

Include Element attributes in render tree output
https://bugs.webkit.org/show_bug.cgi?id=295248
rdar://154712771

Reviewed by NOBODY (OOPS!).

When using `showRenderTree()` it's helpful to see element classnames and
ids to match renderers to elements.

Add `Element::Element::attributesForDescription()`, and call it from
`RenderObject::outputRenderObject()`.

* Source/WebCore/dom/Element.cpp:
(WebCore::Element::attributesForDescription const):
* Source/WebCore/dom/Element.h:
* Source/WebCore/rendering/RenderLayer.cpp:
(WebCore::outputIndent): Typo fix
(WebCore::outputPaintOrderTreeRecursive):
(WebCore::outputLayerPositionTreeRecursive):
(WebCore::outputIdent): Deleted.
* Source/WebCore/rendering/RenderObject.cpp:
(WebCore::RenderObject::outputRenderObject const):

301af9a

Misc iOS, visionOS, tvOS & watchOS macOS Linux Windows
✅ 🧪 style ✅ 🛠 ios ✅ 🛠 mac ✅ 🛠 wpe ✅ 🛠 win
✅ 🧪 bindings ✅ 🛠 ios-sim ✅ 🛠 mac-AS-debug ✅ 🧪 wpe-wk2 ⏳ 🧪 win-tests
✅ 🧪 webkitperl ✅ 🧪 ios-wk2 ✅ 🧪 api-mac ✅ 🧪 api-wpe
✅ 🧪 ios-wk2-wpt loading 🧪 mac-wk1 ✅ 🛠 wpe-cairo
loading 🧪 api-ios ✅ 🧪 mac-wk2 ✅ 🛠 gtk
✅ 🛠 vision ✅ 🧪 mac-AS-debug-wk2 ✅ 🧪 gtk-wk2
✅ 🛠 vision-sim ✅ 🧪 mac-wk2-stress ✅ 🧪 api-gtk
loading 🛠 🧪 merge ✅ 🧪 vision-wk2 ✅ 🧪 mac-intel-wk2 ✅ 🛠 playstation
✅ 🛠 tv ✅ 🛠 mac-safer-cpp
✅ 🛠 tv-sim
✅ 🛠 watch
✅ 🛠 watch-sim

@smfr smfr requested review from rniwa and cdumez as code owners July 1, 2025 00:19
@smfr smfr self-assigned this Jul 1, 2025
@smfr smfr added the Tools / Tests Tools in the Tools directory, build issues, test infrastructure, and bugs in test cases label Jul 1, 2025
https://bugs.webkit.org/show_bug.cgi?id=295248
rdar://154712771

Reviewed by NOBODY (OOPS!).

When using `showRenderTree()` it's helpful to see element classnames and
ids to match renderers to elements.

Add `Element::Element::attributesForDescription()`, and call it from
`RenderObject::outputRenderObject()`.

* Source/WebCore/dom/Element.cpp:
(WebCore::Element::attributesForDescription const):
* Source/WebCore/dom/Element.h:
* Source/WebCore/rendering/RenderLayer.cpp:
(WebCore::outputIndent): Typo fix
(WebCore::outputPaintOrderTreeRecursive):
(WebCore::outputLayerPositionTreeRecursive):
(WebCore::outputIdent): Deleted.
* Source/WebCore/rendering/RenderObject.cpp:
(WebCore::RenderObject::outputRenderObject const):
@smfr smfr force-pushed the eng/Include-Element-attributes-in-render-tree-output branch from 08b23e0 to 301af9a Compare July 1, 2025 00:23
@smfr smfr added the merge-queue Applied to send a pull request to merge-queue label Jul 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merge-queue Applied to send a pull request to merge-queue Tools / Tests Tools in the Tools directory, build issues, test infrastructure, and bugs in test cases
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants