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

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_mac.mm

Issue 2578253002: 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_mac.h" 5 #include "content/browser/renderer_host/render_widget_host_view_mac.h"
6 6
7 #import <Carbon/Carbon.h> 7 #import <Carbon/Carbon.h>
8 #import <objc/runtime.h> 8 #import <objc/runtime.h>
9 #include <OpenGL/gl.h> 9 #include <OpenGL/gl.h>
10 #include <QuartzCore/QuartzCore.h> 10 #include <QuartzCore/QuartzCore.h>
(...skipping 1568 matching lines...) Expand 10 before | Expand all | Expand 10 after
1579 transformed_point)) 1579 transformed_point))
1580 return false; 1580 return false;
1581 *transformed_point = gfx::ConvertPointToDIP(scale_factor, *transformed_point); 1581 *transformed_point = gfx::ConvertPointToDIP(scale_factor, *transformed_point);
1582 return true; 1582 return true;
1583 } 1583 }
1584 1584
1585 bool RenderWidgetHostViewMac::TransformPointToCoordSpaceForView( 1585 bool RenderWidgetHostViewMac::TransformPointToCoordSpaceForView(
1586 const gfx::Point& point, 1586 const gfx::Point& point,
1587 RenderWidgetHostViewBase* target_view, 1587 RenderWidgetHostViewBase* target_view,
1588 gfx::Point* transformed_point) { 1588 gfx::Point* transformed_point) {
1589 if (target_view == this) {
1590 *transformed_point = point;
1591 return true;
1592 }
1593
1589 return browser_compositor_->GetDelegatedFrameHost() 1594 return browser_compositor_->GetDelegatedFrameHost()
1590 ->TransformPointToCoordSpaceForView(point, target_view, 1595 ->TransformPointToCoordSpaceForView(point, target_view,
1591 transformed_point); 1596 transformed_point);
1592 } 1597 }
1593 1598
1594 bool RenderWidgetHostViewMac::Send(IPC::Message* message) { 1599 bool RenderWidgetHostViewMac::Send(IPC::Message* message) {
1595 if (render_widget_host_) 1600 if (render_widget_host_)
1596 return render_widget_host_->Send(message); 1601 return render_widget_host_->Send(message);
1597 delete message; 1602 delete message;
1598 return false; 1603 return false;
(...skipping 1846 matching lines...) Expand 10 before | Expand all | Expand 10 after
3445 3450
3446 // "-webkit-app-region: drag | no-drag" is implemented on Mac by excluding 3451 // "-webkit-app-region: drag | no-drag" is implemented on Mac by excluding
3447 // regions that are not draggable. (See ControlRegionView in 3452 // regions that are not draggable. (See ControlRegionView in
3448 // native_app_window_cocoa.mm). This requires the render host view to be 3453 // native_app_window_cocoa.mm). This requires the render host view to be
3449 // draggable by default. 3454 // draggable by default.
3450 - (BOOL)mouseDownCanMoveWindow { 3455 - (BOOL)mouseDownCanMoveWindow {
3451 return YES; 3456 return YES;
3452 } 3457 }
3453 3458
3454 @end 3459 @end
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_aura.cc ('k') | content/browser/site_per_process_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698