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

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_aura.cc

Issue 2567093003: Prevent coordinate transformation when targeting the root RWHV (Closed)
Patch Set: Created 4 years 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/renderer_host/render_widget_host_view_aura.h" 5 #include "content/browser/renderer_host/render_widget_host_view_aura.h"
6 6
7 #include <set> 7 #include <set>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 1639 matching lines...) Expand 10 before | Expand all | Expand 10 after
1650 return false; 1650 return false;
1651 *transformed_point = 1651 *transformed_point =
1652 gfx::ConvertPointToDIP(device_scale_factor_, *transformed_point); 1652 gfx::ConvertPointToDIP(device_scale_factor_, *transformed_point);
1653 return true; 1653 return true;
1654 } 1654 }
1655 1655
1656 bool RenderWidgetHostViewAura::TransformPointToCoordSpaceForView( 1656 bool RenderWidgetHostViewAura::TransformPointToCoordSpaceForView(
1657 const gfx::Point& point, 1657 const gfx::Point& point,
1658 RenderWidgetHostViewBase* target_view, 1658 RenderWidgetHostViewBase* target_view,
1659 gfx::Point* transformed_point) { 1659 gfx::Point* transformed_point) {
1660 if (target_view == this) {
1661 *transformed_point = point;
1662 return true;
1663 }
1664
1660 // In TransformPointToLocalCoordSpace() there is a Point-to-Pixel conversion, 1665 // In TransformPointToLocalCoordSpace() there is a Point-to-Pixel conversion,
1661 // but it is not necessary here because the final target view is responsible 1666 // but it is not necessary here because the final target view is responsible
1662 // for converting before computing the final transform. 1667 // for converting before computing the final transform.
1663 return delegated_frame_host_->TransformPointToCoordSpaceForView( 1668 return delegated_frame_host_->TransformPointToCoordSpaceForView(
1664 point, target_view, transformed_point); 1669 point, target_view, transformed_point);
1665 } 1670 }
1666 1671
1667 void RenderWidgetHostViewAura::FocusedNodeChanged( 1672 void RenderWidgetHostViewAura::FocusedNodeChanged(
1668 bool editable, 1673 bool editable,
1669 const gfx::Rect& node_bounds_in_screen) { 1674 const gfx::Rect& node_bounds_in_screen) {
(...skipping 719 matching lines...) Expand 10 before | Expand all | Expand 10 after
2389 2394
2390 void RenderWidgetHostViewAura::SetPopupChild( 2395 void RenderWidgetHostViewAura::SetPopupChild(
2391 RenderWidgetHostViewAura* popup_child_host_view) { 2396 RenderWidgetHostViewAura* popup_child_host_view) {
2392 popup_child_host_view_ = popup_child_host_view; 2397 popup_child_host_view_ = popup_child_host_view;
2393 event_handler_->SetPopupChild( 2398 event_handler_->SetPopupChild(
2394 popup_child_host_view, 2399 popup_child_host_view,
2395 popup_child_host_view ? popup_child_host_view->event_handler() : nullptr); 2400 popup_child_host_view ? popup_child_host_view->event_handler() : nullptr);
2396 } 2401 }
2397 2402
2398 } // namespace content 2403 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698