Changeset 58276 in webkit


Ignore:
Timestamp:
Apr 26, 2010 6:32:44 PM (14 years ago)
Author:
eric@webkit.org
Message:

2010-04-26 Daniel Cheng <dcheng@chromium.org>

Reviewed by Jian Li.

[Chromium] Don't make file paths available in text/uri-list when dragging files.
https://bugs.webkit.org/show_bug.cgi?id=25882

Test will be checked in with WebCore/platform/mac fix.

  • platform/chromium/ClipboardChromium.cpp: (WebCore::ClipboardChromium::getData): (WebCore::ClipboardChromium::types):
Location:
trunk/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r58273 r58276  
     12010-04-26  Daniel Cheng  <dcheng@chromium.org>
     2
     3        Reviewed by Jian Li.
     4
     5        [Chromium] Don't make file paths available in text/uri-list when dragging files.
     6        https://bugs.webkit.org/show_bug.cgi?id=25882
     7
     8        Test will be checked in with WebCore/platform/mac fix.
     9
     10        * platform/chromium/ClipboardChromium.cpp:
     11        (WebCore::ClipboardChromium::getData):
     12        (WebCore::ClipboardChromium::types):
     13
    1142010-04-26  Maciej Stachowiak  <mjs@apple.com>
    215
  • trunk/WebCore/platform/chromium/ClipboardChromium.cpp

    r57464 r58276  
    174174                text.append(uri);
    175175            }
    176             // Also create file:// URLs out of the entries in the file list.
    177             for (size_t i = 0; i < m_dataObject->filenames.size(); ++i) {
    178                 String fileURL = ChromiumBridge::filePathToURL(m_dataObject->filenames[i]);
    179                 ASSERT(!fileURL.isEmpty());
    180                 if (!text.isEmpty())
    181                     text.append(textMIMETypeLineSeparator);
    182                 text.append(fileURL);
    183             }
    184176            success = !text.isEmpty();
    185177            return text;
     
    192184            success = true;
    193185            return m_dataObject->url.string();
    194         }
    195         // Otherwise check if we have a file that we could convert to a file:// URL.
    196         if (!m_dataObject->filenames.isEmpty()) {
    197             success = true;
    198             return ChromiumBridge::filePathToURL(m_dataObject->filenames[0]);
    199186        }
    200187        return String();
     
    327314        return results;
    328315
    329     if (!m_dataObject->filenames.isEmpty()) {
    330         results.add("text/uri-list");
     316    if (!m_dataObject->filenames.isEmpty())
    331317        results.add("Files");
    332     }
    333318
    334319    if (m_dataObject->url.isValid()) {
Note: See TracChangeset for help on using the changeset viewer.