Changeset 154031 in webkit
- Timestamp:
- Aug 13, 2013 5:12:59 PM (11 years ago)
- Location:
- trunk/Source/WebKit/mac
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/mac/ChangeLog
r154019 r154031 1 2013-08-13 Anders Carlsson <andersca@apple.com> 2 3 <https://webkit.org/b/119777> Get rid of two gotos 4 5 Reviewed by Tim Horton. 6 7 * WebView/WebHTMLView.mm: 8 (-[WebHTMLView mouseDown:]): 9 (-[WebHTMLView namesOfPromisedFilesDroppedAtDestination:]): 10 1 11 2013-08-13 Tim Horton <timothy_horton@apple.com> 2 12 -
trunk/Source/WebKit/mac/WebView/WebHTMLView.mm
r153379 r154031 3556 3556 3557 3557 NSInputManager *currentInputManager = [NSInputManager currentInputManager]; 3558 if ([currentInputManager wantsToHandleMouseEvents] && [currentInputManager handleMouseEvent:event]) 3559 goto done; 3560 3561 [_private->completionController endRevertingChange:NO moveLeft:NO]; 3562 3563 // If the web page handles the context menu event and menuForEvent: returns nil, we'll get control click events here. 3564 // We don't want to pass them along to KHTML a second time. 3565 if (!([event modifierFlags] & NSControlKeyMask)) { 3566 _private->ignoringMouseDraggedEvents = NO; 3567 3568 // Let WebCore get a chance to deal with the event. This will call back to us 3569 // to start the autoscroll timer if appropriate. 3570 if (Frame* coreframe = core([self _frame])) 3571 coreframe->eventHandler()->mouseDown(event); 3572 } 3573 3574 done: 3558 3559 if (![currentInputManager wantsToHandleMouseEvents] || ![currentInputManager handleMouseEvent:event]) { 3560 [_private->completionController endRevertingChange:NO moveLeft:NO]; 3561 3562 // If the web page handles the context menu event and menuForEvent: returns nil, we'll get control click events here. 3563 // We don't want to pass them along to KHTML a second time. 3564 if (!([event modifierFlags] & NSControlKeyMask)) { 3565 _private->ignoringMouseDraggedEvents = NO; 3566 3567 // Let WebCore get a chance to deal with the event. This will call back to us 3568 // to start the autoscroll timer if appropriate. 3569 if (Frame* coreframe = core([self _frame])) 3570 coreframe->eventHandler()->mouseDown(event); 3571 } 3572 } 3573 3575 3574 _private->handlingMouseDownEvent = NO; 3576 3575 } … … 3667 3666 3668 3667 if (WebCore::CachedImage* tiffResource = [self promisedDragTIFFDataSource]) { 3669 3670 ResourceBuffer *buffer = static_cast<CachedResource*>(tiffResource)->resourceBuffer(); 3671 if (!buffer) 3672 goto noPromisedData; 3673 3674 NSData *data = buffer->createNSData(); 3675 NSURLResponse *response = tiffResource->response().nsURLResponse(); 3676 draggingImageURL = [response URL]; 3677 wrapper = [[[NSFileWrapper alloc] initRegularFileWithContents:data] autorelease]; 3678 NSString* filename = [response suggestedFilename]; 3679 NSString* trueExtension(tiffResource->image()->filenameExtension()); 3680 if (!matchesExtensionOrEquivalent(filename, trueExtension)) 3681 filename = [[filename stringByAppendingString:@"."] stringByAppendingString:trueExtension]; 3682 [wrapper setPreferredFilename:filename]; 3683 } 3684 3685 noPromisedData: 3668 if (ResourceBuffer *buffer = static_cast<CachedResource*>(tiffResource)->resourceBuffer()) { 3669 NSData *data = buffer->createNSData(); 3670 NSURLResponse *response = tiffResource->response().nsURLResponse(); 3671 draggingImageURL = [response URL]; 3672 wrapper = [[[NSFileWrapper alloc] initRegularFileWithContents:data] autorelease]; 3673 NSString* filename = [response suggestedFilename]; 3674 NSString* trueExtension(tiffResource->image()->filenameExtension()); 3675 if (!matchesExtensionOrEquivalent(filename, trueExtension)) 3676 filename = [[filename stringByAppendingString:@"."] stringByAppendingString:trueExtension]; 3677 [wrapper setPreferredFilename:filename]; 3678 } 3679 } 3686 3680 3687 3681 if (!wrapper) {
Note: See TracChangeset
for help on using the changeset viewer.