WebCore:
Reviewed by Harrison. Fix for <rdar://problem/4894155> REGRESSION: Extra line break is pasted with content into message body after choosing File - Paste Migration of some editing code from WebHTMView to WebCore::Editor resulted in not calling pasteboardTypesForSelection, which Mail was overriding for the special purpose of adding a type to the pasteboard after WebKit did. This patch adds 2 separate code paths for Tiger and Leopard. On Tiger we give in and call the WebView's pasteboardTypesForSelection. On Leopard we call a delegate after the pasteboard types are set. * bridge/EditorClient.h: * editing/Editor.h: * platform/Pasteboard.h: * platform/graphics/svg/SVGImageEmptyClients.h: (WebCore::SVGEmptyEditorClient::didSetSelectionTypesForPasteboard): (WebCore::SVGEmptyEditorClient::pasteboardTypesForSelection): * platform/mac/PasteboardMac.mm: (WebCore::Pasteboard::Pasteboard): (WebCore::Pasteboard::clear): (WebCore::Pasteboard::writeSelection): (WebCore::Pasteboard::writeURL): (WebCore::Pasteboard::plainText): (WebCore::Pasteboard::documentFragment): WebKit: Reviewed by Harrison. Fix for <rdar://problem/4894155> REGRESSION: Extra line break is pasted with content into message body after choosing File - Paste Migration of some editing code from WebHTMView to WebCore::Editor resulted in not calling pasteboardTypesForSelection, which Mail was overriding for the special purpose of adding a type to the pasteboard after WebKit did. This patch adds 2 separate code paths for Tiger and Leopard. On Tiger we give in and call the WebView's pasteboardTypesForSelection. On Leopard we call a delegate after the pasteboard types are set. * DefaultDelegates/WebDefaultEditingDelegate.m: (-[WebDefaultEditingDelegate webView:didSetSelectionTypesForPasteboard:]): * WebCoreSupport/WebEditorClient.h: * WebCoreSupport/WebEditorClient.mm: (WebEditorClient::didSetSelectionTypesForPasteboard): (WebEditorClient::pasteboardTypesForSelection): * WebView/WebEditingDelegate.h: WebKitQt: Added these stubs to keep the Qt build from failing. * WebCoreSupport/EditorClientQt.cpp: (WebCore::EditorClientQt::didSetSelectionTypesForPasteboard): * WebCoreSupport/EditorClientQt.h: git-svn-id: svn://svn.chromium.org/blink/trunk@18931 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Showing
Please register or sign in to comment