[webkit-changes] cvs commit: WebCore/kwq KWQKHTMLPart.h KWQKHTMLPart.mm

Vicki vicki at opensource.apple.com
Thu Dec 22 16:14:07 PST 2005


vicki       05/12/22 16:14:06

  Modified:    .        Tag: Safari-1-3-branch ChangeLog
               kwq      Tag: Safari-1-3-branch KWQKHTMLPart.h
                        KWQKHTMLPart.mm
  Log:
          Reviewed by Eric.
  
          - fix <rdar://problem/4379899> *Panther* REGRESSION (TOT): Scrollwheel doesn't work on frameset pages (5450)
  	and <rdar://problem/4379906> *Pan EU2* 10.4.4 Regression: Seed: scrolling with scrollwheel, trackpad doesn't
  	work for nested framesets at gmail.com
  
          Basically plug in the TOT fixes for Panther.  Add passWheelEventToChildWidget, but add the event as a
          parameter - since there's no concept of _currentEvent on the branch, we have to pass the event around.
          Return true when passing the wheel event to the child widget, since we don't want to send the event on
          to the nextResponder for this case.
  
          * kwq/KWQKHTMLPart.h:
          * kwq/KWQKHTMLPart.mm:
          (KWQKHTMLPart::scrollOverflowWithScrollWheelEvent):
          (KWQKHTMLPart::passWheelEventToChildWidget):
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.18.2.5  +18 -0     WebCore/ChangeLog
  
  Index: ChangeLog
  ===================================================================
  RCS file: /cvs/root/WebCore/ChangeLog,v
  retrieving revision 1.18.2.4
  retrieving revision 1.18.2.5
  diff -u -r1.18.2.4 -r1.18.2.5
  --- ChangeLog	22 Dec 2005 22:38:35 -0000	1.18.2.4
  +++ ChangeLog	23 Dec 2005 00:14:02 -0000	1.18.2.5
  @@ -1,3 +1,21 @@
  +2005-12-22  Vicki Murley  <vicki at apple.com>
  +
  +        Reviewed by Eric.
  +
  +        - fix <rdar://problem/4379899> *Panther* REGRESSION (TOT): Scrollwheel doesn't work on frameset pages (5450) 
  +	and <rdar://problem/4379906> *Pan EU2* 10.4.4 Regression: Seed: scrolling with scrollwheel, trackpad doesn't 
  +	work for nested framesets at gmail.com
  +
  +        Basically plug in the TOT fixes for Panther.  Add passWheelEventToChildWidget, but add the event as a 
  +        parameter - since there's no concept of _currentEvent on the branch, we have to pass the event around.  
  +        Return true when passing the wheel event to the child widget, since we don't want to send the event on
  +        to the nextResponder for this case.
  +  
  +        * kwq/KWQKHTMLPart.h:
  +        * kwq/KWQKHTMLPart.mm:
  +        (KWQKHTMLPart::scrollOverflowWithScrollWheelEvent):
  +        (KWQKHTMLPart::passWheelEventToChildWidget):
  +
   2005-12-22  Timothy Hatcher  <timothy at apple.com>
   
           Merged fix from TOT to Safari-1-3-branch
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.216.6.3 +1 -0      WebCore/kwq/KWQKHTMLPart.h
  
  Index: KWQKHTMLPart.h
  ===================================================================
  RCS file: /cvs/root/WebCore/kwq/KWQKHTMLPart.h,v
  retrieving revision 1.216.6.2
  retrieving revision 1.216.6.3
  diff -u -r1.216.6.2 -r1.216.6.3
  --- KWQKHTMLPart.h	28 Nov 2005 18:49:27 -0000	1.216.6.2
  +++ KWQKHTMLPart.h	23 Dec 2005 00:14:03 -0000	1.216.6.3
  @@ -282,6 +282,7 @@
       void clearTimers();
       static void clearTimers(KHTMLView *);
       
  +    bool passWheelEventToChildWidget(DOM::NodeImpl *node, NSEvent *event);
       bool passSubframeEventToSubframe(DOM::NodeImpl::MouseEvent &);
       
       void redirectionTimerStartedOrStopped();
  
  
  
  1.628.4.8 +29 -4     WebCore/kwq/KWQKHTMLPart.mm
  
  Index: KWQKHTMLPart.mm
  ===================================================================
  RCS file: /cvs/root/WebCore/kwq/KWQKHTMLPart.mm,v
  retrieving revision 1.628.4.7
  retrieving revision 1.628.4.8
  diff -u -r1.628.4.7 -r1.628.4.8
  --- KWQKHTMLPart.mm	22 Dec 2005 22:36:58 -0000	1.628.4.7
  +++ KWQKHTMLPart.mm	23 Dec 2005 00:14:03 -0000	1.628.4.8
  @@ -996,14 +996,15 @@
       r->layer()->hitTest(nodeInfo, (int)point.x, (int)point.y);    
       
       NodeImpl *node = nodeInfo.innerNode();
  -    if (node == 0) {
  +    if (!node) 
           return false;
  -    }
       
       r = node->renderer();
  -    if (r == 0) {
  +    if (!r) 
           return false;
  -    }
  +    
  +    if (passWheelEventToChildWidget(node, event)) 
  +        return true;
       
       KWQScrollDirection direction;
       float multiplier;
  @@ -2501,6 +2502,30 @@
       clearTimers(d->m_view);
   }
   
  +bool KWQKHTMLPart::passWheelEventToChildWidget(DOM::NodeImpl *node, NSEvent *event)
  +{
  +    if ([event type] != NSScrollWheel || _sendingEventToSubview || !node) 
  +      return false;
  +
  +    RenderObject *renderer = node->renderer();
  +    if (!renderer || !renderer->isWidget())
  +        return false;
  +    QWidget *widget = static_cast<RenderWidget *>(renderer)->widget();
  +    if (!widget)
  +        return false;
  +      
  +    NSView *nodeView = widget->getView();
  +    ASSERT(nodeView);
  +    KWQ_BLOCK_EXCEPTIONS;
  +    ASSERT([nodeView superview]);
  +    NSView *view = [nodeView hitTest:[[nodeView superview] convertPoint:[event locationInWindow] fromView:nil]];
  +    _sendingEventToSubview = true;
  +    [view scrollWheel:event];
  +    KWQ_UNBLOCK_EXCEPTIONS;
  +    _sendingEventToSubview = false;
  +    return true;
  +}
  +  
   bool KWQKHTMLPart::passSubframeEventToSubframe(NodeImpl::MouseEvent &event)
   {
       KWQ_BLOCK_EXCEPTIONS;
  
  
  



More information about the webkit-changes mailing list