[Webkit-unassigned] [Bug 54969] [Chromium] Implement WebKit methods to assist with Cocoa NSTextInput implementation

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


https://bugs.webkit.org/show_bug.cgi?id=54969


Robert Sesek <rsesek at chromium.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #88438|0                           |1
        is obsolete|                            |
  Attachment #88438|review?                     |
               Flag|                            |




--- Comment #40 from Robert Sesek <rsesek at chromium.org>  2011-04-11 14:15:07 PST ---
(From update of attachment 88438)
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_string_coder.h

-- 
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