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

Issue 1007623003: Fix incorrect percentage top for positioned elements. (Closed)

Created:
5 years, 9 months ago by changseok
Modified:
5 years, 8 months ago
CC:
blink-reviews, blink-reviews-rendering, blink-reviews-style_chromium.org, zoltan1, blink-reviews-css, pdr+renderingwatchlist_chromium.org, eae+blinkwatch, ed+blinkwatch_opera.com, leviw+renderwatch, Dominik Röttsches, dglazkov+blink, apavlov+blink_chromium.org, jchaffraix+rendering, darktears, rwlbuis
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

Fix incorrect percentage top for positioned elements. This cl fixes wrong computed top from getComputedStyle('top'). It will not affect layout. Current implementation for the computed top value has two issues which are not fit spec nor gecko. - Gecko returns a percentage top as is for elements positioned static. - According to the spec, we should use a padding box, not content box as a containing block of an element where the element is absolutely positioned. http://www.w3.org/TR/CSS21/visudet.html#containing-block-details To return correctly computed top, containingBlockLogicalHeightForComputedStyle is newly added, not reusing containingBlockLogicalHeightForContent. BUG=465192 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=193757

Patch Set 1 #

Total comments: 2

Patch Set 2 : Updated patch #

Total comments: 7

Patch Set 3 : New approach by adding a more simple api to get containingBlock's height #

Total comments: 7

Patch Set 4 : Addressed comments #

Total comments: 6

Patch Set 5 : Just rebased #

Patch Set 6 : Updated CL #

Total comments: 2

Patch Set 7 : Remove line-height and add font style to the test. #

Patch Set 8 : Renamed containingBlockLogicalHeightForGetComputedStyle #

Patch Set 9 : Update an expected value of web-animations-api/animations-responsive-to-style-change.html #

Messages

Total messages: 36 (9 generated)
changseok
Please have a look.
5 years, 9 months ago (2015-03-13 10:48:56 UTC) #2
rune
This aligns the implementation with spec and Gecko, which is good. I'll only rubber stamp ...
5 years, 9 months ago (2015-03-13 12:49:13 UTC) #3
changseok
https://codereview.chromium.org/1007623003/diff/1/Source/core/layout/LayoutBox.cpp File Source/core/layout/LayoutBox.cpp (right): https://codereview.chromium.org/1007623003/diff/1/Source/core/layout/LayoutBox.cpp#newcode2720 Source/core/layout/LayoutBox.cpp:2720: if (isLayoutBlock() && isOutOfFlowPositioned() && (heightType == IncludePadding)) { ...
5 years, 9 months ago (2015-03-16 10:02:25 UTC) #4
rune
Added mstensho as reviewer as he'd be better at reviewing this. https://codereview.chromium.org/1007623003/diff/20001/Source/core/layout/LayoutBox.cpp File Source/core/layout/LayoutBox.cpp (left): ...
5 years, 9 months ago (2015-03-16 13:34:03 UTC) #6
changseok
On 2015/03/16 13:34:03, rune wrote: > Added mstensho as reviewer as he'd be better at ...
5 years, 9 months ago (2015-03-16 16:38:28 UTC) #7
mstensho (USE GERRIT)
https://codereview.chromium.org/1007623003/diff/20001/Source/core/layout/LayoutBox.cpp File Source/core/layout/LayoutBox.cpp (right): https://codereview.chromium.org/1007623003/diff/20001/Source/core/layout/LayoutBox.cpp#newcode2720 Source/core/layout/LayoutBox.cpp:2720: const LayoutBlock* cb = isLayoutBlock() ? toLayoutBlock(this) : containingBlock(); ...
5 years, 9 months ago (2015-03-23 14:27:55 UTC) #8
changseok
https://codereview.chromium.org/1007623003/diff/20001/Source/core/layout/LayoutBox.cpp File Source/core/layout/LayoutBox.cpp (right): https://codereview.chromium.org/1007623003/diff/20001/Source/core/layout/LayoutBox.cpp#newcode2720 Source/core/layout/LayoutBox.cpp:2720: const LayoutBlock* cb = isLayoutBlock() ? toLayoutBlock(this) : containingBlock(); ...
5 years, 9 months ago (2015-03-26 07:12:04 UTC) #9
mstensho (USE GERRIT)
We're getting there. :) https://codereview.chromium.org/1007623003/diff/20001/Source/core/layout/LayoutBox.cpp File Source/core/layout/LayoutBox.cpp (right): https://codereview.chromium.org/1007623003/diff/20001/Source/core/layout/LayoutBox.cpp#newcode2720 Source/core/layout/LayoutBox.cpp:2720: const LayoutBlock* cb = isLayoutBlock() ...
5 years, 9 months ago (2015-03-26 12:53:37 UTC) #10
changseok
https://codereview.chromium.org/1007623003/diff/40001/Source/core/layout/LayoutBox.cpp File Source/core/layout/LayoutBox.cpp (right): https://codereview.chromium.org/1007623003/diff/40001/Source/core/layout/LayoutBox.cpp#newcode1529 Source/core/layout/LayoutBox.cpp:1529: // http://www.w3.org/TR/CSS21/visudet.html#containing-block-details On 2015/03/26 12:53:37, mstensho wrote: > Better ...
5 years, 8 months ago (2015-03-30 07:17:57 UTC) #11
changseok
https://codereview.chromium.org/1007623003/diff/40001/Source/core/layout/LayoutBox.cpp File Source/core/layout/LayoutBox.cpp (right): https://codereview.chromium.org/1007623003/diff/40001/Source/core/layout/LayoutBox.cpp#newcode1529 Source/core/layout/LayoutBox.cpp:1529: // http://www.w3.org/TR/CSS21/visudet.html#containing-block-details On 2015/03/30 07:17:57, changseok wrote: > On ...
5 years, 8 months ago (2015-03-30 18:03:35 UTC) #12
changseok
Comment please?
5 years, 8 months ago (2015-04-02 17:08:48 UTC) #13
mstensho (USE GERRIT)
Just some final nits. Could you also update the description, please? It seems somewhat off ...
5 years, 8 months ago (2015-04-13 21:40:05 UTC) #14
changseok
Thanks for your review! All comments are addressed. https://codereview.chromium.org/1007623003/diff/60001/LayoutTests/fast/css/getComputedStyle/computed-style-percentage-top-with-position-inline.html File LayoutTests/fast/css/getComputedStyle/computed-style-percentage-top-with-position-inline.html (right): https://codereview.chromium.org/1007623003/diff/60001/LayoutTests/fast/css/getComputedStyle/computed-style-percentage-top-with-position-inline.html#newcode2 LayoutTests/fast/css/getComputedStyle/computed-style-percentage-top-with-position-inline.html:2: </style> ...
5 years, 8 months ago (2015-04-14 06:27:22 UTC) #15
mstensho (USE GERRIT)
Could you also mention on the first line in the description that this fix only ...
5 years, 8 months ago (2015-04-14 09:20:07 UTC) #16
changseok
> Could you also mention on the first line in the description that this fix ...
5 years, 8 months ago (2015-04-14 09:48:28 UTC) #17
mstensho (USE GERRIT)
On 2015/04/14 09:48:28, changseok wrote: > > Could you also mention on the first line ...
5 years, 8 months ago (2015-04-14 09:51:29 UTC) #18
mstensho (USE GERRIT)
On 2015/04/14 09:51:29, mstensho wrote: > I think you forgot to upload a new patch ...
5 years, 8 months ago (2015-04-14 09:52:55 UTC) #19
changseok
On 2015/04/14 09:52:55, mstensho wrote: > On 2015/04/14 09:51:29, mstensho wrote: > > I think ...
5 years, 8 months ago (2015-04-14 09:57:41 UTC) #20
Timothy Loh
https://codereview.chromium.org/1007623003/diff/40001/Source/core/layout/LayoutBox.h File Source/core/layout/LayoutBox.h (right): https://codereview.chromium.org/1007623003/diff/40001/Source/core/layout/LayoutBox.h#newcode479 Source/core/layout/LayoutBox.h:479: LayoutUnit containingBlockLogicalHeight() const; On 2015/04/13 21:40:04, mstensho wrote: > ...
5 years, 8 months ago (2015-04-14 09:57:49 UTC) #21
changseok
On 2015/04/14 09:57:49, Timothy Loh wrote: > https://codereview.chromium.org/1007623003/diff/40001/Source/core/layout/LayoutBox.h > File Source/core/layout/LayoutBox.h (right): > > https://codereview.chromium.org/1007623003/diff/40001/Source/core/layout/LayoutBox.h#newcode479 ...
5 years, 8 months ago (2015-04-14 10:02:54 UTC) #22
Timothy Loh
On 2015/04/14 10:02:54, changseok wrote: > On 2015/04/14 09:57:49, Timothy Loh wrote: > > > ...
5 years, 8 months ago (2015-04-14 10:10:56 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1007623003/140001
5 years, 8 months ago (2015-04-14 14:45:00 UTC) #26
commit-bot: I haz the power
Try jobs failed on following builders: mac_blink_rel on tryserver.blink (JOB_FAILED, http://build.chromium.org/p/tryserver.blink/builders/mac_blink_rel/builds/51747)
5 years, 8 months ago (2015-04-14 19:21:18 UTC) #28
changseok
On 2015/04/14 19:21:18, I haz the power (commit-bot) wrote: > Try jobs failed on following ...
5 years, 8 months ago (2015-04-15 04:57:10 UTC) #29
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1007623003/160001
5 years, 8 months ago (2015-04-15 05:13:41 UTC) #32
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1007623003/160001
5 years, 8 months ago (2015-04-15 05:24:24 UTC) #35
commit-bot: I haz the power
5 years, 8 months ago (2015-04-15 07:53:18 UTC) #36
Message was sent while issue was closed.
Committed patchset #9 (id:160001) as
https://src.chromium.org/viewvc/blink?view=rev&revision=193757

Powered by Google App Engine
This is Rietveld 408576698