| Index: Source/web/ContextMenuClientImpl.cpp
|
| diff --git a/Source/web/ContextMenuClientImpl.cpp b/Source/web/ContextMenuClientImpl.cpp
|
| index 7dbf1ba9dadf60efe4f03278582e41497e11a5f7..0e5b9166008861997d920e8e83f43c24f1793254 100644
|
| --- a/Source/web/ContextMenuClientImpl.cpp
|
| +++ b/Source/web/ContextMenuClientImpl.cpp
|
| @@ -225,10 +225,15 @@ void ContextMenuClientImpl::showContextMenu(const WebCore::ContextMenu* defaultM
|
|
|
| if (isHTMLCanvasElement(r.innerNonSharedNode())) {
|
| data.mediaType = WebContextMenuData::MediaTypeCanvas;
|
| + data.hasImageContents = true;
|
| } else if (!r.absoluteImageURL().isEmpty()) {
|
| data.srcURL = r.absoluteImageURL();
|
| data.mediaType = WebContextMenuData::MediaTypeImage;
|
| data.mediaFlags |= WebContextMenuData::MediaCanPrint;
|
| +
|
| + // An image can to be null for many reasons, like being blocked, no image
|
| + // data received from server yet.
|
| + data.hasImageContents = r.image() && !r.image()->isNull();
|
| } else if (!r.absoluteMediaURL().isEmpty()) {
|
| data.srcURL = r.absoluteMediaURL();
|
|
|
| @@ -288,12 +293,6 @@ void ContextMenuClientImpl::showContextMenu(const WebCore::ContextMenu* defaultM
|
| }
|
| }
|
|
|
| - // An image can to be null for many reasons, like being blocked, no image
|
| - // data received from server yet.
|
| - data.hasImageContents =
|
| - (data.mediaType == WebContextMenuData::MediaTypeImage)
|
| - && r.image() && !(r.image()->isNull());
|
| -
|
| // If it's not a link, an image, a media element, or an image/media link,
|
| // show a selection menu or a more generic page menu.
|
| if (selectedFrame->document()->loader())
|
|
|