Bug 181485 - REGRESSION(r222507): Composition highlight doesn't render when using IME
Summary: REGRESSION(r222507): Composition highlight doesn't render when using IME
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: HTML Editing (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Wenson Hsieh
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-01-10 09:46 PST by Wenson Hsieh
Modified: 2018-01-10 22:34 PST (History)
10 users (show)

See Also:


Attachments
Fixes the bug (16.66 KB, patch)
2018-01-10 11:25 PST, Wenson Hsieh
rniwa: review+
ews-watchlist: commit-queue-
Details | Formatted Diff | Diff
Archive of layout-test-results from ews102 for mac-sierra (2.47 MB, application/zip)
2018-01-10 15:04 PST, EWS Watchlist
no flags Details
Archive of layout-test-results from ews105 for mac-sierra-wk2 (2.66 MB, application/zip)
2018-01-10 16:48 PST, EWS Watchlist
no flags Details
Patch for landing (16.59 KB, patch)
2018-01-10 17:21 PST, Wenson Hsieh
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Wenson Hsieh 2018-01-10 09:46:48 PST
<rdar://problem/35896516>
Comment 1 Wenson Hsieh 2018-01-10 11:25:37 PST
Created attachment 330934 [details]
Fixes the bug
Comment 2 Ryosuke Niwa 2018-01-10 12:19:59 PST
Comment on attachment 330934 [details]
Fixes the bug

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

> Source/WebCore/rendering/InlineTextBox.cpp:1047
> +    paintTextSubrangeBackground(context, boxOrigin, Color::compositionFill, clampedOffset(renderer().frame().editor().compositionStart()), clampedOffset(renderer().frame().editor().compositionEnd()));

We should make Color(RGBA32 color, bool valid = true) explicit since RGBA32 is just unsigned so that mistakes like this will be harder to make
(not suggesting that we should do it in this patch or that you should do it).
Comment 3 Wenson Hsieh 2018-01-10 12:27:51 PST
Comment on attachment 330934 [details]
Fixes the bug

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

Thanks for the review!

> Source/WebCore/ChangeLog:11
> +        Test: editing/composition-highlight.html

Whoops, test here should be "editing/marked-text-appearance.html", not "editing/composition-highlight.html". I'll fix this before landing.

>> Source/WebCore/rendering/InlineTextBox.cpp:1047
>> +    paintTextSubrangeBackground(context, boxOrigin, Color::compositionFill, clampedOffset(renderer().frame().editor().compositionStart()), clampedOffset(renderer().frame().editor().compositionEnd()));
> 
> We should make Color(RGBA32 color, bool valid = true) explicit since RGBA32 is just unsigned so that mistakes like this will be harder to make
> (not suggesting that we should do it in this patch or that you should do it).

Definitely a good idea. I think Dan Bates had ideas on how to make this more robust, too...I'll file a followup for this.
Comment 4 EWS Watchlist 2018-01-10 15:04:54 PST
Comment on attachment 330934 [details]
Fixes the bug

Attachment 330934 [details] did not pass mac-ews (mac):
Output: http://webkit-queues.webkit.org/results/6025473

New failing tests:
webgl/1.0.2/conformance/uniforms/uniform-default-values.html
Comment 5 EWS Watchlist 2018-01-10 15:04:56 PST
Created attachment 330971 [details]
Archive of layout-test-results from ews102 for mac-sierra

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: ews102  Port: mac-sierra  Platform: Mac OS X 10.12.6
Comment 6 EWS Watchlist 2018-01-10 16:48:18 PST
Comment on attachment 330934 [details]
Fixes the bug

Attachment 330934 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.webkit.org/results/6026655

Number of test failures exceeded the failure limit.
Comment 7 EWS Watchlist 2018-01-10 16:48:20 PST
Created attachment 330987 [details]
Archive of layout-test-results from ews105 for mac-sierra-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews105  Port: mac-sierra-wk2  Platform: Mac OS X 10.12.6
Comment 8 Wenson Hsieh 2018-01-10 17:21:53 PST
Created attachment 330994 [details]
Patch for landing
Comment 9 WebKit Commit Bot 2018-01-10 19:05:14 PST
Comment on attachment 330994 [details]
Patch for landing

Clearing flags on attachment: 330994

Committed r226753: <https://trac.webkit.org/changeset/226753>
Comment 10 Darin Adler 2018-01-10 22:34:41 PST
Comment on attachment 330934 [details]
Fixes the bug

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

>>> Source/WebCore/rendering/InlineTextBox.cpp:1047
>>> +    paintTextSubrangeBackground(context, boxOrigin, Color::compositionFill, clampedOffset(renderer().frame().editor().compositionStart()), clampedOffset(renderer().frame().editor().compositionEnd()));
>> 
>> We should make Color(RGBA32 color, bool valid = true) explicit since RGBA32 is just unsigned so that mistakes like this will be harder to make
>> (not suggesting that we should do it in this patch or that you should do it).
> 
> Definitely a good idea. I think Dan Bates had ideas on how to make this more robust, too...I'll file a followup for this.

I have a solution to this ambiguity coming in my color patch; the total patch is in bug 180620 but I will be breaking off smaller pieces of it and landing them.