Bug 577081 - nsAttrValue::ParseColor doesn't need a document parameter anymore. r=jst

This commit is contained in:
Ms2ger@gmail.com 2010-07-17 10:09:14 +02:00
parent e8c4be9e8e
commit dcad0405ef
14 changed files with 14 additions and 15 deletions

View File

@ -1168,7 +1168,7 @@ nsAttrValue::SetColorValue(nscolor aColor, const nsAString& aString)
}
PRBool
nsAttrValue::ParseColor(const nsAString& aString, nsIDocument* aDocument)
nsAttrValue::ParseColor(const nsAString& aString)
{
ResetIfSet();

View File

@ -283,10 +283,9 @@ public:
* "rules for parsing a legacy color value".
*
* @param aString the string to parse
* @param aDocument the document (to find out whether we're in quirks mode)
* @return whether the value could be parsed
*/
PRBool ParseColor(const nsAString& aString, nsIDocument* aDocument);
PRBool ParseColor(const nsAString& aString);
/**
* Parse a string value into a float.

View File

@ -326,7 +326,7 @@ nsHTMLBodyElement::ParseAttribute(PRInt32 aNamespaceID,
aAttribute == nsGkAtoms::link ||
aAttribute == nsGkAtoms::alink ||
aAttribute == nsGkAtoms::vlink) {
return aResult.ParseColor(aValue, GetOwnerDoc());
return aResult.ParseColor(aValue);
}
if (aAttribute == nsGkAtoms::marginwidth ||
aAttribute == nsGkAtoms::marginheight ||

View File

@ -119,7 +119,7 @@ nsHTMLDivElement::ParseAttribute(PRInt32 aNamespaceID,
return aResult.ParseSpecialIntValue(aValue, PR_TRUE);
}
if (aAttribute == nsGkAtoms::bgcolor) {
return aResult.ParseColor(aValue, GetOwnerDoc());
return aResult.ParseColor(aValue);
}
if ((aAttribute == nsGkAtoms::hspace) ||
(aAttribute == nsGkAtoms::vspace)) {

View File

@ -173,7 +173,7 @@ nsHTMLFontElement::ParseAttribute(PRInt32 aNamespaceID,
return aResult.ParseIntValue(aValue);
}
if (aAttribute == nsGkAtoms::color) {
return aResult.ParseColor(aValue, GetOwnerDoc());
return aResult.ParseColor(aValue);
}
}

View File

@ -129,7 +129,7 @@ nsHTMLFrameElement::ParseAttribute(PRInt32 aNamespaceID,
{
if (aNamespaceID == kNameSpaceID_None) {
if (aAttribute == nsGkAtoms::bordercolor) {
return aResult.ParseColor(aValue, GetOwnerDoc());
return aResult.ParseColor(aValue);
}
if (aAttribute == nsGkAtoms::frameborder) {
return ParseFrameborderValue(aValue, aResult);

View File

@ -271,7 +271,7 @@ nsHTMLFrameSetElement::ParseAttribute(PRInt32 aNamespaceID,
{
if (aNamespaceID == kNameSpaceID_None) {
if (aAttribute == nsGkAtoms::bordercolor) {
return aResult.ParseColor(aValue, GetOwnerDoc());
return aResult.ParseColor(aValue);
}
if (aAttribute == nsGkAtoms::frameborder) {
return nsGenericHTMLElement::ParseFrameborderValue(aValue, aResult);

View File

@ -142,7 +142,7 @@ nsHTMLHRElement::ParseAttribute(PRInt32 aNamespaceID,
return aResult.ParseEnumValue(aValue, kAlignTable, PR_FALSE);
}
if (aAttribute == nsGkAtoms::color) {
return aResult.ParseColor(aValue, GetOwnerDoc());
return aResult.ParseColor(aValue);
}
}

View File

@ -313,7 +313,7 @@ nsHTMLTableCellElement::ParseAttribute(PRInt32 aNamespaceID,
return ParseTableCellHAlignValue(aValue, aResult);
}
if (aAttribute == nsGkAtoms::bgcolor) {
return aResult.ParseColor(aValue, GetOwnerDoc());
return aResult.ParseColor(aValue);
}
if (aAttribute == nsGkAtoms::scope) {
return aResult.ParseEnumValue(aValue, kCellScopeTable, PR_FALSE);

View File

@ -1010,7 +1010,7 @@ nsHTMLTableElement::ParseAttribute(PRInt32 aNamespaceID,
}
if (aAttribute == nsGkAtoms::bgcolor ||
aAttribute == nsGkAtoms::bordercolor) {
return aResult.ParseColor(aValue, GetOwnerDoc());
return aResult.ParseColor(aValue);
}
if (aAttribute == nsGkAtoms::frame) {
return aResult.ParseEnumValue(aValue, kFrameTable, PR_FALSE);

View File

@ -390,7 +390,7 @@ nsHTMLTableRowElement::ParseAttribute(PRInt32 aNamespaceID,
return ParseTableCellHAlignValue(aValue, aResult);
}
if (aAttribute == nsGkAtoms::bgcolor) {
return aResult.ParseColor(aValue, GetOwnerDoc());
return aResult.ParseColor(aValue);
}
if (aAttribute == nsGkAtoms::valign) {
return ParseTableVAlignValue(aValue, aResult);

View File

@ -256,7 +256,7 @@ nsHTMLTableSectionElement::ParseAttribute(PRInt32 aNamespaceID,
return ParseTableCellHAlignValue(aValue, aResult);
}
if (aAttribute == nsGkAtoms::bgcolor) {
return aResult.ParseColor(aValue, GetOwnerDoc());
return aResult.ParseColor(aValue);
}
if (aAttribute == nsGkAtoms::valign) {
return ParseTableVAlignValue(aValue, aResult);

View File

@ -112,7 +112,7 @@ nsMathMLElement::ParseAttribute(PRInt32 aNamespaceID,
aAttribute == nsGkAtoms::mathcolor_ ||
aAttribute == nsGkAtoms::background ||
aAttribute == nsGkAtoms::mathbackground_) {
return aResult.ParseColor(aValue, GetOwnerDoc());
return aResult.ParseColor(aValue);
}
}

View File

@ -1134,7 +1134,7 @@ nsXULElement::AfterSetAttr(PRInt32 aNamespaceID, nsIAtom* aName,
aName == nsGkAtoms::inactivetitlebarcolor)) {
nscolor color = NS_RGBA(0, 0, 0, 0);
nsAttrValue attrValue;
attrValue.ParseColor(*aValue, document);
attrValue.ParseColor(*aValue);
attrValue.GetColorValue(color);
SetTitlebarColor(color, aName == nsGkAtoms::activetitlebarcolor);
}