Open darkdh opened 7 years ago
I suppose this could potentially be a webview bug. When we have some time we should try to repro in a Chrome webview
It starts from
atom/browser/api/atom_api_web_contents.cc
void WebContents::ShowDefinitionForSelection() {
#if defined(OS_MACOSX)
const auto view = web_contents()->GetRenderWidgetHostView();
if (view)
view->ShowDefinitionForSelection();
#endif
}
and then
guest_bounds
and embedder_bounds
look fine in
RenderWidgetHostViewGuest::ShowDefinitionForSelection()
of content/browser/frame_host/render_widget_host_view_guest.cc
was there a ticket for the original issue? If not you can add it here
In reference to https://github.com/brave/muon/commit/62dec3b9561bc5d35976549317c40b1b6fc46b4e
content/browser/renderer_host/render_widget_host_view_mac.mm In
showLookUpDictionaryOverlayFromRange
(fromShowDefinitionForSelection
)gfx::Rect root_box = renderWidgetHostView_->GetViewBounds();
will get0,0 0x0
comparing toshowLookUpDictionaryOverlayAtPoint
(from three finger tapping) will get0,22 1440x838
from the same selected word.