Bug 242673

Summary: A containing block with overflow:hidden wrongly clips descendant position:fixed
Product: WebKit Reporter: Fujii Hironori <Hironori.Fujii>
Component: CSSAssignee: Fujii Hironori <Hironori.Fujii>
Status: RESOLVED FIXED    
Severity: Normal CC: changseok, esprehn+autocc, ews-watchlist, fred.wang, glenn, karlcow, koivisto, kondapallykalyan, pdr, simon.fraser, webkit-bug-importer, zalan
Priority: P2 Keywords: BrowserCompat, InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=241641
https://bugs.webkit.org/show_bug.cgi?id=138122
https://bugs.webkit.org/show_bug.cgi?id=221964
https://bugs.webkit.org/show_bug.cgi?id=63331
Attachments:
Description Flags
test case
none
test case
none
Patch
none
Patch
none
Patch
none
Patch
none
rendering in Safari, firefox, chrome none

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].