Skip to content

LibWeb+Compositor: Support horizontal scrolling in RTL scroll containers - #11023

Open
tcl3 wants to merge 6 commits into
LadybirdBrowser:masterfrom
tcl3:libweb_rtl_horizontal_scrolling
Open

LibWeb+Compositor: Support horizontal scrolling in RTL scroll containers#11023
tcl3 wants to merge 6 commits into
LadybirdBrowser:masterfrom
tcl3:libweb_rtl_horizontal_scrolling

Conversation

@tcl3

@tcl3 tcl3 commented Aug 6, 2026

Copy link
Copy Markdown
Member

Previously, RTL scroll containers couldn't be scrolled in the correct direction, making their text unreachable. This PR ensures that horizontal scrolling works correctly for RTL elements.

See individual commits for details.

@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 7f05cd91-ddb4-4c8a-8908-f134818b1863

📥 Commits

Reviewing files that changed from the base of the PR and between d04d0cb and 47fc2c8.

📒 Files selected for processing (44)
  • Libraries/LibWeb/Compositor/AsyncScrollTree.cpp
  • Libraries/LibWeb/Compositor/AsyncScrollingState.cpp
  • Libraries/LibWeb/Compositor/AsyncScrollingState.h
  • Libraries/LibWeb/DOM/Document.cpp
  • Libraries/LibWeb/HTML/LocalNavigable.cpp
  • Libraries/LibWeb/HTML/Window.cpp
  • Libraries/LibWeb/Layout/ScrollableOverflow.cpp
  • Libraries/LibWeb/Layout/ScrollableOverflow.h
  • Libraries/LibWeb/Painting/DisplayListCommand.cpp
  • Libraries/LibWeb/Painting/DisplayListCommand.h
  • Libraries/LibWeb/Painting/Paintable.cpp
  • Libraries/LibWeb/Painting/Paintable.h
  • Libraries/LibWeb/Painting/Scrollbar.cpp
  • Libraries/LibWeb/Rust/src/layout/block_formatting_context.rs
  • Libraries/LibWeb/Rust/src/layout/line_builder.rs
  • Services/Compositor/ViewportScrollbarController.cpp
  • Tests/LibWeb/Layout/expected/block-and-inline/rtl-overflowing-line-inline-position.txt
  • Tests/LibWeb/Layout/input/block-and-inline/rtl-overflowing-line-inline-position.html
  • Tests/LibWeb/Ref/input/abspos-after-rtl-inline-static-position.html
  • Tests/LibWeb/Text/expected/async-scrolling/blocking-wheel-event-regions.txt
  • Tests/LibWeb/Text/expected/async-scrolling/blocking-wheel-listener-invalidation.txt
  • Tests/LibWeb/Text/expected/async-scrolling/nested-navigable-wheel-admission.txt
  • Tests/LibWeb/Text/expected/async-scrolling/nested-scroller-keeps-sync-wheel.txt
  • Tests/LibWeb/Text/expected/async-scrolling/scroll-node-metadata-cache-replay.txt
  • Tests/LibWeb/Text/expected/async-scrolling/scroll-tree-parent-nodes.txt
  • Tests/LibWeb/Text/expected/async-scrolling/scroll-tree-shape.txt
  • Tests/LibWeb/Text/expected/async-scrolling/sticky-areas.txt
  • Tests/LibWeb/Text/expected/async-scrolling/viewport-wheel-with-nested-scroller.txt
  • Tests/LibWeb/Text/expected/async-scrolling/wheel-scroll-admission.txt
  • Tests/LibWeb/Text/expected/display_list/background-attachment-fixed.txt
  • Tests/LibWeb/Text/expected/display_list/nested-overflow-containers.txt
  • Tests/LibWeb/Text/expected/display_list/scrollable-in-fixed.txt
  • Tests/LibWeb/Text/expected/display_list/sibling-scrollables-in-fixed.txt
  • Tests/LibWeb/Text/expected/display_list/svg-foreignobject-scroller-after-relayout.txt
  • Tests/LibWeb/Text/expected/input-scrolls-caret-width-into-view.txt
  • Tests/LibWeb/Text/expected/rtl-viewport-programmatic-scroll.txt
  • Tests/LibWeb/Text/expected/scrollable-overflow-webkit-box-wrap-reverse.txt
  • Tests/LibWeb/Text/expected/wpt-import/css/css-overflow/overflow-rtl-scroll-left.txt
  • Tests/LibWeb/Text/expected/wpt-import/css/cssom-view/scrollLeftTop.txt
  • Tests/LibWeb/Text/input/input-scrolls-caret-width-into-view.html
  • Tests/LibWeb/Text/input/rtl-viewport-programmatic-scroll.html
  • Tests/LibWeb/Text/input/scrollable-overflow-webkit-box-wrap-reverse.html
  • Tests/LibWeb/Text/input/wpt-import/css/css-overflow/overflow-rtl-scroll-left.html
  • Tests/LibWeb/Text/input/wpt-import/css/cssom-view/scrollLeftTop.html
🚧 Files skipped from review as they are similar to previous changes (42)
  • Tests/LibWeb/Text/expected/async-scrolling/sticky-areas.txt
  • Tests/LibWeb/Ref/input/abspos-after-rtl-inline-static-position.html
  • Tests/LibWeb/Text/expected/async-scrolling/scroll-tree-shape.txt
  • Tests/LibWeb/Text/expected/display_list/background-attachment-fixed.txt
  • Tests/LibWeb/Layout/expected/block-and-inline/rtl-overflowing-line-inline-position.txt
  • Tests/LibWeb/Text/expected/rtl-viewport-programmatic-scroll.txt
  • Tests/LibWeb/Layout/input/block-and-inline/rtl-overflowing-line-inline-position.html
  • Tests/LibWeb/Text/expected/async-scrolling/nested-navigable-wheel-admission.txt
  • Tests/LibWeb/Text/expected/async-scrolling/viewport-wheel-with-nested-scroller.txt
  • Tests/LibWeb/Text/input/input-scrolls-caret-width-into-view.html
  • Tests/LibWeb/Text/expected/display_list/nested-overflow-containers.txt
  • Tests/LibWeb/Text/expected/async-scrolling/blocking-wheel-listener-invalidation.txt
  • Libraries/LibWeb/Rust/src/layout/block_formatting_context.rs
  • Tests/LibWeb/Text/expected/async-scrolling/nested-scroller-keeps-sync-wheel.txt
  • Tests/LibWeb/Text/expected/scrollable-overflow-webkit-box-wrap-reverse.txt
  • Services/Compositor/ViewportScrollbarController.cpp
  • Tests/LibWeb/Text/expected/display_list/scrollable-in-fixed.txt
  • Libraries/LibWeb/Painting/Paintable.h
  • Tests/LibWeb/Text/expected/wpt-import/css/cssom-view/scrollLeftTop.txt
  • Tests/LibWeb/Text/expected/display_list/svg-foreignobject-scroller-after-relayout.txt
  • Libraries/LibWeb/Compositor/AsyncScrollingState.cpp
  • Libraries/LibWeb/HTML/Window.cpp
  • Tests/LibWeb/Text/input/rtl-viewport-programmatic-scroll.html
  • Libraries/LibWeb/Painting/Scrollbar.cpp
  • Libraries/LibWeb/Painting/DisplayListCommand.cpp
  • Libraries/LibWeb/Compositor/AsyncScrollTree.cpp
  • Tests/LibWeb/Text/expected/wpt-import/css/css-overflow/overflow-rtl-scroll-left.txt
  • Tests/LibWeb/Text/expected/display_list/sibling-scrollables-in-fixed.txt
  • Tests/LibWeb/Text/input/scrollable-overflow-webkit-box-wrap-reverse.html
  • Libraries/LibWeb/Layout/ScrollableOverflow.h
  • Tests/LibWeb/Text/expected/async-scrolling/scroll-tree-parent-nodes.txt
  • Tests/LibWeb/Text/expected/input-scrolls-caret-width-into-view.txt
  • Tests/LibWeb/Text/expected/async-scrolling/wheel-scroll-admission.txt
  • Libraries/LibWeb/DOM/Document.cpp
  • Libraries/LibWeb/Compositor/AsyncScrollingState.h
  • Tests/LibWeb/Text/expected/async-scrolling/blocking-wheel-event-regions.txt
  • Libraries/LibWeb/Painting/DisplayListCommand.h
  • Tests/LibWeb/Text/expected/async-scrolling/scroll-node-metadata-cache-replay.txt
  • Tests/LibWeb/Text/input/wpt-import/css/css-overflow/overflow-rtl-scroll-left.html
  • Libraries/LibWeb/Painting/Paintable.cpp
  • Libraries/LibWeb/Rust/src/layout/line_builder.rs
  • Libraries/LibWeb/HTML/LocalNavigable.cpp

📝 Walkthrough

Walkthrough

Scroll bounds now support negative minimum offsets and directional overflow. Paintable, viewport scrolling, scrollbars, and compositor state propagate these bounds. RTL layout handling now affects writing-mode propagation, margin underflow, and overflowing-line positioning. Regression coverage includes RTL scrolling, reverse wrapping, CSSOM View behavior, caret scrolling, and compositor metadata.

Possibly related PRs

Mergeability Score: ⚪ Minimal · up to 47fc2

The PR changes RTL horizontal scrolling behavior and includes related tests; no actionable merge-blocking risk remains beyond normal checks and review.

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description check ✅ Passed The description accurately states that the changes fix RTL scrolling direction and make previously unreachable text accessible.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@Libraries/LibWeb/HTML/LocalNavigable.cpp`:
- Around line 3820-3826: The programmatic viewport scrolling path in
perform_a_scroll_of_the_viewport() still clamps offsets against zero instead of
the paintable’s actual scroll range. Replace the hardcoded axis bounds with
Paintable::minimum_scroll_offset() and Paintable::maximum_scroll_offset(),
preserving shared bounds for window.scrollTo(), smooth scrolling, and viewport
wheel fallback, including negative RTL offsets.

In `@Tests/LibWeb/Text/expected/wpt-import/css/cssom-view/scrollLeftTop.txt`:
- Around line 10-12: Fix the CSSOM View scroll offset handling for vertical
writing modes and RTL direction so scrollLeft/scrollTop setters and readers
clamp correctly across negative and positive scroll-area bounds, including
vertical-lr/RTL and both vertical-rl cases. Validate the corrected values
against the expected negative offsets, then remove the corresponding Fail
entries from scrollLeftTop.txt only once all cases pass.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: e3aaa565-50ec-4dc7-a9c6-6294267cffff

📥 Commits

Reviewing files that changed from the base of the PR and between a172434 and cce3071.

📒 Files selected for processing (41)
  • Libraries/LibWeb/Compositor/AsyncScrollTree.cpp
  • Libraries/LibWeb/Compositor/AsyncScrollingState.cpp
  • Libraries/LibWeb/Compositor/AsyncScrollingState.h
  • Libraries/LibWeb/HTML/LocalNavigable.cpp
  • Libraries/LibWeb/HTML/Window.cpp
  • Libraries/LibWeb/Layout/ScrollableOverflow.cpp
  • Libraries/LibWeb/Layout/ScrollableOverflow.h
  • Libraries/LibWeb/Painting/DisplayListCommand.cpp
  • Libraries/LibWeb/Painting/DisplayListCommand.h
  • Libraries/LibWeb/Painting/Paintable.cpp
  • Libraries/LibWeb/Painting/Paintable.h
  • Libraries/LibWeb/Painting/Scrollbar.cpp
  • Libraries/LibWeb/Rust/src/layout/block_formatting_context.rs
  • Libraries/LibWeb/Rust/src/layout/line_builder.rs
  • Services/Compositor/ViewportScrollbarController.cpp
  • Tests/LibWeb/Layout/expected/block-and-inline/rtl-overflowing-line-inline-position.txt
  • Tests/LibWeb/Layout/input/block-and-inline/rtl-overflowing-line-inline-position.html
  • Tests/LibWeb/Ref/input/abspos-after-rtl-inline-static-position.html
  • Tests/LibWeb/Text/expected/async-scrolling/blocking-wheel-event-regions.txt
  • Tests/LibWeb/Text/expected/async-scrolling/blocking-wheel-listener-invalidation.txt
  • Tests/LibWeb/Text/expected/async-scrolling/nested-navigable-wheel-admission.txt
  • Tests/LibWeb/Text/expected/async-scrolling/nested-scroller-keeps-sync-wheel.txt
  • Tests/LibWeb/Text/expected/async-scrolling/scroll-node-metadata-cache-replay.txt
  • Tests/LibWeb/Text/expected/async-scrolling/scroll-tree-parent-nodes.txt
  • Tests/LibWeb/Text/expected/async-scrolling/scroll-tree-shape.txt
  • Tests/LibWeb/Text/expected/async-scrolling/sticky-areas.txt
  • Tests/LibWeb/Text/expected/async-scrolling/viewport-wheel-with-nested-scroller.txt
  • Tests/LibWeb/Text/expected/async-scrolling/wheel-scroll-admission.txt
  • Tests/LibWeb/Text/expected/display_list/background-attachment-fixed.txt
  • Tests/LibWeb/Text/expected/display_list/nested-overflow-containers.txt
  • Tests/LibWeb/Text/expected/display_list/scrollable-in-fixed.txt
  • Tests/LibWeb/Text/expected/display_list/sibling-scrollables-in-fixed.txt
  • Tests/LibWeb/Text/expected/display_list/svg-foreignobject-scroller-after-relayout.txt
  • Tests/LibWeb/Text/expected/input-scrolls-caret-width-into-view.txt
  • Tests/LibWeb/Text/expected/scrollable-overflow-webkit-box-wrap-reverse.txt
  • Tests/LibWeb/Text/expected/wpt-import/css/css-overflow/overflow-rtl-scroll-left.txt
  • Tests/LibWeb/Text/expected/wpt-import/css/cssom-view/scrollLeftTop.txt
  • Tests/LibWeb/Text/input/input-scrolls-caret-width-into-view.html
  • Tests/LibWeb/Text/input/scrollable-overflow-webkit-box-wrap-reverse.html
  • Tests/LibWeb/Text/input/wpt-import/css/css-overflow/overflow-rtl-scroll-left.html
  • Tests/LibWeb/Text/input/wpt-import/css/cssom-view/scrollLeftTop.html

Comment thread Libraries/LibWeb/HTML/LocalNavigable.cpp Outdated
@tcl3 tcl3 changed the title LibWeb+Compositor: Support horizontal scrolling in right-to-left scroll containers LibWeb+Compositor: Support horizontal scrolling in RTL scroll containers Aug 6, 2026
@tcl3
tcl3 force-pushed the libweb_rtl_horizontal_scrolling branch from cce3071 to 8273597 Compare August 6, 2026 15:12
@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@Libraries/LibWeb/DOM/Document.cpp`:
- Around line 1898-1903: The body-to-viewport propagation guard in Document.cpp
currently checks only ComputedValues::contain(); update
propagation_is_disabled_by_containment to use the engine’s active-containment
predicate for both root_element and body_element, and apply the same predicate
to related overflow propagation checks. Add regression coverage for
content-visibility: auto on html and body, preserving propagation only when
containment is inactive.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: c1c62ddb-1f86-4d24-b4f4-cce0b4c5eadc

📥 Commits

Reviewing files that changed from the base of the PR and between a172434 and 8273597.

📒 Files selected for processing (44)
  • Libraries/LibWeb/Compositor/AsyncScrollTree.cpp
  • Libraries/LibWeb/Compositor/AsyncScrollingState.cpp
  • Libraries/LibWeb/Compositor/AsyncScrollingState.h
  • Libraries/LibWeb/DOM/Document.cpp
  • Libraries/LibWeb/HTML/LocalNavigable.cpp
  • Libraries/LibWeb/HTML/Window.cpp
  • Libraries/LibWeb/Layout/ScrollableOverflow.cpp
  • Libraries/LibWeb/Layout/ScrollableOverflow.h
  • Libraries/LibWeb/Painting/DisplayListCommand.cpp
  • Libraries/LibWeb/Painting/DisplayListCommand.h
  • Libraries/LibWeb/Painting/Paintable.cpp
  • Libraries/LibWeb/Painting/Paintable.h
  • Libraries/LibWeb/Painting/Scrollbar.cpp
  • Libraries/LibWeb/Rust/src/layout/block_formatting_context.rs
  • Libraries/LibWeb/Rust/src/layout/line_builder.rs
  • Services/Compositor/ViewportScrollbarController.cpp
  • Tests/LibWeb/Layout/expected/block-and-inline/rtl-overflowing-line-inline-position.txt
  • Tests/LibWeb/Layout/input/block-and-inline/rtl-overflowing-line-inline-position.html
  • Tests/LibWeb/Ref/input/abspos-after-rtl-inline-static-position.html
  • Tests/LibWeb/Text/expected/async-scrolling/blocking-wheel-event-regions.txt
  • Tests/LibWeb/Text/expected/async-scrolling/blocking-wheel-listener-invalidation.txt
  • Tests/LibWeb/Text/expected/async-scrolling/nested-navigable-wheel-admission.txt
  • Tests/LibWeb/Text/expected/async-scrolling/nested-scroller-keeps-sync-wheel.txt
  • Tests/LibWeb/Text/expected/async-scrolling/scroll-node-metadata-cache-replay.txt
  • Tests/LibWeb/Text/expected/async-scrolling/scroll-tree-parent-nodes.txt
  • Tests/LibWeb/Text/expected/async-scrolling/scroll-tree-shape.txt
  • Tests/LibWeb/Text/expected/async-scrolling/sticky-areas.txt
  • Tests/LibWeb/Text/expected/async-scrolling/viewport-wheel-with-nested-scroller.txt
  • Tests/LibWeb/Text/expected/async-scrolling/wheel-scroll-admission.txt
  • Tests/LibWeb/Text/expected/display_list/background-attachment-fixed.txt
  • Tests/LibWeb/Text/expected/display_list/nested-overflow-containers.txt
  • Tests/LibWeb/Text/expected/display_list/scrollable-in-fixed.txt
  • Tests/LibWeb/Text/expected/display_list/sibling-scrollables-in-fixed.txt
  • Tests/LibWeb/Text/expected/display_list/svg-foreignobject-scroller-after-relayout.txt
  • Tests/LibWeb/Text/expected/input-scrolls-caret-width-into-view.txt
  • Tests/LibWeb/Text/expected/rtl-viewport-programmatic-scroll.txt
  • Tests/LibWeb/Text/expected/scrollable-overflow-webkit-box-wrap-reverse.txt
  • Tests/LibWeb/Text/expected/wpt-import/css/css-overflow/overflow-rtl-scroll-left.txt
  • Tests/LibWeb/Text/expected/wpt-import/css/cssom-view/scrollLeftTop.txt
  • Tests/LibWeb/Text/input/input-scrolls-caret-width-into-view.html
  • Tests/LibWeb/Text/input/rtl-viewport-programmatic-scroll.html
  • Tests/LibWeb/Text/input/scrollable-overflow-webkit-box-wrap-reverse.html
  • Tests/LibWeb/Text/input/wpt-import/css/css-overflow/overflow-rtl-scroll-left.html
  • Tests/LibWeb/Text/input/wpt-import/css/cssom-view/scrollLeftTop.html
🚧 Files skipped from review as they are similar to previous changes (40)
  • Libraries/LibWeb/Painting/DisplayListCommand.cpp
  • Libraries/LibWeb/Rust/src/layout/block_formatting_context.rs
  • Tests/LibWeb/Text/expected/async-scrolling/scroll-tree-shape.txt
  • Tests/LibWeb/Layout/expected/block-and-inline/rtl-overflowing-line-inline-position.txt
  • Libraries/LibWeb/Painting/Paintable.h
  • Libraries/LibWeb/Compositor/AsyncScrollingState.h
  • Libraries/LibWeb/Compositor/AsyncScrollTree.cpp
  • Tests/LibWeb/Text/input/input-scrolls-caret-width-into-view.html
  • Tests/LibWeb/Text/expected/async-scrolling/sticky-areas.txt
  • Tests/LibWeb/Text/expected/async-scrolling/nested-navigable-wheel-admission.txt
  • Tests/LibWeb/Text/expected/async-scrolling/scroll-node-metadata-cache-replay.txt
  • Tests/LibWeb/Text/expected/async-scrolling/nested-scroller-keeps-sync-wheel.txt
  • Tests/LibWeb/Layout/input/block-and-inline/rtl-overflowing-line-inline-position.html
  • Tests/LibWeb/Text/expected/display_list/scrollable-in-fixed.txt
  • Tests/LibWeb/Text/expected/async-scrolling/blocking-wheel-event-regions.txt
  • Libraries/LibWeb/Layout/ScrollableOverflow.cpp
  • Tests/LibWeb/Text/expected/display_list/background-attachment-fixed.txt
  • Tests/LibWeb/Text/expected/async-scrolling/scroll-tree-parent-nodes.txt
  • Tests/LibWeb/Text/expected/async-scrolling/viewport-wheel-with-nested-scroller.txt
  • Tests/LibWeb/Text/expected/display_list/nested-overflow-containers.txt
  • Tests/LibWeb/Text/input/wpt-import/css/css-overflow/overflow-rtl-scroll-left.html
  • Libraries/LibWeb/Painting/DisplayListCommand.h
  • Libraries/LibWeb/Layout/ScrollableOverflow.h
  • Libraries/LibWeb/Rust/src/layout/line_builder.rs
  • Tests/LibWeb/Text/expected/wpt-import/css/css-overflow/overflow-rtl-scroll-left.txt
  • Tests/LibWeb/Text/expected/async-scrolling/wheel-scroll-admission.txt
  • Tests/LibWeb/Text/expected/input-scrolls-caret-width-into-view.txt
  • Libraries/LibWeb/Compositor/AsyncScrollingState.cpp
  • Libraries/LibWeb/HTML/Window.cpp
  • Libraries/LibWeb/HTML/LocalNavigable.cpp
  • Tests/LibWeb/Text/expected/wpt-import/css/cssom-view/scrollLeftTop.txt
  • Tests/LibWeb/Text/expected/display_list/svg-foreignobject-scroller-after-relayout.txt
  • Tests/LibWeb/Text/input/scrollable-overflow-webkit-box-wrap-reverse.html
  • Tests/LibWeb/Text/expected/display_list/sibling-scrollables-in-fixed.txt
  • Services/Compositor/ViewportScrollbarController.cpp
  • Tests/LibWeb/Text/expected/scrollable-overflow-webkit-box-wrap-reverse.txt
  • Libraries/LibWeb/Painting/Paintable.cpp
  • Tests/LibWeb/Text/expected/async-scrolling/blocking-wheel-listener-invalidation.txt
  • Libraries/LibWeb/Painting/Scrollbar.cpp
  • Tests/LibWeb/Ref/input/abspos-after-rtl-inline-static-position.html

Comment thread Libraries/LibWeb/DOM/Document.cpp Outdated
@github-actions github-actions Bot added the conflicts Pull request has merge conflicts that need resolution label Aug 13, 2026
@github-actions

Copy link
Copy Markdown

Your pull request has conflicts that need to be resolved before it can be reviewed and merged. Make sure to rebase your branch on top of the latest master.

tcl3 added 6 commits August 13, 2026 14:50
The scroll offset range was previously clamped to begin at zero. A
scroll container whose scrollable overflow extends towards the inline
start requires negative offsets to reach that content. Compute both
bounds from the position of the scrollable overflow rectangle relative
to the scrollport.
Thumb geometry previously assumed the scroll offset range begins at
zero. Measure thumb travel from the minimum scroll offset so that a
container scrolled to a negative offset shows the thumb in the correct
position.
Async scroll nodes and viewport scrollbars only carried a maximum
scroll offset. Record the minimum as well, so that wheel scrolling and
scrollbar dragging on the compositor thread can reach negative
offsets.
CSS 2 assigns leftover inline space to the end-side margin, which is
the left margin when the containing block's direction is `rtl`.
Block-level boxes in right-to-left containers are now aligned to the
right, and boxes wider than their container overflow to the left.
Previously, a line box wider than its container was kept flush with
the left content edge. Content in a right-to-left container therefore
overflowed to the right, where it is unreachable. We now ignore
`text-align` for overflowing lines and align them to the inline start
edge. In a right-to-left container the overflow extends past the left
content edge, where it can be scrolled to.
The viewport's computed values previously kept the initial writing
mode and direction, so the leftward overflow of a right-to-left
document was clipped as unreachable and the viewport could not scroll
to it. The viewport now takes the principal writing mode from the root
element, or from its first body child in HTML documents.
@tcl3
tcl3 force-pushed the libweb_rtl_horizontal_scrolling branch from 8273597 to 47fc2c8 Compare August 13, 2026 14:03
@coderabbitai

coderabbitai Bot commented Aug 13, 2026

Copy link
Copy Markdown

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

@github-actions github-actions Bot removed the conflicts Pull request has merge conflicts that need resolution label Aug 13, 2026
@tcl3

tcl3 commented Aug 13, 2026

Copy link
Copy Markdown
Member Author

Rebased to resolve conflicts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant