Closed Bug 1743382 Opened 2 years ago Closed 2 years ago

[wpt-sync] Sync PR 31775 - Reland "Initial support for text-decoration-line: spelling|grammar-error"

Categories

(Core :: Layout: Text and Fonts, task, P4)

task

Tracking

()

RESOLVED FIXED
96 Branch
Tracking Status
firefox96 --- fixed

People

(Reporter: mozilla.org, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

Manuel Rego Casasnovas <rego@igalia.com> wrote:

Reland "Initial support for text-decoration-line: spelling|grammar-error"

This is a reland of 643df2d079fac73cb420e6cd074c79d5a739f63d

It missed rebaselines for Mac 10.12.

Original change's description:

Initial support for text-decoration-line: spelling|grammar-error

This adds the initial support for spelling-error and grammar-error
values of text-decoration-line property.

Main changes are in TextDecorationInfo, where we need to support
the new values and paint the decoration correctly.
In Mac platform we use a dotted decoration to match
the platform conventions.
In other platforms we use a wavy decoration, but we modify it
so it looks similar to the spelling and grammar markers
in Microsoft Word.

It's important to note that this is just an intermediate step,
as this is different than how we currently paint
the spelling and grammar errors in DocumentMarkerPainter.
The idea would be make DocumentMarkerPainter use CSS text decorations
and then use this new code added here.

There are some known issues:

  • The underline offset is not the same than in Microsoft Word,
    but that's because of a problem with regular underlines
    not using the font metrics to compute that offset (crbug.com/1273042).
  • We should allow to tweak the color with text-decoration-color,
    added a TODO about that.

BUG=1163436

Change-Id: I117ad38fe3fc805619eb47b1df2f48c9d7c9a351
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3297885
Commit-Queue: Delan Azabani \<dazabani@igalia.com>
Reviewed-by: Delan Azabani \<dazabani@igalia.com>
Reviewed-by: Stephen Chenney \<schenney@chromium.org>
Cr-Commit-Position: refs/heads/main@{#945876}

Bug: 1163436
Change-Id: I8c719644a611fef901ad60e25aa19f5b53ce199e

Reviewed-on: https://chromium-review.googlesource.com/3306472
WPT-Export-Revision: d86584290c0fbb9fa387d3b5c8374b0f4c5afe36

Component: web-platform-tests → Layout: Text and Fonts
Product: Testing → Core

CI Results

Ran 11 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI

Total 6 tests

Status Summary

Firefox

PASS: 4
FAIL: 2

Chrome

PASS: 4
FAIL: 2

Safari

PASS: 4
FAIL: 2

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

/css/css-text-decor/text-decoration-line-grammar-error-color-001.optional.html: FAIL (Chrome: FAIL, Safari: FAIL)
/css/css-text-decor/text-decoration-line-spelling-error-color-001.optional.html: FAIL (Chrome: FAIL, Safari: FAIL)

Pushed by wptsync@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/f650cb6d02f2
[wpt PR 31775] - Reland "Initial support for text-decoration-line: spelling|grammar-error", a=testonly
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 96 Branch
You need to log in before you can comment on or make changes to this bug.