Commit 25ff2e60 authored by Daniel Hosseinian's avatar Daniel Hosseinian Committed by Chromium LUCI CQ

Force LTR direction of #scroller in the updated PDF Viewer UI

The plugin receives scrolling requests directly through the UI from a
transparent overlaid div. In RTL mode, the scrolling origin of that div
moves to the top-right corner, unlike in LTR mode, in which the
scrolling origin is in the top-left corner. The plugin is unable to
lay out its content based on the UI direction, so it always sets the
content originating from the top-right.

Consequently, sometimes the content can be scrolled completely
offscreen and some parts of the content cannot be scrolled to at all.

The plugin should ideally align content to the top-right corner in RTL
mode. For now, force the UI direction of #scroller to LTR so scrolling
of the content can originate in the top-left corner, consistent with the
expectations of the plugin.

Bug: 1158670
Change-Id: Id86798d61dc22e5f7bf0a3d79a04922ea71f5181
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2592689
Commit-Queue: Daniel Hosseinian <dhoss@chromium.org>
Auto-Submit: Daniel Hosseinian <dhoss@chromium.org>
Reviewed-by: default avatardpapad <dpapad@chromium.org>
Cr-Commit-Position: refs/heads/master@{#837200}
parent 33710b29
......@@ -117,6 +117,13 @@
}
#scroller {
/* TODO(crbug.com/1158670): Fix the plugin to properly support RTL painting
* of PDF contents, such that content is aligned to the top-right corner.
* Until then force LTR even in RTL languages, so scrolling of the content
* can originate in the top-left corner, consistent with the expectations of
* the plugin.
*/
direction: ltr;
height: 100%;
overflow: auto;
position: relative;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment