Skip to content

Conversation

@anttijk
Copy link
Contributor

@anttijk anttijk commented Aug 30, 2023

82d7f77

Nullptr crash with :has(~sibling) invalidation in shadow tree
https://bugs.webkit.org/show_bug.cgi?id=260902
rdar://110129945

Reviewed by Chris Dumez.

* LayoutTests/fast/has-sibling-without-parent-crash-expected.html: Added.
* LayoutTests/fast/has-sibling-without-parent-crash.html: Added.
* Source/WebCore/style/StyleInvalidator.cpp:
(WebCore::Style::Invalidator::invalidateStyleWithMatchElement):

Elements with siblings don't have a parent element when they are parented to a shadow root.

Canonical link: https://commits.webkit.org/267454@main

5e8f276

Misc iOS, tvOS & watchOS macOS Linux Windows
✅ 🧪 style ✅ 🛠 ios ✅ 🛠 mac ✅ 🛠 wpe ✅ 🛠 wincairo
✅ 🧪 bindings ✅ 🛠 ios-sim ✅ 🛠 mac-AS-debug 🧪 wpe-wk2
✅ 🧪 webkitperl ✅ 🧪 ios-wk2 ✅ 🧪 api-mac ✅ 🛠 gtk
✅ 🧪 ios-wk2-wpt ✅ 🧪 mac-wk1 🧪 gtk-wk2
✅ 🧪 api-ios ✅ 🧪 mac-wk2 ✅ 🧪 api-gtk
✅ 🛠 tv 🧪 mac-AS-debug-wk2
✅ 🛠 tv-sim ✅ 🧪 mac-wk2-stress
✅ 🛠 🧪 merge ✅ 🛠 watch
✅ 🛠 watch-sim

@anttijk anttijk self-assigned this Aug 30, 2023
@anttijk anttijk added the CSS Cascading Style Sheets implementation label Aug 30, 2023
Copy link
Contributor

@cdumez cdumez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be nice to use a RefPtr though. We're moving away from raw pointers.

@anttijk anttijk force-pushed the has-sibling-without-parent-crash branch from 4c8ce26 to 5e8f276 Compare August 30, 2023 14:56
@anttijk anttijk added the merge-queue Applied to send a pull request to merge-queue label Aug 30, 2023
https://bugs.webkit.org/show_bug.cgi?id=260902
rdar://110129945

Reviewed by Chris Dumez.

* LayoutTests/fast/has-sibling-without-parent-crash-expected.html: Added.
* LayoutTests/fast/has-sibling-without-parent-crash.html: Added.
* Source/WebCore/style/StyleInvalidator.cpp:
(WebCore::Style::Invalidator::invalidateStyleWithMatchElement):

Elements with siblings don't have a parent element when they are parented to a shadow root.

Canonical link: https://commits.webkit.org/267454@main
@webkit-commit-queue webkit-commit-queue force-pushed the has-sibling-without-parent-crash branch from 5e8f276 to 82d7f77 Compare August 30, 2023 15:45
@webkit-commit-queue
Copy link
Collaborator

Committed 267454@main (82d7f77): https://commits.webkit.org/267454@main

Reviewed commits have been landed. Closing PR #17222 and removing active labels.

@webkit-commit-queue webkit-commit-queue merged commit 82d7f77 into WebKit:main Aug 30, 2023
@webkit-commit-queue webkit-commit-queue removed the merge-queue Applied to send a pull request to merge-queue label Aug 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CSS Cascading Style Sheets implementation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants