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

Issue 2414683002: Make offsetTop/Left handle a relative positioned inline offsetParent correctly. (Closed)

Created:
4 years, 2 months ago by Karl Øygard
Modified:
4 years, 1 month 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
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Make offsetTop/Left handle a relative positioned inline offsetParent correctly. offsetTop and offsetLeft happily ignored the fact that offsetParent could be a relative positioned inline. I used the opportunity to change some variable names in LayoutBoxModelObject::adjustedPositionRelativeTo() in order to hopefully make it clearer what's going on. BUG=638184 Committed: https://crrev.com/f903f01899c880f15af678b6e44404a7d9b1735f Cr-Commit-Position: refs/heads/master@{#429571}

Patch Set 1 #

Patch Set 2 : Expanded test cases and renamed method and some variables. #

Patch Set 3 : Removed faulty test case and further renamed method. #

Patch Set 4 : Fix for out of flow positioned elements. #

Patch Set 5 : Better fix for out of flow positioned elements. #

Patch Set 6 : Fixed crasher when offsetParent is body. #

Patch Set 7 : Only call offsetForInFlowPositionedInline with abspos children. #

Patch Set 8 : Added one more test for abspos with relpos inline offsetParent. #

Total comments: 4

Patch Set 9 : Changes according to review. #

Total comments: 5

Patch Set 10 : Rebased patch and made changes according to review. #

Patch Set 11 : Fixed broken rebase. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+84 lines, -24 lines) Patch
A third_party/WebKit/LayoutTests/fast/inline/inline-offsetLeft-relpos.html View 1 2 3 4 5 6 7 1 chunk +39 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/fast/inline/inline-offsetLeft-relpos-expected.txt View 1 2 3 4 5 6 7 1 chunk +4 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp View 1 2 3 4 5 6 7 8 9 10 4 chunks +31 lines, -14 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutInline.h View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutInline.cpp View 1 2 3 4 5 6 7 8 9 1 chunk +8 lines, -10 lines 0 comments Download

Messages

Total messages: 71 (55 generated)
Karl Øygard
ptal
4 years, 2 months ago (2016-10-21 10:37:10 UTC) #35
ikilpatrick
4 years, 2 months ago (2016-10-21 16:39:25 UTC) #37
cbiesinger
4 years, 2 months ago (2016-10-21 20:32:53 UTC) #39
mstensho (USE GERRIT)
I've assisted karlo a bit with this patch, so I would be good if someone ...
4 years, 1 month ago (2016-10-24 08:01:47 UTC) #40
atotic
https://codereview.chromium.org/2414683002/diff/140001/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp File third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp (right): https://codereview.chromium.org/2414683002/diff/140001/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp#newcode1028 third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp:1028: referencePoint += toLayoutBox(offsetParentObject)->topLeftLocation(); Why replace moveBy with '+='? moveBy ...
4 years, 1 month ago (2016-10-25 19:28:58 UTC) #41
Karl Øygard
https://codereview.chromium.org/2414683002/diff/140001/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp File third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp (right): https://codereview.chromium.org/2414683002/diff/140001/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp#newcode1028 third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp:1028: referencePoint += toLayoutBox(offsetParentObject)->topLeftLocation(); On 2016/10/25 19:28:58, atotic2 wrote: > ...
4 years, 1 month ago (2016-10-26 11:27:04 UTC) #42
Karl Øygard
ptal. I reverted the code to moveBy() as requested, and added a small comment to ...
4 years, 1 month ago (2016-10-31 11:46:50 UTC) #48
atotic
On 2016/10/31 at 11:46:50, karlo wrote: > ptal. I reverted the code to moveBy() as ...
4 years, 1 month ago (2016-10-31 22:53:02 UTC) #49
atotic
https://codereview.chromium.org/2414683002/diff/160001/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp File third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp (right): https://codereview.chromium.org/2414683002/diff/160001/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp#newcode1033 third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp:1033: if (offsetParentObject->isLayoutInline()) { Can offsetParentObject be null here? We're ...
4 years, 1 month ago (2016-10-31 22:54:25 UTC) #50
Karl Øygard
https://codereview.chromium.org/2414683002/diff/160001/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp File third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp (right): https://codereview.chromium.org/2414683002/diff/160001/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp#newcode1033 third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp:1033: if (offsetParentObject->isLayoutInline()) { On 2016/10/31 22:54:25, atotic2 wrote: > ...
4 years, 1 month ago (2016-11-03 11:23:31 UTC) #51
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/2414683002/200001
4 years, 1 month ago (2016-11-03 13:59:08 UTC) #62
commit-bot: I haz the power
No L-G-T-M from a valid reviewer yet. CQ run can only be started by full ...
4 years, 1 month ago (2016-11-03 13:59:11 UTC) #64
mstensho (USE GERRIT)
lgtm
4 years, 1 month ago (2016-11-03 14:01:44 UTC) #66
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/2414683002/200001
4 years, 1 month ago (2016-11-03 14:02:07 UTC) #67
commit-bot: I haz the power
Committed patchset #11 (id:200001)
4 years, 1 month ago (2016-11-03 14:07:04 UTC) #69
commit-bot: I haz the power
4 years, 1 month ago (2016-11-03 14:08:37 UTC) #71
Message was sent while issue was closed.
Patchset 11 (id:??) landed as
https://crrev.com/f903f01899c880f15af678b6e44404a7d9b1735f
Cr-Commit-Position: refs/heads/master@{#429571}

Powered by Google App Engine
This is Rietveld 408576698