Bug 1496194 - Ensure the inner sticky rect stays inside the outer sticky rect. r=botond

Depends on D15136

Differential Revision: https://phabricator.services.mozilla.com/D15137

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Kartikaya Gupta 2018-12-21 22:37:28 +00:00
Родитель b184eedbf0
Коммит 09dccca832
3 изменённых файлов: 21 добавлений и 0 удалений

Просмотреть файл

@ -0,0 +1,14 @@
<style>
/*
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
*/
* {
position: sticky;
padding-right: 1px;
left: 2px;
right: 163px;
display: ruby-base;
}
</style>

Просмотреть файл

@ -177,3 +177,4 @@ load 1505426-1.html
load 1508811.html
load 1508822.html
load 1509099.html
load 1496194.html

Просмотреть файл

@ -320,6 +320,12 @@ void StickyScrollContainer::GetScrollRanges(nsIFrame* aFrame,
// Note that this doesn't necessarily solve all problems stemming from
// comparing pre- and post-collapsing margins (TODO: find a proper solution).
*aInner = aInner->Intersect(*aOuter);
if (aInner->IsEmpty()) {
// This might happen if aInner didn't intersect aOuter at all initially,
// in which case aInner is empty and outside aOuter. Make sure it doesn't
// extend outside aOuter.
*aInner = aInner->MoveInsideAndClamp(*aOuter);
}
}
void StickyScrollContainer::PositionContinuations(nsIFrame* aFrame) {