Scrolling allowed when overflow:hidden (seen on Acid2)
Autoscroll, as well as other user-driven scroll actions, has to respect the scrollability styled into the web page. More specifically, if a html or body tags are styled with overflow:hidden, autoscroll should not scroll the containing document. In order to fix this, patch hardens RenderBox::canAutoscroll as following: previously, ::canAutoscroll was relying only on ::canBeScrolledAndHasScrollableArea to determine the scrollability of #document node, which was unconditionally returned as 'true'. Patch extends ::canAutoscroll to handle the #document case for main and inner frames, and now it asks through ::isScrollable if the corresponding document's FrameView is actually user-scrollable. Note, that the patch changes ::canAutoscroll to cover the non-mainFrame case now. Autoscroll'ing the mainframe's document is hard with the current EventSender machinary. Because of that, patch adds an iframe's document test case. Test added in fast/events/autoscroll-in-overflow-hidden-html.html Corresponding WebKit commit: <http://trac.webkit.org/changeset/154722> BUG=chromium:1701 Review URL: https://chromiumcodereview.appspot.com/23450017 git-svn-id: svn://svn.chromium.org/blink/trunk@157371 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Showing
Please register or sign in to comment