mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 577081 - nsAttrValue::ParseColor doesn't need a document parameter anymore. r=jst
This commit is contained in:
parent
e8c4be9e8e
commit
dcad0405ef
@ -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();
|
||||
|
||||
|
@ -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.
|
||||
|
@ -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 ||
|
||||
|
@ -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)) {
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user