Changeset 32282 in webkit


Ignore:
Timestamp:
Apr 20, 2008 1:48:55 PM (16 years ago)
Author:
pewtermoose@webkit.org
Message:

2008-04-20 Matt Lilek <webkit@mattlilek.com>

Mysteriously reviewed by mitz|away.

Bug 18111: Closing a tab while dragging crashes Safari
https://bugs.webkit.org/show_bug.cgi?id=18111

Null check the page before handling drag events.

  • WebView/WebView.mm: (-[WebView draggingUpdated:]): (-[WebView draggingExited:]):
Location:
trunk/WebKit/mac
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKit/mac/ChangeLog

    r32261 r32282  
     12008-04-20  Matt Lilek  <webkit@mattlilek.com>
     2
     3        Mysteriously reviewed by mitz|away.
     4
     5        Bug 18111: Closing a tab while dragging crashes Safari
     6        https://bugs.webkit.org/show_bug.cgi?id=18111
     7
     8        Null check the page before handling drag events.
     9
     10        * WebView/WebView.mm:
     11        (-[WebView draggingUpdated:]):
     12        (-[WebView draggingExited:]):
     13
    1142008-04-19  Brady Eidson  <beidson@apple.com>
    215
  • trunk/WebKit/mac/WebView/WebView.mm

    r32261 r32282  
    25032503- (NSDragOperation)draggingUpdated:(id <NSDraggingInfo>)draggingInfo
    25042504{
     2505    Page* page = core(self);
     2506    if (!page)
     2507        return NSDragOperationNone;
     2508
    25052509    NSView <WebDocumentView>* view = [self documentViewAtWindowPoint:[draggingInfo draggingLocation]];
    25062510    WebPasteboardHelper helper([view isKindOfClass:[WebHTMLView class]] ? (WebHTMLView*)view : nil);
     
    25082512    IntPoint global(globalPoint([draggingInfo draggingLocation], [self window]));
    25092513    DragData dragData(draggingInfo, client, global, (DragOperation)[draggingInfo draggingSourceOperationMask], &helper);
    2510     return core(self)->dragController()->dragUpdated(&dragData);
     2514    return page->dragController()->dragUpdated(&dragData);
    25112515}
    25122516
    25132517- (void)draggingExited:(id <NSDraggingInfo>)draggingInfo
    25142518{
     2519    Page* page = core(self);
     2520    if (!page)
     2521        return;
     2522
    25152523    NSView <WebDocumentView>* view = [self documentViewAtWindowPoint:[draggingInfo draggingLocation]];
    25162524    WebPasteboardHelper helper([view isKindOfClass:[WebHTMLView class]] ? (WebHTMLView*)view : nil);
     
    25182526    IntPoint global(globalPoint([draggingInfo draggingLocation], [self window]));
    25192527    DragData dragData(draggingInfo, client, global, (DragOperation)[draggingInfo draggingSourceOperationMask], &helper);
    2520     core(self)->dragController()->dragExited(&dragData);
     2528    page->dragController()->dragExited(&dragData);
    25212529}
    25222530
Note: See TracChangeset for help on using the changeset viewer.