Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(56)

Issue 2339973002: Handle exclusive end offsets when translating from flow thread coordinates. (Closed)

Created:
4 years, 3 months ago by mstensho (USE GERRIT)
Modified:
4 years, 3 months ago
Reviewers:
eae
CC:
chromium-reviews, szager+layoutwatch_chromium.org, zoltan1, blink-reviews-layout_chromium.org, pdr+renderingwatchlist_chromium.org, eae+blinkwatch, leviw+renderwatch, jchaffraix+rendering, blink-reviews, mstensho (USE GERRIT)
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Handle exclusive end offsets when translating from flow thread coordinates. If we're in flipped blocks writing mode (i.e. vertical-rl), the flow thread block offset we're dealing with may be a logical end point, and end points are exclusive. This means that we need to pick the previous column, not the next, if the offset is exactly at a column boundary. Let flowThreadTranslationAtOffset() and columnIndexAtOffset() take a PageBoundaryRule argument to handle this. This makes offsetLeft and offsetTop work properly in vertical-rl writing mode for elements that end at column boundaries. Added a test for that, and threw in a vertical-lr test too, for good measure. Remove ColumnIndexCalculationMode from columnIndexAtOffset(). It was partially and inaccurately used to make sure we didn't escape the valid column range in case an exclusive end offset was passed. Have the call sites that really need to clamp the column index do it themselves. It's up to the callers to decide how to treat offsets outside the range of columns anyway. Committed: https://crrev.com/8403c15086b287d0db07c7fe9bcf104d02c99052 Cr-Commit-Position: refs/heads/master@{#418800}

Patch Set 1 #

Patch Set 2 : Renamed tests, and fixed typos there. #

Total comments: 2

Patch Set 3 : Documentation #

Messages

Total messages: 14 (8 generated)
mstensho (USE GERRIT)
4 years, 3 months ago (2016-09-14 15:33:04 UTC) #4
eae
LGTM w/suggestion https://codereview.chromium.org/2339973002/diff/20001/third_party/WebKit/Source/core/layout/MultiColumnFragmentainerGroup.cpp File third_party/WebKit/Source/core/layout/MultiColumnFragmentainerGroup.cpp (right): https://codereview.chromium.org/2339973002/diff/20001/third_party/WebKit/Source/core/layout/MultiColumnFragmentainerGroup.cpp#newcode109 third_party/WebKit/Source/core/layout/MultiColumnFragmentainerGroup.cpp:109: unsigned columnIndex = offsetInFlowThread >= logicalBottomInFlowThread() ? ...
4 years, 3 months ago (2016-09-14 22:08:48 UTC) #7
mstensho (USE GERRIT)
https://codereview.chromium.org/2339973002/diff/20001/third_party/WebKit/Source/core/layout/MultiColumnFragmentainerGroup.cpp File third_party/WebKit/Source/core/layout/MultiColumnFragmentainerGroup.cpp (right): https://codereview.chromium.org/2339973002/diff/20001/third_party/WebKit/Source/core/layout/MultiColumnFragmentainerGroup.cpp#newcode109 third_party/WebKit/Source/core/layout/MultiColumnFragmentainerGroup.cpp:109: unsigned columnIndex = offsetInFlowThread >= logicalBottomInFlowThread() ? actualColumnCount() - ...
4 years, 3 months ago (2016-09-15 06:37:50 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2339973002/40001
4 years, 3 months ago (2016-09-15 06:38:16 UTC) #11
commit-bot: I haz the power
Committed patchset #3 (id:40001)
4 years, 3 months ago (2016-09-15 07:42:32 UTC) #12
commit-bot: I haz the power
4 years, 3 months ago (2016-09-15 07:44:54 UTC) #14
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/8403c15086b287d0db07c7fe9bcf104d02c99052
Cr-Commit-Position: refs/heads/master@{#418800}

Powered by Google App Engine
This is Rietveld 408576698