Changeset 141678 in webkit


Ignore:
Timestamp:
Feb 1, 2013 6:53:16 PM (11 years ago)
Author:
weinig@apple.com
Message:

Don't use deprecated method -[NSImage dissolveToPoint:fraction:]
<rdar://problem/11723792>
https://bugs.webkit.org/show_bug.cgi?id=108739

Reviewed by Anders Carlsson.

  • platform/mac/DragImageMac.mm:

(WebCore::dissolveDragImageToFraction):
Remove use of deprecated NSImage methods and simplify a bit.

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r141673 r141678  
     12013-02-01  Sam Weinig  <sam@webkit.org>
     2
     3        Don't use deprecated method -[NSImage dissolveToPoint:fraction:]
     4        <rdar://problem/11723792>
     5        https://bugs.webkit.org/show_bug.cgi?id=108739
     6
     7        Reviewed by Anders Carlsson.
     8
     9        * platform/mac/DragImageMac.mm:
     10        (WebCore::dissolveDragImageToFraction):
     11        Remove use of deprecated NSImage methods and simplify a bit.
     12
    1132013-02-01  Andrey Lushnikov  <lushnikov@chromium.org>
    214
  • trunk/Source/WebCore/platform/mac/DragImageMac.mm

    r132555 r141678  
    7070    RetainPtr<NSImage> dissolvedImage(AdoptNS, [[NSImage alloc] initWithSize:[image.get() size]]);
    7171   
    72     NSPoint point = [image.get() isFlipped] ? NSMakePoint(0, [image.get() size].height) : NSZeroPoint;
    73    
    74     // In this case the dragging image is always correct.
    75     [dissolvedImage.get() setFlipped:[image.get() isFlipped]];
    76    
    7772    [dissolvedImage.get() lockFocus];
    78     [image.get() dissolveToPoint:point fraction: delta];
     73    [image.get() drawAtPoint:NSZeroPoint fromRect:NSMakeRect(0, 0, [image size].width, [image size].height) operation:NSCompositeCopy fraction:delta];
    7974    [dissolvedImage.get() unlockFocus];
    80    
    81     [image.get() lockFocus];
    82     [dissolvedImage.get() compositeToPoint:point operation:NSCompositeCopy];
    83     [image.get() unlockFocus];
    84    
    85     return image;
     75
     76    return dissolvedImage;
    8677}
    8778       
Note: See TracChangeset for help on using the changeset viewer.