mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1081272 - Include position and transform when computing header/footer size [r=tn]
This commit is contained in:
parent
33924679b5
commit
de3d881423
@ -3706,7 +3706,9 @@ GetScrollPortSizeExcludingHeadersAndFooters(nsIFrame* aViewportFrame,
|
||||
for (nsFrameList::Enumerator iterator(fixedFrames); !iterator.AtEnd();
|
||||
iterator.Next()) {
|
||||
nsIFrame* f = iterator.get();
|
||||
nsRect r = f->GetRect().Intersect(aScrollPort);
|
||||
nsRect r = f->GetRectRelativeToSelf();
|
||||
r = nsLayoutUtils::TransformFrameRectToAncestor(f, r, aViewportFrame);
|
||||
r = r.Intersect(aScrollPort);
|
||||
if ((r.width >= aScrollPort.width / 2 ||
|
||||
r.width >= NSIntPixelsToAppUnits(800, AppUnitsPerCSSPixel())) &&
|
||||
r.height <= aScrollPort.height/3) {
|
||||
|
@ -91,10 +91,19 @@ function runTest() {
|
||||
"Don't ignore elements that span more than half the viewport side");
|
||||
document.getElementById("top").style.width = "100%";
|
||||
|
||||
// Scroll back up so test results are visible
|
||||
document.documentElement.scrollTop = 0;
|
||||
SimpleTest.finish();
|
||||
window.close();
|
||||
document.getElementById("top").style.top = "-40px";
|
||||
document.getElementById("top").style.transform = "translateY(38px)";
|
||||
scrollDownOnePageWithContinuation(function() {
|
||||
is(document.documentElement.scrollTop,
|
||||
fullPageScrollDown - (10 + 13 - 40 + 38),
|
||||
"Account for offset and transform");
|
||||
document.getElementById("top").style.width = "100%";
|
||||
|
||||
// Scroll back up so test results are visible
|
||||
document.documentElement.scrollTop = 0;
|
||||
SimpleTest.finish();
|
||||
window.close();
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user