[webkit-changes] cvs commit: WebCore/kwq KWQKHTMLPart.h
KWQKHTMLPart.mm
Timothy
thatcher at opensource.apple.com
Thu Nov 10 21:06:39 PST 2005
thatcher 05/11/10 21:06:39
Modified: . Tag: Safari-2-0-branch ChangeLog
khtml Tag: Safari-2-0-branch khtmlview.cpp
kwq Tag: Safari-2-0-branch KWQKHTMLPart.h
KWQKHTMLPart.mm
Log:
Merged fix from TOT to Safari-2-0-branch
2005-11-02 Vicki Murley <vicki at apple.com>
Reviewed by Darin.
fix <rdar://problem/4303587> REGRESSION (TOT): Scrollwheel doesn't work on frameset pages (5450)
* kwq/KWQKHTMLPart.h:
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::wheelEvent): set _currentEvent to the wheel event
(KWQKHTMLPart::passWheelEventToChildWidget): New. Pass the event
to the child widget, if we haven't already handled the event
* khtml/khtmlview.cpp:
(KHTMLView::viewportWheelEvent): add passWheelEventToChildWidget check, and
accept the event if we're passing to the child widget
Revision Changes Path
No revision
No revision
1.1.2.51 +19 -0 WebCore/ChangeLog
Index: ChangeLog
===================================================================
RCS file: /cvs/root/WebCore/ChangeLog,v
retrieving revision 1.1.2.50
retrieving revision 1.1.2.51
diff -u -r1.1.2.50 -r1.1.2.51
--- ChangeLog 11 Nov 2005 04:29:40 -0000 1.1.2.50
+++ ChangeLog 11 Nov 2005 05:06:30 -0000 1.1.2.51
@@ -2,6 +2,25 @@
Merged fix from TOT to Safari-2-0-branch
+ 2005-11-02 Vicki Murley <vicki at apple.com>
+
+ Reviewed by Darin.
+
+ fix <rdar://problem/4303587> REGRESSION (TOT): Scrollwheel doesn't work on frameset pages (5450)
+
+ * kwq/KWQKHTMLPart.h:
+ * kwq/KWQKHTMLPart.mm:
+ (KWQKHTMLPart::wheelEvent): set _currentEvent to the wheel event
+ (KWQKHTMLPart::passWheelEventToChildWidget): New. Pass the event
+ to the child widget, if we haven't already handled the event
+ * khtml/khtmlview.cpp:
+ (KHTMLView::viewportWheelEvent): add passWheelEventToChildWidget check, and
+ accept the event if we're passing to the child widget
+
+2005-11-10 Timothy Hatcher <timothy at apple.com>
+
+ Merged fix from TOT to Safari-2-0-branch
+
2005-11-10 Adele Peterson <adele at apple.com>
Reviewed by Maciej.
No revision
No revision
1.128.8.8 +4 -0 WebCore/khtml/khtmlview.cpp
Index: khtmlview.cpp
===================================================================
RCS file: /cvs/root/WebCore/khtml/khtmlview.cpp,v
retrieving revision 1.128.8.7
retrieving revision 1.128.8.8
diff -u -r1.128.8.7 -r1.128.8.8
--- khtmlview.cpp 26 Aug 2005 00:40:15 -0000 1.128.8.7
+++ khtmlview.cpp 11 Nov 2005 05:06:35 -0000 1.128.8.8
@@ -1970,6 +1970,10 @@
doc->renderer()->layer()->hitTest(hitTestResult, x, y);
NodeImpl *node = hitTestResult.innerNode();
+ if (KWQ(m_part)->passWheelEventToChildWidget(node)) {
+ e->accept();
+ return;
+ }
if (node) {
node->dispatchWheelEvent(e);
if (e->isAccepted())
No revision
No revision
1.216.8.4 +1 -0 WebCore/kwq/KWQKHTMLPart.h
Index: KWQKHTMLPart.h
===================================================================
RCS file: /cvs/root/WebCore/kwq/KWQKHTMLPart.h,v
retrieving revision 1.216.8.3
retrieving revision 1.216.8.4
diff -u -r1.216.8.3 -r1.216.8.4
--- KWQKHTMLPart.h 2 Aug 2005 16:52:27 -0000 1.216.8.3
+++ KWQKHTMLPart.h 11 Nov 2005 05:06:36 -0000 1.216.8.4
@@ -282,6 +282,7 @@
static void clearTimers(KHTMLView *);
bool passSubframeEventToSubframe(DOM::NodeImpl::MouseEvent &);
+ bool passWheelEventToChildWidget(DOM::NodeImpl *);
void redirectionTimerStartedOrStopped();
1.628.6.9 +34 -0 WebCore/kwq/KWQKHTMLPart.mm
Index: KWQKHTMLPart.mm
===================================================================
RCS file: /cvs/root/WebCore/kwq/KWQKHTMLPart.mm,v
retrieving revision 1.628.6.8
retrieving revision 1.628.6.9
diff -u -r1.628.6.8 -r1.628.6.9
--- KWQKHTMLPart.mm 16 Sep 2005 02:34:16 -0000 1.628.6.8
+++ KWQKHTMLPart.mm 11 Nov 2005 05:06:36 -0000 1.628.6.9
@@ -1086,8 +1086,16 @@
KHTMLView *v = d->m_view;
if (v) {
+ NSEvent *oldCurrentEvent = _currentEvent;
+ _currentEvent = KWQRetain(event);
+
QWheelEvent qEvent(event);
v->viewportWheelEvent(&qEvent);
+
+ ASSERT(_currentEvent == event);
+ KWQRelease(event);
+ _currentEvent = oldCurrentEvent;
+
if (qEvent.isAccepted())
return true;
}
@@ -2619,6 +2627,32 @@
return false;
}
+bool KWQKHTMLPart::passWheelEventToChildWidget(DOM::NodeImpl *node)
+{
+ KWQ_BLOCK_EXCEPTIONS;
+
+ if ([_currentEvent type] != NSScrollWheel || _sendingEventToSubview || !node)
+ return false;
+ else {
+ RenderObject *renderer = node->renderer();
+ if (!renderer || !renderer->isWidget())
+ return false;
+ QWidget *widget = static_cast<RenderWidget *>(renderer)->widget();
+ if (!widget)
+ return false;
+
+ NSView *view = widget->getView();
+ ASSERT(view);
+ _sendingEventToSubview = true;
+ [view scrollWheel:_currentEvent];
+ _sendingEventToSubview = false;
+ return true;
+ }
+
+ KWQ_UNBLOCK_EXCEPTIONS;
+ return false;
+}
+
void KWQKHTMLPart::mouseDown(NSEvent *event)
{
KHTMLView *v = d->m_view;
More information about the webkit-changes
mailing list