Back out changeset 13335ded96b9 (
bug 1081272) for test_page_scroll_with_fixed_pos.html bustage
CLOSED TREE
--- a/layout/generic/nsGfxScrollFrame.cpp
+++ b/layout/generic/nsGfxScrollFrame.cpp
@@ -3701,19 +3701,17 @@ static nsSize
GetScrollPortSizeExcludingHeadersAndFooters(nsIFrame* aViewportFrame,
const nsRect& aScrollPort)
{
nsTArray<TopAndBottom> list;
nsFrameList fixedFrames = aViewportFrame->GetChildList(nsIFrame::kFixedList);
for (nsFrameList::Enumerator iterator(fixedFrames); !iterator.AtEnd();
iterator.Next()) {
nsIFrame* f = iterator.get();
- nsRect r = f->GetRectRelativeToSelf();
- r = nsLayoutUtils::TransformFrameRectToAncestor(f, r, aViewportFrame);
- r = r.Intersect(aScrollPort);
+ nsRect r = f->GetRect().Intersect(aScrollPort);
if ((r.width >= aScrollPort.width / 2 ||
r.width >= NSIntPixelsToAppUnits(800, AppUnitsPerCSSPixel())) &&
r.height <= aScrollPort.height/3) {
list.AppendElement(TopAndBottom(r.y, r.YMost()));
}
}
list.Sort(TopComparator());
--- a/layout/generic/test/page_scroll_with_fixed_pos_window.html
+++ b/layout/generic/test/page_scroll_with_fixed_pos_window.html
@@ -86,29 +86,20 @@ function runTest() {
showFixedPosElements2(false);
document.getElementById("top").style.width = "400px";
scrollDownOnePageWithContinuation(function() {
is(document.documentElement.scrollTop, fullPageScrollDown - (10 + 13),
"Don't ignore elements that span more than half the viewport side");
document.getElementById("top").style.width = "100%";
- 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();
- });
+ // Scroll back up so test results are visible
+ document.documentElement.scrollTop = 0;
+ SimpleTest.finish();
+ window.close();
});
});
});
});
});
});
}
</script>