-
tonikitoo@webkit.org authored
https://bugs.webkit.org/show_bug.cgi?id=22769 Reviewed by Darin Adler. Patch by Antonio Gomes <a1.gomes@sisa.samsung.com> Source/WebCore: 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 solemnly in ::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 change ::canAutoscroll to cover the non-mainFrame now. Test: fast/events/autoscroll-in-overflow-hidden-html.html * rendering/RenderBox.cpp: (WebCore::RenderBox::canAutoscroll): LayoutTests: Autoscroll'ing the mainframe's document is hard with the current EventSender machinary. Because of that, patch adds an iframe's document test case. * fast/events/autoscroll-in-overflow-hidden-html.html: Added. * fast/events/resources/big-page-with-overflow-hidden-and-anchor-scroll.html: Added. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154722 268f45cc-cd09-0410-ab3c-d52691b4dbfc
9cbc8db4