[webkit-reviews] review denied: [Bug 54969] [Chromium] Implement WebKit methods to assist with Cocoa NSTextInput implementation : [Attachment 86977] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Apr 5 12:03:42 PDT 2011
Alexey Proskuryakov <ap at webkit.org> has denied Robert Sesek
<rsesek at chromium.org>'s request for review:
Bug 54969: [Chromium] Implement WebKit methods to assist with Cocoa NSTextInput
implementation
https://bugs.webkit.org/show_bug.cgi?id=54969
Attachment 86977: Patch
https://bugs.webkit.org/attachment.cgi?id=86977&action=review
------- Additional Comments from Alexey Proskuryakov <ap at webkit.org>
View in context: https://bugs.webkit.org/attachment.cgi?id=86977&action=review
This will break Mac build, because the new functions need to be added to
WebCore.base.exp.
Looks like a good improvement in cross platform code. r- for build breakage,
and for many comments from the reviewers.
> Source/WebKit/chromium/src/mac/WebTextHelper.mm:129
> + NSData* archivedData([NSArchiver archivedDataWithRootObject:string]);
I'm not sure if using NSArchiver is a good idea. Are you archiving in renderer
process, and unarchiving in main one? If the renderer is compromised, it could
send anything (like an NSWindow) in the serialized data.
> Source/WebKit/mac/WebView/WebFrame.mm:676
> + if (range && TextIterator::locationAndLengthFromRange(range, location,
length))
> + return NSMakeRange(location, length);
> + return NSMakeRange(NSNotFound, 0);
We generally prefer early return on error. It's more readable when the main
code path is linear.
> Source/WebKit2/WebProcess/WebPage/mac/WebPageMac.mm:164
> + size_t loc, len;
Please don't abbreviate.
More information about the webkit-reviews
mailing list