Changeset 109176 in webkit


Ignore:
Timestamp:
Feb 28, 2012 5:31:55 PM (12 years ago)
Author:
dcheng@chromium.org
Message:

Clipboard::getData should return an empty string instead of undefined
https://bugs.webkit.org/show_bug.cgi?id=79712

Reviewed by Tony Chang.

Source/WebCore:

Per the spec, an empty string should be returned when there is no data for the given typestring.

Test: fast/events/dataTransfer-getData-returns-empty-string.html

  • bindings/js/JSClipboardCustom.cpp:
  • bindings/v8/custom/V8ClipboardCustom.cpp:
  • dom/Clipboard.h:

(Clipboard):

  • dom/Clipboard.idl:
  • platform/blackberry/ClipboardBlackBerry.cpp:

(WebCore::ClipboardBlackBerry::getData):

  • platform/blackberry/ClipboardBlackBerry.h:

(ClipboardBlackBerry):

  • platform/chromium/ClipboardChromium.cpp:

(WebCore::ClipboardChromium::getData):

  • platform/chromium/ClipboardChromium.h:

(ClipboardChromium):

  • platform/efl/ClipboardEfl.cpp:

(WebCore::ClipboardEfl::getData):

  • platform/efl/ClipboardEfl.h:

(ClipboardEfl):

  • platform/gtk/ClipboardGtk.cpp:

(WebCore::ClipboardGtk::getData):

  • platform/gtk/ClipboardGtk.h:

(ClipboardGtk):

  • platform/mac/ClipboardMac.h:

(ClipboardMac):

  • platform/mac/ClipboardMac.mm:

(WebCore::ClipboardMac::getData):

  • platform/qt/ClipboardQt.cpp:

(WebCore::ClipboardQt::getData):

  • platform/qt/ClipboardQt.h:

(ClipboardQt):

  • platform/win/ClipboardUtilitiesWin.cpp:

(WebCore::getFullCFHTML):
(WebCore::getURL):
(WebCore::getPlainText):
(WebCore::getTextHTML):
(WebCore::getCFHTML):
(WebCore::fragmentFromHTML):

  • platform/win/ClipboardUtilitiesWin.h:

(WebCore):

  • platform/win/ClipboardWin.cpp:

(WebCore::ClipboardWin::getData):

  • platform/win/ClipboardWin.h:

(ClipboardWin):

  • platform/wx/ClipboardWx.cpp:

(WebCore::ClipboardWx::getData):

  • platform/wx/ClipboardWx.h:

(ClipboardWx):

LayoutTests:

  • fast/events/dataTransfer-getData-returns-empty-string-expected.txt: Added.
  • fast/events/dataTransfer-getData-returns-empty-string.html: Added.
  • http/tests/local/drag-over-remote-content-expected.txt:
  • http/tests/security/drag-over-remote-content-iframe-expected.txt:
  • http/tests/security/drag-over-remote-content-iframe.html:
Location:
trunk
Files:
28 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r109170 r109176  
     12012-02-28  Daniel Cheng  <dcheng@chromium.org>
     2
     3        Clipboard::getData should return an empty string instead of undefined
     4        https://bugs.webkit.org/show_bug.cgi?id=79712
     5
     6        Reviewed by Tony Chang.
     7
     8        * fast/events/dataTransfer-getData-returns-empty-string-expected.txt: Added.
     9        * fast/events/dataTransfer-getData-returns-empty-string.html: Added.
     10        * http/tests/local/drag-over-remote-content-expected.txt:
     11        * http/tests/security/drag-over-remote-content-iframe-expected.txt:
     12        * http/tests/security/drag-over-remote-content-iframe.html:
     13
    1142012-02-28  Adam Klein  <adamk@chromium.org>
    215
  • trunk/LayoutTests/http/tests/local/drag-over-remote-content-expected.txt

    r44027 r109176  
    88To test, drag Abe's image into this light blue div.
    99
    10 PASS: ondragover saw a URL of 'undefined'
     10PASS: ondragover saw a URL of ''
    1111
  • trunk/LayoutTests/http/tests/security/drag-over-remote-content-iframe-expected.txt

    r44027 r109176  
    55To test, drag Abe's image into this light blue div.
    66
    7 PASS: ondragover saw a URL of 'undefined'
     7PASS: ondragover saw a URL of ''
    88
  • trunk/LayoutTests/http/tests/security/drag-over-remote-content-iframe.html

    r44027 r109176  
    1818    dragTarget.ondragover = function() {
    1919        var url = event.dataTransfer.getData('URL');
    20         var result = url === undefined
    21             ? "PASS: ondragover saw a URL of 'undefined'"
     20        var result = url === ''
     21            ? "PASS: ondragover saw a URL of ''"
    2222            : "FAIL: ondragover saw a URL of '" + url + "'";
    2323        log(result);
  • trunk/Source/WebCore/ChangeLog

    r109175 r109176  
     12012-02-28  Daniel Cheng  <dcheng@chromium.org>
     2
     3        Clipboard::getData should return an empty string instead of undefined
     4        https://bugs.webkit.org/show_bug.cgi?id=79712
     5
     6        Reviewed by Tony Chang.
     7
     8        Per the spec, an empty string should be returned when there is no data for the given typestring.
     9
     10        Test: fast/events/dataTransfer-getData-returns-empty-string.html
     11
     12        * bindings/js/JSClipboardCustom.cpp:
     13        * bindings/v8/custom/V8ClipboardCustom.cpp:
     14        * dom/Clipboard.h:
     15        (Clipboard):
     16        * dom/Clipboard.idl:
     17        * platform/blackberry/ClipboardBlackBerry.cpp:
     18        (WebCore::ClipboardBlackBerry::getData):
     19        * platform/blackberry/ClipboardBlackBerry.h:
     20        (ClipboardBlackBerry):
     21        * platform/chromium/ClipboardChromium.cpp:
     22        (WebCore::ClipboardChromium::getData):
     23        * platform/chromium/ClipboardChromium.h:
     24        (ClipboardChromium):
     25        * platform/efl/ClipboardEfl.cpp:
     26        (WebCore::ClipboardEfl::getData):
     27        * platform/efl/ClipboardEfl.h:
     28        (ClipboardEfl):
     29        * platform/gtk/ClipboardGtk.cpp:
     30        (WebCore::ClipboardGtk::getData):
     31        * platform/gtk/ClipboardGtk.h:
     32        (ClipboardGtk):
     33        * platform/mac/ClipboardMac.h:
     34        (ClipboardMac):
     35        * platform/mac/ClipboardMac.mm:
     36        (WebCore::ClipboardMac::getData):
     37        * platform/qt/ClipboardQt.cpp:
     38        (WebCore::ClipboardQt::getData):
     39        * platform/qt/ClipboardQt.h:
     40        (ClipboardQt):
     41        * platform/win/ClipboardUtilitiesWin.cpp:
     42        (WebCore::getFullCFHTML):
     43        (WebCore::getURL):
     44        (WebCore::getPlainText):
     45        (WebCore::getTextHTML):
     46        (WebCore::getCFHTML):
     47        (WebCore::fragmentFromHTML):
     48        * platform/win/ClipboardUtilitiesWin.h:
     49        (WebCore):
     50        * platform/win/ClipboardWin.cpp:
     51        (WebCore::ClipboardWin::getData):
     52        * platform/win/ClipboardWin.h:
     53        (ClipboardWin):
     54        * platform/wx/ClipboardWx.cpp:
     55        (WebCore::ClipboardWx::getData):
     56        * platform/wx/ClipboardWx.h:
     57        (ClipboardWx):
     58
    1592012-02-28  Kenichi Ishibashi  <bashi@chromium.org>
    260
  • trunk/Source/WebCore/bindings/js/JSClipboardCustom.cpp

    r107894 r109176  
    6767}
    6868
    69 JSValue JSClipboard::getData(ExecState* exec)
    70 {
    71     // FIXME: It does not match the rest of the JS bindings to throw on invalid number of arguments.
    72     if (exec->argumentCount() != 1)
    73         return throwError(exec, createSyntaxError(exec, "getData: Invalid number of arguments"));
    74 
    75     Clipboard* clipboard = impl();
    76 
    77     bool success;
    78     String result = clipboard->getData(ustringToString(exec->argument(0).toString(exec)->value(exec)), success);
    79     if (!success)
    80         return jsUndefined();
    81 
    82     return jsString(exec, result);
    83 }
    84 
    8569JSValue JSClipboard::setDragImage(ExecState* exec)
    8670{
  • trunk/Source/WebCore/bindings/v8/custom/V8ClipboardCustom.cpp

    r107894 r109176  
    6363}
    6464
    65 v8::Handle<v8::Value> V8Clipboard::getDataCallback(const v8::Arguments& args)
    66 {
    67     INC_STATS("DOM.Clipboard.getData()");
    68     Clipboard* clipboard = V8Clipboard::toNative(args.Holder());
    69 
    70     if (args.Length() != 1)
    71         return throwError("getData: Invalid number of arguments", V8Proxy::SyntaxError);
    72 
    73     bool success;
    74     String result = clipboard->getData(toWebCoreString(args[0]), success);
    75     if (success)
    76         return v8String(result);
    77 
    78     return v8::Undefined();
    79 }
    80 
    8165v8::Handle<v8::Value> V8Clipboard::setDragImageCallback(const v8::Arguments& args)
    8266{
  • trunk/Source/WebCore/dom/Clipboard.h

    r107894 r109176  
    6464        virtual void clearData(const String& type) = 0;
    6565        virtual void clearAllData() = 0;
    66         virtual String getData(const String& type, bool& success) const = 0;
     66        virtual String getData(const String& type) const = 0;
    6767        virtual bool setData(const String& type, const String& data) = 0;
    6868   
  • trunk/Source/WebCore/dom/Clipboard.idl

    r107894 r109176  
    3737        [Custom] void clearData(in [Optional] DOMString type)
    3838            raises(DOMException);
    39         [Custom] void getData(in DOMString type)
    40             raises(DOMException);
     39        DOMString getData(in DOMString type);
    4140        boolean setData(in DOMString type, in DOMString data);
    4241        [Custom] void setDragImage(in HTMLImageElement image, in long x, in long y)
  • trunk/Source/WebCore/platform/blackberry/ClipboardBlackBerry.cpp

    r107894 r109176  
    5757}
    5858
    59 String ClipboardBlackBerry::getData(const String& type, bool& success) const
     59String ClipboardBlackBerry::getData(const String& type) const
    6060{
    61     success = true;
    6261    return String::fromUTF8(BlackBerry::Platform::Clipboard::readClipboardByType(type.utf8().data()).c_str());
    6362}
  • trunk/Source/WebCore/platform/blackberry/ClipboardBlackBerry.h

    r107894 r109176  
    3333    void clearData(const String& type);
    3434    void clearAllData();
    35     String getData(const String& type, bool& success) const;
     35    String getData(const String& type) const;
    3636    bool setData(const String& type, const String& data);
    3737
  • trunk/Source/WebCore/platform/chromium/ClipboardChromium.cpp

    r107894 r109176  
    264264}
    265265
    266 String ClipboardChromium::getData(const String& type, bool& success) const
    267 {
    268     success = false;
     266String ClipboardChromium::getData(const String& type) const
     267{
     268    bool ignoredSuccess = false;
    269269    if (policy() != ClipboardReadable || !m_dataObject)
    270270        return String();
     
    273273        return String();
    274274
    275     return m_dataObject->getData(normalizeType(type), success);
     275    return m_dataObject->getData(normalizeType(type), ignoredSuccess);
    276276}
    277277
  • trunk/Source/WebCore/platform/chromium/ClipboardChromium.h

    r107894 r109176  
    5959        virtual void clearData(const String& type);
    6060        void clearAllData();
    61         String getData(const String& type, bool& success) const;
     61        String getData(const String& type) const;
    6262        bool setData(const String& type, const String& data);
    6363        bool platformClipboardChanged() const;
  • trunk/Source/WebCore/platform/efl/ClipboardEfl.cpp

    r107894 r109176  
    6666}
    6767
    68 String ClipboardEfl::getData(const String&, bool &success) const
     68String ClipboardEfl::getData(const String&) const
    6969{
    7070    notImplemented();
    71     success = false;
    7271    return String();
    7372}
  • trunk/Source/WebCore/platform/efl/ClipboardEfl.h

    r107894 r109176  
    3737    void clearData(const String&);
    3838    void clearAllData();
    39     String getData(const String&, bool&) const;
     39    String getData(const String&) const;
    4040    bool setData(const String&, const String&);
    4141
  • trunk/Source/WebCore/platform/gtk/ClipboardGtk.cpp

    r107894 r109176  
    144144}
    145145
    146 String ClipboardGtk::getData(const String& typeString, bool& success) const
    147 {
    148     success = true; // According to http://www.whatwg.org/specs/web-apps/current-work/multipage/dnd.html
    149     // "The getData(format) method must return the data that is associated with the type format converted
    150     // to ASCII lowercase, if any, and must return the empty string otherwise." Since success == false
    151     // results in an 'undefined' return value, we always want to return success == true. This parameter
    152     // should eventually be removed.
     146String ClipboardGtk::getData(const String& typeString) const
     147{
    153148    if (policy() != ClipboardReadable || !m_dataObject)
    154149        return String();
  • trunk/Source/WebCore/platform/gtk/ClipboardGtk.h

    r107894 r109176  
    5555        void clearData(const String&);
    5656        void clearAllData();
    57         String getData(const String&, bool&) const;
     57        String getData(const String&) const;
    5858        bool setData(const String&, const String&);
    5959
  • trunk/Source/WebCore/platform/mac/ClipboardMac.h

    r109147 r109176  
    5050    void clearData(const String& type);
    5151    void clearAllData();
    52     String getData(const String& type, bool& success) const;
     52    String getData(const String& type) const;
    5353    bool setData(const String& type, const String& data);
    5454   
  • trunk/Source/WebCore/platform/mac/ClipboardMac.mm

    r108101 r109176  
    213213}
    214214
    215 String ClipboardMac::getData(const String& type, bool& success) const
    216 {
    217     success = false;
     215String ClipboardMac::getData(const String& type) const
     216{
    218217    if (policy() != ClipboardReadable)
    219218        return String();
     
    237236    // sure it doesn't change between our testing the change count and accessing the data.
    238237    if (!cocoaValue.isEmpty() && m_changeCount == platformStrategies()->pasteboardStrategy()->changeCount(m_pasteboardName)) {
    239         success = true;
    240238        return cocoaValue;
    241239    }
  • trunk/Source/WebCore/platform/qt/ClipboardQt.cpp

    r107894 r109176  
    145145}
    146146
    147 String ClipboardQt::getData(const String& type, bool& success) const
    148 {
    149 
    150     if (policy() != ClipboardReadable) {
    151         success = false;
     147String ClipboardQt::getData(const String& type) const
     148{
     149
     150    if (policy() != ClipboardReadable)
    152151        return String();
    153     }
    154 
    155     if (isHtmlMimeType(type) && m_readableData->hasHtml()) {
    156         success = true;
     152
     153    if (isHtmlMimeType(type) && m_readableData->hasHtml())
    157154        return m_readableData->html();
    158     }
    159 
    160     if (isTextMimeType(type) && m_readableData->hasText()) {
    161         success = true;
     155
     156    if (isTextMimeType(type) && m_readableData->hasText())
    162157        return m_readableData->text();
    163     }
    164158
    165159    ASSERT(m_readableData);
    166160    QByteArray rawData = m_readableData->data(type);
    167161    QString data = QTextCodec::codecForName("UTF-16")->toUnicode(rawData);
    168     success = !data.isEmpty();
    169162    return data;
    170163}
  • trunk/Source/WebCore/platform/qt/ClipboardQt.h

    r107894 r109176  
    5454    void clearData(const String& type);
    5555    void clearAllData();
    56     String getData(const String& type, bool& success) const;
     56    String getData(const String& type) const;
    5757    bool setData(const String& type, const String& data);
    5858
  • trunk/Source/WebCore/platform/win/ClipboardUtilitiesWin.cpp

    r89717 r109176  
    209209}
    210210
    211 static String getFullCFHTML(IDataObject* data, bool& success)
     211static String getFullCFHTML(IDataObject* data)
    212212{
    213213    STGMEDIUM store;
     
    219219        GlobalUnlock(store.hGlobal);
    220220        ReleaseStgMedium(&store);
    221         success = true;
    222221        return cfhtml;
    223222    }
    224     success = false;
    225223    return String();
    226224}
     
    448446}
    449447
    450 String getURL(IDataObject* dataObject, DragData::FilenameConversionPolicy filenamePolicy, bool& success, String* title)
     448String getURL(IDataObject* dataObject, DragData::FilenameConversionPolicy filenamePolicy, String* title)
    451449{
    452450    STGMEDIUM store;
    453451    String url;
    454     success = false;
    455452    if (getWebLocData(dataObject, url, title))
    456         success = true;
    457     else if (SUCCEEDED(dataObject->GetData(urlWFormat(), &store))) {
     453        return url;
     454
     455    if (SUCCEEDED(dataObject->GetData(urlWFormat(), &store))) {
    458456        // URL using Unicode
    459457        UChar* data = static_cast<UChar*>(GlobalLock(store.hGlobal));
     
    461459        GlobalUnlock(store.hGlobal);
    462460        ReleaseStgMedium(&store);
    463         success = true;
    464461    } else if (SUCCEEDED(dataObject->GetData(urlFormat(), &store))) {
    465462        // URL using ASCII
     
    468465        GlobalUnlock(store.hGlobal);
    469466        ReleaseStgMedium(&store);
    470         success = true;
    471467    }
    472468#if USE(CF)
     
    477473            if (data && data[0] && (PathFileExists(data) || PathIsUNC(data))) {
    478474                RetainPtr<CFStringRef> pathAsCFString(AdoptCF, CFStringCreateWithCharacters(kCFAllocatorDefault, (const UniChar*)data, wcslen(data)));
    479                 if (urlFromPath(pathAsCFString.get(), url)) {
    480                     if (title)
    481                         *title = url;
    482                     success = true;
    483                 }
     475                if (urlFromPath(pathAsCFString.get(), url) && title)
     476                    *title = url;
    484477            }
    485478            GlobalUnlock(store.hGlobal);
     
    490483            if (data && data[0] && (PathFileExistsA(data) || PathIsUNCA(data))) {
    491484                RetainPtr<CFStringRef> pathAsCFString(AdoptCF, CFStringCreateWithCString(kCFAllocatorDefault, data, kCFStringEncodingASCII));
    492                 if (urlFromPath(pathAsCFString.get(), url)) {
    493                     if (title)
    494                         *title = url;
    495                     success = true;
    496                 }
     485                if (urlFromPath(pathAsCFString.get(), url) && title)
     486                    *title = url;
    497487            }
    498488            GlobalUnlock(store.hGlobal);
     
    531521}
    532522
    533 String getPlainText(IDataObject* dataObject, bool& success)
     523String getPlainText(IDataObject* dataObject)
    534524{
    535525    STGMEDIUM store;
    536526    String text;
    537     success = false;
    538527    if (SUCCEEDED(dataObject->GetData(plainTextWFormat(), &store))) {
    539528        // Unicode text
     
    542531        GlobalUnlock(store.hGlobal);
    543532        ReleaseStgMedium(&store);
    544         success = true;
    545533    } else if (SUCCEEDED(dataObject->GetData(plainTextFormat(), &store))) {
    546534        // ASCII text
     
    549537        GlobalUnlock(store.hGlobal);
    550538        ReleaseStgMedium(&store);
    551         success = true;
    552539    } else {
    553540        // FIXME: Originally, we called getURL() here because dragging and dropping files doesn't
    554541        // populate the drag with text data. Per https://bugs.webkit.org/show_bug.cgi?id=38826, this
    555542        // is undesirable, so maybe this line can be removed.
    556         text = getURL(dataObject, DragData::DoNotConvertFilenames, success);
    557         success = true;
     543        text = getURL(dataObject, DragData::DoNotConvertFilenames);
    558544    }
    559545    return text;
     
    571557}
    572558
    573 String getTextHTML(IDataObject* data, bool& success)
     559String getTextHTML(IDataObject* data)
    574560{
    575561    STGMEDIUM store;
    576562    String html;
    577     success = false;
    578563    if (SUCCEEDED(data->GetData(texthtmlFormat(), &store))) {
    579564        UChar* data = static_cast<UChar*>(GlobalLock(store.hGlobal));
     
    581566        GlobalUnlock(store.hGlobal);
    582567        ReleaseStgMedium(&store);
    583         success = true;
    584568    }
    585569    return html;
     
    593577}
    594578
    595 String getCFHTML(IDataObject* data, bool& success)
    596 {
    597     String cfhtml = getFullCFHTML(data, success);
    598     if (success)
     579String getCFHTML(IDataObject* data)
     580{
     581    String cfhtml = getFullCFHTML(data);
     582    if (!cfhtml.isEmpty())
    599583        return extractMarkupFromCFHTML(cfhtml);
    600584    return String();
     
    656640        return 0;
    657641
    658     bool success = false;
    659     String cfhtml = getFullCFHTML(data, success);
    660     if (success) {
     642    String cfhtml = getFullCFHTML(data);
     643    if (!cfhtml.isEmpty()) {
    661644        if (RefPtr<DocumentFragment> fragment = fragmentFromCFHTML(doc, cfhtml))
    662645            return fragment.release();
    663646    }
    664647
    665     String html = getTextHTML(data, success);
     648    String html = getTextHTML(data);
    666649    String srcURL;
    667     if (success)
     650    if (!html.isEmpty())
    668651        return createFragmentFromMarkup(doc, html, srcURL, FragmentScriptingNotAllowed);
    669652
  • trunk/Source/WebCore/platform/win/ClipboardUtilitiesWin.h

    r89707 r109176  
    6868PassRefPtr<DocumentFragment> fragmentFromCFHTML(Document*, const String& cfhtml);
    6969
    70 String getURL(IDataObject*, DragData::FilenameConversionPolicy, bool& success, String* title = 0);
     70String getURL(IDataObject*, DragData::FilenameConversionPolicy, String* title = 0);
    7171String getURL(const DragDataMap*, DragData::FilenameConversionPolicy, String* title = 0);
    72 String getPlainText(IDataObject*, bool& success);
     72String getPlainText(IDataObject*);
    7373String getPlainText(const DragDataMap*);
    74 String getTextHTML(IDataObject*, bool& success);
     74String getTextHTML(IDataObject*);
    7575String getTextHTML(const DragDataMap*);
    76 String getCFHTML(IDataObject*, bool& success);
     76String getCFHTML(IDataObject*);
    7777String getCFHTML(const DragDataMap*);
    7878
  • trunk/Source/WebCore/platform/win/ClipboardWin.cpp

    r107894 r109176  
    437437}
    438438
    439 String ClipboardWin::getData(const String& type, bool& success) const
     439String ClipboardWin::getData(const String& type) const
    440440{     
    441     success = false;
    442441    if (policy() != ClipboardReadable || (!m_dataObject && m_dragDataMap.isEmpty()))
    443442        return "";
     
    445444    ClipboardDataType dataType = clipboardTypeFromMIMEType(type);
    446445    if (dataType == ClipboardDataTypeText)
    447         return m_dataObject ? getPlainText(m_dataObject.get(), success) : getPlainText(&m_dragDataMap);
     446        return m_dataObject ? getPlainText(m_dataObject.get()) : getPlainText(&m_dragDataMap);
    448447    if (dataType == ClipboardDataTypeURL)
    449         return m_dataObject ? getURL(m_dataObject.get(), DragData::DoNotConvertFilenames, success) : getURL(&m_dragDataMap, DragData::DoNotConvertFilenames);
     448        return m_dataObject ? getURL(m_dataObject.get(), DragData::DoNotConvertFilenames) : getURL(&m_dragDataMap, DragData::DoNotConvertFilenames);
    450449    else if (dataType == ClipboardDataTypeTextHTML) {
    451         String data = m_dataObject ? getTextHTML(m_dataObject.get(), success) : getTextHTML(&m_dragDataMap);
    452         if (success)
     450        String data = m_dataObject ? getTextHTML(m_dataObject.get()) : getTextHTML(&m_dragDataMap);
     451        if (!data.isEmpty())
    453452            return data;
    454         return m_dataObject ? getCFHTML(m_dataObject.get(), success) : getCFHTML(&m_dragDataMap);
     453        return m_dataObject ? getCFHTML(m_dataObject.get()) : getCFHTML(&m_dragDataMap);
    455454    }
    456455   
  • trunk/Source/WebCore/platform/win/ClipboardWin.h

    r107894 r109176  
    6161    void clearData(const String& type);
    6262    void clearAllData();
    63     String getData(const String& type, bool& success) const;
     63    String getData(const String& type) const;
    6464    bool setData(const String& type, const String& data);
    6565
  • trunk/Source/WebCore/platform/win/DragDataWin.cpp

    r99108 r109176  
    102102String DragData::asURL(Frame*, FilenameConversionPolicy filenamePolicy, String* title) const
    103103{
    104     bool success;
    105     return (m_platformDragData) ? getURL(m_platformDragData, filenamePolicy, success, title) : getURL(&m_dragDataMap, filenamePolicy, title);
     104    return (m_platformDragData) ? getURL(m_platformDragData, filenamePolicy, title) : getURL(&m_dragDataMap, filenamePolicy, title);
    106105}
    107106
     
    156155String DragData::asPlainText(Frame*) const
    157156{
    158     bool success;
    159     return (m_platformDragData) ? getPlainText(m_platformDragData, success) : getPlainText(&m_dragDataMap);
     157    return (m_platformDragData) ? getPlainText(m_platformDragData) : getPlainText(&m_dragDataMap);
    160158}
    161159
  • trunk/Source/WebCore/platform/wx/ClipboardWx.cpp

    r107894 r109176  
    5959}
    6060
    61 String ClipboardWx::getData(const String& type, bool& success) const
     61String ClipboardWx::getData(const String& type) const
    6262{
    6363    notImplemented();
  • trunk/Source/WebCore/platform/wx/ClipboardWx.h

    r107894 r109176  
    4343        void clearData(const String& type);
    4444        void clearAllData();
    45         String getData(const String& type, bool& success) const;
     45        String getData(const String& type) const;
    4646        bool setData(const String& type, const String& data);
    4747   
Note: See TracChangeset for help on using the changeset viewer.