reworked attribute storage to seperate attributes mapped in to style from
those that aren't This lets the style system optimize style contexts better. git-svn-id: svn://10.0.0.236/trunk@38541 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -564,7 +564,7 @@ nsHTMLInputElement::AttributeToString(nsIAtom* aAttribute,
|
||||
}
|
||||
|
||||
static void
|
||||
MapAttributesInto(nsIHTMLAttributes* aAttributes,
|
||||
MapAttributesInto(const nsIHTMLMappedAttributes* aAttributes,
|
||||
nsIStyleContext* aContext,
|
||||
nsIPresContext* aPresContext)
|
||||
{
|
||||
@@ -636,7 +636,7 @@ MapAttributesInto(nsIHTMLAttributes* aAttributes,
|
||||
NS_RGB(0, 0, 255),
|
||||
NS_RGB(0, 0, 255)
|
||||
};
|
||||
nsGenericHTMLElement::MapImageBorderAttributesInto(aAttributes, aContext, aPresContext, blue);
|
||||
nsGenericHTMLElement::MapImageBorderAttributeInto(aAttributes, aContext, aPresContext, blue);
|
||||
nsGenericHTMLElement::MapImageAttributesInto(aAttributes, aContext, aPresContext);
|
||||
break;
|
||||
}
|
||||
@@ -645,6 +645,28 @@ MapAttributesInto(nsIHTMLAttributes* aAttributes,
|
||||
nsGenericHTMLElement::MapCommonAttributesInto(aAttributes, aContext, aPresContext);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLInputElement::GetMappedAttributeImpact(const nsIAtom* aAttribute,
|
||||
PRInt32& aHint) const
|
||||
{
|
||||
if ((aAttribute == nsHTMLAtoms::align)) {
|
||||
aHint = NS_STYLE_HINT_REFLOW;
|
||||
}
|
||||
else if ((aAttribute == nsHTMLAtoms::type)) {
|
||||
aHint = NS_STYLE_HINT_FRAMECHANGE;
|
||||
}
|
||||
else if (! nsGenericHTMLElement::GetCommonMappedAttributesImpact(aAttribute, aHint)) {
|
||||
if (! nsGenericHTMLElement::GetImageMappedAttributesImpact(aAttribute, aHint)) {
|
||||
if (! nsGenericHTMLElement::GetImageBorderAttributeImpact(aAttribute, aHint)) {
|
||||
aHint = NS_STYLE_HINT_CONTENT;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLInputElement::GetAttributeMappingFunctions(nsMapAttributesFunc& aFontMapFunc,
|
||||
nsMapAttributesFunc& aMapFunc) const
|
||||
@@ -692,13 +714,3 @@ nsHTMLInputElement::GetType(PRInt32* aType)
|
||||
}
|
||||
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLInputElement::GetStyleHintForAttributeChange(
|
||||
const nsIAtom* aAttribute,
|
||||
PRInt32 *aHint) const
|
||||
{
|
||||
*aHint = NS_STYLE_HINT_CONTENT;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user