Closed Bug 1487224 Opened 6 years ago Closed 6 years ago

[wpt-sync] Sync PR 12745 - [PE] Fix LayoutBox Client/Padding/Content boxes with scrollbars (especially vertical-rl)

Categories

(Core :: DOM: CSS Object Model, enhancement, P4)

enhancement

Tracking

()

RESOLVED FIXED
mozilla64
Tracking Status
firefox64 --- fixed

People

(Reporter: mozilla.org, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 12745 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/12745
Details from upstream follow.

Xianzhu Wang <wangxianzhu@chromium.org> wrote:
>  [PE] Fix LayoutBox Client/Padding/Content boxes with scrollbars (especially vertical-rl)
>  
>  This CL tries to correct the box model when there are scrollbars,
>  especially in vertical-rl mode. According to
>  https://www.w3.org/TR/css-overflow-3/#scrollbar-layout, scrollbars
>  "should be inserted between the inner border edge and the outer
>  padding edge".
>  
>  Changes to the previous code:
>  
>  - Padding|client box now excludes scrollbars, with the help of
>    (Top|Left|Bottom|Right)ScrollbarWidth methods which can get the
>    scrollbar widths in physical directions in various writing modes.
>  
>  - Content box is now based on the new padding box by excluding the
>    paddings.
>  
>  - Layout of contents is now based on the correct box model. In
>    vertical-rl mode, layout of contents in blocks direction starts
>    from the inner edge of the new content box which has been properly
>    adjusted for the scrollbar.
>  
>  - Now LayoutBox::Location() and Location::PhysicalLocation() in the
>    initial scroll state are correct in all writing-modes. Previously
>    when they were incorrect in vertical-rl mode and some flex box
>    directions, requiring an artificial scroll offset to paint the
>    content at correct place.
>  
>  - With the correct padding box, content box, Location(),
>    PhysicalLocation(), we no longer need the band-aid code to create the
>    correct painted result.
>  
>  The changed code is mostly in LegacyLayout code. Some changed code is
>  in LayoutNG that previously converted correct LayoutNG geometries into
>  the problematic geometries that were previously expected by
>  LegacyLayout.
>  
>  The correct box model is required by blink-gen-property-trees because
>  we can't band-aid the incorrect results in paint properties after
>  painting.
>  
>  Bug: 833167,853945,858843
>  
>  Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_slimming_paint_v2;luci.chromium.try:linux-blink-gen-property-trees;luci.chromium.try:linux_layout_tests_layout_ng;master.tryserver.blink:linux_trusty_blink_rel
>  Change-Id: I41faf1ca0bfb95cb287c72703f08c8bd44e9e752
>  Reviewed-on: https://chromium-review.googlesource.com/1185901
>  WPT-Export-Revision: be308bb87c9e6dd712b5e573b28beab79656928b
Component: web-platform-tests → DOM: CSS Object Model
Product: Testing → Core
Ran 1 tests
PASS   : 1
Pushed by wptsync@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/4181c487a7c8
[wpt PR 12745] - [PE] Fix LayoutBox Client/Padding/Content boxes with scrollbars (especially vertical-rl), a=testonly
https://hg.mozilla.org/mozilla-central/rev/4181c487a7c8
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla64
You need to log in before you can comment on or make changes to this bug.