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

Unified Diff: ui/views/cocoa/bridged_native_widget.mm

Issue 976403004: MacViews: Fix accessibility hit tests, provide AXTitle (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@20150303-MacViews-Disable-Touch-Tests
Patch Set: tweak comments Created 5 years, 9 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
« no previous file with comments | « ui/accessibility/platform/ax_platform_node_mac.mm ('k') | ui/views/widget/native_widget_mac_unittest.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/cocoa/bridged_native_widget.mm
diff --git a/ui/views/cocoa/bridged_native_widget.mm b/ui/views/cocoa/bridged_native_widget.mm
index 4c7a28cdd1f8a9d35456e7f9b08eec96109253b9..a9551f367b413d430dd05bd1484d576b65d4fb76 100644
--- a/ui/views/cocoa/bridged_native_widget.mm
+++ b/ui/views/cocoa/bridged_native_widget.mm
@@ -28,6 +28,18 @@
#include "ui/views/widget/widget.h"
#include "ui/views/widget/widget_aura_utils.h"
+// The NSView that hosts the composited CALayer drawing the UI. It fills the
+// window but is not hittable so that accessibility hit tests always go to the
+// BridgedContentView.
+@interface ViewsCompositorSuperview : NSView
+@end
+
+@implementation ViewsCompositorSuperview
+- (NSView*)hitTest:(NSPoint)aPoint {
+ return nil;
+}
+@end
+
namespace {
int kWindowPropertiesKey;
@@ -690,7 +702,7 @@ void BridgedNativeWidget::DestroyCompositor() {
void BridgedNativeWidget::AddCompositorSuperview() {
DCHECK(!compositor_superview_);
compositor_superview_.reset(
- [[NSView alloc] initWithFrame:[bridged_view_ bounds]]);
+ [[ViewsCompositorSuperview alloc] initWithFrame:[bridged_view_ bounds]]);
// Size and resize automatically with |bridged_view_|.
[compositor_superview_
« no previous file with comments | « ui/accessibility/platform/ax_platform_node_mac.mm ('k') | ui/views/widget/native_widget_mac_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698