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

Issue 1820483002: Untangle multicol coordinate space conversion from offsetFromContainer(). (Closed)

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

Description

Untangle multicol coordinate space conversion from offsetFromContainer(). The various offsetFromContainer() implementations used to convert from flow thread coordinates to visual coordinates if the container was a flow thread. That works when mapping a position relatively to some ancestor, but not when mapping a position relatively to some descendant. Put differently: It works fine when walking upwards in a tree, but not so fine when walking it downwards (we need the opposite operation in that case; convert from visual to flow thread coordinates). That was the reason for some mess in mapAncestorToLocal(), since we had to cancel out the shenanigans carried out by offsetFromContainer(). So, instead, perform this flowthread-to-visual coordinate space conversion where we need it, and don't cause trouble for those who don't need it. No behavior changes intended. This is also why we're keeping this coordinate space conversion in CaretBase for now, even if it's wrong (see bug 596070). Simply removing that *now* wouldn't fix the bug anyway, just alter it (probably for the better, but who knows -- still buggy). A proper fix will land shortly. BUG=568492 R=leviw@chromium.org Committed: https://crrev.com/4daee13be8513a6130f1111e7cd4d573329a70c5 Cr-Commit-Position: refs/heads/master@{#382153}

Patch Set 1 #

Total comments: 3

Patch Set 2 : Address code review comment. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+44 lines, -50 lines) Patch
M third_party/WebKit/Source/core/editing/CaretBase.cpp View 1 1 chunk +7 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutBox.h View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutBox.cpp View 2 chunks +1 line, -10 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp View 1 chunk +8 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutInline.h View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutInline.cpp View 2 chunks +1 line, -6 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutObject.h View 1 chunk +2 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutObject.cpp View 4 chunks +13 lines, -21 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutTableCell.h View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutTableCell.cpp View 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/layout/api/LayoutItem.h View 1 1 chunk +7 lines, -2 lines 0 comments Download

Messages

Total messages: 10 (4 generated)
mstensho (USE GERRIT)
Levi fast again? :) https://codereview.chromium.org/1820483002/diff/1/third_party/WebKit/Source/core/editing/CaretBase.cpp File third_party/WebKit/Source/core/editing/CaretBase.cpp (right): https://codereview.chromium.org/1820483002/diff/1/third_party/WebKit/Source/core/editing/CaretBase.cpp#newcode90 third_party/WebKit/Source/core/editing/CaretBase.cpp:90: LayoutObject* containerObject = (LayoutObject*)containerItem; Pretty ...
4 years, 9 months ago (2016-03-18 20:51:40 UTC) #1
leviw_travelin_and_unemployed
LGTM except for the C-style but C++-override-inducing cast ;) As for fast again, I ended ...
4 years, 9 months ago (2016-03-18 22:27:02 UTC) #3
mstensho (USE GERRIT)
https://codereview.chromium.org/1820483002/diff/1/third_party/WebKit/Source/core/editing/CaretBase.cpp File third_party/WebKit/Source/core/editing/CaretBase.cpp (right): https://codereview.chromium.org/1820483002/diff/1/third_party/WebKit/Source/core/editing/CaretBase.cpp#newcode90 third_party/WebKit/Source/core/editing/CaretBase.cpp:90: LayoutObject* containerObject = (LayoutObject*)containerItem; On 2016/03/18 22:27:02, leviw wrote: ...
4 years, 9 months ago (2016-03-18 22:45:23 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1820483002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1820483002/20001
4 years, 9 months ago (2016-03-18 22:46:01 UTC) #7
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years, 9 months ago (2016-03-19 00:46:55 UTC) #8
commit-bot: I haz the power
4 years, 9 months ago (2016-03-19 00:50:27 UTC) #10
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/4daee13be8513a6130f1111e7cd4d573329a70c5
Cr-Commit-Position: refs/heads/master@{#382153}

Powered by Google App Engine
This is Rietveld 408576698