Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Enable custom pasteboard data in DumpRenderTree and WebKitTestRunner
https://bugs.webkit.org/show_bug.cgi?id=178154 Reviewed by Wenson Hsieh. Source/WebCore: Extracted the logic to compute the default enabled-ness of custom pasteboard data as Settings::defaultCustomPasteboardDataEnabled() to be called by WebKit1 and WebKit2 layers. * page/Settings.cpp: (WebCore::Settings::defaultCustomPasteboardDataEnabled): Extracted from customPasteboardDataEnabled. (WebCore::Settings::customPasteboardDataEnabled): Deleted. Now inlined in the header file. * page/Settings.h: (WebCore::Settings::customPasteboardDataEnabled): * platform/cocoa/PasteboardCocoa.mm: (WebCore::Pasteboard::read): Fixed a bug that we were adding MIME type to the map before checking that we could actually read the buffer. We shouldn't skip a type (NSTIFFPboardType and kUTTypeTIFF for now) if an equivalent type had failed to read. Source/WebKit: Plumbed customPasteboardDataEnabled flag to be used in WebKitTestRunner. * Shared/WebPreferencesDefinitions.h: * UIProcess/API/C/WKPreferences.cpp: (WKPreferencesSetCustomPasteboardDataEnabled): (WKPreferencesGetCustomPasteboardDataEnabled): * UIProcess/API/C/WKPreferencesRefPrivate.h: * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::updatePreferences): Source/WebKitLegacy/mac: Enable custom pasteboard data by default. * WebView/WebPreferenceKeysPrivate.h: * WebView/WebPreferences.mm: (+[WebPreferences initialize]): (-[WebPreferences customPasteboardDataEnabled]): Added. (-[WebPreferences setCustomPasteboardDataEnabled:]): Added. * WebView/WebPreferencesPrivate.h: * WebView/WebView.mm: (-[WebView _preferencesChanged:]): Tools: Fixed the bug that LocalPasteboard would fail to load the promise type if data is set after declaring types by delaying the call to provideDataForType until when dataForType is called. Without this fix, fast/events/dropzone-002.html would start failing after enabling custom pasteboard data. With this fix, fast/events/dropzone-005.html also starts passing. * DumpRenderTree/mac/DumpRenderTree.mm: (resetWebPreferencesToConsistentValues): * DumpRenderTree/mac/DumpRenderTreePasteboard.mm: (-[LocalPasteboard addTypes:owner:]): (-[LocalPasteboard dataForType:]): * WebKitTestRunner/TestController.cpp: (WTR::TestController::resetPreferencesToConsistentValues): LayoutTests: * editing/pasteboard/dataTransfer-setData-getData-expected.txt: Rebaselined. One more test case is passing now. * fast/events/dropzone-002.html: Fixed the test to accept an image since we no longer drop URLs when dropping an image avoid leaking local file paths. * platform/mac/TestExpectations: Enabled dropzone-005.html since it started passing after fixing LocalPasteboard. Canonical link: https://commits.webkit.org/194407@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223167 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
Showing
22 changed files
with
145 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters