Closed Bug 1700274 Opened 4 years ago Closed 4 years ago

overflow-padding.html doesn't work with overlay scrollbars (can fail on Android after bug 1700858)

Categories

(Core :: Layout: Scrolling and Overflow, defect)

defect

Tracking

()

RESOLVED DUPLICATE of bug 1702383

People

(Reporter: TYLin, Unassigned)

References

(Depends on 1 open bug)

Details

After my patch in bug 1527949, we still fail overflow-padding.html on Android.

TEST-UNEXPECTED-FAIL | /css/css-overflow/overflow-padding.html | Container padding is applied approriately to block/inline children. - assert_true: vertical scrollbar 1 expected true got false

Is this because of overlay scrollbars? If so, how does the test work on macOS?

[cc hiro]

Is this because of overlay scrollbars? If so, how does the test work on macOS?

I guess so. Maybe we setup our macOS on CI to have scrollbar always show? I run this test locally with my patches in bug 1527949. The test did fail when I switch to use overlay scrollbar, but pass when I set the scrollbar to always show.

The test uses the following helpers to detect the presence of the scrollbar assuming the scrollbar does take up some space. That doesn't seem to work with overlay scrollbar.

  function hasHorizontalScrollbar(el) {
    return (el.offsetHeight - el.clientHeight) > 0;
  }
  function hasVerticalScrollbar(el) {
    return (el.offsetWidth - el.clientWidth) > 0;
  }

Perhaps it is more reasonable to use scrollWidth/scrollHeight?

   function hasHorizontalScrollbar(el) {
    return (el.scrollWidth - el.offsetWidth) > 0;
   }
   function hasVerticalScrollbar(el) {
    return (el.scrollHeight - el.offsetHeight) > 0;
   }

Yeah, those helpers look a bit bogus in presence of overlay scrollbars....

(In reply to Ting-Yu Lin [:TYLin] (UTC-7) from comment #2)

[cc hiro]

Is this because of overlay scrollbars? If so, how does the test work on macOS?

I guess so. Maybe we setup our macOS on CI to have scrollbar always show?

Yes, I think so. A lot of tests still don't work with overlay.

Last time I checked (but it's a bit long time ago), Chromium didn't run any wpt tests on Android, so maybe the test also fails on mobile Chromium?

Depends on: 1700858
Summary: overflow-padding.html still fail on Android after bug 1527949 → overflow-padding.html doesn't work with overlay scrollbars (can fail on Android after bug 1700858)

I changed the test in https://github.com/web-platform-tests/wpt/pull/28328, and it has been imported into gecko in bug 1702383.

Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.