Changeset 167956 in webkit
- Timestamp:
- Apr 29, 2014 2:54:23 PM (10 years ago)
- Location:
- trunk/Source
- Files:
-
- 2 added
- 21 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r167944 r167956 1 2014-04-29 Brady Eidson <beidson@apple.com> 2 3 Change Image Controls replacement to use selection and paste 4 <rdar://problem/16302722> and https://bugs.webkit.org/show_bug.cgi?id=131992 5 6 Reviewed by Tim Horton. 7 8 * WebCore.exp.in: Remove deleted symbol. 9 10 * html/shadow/mac/ImageControlsButtonElementMac.cpp: 11 (WebCore::ImageControlsButtonElementMac::defaultEventHandler): 12 13 * page/ContextMenuController.cpp: 14 (WebCore::ContextMenuController::showImageControlsMenu): Select the image element 15 before showing the menu. 16 (WebCore::ContextMenuController::replaceControlledImage): Deleted. 17 * page/ContextMenuController.h: 18 1 19 2014-04-29 Jer Noble <jer.noble@apple.com> 2 20 -
trunk/Source/WebCore/WebCore.exp.in
r167916 r167956 230 230 __ZN7WebCore12SharedBuffer10wrapCFDataEPK8__CFData 231 231 __ZN7WebCore12SharedBuffer10wrapNSDataEP6NSData 232 __ZN7WebCore12SharedBuffer11adoptVectorERN3WTF6VectorIcLm0ENS1_15CrashOnOverflowEEE 232 233 __ZN7WebCore12SharedBuffer12createCFDataEv 233 234 __ZN7WebCore12SharedBuffer12createNSDataEv … … 2988 2989 #endif 2989 2990 2990 #if ENABLE(SERVICE_CONTROLS)2991 __ZN7WebCore21ContextMenuController22replaceControlledImageEN3WTF10PassRefPtrINS_5ImageEEE2992 #endif2993 2994 2991 #if ENABLE(INDEXED_DATABASE) 2995 2992 __ZN7WebCore10IDBKeyData14setNumberValueEd -
trunk/Source/WebCore/html/shadow/mac/ImageControlsButtonElementMac.cpp
r167786 r167956 31 31 #include "ContextMenuController.h" 32 32 #include "Event.h" 33 #include "Frame.h" 34 #include "FrameSelection.h" 33 35 #include "HTMLDivElement.h" 34 36 #include "Page.h" 37 #include "Range.h" 35 38 #include "RenderBlockFlow.h" 36 39 #include "RenderStyle.h" 37 40 #include "RenderTheme.h" 41 #include "ShadowRoot.h" 38 42 39 43 namespace WebCore { … … 100 104 { 101 105 if (event->type() == eventNames().clickEvent) { 102 if (Page* page = document().page()) 103 page->contextMenuController().showImageControlsMenu(event); 106 Frame* frame = document().frame(); 107 if (!frame) 108 return; 109 110 Page* page = document().page(); 111 if (!page) 112 return; 113 114 ContainerNode* parent = parentNode(); 115 Element* hostElement = nullptr; 116 while (parent) { 117 if (parent->isShadowRoot()) { 118 hostElement = static_cast<ShadowRoot*>(parent)->hostElement(); 119 break; 120 } 121 parent = parent->parentNode(); 122 } 123 124 if (!hostElement) 125 return; 126 ASSERT(isHTMLImageElement(hostElement)); 127 128 RefPtr<Range> range = Range::create(document(), Position(hostElement, Position::PositionIsBeforeAnchor), Position(hostElement, Position::PositionIsAfterAnchor)); 129 frame->selection().setSelection(VisibleSelection(range.get())); 130 131 page->contextMenuController().showImageControlsMenu(event); 104 132 event->setDefaultHandled(); 105 133 return; -
trunk/Source/WebCore/page/ContextMenuController.cpp
r167786 r167956 1453 1453 m_client.showContextMenu(); 1454 1454 } 1455 1456 void ContextMenuController::replaceControlledImage(PassRefPtr<Image> newImage)1457 {1458 Node* node = m_context.hitTestResult().innerNonSharedNode();1459 if (!node)1460 return;1461 1462 Frame* frame = node->document().frame();1463 if (!frame)1464 return;1465 1466 RenderObject* renderer = node->renderer();1467 if (!renderer || !renderer->isRenderImage())1468 return;1469 1470 CachedResourceHandle<CachedImage> replacedImage = new CachedImage(URL::fakeURLWithRelativePart("image"), newImage.get(), frame->page()->sessionID());1471 toRenderImage(renderer)->imageResource().setCachedImage(replacedImage.get());1472 }1473 1455 #endif 1474 1456 -
trunk/Source/WebCore/page/ContextMenuController.h
r167786 r167956 72 72 #if ENABLE(SERVICE_CONTROLS) 73 73 void showImageControlsMenu(Event*); 74 void replaceControlledImage(PassRefPtr<Image>);75 74 #endif 76 75 -
trunk/Source/WebKit/mac/ChangeLog
r167861 r167956 1 2014-04-29 Brady Eidson <beidson@apple.com> 2 3 Change Image Controls replacement to use selection and paste 4 <rdar://problem/16302722> and https://bugs.webkit.org/show_bug.cgi?id=131992 5 6 Reviewed by Tim Horton. 7 8 * Misc/WebSharingServicePickerController.mm: 9 (-[WebSharingServicePickerController sharingService:didShareItems:]): Write the 10 replacement data to a special pasteboard, then replace the current selection from 11 that pasteboard. 12 1 13 2014-04-27 Sam Weinig <sam@webkit.org> 2 14 -
trunk/Source/WebKit/mac/Misc/WebSharingServicePickerController.mm
r167786 r167956 32 32 #import <AppKit/NSSharingService.h> 33 33 #import <WebCore/BitmapImage.h> 34 #import <WebCore/Editor.h> 35 #import <WebCore/FocusController.h> 36 #import <WebCore/Frame.h> 37 #import <WebCore/FrameSelection.h> 34 38 #import <WebCore/ContextMenuController.h> 35 39 #import <WebCore/Page.h> … … 48 52 49 53 #endif 54 55 static NSString *serviceControlsPasteboardName = @"WebKitServiceControlsPasteboard"; 50 56 51 57 using namespace WebCore; … … 120 126 RetainPtr<CGImageSourceRef> source = adoptCF(CGImageSourceCreateWithData((CFDataRef)[items objectAtIndex:0], NULL)); 121 127 RetainPtr<CGImageRef> cgImage = adoptCF(CGImageSourceCreateImageAtIndex(source.get(), 0, NULL)); 122 RefPtr<Image> image = BitmapImage::create(cgImage.get()); 128 129 if (!cgImage) 130 return; 123 131 124 132 Page* page = [_menuClient->webView() page]; … … 126 134 return; 127 135 128 page->contextMenuController().replaceControlledImage(image.get()); 136 NSPasteboard *pasteboard = [NSPasteboard pasteboardWithName:serviceControlsPasteboardName]; 137 [pasteboard declareTypes:@[ NSPasteboardTypeTIFF ] owner:nil]; 138 [pasteboard setData:[items objectAtIndex:0] forType:NSPasteboardTypeTIFF]; 139 140 Frame& frame = page->focusController().focusedOrMainFrame(); 141 if (!frame.selection().isNone()) 142 frame.editor().readSelectionFromPasteboard(serviceControlsPasteboardName); 129 143 130 144 [self clear]; -
trunk/Source/WebKit2/ChangeLog
r167949 r167956 1 2014-04-29 Brady Eidson <beidson@apple.com> 2 3 Change Image Controls replacement to use selection and paste 4 <rdar://problem/16302722> and https://bugs.webkit.org/show_bug.cgi?id=131992 5 6 Reviewed by Tim Horton. 7 8 Add a "pasteboard override" mechanism which allows WebKit to keep pasteboard content local 9 to the WebProcess and access it there without having to message up to the UI process: 10 * WebProcess/WebCoreSupport/WebPasteboardOverrides.cpp: Added. 11 (WebKit::WebPasteboardOverrides::sharedPasteboardOverrides): 12 (WebKit::WebPasteboardOverrides::WebPasteboardOverrides): 13 (WebKit::WebPasteboardOverrides::addOverride): 14 (WebKit::WebPasteboardOverrides::removeOverride): 15 (WebKit::WebPasteboardOverrides::overriddenTypes): 16 (WebKit::WebPasteboardOverrides::getDataForOverride): 17 * WebProcess/WebCoreSupport/WebPasteboardOverrides.h: Added. 18 19 Change the pasteboard strategy to consult the pasteboard overrides before consulting the native pasteboard: 20 * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp: 21 (WebKit::WebPlatformStrategies::getTypes): 22 (WebKit::WebPlatformStrategies::bufferForType): 23 24 Add "replaceSelectionWithPasteboardData" which uses the new pasteboard overrides mechanism 25 and then has WebCore perform the replacement: 26 * WebProcess/WebPage/WebPage.h: 27 * WebProcess/WebPage/WebPage.messages.in: 28 * WebProcess/WebPage/mac/WebPageMac.mm: 29 (WebKit::replaceSelectionPasteboardName): 30 (WebKit::WebPage::replaceSelectionWithPasteboardData): 31 32 * UIProcess/mac/WebPageProxyMac.mm: 33 (WebKit::WebPageProxy::replaceSelectionWithPasteboardData): 34 35 * UIProcess/mac/WebContextMenuProxyMac.h: 36 (WebKit::WebContextMenuProxyMac::page): 37 * UIProcess/mac/WebContextMenuProxyMac.mm: 38 (-[WKSharingServicePickerDelegate sharingService:didShareItems:]): Use "replaceSelectionWithPasteboardData". 39 (WebKit::WebContextMenuProxyMac::WebContextMenuProxyMac): 40 (WebKit::WebContextMenuProxyMac::replaceControlledImage): Deleted. 41 42 Remain other remnants of "replaceControlledImage": 43 * UIProcess/WebPageProxy.cpp: 44 (WebKit::WebPageProxy::replaceControlledImage): Deleted. 45 * UIProcess/WebPageProxy.h: 46 * WebProcess/WebPage/WebContextMenu.cpp: 47 (WebKit::WebContextMenu::replaceControlledImage): Deleted. 48 * WebProcess/WebPage/WebContextMenu.h: 49 * WebProcess/WebPage/WebPage.cpp: 50 (WebKit::WebPage::replaceControlledImage): Deleted. 51 52 * WebKit2.xcodeproj/project.pbxproj: 53 1 54 2014-04-29 Tim Horton <timothy_horton@apple.com> 2 55 -
trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp
r167914 r167956 3485 3485 } 3486 3486 3487 #if ENABLE(SERVICE_CONTROLS)3488 void WebPageProxy::replaceControlledImage(PassRefPtr<ShareableBitmap> newBitmap)3489 {3490 RefPtr<ShareableBitmap> bitmap = newBitmap;3491 ShareableBitmap::Handle bitmapHandle;3492 bitmap->createHandle(bitmapHandle);3493 m_process->send(Messages::WebPage::ReplaceControlledImage(bitmapHandle), m_pageID);3494 }3495 #endif3496 3497 3487 void WebPageProxy::contextMenuItemSelected(const WebContextMenuItemData& item) 3498 3488 { -
trunk/Source/WebKit2/UIProcess/WebPageProxy.h
r167940 r167956 813 813 #endif 814 814 815 #if ENABLE(SERVICE_CONTROLS) 816 void replaceSelectionWithPasteboardData(const String& type, const IPC::DataReference&); 817 #endif 818 815 819 void pageScaleFactorDidChange(double); 816 820 void pageZoomFactorDidChange(double); … … 1064 1068 1065 1069 void takeSnapshot(WebCore::IntRect, WebCore::IntSize bitmapSize, SnapshotOptions, ImageCallback::CallbackFunction); 1066 1067 #if ENABLE(SERVICE_CONTROLS)1068 void replaceControlledImage(PassRefPtr<ShareableBitmap>);1069 #endif1070 1070 1071 1071 private: -
trunk/Source/WebKit2/UIProcess/mac/WebContextMenuProxyMac.h
r167786 r167956 56 56 #if ENABLE(SERVICE_CONTROLS) 57 57 void clearImageServicesMenu(); 58 void replaceControlledImage(CGImageRef newImage);59 58 #endif 60 59 60 WebPageProxy& page() const { return *m_page; } 61 61 NSWindow *window() const; 62 62 -
trunk/Source/WebKit2/UIProcess/mac/WebContextMenuProxyMac.mm
r167786 r167956 29 29 #if PLATFORM(MAC) 30 30 31 #import "DataReference.h" 31 32 #import "PageClientImpl.h" 32 33 #import "ShareableBitmap.h" … … 57 58 - (NSMenu *)menu; 58 59 @end 59 #endif 60 61 #endif // ENABLE(SERVICE_CONTROLS) 60 62 61 63 using namespace WebCore; … … 230 232 - (void)sharingService:(NSSharingService *)sharingService didShareItems:(NSArray *)items 231 233 { 232 RetainPtr<CGImageSourceRef> source = adoptCF(CGImageSourceCreateWithData((CFDataRef)[items objectAtIndex:0], NULL)); 234 NSData *data = [items objectAtIndex:0]; 235 RetainPtr<CGImageSourceRef> source = adoptCF(CGImageSourceCreateWithData((CFDataRef)data, NULL)); 233 236 RetainPtr<CGImageRef> image = adoptCF(CGImageSourceCreateImageAtIndex(source.get(), 0, NULL)); 234 _menuProxy->replaceControlledImage(image.get()); 237 238 if (!image) 239 return; 240 241 IPC::DataReference dataReference(static_cast<const uint8_t*>([data bytes]), [data length]); 242 _menuProxy->page().replaceSelectionWithPasteboardData(NSPasteboardTypeTIFF, dataReference); 235 243 } 236 244 … … 250 258 , m_page(page) 251 259 { 260 ASSERT(m_page); 252 261 } 253 262 … … 434 443 } 435 444 436 #if ENABLE(SERVICE_CONTROLS)437 void WebContextMenuProxyMac::replaceControlledImage(CGImageRef newImage)438 {439 FloatSize newImageSize(CGImageGetWidth(newImage), CGImageGetHeight(newImage));440 RefPtr<ShareableBitmap> newBitmap = ShareableBitmap::createShareable(expandedIntSize(newImageSize), ShareableBitmap::SupportsAlpha);441 newBitmap->createGraphicsContext()->drawNativeImage(newImage, newImageSize, ColorSpaceDeviceRGB, FloatRect(FloatPoint(), newImageSize), FloatRect(FloatPoint(), newImageSize));442 443 m_page->replaceControlledImage(newBitmap.release());444 }445 #endif446 447 445 } // namespace WebKit 448 446 -
trunk/Source/WebKit2/UIProcess/mac/WebPageProxyMac.mm
r167034 r167956 396 396 } 397 397 398 #if ENABLE(SERVICE_CONTROLS) 399 void WebPageProxy::replaceSelectionWithPasteboardData(const String& type, const IPC::DataReference& data) 400 { 401 process().send(Messages::WebPage::ReplaceSelectionWithPasteboardData(type, data), m_pageID); 402 } 403 #endif 404 398 405 #if ENABLE(DRAG_SUPPORT) 399 406 void WebPageProxy::setDragImage(const WebCore::IntPoint& clientPosition, const ShareableBitmap::Handle& dragImageHandle, bool isLinkDrag) -
trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj
r167946 r167956 736 736 511F8A7B138B460900A95F44 /* SecItemShimLibrary.h in Headers */ = {isa = PBXBuildFile; fileRef = 511F8A77138B460900A95F44 /* SecItemShimLibrary.h */; }; 737 737 511F8A81138B485D00A95F44 /* SecItemShimLibrary.mm in Sources */ = {isa = PBXBuildFile; fileRef = 511F8A78138B460900A95F44 /* SecItemShimLibrary.mm */; }; 738 512127C31908239A00DAF35C /* WebPasteboardOverrides.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 512127C11908239A00DAF35C /* WebPasteboardOverrides.cpp */; }; 739 512127C41908239A00DAF35C /* WebPasteboardOverrides.h in Headers */ = {isa = PBXBuildFile; fileRef = 512127C21908239A00DAF35C /* WebPasteboardOverrides.h */; }; 738 740 51217460164C20E30037A5C1 /* ShareableResource.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5121745E164C20E30037A5C1 /* ShareableResource.cpp */; }; 739 741 51217461164C20E30037A5C1 /* ShareableResource.h in Headers */ = {isa = PBXBuildFile; fileRef = 5121745F164C20E30037A5C1 /* ShareableResource.h */; }; … … 2581 2583 511F8A77138B460900A95F44 /* SecItemShimLibrary.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SecItemShimLibrary.h; path = ../../WebProcess/mac/SecItemShimLibrary.h; sourceTree = "<group>"; }; 2582 2584 511F8A78138B460900A95F44 /* SecItemShimLibrary.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = SecItemShimLibrary.mm; path = ../../WebProcess/mac/SecItemShimLibrary.mm; sourceTree = "<group>"; }; 2585 512127C11908239A00DAF35C /* WebPasteboardOverrides.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebPasteboardOverrides.cpp; sourceTree = "<group>"; }; 2586 512127C21908239A00DAF35C /* WebPasteboardOverrides.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebPasteboardOverrides.h; sourceTree = "<group>"; }; 2583 2587 5121745E164C20E30037A5C1 /* ShareableResource.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ShareableResource.cpp; sourceTree = "<group>"; }; 2584 2588 5121745F164C20E30037A5C1 /* ShareableResource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ShareableResource.h; sourceTree = "<group>"; }; … … 5300 5304 31099971146C759B0029DEB9 /* WebNotificationClient.cpp */, 5301 5305 31099968146C71F50029DEB9 /* WebNotificationClient.h */, 5306 512127C11908239A00DAF35C /* WebPasteboardOverrides.cpp */, 5307 512127C21908239A00DAF35C /* WebPasteboardOverrides.h */, 5302 5308 1A3E736011CC2659007BD539 /* WebPlatformStrategies.cpp */, 5303 5309 1A3E735F11CC2659007BD539 /* WebPlatformStrategies.h */, … … 7135 7141 31D5929F166E060000E6BF02 /* WebPlugInClient.h in Headers */, 7136 7142 1AC8702D130B49A2002C1257 /* WebPluginSiteDataManager.h in Headers */, 7143 512127C41908239A00DAF35C /* WebPasteboardOverrides.h in Headers */, 7137 7144 518353DB1885BF8C00D9FE44 /* IDBSerialization.h in Headers */, 7138 7145 1ADF591B1890528E0043C145 /* WKWebViewConfiguration.h in Headers */, … … 8615 8622 1F7506B01859162C00EC0FF7 /* WKWebProcessPlugInScriptWorld.mm in Sources */, 8616 8623 75E749EB180DBB9800088BA6 /* WebOriginDataManagerProxyMessageReceiver.cpp in Sources */, 8624 512127C31908239A00DAF35C /* WebPasteboardOverrides.cpp in Sources */, 8617 8625 BC3066BE125A442100E71278 /* WebProcessMessageReceiver.cpp in Sources */, 8618 8626 BC111B11112F5E4F00337BAB /* WebProcessProxy.cpp in Sources */, -
trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebPlatformStrategies.cpp
r167180 r167956 42 42 #include "WebIDBFactoryBackend.h" 43 43 #include "WebPage.h" 44 #include "WebPasteboardOverrides.h" 44 45 #include "WebProcess.h" 45 46 #include "WebProcessProxyMessages.h" … … 375 376 void WebPlatformStrategies::getTypes(Vector<String>& types, const String& pasteboardName) 376 377 { 378 // First check the overrides. 379 // The purpose of the overrides is to avoid messaging back to the UI process. 380 // Therefore, if there are any overridden types, we return just those. 381 types = WebPasteboardOverrides::sharedPasteboardOverrides().overriddenTypes(pasteboardName); 382 if (!types.isEmpty()) 383 return; 384 377 385 WebProcess::shared().parentProcessConnection()->sendSync(Messages::WebContext::GetPasteboardTypes(pasteboardName), 378 386 Messages::WebContext::GetPasteboardTypes::Reply(types), 0); … … 381 389 PassRefPtr<WebCore::SharedBuffer> WebPlatformStrategies::bufferForType(const String& pasteboardType, const String& pasteboardName) 382 390 { 391 // First check the overrides. 392 Vector<char> overrideBuffer; 393 if (WebPasteboardOverrides::sharedPasteboardOverrides().getDataForOverride(pasteboardName, pasteboardType, overrideBuffer)) 394 return SharedBuffer::adoptVector(overrideBuffer); 395 396 // Fallback to messaging the UI process for native pasteboard content. 383 397 SharedMemory::Handle handle; 384 398 uint64_t size = 0; -
trunk/Source/WebKit2/WebProcess/WebPage/WebContextMenu.cpp
r167786 r167956 78 78 } 79 79 80 #if ENABLE(SERVICE_CONTROLS)81 void WebContextMenu::replaceControlledImage(PassRefPtr<Image> newImage)82 {83 m_page->corePage()->contextMenuController().replaceControlledImage(newImage);84 }85 #endif86 87 80 void WebContextMenu::menuItemsWithUserData(Vector<WebContextMenuItemData> &menuItems, RefPtr<API::Object>& userData) const 88 81 { -
trunk/Source/WebKit2/WebProcess/WebPage/WebContextMenu.h
r167786 r167956 51 51 Vector<WebContextMenuItemData> items() const; 52 52 53 #if ENABLE(SERVICE_CONTROLS)54 void replaceControlledImage(PassRefPtr<WebCore::Image>);55 #endif56 57 53 private: 58 54 WebContextMenu(WebPage*); -
trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp
r167896 r167956 3163 3163 #endif 3164 3164 3165 #if ENABLE(SERVICE_CONTROLS)3166 void WebPage::replaceControlledImage(const ShareableBitmap::Handle& bitmapHandle)3167 {3168 RefPtr<ShareableBitmap> bitmap = ShareableBitmap::create(bitmapHandle);3169 if (bitmap)3170 m_contextMenu->replaceControlledImage(bitmap->createImage());3171 }3172 #endif3173 3174 3165 void WebPage::replaceSelectionWithText(Frame* frame, const String& text) 3175 3166 { -
trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h
r167916 r167956 588 588 void acceptsFirstMouse(int eventNumber, const WebKit::WebMouseEvent&, bool& result); 589 589 bool performNonEditingBehaviorForSelector(const String&, WebCore::KeyboardEvent*); 590 591 #if ENABLE(SERVICE_CONTROLS) 592 void replaceSelectionWithPasteboardData(const String& type, const IPC::DataReference&); 593 #endif 594 590 595 #elif PLATFORM(EFL) 591 596 void confirmComposition(const String& compositionString); … … 774 779 775 780 void getBytecodeProfile(uint64_t callbackID); 776 777 #if ENABLE(SERVICE_CONTROLS)778 void replaceControlledImage(const ShareableBitmap::Handle&);779 #endif780 781 781 782 // Some platforms require accessibility-enabled processes to spin the run loop so that the WebProcess doesn't hang. -
trunk/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in
r167786 r167956 304 304 ReadSelectionFromPasteboard(String pasteboardName) -> (bool result) 305 305 306 #if ENABLE(SERVICE_CONTROLS) 307 ReplaceSelectionWithPasteboardData(String type, IPC::DataReference data) 308 #endif 309 306 310 ShouldDelayWindowOrderingEvent(WebKit::WebMouseEvent event) -> (bool result) 307 311 AcceptsFirstMouse(int eventNumber, WebKit::WebMouseEvent event) -> (bool result) … … 364 368 365 369 TakeSnapshot(WebCore::IntRect snapshotRect, WebCore::IntSize bitmapSize, uint32_t options, uint64_t callbackID) 366 367 #if ENABLE(SERVICE_CONTROLS)368 ReplaceControlledImage(WebKit::ShareableBitmap::Handle newBitmapHandle)369 #endif370 370 } -
trunk/Source/WebKit2/WebProcess/WebPage/mac/WebPageMac.mm
r167388 r167956 46 46 #import "WebInspector.h" 47 47 #import "WebPageProxyMessages.h" 48 #import "WebPasteboardOverrides.h" 48 49 #import "WebPreferencesStore.h" 49 50 #import "WebProcess.h" … … 671 672 } 672 673 674 #if ENABLE(SERVICE_CONTROLS) 675 static String& replaceSelectionPasteboardName() 676 { 677 static NeverDestroyed<String> string("ReplaceSelectionPasteboard"); 678 return string; 679 } 680 681 void WebPage::replaceSelectionWithPasteboardData(const String& type, const IPC::DataReference& data) 682 { 683 WebPasteboardOverrides::sharedPasteboardOverrides().addOverride(replaceSelectionPasteboardName(), type, data.vector()); 684 685 bool result; 686 readSelectionFromPasteboard(replaceSelectionPasteboardName(), result); 687 688 WebPasteboardOverrides::sharedPasteboardOverrides().removeOverride(replaceSelectionPasteboardName(), type); 689 } 690 #endif 691 673 692 bool WebPage::performDefaultBehaviorForKeyEvent(const WebKeyboardEvent&) 674 693 {
Note: See TracChangeset
for help on using the changeset viewer.