Added XML display support. Split nsGenericHTMLElement into generic and HTML-specific components. Minor style modification. New XML classes and interfaces.

git-svn-id: svn://10.0.0.236/trunk@14467 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
vidur%netscape.com
1998-11-11 22:06:16 +00:00
parent 38bf6d6724
commit 118281d675
97 changed files with 9190 additions and 3738 deletions

View File

@@ -27,6 +27,12 @@
#include "nsIContent.h"
#include "nsIStyleFrameConstruction.h"
// XXX Temporary fix to make sure that ua.css only gets applied
// to HTML content. When this removed, remember to get rid of
// the include dependency in the makefile.
#include "nsIHTMLContent.h"
static NS_DEFINE_IID(kIHTMLContentIID, NS_IHTMLCONTENT_IID);
static NS_DEFINE_IID(kIStyleSetIID, NS_ISTYLE_SET_IID);
static NS_DEFINE_IID(kIStyleFrameConstructionIID, NS_ISTYLE_FRAME_CONSTRUCTION_IID);
@@ -477,7 +483,13 @@ nsIStyleContext* StyleSetImpl::ResolveStyleFor(nsIPresContext* aPresContext,
}
if (nsnull != rules) {
PRInt32 ruleCount = RulesMatching(mBackstopSheets, aPresContext, aContent, aParentContext, rules);
nsIHTMLContent *htmlContent;
nsresult rv = aContent->QueryInterface(kIHTMLContentIID, (void **)&htmlContent);
PRInt32 ruleCount = 0;
if (NS_SUCCEEDED(rv)) {
ruleCount += RulesMatching(mBackstopSheets, aPresContext, aContent, aParentContext, rules);
NS_RELEASE(htmlContent);
}
PRInt32 backstopRules = ruleCount;
ruleCount += RulesMatching(mDocSheets, aPresContext, aContent, aParentContext, rules);
ruleCount += RulesMatching(mOverrideSheets, aPresContext, aContent, aParentContext, rules);