Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1234)

Unified Diff: content/browser/renderer_host/render_widget_host_view_aura.cc

Issue 2623483003: Support tracking focused node element for OOPIFs. (Closed)
Patch Set: Added the missing forward declaration Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/browser/renderer_host/render_widget_host_view_aura.cc
diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc
index 8a73ab840e1fbecea640633b465c7bcf6526756f..59178ae073a8201e9a46f8a11091e39a6f35f8f9 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
@@ -185,6 +185,8 @@ class WinScreenKeyboardObserver : public ui::OnScreenKeyboardObserver {
gfx::Point origin(location_in_screen_);
screen_position_client->ConvertPointFromScreen(window_, &origin);
+ // TODO(ekaramad): We should support the case where the focused node is
+ // inside an OOPIF (https://crbug.com/676037).
// We want to scroll the node into a rectangle which originates from
// the touch point and a small offset (10) in either direction.
gfx::Rect node_rect(origin.x(), origin.y(), 10, 10);
@@ -793,7 +795,7 @@ void RenderWidgetHostViewAura::FocusedNodeTouched(
ui::OnScreenKeyboardDisplayManager* osk_display_manager =
ui::OnScreenKeyboardDisplayManager::GetInstance();
DCHECK(osk_display_manager);
- if (editable && host_ && host_->GetView()) {
+ if (editable && host_ && host_->GetView() && host_->delegate()) {
keyboard_observer_.reset(new WinScreenKeyboardObserver(
host_, location_dips_screen, device_scale_factor_, window_));
virtual_keyboard_requested_ =
« no previous file with comments | « content/browser/renderer_host/render_widget_host_impl.cc ('k') | content/browser/web_contents/web_contents_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698