Changeset 45257 in webkit
- Timestamp:
- Jun 26, 2009 3:06:33 AM (15 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r45256 r45257 1 2009-06-26 Yongjun Zhang <yongjun.zhang@nokia.com> 2 3 Reviewed by Eric Seidel. 4 5 Bug 20303: [Qt] Key events are not working in frames. 6 7 Add a layout test to test the event is sent to the right sub-frame. 8 9 * platform/qt/fast/events/event-sender-keydown-frame-expected.txt: Added. 10 * platform/qt/fast/events/event-sender-keydown-frame.html: Added. 11 1 12 2009-06-26 Rob Buis <rwlbuis@gmail.com> 2 13 -
trunk/WebCore/ChangeLog
r45256 r45257 1 2009-06-26 Yongjun Zhang <yongjun.zhang@nokia.com> 2 3 Reviewed by Eric Seidel. 4 5 Test: platform/qt/fast/events/event-sender-keydown-frame.html 6 7 Bug 20303: [Qt] Key events are not working in frames. 8 9 Merge scrolling handling code in qt and win port, move it to 10 EventHandler. 11 12 * page/EventHandler.cpp: 13 (WebCore::EventHandler::scrollRecursively): 14 * page/EventHandler.h: 15 1 16 2009-06-26 Rob Buis <rwlbuis@gmail.com> 2 17 -
trunk/WebCore/page/EventHandler.cpp
r44624 r45257 855 855 856 856 return false; 857 } 858 859 bool EventHandler::scrollRecursively(ScrollDirection direction, ScrollGranularity granularity) 860 { 861 bool handled = scrollOverflow(direction, granularity); 862 if (!handled) { 863 Frame* frame = m_frame; 864 do { 865 FrameView* view = frame->view(); 866 handled = view ? view->scroll(direction, granularity) : false; 867 frame = frame->tree()->parent(); 868 } while (!handled && frame); 869 } 870 871 return handled; 857 872 } 858 873 -
trunk/WebCore/page/EventHandler.h
r44379 r45257 110 110 bool scrollOverflow(ScrollDirection, ScrollGranularity); 111 111 112 bool scrollRecursively(ScrollDirection, ScrollGranularity); 113 112 114 bool shouldDragAutoNode(Node*, const IntPoint&) const; // -webkit-user-drag == auto 113 115 -
trunk/WebKit/qt/Api/qwebpage.cpp
r45220 r45257 797 797 QFontMetrics fm(defaultFont); 798 798 int fontHeight = fm.height(); 799 if (!handleScrolling(ev )) {799 if (!handleScrolling(ev, frame)) { 800 800 switch (ev->key()) { 801 801 case Qt::Key_Back: … … 1000 1000 } 1001 1001 1002 bool QWebPagePrivate::handleScrolling(QKeyEvent *ev )1002 bool QWebPagePrivate::handleScrolling(QKeyEvent *ev, Frame *frame) 1003 1003 { 1004 1004 ScrollDirection direction; … … 1047 1047 } 1048 1048 1049 if (!mainFrame->d->frame->eventHandler()->scrollOverflow(direction, granularity)) 1050 mainFrame->d->frame->view()->scroll(direction, granularity); 1051 1052 return true; 1049 return frame->eventHandler()->scrollRecursively(direction, granularity); 1053 1050 } 1054 1051 -
trunk/WebKit/qt/Api/qwebpage_p.h
r41151 r45257 46 46 class Node; 47 47 class Page; 48 class Frame; 48 49 49 50 #ifndef QT_NO_CURSOR … … 114 115 void shortcutOverrideEvent(QKeyEvent*); 115 116 void leaveEvent(QEvent *); 116 bool handleScrolling(QKeyEvent* );117 bool handleScrolling(QKeyEvent*, WebCore::Frame*); 117 118 118 119 #ifndef QT_NO_SHORTCUT -
trunk/WebKit/qt/ChangeLog
r45220 r45257 1 2009-06-26 Yongjun Zhang <yongjun.zhang@nokia.com> 2 3 Reviewed by Eric Seidel. 4 5 Bug 20303: [Qt] Key events are not working in frames. 6 7 Send scrolling events to current focused frame, bubble the event 8 up to parent frame if it is not handled. Use EventHandler's new 9 shared scrolling code. 10 11 * Api/qwebpage.cpp: 12 (QWebPagePrivate::keyPressEvent): 13 (QWebPagePrivate::handleScrolling): 14 * Api/qwebpage_p.h: 15 1 16 2009-06-25 Jakub Wieczorek <faw217@gmail.com> 2 17 -
trunk/WebKit/win/ChangeLog
r44995 r45257 1 2009-06-26 Yongjun Zhang <yongjun.zhang@nokia.com> 2 3 Reviewed by Eric Seidel. 4 5 Bug 20303: [Qt] Key events are not working in frames. 6 7 Move the scroll handling code to EventHandler so that other 8 ports can share the functionality. 9 10 * WebView.cpp: 11 (WebView::keyDown): 12 (EnumTextMatches::QueryInterface): 13 1 14 2009-06-23 Anders Carlsson <andersca@apple.com> 2 15 -
trunk/WebKit/win/WebView.cpp
r44890 r45257 1723 1723 } 1724 1724 1725 if (!frame->eventHandler()->scrollOverflow(direction, granularity)) { 1726 handled = frame->view()->scroll(direction, granularity); 1727 Frame* parent = frame->tree()->parent(); 1728 while(!handled && parent) { 1729 handled = parent->view()->scroll(direction, granularity); 1730 parent = parent->tree()->parent(); 1731 } 1732 } 1733 return handled; 1725 return frame->eventHandler()->scrollRecursively(direction, granularity); 1734 1726 } 1735 1727
Note: See TracChangeset
for help on using the changeset viewer.