Bug 212097 - Blue dotted underline with alternatives only shown for last word, gets lost for previous insertions
Summary: Blue dotted underline with alternatives only shown for last word, gets lost f...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: WebKit Local Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Daniel Bates
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-05-19 11:41 PDT by Daniel Bates
Modified: 2020-05-19 17:05 PDT (History)
4 users (show)

See Also:


Attachments
Patch (40.72 KB, patch)
2020-05-19 13:11 PDT, Daniel Bates
no flags Details | Formatted Diff | Diff
Patch (40.79 KB, patch)
2020-05-19 14:20 PDT, Daniel Bates
no flags Details | Formatted Diff | Diff
To Land (40.78 KB, patch)
2020-05-19 17:04 PDT, Daniel Bates
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Bates 2020-05-19 11:41:10 PDT
When space separated dictation alternatives are inserted only the last inserted one has blue dots.
Comment 1 Daniel Bates 2020-05-19 11:41:40 PDT
<rdar://problem/61913405>
Comment 2 Daniel Bates 2020-05-19 13:11:06 PDT
Created attachment 399763 [details]
Patch
Comment 3 Daniel Bates 2020-05-19 14:16:02 PDT
Comment on attachment 399763 [details]
Patch

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

> Tools/TestWebKitAPI/Tests/WebKitCocoa/InsertTextAlternatives.mm:365
> +    // FIXME: Set CSS white-space to workaround <https://webkit.org/b/212093>.

Actually, works around <https://webkit.org/b/212098> because space converted to no-break space.
Comment 4 Daniel Bates 2020-05-19 14:20:36 PDT
Created attachment 399770 [details]
Patch

Just cosmetic fixing of comments
Comment 5 Daniel Bates 2020-05-19 14:38:22 PDT
Comment on attachment 399770 [details]
Patch

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

> Source/WebCore/ChangeLog:28
> +        if it is a space or newline. This will be false when there is no preceeding character (e.g. start of document),

preceeding => preceding

> Source/WebCore/ChangeLog:31
> +        because that would incorrectly return false if the current selection is at the of a paragraph. I could have

the of => the end of

> Source/WebCore/ChangeLog:35
> +        start of the last word positions before mutating them. Update early returns checks to use these saved values

returns => return

> Source/WebCore/ChangeLog:40
> +        * editing/Editor.h: While I am here, fix up a param name to match the what it is called in the impl.

the what => what
impl => .cpp
Comment 6 Daniel Bates 2020-05-19 16:59:27 PDT
Thanks Darin.
Comment 7 Daniel Bates 2020-05-19 17:04:39 PDT
Created attachment 399785 [details]
To Land
Comment 8 Daniel Bates 2020-05-19 17:05:52 PDT
Committed r261897: <https://trac.webkit.org/changeset/261897>