Backing out fix for bug 548792 to try to fix test failure in test_caretmove.html

This commit is contained in:
Robert O'Callahan 2010-03-29 16:42:53 +13:00
commit db479aa8d3
2 changed files with 1 additions and 25 deletions

View File

@ -4154,7 +4154,7 @@ PresShell::ScrollFrameRectIntoView(nsIFrame* aFrame,
rect.IntersectRect(rect, sf->GetScrollPortRect());
}
rect += container->GetPosition();
container = nsLayoutUtils::GetCrossDocParentFrame(container);
container = container->GetParent();
} while (container);
return didScroll;

View File

@ -30,17 +30,6 @@
</div>
<div style="height:400px;"></div>
</div>
<div id="c4" style="overflow-y:scroll; width:200px; height:200px; position:absolute; top:200px; left:600px;">
<iframe id="target4" style="border:none; width:100%; height:1100px; display:block;"
src="data:text/html,
<body style='margin:0; overflow:hidden;'>
<div style='height:400px;'></div>
<div><span id='target4'
style='display:inline-block; vertical-align:top; height:300px;'>target4</span>
</div>
<div style='height:400px;'></div>">
</iframe>
</div>
<pre id="test">
<script class="testbody" type="text/javascript">
@ -54,9 +43,6 @@ function testCollapsed(id, vPercent, startAt, expected) {
var c = document.getElementById("c" + id);
var target = document.getElementById("target" + id);
if (target.contentDocument) {
target = target.contentDocument.getElementById("target" + id);
}
selection.collapse(target.parentNode, 0);
c.scrollTop = startAt;
selection.scrollIntoView(FOCUS, true, vPercent, 0);
@ -92,16 +78,6 @@ function doTest() {
// visible.
testCollapsed("3", -1, 1000, 400);
// Test scrolling an element larger than the scrollport
testCollapsed("4", 0, 0, 400);
testCollapsed("4", 100, 0, 500);
testCollapsed("4", -1, 0, 400);
testCollapsed("4", 0, 1000, 400);
testCollapsed("4", 100, 1000, 500);
// If the element can't be completely visible, we make the top edge
// visible.
testCollapsed("4", -1, 1000, 400);
SimpleTest.finish();
}