WebKit Bugzilla
Attachment 348341 Details for
Bug 189054
: [iOS] Consolidate the implementations of readString, stringForType, and readURL in PlatformPasteboardIOS.mm
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Part 1 (rebased)
bug-189054-20180828141136.patch (text/plain), 16.03 KB, created by
Wenson Hsieh
on 2018-08-28 14:11:37 PDT
(
hide
)
Description:
Part 1 (rebased)
Filename:
MIME Type:
Creator:
Wenson Hsieh
Created:
2018-08-28 14:11:37 PDT
Size:
16.03 KB
patch
obsolete
>Subversion Revision: 235439 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index d32b1dc07369d47866848d155dce693de9aeed4e..db1f1cb69e63fdd53300675a8519bb01a71512a4 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,22 @@ >+2018-08-28 Wenson Hsieh <wenson_hsieh@apple.com> >+ >+ Work towards: [iOS] Consolidate the implementations of readString, stringForType, and readURL in PlatformPasteboardIOS.mm >+ https://bugs.webkit.org/show_bug.cgi?id=189054 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Remove the pasteboard type argument from PlatformPasteboard::readURL(). Currently, we only ever pass it >+ "public.url" anyways; for reading other types of strings, readString() already exists, which takes an arbitrary >+ pasteboard type. >+ >+ * platform/PasteboardStrategy.h: >+ * platform/PlatformPasteboard.h: >+ * platform/ios/PasteboardIOS.mm: >+ (WebCore::Pasteboard::readPasteboardWebContentDataForType): >+ (WebCore::Pasteboard::readPlatformValueAsString): >+ * platform/ios/PlatformPasteboardIOS.mm: >+ (WebCore::PlatformPasteboard::readURL): >+ > 2018-08-28 Youenn Fablet <youenn@apple.com> > > MediaDevices should be collectable as soon as its document is stopped >diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index be1e3cce8b733bfd7e65a11bb13b640e0beb9d08..df0ea9621b4f7cec1bf770b26ca934bcf6ca25b5 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,20 @@ >+2018-08-28 Wenson Hsieh <wenson_hsieh@apple.com> >+ >+ Work towards: [iOS] Consolidate the implementations of readString, stringForType, and readURL in PlatformPasteboardIOS.mm >+ https://bugs.webkit.org/show_bug.cgi?id=189054 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Remove the pasteboard type argument from readURLFromPasteboard. >+ >+ * UIProcess/Cocoa/WebPasteboardProxyCocoa.mm: >+ (WebKit::WebPasteboardProxy::readURLFromPasteboard): >+ * UIProcess/WebPasteboardProxy.h: >+ * UIProcess/WebPasteboardProxy.messages.in: >+ * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp: >+ (WebKit::WebPlatformStrategies::readURLFromPasteboard): >+ * WebProcess/WebCoreSupport/WebPlatformStrategies.h: >+ > 2018-08-28 Basuke Suzuki <Basuke.Suzuki@sony.com> > > [Curl] Fix issue that extra cookie is added when redirect happens. >diff --git a/Source/WebKitLegacy/mac/ChangeLog b/Source/WebKitLegacy/mac/ChangeLog >index de2642c76ad3868a80190983b9720e6481e0b6ee..1c632bd5811e11da38f81335174cf7bc6512ec03 100644 >--- a/Source/WebKitLegacy/mac/ChangeLog >+++ b/Source/WebKitLegacy/mac/ChangeLog >@@ -1,3 +1,16 @@ >+2018-08-28 Wenson Hsieh <wenson_hsieh@apple.com> >+ >+ Work towards: [iOS] Consolidate the implementations of readString, stringForType, and readURL in PlatformPasteboardIOS.mm >+ https://bugs.webkit.org/show_bug.cgi?id=189054 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Remove the pasteboard type argument from readURLFromPasteboard. >+ >+ * WebCoreSupport/WebPlatformStrategies.h: >+ * WebCoreSupport/WebPlatformStrategies.mm: >+ (WebPlatformStrategies::readURLFromPasteboard): >+ > 2018-08-27 Keith Rollin <krollin@apple.com> > > Unreviewed build fix -- disable LTO for production builds >diff --git a/Source/WebCore/platform/PasteboardStrategy.h b/Source/WebCore/platform/PasteboardStrategy.h >index 5ea4c6972ecaaf89d7068a6907ad68e50caf58d3..9d827c01f85cc02b21695d9b2e7bca15b4b9fd05 100644 >--- a/Source/WebCore/platform/PasteboardStrategy.h >+++ b/Source/WebCore/platform/PasteboardStrategy.h >@@ -50,7 +50,7 @@ public: > virtual int getPasteboardItemsCount(const String& pasteboardName) = 0; > virtual String readStringFromPasteboard(int index, const String& pasteboardType, const String& pasteboardName) = 0; > virtual RefPtr<SharedBuffer> readBufferFromPasteboard(int index, const String& pasteboardType, const String& pasteboardName) = 0; >- virtual URL readURLFromPasteboard(int index, const String& pasteboardType, const String& pasteboardName, String& title) = 0; >+ virtual URL readURLFromPasteboard(int index, const String& pasteboardName, String& title) = 0; > virtual Vector<PasteboardItemInfo> allPasteboardItemInfo(const String& pasteboardName) = 0; > virtual PasteboardItemInfo informationForItemAtIndex(int index, const String& pasteboardName) = 0; > virtual void updateSupportedTypeIdentifiers(const Vector<String>& identifiers, const String& pasteboardName) = 0; >diff --git a/Source/WebCore/platform/PlatformPasteboard.h b/Source/WebCore/platform/PlatformPasteboard.h >index ec93df08161cede48e12058f596f711837a15214..211c7839bb7d4d363a307599cedcdecb8baef344 100644 >--- a/Source/WebCore/platform/PlatformPasteboard.h >+++ b/Source/WebCore/platform/PlatformPasteboard.h >@@ -93,7 +93,7 @@ public: > WEBCORE_EXPORT void write(const PasteboardURL&); > WEBCORE_EXPORT RefPtr<SharedBuffer> readBuffer(int index, const String& pasteboardType); > WEBCORE_EXPORT String readString(int index, const String& pasteboardType); >- WEBCORE_EXPORT URL readURL(int index, const String& pasteboardType, String& title); >+ WEBCORE_EXPORT URL readURL(int index, String& title); > WEBCORE_EXPORT int count(); > WEBCORE_EXPORT int numberOfFiles() const; > >diff --git a/Source/WebCore/platform/ios/PasteboardIOS.mm b/Source/WebCore/platform/ios/PasteboardIOS.mm >index 3c709708b1221589877ba35f9a4b3cea0f1ec614..d1c02edf22028b4531afc7ec0f7609a5715372a3 100644 >--- a/Source/WebCore/platform/ios/PasteboardIOS.mm >+++ b/Source/WebCore/platform/ios/PasteboardIOS.mm >@@ -219,7 +219,7 @@ Pasteboard::ReaderResult Pasteboard::readPasteboardWebContentDataForType(Pastebo > > if ([type isEqualToString:(NSString *)kUTTypeURL]) { > String title; >- URL url = strategy.readURLFromPasteboard(itemIndex, kUTTypeURL, m_pasteboardName, title); >+ URL url = strategy.readURLFromPasteboard(itemIndex, m_pasteboardName, title); > if (m_changeCount != changeCount()) > return ReaderResult::PasteboardWasChangedExternally; > return !url.isNull() && reader.readURL(url, title) ? ReaderResult::ReadType : ReaderResult::DidNotReadType; >@@ -389,7 +389,7 @@ String Pasteboard::readPlatformValueAsString(const String& domType, long changeC > > if ([cocoaType isEqualToString:(NSString *)kUTTypeURL]) { > String title; >- URL url = strategy.readURLFromPasteboard(0, kUTTypeURL, pasteboardName, title); >+ URL url = strategy.readURLFromPasteboard(0, pasteboardName, title); > if (!url.isNull()) > cocoaValue = [(NSURL *)url absoluteString]; > } else if ([cocoaType isEqualToString:(NSString *)kUTTypePlainText]) { >diff --git a/Source/WebCore/platform/ios/PlatformPasteboardIOS.mm b/Source/WebCore/platform/ios/PlatformPasteboardIOS.mm >index 14fd446aa6d4d6b1e4145f2a43fddfa40f7d80a8..3db68b5d8a804261f829f867bda1a4875fcc3e66 100644 >--- a/Source/WebCore/platform/ios/PlatformPasteboardIOS.mm >+++ b/Source/WebCore/platform/ios/PlatformPasteboardIOS.mm >@@ -660,10 +660,10 @@ String PlatformPasteboard::readString(int index, const String& type) > return String(); > } > >-URL PlatformPasteboard::readURL(int index, const String& type, String& title) >+URL PlatformPasteboard::readURL(int index, String& title) > { > NSIndexSet *indexSet = [NSIndexSet indexSetWithIndex:index]; >- RetainPtr<NSArray> pasteboardItem = [m_pasteboard valuesForPasteboardType:type inItemSet:indexSet]; >+ RetainPtr<NSArray> pasteboardItem = [m_pasteboard valuesForPasteboardType:(__bridge NSString *)kUTTypeURL inItemSet:indexSet]; > > if (![pasteboardItem count]) > return { }; >diff --git a/Source/WebKit/UIProcess/Cocoa/WebPasteboardProxyCocoa.mm b/Source/WebKit/UIProcess/Cocoa/WebPasteboardProxyCocoa.mm >index 4b0544fb6edb8033551a148d4df1d1ccb5f246b0..c9924404febb09ae017b10ce9c5f882a59312709 100644 >--- a/Source/WebKit/UIProcess/Cocoa/WebPasteboardProxyCocoa.mm >+++ b/Source/WebKit/UIProcess/Cocoa/WebPasteboardProxyCocoa.mm >@@ -204,9 +204,9 @@ void WebPasteboardProxy::readStringFromPasteboard(uint64_t index, const String& > value = PlatformPasteboard(pasteboardName).readString(index, pasteboardType); > } > >-void WebPasteboardProxy::readURLFromPasteboard(uint64_t index, const String& pasteboardType, const String& pasteboardName, String& url, String& title) >+void WebPasteboardProxy::readURLFromPasteboard(uint64_t index, const String& pasteboardName, String& url, String& title) > { >- url = PlatformPasteboard(pasteboardName).readURL(index, pasteboardType, title); >+ url = PlatformPasteboard(pasteboardName).readURL(index, title); > } > > void WebPasteboardProxy::readBufferFromPasteboard(uint64_t index, const String& pasteboardType, const String& pasteboardName, SharedMemory::Handle& handle, uint64_t& size) >diff --git a/Source/WebKit/UIProcess/WebPasteboardProxy.h b/Source/WebKit/UIProcess/WebPasteboardProxy.h >index 58bdfed57d44e705326ff6c3a68b8f24478f2254..e5ec209327da0760e82cb44ae8339fdbd19105eb 100644 >--- a/Source/WebKit/UIProcess/WebPasteboardProxy.h >+++ b/Source/WebKit/UIProcess/WebPasteboardProxy.h >@@ -75,7 +75,7 @@ private: > void writeImageToPasteboard(const WebCore::PasteboardImage&, const String& pasteboardName); > void writeStringToPasteboard(const String& pasteboardType, const String&, const String& pasteboardName); > void readStringFromPasteboard(uint64_t index, const String& pasteboardType, const String& pasteboardName, WTF::String&); >- void readURLFromPasteboard(uint64_t index, const String& pasteboardType, const String& pasteboardName, String& url, String& title); >+ void readURLFromPasteboard(uint64_t index, const String& pasteboardName, String& url, String& title); > void readBufferFromPasteboard(uint64_t index, const String& pasteboardType, const String& pasteboardName, SharedMemory::Handle&, uint64_t& size); > void getPasteboardItemsCount(const String& pasteboardName, uint64_t& itemsCount); > void allPasteboardItemInfo(const String& pasteboardName, Vector<WebCore::PasteboardItemInfo>&); >diff --git a/Source/WebKit/UIProcess/WebPasteboardProxy.messages.in b/Source/WebKit/UIProcess/WebPasteboardProxy.messages.in >index 21749f97f6c94c98d5f09436024779fc0f81929e..b92cb81b6a66e01b10788c9a2cf625cb5fc8eecd 100644 >--- a/Source/WebKit/UIProcess/WebPasteboardProxy.messages.in >+++ b/Source/WebKit/UIProcess/WebPasteboardProxy.messages.in >@@ -27,7 +27,7 @@ messages -> WebPasteboardProxy { > WriteImageToPasteboard(struct WebCore::PasteboardImage pasteboardImage, String pasteboardName) > WriteStringToPasteboard(String pasteboardType, String text, String pasteboardName) > ReadStringFromPasteboard(uint64_t index, String pasteboardType, String pasteboardName) -> (String string) >- ReadURLFromPasteboard(uint64_t index, String pasteboardType, String pasteboardName) -> (String url, String title) >+ ReadURLFromPasteboard(uint64_t index, String pasteboardName) -> (String url, String title) > ReadBufferFromPasteboard(uint64_t index, String pasteboardType, String pasteboardName) -> (WebKit::SharedMemory::Handle handle, uint64_t size) > GetPasteboardItemsCount(String pasteboardName) -> (uint64_t itemsCount) > AllPasteboardItemInfo(String pasteboardName) -> (Vector<WebCore::PasteboardItemInfo> allInfo) >diff --git a/Source/WebKit/WebProcess/WebCoreSupport/WebPlatformStrategies.cpp b/Source/WebKit/WebProcess/WebCoreSupport/WebPlatformStrategies.cpp >index 2adf3c597dd9279e720937a943eb405ffb63a9f8..7602f5c94b2e55fd2705a5d56fc60519c944dbf3 100644 >--- a/Source/WebKit/WebProcess/WebCoreSupport/WebPlatformStrategies.cpp >+++ b/Source/WebKit/WebProcess/WebCoreSupport/WebPlatformStrategies.cpp >@@ -357,10 +357,10 @@ RefPtr<WebCore::SharedBuffer> WebPlatformStrategies::readBufferFromPasteboard(in > return SharedBuffer::create(static_cast<unsigned char *>(sharedMemoryBuffer->data()), size); > } > >-WebCore::URL WebPlatformStrategies::readURLFromPasteboard(int index, const String& pasteboardType, const String& pasteboardName, String& title) >+WebCore::URL WebPlatformStrategies::readURLFromPasteboard(int index, const String& pasteboardName, String& title) > { > String urlString; >- WebProcess::singleton().parentProcessConnection()->sendSync(Messages::WebPasteboardProxy::ReadURLFromPasteboard(index, pasteboardType, pasteboardName), Messages::WebPasteboardProxy::ReadURLFromPasteboard::Reply(urlString, title), 0); >+ WebProcess::singleton().parentProcessConnection()->sendSync(Messages::WebPasteboardProxy::ReadURLFromPasteboard(index, pasteboardName), Messages::WebPasteboardProxy::ReadURLFromPasteboard::Reply(urlString, title), 0); > return URL(ParsedURLString, urlString); > } > >diff --git a/Source/WebKit/WebProcess/WebCoreSupport/WebPlatformStrategies.h b/Source/WebKit/WebProcess/WebCoreSupport/WebPlatformStrategies.h >index b88fcab576be4ee9a09343f2bee1f67b15e2a28e..591d78fcdd09e90a0cad5c110b35bda628239c36 100644 >--- a/Source/WebKit/WebProcess/WebCoreSupport/WebPlatformStrategies.h >+++ b/Source/WebKit/WebProcess/WebCoreSupport/WebPlatformStrategies.h >@@ -64,7 +64,7 @@ private: > int getPasteboardItemsCount(const String& pasteboardName) override; > String readStringFromPasteboard(int index, const String& pasteboardType, const String& pasteboardName) override; > RefPtr<WebCore::SharedBuffer> readBufferFromPasteboard(int index, const String& pasteboardType, const String& pasteboardName) override; >- WebCore::URL readURLFromPasteboard(int index, const String& pasteboardType, const String& pasteboardName, String& title) override; >+ WebCore::URL readURLFromPasteboard(int index, const String& pasteboardName, String& title) override; > Vector<WebCore::PasteboardItemInfo> allPasteboardItemInfo(const String& pasteboardName) override; > WebCore::PasteboardItemInfo informationForItemAtIndex(int index, const String& pasteboardName) override; > void updateSupportedTypeIdentifiers(const Vector<String>& identifiers, const String& pasteboardName) override; >diff --git a/Source/WebKitLegacy/mac/WebCoreSupport/WebPlatformStrategies.h b/Source/WebKitLegacy/mac/WebCoreSupport/WebPlatformStrategies.h >index debb0332b12cad54e7409c7a6064fd59e7d80be0..a8d96263494a8f12a8516092d63d6377b25c1db9 100644 >--- a/Source/WebKitLegacy/mac/WebCoreSupport/WebPlatformStrategies.h >+++ b/Source/WebKitLegacy/mac/WebCoreSupport/WebPlatformStrategies.h >@@ -65,7 +65,7 @@ private: > int getPasteboardItemsCount(const String& pasteboardName) override; > String readStringFromPasteboard(int index, const String& pasteboardType, const String& pasteboardName) override; > RefPtr<WebCore::SharedBuffer> readBufferFromPasteboard(int index, const String& pasteboardType, const String& pasteboardName) override; >- WebCore::URL readURLFromPasteboard(int index, const String& pasteboardType, const String& pasteboardName, String& title) override; >+ WebCore::URL readURLFromPasteboard(int index, const String& pasteboardName, String& title) override; > Vector<WebCore::PasteboardItemInfo> allPasteboardItemInfo(const String& pasteboardName) override; > WebCore::PasteboardItemInfo informationForItemAtIndex(int index, const String& pasteboardName) override; > void updateSupportedTypeIdentifiers(const Vector<String>& identifiers, const String& pasteboardName) override; >diff --git a/Source/WebKitLegacy/mac/WebCoreSupport/WebPlatformStrategies.mm b/Source/WebKitLegacy/mac/WebCoreSupport/WebPlatformStrategies.mm >index 0b16dcd0925dcc441df88e7ed6432a6e435839af..9d578a0b957f261310688652841dcf9ecb754270 100644 >--- a/Source/WebKitLegacy/mac/WebCoreSupport/WebPlatformStrategies.mm >+++ b/Source/WebKitLegacy/mac/WebCoreSupport/WebPlatformStrategies.mm >@@ -234,9 +234,9 @@ RefPtr<WebCore::SharedBuffer> WebPlatformStrategies::readBufferFromPasteboard(in > return PlatformPasteboard(pasteboardName).readBuffer(index, type); > } > >-WebCore::URL WebPlatformStrategies::readURLFromPasteboard(int index, const String& type, const String& pasteboardName, String& title) >+WebCore::URL WebPlatformStrategies::readURLFromPasteboard(int index, const String& pasteboardName, String& title) > { >- return PlatformPasteboard(pasteboardName).readURL(index, type, title); >+ return PlatformPasteboard(pasteboardName).readURL(index, title); > } > > String WebPlatformStrategies::readStringFromPasteboard(int index, const String& type, const String& pasteboardName)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 189054
:
348340
|
348341
|
348524
|
348526