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

Issue 1102953002: BR styled clear is ignored while partially relayouting. (Closed)

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

Description

BR styled clear is ignored while partially relayouting. If a br with a clear style is placed on the end of a line it is collapsed and subsequently not taken into account when matching the ends of lines. When partially relayouting, we find out which line is a start and a end. But the tailing br is ignored so that its height is not included in a calculated logical height of LayoutBlockFlow. To fix this, we check if the end of a line is a br with a clear style and if its container has a floating box. If that's the case, we force the block to layout entire lines not to skip the br. BUG=468568 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=195993

Patch Set 1 #

Total comments: 4

Patch Set 2 : Rename needsToCheckEndline and update the test case #

Patch Set 3 : Update the test not to use focus nor blur. #

Patch Set 4 : Updated patch #

Patch Set 5 : Added one more test ended with empty span. #

Patch Set 6 : Better approach. #

Total comments: 12

Patch Set 7 : Addressed comments #

Total comments: 4

Patch Set 8 : Rebased #

Patch Set 9 : Adressed comments #

Total comments: 2

Patch Set 10 : Updated comment. #

Total comments: 4

Patch Set 11 : Rebased #

Patch Set 12 : Comment updated. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+99 lines, -0 lines) Patch
A LayoutTests/fast/block/float/br-with-clear-3.html View 1 2 3 4 5 6 1 chunk +23 lines, -0 lines 0 comments Download
A LayoutTests/fast/block/float/br-with-clear-3-expected.html View 1 2 1 chunk +19 lines, -0 lines 0 comments Download
A LayoutTests/fast/block/float/br-with-clear-4.html View 1 2 3 4 5 6 1 chunk +23 lines, -0 lines 0 comments Download
A LayoutTests/fast/block/float/br-with-clear-4-expected.html View 1 2 3 4 1 chunk +19 lines, -0 lines 0 comments Download
M Source/core/layout/LayoutBlockFlowLine.cpp View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +9 lines, -0 lines 0 comments Download
M Source/core/layout/line/LineLayoutState.h View 1 2 3 4 5 6 7 8 9 10 3 chunks +6 lines, -0 lines 0 comments Download

Messages

Total messages: 47 (3 generated)
changseok
Please have a look
5 years, 8 months ago (2015-04-24 15:34:07 UTC) #2
leviw_travelin_and_unemployed
https://codereview.chromium.org/1102953002/diff/1/Source/core/layout/LayoutBlockFlowLine.cpp File Source/core/layout/LayoutBlockFlowLine.cpp (right): https://codereview.chromium.org/1102953002/diff/1/Source/core/layout/LayoutBlockFlowLine.cpp#newcode799 Source/core/layout/LayoutBlockFlowLine.cpp:799: const bool needsToCheckEndLine = containsFloats() && lastChild() && lastChild()->isBR() ...
5 years, 8 months ago (2015-04-24 18:55:47 UTC) #4
esprehn
Are you sure this is specific to br? When I changed it to a span ...
5 years, 8 months ago (2015-04-24 19:20:21 UTC) #5
changseok
On 2015/04/24 19:20:21, esprehn wrote: > Are you sure this is specific to br? When ...
5 years, 8 months ago (2015-04-24 21:22:12 UTC) #6
changseok
I'm always not good at naming. Welcome your suggestion for an alternative value name :) ...
5 years, 8 months ago (2015-04-24 21:53:09 UTC) #7
mstensho (USE GERRIT)
https://codereview.chromium.org/1102953002/diff/1/LayoutTests/fast/block/float/br-with-clear-3.html File LayoutTests/fast/block/float/br-with-clear-3.html (right): https://codereview.chromium.org/1102953002/diff/1/LayoutTests/fast/block/float/br-with-clear-3.html#newcode22 LayoutTests/fast/block/float/br-with-clear-3.html:22: var anchor = document.querySelector('a'); This test is flaky on ...
5 years, 8 months ago (2015-04-25 17:31:14 UTC) #8
changseok
https://codereview.chromium.org/1102953002/diff/1/LayoutTests/fast/block/float/br-with-clear-3.html File LayoutTests/fast/block/float/br-with-clear-3.html (right): https://codereview.chromium.org/1102953002/diff/1/LayoutTests/fast/block/float/br-with-clear-3.html#newcode22 LayoutTests/fast/block/float/br-with-clear-3.html:22: var anchor = document.querySelector('a'); On 2015/04/25 17:31:14, mstensho wrote: ...
5 years, 8 months ago (2015-04-26 01:09:01 UTC) #9
esprehn
Layout tracks overflow, and focus rings are visual overflow so we do a layout. I ...
5 years, 8 months ago (2015-04-26 09:01:22 UTC) #10
changseok
On 2015/04/25 17:31:14, mstensho wrote: > https://codereview.chromium.org/1102953002/diff/1/LayoutTests/fast/block/float/br-with-clear-3.html > File LayoutTests/fast/block/float/br-with-clear-3.html (right): > > https://codereview.chromium.org/1102953002/diff/1/LayoutTests/fast/block/float/br-with-clear-3.html#newcode22 > ...
5 years, 8 months ago (2015-04-27 05:06:03 UTC) #11
mstensho (USE GERRIT)
On 2015/04/27 05:06:03, changseok wrote: > On 2015/04/25 17:31:14, mstensho wrote: > > > https://codereview.chromium.org/1102953002/diff/1/LayoutTests/fast/block/float/br-with-clear-3.html ...
5 years, 8 months ago (2015-04-27 08:16:09 UTC) #12
changseok
On 2015/04/27 08:16:09, mstensho wrote: > On 2015/04/27 05:06:03, changseok wrote: > > On 2015/04/25 ...
5 years, 8 months ago (2015-04-27 10:11:35 UTC) #13
mstensho (USE GERRIT)
On 2015/04/27 10:11:35, changseok wrote: > On 2015/04/27 08:16:09, mstensho wrote: > > On 2015/04/27 ...
5 years, 8 months ago (2015-04-27 10:38:01 UTC) #14
changseok
On 2015/04/27 10:38:01, mstensho wrote: > On 2015/04/27 10:11:35, changseok wrote: > > On 2015/04/27 ...
5 years, 8 months ago (2015-04-27 10:47:46 UTC) #15
mstensho (USE GERRIT)
On 2015/04/27 10:47:46, changseok wrote: > On 2015/04/27 10:38:01, mstensho wrote: > > On 2015/04/27 ...
5 years, 8 months ago (2015-04-27 10:49:37 UTC) #16
changseok
On 2015/04/27 10:49:37, mstensho wrote: > On 2015/04/27 10:47:46, changseok wrote: > > On 2015/04/27 ...
5 years, 8 months ago (2015-04-27 10:58:55 UTC) #17
mstensho (USE GERRIT)
On 2015/04/27 10:58:55, changseok wrote: > On 2015/04/27 10:49:37, mstensho wrote: > > On 2015/04/27 ...
5 years, 8 months ago (2015-04-27 11:04:05 UTC) #18
changseok
On 2015/04/27 11:04:05, mstensho wrote: > I'd like you to write a test that modifies ...
5 years, 8 months ago (2015-04-27 11:26:33 UTC) #19
mstensho (USE GERRIT)
On 2015/04/27 11:26:33, changseok wrote: > On 2015/04/27 11:04:05, mstensho wrote: > > I'd like ...
5 years, 8 months ago (2015-04-27 11:44:35 UTC) #20
leviw_travelin_and_unemployed
This still isn't quite right. If I change your yellow box to have these contents: ...
5 years, 8 months ago (2015-04-27 18:41:54 UTC) #21
changseok
On 2015/04/27 18:41:54, leviw wrote: > This still isn't quite right. > > If I ...
5 years, 7 months ago (2015-04-30 10:45:25 UTC) #22
changseok
comment please?
5 years, 7 months ago (2015-05-04 12:30:21 UTC) #23
leviw_travelin_and_unemployed
On 2015/05/04 at 12:30:21, shivamidow wrote: > comment please? Seems reasonable.
5 years, 7 months ago (2015-05-04 20:14:15 UTC) #24
changseok
On 2015/05/04 20:14:15, leviw wrote: > On 2015/05/04 at 12:30:21, shivamidow wrote: > > comment ...
5 years, 7 months ago (2015-05-08 10:40:34 UTC) #25
esprehn
https://codereview.chromium.org/1102953002/diff/100001/Source/core/layout/LayoutBlockFlowLine.cpp File Source/core/layout/LayoutBlockFlowLine.cpp (right): https://codereview.chromium.org/1102953002/diff/100001/Source/core/layout/LayoutBlockFlowLine.cpp#newcode1568 Source/core/layout/LayoutBlockFlowLine.cpp:1568: if (o->isBR() && (o->style()->clear() != CNONE)) remove parens https://codereview.chromium.org/1102953002/diff/100001/Source/core/layout/LayoutBlockFlowLine.cpp#newcode1864 ...
5 years, 7 months ago (2015-05-10 18:23:35 UTC) #26
leviw_travelin_and_unemployed
https://codereview.chromium.org/1102953002/diff/100001/LayoutTests/fast/block/float/br-with-clear-3.html File LayoutTests/fast/block/float/br-with-clear-3.html (right): https://codereview.chromium.org/1102953002/diff/100001/LayoutTests/fast/block/float/br-with-clear-3.html#newcode21 LayoutTests/fast/block/float/br-with-clear-3.html:21: window.onload = function() { I don't suspect the onload ...
5 years, 7 months ago (2015-05-11 00:25:29 UTC) #27
changseok
Thanks for all comments! https://codereview.chromium.org/1102953002/diff/100001/LayoutTests/fast/block/float/br-with-clear-3.html File LayoutTests/fast/block/float/br-with-clear-3.html (right): https://codereview.chromium.org/1102953002/diff/100001/LayoutTests/fast/block/float/br-with-clear-3.html#newcode21 LayoutTests/fast/block/float/br-with-clear-3.html:21: window.onload = function() { On ...
5 years, 7 months ago (2015-05-11 15:56:47 UTC) #28
changseok
More comments?
5 years, 7 months ago (2015-05-13 13:06:14 UTC) #29
leviw_travelin_and_unemployed
https://codereview.chromium.org/1102953002/diff/120001/Source/core/layout/LayoutBlockFlowLine.cpp File Source/core/layout/LayoutBlockFlowLine.cpp (right): https://codereview.chromium.org/1102953002/diff/120001/Source/core/layout/LayoutBlockFlowLine.cpp#newcode1566 Source/core/layout/LayoutBlockFlowLine.cpp:1566: if (o->isBR() && o->style()->clear() != CNONE) It's sad that ...
5 years, 7 months ago (2015-05-14 02:22:19 UTC) #30
changseok
https://codereview.chromium.org/1102953002/diff/120001/Source/core/layout/LayoutBlockFlowLine.cpp File Source/core/layout/LayoutBlockFlowLine.cpp (right): https://codereview.chromium.org/1102953002/diff/120001/Source/core/layout/LayoutBlockFlowLine.cpp#newcode1566 Source/core/layout/LayoutBlockFlowLine.cpp:1566: if (o->isBR() && o->style()->clear() != CNONE) On 2015/05/14 02:22:19, ...
5 years, 7 months ago (2015-05-14 16:18:46 UTC) #31
changseok
Still not looks good to you? I'd like to make this go forward. Feel free ...
5 years, 7 months ago (2015-05-18 14:35:20 UTC) #32
leviw_travelin_and_unemployed
https://codereview.chromium.org/1102953002/diff/160001/Source/core/layout/LayoutBlockFlowLine.cpp File Source/core/layout/LayoutBlockFlowLine.cpp (right): https://codereview.chromium.org/1102953002/diff/160001/Source/core/layout/LayoutBlockFlowLine.cpp#newcode1866 Source/core/layout/LayoutBlockFlowLine.cpp:1866: // contains floats. It might mislead height of the ...
5 years, 7 months ago (2015-05-19 21:29:52 UTC) #33
changseok
https://codereview.chromium.org/1102953002/diff/160001/Source/core/layout/LayoutBlockFlowLine.cpp File Source/core/layout/LayoutBlockFlowLine.cpp (right): https://codereview.chromium.org/1102953002/diff/160001/Source/core/layout/LayoutBlockFlowLine.cpp#newcode1866 Source/core/layout/LayoutBlockFlowLine.cpp:1866: // contains floats. It might mislead height of the ...
5 years, 7 months ago (2015-05-20 14:22:24 UTC) #34
leviw_travelin_and_unemployed
https://codereview.chromium.org/1102953002/diff/180001/Source/core/layout/LayoutBlockFlowLine.cpp File Source/core/layout/LayoutBlockFlowLine.cpp (right): https://codereview.chromium.org/1102953002/diff/180001/Source/core/layout/LayoutBlockFlowLine.cpp#newcode1866 Source/core/layout/LayoutBlockFlowLine.cpp:1866: // It misleads shorter height of the block than ...
5 years, 7 months ago (2015-05-20 21:22:29 UTC) #35
changseok
https://codereview.chromium.org/1102953002/diff/180001/Source/core/layout/LayoutBlockFlowLine.cpp File Source/core/layout/LayoutBlockFlowLine.cpp (right): https://codereview.chromium.org/1102953002/diff/180001/Source/core/layout/LayoutBlockFlowLine.cpp#newcode1866 Source/core/layout/LayoutBlockFlowLine.cpp:1866: // It misleads shorter height of the block than ...
5 years, 7 months ago (2015-05-21 09:32:40 UTC) #36
leviw_travelin_and_unemployed
https://codereview.chromium.org/1102953002/diff/180001/Source/core/layout/LayoutBlockFlowLine.cpp File Source/core/layout/LayoutBlockFlowLine.cpp (right): https://codereview.chromium.org/1102953002/diff/180001/Source/core/layout/LayoutBlockFlowLine.cpp#newcode1866 Source/core/layout/LayoutBlockFlowLine.cpp:1866: // It misleads shorter height of the block than ...
5 years, 7 months ago (2015-05-21 17:49:50 UTC) #37
changseok
https://codereview.chromium.org/1102953002/diff/180001/Source/core/layout/LayoutBlockFlowLine.cpp File Source/core/layout/LayoutBlockFlowLine.cpp (right): https://codereview.chromium.org/1102953002/diff/180001/Source/core/layout/LayoutBlockFlowLine.cpp#newcode1866 Source/core/layout/LayoutBlockFlowLine.cpp:1866: // It misleads shorter height of the block than ...
5 years, 7 months ago (2015-05-22 08:47:36 UTC) #38
leviw_travelin_and_unemployed
On 2015/05/22 at 08:47:36, shivamidow wrote: > https://codereview.chromium.org/1102953002/diff/180001/Source/core/layout/LayoutBlockFlowLine.cpp > File Source/core/layout/LayoutBlockFlowLine.cpp (right): > > https://codereview.chromium.org/1102953002/diff/180001/Source/core/layout/LayoutBlockFlowLine.cpp#newcode1866 ...
5 years, 7 months ago (2015-05-22 20:16:44 UTC) #39
changseok
On 2015/05/22 20:16:44, leviw wrote: > > Yeah. same context, but your summary is neater. ...
5 years, 7 months ago (2015-05-22 21:01:37 UTC) #40
leviw_travelin_and_unemployed
Description nits: "If br with clear places as an end line, it is ignored while ...
5 years, 7 months ago (2015-05-22 21:05:14 UTC) #41
changseok
On 2015/05/22 21:05:14, leviw wrote: > Description nits: > > "If br with clear places ...
5 years, 7 months ago (2015-05-22 21:31:44 UTC) #42
changseok
Would you see this again? Does this not look good to you, owners?
5 years, 7 months ago (2015-05-26 17:12:51 UTC) #43
leviw_travelin_and_unemployed
Okay. LGTM.
5 years, 7 months ago (2015-05-26 18:53:31 UTC) #44
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1102953002/220001
5 years, 7 months ago (2015-05-27 16:02:01 UTC) #46
commit-bot: I haz the power
5 years, 7 months ago (2015-05-27 17:34:53 UTC) #47
Message was sent while issue was closed.
Committed patchset #12 (id:220001) as
https://src.chromium.org/viewvc/blink?view=rev&revision=195993

Powered by Google App Engine
This is Rietveld 408576698