They're a mess right now:
LayoutObject::HasOverflowClip
LayoutBox::ScrollsOverflow
LayoutBox::ScrollsOverflow{X,Y}
LayoutBox::HasScrollableOverflow{X,Y}
LayoutBox::CanBeScrolledAndHasScrollableArea
LayoutBox::CanBeProgramaticallyScrolled
LayoutBox::IsIntrinsicallyScrollable
LayoutBox::CanAutoscroll
LayoutBox::HasUnsplittableScrollingOverflow
PaintLayer::ScrollsOverflow
PLSA::IsScrollable
PLSA::UserInputScrollable
PLSA::ScrollsOverflow
There's no coherence and some of them don't do what they sound like - for example, PLSA::ScrollsOverflow returns false for overflow: hidden, but overflow: hidden elements can be scrolled programmatically.
We should clean up the API and reduce the number of methods.
It might be nice to have a GetScrollability() method that returns a bitfield like:
typedef uint32_t Scrollability;
const uint32_t kScrollableByUserInputX = 1 << 0;
const uint32_t kScrollableByUserInputY = 1 << 1;
const uint32_t kScrollableByScriptX = 1 << 2;
const uint32_t kScrollableByScriptY = 1 << 3;
const uint32_t kScrollableByAutoscrollX = 1 << 4;
const uint32_t kScrollableByAutoscrollY = 1 << 5;
Then the caller can test the result against the mask of their choice.
Comment 1 by bokan@chromium.org
, Jan 11 2018Components: Blink>Internals