Changeset 85420 in webkit


Ignore:
Timestamp:
May 1, 2011 10:47:30 AM (13 years ago)
Author:
Patrick Gansterer
Message:

2011-05-01 Patrick Gansterer <Patrick Gansterer>

Reviewed by Adam Barth.

Fix OwnPtr strict issues in windows build
https://bugs.webkit.org/show_bug.cgi?id=59878

  • platform/graphics/ca/win/CACFLayerTreeHost.cpp: (WebCore::getDirtyRects):
  • platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp: (WebCore::MediaPlayerPrivateQuickTimeVisualContext::MediaPlayerPrivateQuickTimeVisualContext):
  • platform/graphics/win/WKCAImageQueue.cpp: (WebCore::WKCAImageQueue::WKCAImageQueue):
  • platform/win/CursorWin.cpp: (WebCore::createSharedCursor):
  • platform/win/PasteboardWin.cpp: (WebCore::Pasteboard::writeImage):

2011-05-01 Patrick Gansterer <Patrick Gansterer>

Reviewed by Adam Barth.

Fix OwnPtr strict issues in windows build
https://bugs.webkit.org/show_bug.cgi?id=59878

  • FullscreenVideoController.cpp: (FullscreenVideoController::FullscreenVideoController): (FullscreenVideoController::createHUDWindow):
  • WebCoreSupport/WebInspectorClient.cpp: (WebInspectorClient::highlight):
  • WebElementPropertyBag.cpp: (WebElementPropertyBag::WebElementPropertyBag):
  • WebNodeHighlight.cpp: (WebNodeHighlight::update):
  • WebNotificationCenter.cpp: (WebNotificationCenter::WebNotificationCenter):
  • WebView.cpp: (WebView::close): (WebView::paint): (WebView::handleMouseEvent): (WebView::registerEmbeddedViewMIMEType):
Location:
trunk/Source
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r85419 r85420  
     12011-05-01  Patrick Gansterer  <paroga@webkit.org>
     2
     3        Reviewed by Adam Barth.
     4
     5        Fix OwnPtr strict issues in windows build
     6        https://bugs.webkit.org/show_bug.cgi?id=59878
     7
     8        * platform/graphics/ca/win/CACFLayerTreeHost.cpp:
     9        (WebCore::getDirtyRects):
     10        * platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp:
     11        (WebCore::MediaPlayerPrivateQuickTimeVisualContext::MediaPlayerPrivateQuickTimeVisualContext):
     12        * platform/graphics/win/WKCAImageQueue.cpp:
     13        (WebCore::WKCAImageQueue::WKCAImageQueue):
     14        * platform/win/CursorWin.cpp:
     15        (WebCore::createSharedCursor):
     16        * platform/win/PasteboardWin.cpp:
     17        (WebCore::Pasteboard::writeImage):
     18
    1192011-05-01  Patrick Gansterer  <paroga@webkit.org>
    220
  • trunk/Source/WebCore/platform/graphics/ca/win/CACFLayerTreeHost.cpp

    r84635 r85420  
    240240        return;
    241241
    242     OwnPtr<HRGN> region(CreateRectRgn(0, 0, 0, 0));
     242    OwnPtr<HRGN> region = adoptPtr(CreateRectRgn(0, 0, 0, 0));
    243243    int regionType = GetUpdateRgn(window, region.get(), false);
    244244    if (regionType != COMPLEXREGION) {
  • trunk/Source/WebCore/platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp

    r82014 r85420  
    174174    , m_visible(false)
    175175    , m_newFrameAvailable(false)
    176     , m_movieClient(new MediaPlayerPrivateQuickTimeVisualContext::MovieClient(this))
    177 #if USE(ACCELERATED_COMPOSITING)
    178     , m_layerClient(new MediaPlayerPrivateQuickTimeVisualContext::LayerClient(this))
     176    , m_movieClient(adoptPtr(new MediaPlayerPrivateQuickTimeVisualContext::MovieClient(this)))
     177#if USE(ACCELERATED_COMPOSITING)
     178    , m_layerClient(adoptPtr(new MediaPlayerPrivateQuickTimeVisualContext::LayerClient(this)))
    179179    , m_movieTransform(CGAffineTransformIdentity)
    180180#endif
    181     , m_visualContextClient(new MediaPlayerPrivateQuickTimeVisualContext::VisualContextClient(this))
     181    , m_visualContextClient(adoptPtr(new MediaPlayerPrivateQuickTimeVisualContext::VisualContextClient(this)))
    182182    , m_delayingLoad(false)
    183183    , m_privateBrowsing(false)
  • trunk/Source/WebCore/platform/graphics/win/WKCAImageQueue.cpp

    r77943 r85420  
    3131#include <CoreFoundation/CoreFoundation.h>
    3232#include <WebKitSystemInterface/WebKitSystemInterface.h>
     33#include <wtf/PassOwnPtr.h>
    3334#include <wtf/RetainPtr.h>
    3435
     
    5455
    5556WKCAImageQueue::WKCAImageQueue(uint32_t width, uint32_t height, uint32_t capacity)
    56     : m_private(new WKCAImageQueuePrivate())
     57    : m_private(adoptPtr(new WKCAImageQueuePrivate()))
    5758{
    5859    m_private->m_imageQueue.adoptCF(wkCAImageQueueCreate(width, height, capacity));
     
    6061
    6162WKCAImageQueue::WKCAImageQueue(const WKCAImageQueue& o)
    62     : m_private(new WKCAImageQueuePrivate())
     63    : m_private(adoptPtr(new WKCAImageQueuePrivate()))
    6364{
    6465    m_private->m_imageQueue = o.m_private->m_imageQueue;
  • trunk/Source/WebCore/platform/win/CursorWin.cpp

    r80688 r85420  
    3434
    3535#include <wtf/OwnPtr.h>
     36#include <wtf/PassOwnPtr.h>
    3637
    3738#include <windows.h>
     
    5253    HDC workingDC = CreateCompatibleDC(dc);
    5354    if (doAlpha) {
    54         OwnPtr<HBITMAP> hCursor(CreateDIBSection(dc, (BITMAPINFO *)&cursorImage, DIB_RGB_COLORS, 0, 0, 0));
     55        OwnPtr<HBITMAP> hCursor = adoptPtr(CreateDIBSection(dc, (BITMAPINFO *)&cursorImage, DIB_RGB_COLORS, 0, 0, 0));
    5556        ASSERT(hCursor);
    5657
     
    6263        Vector<unsigned char, 128> maskBits;
    6364        maskBits.fill(0xff, (img->width() + 7) / 8 * img->height());
    64         OwnPtr<HBITMAP> hMask(CreateBitmap(img->width(), img->height(), 1, 1, maskBits.data()));
     65        OwnPtr<HBITMAP> hMask = adoptPtr(CreateBitmap(img->width(), img->height(), 1, 1, maskBits.data()));
    6566
    6667        ICONINFO ii;
     
    7778        HDC andMaskDC = CreateCompatibleDC(dc);
    7879        HDC xorMaskDC = CreateCompatibleDC(dc);
    79         OwnPtr<HBITMAP> hCursor(CreateDIBSection(dc, &cursorImage, DIB_RGB_COLORS, 0, 0, 0));
     80        OwnPtr<HBITMAP> hCursor = adoptPtr(CreateDIBSection(dc, &cursorImage, DIB_RGB_COLORS, 0, 0, 0));
    8081        ASSERT(hCursor);
    8182        img->getHBITMAP(hCursor.get());
    8283        BITMAP cursor;
    8384        GetObject(hCursor.get(), sizeof(BITMAP), &cursor);
    84         OwnPtr<HBITMAP> andMask(CreateBitmap(cursor.bmWidth, cursor.bmHeight, 1, 1, NULL));
    85         OwnPtr<HBITMAP> xorMask(CreateCompatibleBitmap(dc, cursor.bmWidth, cursor.bmHeight));
     85        OwnPtr<HBITMAP> andMask = adoptPtr(CreateBitmap(cursor.bmWidth, cursor.bmHeight, 1, 1, NULL));
     86        OwnPtr<HBITMAP> xorMask = adoptPtr(CreateCompatibleBitmap(dc, cursor.bmWidth, cursor.bmHeight));
    8687        HBITMAP oldCursor = (HBITMAP)SelectObject(workingDC, hCursor.get());
    8788        HBITMAP oldAndMask = (HBITMAP)SelectObject(andMaskDC, andMask.get());
  • trunk/Source/WebCore/platform/win/PasteboardWin.cpp

    r67122 r85420  
    222222    HDC compatibleDC = CreateCompatibleDC(0);
    223223    HDC sourceDC = CreateCompatibleDC(0);
    224     OwnPtr<HBITMAP> resultBitmap(CreateCompatibleBitmap(dc, image->width(), image->height()));
     224    OwnPtr<HBITMAP> resultBitmap = adoptPtr(CreateCompatibleBitmap(dc, image->width(), image->height()));
    225225    HGDIOBJ oldBitmap = SelectObject(compatibleDC, resultBitmap.get());
    226226
  • trunk/Source/WebKit/win/ChangeLog

    r85393 r85420  
     12011-05-01  Patrick Gansterer  <paroga@webkit.org>
     2
     3        Reviewed by Adam Barth.
     4
     5        Fix OwnPtr strict issues in windows build
     6        https://bugs.webkit.org/show_bug.cgi?id=59878
     7
     8        * FullscreenVideoController.cpp:
     9        (FullscreenVideoController::FullscreenVideoController):
     10        (FullscreenVideoController::createHUDWindow):
     11        * WebCoreSupport/WebInspectorClient.cpp:
     12        (WebInspectorClient::highlight):
     13        * WebElementPropertyBag.cpp:
     14        (WebElementPropertyBag::WebElementPropertyBag):
     15        * WebNodeHighlight.cpp:
     16        (WebNodeHighlight::update):
     17        * WebNotificationCenter.cpp:
     18        (WebNotificationCenter::WebNotificationCenter):
     19        * WebView.cpp:
     20        (WebView::close):
     21        (WebView::paint):
     22        (WebView::handleMouseEvent):
     23        (WebView::registerEmbeddedViewMIMEType):
     24
    1252011-04-29  Jer Noble  <jer.noble@apple.com>
    226
  • trunk/Source/WebKit/win/FullscreenVideoController.cpp

    r82120 r85420  
    243243    , m_timer(this, &FullscreenVideoController::timerFired)
    244244#if USE(ACCELERATED_COMPOSITING)
    245     , m_layerClient(new LayerClient(this))
     245    , m_layerClient(adoptPtr(new LayerClient(this)))
    246246    , m_rootChild(PlatformCALayer::create(PlatformCALayer::LayerTypeLayer, m_layerClient.get()))
    247247#endif
    248     , m_fullscreenWindow(new MediaPlayerPrivateFullscreenWindow(this))
     248    , m_fullscreenWindow(adoptPtr(new MediaPlayerPrivateFullscreenWindow(this)))
    249249{
    250250}
     
    438438    void* pixels;
    439439    BitmapInfo bitmapInfo = BitmapInfo::createBottomUp(IntSize(windowWidth, windowHeight));
    440     m_bitmap.set(::CreateDIBSection(0, &bitmapInfo, DIB_RGB_COLORS, &pixels, 0, 0));
    441    
     440    m_bitmap = adoptPtr(::CreateDIBSection(0, &bitmapInfo, DIB_RGB_COLORS, &pixels, 0, 0));
     441
    442442    // Dirty the window so the HUD draws
    443443    RECT clearRect = { m_hudPosition.x(), m_hudPosition.y(), m_hudPosition.x() + windowWidth, m_hudPosition.y() + windowHeight };
  • trunk/Source/WebKit/win/WebCoreSupport/WebInspectorClient.cpp

    r82294 r85420  
    182182
    183183    if (creatingHighlight)
    184         m_highlight.set(new WebNodeHighlight(m_inspectedWebView));
     184        m_highlight = adoptPtr(new WebNodeHighlight(m_inspectedWebView));
    185185
    186186    if (m_highlight->isShowing())
  • trunk/Source/WebKit/win/WebElementPropertyBag.cpp

    r82294 r85420  
    4343// WebElementPropertyBag -----------------------------------------------
    4444WebElementPropertyBag::WebElementPropertyBag(const HitTestResult& result)
    45     : m_result(new HitTestResult(result))
     45    : m_result(adoptPtr(new HitTestResult(result)))
    4646    , m_refCount(0)
    4747{
  • trunk/Source/WebKit/win/WebNodeHighlight.cpp

    r82294 r85420  
    149149
    150150    void* pixels = 0;
    151     OwnPtr<HBITMAP> hbmp(::CreateDIBSection(hdc, &bitmapInfo, DIB_RGB_COLORS, &pixels, 0, 0));
     151    OwnPtr<HBITMAP> hbmp = adoptPtr(::CreateDIBSection(hdc, &bitmapInfo, DIB_RGB_COLORS, &pixels, 0, 0));
    152152
    153153    ::SelectObject(hdc, hbmp.get());
  • trunk/Source/WebKit/win/WebNotificationCenter.cpp

    r82294 r85420  
    3333#include <wtf/HashMap.h>
    3434#include <wtf/HashTraits.h>
     35#include <wtf/PassOwnPtr.h>
    3536#include <wtf/Vector.h>
    3637#include <wtf/text/StringHash.h>
     
    5556WebNotificationCenter::WebNotificationCenter()
    5657    : m_refCount(0)
    57     , d(new WebNotificationCenterPrivate)
     58    , d(adoptPtr(new WebNotificationCenterPrivate))
    5859{
    5960    gClassCount++;
  • trunk/Source/WebKit/win/WebView.cpp

    r85393 r85420  
    681681        m_mouseOutTracker->dwFlags = TME_CANCEL;
    682682        ::TrackMouseEvent(m_mouseOutTracker.get());
    683         m_mouseOutTracker.set(0);
     683        m_mouseOutTracker.clear();
    684684    }
    685685   
     
    10511051    WindowsToPaint windowsToPaint;
    10521052    if (!dc) {
    1053         region.set(CreateRectRgn(0,0,0,0));
     1053        region = adoptPtr(CreateRectRgn(0,0,0,0));
    10541054        regionType = GetUpdateRgn(m_viewWindow, region.get(), false);
    10551055        hdc = BeginPaint(m_viewWindow, &ps);
     
    15001500        // Once WM_MOUSELEAVE is fired windows clears this tracker
    15011501        // so there is no need to disable it ourselves.
    1502         m_mouseOutTracker.set(0);
     1502        m_mouseOutTracker.clear();
    15031503        m_page->mainFrame()->eventHandler()->mouseMoved(mouseEvent);
    15041504        handled = true;
     
    15091509        handled = m_page->mainFrame()->eventHandler()->mouseMoved(mouseEvent);
    15101510        if (!m_mouseOutTracker) {
    1511             m_mouseOutTracker.set(new TRACKMOUSEEVENT);
     1511            m_mouseOutTracker = adoptPtr(new TRACKMOUSEEVENT);
    15121512            m_mouseOutTracker->cbSize = sizeof(TRACKMOUSEEVENT);
    15131513            m_mouseOutTracker->dwFlags = TME_LEAVE;
     
    60276027
    60286028    if (!m_embeddedViewMIMETypes)
    6029         m_embeddedViewMIMETypes.set(new HashSet<String>);
     6029        m_embeddedViewMIMETypes = adoptPtr(new HashSet<String>);
    60306030
    60316031    m_embeddedViewMIMETypes->add(String(mimeType, ::SysStringLen(mimeType)));
Note: See TracChangeset for help on using the changeset viewer.