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

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: readding header 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 2193 matching lines...) Expand 10 before | Expand all | Expand 10 after
2204 !(event->flags() & ui::EF_FROM_TOUCH)) { 2204 !(event->flags() & ui::EF_FROM_TOUCH)) {
2205 event->ConvertLocationToTarget(window_, window_->parent()); 2205 event->ConvertLocationToTarget(window_, window_->parent());
2206 window_->parent()->delegate()->OnMouseEvent(event); 2206 window_->parent()->delegate()->OnMouseEvent(event);
2207 } 2207 }
2208 2208
2209 if (!IsXButtonUpEvent(event)) 2209 if (!IsXButtonUpEvent(event))
2210 event->SetHandled(); 2210 event->SetHandled();
2211 } 2211 }
2212 2212
2213 uint32_t RenderWidgetHostViewAura::SurfaceIdNamespaceAtPoint( 2213 uint32_t RenderWidgetHostViewAura::SurfaceIdNamespaceAtPoint(
2214 cc::SurfaceHittestDelegate* delegate,
2214 const gfx::Point& point, 2215 const gfx::Point& point,
2215 gfx::Point* transformed_point) { 2216 gfx::Point* transformed_point) {
2216 DCHECK(device_scale_factor_ != 0.0f); 2217 DCHECK(device_scale_factor_ != 0.0f);
2217 2218
2218 // The surface hittest happens in device pixels, so we need to convert the 2219 // The surface hittest happens in device pixels, so we need to convert the
2219 // |point| from DIPs to pixels before hittesting. 2220 // |point| from DIPs to pixels before hittesting.
2220 gfx::Point point_in_pixels = 2221 gfx::Point point_in_pixels =
2221 gfx::ConvertPointToPixel(device_scale_factor_, point); 2222 gfx::ConvertPointToPixel(device_scale_factor_, point);
2222 cc::SurfaceId id = delegated_frame_host_->SurfaceIdAtPoint(point_in_pixels, 2223 cc::SurfaceId id = delegated_frame_host_->SurfaceIdAtPoint(
2223 transformed_point); 2224 delegate, point_in_pixels, transformed_point);
2224 *transformed_point = 2225 *transformed_point =
2225 gfx::ConvertPointToDIP(device_scale_factor_, *transformed_point); 2226 gfx::ConvertPointToDIP(device_scale_factor_, *transformed_point);
2226 2227
2227 // It is possible that the renderer has not yet produced a surface, in which 2228 // It is possible that the renderer has not yet produced a surface, in which
2228 // case we return our current namespace. 2229 // case we return our current namespace.
2229 if (id.is_null()) 2230 if (id.is_null())
2230 return GetSurfaceIdNamespace(); 2231 return GetSurfaceIdNamespace();
2231 return cc::SurfaceIdAllocator::NamespaceForId(id); 2232 return cc::SurfaceIdAllocator::NamespaceForId(id);
2232 } 2233 }
2233 2234
(...skipping 844 matching lines...) Expand 10 before | Expand all | Expand 10 after
3078 3079
3079 //////////////////////////////////////////////////////////////////////////////// 3080 ////////////////////////////////////////////////////////////////////////////////
3080 // RenderWidgetHostViewBase, public: 3081 // RenderWidgetHostViewBase, public:
3081 3082
3082 // static 3083 // static
3083 void RenderWidgetHostViewBase::GetDefaultScreenInfo(WebScreenInfo* results) { 3084 void RenderWidgetHostViewBase::GetDefaultScreenInfo(WebScreenInfo* results) {
3084 GetScreenInfoForWindow(results, NULL); 3085 GetScreenInfoForWindow(results, NULL);
3085 } 3086 }
3086 3087
3087 } // namespace content 3088 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698