Cleaned up the way construction of the root frame happens for XML documents.

We no longer create a pseudo root element
This commit is contained in:
troy@netscape.com
1998-11-12 23:03:35 +00:00
parent 4089d7a6f1
commit 458511e568
31 changed files with 370 additions and 234 deletions

View File

@@ -60,7 +60,7 @@ nsHTMLContainerFrame::Paint(nsIPresContext& aPresContext,
{
// Probe for a JS onPaint event handler
nsIHTMLContent* hc;
if (NS_OK == mContent->QueryInterface(kIHTMLContentIID, (void**)&hc)) {
if (mContent && NS_OK == mContent->QueryInterface(kIHTMLContentIID, (void**)&hc)) {
nsHTMLValue val;
if (NS_CONTENT_ATTR_HAS_VALUE ==
hc->GetAttribute(nsHTMLAtoms::onpaint, val)) {
@@ -135,16 +135,18 @@ nsHTMLContainerFrame::GetCursorAndContentAt(nsIPresContext& aPresContext,
// Get child's cursor, if any
nsContainerFrame::GetCursorAndContentAt(aPresContext, aPoint, aFrame, aContent, aCursor);
if (aCursor != NS_STYLE_CURSOR_INHERIT) {
nsIAtom* tag;
mContent->GetTag(tag);
if (nsHTMLAtoms::a == tag) {
// Anchor tags override their child cursors in some cases.
if ((NS_STYLE_CURSOR_TEXT == aCursor) &&
(NS_STYLE_CURSOR_INHERIT != myCursor)) {
aCursor = myCursor;
if (nsnull != mContent) {
nsIAtom* tag;
mContent->GetTag(tag);
if (nsHTMLAtoms::a == tag) {
// Anchor tags override their child cursors in some cases.
if ((NS_STYLE_CURSOR_TEXT == aCursor) &&
(NS_STYLE_CURSOR_INHERIT != myCursor)) {
aCursor = myCursor;
}
}
NS_RELEASE(tag);
}
NS_RELEASE(tag);
return NS_OK;
}