Changeset 152143 in webkit


Ignore:
Timestamp:
Jun 27, 2013 5:33:21 PM (11 years ago)
Author:
andersca@apple.com
Message:

Get rid of the last uses of deprecatedCharactersWithNullTermination()
https://bugs.webkit.org/show_bug.cgi?id=118159

Reviewed by Andreas Kling.

Replace calls to deprecatedCharactersWithNullTermination() with charactersWithNullTermination().data().

Source/WebKit/win:

  • COMPropertyBag.h:

(::GetPropertyInfo):

  • WebCoreSupport/WebChromeClient.cpp:

(WebChromeClient::runOpenPanel):

  • WebCoreSupport/WebInspectorClient.cpp:

(WebInspectorFrontendClient::updateWindowTitle):

  • WebDownloadCFNet.cpp:

(WebDownload::didFinish):

  • WebKitSystemBits.cpp:

(WebVolumeFreeSize):

  • WebLocalizableStrings.cpp:

(LocalizedString::operator LPCTSTR):

  • WebView.cpp:

(WebView::setToolTip):

Tools:

  • DumpRenderTree/win/DumpRenderTree.cpp:

(findFontFallback):

Location:
trunk
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/win/COMPropertyBag.h

    r152069 r152143  
    223223        if (!pPropBag[j].pstrName)
    224224            return E_OUTOFMEMORY;
    225         wcscpy_s(pPropBag[j].pstrName, current->key.length()+1, static_cast<String>(current->key).deprecatedCharactersWithNullTermination());
     225        wcscpy_s(pPropBag[j].pstrName, current->key.length()+1, static_cast<String>(current->key).charactersWithNullTermination().data());
    226226        ++*pcProperties;
    227227    }
  • trunk/Source/WebKit/win/ChangeLog

    r152069 r152143  
     12013-06-27  Anders Carlsson  <andersca@apple.com>
     2
     3        Get rid of the last uses of deprecatedCharactersWithNullTermination()
     4        https://bugs.webkit.org/show_bug.cgi?id=118159
     5
     6        Reviewed by Andreas Kling.
     7
     8        Replace calls to deprecatedCharactersWithNullTermination() with charactersWithNullTermination().data().
     9
     10        * COMPropertyBag.h:
     11        (::GetPropertyInfo):
     12        * WebCoreSupport/WebChromeClient.cpp:
     13        (WebChromeClient::runOpenPanel):
     14        * WebCoreSupport/WebInspectorClient.cpp:
     15        (WebInspectorFrontendClient::updateWindowTitle):
     16        * WebDownloadCFNet.cpp:
     17        (WebDownload::didFinish):
     18        * WebKitSystemBits.cpp:
     19        (WebVolumeFreeSize):
     20        * WebLocalizableStrings.cpp:
     21        (LocalizedString::operator LPCTSTR):
     22        * WebView.cpp:
     23        (WebView::setToolTip):
     24
    1252013-06-26  Anders Carlsson  <andersca@apple.com>
    226
  • trunk/Source/WebKit/win/WebCoreSupport/WebChromeClient.cpp

    r152069 r152143  
    671671    String allFiles = allFilesText();
    672672    allFiles.append(L"\0*.*\0\0", 6);
    673     ofn.lpstrFilter = allFiles.deprecatedCharactersWithNullTermination();
     673    ofn.lpstrFilter = allFiles.charactersWithNullTermination().data();
    674674    ofn.lpstrFile = fileBuf.data();
    675675    ofn.nMaxFile = fileBuf.size();
    676676    String dialogTitle = uploadFileText();
    677     ofn.lpstrTitle = dialogTitle.deprecatedCharactersWithNullTermination();
     677    ofn.lpstrTitle = dialogTitle.charactersWithNullTermination().data();
    678678    ofn.Flags = OFN_ENABLESIZING | OFN_FILEMUSTEXIST | OFN_PATHMUSTEXIST | OFN_EXPLORER;
    679679    if (multiFile)
  • trunk/Source/WebKit/win/WebCoreSupport/WebInspectorClient.cpp

    r152069 r152143  
    449449{
    450450    String title = makeString("Web Inspector ", static_cast<UChar>(0x2014), ' ', m_inspectedURL);
    451     ::SetWindowText(m_frontendHwnd, title.deprecatedCharactersWithNullTermination());
     451    ::SetWindowText(m_frontendHwnd, title.charactersWithNullTermination().data());
    452452}
    453453
  • trunk/Source/WebKit/win/WebDownloadCFNet.cpp

    r152069 r152143  
    473473    // We try to rename the bundle to the final file name.  If that fails, we give the delegate one more chance to chose
    474474    // the final file name, then we just leave it
    475     if (!MoveFileEx(m_bundlePath.deprecatedCharactersWithNullTermination(), m_destination.deprecatedCharactersWithNullTermination(), 0)) {
     475    if (!MoveFileEx(m_bundlePath.charactersWithNullTermination().data(), m_destination.charactersWithNullTermination().data(), 0)) {
    476476        LOG_ERROR("Failed to move bundle %s to %s on completion\nError - %i", m_bundlePath.ascii().data(), m_destination.ascii().data(), GetLastError());
    477477       
     
    485485        // one last time.
    486486        if (!m_destination.isEmpty())
    487             if (MoveFileEx(m_bundlePath.deprecatedCharactersWithNullTermination(), m_destination.deprecatedCharactersWithNullTermination(), 0))
     487            if (MoveFileEx(m_bundlePath.charactersWithNullTermination().data(), m_destination.charactersWithNullTermination().data(), 0))
    488488                reportBundlePathAsFinalPath = false;
    489489
  • trunk/Source/WebKit/win/WebKitSystemBits.cpp

    r152069 r152143  
    4646    WTF::String path(cfstringPath);
    4747    ULARGE_INTEGER freeBytesToCaller;
    48     BOOL result = GetDiskFreeSpaceExW((LPCWSTR)path.deprecatedCharactersWithNullTermination(), &freeBytesToCaller, 0, 0);
     48    BOOL result = GetDiskFreeSpaceExW((LPCWSTR)path.charactersWithNullTermination().data(), &freeBytesToCaller, 0, 0);
    4949    if (!result)
    5050        return 0;
  • trunk/Source/WebKit/win/WebLocalizableStrings.cpp

    r152069 r152143  
    8989{
    9090    if (!m_string.isEmpty())
    91         return m_string.deprecatedCharactersWithNullTermination();
     91        return m_string.charactersWithNullTermination().data();
    9292
    9393    m_string = m_cfString;
     
    9797            m_string.replace(i, 1, "s");
    9898
    99     return m_string.deprecatedCharactersWithNullTermination();
     99    return m_string.charactersWithNullTermination().data();
    100100}
    101101
  • trunk/Source/WebKit/win/WebView.cpp

    r152069 r152143  
    28132813        info.uFlags = TTF_IDISHWND;
    28142814        info.uId = reinterpret_cast<UINT_PTR>(m_viewWindow);
    2815         info.lpszText = const_cast<UChar*>(m_toolTip.deprecatedCharactersWithNullTermination());
     2815        info.lpszText = const_cast<UChar*>(m_toolTip.charactersWithNullTermination().data());
    28162816        ::SendMessage(m_toolTipHwnd, TTM_UPDATETIPTEXT, 0, reinterpret_cast<LPARAM>(&info));
    28172817    }
  • trunk/Tools/ChangeLog

    r152133 r152143  
     12013-06-27  Anders Carlsson  <andersca@apple.com>
     2
     3        Get rid of the last uses of deprecatedCharactersWithNullTermination()
     4        https://bugs.webkit.org/show_bug.cgi?id=118159
     5
     6        Reviewed by Andreas Kling.
     7
     8        Replace calls to deprecatedCharactersWithNullTermination() with charactersWithNullTermination().data().
     9
     10        * DumpRenderTree/win/DumpRenderTree.cpp:
     11        (findFontFallback):
     12
    1132013-06-27  Bem Jones-Bey  <bjonesbe@adobe.com>
    214
  • trunk/Tools/DumpRenderTree/win/DumpRenderTree.cpp

    r152069 r152143  
    965965
    966966    wchar_t fullPath[_MAX_PATH];
    967     if (!_wfullpath(fullPath, pathToFontFallback.deprecatedCharactersWithNullTermination(), _MAX_PATH))
     967    if (!_wfullpath(fullPath, pathToFontFallback.charactersWithNullTermination().data(), _MAX_PATH))
    968968        return emptyString();
    969969
     
    996996        pathToFontFallback = WebCore::pathByAppendingComponent(*pos, "resources\\");
    997997
    998         if (::PathIsDirectoryW(pathToFontFallback.deprecatedCharactersWithNullTermination()))
     998        if (::PathIsDirectoryW(pathToFontFallback.charactersWithNullTermination().data()))
    999999            return pathToFontFallback;
    10001000    }
Note: See TracChangeset for help on using the changeset viewer.