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

Issue 746437 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Aug 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

The CanHaveWhitespaceChildren optimization is not quite correct.

Project Member Reported by eco...@igalia.com, Jul 19 2017

Issue description

Chrome Version: (copy from chrome://version)
OS: (e.g. Win7, OSX 10.9.5, etc...)

What steps will reproduce the problem?
(1) Open attached test-case.

What is the expected result?

  The two lines render in the same way.

What happens instead?

  The line at the top doesn't show the whitespace in between "A" and "B", because of this line: https://cs.chromium.org/chromium/src/third_party/WebKit/Source/core/dom/Text.cpp?l=286&rcl=d668cd5b0067c252e8c83d826a213d2d776b5c39.

  I disabled this optimization for display: contents, but as rune noticed it's broken more generally.

  I'm not sure I'll have the time to take this near-term, but the fix is presumably not too hard, so I'll try this evening to come up with something sound.
 
test.html
274 bytes View Download

Comment 1 by eco...@igalia.com, Jul 19 2017

Actually, I'll give this a shot r/n. If the fix is what I think it is it should be quite easy.

Comment 2 by eco...@igalia.com, Jul 19 2017

Status: Started (was: Available)

Comment 3 by eco...@igalia.com, Jul 19 2017

I think https://chromium-review.googlesource.com/c/575982/ is the right fix, let's see what CQ thinks.

Comment 4 by meade@chromium.org, Jul 20 2017

Cc: hayato@chromium.org
Components: -Blink>Layout
Labels: Hotlist-Polish Update-Quarterly
Removing Blink>Layout since in Style we try to have only one component per bug to make ownership clear.

Comment 5 by meade@chromium.org, Jul 20 2017

Owner: eco...@igalia.com
Assigning since you seem to be working on it :)
Project Member

Comment 6 by bugdroid1@chromium.org, Aug 1 2017

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

commit f3553bbf108ba4644dbca90e0e39f805fcda5aeb
Author: Emilio Cobos Álvarez <ecobos@igalia.com>
Date: Tue Aug 01 13:40:58 2017

Account for sibling text nodes in CanHaveWhitespaceChildren.

Not doing it results in incorrect behavior when there are multiple adjacent
text nodes, either script-generated ones or because of display: contents.

BUG= 746437 , 657748 

Change-Id: If5aa9209d16d5532629a0f0e2f1730d18a193ebf
Reviewed-on: https://chromium-review.googlesource.com/575982
Reviewed-by: Rune Lillesveen <rune@opera.com>
Commit-Queue: Emilio Cobos Álvarez <ecobos@igalia.com>
Cr-Commit-Position: refs/heads/master@{#490971}
[modify] https://crrev.com/f3553bbf108ba4644dbca90e0e39f805fcda5aeb/third_party/WebKit/LayoutTests/TestExpectations
[add] https://crrev.com/f3553bbf108ba4644dbca90e0e39f805fcda5aeb/third_party/WebKit/LayoutTests/fast/css/whitespace-between-text-flex-expected.html
[add] https://crrev.com/f3553bbf108ba4644dbca90e0e39f805fcda5aeb/third_party/WebKit/LayoutTests/fast/css/whitespace-between-text-flex-preserve-expected.html
[add] https://crrev.com/f3553bbf108ba4644dbca90e0e39f805fcda5aeb/third_party/WebKit/LayoutTests/fast/css/whitespace-between-text-flex-preserve.html
[add] https://crrev.com/f3553bbf108ba4644dbca90e0e39f805fcda5aeb/third_party/WebKit/LayoutTests/fast/css/whitespace-between-text-flex.html
[modify] https://crrev.com/f3553bbf108ba4644dbca90e0e39f805fcda5aeb/third_party/WebKit/Source/core/dom/Text.cpp

Comment 7 by r...@opera.com, Aug 7 2017

This can be marked as fixed now?

Comment 8 by eco...@igalia.com, Aug 7 2017

Status: Fixed (was: Started)
Yes, good call :)

Sign in to add a comment