Summary: | Handle soft spaces after accepted candidates | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Beth Dakin <bdakin> | ||||
Component: | WebKit API | Assignee: | Nobody <webkit-unassigned> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | bdakin, commit-queue, enrica, sam, simon.fraser, thorton | ||||
Priority: | P2 | ||||||
Version: | WebKit Nightly Build | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Attachments: |
|
Description
Beth Dakin
2016-01-21 16:22:51 PST
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. |