webContents: fix value of contextMenu hasImageContents property
This commit is contained in:
parent
58b391cb77
commit
ee298ea0e3
1 changed files with 4 additions and 1 deletions
|
@ -104,7 +104,10 @@ v8::Local<v8::Value> Converter<ContextMenuParamsWithWebContents>::ToV8(
|
|||
dict.Set("srcURL", params.src_url);
|
||||
dict.Set("mediaType", params.media_type);
|
||||
dict.Set("mediaFlags", MediaFlagsToV8(isolate, params.media_flags));
|
||||
dict.Set("hasImageContents", params.has_image_contents);
|
||||
bool has_image_contents =
|
||||
(params.media_type == blink::WebContextMenuData::MediaTypeImage) &&
|
||||
params.has_image_contents;
|
||||
dict.Set("hasImageContents", has_image_contents);
|
||||
dict.Set("isEditable", params.is_editable);
|
||||
dict.Set("editFlags", EditFlagsToV8(isolate, params.edit_flags));
|
||||
dict.Set("selectionText", params.selection_text);
|
||||
|
|
Loading…
Reference in a new issue