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

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: Created 5 years, 10 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
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 71e7290cb2d8a89cb1d6a1daf0c356c41a4e35e8..dfea779a80e6311d75e8896aa0e9f7e438233a09 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;
@@ -699,7 +711,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_

Powered by Google App Engine
This is Rietveld 408576698