New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.
Starred by 12 users
link

Issue 636993: [LayoutNG] Inline layout support

Reported by e...@chromium.org, Aug 11 2016 Project Member

Issue description

Meta bug for supporting inline layout in LayoutNG.
 
Showing comments 380 - 479 of 479 Older

Comment 380 by bugdroid1@chromium.org, Jul 17 2018

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/21d6052d11c3fd311beeb69986430bf812f0a86b

commit 21d6052d11c3fd311beeb69986430bf812f0a86b
Author: Koji Ishii <kojii@chromium.org>
Date: Tue Jul 17 23:49:54 2018

[LayoutNG] Move NGLineInfo to the member field of NGLineBreaker

This patch adds NGLineInfo and NGInlineItemResults to the
member field of NGLineBreaker.

These are the output of the NGLineInfo, analogous to
NGContainerFragmentBuilder to NGLayoutAlgorithm. Adding to
the member fields makes NGLineBreaker closeer to
NGLayoutAlgorithm.

Note, NGInlineItemResults should be local and should
std::move when the line is complete if we follow the existing
pattern. It has inline buffer however, which makes std::move
expensive. This patch keeps it as a pointer to the buffer in
NGLineInfo.

Bug: 636993
Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_layout_ng
Change-Id: Ibc66fae8a8653196535dfa469b94a3255c0cd8e8
Reviewed-on: https://chromium-review.googlesource.com/1138136
Commit-Queue: Koji Ishii <kojii@chromium.org>
Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org>
Reviewed-by: Emil A Eklund <eae@chromium.org>
Cr-Commit-Position: refs/heads/master@{#575844}
[modify] https://crrev.com/21d6052d11c3fd311beeb69986430bf812f0a86b/third_party/blink/renderer/core/layout/ng/inline/ng_inline_item_result.h
[modify] https://crrev.com/21d6052d11c3fd311beeb69986430bf812f0a86b/third_party/blink/renderer/core/layout/ng/inline/ng_inline_layout_algorithm.cc
[modify] https://crrev.com/21d6052d11c3fd311beeb69986430bf812f0a86b/third_party/blink/renderer/core/layout/ng/inline/ng_line_breaker.cc
[modify] https://crrev.com/21d6052d11c3fd311beeb69986430bf812f0a86b/third_party/blink/renderer/core/layout/ng/inline/ng_line_breaker.h

Comment 381 by bugdroid1@chromium.org, Jul 18 2018

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/18490bcb1869ff0218e823fb0445f72ae632752b

commit 18490bcb1869ff0218e823fb0445f72ae632752b
Author: Koji Ishii <kojii@chromium.org>
Date: Wed Jul 18 04:34:46 2018

[LayoutNG] Use integer-version of ascent/descent

This patch changes ascent and descent from LayoutUnit to
integer, so that the use is consistent.

In future, we'll want to switch to LayoutUnit, but
inconsitent use is likely to be a source of problems
than to help the migration.

Bug: 636993
Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_layout_ng
Change-Id: I81bb766eaf4579b50bbe1896e48018b3aea81c20
Reviewed-on: https://chromium-review.googlesource.com/1075909
Commit-Queue: Koji Ishii <kojii@chromium.org>
Reviewed-by: Emil A Eklund <eae@chromium.org>
Cr-Commit-Position: refs/heads/master@{#575939}
[modify] https://crrev.com/18490bcb1869ff0218e823fb0445f72ae632752b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/text/justify-ideograph-vertical-expected.png
[modify] https://crrev.com/18490bcb1869ff0218e823fb0445f72ae632752b/third_party/blink/renderer/core/layout/ng/inline/ng_line_height_metrics.cc

Comment 382 by bugdroid1@chromium.org, Jul 18 2018

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/ac758278a913bbe0c71ce678d864b565fc5f8792

commit ac758278a913bbe0c71ce678d864b565fc5f8792
Author: Koji Ishii <kojii@chromium.org>
Date: Wed Jul 18 21:18:52 2018

Disable kerning for css/css-pseudo/first-letter-opacity-float-001.html

This test has "P" in a float with "ASS" in an inline
formatting context, while its ref has "P" and "ASS" in the
same inline formatting context.

This patch disables kerning to ensure the same rendering.

TBR=eae@chromium.org

Bug: 636993
Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_layout_ng
Change-Id: Ie36c9bc8885467e1272f4a7ccb936791362cdaea
Reviewed-on: https://chromium-review.googlesource.com/1142049
Reviewed-by: Koji Ishii <kojii@chromium.org>
Commit-Queue: Koji Ishii <kojii@chromium.org>
Cr-Commit-Position: refs/heads/master@{#576211}
[modify] https://crrev.com/ac758278a913bbe0c71ce678d864b565fc5f8792/third_party/WebKit/LayoutTests/FlagExpectations/enable-blink-features=LayoutNG
[modify] https://crrev.com/ac758278a913bbe0c71ce678d864b565fc5f8792/third_party/WebKit/LayoutTests/external/wpt/css/css-pseudo/first-letter-opacity-float-001-ref.html
[modify] https://crrev.com/ac758278a913bbe0c71ce678d864b565fc5f8792/third_party/WebKit/LayoutTests/external/wpt/css/css-pseudo/first-letter-opacity-float-001.html

Comment 383 by bugdroid1@chromium.org, Jul 19 2018

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/6abfe10de3f70bcdfb5cf54fa70f300a209a5a23

commit 6abfe10de3f70bcdfb5cf54fa70f300a209a5a23
Author: Koji Ishii <kojii@chromium.org>
Date: Thu Jul 19 01:05:39 2018

[LayoutNG] Fix first-line baseline when 'overflow' is not 'visible'

This patch fixes first-line baseline when the 'overflow'
property is other than 'visible'.

CSS2 states that:
  The baseline of an 'inline-block' is the baseline of its
  last line box in the normal flow, unless it has either no
  in-flow line boxes or if its 'overflow' property has a
  computed value other than 'visible', in which case the
  baseline is the bottom margin edge.
https://drafts.csswg.org/css2/visudet.html#propdef-vertical-align

This rule should apply only to 'inline-block', but it was
incorrectly applied to first-line baseline as well.

This patch fixes incorrect alignment in the comment lines of
Gerrit code review site.

Bug: 636993
Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_layout_ng
Change-Id: I49ffd8c050f384765c61c5678a431fa74492356d
Reviewed-on: https://chromium-review.googlesource.com/1140336
Reviewed-by: Emil A Eklund <eae@chromium.org>
Commit-Queue: Koji Ishii <kojii@chromium.org>
Cr-Commit-Position: refs/heads/master@{#576294}
[add] https://crrev.com/6abfe10de3f70bcdfb5cf54fa70f300a209a5a23/third_party/WebKit/LayoutTests/external/wpt/css/css-flexbox/align-items-baseline-overflow-non-visible.html
[add] https://crrev.com/6abfe10de3f70bcdfb5cf54fa70f300a209a5a23/third_party/WebKit/LayoutTests/external/wpt/css/css-flexbox/reference/align-items-baseline-overflow-non-visible-ref.html
[modify] https://crrev.com/6abfe10de3f70bcdfb5cf54fa70f300a209a5a23/third_party/blink/renderer/core/layout/ng/inline/ng_baseline.cc
[modify] https://crrev.com/6abfe10de3f70bcdfb5cf54fa70f300a209a5a23/third_party/blink/renderer/core/layout/ng/ng_block_layout_algorithm.cc
[modify] https://crrev.com/6abfe10de3f70bcdfb5cf54fa70f300a209a5a23/third_party/blink/renderer/core/layout/ng/ng_block_node.cc
[modify] https://crrev.com/6abfe10de3f70bcdfb5cf54fa70f300a209a5a23/third_party/blink/renderer/core/layout/ng/ng_block_node.h

Comment 384 by bugdroid1@chromium.org, Jul 23 2018

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/764aa379919c3a7ab9a9cee0ab715e0d977177f6

commit 764aa379919c3a7ab9a9cee0ab715e0d977177f6
Author: Koji Ishii <kojii@chromium.org>
Date: Mon Jul 23 21:10:18 2018

[LayoutNG] Use legacy layout for the 'text-combine' property

This patch forces legacy layout for the 'text-combine'
property, for the first phase of LayoutNG.

Also extracted the "if" block to a function because it gets
large enough.

Bug: 636993
Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_layout_ng
Change-Id: I2d67e26c506bc560eaf31c574d8552adb785bfb1
Reviewed-on: https://chromium-review.googlesource.com/1144594
Reviewed-by: Emil A Eklund <eae@chromium.org>
Commit-Queue: Koji Ishii <kojii@chromium.org>
Cr-Commit-Position: refs/heads/master@{#577254}
[modify] https://crrev.com/764aa379919c3a7ab9a9cee0ab715e0d977177f6/third_party/WebKit/LayoutTests/FlagExpectations/enable-blink-features=LayoutNG
[modify] https://crrev.com/764aa379919c3a7ab9a9cee0ab715e0d977177f6/third_party/blink/renderer/core/css/resolver/style_adjuster.cc

Comment 385 by bugdroid1@chromium.org, Jul 23 2018

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/ea0ed30f2e414844d319851ccc332c3f70d25b2a

commit ea0ed30f2e414844d319851ccc332c3f70d25b2a
Author: Koji Ishii <kojii@chromium.org>
Date: Mon Jul 23 22:39:00 2018

[LayoutNG] Support the '-webkit-box-decoration-break' property

This patch supports the rendering of the
'-webkit-box-decoration-break' property. This property is
used by 0.73% of pages according to UMA.

Also cleanup how NGLineBreaker commmunicates margins/borders/
padding to NGInlineLayoutAlgorithm through NGInlineItemResult.

The work for line breaker to take this property into account
is deferred to future work. Gecko (unprefixed) supports it,
while Blink and WebKit (prefixed) takes only the start edge
into account, ignoring the end edge. Edge does not support
this property yet. Also CSS WG resolved a change in its
behavior recently when used in bidi context. It will need a
bit more investigations.

Bug: 636993
Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_layout_ng
Change-Id: I8d87db5cd35441133a73fcead67901763026155d
Reviewed-on: https://chromium-review.googlesource.com/1146125
Reviewed-by: Emil A Eklund <eae@chromium.org>
Commit-Queue: Koji Ishii <kojii@chromium.org>
Cr-Commit-Position: refs/heads/master@{#577306}
[modify] https://crrev.com/ea0ed30f2e414844d319851ccc332c3f70d25b2a/third_party/WebKit/LayoutTests/FlagExpectations/enable-blink-features=LayoutNG
[modify] https://crrev.com/ea0ed30f2e414844d319851ccc332c3f70d25b2a/third_party/blink/renderer/core/layout/ng/geometry/ng_box_strut.h
[modify] https://crrev.com/ea0ed30f2e414844d319851ccc332c3f70d25b2a/third_party/blink/renderer/core/layout/ng/inline/ng_inline_box_state.cc
[modify] https://crrev.com/ea0ed30f2e414844d319851ccc332c3f70d25b2a/third_party/blink/renderer/core/layout/ng/inline/ng_inline_box_state.h
[modify] https://crrev.com/ea0ed30f2e414844d319851ccc332c3f70d25b2a/third_party/blink/renderer/core/layout/ng/inline/ng_inline_item_result.h
[modify] https://crrev.com/ea0ed30f2e414844d319851ccc332c3f70d25b2a/third_party/blink/renderer/core/layout/ng/inline/ng_inline_layout_algorithm.cc
[modify] https://crrev.com/ea0ed30f2e414844d319851ccc332c3f70d25b2a/third_party/blink/renderer/core/layout/ng/inline/ng_line_breaker.cc

Comment 386 by bugdroid1@chromium.org, Jul 24 2018

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/3e94d2dfdda268f07585ecc34c0c3963d9b5d934

commit 3e94d2dfdda268f07585ecc34c0c3963d9b5d934
Author: Koji Ishii <kojii@chromium.org>
Date: Tue Jul 24 12:55:06 2018

[LayoutNG] Fix fast/borders/border-image-border-radius.html

The test:
  fast/borders/border-image-border-radius.html
should apply line-height quriks, but crbug.com/40634 prevents
applying it in legacy, but LayoutNG considers it's quirks.

This patch changes the test to the standard mode, so that the
rendering matches without crbug.com/40634.

TBR=eae@chromium.org

Bug: 636993
Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_layout_ng
Change-Id: Ifb5c2152f344f5c8d3b1cf54379107c631857952
Reviewed-on: https://chromium-review.googlesource.com/1146880
Reviewed-by: Koji Ishii <kojii@chromium.org>
Commit-Queue: Koji Ishii <kojii@chromium.org>
Cr-Commit-Position: refs/heads/master@{#577498}
[modify] https://crrev.com/3e94d2dfdda268f07585ecc34c0c3963d9b5d934/third_party/WebKit/LayoutTests/FlagExpectations/enable-blink-features=LayoutNG
[modify] https://crrev.com/3e94d2dfdda268f07585ecc34c0c3963d9b5d934/third_party/WebKit/LayoutTests/fast/borders/border-image-border-radius.html

Comment 387 by bugdroid1@chromium.org, Jul 25 2018

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/9d044cd5a52b43df40bf00d75f8bccf3d47bf4d1

commit 9d044cd5a52b43df40bf00d75f8bccf3d47bf4d1
Author: Koji Ishii <kojii@chromium.org>
Date: Wed Jul 25 03:32:27 2018

[LayoutNG] CachedOffsetForPosition and CachedPositionForOffset for RTL

This patch enables ComputePositionData() for RTL, and enables
using the data in CachedOffsetForPosition and
CachedPositionForOffset.

Because we use binary search, CharacterPositionData stores
ShapeResultCharacterData in the visual order, so that its
|x_position| is in ascending order.

This patch also adds DCHECKs to ensure Cached and non-Cached
versions return the same data. Cases they don't were
discovered, in LTR and RTL. DCHECKs are limited to when it
passes, and failing cases are to be investigated.

Bug: 636993
Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_layout_ng
Change-Id: Ifaf3f9f73c7b098e68932e8dc0181a79c1d7778d
Reviewed-on: https://chromium-review.googlesource.com/1148025
Reviewed-by: Emil A Eklund <eae@chromium.org>
Commit-Queue: Koji Ishii <kojii@chromium.org>
Cr-Commit-Position: refs/heads/master@{#577786}
[modify] https://crrev.com/9d044cd5a52b43df40bf00d75f8bccf3d47bf4d1/third_party/blink/renderer/platform/fonts/shaping/shape_result.cc
[modify] https://crrev.com/9d044cd5a52b43df40bf00d75f8bccf3d47bf4d1/third_party/blink/renderer/platform/fonts/shaping/shape_result.h

Comment 388 by bugdroid1@chromium.org, Jul 25 2018

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/c3fbc6d542e7703a9f7ee50eddcc2f2d29f533ed

commit c3fbc6d542e7703a9f7ee50eddcc2f2d29f533ed
Author: Ian Kilpatrick <ikilpatrick@chromium.org>
Date: Wed Jul 25 03:45:58 2018

[LayoutNG] Fix text-indent with negative values in RTL.

This allows NGLineInfo to return a Width which isn't clamped to zero
for negative values.

This allows alignment of text to work correctly for these values.
Additionally, when adjusting the inline static position of abs-pos
children, we use the resulting fragment inline size, instead of the
line width, as this may be different.

Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_layout_ng
Change-Id: I0876f148d285147c3b5cec658ebd7831e97b11aa
Bug: 	636993
Reviewed-on: https://chromium-review.googlesource.com/1147875
Reviewed-by: Koji Ishii <kojii@chromium.org>
Commit-Queue: Koji Ishii <kojii@chromium.org>
Cr-Commit-Position: refs/heads/master@{#577789}
[modify] https://crrev.com/c3fbc6d542e7703a9f7ee50eddcc2f2d29f533ed/third_party/WebKit/LayoutTests/FlagExpectations/enable-blink-features=LayoutNG
[modify] https://crrev.com/c3fbc6d542e7703a9f7ee50eddcc2f2d29f533ed/third_party/blink/renderer/core/layout/ng/inline/ng_inline_item_result.h
[modify] https://crrev.com/c3fbc6d542e7703a9f7ee50eddcc2f2d29f533ed/third_party/blink/renderer/core/layout/ng/inline/ng_inline_layout_algorithm.cc
[modify] https://crrev.com/c3fbc6d542e7703a9f7ee50eddcc2f2d29f533ed/third_party/blink/renderer/core/layout/ng/inline/ng_inline_layout_algorithm.h
[modify] https://crrev.com/c3fbc6d542e7703a9f7ee50eddcc2f2d29f533ed/third_party/blink/renderer/core/layout/ng/inline/ng_line_breaker.cc

Comment 389 by bugdroid1@chromium.org, Jul 26 2018

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/342e3c40354fd928391a96eab740d145a7d23e75

commit 342e3c40354fd928391a96eab740d145a7d23e75
Author: Koji Ishii <kojii@chromium.org>
Date: Thu Jul 26 09:13:46 2018

[LayoutNG] Batch computing glyph bounds for ShapeResult

This patch batches calls to SkPaint::getTextWidths when
computing glyph bounding boxes for ShapeResult.

perf_tests/layout/line-layout-line-height.html indicates that
16% of total time is spent in the setup code in Skia that
runs each time SkPaint::getTextWidths is called.

By batching the calls per RunInfo instead of per glyph, this
speeds up the test by ~10%, from 1644ms to 1464ms on my Z440.

SkPaint::getTextWidths goes down from 9.3sec to 5.5sec in
total, or 5.7sec to 0.36sec for the code path this
optimization applies.

Bug: 636993
Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_layout_ng
Change-Id: Iadb40f7613248bacabd6affa177f4b019de3a9d4
Reviewed-on: https://chromium-review.googlesource.com/1150010
Commit-Queue: Koji Ishii <kojii@chromium.org>
Reviewed-by: Emil A Eklund <eae@chromium.org>
Cr-Commit-Position: refs/heads/master@{#578245}
[modify] https://crrev.com/342e3c40354fd928391a96eab740d145a7d23e75/third_party/blink/renderer/platform/fonts/shaping/shape_result.cc
[modify] https://crrev.com/342e3c40354fd928391a96eab740d145a7d23e75/third_party/blink/renderer/platform/fonts/shaping/shape_result.h
[modify] https://crrev.com/342e3c40354fd928391a96eab740d145a7d23e75/third_party/blink/renderer/platform/fonts/simple_font_data.cc
[modify] https://crrev.com/342e3c40354fd928391a96eab740d145a7d23e75/third_party/blink/renderer/platform/fonts/simple_font_data.h
[modify] https://crrev.com/342e3c40354fd928391a96eab740d145a7d23e75/third_party/blink/renderer/platform/fonts/skia/skia_text_metrics.cc
[modify] https://crrev.com/342e3c40354fd928391a96eab740d145a7d23e75/third_party/blink/renderer/platform/fonts/skia/skia_text_metrics.h

Comment 390 by bugdroid1@chromium.org, Jul 27 2018

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/dcf55c3a64e394ffbf3921c5be62ef18638c5e70

commit dcf55c3a64e394ffbf3921c5be62ef18638c5e70
Author: Koji Ishii <kojii@chromium.org>
Date: Fri Jul 27 02:56:08 2018

Pass the source string to ShapeResult functions

This patch changes OffsetForPosition and PositionForOffset
functions to accept its source string, and let callers to
pass them.

The given strings are not used yet in this patch, other than
DCHECK with the number of characters in the ShapeResult.

Computing grapheme cluster list for all ShapeResult turned
out to be not cheap enough for LayoutNG that this patch is
the preparation to compute them when needed.

Bug: 636993
Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_layout_ng
Change-Id: I6dc22fda781f63219fba74381da87f1f0b33e85f
Reviewed-on: https://chromium-review.googlesource.com/1118062
Commit-Queue: Koji Ishii <kojii@chromium.org>
Commit-Queue: Emil A Eklund <eae@chromium.org>
Reviewed-by: Emil A Eklund <eae@chromium.org>
Cr-Commit-Position: refs/heads/master@{#578525}
[modify] https://crrev.com/dcf55c3a64e394ffbf3921c5be62ef18638c5e70/third_party/blink/renderer/core/layout/ng/inline/ng_physical_text_fragment.cc
[modify] https://crrev.com/dcf55c3a64e394ffbf3921c5be62ef18638c5e70/third_party/blink/renderer/platform/fonts/shaping/caching_word_shaper.cc
[modify] https://crrev.com/dcf55c3a64e394ffbf3921c5be62ef18638c5e70/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_shaper_test.cc
[modify] https://crrev.com/dcf55c3a64e394ffbf3921c5be62ef18638c5e70/third_party/blink/renderer/platform/fonts/shaping/shape_result.cc
[modify] https://crrev.com/dcf55c3a64e394ffbf3921c5be62ef18638c5e70/third_party/blink/renderer/platform/fonts/shaping/shape_result.h
[modify] https://crrev.com/dcf55c3a64e394ffbf3921c5be62ef18638c5e70/third_party/blink/renderer/platform/fonts/shaping/shape_result_buffer.cc
[modify] https://crrev.com/dcf55c3a64e394ffbf3921c5be62ef18638c5e70/third_party/blink/renderer/platform/fonts/shaping/shape_result_buffer.h
[modify] https://crrev.com/dcf55c3a64e394ffbf3921c5be62ef18638c5e70/third_party/blink/renderer/platform/text/text_run.h

Comment 391 by bugdroid1@chromium.org, Jul 27 2018

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/ad2fcd6e0a36a7282b1b7140f258e7e071a5e753

commit ad2fcd6e0a36a7282b1b7140f258e7e071a5e753
Author: Koji Ishii <kojii@chromium.org>
Date: Fri Jul 27 17:54:25 2018

Compute grapheme list for mid-ligature support on demand

This patch changes to compute grapheme list for mid-ligature
support only when needed.

This patch is part of the LayoutNG performance efforts.
As we measure LayoutNG performance, computing grapheme list
for every ShapeResult turned out to be not cheap.

Bug: 636993
Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_layout_ng
Change-Id: I58880530e56e0b1b965bd1a246bb8c3415b968a6
Reviewed-on: https://chromium-review.googlesource.com/1152640
Commit-Queue: Emil A Eklund <eae@chromium.org>
Reviewed-by: Emil A Eklund <eae@chromium.org>
Cr-Commit-Position: refs/heads/master@{#578699}
[modify] https://crrev.com/ad2fcd6e0a36a7282b1b7140f258e7e071a5e753/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_shaper.cc
[modify] https://crrev.com/ad2fcd6e0a36a7282b1b7140f258e7e071a5e753/third_party/blink/renderer/platform/fonts/shaping/shape_result.cc
[modify] https://crrev.com/ad2fcd6e0a36a7282b1b7140f258e7e071a5e753/third_party/blink/renderer/platform/fonts/shaping/shape_result.h
[modify] https://crrev.com/ad2fcd6e0a36a7282b1b7140f258e7e071a5e753/third_party/blink/renderer/platform/fonts/shaping/shape_result_buffer.cc
[modify] https://crrev.com/ad2fcd6e0a36a7282b1b7140f258e7e071a5e753/third_party/blink/renderer/platform/fonts/shaping/shape_result_inline_headers.h
[modify] https://crrev.com/ad2fcd6e0a36a7282b1b7140f258e7e071a5e753/third_party/blink/renderer/platform/text/text_break_iterator.cc
[modify] https://crrev.com/ad2fcd6e0a36a7282b1b7140f258e7e071a5e753/third_party/blink/renderer/platform/text/text_break_iterator.h
[modify] https://crrev.com/ad2fcd6e0a36a7282b1b7140f258e7e071a5e753/third_party/blink/renderer/platform/text/text_break_iterator_test.cc

Comment 392 by bugdroid1@chromium.org, Jul 27 2018

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/25c4de5edc67088d3961c915046ae8d40b204e3c

commit 25c4de5edc67088d3961c915046ae8d40b204e3c
Author: Ian Kilpatrick <ikilpatrick@chromium.org>
Date: Fri Jul 27 19:06:54 2018

[LayoutNG] Fix rtl flip for out-of-flow positioned objects in lineboxes.

This changes the rtl flip calculation. Before it was using the wrong
line_offset, and the static position of abs-pos were getting shifted
with the text-alignment (which shouldn't be occuring).

This using the appropriate line-offset, and corrects the rtl flip
calculation.

Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_layout_ng
Change-Id: I93a45e196682ee1a940fe81b4c43f67e19fe6bb3
Bug: 636993
Reviewed-on: https://chromium-review.googlesource.com/1153219
Reviewed-by: Koji Ishii <kojii@chromium.org>
Commit-Queue: Ian Kilpatrick <ikilpatrick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#578742}
[modify] https://crrev.com/25c4de5edc67088d3961c915046ae8d40b204e3c/third_party/WebKit/LayoutTests/FlagExpectations/enable-blink-features=LayoutNG
[modify] https://crrev.com/25c4de5edc67088d3961c915046ae8d40b204e3c/third_party/blink/renderer/core/layout/ng/inline/ng_inline_layout_algorithm.cc

Comment 393 by bugdroid1@chromium.org, Jul 28 2018

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/9301f62dedf2dcd93ecc8d82f2ac467e69e84348

commit 9301f62dedf2dcd93ecc8d82f2ac467e69e84348
Author: Koji Ishii <kojii@chromium.org>
Date: Sat Jul 28 00:08:50 2018

[LayoutNG] Fix multi-glyph-cluster case for PositionData

This patch fixes ShapeResult::ComputePositionData,
CachedPositionForOffset, and CachedOffsetForPosition for when
multiple glyphs have a same character (cluster) index.

Bug: 636993
Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_layout_ng
Change-Id: I862117d1ac19d7950306edc574be8f3e9b03ccc3
Reviewed-on: https://chromium-review.googlesource.com/1153068
Commit-Queue: Koji Ishii <kojii@chromium.org>
Commit-Queue: Emil A Eklund <eae@chromium.org>
Reviewed-by: Emil A Eklund <eae@chromium.org>
Cr-Commit-Position: refs/heads/master@{#578871}
[modify] https://crrev.com/9301f62dedf2dcd93ecc8d82f2ac467e69e84348/third_party/WebKit/LayoutTests/FlagExpectations/enable-blink-features=LayoutNG
[add] https://crrev.com/9301f62dedf2dcd93ecc8d82f2ac467e69e84348/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/text/midword-break-before-surrogate-pair-expected.png
[modify] https://crrev.com/9301f62dedf2dcd93ecc8d82f2ac467e69e84348/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_shaper_test.cc
[modify] https://crrev.com/9301f62dedf2dcd93ecc8d82f2ac467e69e84348/third_party/blink/renderer/platform/fonts/shaping/shape_result.cc
[modify] https://crrev.com/9301f62dedf2dcd93ecc8d82f2ac467e69e84348/third_party/blink/renderer/platform/fonts/shaping/shape_result.h

Comment 394 by bugdroid1@chromium.org, Jul 30 2018

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/d249c7c85a44b6b5cb6084d3a9ec18a35d8e9539

commit d249c7c85a44b6b5cb6084d3a9ec18a35d8e9539
Author: Koji Ishii <kojii@chromium.org>
Date: Mon Jul 30 05:30:04 2018

[LayoutNG] LayoutInline/LayoutText unites rects if not zero

This patch uses UniteIfNotZero, which incorporates rects if
either width *or* height is not zero, to compute
LinesBoundingBox for LayoutInline and LayoutText.

Using regular Unite, which incorporates rects if width *and*
height are not zero, ignores zero-width rects such as empty
inline or <br>.

The name and logic are ported from LayoutRect to
NGPhysicalOffsetRect.

This patch fixes two tests, but also require ~300 text
rebaselines because heights of such LayoutInline, LayoutText,
and their subclasses (such as <br>) are changed.

Bug: 636993
Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_layout_ng
Change-Id: I6488c074dedad71ae5f46fb366ee4a2b9d3cdca5
Reviewed-on: https://chromium-review.googlesource.com/1154240
Reviewed-by: Yoshifumi Inoue <yosin@chromium.org>
Commit-Queue: Koji Ishii <kojii@chromium.org>
Cr-Commit-Position: refs/heads/master@{#578980}
[modify] https://crrev.com/d249c7c85a44b6b5cb6084d3a9ec18a35d8e9539/third_party/WebKit/LayoutTests/FlagExpectations/enable-blink-features=LayoutNG
[modify] https://crrev.com/d249c7c85a44b6b5cb6084d3a9ec18a35d8e9539/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/compositing/geometry/root-layer-update-expected.txt
[modify] https://crrev.com/d249c7c85a44b6b5cb6084d3a9ec18a35d8e9539/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/compositing/iframes/composited-iframe-alignment-expected.txt
[modify] https://crrev.com/d249c7c85a44b6b5cb6084d3a9ec18a35d8e9539/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/compositing/img-layer-object-fit-expected.txt
[modify] https://crrev.com/d249c7c85a44b6b5cb6084d3a9ec18a35d8e9539/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/compositing/overflow/ancestor-overflow-expected.txt
[modify] https://crrev.com/d249c7c85a44b6b5cb6084d3a9ec18a35d8e9539/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/compositing/overflow/overflow-scroll-expected.txt
[modify] https://crrev.com/d249c7c85a44b6b5cb6084d3a9ec18a35d8e9539/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/compositing/self-painting-layers-expected.txt
[modify] https://crrev.com/d249c7c85a44b6b5cb6084d3a9ec18a35d8e9539/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/compositing/text-on-large-layer-expected.txt
[modify] https://crrev.com/d249c7c85a44b6b5cb6084d3a9ec18a35d8e9539/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/basic/comments-expected.txt
[modify] https://crrev.com/d249c7c85a44b6b5cb6084d3a9ec18a35d8e9539/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/basic/contextual_selectors-expected.txt
[modify] https://crrev.com/d249c7c85a44b6b5cb6084d3a9ec18a35d8e9539/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/basic/grouping-expected.txt
[modify] https://crrev.com/d249c7c85a44b6b5cb6084d3a9ec18a35d8e9539/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/box_properties/border_bottom_inline-expected.txt
[modify] https://crrev.com/d249c7c85a44b6b5cb6084d3a9ec18a35d8e9539/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/box_properties/border_inline-expected.txt
[modify] https://crrev.com/d249c7c85a44b6b5cb6084d3a9ec18a35d8e9539/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/box_properties/border_left_inline-expected.txt
[modify] https://crrev.com/d249c7c85a44b6b5cb6084d3a9ec18a35d8e9539/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/box_properties/border_right-expected.txt
[modify] https://crrev.com/d249c7c85a44b6b5cb6084d3a9ec18a35d8e9539/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/box_properties/border_top_inline-expected.txt
[modify] https://crrev.com/d249c7c85a44b6b5cb6084d3a9ec18a35d8e9539/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/box_properties/clear-expected.txt
[modify] https://crrev.com/d249c7c85a44b6b5cb6084d3a9ec18a35d8e9539/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/box_properties/clear_float-expected.txt
[modify] https://crrev.com/d249c7c85a44b6b5cb6084d3a9ec18a35d8e9539/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/box_properties/float-expected.txt
[modify] https://crrev.com/d249c7c85a44b6b5cb6084d3a9ec18a35d8e9539/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/box_properties/float_elements_in_series-expected.txt
[modify] https://crrev.com/d249c7c85a44b6b5cb6084d3a9ec18a35d8e9539/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/box_properties/float_margin-expected.txt
[modify] https://crrev.com/d249c7c85a44b6b5cb6084d3a9ec18a35d8e9539/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/box_properties/float_on_text_elements-expected.txt
[modify] https://crrev.com/d249c7c85a44b6b5cb6084d3a9ec18a35d8e9539/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/box_properties/height-expected.txt
[modify] https://crrev.com/d249c7c85a44b6b5cb6084d3a9ec18a35d8e9539/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/box_properties/margin_bottom-expected.txt
[modify] https://crrev.com/d249c7c85a44b6b5cb6084d3a9ec18a35d8e9539/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/box_properties/margin_top_inline-expected.txt
[modify] https://crrev.com/d249c7c85a44b6b5cb6084d3a9ec18a35d8e9539/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/box_properties/padding_bottom_inline-expected.txt
[modify] https://crrev.com/d249c7c85a44b6b5cb6084d3a9ec18a35d8e9539/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/box_properties/padding_inline-expected.txt
[modify] https://crrev.com/d249c7c85a44b6b5cb6084d3a9ec18a35d8e9539/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/box_properties/padding_left_inline-expected.txt
[modify] https://crrev.com/d249c7c85a44b6b5cb6084d3a9ec18a35d8e9539/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/box_properties/padding_right_inline-expected.txt
[modify] https://crrev.com/d249c7c85a44b6b5cb6084d3a9ec18a35d8e9539/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/box_properties/padding_top_inline-expected.txt
[modify] https://crrev.com/d249c7c85a44b6b5cb6084d3a9ec18a35d8e9539/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/cascade/cascade_order-expected.txt
[modify] https://crrev.com/d249c7c85a44b6b5cb6084d3a9ec18a35d8e9539/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/cascade/important-expected.txt
[modify] https://crrev.com/d249c7c85a44b6b5cb6084d3a9ec18a35d8e9539/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/classification/list_style_image-expected.txt
[modify] https://crrev.com/d249c7c85a44b6b5cb6084d3a9ec18a35d8e9539/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/classification/list_style_position-expected.txt
[modify] https://crrev.com/d249c7c85a44b6b5cb6084d3a9ec18a35d8e9539/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/classification/list_style_type-expected.txt
[modify] https://crrev.com/d249c7c85a44b6b5cb6084d3a9ec18a35d8e9539/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/classification/white_space-expected.txt
[modify] https://crrev.com/d249c7c85a44b6b5cb6084d3a9ec18a35d8e9539/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/color_and_background/background_attachment-expected.txt
[modify] https://crrev.com/d249c7c85a44b6b5cb6084d3a9ec18a35d8e9539/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/color_and_background/background_color-expected.txt
[modify] https://crrev.com/d249c7c85a44b6b5cb6084d3a9ec18a35d8e9539/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/color_and_background/background_image-expected.txt
[modify] https://crrev.com/d249c7c85a44b6b5cb6084d3a9ec18a35d8e9539/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/color_and_background/background_position-expected.txt
[modify] https://crrev.com/d249c7c85a44b6b5cb6084d3a9ec18a35d8e9539/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/color_and_background/background_repeat-expected.txt
[modify] https://crrev.com/d249c7c85a44b6b5cb6084d3a9ec18a35d8e9539/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/color_and_background/color-expected.txt
[modify] https://crrev.com/d249c7c85a44b6b5cb6084d3a9ec18a35d8e9539/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/conformance/forward_compatible_parsing-expected.txt
[modify] https://crrev.com/d249c7c85a44b6b5cb6084d3a9ec18a35d8e9539/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/formatting_model/floating_elements-expected.txt
[modify] https://crrev.com/d249c7c85a44b6b5cb6084d3a9ec18a35d8e9539/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/formatting_model/height_of_lines-expected.txt
[modify] https://crrev.com/d249c7c85a44b6b5cb6084d3a9ec18a35d8e9539/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/formatting_model/inline_elements-expected.txt
[modify] https://crrev.com/d249c7c85a44b6b5cb6084d3a9ec18a35d8e9539/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/formatting_model/vertical_formatting-expected.txt
[modify] https://crrev.com/d249c7c85a44b6b5cb6084d3a9ec18a35d8e9539/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/pseudo/anchor-expected.txt
[modify] https://crrev.com/d249c7c85a44b6b5cb6084d3a9ec18a35d8e9539/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/pseudo/firstletter-expected.txt
[modify] https://crrev.com/d249c7c85a44b6b5cb6084d3a9ec18a35d8e9539/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/pseudo/firstline-expected.txt
[modify] https://crrev.com/d249c7c85a44b6b5cb6084d3a9ec18a35d8e9539/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/pseudo/multiple_pseudo_elements-expected.txt
[modify] https://crrev.com/d249c7c85a44b6b5cb6084d3a9ec18a35d8e9539/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/pseudo/pseudo_elements_in_selectors-expected.txt
[modify] https://crrev.com/d249c7c85a44b6b5cb6084d3a9ec18a35d8e9539/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/units/percentage_units-expected.txt
[modify] https://crrev.com/d249c7c85a44b6b5cb6084d3a9ec18a35d8e9539/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css1/units/urls-expected.txt
[modify] https://crrev.com/d249c7c85a44b6b5cb6084d3a9ec18a35d8e9539/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t0803-c5505-mrgn-02-c-expected.txt
[modify] https://crrev.com/d249c7c85a44b6b5cb6084d3a9ec18a35d8e9539/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t0905-c5525-fltblck-00-d-ag-expected.txt
[modify] https://crrev.com/d249c7c85a44b6b5cb6084d3a9ec18a35d8e9539/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t1601-c547-indent-01-d-expected.txt
[modify] https://crrev.com/d249c7c85a44b6b5cb6084d3a9ec18a35d8e9539/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/background/background-large-position-and-size-remains-stable-expected.txt
[modify] https://crrev.com/d249c7c85a44b6b5cb6084d3a9ec18a35d8e9539/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/masking/clip-path-inset-corners-expected.txt
[modify] https://crrev.com/d249c7c85a44b6b5cb6084d3a9ec18a35d8e9539/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/selectors3/html/css3-modsel-179a-expected.txt
[modify] https://crrev.com/d249c7c85a44b6b5cb6084d3a9ec18a35d8e9539/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/selectors3/html/css3-modsel-180a-expected.txt
[modify] https://crrev.com/d249c7c85a44b6b5cb6084d3a9ec18a35d8e9539/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/selectors3/html/css3-modsel-18b-expected.txt
[modify] https://crrev.com/d249c7c85a44b6b5cb6084d3a9ec18a35d8e9539/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/selectors3/html/css3-modsel-23-expected.txt
[modify] https://crrev.com/d249c7c85a44b6b5cb6084d3a9ec18a35d8e9539/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/selectors3/html/css3-modsel-24-expected.txt
[modify] https://crrev.com/d249c7c85a44b6b5cb6084d3a9ec18a35d8e9539/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/selectors3/html/css3-modsel-68-expected.txt
[modify] https://crrev.com/d249c7c85a44b6b5cb6084d3a9ec18a35d8e9539/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/selectors3/html/css3-modsel-69-expected.txt
[modify] https://crrev.com/d249c7c85a44b6b5cb6084d3a9ec18a35d8e9539/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/selectors3/html/css3-modsel-9-expected.txt
[modify] https://crrev.com/d249c7c85a44b6b5cb6084d3a9ec18a35d8e9539/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/selectors3/xhtml/css3-modsel-179a-expected.txt
[modify] https://crrev.com/d249c7c85a44b6b5cb6084d3a9ec18a35d8e9539/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/selectors3/xhtml/css3-modsel-180a-expected.txt
[modify] https://crrev.com/d249c7c85a44b6b5cb6084d3a9ec18a35d8e9539/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/selectors3/xhtml/css3-modsel-18b-expected.txt
[modify] https://crrev.com/d249c7c85a44b6b5cb6084d3a9ec18a35d8e9539/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/selectors3/xhtml/css3-modsel-23-expected.txt
[modify] https://crrev.com/d249c7c85a44b6b5cb6084d3a9ec18a35d8e9539/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/selectors3/xhtml/css3-modsel-24-expected.txt
[modify] https://crrev.com/d249c7c85a44b6b5cb6084d3a9ec18a35d8e9539/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/selectors3/xhtml/css3-modsel-68-expected.txt
[modify] https://crrev.com/d249c7c85a44b6b5cb6084d3a9ec18a35d8e9539/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/selectors3/xhtml/css3-modsel-69-expected.txt
[modify] https://crrev.com/d249c7c85a44b6b5cb6084d3a9ec18a35d8e9539/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/selectors3/xhtml/css3-modsel-9-expected.txt
[modify] https://crrev.com/d249c7c85a44b6b5cb6084d3a9ec18a35d8e9539/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/selectors3/xml/css3-modsel-179a-expected.txt
[modify] https://crrev.com/d249c7c85a44b6b5cb6084d3a9ec18a35d8e9539/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/selectors3/xml/css3-modsel-180a-expected.txt
[modify] https://crrev.com/d249c7c85a44b6b5cb6084d3a9ec18a35d8e9539/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/selectors3/xml/css3-modsel-18b-expected.txt
[modify] https://crrev.com/d249c7c85a44b6b5cb6084d3a9ec18a35d8e9539/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/selectors3/xml/css3-modsel-23-expected.txt
[modify] https://crrev.com/d249c7c85a44b6b5cb6084d3a9ec18a35d8e9539/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/selectors3/xml/css3-modsel-24-expected.txt
[modify] https://crrev.com/d249c7c85a44b6b5cb6084d3a9ec18a35d8e9539/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/selectors3/xml/css3-modsel-68-expected.txt
[modify] https://crrev.com/d249c7c85a44b6b5cb6084d3a9ec18a35d8e9539/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/selectors3/xml/css3-modsel-69-expected.txt
[modify] https://crrev.com/d249c7c85a44b6b5cb6084d3a9ec18a35d8e9539/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/selectors3/xml/css3-modsel-9-expected.txt
[modify] https://crrev.com/d249c7c85a44b6b5cb6084d3a9ec18a35d8e9539/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/editing/selection/selectNode-expected.txt
[modify] https://crrev.com/d249c7c85a44b6b5cb6084d3a9ec18a35d8e9539/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/editing/selection/selectNodeContents-expected.txt
[modify] https://crrev.com/d249c7c85a44b6b5cb6084d3a9ec18a35d8e9539/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/editing/selection/selection-button-text-expected.txt
[modify] https://crrev.com/d249c7c85a44b6b5cb6084d3a9ec18a35d8e9539/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/backgrounds/background-inherit-color-bug-expected.txt
[modify] https://crrev.com/d249c7c85a44b6b5cb6084d3a9ec18a35d8e9539/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/backgrounds/background-repeat-with-background-color-expected.txt
[modify] https://crrev.com/d249c7c85a44b6b5cb6084d3a9ec18a35d8e9539/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/backgrounds/background-svg-scaling-expected.txt
[modify] https://crrev.com/d249c7c85a44b6b5cb6084d3a9ec18a35d8e9539/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/backgrounds/background-svg-scaling-zoom-expected.txt
[modify] https://crrev.com/d249c7c85a44b6b5cb6084d3a9ec18a35d8e9539/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/backgrounds/border-radius-split-background-expected.txt
[modify] https://crrev.com/d249c7c85a44b6b5cb6084d3a9ec18a35d8e9539/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/backgrounds/border-radius-split-background-image-expected.txt
[modify] https://crrev.com/d249c7c85a44b6b5cb6084d3a9ec18a35d8e9539/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/backgrounds/size/backgroundSize15-expected.txt
[modify] https://crrev.com/d249c7c85a44b6b5cb6084d3a9ec18a35d8e9539/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/box-shadow/basic-shadows-expected.txt
[modify] https://crrev.com/d249c7c85a44b6b5cb6084d3a9ec18a35d8e9539/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/box-shadow/box-shadow-radius-expected.txt
[modify] https://crrev.com/d249c7c85a44b6b5cb6084d3a9ec18a35d8e9539/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/box-shadow/inset-box-shadow-radius-expected.txt
[modify] https://crrev.com/d249c7c85a44b6b5cb6084d3a9ec18a35d8e9539/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/box-shadow/inset-box-shadows-expected.txt
[modify] https://crrev.com/d249c7c85a44b6b5cb6084d3a9ec18a35d8e9539/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/box-shadow/scaled-box-shadow-expected.txt
[add] https://crrev.com/d249c7c85a44b6b5cb6084d3a9ec18a35d8e9539/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/css-generated-content/015-expected.txt
[modify] https://crrev.com/d249c7c85a44b6b5cb6084d3a9ec18a35d8e9539/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/css-generated-content/wbr-with-before-content-expected.txt
[modify] https://crrev.com/d249c7c85a44b6b5cb6084d3a9ec18a35d8e9539/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/css/001-expected.txt
[modify] https://crrev.com/d249c7c85a44b6b5cb6084d3a9ec18a35d8e9539/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/css/color-correction-on-backgrounds-expected.txt
[modify] https://crrev.com/d249c7c85a44b6b5cb6084d3a9ec18a35d8e9539/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/css/color-correction-on-box-shadow-expected.txt
[add] https://crrev.com/d249c7c85a44b6b5cb6084d3a9ec18a35d8e9539/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/css/empty-generated-content-expected.txt
[modify] https://crrev.com/d249c7c85a44b6b5cb6084d3a9ec18a35d8e9539/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/css/empty-inline-line-height-first-line-expected.txt
[modify] https://crrev.com/d249c7c85a44b6b5cb6084d3a9ec18a35d8e9539/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/css/empty-inline-line-height-first-line-quirksmode-expected.txt
[modify] https://crrev.com/d249c7c85a44b6b5cb6084d3a9ec18a35d8e9539/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/css/first-line-text-decoration-expected.txt
[modify] https://crrev.com/d249c7c85a44b6b5cb6084d3a9ec18a35d8e9539/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/css/first-line-text-decoration-inherited-from-parent-expected.txt
[modify] https://crrev.com/d249c7c85a44b6b5cb6084d3a9ec18a35d8e9539/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/css/focus-ring-detached-expected.txt
[modify] https://crrev.com/d249c7c85a44b6b5cb6084d3a9ec18a35d8e9539/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/css/layerZOrderCrash-expected.txt
[modify] https://crrev.com/d249c7c85a44b6b5cb6084d3a9ec18a35d8e9539/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/css/line-height-overflow-expected.txt
[modify] https://crrev.com/d249c7c85a44b6b5cb6084d3a9ec18a35d8e9539/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/css/margin-top-bottom-dynamic-expected.txt
[modify] https://crrev.com/d249c7c85a44b6b5cb6084d3a9ec18a35d8e9539/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/css/negative-leading-expected.txt
[modify] https://crrev.com/d249c7c85a44b6b5cb6084d3a9ec18a35d8e9539/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/css/nested-floating-relative-position-percentages-expected.txt
[modify] https://crrev.com/d249c7c85a44b6b5cb6084d3a9ec18a35d8e9539/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/css/nth-child-dynamic-expected.txt
[modify] https://crrev.com/d249c7c85a44b6b5cb6084d3a9ec18a35d8e9539/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/css/percentage-non-integer-expected.txt
[modify] https://crrev.com/d249c7c85a44b6b5cb6084d3a9ec18a35d8e9539/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/css/pseudo-first-line-border-width-expected.txt
[modify] https://crrev.com/d249c7c85a44b6b5cb6084d3a9ec18a35d8e9539/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/css/resize-corner-tracking-expected.txt
[modify] https://crrev.com/d249c7c85a44b6b5cb6084d3a9ec18a35d8e9539/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/css/text-overflow-ellipsis-bidi-expected.txt
[modify] https://crrev.com/d249c7c85a44b6b5cb6084d3a9ec18a35d8e9539/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/css/text-overflow-ellipsis-expected.txt
[modify] https://crrev.com/d249c7c85a44b6b5cb6084d3a9ec18a35d8e9539/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/css/text-overflow-ellipsis-strict-expected.txt
[modify] https:/

Comment 395 by bugdroid1@chromium.org, Jul 30 2018

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/b913b3e23dc6ac48dcd2ab92cfe86fa3ff6b608e

commit b913b3e23dc6ac48dcd2ab92cfe86fa3ff6b608e
Author: Koji Ishii <kojii@chromium.org>
Date: Mon Jul 30 16:01:43 2018

[LayoutNG] Restore collapsed space if non-space was inserted

This patch fixes to restore collapsed spaces when non-space
was inserted before. This is seen in LayoutTest results.html,
when it updates the number of failures, once collapsed space
needs to be restored.

Also, fixing this case ended up optimizing the re-using
NGInlineItem conditions further. Allowing more cases to re-
use hits hidden bugs. This CL includes fixes for them too.

For instance, the re-use is possible when preserving white-
spaces (e.g., <pre>) with this CL. It was almost always
determined as not re-usable.

Bug: 636993
Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_layout_ng
Change-Id: I1d1224812b4e92e6582e3112f73372577a332bc3
Reviewed-on: https://chromium-review.googlesource.com/1154242
Reviewed-by: Emil A Eklund <eae@chromium.org>
Commit-Queue: Emil A Eklund <eae@chromium.org>
Cr-Commit-Position: refs/heads/master@{#579053}
[modify] https://crrev.com/b913b3e23dc6ac48dcd2ab92cfe86fa3ff6b608e/third_party/blink/renderer/core/layout/layout_menu_list.cc
[modify] https://crrev.com/b913b3e23dc6ac48dcd2ab92cfe86fa3ff6b608e/third_party/blink/renderer/core/layout/layout_text.cc
[modify] https://crrev.com/b913b3e23dc6ac48dcd2ab92cfe86fa3ff6b608e/third_party/blink/renderer/core/layout/layout_text.h
[modify] https://crrev.com/b913b3e23dc6ac48dcd2ab92cfe86fa3ff6b608e/third_party/blink/renderer/core/layout/ng/inline/ng_inline_items_builder.cc
[modify] https://crrev.com/b913b3e23dc6ac48dcd2ab92cfe86fa3ff6b608e/third_party/blink/renderer/core/layout/ng/inline/ng_inline_items_builder.h
[modify] https://crrev.com/b913b3e23dc6ac48dcd2ab92cfe86fa3ff6b608e/third_party/blink/renderer/core/layout/ng/inline/ng_inline_items_builder_test.cc
[modify] https://crrev.com/b913b3e23dc6ac48dcd2ab92cfe86fa3ff6b608e/third_party/blink/renderer/core/layout/ng/inline/ng_inline_node_test.cc
[modify] https://crrev.com/b913b3e23dc6ac48dcd2ab92cfe86fa3ff6b608e/third_party/blink/renderer/core/layout/ng/list/layout_ng_list_item.cc

Comment 396 by bugdroid1@chromium.org, Jul 31 2018

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/017b67704ac5c26b60a3674866a2325c8db020cd

commit 017b67704ac5c26b60a3674866a2325c8db020cd
Author: Koji Ishii <kojii@chromium.org>
Date: Tue Jul 31 18:29:30 2018

[LayoutNG] Estimate the capacity of NGInlineItemsBuilder

Currently, 50 to 60% of CollectInlines are spent in
ExpandCapacity to reallocate the vector buffer. This patch
makes rough estimation from the number of direct children
to reduce the number of reallocations.

Currently, slow tests such as storage/indexdb/* creates
more than 1,000 items by appending the test results in
<span></span><br> structure. This patch reduces vector
allocation in such cases to once or twice.

Bug: 636993
Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_layout_ng
Change-Id: I2b5b1462dc59091cc534a2f143b54567d31b863a
Reviewed-on: https://chromium-review.googlesource.com/1155268
Reviewed-by: Emil A Eklund <eae@chromium.org>
Commit-Queue: Koji Ishii <kojii@chromium.org>
Cr-Commit-Position: refs/heads/master@{#579486}
[modify] https://crrev.com/017b67704ac5c26b60a3674866a2325c8db020cd/third_party/blink/renderer/core/layout/ng/inline/ng_inline_node.cc

Comment 397 by benhenry@chromium.org, Aug 2

Status: Assigned (was: Available)

Comment 398 by bugdroid1@chromium.org, Aug 6

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/511716a33ef65b164202d49eac92fd9cf44c6661

commit 511716a33ef65b164202d49eac92fd9cf44c6661
Author: Koji Ishii <kojii@chromium.org>
Date: Mon Aug 06 21:42:41 2018

Change js-test.js to create div for each debug message

This patch changes each debug message of js-test.js to
produce a block box rather than an inline box.

Before this patch, it can create a huge inline formatting
context by appending <span>s, which LayoutNG is not very
performant to handle at this point.

LayoutNG should be able to handle incrementally expanding
huge inline formatting context for textarea and some other
use cases, but they should have own tests, and not every
js-test.js should make this challenge.

This change reduces 5 LayoutNG timeout failures.

Bug: 636993
Change-Id: I5df429df64bf21dc051fe13600180511ca20ac22
Reviewed-on: https://chromium-review.googlesource.com/1163402
Reviewed-by: Emil A Eklund <eae@chromium.org>
Commit-Queue: Emil A Eklund <eae@chromium.org>
Cr-Commit-Position: refs/heads/master@{#580997}
[modify] https://crrev.com/511716a33ef65b164202d49eac92fd9cf44c6661/third_party/WebKit/LayoutTests/fast/css/containment/contain-parse-and-apply-expected.txt
[modify] https://crrev.com/511716a33ef65b164202d49eac92fd9cf44c6661/third_party/WebKit/LayoutTests/fast/events/event-fire-disconnected-shadow-dom-crash-expected.txt
[modify] https://crrev.com/511716a33ef65b164202d49eac92fd9cf44c6661/third_party/WebKit/LayoutTests/resources/js-test.js

Comment 399 by bugdroid1@chromium.org, Aug 7

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/f610bd8e720e0d38572d9b52f6fbe76ed7de8fa9

commit f610bd8e720e0d38572d9b52f6fbe76ed7de8fa9
Author: Koji Ishii <kojii@chromium.org>
Date: Tue Aug 07 06:39:13 2018

[LayoutNG] Remove trailing spaces of blocks in phase 1

This patch changes NGInlineItemsBuilder to remove trailing
spaces at the end of blocks.

It used to do so, but stopped in https://crrev.com/c/1022191
because doing so reduces opportunities to re-use NGInlineItem
and increases shaping when contents are added.

However, for fonts that has kerning before a space character,
this change increased re-shaping every block end. Given line
breaking is more often ran than adding contents dynamically,
this turned out to be not a good trade off. We could re-shape
only end-part in RestoreTrailingCollapsibleSpace to achieve
the originally intended optimizations.

This speeds up blink_perf tests on Windows by ~10%.

This patch also fixes a few cases where space collapsing is
incorrect when items are re-used.

Bug: 636993
Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_layout_ng
Change-Id: Id6e0c262db29b4d39ddd4eb1f55b18da2c7e5880
Reviewed-on: https://chromium-review.googlesource.com/1163240
Commit-Queue: Koji Ishii <kojii@chromium.org>
Reviewed-by: Emil A Eklund <eae@chromium.org>
Cr-Commit-Position: refs/heads/master@{#581149}
[modify] https://crrev.com/f610bd8e720e0d38572d9b52f6fbe76ed7de8fa9/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/20110323/list-style-position-005-expected.txt
[modify] https://crrev.com/f610bd8e720e0d38572d9b52f6fbe76ed7de8fa9/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t1202-counter-13-b-expected.txt
[modify] https://crrev.com/f610bd8e720e0d38572d9b52f6fbe76ed7de8fa9/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t1202-counter-14-b-expected.txt
[modify] https://crrev.com/f610bd8e720e0d38572d9b52f6fbe76ed7de8fa9/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t1202-counters-13-b-expected.txt
[modify] https://crrev.com/f610bd8e720e0d38572d9b52f6fbe76ed7de8fa9/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css2.1/t1202-counters-14-b-expected.txt
[modify] https://crrev.com/f610bd8e720e0d38572d9b52f6fbe76ed7de8fa9/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/events/mouseclick-target-and-positioning-expected.txt
[modify] https://crrev.com/f610bd8e720e0d38572d9b52f6fbe76ed7de8fa9/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/inline/drawStyledEmptyInlinesWithWS-expected.png
[add] https://crrev.com/f610bd8e720e0d38572d9b52f6fbe76ed7de8fa9/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/images/imagemap-focus-ring-in-positioned-container-expected.txt
[add] https://crrev.com/f610bd8e720e0d38572d9b52f6fbe76ed7de8fa9/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/images/imagemap-focus-ring-with-paint-root-offset-expected.txt
[add] https://crrev.com/f610bd8e720e0d38572d9b52f6fbe76ed7de8fa9/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/virtual/gpu-rasterization/images/imagemap-focus-ring-in-positioned-container-expected.txt
[add] https://crrev.com/f610bd8e720e0d38572d9b52f6fbe76ed7de8fa9/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/virtual/gpu-rasterization/images/imagemap-focus-ring-with-paint-root-offset-expected.txt
[modify] https://crrev.com/f610bd8e720e0d38572d9b52f6fbe76ed7de8fa9/third_party/blink/renderer/core/layout/ng/inline/ng_inline_item.cc
[modify] https://crrev.com/f610bd8e720e0d38572d9b52f6fbe76ed7de8fa9/third_party/blink/renderer/core/layout/ng/inline/ng_inline_item.h
[modify] https://crrev.com/f610bd8e720e0d38572d9b52f6fbe76ed7de8fa9/third_party/blink/renderer/core/layout/ng/inline/ng_inline_items_builder.cc
[modify] https://crrev.com/f610bd8e720e0d38572d9b52f6fbe76ed7de8fa9/third_party/blink/renderer/core/layout/ng/inline/ng_inline_items_builder.h
[modify] https://crrev.com/f610bd8e720e0d38572d9b52f6fbe76ed7de8fa9/third_party/blink/renderer/core/layout/ng/inline/ng_inline_node.cc

Comment 400 by bugdroid1@chromium.org, Aug 7

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/8ef23e85f7c64c339baa2de9da2159786bba18db

commit 8ef23e85f7c64c339baa2de9da2159786bba18db
Author: Koji Ishii <kojii@chromium.org>
Date: Tue Aug 07 09:12:22 2018

[LayoutNG] Remove fragments after ellipsis

This patch removes fragments after ellipsis when
'text-overflow: ellpisis' is applied.

When the container box has paddings, ellipsizing is computed
for the content box, but clipping is performed for the
padding box. This patch hides fragments that fall into the
paddings.

We may need to revisit how to hide them. Before this patch,
we moved them outside of the content box. With this patch,
we stop producing fragments for them. Neitehr is paint-
effects as the spec defines, and may require other parts
to special case. I'll explorer other options if problems
arose with this approach.

Bug: 636993
Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_layout_ng
Change-Id: I44256440b4afbf1f4caf35269abf3450372fbf65
Reviewed-on: https://chromium-review.googlesource.com/1158670
Commit-Queue: Koji Ishii <kojii@chromium.org>
Reviewed-by: Emil A Eklund <eae@chromium.org>
Cr-Commit-Position: refs/heads/master@{#581177}
[modify] https://crrev.com/8ef23e85f7c64c339baa2de9da2159786bba18db/third_party/WebKit/LayoutTests/FlagExpectations/enable-blink-features=LayoutNG
[modify] https://crrev.com/8ef23e85f7c64c339baa2de9da2159786bba18db/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/editing/selection/dont-select-text-overflow-ellipsis-when-wrapping-rtl-expected.txt
[modify] https://crrev.com/8ef23e85f7c64c339baa2de9da2159786bba18db/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/css/text-overflow-ellipsis-bidi-expected.txt
[modify] https://crrev.com/8ef23e85f7c64c339baa2de9da2159786bba18db/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/css/text-overflow-ellipsis-text-align-center-expected.txt
[modify] https://crrev.com/8ef23e85f7c64c339baa2de9da2159786bba18db/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/css/text-overflow-ellipsis-text-align-justify-expected.txt
[modify] https://crrev.com/8ef23e85f7c64c339baa2de9da2159786bba18db/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/css/text-overflow-ellipsis-text-align-left-expected.txt
[modify] https://crrev.com/8ef23e85f7c64c339baa2de9da2159786bba18db/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/css/text-overflow-ellipsis-text-align-right-expected.txt
[modify] https://crrev.com/8ef23e85f7c64c339baa2de9da2159786bba18db/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/css/vertical-text-overflow-ellipsis-text-align-center-expected.txt
[modify] https://crrev.com/8ef23e85f7c64c339baa2de9da2159786bba18db/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/css/vertical-text-overflow-ellipsis-text-align-justify-expected.txt
[modify] https://crrev.com/8ef23e85f7c64c339baa2de9da2159786bba18db/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/css/vertical-text-overflow-ellipsis-text-align-left-expected.txt
[modify] https://crrev.com/8ef23e85f7c64c339baa2de9da2159786bba18db/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/css/vertical-text-overflow-ellipsis-text-align-right-expected.txt
[add] https://crrev.com/8ef23e85f7c64c339baa2de9da2159786bba18db/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/text/hide-atomic-inlines-after-ellipsis-expected.png
[modify] https://crrev.com/8ef23e85f7c64c339baa2de9da2159786bba18db/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/paint/markers/ellipsis-mixed-text-in-ltr-flow-with-markers-expected.txt
[modify] https://crrev.com/8ef23e85f7c64c339baa2de9da2159786bba18db/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/paint/markers/ellipsis-mixed-text-in-rtl-flow-with-markers-expected.txt
[modify] https://crrev.com/8ef23e85f7c64c339baa2de9da2159786bba18db/third_party/blink/renderer/core/layout/ng/inline/ng_line_truncator.cc
[modify] https://crrev.com/8ef23e85f7c64c339baa2de9da2159786bba18db/third_party/blink/renderer/core/layout/ng/inline/ng_line_truncator.h

Comment 401 by bugdroid1@chromium.org, Aug 9

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/d83a65d5d94bc5d915d531e0bbae34f29e9bbb66

commit d83a65d5d94bc5d915d531e0bbae34f29e9bbb66
Author: Koji Ishii <kojii@chromium.org>
Date: Thu Aug 09 02:54:42 2018

Change NonSharedCharacterBreakIterator constructor to take StringView

This patch changes the constructor to take a StringView, so
that callers can create the iterator without allocating a
string.

Bug: 636993
Change-Id: I68952e2d685a1c2712700a999f98ad6c9c06f4a0
Reviewed-on: https://chromium-review.googlesource.com/1165276
Commit-Queue: Koji Ishii <kojii@chromium.org>
Reviewed-by: Emil A Eklund <eae@chromium.org>
Cr-Commit-Position: refs/heads/master@{#581771}
[modify] https://crrev.com/d83a65d5d94bc5d915d531e0bbae34f29e9bbb66/third_party/blink/renderer/platform/text/text_break_iterator.cc
[modify] https://crrev.com/d83a65d5d94bc5d915d531e0bbae34f29e9bbb66/third_party/blink/renderer/platform/text/text_break_iterator.h
[modify] https://crrev.com/d83a65d5d94bc5d915d531e0bbae34f29e9bbb66/third_party/blink/renderer/platform/text/text_break_iterator_icu.cc

Comment 402 by bugdroid1@chromium.org, Aug 10

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/30b76d5777ddf68664451d911c2f956ca6d7cb70

commit 30b76d5777ddf68664451d911c2f956ca6d7cb70
Author: Koji Ishii <kojii@chromium.org>
Date: Fri Aug 10 04:51:36 2018

[LayoutNG] Stop giving the text before the line start to LineBreakIterator

This patch changes NGLineBreaker not to give the text before
the start of the line to ICU TextBreakIterator.

It looks like ICU computes all the text from the beginning of
the given text. Giving the block text content makes ICU to
perform much slower, especially when LayoutNG re-creates
break iterators on each line.

This patch improves ArabicLineLayout.html by more than double.
Also it is expected to improve all 16-bit cases.

For break-anywhere, this patch relies on r581771 (CL:1165276)
that adds StringView to NonSharedCharacterBreakIterator.

Bug: 636993
Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_layout_ng
Change-Id: I32f6d214e0b64a728ec4d91c1cd9e8a1870745ba
Reviewed-on: https://chromium-review.googlesource.com/1168279
Commit-Queue: Koji Ishii <kojii@chromium.org>
Reviewed-by: Emil A Eklund <eae@chromium.org>
Cr-Commit-Position: refs/heads/master@{#582060}
[modify] https://crrev.com/30b76d5777ddf68664451d911c2f956ca6d7cb70/third_party/blink/renderer/core/layout/ng/inline/ng_line_breaker.cc
[modify] https://crrev.com/30b76d5777ddf68664451d911c2f956ca6d7cb70/third_party/blink/renderer/platform/text/text_break_iterator.cc
[modify] https://crrev.com/30b76d5777ddf68664451d911c2f956ca6d7cb70/third_party/blink/renderer/platform/text/text_break_iterator.h

Comment 403 by kojii@chromium.org, Aug 15

Blockedon: 874361

Comment 404 by wangxianzhu@chromium.org, Aug 15

Blockedon: 874588

Comment 405 by bugdroid1@chromium.org, Aug 15

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/9c758824843f14e6724d4f7097ae641e79eb1c72

commit 9c758824843f14e6724d4f7097ae641e79eb1c72
Author: Koji Ishii <kojii@chromium.org>
Date: Wed Aug 15 21:14:33 2018

[LayoutNG] Implement dom-snapshot inspector protocol

This patch implements dom-snapshot inspector protocol for
LayoutNG.

The offset is not implemented yet in this patch, and thus
2 more tests do not pass yet.

Bug: 636993
Change-Id: I0b57685cc6777ab8d06fbce8b5c8d935aed2648c
Reviewed-on: https://chromium-review.googlesource.com/1175758
Commit-Queue: Koji Ishii <kojii@chromium.org>
Commit-Queue: Emil A Eklund <eae@chromium.org>
Reviewed-by: Emil A Eklund <eae@chromium.org>
Cr-Commit-Position: refs/heads/master@{#583394}
[modify] https://crrev.com/9c758824843f14e6724d4f7097ae641e79eb1c72/third_party/blink/renderer/core/inspector/inspector_dom_snapshot_agent.cc
[modify] https://crrev.com/9c758824843f14e6724d4f7097ae641e79eb1c72/third_party/blink/renderer/core/layout/layout_text.cc
[modify] https://crrev.com/9c758824843f14e6724d4f7097ae641e79eb1c72/third_party/blink/renderer/core/layout/layout_text.h

Comment 406 by bugdroid1@chromium.org, Aug 17

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/7cf15f28b5baea34631cff385348b254d84d54af

commit 7cf15f28b5baea34631cff385348b254d84d54af
Author: Koji Ishii <kojii@chromium.org>
Date: Fri Aug 17 09:22:17 2018

[LayoutNG] Make NGBlockNode::CopyFragmentDataToLayoutBoxForInlineChildren private

This patch changes
  NGBlockNode::CopyFragmentDataToLayoutBoxForInlineChildren
to a private member function from an anonymous function, so
that the planned changes to the function is easier to review.

No changes other than moving within the same .cc file.

TBR=eae@chromium.org

Bug: 636993
Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_layout_ng
Change-Id: I8af2cd1872e9f6c66156368c508ea4f209fc3255
Reviewed-on: https://chromium-review.googlesource.com/1179491
Commit-Queue: Koji Ishii <kojii@chromium.org>
Reviewed-by: Koji Ishii <kojii@chromium.org>
Cr-Commit-Position: refs/heads/master@{#583997}
[modify] https://crrev.com/7cf15f28b5baea34631cff385348b254d84d54af/third_party/blink/renderer/core/layout/ng/ng_block_node.cc
[modify] https://crrev.com/7cf15f28b5baea34631cff385348b254d84d54af/third_party/blink/renderer/core/layout/ng/ng_block_node.h

Comment 407 by bugdroid1@chromium.org, Aug 17

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/d09548ed769dd8b34800dbb1fb65bf06d32de206

commit d09548ed769dd8b34800dbb1fb65bf06d32de206
Author: Koji Ishii <kojii@chromium.org>
Date: Fri Aug 17 11:58:57 2018

[LayoutNG] Fix margins for orthogonal atomic inlines

When computing margins for orthogonal atomic inlines, the old
code was using the writing-mode of the atomic inline to
determine whether to flip line or not.

This patch fixes to use the constraint space's writing-mode.

For other computation than flipped-lines,
ComputeMarginsForVisualContainer already uses the writing-
mode of the constraint space.

Bug: 636993
Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_layout_ng
Change-Id: I85d12a29cf5e845d3fef00b9832c68d106e80dca
Reviewed-on: https://chromium-review.googlesource.com/1179519
Commit-Queue: Koji Ishii <kojii@chromium.org>
Commit-Queue: Emil A Eklund <eae@chromium.org>
Reviewed-by: Emil A Eklund <eae@chromium.org>
Cr-Commit-Position: refs/heads/master@{#584028}
[modify] https://crrev.com/d09548ed769dd8b34800dbb1fb65bf06d32de206/third_party/WebKit/LayoutTests/FlagExpectations/enable-blink-features=LayoutNG
[modify] https://crrev.com/d09548ed769dd8b34800dbb1fb65bf06d32de206/third_party/blink/renderer/core/layout/ng/inline/ng_line_breaker.cc

Comment 408 by bugdroid1@chromium.org, Aug 27

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/edd5858b2d2a7c3aa8f5da2c601954737b1d366f

commit edd5858b2d2a7c3aa8f5da2c601954737b1d366f
Author: Koji Ishii <kojii@chromium.org>
Date: Mon Aug 27 09:43:33 2018

[LayoutNG] Cleanup computing margins/border/padding in NGLineBreaker

1. Padding for atomic inline isn't used. Removed computing it.
2. Both converting to NGBoxStrut and then to NGLineBoxStrut
   should use the same writing-mode. Added ng_length_utils
   functions for the two conversions to occur at the same
   place.

Bug: 636993
Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_layout_ng
Change-Id: I3deace37ae5334af0f919d4c557effe067328da9
Reviewed-on: https://chromium-review.googlesource.com/1181004
Commit-Queue: Koji Ishii <kojii@chromium.org>
Reviewed-by: Christian Biesinger <cbiesinger@chromium.org>
Reviewed-by: Emil A Eklund <eae@chromium.org>
Cr-Commit-Position: refs/heads/master@{#586218}
[modify] https://crrev.com/edd5858b2d2a7c3aa8f5da2c601954737b1d366f/third_party/blink/renderer/core/layout/ng/geometry/ng_box_strut.cc
[modify] https://crrev.com/edd5858b2d2a7c3aa8f5da2c601954737b1d366f/third_party/blink/renderer/core/layout/ng/geometry/ng_box_strut.h
[modify] https://crrev.com/edd5858b2d2a7c3aa8f5da2c601954737b1d366f/third_party/blink/renderer/core/layout/ng/inline/ng_inline_item_result.h
[modify] https://crrev.com/edd5858b2d2a7c3aa8f5da2c601954737b1d366f/third_party/blink/renderer/core/layout/ng/inline/ng_line_breaker.cc
[modify] https://crrev.com/edd5858b2d2a7c3aa8f5da2c601954737b1d366f/third_party/blink/renderer/core/layout/ng/ng_length_utils.cc
[modify] https://crrev.com/edd5858b2d2a7c3aa8f5da2c601954737b1d366f/third_party/blink/renderer/core/layout/ng/ng_length_utils.h

Comment 409 by bugdroid1@chromium.org, Aug 27

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/cefbc0542808c92edf50518d5c00f89bb6a9eace

commit cefbc0542808c92edf50518d5c00f89bb6a9eace
Author: Koji Ishii <kojii@chromium.org>
Date: Mon Aug 27 15:05:29 2018

Batch calls to getTextWidths from HarfBuzz

As we found SkPaint::getTextWidths has rather high entry cost,
HarfBuzz has added a function to batch the call in [1].

This patch supports the batch function in HarfBuzzFace.

blink_perf.layout (Legacy): 3-25% improvements in 10 tests.
https://pinpoint-dot-chromeperf.appspot.com/job/137a7165640000

blink_perf.layout (LayoutNG): 3-40% improvements in 20 tests.
https://pinpoint-dot-chromeperf.appspot.com/job/111903c5640000

[1] https://github.com/harfbuzz/harfbuzz/commit/79e21984b13bdb879f3007ba9a97fde47df340d3

Bug: 636993
Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_layout_ng
Change-Id: I04f839526cd35876996b679971d49a99e47ae46c
Reviewed-on: https://chromium-review.googlesource.com/1158671
Reviewed-by: Emil A Eklund <eae@chromium.org>
Commit-Queue: Emil A Eklund <eae@chromium.org>
Cr-Commit-Position: refs/heads/master@{#586264}
[modify] https://crrev.com/cefbc0542808c92edf50518d5c00f89bb6a9eace/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_face.cc
[modify] https://crrev.com/cefbc0542808c92edf50518d5c00f89bb6a9eace/third_party/blink/renderer/platform/fonts/skia/skia_text_metrics.cc
[modify] https://crrev.com/cefbc0542808c92edf50518d5c00f89bb6a9eace/third_party/blink/renderer/platform/fonts/skia/skia_text_metrics.h

Comment 410 by bugdroid1@chromium.org, Aug 28

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/84cbd27f57ae5850b81c836fe899e6a4d3a005b9

commit 84cbd27f57ae5850b81c836fe899e6a4d3a005b9
Author: Koji Ishii <kojii@chromium.org>
Date: Tue Aug 28 07:50:02 2018

[LayoutNG] Set kDontReshapeStart correctly when rewinding

NGLineBreaker::BreakText sets kDontReshapeStart for the items
at the beginning of a line.

This patch fixes to compute it by whether the start offset of
the item_result is at the beginning, not the current offset
NGLinebreaker is reading at. They are the same for the normal
line breaking, but not so when rewinding.

Found while investigating crbug.com/866771.

Bug: 636993
Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_layout_ng
Change-Id: I812d2cd44492a0112bcd037749168e8eb62d8a94
Reviewed-on: https://chromium-review.googlesource.com/1190983
Reviewed-by: Emil A Eklund <eae@chromium.org>
Commit-Queue: Emil A Eklund <eae@chromium.org>
Cr-Commit-Position: refs/heads/master@{#586615}
[modify] https://crrev.com/84cbd27f57ae5850b81c836fe899e6a4d3a005b9/third_party/blink/renderer/core/layout/ng/inline/ng_line_breaker.cc

Comment 411 by bugdroid1@chromium.org, Aug 28

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/77363102a628adceeac53864a56314ed3b580c19

commit 77363102a628adceeac53864a56314ed3b580c19
Author: Koji Ishii <kojii@chromium.org>
Date: Tue Aug 28 17:15:16 2018

Fix css3/flexbox/line-wrap.html not to rely on a Bug

The test says:
  All the vertical-lr cases are off by 4px in the x direction.
  See http://webkit.org/b/71193.

LayoutNG fails these tests because it doesn't have the bug.

This patch fixes expectations for LayoutNG, and add a script
for legacy to pass by adding margins to correct the
unexpected offsets.

Bug: 636993
Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_layout_ng
Change-Id: Ib8f17cae0e12d40ce511886d4ee93dff64d87b57
Reviewed-on: https://chromium-review.googlesource.com/1193865
Commit-Queue: Koji Ishii <kojii@chromium.org>
Reviewed-by: Christian Biesinger <cbiesinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#586757}
[modify] https://crrev.com/77363102a628adceeac53864a56314ed3b580c19/third_party/WebKit/LayoutTests/FlagExpectations/enable-blink-features=LayoutNG
[modify] https://crrev.com/77363102a628adceeac53864a56314ed3b580c19/third_party/WebKit/LayoutTests/css3/flexbox/line-wrapping.html
[add] https://crrev.com/77363102a628adceeac53864a56314ed3b580c19/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/css3/flexbox/line-wrapping-expected.txt

Comment 412 by bugdroid1@chromium.org, Aug 29

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/2734f9f70a64d769f122add1217082941ca4d9ec

commit 2734f9f70a64d769f122add1217082941ca4d9ec
Author: Christian Biesinger <cbiesinger@chromium.org>
Date: Wed Aug 29 11:27:54 2018

[layoutng] Try to avoid a copy by using emplace_back

R=kojii@chromium.org

Bug: 636993
Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_layout_ng
Change-Id: Idba8c1996227f385628c48cd6fb04bb7f727e8f6
Reviewed-on: https://chromium-review.googlesource.com/1194499
Commit-Queue: Christian Biesinger <cbiesinger@chromium.org>
Commit-Queue: Koji Ishii <kojii@chromium.org>
Reviewed-by: Koji Ishii <kojii@chromium.org>
Cr-Commit-Position: refs/heads/master@{#587076}
[modify] https://crrev.com/2734f9f70a64d769f122add1217082941ca4d9ec/third_party/blink/renderer/core/layout/ng/inline/ng_line_breaker.cc

Comment 413 by kojii@chromium.org, Aug 31

Blockedon: 877977

Comment 414 by bugdroid1@chromium.org, Sep 5

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/82ac52a3f413d383ddfdbad5d3594ddb61d667d3

commit 82ac52a3f413d383ddfdbad5d3594ddb61d667d3
Author: Koji Ishii <kojii@chromium.org>
Date: Tue Sep 04 20:33:42 2018

[LayoutNG] Fix non-nested multiple 'vertical-align: top/bottom'

Following the fix for nested case in r588042 (CL:1198887),
this patch fixes multiple but non-nested 'vertical-align:
top' and 'bottom' applied to one root line box.

In such case, it is required to compute the tallest box
within the line and align 'top' and 'bottom' boxes to the
tallest box.

Bug: 636993
Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_layout_ng
Change-Id: Ifea0cb7a24a85998f26f02fa0edd9ab7cf6edb9c
Reviewed-on: https://chromium-review.googlesource.com/1199386
Commit-Queue: Koji Ishii <kojii@chromium.org>
Reviewed-by: Emil A Eklund <eae@chromium.org>
Cr-Commit-Position: refs/heads/master@{#588637}
[modify] https://crrev.com/82ac52a3f413d383ddfdbad5d3594ddb61d667d3/third_party/WebKit/LayoutTests/FlagExpectations/enable-blink-features=LayoutNG
[modify] https://crrev.com/82ac52a3f413d383ddfdbad5d3594ddb61d667d3/third_party/blink/renderer/core/layout/ng/inline/ng_inline_box_state.cc
[modify] https://crrev.com/82ac52a3f413d383ddfdbad5d3594ddb61d667d3/third_party/blink/renderer/core/layout/ng/inline/ng_inline_box_state.h
[modify] https://crrev.com/82ac52a3f413d383ddfdbad5d3594ddb61d667d3/third_party/blink/renderer/core/layout/ng/inline/ng_line_height_metrics.h

Comment 415 by kojii@chromium.org, Sep 6

Blockedon: 881575

Comment 416 by kojii@chromium.org, Sep 6

Blockedon: 873957

Comment 417 by bugdroid1@chromium.org, Sep 14

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/82dff59bd880e367beddace8e3844f7521ddadec

commit 82dff59bd880e367beddace8e3844f7521ddadec
Author: Koji Ishii <kojii@chromium.org>
Date: Fri Sep 14 17:44:36 2018

Cache (size / units_per_em) in HarfBuzzFontData

SkTypeface::getUnitsPerEm() is not a fast function. This
patch caches (size / units_per_em) in HarfBuzzFontData.

Improves long-line-nowrap.html from 580ms to 547ms (~6%)

Bug: 636993
Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_layout_ng
Change-Id: I4decd9f66e6b99b4798b1c7cc522999bba372aba
Reviewed-on: https://chromium-review.googlesource.com/1226773
Commit-Queue: Emil A Eklund <eae@chromium.org>
Reviewed-by: Emil A Eklund <eae@chromium.org>
Cr-Commit-Position: refs/heads/master@{#591385}
[modify] https://crrev.com/82dff59bd880e367beddace8e3844f7521ddadec/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_face.cc
[modify] https://crrev.com/82dff59bd880e367beddace8e3844f7521ddadec/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_font_cache.h

Comment 418 by bugdroid1@chromium.org, Sep 19

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/62c34e98c3f4bc7ad88aa02569cd55f3c7b8d131

commit 62c34e98c3f4bc7ad88aa02569cd55f3c7b8d131
Author: Xiaocheng Hu <xiaochengh@chromium.org>
Date: Wed Sep 19 01:58:26 2018

[LayoutNG] Re-bridge NG text fragment to dom snapshot

crrev.com/c/1175758 bridged text fragments to dom snapshot inspector,
which was however removed in crrev.com/c/1173717 due to a behavior
change.

This patch bridges them again.

Bug: 636993
Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_layout_ng
Change-Id: If3d224617defd12d7d2fbc6fcda8a70fff2ede16
Reviewed-on: https://chromium-review.googlesource.com/1231927
Reviewed-by: Emil A Eklund <eae@chromium.org>
Reviewed-by: Koji Ishii <kojii@chromium.org>
Commit-Queue: Xiaocheng Hu <xiaochengh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#592302}
[modify] https://crrev.com/62c34e98c3f4bc7ad88aa02569cd55f3c7b8d131/third_party/WebKit/LayoutTests/FlagExpectations/enable-blink-features=LayoutNG
[modify] https://crrev.com/62c34e98c3f4bc7ad88aa02569cd55f3c7b8d131/third_party/blink/renderer/core/inspector/inspector_dom_snapshot_agent.cc

Comment 419 by bugdroid1@chromium.org, Sep 26

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/2d1270f230278e207d8c136348be5d74e41804a3

commit 2d1270f230278e207d8c136348be5d74e41804a3
Author: Koji Ishii <kojii@chromium.org>
Date: Wed Sep 26 18:27:34 2018

[LayoutNG] Fix ::first-line edge case and Inspector getPlatformFonts

This patch fixes:
1. ::first-line style is not applied when there are other
   anonymous inline boxes.
2. Inspector getPlatformFonts protocol collects fonts from
   two levels deep. Changed the logic not to include
   anonymous boxes to the depth limit.

Also the incorrect expectation was fixed; legacy counts
glyphs in ::first-letter twice.

Bug: 636993, 714962
Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_layout_ng
Change-Id: Ia028710b728e8e9172b540a46b42d804c9f57699
Reviewed-on: https://chromium-review.googlesource.com/1245078
Reviewed-by: Xiaocheng Hu <xiaochengh@chromium.org>
Reviewed-by: Emil A Eklund <eae@chromium.org>
Commit-Queue: Emil A Eklund <eae@chromium.org>
Cr-Commit-Position: refs/heads/master@{#594395}
[modify] https://crrev.com/2d1270f230278e207d8c136348be5d74e41804a3/third_party/WebKit/LayoutTests/FlagExpectations/enable-blink-features=LayoutNG
[add] https://crrev.com/2d1270f230278e207d8c136348be5d74e41804a3/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/inspector-protocol/css/css-get-platform-fonts-expected.txt
[modify] https://crrev.com/2d1270f230278e207d8c136348be5d74e41804a3/third_party/blink/renderer/core/inspector/inspector_css_agent.cc
[modify] https://crrev.com/2d1270f230278e207d8c136348be5d74e41804a3/third_party/blink/renderer/core/inspector/inspector_css_agent.h
[modify] https://crrev.com/2d1270f230278e207d8c136348be5d74e41804a3/third_party/blink/renderer/core/layout/layout_block_flow.cc
[modify] https://crrev.com/2d1270f230278e207d8c136348be5d74e41804a3/third_party/blink/renderer/core/layout/layout_inline.cc
[modify] https://crrev.com/2d1270f230278e207d8c136348be5d74e41804a3/third_party/blink/renderer/core/layout/layout_inline.h

Comment 420 by kojii@chromium.org, Sep 28

Blockedon: 889721

Comment 421 by bugdroid1@chromium.org, Oct 4

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/eb9e83064e59eeeb7d2cc2626e0d67c1fb651fb6

commit eb9e83064e59eeeb7d2cc2626e0d67c1fb651fb6
Author: Koji Ishii <kojii@chromium.org>
Date: Thu Oct 04 05:55:09 2018

Add horizontal Japanese long-content perf test

We have vertical-japanese-kokoro-insert.html to test Japanese
content in vertical flow, but not for horizontal flow.

In order to test the performance of CJK text and vertical
flow separately, this patch adds the horizontal flow version
of the test.

Bug: 636993
Change-Id: Iac256490d6c52e89f6396da61a581752184b3575
Reviewed-on: https://chromium-review.googlesource.com/c/1253165
Reviewed-by: Emil A Eklund <eae@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Koji Ishii <kojii@chromium.org>
Cr-Commit-Position: refs/heads/master@{#596518}
[add] https://crrev.com/eb9e83064e59eeeb7d2cc2626e0d67c1fb651fb6/third_party/blink/perf_tests/layout/japanese-kokoro-insert.html

Comment 422 by bugdroid1@chromium.org, Oct 4

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/5fdd4523d6af32ac6ac114f005a0669546494708

commit 5fdd4523d6af32ac6ac114f005a0669546494708
Author: Koji Ishii <kojii@chromium.org>
Date: Thu Oct 04 13:14:45 2018

[LayoutNG] Properly reset text metrics for new line in quirks mode

When lines are wrapped, line-height quirks mode requires each
line not to have a strut by default. LayoutNG does this by
resetting |text_metrics|, but it forgot to reset |text_top|
and |text_height|, two derived variables from |text_metrics|.

This results in slightly different geometry for LayoutBR
when the layout was paused and restarted from a break token
(such as reusing unchanged lineboxes or an inline formatting
context was fragmented) from when we layout from top to bottom.

This patch properly resets these values so that the layout
result is consistent in such cases. Also the changes match
better to legacy.

Bug: 636993
Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_layout_ng
Change-Id: I76cdb57daf68833639fc454862af1e296a89d4cd
Reviewed-on: https://chromium-review.googlesource.com/c/1260743
Reviewed-by: Morten Stenshorne <mstensho@chromium.org>
Commit-Queue: Koji Ishii <kojii@chromium.org>
Cr-Commit-Position: refs/heads/master@{#596642}
[modify] https://crrev.com/5fdd4523d6af32ac6ac114f005a0669546494708/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/dom/HTMLElement/bdo-expected.txt
[modify] https://crrev.com/5fdd4523d6af32ac6ac114f005a0669546494708/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/control-restrict-line-height-expected.txt
[modify] https://crrev.com/5fdd4523d6af32ac6ac114f005a0669546494708/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/negativeLineHeight-expected.txt
[modify] https://crrev.com/5fdd4523d6af32ac6ac114f005a0669546494708/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/select/menulist-narrow-width-expected.txt
[modify] https://crrev.com/5fdd4523d6af32ac6ac114f005a0669546494708/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/select/select-style-expected.txt
[modify] https://crrev.com/5fdd4523d6af32ac6ac114f005a0669546494708/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/text/input-appearance-bkcolor-expected.txt
[modify] https://crrev.com/5fdd4523d6af32ac6ac114f005a0669546494708/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/text/input-appearance-width-expected.txt
[modify] https://crrev.com/5fdd4523d6af32ac6ac114f005a0669546494708/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/forms/textarea/textarea-scrolled-type-expected.txt
[modify] https://crrev.com/5fdd4523d6af32ac6ac114f005a0669546494708/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/frames/onlyCommentInIFrame-expected.txt
[modify] https://crrev.com/5fdd4523d6af32ac6ac114f005a0669546494708/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/media/audio-controls-rendering-expected.txt
[modify] https://crrev.com/5fdd4523d6af32ac6ac114f005a0669546494708/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/virtual/video-surface-layer/media/audio-controls-rendering-expected.txt
[modify] https://crrev.com/5fdd4523d6af32ac6ac114f005a0669546494708/third_party/blink/renderer/core/layout/ng/inline/ng_inline_box_state.cc
[modify] https://crrev.com/5fdd4523d6af32ac6ac114f005a0669546494708/third_party/blink/renderer/core/layout/ng/inline/ng_inline_box_state.h

Comment 423 by bugdroid1@chromium.org, Oct 7

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/50326d70bed86d08b6d1095831267cb37519a57e

commit 50326d70bed86d08b6d1095831267cb37519a57e
Author: Koji Ishii <kojii@chromium.org>
Date: Sun Oct 07 15:01:54 2018

[LayoutNG] Add break opportunity after leading spaces

This patch adds a break opportunity after leading spaces,
when spaces are not collapsed (i.e., pre-wrap).

[CSS Text] says "a soft wrap opportunity exists at the end
of the sequence of preserved spaces." ICU line breaker does
this, but our LazyLineBreakIterator breaks before spaces for
an optimization, and that the break opportunity before
leading spaces is lost.

3 other browsers do this, and Blink recently fixed this in
http://crrev.com/c/1209745.

[CSS Text]: https://drafts.csswg.org/css-text-3/#white-space-phase-1

Bug: 854624, 636993
Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_layout_ng
Change-Id: Ie5dfe9cdba291782684ae3f554673c4914a7a178
Reviewed-on: https://chromium-review.googlesource.com/c/1264341
Commit-Queue: Koji Ishii <kojii@chromium.org>
Reviewed-by: Emil A Eklund <eae@chromium.org>
Cr-Commit-Position: refs/heads/master@{#597462}
[modify] https://crrev.com/50326d70bed86d08b6d1095831267cb37519a57e/third_party/WebKit/LayoutTests/FlagExpectations/enable-blink-features=LayoutNG
[modify] https://crrev.com/50326d70bed86d08b6d1095831267cb37519a57e/third_party/blink/renderer/core/layout/ng/inline/ng_inline_item.cc
[modify] https://crrev.com/50326d70bed86d08b6d1095831267cb37519a57e/third_party/blink/renderer/core/layout/ng/inline/ng_inline_item.h
[modify] https://crrev.com/50326d70bed86d08b6d1095831267cb37519a57e/third_party/blink/renderer/core/layout/ng/inline/ng_inline_items_builder.cc
[modify] https://crrev.com/50326d70bed86d08b6d1095831267cb37519a57e/third_party/blink/renderer/core/layout/ng/inline/ng_inline_items_builder.h
[modify] https://crrev.com/50326d70bed86d08b6d1095831267cb37519a57e/third_party/blink/renderer/core/layout/ng/inline/ng_inline_items_builder_test.cc
[modify] https://crrev.com/50326d70bed86d08b6d1095831267cb37519a57e/third_party/blink/renderer/core/layout/ng/inline/ng_inline_layout_algorithm.cc

Comment 424 by bugdroid1@chromium.org, Oct 9

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/209909630cf94d4568bc62157053bae5791908eb

commit 209909630cf94d4568bc62157053bae5791908eb
Author: Koji Ishii <kojii@chromium.org>
Date: Tue Oct 09 11:01:14 2018

Revert "Improve performance of PreviousBreakOpportunity"

This reverts commit 99d504fd35a7e07c4cf16bbbe1464044e2195b4e.

Reason for revert:

crbug.com/883963 bisected to this CL. I'm not sure how this
affects print preview, reverting to see the effect.

This revert may affect LayoutNG performance, but should not
affect the currently shipping line breaker.

Original change's description:
> Improve performance of PreviousBreakOpportunity
>
> In the current layout engine, PreviousBreakOpportunity is used
> only when mid-word break (break-all or break-word), but it is
> much more heavily used in LayoutNG.
>
> LazyLineBreakIterator is designed for forward only.
> PreviousBreakOpportunity is implemented by repeatedly calling
> NextBreakablePosition, but since NextBreakablePosition look
> for the next break opportunity until the end of the string,
> when a very long word without break opportunity is given,
> PreviousBreakOpportunity is O(n!).
>
> This patch changes it to O(n) by limiting the end position
> NextBreakablePosition can look for.
>
> blink/perf_tests/layout/word-break-break-word.html consumes
> 78% of the total time in LayoutNG. The average run is:
>   Current engine:    469ms
>   LayoutNG:       26,644ms
>   This patch:      2,250ms
>
> It's still 4-5 times slower, more improvements will be in
> following patches.
>
> Bug: 636993
> Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_layout_ng
> Change-Id: I814e2c45c8030aa682c7f5e3a3b785b3c0733c84
> Reviewed-on: https://chromium-review.googlesource.com/1095894
> Commit-Queue: Koji Ishii <kojii@chromium.org>
> Reviewed-by: Emil A Eklund <eae@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#567133}

TBR=eae@chromium.org,kojii@chromium.org

Bug: 636993, 883963
Change-Id: I2c453a011208b014e342d7b44646eb90b5b7bbd2
Reviewed-on: https://chromium-review.googlesource.com/c/1270396
Commit-Queue: Koji Ishii <kojii@chromium.org>
Reviewed-by: Koji Ishii <kojii@chromium.org>
Cr-Commit-Position: refs/heads/master@{#597876}
[modify] https://crrev.com/209909630cf94d4568bc62157053bae5791908eb/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/text/midword-break-before-surrogate-pair-expected.png
[modify] https://crrev.com/209909630cf94d4568bc62157053bae5791908eb/third_party/blink/renderer/platform/text/text_break_iterator.cc
[modify] https://crrev.com/209909630cf94d4568bc62157053bae5791908eb/third_party/blink/renderer/platform/text/text_break_iterator.h

Comment 425 by bugdroid1@chromium.org, Oct 9

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/e9b36c2c7c55eeafcea1f71ee1217dff00248ede

commit e9b36c2c7c55eeafcea1f71ee1217dff00248ede
Author: Koji Ishii <kojii@chromium.org>
Date: Tue Oct 09 19:57:40 2018

[LayoutNG] Check box states in context matches to rebuilt one

From the review comment in r597459 (crrev.com/c/1258810),
this patch adds more complete (but not all) check for the
box states in NGInlineChildLayoutContext matches to the one
NGInlineLayoutAlgorithm rebuilds from scratch.

* One minor failure for |has_start_edge| is fixed in this CL.
  The diff does not affect the layout result today because it
  is used only when |needs_box_fragment| is set today, but is
  better to match.
* |needs_box_fragment| sometimes does not match. This needs
  larger fix that deferred to following patch.
* Other failures were problems in the check code. Fixed in
  this CL.

Bug: 636993
Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_layout_ng
Change-Id: I76d0c91c65e38c0135ec3fca91e716cac3937796
Reviewed-on: https://chromium-review.googlesource.com/c/1269727
Commit-Queue: Koji Ishii <kojii@chromium.org>
Reviewed-by: Morten Stenshorne <mstensho@chromium.org>
Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#598051}
[modify] https://crrev.com/e9b36c2c7c55eeafcea1f71ee1217dff00248ede/third_party/blink/renderer/core/layout/ng/inline/ng_inline_box_state.cc
[modify] https://crrev.com/e9b36c2c7c55eeafcea1f71ee1217dff00248ede/third_party/blink/renderer/core/layout/ng/inline/ng_inline_box_state.h
[modify] https://crrev.com/e9b36c2c7c55eeafcea1f71ee1217dff00248ede/third_party/blink/renderer/core/layout/ng/inline/ng_inline_layout_algorithm.cc
[modify] https://crrev.com/e9b36c2c7c55eeafcea1f71ee1217dff00248ede/third_party/blink/renderer/core/layout/ng/inline/ng_inline_layout_algorithm.h

Comment 426 by bugdroid1@chromium.org, Oct 10

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/7561162385945b6d42cee97ae3ebfdaa388f5950

commit 7561162385945b6d42cee97ae3ebfdaa388f5950
Author: Xiaocheng Hu <xiaochengh@chromium.org>
Date: Wed Oct 10 19:29:09 2018

[LayoutNG] Report the correct text box info for dom snapshot

Current LayoutNG implementation of LayoutText::GetTextBoxInfo() simply
dumps text fragment info, which does not necessary match the legacy text
box info expected by the API.

This patch adds the missing parts:

- Legacy text boxes are broken at collapsed whitespaces but NG fragments
  are not. This patch uses NGOffsetMapping to help break the fragment at
  collapsed whitespaces.

- Legacy text boxes' start offset references the LayoutText::GetText()
  string. This patch converts the fragments' start offsets back onto
  the LayoutText string.

Bug: 636993
Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_layout_ng
Change-Id: Ib28f2a2382930ae5c1d1de7e85ea771ca19037cc
Reviewed-on: https://chromium-review.googlesource.com/c/1274051
Reviewed-by: Emil A Eklund <eae@chromium.org>
Commit-Queue: Xiaocheng Hu <xiaochengh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#598451}
[modify] https://crrev.com/7561162385945b6d42cee97ae3ebfdaa388f5950/third_party/WebKit/LayoutTests/FlagExpectations/enable-blink-features=LayoutNG
[modify] https://crrev.com/7561162385945b6d42cee97ae3ebfdaa388f5950/third_party/blink/renderer/core/layout/layout_text.cc
[modify] https://crrev.com/7561162385945b6d42cee97ae3ebfdaa388f5950/third_party/blink/renderer/core/layout/ng/inline/ng_offset_mapping.cc
[modify] https://crrev.com/7561162385945b6d42cee97ae3ebfdaa388f5950/third_party/blink/renderer/core/layout/ng/inline/ng_offset_mapping.h

Comment 427 by bugdroid1@chromium.org, Oct 11

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/786b1994bf6f43f2ff038894a1891435f2de22b9

commit 786b1994bf6f43f2ff038894a1891435f2de22b9
Author: Koji Ishii <kojii@chromium.org>
Date: Thu Oct 11 14:22:14 2018

Reland "Improve performance of PreviousBreakOpportunity"

This reverts commit 209909630cf94d4568bc62157053bae5791908eb.

Reason for revert: The revert did not fix crbug.com/883963.
Requested to re-run bisect.

Original change's description:
> Revert "Improve performance of PreviousBreakOpportunity"
> 
> This reverts commit 99d504fd35a7e07c4cf16bbbe1464044e2195b4e.
> 
> Reason for revert:
> 
> crbug.com/883963 bisected to this CL. I'm not sure how this
> affects print preview, reverting to see the effect.
> 
> This revert may affect LayoutNG performance, but should not
> affect the currently shipping line breaker.
> 
> Original change's description:
> > Improve performance of PreviousBreakOpportunity
> >
> > In the current layout engine, PreviousBreakOpportunity is used
> > only when mid-word break (break-all or break-word), but it is
> > much more heavily used in LayoutNG.
> >
> > LazyLineBreakIterator is designed for forward only.
> > PreviousBreakOpportunity is implemented by repeatedly calling
> > NextBreakablePosition, but since NextBreakablePosition look
> > for the next break opportunity until the end of the string,
> > when a very long word without break opportunity is given,
> > PreviousBreakOpportunity is O(n!).
> >
> > This patch changes it to O(n) by limiting the end position
> > NextBreakablePosition can look for.
> >
> > blink/perf_tests/layout/word-break-break-word.html consumes
> > 78% of the total time in LayoutNG. The average run is:
> >   Current engine:    469ms
> >   LayoutNG:       26,644ms
> >   This patch:      2,250ms
> >
> > It's still 4-5 times slower, more improvements will be in
> > following patches.
> >
> > Bug: 636993
> > Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_layout_ng
> > Change-Id: I814e2c45c8030aa682c7f5e3a3b785b3c0733c84
> > Reviewed-on: https://chromium-review.googlesource.com/1095894
> > Commit-Queue: Koji Ishii <kojii@chromium.org>
> > Reviewed-by: Emil A Eklund <eae@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#567133}
> 
> TBR=eae@chromium.org,kojii@chromium.org
> 
> Bug: 636993, 883963
> Change-Id: I2c453a011208b014e342d7b44646eb90b5b7bbd2
> Reviewed-on: https://chromium-review.googlesource.com/c/1270396
> Commit-Queue: Koji Ishii <kojii@chromium.org>
> Reviewed-by: Koji Ishii <kojii@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#597876}

TBR=eae@chromium.org,kojii@chromium.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: 636993, 883963
Change-Id: I8e9881deca736c5b574dc287d04f9c2fffe76680
Reviewed-on: https://chromium-review.googlesource.com/c/1275985
Reviewed-by: Koji Ishii <kojii@chromium.org>
Commit-Queue: Koji Ishii <kojii@chromium.org>
Cr-Commit-Position: refs/heads/master@{#598754}
[modify] https://crrev.com/786b1994bf6f43f2ff038894a1891435f2de22b9/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/text/midword-break-before-surrogate-pair-expected.png
[modify] https://crrev.com/786b1994bf6f43f2ff038894a1891435f2de22b9/third_party/blink/renderer/platform/text/text_break_iterator.cc
[modify] https://crrev.com/786b1994bf6f43f2ff038894a1891435f2de22b9/third_party/blink/renderer/platform/text/text_break_iterator.h

Comment 428 by bugdroid1@chromium.org, Oct 11

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/53b7b137cab2bd296298b249067fdd4f76a337bb

commit 53b7b137cab2bd296298b249067fdd4f76a337bb
Author: Koji Ishii <kojii@chromium.org>
Date: Thu Oct 11 21:17:02 2018

[LayoutNG] Fix RebuildBoxStates to compute needs_box_fragment

This patch fixes RebuildBoxStates to compute
|needs_box_fragment| correctly.

|needs_box_fragment| was not computed correctly because
child boxes can set it when NGInlineLayoutAlgorithm handles
open/close tags.

This patch moves the logic to NGInlineItemsBuilder so that
|needs_box_fragment| is computed during PrepareLayout.

Bug: 636993
Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_layout_ng
Change-Id: I635dcbed0939e5f23a9f6afb8ee6b22c48ab7da0
Reviewed-on: https://chromium-review.googlesource.com/c/1271655
Commit-Queue: Koji Ishii <kojii@chromium.org>
Reviewed-by: Emil A Eklund <eae@chromium.org>
Reviewed-by: Xiaocheng Hu <xiaochengh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#598942}
[add] https://crrev.com/53b7b137cab2bd296298b249067fdd4f76a337bb/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/css-generated-content/after-duplicated-after-split-expected.txt
[modify] https://crrev.com/53b7b137cab2bd296298b249067fdd4f76a337bb/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/css/text-overflow-ellipsis-expected.txt
[modify] https://crrev.com/53b7b137cab2bd296298b249067fdd4f76a337bb/third_party/blink/renderer/core/layout/ng/inline/ng_inline_box_state.cc
[modify] https://crrev.com/53b7b137cab2bd296298b249067fdd4f76a337bb/third_party/blink/renderer/core/layout/ng/inline/ng_inline_box_state.h
[modify] https://crrev.com/53b7b137cab2bd296298b249067fdd4f76a337bb/third_party/blink/renderer/core/layout/ng/inline/ng_inline_item.h
[modify] https://crrev.com/53b7b137cab2bd296298b249067fdd4f76a337bb/third_party/blink/renderer/core/layout/ng/inline/ng_inline_items_builder.cc
[modify] https://crrev.com/53b7b137cab2bd296298b249067fdd4f76a337bb/third_party/blink/renderer/core/layout/ng/inline/ng_inline_items_builder.h
[modify] https://crrev.com/53b7b137cab2bd296298b249067fdd4f76a337bb/third_party/blink/renderer/core/layout/ng/inline/ng_inline_items_builder_test.cc
[modify] https://crrev.com/53b7b137cab2bd296298b249067fdd4f76a337bb/third_party/blink/renderer/core/layout/ng/inline/ng_inline_layout_algorithm.cc

Comment 429 by bugdroid1@chromium.org, Oct 16

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/a6d85b5a6beb8bfcb6fa9fd7ff27cb173b86d740

commit a6d85b5a6beb8bfcb6fa9fd7ff27cb173b86d740
Author: Koji Ishii <kojii@chromium.org>
Date: Tue Oct 16 05:56:29 2018

[LayoutNG] Fix MarkLineBoxesDirtyFor for form controls

This patch fixes |MarkLineBoxesDirtyFor()| when the object is
an atomic inline that is not LayoutNGBlockFlow; e.g., form
controls.

It fails because |EnclosingNGBlockFlow()| returns itself if
the given object is LayoutBox, and if the atomic inline is
in legacy, it returns nullptr.

This problem keeps occuring, and there are two fixes done
independently. To avoid this happening again, this patch
also removes |EnclosingNGBlockFlow()| and add
|ContainingNGBlockFlow()| instead.

Bug: 636993
Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_layout_ng;luci.chromium.try:linux_layout_tests_slimming_paint_v2;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: Ia01a197697b1d4b3da3efde18154e33ece289529
Reviewed-on: https://chromium-review.googlesource.com/c/1278667
Commit-Queue: Koji Ishii <kojii@chromium.org>
Reviewed-by: Yoichi Osato <yoichio@chromium.org>
Reviewed-by: Dominic Mazzoni <dmazzoni@chromium.org>
Reviewed-by: Emil A Eklund <eae@chromium.org>
Reviewed-by: Xiaocheng Hu <xiaochengh@chromium.org>
Reviewed-by: Yoshifumi Inoue <yosin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#599876}
[modify] https://crrev.com/a6d85b5a6beb8bfcb6fa9fd7ff27cb173b86d740/third_party/blink/renderer/core/editing/layout_selection.cc
[modify] https://crrev.com/a6d85b5a6beb8bfcb6fa9fd7ff27cb173b86d740/third_party/blink/renderer/core/editing/layout_selection_test.cc
[modify] https://crrev.com/a6d85b5a6beb8bfcb6fa9fd7ff27cb173b86d740/third_party/blink/renderer/core/html/forms/text_control_element.cc
[modify] https://crrev.com/a6d85b5a6beb8bfcb6fa9fd7ff27cb173b86d740/third_party/blink/renderer/core/layout/layout_inline.cc
[modify] https://crrev.com/a6d85b5a6beb8bfcb6fa9fd7ff27cb173b86d740/third_party/blink/renderer/core/layout/layout_object.cc
[modify] https://crrev.com/a6d85b5a6beb8bfcb6fa9fd7ff27cb173b86d740/third_party/blink/renderer/core/layout/layout_object.h
[modify] https://crrev.com/a6d85b5a6beb8bfcb6fa9fd7ff27cb173b86d740/third_party/blink/renderer/core/layout/layout_text.cc
[modify] https://crrev.com/a6d85b5a6beb8bfcb6fa9fd7ff27cb173b86d740/third_party/blink/renderer/core/layout/layout_tree_as_text.cc
[modify] https://crrev.com/a6d85b5a6beb8bfcb6fa9fd7ff27cb173b86d740/third_party/blink/renderer/core/layout/line/inline_box.cc
[modify] https://crrev.com/a6d85b5a6beb8bfcb6fa9fd7ff27cb173b86d740/third_party/blink/renderer/core/layout/ng/inline/ng_caret_position.cc
[modify] https://crrev.com/a6d85b5a6beb8bfcb6fa9fd7ff27cb173b86d740/third_party/blink/renderer/core/layout/ng/inline/ng_caret_rect.cc
[modify] https://crrev.com/a6d85b5a6beb8bfcb6fa9fd7ff27cb173b86d740/third_party/blink/renderer/core/layout/ng/inline/ng_offset_mapping.cc
[modify] https://crrev.com/a6d85b5a6beb8bfcb6fa9fd7ff27cb173b86d740/third_party/blink/renderer/core/layout/ng/inline/ng_offset_mapping.h
[modify] https://crrev.com/a6d85b5a6beb8bfcb6fa9fd7ff27cb173b86d740/third_party/blink/renderer/core/layout/ng/ng_physical_fragment.cc
[modify] https://crrev.com/a6d85b5a6beb8bfcb6fa9fd7ff27cb173b86d740/third_party/blink/renderer/core/paint/inline_painter.cc
[modify] https://crrev.com/a6d85b5a6beb8bfcb6fa9fd7ff27cb173b86d740/third_party/blink/renderer/core/paint/ng/ng_paint_fragment.cc
[modify] https://crrev.com/a6d85b5a6beb8bfcb6fa9fd7ff27cb173b86d740/third_party/blink/renderer/modules/accessibility/ax_layout_object.cc

Comment 430 by bugdroid1@chromium.org, Oct 17

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/791638232d533b1c09c26b6b753726e05c9c49b2

commit 791638232d533b1c09c26b6b753726e05c9c49b2
Author: Koji Ishii <kojii@chromium.org>
Date: Wed Oct 17 08:41:21 2018

[LayoutNG] Fix MarkLineBoxesDirtyFor for inline blocks

This patch fixes MarkLineBoxesDirtyFor to stop at inline block
when it looks for the inline ancestor chain.

When looking for line boxes to mark dirty, it should not cross
an inline formatting context boundary.

Bug: 636993
Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_layout_ng;luci.chromium.try:linux_layout_tests_slimming_paint_v2;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: Ic89a3ea8ea31cb4d0d6ddd3ef224872c0b8b140e
Reviewed-on: https://chromium-review.googlesource.com/c/1286096
Reviewed-by: Yoshifumi Inoue <yosin@chromium.org>
Commit-Queue: Koji Ishii <kojii@chromium.org>
Cr-Commit-Position: refs/heads/master@{#600318}
[modify] https://crrev.com/791638232d533b1c09c26b6b753726e05c9c49b2/third_party/blink/renderer/core/paint/ng/ng_paint_fragment.cc
[modify] https://crrev.com/791638232d533b1c09c26b6b753726e05c9c49b2/third_party/blink/renderer/core/paint/ng/ng_paint_fragment_test.cc

Comment 431 by bugdroid1@chromium.org, Oct 18

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/63caa5dd5da1a8717b6e357f0619b189be2fd13c

commit 63caa5dd5da1a8717b6e357f0619b189be2fd13c
Author: Koji Ishii <kojii@chromium.org>
Date: Thu Oct 18 16:49:48 2018

[LayoutNG] Simplify NGPaintFragment::DirtyLinesFromChangedChild

This patch simplifies DirtyLinesFromChangedChild in that:
1. Clearing FirstInlineFragment for all descendants do not
   seem necessary any longer. It turned out that this makes
   reusing line boxes harder, and not doing so doesn't fail
   any tests.
2. MarkLineBoxesDirtyFor checks PaintFragment, so checking
   here does not seem necessary. Not checking can avoid
   traversing to its containing block.

Bug: 636993
Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_layout_ng;luci.chromium.try:linux_layout_tests_slimming_paint_v2;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I4d485f47731355c88a554d18843c3722f822e89a
Reviewed-on: https://chromium-review.googlesource.com/c/1288174
Commit-Queue: Koji Ishii <kojii@chromium.org>
Reviewed-by: Yoshifumi Inoue <yosin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#600797}
[modify] https://crrev.com/63caa5dd5da1a8717b6e357f0619b189be2fd13c/third_party/blink/renderer/core/paint/ng/ng_paint_fragment.cc

Comment 432 by bugdroid1@chromium.org, Oct 18

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/0971bd8b0584803154a71eaaee2d87b0c8dc0454

commit 0971bd8b0584803154a71eaaee2d87b0c8dc0454
Author: Koji Ishii <kojii@chromium.org>
Date: Thu Oct 18 23:51:04 2018

[LayoutNG] Mark first line box dirty only when it exists

When marking the first line box dirty, this patch checks
if the line box exists.

Normally NGBlockLayoutAlgorithm suppresses box fragment
if no line boxes exist. However, NGColumnLayoutAlgorithm
may generate box fragments for column boxes.

Bug: 636993
Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_layout_ng;luci.chromium.try:linux_layout_tests_slimming_paint_v2;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: Ie5697a524cd6fc1067fc4c03466e88fa8d5da68b
Reviewed-on: https://chromium-review.googlesource.com/c/1288769
Reviewed-by: Emil A Eklund <eae@chromium.org>
Commit-Queue: Koji Ishii <kojii@chromium.org>
Cr-Commit-Position: refs/heads/master@{#600969}
[modify] https://crrev.com/0971bd8b0584803154a71eaaee2d87b0c8dc0454/third_party/blink/renderer/core/paint/ng/ng_paint_fragment.cc

Comment 433 by bugdroid1@chromium.org, Oct 25

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/81f68c22d6ccd816b73eb04a3d3a2fd85ddc3887

commit 81f68c22d6ccd816b73eb04a3d3a2fd85ddc3887
Author: Koji Ishii <kojii@chromium.org>
Date: Thu Oct 25 07:49:56 2018

[LayoutNG] Fix excessive MarkLineBoxes when line wraps

This patch fixes to mark only the last line when we need to
mark the previous LayoutObject of changed object, and it
wraps.

Also uses bitfields to skip unnnecessary calls to
FirstInlineFragment() under some conditions.

Bug: 636993
Change-Id: I11471477825c1b8fb1867e5b7b654d695f332b3a
Reviewed-on: https://chromium-review.googlesource.com/c/1290710
Reviewed-by: Yoshifumi Inoue <yosin@chromium.org>
Reviewed-by: Emil A Eklund <eae@chromium.org>
Commit-Queue: Emil A Eklund <eae@chromium.org>
Cr-Commit-Position: refs/heads/master@{#602637}
[modify] https://crrev.com/81f68c22d6ccd816b73eb04a3d3a2fd85ddc3887/third_party/blink/renderer/core/layout/layout_text.cc
[modify] https://crrev.com/81f68c22d6ccd816b73eb04a3d3a2fd85ddc3887/third_party/blink/renderer/core/paint/ng/ng_paint_fragment.cc
[modify] https://crrev.com/81f68c22d6ccd816b73eb04a3d3a2fd85ddc3887/third_party/blink/renderer/core/paint/ng/ng_paint_fragment.h
[modify] https://crrev.com/81f68c22d6ccd816b73eb04a3d3a2fd85ddc3887/third_party/blink/renderer/core/paint/ng/ng_paint_fragment_test.cc

Comment 434 by bugdroid1@chromium.org, Oct 26

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/221ff95e64323805f12ea7a9221bcc5f00569a4e

commit 221ff95e64323805f12ea7a9221bcc5f00569a4e
Author: Koji Ishii <kojii@chromium.org>
Date: Fri Oct 26 10:44:31 2018

[LayoutNG] Rebaseline fast/writing-mode/border-image-vertical-lr.html

fast/writing-mode/border-image-vertical-lr.html produces
different results because, in legacy, block direction borders
applied to inline boxes affect positioning of the line box in
vertical-lr writing-mode, when they should not.

This patch rebaselines it, and also adds a minimized test to
check such borders do not affect line box positioning.

Gecko, and WebKit fail the test. Edge passes this test,
though it paints the border at the incorrect position.
Testing the border positoin is not ref-testable and that it
is not included.

Bug: 636993
Change-Id: I2568d19dac7f7ea886a46d45620bc22feb172c53
Reviewed-on: https://chromium-review.googlesource.com/c/1301698
Reviewed-by: Emil A Eklund <eae@chromium.org>
Commit-Queue: Emil A Eklund <eae@chromium.org>
Cr-Commit-Position: refs/heads/master@{#603051}
[modify] https://crrev.com/221ff95e64323805f12ea7a9221bcc5f00569a4e/third_party/WebKit/LayoutTests/FlagExpectations/enable-blink-features=LayoutNG
[modify] https://crrev.com/221ff95e64323805f12ea7a9221bcc5f00569a4e/third_party/WebKit/LayoutTests/TestExpectations
[add] https://crrev.com/221ff95e64323805f12ea7a9221bcc5f00569a4e/third_party/WebKit/LayoutTests/external/wpt/css/css-writing-modes/inline-box-border-vlr-001.html
[add] https://crrev.com/221ff95e64323805f12ea7a9221bcc5f00569a4e/third_party/WebKit/LayoutTests/external/wpt/css/css-writing-modes/reference/inline-box-border-vlr-001.html
[add] https://crrev.com/221ff95e64323805f12ea7a9221bcc5f00569a4e/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/writing-mode/border-image-vertical-lr-expected.png

Comment 435 by bugdroid1@chromium.org, Oct 29

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/1ea65ada8a5f6e6cff645aa38e97cbbcaf2d0de0

commit 1ea65ada8a5f6e6cff645aa38e97cbbcaf2d0de0
Author: Koji Ishii <kojii@chromium.org>
Date: Mon Oct 29 21:58:13 2018

[LayoutNG] Fix line-height quirks for atomic inline

This patch fixes line-height quirks mode to include strut
for close tags only when the end-side of the inline box is
not empty. It used to include when |needs_box_fragment|,
which is set under many more conditions.

Normally, when the emptiness (and thus the strut) matters,
open and close are in the same line. <span><br></span> or
<span><div></div></span> can make this situation.

It involved two more changes:
1. NGInlineItem.IsEmptyItem is used to determine the block
   emptiness, while NGLineBreaker had another code to
   determine line emptiness, using slightly different
   conditions. The two logics were merged, stored in
   NGInlineItem.
2. It revealed a problem in 'vertical-align' where it does
   not include inline boxes for 'top' and 'bottom' align.
   This is fixed in this CL.

Bug: 636993
Change-Id: I2d609580c96371e702dd365737e8d704b0fcccd8
Reviewed-on: https://chromium-review.googlesource.com/c/1302173
Reviewed-by: Emil A Eklund <eae@chromium.org>
Commit-Queue: Emil A Eklund <eae@chromium.org>
Cr-Commit-Position: refs/heads/master@{#603642}
[modify] https://crrev.com/1ea65ada8a5f6e6cff645aa38e97cbbcaf2d0de0/third_party/WebKit/LayoutTests/FlagExpectations/enable-blink-features=LayoutNG
[modify] https://crrev.com/1ea65ada8a5f6e6cff645aa38e97cbbcaf2d0de0/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/encoding/utf-16-big-endian-expected.png
[modify] https://crrev.com/1ea65ada8a5f6e6cff645aa38e97cbbcaf2d0de0/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/encoding/utf-16-little-endian-expected.png
[modify] https://crrev.com/1ea65ada8a5f6e6cff645aa38e97cbbcaf2d0de0/third_party/blink/renderer/core/layout/ng/inline/ng_inline_box_state.cc
[modify] https://crrev.com/1ea65ada8a5f6e6cff645aa38e97cbbcaf2d0de0/third_party/blink/renderer/core/layout/ng/inline/ng_inline_box_state.h
[modify] https://crrev.com/1ea65ada8a5f6e6cff645aa38e97cbbcaf2d0de0/third_party/blink/renderer/core/layout/ng/inline/ng_inline_item.cc
[modify] https://crrev.com/1ea65ada8a5f6e6cff645aa38e97cbbcaf2d0de0/third_party/blink/renderer/core/layout/ng/inline/ng_inline_layout_algorithm.cc
[modify] https://crrev.com/1ea65ada8a5f6e6cff645aa38e97cbbcaf2d0de0/third_party/blink/renderer/core/layout/ng/inline/ng_inline_layout_algorithm.h
[modify] https://crrev.com/1ea65ada8a5f6e6cff645aa38e97cbbcaf2d0de0/third_party/blink/renderer/core/layout/ng/inline/ng_line_box_fragment_builder.h
[modify] https://crrev.com/1ea65ada8a5f6e6cff645aa38e97cbbcaf2d0de0/third_party/blink/renderer/core/layout/ng/inline/ng_line_breaker.cc
[modify] https://crrev.com/1ea65ada8a5f6e6cff645aa38e97cbbcaf2d0de0/third_party/blink/renderer/core/style/border_value.h

Comment 436 by bugdroid1@chromium.org, Oct 30

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/c0ebd8f1443a2876284f0253bc9f00baaaa273fc

commit c0ebd8f1443a2876284f0253bc9f00baaaa273fc
Author: Koji Ishii <kojii@chromium.org>
Date: Tue Oct 30 13:54:37 2018

[LayoutNG] Fix inline boxes when the first child has left margin

This patch fixes the left edge of inline boxes when its first
child is an atomic inline that has left margin. Inline boxes
without children are handled in the same way and that this
patch fixes them too.

NGInlineLayoutAlgorithm uses left margin when it computes the
border box of children. However, when creating boxes that wrap
such child, margin edge is needed.

Bug: 895611, 636993
Change-Id: I4ffb67b5903a1f0ef90c1da741f1a3a33aa9c1af
Reviewed-on: https://chromium-review.googlesource.com/c/1306968
Reviewed-by: Emil A Eklund <eae@chromium.org>
Commit-Queue: Emil A Eklund <eae@chromium.org>
Cr-Commit-Position: refs/heads/master@{#603883}
[modify] https://crrev.com/c0ebd8f1443a2876284f0253bc9f00baaaa273fc/third_party/WebKit/LayoutTests/FlagExpectations/enable-blink-features=LayoutNG
[modify] https://crrev.com/c0ebd8f1443a2876284f0253bc9f00baaaa273fc/third_party/blink/renderer/core/layout/ng/inline/ng_inline_box_state.cc
[modify] https://crrev.com/c0ebd8f1443a2876284f0253bc9f00baaaa273fc/third_party/blink/renderer/core/layout/ng/inline/ng_line_box_fragment_builder.h

Comment 437 by bugdroid1@chromium.org, Oct 30

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/f18b69ab717bad8e8fd760f2adfa133c3a77a58c

commit f18b69ab717bad8e8fd760f2adfa133c3a77a58c
Author: Koji Ishii <kojii@chromium.org>
Date: Tue Oct 30 21:50:56 2018

[LayoutNG] Skip BiDi reordering when not needed

When fragment-based BiDi reordering was implemented in
r524977 (CL:827043), we chose to run the reordering to ensure
more test coverage of the code.

As the code is now stabilized, change to run BiDi reordering
only when needed.

|ComputeInlinePositions()| can be optimized further by
computing positions as NGInlineLayoutAlgorithm adds children,
but it diverges RTL code further. We may consider it in
future if needed.

Bug: 636993
Change-Id: Ie7e2a365e50618678b4e08b176bf27e99a37cecf
Reviewed-on: https://chromium-review.googlesource.com/c/1306948
Reviewed-by: Emil A Eklund <eae@chromium.org>
Commit-Queue: Emil A Eklund <eae@chromium.org>
Cr-Commit-Position: refs/heads/master@{#604030}
[modify] https://crrev.com/f18b69ab717bad8e8fd760f2adfa133c3a77a58c/third_party/blink/renderer/core/layout/ng/inline/ng_inline_box_state.cc
[modify] https://crrev.com/f18b69ab717bad8e8fd760f2adfa133c3a77a58c/third_party/blink/renderer/core/layout/ng/inline/ng_inline_layout_algorithm.cc

Comment 438 by bugdroid1@chromium.org, Oct 31

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/e3eddb5b598fa1d4a3b2e8989be77fbabdb1fffb

commit e3eddb5b598fa1d4a3b2e8989be77fbabdb1fffb
Author: Koji Ishii <kojii@chromium.org>
Date: Wed Oct 31 04:39:53 2018

[LayoutNG] Re-use line box fragments

This patch re-uses line box fragments where possible.

Overall approach is:
1. Line box NGPaintFragment is marked as dirty when modified.
   This was done in separate patches by yosin@, and is being
   improved further.
2. On the beginning of layout, if NGPaintFragment exists
   for the inline formatting context and re-using is
   possible, copy them to NGFragmentBuilder.
3. Setup the internal states and break token so that
   NGBlockLayoutAlgorithm can continue from the copied
   fragments.

This is very initial patch. Not much improvements are seen in
blink_perf.layout yet, but at this stage, the reuse is only
for very limited conditions, and I'm finding cases where we
mark dirty too much (fixing in parallel.)

Also some cases we're slowing down, due to the overhead to
check the reusability but ended up with no reuse. The code
to check is also target to be profiled for more optimizations.

Bug: 636993
Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_layout_ng;luci.chromium.try:linux_layout_tests_slimming_paint_v2;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: Ib0f24ece25bf666f67042a915ed75e0b5d2b4356
Reviewed-on: https://chromium-review.googlesource.com/c/1196724
Commit-Queue: Koji Ishii <kojii@chromium.org>
Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org>
Reviewed-by: Emil A Eklund <eae@chromium.org>
Reviewed-by: Morten Stenshorne <mstensho@chromium.org>
Cr-Commit-Position: refs/heads/master@{#604155}
[modify] https://crrev.com/e3eddb5b598fa1d4a3b2e8989be77fbabdb1fffb/third_party/WebKit/LayoutTests/TestExpectations
[modify] https://crrev.com/e3eddb5b598fa1d4a3b2e8989be77fbabdb1fffb/third_party/blink/renderer/core/layout/layout_block_flow.cc
[modify] https://crrev.com/e3eddb5b598fa1d4a3b2e8989be77fbabdb1fffb/third_party/blink/renderer/core/layout/layout_block_flow.h
[modify] https://crrev.com/e3eddb5b598fa1d4a3b2e8989be77fbabdb1fffb/third_party/blink/renderer/core/layout/ng/inline/ng_inline_node.cc
[modify] https://crrev.com/e3eddb5b598fa1d4a3b2e8989be77fbabdb1fffb/third_party/blink/renderer/core/layout/ng/inline/ng_inline_node.h
[modify] https://crrev.com/e3eddb5b598fa1d4a3b2e8989be77fbabdb1fffb/third_party/blink/renderer/core/layout/ng/layout_ng_mixin.cc
[modify] https://crrev.com/e3eddb5b598fa1d4a3b2e8989be77fbabdb1fffb/third_party/blink/renderer/core/layout/ng/layout_ng_mixin.h
[modify] https://crrev.com/e3eddb5b598fa1d4a3b2e8989be77fbabdb1fffb/third_party/blink/renderer/core/layout/ng/ng_block_layout_algorithm.cc
[modify] https://crrev.com/e3eddb5b598fa1d4a3b2e8989be77fbabdb1fffb/third_party/blink/renderer/core/layout/ng/ng_block_layout_algorithm.h
[modify] https://crrev.com/e3eddb5b598fa1d4a3b2e8989be77fbabdb1fffb/third_party/blink/renderer/core/layout/ng/ng_block_node.cc
[modify] https://crrev.com/e3eddb5b598fa1d4a3b2e8989be77fbabdb1fffb/third_party/blink/renderer/core/layout/ng/ng_layout_algorithm.h
[modify] https://crrev.com/e3eddb5b598fa1d4a3b2e8989be77fbabdb1fffb/third_party/blink/renderer/core/layout/ng/ng_layout_input_node.cc
[modify] https://crrev.com/e3eddb5b598fa1d4a3b2e8989be77fbabdb1fffb/third_party/blink/renderer/core/layout/ng/ng_layout_input_node.h
[modify] https://crrev.com/e3eddb5b598fa1d4a3b2e8989be77fbabdb1fffb/third_party/blink/renderer/core/paint/ng/ng_paint_fragment.cc
[modify] https://crrev.com/e3eddb5b598fa1d4a3b2e8989be77fbabdb1fffb/third_party/blink/renderer/core/paint/ng/ng_paint_fragment_test.cc

Comment 439 by bugdroid1@chromium.org, Nov 2

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/1f6312f7758332dc881d391a963ea612ff59dc39

commit 1f6312f7758332dc881d391a963ea612ff59dc39
Author: Koji Ishii <kojii@chromium.org>
Date: Fri Nov 02 04:09:43 2018

[LayoutNG] Reduce excessive marking of line box dirtiness

This patch fixes two excessive marking of line box dirtiness
in NGInlineNode::MarkLineBoxesDirty().

1. LayoutObject::InsertedIntoTree() marks dirty, even if it
   will be dirtied again later in NGInlineNode::
   MarkLineBoxesDirty(). Fixed LayoutNGMixin<Base>::
   DirtyLinesFromChangedChild() to do only if it was in NG
   inline formatting context.
2. It may dirty the first line box because it clears
   LayoutObject::FirstInlineFragment as it traverses in pre-
   order, but NGPaintFragment::DirtyLinesFromChangedChild()
   needs FirstInlineFragment of its previous siblings.
   Changed to keep previous fragment in this loop.

blink_perf.layout does not show observable improvements, but
loading.desktop shows ~3% improvements.

Bug: 636993
Change-Id: Ia0706bb2407427b3e4ed093290646eb21bc5c0f3
Reviewed-on: https://chromium-review.googlesource.com/c/1309388
Commit-Queue: Koji Ishii <kojii@chromium.org>
Reviewed-by: Yoshifumi Inoue <yosin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#604835}
[modify] https://crrev.com/1f6312f7758332dc881d391a963ea612ff59dc39/third_party/blink/renderer/core/layout/layout_text.cc
[modify] https://crrev.com/1f6312f7758332dc881d391a963ea612ff59dc39/third_party/blink/renderer/core/layout/ng/inline/ng_inline_node.cc
[modify] https://crrev.com/1f6312f7758332dc881d391a963ea612ff59dc39/third_party/blink/renderer/core/layout/ng/inline/ng_inline_node_test.cc
[modify] https://crrev.com/1f6312f7758332dc881d391a963ea612ff59dc39/third_party/blink/renderer/core/layout/ng/layout_ng_mixin.cc
[modify] https://crrev.com/1f6312f7758332dc881d391a963ea612ff59dc39/third_party/blink/renderer/core/paint/ng/ng_paint_fragment.cc
[modify] https://crrev.com/1f6312f7758332dc881d391a963ea612ff59dc39/third_party/blink/renderer/core/paint/ng/ng_paint_fragment.h

Comment 440 by bugdroid1@chromium.org, Nov 5

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/827abd88b0bfa380419c13c98d22e30cab5d0c82

commit 827abd88b0bfa380419c13c98d22e30cab5d0c82
Author: Koji Ishii <kojii@chromium.org>
Date: Mon Nov 05 19:48:49 2018

[LayoutNG] Fix NGInlineNode::MarkLineBoxesDirty

This patch fixes MarkLineBoxesDirty to mark correctly when:
1. The changed node has a parent inline box, and
2. is the first child of the parent, and
3. the parent has box fragment (not culled,) and
4. the parent wraps to multiple lines.

e.g.,
<span id="parent" style="background: yellow">
  <span id="changed"></span>
  <br>
  text
</span>

In this case, the old code marks the line box that contains
the last fragment of #parent because #parent is "previous"
of #changed in the pre-order DFS. The marked line box is the
one after #changed, and thus we try to reuse changed line.

This issue was found by a WIP to apply reusing line boxes in
more cases. From the stack, this looks the same as
crbug.com/900898.

Bug: 636993, 900898
Change-Id: I43d1d8150bfff7e1d9a6572be5a235cbe937caac
Reviewed-on: https://chromium-review.googlesource.com/c/1314086
Commit-Queue: Koji Ishii <kojii@chromium.org>
Reviewed-by: Emil A Eklund <eae@chromium.org>
Cr-Commit-Position: refs/heads/master@{#605422}
[modify] https://crrev.com/827abd88b0bfa380419c13c98d22e30cab5d0c82/third_party/blink/renderer/core/layout/ng/inline/ng_inline_node.cc
[modify] https://crrev.com/827abd88b0bfa380419c13c98d22e30cab5d0c82/third_party/blink/renderer/core/layout/ng/inline/ng_inline_node_test.cc
[modify] https://crrev.com/827abd88b0bfa380419c13c98d22e30cab5d0c82/third_party/blink/renderer/core/paint/ng/ng_paint_fragment.cc
[modify] https://crrev.com/827abd88b0bfa380419c13c98d22e30cab5d0c82/third_party/blink/renderer/core/paint/ng/ng_paint_fragment_test.cc

Comment 441 by bugdroid1@chromium.org, Nov 8

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/b43c6fca4349b7f2ff53b41926f5d7cb42ee4e0f

commit b43c6fca4349b7f2ff53b41926f5d7cb42ee4e0f
Author: Koji Ishii <kojii@chromium.org>
Date: Thu Nov 08 02:31:25 2018

Make NGOffsetMapping available for non-LayoutNG LayoutBlockFlow

This patch allows computing NGOffsetMapping for legacy inline
formatting context.

For an experimental project "Invisible DOM"[1][2] to support
the find-in-page feature, it is needed to compute the text
content with whitespace collapsing applied, along with the
mapping to the DOM offset. This patch adds an API to compute
NGOffsetMapping even when the LayoutBlockFlow is not laid out
by LayoutNG for that purpose.

Note that the project is still in the early phase. We may
revisit the design as it moves forward.

[1] https://github.com/rakina/searchable-invisible-dom
[2] https://www.chromestatus.com/feature/5105291213406208

Bug: 636993, 873057
Change-Id: I101b411960813a7b9b5c9c6e2db85d28737af882
Reviewed-on: https://chromium-review.googlesource.com/c/1322184
Reviewed-by: Xiaocheng Hu <xiaochengh@chromium.org>
Reviewed-by: Emil A Eklund <eae@chromium.org>
Reviewed-by: Yoshifumi Inoue <yosin@chromium.org>
Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
Commit-Queue: Koji Ishii <kojii@chromium.org>
Cr-Commit-Position: refs/heads/master@{#606292}
[modify] https://crrev.com/b43c6fca4349b7f2ff53b41926f5d7cb42ee4e0f/third_party/blink/renderer/core/layout/ng/inline/ng_inline_node.cc
[modify] https://crrev.com/b43c6fca4349b7f2ff53b41926f5d7cb42ee4e0f/third_party/blink/renderer/core/layout/ng/inline/ng_inline_node.h
[modify] https://crrev.com/b43c6fca4349b7f2ff53b41926f5d7cb42ee4e0f/third_party/blink/renderer/core/layout/ng/inline/ng_offset_mapping_test.cc

Comment 442 by bugdroid1@chromium.org, Nov 8

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/aef33f11cd7ce7d81c98205c845f2c6a79ce74df

commit aef33f11cd7ce7d81c98205c845f2c6a79ce74df
Author: Findit <findit-for-me@appspot.gserviceaccount.com>
Date: Thu Nov 08 03:27:35 2018

Revert "Make NGOffsetMapping available for non-LayoutNG LayoutBlockFlow"

This reverts commit b43c6fca4349b7f2ff53b41926f5d7cb42ee4e0f.

Reason for revert:

Findit (https://goo.gl/kROfz5) identified CL at revision 606292 as the
culprit for failures in the build cycles as shown on:
https://findit-for-me.appspot.com/waterfall/culprit?key=ag9zfmZpbmRpdC1mb3ItbWVyRAsSDVdmU3VzcGVjdGVkQ0wiMWNocm9taXVtL2I0M2M2ZmNhNDM0OWI3ZjJmZjUzYjQxOTI2ZjVkN2NiNDJlZTRlMGYM

Sample Failed Build: https://ci.chromium.org/buildbot/chromium.linux/Cast%20Audio%20Linux/24981

Sample Failed Step: webkit_unit_tests

Original change's description:
> Make NGOffsetMapping available for non-LayoutNG LayoutBlockFlow
> 
> This patch allows computing NGOffsetMapping for legacy inline
> formatting context.
> 
> For an experimental project "Invisible DOM"[1][2] to support
> the find-in-page feature, it is needed to compute the text
> content with whitespace collapsing applied, along with the
> mapping to the DOM offset. This patch adds an API to compute
> NGOffsetMapping even when the LayoutBlockFlow is not laid out
> by LayoutNG for that purpose.
> 
> Note that the project is still in the early phase. We may
> revisit the design as it moves forward.
> 
> [1] https://github.com/rakina/searchable-invisible-dom
> [2] https://www.chromestatus.com/feature/5105291213406208
> 
> Bug: 636993, 873057
> Change-Id: I101b411960813a7b9b5c9c6e2db85d28737af882
> Reviewed-on: https://chromium-review.googlesource.com/c/1322184
> Reviewed-by: Xiaocheng Hu <xiaochengh@chromium.org>
> Reviewed-by: Emil A Eklund <eae@chromium.org>
> Reviewed-by: Yoshifumi Inoue <yosin@chromium.org>
> Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
> Commit-Queue: Koji Ishii <kojii@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#606292}

Change-Id: I7942801d9268078959619af61363c3a769fc0a53
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 636993, 873057
Reviewed-on: https://chromium-review.googlesource.com/c/1325350
Cr-Commit-Position: refs/heads/master@{#606316}
[modify] https://crrev.com/aef33f11cd7ce7d81c98205c845f2c6a79ce74df/third_party/blink/renderer/core/layout/ng/inline/ng_inline_node.cc
[modify] https://crrev.com/aef33f11cd7ce7d81c98205c845f2c6a79ce74df/third_party/blink/renderer/core/layout/ng/inline/ng_inline_node.h
[modify] https://crrev.com/aef33f11cd7ce7d81c98205c845f2c6a79ce74df/third_party/blink/renderer/core/layout/ng/inline/ng_offset_mapping_test.cc

Comment 443 by bugdroid1@chromium.org, Nov 8

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/2c5768515dc5d79f8a0451ca57fdd86f9ccaac47

commit 2c5768515dc5d79f8a0451ca57fdd86f9ccaac47
Author: Koji Ishii <kojii@chromium.org>
Date: Thu Nov 08 05:53:26 2018

[LayoutNG] Reuse line boxes when it is easy to resolve BFC offset

This patch allows reusing line boxes when it is easy to
resolve BFC offset. It was one of the most common criteria
that prevents reusing.

HandleInFlow resolves BFC for non-empty inline formatting
context. The reusability increases by moving the logic to
after that.

This patch improves line-layout-repeat-append by ~60%.

Bug: 636993
Change-Id: I90d63addd934f6966c76baa1e4dd312b68f6df4e
Reviewed-on: https://chromium-review.googlesource.com/c/1314076
Reviewed-by: Emil A Eklund <eae@chromium.org>
Reviewed-by: Morten Stenshorne <mstensho@chromium.org>
Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org>
Commit-Queue: Koji Ishii <kojii@chromium.org>
Cr-Commit-Position: refs/heads/master@{#606360}
[modify] https://crrev.com/2c5768515dc5d79f8a0451ca57fdd86f9ccaac47/third_party/blink/renderer/core/layout/ng/ng_block_layout_algorithm.cc
[modify] https://crrev.com/2c5768515dc5d79f8a0451ca57fdd86f9ccaac47/third_party/blink/renderer/core/layout/ng/ng_block_layout_algorithm.h

Comment 444 by bugdroid1@chromium.org, Nov 8

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/b3a685fda9dc74255e5c44b46472eb89e05f7873

commit b3a685fda9dc74255e5c44b46472eb89e05f7873
Author: Koji Ishii <kojii@chromium.org>
Date: Thu Nov 08 17:49:38 2018

Reland "Make NGOffsetMapping available for non-LayoutNG LayoutBlockFlow"

This is a reland of b43c6fca4349b7f2ff53b41926f5d7cb42ee4e0f

Cannot reproduce the failures locally, nor in CQ.

Try to reland the same CL to see if it was a flake.

Original change's description:
> Make NGOffsetMapping available for non-LayoutNG LayoutBlockFlow
>
> This patch allows computing NGOffsetMapping for legacy inline
> formatting context.
>
> For an experimental project "Invisible DOM"[1][2] to support
> the find-in-page feature, it is needed to compute the text
> content with whitespace collapsing applied, along with the
> mapping to the DOM offset. This patch adds an API to compute
> NGOffsetMapping even when the LayoutBlockFlow is not laid out
> by LayoutNG for that purpose.
>
> Note that the project is still in the early phase. We may
> revisit the design as it moves forward.
>
> [1] https://github.com/rakina/searchable-invisible-dom
> [2] https://www.chromestatus.com/feature/5105291213406208
>
> Bug: 636993, 873057
> Change-Id: I101b411960813a7b9b5c9c6e2db85d28737af882
> Reviewed-on: https://chromium-review.googlesource.com/c/1322184
> Reviewed-by: Xiaocheng Hu <xiaochengh@chromium.org>
> Reviewed-by: Emil A Eklund <eae@chromium.org>
> Reviewed-by: Yoshifumi Inoue <yosin@chromium.org>
> Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
> Commit-Queue: Koji Ishii <kojii@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#606292}

TBR=yoshin@chromium.org, eae@chromium.org

Bug: 636993, 873057
Change-Id: I241c6e9163add4000fa078c5d70a62b89acea9ac
Reviewed-on: https://chromium-review.googlesource.com/c/1326343
Reviewed-by: Emil A Eklund <eae@chromium.org>
Commit-Queue: Emil A Eklund <eae@chromium.org>
Cr-Commit-Position: refs/heads/master@{#606525}
[modify] https://crrev.com/b3a685fda9dc74255e5c44b46472eb89e05f7873/third_party/blink/renderer/core/layout/ng/inline/ng_inline_node.cc
[modify] https://crrev.com/b3a685fda9dc74255e5c44b46472eb89e05f7873/third_party/blink/renderer/core/layout/ng/inline/ng_inline_node.h
[modify] https://crrev.com/b3a685fda9dc74255e5c44b46472eb89e05f7873/third_party/blink/renderer/core/layout/ng/inline/ng_offset_mapping_test.cc

Comment 445 by bugdroid1@chromium.org, Nov 8

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/5025d5931bd62db3abae530f257a9316fae3d6f1

commit 5025d5931bd62db3abae530f257a9316fae3d6f1
Author: Findit <findit-for-me@appspot.gserviceaccount.com>
Date: Thu Nov 08 18:38:20 2018

Revert "Reland "Make NGOffsetMapping available for non-LayoutNG LayoutBlockFlow""

This reverts commit b3a685fda9dc74255e5c44b46472eb89e05f7873.

Reason for revert:

Findit (https://goo.gl/kROfz5) identified CL at revision 606525 as the
culprit for failures in the build cycles as shown on:
https://findit-for-me.appspot.com/waterfall/culprit?key=ag9zfmZpbmRpdC1mb3ItbWVyRAsSDVdmU3VzcGVjdGVkQ0wiMWNocm9taXVtL2IzYTY4NWZkYTlkYzc0MjU1ZTVjNDRiNDY0NzJlYjg5ZTA1Zjc4NzMM

Sample Failed Build: https://ci.chromium.org/buildbot/chromium.linux/Cast%20Audio%20Linux/25051

Sample Failed Step: webkit_unit_tests

Original change's description:
> Reland "Make NGOffsetMapping available for non-LayoutNG LayoutBlockFlow"
> 
> This is a reland of b43c6fca4349b7f2ff53b41926f5d7cb42ee4e0f
> 
> Cannot reproduce the failures locally, nor in CQ.
> 
> Try to reland the same CL to see if it was a flake.
> 
> Original change's description:
> > Make NGOffsetMapping available for non-LayoutNG LayoutBlockFlow
> >
> > This patch allows computing NGOffsetMapping for legacy inline
> > formatting context.
> >
> > For an experimental project "Invisible DOM"[1][2] to support
> > the find-in-page feature, it is needed to compute the text
> > content with whitespace collapsing applied, along with the
> > mapping to the DOM offset. This patch adds an API to compute
> > NGOffsetMapping even when the LayoutBlockFlow is not laid out
> > by LayoutNG for that purpose.
> >
> > Note that the project is still in the early phase. We may
> > revisit the design as it moves forward.
> >
> > [1] https://github.com/rakina/searchable-invisible-dom
> > [2] https://www.chromestatus.com/feature/5105291213406208
> >
> > Bug: 636993, 873057
> > Change-Id: I101b411960813a7b9b5c9c6e2db85d28737af882
> > Reviewed-on: https://chromium-review.googlesource.com/c/1322184
> > Reviewed-by: Xiaocheng Hu <xiaochengh@chromium.org>
> > Reviewed-by: Emil A Eklund <eae@chromium.org>
> > Reviewed-by: Yoshifumi Inoue <yosin@chromium.org>
> > Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
> > Commit-Queue: Koji Ishii <kojii@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#606292}
> 
> TBR=yoshin@chromium.org, eae@chromium.org
> 
> Bug: 636993, 873057
> Change-Id: I241c6e9163add4000fa078c5d70a62b89acea9ac
> Reviewed-on: https://chromium-review.googlesource.com/c/1326343
> Reviewed-by: Emil A Eklund <eae@chromium.org>
> Commit-Queue: Emil A Eklund <eae@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#606525}

Change-Id: If3d6c17f4cf7ba241380ab3906da0a8029720a0b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 636993, 873057
Reviewed-on: https://chromium-review.googlesource.com/c/1327401
Cr-Commit-Position: refs/heads/master@{#606547}
[modify] https://crrev.com/5025d5931bd62db3abae530f257a9316fae3d6f1/third_party/blink/renderer/core/layout/ng/inline/ng_inline_node.cc
[modify] https://crrev.com/5025d5931bd62db3abae530f257a9316fae3d6f1/third_party/blink/renderer/core/layout/ng/inline/ng_inline_node.h
[modify] https://crrev.com/5025d5931bd62db3abae530f257a9316fae3d6f1/third_party/blink/renderer/core/layout/ng/inline/ng_offset_mapping_test.cc

Comment 446 by bugdroid1@chromium.org, Nov 9

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/de3b8c8dbf530a94a15e660ecb2b9cd80a7f9843

commit de3b8c8dbf530a94a15e660ecb2b9cd80a7f9843
Author: Koji Ishii <kojii@chromium.org>
Date: Fri Nov 09 10:35:54 2018

Reland "Make NGOffsetMapping available for non-LayoutNG LayoutBlockFlow"

This is a reland of b43c6fca4349b7f2ff53b41926f5d7cb42ee4e0f

The original CL had moved a call to ToString() to within
DCHECK, because the result is used only by DCHECK. But the
ToString() has a side effect that must be performed.

Because of the change, this CL breaks if DCHECK is not
enabled. Unfortunately, no build configs in trybots and
CQs have DCHECK disabled.

Reverted the change, and added TODO to clean it up.

Original change's description:
> Make NGOffsetMapping available for non-LayoutNG LayoutBlockFlow
>
> This patch allows computing NGOffsetMapping for legacy inline
> formatting context.
>
> For an experimental project "Invisible DOM"[1][2] to support
> the find-in-page feature, it is needed to compute the text
> content with whitespace collapsing applied, along with the
> mapping to the DOM offset. This patch adds an API to compute
> NGOffsetMapping even when the LayoutBlockFlow is not laid out
> by LayoutNG for that purpose.
>
> Note that the project is still in the early phase. We may
> revisit the design as it moves forward.
>
> [1] https://github.com/rakina/searchable-invisible-dom
> [2] https://www.chromestatus.com/feature/5105291213406208
>
> Bug: 636993, 873057
> Change-Id: I101b411960813a7b9b5c9c6e2db85d28737af882
> Reviewed-on: https://chromium-review.googlesource.com/c/1322184
> Reviewed-by: Xiaocheng Hu <xiaochengh@chromium.org>
> Reviewed-by: Emil A Eklund <eae@chromium.org>
> Reviewed-by: Yoshifumi Inoue <yosin@chromium.org>
> Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
> Commit-Queue: Koji Ishii <kojii@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#606292}

TBR=yoshin@chromium.org, eae@chromium.org, xiaochengh@chromium.org, rakina@chromium.org

Bug: 636993, 873057
Change-Id: I8a29073fb18a1349d758d37033e6b046a54d5beb
Reviewed-on: https://chromium-review.googlesource.com/c/1327582
Reviewed-by: Koji Ishii <kojii@chromium.org>
Commit-Queue: Koji Ishii <kojii@chromium.org>
Cr-Commit-Position: refs/heads/master@{#606786}
[modify] https://crrev.com/de3b8c8dbf530a94a15e660ecb2b9cd80a7f9843/third_party/blink/renderer/core/layout/ng/inline/ng_inline_node.cc
[modify] https://crrev.com/de3b8c8dbf530a94a15e660ecb2b9cd80a7f9843/third_party/blink/renderer/core/layout/ng/inline/ng_inline_node.h
[modify] https://crrev.com/de3b8c8dbf530a94a15e660ecb2b9cd80a7f9843/third_party/blink/renderer/core/layout/ng/inline/ng_offset_mapping_test.cc

Comment 447 by kojii@chromium.org, Nov 12

Blockedon: 904291

Comment 448 by bugdroid1@chromium.org, Nov 13

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/ed5537961982efa228f26eab04c64575d58cfed6

commit ed5537961982efa228f26eab04c64575d58cfed6
Author: Koji Ishii <kojii@chromium.org>
Date: Tue Nov 13 01:35:59 2018

[LayoutNG] Implement inline fragmentation for BiDi

This patch impements inline fragmentation for BiDi.

When BiDi reorder fragments an inline box; e.g.,
  <span>T1 T2</span>T3
becomes after BiDi reorder:
  <span>T1</span> T3 <span>T2</span>
this change creates two box fragments, one for T1 and another
for T2.

Unfortunately, one test starts failing:
fast/css/css-properties-position-relative-as-parent-fixed.html

In this test, when absolute/fixed positioned container is
fragmented, the position becomes incorrect. As far as I
checked, the fragment tree looks correct, so I suppose
computing positioned objects get confused by multiple
fragments for a LayoutObject within a line.

Bug: 636993
Change-Id: Id1055e411e7cb59a8c8e731e5ad7c74b0c7fd246
Reviewed-on: https://chromium-review.googlesource.com/c/1323989
Commit-Queue: Koji Ishii <kojii@chromium.org>
Reviewed-by: Emil A Eklund <eae@chromium.org>
Cr-Commit-Position: refs/heads/master@{#607412}
[modify] https://crrev.com/ed5537961982efa228f26eab04c64575d58cfed6/third_party/WebKit/LayoutTests/FlagExpectations/enable-blink-features=LayoutNG
[modify] https://crrev.com/ed5537961982efa228f26eab04c64575d58cfed6/third_party/blink/renderer/core/layout/ng/inline/ng_inline_box_state.cc
[modify] https://crrev.com/ed5537961982efa228f26eab04c64575d58cfed6/third_party/blink/renderer/core/layout/ng/inline/ng_inline_box_state.h

Comment 449 by bugdroid1@chromium.org, Nov 13

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/58605429dc978099c398d0d183017e9543a26425

commit 58605429dc978099c398d0d183017e9543a26425
Author: Koji Ishii <kojii@chromium.org>
Date: Tue Nov 13 02:19:45 2018

[LayoutNG] Reduces the size of NGPhysical{Box|Text}Fragment

This patch reduces the size of:
* NGPhysicalBoxFragment by a pointer, by removing |style_|
  from NGPhysicalFragment. This field is used only for line
  box and for ellipsis, and thus it is moved to each
  subclasses.
* NGPhysicalTextFragment by 16 bytes, by moving
  |self_ink_overflow_| and |style_| to RareData. Quick
  investigation shows that |self_ink_overflow_| is different
  from |LocalRect()| in 10-20% of the time (on Linux,
  google.com and a few other sites.)

Change-Id: I225edd42d6d9488611ffe2fa7ef9b11b7e9da4a1
Bug: 635619, 636993
Reviewed-on: https://chromium-review.googlesource.com/c/1331102
Reviewed-by: Aleks Totic <atotic@chromium.org>
Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org>
Commit-Queue: Koji Ishii <kojii@chromium.org>
Cr-Commit-Position: refs/heads/master@{#607444}
[modify] https://crrev.com/58605429dc978099c398d0d183017e9543a26425/third_party/blink/renderer/core/layout/ng/geometry/ng_physical_offset_rect.cc
[modify] https://crrev.com/58605429dc978099c398d0d183017e9543a26425/third_party/blink/renderer/core/layout/ng/geometry/ng_physical_offset_rect.h
[modify] https://crrev.com/58605429dc978099c398d0d183017e9543a26425/third_party/blink/renderer/core/layout/ng/inline/ng_physical_line_box_fragment.cc
[modify] https://crrev.com/58605429dc978099c398d0d183017e9543a26425/third_party/blink/renderer/core/layout/ng/inline/ng_physical_line_box_fragment.h
[modify] https://crrev.com/58605429dc978099c398d0d183017e9543a26425/third_party/blink/renderer/core/layout/ng/inline/ng_physical_text_fragment.cc
[modify] https://crrev.com/58605429dc978099c398d0d183017e9543a26425/third_party/blink/renderer/core/layout/ng/inline/ng_physical_text_fragment.h
[modify] https://crrev.com/58605429dc978099c398d0d183017e9543a26425/third_party/blink/renderer/core/layout/ng/ng_physical_fragment.cc
[modify] https://crrev.com/58605429dc978099c398d0d183017e9543a26425/third_party/blink/renderer/core/layout/ng/ng_physical_fragment.h

Comment 450 by bugdroid1@chromium.org, Nov 13

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/4d60ddff4d5a369b56407d7cbbbcbd306489d053

commit 4d60ddff4d5a369b56407d7cbbbcbd306489d053
Author: Koji Ishii <kojii@chromium.org>
Date: Tue Nov 13 13:58:02 2018

[LayoutNG] Remove unintuitive side effects in NGInlineItemsBuilder::ToString

NGInlineItemsBuilder::ToString() removes trailing spaces at
the end of the block. This is unintuitive from the function
name, and caused CL:1322184 to be reverted.

This patch moves this to ExitBlock(), and make ToString()
clean, without side effects.

Ran webkit_unit_tests locally with DCHECK disabled.

Bug: 636993
Change-Id: I03f814afc272b9be0c274391cde076aecb6dbc91
Reviewed-on: https://chromium-review.googlesource.com/c/1329804
Commit-Queue: Koji Ishii <kojii@chromium.org>
Reviewed-by: Xiaocheng Hu <xiaochengh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#607579}
[modify] https://crrev.com/4d60ddff4d5a369b56407d7cbbbcbd306489d053/third_party/blink/renderer/core/layout/ng/inline/ng_inline_items_builder.cc
[modify] https://crrev.com/4d60ddff4d5a369b56407d7cbbbcbd306489d053/third_party/blink/renderer/core/layout/ng/inline/ng_inline_items_builder_test.cc
[modify] https://crrev.com/4d60ddff4d5a369b56407d7cbbbcbd306489d053/third_party/blink/renderer/core/layout/ng/inline/ng_inline_node.cc

Comment 451 by bugdroid1@chromium.org, Nov 15

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/e5b684d2cfabe74104622e5b241d7deac9b542fd

commit e5b684d2cfabe74104622e5b241d7deac9b542fd
Author: Koji Ishii <kojii@chromium.org>
Date: Thu Nov 15 05:12:32 2018

[LayoutNG] Adjust BoxInfo::item_index when items are removed

When NGInlineItemsBuilder removed an item, it needs to adjust
BoxInfo::item_index. This patch fixes it.

This was revealed in crrev.com/c/1333588, tests will fail
with the CL without this fix.

Bug: 636993
Change-Id: I7a996e358c0daa8e6c7aa1b5227e4027fe0295bd
Reviewed-on: https://chromium-review.googlesource.com/c/1337210
Reviewed-by: Xiaocheng Hu <xiaochengh@chromium.org>
Commit-Queue: Koji Ishii <kojii@chromium.org>
Cr-Commit-Position: refs/heads/master@{#608266}
[modify] https://crrev.com/e5b684d2cfabe74104622e5b241d7deac9b542fd/third_party/blink/renderer/core/layout/ng/inline/ng_inline_items_builder.cc

Comment 452 by bugdroid1@chromium.org, Nov 15

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/e36384f537bce29b518ae231c3449f817c8441ad

commit e36384f537bce29b518ae231c3449f817c8441ad
Author: Koji Ishii <kojii@chromium.org>
Date: Thu Nov 15 07:36:01 2018

[LayoutNG] Change how LayoutInline determines in NG context

This patch changes LayoutInline to use
|IsInLayoutNGInlineFormattingContext()| to determine whether
it's in LayoutNG inline formatting context or not.

This was revealed in crrev.com/c/1333588, tests will fail
with the CL without this fix.

Bug: 636993
Change-Id: I6ae4fb3bcaf18afceb4ab3486618a031b4a895c9
Reviewed-on: https://chromium-review.googlesource.com/c/1337212
Reviewed-by: Xiaocheng Hu <xiaochengh@chromium.org>
Commit-Queue: Koji Ishii <kojii@chromium.org>
Cr-Commit-Position: refs/heads/master@{#608287}
[modify] https://crrev.com/e36384f537bce29b518ae231c3449f817c8441ad/third_party/blink/renderer/core/layout/layout_inline.cc

Comment 453 by bugdroid1@chromium.org, Nov 15

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/8c9196789132507fb3062f7306cb36ef839b7dc4

commit 8c9196789132507fb3062f7306cb36ef839b7dc4
Author: Koji Ishii <kojii@chromium.org>
Date: Thu Nov 15 07:54:26 2018

[LayoutNG] Move should_create_box_fragment to LayoutInline

This patch moves the flag whether to force to create a box
fragment for LayoutInline or not from NGInlineItem to
LayoutInline.

This is part of an effort to reduce re-collecting
NGInlineItem when styles were changed. Re-collecting is
rather an expensive operation that changes in, for instance,
background should not require it.

Note, this patch itself does not reduce the collection,
because we require re-collection whenever NeedsLayout is set.
It is planned in future patches, but this change is needed to
make it happen.

Also benefits to keep the flag turned on once it's on, until
the LayoutInline is reattached.

The change has minor performance gain in most blink_perf.layout
https://pinpoint-dot-chromeperf.appspot.com/job/15f8c74be40000

Bug: 636993
Change-Id: I8d4e7c421d5fad26fee60832cdfbacd575f7ad34
Reviewed-on: https://chromium-review.googlesource.com/c/1333588
Reviewed-by: Xiaocheng Hu <xiaochengh@chromium.org>
Reviewed-by: Aleks Totic <atotic@chromium.org>
Commit-Queue: Koji Ishii <kojii@chromium.org>
Cr-Commit-Position: refs/heads/master@{#608292}
[modify] https://crrev.com/8c9196789132507fb3062f7306cb36ef839b7dc4/third_party/blink/renderer/core/layout/layout_inline.cc
[modify] https://crrev.com/8c9196789132507fb3062f7306cb36ef839b7dc4/third_party/blink/renderer/core/layout/layout_inline.h
[modify] https://crrev.com/8c9196789132507fb3062f7306cb36ef839b7dc4/third_party/blink/renderer/core/layout/ng/inline/ng_inline_item.cc
[modify] https://crrev.com/8c9196789132507fb3062f7306cb36ef839b7dc4/third_party/blink/renderer/core/layout/ng/inline/ng_inline_item.h
[modify] https://crrev.com/8c9196789132507fb3062f7306cb36ef839b7dc4/third_party/blink/renderer/core/layout/ng/inline/ng_inline_items_builder_test.cc
[modify] https://crrev.com/8c9196789132507fb3062f7306cb36ef839b7dc4/third_party/blink/renderer/core/layout/ng/inline/ng_inline_node.cc

Comment 454 by bugdroid1@chromium.org, Nov 15

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/24615339dcd4d5bf4ffad3ceb1a5b88c526c8b0f

commit 24615339dcd4d5bf4ffad3ceb1a5b88c526c8b0f
Author: Koji Ishii <kojii@chromium.org>
Date: Thu Nov 15 17:44:05 2018

[LayoutNG] Add NGPhysicalLineBoxFragment::IsEmptyLineBox()

This patch adds IsEmptyLineBox() function that returns
whethe the line box is "empty", or "certain zero-height
line box" as defined in CSS2[1] or not, and change where
we used to determine it by checking if the number of children
is 0.

[1] https://drafts.csswg.org/css2/visuren.html#phantom-line-box

Bug: 636993, 903578
Change-Id: I2b9961e1ecb743063238b39a3a5be53f15ffce8c
Reviewed-on: https://chromium-review.googlesource.com/c/1332972
Reviewed-by: Aleks Totic <atotic@chromium.org>
Commit-Queue: Koji Ishii <kojii@chromium.org>
Cr-Commit-Position: refs/heads/master@{#608419}
[modify] https://crrev.com/24615339dcd4d5bf4ffad3ceb1a5b88c526c8b0f/third_party/blink/renderer/core/layout/ng/inline/ng_inline_layout_algorithm.cc
[modify] https://crrev.com/24615339dcd4d5bf4ffad3ceb1a5b88c526c8b0f/third_party/blink/renderer/core/layout/ng/inline/ng_line_box_fragment_builder.cc
[modify] https://crrev.com/24615339dcd4d5bf4ffad3ceb1a5b88c526c8b0f/third_party/blink/renderer/core/layout/ng/inline/ng_line_box_fragment_builder.h
[modify] https://crrev.com/24615339dcd4d5bf4ffad3ceb1a5b88c526c8b0f/third_party/blink/renderer/core/layout/ng/inline/ng_physical_line_box_fragment.cc
[modify] https://crrev.com/24615339dcd4d5bf4ffad3ceb1a5b88c526c8b0f/third_party/blink/renderer/core/layout/ng/inline/ng_physical_line_box_fragment.h
[modify] https://crrev.com/24615339dcd4d5bf4ffad3ceb1a5b88c526c8b0f/third_party/blink/renderer/core/layout/ng/list/ng_unpositioned_list_marker.cc
[modify] https://crrev.com/24615339dcd4d5bf4ffad3ceb1a5b88c526c8b0f/third_party/blink/renderer/core/layout/ng/ng_block_layout_algorithm.cc
[modify] https://crrev.com/24615339dcd4d5bf4ffad3ceb1a5b88c526c8b0f/third_party/blink/renderer/core/layout/ng/ng_physical_fragment.cc
[modify] https://crrev.com/24615339dcd4d5bf4ffad3ceb1a5b88c526c8b0f/third_party/blink/renderer/core/layout/ng/ng_physical_fragment.h

Comment 455 by bugdroid1@chromium.org, Nov 17

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/05672d8d19afbbfada4f027ac1a9f27228bc78a6

commit 05672d8d19afbbfada4f027ac1a9f27228bc78a6
Author: Koji Ishii <kojii@chromium.org>
Date: Sat Nov 17 18:05:42 2018

Normalize Katakana to Hiragana in ScriptRunIterator

This patch normalizes Katakana to Hiragana in ScriptData, and
thus in ScriptRunIterator.

There are 3 ICU script code for kana; USCRIPT_HIRAGANA,
USCRIPT_KATAKANA, and USCRIPT_KATAKANA_OR_HIRAGANA. However,
OpenType has only one 'kana' for all these 3 script codes.

When shaping, HarfBuzz handles the normalization. However,
Blink splits the incoming string by the ICU scripts.
Splitting these 3 scripts is not useful but consumes CPU
and memory.

By normalizing in ScriptRunIterator, all types of Kana are
in single run.

timeToFirstContentfulPaint:layout shows ~3% improvements
https://pinpoint-dot-chromeperf.appspot.com/job/10d9760fe40000

though bink_perf.layout does not show much differences
https://pinpoint-dot-chromeperf.appspot.com/job/14f19c00140000

This is probably because Katakana characters are not used
much in `japanese-kokoro-insert` (written in ~100 years ago,)
while they are more used in modern pages.

Bug: 636993
Change-Id: If692bb575f2232b8fca10cd2ea87e3022debdf05
Reviewed-on: https://chromium-review.googlesource.com/c/1337650
Commit-Queue: Koji Ishii <kojii@chromium.org>
Reviewed-by: Dominik Röttsches <drott@chromium.org>
Cr-Commit-Position: refs/heads/master@{#609119}
[modify] https://crrev.com/05672d8d19afbbfada4f027ac1a9f27228bc78a6/third_party/blink/renderer/platform/fonts/script_run_iterator.cc
[modify] https://crrev.com/05672d8d19afbbfada4f027ac1a9f27228bc78a6/third_party/blink/renderer/platform/fonts/script_run_iterator_test.cc

Comment 456 by bugdroid1@chromium.org, Nov 19

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/edf3a719e3905bd3d5828183de0f1c9f1f88552d

commit edf3a719e3905bd3d5828183de0f1c9f1f88552d
Author: Maxim Kolosovskiy <kolos@chromium.org>
Date: Mon Nov 19 13:23:11 2018

Revert "Normalize Katakana to Hiragana in ScriptRunIterator"

This reverts commit 05672d8d19afbbfada4f027ac1a9f27228bc78a6.

Reason for revert: Test failures https://bugs.chromium.org/p/chromium/issues/detail?id=906587

Original change's description:
> Normalize Katakana to Hiragana in ScriptRunIterator
> 
> This patch normalizes Katakana to Hiragana in ScriptData, and
> thus in ScriptRunIterator.
> 
> There are 3 ICU script code for kana; USCRIPT_HIRAGANA,
> USCRIPT_KATAKANA, and USCRIPT_KATAKANA_OR_HIRAGANA. However,
> OpenType has only one 'kana' for all these 3 script codes.
> 
> When shaping, HarfBuzz handles the normalization. However,
> Blink splits the incoming string by the ICU scripts.
> Splitting these 3 scripts is not useful but consumes CPU
> and memory.
> 
> By normalizing in ScriptRunIterator, all types of Kana are
> in single run.
> 
> timeToFirstContentfulPaint:layout shows ~3% improvements
> https://pinpoint-dot-chromeperf.appspot.com/job/10d9760fe40000
> 
> though bink_perf.layout does not show much differences
> https://pinpoint-dot-chromeperf.appspot.com/job/14f19c00140000
> 
> This is probably because Katakana characters are not used
> much in `japanese-kokoro-insert` (written in ~100 years ago,)
> while they are more used in modern pages.
> 
> Bug: 636993
> Change-Id: If692bb575f2232b8fca10cd2ea87e3022debdf05
> Reviewed-on: https://chromium-review.googlesource.com/c/1337650
> Commit-Queue: Koji Ishii <kojii@chromium.org>
> Reviewed-by: Dominik Röttsches <drott@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#609119}

TBR=eae@chromium.org,kojii@chromium.org,drott@chromium.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: 636993
Change-Id: Icb14d6ad2a3453c9bfab9287e5c0a4995ac1c97f
Reviewed-on: https://chromium-review.googlesource.com/c/1341519
Reviewed-by: Maxim Kolosovskiy <kolos@chromium.org>
Commit-Queue: Maxim Kolosovskiy <kolos@chromium.org>
Cr-Commit-Position: refs/heads/master@{#609266}
[modify] https://crrev.com/edf3a719e3905bd3d5828183de0f1c9f1f88552d/third_party/blink/renderer/platform/fonts/script_run_iterator.cc
[modify] https://crrev.com/edf3a719e3905bd3d5828183de0f1c9f1f88552d/third_party/blink/renderer/platform/fonts/script_run_iterator_test.cc

Comment 457 by bugdroid1@chromium.org, Nov 20

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/36c08c1fb50c18303e82236c4bf143bbaf9c675b

commit 36c08c1fb50c18303e82236c4bf143bbaf9c675b
Author: Koji Ishii <kojii@chromium.org>
Date: Tue Nov 20 13:33:18 2018

Reland "Normalize Katakana to Hiragana in ScriptRunIterator"

This is a reland of 05672d8d19afbbfada4f027ac1a9f27228bc78a6

The original change was reverted as suspected to cause
Android CFI builder to fail:

[ RUN      ] RenderViewImplTest.PreferredSizeZoomed
[FATAL:data_pack.cc(444)] Check failed: !handle->HasResource(resource_id). Duplicate resource 25400 with scale 1

I cannot find any relationship to the failure, and
android_cfi_rel_ng trybot passes. Relanding to see if this
was really the cause.

Original change's description:
> Normalize Katakana to Hiragana in ScriptRunIterator
>
> This patch normalizes Katakana to Hiragana in ScriptData, and
> thus in ScriptRunIterator.
>
> There are 3 ICU script code for kana; USCRIPT_HIRAGANA,
> USCRIPT_KATAKANA, and USCRIPT_KATAKANA_OR_HIRAGANA. However,
> OpenType has only one 'kana' for all these 3 script codes.
>
> When shaping, HarfBuzz handles the normalization. However,
> Blink splits the incoming string by the ICU scripts.
> Splitting these 3 scripts is not useful but consumes CPU
> and memory.
>
> By normalizing in ScriptRunIterator, all types of Kana are
> in single run.
>
> timeToFirstContentfulPaint:layout shows ~3% improvements
> https://pinpoint-dot-chromeperf.appspot.com/job/10d9760fe40000
>
> though bink_perf.layout does not show much differences
> https://pinpoint-dot-chromeperf.appspot.com/job/14f19c00140000
>
> This is probably because Katakana characters are not used
> much in `japanese-kokoro-insert` (written in ~100 years ago,)
> while they are more used in modern pages.
>
> Bug: 636993
> Change-Id: If692bb575f2232b8fca10cd2ea87e3022debdf05
> Reviewed-on: https://chromium-review.googlesource.com/c/1337650
> Commit-Queue: Koji Ishii <kojii@chromium.org>
> Reviewed-by: Dominik Röttsches <drott@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#609119}

TBR=drott@chromium.org

Bug: 636993
Change-Id: I1d741fa47556c5e7bf47e3badcdcf60a81fbc22b
Reviewed-on: https://chromium-review.googlesource.com/c/1343583
Reviewed-by: Koji Ishii <kojii@chromium.org>
Commit-Queue: Koji Ishii <kojii@chromium.org>
Cr-Commit-Position: refs/heads/master@{#609680}
[modify] https://crrev.com/36c08c1fb50c18303e82236c4bf143bbaf9c675b/third_party/blink/renderer/platform/fonts/script_run_iterator.cc
[modify] https://crrev.com/36c08c1fb50c18303e82236c4bf143bbaf9c675b/third_party/blink/renderer/platform/fonts/script_run_iterator_test.cc

Comment 458 by bugdroid1@chromium.org, Nov 27

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/ed2f02d8634e5059d5494429ae976fca08295a43

commit ed2f02d8634e5059d5494429ae976fca08295a43
Author: Koji Ishii <kojii@chromium.org>
Date: Tue Nov 27 02:08:13 2018

[LayoutNG] Fix inline out-of-flow container computation

The out-of-flow code assumed that all fragments for a
LayoutInline has the same height, but the change for
crbug.com/903578 (WIP CL:1251142) breaks the assumption.

This patch fixes by computing the rect and uniting them,
instead of taking the max of heights.

No behavior changes until the WIP CL lands.

Change-Id: I9fe6b35d25836fde10dd88dd90ca2a810f5c9863
Bug: 636993, 903578
Reviewed-on: https://chromium-review.googlesource.com/c/1351189
Reviewed-by: Aleks Totic <atotic@chromium.org>
Commit-Queue: Koji Ishii <kojii@chromium.org>
Cr-Commit-Position: refs/heads/master@{#610994}
[modify] https://crrev.com/ed2f02d8634e5059d5494429ae976fca08295a43/third_party/blink/renderer/core/layout/ng/ng_box_fragment_builder.cc
[modify] https://crrev.com/ed2f02d8634e5059d5494429ae976fca08295a43/third_party/blink/renderer/core/layout/ng/ng_box_fragment_builder.h
[modify] https://crrev.com/ed2f02d8634e5059d5494429ae976fca08295a43/third_party/blink/renderer/core/layout/ng/ng_out_of_flow_layout_part.cc

Comment 459 by bugdroid1@chromium.org, Nov 27

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/57d02244cbebcf8db18315f5f59b9bc2031e62ba

commit 57d02244cbebcf8db18315f5f59b9bc2031e62ba
Author: Koji Ishii <kojii@chromium.org>
Date: Tue Nov 27 14:17:02 2018

[LayoutNG] Fix first-line background when applied later

LayoutNG creates an anonymous inline wrapper when
::first-line has background, so that paint code can handle it
the same way as other boxes.

Because of that, when ::first-line was applied after the box
was once laid out, such block needs to reattach to insert the
anonymous inline wrapper.

This patch should have been needed, but all tests used to
pass without this, probably we didn't have such tests.
Recently 3 tests started to fail. This patch fixes them.

DCHECKs to avoid splitting anonymous inlines added in r521673
(CL:806158) are adjusted to allow splitting anonymous wrapper
for ::first-line.

Bug: 636993
Change-Id: Ib1e51f0f77c759761b31abe8cc0e2973caa77d92
Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_layout_ng
Reviewed-on: https://chromium-review.googlesource.com/c/1345676
Commit-Queue: Koji Ishii <kojii@chromium.org>
Reviewed-by: Morten Stenshorne <mstensho@chromium.org>
Reviewed-by: Rune Lillesveen <futhark@chromium.org>
Cr-Commit-Position: refs/heads/master@{#611097}
[modify] https://crrev.com/57d02244cbebcf8db18315f5f59b9bc2031e62ba/third_party/blink/renderer/core/layout/layout_block_flow.cc
[modify] https://crrev.com/57d02244cbebcf8db18315f5f59b9bc2031e62ba/third_party/blink/renderer/core/layout/layout_inline.cc
[modify] https://crrev.com/57d02244cbebcf8db18315f5f59b9bc2031e62ba/third_party/blink/renderer/core/layout/text_autosizer.cc
[modify] https://crrev.com/57d02244cbebcf8db18315f5f59b9bc2031e62ba/third_party/blink/renderer/core/style/computed_style.cc
[modify] https://crrev.com/57d02244cbebcf8db18315f5f59b9bc2031e62ba/third_party/blink/web_tests/FlagExpectations/enable-blink-features=LayoutNG
[modify] https://crrev.com/57d02244cbebcf8db18315f5f59b9bc2031e62ba/third_party/blink/web_tests/flag-specific/enable-blink-features=LayoutNG/fast/box-shadow/box-shadow-expected.png

Comment 460 by bugdroid1@chromium.org, Nov 29

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/744ec324aaecc33cdb0090a259aa2d0cafc1d302

commit 744ec324aaecc33cdb0090a259aa2d0cafc1d302
Author: Koji Ishii <kojii@chromium.org>
Date: Thu Nov 29 08:57:10 2018

[LayoutNG] Create fragments in "empty" line boxes

The "empty" line box is what CSS defines as "certain zero-
height line box", that suffices certain conditions as defined
in the spec and is ignored for margin collapsing.

It has some special behaviors, such as to ignore strut, that
LayoutNG suppressed to generate their child fragments.
However, we need them under certain conditions such as when
they have out-of-flow container as descendants.

This change breaks some normal flow, out-of-flow, and outline
tests.

Normal flow failures were fixed by adding an explicit
|IsEmptyLineBox()| function.

Out-of-flow failures are fixed as a separate CL in r610994
(CL:1351189).

Outline failures are fixed in this CL and in r611954
(CL:13543199) thanks to atotic@.

Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_layout_ng
Change-Id: I4d393af016439cdbe085d91fdd1e8550d320d1f1
Bug: 636993, 903578
Reviewed-on: https://chromium-review.googlesource.com/c/1251142
Commit-Queue: Koji Ishii <kojii@chromium.org>
Reviewed-by: Aleks Totic <atotic@chromium.org>
Cr-Commit-Position: refs/heads/master@{#612108}
[modify] https://crrev.com/744ec324aaecc33cdb0090a259aa2d0cafc1d302/third_party/blink/renderer/core/layout/ng/inline/ng_inline_box_state.cc
[modify] https://crrev.com/744ec324aaecc33cdb0090a259aa2d0cafc1d302/third_party/blink/renderer/core/layout/ng/inline/ng_inline_box_state.h
[modify] https://crrev.com/744ec324aaecc33cdb0090a259aa2d0cafc1d302/third_party/blink/renderer/core/layout/ng/inline/ng_inline_layout_algorithm.cc
[modify] https://crrev.com/744ec324aaecc33cdb0090a259aa2d0cafc1d302/third_party/blink/renderer/core/layout/ng/inline/ng_inline_layout_algorithm_test.cc
[modify] https://crrev.com/744ec324aaecc33cdb0090a259aa2d0cafc1d302/third_party/blink/renderer/core/layout/ng/inline/ng_line_box_fragment_builder.cc
[modify] https://crrev.com/744ec324aaecc33cdb0090a259aa2d0cafc1d302/third_party/blink/renderer/core/layout/ng/ng_physical_box_fragment.cc
[modify] https://crrev.com/744ec324aaecc33cdb0090a259aa2d0cafc1d302/third_party/blink/web_tests/FlagExpectations/enable-blink-features=LayoutNG
[modify] https://crrev.com/744ec324aaecc33cdb0090a259aa2d0cafc1d302/third_party/blink/web_tests/flag-specific/enable-blink-features=LayoutNG/fast/css/ignore-empty-focus-ring-rects-expected.png
[modify] https://crrev.com/744ec324aaecc33cdb0090a259aa2d0cafc1d302/third_party/blink/web_tests/flag-specific/enable-blink-features=LayoutNG/paint/invalidation/outline/focus-ring-on-inline-continuation-move-expected.txt

Comment 461 by bugdroid1@chromium.org, Nov 29

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/1f132c9c1298694d83017f771e1917e6fdd63089

commit 1f132c9c1298694d83017f771e1917e6fdd63089
Author: Ian Kilpatrick <ikilpatrick@chromium.org>
Date: Thu Nov 29 21:32:38 2018

[LayoutNG] Simplify determining the inline OOF container.

This went through a couple of simplifying revisions, however this now
simplifies where we calculate if an inline level box can contain
something that is out of flow.

There is also a couple of small fixups left over when I was simplifying
this code.

Bug: 636993
Change-Id: I5b660df11ff26d3a7aaf72fdd087a13be65739cf
Reviewed-on: https://chromium-review.googlesource.com/c/1351262
Commit-Queue: Aleks Totic <atotic@chromium.org>
Reviewed-by: Aleks Totic <atotic@chromium.org>
Reviewed-by: Morten Stenshorne <mstensho@chromium.org>
Reviewed-by: Koji Ishii <kojii@chromium.org>
Cr-Commit-Position: refs/heads/master@{#612359}
[modify] https://crrev.com/1f132c9c1298694d83017f771e1917e6fdd63089/third_party/blink/renderer/core/layout/ng/inline/ng_inline_box_state.cc
[modify] https://crrev.com/1f132c9c1298694d83017f771e1917e6fdd63089/third_party/blink/renderer/core/layout/ng/inline/ng_inline_box_state.h
[modify] https://crrev.com/1f132c9c1298694d83017f771e1917e6fdd63089/third_party/blink/renderer/core/layout/ng/inline/ng_inline_layout_algorithm.cc
[modify] https://crrev.com/1f132c9c1298694d83017f771e1917e6fdd63089/third_party/blink/renderer/core/layout/ng/inline/ng_inline_layout_algorithm.h
[modify] https://crrev.com/1f132c9c1298694d83017f771e1917e6fdd63089/third_party/blink/renderer/core/layout/ng/ng_container_fragment_builder.cc
[modify] https://crrev.com/1f132c9c1298694d83017f771e1917e6fdd63089/third_party/blink/renderer/core/layout/ng/ng_container_fragment_builder.h

Comment 462 by bugdroid1@chromium.org, Nov 30

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/9465c47f4eb1054cca9f5301882499e31054a1a4

commit 9465c47f4eb1054cca9f5301882499e31054a1a4
Author: Ian Kilpatrick <ikilpatrick@chromium.org>
Date: Fri Nov 30 18:50:39 2018

[LayoutNG] Remove text fragment inline_cb_{border,padding} adjustment.

This appears to be a leftover from when we didn't produce fragments for
inline children which were containing blocks.

There should be no behaviour change.

Bug: 636993
Change-Id: Idc78f232390bd58f00517df719b6c2cda6e6830a
Reviewed-on: https://chromium-review.googlesource.com/c/1356259
Reviewed-by: Koji Ishii <kojii@chromium.org>
Reviewed-by: Aleks Totic <atotic@chromium.org>
Commit-Queue: Ian Kilpatrick <ikilpatrick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#612710}
[modify] https://crrev.com/9465c47f4eb1054cca9f5301882499e31054a1a4/third_party/blink/renderer/core/layout/ng/ng_box_fragment_builder.cc
[modify] https://crrev.com/9465c47f4eb1054cca9f5301882499e31054a1a4/third_party/blink/renderer/core/layout/ng/ng_out_of_flow_layout_part.cc

Comment 463 by kojii@chromium.org, Dec 3

Blockedon: 902659

Comment 464 by jmukthavaram@chromium.org, Dec 3

Issue 910849 has been merged into this issue.

Comment 465 by bugdroid1@chromium.org, Dec 6

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/f77f8ad37d9fe5ad966d482e601671a588e68207

commit f77f8ad37d9fe5ad966d482e601671a588e68207
Author: Ian Kilpatrick <ikilpatrick@chromium.org>
Date: Thu Dec 06 18:41:54 2018

[LayoutNG] Simplify & correct static position for OOF positioned.

This patch is primarily simplifies how we determine the static position
for an OOF positioned node, within the inline context.

There are many fixes, (see test cases).

Additionally, fixed positioned nodes, now work when they have an inline
level containing block.

Bug: 636993
Change-Id: I36b573578fc85d9ba9b757f258ec7391eec73c0a
Reviewed-on: https://chromium-review.googlesource.com/c/1356999
Commit-Queue: Ian Kilpatrick <ikilpatrick@chromium.org>
Reviewed-by: Aleks Totic <atotic@chromium.org>
Reviewed-by: Morten Stenshorne <mstensho@chromium.org>
Reviewed-by: Koji Ishii <kojii@chromium.org>
Cr-Commit-Position: refs/heads/master@{#614426}
[modify] https://crrev.com/f77f8ad37d9fe5ad966d482e601671a588e68207/third_party/blink/renderer/core/layout/ng/geometry/ng_logical_offset.cc
[modify] https://crrev.com/f77f8ad37d9fe5ad966d482e601671a588e68207/third_party/blink/renderer/core/layout/ng/geometry/ng_logical_offset.h
[modify] https://crrev.com/f77f8ad37d9fe5ad966d482e601671a588e68207/third_party/blink/renderer/core/layout/ng/inline/ng_inline_box_state.cc
[modify] https://crrev.com/f77f8ad37d9fe5ad966d482e601671a588e68207/third_party/blink/renderer/core/layout/ng/inline/ng_inline_box_state.h
[modify] https://crrev.com/f77f8ad37d9fe5ad966d482e601671a588e68207/third_party/blink/renderer/core/layout/ng/inline/ng_inline_layout_algorithm.cc
[modify] https://crrev.com/f77f8ad37d9fe5ad966d482e601671a588e68207/third_party/blink/renderer/core/layout/ng/inline/ng_inline_layout_algorithm.h
[modify] https://crrev.com/f77f8ad37d9fe5ad966d482e601671a588e68207/third_party/blink/renderer/core/layout/ng/inline/ng_line_box_fragment_builder.cc
[modify] https://crrev.com/f77f8ad37d9fe5ad966d482e601671a588e68207/third_party/blink/renderer/core/layout/ng/inline/ng_line_box_fragment_builder.h
[modify] https://crrev.com/f77f8ad37d9fe5ad966d482e601671a588e68207/third_party/blink/renderer/core/layout/ng/ng_box_fragment_builder.cc
[modify] https://crrev.com/f77f8ad37d9fe5ad966d482e601671a588e68207/third_party/blink/renderer/core/layout/ng/ng_box_fragment_builder.h
[modify] https://crrev.com/f77f8ad37d9fe5ad966d482e601671a588e68207/third_party/blink/renderer/core/layout/ng/ng_container_fragment_builder.cc
[modify] https://crrev.com/f77f8ad37d9fe5ad966d482e601671a588e68207/third_party/blink/renderer/core/layout/ng/ng_container_fragment_builder.h
[modify] https://crrev.com/f77f8ad37d9fe5ad966d482e601671a588e68207/third_party/blink/renderer/core/layout/ng/ng_out_of_flow_layout_part.cc
[modify] https://crrev.com/f77f8ad37d9fe5ad966d482e601671a588e68207/third_party/blink/renderer/core/layout/ng/ng_out_of_flow_layout_part.h
[modify] https://crrev.com/f77f8ad37d9fe5ad966d482e601671a588e68207/third_party/blink/renderer/core/layout/ng/ng_out_of_flow_positioned_descendant.h
[modify] https://crrev.com/f77f8ad37d9fe5ad966d482e601671a588e68207/third_party/blink/web_tests/FlagExpectations/enable-blink-features=LayoutNG
[modify] https://crrev.com/f77f8ad37d9fe5ad966d482e601671a588e68207/third_party/blink/web_tests/TestExpectations
[add] https://crrev.com/f77f8ad37d9fe5ad966d482e601671a588e68207/third_party/blink/web_tests/external/wpt/css/css-position/static-position/htb-ltr-ltr.html
[add] https://crrev.com/f77f8ad37d9fe5ad966d482e601671a588e68207/third_party/blink/web_tests/external/wpt/css/css-position/static-position/htb-ltr-rtl.tentative.html
[add] https://crrev.com/f77f8ad37d9fe5ad966d482e601671a588e68207/third_party/blink/web_tests/external/wpt/css/css-position/static-position/htb-ref.html
[add] https://crrev.com/f77f8ad37d9fe5ad966d482e601671a588e68207/third_party/blink/web_tests/external/wpt/css/css-position/static-position/htb-rtl-ltr.tentative.html
[add] https://crrev.com/f77f8ad37d9fe5ad966d482e601671a588e68207/third_party/blink/web_tests/external/wpt/css/css-position/static-position/htb-rtl-rtl.html
[add] https://crrev.com/f77f8ad37d9fe5ad966d482e601671a588e68207/third_party/blink/web_tests/external/wpt/css/css-position/static-position/vlr-ltr-ltr.html
[add] https://crrev.com/f77f8ad37d9fe5ad966d482e601671a588e68207/third_party/blink/web_tests/external/wpt/css/css-position/static-position/vlr-ltr-rtl.tentative.html
[add] https://crrev.com/f77f8ad37d9fe5ad966d482e601671a588e68207/third_party/blink/web_tests/external/wpt/css/css-position/static-position/vlr-ref.html
[add] https://crrev.com/f77f8ad37d9fe5ad966d482e601671a588e68207/third_party/blink/web_tests/external/wpt/css/css-position/static-position/vlr-rtl-ltr.tentative.html
[add] https://crrev.com/f77f8ad37d9fe5ad966d482e601671a588e68207/third_party/blink/web_tests/external/wpt/css/css-position/static-position/vlr-rtl-rtl.html
[add] https://crrev.com/f77f8ad37d9fe5ad966d482e601671a588e68207/third_party/blink/web_tests/external/wpt/css/css-position/static-position/vrl-ltr-ltr.html
[add] https://crrev.com/f77f8ad37d9fe5ad966d482e601671a588e68207/third_party/blink/web_tests/external/wpt/css/css-position/static-position/vrl-ltr-rtl.tentative.html
[add] https://crrev.com/f77f8ad37d9fe5ad966d482e601671a588e68207/third_party/blink/web_tests/external/wpt/css/css-position/static-position/vrl-ref.html
[add] https://crrev.com/f77f8ad37d9fe5ad966d482e601671a588e68207/third_party/blink/web_tests/external/wpt/css/css-position/static-position/vrl-rtl-ltr.tentative.html
[add] https://crrev.com/f77f8ad37d9fe5ad966d482e601671a588e68207/third_party/blink/web_tests/external/wpt/css/css-position/static-position/vrl-rtl-rtl.html

Comment 466 by cbiesin...@chromium.org, Dec 6

Blockedon: 910849

Comment 467 by bugdroid1@chromium.org, Dec 8

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/823608eaa6fc726876bf82aec939fd768a7910de

commit 823608eaa6fc726876bf82aec939fd768a7910de
Author: Koji Ishii <kojii@chromium.org>
Date: Sat Dec 08 06:14:49 2018

[LayoutNG] Move run segmentation results out from NGInlineItem

This patch adds a new class, NGInlineItemSegment and
NGInlineItemSegments, to store run segmentation results.

They were stored in NGInlineItem before this patch, by
splitting them when an item has multiple runs. However, it
turned out that it is one of the biggest cause of the slow
performance on multi-native-scripts writing systems such as
Japanese.

The profile result of `japanese-kokoro-insert` indicates that
a block is split into 300 runs in average, and line breaking/
layout is slowed down by ~30% when compared to not to split
runs by scripts. This patch recovers most of the 30% by
moving it to NGInlineItemSegment.

ShapingLineBreaker is changed to accept a callback function
to reshape line edges so that it can utilize the cache from
NGInlineItem to RunSegmenterRange.

Bug: 636993
Change-Id: I8a7212400bdc5c8cae178f2d80729f8c7d35d416
Reviewed-on: https://chromium-review.googlesource.com/c/1358196
Commit-Queue: Koji Ishii <kojii@chromium.org>
Reviewed-by: Emil A Eklund <eae@chromium.org>
Cr-Commit-Position: refs/heads/master@{#614955}
[modify] https://crrev.com/823608eaa6fc726876bf82aec939fd768a7910de/third_party/blink/renderer/core/layout/BUILD.gn
[modify] https://crrev.com/823608eaa6fc726876bf82aec939fd768a7910de/third_party/blink/renderer/core/layout/ng/inline/ng_inline_item.cc
[modify] https://crrev.com/823608eaa6fc726876bf82aec939fd768a7910de/third_party/blink/renderer/core/layout/ng/inline/ng_inline_item.h
[add] https://crrev.com/823608eaa6fc726876bf82aec939fd768a7910de/third_party/blink/renderer/core/layout/ng/inline/ng_inline_item_segment.cc
[add] https://crrev.com/823608eaa6fc726876bf82aec939fd768a7910de/third_party/blink/renderer/core/layout/ng/inline/ng_inline_item_segment.h
[modify] https://crrev.com/823608eaa6fc726876bf82aec939fd768a7910de/third_party/blink/renderer/core/layout/ng/inline/ng_inline_node.cc
[modify] https://crrev.com/823608eaa6fc726876bf82aec939fd768a7910de/third_party/blink/renderer/core/layout/ng/inline/ng_inline_node.h
[modify] https://crrev.com/823608eaa6fc726876bf82aec939fd768a7910de/third_party/blink/renderer/core/layout/ng/inline/ng_inline_node_test.cc
[modify] https://crrev.com/823608eaa6fc726876bf82aec939fd768a7910de/third_party/blink/renderer/core/layout/ng/inline/ng_line_breaker.cc
[modify] https://crrev.com/823608eaa6fc726876bf82aec939fd768a7910de/third_party/blink/renderer/platform/fonts/shaping/shaping_line_breaker.cc
[modify] https://crrev.com/823608eaa6fc726876bf82aec939fd768a7910de/third_party/blink/renderer/platform/fonts/shaping/shaping_line_breaker.h
[modify] https://crrev.com/823608eaa6fc726876bf82aec939fd768a7910de/third_party/blink/renderer/platform/fonts/shaping/shaping_line_breaker_test.cc
[modify] https://crrev.com/823608eaa6fc726876bf82aec939fd768a7910de/third_party/blink/renderer/platform/testing/shaping_line_breaker_perf_test.cc
[modify] https://crrev.com/823608eaa6fc726876bf82aec939fd768a7910de/third_party/blink/web_tests/flag-specific/enable-blink-features=LayoutNG/fast/text/justify-ideograph-complex-expected.png
[modify] https://crrev.com/823608eaa6fc726876bf82aec939fd768a7910de/third_party/blink/web_tests/flag-specific/enable-blink-features=LayoutNG/fast/text/justify-ideograph-simple-expected.png
[modify] https://crrev.com/823608eaa6fc726876bf82aec939fd768a7910de/third_party/blink/web_tests/flag-specific/enable-blink-features=LayoutNG/fast/text/justify-ideograph-vertical-expected.png
[modify] https://crrev.com/823608eaa6fc726876bf82aec939fd768a7910de/third_party/blink/web_tests/flag-specific/enable-blink-features=LayoutNG/fast/text/selection/selection-multiple-runs-expected.png
[modify] https://crrev.com/823608eaa6fc726876bf82aec939fd768a7910de/third_party/blink/web_tests/flag-specific/enable-blink-features=LayoutNG/fast/text/trailing-white-space-2-expected.png
[modify] https://crrev.com/823608eaa6fc726876bf82aec939fd768a7910de/third_party/blink/web_tests/flag-specific/enable-blink-features=LayoutNG/fast/text/trailing-white-space-expected.png
[modify] https://crrev.com/823608eaa6fc726876bf82aec939fd768a7910de/third_party/blink/web_tests/flag-specific/enable-blink-features=LayoutNG/fast/writing-mode/japanese-lr-selection-expected.png
[modify] https://crrev.com/823608eaa6fc726876bf82aec939fd768a7910de/third_party/blink/web_tests/flag-specific/enable-blink-features=LayoutNG/fast/writing-mode/japanese-rl-selection-expected.png
[modify] https://crrev.com/823608eaa6fc726876bf82aec939fd768a7910de/third_party/blink/web_tests/flag-specific/enable-blink-features=LayoutNG/paint/invalidation/repaint-across-writing-mode-boundary-expected.txt
[modify] https://crrev.com/823608eaa6fc726876bf82aec939fd768a7910de/third_party/blink/web_tests/flag-specific/enable-blink-features=LayoutNG/paint/invalidation/selection/japanese-rl-selection-clear-expected.txt

Comment 468 by bugdroid1@chromium.org, Dec 20

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/f99469b2752a554624bc3b6e1770134be738dc6d

commit f99469b2752a554624bc3b6e1770134be738dc6d
Author: Koji Ishii <kojii@chromium.org>
Date: Thu Dec 20 20:05:24 2018

[LayoutNG] Disable line-break collapsing rule for East Asian Width

CSS Text Level 3 has a rule for collapsing line break for
East Asian writing systems that do not use spaces to delimit
words. The rule is based on Unicode East Asian Width
property, but recently it was brought to the attention that
the rules may need more logic at:
https://github.com/w3c/csswg-drafts/issues/337

As the discussion seems to take longer to resolve, and there
is a possibility to change the rules in the current spec,
this patch disables the rule until WG reaches to a consensus.

LongFind.txt was changed in r616898 (CL:1379086) when find-
in-page switched to NGOffsetMapping. Since this CL changes
whitespace collapsing rules for East Asian text back to
the same as legacy, the test data change is reverted.

Bug: 636993
Change-Id: I9e78e4fc8791981ef49315ac173912403c8d23f1
Reviewed-on: https://chromium-review.googlesource.com/c/1385696
Reviewed-by: Xiaocheng Hu <xiaochengh@chromium.org>
Reviewed-by: Emil A Eklund <eae@chromium.org>
Commit-Queue: Emil A Eklund <eae@chromium.org>
Cr-Commit-Position: refs/heads/master@{#618303}
[modify] https://crrev.com/f99469b2752a554624bc3b6e1770134be738dc6d/chrome/test/data/find_in_page/LongFind.txt
[modify] https://crrev.com/f99469b2752a554624bc3b6e1770134be738dc6d/third_party/blink/renderer/core/layout/ng/inline/ng_inline_items_builder.cc
[modify] https://crrev.com/f99469b2752a554624bc3b6e1770134be738dc6d/third_party/blink/renderer/core/layout/ng/inline/ng_inline_items_builder_test.cc
[modify] https://crrev.com/f99469b2752a554624bc3b6e1770134be738dc6d/third_party/blink/renderer/core/layout/ng/inline/ng_inline_node_test.cc
[modify] https://crrev.com/f99469b2752a554624bc3b6e1770134be738dc6d/third_party/blink/renderer/core/layout/ng/inline/ng_offset_mapping_test.cc
[modify] https://crrev.com/f99469b2752a554624bc3b6e1770134be738dc6d/third_party/blink/web_tests/flag-specific/enable-blink-features=LayoutNG/css2.1/t1202-counter-04-b-expected.png
[modify] https://crrev.com/f99469b2752a554624bc3b6e1770134be738dc6d/third_party/blink/web_tests/flag-specific/enable-blink-features=LayoutNG/css2.1/t1202-counters-04-b-expected.png
[delete] https://crrev.com/26e9592db563218aec7e8187e7a8c19a24349035/third_party/blink/web_tests/flag-specific/enable-blink-features=LayoutNG/external/wpt/css/css-text/white-space/seg-break-transformation-001-expected.txt
[delete] https://crrev.com/26e9592db563218aec7e8187e7a8c19a24349035/third_party/blink/web_tests/flag-specific/enable-blink-features=LayoutNG/external/wpt/css/css-text/white-space/seg-break-transformation-002-expected.txt
[delete] https://crrev.com/26e9592db563218aec7e8187e7a8c19a24349035/third_party/blink/web_tests/flag-specific/enable-blink-features=LayoutNG/external/wpt/css/css-text/white-space/seg-break-transformation-003-expected.txt
[delete] https://crrev.com/26e9592db563218aec7e8187e7a8c19a24349035/third_party/blink/web_tests/flag-specific/enable-blink-features=LayoutNG/external/wpt/css/css-text/white-space/seg-break-transformation-004-expected.txt
[delete] https://crrev.com/26e9592db563218aec7e8187e7a8c19a24349035/third_party/blink/web_tests/flag-specific/enable-blink-features=LayoutNG/external/wpt/css/css-text/white-space/seg-break-transformation-008-expected.txt
[delete] https://crrev.com/26e9592db563218aec7e8187e7a8c19a24349035/third_party/blink/web_tests/flag-specific/enable-blink-features=LayoutNG/external/wpt/css/css-text/white-space/seg-break-transformation-009-expected.txt
[modify] https://crrev.com/f99469b2752a554624bc3b6e1770134be738dc6d/third_party/blink/web_tests/flag-specific/enable-blink-features=LayoutNG/fast/text/international/002-expected.png

Comment 469 by bugdroid1@chromium.org, Jan 8

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/8bdb03f38dc9a05959906ccbfed9e748e2609410

commit 8bdb03f38dc9a05959906ccbfed9e748e2609410
Author: Koji Ishii <kojii@chromium.org>
Date: Tue Jan 08 04:34:35 2019

Change ShapeResult::LimitNumGlyphs to use binary-search

CL:1370147 discusses the possibility of the pre-shape limit.
Pre-shape limit is faster because it has character array and
that the limit is index-based operations.

Dominik pointed out that the post-shape limit is still needed
even if we have the pre-shape limit because HarfBuzz cluster
is different from the Unicode grapheme cluster, and also the
pre-shape limit may be incorrect for the same reason.

This patch changes ShapeResult::LimitNumGlyphs to use binary
search algorithm to speed it up when the pre-shape limit was
different from HarfBuzz cluster, or when we may not have the
pre-shape limit.

This change improves long-line-nowrap by 17%.
https://pinpoint-dot-chromeperf.appspot.com/job/1492a623140000

This patch has no behavior changes. Tests for this change is
covered by:
  HarfBuzzShaperTest/ShapeParameterTest.MaxGlyphs
      {Simple,ClusterLatin,ClusterLatin2,ClusterDevanagari}
      /{0,1} (0 and 1 are for LTR and RTL)

Bug: 636993, 893967
Change-Id: Ifdf2d094e72cdfc6259d72d4e27511679b095ab2
Reviewed-on: https://chromium-review.googlesource.com/c/1388356
Reviewed-by: Dominik Röttsches <drott@chromium.org>
Commit-Queue: Koji Ishii <kojii@chromium.org>
Cr-Commit-Position: refs/heads/master@{#620620}
[modify] https://crrev.com/8bdb03f38dc9a05959906ccbfed9e748e2609410/third_party/blink/renderer/platform/fonts/shaping/shape_result.cc

Comment 470 by bugdroid1@chromium.org, Jan 9

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/87fd1bc02dc53018b80bbb652c1921c728d3a6d8

commit 87fd1bc02dc53018b80bbb652c1921c728d3a6d8
Author: Ian Kilpatrick <ikilpatrick@chromium.org>
Date: Wed Jan 09 22:23:13 2019

[LayoutNG] Include inline float ancestors in "can fit" calculation.

This fixes float-avoids-padding-inline-ancestors.html.

We need to consider inline ancestors of floating objects to determine
if they can fit on a line. In order not to perform any layout object
tree walking we keep a "depth counter" on the inline item results.

This allows us to not perform a "scan forward" in the common case.

When we detect we *do* have ancestors, it perform a "scan forward",
however this stops whenever we have non-empty content or an open tag,
so should be relatively cheap.

Bug: 636993
Change-Id: Ic7df912de7aef8003b2c0b8a7a653b22eb7bd9f8
Reviewed-on: https://chromium-review.googlesource.com/c/1389475
Commit-Queue: Ian Kilpatrick <ikilpatrick@chromium.org>
Reviewed-by: Koji Ishii <kojii@chromium.org>
Reviewed-by: Morten Stenshorne <mstensho@chromium.org>
Cr-Commit-Position: refs/heads/master@{#621335}
[modify] https://crrev.com/87fd1bc02dc53018b80bbb652c1921c728d3a6d8/third_party/blink/renderer/core/layout/ng/inline/ng_inline_item_result.h
[modify] https://crrev.com/87fd1bc02dc53018b80bbb652c1921c728d3a6d8/third_party/blink/renderer/core/layout/ng/inline/ng_line_breaker.cc
[modify] https://crrev.com/87fd1bc02dc53018b80bbb652c1921c728d3a6d8/third_party/blink/renderer/core/layout/ng/inline/ng_line_breaker.h
[modify] https://crrev.com/87fd1bc02dc53018b80bbb652c1921c728d3a6d8/third_party/blink/renderer/core/layout/ng/ng_box_fragment_builder.cc
[modify] https://crrev.com/87fd1bc02dc53018b80bbb652c1921c728d3a6d8/third_party/blink/web_tests/FlagExpectations/enable-blink-features=LayoutNG

Comment 471 by bugdroid1@chromium.org, Jan 11

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/800e51356e760914b9eb182d02714dd7007080c4

commit 800e51356e760914b9eb182d02714dd7007080c4
Author: Koji Ishii <kojii@chromium.org>
Date: Fri Jan 11 19:00:33 2019

[LayoutNG] Fork UpdateVisualRect loop for when selected

As Finch indicated pre-paint is slower in NG, this patch
splits the loop to compute VisualRect for fragments for when
there's a selection for the LayoutObject and for when not.

By splitting the loop, not only reducing the work within the
loop, we could try to apply simplication of VisualRect for
inline fragments as legacy does.

For the branch when there is a selection, yoichio@ will look
into it after the end of January.

Bug: 636993
Change-Id: Ia06ad95e0cd7e0e9f2d663d26ee2fc7702c05908
Reviewed-on: https://chromium-review.googlesource.com/c/1405948
Reviewed-by: Emil A Eklund <eae@chromium.org>
Reviewed-by: Xianzhu Wang <wangxianzhu@chromium.org>
Commit-Queue: Emil A Eklund <eae@chromium.org>
Cr-Commit-Position: refs/heads/master@{#622078}
[modify] https://crrev.com/800e51356e760914b9eb182d02714dd7007080c4/third_party/blink/renderer/core/paint/paint_invalidator.cc

Comment 472 by bugdroid1@chromium.org, Jan 16

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/c523b7e56ae17c3eb5e9482b6b42691e870f8190

commit c523b7e56ae17c3eb5e9482b6b42691e870f8190
Author: Ian Kilpatrick <ikilpatrick@chromium.org>
Date: Wed Jan 16 15:15:11 2019

[LayoutNG] Fix inserting a child into an anonymous first-line inline.

This fixes a bug that was brought up in:
https://chromium-review.googlesource.com/c/chromium/src/+/1405884

Effectively we now have an anonymous inline wrapper representing the
first-line style. We also have checks in the current codebase relating
to a similar concept with display:contents. Makes sure this branch
is only hit for the display:contents case.

Bug: 636993
Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_layout_ng
Change-Id: I0271952aa981d861cc7a33e646b5594efe22da1f
Reviewed-on: https://chromium-review.googlesource.com/c/1413634
Commit-Queue: Ian Kilpatrick <ikilpatrick@chromium.org>
Reviewed-by: Koji Ishii <kojii@chromium.org>
Reviewed-by: Morten Stenshorne <mstensho@chromium.org>
Reviewed-by: Rune Lillesveen <futhark@chromium.org>
Cr-Commit-Position: refs/heads/master@{#623239}
[modify] https://crrev.com/c523b7e56ae17c3eb5e9482b6b42691e870f8190/third_party/blink/renderer/core/dom/layout_tree_builder.h
[add] https://crrev.com/c523b7e56ae17c3eb5e9482b6b42691e870f8190/third_party/blink/web_tests/external/wpt/css/css-display/display-inline-dynamic-001-ref.html
[add] https://crrev.com/c523b7e56ae17c3eb5e9482b6b42691e870f8190/third_party/blink/web_tests/external/wpt/css/css-display/display-inline-dynamic-001.html

Comment 473 by bugdroid, Feb 2

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/96b0463e0620ac7a73f79d5a64ae20078b2df12a

commit 96b0463e0620ac7a73f79d5a64ae20078b2df12a
Author: Ian Kilpatrick <ikilpatrick@chromium.org>
Date: Sat Feb 02 07:52:18 2019

[LayoutNG] Reduce the number of paint invalidations.

This change does two things:
 - When reusing a cached layout result, we now don't check the subtree
   for a paint invalidation. Instead it appears we only need this if
   we have a clip property, and the visual rect on an arbitrary
   ancestor may change.

 - Within ng_paint_fragment only force paint invalidations on non-box
   fragment children, and when the geometry has changed.

All the invalidation updates seem strictly better, we now aren't
invalidating thing like floats which don't move / no geom change, etc.

Bug: 636993
Change-Id: I4679a0a7bbc39f7a85a17dba35d18e89acf2f1e4
Reviewed-on: https://chromium-review.googlesource.com/c/1445908
Commit-Queue: Ian Kilpatrick <ikilpatrick@chromium.org>
Reviewed-by: Xianzhu Wang <wangxianzhu@chromium.org>
Reviewed-by: Koji Ishii <kojii@chromium.org>
Reviewed-by: Christian Biesinger <cbiesinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#628576}
[modify] https://crrev.com/96b0463e0620ac7a73f79d5a64ae20078b2df12a/third_party/blink/renderer/core/layout/ng/geometry/ng_physical_offset.h
[modify] https://crrev.com/96b0463e0620ac7a73f79d5a64ae20078b2df12a/third_party/blink/renderer/core/layout/ng/ng_block_node.cc
[modify] https://crrev.com/96b0463e0620ac7a73f79d5a64ae20078b2df12a/third_party/blink/renderer/core/paint/ng/ng_paint_fragment.cc
[modify] https://crrev.com/96b0463e0620ac7a73f79d5a64ae20078b2df12a/third_party/blink/renderer/core/scheduler/frame_throttling_test.cc
[modify] https://crrev.com/96b0463e0620ac7a73f79d5a64ae20078b2df12a/third_party/blink/web_tests/FlagExpectations/enable-blink-features=LayoutNG
[modify] https://crrev.com/96b0463e0620ac7a73f79d5a64ae20078b2df12a/third_party/blink/web_tests/TestExpectations
[delete] https://crrev.com/c5cbca79da09e09286006eef37c064db3d517cf4/third_party/blink/web_tests/flag-specific/enable-blink-features=LayoutNG/paint/invalidation/compositing/containing-block-added-expected.txt
[delete] https://crrev.com/c5cbca79da09e09286006eef37c064db3d517cf4/third_party/blink/web_tests/flag-specific/enable-blink-features=LayoutNG/paint/invalidation/compositing/containing-block-added-individual-expected.txt
[delete] https://crrev.com/c5cbca79da09e09286006eef37c064db3d517cf4/third_party/blink/web_tests/flag-specific/enable-blink-features=LayoutNG/paint/invalidation/compositing/containing-block-removed-expected.txt
[delete] https://crrev.com/c5cbca79da09e09286006eef37c064db3d517cf4/third_party/blink/web_tests/flag-specific/enable-blink-features=LayoutNG/paint/invalidation/compositing/containing-block-removed-individual-expected.txt
[delete] https://crrev.com/c5cbca79da09e09286006eef37c064db3d517cf4/third_party/blink/web_tests/flag-specific/enable-blink-features=LayoutNG/paint/invalidation/compositing/repaint-via-layout-offset-expected.txt
[modify] https://crrev.com/96b0463e0620ac7a73f79d5a64ae20078b2df12a/third_party/blink/web_tests/flag-specific/enable-blink-features=LayoutNG/paint/invalidation/gradients-em-stops-repaint-expected.txt
[modify] https://crrev.com/96b0463e0620ac7a73f79d5a64ae20078b2df12a/third_party/blink/web_tests/flag-specific/enable-blink-features=LayoutNG/paint/invalidation/line-flow-with-floats-1-expected.txt
[modify] https://crrev.com/96b0463e0620ac7a73f79d5a64ae20078b2df12a/third_party/blink/web_tests/flag-specific/enable-blink-features=LayoutNG/paint/invalidation/line-flow-with-floats-10-expected.txt
[modify] https://crrev.com/96b0463e0620ac7a73f79d5a64ae20078b2df12a/third_party/blink/web_tests/flag-specific/enable-blink-features=LayoutNG/paint/invalidation/line-flow-with-floats-3-expected.txt
[modify] https://crrev.com/96b0463e0620ac7a73f79d5a64ae20078b2df12a/third_party/blink/web_tests/flag-specific/enable-blink-features=LayoutNG/paint/invalidation/line-flow-with-floats-4-expected.txt
[modify] https://crrev.com/96b0463e0620ac7a73f79d5a64ae20078b2df12a/third_party/blink/web_tests/flag-specific/enable-blink-features=LayoutNG/paint/invalidation/line-flow-with-floats-5-expected.txt
[modify] https://crrev.com/96b0463e0620ac7a73f79d5a64ae20078b2df12a/third_party/blink/web_tests/flag-specific/enable-blink-features=LayoutNG/paint/invalidation/line-flow-with-floats-6-expected.txt
[modify] https://crrev.com/96b0463e0620ac7a73f79d5a64ae20078b2df12a/third_party/blink/web_tests/flag-specific/enable-blink-features=LayoutNG/paint/invalidation/line-flow-with-floats-7-expected.txt
[modify] https://crrev.com/96b0463e0620ac7a73f79d5a64ae20078b2df12a/third_party/blink/web_tests/flag-specific/enable-blink-features=LayoutNG/paint/invalidation/line-flow-with-floats-8-expected.txt
[modify] https://crrev.com/96b0463e0620ac7a73f79d5a64ae20078b2df12a/third_party/blink/web_tests/flag-specific/enable-blink-features=LayoutNG/paint/invalidation/line-flow-with-floats-9-expected.txt
[modify] https://crrev.com/96b0463e0620ac7a73f79d5a64ae20078b2df12a/third_party/blink/web_tests/flag-specific/enable-blink-features=LayoutNG/paint/invalidation/outline/focus-ring-on-child-move-expected.txt
[modify] https://crrev.com/96b0463e0620ac7a73f79d5a64ae20078b2df12a/third_party/blink/web_tests/flag-specific/enable-blink-features=LayoutNG/paint/invalidation/outline/outline-containing-image-in-non-standard-mode-expected.txt
[modify] https://crrev.com/96b0463e0620ac7a73f79d5a64ae20078b2df12a/third_party/blink/web_tests/flag-specific/enable-blink-features=LayoutNG/paint/invalidation/position/inline-relative-positioned-expected.txt
[modify] https://crrev.com/96b0463e0620ac7a73f79d5a64ae20078b2df12a/third_party/blink/web_tests/flag-specific/enable-blink-features=LayoutNG/paint/invalidation/reflection/reflection-with-rotation-expected.txt
[modify] https://crrev.com/96b0463e0620ac7a73f79d5a64ae20078b2df12a/third_party/blink/web_tests/flag-specific/enable-blink-features=LayoutNG/paint/invalidation/remove-inline-after-layout-expected.txt
[delete] https://crrev.com/c5cbca79da09e09286006eef37c064db3d517cf4/third_party/blink/web_tests/flag-specific/enable-blink-features=LayoutNG/paint/invalidation/scroll/fixed-child-of-transformed-move-after-scroll-expected.txt
[modify] https://crrev.com/96b0463e0620ac7a73f79d5a64ae20078b2df12a/third_party/blink/web_tests/flag-specific/enable-blink-features=LayoutNG/paint/invalidation/subtree-root-skipped-expected.txt
[modify] https://crrev.com/96b0463e0620ac7a73f79d5a64ae20078b2df12a/third_party/blink/web_tests/flag-specific/enable-blink-features=LayoutNG/paint/invalidation/svg/svg-image-change-content-size-expected.txt
[modify] https://crrev.com/96b0463e0620ac7a73f79d5a64ae20078b2df12a/third_party/blink/web_tests/flag-specific/enable-blink-features=LayoutNG/paint/invalidation/transform/transform-layout-repaint-expected.txt
[add] https://crrev.com/96b0463e0620ac7a73f79d5a64ae20078b2df12a/third_party/blink/web_tests/flag-specific/enable-blink-features=LayoutNG/paint/invalidation/vertical-align-length1-expected.txt
[add] https://crrev.com/96b0463e0620ac7a73f79d5a64ae20078b2df12a/third_party/blink/web_tests/flag-specific/enable-blink-features=LayoutNG/paint/invalidation/vertical-align-length2-expected.txt
[add] https://crrev.com/96b0463e0620ac7a73f79d5a64ae20078b2df12a/third_party/blink/web_tests/flag-specific/enable-blink-features=LayoutNG/paint/invalidation/vertical-align1-expected.txt
[add] https://crrev.com/96b0463e0620ac7a73f79d5a64ae20078b2df12a/third_party/blink/web_tests/flag-specific/enable-blink-features=LayoutNG/paint/invalidation/vertical-align2-expected.txt

Comment 474 by bugdroid, Feb 8

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/5c535a9802050a5d9549451ac4b32086a7d47456

commit 5c535a9802050a5d9549451ac4b32086a7d47456
Author: Koji Ishii <kojii@chromium.org>
Date: Fri Feb 08 05:57:38 2019

Simplify LayoutObject::IsSelected

It turned out that |LayoutObject:IsSelected()| is not as fast
as it was expected, when used in very hot functions. Maybe it
could be inlined in the official build, but keeping this fast
and small helps running perf tests at least.

This patch also turns |IsTextFragment()| into a bit-field, to
avoid a virtual call which prevents inlining fast code path.

This patch is to help LayoutNG pre-paint faster.

Bug: 636993
Change-Id: I42223c2ee954fe5fc25e2c3fff0c07f639ee6dd7
Reviewed-on: https://chromium-review.googlesource.com/c/1460576
Reviewed-by: Yoshifumi Inoue <yosin@chromium.org>
Commit-Queue: Koji Ishii <kojii@chromium.org>
Cr-Commit-Position: refs/heads/master@{#630217}
[modify] https://crrev.com/5c535a9802050a5d9549451ac4b32086a7d47456/third_party/blink/renderer/core/layout/layout_object.cc
[modify] https://crrev.com/5c535a9802050a5d9549451ac4b32086a7d47456/third_party/blink/renderer/core/layout/layout_text.cc
[modify] https://crrev.com/5c535a9802050a5d9549451ac4b32086a7d47456/third_party/blink/renderer/core/layout/layout_text.h
[modify] https://crrev.com/5c535a9802050a5d9549451ac4b32086a7d47456/third_party/blink/renderer/core/layout/layout_text_fragment.cc
[modify] https://crrev.com/5c535a9802050a5d9549451ac4b32086a7d47456/third_party/blink/renderer/core/layout/layout_text_fragment.h

Comment 475 by bugdroid, Feb 8

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/2ae89b5690bf34bee4807a949f8e2ce11a61f1b9

commit 2ae89b5690bf34bee4807a949f8e2ce11a61f1b9
Author: Koji Ishii <kojii@chromium.org>
Date: Fri Feb 08 07:19:37 2019

[LayoutNG] Fix LocalVisualRect to include LocalSelectionRect

From the discussion with wangxianzhu@, NG differs from legacy
in that LocalVisualRect does not include LocalSelectionRect,
and it is causing additional computation in PaintInvalidator.

This wasn't the intention, and the fix in PaintInvalidator
lead to additional work in pre-paint phase. This patch fixes
LocalVisualRect to include LocalSelectionRect when it is
selected.

LayoutObject::IsSelected turned out to be slow for this
purpose. Its improvement is in a separate CL:1460576.

Also this change figured out that LocalSelectionRect is in
different coordinate than legacy. Filed issue 930034 for it
to work on later as there might be impacts to other code.

Bug: 636993, 930034
Change-Id: If02d17dbc88e3d7195050d87b8a3b425f4158375
Reviewed-on: https://chromium-review.googlesource.com/c/1457812
Reviewed-by: Yoshifumi Inoue <yosin@chromium.org>
Reviewed-by: Xianzhu Wang <wangxianzhu@chromium.org>
Commit-Queue: Koji Ishii <kojii@chromium.org>
Cr-Commit-Position: refs/heads/master@{#630233}
[modify] https://crrev.com/2ae89b5690bf34bee4807a949f8e2ce11a61f1b9/third_party/blink/renderer/core/layout/layout_text.cc
[modify] https://crrev.com/2ae89b5690bf34bee4807a949f8e2ce11a61f1b9/third_party/blink/web_tests/FlagExpectations/enable-blink-features=LayoutNG

Comment 476 by bugdroid, Feb 12 (5 days ago)

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/2e74dd68453b6036a8d5bb4d78f51888b2f335fc

commit 2e74dd68453b6036a8d5bb4d78f51888b2f335fc
Author: Xianzhu Wang <wangxianzhu@chromium.org>
Date: Tue Feb 12 03:25:06 2019

[LayoutNG] Remove NGPaintFragment selection invalidation logic

Now we are (maybe temporarily) using the containing LayoutObject's
visual rect for NGPaintFragments, and we have included selection
into LayoutText's visual rect (crrev.com/c/1457812), so we can
remove the NGPaintFragment selection invalidation logic to avoid
the extra cost and complexity.

Bug: 636993
Change-Id: Ia87ee6a25b3ad78ddb4e365daaddeddf43bfbb70
Reviewed-on: https://chromium-review.googlesource.com/c/1461184
Commit-Queue: Xianzhu Wang <wangxianzhu@chromium.org>
Reviewed-by: Yoichi Osato <yoichio@chromium.org>
Reviewed-by: Chris Harrelson <chrishtr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#631074}
[modify] https://crrev.com/2e74dd68453b6036a8d5bb4d78f51888b2f335fc/third_party/blink/renderer/core/layout/layout_object.cc
[modify] https://crrev.com/2e74dd68453b6036a8d5bb4d78f51888b2f335fc/third_party/blink/renderer/core/layout/layout_object.h
[modify] https://crrev.com/2e74dd68453b6036a8d5bb4d78f51888b2f335fc/third_party/blink/renderer/core/paint/ng/ng_paint_fragment.cc
[modify] https://crrev.com/2e74dd68453b6036a8d5bb4d78f51888b2f335fc/third_party/blink/renderer/core/paint/ng/ng_paint_fragment.h
[modify] https://crrev.com/2e74dd68453b6036a8d5bb4d78f51888b2f335fc/third_party/blink/renderer/core/paint/ng/ng_paint_fragment_test.cc
[modify] https://crrev.com/2e74dd68453b6036a8d5bb4d78f51888b2f335fc/third_party/blink/renderer/core/paint/object_paint_invalidator.cc
[modify] https://crrev.com/2e74dd68453b6036a8d5bb4d78f51888b2f335fc/third_party/blink/renderer/core/paint/paint_invalidator.cc
[modify] https://crrev.com/2e74dd68453b6036a8d5bb4d78f51888b2f335fc/third_party/blink/renderer/core/paint/paint_invalidator.h
[modify] https://crrev.com/2e74dd68453b6036a8d5bb4d78f51888b2f335fc/third_party/blink/web_tests/FlagExpectations/enable-blink-features=LayoutNG
[modify] https://crrev.com/2e74dd68453b6036a8d5bb4d78f51888b2f335fc/third_party/blink/web_tests/flag-specific/enable-blink-features=LayoutNG/compositing/squashing/selection-repaint-with-gaps-expected.txt
[modify] https://crrev.com/2e74dd68453b6036a8d5bb4d78f51888b2f335fc/third_party/blink/web_tests/flag-specific/enable-blink-features=LayoutNG/paint/invalidation/selection/invalidation-rect-includes-newline-expected.txt
[modify] https://crrev.com/2e74dd68453b6036a8d5bb4d78f51888b2f335fc/third_party/blink/web_tests/flag-specific/enable-blink-features=LayoutNG/paint/invalidation/selection/invalidation-rect-includes-newline-for-rtl-expected.txt
[modify] https://crrev.com/2e74dd68453b6036a8d5bb4d78f51888b2f335fc/third_party/blink/web_tests/flag-specific/enable-blink-features=LayoutNG/paint/invalidation/selection/invalidation-rect-includes-newline-for-vertical-lr-expected.txt
[modify] https://crrev.com/2e74dd68453b6036a8d5bb4d78f51888b2f335fc/third_party/blink/web_tests/flag-specific/enable-blink-features=LayoutNG/paint/invalidation/selection/invalidation-rect-includes-newline-for-vertical-rl-expected.txt
[modify] https://crrev.com/2e74dd68453b6036a8d5bb4d78f51888b2f335fc/third_party/blink/web_tests/flag-specific/enable-blink-features=LayoutNG/paint/invalidation/selection/selection-clear-expected.txt
[modify] https://crrev.com/2e74dd68453b6036a8d5bb4d78f51888b2f335fc/third_party/blink/web_tests/flag-specific/enable-blink-features=LayoutNG/paint/invalidation/selection/selection-partial-invalidation-between-blocks-expected.txt
[modify] https://crrev.com/2e74dd68453b6036a8d5bb4d78f51888b2f335fc/third_party/blink/web_tests/flag-specific/enable-blink-features=LayoutNG/paint/invalidation/selection/selection-within-composited-scroller-expected.txt
[modify] https://crrev.com/2e74dd68453b6036a8d5bb4d78f51888b2f335fc/third_party/blink/web_tests/flag-specific/enable-blink-features=LayoutNG/paint/invalidation/selection/text-selection-rect-in-overflow-expected.txt

Comment 477 by bugdroid, Feb 12 (5 days ago)

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/c113ca57feaea96c38f1b8ec21eb5541466bda84

commit c113ca57feaea96c38f1b8ec21eb5541466bda84
Author: Koji Ishii <kojii@chromium.org>
Date: Tue Feb 12 05:46:41 2019

[LayoutNG] Add |changes_may_affect_earlier_lines_| flag

This patch adds a flag that indicates, within the
NGInlineNode, changes to LayoutObject/NGInlineItem may affect
earlier lines than the object was laid out.

When reusing cached lines, changed objects dirties line boxes
their previous object belongs to, and NG reuses lines up to
the first dirty line. However, when `unicode-bidi: plaintext`
is applied, changing text may change the whole block when the
first strong character was changed.

inline-plaintext-relayout-with-leading-neutrals.html sometimes
crashes due to this problem.

Bug: 636993
Change-Id: Id9843a45d1af69ca4ffa3484183a6f3229a34049
Reviewed-on: https://chromium-review.googlesource.com/c/1454068
Commit-Queue: Koji Ishii <kojii@chromium.org>
Reviewed-by: Emil A Eklund <eae@chromium.org>
Cr-Commit-Position: refs/heads/master@{#631125}
[modify] https://crrev.com/c113ca57feaea96c38f1b8ec21eb5541466bda84/third_party/blink/renderer/core/layout/ng/inline/ng_inline_items_builder.cc
[modify] https://crrev.com/c113ca57feaea96c38f1b8ec21eb5541466bda84/third_party/blink/renderer/core/layout/ng/inline/ng_inline_items_builder.h
[modify] https://crrev.com/c113ca57feaea96c38f1b8ec21eb5541466bda84/third_party/blink/renderer/core/layout/ng/inline/ng_inline_node.cc
[modify] https://crrev.com/c113ca57feaea96c38f1b8ec21eb5541466bda84/third_party/blink/renderer/core/layout/ng/inline/ng_inline_node_data.h

Comment 478 by bugdroid, Feb 14 (2 days ago)

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/3839931b925906ee7d1ff22f58eb2a764c5ee6e6

commit 3839931b925906ee7d1ff22f58eb2a764c5ee6e6
Author: Koji Ishii <kojii@chromium.org>
Date: Thu Feb 14 20:45:58 2019

[LayoutNG] Skip re-shaping at line end when reasonable

Some fonts have kerning between some characters and the space
character, which is unsafe if the line wraps there and the
space becomes a trailing space to be removed.

This patch avoids such reshaping unless the width of the text
is visible.

This patch improves:
  ArabicLineLayout by 40%
  chapter-reflow-once-random by 40%
  loading.desktop FCP:layout by 1-4%

Bug: 636993
Change-Id: Ifc190ccbce164b1ba498e922f98ffaa9b1c181f4
Reviewed-on: https://chromium-review.googlesource.com/c/1469846
Commit-Queue: Koji Ishii <kojii@chromium.org>
Reviewed-by: Emil A Eklund <eae@chromium.org>
Cr-Commit-Position: refs/heads/master@{#632350}
[modify] https://crrev.com/3839931b925906ee7d1ff22f58eb2a764c5ee6e6/third_party/blink/renderer/core/layout/ng/inline/ng_inline_item_result.cc
[modify] https://crrev.com/3839931b925906ee7d1ff22f58eb2a764c5ee6e6/third_party/blink/renderer/core/layout/ng/inline/ng_inline_item_result.h
[modify] https://crrev.com/3839931b925906ee7d1ff22f58eb2a764c5ee6e6/third_party/blink/renderer/core/layout/ng/inline/ng_line_breaker.cc
[modify] https://crrev.com/3839931b925906ee7d1ff22f58eb2a764c5ee6e6/third_party/blink/renderer/platform/fonts/shaping/shaping_line_breaker.cc
[modify] https://crrev.com/3839931b925906ee7d1ff22f58eb2a764c5ee6e6/third_party/blink/renderer/platform/fonts/shaping/shaping_line_breaker.h

Comment 479 by bugdroid, Feb 15 (2 days ago)

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/67bc4955b594fc1ef82fd13d3b44304e200ee541

commit 67bc4955b594fc1ef82fd13d3b44304e200ee541
Author: Koji Ishii <kojii@chromium.org>
Date: Fri Feb 15 04:17:47 2019

[LayoutNG] Avoid copying scoped_refptr in NGInlineItem::TextShapeResult

Change-Id: I4e1e311fa8d6796e71d6969a59636c1f691a6e5a
Bug: 636993
Reviewed-on: https://chromium-review.googlesource.com/c/1472310
Reviewed-by: Emil A Eklund <eae@chromium.org>
Commit-Queue: Koji Ishii <kojii@chromium.org>
Cr-Commit-Position: refs/heads/master@{#632501}
[modify] https://crrev.com/67bc4955b594fc1ef82fd13d3b44304e200ee541/third_party/blink/renderer/core/layout/ng/inline/ng_inline_item.h
Showing comments 380 - 479 of 479 Older

Sign in to add a comment