Negative text-indent and anonymous block container makes text stick out to right margin
Reported by
kwk...@vivliostyle.com,
Oct 31 2017
|
|||||
Issue descriptionUserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.75 Safari/537.36 Steps to reproduce the problem: 1. Open the attached test case What is the expected behavior? No text should stick out to right margin of div.container. What went wrong? The first line of an anonymous block container following an empty div stick out to right margin of div.container. It seems that the negative text-indent specified on div.container is taken into consider when calculating width of the first line of the anonymous block container but not applied to the actual layout. Did this work before? N/A Does this work in other browsers? Yes Chrome version: 62.0.3202.75 Channel: stable OS Version: OS X 10.12.6 Flash Version: Safari and Firefox do not have the same problem. I am not sure, though, that the text-indent should be applied to the anonymous block container or not according to CSS spec.
,
Oct 31 2017
Able to reproduce the issue on Windows 10 , Ubuntu 14.04 and Mac os 10.12.6 using chrome M62 #62.0.3202.75 and M64 #64.0.3254.0. This issue is seen from M50 and is a Non-Regression issue. Marking it as untraiged for further inputs on this. Thanks!
,
Oct 31 2017
Would you mind taking a look at this one Koji?
,
Nov 1 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/4a970a7eeb584e1e32bd75e478ba0936e439fd63 commit 4a970a7eeb584e1e32bd75e478ba0936e439fd63 Author: Koji Ishii <kojii@chromium.org> Date: Wed Nov 01 16:50:21 2017 Fix line breaking with text-indent in an anonymous block This patch fixes line breaking of a block that meets all following conditions: 1. Has the 'text-indent' property set. 2. Is in an anonymous block. 3. Is not the first child of its parent element. The spec[1] defines not to apply 'text-indent' in this case. LayoutBlockFlow honors this definition, but LineBreaker did not. In this patch, LayoutBlockFlow, LineBreaker, and NGLineBreaker shares the logic. [1] https://drafts.csswg.org/css-text-3/#text-indent-property Bug: 779921 Change-Id: Iae81a7a96c1be1b787eb53b4b4a2001b8a68c526 Reviewed-on: https://chromium-review.googlesource.com/748821 Reviewed-by: Emil A Eklund <eae@chromium.org> Commit-Queue: Emil A Eklund <eae@chromium.org> Cr-Commit-Position: refs/heads/master@{#513155} [add] https://crrev.com/4a970a7eeb584e1e32bd75e478ba0936e439fd63/third_party/WebKit/LayoutTests/fast/css3-text/css3-text-indent/text-indent-anonymous.html [modify] https://crrev.com/4a970a7eeb584e1e32bd75e478ba0936e439fd63/third_party/WebKit/Source/core/layout/LayoutBlockFlow.h [modify] https://crrev.com/4a970a7eeb584e1e32bd75e478ba0936e439fd63/third_party/WebKit/Source/core/layout/LayoutBlockFlowLine.cpp [modify] https://crrev.com/4a970a7eeb584e1e32bd75e478ba0936e439fd63/third_party/WebKit/Source/core/layout/api/LineLayoutBlockFlow.h [modify] https://crrev.com/4a970a7eeb584e1e32bd75e478ba0936e439fd63/third_party/WebKit/Source/core/layout/line/LineBreaker.cpp [modify] https://crrev.com/4a970a7eeb584e1e32bd75e478ba0936e439fd63/third_party/WebKit/Source/core/layout/ng/inline/ng_line_breaker.cc
,
Jan 24 2018
,
Jan 24 2018
|
|||||
►
Sign in to add a comment |
|||||
Comment 1 by nyerramilli@chromium.org
, Oct 31 2017