[Webkit-unassigned] [Bug 40092] spellcheck does not check pasted text
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Jul 23 09:45:01 PDT 2010
https://bugs.webkit.org/show_bug.cgi?id=40092
Eric Seidel <eric at webkit.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #61488|review? |review-
Flag| |
--- Comment #13 from Eric Seidel <eric at webkit.org> 2010-07-23 09:45:00 PST ---
(From update of attachment 61488)
WebCore/editing/Editor.cpp:1172
+ String text;
I would have put this "get me the text I need to process" block in its own function to make this one simpler.
WebCore/editing/Editor.cpp:1187
+ Node* Editor::getSpellingNode(Node* node)
We don't use get in names in WebKit.
WebCore/editing/Editor.cpp:1236
+ m_spellingNode = 0;
This could be a set or reset function given how you always set these both at once. Maybe these need to be a struct held by the object?
WebCore/editing/Editor.cpp:1207
+ if (node) {
Early return is almost always cleaner.
WebCore/editing/Editor.cpp:1220
+ Position end(start);
We have a PositionIterator for this sort of thing.
WebCore/editing/Editor.cpp:1230
+ String source(m_spellingText.substring(results[i].location, results[i].length));
Personally I tend to use = over assignment constructors myself.
WebCore/editing/Editor.h:70
+ : type(DocumentMarker::Spelling), location(0), length(0) { }
Each assignment gets its own line.
WebCore/editing/Editor.h:350
+ Node* getSpellingNode(Node*);
Again, no "get" functions in WebKit.
WebKit/mac/ChangeLog:31
+ 2010-07-14 Hironori Bono <hbono at chromium.org>
Double ChangeLog entry!
WebKit/mac/WebCoreSupport/WebEditorClient.mm:827
+ #if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6 && NS_BLOCKS_AVAILABLE
NS_BLOCKS_AVAILABLE?
WebKit/mac/WebCoreSupport/WebEditorClient.mm:839
+ [[NSSpellChecker sharedSpellChecker] requestCheckingOfString:text range:NSMakeRange(0, text.length()) types:NSTextCheckingAllSystemTypes options:0 inSpellDocumentWithTag:0 completionHandler:^(NSInteger sequenceNumber, NSArray *results, NSOrthography *orthography, NSInteger wordCount) {
Woh. Please split this into multiple lines using local variables.
WebKit/mac/WebView/WebFrame.mm:1596
+ switch ([[results objectAtIndex:i] resultType]) {
I would have put this switch into an inline function instead of inlining it here to make this loop easier to read.
WebKit/mac/WebView/WebFrame.mm:1614
+ static Node* getSpellingNode(Frame* coreFrame)
No "get" in function names.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list