New issue
Advanced search Search tips

Issue 784663 link

Starred by 3 users

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Task



Sign in to add a comment

clean up scrollability APIs

Project Member Reported by skobes@chromium.org, Nov 14 2017

Issue description

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 2018

Cc: bokan@chromium.org
Components: Blink>Internals
Project Member

Comment 2 by sheriffbot@chromium.org, Jan 14

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue.

Sorry for the inconvenience if the bug really should have been left as Available.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot

Comment 3 by nzolghadr@google.com, Jan 17 (5 days ago)

Labels: Hotlist-CodeHealth
Status: Available (was: Untriaged)

Sign in to add a comment