Bug 247230

Summary: Fix clientLeft value for RTL direction, while the element have vertical scrollbar in left side.
Product: WebKit Reporter: Ahmad Saleem <ahmad.saleem792>
Component: ScrollingAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: simon.fraser, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Safari Technology Preview   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=169767
Attachments:
Description Flags
Safari vs Other browsers none

Description Ahmad Saleem 2022-10-29 07:05:29 PDT
Hi Team,

Going through Blink Commits and noticed another Interop failure in Webkit / Safari compared to Blink / Chrome and Gecko / Firefox:

Failing Test - https://jsfiddle.net/pLhcn1ek/

Blink Commit - https://src.chromium.org/viewvc/blink?view=revision&revision=168625

_____

I am raising this bug because I was not able to find related and wanted to try to do PR and if I fail, I will link my PR to give details on why I am not able to do it.

Thanks!
Comment 1 Ahmad Saleem 2022-10-29 14:16:34 PDT
I did PR here and took this test case is failing:

https://github.com/WebKit/WebKit/pull/5935

Current Test - failing with PR above - https://jsfiddle.net/pucvsazy/show

In current Tests:

*** Chrome Canary 109 ***

Pass first two and fail last two:

Position of square in 'v-rl ltr' - expected 80, got 65
Position of square in 'v-rl rtl' - expected 80, got 65

*** Firefox Nightly 108 ***

Pass all tests

*** Safari Technology Preview 156 & Safari 16.1 ***

Pass all tests

_____

Now weird one is Firefox:

1) It passes the failing tests from Comment 0
2) Passes current test as welll.

While Safari had 15 px difference in the failing test from Comment 0 and it will might cause us to change expectations for two failing test from 80 to 65 but it is now also failing all four as below:

 Position of square in 'h-tb rtl' - expected 80, got 95
 Position of square in 'h-bt rtl' - expected 80, got 95
 Position of square in 'v-rl ltr' - expected 80, got 65
 Position of square in 'v-rl rtl' - expected 80, got 65

_____

So it is weird bug IMO.
Comment 2 Ahmad Saleem 2022-10-29 15:23:42 PDT
(In reply to Ahmad Saleem from comment #1)
> I did PR here and took this test case is failing:
> 
> https://github.com/WebKit/WebKit/pull/5935
> 
> Current Test - failing with PR above - https://jsfiddle.net/pucvsazy/show
> 
> In current Tests:
> 
> *** Chrome Canary 109 ***
> 
> Pass first two and fail last two:
> 
> Position of square in 'v-rl ltr' - expected 80, got 65
> Position of square in 'v-rl rtl' - expected 80, got 65
> 
> *** Firefox Nightly 108 ***
> 
> Pass all tests
> 
> *** Safari Technology Preview 156 & Safari 16.1 ***
> 
> Pass all tests
> 
> _____
> 
> Now weird one is Firefox:
> 
> 1) It passes the failing tests from Comment 0
> 2) Passes current test as welll.
> 
> While Safari had 15 px difference in the failing test from Comment 0 and it
> will might cause us to change expectations for two failing test from 80 to
> 65 but it is now also failing all four as below:
> 
>  Position of square in 'h-tb rtl' - expected 80, got 95
>  Position of square in 'h-bt rtl' - expected 80, got 95
>  Position of square in 'v-rl ltr' - expected 80, got 65
>  Position of square in 'v-rl rtl' - expected 80, got 65
> 
> _____
> 
> So it is weird bug IMO.

Due to complexity of change and leading to weird difference from other browsers, I am closing my PR.
Comment 3 Radar WebKit Bug Importer 2022-11-05 07:06:18 PDT
<rdar://problem/101996097>
Comment 4 Ahmad Saleem 2023-05-29 16:20:57 PDT
Created attachment 466533 [details]
Safari vs Other browsers

Just wanted to show the result for:

https://jsfiddle.net/pucvsazy/show

^ All browser differ.