Handle soft spaces after accepted candidates rdar://problem/23958418
Created attachment 269518 [details] Patch
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.
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.
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 } ?
Thanks Darin and Simon! http://trac.webkit.org/changeset/195547
(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.