mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-10 09:19:28 +00:00
Fix for table color quirk bug. r=dbaron, sr=attinasi
This commit is contained in:
parent
f268a4e88d
commit
83c6db5ccf
@ -669,6 +669,8 @@ HTMLStyleSheetImpl::HTMLStyleSheetImpl(void)
|
||||
{
|
||||
NS_INIT_REFCNT();
|
||||
mTableTHRule = new TableTHRule(this);
|
||||
mDocumentColorRule = new HTMLDocumentColorRule(this);
|
||||
NS_ADDREF(mDocumentColorRule);
|
||||
NS_ADDREF(mTableTHRule);
|
||||
}
|
||||
|
||||
@ -1117,13 +1119,6 @@ NS_IMETHODIMP HTMLStyleSheetImpl::SetVisitedLinkColor(nscolor aColor)
|
||||
|
||||
NS_IMETHODIMP HTMLStyleSheetImpl::SetDocumentForegroundColor(nscolor aColor)
|
||||
{
|
||||
if (nsnull == mDocumentColorRule) {
|
||||
mDocumentColorRule = new HTMLDocumentColorRule(this);
|
||||
if (nsnull == mDocumentColorRule) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
NS_ADDREF(mDocumentColorRule);
|
||||
}
|
||||
mDocumentColorRule->mColor = aColor;
|
||||
mDocumentColorRule->mForegroundSet = PR_TRUE;
|
||||
return NS_OK;
|
||||
@ -1131,13 +1126,6 @@ NS_IMETHODIMP HTMLStyleSheetImpl::SetDocumentForegroundColor(nscolor aColor)
|
||||
|
||||
NS_IMETHODIMP HTMLStyleSheetImpl::SetDocumentBackgroundColor(nscolor aColor)
|
||||
{
|
||||
if (nsnull == mDocumentColorRule) {
|
||||
mDocumentColorRule = new HTMLDocumentColorRule(this);
|
||||
if (nsnull == mDocumentColorRule) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
NS_ADDREF(mDocumentColorRule);
|
||||
}
|
||||
mDocumentColorRule->mBackgroundColor = aColor;
|
||||
mDocumentColorRule->mBackgroundSet = PR_TRUE;
|
||||
return NS_OK;
|
||||
|
@ -892,7 +892,7 @@ nsRuleNode::WalkRuleTree(const nsStyleStructID& aSID, nsIStyleContext* aContext,
|
||||
detail = eRulePartialMixed; // Treat as though some data is specified to avoid
|
||||
// the optimizations and force data computation.
|
||||
|
||||
if (detail == eRuleNone && startStruct) {
|
||||
if (detail == eRuleNone && startStruct && !aRuleData->mPostResolveCallback) {
|
||||
// We specified absolutely no rule information, but a parent rule in the tree
|
||||
// specified all the rule information. We set a bit along the branch from our
|
||||
// node in the tree to the node that specified the data that tells nodes on that
|
||||
|
@ -669,6 +669,8 @@ HTMLStyleSheetImpl::HTMLStyleSheetImpl(void)
|
||||
{
|
||||
NS_INIT_REFCNT();
|
||||
mTableTHRule = new TableTHRule(this);
|
||||
mDocumentColorRule = new HTMLDocumentColorRule(this);
|
||||
NS_ADDREF(mDocumentColorRule);
|
||||
NS_ADDREF(mTableTHRule);
|
||||
}
|
||||
|
||||
@ -1117,13 +1119,6 @@ NS_IMETHODIMP HTMLStyleSheetImpl::SetVisitedLinkColor(nscolor aColor)
|
||||
|
||||
NS_IMETHODIMP HTMLStyleSheetImpl::SetDocumentForegroundColor(nscolor aColor)
|
||||
{
|
||||
if (nsnull == mDocumentColorRule) {
|
||||
mDocumentColorRule = new HTMLDocumentColorRule(this);
|
||||
if (nsnull == mDocumentColorRule) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
NS_ADDREF(mDocumentColorRule);
|
||||
}
|
||||
mDocumentColorRule->mColor = aColor;
|
||||
mDocumentColorRule->mForegroundSet = PR_TRUE;
|
||||
return NS_OK;
|
||||
@ -1131,13 +1126,6 @@ NS_IMETHODIMP HTMLStyleSheetImpl::SetDocumentForegroundColor(nscolor aColor)
|
||||
|
||||
NS_IMETHODIMP HTMLStyleSheetImpl::SetDocumentBackgroundColor(nscolor aColor)
|
||||
{
|
||||
if (nsnull == mDocumentColorRule) {
|
||||
mDocumentColorRule = new HTMLDocumentColorRule(this);
|
||||
if (nsnull == mDocumentColorRule) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
NS_ADDREF(mDocumentColorRule);
|
||||
}
|
||||
mDocumentColorRule->mBackgroundColor = aColor;
|
||||
mDocumentColorRule->mBackgroundSet = PR_TRUE;
|
||||
return NS_OK;
|
||||
|
Loading…
x
Reference in New Issue
Block a user