Closed Bug 1484967 Opened Last year Closed Last year

[wpt-sync] Sync PR 12588 - Don't do whitespace re-attachment for ::first-letter.

Categories

(Core :: CSS Parsing and Computation, enhancement, P4)

enhancement

Tracking

()

RESOLVED FIXED
mozilla63
Tracking Status
firefox63 --- fixed

People

(Reporter: wptsync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 12588 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/12588
Details from upstream follow.

Rune Lillesveen <futhark@chromium.org> wrote:
>  Don't do whitespace re-attachment for ::first-letter.
>  
>  If we have a white-space node before the text node with the first
>  letter, we would try to re-attach the white-space node with an incorrect
>  previous in-flow LayoutObject because we attach the ::first-letter after
>  all children have been attached, not where the ::first-letter would end
>  up in the layout tree.
>  
>  We don't need to re-attach whitespace after ::first-letter because:
>  
>  * We always create a remaining LayoutTextFragment for the text node
>    which contains the first formatted letter. Wether the remaining text
>    consists of white-space or is even empty.
>  
>  * If the LayoutObject sibling following first-letter+remaining-text
>    consists of white-space, it would have gotten a LayoutObject when
>    attaching the LayoutText for the text node where the first-letter
>    comes from.
>  
>  That is, we will always have a LayoutObject for a white-space LayoutText
>  sibling of a first-letter LayoutObject.
>  
>  Split out a separate method for ::first-letter for less complexity and
>  cost with which WhitespaceAttacher to use.
>  
>  Bug: 876150
>  Change-Id: Ib1f34f0ba596d5fa5f1c7fcbd7c75550dd4f9d12
>  Reviewed-on: https://chromium-review.googlesource.com/1183231
>  WPT-Export-Revision: ac34ff7c0dff7b2a05bc4da8af53d62b16da7cf1
Component: web-platform-tests → CSS Parsing and Computation
Product: Testing → Core
Whiteboard: [wptsync downstream] → [wptsync downstream error]
Whiteboard: [wptsync downstream error] → [wptsync downstream]
Whiteboard: [wptsync downstream] → [wptsync downstream error]
Whiteboard: [wptsync downstream error] → [wptsync downstream]
Whiteboard: [wptsync downstream] → [wptsync downstream error]
Whiteboard: [wptsync downstream error] → [wptsync downstream]
Whiteboard: [wptsync downstream] → [wptsync downstream error]
Whiteboard: [wptsync downstream error] → [wptsync downstream]
Ran 1 tests
FAIL   : 1

New tests that have failures or other problems:
/css/css-pseudo/first-letter-and-whitespace.html: FAIL
Pushed by wptsync@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/19f6b50906ea
[wpt PR 12588] - Don't do whitespace re-attachment for ::first-letter., a=testonly
https://hg.mozilla.org/integration/mozilla-inbound/rev/a0efed7d5de3
[wpt PR 12588] - Update wpt metadata, a=testonly
https://hg.mozilla.org/mozilla-central/rev/19f6b50906ea
https://hg.mozilla.org/mozilla-central/rev/a0efed7d5de3
Status: NEW → RESOLVED
Closed: Last year
Resolution: --- → FIXED
Target Milestone: --- → mozilla63
You need to log in before you can comment on or make changes to this bug.