Bug 258550 - Determination of horizontal overflow incorrect when direction:rtl
Summary: Determination of horizontal overflow incorrect when direction:rtl
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Scrolling (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL: https://jsfiddle.net/f4hack6e/show
Keywords: BrowserCompat, InRadar
Depends on:
Blocks:
 
Reported: 2023-06-26 23:09 PDT by Ahmad Saleem
Modified: 2023-07-03 23:10 PDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ahmad Saleem 2023-06-26 23:09:15 PDT
Hi Team,

While going through Blink's commit, I came across another failing test case, which was fixed only in Chromium pre-fork.

Old bug 85856

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

^ It might be just partial fix in RenderBox.cpp and RenderLayerScrollableArea.cpp only.

From attached test case (ensure you have enabled 'scrollbar to always on' in macOS): Look at last and it does not have horizontal scrollbar in STP172.

Just wanted to raise, so we can fix it since Firefox Nightly 116 and Chrome Canary 117 works fine.

Thanks!
Comment 1 Ahmad Saleem 2023-06-26 23:15:12 PDT
Following in RenderLayrScrollableArea.cpp:

int scrollableLeftOverflow = roundToInt((overflowLeft() - box->borderLeft()) - (box->style().shouldPlaceVerticalScrollbarOnLeft() ? box->verticalScrollbarWidth() : 0));

and following in RenderBox.cpp:

LayoutUnit left = borderLeft() + (style().shouldPlaceVerticalScrollbarOnLeft() ? verticalScrollbarWidth() : 0);

____

This compiles but I think 'RenderLayerScrollableArea.cpp' one is wrong since it has 'if' just below it, which might need tweaking.
Comment 2 Ahmad Saleem 2023-07-02 04:45:45 PDT
Also doing this on top of this commit: https://chromium.googlesource.com/chromium/blink/+/70c32d139270f1a08a6fd46ed079b89d062590a0

^ This will improve performance.
Comment 3 Radar WebKit Bug Importer 2023-07-03 23:10:17 PDT
<rdar://problem/111724008>