Bug 231292 - Ensure that the top layer is always anchored to the RenderView
Summary: Ensure that the top layer is always anchored to the RenderView
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Tim Nguyen (:ntim)
URL:
Keywords: InRadar
Depends on: 231332 234984
Blocks: dialog-element
  Show dependency treegraph
 
Reported: 2021-10-06 08:32 PDT by zalan
Modified: 2022-01-14 00:56 PST (History)
16 users (show)

See Also:


Attachments
Patch (2.64 KB, patch)
2021-10-06 08:39 PDT, zalan
no flags Details | Formatted Diff | Diff
Patch (7.75 KB, patch)
2021-10-15 13:10 PDT, Tim Nguyen (:ntim)
no flags Details | Formatted Diff | Diff
Patch (9.62 KB, patch)
2021-10-16 04:47 PDT, Tim Nguyen (:ntim)
no flags Details | Formatted Diff | Diff
Testcase that fails with top layer reparenting patch (477 bytes, text/html)
2021-10-18 08:20 PDT, Tim Nguyen (:ntim)
no flags Details
Patch (9.53 KB, patch)
2021-11-07 10:15 PST, Tim Nguyen (:ntim)
no flags Details | Formatted Diff | Diff
Patch (11.67 KB, patch)
2021-12-06 09:12 PST, Tim Nguyen (:ntim)
ews-feeder: commit-queue-
Details | Formatted Diff | Diff
Patch (11.67 KB, patch)
2021-12-06 09:23 PST, Tim Nguyen (:ntim)
no flags Details | Formatted Diff | Diff
Patch (10.01 KB, patch)
2021-12-21 13:53 PST, Tim Nguyen (:ntim)
no flags Details | Formatted Diff | Diff
Patch (5.40 KB, patch)
2022-01-05 20:18 PST, zalan
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Comment 1 zalan 2021-10-06 08:39:00 PDT
Created attachment 440374 [details]
Patch
Comment 2 EWS 2021-10-06 10:55:05 PDT
Committed r283634 (242585@main): <https://commits.webkit.org/242585@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 440374 [details].
Comment 3 Radar WebKit Bug Importer 2021-10-06 10:56:17 PDT
<rdar://problem/83941854>
Comment 4 WebKit Commit Bot 2021-10-06 15:24:19 PDT
Re-opened since this is blocked by bug 231332
Comment 5 Tim Nguyen (:ntim) 2021-10-15 13:10:19 PDT
Created attachment 441416 [details]
Patch
Comment 6 Tim Nguyen (:ntim) 2021-10-16 04:47:07 PDT
Created attachment 441487 [details]
Patch
Comment 7 Tim Nguyen (:ntim) 2021-10-18 08:20:42 PDT
Created attachment 441604 [details]
Testcase that fails with top layer reparenting patch
Comment 8 Brent Fulgham 2021-10-25 10:03:36 PDT
This is now being tracked by rdar://84618684.
Comment 9 Tim Nguyen (:ntim) 2021-11-07 10:15:50 PST
Created attachment 443512 [details]
Patch
Comment 10 Tim Nguyen (:ntim) 2021-12-06 09:12:19 PST
Created attachment 446043 [details]
Patch
Comment 11 Tim Nguyen (:ntim) 2021-12-06 09:23:03 PST
Created attachment 446044 [details]
Patch
Comment 12 Tim Nguyen (:ntim) 2021-12-21 13:53:41 PST
Created attachment 447750 [details]
Patch
Comment 13 zalan 2022-01-05 20:18:19 PST
Created attachment 448465 [details]
Patch
Comment 14 Tim Nguyen (:ntim) 2022-01-06 05:44:21 PST
Comment on attachment 448465 [details]
Patch

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

Thanks for taking another look at this!

> Source/WebCore/rendering/RenderObject.cpp:666
> +    auto containingBlockForRenderer = [](const auto& renderer) -> RenderBlock* {
> +        if (isInTopLayerOrBackdrop(renderer.style(), renderer.element()))
> +            return &renderer.view();
>          if (renderer.isAbsolutelyPositioned())
>              return renderer.containingBlockForAbsolutePosition();
>          if (renderer.isFixedPositioned())

containingBlockForAbsolutePosition/containingBlockForFixedPosition is also used in LogicalSelectionOffsetCaches.cpp / LogicalSelectionOffsetCaches.h

Should we adapt those instead?
Comment 15 zalan 2022-01-06 06:17:45 PST
(In reply to Tim Nguyen (:ntim) from comment #14)
> Comment on attachment 448465 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=448465&action=review
> 
> Thanks for taking another look at this!
> 
> > Source/WebCore/rendering/RenderObject.cpp:666
> > +    auto containingBlockForRenderer = [](const auto& renderer) -> RenderBlock* {
> > +        if (isInTopLayerOrBackdrop(renderer.style(), renderer.element()))
> > +            return &renderer.view();
> >          if (renderer.isAbsolutelyPositioned())
> >              return renderer.containingBlockForAbsolutePosition();
> >          if (renderer.isFixedPositioned())
> 
> containingBlockForAbsolutePosition/containingBlockForFixedPosition is also
> used in LogicalSelectionOffsetCaches.cpp / LogicalSelectionOffsetCaches.h
> 
> Should we adapt those instead?
will do a bit of a cleanup there.
Comment 16 EWS 2022-01-06 06:34:35 PST
Committed r287683 (245779@main): <https://commits.webkit.org/245779@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 448465 [details].