Fix HTML nodes to not claim to be in the XHTML namespace (unless they are, of

course).  Bug 103225, r+sr=jst


git-svn-id: svn://10.0.0.236/trunk@167568 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
bzbarsky%mit.edu
2005-01-12 02:41:36 +00:00
parent 8c5e2f57df
commit be23b0ac1a
3 changed files with 10 additions and 14 deletions

View File

@@ -2846,9 +2846,6 @@ RuleProcessorData::RuleProcessorData(nsPresContext* aPresContext,
// we hold no ref to the content...
mContent = aContent;
// get the namespace
mNameSpaceID = aContent->GetNameSpaceID();
// get the tag and parent
mContentTag = aContent->Tag();
mParentContent = aContent->GetParent();
@@ -2866,8 +2863,17 @@ RuleProcessorData::RuleProcessorData(nsPresContext* aPresContext,
mHasAttributes = aContent->GetAttrCount() > 0;
// check for HTMLContent and Link status
if (aContent->IsContentOfType(nsIContent::eHTML))
if (aContent->IsContentOfType(nsIContent::eHTML)) {
mIsHTMLContent = PR_TRUE;
// Note that we want to treat non-XML HTML content as XHTML for namespace
// purposes, since html.css has that namespace declared.
mNameSpaceID = kNameSpaceID_XHTML;
} else {
// get the namespace
mNameSpaceID = aContent->GetNameSpaceID();
}
// if HTML content and it has some attributes, check for an HTML link
// NOTE: optimization: cannot be a link if no attributes (since it needs an href)