⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 221067 in webkit


Ignore:
Timestamp:
Aug 22, 2017, 9:54:59 PM (9 years ago)
Author:
rniwa@webkit.org
Message:

Consolidate the code to normalize MIME type in DataTransfer
​https://bugs.webkit.org/show_bug.cgi?id=175810

Rubber-stamped by Wenson Hsieh.

Address the forgotten review comment by Wenson.

Source/WebCore:

Tests: editing/pasteboard/datatransfer-getdata-plaintext.html

  • dom/DataTransfer.cpp:

(WebCore::DataTransfer::clearData):

LayoutTests:

  • editing/pasteboard/datatransfer-getdata-plaintext-expected.txt:
  • editing/pasteboard/datatransfer-getdata-plaintext.html:
Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r221065 r221067  
     12017-08-22  Ryosuke Niwa  <rniwa@webkit.org>
     2
     3        Consolidate the code to normalize MIME type in DataTransfer
     4        https://bugs.webkit.org/show_bug.cgi?id=175810
     5
     6        Rubber-stamped by Wenson Hsieh.
     7
     8        Address the forgotten review comment by Wenson.
     9
     10        * editing/pasteboard/datatransfer-getdata-plaintext-expected.txt:
     11        * editing/pasteboard/datatransfer-getdata-plaintext.html:
     12
    1132017-08-22  Wenson Hsieh  <wenson_hsieh@apple.com>
    214
  • trunk/LayoutTests/editing/pasteboard/datatransfer-getdata-plaintext-expected.txt

    r221063 r221067  
    77PASS clipboardData.setData("   tEXT/pLaIN", "world"); clipboardData.getData("text/plain") is "world"
    88PASS clipboardData.setData("text/plain; charset=utf-8", "hello"); clipboardData.getData("text/plain; charset=Shift_JIS") is "hello"
     9PASS clipboardData.clearData("url"); clipboardData.getData("text/plain") is "hello"
    910PASS successfullyParsed is true
    1011
  • trunk/LayoutTests/editing/pasteboard/datatransfer-getdata-plaintext.html

    r221063 r221067  
    2020    shouldBeEqualToString('clipboardData.setData("   tEXT/pLaIN", "world"); clipboardData.getData("text/plain")', 'world');
    2121    shouldBeEqualToString('clipboardData.setData("text/plain; charset=utf-8", "hello"); clipboardData.getData("text/plain; charset=Shift_JIS")', 'hello');
     22    shouldBeEqualToString('clipboardData.clearData("url"); clipboardData.getData("text/plain")', 'hello');
    2223    document.getElementById('container').style.display = 'none';
    2324    finishJSTest();
  • trunk/Source/WebCore/ChangeLog

    r221065 r221067  
     12017-08-22  Ryosuke Niwa  <rniwa@webkit.org>
     2
     3        Consolidate the code to normalize MIME type in DataTransfer
     4        https://bugs.webkit.org/show_bug.cgi?id=175810
     5
     6        Rubber-stamped by Wenson Hsieh.
     7
     8        Address the forgotten review comment by Wenson.
     9
     10        Tests: editing/pasteboard/datatransfer-getdata-plaintext.html
     11
     12        * dom/DataTransfer.cpp:
     13        (WebCore::DataTransfer::clearData):
     14
    1152017-08-20  Wenson Hsieh  <wenson_hsieh@apple.com>
    216
  • trunk/Source/WebCore/dom/DataTransfer.cpp

    r221063 r221067  
    124124
    125125    String normalizedType = normalizeType(type);
    126     if (type.isNull())
     126    if (normalizedType.isNull())
    127127        m_pasteboard->clear();
    128128    else
    129         m_pasteboard->clear(type);
     129        m_pasteboard->clear(normalizedType);
    130130    if (m_itemList)
    131         m_itemList->didClearStringData(type);
     131        m_itemList->didClearStringData(normalizedType);
    132132}
    133133
Note: See TracChangeset for help on using the changeset viewer.