mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-29 15:52:07 +00:00
Bug 890516 - Backout patch from bug 614825. r=bz
This commit is contained in:
parent
17de8eb070
commit
cd4eec0c91
@ -244,13 +244,28 @@ HTMLSharedObjectElement::ParseAttribute(int32_t aNamespaceID,
|
||||
}
|
||||
|
||||
static void
|
||||
MapAttributesIntoRule(const nsMappedAttributes *aAttributes,
|
||||
nsRuleData *aData)
|
||||
MapAttributesIntoRuleBase(const nsMappedAttributes *aAttributes,
|
||||
nsRuleData *aData)
|
||||
{
|
||||
nsGenericHTMLElement::MapImageBorderAttributeInto(aAttributes, aData);
|
||||
nsGenericHTMLElement::MapImageMarginAttributeInto(aAttributes, aData);
|
||||
nsGenericHTMLElement::MapImageSizeAttributesInto(aAttributes, aData);
|
||||
nsGenericHTMLElement::MapImageAlignAttributeInto(aAttributes, aData);
|
||||
}
|
||||
|
||||
static void
|
||||
MapAttributesIntoRuleExceptHidden(const nsMappedAttributes *aAttributes,
|
||||
nsRuleData *aData)
|
||||
{
|
||||
MapAttributesIntoRuleBase(aAttributes, aData);
|
||||
nsGenericHTMLElement::MapCommonAttributesIntoExceptHidden(aAttributes, aData);
|
||||
}
|
||||
|
||||
static void
|
||||
MapAttributesIntoRule(const nsMappedAttributes *aAttributes,
|
||||
nsRuleData *aData)
|
||||
{
|
||||
MapAttributesIntoRuleBase(aAttributes, aData);
|
||||
nsGenericHTMLElement::MapCommonAttributesInto(aAttributes, aData);
|
||||
}
|
||||
|
||||
@ -271,6 +286,10 @@ HTMLSharedObjectElement::IsAttributeMapped(const nsIAtom *aAttribute) const
|
||||
nsMapRuleToAttributesFunc
|
||||
HTMLSharedObjectElement::GetAttributeMappingFunction() const
|
||||
{
|
||||
if (mNodeInfo->Equals(nsGkAtoms::embed)) {
|
||||
return &MapAttributesIntoRuleExceptHidden;
|
||||
}
|
||||
|
||||
return &MapAttributesIntoRule;
|
||||
}
|
||||
|
||||
|
@ -1435,8 +1435,8 @@ nsGenericHTMLElement::ParseScrollingValue(const nsAString& aString,
|
||||
* Handle attributes common to all html elements
|
||||
*/
|
||||
void
|
||||
nsGenericHTMLElement::MapCommonAttributesInto(const nsMappedAttributes* aAttributes,
|
||||
nsRuleData* aData)
|
||||
nsGenericHTMLElement::MapCommonAttributesIntoExceptHidden(const nsMappedAttributes* aAttributes,
|
||||
nsRuleData* aData)
|
||||
{
|
||||
if (aData->mSIDs & NS_STYLE_INHERIT_BIT(UserInterface)) {
|
||||
nsCSSValue* userModify = aData->ValueForUserModify();
|
||||
@ -1466,6 +1466,13 @@ nsGenericHTMLElement::MapCommonAttributesInto(const nsMappedAttributes* aAttribu
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
nsGenericHTMLElement::MapCommonAttributesInto(const nsMappedAttributes* aAttributes,
|
||||
nsRuleData* aData)
|
||||
{
|
||||
MapCommonAttributesIntoExceptHidden(aAttributes, aData);
|
||||
|
||||
if (aData->mSIDs & NS_STYLE_INHERIT_BIT(Display)) {
|
||||
nsCSSValue* display = aData->ValueForDisplay();
|
||||
@ -1477,7 +1484,6 @@ nsGenericHTMLElement::MapCommonAttributesInto(const nsMappedAttributes* aAttribu
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* static */ const nsGenericHTMLElement::MappedAttributeEntry
|
||||
nsGenericHTMLElement::sCommonAttributeMap[] = {
|
||||
{ &nsGkAtoms::contenteditable },
|
||||
|
@ -509,7 +509,7 @@ public:
|
||||
/**
|
||||
* A style attribute mapping function for the most common attributes, to be
|
||||
* called by subclasses' attribute mapping functions. Currently handles
|
||||
* dir and lang, could handle others.
|
||||
* dir, lang and hidden, could handle others.
|
||||
*
|
||||
* @param aAttributes the list of attributes to map
|
||||
* @param aData the returned rule data [INOUT]
|
||||
@ -517,6 +517,15 @@ public:
|
||||
*/
|
||||
static void MapCommonAttributesInto(const nsMappedAttributes* aAttributes,
|
||||
nsRuleData* aRuleData);
|
||||
/**
|
||||
* Same as MapCommonAttributesInto except that it does not handle hidden.
|
||||
*
|
||||
* @param aAttributes the list of attributes to map
|
||||
* @param aData the returned rule data [INOUT]
|
||||
* @see GetAttributeMappingFunction
|
||||
*/
|
||||
static void MapCommonAttributesIntoExceptHidden(const nsMappedAttributes* aAttributes,
|
||||
nsRuleData* aRuleData);
|
||||
|
||||
static const MappedAttributeEntry sCommonAttributeMap[];
|
||||
static const MappedAttributeEntry sImageMarginSizeAttributeMap[];
|
||||
|
@ -24,7 +24,7 @@ var rect = document.getElementsByTagName('embed')[0].getBoundingClientRect();
|
||||
var hasFrame = rect.left != 0 || rect.right != 0 || rect.top != 0 ||
|
||||
rect.bottom != 0;
|
||||
|
||||
ok(!hasFrame, "embed should not have a frame with hidden set");
|
||||
ok(hasFrame, "embed should have a frame with hidden set");
|
||||
|
||||
</script>
|
||||
</pre>
|
||||
|
Loading…
Reference in New Issue
Block a user