Changeset 63734 in webkit


Ignore:
Timestamp:
Jul 20, 2010 1:43:44 AM (14 years ago)
Author:
tony@chromium.org
Message:

2010-07-20 Tony Chang <tony@chromium.org>

Reviewed by Kent Tamura.

clean up style in ClipboardWin and PasteboardWin
https://bugs.webkit.org/show_bug.cgi?id=42609

No new tests since this is just a style cleanup.

  • platform/win/ClipboardUtilitiesWin.cpp: (WebCore::createGlobalData): (WebCore::markupToCFHTML): (WebCore::getURL): (WebCore::getPlainText): (WebCore::getTextHTML): (WebCore::fragmentFromFilenames): (WebCore::containsFilenames): (WebCore::fragmentFromCFHTML): (WebCore::fragmentFromHTML):
  • platform/win/ClipboardUtilitiesWin.h:
  • platform/win/ClipboardWin.cpp: (WebCore::pathRemoveBadFSCharacters): (WebCore::createGlobalHDropContent): (WebCore::createGlobalUrlFileDescriptor): (WebCore::writeURL): (WebCore::ClipboardWin::clearData): (WebCore::ClipboardWin::clearAllData): (WebCore::ClipboardWin::getData): (WebCore::ClipboardWin::types): (WebCore::ClipboardWin::declareAndWriteDragImage): (WebCore::ClipboardWin::writeRange):
  • platform/win/ClipboardWin.h: (WebCore::ClipboardWin::create): (WebCore::ClipboardWin::dataObject):
  • platform/win/PasteboardWin.cpp: (WebCore::PasteboardOwnerWndProc): (WebCore::Pasteboard::writeSelection): (WebCore::Pasteboard::writeURL): (WebCore::Pasteboard::plainText): (WebCore::Pasteboard::documentFragment):
Location:
trunk/WebCore
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r63732 r63734  
     12010-07-20  Tony Chang  <tony@chromium.org>
     2
     3        Reviewed by Kent Tamura.
     4
     5        clean up style in ClipboardWin and PasteboardWin
     6        https://bugs.webkit.org/show_bug.cgi?id=42609
     7
     8        No new tests since this is just a style cleanup.
     9
     10        * platform/win/ClipboardUtilitiesWin.cpp:
     11        (WebCore::createGlobalData):
     12        (WebCore::markupToCFHTML):
     13        (WebCore::getURL):
     14        (WebCore::getPlainText):
     15        (WebCore::getTextHTML):
     16        (WebCore::fragmentFromFilenames):
     17        (WebCore::containsFilenames):
     18        (WebCore::fragmentFromCFHTML):
     19        (WebCore::fragmentFromHTML):
     20        * platform/win/ClipboardUtilitiesWin.h:
     21        * platform/win/ClipboardWin.cpp:
     22        (WebCore::pathRemoveBadFSCharacters):
     23        (WebCore::createGlobalHDropContent):
     24        (WebCore::createGlobalUrlFileDescriptor):
     25        (WebCore::writeURL):
     26        (WebCore::ClipboardWin::clearData):
     27        (WebCore::ClipboardWin::clearAllData):
     28        (WebCore::ClipboardWin::getData):
     29        (WebCore::ClipboardWin::types):
     30        (WebCore::ClipboardWin::declareAndWriteDragImage):
     31        (WebCore::ClipboardWin::writeRange):
     32        * platform/win/ClipboardWin.h:
     33        (WebCore::ClipboardWin::create):
     34        (WebCore::ClipboardWin::dataObject):
     35        * platform/win/PasteboardWin.cpp:
     36        (WebCore::PasteboardOwnerWndProc):
     37        (WebCore::Pasteboard::writeSelection):
     38        (WebCore::Pasteboard::writeURL):
     39        (WebCore::Pasteboard::plainText):
     40        (WebCore::Pasteboard::documentFragment):
     41
    1422010-07-20  Yury Semikhatsky  <yurys@chromium.org>
    243
  • trunk/WebCore/platform/win/ClipboardUtilitiesWin.cpp

    r60957 r63734  
    3333#include "markup.h"
    3434#include <CoreFoundation/CoreFoundation.h>
     35#include <shlwapi.h>
     36#include <wininet.h> // for INTERNET_MAX_URL_LENGTH
    3537#include <wtf/RetainPtr.h>
    3638#include <wtf/text/CString.h>
    37 #include <shlwapi.h>
    38 #include <wininet.h>    // for INTERNET_MAX_URL_LENGTH
    3939
    4040namespace WebCore {
     
    9898}
    9999
    100 //Firefox text/html
     100// Firefox text/html
    101101static FORMATETC* texthtmlFormat()
    102102{
     
    110110    String mutableURL(url.string());
    111111    String mutableTitle(title);
    112     SIZE_T size = mutableURL.length() + mutableTitle.length() + 2;  // +1 for "\n" and +1 for null terminator
     112    SIZE_T size = mutableURL.length() + mutableTitle.length() + 2; // +1 for "\n" and +1 for null terminator
    113113    HGLOBAL cbData = ::GlobalAlloc(GPTR, size * sizeof(UChar));
    114114
     
    156156
    157157// Documentation for the CF_HTML format is available at http://msdn.microsoft.com/workshop/networking/clipboard/htmlclipboard.asp
    158 void markupToCF_HTML(const String& markup, const String& srcURL, Vector<char>& result)
     158void markupToCFHTML(const String& markup, const String& srcURL, Vector<char>& result)
    159159{
    160160    if (markup.isEmpty())
     
    257257}
    258258
    259 //MSIE HTML Format
     259// MSIE HTML Format
    260260FORMATETC* htmlFormat()
    261261{
     
    295295    String url;
    296296    success = false;
    297     if (getWebLocData(dataObject, url, title)) {
    298         success = true;
    299         return url;
    300     } else if (SUCCEEDED(dataObject->GetData(urlWFormat(), &store))) {
    301         //URL using unicode
     297    if (getWebLocData(dataObject, url, title))
     298        success = true;
     299    else if (SUCCEEDED(dataObject->GetData(urlWFormat(), &store))) {
     300        // URL using Unicode
    302301        UChar* data = (UChar*)GlobalLock(store.hGlobal);
    303302        url = extractURL(String(data), title);
     
    306305        success = true;
    307306    } else if (SUCCEEDED(dataObject->GetData(urlFormat(), &store))) {
    308         //URL using ascii
     307        // URL using ASCII
    309308        char* data = (char*)GlobalLock(store.hGlobal);
    310309        url = extractURL(String(data), title);
     
    350349    success = false;
    351350    if (SUCCEEDED(dataObject->GetData(plainTextWFormat(), &store))) {
    352         //unicode text
     351        // Unicode text
    353352        UChar* data = (UChar*)GlobalLock(store.hGlobal);
    354353        text = String(data);
     
    357356        success = true;
    358357    } else if (SUCCEEDED(dataObject->GetData(plainTextFormat(), &store))) {
    359         //ascii text
     358        // ASCII text
    360359        char* data = (char*)GlobalLock(store.hGlobal);
    361360        text = String(data);
     
    373372}
    374373
     374String getTextHTML(IDataObject* data, bool& success)
     375{
     376    STGMEDIUM store;
     377    String html;
     378    success = false;
     379    if (SUCCEEDED(data->GetData(texthtmlFormat(), &store))) {
     380        UChar* data = static_cast<UChar*>(GlobalLock(store.hGlobal));
     381        html = String(data);
     382        GlobalUnlock(store.hGlobal);
     383        ReleaseStgMedium(&store);
     384        success = true;
     385    }
     386    return html;
     387}
     388
    375389PassRefPtr<DocumentFragment> fragmentFromFilenames(Document*, const IDataObject*)
    376390{
    377     //FIXME: We should be able to create fragments from files
     391    // FIXME: We should be able to create fragments from files
    378392    return 0;
    379393}
     
    381395bool containsFilenames(const IDataObject*)
    382396{
    383     //FIXME: We'll want to update this once we can produce fragments from files
     397    // FIXME: We'll want to update this once we can produce fragments from files
    384398    return false;
    385399}
    386400
    387 //Convert a String containing CF_HTML formatted text to a DocumentFragment
    388 PassRefPtr<DocumentFragment> fragmentFromCF_HTML(Document* doc, const String& cf_html)
     401// Convert a String containing CF_HTML formatted text to a DocumentFragment
     402PassRefPtr<DocumentFragment> fragmentFromCFHTML(Document* doc, const String& cfhtml)
    389403{       
    390404    // obtain baseURL if present
    391405    String srcURLStr("sourceURL:");
    392406    String srcURL;
    393     unsigned lineStart = cf_html.find(srcURLStr, 0, false);
     407    unsigned lineStart = cfhtml.find(srcURLStr, 0, false);
    394408    if (lineStart != -1) {
    395         unsigned srcEnd = cf_html.find("\n", lineStart, false);
     409        unsigned srcEnd = cfhtml.find("\n", lineStart, false);
    396410        unsigned srcStart = lineStart+srcURLStr.length();
    397         String rawSrcURL = cf_html.substring(srcStart, srcEnd-srcStart);
     411        String rawSrcURL = cfhtml.substring(srcStart, srcEnd-srcStart);
    398412        replaceNBSPWithSpace(rawSrcURL);
    399413        srcURL = rawSrcURL.stripWhiteSpace();
     
    401415
    402416    // find the markup between "<!--StartFragment -->" and "<!--EndFragment -->", accounting for browser quirks
    403     unsigned markupStart = cf_html.find("<html", 0, false);
    404     unsigned tagStart = cf_html.find("startfragment", markupStart, false);
    405     unsigned fragmentStart = cf_html.find('>', tagStart) + 1;
    406     unsigned tagEnd = cf_html.find("endfragment", fragmentStart, false);
    407     unsigned fragmentEnd = cf_html.reverseFind('<', tagEnd);
    408     String markup = cf_html.substring(fragmentStart, fragmentEnd - fragmentStart).stripWhiteSpace();
     417    unsigned markupStart = cfhtml.find("<html", 0, false);
     418    unsigned tagStart = cfhtml.find("startfragment", markupStart, false);
     419    unsigned fragmentStart = cfhtml.find('>', tagStart) + 1;
     420    unsigned tagEnd = cfhtml.find("endfragment", fragmentStart, false);
     421    unsigned fragmentEnd = cfhtml.reverseFind('<', tagEnd);
     422    String markup = cfhtml.substring(fragmentStart, fragmentEnd - fragmentStart).stripWhiteSpace();
    409423
    410424    return createFragmentFromMarkup(doc, markup, srcURL, FragmentScriptingNotAllowed);
     
    421435    String srcURL;
    422436    if (SUCCEEDED(data->GetData(htmlFormat(), &store))) {
    423         //MS HTML Format parsing
     437        // MS HTML Format parsing
    424438        char* data = (char*)GlobalLock(store.hGlobal);
    425439        SIZE_T dataSize = ::GlobalSize(store.hGlobal);
    426         String cf_html(UTF8Encoding().decode(data, dataSize));         
     440        String cfhtml(UTF8Encoding().decode(data, dataSize));         
    427441        GlobalUnlock(store.hGlobal);
    428442        ReleaseStgMedium(&store);
    429         if (PassRefPtr<DocumentFragment> fragment = fragmentFromCF_HTML(doc, cf_html))
     443        if (PassRefPtr<DocumentFragment> fragment = fragmentFromCFHTML(doc, cfhtml))
    430444            return fragment;
    431445    }
    432     if (SUCCEEDED(data->GetData(texthtmlFormat(), &store))) {
    433         //raw html
    434         UChar* data = (UChar*)GlobalLock(store.hGlobal);
    435         html = String(data);
    436         GlobalUnlock(store.hGlobal);     
    437         ReleaseStgMedium(&store);
     446    bool success = false;
     447    html = getTextHTML(data, success);
     448    if (success)
    438449        return createFragmentFromMarkup(doc, html, srcURL, FragmentScriptingNotAllowed);
    439     }
    440450
    441451    return 0;
  • trunk/WebCore/platform/win/ClipboardUtilitiesWin.h

    r60957 r63734  
    5050FORMATETC* smartPasteFormat();
    5151
    52 void markupToCF_HTML(const String& markup, const String& srcURL, Vector<char>& result);
     52void markupToCFHTML(const String& markup, const String& srcURL, Vector<char>& result);
    5353
    5454void replaceNewlinesWithWindowsStyleNewlines(String&);
     
    6060PassRefPtr<DocumentFragment> fragmentFromFilenames(Document*, const IDataObject*);
    6161PassRefPtr<DocumentFragment> fragmentFromHTML(Document*, IDataObject*);
    62 PassRefPtr<DocumentFragment> fragmentFromCF_HTML(Document*, const String& cf_html);
     62PassRefPtr<DocumentFragment> fragmentFromCFHTML(Document*, const String& cfhtml);
    6363
    6464String getURL(IDataObject*, DragData::FilenameConversionPolicy, bool& success, String* title = 0);
    6565String getPlainText(IDataObject*, bool& success);
     66String getTextHTML(IDataObject*, bool& success);
    6667
    6768} // namespace WebCore
    6869
    6970#endif // ClipboardUtilitiesWin_h
    70 
  • trunk/WebCore/platform/win/ClipboardWin.cpp

    r60957 r63734  
    106106    while (readFrom < length) {
    107107        UINT type = PathGetCharType(psz[readFrom]);
    108         if (psz[readFrom] == 0 || type & (GCT_LFNCHAR | GCT_SHORTCHAR)) {
     108        if (!psz[readFrom] || type & (GCT_LFNCHAR | GCT_SHORTCHAR))
    109109            psz[writeTo++] = psz[readFrom];
    110         }
    111110
    112111        readFrom++;
     
    216215static HGLOBAL createGlobalHDropContent(const KURL& url, String& fileName, SharedBuffer* data)
    217216{
    218     if (fileName.isEmpty() || !data )
     217    if (fileName.isEmpty() || !data)
    219218        return 0;
    220219
     
    291290    fgd->fgd[0].dwFlags = FD_FILESIZE;
    292291    int fileSize = ::WideCharToMultiByte(CP_ACP, 0, url.characters(), url.length(), 0, 0, 0, 0);
    293     fileSize += strlen(szShellDotUrlTemplate) - 2;  // -2 is for getting rid of %s in the template string
     292    fileSize += strlen(szShellDotUrlTemplate) - 2; // -2 is for getting rid of %s in the template string
    294293    fgd->fgd[0].nFileSizeLow = fileSize;
    295294    estimatedSize = fileSize;
     
    438437    if (withHTML) {
    439438        Vector<char> cfhtmlData;
    440         markupToCF_HTML(urlToMarkup(url, title), "", cfhtmlData);
     439        markupToCFHTML(urlToMarkup(url, title), "", cfhtmlData);
    441440        medium.hGlobal = createGlobalData(cfhtmlData);
    442441        if (medium.hGlobal && FAILED(data->SetData(htmlFormat(), &medium, TRUE)))
     
    459458void ClipboardWin::clearData(const String& type)
    460459{
    461     //FIXME: Need to be able to write to the system clipboard <rdar://problem/5015941>
     460    // FIXME: Need to be able to write to the system clipboard <rdar://problem/5015941>
    462461    ASSERT(isForDragging());
    463462    if (policy() != ClipboardWritable || !m_writableDataObject)
     
    479478void ClipboardWin::clearAllData()
    480479{
    481     //FIXME: Need to be able to write to the system clipboard <rdar://problem/5015941>
     480    // FIXME: Need to be able to write to the system clipboard <rdar://problem/5015941>
    482481    ASSERT(isForDragging());
    483482    if (policy() != ClipboardWritable)
     
    492491{     
    493492    success = false;
    494     if (policy() != ClipboardReadable || !m_dataObject) {
     493    if (policy() != ClipboardReadable || !m_dataObject)
    495494        return "";
    496     }
    497495
    498496    ClipboardDataType dataType = clipboardTypeFromMIMEType(type);
    499497    if (dataType == ClipboardDataTypeText)
    500498        return getPlainText(m_dataObject.get(), success);
    501     else if (dataType == ClipboardDataTypeURL)
     499    if (dataType == ClipboardDataTypeURL)
    502500        return getURL(m_dataObject.get(), DragData::DoNotConvertFilenames, success);
    503501   
     
    569567
    570568    // IEnumFORMATETC::Next returns S_FALSE if there are no more items.
    571     while (itr->Next(1, &data, 0) == S_OK) {
     569    while (itr->Next(1, &data, 0) == S_OK)
    572570        addMimeTypesForFormat(results, data);
    573     }
    574571
    575572    return results;
     
    721718    // Put img tag on the clipboard referencing the image
    722719    Vector<char> data;
    723     markupToCF_HTML(imageToMarkup(fullURL), "", data);
     720    markupToCFHTML(imageToMarkup(fullURL), "", data);
    724721    medium.hGlobal = createGlobalData(data);
    725722    if (medium.hGlobal && FAILED(m_writableDataObject->SetData(htmlFormat(), &medium, TRUE)))
     
    758755
    759756    Vector<char> data;
    760     markupToCF_HTML(createMarkup(selectedRange, 0, AnnotateForInterchange),
     757    markupToCFHTML(createMarkup(selectedRange, 0, AnnotateForInterchange),
    761758        selectedRange->startContainer(ec)->document()->url().string(), data);
    762759    medium.hGlobal = createGlobalData(data);
  • trunk/WebCore/platform/win/ClipboardWin.h

    r54368 r63734  
    2727#define ClipboardWin_h
    2828
     29#include "COMPtr.h"
    2930#include "CachedResourceClient.h"
    3031#include "Clipboard.h"
    31 #include "COMPtr.h"
    3232
    3333struct IDataObject;
     
    3535namespace WebCore {
    3636
    37     class CachedImage;
    38     class IntPoint;
    39     class WCDataObject;
     37class CachedImage;
     38class IntPoint;
     39class WCDataObject;
    4040
    41     // State available during IE's events for drag and drop and copy/paste
    42     class ClipboardWin : public Clipboard, public CachedResourceClient {
    43     public:
    44         static PassRefPtr<ClipboardWin> create(bool isForDragging, IDataObject* dataObject, ClipboardAccessPolicy policy)
    45         {
    46             return adoptRef(new ClipboardWin(isForDragging, dataObject, policy));
    47         }
    48         static PassRefPtr<ClipboardWin> create(bool isForDragging, WCDataObject* dataObject, ClipboardAccessPolicy policy)
    49         {
    50             return adoptRef(new ClipboardWin(isForDragging, dataObject, policy));
    51         }
    52         ~ClipboardWin();
    53    
    54         void clearData(const String& type);
    55         void clearAllData();
    56         String getData(const String& type, bool& success) const;
    57         bool setData(const String& type, const String& data);
    58    
    59         // extensions beyond IE's API
    60         virtual HashSet<String> types() const;
    61         virtual PassRefPtr<FileList> files() const;
    62    
    63         void setDragImage(CachedImage*, const IntPoint&);
    64         void setDragImageElement(Node*, const IntPoint&);
     41// State available during IE's events for drag and drop and copy/paste
     42class ClipboardWin : public Clipboard, public CachedResourceClient {
     43public:
     44    static PassRefPtr<ClipboardWin> create(bool isForDragging, IDataObject* dataObject, ClipboardAccessPolicy policy)
     45    {
     46        return adoptRef(new ClipboardWin(isForDragging, dataObject, policy));
     47    }
     48    static PassRefPtr<ClipboardWin> create(bool isForDragging, WCDataObject* dataObject, ClipboardAccessPolicy policy)
     49    {
     50        return adoptRef(new ClipboardWin(isForDragging, dataObject, policy));
     51    }
     52    ~ClipboardWin();
    6553
    66         virtual DragImageRef createDragImage(IntPoint& dragLoc) const;
    67         virtual void declareAndWriteDragImage(Element*, const KURL&, const String& title, Frame*);
    68         virtual void writeURL(const KURL&, const String&, Frame*);
    69         virtual void writeRange(Range*, Frame*);
    70         virtual void writePlainText(const String&);
     54    void clearData(const String& type);
     55    void clearAllData();
     56    String getData(const String& type, bool& success) const;
     57    bool setData(const String& type, const String& data);
    7158
    72         virtual bool hasData();
     59    // extensions beyond IE's API
     60    virtual HashSet<String> types() const;
     61    virtual PassRefPtr<FileList> files() const;
    7362
    74         COMPtr<IDataObject> dataObject() { return m_dataObject; }
     63    void setDragImage(CachedImage*, const IntPoint&);
     64    void setDragImageElement(Node*, const IntPoint&);
    7565
    76         void setExternalDataObject(IDataObject *dataObject);
     66    virtual DragImageRef createDragImage(IntPoint& dragLoc) const;
     67    virtual void declareAndWriteDragImage(Element*, const KURL&, const String& title, Frame*);
     68    virtual void writeURL(const KURL&, const String&, Frame*);
     69    virtual void writeRange(Range*, Frame*);
     70    virtual void writePlainText(const String&);
    7771
    78     private:
    79         ClipboardWin(bool isForDragging, IDataObject*, ClipboardAccessPolicy);
    80         ClipboardWin(bool isForDragging, WCDataObject*, ClipboardAccessPolicy);
     72    virtual bool hasData();
    8173
    82         void resetFromClipboard();
    83         void setDragImage(CachedImage*, Node*, const IntPoint&);
     74    COMPtr<IDataObject> dataObject() { return m_dataObject; }
    8475
    85         COMPtr<IDataObject> m_dataObject;
    86         COMPtr<WCDataObject> m_writableDataObject;
    87         Frame* m_frame;
    88     };
     76    void setExternalDataObject(IDataObject *dataObject);
     77
     78private:
     79    ClipboardWin(bool isForDragging, IDataObject*, ClipboardAccessPolicy);
     80    ClipboardWin(bool isForDragging, WCDataObject*, ClipboardAccessPolicy);
     81
     82    void resetFromClipboard();
     83    void setDragImage(CachedImage*, Node*, const IntPoint&);
     84
     85    COMPtr<IDataObject> m_dataObject;
     86    COMPtr<WCDataObject> m_writableDataObject;
     87    Frame* m_frame;
     88};
    8989
    9090} // namespace WebCore
  • trunk/WebCore/platform/win/PasteboardWin.cpp

    r56825 r63734  
    5555    LONG_PTR longPtr = GetWindowLongPtr(hWnd, 0);
    5656
    57     switch(message) {
     57    switch (message) {
    5858    case WM_RENDERFORMAT:
    5959        // This message comes when SetClipboardData was sent a null data handle
     
    118118        ExceptionCode ec = 0;
    119119        Vector<char> data;
    120         markupToCF_HTML(createMarkup(selectedRange, 0, AnnotateForInterchange),
     120        markupToCFHTML(createMarkup(selectedRange, 0, AnnotateForInterchange),
    121121            selectedRange->startContainer(ec)->document()->url().string(), data);
    122122        HGLOBAL cbData = createGlobalData(data);
     
    140140    if (canSmartCopyOrDelete) {
    141141        if (::OpenClipboard(m_owner)) {
    142             ::SetClipboardData(WebSmartPasteFormat, NULL);
     142            ::SetClipboardData(WebSmartPasteFormat, 0);
    143143            ::CloseClipboard();
    144144        }
     
    186186    if (::OpenClipboard(m_owner)) {
    187187        Vector<char> data;
    188         markupToCF_HTML(urlToMarkup(url, title), "", data);
     188        markupToCFHTML(urlToMarkup(url, title), "", data);
    189189        HGLOBAL cbData = createGlobalData(data);
    190190        if (!::SetClipboardData(HTMLClipboardFormat, cbData))
     
    261261            ::CloseClipboard();
    262262            return fromClipboard;
    263         } else
    264             ::CloseClipboard();
     263        }
     264        ::CloseClipboard();
    265265    }
    266266
     
    273273            ::CloseClipboard();
    274274            return fromClipboard;
    275         } else
    276             ::CloseClipboard();
     275        }
     276        ::CloseClipboard();
    277277    }
    278278
     
    289289        if (cbData) {
    290290            SIZE_T dataSize = ::GlobalSize(cbData);
    291             String cf_html(UTF8Encoding().decode((char*)::GlobalLock(cbData), dataSize));
     291            String cfhtml(UTF8Encoding().decode((char*)::GlobalLock(cbData), dataSize));
    292292            ::GlobalUnlock(cbData);
    293293            ::CloseClipboard();
    294294
    295             PassRefPtr<DocumentFragment> fragment = fragmentFromCF_HTML(frame->document(), cf_html);
     295            PassRefPtr<DocumentFragment> fragment = fragmentFromCFHTML(frame->document(), cfhtml);
    296296            if (fragment)
    297297                return fragment;
     
    307307                UChar* buffer = (UChar*)GlobalLock(cbData);
    308308                String str(buffer);
    309                 ::GlobalUnlock( cbData );
     309                ::GlobalUnlock(cbData);
    310310                ::CloseClipboard();
    311311                RefPtr<DocumentFragment> fragment = createFragmentFromText(context.get(), str);
     
    324324                char* buffer = (char*)GlobalLock(cbData);
    325325                String str(buffer);
    326                 ::GlobalUnlock( cbData );
     326                ::GlobalUnlock(cbData);
    327327                ::CloseClipboard();
    328328                RefPtr<DocumentFragment> fragment = createFragmentFromText(context.get(), str);
Note: See TracChangeset for help on using the changeset viewer.