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

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

Issue 1489913003: Handle pointer-events: none in browser process hittesting. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: implement piman@'s suggestion Created 4 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 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 2192 matching lines...) Expand 10 before | Expand all | Expand 10 after
2203 !(event->flags() & ui::EF_FROM_TOUCH)) { 2203 !(event->flags() & ui::EF_FROM_TOUCH)) {
2204 event->ConvertLocationToTarget(window_, window_->parent()); 2204 event->ConvertLocationToTarget(window_, window_->parent());
2205 window_->parent()->delegate()->OnMouseEvent(event); 2205 window_->parent()->delegate()->OnMouseEvent(event);
2206 } 2206 }
2207 2207
2208 if (!IsXButtonUpEvent(event)) 2208 if (!IsXButtonUpEvent(event))
2209 event->SetHandled(); 2209 event->SetHandled();
2210 } 2210 }
2211 2211
2212 uint32_t RenderWidgetHostViewAura::SurfaceIdNamespaceAtPoint( 2212 uint32_t RenderWidgetHostViewAura::SurfaceIdNamespaceAtPoint(
2213 cc::SurfaceHittestDelegate* delegate,
2213 const gfx::Point& point, 2214 const gfx::Point& point,
2214 gfx::Point* transformed_point) { 2215 gfx::Point* transformed_point) {
2215 DCHECK(device_scale_factor_ != 0.0f); 2216 DCHECK(device_scale_factor_ != 0.0f);
2216 2217
2217 // The surface hittest happens in device pixels, so we need to convert the 2218 // The surface hittest happens in device pixels, so we need to convert the
2218 // |point| from DIPs to pixels before hittesting. 2219 // |point| from DIPs to pixels before hittesting.
2219 gfx::Point point_in_pixels = 2220 gfx::Point point_in_pixels =
2220 gfx::ConvertPointToPixel(device_scale_factor_, point); 2221 gfx::ConvertPointToPixel(device_scale_factor_, point);
2221 cc::SurfaceId id = delegated_frame_host_->SurfaceIdAtPoint(point_in_pixels, 2222 cc::SurfaceId id = delegated_frame_host_->SurfaceIdAtPoint(
2222 transformed_point); 2223 delegate, point_in_pixels, transformed_point);
2223 *transformed_point = 2224 *transformed_point =
2224 gfx::ConvertPointToDIP(device_scale_factor_, *transformed_point); 2225 gfx::ConvertPointToDIP(device_scale_factor_, *transformed_point);
2225 2226
2226 // It is possible that the renderer has not yet produced a surface, in which 2227 // It is possible that the renderer has not yet produced a surface, in which
2227 // case we return our current namespace. 2228 // case we return our current namespace.
2228 if (id.is_null()) 2229 if (id.is_null())
2229 return GetSurfaceIdNamespace(); 2230 return GetSurfaceIdNamespace();
2230 return cc::SurfaceIdAllocator::NamespaceForId(id); 2231 return cc::SurfaceIdAllocator::NamespaceForId(id);
2231 } 2232 }
2232 2233
(...skipping 794 matching lines...) Expand 10 before | Expand all | Expand 10 after
3027 3028
3028 //////////////////////////////////////////////////////////////////////////////// 3029 ////////////////////////////////////////////////////////////////////////////////
3029 // RenderWidgetHostViewBase, public: 3030 // RenderWidgetHostViewBase, public:
3030 3031
3031 // static 3032 // static
3032 void RenderWidgetHostViewBase::GetDefaultScreenInfo(WebScreenInfo* results) { 3033 void RenderWidgetHostViewBase::GetDefaultScreenInfo(WebScreenInfo* results) {
3033 GetScreenInfoForWindow(results, NULL); 3034 GetScreenInfoForWindow(results, NULL);
3034 } 3035 }
3035 3036
3036 } // namespace content 3037 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698