Changeset 20233 in webkit


Ignore:
Timestamp:
Mar 15, 2007 11:50:16 PM (17 years ago)
Author:
bdakin
Message:

Reviewed by Geoff.

Fix for http://bugs.webkit.org/show_bug.cgi?id=13088 REGRESSION
(r19761-19779): Copy image no longer includes image address
(rdar://5067927)

writeURL() does not need an isImage parameter. Now that it accepts
the types as a parameter, we can just declare the appropriate image
types within writeImage and send them to writeURL(). Also,
declaring the types twice is what broke this.

  • platform/Pasteboard.h:
  • platform/mac/PasteboardMac.mm: (WebCore::Pasteboard::writeURL): (WebCore::Pasteboard::writeImage):
Location:
trunk/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r20232 r20233  
     12007-03-15  Beth Dakin  <bdakin@apple.com>
     2
     3        Reviewed by Geoff.
     4
     5        Fix for http://bugs.webkit.org/show_bug.cgi?id=13088 REGRESSION
     6        (r19761-19779): Copy image no longer includes image address
     7        (rdar://5067927)
     8
     9        writeURL() does not need an isImage parameter. Now that it accepts
     10        the types as a parameter, we can just declare the appropriate image
     11        types within writeImage and send them to writeURL(). Also,
     12        declaring the types twice is what broke this.
     13
     14        * platform/Pasteboard.h:
     15        * platform/mac/PasteboardMac.mm:
     16        (WebCore::Pasteboard::writeURL):
     17        (WebCore::Pasteboard::writeImage):
     18
    1192007-03-15  Adele Peterson  <adele@apple.com>
    220
  • trunk/WebCore/platform/Pasteboard.h

    r19764 r20233  
    6969    //Helper functions to allow Clipboard to share code
    7070    static void writeSelection(NSPasteboard* pasteboard, Range* selectedRange, bool canSmartCopyOrDelete, Frame* frame);
    71     static void writeURL(NSPasteboard* pasteboard, NSArray* types, const KURL& url, const String& titleStr, Frame* frame, bool isImage = false);
     71    static void writeURL(NSPasteboard* pasteboard, NSArray* types, const KURL& url, const String& titleStr, Frame* frame);
    7272#endif
    7373   
    7474    static Pasteboard* generalPasteboard();
    7575    void writeSelection(Range*, bool canSmartCopyOrDelete, Frame*);
    76     void writeURL(const KURL&, const String&, Frame* = 0, bool isImage = false);
     76    void writeURL(const KURL&, const String&, Frame* = 0);
    7777    void writeImage(const HitTestResult&);
    7878#if PLATFORM(MAC)
  • trunk/WebCore/platform/mac/PasteboardMac.mm

    r20182 r20233  
    201201}
    202202
    203 void Pasteboard::writeURL(NSPasteboard* pasteboard, NSArray* types, const KURL& url, const String& titleStr, Frame* frame, bool isImage)
     203void Pasteboard::writeURL(NSPasteboard* pasteboard, NSArray* types, const KURL& url, const String& titleStr, Frame* frame)
    204204{
    205205    if (WebArchivePboardType == nil)
     
    207207   
    208208    if (types == nil) {
    209         if (isImage)
    210             types = writableTypesForImage();
    211         else
    212             types = writableTypesForURL();
     209        types = writableTypesForURL();
    213210        [pasteboard declareTypes:types owner:nil];
    214211    }
     
    241238}
    242239   
    243 void Pasteboard::writeURL(const KURL& url, const String& titleStr, Frame* frame, bool isImage)
    244 {
    245     Pasteboard::writeURL(m_pasteboard, nil, url, titleStr, frame, isImage);
     240void Pasteboard::writeURL(const KURL& url, const String& titleStr, Frame* frame)
     241{
     242    Pasteboard::writeURL(m_pasteboard, nil, url, titleStr, frame);
    246243}
    247244
     
    286283    Frame* frame = node->document()->frame();
    287284
    288     writeURL(URL, title, frame, true);
    289     NSArray *types = [m_pasteboard types];
     285    NSArray* types = writableTypesForImage();
    290286    [m_pasteboard declareTypes:types owner:nil];
     287    writeURL(m_pasteboard, types, URL, title, frame);
    291288
    292289    Image* coreImage = result.image();
Note: See TracChangeset for help on using the changeset viewer.