Bug 242673 - A containing block with overflow:hidden wrongly clips descendant position:fixed
Summary: A containing block with overflow:hidden wrongly clips descendant position:fixed
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Fujii Hironori
URL:
Keywords: BrowserCompat, InRadar
Depends on:
Blocks:
 
Reported: 2022-07-12 21:22 PDT by Fujii Hironori
Modified: 2022-07-21 19:07 PDT (History)
12 users (show)

See Also:


Attachments
test case (969 bytes, text/html)
2022-07-12 21:22 PDT, Fujii Hironori
no flags Details
test case (1017 bytes, text/html)
2022-07-12 21:27 PDT, Fujii Hironori
no flags Details
Patch (5.97 KB, patch)
2022-07-12 22:11 PDT, Fujii Hironori
no flags Details | Formatted Diff | Diff
Patch (14.83 KB, patch)
2022-07-13 14:14 PDT, Fujii Hironori
no flags Details | Formatted Diff | Diff
Patch (16.02 KB, patch)
2022-07-13 14:37 PDT, Fujii Hironori
no flags Details | Formatted Diff | Diff
Patch (17.62 KB, patch)
2022-07-13 18:31 PDT, Fujii Hironori
no flags Details | Formatted Diff | Diff
rendering in Safari, firefox, chrome (107.91 KB, image/png)
2022-07-13 18:56 PDT, Karl Dubost
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Fujii Hironori 2022-07-12 21:22:50 PDT
Created attachment 460843 [details]
test case

A containing block with overflow:hidden wrongly clips descendant position:fixed
Comment 1 Fujii Hironori 2022-07-12 21:27:01 PDT
Created attachment 460844 [details]
test case
Comment 2 Fujii Hironori 2022-07-12 22:11:52 PDT
Created attachment 460845 [details]
Patch
Comment 3 Fujii Hironori 2022-07-13 00:25:02 PDT
EWS reported two regressions.

Regressions: Unexpected image-only failures (2)
  transforms/2d/perspective-not-fixed-container.html [ ImageOnlyFailure ]
  transforms/2d/preserve3d-not-fixed-container.html [ ImageOnlyFailure ]

However, WebKit now behave same with Chrome and Firefox. This seems progressions.
I think I can remove the tests.
Comment 4 Fujii Hironori 2022-07-13 01:05:55 PDT
Rather than removing the tests, I should create a test for the new behavior.
Comment 5 Fujii Hironori 2022-07-13 14:14:03 PDT
Created attachment 460866 [details]
Patch
Comment 6 Fujii Hironori 2022-07-13 14:37:09 PDT
Created attachment 460867 [details]
Patch
Comment 7 Fujii Hironori 2022-07-13 18:31:00 PDT
Created attachment 460878 [details]
Patch
Comment 8 Karl Dubost 2022-07-13 18:56:31 PDT
Created attachment 460880 [details]
rendering in Safari, firefox, chrome

As a reference. 

Safari Technology Preview 16.0 Release 148 (Safari 16.0, WebKit 18614.1.17.3)
Firefox Nightly 104.0a1
Google Chrome Canary 105.0.5178.0
Comment 9 Radar WebKit Bug Importer 2022-07-19 21:23:38 PDT
<rdar://problem/97298971>
Comment 10 Fujii Hironori 2022-07-20 13:06:10 PDT
Could anyone review?
Comment 11 Simon Fraser (smfr) 2022-07-21 14:33:18 PDT
Comment on attachment 460878 [details]
Patch

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

> LayoutTests/transforms/containing-block-for-fixed-expected.html:22
> +    scrollTo(0, 300);

On iOS this scroll will probably need a waitUntilDone/await UIHelper.waitForScrollCompletion() for the pixel test to correctly reflect the scroll.
Comment 12 Fujii Hironori 2022-07-21 17:39:11 PDT
Comment on attachment 460878 [details]
Patch

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

Thank you very much.

>> LayoutTests/transforms/containing-block-for-fixed-expected.html:22
>> +    scrollTo(0, 300);
> 
> On iOS this scroll will probably need a waitUntilDone/await UIHelper.waitForScrollCompletion() for the pixel test to correctly reflect the scroll.

I copied the code from transforms/2d/perspective-not-fixed-container.html, and this test isn't flaky for iOS.
"await UIHelper.waitForScrollCompletion()" can't be used with scrollTo() because scrollTo scrolls synchronously by default.
Some tests are using "await UIHelper.waitForScrollCompletion()", but they don't use it with synchronous scrollTo().
I think this code won't be flaky.
Comment 13 EWS 2022-07-21 19:07:42 PDT
Committed 252721@main (d188f7e50205): <https://commits.webkit.org/252721@main>

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