Reviewed by Anders Carlsson.
authorap@apple.com <ap@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 7 Apr 2011 20:48:10 +0000 (20:48 +0000)
committerap@apple.com <ap@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 7 Apr 2011 20:48:10 +0000 (20:48 +0000)
commit06e57bf6f56da4b44a40b3f3b2890204d7c698f4
tree92589411dffe11a768bd780e4b8cf248cf3eb901
parent6613bd8a5b61b6c8bf34d351ee804308de9a4f12
    Reviewed by Anders Carlsson.

        REGRESSION (WebKit2): Reverse conversion doesn't work in Kotoeri
        https://bugs.webkit.org/show_bug.cgi?id=58066
        <rdar://problem/8965302>

        * Scripts/webkit2/messages.py:
        * Shared/mac/AttributedString.h: Added.
        * Shared/mac/AttributedString.mm: Added.
        (WebKit::AttributedString::encode):
        (WebKit::AttributedString::decode):
        Added an class that wraps NSAttributedString. As far as I can tell, one can't pass a CF
        or NS object to another process without wrapping it in a C++ one.

        * Shared/mac/ArgumentCodersMac.h: Added.
        * Shared/mac/ArgumentCodersMac.mm: Added.
        Added coders for Foundation objects, similar to ArgumentCodersCF. There are two reasons why
        these are needed:
        1) Even though most Foundation objects are toll free bridged with CF, CFGetTypeID() doesn't
        work properly for them (I've been just getting 1).
        2) NSColor isn't toll free bridged to CF.
        This adds just the types necessary for editing NSAttributedString (and I don't yet know what
        happens with attachments).

        * UIProcess/API/mac/WKView.mm: (-[WKView attributedSubstringFromRange:]):
        * UIProcess/WebPageProxy.h:
        * UIProcess/mac/WebPageProxyMac.mm:
        (WebKit::WebPageProxy::getAttributedSubstringFromRange):
        * WebKit2.xcodeproj/project.pbxproj:
        * WebProcess/WebPage/WebPage.h:
        * WebProcess/WebPage/WebPage.messages.in:
        Boilerplate code for making a sync call to web process.

        * WebProcess/WebPage/mac/WebPageMac.mm: (WebKit::WebPage::getAttributedSubstringFromRange):
        Ported from WebHTMLView.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@83204 268f45cc-cd09-0410-ab3c-d52691b4dbfc
19 files changed:
Source/WebCore/ChangeLog
Source/WebCore/platform/mac/HTMLConverter.h
Source/WebCore/platform/mac/HTMLConverter.mm
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/WebView/WebHTMLRepresentation.mm
Source/WebKit/mac/WebView/WebHTMLView.mm
Source/WebKit2/ChangeLog
Source/WebKit2/Scripts/webkit2/messages.py
Source/WebKit2/Shared/mac/ArgumentCodersMac.h [new file with mode: 0644]
Source/WebKit2/Shared/mac/ArgumentCodersMac.mm [new file with mode: 0644]
Source/WebKit2/Shared/mac/AttributedString.h [new file with mode: 0644]
Source/WebKit2/Shared/mac/AttributedString.mm [new file with mode: 0644]
Source/WebKit2/UIProcess/API/mac/WKView.mm
Source/WebKit2/UIProcess/WebPageProxy.h
Source/WebKit2/UIProcess/mac/WebPageProxyMac.mm
Source/WebKit2/WebKit2.xcodeproj/project.pbxproj
Source/WebKit2/WebProcess/WebPage/WebPage.h
Source/WebKit2/WebProcess/WebPage/WebPage.messages.in
Source/WebKit2/WebProcess/WebPage/mac/WebPageMac.mm