RESOLVED FIXED 153331
Handle soft spaces after accepted candidates
https://bugs.webkit.org/show_bug.cgi?id=153331
Summary Handle soft spaces after accepted candidates
Beth Dakin
Reported 2016-01-21 16:22:51 PST
Handle soft spaces after accepted candidates rdar://problem/23958418
Attachments
Patch (6.87 KB, patch)
2016-01-21 16:35 PST, Beth Dakin
darin: review+
Beth Dakin
Comment 1 2016-01-21 16:35:35 PST
WebKit Commit Bot
Comment 2 2016-01-21 17:15:51 PST
Attachment 269518 [details] did not pass style-queue: ERROR: Source/WebKit2/UIProcess/Cocoa/WebViewImpl.mm:3526: Tests for true/false, null/non-null, and zero/non-zero should all be done without equality comparisons. [readability/comparison_to_zero] [5] Total errors found: 1 in 6 files If any of these errors are false positives, please file a bug against check-webkit-style.
Darin Adler
Comment 3 2016-01-24 11:58:35 PST
Comment on attachment 269518 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=269518&action=review > Source/WebCore/editing/Editor.cpp:3567 > + if (!acceptedCandidate.replacement.endsWith(" ")) Should be endsWith(' ') to avoid unnecessary work. > Source/WebCore/editing/Editor.cpp:3568 > + insertText(String(" "), 0); Should be ASCIILiteral instead of String, although not sure how helpful that optimization is in cases like this.
Simon Fraser (smfr)
Comment 4 2016-01-25 11:59:41 PST
Comment on attachment 269518 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=269518&action=review > Source/WebKit2/UIProcess/Cocoa/WebViewImpl.h:638 > + NSRange m_softSpaceRange; Can this be initialized with { NSNotFound, 0 } ?
Beth Dakin
Comment 5 2016-01-25 12:30:26 PST
Beth Dakin
Comment 6 2016-01-25 12:32:58 PST
(In reply to comment #5) > Thanks Darin and Simon! http://trac.webkit.org/changeset/195547 I should note that I made all of the suggested changes.
Note You need to log in before you can comment on or make changes to this bug.