Skip to content
  • pkasting@chromium.org's avatar
    WebCore: Make Pasteboard::writeImage() safe against NULL cachedImages, and clean · 2cadd7b2
    pkasting@chromium.org authored
    up some code.
    https://bugs.webkit.org/show_bug.cgi?id=35136
    
    Reviewed by Darin Fisher.
    
    * loader/ImageLoader.cpp:
    (WebCore::ImageLoader::updateRenderer): Shorten some code.
    * page/DragController.cpp:
    (WebCore::getImage): Shorten some code.
    * platform/chromium/PasteboardChromium.cpp:
    (WebCore::Pasteboard::writeImage): NULL-check cachedImage().
    * platform/gtk/PasteboardGtk.cpp:
    (WebCore::Pasteboard::writeImage): NULL-check cachedImage().
    * platform/mac/PasteboardMac.mm:
    (WebCore::Pasteboard::writeImage): NULL-check cachedImage().
    * platform/qt/PasteboardQt.cpp:
    (WebCore::Pasteboard::writeImage): NULL-check cachedImage().
    * platform/win/PasteboardWin.cpp:
    (WebCore::Pasteboard::writeImage): NULL-check cachedImage().
    
    WebKit/chromium: Add an isImageBlocked bool to the WebContextMenuData struct.
    https://bugs.webkit.org/show_bug.cgi?id=35136
            
    Reviewed by Darin Fisher.
    
    This lets us properly enable/disable the "Copy Image" context menu entry
    (and, in the future, maybe add a "Load Image" function).
    
    * public/WebContextMenuData.h:
    * src/ContextMenuClientImpl.cpp:
    (WebKit::ContextMenuClientImpl::getCustomMenuFromDefaultItems):
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@55029 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    2cadd7b2