Replace nsIStyleSheet::AttributeAffectsStyle with nsIStyleRuleProcessor::HasAttributeDependentStyle. Strengthen the attribute optimization and apply it to HTML as well. b=163556 r+sr=bzbarsky

git-svn-id: svn://10.0.0.236/trunk@138196 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
dbaron%dbaron.org
2003-02-22 16:10:53 +00:00
parent 18e9b2801c
commit 22283f6fd1
26 changed files with 657 additions and 803 deletions

View File

@@ -384,36 +384,9 @@ nsHTMLMappedAttributes::~nsHTMLMappedAttributes(void)
Reset();
}
NS_IMPL_ADDREF(nsHTMLMappedAttributes);
NS_IMPL_RELEASE(nsHTMLMappedAttributes);
nsresult
nsHTMLMappedAttributes::QueryInterface(const nsIID& aIID,
void** aInstancePtrResult)
{
NS_PRECONDITION(nsnull != aInstancePtrResult, "null pointer");
if (nsnull == aInstancePtrResult) {
return NS_ERROR_NULL_POINTER;
}
static NS_DEFINE_IID(kISupportsIID, NS_ISUPPORTS_IID);
if (aIID.Equals(NS_GET_IID(nsIHTMLMappedAttributes))) {
*aInstancePtrResult = (void*) ((nsIHTMLMappedAttributes*)this);
NS_ADDREF_THIS();
return NS_OK;
}
if (aIID.Equals(NS_GET_IID(nsIStyleRule))) {
*aInstancePtrResult = (void*) ((nsIStyleRule*)this);
NS_ADDREF_THIS();
return NS_OK;
}
if (aIID.Equals(kISupportsIID)) {
*aInstancePtrResult = (void*) ((nsIHTMLMappedAttributes*)this);
NS_ADDREF_THIS();
return NS_OK;
}
return NS_NOINTERFACE;
}
NS_IMPL_ISUPPORTS2(nsHTMLMappedAttributes,
nsIHTMLMappedAttributes,
nsIStyleRule)
NS_IMETHODIMP
nsHTMLMappedAttributes::Init(nsIHTMLStyleSheet* aSheet,