Changeset 24972 in webkit


Ignore:
Timestamp:
Aug 9, 2007 8:49:22 PM (17 years ago)
Author:
bdash
Message:

2007-08-09 Mitz Pettel <mitz@webkit.org>

Reviewed by Adam Roben.

  • platform/win/PopupMenuWin.cpp: (WebCore::PopupWndProc): Track the mouse only inside the popup.
Location:
trunk/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r24971 r24972  
     12007-08-09  Mitz Pettel  <mitz@webkit.org>
     2
     3        Reviewed by Adam Roben.
     4
     5        - fix http://bugs.webkit.org/show_bug.cgi?id=14362
     6          Opening a select list always highlights first element in list
     7
     8        * platform/win/PopupMenuWin.cpp:
     9        (WebCore::PopupWndProc): Track the mouse only inside the popup.
     10
    1112007-08-09  Mitz Pettel  <mitz@webkit.org>
    212
  • trunk/WebCore/platform/win/PopupMenuWin.cpp

    r24582 r24972  
    712712                ::SystemParametersInfo(SPI_GETHOTTRACKING, 0, &shouldHotTrack, 0);
    713713
    714                 if (shouldHotTrack || wParam & MK_LBUTTON)
     714                RECT bounds;
     715                GetClientRect(popup->popupHandle(), &bounds);
     716                if ((shouldHotTrack || wParam & MK_LBUTTON) && ::PtInRect(&bounds, mousePoint))
    715717                    popup->setFocusedIndex(popup->listIndexAtPoint(mousePoint), true);
    716718
    717719                // Release capture if the left button isn't down, and the mousePoint is outside the popup window.
    718720                // This way, the WebView will get future mouse events in the rest of the window.
    719                 RECT bounds;
    720                 GetClientRect(popup->popupHandle(), &bounds);
    721721                if (!(wParam & MK_LBUTTON) && !::PtInRect(&bounds, mousePoint)) {
    722722                    ::ReleaseCapture();
Note: See TracChangeset for help on using the changeset viewer.