[LayoutNG] Floats depending on whitespaces
Reported by
r...@opera.com,
Jun 15 2017
|
||
Issue descriptionDiscovered as a regression in https://chromium-review.googlesource.com/c/517940/ that external/wpt/css/CSS2/floats-clear/floats-149.xht fails in LayoutNG if you remove unnecessary whitespace LayoutObjects (or whitespace nodes). See attached demo.
,
Jun 15 2017
Thank you for the attention. Inline margin in LayoutNG was supported a few days ago, and I'm making the condition more strict in https://codereview.chromium.org/2931363002. I don't have build right now but inline margin should be working, I'll check later. I guess it should be working in ToT but if not, the WIP CL should fix. For the whitespace rule, yeah, I found some code in the current code saying sometimes the current code creates lines from whitespaces and sometimes don't, but I haven't figured them out yet. If this is blocking, please feel free to mark as Failure in TestExpectations. We're looking at all those failures and trying to fix them. In some aspects, LayoutNG passes where the current layout code fails, but in most cases LayoutNG needs to be better.
,
Jun 16 2017
The WIP is under review now, it passes Rune's test, but not Morten's yet. It's on my backlog.
,
Jun 22 2017
Forgot to mark this bug but the CL fixed Rune's test. https://codereview.chromium.org/2931363002 For Morten's, I found I misunderstood it at the first time, now I understand. This is a separate issue, about white space collapsing, and NG isn't collapsing the space when it should. I double checked the current BreakingContext and understood what NG should do. Not sure if we have tests for this in LayoutTests or wpt, I'll check.
,
Jun 23 2017
Confirmed test #1 is whitespace collapsing issue that was on my back log for 3 months and I was almost forgotten, thank you for this! WIP: https://codereview.chromium.org/2951213005
,
Jun 24 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/0a3ecc6715b7ad1c10bc6b4384d0bad5c8e0d165 commit 0a3ecc6715b7ad1c10bc6b4384d0bad5c8e0d165 Author: kojii <kojii@chromium.org> Date: Sat Jun 24 17:20:23 2017 [LayoutNG] Support objects that are opaque to whitespace collapsing This patch changes following objects opaque to whitespace collapsing; i.e., spaces before such objects and after can collapse. - Out-of-flow objects (floats, absolute positioned objects.) - Open/close tags. - Bidi controls. The ability (AppendAsOpaqueToSpaceCollapsing) originally existed and used for bidi controls, but removed in [1] due to lack of spec and tests. Above cases were tested in 4 browsers and re-implemented to be interoperable. This patch also stops injecting Object Replacement Character for OOF objects. This is not specified, and was not possible before, but 0-length item was supported for open/close tags, and this behavior is interopeable with Blink/Edge/WebKit. [1] https://codereview.chromium.org/2749013003 BUG=636993, 733609 Review-Url: https://codereview.chromium.org/2951213005 Cr-Commit-Position: refs/heads/master@{#482152} [modify] https://crrev.com/0a3ecc6715b7ad1c10bc6b4384d0bad5c8e0d165/third_party/WebKit/LayoutTests/virtual/layout_ng/fast/block/float/overhanging-float-crashes-when-sibling-becomes-formatting-context-expected.txt [add] https://crrev.com/0a3ecc6715b7ad1c10bc6b4384d0bad5c8e0d165/third_party/WebKit/LayoutTests/virtual/layout_ng/fast/block/float/selection-gap-clip-out-tiger-crash-expected.txt [delete] https://crrev.com/b2543b5d009a924286be4144384890f82d8cc180/third_party/WebKit/LayoutTests/virtual/layout_ng/fast/block/margin-collapse/self-collapsing-block-discards-margin-expected.txt [modify] https://crrev.com/0a3ecc6715b7ad1c10bc6b4384d0bad5c8e0d165/third_party/WebKit/Source/core/layout/ng/inline/ng_inline_items_builder.cc [modify] https://crrev.com/0a3ecc6715b7ad1c10bc6b4384d0bad5c8e0d165/third_party/WebKit/Source/core/layout/ng/inline/ng_inline_items_builder.h [modify] https://crrev.com/0a3ecc6715b7ad1c10bc6b4384d0bad5c8e0d165/third_party/WebKit/Source/core/layout/ng/inline/ng_inline_items_builder_test.cc [modify] https://crrev.com/0a3ecc6715b7ad1c10bc6b4384d0bad5c8e0d165/third_party/WebKit/Source/core/layout/ng/inline/ng_inline_node.cc
,
Jun 24 2017
Thank you both for the help! |
||
►
Sign in to add a comment |
||
Comment 1 by msten...@opera.com
, Jun 15 2017249 bytes
249 bytes View Download