forked from mirrors/gecko-dev
The containing block rect which the fixed position elements are relative to should exclude the scrollbar or scrollbar-gutter area. Current, we always use the origin at (0,0), which makes fixed position elements draw behind the gutter area on the left edge of the viewport. This patch adjusts the fixed pos containing block's origin when there is a scrollbar or scrollbar-gutter on the left edge of the viewport. In other words, the containing block's origin becomes the same as `nsCanvasFrame`'s origin. The "-001" test uses `scrollbar-gutter: stable`, and we already pass it without this patch. The "-002" variant tests `scrollbar-gutter: stable both-edges`, which requires this patch to pass. Differential Revision: https://phabricator.services.mozilla.com/D199687
23 lines
663 B
HTML
23 lines
663 B
HTML
<!DOCTYPE html>
|
|
<title>CSS Overflow Test: Root element's scrollbar-gutter is accounted for in fixed-pos positioning</title>
|
|
<link rel="author" title="Ting-Yu Lin" href="mailto:tlin@mozilla.com">
|
|
<link rel="author" title="Mozilla" href="https://www.mozilla.org/">
|
|
<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=728807">
|
|
<link rel="match" href="scrollbar-gutter-fixedpos-002-ref.html">
|
|
<style>
|
|
:root {
|
|
scrollbar-gutter: stable both-edges;
|
|
}
|
|
body {
|
|
margin: 0;
|
|
}
|
|
.fixed {
|
|
width: 100px;
|
|
height: 100px;
|
|
background: green;
|
|
position: fixed;
|
|
}
|
|
</style>
|
|
|
|
<div class="fixed" style="left: 0"></div>
|
|
<div class="fixed" style="right: 0"></div>
|