Changeset 222228 in webkit


Ignore:
Timestamp:
Sep 19, 2017 2:50:03 PM (7 years ago)
Author:
rniwa@webkit.org
Message:

On iOS, getData can't get text set by setData during copy event
https://bugs.webkit.org/show_bug.cgi?id=176980
<rdar://problem/34453915>

Reviewed by Darin Adler.

Source/WebCore:

The bug was caused by iOS port not implementing Pasteboard::createPrivate(). Rather than implementing this in iOS,
replace its use for copy & paste events by StaticPasteboard Wenson added for input events. This makes read-write
pasteboard platform agnostic and paves the way to make writing to pasteboard in a single IPC in WebKit2.

Also fixed a bug that iOS port's Pasteboard::types returned the list of all supported types instead of ones
actually present in the pasteboard.

This patch also adds a vector of types to StaticPasteboard to maintain the type order.

Tests: editing/pasteboard/dataTransfer-types-is-initially-empty-on-copy.html

editing/pasteboard/dataTransfer-types-pasting-plaintext.html

  • dom/DataTransfer.cpp:

(WebCore::DataTransfer::createForCopyAndPaste): Make StaticPasteboard instead of a private pasteboard.
(WebCore::DataTransfer::createForInputEvent):

  • editing/Editor.cpp:

(WebCore::dispatchClipboardEvent): Call newly added commitToPasteboard on StaticPasteboard.

  • platform/Pasteboard.h:

(WebCore::Pasteboard::isStatic const):

  • platform/PasteboardStrategy.h:
  • platform/StaticPasteboard.cpp:

(WebCore::StaticPasteboard::create): Deleted.
(WebCore::StaticPasteboard::StaticPasteboard):
(WebCore::StaticPasteboard::hasData):
(WebCore::StaticPasteboard::types): Deleted. Now simply returns m_type.
(WebCore::StaticPasteboard::readString): Added.
(WebCore::StaticPasteboard::writeString): Added.
(WebCore::StaticPasteboard::clear): Added.
(WebCore::StaticPasteboard::commitToPasteboard): Added.
(isType): Added.

  • platform/StaticPasteboard.h:

(WebCore::Pasteboard::isStatic const): Added.

  • platform/gtk/PasteboardGtk.cpp:

(WebCore::Pasteboard::createPrivate): Deleted.
(WebCore::Pasteboard::writePasteboard): Deleted.

  • platform/ios/PasteboardIOS.mm:

(WebCore::Pasteboard::createPrivate): Deleted.
(WebCore::Pasteboard::writePasteboard): Deleted.
(WebCore::addHTMLClipboardTypesForCocoaType):
(WebCore::Pasteboard::types): Return the actual list of types in the pasteboard.

  • platform/mac/PasteboardMac.mm:

(WebCore::Pasteboard::createPrivate): Deleted.
(WebCore::Pasteboard::writePasteboard): Deleted.

  • platform/win/PasteboardWin.cpp:

(WebCore::Pasteboard::createPrivate): Deleted.
(WebCore::Pasteboard::writePasteboard): Deleted.

  • platform/wpe/PasteboardWPE.cpp:

(WebCore::Pasteboard::createPrivate): Deleted.
(WebCore::Pasteboard::writePasteboard): Deleted.

Source/WebKit:

  • WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:

(WebKit::WebPlatformStrategies::copy): Deleted.

  • WebProcess/WebCoreSupport/WebPlatformStrategies.h:

Source/WebKitLegacy/mac:

  • WebCoreSupport/WebPlatformStrategies.h:
  • WebCoreSupport/WebPlatformStrategies.mm:

(WebPlatformStrategies::copy): Deleted.

LayoutTests:

Added regression tests to make sure dataTransfer.types returns an empty list when writing to a pasteboard (copy),
and doesn't contain image types when pasting plain text. Unfortunately, pasting image does result in plain text
content being present in the pasteboard in the form of URL so we can't test that scenario.

Also removed failing expectations from a number of tests that are now passing on iOS.

  • editing/pasteboard/dataTransfer-types-is-initially-empty-on-copy-expected.txt: Added.
  • editing/pasteboard/dataTransfer-types-is-initially-empty-on-copy.html: Added.
  • editing/pasteboard/dataTransfer-types-pasting-plaintext-expected.txt: Added.
  • editing/pasteboard/dataTransfer-types-pasting-plaintext.html: Added.
  • platform/ios/TestExpectations:
Location:
trunk
Files:
4 added
20 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r222226 r222228  
     12017-09-19  Ryosuke Niwa  <rniwa@webkit.org>
     2
     3        On iOS, getData can't get text set by setData during copy event
     4        https://bugs.webkit.org/show_bug.cgi?id=176980
     5        <rdar://problem/34453915>
     6
     7        Reviewed by Darin Adler.
     8
     9        Added regression tests to make sure dataTransfer.types returns an empty list when writing to a pasteboard (copy),
     10        and doesn't contain image types when pasting plain text. Unfortunately, pasting image does result in plain text
     11        content being present in the pasteboard in the form of URL so we can't test that scenario.
     12
     13        Also removed failing expectations from a number of tests that are now passing on iOS.
     14
     15        * editing/pasteboard/dataTransfer-types-is-initially-empty-on-copy-expected.txt: Added.
     16        * editing/pasteboard/dataTransfer-types-is-initially-empty-on-copy.html: Added.
     17        * editing/pasteboard/dataTransfer-types-pasting-plaintext-expected.txt: Added.
     18        * editing/pasteboard/dataTransfer-types-pasting-plaintext.html: Added.
     19        * platform/ios/TestExpectations:
     20
    1212017-09-19  Zalan Bujtas  <zalan@apple.com>
    222
  • trunk/LayoutTests/platform/ios/TestExpectations

    r222225 r222228  
    22262226editing/pasteboard/4242293-1.html [ Failure ]
    22272227editing/pasteboard/5780697-2.html [ Failure ]
    2228 editing/pasteboard/can-read-in-copy-and-cut-events.html [ Failure ]
    22292228editing/pasteboard/clipboard-customData.html [ Failure ]
    22302229editing/pasteboard/copy-backslash-with-euc.html [ Failure ]
     
    22332232editing/pasteboard/copy-text-with-backgroundcolor.html [ Failure ]
    22342233editing/pasteboard/copy-two-pasteboard-types-both-work.html [ Failure ]
    2235 editing/pasteboard/copy-without-selection.html [ Failure ]
    22362234editing/pasteboard/data-transfer-items.html [ Failure ]
    22372235editing/pasteboard/dataTransfer-setData-getData.html [ Failure ]
    2238 editing/pasteboard/datatransfer-getdata-plaintext.html [ Failure ]
    2239 editing/pasteboard/datatransfer-items-copy-plaintext.html [ Failure ]
    22402236editing/pasteboard/display-block-on-spans.html [ Failure ]
    22412237editing/pasteboard/emacs-ctrl-k-with-move.html [ Failure ]
     
    22622258editing/pasteboard/paste-sanitize-crash-2.html [ Failure ]
    22632259editing/pasteboard/paste-text-events.html [ Failure ]
    2264 editing/pasteboard/pasting-empty-html-falls-back-to-text.html [ Failure ]
    22652260editing/pasteboard/smart-paste-001.html [ Failure ]
    22662261editing/pasteboard/smart-paste-002.html [ Failure ]
  • trunk/Source/WebCore/ChangeLog

    r222226 r222228  
     12017-09-19  Ryosuke Niwa  <rniwa@webkit.org>
     2
     3        On iOS, getData can't get text set by setData during copy event
     4        https://bugs.webkit.org/show_bug.cgi?id=176980
     5        <rdar://problem/34453915>
     6
     7        Reviewed by Darin Adler.
     8
     9        The bug was caused by iOS port not implementing Pasteboard::createPrivate(). Rather than implementing this in iOS,
     10        replace its use for copy & paste events by StaticPasteboard Wenson added for input events. This makes read-write
     11        pasteboard platform agnostic and paves the way to make writing to pasteboard in a single IPC in WebKit2.
     12
     13        Also fixed a bug that iOS port's Pasteboard::types returned the list of all supported types instead of ones
     14        actually present in the pasteboard.
     15
     16        This patch also adds a vector of types to StaticPasteboard to maintain the type order.
     17
     18        Tests: editing/pasteboard/dataTransfer-types-is-initially-empty-on-copy.html
     19               editing/pasteboard/dataTransfer-types-pasting-plaintext.html
     20
     21        * dom/DataTransfer.cpp:
     22        (WebCore::DataTransfer::createForCopyAndPaste): Make StaticPasteboard instead of a private pasteboard.
     23        (WebCore::DataTransfer::createForInputEvent):
     24        * editing/Editor.cpp:
     25        (WebCore::dispatchClipboardEvent): Call newly added commitToPasteboard on StaticPasteboard.
     26        * platform/Pasteboard.h:
     27        (WebCore::Pasteboard::isStatic const):
     28        * platform/PasteboardStrategy.h:
     29        * platform/StaticPasteboard.cpp:
     30        (WebCore::StaticPasteboard::create): Deleted.
     31        (WebCore::StaticPasteboard::StaticPasteboard):
     32        (WebCore::StaticPasteboard::hasData):
     33        (WebCore::StaticPasteboard::types): Deleted. Now simply returns m_type.
     34        (WebCore::StaticPasteboard::readString): Added.
     35        (WebCore::StaticPasteboard::writeString): Added.
     36        (WebCore::StaticPasteboard::clear): Added.
     37        (WebCore::StaticPasteboard::commitToPasteboard): Added.
     38        (isType): Added.
     39        * platform/StaticPasteboard.h:
     40        (WebCore::Pasteboard::isStatic const): Added.
     41        * platform/gtk/PasteboardGtk.cpp:
     42        (WebCore::Pasteboard::createPrivate): Deleted.
     43        (WebCore::Pasteboard::writePasteboard): Deleted.
     44        * platform/ios/PasteboardIOS.mm:
     45        (WebCore::Pasteboard::createPrivate): Deleted.
     46        (WebCore::Pasteboard::writePasteboard): Deleted.
     47        (WebCore::addHTMLClipboardTypesForCocoaType):
     48        (WebCore::Pasteboard::types): Return the actual list of types in the pasteboard.
     49        * platform/mac/PasteboardMac.mm:
     50        (WebCore::Pasteboard::createPrivate): Deleted.
     51        (WebCore::Pasteboard::writePasteboard): Deleted.
     52        * platform/win/PasteboardWin.cpp:
     53        (WebCore::Pasteboard::createPrivate): Deleted.
     54        (WebCore::Pasteboard::writePasteboard): Deleted.
     55        * platform/wpe/PasteboardWPE.cpp:
     56        (WebCore::Pasteboard::createPrivate): Deleted.
     57        (WebCore::Pasteboard::writePasteboard): Deleted.
     58
    1592017-09-19  Zalan Bujtas  <zalan@apple.com>
    260
  • trunk/Source/WebCore/dom/DataTransfer.cpp

    r222025 r222228  
    7575Ref<DataTransfer> DataTransfer::createForCopyAndPaste(StoreMode mode)
    7676{
    77     return adoptRef(*new DataTransfer(mode, mode == StoreMode::ReadWrite ? Pasteboard::createPrivate() : Pasteboard::createForCopyAndPaste()));
     77    return adoptRef(*new DataTransfer(mode, mode == StoreMode::ReadWrite ? std::make_unique<StaticPasteboard>() : Pasteboard::createForCopyAndPaste()));
    7878}
    7979
     
    221221Ref<DataTransfer> DataTransfer::createForInputEvent(const String& plainText, const String& htmlText)
    222222{
    223     TypeToStringMap typeToStringMap { { ASCIILiteral("text/plain"), plainText }, { ASCIILiteral("text/html"), htmlText } };
    224     return adoptRef(*new DataTransfer(StoreMode::Readonly, StaticPasteboard::create(WTFMove(typeToStringMap)), Type::InputEvent));
     223    auto pasteboard = std::make_unique<StaticPasteboard>();
     224    pasteboard->writeString(ASCIILiteral("text/plain"), plainText);
     225    pasteboard->writeString(ASCIILiteral("text/html"), htmlText);
     226    return adoptRef(*new DataTransfer(StoreMode::Readonly, WTFMove(pasteboard), Type::InputEvent));
    225227}
    226228
  • trunk/Source/WebCore/editing/Editor.cpp

    r221960 r222228  
    8686#include "SpellChecker.h"
    8787#include "SpellingCorrectionCommand.h"
     88#include "StaticPasteboard.h"
    8889#include "StyleProperties.h"
    8990#include "TelephoneNumberDetector.h"
     
    346347        auto pasteboard = Pasteboard::createForCopyAndPaste();
    347348        pasteboard->clear();
    348         pasteboard->writePasteboard(dataTransfer->pasteboard());
     349        downcast<StaticPasteboard>(dataTransfer->pasteboard()).commitToPasteboard(*pasteboard);
    349350    }
    350351
  • trunk/Source/WebCore/platform/Pasteboard.h

    r221900 r222228  
    164164
    165165    WEBCORE_EXPORT static std::unique_ptr<Pasteboard> createForCopyAndPaste();
    166     static std::unique_ptr<Pasteboard> createPrivate(); // Temporary pasteboard. Can put data on this and then write to another pasteboard with writePasteboard.
     166
     167    virtual bool isStatic() const { return false; }
    167168
    168169    virtual bool hasData();
     
    188189    enum SmartReplaceOption { CanSmartReplace, CannotSmartReplace };
    189190    virtual WEBCORE_EXPORT void writePlainText(const String&, SmartReplaceOption); // FIXME: Two separate functions would be clearer than one function with an argument.
    190     virtual void writePasteboard(const Pasteboard& sourcePasteboard);
    191191
    192192#if ENABLE(DRAG_SUPPORT)
  • trunk/Source/WebCore/platform/PasteboardStrategy.h

    r222113 r222228  
    6767    virtual long addTypes(const Vector<String>& pasteboardTypes, const String& pasteboardName) = 0;
    6868    virtual long setTypes(const Vector<String>& pasteboardTypes, const String& pasteboardName) = 0;
    69     virtual long copy(const String& fromPasteboard, const String& toPasteboard) = 0;
    7069    virtual long setBufferForType(SharedBuffer*, const String& pasteboardType, const String& pasteboardName) = 0;
    7170    virtual long setPathnamesForType(const Vector<String>&, const String& pasteboardType, const String& pasteboardName) = 0;
  • trunk/Source/WebCore/platform/StaticPasteboard.cpp

    r207841 r222228  
    2929namespace WebCore {
    3030
    31 std::unique_ptr<StaticPasteboard> StaticPasteboard::create(TypeToStringMap&& typeToStringMap)
    32 {
    33     return std::make_unique<StaticPasteboard>(WTFMove(typeToStringMap));
    34 }
    35 
    36 StaticPasteboard::StaticPasteboard(TypeToStringMap&& typeToStringMap)
    37     : m_typeToStringMap(typeToStringMap)
     31StaticPasteboard::StaticPasteboard()
    3832{
    3933}
     
    4135bool StaticPasteboard::hasData()
    4236{
    43     return !m_typeToStringMap.isEmpty();
    44 }
    45 
    46 Vector<String> StaticPasteboard::types()
    47 {
    48     Vector<String> allTypes(m_typeToStringMap.size());
    49     for (auto& type : m_typeToStringMap.keys())
    50         allTypes.append(type);
    51     return allTypes;
     37    return !m_stringContents.isEmpty();
    5238}
    5339
    5440String StaticPasteboard::readString(const String& type)
    5541{
    56     if (!m_typeToStringMap.contains(type))
     42    if (!m_stringContents.contains(type))
    5743        return { };
    58     return m_typeToStringMap.get(type);
     44    return m_stringContents.get(type);
     45}
     46
     47void StaticPasteboard::writeString(const String& type, const String& value)
     48{
     49    auto result = m_stringContents.set(type, value);
     50    if (result.isNewEntry)
     51        m_types.append(type);
     52    else {
     53        m_types.removeFirst(type);
     54        ASSERT(!m_types.contains(type));
     55        m_types.append(type);
     56    }
     57}
     58
     59void StaticPasteboard::clear()
     60{
     61    m_stringContents.clear();
     62    m_types.clear();
     63}
     64
     65void StaticPasteboard::clear(const String& type)
     66{
     67    if (!m_stringContents.remove(type))
     68        return;
     69    m_types.removeFirst(type);
     70    ASSERT(!m_types.contains(type));
     71}
     72
     73// FIXME: Copy the entire StaticPasteboard to UIProcess instead of writing each string.
     74void StaticPasteboard::commitToPasteboard(Pasteboard& pasteboard)
     75{
     76    for (auto& type : m_types)
     77        pasteboard.writeString(type, m_stringContents.get(type));
    5978}
    6079
  • trunk/Source/WebCore/platform/StaticPasteboard.h

    r212239 r222228  
    2828#include "Pasteboard.h"
    2929#include <wtf/HashMap.h>
     30#include <wtf/Vector.h>
    3031#include <wtf/text/StringHash.h>
    3132
    3233namespace WebCore {
    3334
    34 typedef HashMap<String, String> TypeToStringMap;
    35 
    3635class StaticPasteboard final : public Pasteboard {
    3736public:
    38     static std::unique_ptr<StaticPasteboard> create(TypeToStringMap&&);
     37    StaticPasteboard();
    3938
    40     StaticPasteboard(TypeToStringMap&&);
     39    void commitToPasteboard(Pasteboard&);
     40
     41    bool isStatic() const final { return true; }
    4142
    4243    bool hasData() final;
    43     Vector<String> types() final;
     44    Vector<String> types() final { return m_types; }
    4445    String readString(const String& type) final;
    4546
    46     void writeString(const String&, const String&) final { }
    47     void clear() final { }
    48     void clear(const String&) final { }
     47    void writeString(const String& type, const String& data) final;
     48    void clear() final;
     49    void clear(const String& type) final;
    4950
    5051    void read(PasteboardPlainText&) final { }
     
    6061    void writeMarkup(const String&) final { }
    6162    void writePlainText(const String&, SmartReplaceOption) final { }
    62     void writePasteboard(const Pasteboard&) final { }
    6363
    6464#if ENABLE(DRAG_SUPPORT)
     
    6767
    6868private:
    69     TypeToStringMap m_typeToStringMap;
     69    Vector<String> m_types;
     70    HashMap<String, String> m_stringContents;
    7071};
    7172
    7273}
     74
     75SPECIALIZE_TYPE_TRAITS_BEGIN(WebCore::StaticPasteboard)
     76    static bool isType(const WebCore::Pasteboard& pasteboard) { return pasteboard.isStatic(); }
     77SPECIALIZE_TYPE_TRAITS_END()
  • trunk/Source/WebCore/platform/gtk/PasteboardGtk.cpp

    r221063 r222228  
    5151}
    5252
    53 std::unique_ptr<Pasteboard> Pasteboard::createPrivate()
    54 {
    55     return std::make_unique<Pasteboard>(SelectionData::create());
    56 }
    57 
    5853#if ENABLE(DRAG_SUPPORT)
    5954std::unique_ptr<Pasteboard> Pasteboard::createForDragAndDrop()
     
    196191    m_selectionData->setMarkup(pasteboardContent.markup);
    197192    m_selectionData->setCanSmartReplace(pasteboardContent.canSmartCopyOrDelete);
    198 
    199     writeToClipboard();
    200 }
    201 
    202 void Pasteboard::writePasteboard(const Pasteboard& sourcePasteboard)
    203 {
    204     const auto& sourceDataObject = sourcePasteboard.selectionData();
    205     m_selectionData->clearAll();
    206 
    207     if (sourceDataObject.hasText())
    208         m_selectionData->setText(sourceDataObject.text());
    209     if (sourceDataObject.hasMarkup())
    210         m_selectionData->setMarkup(sourceDataObject.markup());
    211     if (sourceDataObject.hasURL())
    212         m_selectionData->setURL(sourceDataObject.url(), sourceDataObject.urlLabel());
    213     if (sourceDataObject.hasURIList())
    214         m_selectionData->setURIList(sourceDataObject.uriList());
    215     if (sourceDataObject.hasImage())
    216         m_selectionData->setImage(sourceDataObject.image());
    217     if (sourceDataObject.hasUnknownTypeData()) {
    218         for (auto& it : sourceDataObject.unknownTypes())
    219             m_selectionData->setUnknownTypeData(it.key, it.value);
    220     }
    221193
    222194    writeToClipboard();
  • trunk/Source/WebCore/platform/ios/PasteboardIOS.mm

    r222176 r222228  
    134134}
    135135
    136 std::unique_ptr<Pasteboard> Pasteboard::createPrivate()
    137 {
    138     return std::make_unique<Pasteboard>(changeCountForPasteboard());
    139 }
    140 
    141136void Pasteboard::write(const PasteboardWebContent& content)
    142137{
     
    173168    // URLs.
    174169    ASSERT_NOT_REACHED();
    175 }
    176 
    177 void Pasteboard::writePasteboard(const Pasteboard&)
    178 {
    179170}
    180171
     
    405396{
    406397    // UTI may not do these right, so make sure we get the right, predictable result.
    407     if ([cocoaType isEqualToString:(NSString *)kUTTypeText]) {
     398    if ([cocoaType isEqualToString:(NSString *)kUTTypePlainText]
     399        || [cocoaType isEqualToString:(NSString *)kUTTypeUTF8PlainText]
     400        || [cocoaType isEqualToString:(NSString *)kUTTypeUTF16PlainText]) {
    408401        resultTypes.add(ASCIILiteral("text/plain"));
    409402        return;
     
    433426Vector<String> Pasteboard::types()
    434427{
    435     NSArray *types = supportedWebContentPasteboardTypes();
     428    Vector<String> cocoaTypes;
     429    platformStrategies()->pasteboardStrategy()->getTypes(cocoaTypes, m_pasteboardName);
    436430
    437431    // Enforce changeCount ourselves for security. We check after reading instead of before to be
     
    441435
    442436    ListHashSet<String> result;
    443     NSUInteger count = [types count];
    444     for (NSUInteger i = 0; i < count; i++) {
    445         NSString *type = [types objectAtIndex:i];
    446         addHTMLClipboardTypesForCocoaType(result, type);
    447     }
     437    for (auto cocoaType : cocoaTypes)
     438        addHTMLClipboardTypesForCocoaType(result, cocoaType);
    448439
    449440    Vector<String> vector;
  • trunk/Source/WebCore/platform/mac/PasteboardMac.mm

    r221900 r222228  
    139139}
    140140
    141 std::unique_ptr<Pasteboard> Pasteboard::createPrivate()
    142 {
    143     return std::make_unique<Pasteboard>(platformStrategies()->pasteboardStrategy()->uniqueName());
    144 }
    145 
    146141#if ENABLE(DRAG_SUPPORT)
    147142std::unique_ptr<Pasteboard> Pasteboard::createForDragAndDrop()
     
    297292        m_changeCount = platformStrategies()->pasteboardStrategy()->setBufferForType(pasteboardImage.dataInWebArchiveFormat.get(), WebArchivePboardType, m_pasteboardName);
    298293    writeFileWrapperAsRTFDAttachment(fileWrapper(pasteboardImage), m_pasteboardName, m_changeCount);
    299 }
    300 
    301 void Pasteboard::writePasteboard(const Pasteboard& pasteboard)
    302 {
    303     m_changeCount = platformStrategies()->pasteboardStrategy()->copy(pasteboard.m_pasteboardName, m_pasteboardName);
    304294}
    305295
  • trunk/Source/WebCore/platform/win/PasteboardWin.cpp

    r221063 r222228  
    100100}
    101101
    102 std::unique_ptr<Pasteboard> Pasteboard::createPrivate()
    103 {
    104     // Windows has no "Private pasteboard" concept.
    105     return createForCopyAndPaste();
    106 }
    107 
    108102#if ENABLE(DRAG_SUPPORT)
    109103std::unique_ptr<Pasteboard> Pasteboard::createForDragAndDrop()
     
    759753        ::CloseClipboard();
    760754    }
    761 }
    762 
    763 void Pasteboard::writePasteboard(const Pasteboard& sourcePasteboard)
    764 {
    765     notImplemented();
    766755}
    767756
  • trunk/Source/WebCore/platform/wpe/PasteboardWPE.cpp

    r216497 r222228  
    3434
    3535std::unique_ptr<Pasteboard> Pasteboard::createForCopyAndPaste()
    36 {
    37     return std::make_unique<Pasteboard>();
    38 }
    39 
    40 std::unique_ptr<Pasteboard> Pasteboard::createPrivate()
    4136{
    4237    return std::make_unique<Pasteboard>();
     
    128123}
    129124
    130 void Pasteboard::writePasteboard(const Pasteboard&)
    131 {
    132 }
    133 
    134125} // namespace WebCore
  • trunk/Source/WebKit/ChangeLog

    r222212 r222228  
     12017-09-19  Ryosuke Niwa  <rniwa@webkit.org>
     2
     3        On iOS, getData can't get text set by setData during copy event
     4        https://bugs.webkit.org/show_bug.cgi?id=176980
     5        <rdar://problem/34453915>
     6
     7        Reviewed by Darin Adler.
     8
     9        * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
     10        (WebKit::WebPlatformStrategies::copy): Deleted.
     11        * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
     12
    1132017-09-19  Alex Christensen  <achristensen@webkit.org>
    214
  • trunk/Source/WebKit/WebProcess/WebCoreSupport/WebPlatformStrategies.cpp

    r221275 r222228  
    203203}
    204204
    205 long WebPlatformStrategies::copy(const String& fromPasteboard, const String& toPasteboard)
    206 {
    207     uint64_t newChangeCount;
    208     WebProcess::singleton().parentProcessConnection()->sendSync(Messages::WebPasteboardProxy::PasteboardCopy(fromPasteboard, toPasteboard), Messages::WebPasteboardProxy::PasteboardCopy::Reply(newChangeCount), 0);
    209     return newChangeCount;
    210 }
    211 
    212205long WebPlatformStrategies::changeCount(const WTF::String &pasteboardName)
    213206{
  • trunk/Source/WebKit/WebProcess/WebCoreSupport/WebPlatformStrategies.h

    r221275 r222228  
    8383    long addTypes(const Vector<String>& pasteboardTypes, const String& pasteboardName) override;
    8484    long setTypes(const Vector<String>& pasteboardTypes, const String& pasteboardName) override;
    85     long copy(const String& fromPasteboard, const String& toPasteboard) override;
    8685    long setBufferForType(WebCore::SharedBuffer*, const String& pasteboardType, const String& pasteboardName) override;
    8786    long setPathnamesForType(const Vector<String>&, const String& pasteboardType, const String& pasteboardName) override;
  • trunk/Source/WebKitLegacy/mac/ChangeLog

    r222150 r222228  
     12017-09-19  Ryosuke Niwa  <rniwa@webkit.org>
     2
     3        On iOS, getData can't get text set by setData during copy event
     4        https://bugs.webkit.org/show_bug.cgi?id=176980
     5        <rdar://problem/34453915>
     6
     7        Reviewed by Darin Adler.
     8
     9        * WebCoreSupport/WebPlatformStrategies.h:
     10        * WebCoreSupport/WebPlatformStrategies.mm:
     11        (WebPlatformStrategies::copy): Deleted.
     12
    1132017-09-18  Andy Estes  <aestes@apple.com>
    214
  • trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebPlatformStrategies.h

    r221275 r222228  
    8282    long addTypes(const Vector<String>& pasteboardTypes, const String& pasteboardName) override;
    8383    long setTypes(const Vector<String>& pasteboardTypes, const String& pasteboardName) override;
    84     long copy(const String& fromPasteboard, const String& toPasteboard) override;
    8584    long setBufferForType(WebCore::SharedBuffer*, const String& pasteboardType, const String& pasteboardName) override;
    8685    long setPathnamesForType(const Vector<String>&, const String& pasteboardType, const String& pasteboardName) override;
  • trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebPlatformStrategies.mm

    r221275 r222228  
    130130}
    131131
    132 long WebPlatformStrategies::copy(const String& fromPasteboard, const String& toPasteboard)
    133 {
    134     return PlatformPasteboard(toPasteboard).copy(fromPasteboard);
    135 }
    136 
    137132long WebPlatformStrategies::changeCount(const String &pasteboardName)
    138133{
Note: See TracChangeset for help on using the changeset viewer.