Backed out changeset 63d4a49fbec1 (bug 396367)

This commit is contained in:
Timothy Nikkel 2010-01-01 20:34:05 -06:00
Родитель f572a78fed
Коммит 6af73b42c4
5 изменённых файлов: 17 добавлений и 134 удалений

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

@ -11057,6 +11057,8 @@ nsCSSFrameConstructor::RebuildAllStyleData(nsChangeHint aExtraHint)
if (!mPresShell || !mPresShell->GetRootFrame())
return;
nsAutoScriptBlocker scriptBlocker;
// Make sure that the viewmanager will outlive the presshell
nsIViewManager::UpdateViewBatch batch(mPresShell->GetViewManager());
@ -11064,12 +11066,6 @@ nsCSSFrameConstructor::RebuildAllStyleData(nsChangeHint aExtraHint)
// the parent frame and thus destroys the pres shell.
nsCOMPtr<nsIPresShell> kungFuDeathGrip(mPresShell);
// We may reconstruct frames below and hence process anything that is in the
// tree. We don't want to get notified to process those items again after.
mPresShell->GetDocument()->FlushPendingNotifications(Flush_ContentAndNotify);
nsAutoScriptBlocker scriptBlocker;
// Tell the style set to get the old rule tree out of the way
// so we can recalculate while maintaining rule tree immutability
nsresult rv = mPresShell->StyleSet()->BeginReconstruct();

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

@ -2650,10 +2650,6 @@ PresShell::ResizeReflow(nscoord aWidth, nscoord aHeight)
{
nsIViewManager::UpdateViewBatch batch(mViewManager);
// Have to make sure that the content notifications are flushed before we
// start messing with the frame model; otherwise we can get content doubling.
mDocument->FlushPendingNotifications(Flush_ContentAndNotify);
// Make sure style is up to date
{
nsAutoScriptBlocker scriptBlocker;
@ -5023,12 +5019,6 @@ PresShell::ContentRemoved(nsIDocument *aDocument,
nsresult
PresShell::ReconstructFrames(void)
{
nsCOMPtr<nsIPresShell> kungFuDeathGrip(this);
// Have to make sure that the content notifications are flushed before we
// start messing with the frame model; otherwise we can get content doubling.
mDocument->FlushPendingNotifications(Flush_ContentAndNotify);
nsAutoCauseReflowNotifier crNotifier(this);
mFrameConstructor->BeginUpdate();
nsresult rv = mFrameConstructor->ReconstructDocElementHierarchy();
@ -7554,29 +7544,23 @@ PresShell::Observe(nsISupports* aSubject,
NS_ASSERTION(mViewManager, "View manager must exist");
nsIViewManager::UpdateViewBatch batch(mViewManager);
nsWeakFrame weakRoot(rootFrame);
// Have to make sure that the content notifications are flushed before we
// start messing with the frame model; otherwise we can get content doubling.
mDocument->FlushPendingNotifications(Flush_ContentAndNotify);
WalkFramesThroughPlaceholders(mPresContext, rootFrame,
&ReResolveMenusAndTrees, nsnull);
if (weakRoot.IsAlive()) {
WalkFramesThroughPlaceholders(mPresContext, rootFrame,
&ReResolveMenusAndTrees, nsnull);
// Because "chrome:" URL equality is messy, reframe image box
// frames (hack!).
nsStyleChangeList changeList;
WalkFramesThroughPlaceholders(mPresContext, rootFrame,
ReframeImageBoxes, &changeList);
// Mark ourselves as not safe to flush while we're doing frame
// construction.
{
nsAutoScriptBlocker scriptBlocker;
++mChangeNestCount;
mFrameConstructor->ProcessRestyledFrames(changeList);
--mChangeNestCount;
}
// Because "chrome:" URL equality is messy, reframe image box
// frames (hack!).
nsStyleChangeList changeList;
WalkFramesThroughPlaceholders(mPresContext, rootFrame,
ReframeImageBoxes, &changeList);
// Mark ourselves as not safe to flush while we're doing frame
// construction.
{
nsAutoScriptBlocker scriptBlocker;
++mChangeNestCount;
mFrameConstructor->ProcessRestyledFrames(changeList);
--mChangeNestCount;
}
batch.EndUpdateViewBatch(NS_VMREFRESH_NO_SYNC);
#ifdef ACCESSIBILITY
InvalidateAccessibleSubtree(nsnull);

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

@ -46,8 +46,6 @@ include $(topsrcdir)/config/rules.mk
_CHROME_FILES = \
test_bug396024.xul \
bug396024_helper.xul \
test_bug396367-1.html \
test_bug396367-2.html \
test_bug482976.xul \
bug482976_helper.xul \
test_bug504311.xul \

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

@ -1,44 +0,0 @@
<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=396367
-->
<head>
<title>Test for Bug 396367</title>
<script type="application/javascript" src="chrome://mochikit/content/MochiKit/packed.js"></script>
<script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
<script>
SimpleTest.waitForExplicitFinish();
function finish() {
ok(true, "didn't crash");
SimpleTest.finish();
}
</script>
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=396367">Mozilla Bug 396367</a>
<p id="display"></p>
<div id="content" style="display: none">
</div>
<pre id="test">
<input>
<script>document.body.setAttribute('style', 'display: -moz-box; overflow: scroll;');</script>
<script>
//netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var navigator1 = top.QueryInterface(Components.interfaces.nsIInterfaceRequestor).getInterface(Components.interfaces.nsIWebNavigation);
var docShell = navigator1.QueryInterface(Components.interfaces.nsIDocShell);
var docviewer = docShell.contentViewer.QueryInterface(Components.interfaces.nsIMarkupDocumentViewer);
docviewer.textZoom=Math.floor(10*Math.random())/4+0.2;
document.documentElement.offsetHeight;
setTimeout(finish,10);
</script>
</pre>
</body>
</html>

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

@ -1,51 +0,0 @@
<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=396367
-->
<head>
<title>Test for Bug 396367</title>
<script type="application/javascript" src="chrome://mochikit/content/MochiKit/packed.js"></script>
<script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
<style>select::after { content:"m"; }</style>
<script>
SimpleTest.waitForExplicitFinish();
function finish() {
ok(true, "didn't crash");
SimpleTest.finish();
}
</script>
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=396367">Mozilla Bug 396367</a>
<p id="display"></p>
<div id="content" style="display: none">
</div>
<pre id="test">
<div style="overflow: scroll; float: left;">
<select></select>
<li style="display: table-cell;">
<script>
//netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var navigator1 = top.QueryInterface(Components.interfaces.nsIInterfaceRequestor).getInterface(Components.interfaces.nsIWebNavigation);
var docShell = navigator1.QueryInterface(Components.interfaces.nsIDocShell);
var docviewer = docShell.contentViewer.QueryInterface(Components.interfaces.nsIMarkupDocumentViewer);
docviewer.textZoom=Math.floor(10*Math.random())/4+0.2;
document.documentElement.offsetHeight;
setTimeout(finish,10);
</script>
</li>
</div>
</pre>
</body>
</html>