Backing out bug 458898 to try to fix Windows orange

This commit is contained in:
Robert O'Callahan 2008-12-04 00:42:49 +13:00
Родитель 5793073d03 ceb8c20e76
Коммит 5a78a8065f
4 изменённых файлов: 3 добавлений и 49 удалений

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

@ -417,7 +417,7 @@ public:
/**
* Get the visible area associated with this presentation context.
* This is the size of the visible area that is used for
* This is the size of the visiable area that is used for
* presenting the document. The returned value is in the standard
* nscoord units (as scaled by the device context).
*/

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

@ -94,7 +94,6 @@ _TEST_FILES = \
test_bug445810.html \
test_bug449781.html \
test_bug450930.xhtml \
test_bug458898.html \
$(NULL)
# test_bug396024.html is currently disabled because it interacts badly with
# the "You can't print-preview while the page is loading" dialog.

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

@ -1,38 +0,0 @@
<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=458898
-->
<head>
<title>Test for Bug 458898</title>
<script type="text/javascript" src="/MochiKit/MochiKit.js"></script>
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
<script type="application/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=458898">Mozilla Bug 458898</a>
<p id="display"></p>
<div id="content" style="display: none">
</div>
<pre id="test">
<script class="testbody" type="text/javascript">
SimpleTest.waitForExplicitFinish();
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var win = window.openDialog("data:text/html,<div style='height:200px; width:100px;'>");
function loaded() {
win.sizeToContent();
ok(win.innerWidth >= 100, "innerWidth");
ok(win.innerHeight >= 200, "innerHeight");
win.close();
SimpleTest.finish();
}
win.addEventListener("load", loaded, false);
</script>
</pre>
</body>
</html>

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

@ -709,16 +709,9 @@ CanvasFrame::Reflow(nsPresContext* aPresContext,
viewport->Invalidate(nsRect(nsPoint(0, 0), viewport->GetSize()));
}
// Return our desired size. Normally it's what we're told, but
// sometimes we can be given an unconstrained height (when a window
// is sizing-to-content), and we should compute our desired height.
// Return our desired size (which doesn't matter)
aDesiredSize.width = aReflowState.ComputedWidth();
if (aReflowState.ComputedHeight() == NS_UNCONSTRAINEDSIZE) {
aDesiredSize.height = kidFrame->GetRect().height +
kidReflowState.mComputedMargin.TopBottom();
} else {
aDesiredSize.height = aReflowState.ComputedHeight();
}
aDesiredSize.height = aReflowState.ComputedHeight();
aDesiredSize.mOverflowArea.UnionRect(
nsRect(0, 0, aDesiredSize.width, aDesiredSize.height),