Bug 234984 - REGRESSION(r287683): <dialog> elements inside clipped/overflowed elements are no longer shown
Summary: REGRESSION(r287683): <dialog> elements inside clipped/overflowed elements are...
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:
Blocks: dialog-element 231292
  Show dependency treegraph
 
Reported: 2022-01-07 13:27 PST by Tim Nguyen (:ntim)
Modified: 2022-01-10 10:51 PST (History)
11 users (show)

See Also:


Attachments
Patch (7.04 KB, patch)
2022-01-07 13:31 PST, Tim Nguyen (:ntim)
simon.fraser: review+
Details | Formatted Diff | Diff
[fast-cq] Patch (6.94 KB, patch)
2022-01-10 10:46 PST, Tim Nguyen (:ntim)
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tim Nguyen (:ntim) 2022-01-07 13:27:30 PST
We used to show them before r287683, just at the wrong place, and with the wrong size. Now, we no longer show them.

Example testcases are:

imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/top-layer-containing-block.html [ ImageOnlyFailure ]
imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/top-layer-parent-overflow-clip.html [ ImageOnlyFailure ]
imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/top-layer-parent-overflow-scroll.html [ ImageOnlyFailure ]
Comment 1 Radar WebKit Bug Importer 2022-01-07 13:27:45 PST
<rdar://problem/87269825>
Comment 2 Tim Nguyen (:ntim) 2022-01-07 13:31:17 PST
Created attachment 448626 [details]
Patch
Comment 3 zalan 2022-01-07 14:05:26 PST
Comment on attachment 448626 [details]
Patch

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

It'd be interesting to know if Simon agrees with this direction.

> Source/WebCore/rendering/RenderLayer.cpp:1780
> +static inline bool isContainerForPositioned(RenderLayer& layer, PositionType position, bool establishesTopLayer)

It's hard to tell what establishesTopLayer means in this context without looking at the callsites (like what establishes the top layer).

> LayoutTests/TestExpectations:2361
>  

I am curious about this change (going from Skip -> Crash -while I understand that it is a more precise definition of the expected outcome, I am wondering if there are other reasons)
Comment 4 Tim Nguyen (:ntim) 2022-01-07 14:14:25 PST
(In reply to zalan from comment #3)
> > LayoutTests/TestExpectations:2361
> >  
> 
> I am curious about this change (going from Skip -> Crash -while I understand
> that it is a more precise definition of the expected outcome, I am wondering
> if there are other reasons)

I changed it to Crash so if there is an unexpected PASS (either by this change, or by other changes I'm working on), it would be caught, while Skip would just leave it disabled, with less testing coverage.
Comment 5 Simon Fraser (smfr) 2022-01-10 10:25:25 PST
Comment on attachment 448626 [details]
Patch

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

> Source/WebCore/rendering/RenderLayer.cpp:4549
> +    auto parentLayer = establishesTopLayer() ? renderer().view().layer() : parent();

Calling this 'parentLayer' is confusing because it's not always the parent layer. Maybe containerLayer?
Comment 6 Tim Nguyen (:ntim) 2022-01-10 10:40:37 PST
(In reply to zalan from comment #3)
> Comment on attachment 448626 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=448626&action=review
> 
> It'd be interesting to know if Simon agrees with this direction.
> 
> > Source/WebCore/rendering/RenderLayer.cpp:1780
> > +static inline bool isContainerForPositioned(RenderLayer& layer, PositionType position, bool establishesTopLayer)
> 
> It's hard to tell what establishesTopLayer means in this context without
> looking at the callsites (like what establishes the top layer).

I followed the naming of the `position` argument, though maybe we should look into merging both argument (taking a renderer?), but let's not do this here.
Comment 7 Tim Nguyen (:ntim) 2022-01-10 10:46:23 PST
Created attachment 448773 [details]
[fast-cq] Patch
Comment 8 EWS 2022-01-10 10:51:51 PST
Committed r287845 (245894@main): <https://commits.webkit.org/245894@main>

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