[webkit-reviews] review granted: [Bug 232409] Assertions in findFirstSlotElement hit when removing two slots with the same name in a single shadow tree : [Attachment 442641] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Oct 27 15:55:54 PDT 2021


Ryosuke Niwa <rniwa at webkit.org> has granted Gabriel Nava Marino
<gnavamarino at apple.com>'s request for review:
Bug 232409: Assertions in findFirstSlotElement hit when removing two slots with
the same name in a single shadow tree
https://bugs.webkit.org/show_bug.cgi?id=232409

Attachment 442641: Patch

https://bugs.webkit.org/attachment.cgi?id=442641&action=review




--- Comment #2 from Ryosuke Niwa <rniwa at webkit.org> ---
Comment on attachment 442641
  --> https://bugs.webkit.org/attachment.cgi?id=442641
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=442641&action=review

> LayoutTests/fast/shadow-dom/slot-removal-same-name.html:1
> +<script>

Missing DOCTYPE?

> LayoutTests/fast/shadow-dom/slot-removal-same-name.html:3
> +    let shadow0 = document.body.attachShadow({mode: 'open'});

Can we call this just shadowRoot?
Also, use const since we're reassigning another value to it.

> LayoutTests/fast/shadow-dom/slot-removal-same-name.html:6
> +    document.body.offsetTop;

document.body.getBoundingClientRect() is more sure way of ensuring updating the
layout.
offsetTop can be optimized in some cases.


More information about the webkit-reviews mailing list