Bug 234707 - REGRESSION(r286955): Fix painting text-decorations with combined text
Summary: REGRESSION(r286955): Fix painting text-decorations with combined text
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Text (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Tim Nguyen (:ntim)
URL:
Keywords: InRadar
Depends on:
Blocks: 150821 227445
  Show dependency treegraph
 
Reported: 2021-12-27 13:53 PST by Tim Nguyen (:ntim)
Modified: 2021-12-30 17:33 PST (History)
12 users (show)

See Also:


Attachments
Patch (4.75 KB, patch)
2021-12-27 14:49 PST, Tim Nguyen (:ntim)
dino: review+
Details | Formatted Diff | Diff
Screenshot of bug (561.54 KB, image/png)
2021-12-27 15:13 PST, Tim Nguyen (:ntim)
no flags Details
Expected result (597.96 KB, image/png)
2021-12-27 15:14 PST, Tim Nguyen (:ntim)
no flags Details
Patch (4.88 KB, patch)
2021-12-30 16:34 PST, Tim Nguyen (:ntim)
no flags Details | Formatted Diff | Diff
Patch (4.88 KB, patch)
2021-12-30 16:35 PST, Tim Nguyen (:ntim)
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tim Nguyen (:ntim) 2021-12-27 13:53:06 PST
I screwed this up in bug 227445

WPT: imported/w3c/web-platform-tests/css/css-writing-modes/text-combine-upright-decorations-001.html
Comment 1 Radar WebKit Bug Importer 2021-12-27 13:53:36 PST
<rdar://problem/86944442>
Comment 2 Tim Nguyen (:ntim) 2021-12-27 14:49:18 PST
Created attachment 448007 [details]
Patch
Comment 3 Tim Nguyen (:ntim) 2021-12-27 14:49:39 PST
Submitted web-platform-tests pull request: https://github.com/web-platform-tests/wpt/pull/32204
Comment 4 EWS Watchlist 2021-12-27 14:50:28 PST
This patch modifies the imported WPT tests. Please ensure that any changes on the tests (not coming from a WPT import) are exported to WPT. Please see https://trac.webkit.org/wiki/WPTExportProcess
Comment 5 Tim Nguyen (:ntim) 2021-12-27 15:13:21 PST
Created attachment 448011 [details]
Screenshot of bug
Comment 6 Tim Nguyen (:ntim) 2021-12-27 15:14:10 PST
Created attachment 448012 [details]
Expected result
Comment 7 Darin Adler 2021-12-27 16:05:41 PST
Comment on attachment 448007 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=448007&action=review

> Source/WebCore/ChangeLog:8
> +        Test: imported/w3c/web-platform-tests/css/css-writing-modes/text-combine-upright-decorations-001.html

Has this test been failing? If not, then how is this test covering the bug?

We need a test that can detect the bug, right?

> LayoutTests/imported/w3c/web-platform-tests/css/css-writing-modes/text-combine-upright-decorations-001.html:28
> +    -webkit-text-combine: horizontal;

Why are we making this change to a WPT test? Is this being upstreamed? Do the other browser vendors want this test to have a "-webkit-" prefixed property in it?

Change log doesn’t explain any of this.
Comment 8 Tim Nguyen (:ntim) 2021-12-27 17:19:31 PST
(In reply to Darin Adler from comment #7)
> Comment on attachment 448007 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=448007&action=review
> 
> > Source/WebCore/ChangeLog:8
> > +        Test: imported/w3c/web-platform-tests/css/css-writing-modes/text-combine-upright-decorations-001.html
> 
> Has this test been failing? If not, then how is this test covering the bug?
> 
> We need a test that can detect the bug, right?

It hasn't been failing because it uses text-combine-upright (and we support -webkit-text-combine instead). If you add `-webkit-text-combine`, the test starts failing. 

Bug 150821 aliases `-webkit-text-combine: horizontal` to `text-combine-upright: all` (and the test does fail there). 

> > LayoutTests/imported/w3c/web-platform-tests/css/css-writing-modes/text-combine-upright-decorations-001.html:28
> > +    -webkit-text-combine: horizontal;
> 
> Why are we making this change to a WPT test? Is this being upstreamed? Do
> the other browser vendors want this test to have a "-webkit-" prefixed
> property in it?

I'm planning to upstream it: https://github.com/web-platform-tests/wpt/pull/32204 (this PR should get approved automatically when this patch gets r+). It's not uncommon practice to add vendor prefixes if the main thing being tested isn't the syntax itself, see current usages: https://sourcegraph.com/search?q=context:global+repo:%5Egithub%5C.com/web-platform-tests/wpt+-webkit-text-combine&patternType=literal

Once bug 150821 lands, I'll remove usages of -webkit-text-combine in the WPT repo.

---

Alternatively, we can land bug 150821 first, and then remove the ImageOnlyFailure test expectation in this bug.


> Change log doesn’t explain any of this.

I'll add explanations as appropriate before landing.
Comment 9 Dean Jackson 2021-12-30 14:08:21 PST
Comment on attachment 448007 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=448007&action=review

>>> Source/WebCore/ChangeLog:8
>>> +        Test: imported/w3c/web-platform-tests/css/css-writing-modes/text-combine-upright-decorations-001.html
>> 
>> Has this test been failing? If not, then how is this test covering the bug?
>> 
>> We need a test that can detect the bug, right?
> 
> It hasn't been failing because it uses text-combine-upright (and we support -webkit-text-combine instead). If you add `-webkit-text-combine`, the test starts failing. 
> 
> Bug 150821 aliases `-webkit-text-combine: horizontal` to `text-combine-upright: all` (and the test does fail there).

OK, so 150821 marks this test as ImageOnlyFailure. But this patch doesn't remove that expectation?

> Source/WebCore/rendering/TextBoxPainter.cpp:397
> +        GraphicsContext& context = m_paintInfo.context();

Is there value in having the local variable here? (and below)

>>> LayoutTests/imported/w3c/web-platform-tests/css/css-writing-modes/text-combine-upright-decorations-001.html:28
>>> +    -webkit-text-combine: horizontal;
>> 
>> Why are we making this change to a WPT test? Is this being upstreamed? Do the other browser vendors want this test to have a "-webkit-" prefixed property in it?
>> 
>> Change log doesn’t explain any of this.
> 
> I'm planning to upstream it: https://github.com/web-platform-tests/wpt/pull/32204 (this PR should get approved automatically when this patch gets r+). It's not uncommon practice to add vendor prefixes if the main thing being tested isn't the syntax itself, see current usages: https://sourcegraph.com/search?q=context:global+repo:%5Egithub%5C.com/web-platform-tests/wpt+-webkit-text-combine&patternType=literal
> 
> Once bug 150821 lands, I'll remove usages of -webkit-text-combine in the WPT repo.
> 
> ---
> 
> Alternatively, we can land bug 150821 first, and then remove the ImageOnlyFailure test expectation in this bug.

Now I get it. Yeah, I think this patch should land after 150821 and change the expectation to pass.
Comment 10 Tim Nguyen (:ntim) 2021-12-30 16:34:44 PST
Created attachment 448112 [details]
Patch
Comment 11 Tim Nguyen (:ntim) 2021-12-30 16:35:59 PST
Created attachment 448113 [details]
Patch
Comment 12 EWS 2021-12-30 17:33:39 PST
Committed r287488 (245623@main): <https://commits.webkit.org/245623@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 448113 [details].