Skip to content
  •'s avatar
    Harden RenderBox::canBeScrolledAndHasScrollableArea logic... · 1bf1cb62 authored
    Harden RenderBox::canBeScrolledAndHasScrollableArea logic
    Reviewed by Simon Fraser.
    Patch by Antonio Gomes <>
    Previously if a say div has a overflown content on 'y' but is
    styled as "overflow-x: auto; overflow-y: hidden", RenderBox::canBeProgramaticallyScrolled
    would still return true. It interfers, among other things, with the way
    autoscroll works.
    Patch fixes it by adding two helper methods to RenderBox class in order to verify a box'
    scrollability in a given axis (x or y); They are used when checking if a given box is in
    fact programatically scrollable.
    Test: fast/events/autoscroll-overflow-hidden-longhands.html
    WebKit autoscroll behavior now matches Firefox and Opera12 (pre-blink)
    in that sense.
    * rendering/RenderBox.cpp:
    * rendering/RenderBox.h:
    Patch adds a test to ensure autoscrolling only happens on a given
    axis if it is scrollable in that direction, according to its style.
    * fast/events/autoscroll-overflow-hidden-longhands-expected.txt: Added.
    * fast/events/autoscroll-overflow-hidden-longhands.html: Added.
    git-svn-id: 268f45cc-cd09-0410-ab3c-d52691b4dbfc