mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-10 09:19:28 +00:00
Improve comments and function names related to attribute mapping and HasAttributeDependentStyle. b=235342 r+sr=jst
This commit is contained in:
parent
5b8c3629f9
commit
f016bec80e
@ -188,11 +188,22 @@ public:
|
||||
NS_IMETHOD RulesMatching(PseudoRuleProcessorData* aData,
|
||||
nsIAtom* aMedium) = 0;
|
||||
|
||||
// Test if style is dependent on content state
|
||||
/**
|
||||
* Test whether style is dependent on content state. This test is
|
||||
* used for optimization only, and may err on the side of reporting
|
||||
* more dependencies than really exist.
|
||||
*
|
||||
* Event states are defined in nsIEventStateManager.h.
|
||||
*/
|
||||
NS_IMETHOD HasStateDependentStyle(StateRuleProcessorData* aData,
|
||||
nsIAtom* aMedium,
|
||||
nsReStyleHint* aResult) = 0;
|
||||
// Test if style is dependent on attribute
|
||||
|
||||
/**
|
||||
* Test whether style is dependent the presence or value of an
|
||||
* attribute. This test is used for optimization only, and may err on
|
||||
* the side of reporting more dependencies than really exist.
|
||||
*/
|
||||
NS_IMETHOD HasAttributeDependentStyle(AttributeRuleProcessorData* aData,
|
||||
nsIAtom* aMedium,
|
||||
nsReStyleHint* aResult) = 0;
|
||||
|
@ -70,10 +70,11 @@ public:
|
||||
NS_IMETHOD SetInlineStyleRule(nsICSSStyleRule* aStyleRule, PRBool aNotify) = 0;
|
||||
|
||||
/**
|
||||
* Does the list of style rules walked by |WalkContentStyleRules|
|
||||
* depend on the attribute?
|
||||
* Is the attribute named stored in the mapped attributes?
|
||||
*
|
||||
* This really belongs on nsIHTMLContent instead.
|
||||
*/
|
||||
NS_IMETHOD_(PRBool) HasAttributeDependentStyle(const nsIAtom* aAttribute) const = 0;
|
||||
NS_IMETHOD_(PRBool) IsAttributeMapped(const nsIAtom* aAttribute) const = 0;
|
||||
|
||||
|
||||
/**
|
||||
|
@ -2117,7 +2117,7 @@ nsGenericElement::SetInlineStyleRule(nsICSSStyleRule* aStyleRule,
|
||||
}
|
||||
|
||||
NS_IMETHODIMP_(PRBool)
|
||||
nsGenericElement::HasAttributeDependentStyle(const nsIAtom* aAttribute) const
|
||||
nsGenericElement::IsAttributeMapped(const nsIAtom* aAttribute) const
|
||||
{
|
||||
return PR_FALSE;
|
||||
}
|
||||
@ -2145,11 +2145,11 @@ nsGenericElement::GetClassAttributeName() const
|
||||
|
||||
PRBool
|
||||
nsGenericElement::FindAttributeDependence(const nsIAtom* aAttribute,
|
||||
const AttributeDependenceEntry* const aMaps[],
|
||||
const MappedAttributeEntry* const aMaps[],
|
||||
PRUint32 aMapCount)
|
||||
{
|
||||
for (PRUint32 mapindex = 0; mapindex < aMapCount; ++mapindex) {
|
||||
for (const AttributeDependenceEntry* map = aMaps[mapindex];
|
||||
for (const MappedAttributeEntry* map = aMaps[mapindex];
|
||||
map->attribute; ++map) {
|
||||
if (aAttribute == *map->attribute) {
|
||||
return PR_TRUE;
|
||||
|
@ -407,26 +407,26 @@ public:
|
||||
NS_IMETHOD GetInlineStyleRule(nsICSSStyleRule** aStyleRule);
|
||||
NS_IMETHOD SetInlineStyleRule(nsICSSStyleRule* aStyleRule, PRBool aNotify);
|
||||
NS_IMETHOD_(PRBool)
|
||||
HasAttributeDependentStyle(const nsIAtom* aAttribute) const;
|
||||
IsAttributeMapped(const nsIAtom* aAttribute) const;
|
||||
NS_IMETHOD GetAttributeChangeHint(const nsIAtom* aAttribute,
|
||||
PRInt32 aModType,
|
||||
nsChangeHint& aHint) const;
|
||||
/*
|
||||
* Attribute Mapping Helpers
|
||||
*/
|
||||
struct AttributeDependenceEntry {
|
||||
struct MappedAttributeEntry {
|
||||
nsIAtom** attribute;
|
||||
};
|
||||
|
||||
/**
|
||||
* A common method where you can just pass in a list of maps to check
|
||||
* for attribute dependence. Most implementations of
|
||||
* HasAttributeDependentStyle should use this function as a default
|
||||
* IsAttributeMapped should use this function as a default
|
||||
* handler.
|
||||
*/
|
||||
static PRBool
|
||||
FindAttributeDependence(const nsIAtom* aAttribute,
|
||||
const AttributeDependenceEntry* const aMaps[],
|
||||
const MappedAttributeEntry* const aMaps[],
|
||||
PRUint32 aMapCount);
|
||||
|
||||
// nsIXMLContent interface methods
|
||||
|
@ -1719,7 +1719,7 @@ nsGenericHTMLElement::SetAttrAndNotify(PRInt32 aNamespaceID,
|
||||
}
|
||||
|
||||
if (aNamespaceID == kNameSpaceID_None) {
|
||||
if (HasAttributeDependentStyle(aAttribute)) {
|
||||
if (IsAttributeMapped(aAttribute)) {
|
||||
nsIHTMLStyleSheet* sheet = mDocument ?
|
||||
mDocument->GetAttributeStyleSheet() : nsnull;
|
||||
rv = mAttrsAndChildren.SetAndTakeMappedAttr(aAttribute, aParsedValue,
|
||||
@ -2268,9 +2268,9 @@ nsGenericHTMLElement::StringToAttribute(nsIAtom* aAttribute,
|
||||
}
|
||||
|
||||
PRBool
|
||||
nsGenericHTMLElement::HasAttributeDependentStyle(const nsIAtom* aAttribute) const
|
||||
nsGenericHTMLElement::IsAttributeMapped(const nsIAtom* aAttribute) const
|
||||
{
|
||||
static const AttributeDependenceEntry* const map[] = {
|
||||
static const MappedAttributeEntry* const map[] = {
|
||||
sCommonAttributeMap
|
||||
};
|
||||
|
||||
@ -2865,14 +2865,14 @@ nsGenericHTMLElement::MapCommonAttributesInto(const nsMappedAttributes* aAttribu
|
||||
|
||||
|
||||
|
||||
/* static */ const nsGenericHTMLElement::AttributeDependenceEntry
|
||||
/* static */ const nsGenericHTMLElement::MappedAttributeEntry
|
||||
nsGenericHTMLElement::sCommonAttributeMap[] = {
|
||||
{ &nsHTMLAtoms::dir },
|
||||
{ &nsHTMLAtoms::lang },
|
||||
{ nsnull }
|
||||
};
|
||||
|
||||
/* static */ const nsGenericElement::AttributeDependenceEntry
|
||||
/* static */ const nsGenericElement::MappedAttributeEntry
|
||||
nsGenericHTMLElement::sImageMarginSizeAttributeMap[] = {
|
||||
{ &nsHTMLAtoms::width },
|
||||
{ &nsHTMLAtoms::height },
|
||||
@ -2881,32 +2881,32 @@ nsGenericHTMLElement::sImageMarginSizeAttributeMap[] = {
|
||||
{ nsnull }
|
||||
};
|
||||
|
||||
/* static */ const nsGenericElement::AttributeDependenceEntry
|
||||
/* static */ const nsGenericElement::MappedAttributeEntry
|
||||
nsGenericHTMLElement::sImageAlignAttributeMap[] = {
|
||||
{ &nsHTMLAtoms::align },
|
||||
{ nsnull }
|
||||
};
|
||||
|
||||
/* static */ const nsGenericElement::AttributeDependenceEntry
|
||||
/* static */ const nsGenericElement::MappedAttributeEntry
|
||||
nsGenericHTMLElement::sDivAlignAttributeMap[] = {
|
||||
{ &nsHTMLAtoms::align },
|
||||
{ nsnull }
|
||||
};
|
||||
|
||||
/* static */ const nsGenericElement::AttributeDependenceEntry
|
||||
/* static */ const nsGenericElement::MappedAttributeEntry
|
||||
nsGenericHTMLElement::sImageBorderAttributeMap[] = {
|
||||
{ &nsHTMLAtoms::border },
|
||||
{ nsnull }
|
||||
};
|
||||
|
||||
/* static */ const nsGenericElement::AttributeDependenceEntry
|
||||
/* static */ const nsGenericElement::MappedAttributeEntry
|
||||
nsGenericHTMLElement::sBackgroundAttributeMap[] = {
|
||||
{ &nsHTMLAtoms::background },
|
||||
{ &nsHTMLAtoms::bgcolor },
|
||||
{ nsnull }
|
||||
};
|
||||
|
||||
/* static */ const nsGenericElement::AttributeDependenceEntry
|
||||
/* static */ const nsGenericElement::MappedAttributeEntry
|
||||
nsGenericHTMLElement::sScrollingAttributeMap[] = {
|
||||
{ &nsHTMLAtoms::scrolling },
|
||||
{ nsnull }
|
||||
|
@ -244,7 +244,7 @@ public:
|
||||
const nsAString& aValue,
|
||||
nsHTMLValue& aResult);
|
||||
|
||||
NS_IMETHOD_(PRBool) HasAttributeDependentStyle(const nsIAtom* aAttribute) const;
|
||||
NS_IMETHOD_(PRBool) IsAttributeMapped(const nsIAtom* aAttribute) const;
|
||||
NS_IMETHOD GetAttributeMappingFunction(nsMapRuleToAttributesFunc& aMapRuleFunc) const;
|
||||
|
||||
/**
|
||||
@ -507,13 +507,13 @@ public:
|
||||
*/
|
||||
static void MapCommonAttributesInto(const nsMappedAttributes* aAttributes,
|
||||
nsRuleData* aRuleData);
|
||||
static const AttributeDependenceEntry sCommonAttributeMap[];
|
||||
static const AttributeDependenceEntry sImageMarginSizeAttributeMap[];
|
||||
static const AttributeDependenceEntry sImageBorderAttributeMap[];
|
||||
static const AttributeDependenceEntry sImageAlignAttributeMap[];
|
||||
static const AttributeDependenceEntry sDivAlignAttributeMap[];
|
||||
static const AttributeDependenceEntry sBackgroundAttributeMap[];
|
||||
static const AttributeDependenceEntry sScrollingAttributeMap[];
|
||||
static const MappedAttributeEntry sCommonAttributeMap[];
|
||||
static const MappedAttributeEntry sImageMarginSizeAttributeMap[];
|
||||
static const MappedAttributeEntry sImageBorderAttributeMap[];
|
||||
static const MappedAttributeEntry sImageAlignAttributeMap[];
|
||||
static const MappedAttributeEntry sDivAlignAttributeMap[];
|
||||
static const MappedAttributeEntry sBackgroundAttributeMap[];
|
||||
static const MappedAttributeEntry sScrollingAttributeMap[];
|
||||
|
||||
/**
|
||||
* Helper to map the align attribute into a style struct.
|
||||
|
@ -83,7 +83,7 @@ public:
|
||||
const nsHTMLValue& aValue,
|
||||
nsAString& aResult) const;
|
||||
NS_IMETHOD GetAttributeMappingFunction(nsMapRuleToAttributesFunc& aMapRuleFunc) const;
|
||||
NS_IMETHOD_(PRBool) HasAttributeDependentStyle(const nsIAtom* aAttribute) const;
|
||||
NS_IMETHOD_(PRBool) IsAttributeMapped(const nsIAtom* aAttribute) const;
|
||||
protected:
|
||||
PRBool mReflectedApplet;
|
||||
};
|
||||
@ -218,9 +218,9 @@ MapAttributesIntoRule(const nsMappedAttributes* aAttributes,
|
||||
}
|
||||
|
||||
NS_IMETHODIMP_(PRBool)
|
||||
nsHTMLAppletElement::HasAttributeDependentStyle(const nsIAtom* aAttribute) const
|
||||
nsHTMLAppletElement::IsAttributeMapped(const nsIAtom* aAttribute) const
|
||||
{
|
||||
static const AttributeDependenceEntry* const map[] = {
|
||||
static const MappedAttributeEntry* const map[] = {
|
||||
sCommonAttributeMap,
|
||||
sImageMarginSizeAttributeMap,
|
||||
sImageAlignAttributeMap,
|
||||
|
@ -73,7 +73,7 @@ public:
|
||||
NS_IMETHOD AttributeToString(nsIAtom* aAttribute,
|
||||
const nsHTMLValue& aValue,
|
||||
nsAString& aResult) const;
|
||||
NS_IMETHOD_(PRBool) HasAttributeDependentStyle(const nsIAtom* aAttribute) const;
|
||||
NS_IMETHOD_(PRBool) IsAttributeMapped(const nsIAtom* aAttribute) const;
|
||||
NS_IMETHOD GetAttributeMappingFunction(nsMapRuleToAttributesFunc& aMapRuleFunc) const;
|
||||
};
|
||||
|
||||
@ -206,14 +206,14 @@ MapAttributesIntoRule(const nsMappedAttributes* aAttributes,
|
||||
}
|
||||
|
||||
NS_IMETHODIMP_(PRBool)
|
||||
nsHTMLBRElement::HasAttributeDependentStyle(const nsIAtom* aAttribute) const
|
||||
nsHTMLBRElement::IsAttributeMapped(const nsIAtom* aAttribute) const
|
||||
{
|
||||
static const AttributeDependenceEntry attributes[] = {
|
||||
static const MappedAttributeEntry attributes[] = {
|
||||
{ &nsHTMLAtoms::clear },
|
||||
{ nsnull }
|
||||
};
|
||||
|
||||
static const AttributeDependenceEntry* const map[] = {
|
||||
static const MappedAttributeEntry* const map[] = {
|
||||
attributes,
|
||||
sCommonAttributeMap,
|
||||
};
|
||||
|
@ -118,7 +118,7 @@ public:
|
||||
PRBool aCompileEventHandlers);
|
||||
NS_IMETHOD GetAttributeMappingFunction(nsMapRuleToAttributesFunc& aMapRuleFunc) const;
|
||||
NS_IMETHOD WalkContentStyleRules(nsRuleWalker* aRuleWalker);
|
||||
NS_IMETHOD_(PRBool) HasAttributeDependentStyle(const nsIAtom* aAttribute) const;
|
||||
NS_IMETHOD_(PRBool) IsAttributeMapped(const nsIAtom* aAttribute) const;
|
||||
|
||||
protected:
|
||||
BodyRule* mContentStyleRule;
|
||||
@ -581,9 +581,9 @@ nsHTMLBodyElement::WalkContentStyleRules(nsRuleWalker* aRuleWalker)
|
||||
}
|
||||
|
||||
NS_IMETHODIMP_(PRBool)
|
||||
nsHTMLBodyElement::HasAttributeDependentStyle(const nsIAtom* aAttribute) const
|
||||
nsHTMLBodyElement::IsAttributeMapped(const nsIAtom* aAttribute) const
|
||||
{
|
||||
static const AttributeDependenceEntry attributes[] = {
|
||||
static const MappedAttributeEntry attributes[] = {
|
||||
{ &nsHTMLAtoms::link },
|
||||
{ &nsHTMLAtoms::vlink },
|
||||
{ &nsHTMLAtoms::alink },
|
||||
@ -597,7 +597,7 @@ nsHTMLBodyElement::HasAttributeDependentStyle(const nsIAtom* aAttribute) const
|
||||
{ nsnull },
|
||||
};
|
||||
|
||||
static const AttributeDependenceEntry* const map[] = {
|
||||
static const MappedAttributeEntry* const map[] = {
|
||||
attributes,
|
||||
sCommonAttributeMap,
|
||||
sBackgroundAttributeMap,
|
||||
|
@ -78,7 +78,7 @@ public:
|
||||
NS_IMETHOD AttributeToString(nsIAtom* aAttribute,
|
||||
const nsHTMLValue& aValue,
|
||||
nsAString& aResult) const;
|
||||
NS_IMETHOD_(PRBool) HasAttributeDependentStyle(const nsIAtom* aAttribute) const;
|
||||
NS_IMETHOD_(PRBool) IsAttributeMapped(const nsIAtom* aAttribute) const;
|
||||
NS_IMETHOD GetAttributeMappingFunction(nsMapRuleToAttributesFunc& aMapRuleFunc) const;
|
||||
};
|
||||
|
||||
@ -212,15 +212,15 @@ MapAttributesIntoRule(const nsMappedAttributes* aAttributes, nsRuleData* aData)
|
||||
}
|
||||
|
||||
NS_IMETHODIMP_(PRBool)
|
||||
nsHTMLDirectoryElement::HasAttributeDependentStyle(const nsIAtom* aAttribute) const
|
||||
nsHTMLDirectoryElement::IsAttributeMapped(const nsIAtom* aAttribute) const
|
||||
{
|
||||
static const AttributeDependenceEntry attributes[] = {
|
||||
static const MappedAttributeEntry attributes[] = {
|
||||
{ &nsHTMLAtoms::type },
|
||||
// { &nsHTMLAtoms::compact }, // XXX
|
||||
{ nsnull}
|
||||
};
|
||||
|
||||
static const AttributeDependenceEntry* const map[] = {
|
||||
static const MappedAttributeEntry* const map[] = {
|
||||
attributes,
|
||||
sCommonAttributeMap,
|
||||
};
|
||||
|
@ -76,7 +76,7 @@ public:
|
||||
NS_IMETHOD AttributeToString(nsIAtom* aAttribute,
|
||||
const nsHTMLValue& aValue,
|
||||
nsAString& aResult) const;
|
||||
NS_IMETHOD_(PRBool) HasAttributeDependentStyle(const nsIAtom* aAttribute) const;
|
||||
NS_IMETHOD_(PRBool) IsAttributeMapped(const nsIAtom* aAttribute) const;
|
||||
NS_IMETHOD GetAttributeMappingFunction(nsMapRuleToAttributesFunc& aMapRuleFunc) const;
|
||||
};
|
||||
|
||||
@ -211,9 +211,9 @@ MapAttributesIntoRule(const nsMappedAttributes* aAttributes, nsRuleData* aData)
|
||||
}
|
||||
|
||||
NS_IMETHODIMP_(PRBool)
|
||||
nsHTMLDivElement::HasAttributeDependentStyle(const nsIAtom* aAttribute) const
|
||||
nsHTMLDivElement::IsAttributeMapped(const nsIAtom* aAttribute) const
|
||||
{
|
||||
static const AttributeDependenceEntry* const map[] = {
|
||||
static const MappedAttributeEntry* const map[] = {
|
||||
sDivAlignAttributeMap,
|
||||
sCommonAttributeMap
|
||||
};
|
||||
|
@ -77,7 +77,7 @@ public:
|
||||
NS_IMETHOD AttributeToString(nsIAtom* aAttribute,
|
||||
const nsHTMLValue& aValue,
|
||||
nsAString& aResult) const;
|
||||
NS_IMETHOD_(PRBool) HasAttributeDependentStyle(const nsIAtom* aAttribute) const;
|
||||
NS_IMETHOD_(PRBool) IsAttributeMapped(const nsIAtom* aAttribute) const;
|
||||
NS_IMETHOD GetAttributeMappingFunction(nsMapRuleToAttributesFunc& aMapRuleFunc) const;
|
||||
};
|
||||
|
||||
@ -304,9 +304,9 @@ MapAttributesIntoRule(const nsMappedAttributes* aAttributes,
|
||||
}
|
||||
|
||||
NS_IMETHODIMP_(PRBool)
|
||||
nsHTMLFontElement::HasAttributeDependentStyle(const nsIAtom* aAttribute) const
|
||||
nsHTMLFontElement::IsAttributeMapped(const nsIAtom* aAttribute) const
|
||||
{
|
||||
static const AttributeDependenceEntry attributes[] = {
|
||||
static const MappedAttributeEntry attributes[] = {
|
||||
{ &nsHTMLAtoms::face },
|
||||
{ &nsHTMLAtoms::pointSize },
|
||||
{ &nsHTMLAtoms::size },
|
||||
@ -315,7 +315,7 @@ nsHTMLFontElement::HasAttributeDependentStyle(const nsIAtom* aAttribute) const
|
||||
{ nsnull }
|
||||
};
|
||||
|
||||
static const AttributeDependenceEntry* const map[] = {
|
||||
static const MappedAttributeEntry* const map[] = {
|
||||
attributes,
|
||||
sCommonAttributeMap,
|
||||
};
|
||||
|
@ -88,7 +88,7 @@ public:
|
||||
NS_IMETHOD AttributeToString(nsIAtom* aAttribute,
|
||||
const nsHTMLValue& aValue,
|
||||
nsAString& aResult) const;
|
||||
NS_IMETHOD_(PRBool) HasAttributeDependentStyle(const nsIAtom* aAttribute) const;
|
||||
NS_IMETHOD_(PRBool) IsAttributeMapped(const nsIAtom* aAttribute) const;
|
||||
NS_IMETHOD GetAttributeMappingFunction(nsMapRuleToAttributesFunc& aMapRuleFunc) const;
|
||||
};
|
||||
|
||||
@ -284,9 +284,9 @@ MapAttributesIntoRule(const nsMappedAttributes* aAttributes,
|
||||
}
|
||||
|
||||
NS_IMETHODIMP_(PRBool)
|
||||
nsHTMLFrameElement::HasAttributeDependentStyle(const nsIAtom* aAttribute) const
|
||||
nsHTMLFrameElement::IsAttributeMapped(const nsIAtom* aAttribute) const
|
||||
{
|
||||
static const AttributeDependenceEntry* const map[] = {
|
||||
static const MappedAttributeEntry* const map[] = {
|
||||
sScrollingAttributeMap,
|
||||
sCommonAttributeMap,
|
||||
};
|
||||
|
@ -78,7 +78,7 @@ public:
|
||||
NS_IMETHOD AttributeToString(nsIAtom* aAttribute,
|
||||
const nsHTMLValue& aValue,
|
||||
nsAString& aResult) const;
|
||||
NS_IMETHOD_(PRBool) HasAttributeDependentStyle(const nsIAtom* aAttribute) const;
|
||||
NS_IMETHOD_(PRBool) IsAttributeMapped(const nsIAtom* aAttribute) const;
|
||||
NS_IMETHOD GetAttributeMappingFunction(nsMapRuleToAttributesFunc& aMapRuleFunc) const;
|
||||
};
|
||||
|
||||
@ -380,9 +380,9 @@ MapAttributesIntoRule(const nsMappedAttributes* aAttributes,
|
||||
}
|
||||
|
||||
NS_IMETHODIMP_(PRBool)
|
||||
nsHTMLHRElement::HasAttributeDependentStyle(const nsIAtom* aAttribute) const
|
||||
nsHTMLHRElement::IsAttributeMapped(const nsIAtom* aAttribute) const
|
||||
{
|
||||
static const AttributeDependenceEntry attributes[] = {
|
||||
static const MappedAttributeEntry attributes[] = {
|
||||
{ &nsHTMLAtoms::align },
|
||||
{ &nsHTMLAtoms::width },
|
||||
{ &nsHTMLAtoms::size },
|
||||
@ -391,7 +391,7 @@ nsHTMLHRElement::HasAttributeDependentStyle(const nsIAtom* aAttribute) const
|
||||
{ nsnull },
|
||||
};
|
||||
|
||||
static const AttributeDependenceEntry* const map[] = {
|
||||
static const MappedAttributeEntry* const map[] = {
|
||||
attributes,
|
||||
sCommonAttributeMap,
|
||||
};
|
||||
|
@ -73,7 +73,7 @@ public:
|
||||
NS_IMETHOD AttributeToString(nsIAtom* aAttribute,
|
||||
const nsHTMLValue& aValue,
|
||||
nsAString& aResult) const;
|
||||
NS_IMETHOD_(PRBool) HasAttributeDependentStyle(const nsIAtom* aAttribute) const;
|
||||
NS_IMETHOD_(PRBool) IsAttributeMapped(const nsIAtom* aAttribute) const;
|
||||
NS_IMETHOD GetAttributeMappingFunction(nsMapRuleToAttributesFunc& aMapRuleFunc) const;
|
||||
};
|
||||
|
||||
@ -193,9 +193,9 @@ MapAttributesIntoRule(const nsMappedAttributes* aAttributes, nsRuleData* aData)
|
||||
}
|
||||
|
||||
NS_IMETHODIMP_(PRBool)
|
||||
nsHTMLHeadingElement::HasAttributeDependentStyle(const nsIAtom* aAttribute) const
|
||||
nsHTMLHeadingElement::IsAttributeMapped(const nsIAtom* aAttribute) const
|
||||
{
|
||||
static const AttributeDependenceEntry* const map[] = {
|
||||
static const MappedAttributeEntry* const map[] = {
|
||||
sDivAlignAttributeMap,
|
||||
sCommonAttributeMap
|
||||
};
|
||||
|
@ -121,7 +121,7 @@ public:
|
||||
return rv;
|
||||
}
|
||||
|
||||
NS_IMETHOD_(PRBool) HasAttributeDependentStyle(const nsIAtom* aAttribute) const;
|
||||
NS_IMETHOD_(PRBool) IsAttributeMapped(const nsIAtom* aAttribute) const;
|
||||
NS_IMETHOD GetAttributeMappingFunction(nsMapRuleToAttributesFunc& aMapRuleFunc) const;
|
||||
|
||||
protected:
|
||||
@ -482,16 +482,16 @@ MapAttributesIntoRule(const nsMappedAttributes* aAttributes,
|
||||
}
|
||||
|
||||
NS_IMETHODIMP_(PRBool)
|
||||
nsHTMLIFrameElement::HasAttributeDependentStyle(const nsIAtom* aAttribute) const
|
||||
nsHTMLIFrameElement::IsAttributeMapped(const nsIAtom* aAttribute) const
|
||||
{
|
||||
static const AttributeDependenceEntry attributes[] = {
|
||||
static const MappedAttributeEntry attributes[] = {
|
||||
{ &nsHTMLAtoms::width },
|
||||
{ &nsHTMLAtoms::height },
|
||||
{ &nsHTMLAtoms::frameborder },
|
||||
{ nsnull },
|
||||
};
|
||||
|
||||
static const AttributeDependenceEntry* const map[] = {
|
||||
static const MappedAttributeEntry* const map[] = {
|
||||
attributes,
|
||||
sScrollingAttributeMap,
|
||||
sImageAlignAttributeMap,
|
||||
|
@ -125,7 +125,7 @@ public:
|
||||
NS_IMETHOD GetAttributeChangeHint(const nsIAtom* aAttribute,
|
||||
PRInt32 aModType,
|
||||
nsChangeHint& aHint) const;
|
||||
NS_IMETHOD_(PRBool) HasAttributeDependentStyle(const nsIAtom* aAttribute) const;
|
||||
NS_IMETHOD_(PRBool) IsAttributeMapped(const nsIAtom* aAttribute) const;
|
||||
NS_IMETHOD GetAttributeMappingFunction(nsMapRuleToAttributesFunc& aMapRuleFunc) const;
|
||||
virtual nsresult HandleDOMEvent(nsIPresContext* aPresContext,
|
||||
nsEvent* aEvent, nsIDOMEvent** aDOMEvent,
|
||||
@ -538,9 +538,9 @@ nsHTMLImageElement::GetAttributeChangeHint(const nsIAtom* aAttribute,
|
||||
}
|
||||
|
||||
NS_IMETHODIMP_(PRBool)
|
||||
nsHTMLImageElement::HasAttributeDependentStyle(const nsIAtom* aAttribute) const
|
||||
nsHTMLImageElement::IsAttributeMapped(const nsIAtom* aAttribute) const
|
||||
{
|
||||
static const AttributeDependenceEntry* const map[] = {
|
||||
static const MappedAttributeEntry* const map[] = {
|
||||
sCommonAttributeMap,
|
||||
sImageMarginSizeAttributeMap,
|
||||
sImageBorderAttributeMap,
|
||||
|
@ -186,7 +186,7 @@ public:
|
||||
NS_IMETHOD GetAttributeChangeHint(const nsIAtom* aAttribute,
|
||||
PRInt32 aModType,
|
||||
nsChangeHint& aHint) const;
|
||||
NS_IMETHOD_(PRBool) HasAttributeDependentStyle(const nsIAtom* aAttribute) const;
|
||||
NS_IMETHOD_(PRBool) IsAttributeMapped(const nsIAtom* aAttribute) const;
|
||||
NS_IMETHOD GetAttributeMappingFunction(nsMapRuleToAttributesFunc& aMapRuleFunc) const;
|
||||
virtual nsresult HandleDOMEvent(nsIPresContext* aPresContext,
|
||||
nsEvent* aEvent, nsIDOMEvent** aDOMEvent,
|
||||
@ -1851,15 +1851,15 @@ nsHTMLInputElement::GetAttributeChangeHint(const nsIAtom* aAttribute,
|
||||
}
|
||||
|
||||
NS_IMETHODIMP_(PRBool)
|
||||
nsHTMLInputElement::HasAttributeDependentStyle(const nsIAtom* aAttribute) const
|
||||
nsHTMLInputElement::IsAttributeMapped(const nsIAtom* aAttribute) const
|
||||
{
|
||||
static const AttributeDependenceEntry attributes[] = {
|
||||
static const MappedAttributeEntry attributes[] = {
|
||||
{ &nsHTMLAtoms::align },
|
||||
{ &nsHTMLAtoms::type },
|
||||
{ nsnull },
|
||||
};
|
||||
|
||||
static const AttributeDependenceEntry* const map[] = {
|
||||
static const MappedAttributeEntry* const map[] = {
|
||||
attributes,
|
||||
sCommonAttributeMap,
|
||||
sImageMarginSizeAttributeMap,
|
||||
|
@ -73,7 +73,7 @@ public:
|
||||
NS_IMETHOD AttributeToString(nsIAtom* aAttribute,
|
||||
const nsHTMLValue& aValue,
|
||||
nsAString& aResult) const;
|
||||
NS_IMETHOD_(PRBool) HasAttributeDependentStyle(const nsIAtom* aAttribute) const;
|
||||
NS_IMETHOD_(PRBool) IsAttributeMapped(const nsIAtom* aAttribute) const;
|
||||
NS_IMETHOD GetAttributeMappingFunction(nsMapRuleToAttributesFunc& aMapRuleFunc) const;
|
||||
};
|
||||
|
||||
@ -231,14 +231,14 @@ MapAttributesIntoRule(const nsMappedAttributes* aAttributes,
|
||||
}
|
||||
|
||||
NS_IMETHODIMP_(PRBool)
|
||||
nsHTMLLIElement::HasAttributeDependentStyle(const nsIAtom* aAttribute) const
|
||||
nsHTMLLIElement::IsAttributeMapped(const nsIAtom* aAttribute) const
|
||||
{
|
||||
static const AttributeDependenceEntry attributes[] = {
|
||||
static const MappedAttributeEntry attributes[] = {
|
||||
{ &nsHTMLAtoms::type },
|
||||
{ nsnull },
|
||||
};
|
||||
|
||||
static const AttributeDependenceEntry* const map[] = {
|
||||
static const MappedAttributeEntry* const map[] = {
|
||||
attributes,
|
||||
sCommonAttributeMap,
|
||||
};
|
||||
|
@ -80,7 +80,7 @@ public:
|
||||
const nsHTMLValue& aValue,
|
||||
nsAString& aResult) const;
|
||||
NS_IMETHOD GetAttributeMappingFunction(nsMapRuleToAttributesFunc& aMapRuleFunc) const;
|
||||
NS_IMETHOD_(PRBool) HasAttributeDependentStyle(const nsIAtom* aAttribute) const;
|
||||
NS_IMETHOD_(PRBool) IsAttributeMapped(const nsIAtom* aAttribute) const;
|
||||
};
|
||||
|
||||
nsresult
|
||||
@ -215,14 +215,14 @@ MapAttributesIntoRule(const nsMappedAttributes* aAttributes, nsRuleData* aData)
|
||||
}
|
||||
|
||||
NS_IMETHODIMP_(PRBool)
|
||||
nsHTMLMenuElement::HasAttributeDependentStyle(const nsIAtom* aAttribute) const
|
||||
nsHTMLMenuElement::IsAttributeMapped(const nsIAtom* aAttribute) const
|
||||
{
|
||||
static const AttributeDependenceEntry attributes[] = {
|
||||
static const MappedAttributeEntry attributes[] = {
|
||||
{ &nsHTMLAtoms::type },
|
||||
{ nsnull }
|
||||
};
|
||||
|
||||
static const AttributeDependenceEntry* const map[] = {
|
||||
static const MappedAttributeEntry* const map[] = {
|
||||
attributes,
|
||||
sCommonAttributeMap,
|
||||
};
|
||||
|
@ -74,7 +74,7 @@ public:
|
||||
const nsHTMLValue& aValue,
|
||||
nsAString& aResult) const;
|
||||
NS_IMETHOD GetAttributeMappingFunction(nsMapRuleToAttributesFunc& aMapRuleFunc) const;
|
||||
NS_IMETHOD_(PRBool) HasAttributeDependentStyle(const nsIAtom* aAttribute) const;
|
||||
NS_IMETHOD_(PRBool) IsAttributeMapped(const nsIAtom* aAttribute) const;
|
||||
};
|
||||
|
||||
nsresult
|
||||
@ -251,14 +251,14 @@ MapAttributesIntoRule(const nsMappedAttributes* aAttributes, nsRuleData* aData)
|
||||
}
|
||||
|
||||
NS_IMETHODIMP_(PRBool)
|
||||
nsHTMLOListElement::HasAttributeDependentStyle(const nsIAtom* aAttribute) const
|
||||
nsHTMLOListElement::IsAttributeMapped(const nsIAtom* aAttribute) const
|
||||
{
|
||||
static const AttributeDependenceEntry attributes[] = {
|
||||
static const MappedAttributeEntry attributes[] = {
|
||||
{ &nsHTMLAtoms::type },
|
||||
{ nsnull }
|
||||
};
|
||||
|
||||
static const AttributeDependenceEntry* const map[] = {
|
||||
static const MappedAttributeEntry* const map[] = {
|
||||
attributes,
|
||||
sCommonAttributeMap,
|
||||
};
|
||||
|
@ -86,7 +86,7 @@ public:
|
||||
const nsHTMLValue& aValue,
|
||||
nsAString& aResult) const;
|
||||
NS_IMETHOD GetAttributeMappingFunction(nsMapRuleToAttributesFunc& aMapRuleFunc) const;
|
||||
NS_IMETHOD_(PRBool) HasAttributeDependentStyle(const nsIAtom* aAttribute) const;
|
||||
NS_IMETHOD_(PRBool) IsAttributeMapped(const nsIAtom* aAttribute) const;
|
||||
};
|
||||
|
||||
nsresult
|
||||
@ -288,9 +288,9 @@ MapAttributesIntoRule(const nsMappedAttributes* aAttributes,
|
||||
}
|
||||
|
||||
NS_IMETHODIMP_(PRBool)
|
||||
nsHTMLObjectElement::HasAttributeDependentStyle(const nsIAtom* aAttribute) const
|
||||
nsHTMLObjectElement::IsAttributeMapped(const nsIAtom* aAttribute) const
|
||||
{
|
||||
static const AttributeDependenceEntry* const map[] = {
|
||||
static const MappedAttributeEntry* const map[] = {
|
||||
sCommonAttributeMap,
|
||||
sImageMarginSizeAttributeMap,
|
||||
sImageBorderAttributeMap,
|
||||
|
@ -76,7 +76,7 @@ public:
|
||||
NS_IMETHOD AttributeToString(nsIAtom* aAttribute,
|
||||
const nsHTMLValue& aValue,
|
||||
nsAString& aResult) const;
|
||||
NS_IMETHOD_(PRBool) HasAttributeDependentStyle(const nsIAtom* aAttribute) const;
|
||||
NS_IMETHOD_(PRBool) IsAttributeMapped(const nsIAtom* aAttribute) const;
|
||||
NS_IMETHOD GetAttributeMappingFunction(nsMapRuleToAttributesFunc& aMapRuleFunc) const;
|
||||
};
|
||||
|
||||
@ -196,9 +196,9 @@ MapAttributesIntoRule(const nsMappedAttributes* aAttributes, nsRuleData* aData)
|
||||
}
|
||||
|
||||
NS_IMETHODIMP_(PRBool)
|
||||
nsHTMLParagraphElement::HasAttributeDependentStyle(const nsIAtom* aAttribute) const
|
||||
nsHTMLParagraphElement::IsAttributeMapped(const nsIAtom* aAttribute) const
|
||||
{
|
||||
static const AttributeDependenceEntry* const map[] = {
|
||||
static const MappedAttributeEntry* const map[] = {
|
||||
sDivAlignAttributeMap,
|
||||
sCommonAttributeMap,
|
||||
};
|
||||
|
@ -78,7 +78,7 @@ public:
|
||||
NS_IMETHOD GetAttributeChangeHint(const nsIAtom* aAttribute,
|
||||
PRInt32 aModType,
|
||||
nsChangeHint& aHint) const;
|
||||
NS_IMETHOD_(PRBool) HasAttributeDependentStyle(const nsIAtom* aAttribute) const;
|
||||
NS_IMETHOD_(PRBool) IsAttributeMapped(const nsIAtom* aAttribute) const;
|
||||
NS_IMETHOD GetAttributeMappingFunction(nsMapRuleToAttributesFunc& aMapRuleFunc) const;
|
||||
};
|
||||
|
||||
@ -256,9 +256,9 @@ nsHTMLPreElement::GetAttributeChangeHint(const nsIAtom* aAttribute,
|
||||
}
|
||||
|
||||
NS_IMETHODIMP_(PRBool)
|
||||
nsHTMLPreElement::HasAttributeDependentStyle(const nsIAtom* aAttribute) const
|
||||
nsHTMLPreElement::IsAttributeMapped(const nsIAtom* aAttribute) const
|
||||
{
|
||||
static const AttributeDependenceEntry attributes[] = {
|
||||
static const MappedAttributeEntry attributes[] = {
|
||||
{ &nsHTMLAtoms::variable },
|
||||
{ &nsHTMLAtoms::wrap },
|
||||
{ &nsHTMLAtoms::cols },
|
||||
@ -266,7 +266,7 @@ nsHTMLPreElement::HasAttributeDependentStyle(const nsIAtom* aAttribute) const
|
||||
{ nsnull },
|
||||
};
|
||||
|
||||
static const AttributeDependenceEntry* const map[] = {
|
||||
static const MappedAttributeEntry* const map[] = {
|
||||
attributes,
|
||||
sCommonAttributeMap,
|
||||
};
|
||||
|
@ -246,7 +246,7 @@ public:
|
||||
NS_IMETHOD GetAttributeChangeHint(const nsIAtom* aAttribute,
|
||||
PRInt32 aModType,
|
||||
nsChangeHint& aHint) const;
|
||||
NS_IMETHOD_(PRBool) HasAttributeDependentStyle(const nsIAtom* aAttribute) const;
|
||||
NS_IMETHOD_(PRBool) IsAttributeMapped(const nsIAtom* aAttribute) const;
|
||||
|
||||
|
||||
protected:
|
||||
@ -1834,9 +1834,9 @@ nsHTMLSelectElement::GetAttributeChangeHint(const nsIAtom* aAttribute,
|
||||
}
|
||||
|
||||
NS_IMETHODIMP_(PRBool)
|
||||
nsHTMLSelectElement::HasAttributeDependentStyle(const nsIAtom* aAttribute) const
|
||||
nsHTMLSelectElement::IsAttributeMapped(const nsIAtom* aAttribute) const
|
||||
{
|
||||
static const AttributeDependenceEntry* const map[] = {
|
||||
static const MappedAttributeEntry* const map[] = {
|
||||
sCommonAttributeMap,
|
||||
sImageAlignAttributeMap
|
||||
};
|
||||
|
@ -95,7 +95,7 @@ public:
|
||||
NS_IMETHOD AttributeToString(nsIAtom* aAttribute,
|
||||
const nsHTMLValue& aValue,
|
||||
nsAString& aResult) const;
|
||||
NS_IMETHOD_(PRBool) HasAttributeDependentStyle(const nsIAtom* aAttribute) const;
|
||||
NS_IMETHOD_(PRBool) IsAttributeMapped(const nsIAtom* aAttribute) const;
|
||||
NS_IMETHOD GetAttributeMappingFunction(nsMapRuleToAttributesFunc& aMapRuleFunc) const;
|
||||
};
|
||||
|
||||
@ -317,9 +317,9 @@ nsHTMLSharedContainerElement::AttributeToString(nsIAtom* aAttribute,
|
||||
}
|
||||
|
||||
NS_IMETHODIMP_(PRBool)
|
||||
nsHTMLSharedContainerElement::HasAttributeDependentStyle(const nsIAtom* aAttr) const
|
||||
nsHTMLSharedContainerElement::IsAttributeMapped(const nsIAtom* aAttr) const
|
||||
{
|
||||
if (nsGenericHTMLElement::HasAttributeDependentStyle(aAttr)) {
|
||||
if (nsGenericHTMLElement::IsAttributeMapped(aAttr)) {
|
||||
return PR_TRUE;
|
||||
}
|
||||
|
||||
|
@ -100,7 +100,7 @@ public:
|
||||
const nsHTMLValue& aValue,
|
||||
nsAString& aResult) const;
|
||||
NS_IMETHOD GetAttributeMappingFunction(nsMapRuleToAttributesFunc& aMapRuleFunc) const;
|
||||
NS_IMETHOD_(PRBool) HasAttributeDependentStyle(const nsIAtom* aAttribute) const;
|
||||
NS_IMETHOD_(PRBool) IsAttributeMapped(const nsIAtom* aAttribute) const;
|
||||
};
|
||||
|
||||
nsresult
|
||||
@ -390,10 +390,10 @@ PlainMapAttributesIntoRule(const nsMappedAttributes* aAttributes,
|
||||
|
||||
|
||||
NS_IMETHODIMP_(PRBool)
|
||||
nsHTMLSharedLeafElement::HasAttributeDependentStyle(const nsIAtom* aAttribute) const
|
||||
nsHTMLSharedLeafElement::IsAttributeMapped(const nsIAtom* aAttribute) const
|
||||
{
|
||||
if (mNodeInfo->Equals(nsHTMLAtoms::embed)) {
|
||||
static const AttributeDependenceEntry* const map[] = {
|
||||
static const MappedAttributeEntry* const map[] = {
|
||||
sCommonAttributeMap,
|
||||
sImageMarginSizeAttributeMap,
|
||||
sImageAlignAttributeMap,
|
||||
@ -404,7 +404,7 @@ nsHTMLSharedLeafElement::HasAttributeDependentStyle(const nsIAtom* aAttribute) c
|
||||
}
|
||||
|
||||
if (mNodeInfo->Equals(nsHTMLAtoms::spacer)) {
|
||||
static const AttributeDependenceEntry attributes[] = {
|
||||
static const MappedAttributeEntry attributes[] = {
|
||||
// XXXldb This is just wrong.
|
||||
{ &nsHTMLAtoms::usemap },
|
||||
{ &nsHTMLAtoms::ismap },
|
||||
@ -412,7 +412,7 @@ nsHTMLSharedLeafElement::HasAttributeDependentStyle(const nsIAtom* aAttribute) c
|
||||
{ nsnull }
|
||||
};
|
||||
|
||||
static const AttributeDependenceEntry* const map[] = {
|
||||
static const MappedAttributeEntry* const map[] = {
|
||||
attributes,
|
||||
sCommonAttributeMap,
|
||||
sImageMarginSizeAttributeMap,
|
||||
@ -422,7 +422,7 @@ nsHTMLSharedLeafElement::HasAttributeDependentStyle(const nsIAtom* aAttribute) c
|
||||
return FindAttributeDependence(aAttribute, map, NS_ARRAY_LENGTH(map));
|
||||
}
|
||||
|
||||
return nsGenericHTMLElement::HasAttributeDependentStyle(aAttribute);
|
||||
return nsGenericHTMLElement::IsAttributeMapped(aAttribute);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
|
@ -100,7 +100,7 @@ public:
|
||||
const nsHTMLValue& aValue,
|
||||
nsAString& aResult) const;
|
||||
NS_IMETHOD GetAttributeMappingFunction(nsMapRuleToAttributesFunc& aMapRuleFunc) const;
|
||||
NS_IMETHOD_(PRBool) HasAttributeDependentStyle(const nsIAtom* aAttribute) const;
|
||||
NS_IMETHOD_(PRBool) IsAttributeMapped(const nsIAtom* aAttribute) const;
|
||||
};
|
||||
|
||||
nsresult
|
||||
@ -390,10 +390,10 @@ PlainMapAttributesIntoRule(const nsMappedAttributes* aAttributes,
|
||||
|
||||
|
||||
NS_IMETHODIMP_(PRBool)
|
||||
nsHTMLSharedLeafElement::HasAttributeDependentStyle(const nsIAtom* aAttribute) const
|
||||
nsHTMLSharedLeafElement::IsAttributeMapped(const nsIAtom* aAttribute) const
|
||||
{
|
||||
if (mNodeInfo->Equals(nsHTMLAtoms::embed)) {
|
||||
static const AttributeDependenceEntry* const map[] = {
|
||||
static const MappedAttributeEntry* const map[] = {
|
||||
sCommonAttributeMap,
|
||||
sImageMarginSizeAttributeMap,
|
||||
sImageAlignAttributeMap,
|
||||
@ -404,7 +404,7 @@ nsHTMLSharedLeafElement::HasAttributeDependentStyle(const nsIAtom* aAttribute) c
|
||||
}
|
||||
|
||||
if (mNodeInfo->Equals(nsHTMLAtoms::spacer)) {
|
||||
static const AttributeDependenceEntry attributes[] = {
|
||||
static const MappedAttributeEntry attributes[] = {
|
||||
// XXXldb This is just wrong.
|
||||
{ &nsHTMLAtoms::usemap },
|
||||
{ &nsHTMLAtoms::ismap },
|
||||
@ -412,7 +412,7 @@ nsHTMLSharedLeafElement::HasAttributeDependentStyle(const nsIAtom* aAttribute) c
|
||||
{ nsnull }
|
||||
};
|
||||
|
||||
static const AttributeDependenceEntry* const map[] = {
|
||||
static const MappedAttributeEntry* const map[] = {
|
||||
attributes,
|
||||
sCommonAttributeMap,
|
||||
sImageMarginSizeAttributeMap,
|
||||
@ -422,7 +422,7 @@ nsHTMLSharedLeafElement::HasAttributeDependentStyle(const nsIAtom* aAttribute) c
|
||||
return FindAttributeDependence(aAttribute, map, NS_ARRAY_LENGTH(map));
|
||||
}
|
||||
|
||||
return nsGenericHTMLElement::HasAttributeDependentStyle(aAttribute);
|
||||
return nsGenericHTMLElement::IsAttributeMapped(aAttribute);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
|
@ -86,7 +86,7 @@ public:
|
||||
const nsHTMLValue& aValue,
|
||||
nsAString& aResult) const;
|
||||
NS_IMETHOD GetAttributeMappingFunction(nsMapRuleToAttributesFunc& aMapRuleFunc) const;
|
||||
NS_IMETHOD_(PRBool) HasAttributeDependentStyle(const nsIAtom* aAttribute) const;
|
||||
NS_IMETHOD_(PRBool) IsAttributeMapped(const nsIAtom* aAttribute) const;
|
||||
};
|
||||
|
||||
nsresult
|
||||
@ -288,9 +288,9 @@ MapAttributesIntoRule(const nsMappedAttributes* aAttributes,
|
||||
}
|
||||
|
||||
NS_IMETHODIMP_(PRBool)
|
||||
nsHTMLObjectElement::HasAttributeDependentStyle(const nsIAtom* aAttribute) const
|
||||
nsHTMLObjectElement::IsAttributeMapped(const nsIAtom* aAttribute) const
|
||||
{
|
||||
static const AttributeDependenceEntry* const map[] = {
|
||||
static const MappedAttributeEntry* const map[] = {
|
||||
sCommonAttributeMap,
|
||||
sImageMarginSizeAttributeMap,
|
||||
sImageBorderAttributeMap,
|
||||
|
@ -74,7 +74,7 @@ public:
|
||||
const nsHTMLValue& aValue,
|
||||
nsAString& aResult) const;
|
||||
NS_IMETHOD GetAttributeMappingFunction(nsMapRuleToAttributesFunc& aMapRuleFunc) const;
|
||||
NS_IMETHOD_(PRBool) HasAttributeDependentStyle(const nsIAtom* aAttribute) const;
|
||||
NS_IMETHOD_(PRBool) IsAttributeMapped(const nsIAtom* aAttribute) const;
|
||||
};
|
||||
|
||||
nsresult
|
||||
@ -210,14 +210,14 @@ void MapAttributesIntoRule(const nsMappedAttributes* aAttributes, nsRuleData* aD
|
||||
}
|
||||
|
||||
NS_IMETHODIMP_(PRBool)
|
||||
nsHTMLTableCaptionElement::HasAttributeDependentStyle(const nsIAtom* aAttribute) const
|
||||
nsHTMLTableCaptionElement::IsAttributeMapped(const nsIAtom* aAttribute) const
|
||||
{
|
||||
static const AttributeDependenceEntry attributes[] = {
|
||||
static const MappedAttributeEntry attributes[] = {
|
||||
{ &nsHTMLAtoms::align },
|
||||
{ nsnull }
|
||||
};
|
||||
|
||||
static const AttributeDependenceEntry* const map[] = {
|
||||
static const MappedAttributeEntry* const map[] = {
|
||||
attributes,
|
||||
sCommonAttributeMap,
|
||||
};
|
||||
|
@ -84,7 +84,7 @@ public:
|
||||
nsAString& aResult) const;
|
||||
NS_IMETHOD GetAttributeMappingFunction(nsMapRuleToAttributesFunc& aMapRuleFunc) const;
|
||||
NS_IMETHOD WalkContentStyleRules(nsRuleWalker* aRuleWalker);
|
||||
NS_IMETHOD_(PRBool) HasAttributeDependentStyle(const nsIAtom* aAttribute) const;
|
||||
NS_IMETHOD_(PRBool) IsAttributeMapped(const nsIAtom* aAttribute) const;
|
||||
|
||||
protected:
|
||||
// This does not return a nsresult since all we care about is if we
|
||||
@ -511,9 +511,9 @@ void MapAttributesIntoRule(const nsMappedAttributes* aAttributes,
|
||||
}
|
||||
|
||||
NS_IMETHODIMP_(PRBool)
|
||||
nsHTMLTableCellElement::HasAttributeDependentStyle(const nsIAtom* aAttribute) const
|
||||
nsHTMLTableCellElement::IsAttributeMapped(const nsIAtom* aAttribute) const
|
||||
{
|
||||
static const AttributeDependenceEntry attributes[] = {
|
||||
static const MappedAttributeEntry attributes[] = {
|
||||
{ &nsHTMLAtoms::align },
|
||||
{ &nsHTMLAtoms::valign },
|
||||
{ &nsHTMLAtoms::nowrap },
|
||||
@ -530,7 +530,7 @@ nsHTMLTableCellElement::HasAttributeDependentStyle(const nsIAtom* aAttribute) co
|
||||
{ nsnull }
|
||||
};
|
||||
|
||||
static const AttributeDependenceEntry* const map[] = {
|
||||
static const MappedAttributeEntry* const map[] = {
|
||||
attributes,
|
||||
sCommonAttributeMap,
|
||||
sBackgroundAttributeMap,
|
||||
|
@ -83,7 +83,7 @@ public:
|
||||
const nsHTMLValue& aValue,
|
||||
nsAString& aResult) const;
|
||||
NS_IMETHOD GetAttributeMappingFunction(nsMapRuleToAttributesFunc& aMapRuleFunc) const;
|
||||
NS_IMETHOD_(PRBool) HasAttributeDependentStyle(const nsIAtom* aAttribute) const;
|
||||
NS_IMETHOD_(PRBool) IsAttributeMapped(const nsIAtom* aAttribute) const;
|
||||
};
|
||||
|
||||
nsresult
|
||||
@ -305,26 +305,26 @@ void ColMapAttributesIntoRule(const nsMappedAttributes* aAttributes,
|
||||
}
|
||||
|
||||
NS_IMETHODIMP_(PRBool)
|
||||
nsHTMLTableColElement::HasAttributeDependentStyle(const nsIAtom* aAttribute) const
|
||||
nsHTMLTableColElement::IsAttributeMapped(const nsIAtom* aAttribute) const
|
||||
{
|
||||
static const AttributeDependenceEntry attributes[] = {
|
||||
static const MappedAttributeEntry attributes[] = {
|
||||
{ &nsHTMLAtoms::width },
|
||||
{ &nsHTMLAtoms::align },
|
||||
{ &nsHTMLAtoms::valign },
|
||||
{ nsnull }
|
||||
};
|
||||
|
||||
static const AttributeDependenceEntry span_attribute[] = {
|
||||
static const MappedAttributeEntry span_attribute[] = {
|
||||
{ &nsHTMLAtoms::span },
|
||||
{ nsnull }
|
||||
};
|
||||
|
||||
static const AttributeDependenceEntry* const col_map[] = {
|
||||
static const MappedAttributeEntry* const col_map[] = {
|
||||
attributes,
|
||||
sCommonAttributeMap,
|
||||
};
|
||||
|
||||
static const AttributeDependenceEntry* const colspan_map[] = {
|
||||
static const MappedAttributeEntry* const colspan_map[] = {
|
||||
attributes,
|
||||
span_attribute,
|
||||
sCommonAttributeMap,
|
||||
|
@ -90,7 +90,7 @@ public:
|
||||
const nsHTMLValue& aValue,
|
||||
nsAString& aResult) const;
|
||||
NS_IMETHOD GetAttributeMappingFunction(nsMapRuleToAttributesFunc& aMapRuleFunc) const;
|
||||
NS_IMETHOD_(PRBool) HasAttributeDependentStyle(const nsIAtom* aAttribute) const;
|
||||
NS_IMETHOD_(PRBool) IsAttributeMapped(const nsIAtom* aAttribute) const;
|
||||
|
||||
protected:
|
||||
already_AddRefed<nsIDOMHTMLTableSectionElement> GetSection(nsIAtom *aTag);
|
||||
@ -1459,9 +1459,9 @@ MapAttributesIntoRule(const nsMappedAttributes* aAttributes,
|
||||
}
|
||||
|
||||
NS_IMETHODIMP_(PRBool)
|
||||
nsHTMLTableElement::HasAttributeDependentStyle(const nsIAtom* aAttribute) const
|
||||
nsHTMLTableElement::IsAttributeMapped(const nsIAtom* aAttribute) const
|
||||
{
|
||||
static const AttributeDependenceEntry attributes[] = {
|
||||
static const MappedAttributeEntry attributes[] = {
|
||||
{ &nsHTMLAtoms::layout },
|
||||
{ &nsHTMLAtoms::cellpadding },
|
||||
{ &nsHTMLAtoms::cellspacing },
|
||||
@ -1480,7 +1480,7 @@ nsHTMLTableElement::HasAttributeDependentStyle(const nsIAtom* aAttribute) const
|
||||
{ nsnull }
|
||||
};
|
||||
|
||||
static const AttributeDependenceEntry* const map[] = {
|
||||
static const MappedAttributeEntry* const map[] = {
|
||||
attributes,
|
||||
sCommonAttributeMap,
|
||||
sBackgroundAttributeMap,
|
||||
|
@ -176,7 +176,7 @@ public:
|
||||
const nsHTMLValue& aValue,
|
||||
nsAString& aResult) const;
|
||||
NS_IMETHOD GetAttributeMappingFunction(nsMapRuleToAttributesFunc& aMapRuleFunc) const;
|
||||
NS_IMETHOD_(PRBool) HasAttributeDependentStyle(const nsIAtom* aAttribute) const;
|
||||
NS_IMETHOD_(PRBool) IsAttributeMapped(const nsIAtom* aAttribute) const;
|
||||
|
||||
protected:
|
||||
nsresult GetSection(nsIDOMHTMLTableSectionElement** aSection);
|
||||
@ -621,16 +621,16 @@ void MapAttributesIntoRule(const nsMappedAttributes* aAttributes, nsRuleData* aD
|
||||
}
|
||||
|
||||
NS_IMETHODIMP_(PRBool)
|
||||
nsHTMLTableRowElement::HasAttributeDependentStyle(const nsIAtom* aAttribute) const
|
||||
nsHTMLTableRowElement::IsAttributeMapped(const nsIAtom* aAttribute) const
|
||||
{
|
||||
static const AttributeDependenceEntry attributes[] = {
|
||||
static const MappedAttributeEntry attributes[] = {
|
||||
{ &nsHTMLAtoms::align },
|
||||
{ &nsHTMLAtoms::valign },
|
||||
{ &nsHTMLAtoms::height },
|
||||
{ nsnull }
|
||||
};
|
||||
|
||||
static const AttributeDependenceEntry* const map[] = {
|
||||
static const MappedAttributeEntry* const map[] = {
|
||||
attributes,
|
||||
sCommonAttributeMap,
|
||||
sBackgroundAttributeMap,
|
||||
|
@ -80,7 +80,7 @@ public:
|
||||
const nsHTMLValue& aValue,
|
||||
nsAString& aResult) const;
|
||||
NS_IMETHOD GetAttributeMappingFunction(nsMapRuleToAttributesFunc& aMapRuleFunc) const;
|
||||
NS_IMETHOD_(PRBool) HasAttributeDependentStyle(const nsIAtom* aAttribute) const;
|
||||
NS_IMETHOD_(PRBool) IsAttributeMapped(const nsIAtom* aAttribute) const;
|
||||
|
||||
protected:
|
||||
GenericElementCollection *mRows;
|
||||
@ -385,16 +385,16 @@ void MapAttributesIntoRule(const nsMappedAttributes* aAttributes, nsRuleData* aD
|
||||
}
|
||||
|
||||
NS_IMETHODIMP_(PRBool)
|
||||
nsHTMLTableSectionElement::HasAttributeDependentStyle(const nsIAtom* aAttribute) const
|
||||
nsHTMLTableSectionElement::IsAttributeMapped(const nsIAtom* aAttribute) const
|
||||
{
|
||||
static const AttributeDependenceEntry attributes[] = {
|
||||
static const MappedAttributeEntry attributes[] = {
|
||||
{ &nsHTMLAtoms::align },
|
||||
{ &nsHTMLAtoms::valign },
|
||||
{ &nsHTMLAtoms::height },
|
||||
{ nsnull }
|
||||
};
|
||||
|
||||
static const AttributeDependenceEntry* const map[] = {
|
||||
static const MappedAttributeEntry* const map[] = {
|
||||
attributes,
|
||||
sCommonAttributeMap,
|
||||
sBackgroundAttributeMap,
|
||||
|
@ -132,7 +132,7 @@ public:
|
||||
NS_IMETHOD GetAttributeChangeHint(const nsIAtom* aAttribute,
|
||||
PRInt32 aModType,
|
||||
nsChangeHint& aHint) const;
|
||||
NS_IMETHOD_(PRBool) HasAttributeDependentStyle(const nsIAtom* aAttribute) const;
|
||||
NS_IMETHOD_(PRBool) IsAttributeMapped(const nsIAtom* aAttribute) const;
|
||||
virtual nsresult HandleDOMEvent(nsIPresContext* aPresContext,
|
||||
nsEvent* aEvent, nsIDOMEvent** aDOMEvent,
|
||||
PRUint32 aFlags,
|
||||
@ -631,9 +631,9 @@ nsHTMLTextAreaElement::GetAttributeChangeHint(const nsIAtom* aAttribute,
|
||||
}
|
||||
|
||||
NS_IMETHODIMP_(PRBool)
|
||||
nsHTMLTextAreaElement::HasAttributeDependentStyle(const nsIAtom* aAttribute) const
|
||||
nsHTMLTextAreaElement::IsAttributeMapped(const nsIAtom* aAttribute) const
|
||||
{
|
||||
static const AttributeDependenceEntry* const map[] = {
|
||||
static const MappedAttributeEntry* const map[] = {
|
||||
sDivAlignAttributeMap,
|
||||
sCommonAttributeMap,
|
||||
};
|
||||
|
@ -77,7 +77,7 @@ public:
|
||||
const nsHTMLValue& aValue,
|
||||
nsAString& aResult) const;
|
||||
NS_IMETHOD GetAttributeMappingFunction(nsMapRuleToAttributesFunc& aMapRuleFunc) const;
|
||||
NS_IMETHOD_(PRBool) HasAttributeDependentStyle(const nsIAtom* aAttribute) const;
|
||||
NS_IMETHOD_(PRBool) IsAttributeMapped(const nsIAtom* aAttribute) const;
|
||||
};
|
||||
|
||||
nsresult
|
||||
@ -232,14 +232,14 @@ MapAttributesIntoRule(const nsMappedAttributes* aAttributes, nsRuleData* aData)
|
||||
}
|
||||
|
||||
NS_IMETHODIMP_(PRBool)
|
||||
nsHTMLUListElement::HasAttributeDependentStyle(const nsIAtom* aAttribute) const
|
||||
nsHTMLUListElement::IsAttributeMapped(const nsIAtom* aAttribute) const
|
||||
{
|
||||
static const AttributeDependenceEntry attributes[] = {
|
||||
static const MappedAttributeEntry attributes[] = {
|
||||
{ &nsHTMLAtoms::type },
|
||||
{ nsnull }
|
||||
};
|
||||
|
||||
static const AttributeDependenceEntry* const map[] = {
|
||||
static const MappedAttributeEntry* const map[] = {
|
||||
attributes,
|
||||
sCommonAttributeMap,
|
||||
};
|
||||
|
@ -826,11 +826,9 @@ HTMLStyleSheetImpl::HasAttributeDependentStyle(AttributeRuleProcessorData* aData
|
||||
// to descendants of body, when we're already reresolving.
|
||||
|
||||
// Handle the content style rules.
|
||||
if (styledContent) {
|
||||
if (styledContent->HasAttributeDependentStyle(aData->mAttribute)) {
|
||||
*aResult = eReStyle_Self;
|
||||
return NS_OK;
|
||||
}
|
||||
if (styledContent && styledContent->IsAttributeMapped(aData->mAttribute)) {
|
||||
*aResult = eReStyle_Self;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
*aResult = nsReStyleHint(0);
|
||||
|
@ -570,7 +570,7 @@ nsSVGAttributes::AffectsContentStyleRule(const nsIAtom* aAttribute)
|
||||
nsCOMPtr<nsIStyledContent> styledContent = do_QueryInterface(mContent);
|
||||
NS_ASSERTION(styledContent, "could not get nsIStyledContent interface");
|
||||
|
||||
return styledContent->HasAttributeDependentStyle(aAttribute);
|
||||
return styledContent->IsAttributeMapped(aAttribute);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -271,7 +271,7 @@ nsSVGElement::GetInlineStyleRule(nsICSSStyleRule** aStyleRule)
|
||||
}
|
||||
|
||||
// PresentationAttributes-FillStroke
|
||||
/* static */ const nsGenericElement::AttributeDependenceEntry
|
||||
/* static */ const nsGenericElement::MappedAttributeEntry
|
||||
nsSVGElement::sFillStrokeMap[] = {
|
||||
{ &nsSVGAtoms::fill },
|
||||
{ &nsSVGAtoms::fill_opacity },
|
||||
@ -288,7 +288,7 @@ nsSVGElement::sFillStrokeMap[] = {
|
||||
};
|
||||
|
||||
// PresentationAttributes-Graphics
|
||||
/* static */ const nsGenericElement::AttributeDependenceEntry
|
||||
/* static */ const nsGenericElement::MappedAttributeEntry
|
||||
nsSVGElement::sGraphicsMap[] = {
|
||||
{ &nsSVGAtoms::clip_path },
|
||||
{ &nsSVGAtoms::clip_rule },
|
||||
@ -306,7 +306,7 @@ nsSVGElement::sGraphicsMap[] = {
|
||||
};
|
||||
|
||||
// PresentationAttributes-TextContentElements
|
||||
/* static */ const nsGenericElement::AttributeDependenceEntry
|
||||
/* static */ const nsGenericElement::MappedAttributeEntry
|
||||
nsSVGElement::sTextContentElementsMap[] = {
|
||||
{ &nsSVGAtoms::alignment_baseline },
|
||||
{ &nsSVGAtoms::baseline_shift },
|
||||
@ -324,7 +324,7 @@ nsSVGElement::sTextContentElementsMap[] = {
|
||||
};
|
||||
|
||||
// PresentationAttributes-FontSpecification
|
||||
/* static */ const nsGenericElement::AttributeDependenceEntry
|
||||
/* static */ const nsGenericElement::MappedAttributeEntry
|
||||
nsSVGElement::sFontSpecificationMap[] = {
|
||||
{ &nsSVGAtoms::font_family },
|
||||
{ &nsSVGAtoms::font_size },
|
||||
|
@ -111,10 +111,10 @@ public:
|
||||
NS_IMETHOD WalkContentStyleRules(nsRuleWalker* aRuleWalker);
|
||||
NS_IMETHOD GetInlineStyleRule(nsICSSStyleRule** aStyleRule);
|
||||
|
||||
static const AttributeDependenceEntry sFillStrokeMap[];
|
||||
static const AttributeDependenceEntry sGraphicsMap[];
|
||||
static const AttributeDependenceEntry sTextContentElementsMap[];
|
||||
static const AttributeDependenceEntry sFontSpecificationMap[];
|
||||
static const MappedAttributeEntry sFillStrokeMap[];
|
||||
static const MappedAttributeEntry sGraphicsMap[];
|
||||
static const MappedAttributeEntry sTextContentElementsMap[];
|
||||
static const MappedAttributeEntry sFontSpecificationMap[];
|
||||
|
||||
// nsIDOMNode
|
||||
NS_DECL_NSIDOMNODE
|
||||
|
@ -64,7 +64,7 @@ public:
|
||||
NS_FORWARD_NSIDOMSVGELEMENT(nsSVGGElementBase::)
|
||||
|
||||
// nsIStyledContent
|
||||
NS_IMETHOD_(PRBool) HasAttributeDependentStyle(const nsIAtom* aAttribute) const;
|
||||
NS_IMETHOD_(PRBool) IsAttributeMapped(const nsIAtom* aAttribute) const;
|
||||
protected:
|
||||
};
|
||||
|
||||
@ -175,13 +175,13 @@ nsSVGGElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn)
|
||||
// nsIStyledContent methods
|
||||
|
||||
NS_IMETHODIMP_(PRBool)
|
||||
nsSVGGElement::HasAttributeDependentStyle(const nsIAtom* name) const
|
||||
nsSVGGElement::IsAttributeMapped(const nsIAtom* name) const
|
||||
{
|
||||
static const AttributeDependenceEntry* const map[] = {
|
||||
static const MappedAttributeEntry* const map[] = {
|
||||
sTextContentElementsMap,
|
||||
sFontSpecificationMap
|
||||
};
|
||||
|
||||
return FindAttributeDependence(name, map, NS_ARRAY_LENGTH(map)) ||
|
||||
nsSVGGElementBase::HasAttributeDependentStyle(name);
|
||||
nsSVGGElementBase::IsAttributeMapped(name);
|
||||
}
|
||||
|
@ -307,14 +307,14 @@ NS_IMETHODIMP nsSVGGraphicElement::GetTransform(nsIDOMSVGAnimatedTransformList *
|
||||
// nsIStyledContent methods
|
||||
|
||||
NS_IMETHODIMP_(PRBool)
|
||||
nsSVGGraphicElement::HasAttributeDependentStyle(const nsIAtom* name) const
|
||||
nsSVGGraphicElement::IsAttributeMapped(const nsIAtom* name) const
|
||||
{
|
||||
static const AttributeDependenceEntry* const map[] = {
|
||||
static const MappedAttributeEntry* const map[] = {
|
||||
sFillStrokeMap,
|
||||
sGraphicsMap,
|
||||
};
|
||||
|
||||
return FindAttributeDependence(name, map, NS_ARRAY_LENGTH(map)) ||
|
||||
nsSVGGraphicElementBase::HasAttributeDependentStyle(name);
|
||||
nsSVGGraphicElementBase::IsAttributeMapped(name);
|
||||
}
|
||||
|
||||
|
@ -59,7 +59,7 @@ public:
|
||||
NS_DECL_NSIDOMSVGTRANSFORMABLE
|
||||
|
||||
// nsIStyledContent interface
|
||||
NS_IMETHOD_(PRBool) HasAttributeDependentStyle(const nsIAtom* aAttribute) const;
|
||||
NS_IMETHOD_(PRBool) IsAttributeMapped(const nsIAtom* aAttribute) const;
|
||||
|
||||
protected:
|
||||
|
||||
|
@ -93,7 +93,7 @@ public:
|
||||
NS_IMETHOD GetParentViewportRect(nsISVGViewportRect **parentViewport);
|
||||
|
||||
// nsIStyledContent interface
|
||||
NS_IMETHOD_(PRBool) HasAttributeDependentStyle(const nsIAtom* aAttribute) const;
|
||||
NS_IMETHOD_(PRBool) IsAttributeMapped(const nsIAtom* aAttribute) const;
|
||||
|
||||
// nsISVGValueObserver
|
||||
NS_IMETHOD WillModifySVGObservable(nsISVGValue* observable);
|
||||
@ -1086,9 +1086,9 @@ nsSVGSVGElement::GetParentViewportRect(nsISVGViewportRect **parentViewport)
|
||||
// nsIStyledContent methods
|
||||
|
||||
NS_IMETHODIMP_(PRBool)
|
||||
nsSVGSVGElement::HasAttributeDependentStyle(const nsIAtom* name) const
|
||||
nsSVGSVGElement::IsAttributeMapped(const nsIAtom* name) const
|
||||
{
|
||||
static const AttributeDependenceEntry* const map[] = {
|
||||
static const MappedAttributeEntry* const map[] = {
|
||||
sFillStrokeMap,
|
||||
sGraphicsMap,
|
||||
sTextContentElementsMap,
|
||||
@ -1096,7 +1096,7 @@ nsSVGSVGElement::HasAttributeDependentStyle(const nsIAtom* name) const
|
||||
};
|
||||
|
||||
return FindAttributeDependence(name, map, NS_ARRAY_LENGTH(map)) ||
|
||||
nsSVGElement::HasAttributeDependentStyle(name);
|
||||
nsSVGElement::IsAttributeMapped(name);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
@ -74,7 +74,7 @@ public:
|
||||
NS_FORWARD_NSIDOMSVGELEMENT(nsSVGTSpanElementBase::)
|
||||
|
||||
// nsIStyledContent interface
|
||||
NS_IMETHOD_(PRBool) HasAttributeDependentStyle(const nsIAtom* aAttribute) const;
|
||||
NS_IMETHOD_(PRBool) IsAttributeMapped(const nsIAtom* aAttribute) const;
|
||||
|
||||
protected:
|
||||
|
||||
@ -344,9 +344,9 @@ NS_IMETHODIMP nsSVGTSpanElement::SelectSubString(PRUint32 charnum, PRUint32 ncha
|
||||
// nsIStyledContent methods
|
||||
|
||||
NS_IMETHODIMP_(PRBool)
|
||||
nsSVGTSpanElement::HasAttributeDependentStyle(const nsIAtom* name) const
|
||||
nsSVGTSpanElement::IsAttributeMapped(const nsIAtom* name) const
|
||||
{
|
||||
static const AttributeDependenceEntry* const map[] = {
|
||||
static const MappedAttributeEntry* const map[] = {
|
||||
sFillStrokeMap,
|
||||
sGraphicsMap,
|
||||
sTextContentElementsMap,
|
||||
@ -354,7 +354,7 @@ nsSVGTSpanElement::HasAttributeDependentStyle(const nsIAtom* name) const
|
||||
};
|
||||
|
||||
return FindAttributeDependence(name, map, NS_ARRAY_LENGTH(map)) ||
|
||||
nsSVGTSpanElementBase::HasAttributeDependentStyle(name);
|
||||
nsSVGTSpanElementBase::IsAttributeMapped(name);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
@ -78,7 +78,7 @@ public:
|
||||
NS_FORWARD_NSIDOMSVGELEMENT(nsSVGTextElementBase::)
|
||||
|
||||
// nsIStyledContent interface
|
||||
NS_IMETHOD_(PRBool) HasAttributeDependentStyle(const nsIAtom* aAttribute) const;
|
||||
NS_IMETHOD_(PRBool) IsAttributeMapped(const nsIAtom* aAttribute) const;
|
||||
|
||||
protected:
|
||||
virtual void ParentChainChanged();
|
||||
@ -353,15 +353,15 @@ NS_IMETHODIMP nsSVGTextElement::SelectSubString(PRUint32 charnum, PRUint32 nchar
|
||||
// nsIStyledContent methods
|
||||
|
||||
NS_IMETHODIMP_(PRBool)
|
||||
nsSVGTextElement::HasAttributeDependentStyle(const nsIAtom* name) const
|
||||
nsSVGTextElement::IsAttributeMapped(const nsIAtom* name) const
|
||||
{
|
||||
static const AttributeDependenceEntry* const map[] = {
|
||||
static const MappedAttributeEntry* const map[] = {
|
||||
sTextContentElementsMap,
|
||||
sFontSpecificationMap
|
||||
};
|
||||
|
||||
return FindAttributeDependence(name, map, NS_ARRAY_LENGTH(map)) ||
|
||||
nsSVGTextElementBase::HasAttributeDependentStyle(name);
|
||||
nsSVGTextElementBase::IsAttributeMapped(name);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
@ -3302,7 +3302,7 @@ nsXULElement::GetAttributeChangeHint(const nsIAtom* aAttribute,
|
||||
}
|
||||
|
||||
NS_IMETHODIMP_(PRBool)
|
||||
nsXULElement::HasAttributeDependentStyle(const nsIAtom* aAttribute) const
|
||||
nsXULElement::IsAttributeMapped(const nsIAtom* aAttribute) const
|
||||
{
|
||||
return PR_FALSE;
|
||||
}
|
||||
|
@ -514,7 +514,7 @@ public:
|
||||
NS_IMETHOD GetAttributeChangeHint(const nsIAtom* aAttribute,
|
||||
PRInt32 aModType,
|
||||
nsChangeHint& aHint) const;
|
||||
NS_IMETHOD_(PRBool) HasAttributeDependentStyle(const nsIAtom* aAttribute) const;
|
||||
NS_IMETHOD_(PRBool) IsAttributeMapped(const nsIAtom* aAttribute) const;
|
||||
|
||||
// nsIXULContent
|
||||
NS_IMETHOD_(PRUint32) PeekChildCount() const;
|
||||
|
@ -826,11 +826,9 @@ HTMLStyleSheetImpl::HasAttributeDependentStyle(AttributeRuleProcessorData* aData
|
||||
// to descendants of body, when we're already reresolving.
|
||||
|
||||
// Handle the content style rules.
|
||||
if (styledContent) {
|
||||
if (styledContent->HasAttributeDependentStyle(aData->mAttribute)) {
|
||||
*aResult = eReStyle_Self;
|
||||
return NS_OK;
|
||||
}
|
||||
if (styledContent && styledContent->IsAttributeMapped(aData->mAttribute)) {
|
||||
*aResult = eReStyle_Self;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
*aResult = nsReStyleHint(0);
|
||||
|
@ -188,11 +188,22 @@ public:
|
||||
NS_IMETHOD RulesMatching(PseudoRuleProcessorData* aData,
|
||||
nsIAtom* aMedium) = 0;
|
||||
|
||||
// Test if style is dependent on content state
|
||||
/**
|
||||
* Test whether style is dependent on content state. This test is
|
||||
* used for optimization only, and may err on the side of reporting
|
||||
* more dependencies than really exist.
|
||||
*
|
||||
* Event states are defined in nsIEventStateManager.h.
|
||||
*/
|
||||
NS_IMETHOD HasStateDependentStyle(StateRuleProcessorData* aData,
|
||||
nsIAtom* aMedium,
|
||||
nsReStyleHint* aResult) = 0;
|
||||
// Test if style is dependent on attribute
|
||||
|
||||
/**
|
||||
* Test whether style is dependent the presence or value of an
|
||||
* attribute. This test is used for optimization only, and may err on
|
||||
* the side of reporting more dependencies than really exist.
|
||||
*/
|
||||
NS_IMETHOD HasAttributeDependentStyle(AttributeRuleProcessorData* aData,
|
||||
nsIAtom* aMedium,
|
||||
nsReStyleHint* aResult) = 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user