New issue
Advanced search Search tips

Issue 892491 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Oct 5
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug-Regression

Blocking:
issue 887148



Sign in to add a comment

Element.innerText emits collapsed whitespace after hard line break

Project Member Reported by xiaoche...@chromium.org, Oct 5

Issue description

Chrome Version: 71.0.3571.0 (Developer Build) (64-bit)
OS: Linux

What steps will reproduce the problem?
(1) Navigate to "data:text/html, foo<br> bar"
(2) Open console and get document.body.innerText value

What is the expected result?

Should get "foo\nbar"

What happens instead?

Got "foo\n bar" instead

Doesn't reproduce in M69 Stable.

This is a recent regression broken in M70 due to new implementation of Element.innerText (crrev.com/c/1114673).
 
Blocking: 887148
This is found when trying to use innerText as text dump for compositing/text-on-scaled-surface.html. Let's not check in a wrong baseline.

yosin@: Like before, I can take it over if you are occupied.
Components: -Blink>Editing Blink>Editing>Serialization
Status: Started (was: Assigned)
Thanks for finding this!

I take this. The fix should be one line. It should be done today. You'll see fixed version your tomorrow morning.
In review: http://crrev.com/c/1263638
If you're still working and the patch passes try bots, please start reviewing.
I'll have lunch next one hour.
Project Member

Comment 4 by bugdroid1@chromium.org, Oct 5

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

commit dcbec5e8829fe152c981265094c1b7fc35f9274d
Author: Yoshifumi Inoue <yosin@chromium.org>
Date: Fri Oct 05 05:36:42 2018

Make Element#innerText to collapse white spaces after <br>

This patch makes Element#innerText to collapse white space after <br> to avoid
emitting extra space for improving interop.

Bug:  892491 
Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_layout_ng
Change-Id: I8dd429a8af6ecd2e6d5195d6a6ec7b0214c6345c
Reviewed-on: https://chromium-review.googlesource.com/c/1263638
Reviewed-by: Yoichi Osato <yoichio@chromium.org>
Commit-Queue: Yoshifumi Inoue <yosin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#597004}
[modify] https://crrev.com/dcbec5e8829fe152c981265094c1b7fc35f9274d/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/the-innertext-idl-attribute/getter-expected.txt
[modify] https://crrev.com/dcbec5e8829fe152c981265094c1b7fc35f9274d/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/the-innertext-idl-attribute/getter-tests.js
[modify] https://crrev.com/dcbec5e8829fe152c981265094c1b7fc35f9274d/third_party/WebKit/LayoutTests/fast/dom/inner-text-001-expected.txt
[modify] https://crrev.com/dcbec5e8829fe152c981265094c1b7fc35f9274d/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/external/wpt/html/dom/elements/the-innertext-idl-attribute/getter-expected.txt
[modify] https://crrev.com/dcbec5e8829fe152c981265094c1b7fc35f9274d/third_party/blink/renderer/core/editing/element_inner_text.cc

Status: Fixed (was: Started)

Sign in to add a comment