Changeset 122284 in webkit


Ignore:
Timestamp:
Jul 10, 2012 6:13:16 PM (12 years ago)
Author:
adamk@chromium.org
Message:

[Chromium] REGRESSION(r121909): m_currentInputEvent never set
https://bugs.webkit.org/show_bug.cgi?id=90914

Reviewed by Abhishek Arya.

The always-null m_currentInputEvent causes a regression when
middle-clicking on a link that calls window.open('...', '_blank');
that new tab should open in the background, but instead opens in the
foreground (see code in ChromeClientImpl::getNavigationPolicy()).

Fix usage of TemporaryChange to specify a local variable name so that
m_currentInputEvent is actually set for the duration of handleInputEvent.

  • src/WebViewImpl.cpp:

(WebKit::WebViewImpl::handleInputEvent): Name the TemporaryChange instance.

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

Legend:

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

    r122280 r122284  
     12012-07-10  Adam Klein  <adamk@chromium.org>
     2
     3        [Chromium] REGRESSION(r121909): m_currentInputEvent never set
     4        https://bugs.webkit.org/show_bug.cgi?id=90914
     5
     6        Reviewed by Abhishek Arya.
     7
     8        The always-null m_currentInputEvent causes a regression when
     9        middle-clicking on a link that calls window.open('...', '_blank');
     10        that new tab should open in the background, but instead opens in the
     11        foreground (see code in ChromeClientImpl::getNavigationPolicy()).
     12
     13        Fix usage of TemporaryChange to specify a local variable name so that
     14        m_currentInputEvent is actually set for the duration of handleInputEvent.
     15
     16        * src/WebViewImpl.cpp:
     17        (WebKit::WebViewImpl::handleInputEvent): Name the TemporaryChange instance.
     18
    1192012-07-10  Adam Barth  <abarth@webkit.org>
    220
  • trunk/Source/WebKit/chromium/src/WebViewImpl.cpp

    r121909 r122284  
    17621762        return false;
    17631763
    1764     TemporaryChange<const WebInputEvent*>(m_currentInputEvent, &inputEvent);
     1764    TemporaryChange<const WebInputEvent*> currentEventChange(m_currentInputEvent, &inputEvent);
    17651765
    17661766#if ENABLE(POINTER_LOCK)
Note: See TracChangeset for help on using the changeset viewer.