Bug 336104 - "ASSERTION: no frame, see bug #188946"; r=roc,dbaron

This commit is contained in:
Ehsan Akhgari 2010-05-21 16:36:42 -04:00
parent ca6db0e13a
commit f58add9d96
14 changed files with 71 additions and 25 deletions

View File

@ -41,7 +41,7 @@ skip load 399712-1.html # sporadically times out (bug 473680)
load 398088-1.xul
load 400763-1.html
load 401993-1.html
asserts(1) load 407818.html # bug 336104
load 407818.html
load 410860-1.xml
load 416734-1.html
load 418928-1.html
@ -60,7 +60,7 @@ load 493281-2.html
load 490760-1.xhtml
load 494810-1.html
load 529670.html
asserts(1) load 554230-1.xhtml # bug 336104
load 554230-1.xhtml
load 552651.html
load 558973.html
load 564079-1.html

View File

@ -1,9 +1,9 @@
load 285166-1.html
load 294235-1.html
load 378993-1.xhtml
asserts(1) load 388183-1.html # bug 336104
load 388183-1.html
load 395340-1.html
asserts(1) load 399694-1.html # bug 336104
load 399694-1.html
load 407053.html
load 448564.html
load 468562-1.html

View File

@ -3,8 +3,8 @@ load 369126-1.html
load 403574-1.xhtml
load 430124-1.html
load 430628-1.html
asserts(1-4) load 432114-1.html # bug 336104 and others
asserts(0-2) load 432114-2.html # bug 336104, bug 492165
asserts(1-4) load 432114-1.html # bug ?
asserts(0-1) load 432114-2.html # bug 492165
load 436900-1.html
asserts(0-2) load 436900-2.html # bug 566159
load 500328-1.html

View File

@ -1,5 +1,5 @@
load 351236-1.html
asserts(2) load 407062-1.html # bug 336104
asserts(1-2) skip-if(MOZ_WIDGET_TOOLKIT=="windows") load 428844-1.html # bug 471185; assertion bug 336104
asserts(1) load 461049-1.html # bug 336104
asserts(2) asserts-if(MOZ_WIDGET_TOOLKIT=="windows",0-2) load removing-editable-xslt.html # bug 336104, bug 500847
load 407062-1.html
skip-if(MOZ_WIDGET_TOOLKIT=="windows") load 428844-1.html # bug 471185
load 461049-1.html
asserts(1) asserts-if(MOZ_WIDGET_TOOLKIT=="windows",0-2) load removing-editable-xslt.html # bug 500847

View File

@ -92,4 +92,5 @@ include $(topsrcdir)/config/rules.mk
INCLUDES += \
-I$(topsrcdir)/content/base/src \
-I$(topsrcdir)/content/events/src \
-I$(topsrcdir)/layout/style \
$(NULL)

View File

@ -0,0 +1,37 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<script>
function init()
{
var targetWindow = window.frames[0];
var targetDocument = targetWindow.document;
var rootish = document.getElementById('rootish');
targetDocument.body.appendChild(targetDocument.adoptNode(rootish));
targetDocument.designMode = 'on';
targetWindow.getSelection().removeAllRanges();
var r = targetDocument.createRange();
r.setStart(targetDocument.getElementById("start"), 0);
r.setEnd (targetDocument.getElementById("endparent").firstChild, 0);
targetWindow.getSelection().addRange(r);
targetDocument.execCommand('outdent', false, null);
}
</script>
</head>
<body onload="setTimeout(init, 300);">
<iframe src="data:text/html," style="width: 95%; height: 500px;"></iframe>
<div id="rootish">
<div id="start"></div>
<p>Huh</p>
<svg xmlns="http://www.w3.org/2000/svg" id="endparent"> </svg>
</div>
</body>
</html>

View File

@ -1,5 +1,6 @@
asserts(2) load 382527-1.html # bug 336104
load 336104.html
load 382527-1.html
load 402172-1.html
asserts(1) load 407256-1.html # bug 336104
load 407256-1.html
load 430624-1.html
load 459613.html

View File

@ -110,6 +110,7 @@
#include "nsIParserService.h"
#include "nsITransferable.h"
#include "nsComputedDOMStyle.h"
#include "mozilla/FunctionTimer.h"
@ -3971,11 +3972,15 @@ nsEditor::IsPreformatted(nsIDOMNode *aNode, PRBool *aResult)
nsCOMPtr<nsIPresShell> ps = do_QueryReferent(mPresShellWeak);
if (!ps) return NS_ERROR_NOT_INITIALIZED;
nsIFrame *frame = content->GetPrimaryFrame();
NS_ASSERTION(frame, "no frame, see bug #188946");
if (!frame)
nsRefPtr<nsStyleContext> elementStyle;
if (content->IsElement()) {
elementStyle = nsComputedDOMStyle::GetStyleContextForElement(content->AsElement(),
nsnull,
ps);
}
if (!elementStyle)
{
// Consider nodes without a style context to be NOT preformatted:
// For instance, this is true of JS tags inside the body (which show
@ -3984,7 +3989,7 @@ nsEditor::IsPreformatted(nsIDOMNode *aNode, PRBool *aResult)
return NS_OK;
}
const nsStyleText* styleText = frame->GetStyleText();
const nsStyleText* styleText = elementStyle->GetStyleText();
*aResult = styleText->WhiteSpaceIsSignificant();
return NS_OK;

View File

@ -1,9 +1,9 @@
load 336081-1.xhtml # asserts (no bug?)
load 382778-1.html
load 407074-1.html
asserts(1) load 407277-1.html # bug 336104
load 407277-1.html
load 418923-1.html
asserts(1) load 420439.html # bug 336104
load 420439.html
load 428489-1.html
load 431086-1.xhtml
load 448329-1.html
@ -12,5 +12,5 @@ load 448329-3.html
load 456727-1.html
load 456727-2.html
asserts(1) load 467647-1.html # bug 382210
asserts(1) load 503709-1.xhtml # bug 336104
asserts(1) load 535632-1.xhtml # bug 336104
load 503709-1.xhtml
load 535632-1.xhtml

View File

@ -1 +1 @@
asserts(2) load 403965-1.xhtml # bug 336104
load 403965-1.xhtml

View File

@ -2847,6 +2847,7 @@ nsTextControlFrame::SetValue(const nsAString& aValue)
} else {
plaintextEditor->InsertText(insertValue);
}
NS_ENSURE_STATE(weakFrame.IsAlive());
if (!IsSingleLineTextControl()) {
mCachedValue = newValue;
@ -2858,6 +2859,7 @@ nsTextControlFrame::SetValue(const nsAString& aValue)
selPriv->EndBatchChanges();
}
// This second check _shouldn't_ be necessary, but let's be safe.
NS_ENSURE_STATE(weakFrame.IsAlive());
if (outerTransaction)
mNotifyOnInput = PR_TRUE;

View File

@ -1345,7 +1345,7 @@ asserts(1) == 496032-1.html 496032-1-ref.html # bug 399262
== 503364-1a.html 503364-1-ref.html
== 503364-1b.html 503364-1-ref.html
== 503399.html 503399-ref.html
asserts(2) == 503531-1.html 503531-1-ref.html # bug 336104
== 503531-1.html 503531-1-ref.html
== 504032-1.html 504032-1-ref.html
== 505743-1.html about:blank
== 506481-1.html 506481-1-ref.html

View File

@ -29,7 +29,7 @@ load 444237-1.html
load 444848-1.html
load 447776-1.html
load 447783-1.html
asserts(1) load 448161-1.html
load 448161-1.html
load 448161-2.html
load 452150-1.xhtml
load 456196.html

View File

@ -49,7 +49,7 @@ load 400779-1.xhtml
load 402912-1.xhtml
load 408904-1.xul
load 412479-1.xhtml
asserts(3) load 415394-1.xhtml
asserts(2) load 415394-1.xhtml
load 420424-1.xul
load 430356-1.xhtml
load 431738.xhtml