Skip to content
  • levin@chromium.org's avatar
    [windows] Convert usages of GetDC to HWndDC Part 2. · 691549bb
    levin@chromium.org authored
    https://bugs.webkit.org/show_bug.cgi?id=76750
    
    Reviewed by Adam Roben.
    
    Source/WebKit/win:
    
    * FullscreenVideoController.cpp:
    (createCompatibleDCForWindow): Moved out the code which creates a DC for a window
    to keep the same scope for the DC lifetime.
    (FullscreenVideoController::draw):  Switch to using OwnPtr<HDC>
    since createCompatibleDCForWindow returns a PassOwnPtr.
    * WebNodeHighlight.cpp:
    (WebNodeHighlight::update):
      Cleaned up leaks from calling GetDC without release.
      Note that there is a potential leak of hdc that previously existed
      and still does in an early exit scenario. (This could be easily fixed
      by using OwnPtr<HDC> but I was trying to keep this patch focused.)
    * WebView.cpp:
    (WebView::scrollBackingStore): Typical conversion.
    (WebView::updateBackingStore): Reduced the scope of windowDC to be
    right where it is being used.
    (WebView::performLayeredWindowUpdate): Typical conversion.
    (WebView::paintIntoBackingStore): Ditto.
    
    Source/WebKit2:
    
    * Shared/win/ShareableBitmapWin.cpp:
    (WebKit::ShareableBitmap::windowsContext): Fix incorrect usage of OwnPtr<HDC> which
    would do a DeleteDC instead of a ReleaseDC.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@105667 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    691549bb
ChangeLog 1.21 MiB