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

Timothy thatcher at opensource.apple.com
Tue Nov 15 16:23:21 PST 2005


thatcher    05/11/15 16:23:21

  Modified:    .        Tag: Safari-2-0-branch ChangeLog
               kwq      Tag: Safari-2-0-branch KWQKHTMLPart.mm
                        WebCoreBridge.mm
  Log:
          Merged fix from TOT to Safari-2-0-branch
  
      2005-11-13  Vicki Murley  <vicki at apple.com>
  
          Reviewed by Maciej.
  
          Fixed <rdar://problem/4316201> REGRESSION: cursor and text in status bar is not updated when mousing over links in a frame (5509)
  
          * kwq/KWQKHTMLPart.mm:
          (KWQKHTMLPart::passSubframeEventToSubframe): add a case to handle NSMouseMoved, to fix the problem with the hand cursor
          (KWQKHTMLPart::mouseMoved): return if we're already sending an event to the subview
          * kwq/WebCoreBridge.mm:
          (-[WebCoreBridge elementAtPoint:]): if we're over a frame, return the element within the frame, to fix the problem with
          status bar text
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.64  +17 -0     WebCore/ChangeLog
  
  Index: ChangeLog
  ===================================================================
  RCS file: /cvs/root/WebCore/ChangeLog,v
  retrieving revision 1.1.2.63
  retrieving revision 1.1.2.64
  diff -u -r1.1.2.63 -r1.1.2.64
  --- ChangeLog	15 Nov 2005 07:30:49 -0000	1.1.2.63
  +++ ChangeLog	16 Nov 2005 00:23:16 -0000	1.1.2.64
  @@ -1,3 +1,20 @@
  +2005-11-15  Timothy Hatcher  <timothy at apple.com>
  +
  +        Merged fix from TOT to Safari-2-0-branch
  +
  +    2005-11-13  Vicki Murley  <vicki at apple.com>
  +
  +        Reviewed by Maciej.
  +
  +        Fixed <rdar://problem/4316201> REGRESSION: cursor and text in status bar is not updated when mousing over links in a frame (5509)
  +
  +        * kwq/KWQKHTMLPart.mm:
  +        (KWQKHTMLPart::passSubframeEventToSubframe): add a case to handle NSMouseMoved, to fix the problem with the hand cursor
  +        (KWQKHTMLPart::mouseMoved): return if we're already sending an event to the subview
  +        * kwq/WebCoreBridge.mm:
  +        (-[WebCoreBridge elementAtPoint:]): if we're over a frame, return the element within the frame, to fix the problem with
  +        status bar text
  +
   2005-11-14  Adele Peterson  <adele at apple.com>
   
           Merged fix from TOT to Safari-2-0-branch
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.628.6.11 +18 -2     WebCore/kwq/KWQKHTMLPart.mm
  
  Index: KWQKHTMLPart.mm
  ===================================================================
  RCS file: /cvs/root/WebCore/kwq/KWQKHTMLPart.mm,v
  retrieving revision 1.628.6.10
  retrieving revision 1.628.6.11
  diff -u -r1.628.6.10 -r1.628.6.11
  --- KWQKHTMLPart.mm	12 Nov 2005 01:57:17 -0000	1.628.6.10
  +++ KWQKHTMLPart.mm	16 Nov 2005 00:23:19 -0000	1.628.6.11
  @@ -2127,7 +2127,6 @@
       if (!wasDeferringTimers) {
           QObject::setDefersTimers(true);
       }
  -
       ASSERT(!_sendingEventToSubview);
       _sendingEventToSubview = true;
       [view mouseDown:_currentEvent];
  @@ -2553,6 +2552,23 @@
       KWQ_BLOCK_EXCEPTIONS;
   
       switch ([_currentEvent type]) {
  +        case NSMouseMoved: {
  +            NodeImpl *node = event.innerNode.handle();
  +            if (!node)
  +                return false;
  +            RenderObject *renderer = node->renderer();
  +            if (!renderer || !renderer->isWidget())
  +                return false;
  +            QWidget *widget = static_cast<RenderWidget *>(renderer)->widget();
  +            if (!widget || !widget->inherits("KHTMLView"))
  +                return false;
  +            KHTMLPart *subframePart = static_cast<KHTMLView *>(widget)->part();
  +            if (!subframePart)
  +                return false;
  +            [KWQ(subframePart)->bridge() mouseMoved:_currentEvent];
  +            return true;
  +        }
  +        
       	case NSLeftMouseDown: {
               NodeImpl *node = event.innerNode.handle();
               if (!node) {
  @@ -2789,7 +2805,7 @@
       KHTMLView *v = d->m_view;
       // Reject a mouse moved if the button is down - screws up tracking during autoscroll
       // These happen because WebKit sometimes has to fake up moved events.
  -    if (!v || d->m_bMousePressed) {
  +    if (!v || d->m_bMousePressed || _sendingEventToSubview) {
           return;
       }
       
  
  
  
  1.382.2.13 +22 -3     WebCore/kwq/WebCoreBridge.mm
  
  Index: WebCoreBridge.mm
  ===================================================================
  RCS file: /cvs/root/WebCore/kwq/WebCoreBridge.mm,v
  retrieving revision 1.382.2.12
  retrieving revision 1.382.2.13
  diff -u -r1.382.2.12 -r1.382.2.13
  --- WebCoreBridge.mm	12 Nov 2005 01:57:18 -0000	1.382.2.12
  +++ WebCoreBridge.mm	16 Nov 2005 00:23:19 -0000	1.382.2.13
  @@ -1027,16 +1027,35 @@
   - (NSDictionary *)elementAtPoint:(NSPoint)point
   {
       RenderObject *renderer = _part->renderer();
  -    if (!renderer) {
  +    if (!renderer) 
           return nil;
  -    }
  +    
       RenderObject::NodeInfo nodeInfo(true, true);
       renderer->layer()->hitTest(nodeInfo, (int)point.x, (int)point.y);
  +
  +    NodeImpl *n = nodeInfo.innerNode();
  +    QWidget *widget = static_cast<RenderWidget *>(n->renderer())->widget();
       
  +    while (n && n->renderer() && n->renderer()->isWidget() && widget && widget->inherits("KHTMLView")) {
  +        KHTMLPart *kpart = static_cast<DOM::HTMLFrameElementImpl *>(n)->contentPart();
  +        if (kpart && static_cast<KWQKHTMLPart *>(kpart)->renderer()) {
  +            int _x, _y;
  +            n->renderer()->absolutePosition(_x, _y, true);
  +            _x = (int)point.x - _x;
  +            _y = (int)point.y - _y;
  +            RenderObject::NodeInfo widgetNodeInfo(true, true);
  +            static_cast<KWQKHTMLPart *>(kpart)->renderer()->layer()->hitTest(widgetNodeInfo, _x, _y);
  +            nodeInfo = widgetNodeInfo;
  +            n = nodeInfo.innerNode();
  +            if (n && n->renderer())
  +                widget = static_cast<RenderWidget *>(n->renderer())->widget();
  +        }
  +    }  
  +        
       NSMutableDictionary *element = [NSMutableDictionary dictionary];
       [element setObject:[NSNumber numberWithBool:_part->isPointInsideSelection((int)point.x, (int)point.y)]
                   forKey:WebCoreElementIsSelectedKey];
  -    
  +
       // Find the title in the nearest enclosing DOM node.
       // For <area> tags in image maps, walk the tree for the <area>, not the <img> using it.
       for (NodeImpl *titleNode = nodeInfo.innerNode(); titleNode; titleNode = titleNode->parentNode()) {
  
  
  



More information about the webkit-changes mailing list