diff options
author | Ben Murdoch <benm@google.com> | 2011-05-24 11:24:40 +0100 |
---|---|---|
committer | Ben Murdoch <benm@google.com> | 2011-06-02 09:53:15 +0100 |
commit | 81bc750723a18f21cd17d1b173cd2a4dda9cea6e (patch) | |
tree | 7a9e5ed86ff429fd347a25153107221543909b19 /Source/WebKit2/WebProcess/WebCoreSupport/mac | |
parent | 94088a6d336c1dd80a1e734af51e96abcbb689a7 (diff) | |
download | external_webkit-81bc750723a18f21cd17d1b173cd2a4dda9cea6e.zip external_webkit-81bc750723a18f21cd17d1b173cd2a4dda9cea6e.tar.gz external_webkit-81bc750723a18f21cd17d1b173cd2a4dda9cea6e.tar.bz2 |
Merge WebKit at r80534: Intial merge by Git
Change-Id: Ia7a83357124c9e1cdb1debf55d9661ec0bd09a61
Diffstat (limited to 'Source/WebKit2/WebProcess/WebCoreSupport/mac')
5 files changed, 37 insertions, 9 deletions
diff --git a/Source/WebKit2/WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm b/Source/WebKit2/WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm index 750a397..7d91c56 100644 --- a/Source/WebKit2/WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm +++ b/Source/WebKit2/WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm @@ -26,9 +26,12 @@ #import "config.h" #import "WebContextMenuClient.h" -#import "NotImplemented.h" +#import "DictionaryPopupInfo.h" +#import "WebCoreArgumentCoders.h" #import "WebPage.h" +#import "WebPageProxyMessages.h" #import <WebCore/Frame.h> +#import <WebCore/FrameView.h> #import <WebCore/Page.h> #import <wtf/text/WTFString.h> @@ -36,10 +39,13 @@ using namespace WebCore; namespace WebKit { -void WebContextMenuClient::lookUpInDictionary(Frame*) +void WebContextMenuClient::lookUpInDictionary(Frame* frame) { - // FIXME: <rdar://problem/8750610> - Implement - notImplemented(); + RefPtr<Range> selectedRange = frame->selection()->selection().toNormalizedRange(); + if (!selectedRange) + return; + + m_page->performDictionaryLookupForRange(DictionaryPopupInfo::ContextMenu, frame, selectedRange.get()); } bool WebContextMenuClient::isSpeaking() diff --git a/Source/WebKit2/WebProcess/WebCoreSupport/mac/WebDragClientMac.mm b/Source/WebKit2/WebProcess/WebCoreSupport/mac/WebDragClientMac.mm index 5169b23..ae9cec3 100644 --- a/Source/WebKit2/WebProcess/WebCoreSupport/mac/WebDragClientMac.mm +++ b/Source/WebKit2/WebProcess/WebCoreSupport/mac/WebDragClientMac.mm @@ -63,7 +63,7 @@ void WebDragClient::startDrag(DragImageRef dragImage, const IntPoint& at, const NSGraphicsContext* bitmapContext = [NSGraphicsContext graphicsContextWithGraphicsPort:graphicsContext->platformContext() flipped:YES]; [NSGraphicsContext setCurrentContext: bitmapContext]; - [dragNSImage drawInRect:NSMakeRect(0, 0, [dragNSImage size].width , [dragNSImage size].height) fromRect:NSZeroRect operation:NSCompositeSourceOver fraction:1]; + [dragNSImage drawInRect:NSMakeRect(0, 0, [dragNSImage size].width , [dragNSImage size].height) fromRect:NSZeroRect operation:NSCompositeSourceOver fraction:1 respectFlipped:YES hints:nil]; [NSGraphicsContext restoreGraphicsState]; SharedMemory::Handle handle; diff --git a/Source/WebKit2/WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm b/Source/WebKit2/WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm index ee87ea2..8af0438 100644 --- a/Source/WebKit2/WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm +++ b/Source/WebKit2/WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm @@ -30,9 +30,6 @@ #import "config.h" #import "WebEditorClient.h" -#define DISABLE_NOT_IMPLEMENTED_WARNINGS 1 -#import "NotImplemented.h" - #import "WebCoreArgumentCoders.h" #import "WebPage.h" #import "WebFrame.h" @@ -45,6 +42,7 @@ #import <WebCore/FocusController.h> #import <WebCore/Frame.h> #import <WebCore/KeyboardEvent.h> +#import <WebCore/NotImplemented.h> #import <WebCore/Page.h> #import <WebKit/WebResource.h> #import <WebKit/WebNSURLExtras.h> @@ -264,6 +262,11 @@ bool WebEditorClient::isShowingCorrectionPanel() notImplemented(); return false; } + +void WebEditorClient::recordAutocorrectionResponse(EditorClient::AutocorrectionResponseType responseType, const String& replacedString, const String& replacementString) +{ + notImplemented(); +} #endif } // namespace WebKit diff --git a/Source/WebKit2/WebProcess/WebCoreSupport/mac/WebPopupMenuMac.mm b/Source/WebKit2/WebProcess/WebCoreSupport/mac/WebPopupMenuMac.mm index 7e446b7..e36f438 100644 --- a/Source/WebKit2/WebProcess/WebCoreSupport/mac/WebPopupMenuMac.mm +++ b/Source/WebKit2/WebProcess/WebCoreSupport/mac/WebPopupMenuMac.mm @@ -27,13 +27,25 @@ #import "WebPopupMenu.h" #import "PlatformPopupMenuData.h" +#import <WebCore/Frame.h> +#import <WebCore/FrameView.h> +#import <WebCore/PopupMenuClient.h> using namespace WebCore; namespace WebKit { -void WebPopupMenu::setUpPlatformData(const IntRect&, PlatformPopupMenuData&) +void WebPopupMenu::setUpPlatformData(const IntRect&, PlatformPopupMenuData& data) { + NSFont *font = m_popupClient->menuStyle().font().primaryFont()->getNSFont(); + if (!font) + return; + + CFDictionaryRef fontDescriptorAttributes = (CFDictionaryRef)[[font fontDescriptor] fontAttributes]; + if (!fontDescriptorAttributes) + return; + + data.fontInfo.fontAttributeDictionary = fontDescriptorAttributes; } } // namespace WebKit diff --git a/Source/WebKit2/WebProcess/WebCoreSupport/mac/WebSystemInterface.mm b/Source/WebKit2/WebProcess/WebCoreSupport/mac/WebSystemInterface.mm index 2d74bbc..2c8649e 100644 --- a/Source/WebKit2/WebProcess/WebCoreSupport/mac/WebSystemInterface.mm +++ b/Source/WebKit2/WebProcess/WebCoreSupport/mac/WebSystemInterface.mm @@ -93,6 +93,13 @@ void InitWebCoreSystemInterface(void) INIT(SignalCFReadStreamEnd); INIT(SignalCFReadStreamError); INIT(SignalCFReadStreamHasBytes); + INIT(CreatePrivateStorageSession); + INIT(CopyRequestWithStorageSession); + INIT(CreatePrivateInMemoryHTTPCookieStorage); + INIT(GetHTTPCookieAcceptPolicy); + INIT(HTTPCookiesForURL); + INIT(SetHTTPCookiesForURL); + INIT(DeleteHTTPCookie); #if !defined(BUILDING_ON_SNOW_LEOPARD) INIT(IOSurfaceContextCreate); |