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

Unified Diff: content/browser/renderer_host/render_widget_host_view_mac.mm

Issue 300863002: mac: History swiping doesn't work right with iframes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix unit tests. Created 6 years, 7 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: content/browser/renderer_host/render_widget_host_view_mac.mm
diff --git a/content/browser/renderer_host/render_widget_host_view_mac.mm b/content/browser/renderer_host/render_widget_host_view_mac.mm
index 8a6574ff933867c40ee22891a06b7b79f0388215..d80ac1ecb1e43a7d68353368e193bdb34fe855a8 100644
--- a/content/browser/renderer_host/render_widget_host_view_mac.mm
+++ b/content/browser/renderer_host/render_widget_host_view_mac.mm
@@ -158,7 +158,9 @@ static BOOL SupportsBackingPropertiesChangedNotification() {
+ (BOOL)shouldAutohideCursorForEvent:(NSEvent*)event;
- (id)initWithRenderWidgetHostViewMac:(RenderWidgetHostViewMac*)r;
-- (void)gotUnhandledWheelEvent;
+- (void)processedWheelEvent:(const blink::WebMouseWheelEvent&)event
+ consumed:(BOOL)consumed;
+
- (void)scrollOffsetPinnedToLeft:(BOOL)left toRight:(BOOL)right;
- (void)setHasHorizontalScrollbar:(BOOL)has_horizontal_scrollbar;
- (void)keyEvent:(NSEvent*)theEvent wasKeyEquivalent:(BOOL)equiv;
@@ -2032,12 +2034,13 @@ void RenderWidgetHostViewMac::UnlockMouse() {
render_widget_host_->LostMouseLock();
}
-void RenderWidgetHostViewMac::UnhandledWheelEvent(
- const blink::WebMouseWheelEvent& event) {
+void RenderWidgetHostViewMac::ProcessedWheelEvent(
+ const blink::WebMouseWheelEvent& event,
+ bool consumed) {
// Only record a wheel event as unhandled if JavaScript handlers got a chance
// to see it (no-op wheel events are ignored by the event dispatcher)
if (event.deltaX || event.deltaY)
- [cocoa_view_ gotUnhandledWheelEvent];
+ [cocoa_view_ processedWheelEvent:event consumed:consumed];
}
bool RenderWidgetHostViewMac::Send(IPC::Message* message) {
@@ -2568,12 +2571,9 @@ bool RenderWidgetHostViewMac::AcceleratedLayerHasNotAckedPendingFrame() const {
}
}
-- (void)gotUnhandledWheelEvent {
- if (responderDelegate_ &&
- [responderDelegate_
- respondsToSelector:@selector(gotUnhandledWheelEvent)]) {
- [responderDelegate_ gotUnhandledWheelEvent];
- }
+- (void)processedWheelEvent:(const blink::WebMouseWheelEvent&)event
+ consumed:(BOOL)consumed {
+ [responderDelegate_ rendererHandledWheelEvent:event consumed:consumed];
}
- (void)scrollOffsetPinnedToLeft:(BOOL)left toRight:(BOOL)right {

Powered by Google App Engine
This is Rietveld 408576698