commit | d44db9636279ee5238407ea776dbaab82cfd5363 | [log] [tgz] |
---|---|---|
author | Xianzhu Wang <wangxianzhu@chromium.org> | Fri Aug 31 23:08:16 2018 |
committer | Xianzhu Wang <wangxianzhu@chromium.org> | Fri Aug 31 23:08:16 2018 |
tree | 722719828f8ba48d1a7a08aa088dcda0ac3f8d11 | |
parent | 542c2443219618f7aee27f2ff28029af82180819 [diff] |
[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,878809,876266 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 Reviewed-by: Morten Stenshorne <mstensho@chromium.org> Reviewed-by: Christian Biesinger <cbiesinger@chromium.org> Cr-Commit-Position: refs/heads/master@{#588201}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .