Changeset 92621 in webkit


Ignore:
Timestamp:
Aug 8, 2011 12:41:12 PM (13 years ago)
Author:
bfulgham@webkit.org
Message:

WebView::performLayeredWindowUpdate() crashes with
NULL pointer when using layered window updates.
https://bugs.webkit.org/show_bug.cgi?id=60618

Reviewed by Adam Roben.

During resize operations, the backing store will be destroyed if
the window's size (either height or width) is set to zero. The
bug was identified when a user first resized a WebView to zero
dimensions, then attempted to perform a MoveWindow. The paint
message triggered by the MoveWindow attempted to use the layered
window update logic, which encountered the nulled backing store.

  • WebView.cpp:

(WebView::performLayeredWindowUpdate): Add an early

return when there is no backing store to blend with.

Location:
trunk/Source/WebKit/win
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/win/ChangeLog

    r92492 r92621  
     12011-08-05  Brent Fulgham  <bfulgham@webkit.org>
     2
     3        WebView::performLayeredWindowUpdate() crashes with
     4        NULL pointer when using layered window updates.
     5        https://bugs.webkit.org/show_bug.cgi?id=60618
     6
     7        Reviewed by Adam Roben.
     8
     9        During resize operations, the backing store will be destroyed if
     10        the window's size (either height or width) is set to zero. The
     11        bug was identified when a user first resized a WebView to zero
     12        dimensions, then attempted to perform a MoveWindow. The paint
     13        message triggered by the MoveWindow attempted to use the layered
     14        window update logic, which encountered the nulled backing store.
     15
     16        * WebView.cpp:
     17        (WebView::performLayeredWindowUpdate): Add an early
     18         return when there is no backing store to blend with.
     19
    1202011-08-05  Anders Carlsson  <andersca@apple.com>
    221
  • trunk/Source/WebKit/win/WebView.cpp

    r92492 r92621  
    10011001void WebView::performLayeredWindowUpdate()
    10021002{
     1003    // The backing store may have been destroyed if the window rect was set to zero height or zero width.
     1004    if (!m_backingStoreBitmap)
     1005        return;
     1006
    10031007    HDC hdcScreen = ::GetDC(m_viewWindow);
    10041008    OwnPtr<HDC> hdcMem = adoptPtr(::CreateCompatibleDC(hdcScreen));
Note: See TracChangeset for help on using the changeset viewer.