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

Issue 227043012: mac: History swiping doesn't work right with iframes. (Closed)

Created:
6 years, 8 months ago by erikchen
Modified:
6 years, 8 months ago
Reviewers:
Avi (use Gerrit), Nico
CC:
chromium-reviews, yusukes+watch_chromium.org, yukishiino+watch_chromium.org, jam, penghuang+watch_chromium.org, nona+watch_chromium.org, darin-cc_chromium.org, James Su, miu+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

mac: History swiping doesn't work right with iframes. This CL is a reland of crrev.com/194713016. The reason that the previous attempt to land this CL failed was because Blink was claiming to handle events that it was actually ignoring. This has been fixed in crrev.com/219473003, which also added unit-tests to ensure that the new behavior is correct. In addition, this reland removes all logic related to the isPinnedLeft and isPinnedRight properties of the history swiper. They are no longer required because they are a subset of the state that determines whether blink will handle an event, which is now being correctly propagated to the history swiper. This fixes a long outstanding bug (I don't think it's ever worked) where the pinned state is not correctly propagated to the history swiper, which prevents history navigation. (Blink only sends callbacks for when a user scrolls or the window is resized. If the user performs a history navigation, the pinned state might change, but Blink will not send a callback to update the state of the history swiper). ----------------Description from first attempt to land this CL---------------- In the previous behavior, it was possible for a user to start scrolling an iframe with the touch pad, and then trigger history navigation. This happened because the Cocoa view only received callbacks for whether an event in a gesture wasn't handled. If any event in a gesture happened to not be handled by blink, then that event could trigger history swiping, even though blink may have handled earlier events in the same gesture! My solution is to propagate the information for whether an event was handled to the Cocoa view. History swiping is only enabled if no event is ever handled by blink. BUG=321437 TEST=Navigate to www.google.com. Then navigate to http://codepen.io/anon/pen/ujsec. Place the cursor in the box that says "place cursor here", and start a downwards 2-finger swipe. Half way through the swipe, change directions and swipe to the left (or right, depending on your settings) to navigate backwards in history. Prior to this change, the history swipe arrow would appear. In this change, the history swipe arrow no longer appears. Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=262572

Patch Set 1 : Clone of patch set 9 from crrev.com/194713016 #

Patch Set 2 : Logic for history swiping should not depend on the "pinned" property. #

Total comments: 2

Patch Set 3 : Respond to comment from avi. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+89 lines, -141 lines) Patch
M chrome/browser/renderer_host/chrome_render_widget_host_view_mac_delegate.h View 1 1 chunk +0 lines, -3 lines 0 comments Download
M chrome/browser/renderer_host/chrome_render_widget_host_view_mac_delegate.mm View 1 1 chunk +2 lines, -13 lines 0 comments Download
M chrome/browser/renderer_host/chrome_render_widget_host_view_mac_history_swiper.h View 1 3 chunks +13 lines, -17 lines 0 comments Download
M chrome/browser/renderer_host/chrome_render_widget_host_view_mac_history_swiper.mm View 1 5 chunks +10 lines, -31 lines 0 comments Download
M chrome/browser/renderer_host/chrome_render_widget_host_view_mac_history_swiper_unit_test.mm View 1 4 chunks +23 lines, -9 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_impl.cc View 1 chunk +7 lines, -4 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_unittest.cc View 1 chunk +6 lines, -3 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_android.h View 1 chunk +0 lines, -2 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_android.cc View 1 chunk +0 lines, -5 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_base.h View 1 chunk +2 lines, -2 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_base.cc View 1 chunk +3 lines, -2 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_mac.h View 1 chunk +2 lines, -2 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_mac.mm View 1 4 chunks +7 lines, -33 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_mac_unittest.mm View 1 chunk +3 lines, -4 lines 0 comments Download
M content/port/browser/render_widget_host_view_port.h View 1 chunk +6 lines, -2 lines 0 comments Download
M content/public/browser/render_widget_host_view_mac_delegate.h View 1 2 2 chunks +5 lines, -9 lines 0 comments Download

Messages

Total messages: 10 (0 generated)
erikchen
Please Review
6 years, 8 months ago (2014-04-07 22:02:48 UTC) #1
Nico
lgtm Thanks for uploading the changes in a separate patch set :-)
6 years, 8 months ago (2014-04-08 02:47:07 UTC) #2
erikchen
avi: looking for OWNER review of content/port/browser and content/public/browser.
6 years, 8 months ago (2014-04-08 17:02:50 UTC) #3
Avi (use Gerrit)
LGTM with formatting nit fixed. https://codereview.chromium.org/227043012/diff/20001/content/public/browser/render_widget_host_view_mac_delegate.h File content/public/browser/render_widget_host_view_mac_delegate.h (right): https://codereview.chromium.org/227043012/diff/20001/content/public/browser/render_widget_host_view_mac_delegate.h#newcode54 content/public/browser/render_widget_host_view_mac_delegate.h:54: // Notification that a ...
6 years, 8 months ago (2014-04-08 19:35:05 UTC) #4
erikchen
https://codereview.chromium.org/227043012/diff/20001/content/public/browser/render_widget_host_view_mac_delegate.h File content/public/browser/render_widget_host_view_mac_delegate.h (right): https://codereview.chromium.org/227043012/diff/20001/content/public/browser/render_widget_host_view_mac_delegate.h#newcode54 content/public/browser/render_widget_host_view_mac_delegate.h:54: // Notification that a wheel event was received. On ...
6 years, 8 months ago (2014-04-08 19:59:05 UTC) #5
erikchen
The CQ bit was checked by erikchen@chromium.org
6 years, 8 months ago (2014-04-08 19:59:10 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/erikchen@chromium.org/227043012/40001
6 years, 8 months ago (2014-04-08 19:59:26 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/erikchen@chromium.org/227043012/40001
6 years, 8 months ago (2014-04-09 00:28:32 UTC) #8
commit-bot: I haz the power
Change committed as 262572
6 years, 8 months ago (2014-04-09 00:43:59 UTC) #9
erikchen
6 years, 8 months ago (2014-04-22 23:11:58 UTC) #10
Message was sent while issue was closed.
A revert of this CL has been created in
https://codereview.chromium.org/248383002/ by erikchen@chromium.org.

The reason for reverting is: This CL causes regressions in vertical content
scrolling.

https://code.google.com/p/chromium/issues/detail?id=365034.

Powered by Google App Engine
This is Rietveld 408576698