[Webkit-unassigned] [Bug 54969] [Chromium] Implement WebKit methods to assist with Cocoa NSTextInput implementation
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Apr 5 12:03:43 PDT 2011
https://bugs.webkit.org/show_bug.cgi?id=54969
Alexey Proskuryakov <ap at webkit.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #86977|review? |review-
Flag| |
--- Comment #24 from Alexey Proskuryakov <ap at webkit.org> 2011-04-05 12:03:42 PST ---
(From update of attachment 86977)
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.
--
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