Changeset 23582 in webkit


Ignore:
Timestamp:
Jun 18, 2007, 9:56:27 PM (18 years ago)
Author:
kdecker
Message:

Reviewed by Kevin Decker


  • Carbon/HIWebView.m: (WindowHandler): HIObjectIsOfClass requires non-NULL input on Tiger. Reworked Kevin Decker's patch to remove the conditional compilation for Tiger, yet still avoid crashing BBEdit.
Location:
trunk/WebKit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKit/Carbon/HIWebView.m

    r23578 r23582  
    756756                            SetEventParameter(inEvent, kEventParamWindowMouseLocation, typeQDPoint, sizeof(Point), &where);
    757757
    758                             HIViewRef view;
    759                             HIViewGetViewForMouseEvent(HIViewGetRoot(window), inEvent, &view);
    760 #ifndef BUILDING_ON_TIGER
    761                             if (HIObjectIsOfClass((HIObjectRef)view, kHIWebViewClassID))
    762 #else
    763                             ControlKind kind;
    764                             GetControlKind(view, &kind);
    765                             if (kind.signature == 'appl' && kind.kind == 'wbvw')
    766 #endif
     758                            OSStatus err = noErr;
     759                            HIViewRef view = NULL;
     760
     761                            err = HIViewGetViewForMouseEvent(HIViewGetRoot(window), inEvent, &view);
     762                            if (err == noErr && view && HIObjectIsOfClass((HIObjectRef)view, kHIWebViewClassID))
    767763                                result = SendEventToEventTargetWithOptions(inEvent, HIObjectGetEventTarget((HIObjectRef)view), kEventTargetDontPropagate);
    768764                        }
     
    774770                case kEventMouseWheelMoved:
    775771                    {
    776                         HIViewRef view;
    777                         HIViewGetViewForMouseEvent(HIViewGetRoot(window), inEvent, &view);
    778 #ifndef BUILDING_ON_TIGER
    779                         if (HIObjectIsOfClass((HIObjectRef)view, kHIWebViewClassID))
    780 #else
    781                         ControlKind kind;
    782                         GetControlKind(view, &kind);
    783                         if (kind.signature == 'appl' && kind.kind == 'wbvw')
    784 #endif                       
     772                        OSStatus err = noErr;
     773                        HIViewRef view = NULL;
     774
     775                        err = HIViewGetViewForMouseEvent(HIViewGetRoot(window), inEvent, &view);
     776                        if (err == noErr && view && HIObjectIsOfClass((HIObjectRef)view, kHIWebViewClassID))
    785777                            result = SendEventToEventTargetWithOptions(inEvent, HIObjectGetEventTarget((HIObjectRef)view), kEventTargetDontPropagate);
    786778                    }
  • trunk/WebKit/ChangeLog

    r23579 r23582  
     12007-06-19  Jim Correia  <jim.correia@pobox.com>
     2
     3        Reviewed by Kevin Decker
     4       
     5        * Carbon/HIWebView.m:
     6        (WindowHandler): HIObjectIsOfClass requires non-NULL input on Tiger. Reworked Kevin Decker's patch to remove the conditional compilation for Tiger, yet still avoid crashing BBEdit.
     7
    182007-06-18  Sam Weinig  <sam@webkit.org>
    29
Note: See TracChangeset for help on using the changeset viewer.