[webkit-reviews] review canceled: [Bug 54969] [Chromium] Implement WebKit methods to assist with Cocoa NSTextInput implementation : [Attachment 88438] Patch v6 Chromium

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Apr 11 14:15:06 PDT 2011


Robert Sesek <rsesek at chromium.org> has canceled 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 88438: Patch v6 Chromium
https://bugs.webkit.org/attachment.cgi?id=88438&action=review

------- Additional Comments from Robert Sesek <rsesek at chromium.org>
The Chromium side v7 is ready for another round of review.

(In reply to comment #29)
> Thanks for bringing this up. I am indeed archiving in the renderer and
unarchiving in the browser. While it can't send an NSWindow (not NSCoding
compliant), it's stil something to worry about. Did you have any speciific
solutions in mind? I talked with others on our Mac team and I came up with the
following potential solutions:
> 
> * Create a custom NSKeyedUnarchiver that overrides |-classForClassName:| and
reject any archive where the root object isn't an NSAttributedString.
> * In the IPC request for the substring, include a one-time secret key which
can be used to store the NSAttributedString in a keyed archive. The browser
will only decode an object with that secret key one time.
> * Just send the HTML fragment instead and construct the NSAttributedString in
the browser. I'm not sure this is any less dangerous and it also has the issue
of spinning a nested runloop to parse that HTML.

I went with a solution that I didn't list here, which is to manually encode the
NSAttributedString, and only the font information. Now
WebSubstringUtil::attributedSubstringInRange() returns an NSAttributedString
and lets the client take care of serialization.

In case you're interested, this is the Chromium class that will encode and send
the object over our IPC system:
http://codereview.chromium.org/6289009/diff/101001/chrome/common/attributed_str
ing_coder.h


More information about the webkit-reviews mailing list