Changeset 28695 in webkit


Ignore:
Timestamp:
Dec 13, 2007 2:17:13 PM (16 years ago)
Author:
ap@webkit.org
Message:

Reviewed by Adele.

http://bugs.webkit.org/show_bug.cgi?id=16421
REGRESSION(r28669): Page scrolls down when you hit space key in text area

Test: fast/events/space-scroll-event.html

  • WebView.cpp: (WebView::keyDown): (WebView::keyPress): Moved space handliing to keyPress() to fix this bug and to match IE. Scrolling via arrow keys is correctly handled in keyDown().
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r28694 r28695  
     12007-12-13  Alexey Proskuryakov  <ap@webkit.org>
     2
     3        Reviewed by Adele.
     4
     5        http://bugs.webkit.org/show_bug.cgi?id=16421
     6        REGRESSION(r28669): Page scrolls down when you hit space key in text area
     7
     8        * fast/events/space-scroll-event-expected.txt: Added.
     9        * fast/events/space-scroll-event.html: Added.
     10
    1112007-12-13  Justin Garcia  <justin.garcia@apple.com>
    212
  • trunk/WebKit/win/ChangeLog

    r28672 r28695  
     12007-12-13  Alexey Proskuryakov  <ap@webkit.org>
     2
     3        Reviewed by Adele.
     4
     5        http://bugs.webkit.org/show_bug.cgi?id=16421
     6        REGRESSION(r28669): Page scrolls down when you hit space key in text area
     7
     8        Test: fast/events/space-scroll-event.html
     9
     10        * WebView.cpp:
     11        (WebView::keyDown):
     12        (WebView::keyPress):
     13        Moved space handliing to keyPress() to fix this bug and to match IE. Scrolling via arrow keys is correctly handled
     14        in keyDown().
     15
    1162007-12-12  Brady Eidson  <beidson@apple.com>
    217
  • trunk/WebKit/win/WebView.cpp

    r28653 r28695  
    14421442        m_page->goBack();
    14431443   
    1444     // Need to scroll the page if the arrow keys, space(shift), pgup/dn, or home/end are hit.
     1444    // Need to scroll the page if the arrow keys, pgup/dn, or home/end are hit.
    14451445    ScrollDirection direction;
    14461446    ScrollGranularity granularity;
     
    14701470            direction = ScrollDown;
    14711471            break;
    1472         case VK_SPACE:
    1473             granularity = ScrollByPage;
    1474             direction = (GetKeyState(VK_SHIFT) & 0x8000) ? ScrollUp : ScrollDown;
    1475             break;
    14761472        case VK_PRIOR:
    14771473            granularity = ScrollByPage;
     
    14831479            break;
    14841480        default:
    1485             // We want to let Windows handle the WM_SYSCHAR event if we can't handle it
    1486             // We do want to return true for regular key down case so the WM_CHAR handler won't pick up unhandled messages
    14871481            return false;
    14881482    }
     
    14981492
    14991493    PlatformKeyboardEvent keyEvent(m_viewWindow, charCode, keyData, PlatformKeyboardEvent::Char, systemKeyDown);
    1500     return frame->eventHandler()->keyEvent(keyEvent);
     1494    if (frame->eventHandler()->keyEvent(keyEvent))
     1495        return true;
     1496
     1497    // Need to scroll the page if space is hit.
     1498    if (charCode == ' ') {
     1499        ScrollDirection direction = keyEvent.shiftKey() ? ScrollUp : ScrollDown;
     1500        if (!frame->eventHandler()->scrollOverflow(direction, ScrollByPage))
     1501            frame->view()->scroll(direction, ScrollByPage);
     1502        return true;
     1503    }
     1504    return false;
    15011505}
    15021506
Note: See TracChangeset for help on using the changeset viewer.