--- a/dom/html/HTMLBRElement.cpp
+++ b/dom/html/HTMLBRElement.cpp
@@ -48,24 +48,24 @@ HTMLBRElement::ParseAttribute(int32_t aN
}
return nsGenericHTMLElement::ParseAttribute(aNamespaceID, aAttribute, aValue,
aMaybeScriptedPrincipal, aResult);
}
void
HTMLBRElement::MapAttributesIntoRule(const nsMappedAttributes* aAttributes,
- GenericSpecifiedValues* aData)
+ MappedDeclarations& aDecls)
{
if (!aData->PropertyIsSet(eCSSProperty_clear)) {
const nsAttrValue* value = aAttributes->GetAttr(nsGkAtoms::clear);
if (value && value->Type() == nsAttrValue::eEnum)
aData->SetKeywordValue(eCSSProperty_clear, value->GetEnumValue());
}
- nsGenericHTMLElement::MapCommonAttributesInto(aAttributes, aData);
+ nsGenericHTMLElement::MapCommonAttributesInto(aAttributes, aDecls);
}
NS_IMETHODIMP_(bool)
HTMLBRElement::IsAttributeMapped(const nsAtom* aAttribute) const
{
static const MappedAttributeEntry attributes[] = {
{ &nsGkAtoms::clear },
{ nullptr }
--- a/dom/html/HTMLBodyElement.cpp
+++ b/dom/html/HTMLBodyElement.cpp
@@ -69,17 +69,17 @@ HTMLBodyElement::ParseAttribute(int32_t
aAttribute, aValue,
aResult) ||
nsGenericHTMLElement::ParseAttribute(aNamespaceID, aAttribute, aValue,
aMaybeScriptedPrincipal, aResult);
}
void
HTMLBodyElement::MapAttributesIntoRule(const nsMappedAttributes* aAttributes,
- GenericSpecifiedValues* aData)
+ MappedDeclarations& aDecls)
{
// This is the one place where we try to set the same property
// multiple times in presentation attributes. Servo does not support
// querying if a property is set (because that is O(n) behavior
// in ServoSpecifiedValues). Instead, we use the below values to keep
// track of whether we have already set a property, and if so, what value
// we set it to (which is used when handling margin
// attributes from the containing frame element)
@@ -213,18 +213,18 @@ HTMLBodyElement::MapAttributesIntoRule(c
// color: color
nscolor color;
value = aAttributes->GetAttr(nsGkAtoms::text);
if (value && value->GetColorValue(color)) {
aData->SetColorValue(eCSSProperty_color, color);
}
}
- nsGenericHTMLElement::MapBackgroundAttributesInto(aAttributes, aData);
- nsGenericHTMLElement::MapCommonAttributesInto(aAttributes, aData);
+ nsGenericHTMLElement::MapBackgroundAttributesInto(aAttributes, aDecls);
+ nsGenericHTMLElement::MapCommonAttributesInto(aAttributes, aDecls);
}
nsMapRuleToAttributesFunc
HTMLBodyElement::GetAttributeMappingFunction() const
{
return &MapAttributesIntoRule;
}
--- a/dom/html/HTMLDivElement.cpp
+++ b/dom/html/HTMLDivElement.cpp
@@ -56,29 +56,29 @@ HTMLDivElement::ParseAttribute(int32_t a
}
return nsGenericHTMLElement::ParseAttribute(aNamespaceID, aAttribute, aValue,
aMaybeScriptedPrincipal, aResult);
}
void
HTMLDivElement::MapAttributesIntoRule(const nsMappedAttributes* aAttributes,
- GenericSpecifiedValues* aData)
+ MappedDeclarations& aDecls)
{
- nsGenericHTMLElement::MapDivAlignAttributeInto(aAttributes, aData);
- nsGenericHTMLElement::MapCommonAttributesInto(aAttributes, aData);
+ nsGenericHTMLElement::MapDivAlignAttributeInto(aAttributes, aDecls);
+ nsGenericHTMLElement::MapCommonAttributesInto(aAttributes, aDecls);
}
static void
-MapMarqueeAttributesIntoRule(const nsMappedAttributes* aAttributes, GenericSpecifiedValues* aData)
+MapMarqueeAttributesIntoRule(const nsMappedAttributes* aAttributes, MappedDeclarations& aDecls)
{
- nsGenericHTMLElement::MapImageMarginAttributeInto(aAttributes, aData);
- nsGenericHTMLElement::MapImageSizeAttributesInto(aAttributes, aData);
- nsGenericHTMLElement::MapCommonAttributesInto(aAttributes, aData);
- nsGenericHTMLElement::MapBGColorInto(aAttributes, aData);
+ nsGenericHTMLElement::MapImageMarginAttributeInto(aAttributes, aDecls);
+ nsGenericHTMLElement::MapImageSizeAttributesInto(aAttributes, aDecls);
+ nsGenericHTMLElement::MapCommonAttributesInto(aAttributes, aDecls);
+ nsGenericHTMLElement::MapBGColorInto(aAttributes, aDecls);
}
NS_IMETHODIMP_(bool)
HTMLDivElement::IsAttributeMapped(const nsAtom* aAttribute) const
{
if (mNodeInfo->Equals(nsGkAtoms::div)) {
static const MappedAttributeEntry* const map[] = {
sDivAlignAttributeMap,
--- a/dom/html/HTMLEmbedElement.cpp
+++ b/dom/html/HTMLEmbedElement.cpp
@@ -233,38 +233,38 @@ HTMLEmbedElement::ParseAttribute(int32_t
}
return nsGenericHTMLElement::ParseAttribute(aNamespaceID, aAttribute, aValue,
aMaybeScriptedPrincipal, aResult);
}
static void
MapAttributesIntoRuleBase(const nsMappedAttributes *aAttributes,
- GenericSpecifiedValues* aData)
+ MappedDeclarations& aDecls)
{
- nsGenericHTMLElement::MapImageBorderAttributeInto(aAttributes, aData);
- nsGenericHTMLElement::MapImageMarginAttributeInto(aAttributes, aData);
- nsGenericHTMLElement::MapImageSizeAttributesInto(aAttributes, aData);
- nsGenericHTMLElement::MapImageAlignAttributeInto(aAttributes, aData);
+ nsGenericHTMLElement::MapImageBorderAttributeInto(aAttributes, aDecls);
+ nsGenericHTMLElement::MapImageMarginAttributeInto(aAttributes, aDecls);
+ nsGenericHTMLElement::MapImageSizeAttributesInto(aAttributes, aDecls);
+ nsGenericHTMLElement::MapImageAlignAttributeInto(aAttributes, aDecls);
}
static void
MapAttributesIntoRuleExceptHidden(const nsMappedAttributes *aAttributes,
- GenericSpecifiedValues* aData)
+ MappedDeclarations& aDecls)
{
- MapAttributesIntoRuleBase(aAttributes, aData);
- nsGenericHTMLElement::MapCommonAttributesIntoExceptHidden(aAttributes, aData);
+ MapAttributesIntoRuleBase(aAttributes, aDecls);
+ nsGenericHTMLElement::MapCommonAttributesIntoExceptHidden(aAttributes, aDecls);
}
void
HTMLEmbedElement::MapAttributesIntoRule(const nsMappedAttributes *aAttributes,
- GenericSpecifiedValues* aData)
+ MappedDeclarations& aDecls)
{
- MapAttributesIntoRuleBase(aAttributes, aData);
- nsGenericHTMLElement::MapCommonAttributesInto(aAttributes, aData);
+ MapAttributesIntoRuleBase(aAttributes, aDecls);
+ nsGenericHTMLElement::MapCommonAttributesInto(aAttributes, aDecls);
}
NS_IMETHODIMP_(bool)
HTMLEmbedElement::IsAttributeMapped(const nsAtom *aAttribute) const
{
static const MappedAttributeEntry* const map[] = {
sCommonAttributeMap,
sImageMarginSizeAttributeMap,
--- a/dom/html/HTMLFontElement.cpp
+++ b/dom/html/HTMLFontElement.cpp
@@ -50,17 +50,17 @@ HTMLFontElement::ParseAttribute(int32_t
}
return nsGenericHTMLElement::ParseAttribute(aNamespaceID, aAttribute, aValue,
aMaybeScriptedPrincipal, aResult);
}
void
HTMLFontElement::MapAttributesIntoRule(const nsMappedAttributes* aAttributes,
- GenericSpecifiedValues* aData)
+ MappedDeclarations& aDecls)
{
// face: string list
if (!aData->PropertyIsSet(eCSSProperty_font_family)) {
const nsAttrValue* value = aAttributes->GetAttr(nsGkAtoms::face);
if (value && value->Type() == nsAttrValue::eString &&
!value->IsEmptyString()) {
aData->SetFontFamily(value->GetStringValue());
}
@@ -85,17 +85,17 @@ HTMLFontElement::MapAttributesIntoRule(c
// affects quirks mode rendering.
const nsAttrValue* value = aAttributes->GetAttr(nsGkAtoms::color);
nscolor color;
if (value && value->GetColorValue(color)) {
aData->SetTextDecorationColorOverride();
}
}
- nsGenericHTMLElement::MapCommonAttributesInto(aAttributes, aData);
+ nsGenericHTMLElement::MapCommonAttributesInto(aAttributes, aDecls);
}
NS_IMETHODIMP_(bool)
HTMLFontElement::IsAttributeMapped(const nsAtom* aAttribute) const
{
static const MappedAttributeEntry attributes[] = {
{ &nsGkAtoms::face },
{ &nsGkAtoms::size },
--- a/dom/html/HTMLHRElement.cpp
+++ b/dom/html/HTMLHRElement.cpp
@@ -56,17 +56,17 @@ HTMLHRElement::ParseAttribute(int32_t aN
}
return nsGenericHTMLElement::ParseAttribute(aNamespaceID, aAttribute, aValue,
aMaybeScriptedPrincipal, aResult);
}
void
HTMLHRElement::MapAttributesIntoRule(const nsMappedAttributes* aAttributes,
- GenericSpecifiedValues* aData)
+ MappedDeclarations& aDecls)
{
bool noshade = false;
const nsAttrValue* colorValue = aAttributes->GetAttr(nsGkAtoms::color);
nscolor color;
bool colorIsSet = colorValue && colorValue->GetColorValue(color);
if (colorIsSet) {
@@ -160,18 +160,18 @@ HTMLHRElement::MapAttributesIntoRule(con
}
}
// color: a color
// (we got the color attribute earlier)
if (colorIsSet) {
aData->SetColorValueIfUnset(eCSSProperty_color, color);
}
- nsGenericHTMLElement::MapWidthAttributeInto(aAttributes, aData);
- nsGenericHTMLElement::MapCommonAttributesInto(aAttributes, aData);
+ nsGenericHTMLElement::MapWidthAttributeInto(aAttributes, aDecls);
+ nsGenericHTMLElement::MapCommonAttributesInto(aAttributes, aDecls);
}
NS_IMETHODIMP_(bool)
HTMLHRElement::IsAttributeMapped(const nsAtom* aAttribute) const
{
static const MappedAttributeEntry attributes[] = {
{ &nsGkAtoms::align },
{ &nsGkAtoms::width },
--- a/dom/html/HTMLHeadingElement.cpp
+++ b/dom/html/HTMLHeadingElement.cpp
@@ -42,20 +42,20 @@ HTMLHeadingElement::ParseAttribute(int32
}
return nsGenericHTMLElement::ParseAttribute(aNamespaceID, aAttribute, aValue,
aMaybeScriptedPrincipal, aResult);
}
void
HTMLHeadingElement::MapAttributesIntoRule(const nsMappedAttributes* aAttributes,
- GenericSpecifiedValues* aData)
+ MappedDeclarations& aDecls)
{
- nsGenericHTMLElement::MapDivAlignAttributeInto(aAttributes, aData);
- nsGenericHTMLElement::MapCommonAttributesInto(aAttributes, aData);
+ nsGenericHTMLElement::MapDivAlignAttributeInto(aAttributes, aDecls);
+ nsGenericHTMLElement::MapCommonAttributesInto(aAttributes, aDecls);
}
NS_IMETHODIMP_(bool)
HTMLHeadingElement::IsAttributeMapped(const nsAtom* aAttribute) const
{
static const MappedAttributeEntry* const map[] = {
sDivAlignAttributeMap,
sCommonAttributeMap
--- a/dom/html/HTMLIFrameElement.cpp
+++ b/dom/html/HTMLIFrameElement.cpp
@@ -77,17 +77,17 @@ HTMLIFrameElement::ParseAttribute(int32_
return nsGenericHTMLFrameElement::ParseAttribute(aNamespaceID, aAttribute,
aValue,
aMaybeScriptedPrincipal,
aResult);
}
void
HTMLIFrameElement::MapAttributesIntoRule(const nsMappedAttributes* aAttributes,
- GenericSpecifiedValues* aData)
+ MappedDeclarations& aDecls)
{
// frameborder: 0 | 1 (| NO | YES in quirks mode)
// If frameborder is 0 or No, set border to 0
// else leave it as the value set in html.css
const nsAttrValue* value = aAttributes->GetAttr(nsGkAtoms::frameborder);
if (value && value->Type() == nsAttrValue::eEnum) {
int32_t frameborder = value->GetEnumValue();
if (NS_STYLE_FRAME_0 == frameborder ||
@@ -95,19 +95,19 @@ HTMLIFrameElement::MapAttributesIntoRule
NS_STYLE_FRAME_OFF == frameborder) {
aData->SetPixelValueIfUnset(eCSSProperty_border_top_width, 0.0f);
aData->SetPixelValueIfUnset(eCSSProperty_border_right_width, 0.0f);
aData->SetPixelValueIfUnset(eCSSProperty_border_bottom_width, 0.0f);
aData->SetPixelValueIfUnset(eCSSProperty_border_left_width, 0.0f);
}
}
- nsGenericHTMLElement::MapImageSizeAttributesInto(aAttributes, aData);
- nsGenericHTMLElement::MapImageAlignAttributeInto(aAttributes, aData);
- nsGenericHTMLElement::MapCommonAttributesInto(aAttributes, aData);
+ nsGenericHTMLElement::MapImageSizeAttributesInto(aAttributes, aDecls);
+ nsGenericHTMLElement::MapImageAlignAttributeInto(aAttributes, aDecls);
+ nsGenericHTMLElement::MapCommonAttributesInto(aAttributes, aDecls);
}
NS_IMETHODIMP_(bool)
HTMLIFrameElement::IsAttributeMapped(const nsAtom* aAttribute) const
{
static const MappedAttributeEntry attributes[] = {
{ &nsGkAtoms::width },
{ &nsGkAtoms::height },
--- a/dom/html/HTMLImageElement.cpp
+++ b/dom/html/HTMLImageElement.cpp
@@ -243,23 +243,23 @@ HTMLImageElement::ParseAttribute(int32_t
}
return nsGenericHTMLElement::ParseAttribute(aNamespaceID, aAttribute, aValue,
aMaybeScriptedPrincipal, aResult);
}
void
HTMLImageElement::MapAttributesIntoRule(const nsMappedAttributes* aAttributes,
- GenericSpecifiedValues* aData)
+ MappedDeclarations& aDecls)
{
- nsGenericHTMLElement::MapImageAlignAttributeInto(aAttributes, aData);
- nsGenericHTMLElement::MapImageBorderAttributeInto(aAttributes, aData);
- nsGenericHTMLElement::MapImageMarginAttributeInto(aAttributes, aData);
- nsGenericHTMLElement::MapImageSizeAttributesInto(aAttributes, aData);
- nsGenericHTMLElement::MapCommonAttributesInto(aAttributes, aData);
+ nsGenericHTMLElement::MapImageAlignAttributeInto(aAttributes, aDecls);
+ nsGenericHTMLElement::MapImageBorderAttributeInto(aAttributes, aDecls);
+ nsGenericHTMLElement::MapImageMarginAttributeInto(aAttributes, aDecls);
+ nsGenericHTMLElement::MapImageSizeAttributesInto(aAttributes, aDecls);
+ nsGenericHTMLElement::MapCommonAttributesInto(aAttributes, aDecls);
}
nsChangeHint
HTMLImageElement::GetAttributeChangeHint(const nsAtom* aAttribute,
int32_t aModType) const
{
nsChangeHint retval =
nsGenericHTMLElement::GetAttributeChangeHint(aAttribute, aModType);
--- a/dom/html/HTMLInputElement.cpp
+++ b/dom/html/HTMLInputElement.cpp
@@ -5576,29 +5576,29 @@ HTMLInputElement::ParseAttribute(int32_t
}
return nsGenericHTMLElement::ParseAttribute(aNamespaceID, aAttribute, aValue,
aMaybeScriptedPrincipal, aResult);
}
void
HTMLInputElement::MapAttributesIntoRule(const nsMappedAttributes* aAttributes,
- GenericSpecifiedValues* aData)
+ MappedDeclarations& aDecls)
{
const nsAttrValue* value = aAttributes->GetAttr(nsGkAtoms::type);
if (value && value->Type() == nsAttrValue::eEnum &&
value->GetEnumValue() == NS_FORM_INPUT_IMAGE) {
- nsGenericHTMLFormElementWithState::MapImageBorderAttributeInto(aAttributes, aData);
- nsGenericHTMLFormElementWithState::MapImageMarginAttributeInto(aAttributes, aData);
- nsGenericHTMLFormElementWithState::MapImageSizeAttributesInto(aAttributes, aData);
+ nsGenericHTMLFormElementWithState::MapImageBorderAttributeInto(aAttributes, aDecls);
+ nsGenericHTMLFormElementWithState::MapImageMarginAttributeInto(aAttributes, aDecls);
+ nsGenericHTMLFormElementWithState::MapImageSizeAttributesInto(aAttributes, aDecls);
// Images treat align as "float"
- nsGenericHTMLFormElementWithState::MapImageAlignAttributeInto(aAttributes, aData);
- }
-
- nsGenericHTMLFormElementWithState::MapCommonAttributesInto(aAttributes, aData);
+ nsGenericHTMLFormElementWithState::MapImageAlignAttributeInto(aAttributes, aDecls);
+ }
+
+ nsGenericHTMLFormElementWithState::MapCommonAttributesInto(aAttributes, aDecls);
}
nsChangeHint
HTMLInputElement::GetAttributeChangeHint(const nsAtom* aAttribute,
int32_t aModType) const
{
nsChangeHint retval =
nsGenericHTMLFormElementWithState::GetAttributeChangeHint(aAttribute, aModType);
--- a/dom/html/HTMLLIElement.cpp
+++ b/dom/html/HTMLLIElement.cpp
@@ -62,26 +62,26 @@ HTMLLIElement::ParseAttribute(int32_t aN
}
return nsGenericHTMLElement::ParseAttribute(aNamespaceID, aAttribute, aValue,
aMaybeScriptedPrincipal, aResult);
}
void
HTMLLIElement::MapAttributesIntoRule(const nsMappedAttributes* aAttributes,
- GenericSpecifiedValues* aData)
+ MappedDeclarations& aDecls)
{
if (!aData->PropertyIsSet(eCSSProperty_list_style_type)) {
// type: enum
const nsAttrValue* value = aAttributes->GetAttr(nsGkAtoms::type);
if (value && value->Type() == nsAttrValue::eEnum)
aData->SetKeywordValue(eCSSProperty_list_style_type, value->GetEnumValue());
}
- nsGenericHTMLElement::MapCommonAttributesInto(aAttributes, aData);
+ nsGenericHTMLElement::MapCommonAttributesInto(aAttributes, aDecls);
}
NS_IMETHODIMP_(bool)
HTMLLIElement::IsAttributeMapped(const nsAtom* aAttribute) const
{
static const MappedAttributeEntry attributes[] = {
{ &nsGkAtoms::type },
{ nullptr },
--- a/dom/html/HTMLObjectElement.cpp
+++ b/dom/html/HTMLObjectElement.cpp
@@ -463,21 +463,21 @@ HTMLObjectElement::ParseAttribute(int32_
return nsGenericHTMLFormElement::ParseAttribute(aNamespaceID, aAttribute,
aValue, aMaybeScriptedPrincipal, aResult);
}
void
HTMLObjectElement::MapAttributesIntoRule(const nsMappedAttributes *aAttributes,
GenericSpecifiedValues *aData)
{
- nsGenericHTMLFormElement::MapImageAlignAttributeInto(aAttributes, aData);
- nsGenericHTMLFormElement::MapImageBorderAttributeInto(aAttributes, aData);
- nsGenericHTMLFormElement::MapImageMarginAttributeInto(aAttributes, aData);
- nsGenericHTMLFormElement::MapImageSizeAttributesInto(aAttributes, aData);
- nsGenericHTMLFormElement::MapCommonAttributesInto(aAttributes, aData);
+ nsGenericHTMLFormElement::MapImageAlignAttributeInto(aAttributes, aDecls);
+ nsGenericHTMLFormElement::MapImageBorderAttributeInto(aAttributes, aDecls);
+ nsGenericHTMLFormElement::MapImageMarginAttributeInto(aAttributes, aDecls);
+ nsGenericHTMLFormElement::MapImageSizeAttributesInto(aAttributes, aDecls);
+ nsGenericHTMLFormElement::MapCommonAttributesInto(aAttributes, aDecls);
}
NS_IMETHODIMP_(bool)
HTMLObjectElement::IsAttributeMapped(const nsAtom *aAttribute) const
{
static const MappedAttributeEntry* const map[] = {
sCommonAttributeMap,
sImageMarginSizeAttributeMap,
--- a/dom/html/HTMLParagraphElement.cpp
+++ b/dom/html/HTMLParagraphElement.cpp
@@ -35,20 +35,20 @@ HTMLParagraphElement::ParseAttribute(int
}
return nsGenericHTMLElement::ParseAttribute(aNamespaceID, aAttribute, aValue,
aMaybeScriptedPrincipal, aResult);
}
void
HTMLParagraphElement::MapAttributesIntoRule(const nsMappedAttributes* aAttributes,
- GenericSpecifiedValues* aData)
+ MappedDeclarations& aDecls)
{
- nsGenericHTMLElement::MapDivAlignAttributeInto(aAttributes, aData);
- nsGenericHTMLElement::MapCommonAttributesInto(aAttributes, aData);
+ nsGenericHTMLElement::MapDivAlignAttributeInto(aAttributes, aDecls);
+ nsGenericHTMLElement::MapCommonAttributesInto(aAttributes, aDecls);
}
NS_IMETHODIMP_(bool)
HTMLParagraphElement::IsAttributeMapped(const nsAtom* aAttribute) const
{
static const MappedAttributeEntry* const map[] = {
sDivAlignAttributeMap,
sCommonAttributeMap,
--- a/dom/html/HTMLPreElement.cpp
+++ b/dom/html/HTMLPreElement.cpp
@@ -38,25 +38,25 @@ HTMLPreElement::ParseAttribute(int32_t a
}
return nsGenericHTMLElement::ParseAttribute(aNamespaceID, aAttribute, aValue,
aMaybeScriptedPrincipal, aResult);
}
void
HTMLPreElement::MapAttributesIntoRule(const nsMappedAttributes* aAttributes,
- GenericSpecifiedValues* aData)
+ MappedDeclarations& aDecls)
{
if (!aData->PropertyIsSet(eCSSProperty_white_space)) {
// wrap: empty
if (aAttributes->GetAttr(nsGkAtoms::wrap))
aData->SetKeywordValue(eCSSProperty_white_space, StyleWhiteSpace::PreWrap);
}
- nsGenericHTMLElement::MapCommonAttributesInto(aAttributes, aData);
+ nsGenericHTMLElement::MapCommonAttributesInto(aAttributes, aDecls);
}
NS_IMETHODIMP_(bool)
HTMLPreElement::IsAttributeMapped(const nsAtom* aAttribute) const
{
if (!mNodeInfo->Equals(nsGkAtoms::pre)) {
return nsGenericHTMLElement::IsAttributeMapped(aAttribute);
}
--- a/dom/html/HTMLSelectElement.cpp
+++ b/dom/html/HTMLSelectElement.cpp
@@ -1268,20 +1268,20 @@ HTMLSelectElement::ParseAttribute(int32_
}
}
return nsGenericHTMLElement::ParseAttribute(aNamespaceID, aAttribute, aValue,
aMaybeScriptedPrincipal, aResult);
}
void
HTMLSelectElement::MapAttributesIntoRule(const nsMappedAttributes* aAttributes,
- GenericSpecifiedValues* aData)
+ MappedDeclarations& aDecls)
{
- nsGenericHTMLFormElementWithState::MapImageAlignAttributeInto(aAttributes, aData);
- nsGenericHTMLFormElementWithState::MapCommonAttributesInto(aAttributes, aData);
+ nsGenericHTMLFormElementWithState::MapImageAlignAttributeInto(aAttributes, aDecls);
+ nsGenericHTMLFormElementWithState::MapCommonAttributesInto(aAttributes, aDecls);
}
nsChangeHint
HTMLSelectElement::GetAttributeChangeHint(const nsAtom* aAttribute,
int32_t aModType) const
{
nsChangeHint retval =
nsGenericHTMLFormElementWithState::GetAttributeChangeHint(aAttribute, aModType);
--- a/dom/html/HTMLSharedElement.cpp
+++ b/dom/html/HTMLSharedElement.cpp
@@ -74,31 +74,31 @@ HTMLSharedElement::ParseAttribute(int32_
}
return nsGenericHTMLElement::ParseAttribute(aNamespaceID, aAttribute, aValue,
aMaybeScriptedPrincipal, aResult);
}
static void
DirectoryMapAttributesIntoRule(const nsMappedAttributes* aAttributes,
- GenericSpecifiedValues* aData)
+ MappedDeclarations& aDecls)
{
if (!aData->PropertyIsSet(eCSSProperty_list_style_type)) {
// type: enum
const nsAttrValue* value = aAttributes->GetAttr(nsGkAtoms::type);
if (value) {
if (value->Type() == nsAttrValue::eEnum) {
aData->SetKeywordValue(eCSSProperty_list_style_type, value->GetEnumValue());
} else {
aData->SetKeywordValue(eCSSProperty_list_style_type, NS_STYLE_LIST_STYLE_DISC);
}
}
}
- nsGenericHTMLElement::MapCommonAttributesInto(aAttributes, aData);
+ nsGenericHTMLElement::MapCommonAttributesInto(aAttributes, aDecls);
}
NS_IMETHODIMP_(bool)
HTMLSharedElement::IsAttributeMapped(const nsAtom* aAttribute) const
{
if (mNodeInfo->Equals(nsGkAtoms::dir)) {
static const MappedAttributeEntry attributes[] = {
{ &nsGkAtoms::type },
--- a/dom/html/HTMLSharedListElement.cpp
+++ b/dom/html/HTMLSharedListElement.cpp
@@ -76,27 +76,27 @@ HTMLSharedListElement::ParseAttribute(in
}
return nsGenericHTMLElement::ParseAttribute(aNamespaceID, aAttribute, aValue,
aMaybeScriptedPrincipal, aResult);
}
void
HTMLSharedListElement::MapAttributesIntoRule(const nsMappedAttributes* aAttributes,
- GenericSpecifiedValues* aData)
+ MappedDeclarations& aDecls)
{
if (!aData->PropertyIsSet(eCSSProperty_list_style_type)) {
// type: enum
const nsAttrValue* value = aAttributes->GetAttr(nsGkAtoms::type);
if (value && value->Type() == nsAttrValue::eEnum) {
aData->SetKeywordValue(eCSSProperty_list_style_type, value->GetEnumValue());
}
}
- nsGenericHTMLElement::MapCommonAttributesInto(aAttributes, aData);
+ nsGenericHTMLElement::MapCommonAttributesInto(aAttributes, aDecls);
}
NS_IMETHODIMP_(bool)
HTMLSharedListElement::IsAttributeMapped(const nsAtom* aAttribute) const
{
if (mNodeInfo->Equals(nsGkAtoms::ol) ||
mNodeInfo->Equals(nsGkAtoms::ul)) {
static const MappedAttributeEntry attributes[] = {
--- a/dom/html/HTMLTableCaptionElement.cpp
+++ b/dom/html/HTMLTableCaptionElement.cpp
@@ -48,25 +48,25 @@ HTMLTableCaptionElement::ParseAttribute(
}
return nsGenericHTMLElement::ParseAttribute(aNamespaceID, aAttribute, aValue,
aMaybeScriptedPrincipal, aResult);
}
void
HTMLTableCaptionElement::MapAttributesIntoRule(const nsMappedAttributes* aAttributes,
- GenericSpecifiedValues* aData)
+ MappedDeclarations& aDecls)
{
if (!aData->PropertyIsSet(eCSSProperty_caption_side)) {
const nsAttrValue* value = aAttributes->GetAttr(nsGkAtoms::align);
if (value && value->Type() == nsAttrValue::eEnum)
aData->SetKeywordValue(eCSSProperty_caption_side, value->GetEnumValue());
}
- nsGenericHTMLElement::MapCommonAttributesInto(aAttributes, aData);
+ nsGenericHTMLElement::MapCommonAttributesInto(aAttributes, aDecls);
}
NS_IMETHODIMP_(bool)
HTMLTableCaptionElement::IsAttributeMapped(const nsAtom* aAttribute) const
{
static const MappedAttributeEntry attributes[] = {
{ &nsGkAtoms::align },
{ nullptr }
--- a/dom/html/HTMLTableCellElement.cpp
+++ b/dom/html/HTMLTableCellElement.cpp
@@ -178,17 +178,17 @@ HTMLTableCellElement::ParseAttribute(int
aAttribute, aValue,
aResult) ||
nsGenericHTMLElement::ParseAttribute(aNamespaceID, aAttribute, aValue,
aMaybeScriptedPrincipal, aResult);
}
void
HTMLTableCellElement::MapAttributesIntoRule(const nsMappedAttributes* aAttributes,
- GenericSpecifiedValues* aData)
+ MappedDeclarations& aDecls)
{
// width: value
if (!aData->PropertyIsSet(eCSSProperty_width)) {
const nsAttrValue* value = aAttributes->GetAttr(nsGkAtoms::width);
if (value && value->Type() == nsAttrValue::eInteger) {
if (value->GetIntegerValue() > 0)
aData->SetPixelValue(eCSSProperty_width, (float)value->GetIntegerValue());
// else 0 implies auto for compatibility.
@@ -222,20 +222,20 @@ HTMLTableCellElement::MapAttributesIntoR
if (!value || value->Type() != nsAttrValue::eInteger ||
value->GetIntegerValue() == 0 ||
eCompatibility_NavQuirks != mode) {
aData->SetKeywordValue(eCSSProperty_white_space, StyleWhiteSpace::Nowrap);
}
}
}
- nsGenericHTMLElement::MapDivAlignAttributeInto(aAttributes, aData);
- nsGenericHTMLElement::MapVAlignAttributeInto(aAttributes, aData);
- nsGenericHTMLElement::MapBackgroundAttributesInto(aAttributes, aData);
- nsGenericHTMLElement::MapCommonAttributesInto(aAttributes, aData);
+ nsGenericHTMLElement::MapDivAlignAttributeInto(aAttributes, aDecls);
+ nsGenericHTMLElement::MapVAlignAttributeInto(aAttributes, aDecls);
+ nsGenericHTMLElement::MapBackgroundAttributesInto(aAttributes, aDecls);
+ nsGenericHTMLElement::MapCommonAttributesInto(aAttributes, aDecls);
}
NS_IMETHODIMP_(bool)
HTMLTableCellElement::IsAttributeMapped(const nsAtom* aAttribute) const
{
static const MappedAttributeEntry attributes[] = {
{ &nsGkAtoms::align },
{ &nsGkAtoms::valign },
--- a/dom/html/HTMLTableColElement.cpp
+++ b/dom/html/HTMLTableColElement.cpp
@@ -60,36 +60,36 @@ HTMLTableColElement::ParseAttribute(int3
}
return nsGenericHTMLElement::ParseAttribute(aNamespaceID, aAttribute, aValue,
aMaybeScriptedPrincipal, aResult);
}
void
HTMLTableColElement::MapAttributesIntoRule(const nsMappedAttributes* aAttributes,
- GenericSpecifiedValues* aData)
+ MappedDeclarations& aDecls)
{
if (!aData->PropertyIsSet(eCSSProperty__x_span)) {
// span: int
const nsAttrValue* value = aAttributes->GetAttr(nsGkAtoms::span);
if (value && value->Type() == nsAttrValue::eInteger) {
int32_t val = value->GetIntegerValue();
// Note: Do NOT use this code for table cells! The value "0"
// means something special for colspan and rowspan, but for <col
// span> and <colgroup span> it's just disallowed.
if (val > 0) {
aData->SetIntValue(eCSSProperty__x_span, value->GetIntegerValue());
}
}
}
- nsGenericHTMLElement::MapWidthAttributeInto(aAttributes, aData);
- nsGenericHTMLElement::MapDivAlignAttributeInto(aAttributes, aData);
- nsGenericHTMLElement::MapVAlignAttributeInto(aAttributes, aData);
- nsGenericHTMLElement::MapCommonAttributesInto(aAttributes, aData);
+ nsGenericHTMLElement::MapWidthAttributeInto(aAttributes, aDecls);
+ nsGenericHTMLElement::MapDivAlignAttributeInto(aAttributes, aDecls);
+ nsGenericHTMLElement::MapVAlignAttributeInto(aAttributes, aDecls);
+ nsGenericHTMLElement::MapCommonAttributesInto(aAttributes, aDecls);
}
NS_IMETHODIMP_(bool)
HTMLTableColElement::IsAttributeMapped(const nsAtom* aAttribute) const
{
static const MappedAttributeEntry attributes[] = {
{ &nsGkAtoms::width },
{ &nsGkAtoms::align },
--- a/dom/html/HTMLTableElement.cpp
+++ b/dom/html/HTMLTableElement.cpp
@@ -927,17 +927,17 @@ HTMLTableElement::ParseAttribute(int32_t
nsGenericHTMLElement::ParseAttribute(aNamespaceID, aAttribute, aValue,
aMaybeScriptedPrincipal, aResult);
}
void
HTMLTableElement::MapAttributesIntoRule(const nsMappedAttributes* aAttributes,
- GenericSpecifiedValues* aData)
+ MappedDeclarations& aDecls)
{
// XXX Bug 211636: This function is used by a single style rule
// that's used to match two different type of elements -- tables, and
// table cells. (nsHTMLTableCellElement overrides
// WalkContentStyleRules so that this happens.) This violates the
// nsIStyleRule contract, since it's the same style rule object doing
// the mapping in two different ways. It's also incorrect since it's
// testing the display type of the ComputedStyle rather than checking
@@ -1002,19 +1002,19 @@ HTMLTableElement::MapAttributesIntoRule(
// by default, set all border sides to the specified width
aData->SetPixelValueIfUnset(eCSSProperty_border_top_width, (float)borderThickness);
aData->SetPixelValueIfUnset(eCSSProperty_border_left_width, (float)borderThickness);
aData->SetPixelValueIfUnset(eCSSProperty_border_bottom_width, (float)borderThickness);
aData->SetPixelValueIfUnset(eCSSProperty_border_right_width, (float)borderThickness);
}
- nsGenericHTMLElement::MapImageSizeAttributesInto(aAttributes, aData);
- nsGenericHTMLElement::MapBackgroundAttributesInto(aAttributes, aData);
- nsGenericHTMLElement::MapCommonAttributesInto(aAttributes, aData);
+ nsGenericHTMLElement::MapImageSizeAttributesInto(aAttributes, aDecls);
+ nsGenericHTMLElement::MapBackgroundAttributesInto(aAttributes, aDecls);
+ nsGenericHTMLElement::MapCommonAttributesInto(aAttributes, aDecls);
}
NS_IMETHODIMP_(bool)
HTMLTableElement::IsAttributeMapped(const nsAtom* aAttribute) const
{
static const MappedAttributeEntry attributes[] = {
{ &nsGkAtoms::cellpadding },
{ &nsGkAtoms::cellspacing },
@@ -1042,17 +1042,17 @@ HTMLTableElement::IsAttributeMapped(cons
nsMapRuleToAttributesFunc
HTMLTableElement::GetAttributeMappingFunction() const
{
return &MapAttributesIntoRule;
}
static void
MapInheritedTableAttributesIntoRule(const nsMappedAttributes* aAttributes,
- GenericSpecifiedValues* aData)
+ MappedDeclarations& aDecls)
{
const nsAttrValue* value = aAttributes->GetAttr(nsGkAtoms::cellpadding);
if (value && value->Type() == nsAttrValue::eInteger) {
// We have cellpadding. This will override our padding values if we
// don't have any set.
float pad = float(value->GetIntegerValue());
aData->SetPixelValueIfUnset(eCSSProperty_padding_top, pad);
--- a/dom/html/HTMLTableRowElement.cpp
+++ b/dom/html/HTMLTableRowElement.cpp
@@ -255,23 +255,23 @@ HTMLTableRowElement::ParseAttribute(int3
aAttribute, aValue,
aResult) ||
nsGenericHTMLElement::ParseAttribute(aNamespaceID, aAttribute, aValue,
aMaybeScriptedPrincipal, aResult);
}
void
HTMLTableRowElement::MapAttributesIntoRule(const nsMappedAttributes* aAttributes,
- GenericSpecifiedValues* aData)
+ MappedDeclarations& aDecls)
{
- nsGenericHTMLElement::MapHeightAttributeInto(aAttributes, aData);
- nsGenericHTMLElement::MapDivAlignAttributeInto(aAttributes, aData);
- nsGenericHTMLElement::MapVAlignAttributeInto(aAttributes, aData);
- nsGenericHTMLElement::MapBackgroundAttributesInto(aAttributes, aData);
- nsGenericHTMLElement::MapCommonAttributesInto(aAttributes, aData);
+ nsGenericHTMLElement::MapHeightAttributeInto(aAttributes, aDecls);
+ nsGenericHTMLElement::MapDivAlignAttributeInto(aAttributes, aDecls);
+ nsGenericHTMLElement::MapVAlignAttributeInto(aAttributes, aDecls);
+ nsGenericHTMLElement::MapBackgroundAttributesInto(aAttributes, aDecls);
+ nsGenericHTMLElement::MapCommonAttributesInto(aAttributes, aDecls);
}
NS_IMETHODIMP_(bool)
HTMLTableRowElement::IsAttributeMapped(const nsAtom* aAttribute) const
{
static const MappedAttributeEntry attributes[] = {
{ &nsGkAtoms::align },
{ &nsGkAtoms::valign },
--- a/dom/html/HTMLTableSectionElement.cpp
+++ b/dom/html/HTMLTableSectionElement.cpp
@@ -158,28 +158,28 @@ HTMLTableSectionElement::ParseAttribute(
aAttribute, aValue,
aResult) ||
nsGenericHTMLElement::ParseAttribute(aNamespaceID, aAttribute, aValue,
aMaybeScriptedPrincipal, aResult);
}
void
HTMLTableSectionElement::MapAttributesIntoRule(const nsMappedAttributes* aAttributes,
- GenericSpecifiedValues* aData)
+ MappedDeclarations& aDecls)
{
// height: value
if (!aData->PropertyIsSet(eCSSProperty_height)) {
const nsAttrValue* value = aAttributes->GetAttr(nsGkAtoms::height);
if (value && value->Type() == nsAttrValue::eInteger)
aData->SetPixelValue(eCSSProperty_height, (float)value->GetIntegerValue());
}
- nsGenericHTMLElement::MapDivAlignAttributeInto(aAttributes, aData);
- nsGenericHTMLElement::MapVAlignAttributeInto(aAttributes, aData);
- nsGenericHTMLElement::MapBackgroundAttributesInto(aAttributes, aData);
- nsGenericHTMLElement::MapCommonAttributesInto(aAttributes, aData);
+ nsGenericHTMLElement::MapDivAlignAttributeInto(aAttributes, aDecls);
+ nsGenericHTMLElement::MapVAlignAttributeInto(aAttributes, aDecls);
+ nsGenericHTMLElement::MapBackgroundAttributesInto(aAttributes, aDecls);
+ nsGenericHTMLElement::MapCommonAttributesInto(aAttributes, aDecls);
}
NS_IMETHODIMP_(bool)
HTMLTableSectionElement::IsAttributeMapped(const nsAtom* aAttribute) const
{
static const MappedAttributeEntry attributes[] = {
{ &nsGkAtoms::align },
{ &nsGkAtoms::valign },
--- a/dom/html/HTMLTextAreaElement.cpp
+++ b/dom/html/HTMLTextAreaElement.cpp
@@ -422,29 +422,29 @@ HTMLTextAreaElement::ParseAttribute(int3
}
}
return nsGenericHTMLElement::ParseAttribute(aNamespaceID, aAttribute, aValue,
aMaybeScriptedPrincipal, aResult);
}
void
HTMLTextAreaElement::MapAttributesIntoRule(const nsMappedAttributes* aAttributes,
- GenericSpecifiedValues* aData)
+ MappedDeclarations& aDecls)
{
// wrap=off
if (!aData->PropertyIsSet(eCSSProperty_white_space)) {
const nsAttrValue* value = aAttributes->GetAttr(nsGkAtoms::wrap);
if (value && value->Type() == nsAttrValue::eString &&
value->Equals(nsGkAtoms::OFF, eIgnoreCase)) {
aData->SetKeywordValue(eCSSProperty_white_space, StyleWhiteSpace::Pre);
}
}
- nsGenericHTMLFormElementWithState::MapDivAlignAttributeInto(aAttributes, aData);
- nsGenericHTMLFormElementWithState::MapCommonAttributesInto(aAttributes, aData);
+ nsGenericHTMLFormElementWithState::MapDivAlignAttributeInto(aAttributes, aDecls);
+ nsGenericHTMLFormElementWithState::MapCommonAttributesInto(aAttributes, aDecls);
}
nsChangeHint
HTMLTextAreaElement::GetAttributeChangeHint(const nsAtom* aAttribute,
int32_t aModType) const
{
nsChangeHint retval =
nsGenericHTMLFormElementWithState::GetAttributeChangeHint(aAttribute, aModType);
--- a/dom/html/HTMLVideoElement.cpp
+++ b/dom/html/HTMLVideoElement.cpp
@@ -96,20 +96,20 @@ HTMLVideoElement::ParseAttribute(int32_t
}
return HTMLMediaElement::ParseAttribute(aNamespaceID, aAttribute, aValue,
aMaybeScriptedPrincipal, aResult);
}
void
HTMLVideoElement::MapAttributesIntoRule(const nsMappedAttributes* aAttributes,
- GenericSpecifiedValues* aData)
+ MappedDeclarations& aDecls)
{
- nsGenericHTMLElement::MapImageSizeAttributesInto(aAttributes, aData);
- nsGenericHTMLElement::MapCommonAttributesInto(aAttributes, aData);
+ nsGenericHTMLElement::MapImageSizeAttributesInto(aAttributes, aDecls);
+ nsGenericHTMLElement::MapCommonAttributesInto(aAttributes, aDecls);
}
NS_IMETHODIMP_(bool)
HTMLVideoElement::IsAttributeMapped(const nsAtom* aAttribute) const
{
static const MappedAttributeEntry attributes[] = {
{ &nsGkAtoms::width },
{ &nsGkAtoms::height },
--- a/dom/html/nsGenericHTMLElement.cpp
+++ b/dom/html/nsGenericHTMLElement.cpp
@@ -1157,17 +1157,17 @@ nsGenericHTMLElement::ParseFrameborderVa
bool
nsGenericHTMLElement::ParseScrollingValue(const nsAString& aString,
nsAttrValue& aResult)
{
return aResult.ParseEnumValue(aString, kScrollingTable, false);
}
static inline void
-MapLangAttributeInto(const nsMappedAttributes* aAttributes, GenericSpecifiedValues* aData)
+MapLangAttributeInto(const nsMappedAttributes* aAttributes, MappedDeclarations& aDecls)
{
const nsAttrValue* langValue = aAttributes->GetAttr(nsGkAtoms::lang);
if (!langValue) {
return;
}
MOZ_ASSERT(langValue->Type() == nsAttrValue::eAtom);
aData->SetIdentAtomValueIfUnset(eCSSProperty__x_lang,
langValue->GetAtomValue());
@@ -1186,17 +1186,17 @@ MapLangAttributeInto(const nsMappedAttri
}
}
/**
* Handle attributes common to all html elements
*/
void
nsGenericHTMLElement::MapCommonAttributesIntoExceptHidden(const nsMappedAttributes* aAttributes,
- GenericSpecifiedValues* aData)
+ MappedDeclarations& aDecls)
{
if (!aData->PropertyIsSet(eCSSProperty__moz_user_modify)) {
const nsAttrValue* value =
aAttributes->GetAttr(nsGkAtoms::contenteditable);
if (value) {
if (value->Equals(nsGkAtoms::_empty, eCaseMatters) ||
value->Equals(nsGkAtoms::_true, eIgnoreCase)) {
aData->SetKeywordValue(eCSSProperty__moz_user_modify,
@@ -1204,24 +1204,24 @@ nsGenericHTMLElement::MapCommonAttribute
}
else if (value->Equals(nsGkAtoms::_false, eIgnoreCase)) {
aData->SetKeywordValue(eCSSProperty__moz_user_modify,
StyleUserModify::ReadOnly);
}
}
}
- MapLangAttributeInto(aAttributes, aData);
+ MapLangAttributeInto(aAttributes, aDecls);
}
void
nsGenericHTMLElement::MapCommonAttributesInto(const nsMappedAttributes* aAttributes,
- GenericSpecifiedValues* aData)
+ MappedDeclarations& aDecls)
{
- MapCommonAttributesIntoExceptHidden(aAttributes, aData);
+ MapCommonAttributesIntoExceptHidden(aAttributes, aDecls);
if (!aData->PropertyIsSet(eCSSProperty_display)) {
if (aAttributes->IndexOfAttr(nsGkAtoms::hidden) >= 0) {
aData->SetKeywordValue(eCSSProperty_display, StyleDisplay::None);
}
}
}
@@ -1270,17 +1270,17 @@ nsGenericHTMLElement::sBackgroundAttribu
/* static */ const Element::MappedAttributeEntry
nsGenericHTMLElement::sBackgroundColorAttributeMap[] = {
{ &nsGkAtoms::bgcolor },
{ nullptr }
};
void
nsGenericHTMLElement::MapImageAlignAttributeInto(const nsMappedAttributes* aAttributes,
- GenericSpecifiedValues* aData)
+ MappedDeclarations& aDecls)
{
const nsAttrValue* value = aAttributes->GetAttr(nsGkAtoms::align);
if (value && value->Type() == nsAttrValue::eEnum) {
int32_t align = value->GetEnumValue();
if (!aData->PropertyIsSet(eCSSProperty_float)) {
if (align == NS_STYLE_TEXT_ALIGN_LEFT) {
aData->SetKeywordValue(eCSSProperty_float, StyleFloat::Left);
} else if (align == NS_STYLE_TEXT_ALIGN_RIGHT) {
@@ -1297,41 +1297,41 @@ nsGenericHTMLElement::MapImageAlignAttri
break;
}
}
}
}
void
nsGenericHTMLElement::MapDivAlignAttributeInto(const nsMappedAttributes* aAttributes,
- GenericSpecifiedValues* aData)
+ MappedDeclarations& aDecls)
{
if (!aData->PropertyIsSet(eCSSProperty_text_align)) {
// align: enum
const nsAttrValue* value = aAttributes->GetAttr(nsGkAtoms::align);
if (value && value->Type() == nsAttrValue::eEnum)
aData->SetKeywordValue(eCSSProperty_text_align, value->GetEnumValue());
}
}
void
nsGenericHTMLElement::MapVAlignAttributeInto(const nsMappedAttributes* aAttributes,
- GenericSpecifiedValues* aData)
+ MappedDeclarations& aDecls)
{
if (!aData->PropertyIsSet(eCSSProperty_vertical_align)) {
// align: enum
const nsAttrValue* value = aAttributes->GetAttr(nsGkAtoms::valign);
if (value && value->Type() == nsAttrValue::eEnum)
aData->SetKeywordValue(eCSSProperty_vertical_align, value->GetEnumValue());
}
}
void
nsGenericHTMLElement::MapImageMarginAttributeInto(const nsMappedAttributes* aAttributes,
- GenericSpecifiedValues* aData)
+ MappedDeclarations& aDecls)
{
const nsAttrValue* value;
// hspace: value
value = aAttributes->GetAttr(nsGkAtoms::hspace);
if (value) {
if (value->Type() == nsAttrValue::eInteger) {
aData->SetPixelValueIfUnset(eCSSProperty_margin_left,
@@ -1360,59 +1360,59 @@ nsGenericHTMLElement::MapImageMarginAttr
aData->SetPercentValueIfUnset(eCSSProperty_margin_bottom,
value->GetPercentValue());
}
}
}
void
nsGenericHTMLElement::MapWidthAttributeInto(const nsMappedAttributes* aAttributes,
- GenericSpecifiedValues* aData)
+ MappedDeclarations& aDecls)
{
// width: value
if (!aData->PropertyIsSet(eCSSProperty_width)) {
const nsAttrValue* value = aAttributes->GetAttr(nsGkAtoms::width);
if (value && value->Type() == nsAttrValue::eInteger) {
aData->SetPixelValue(eCSSProperty_width,
(float)value->GetIntegerValue());
} else if (value && value->Type() == nsAttrValue::ePercent) {
aData->SetPercentValue(eCSSProperty_width,
value->GetPercentValue());
}
}
}
void
nsGenericHTMLElement::MapHeightAttributeInto(const nsMappedAttributes* aAttributes,
- GenericSpecifiedValues* aData)
+ MappedDeclarations& aDecls)
{
// height: value
if (!aData->PropertyIsSet(eCSSProperty_height)) {
const nsAttrValue* value = aAttributes->GetAttr(nsGkAtoms::height);
if (value && value->Type() == nsAttrValue::eInteger) {
aData->SetPixelValue(eCSSProperty_height,
(float)value->GetIntegerValue());
} else if (value && value->Type() == nsAttrValue::ePercent) {
aData->SetPercentValue(eCSSProperty_height,
value->GetPercentValue());
}
}
}
void
nsGenericHTMLElement::MapImageSizeAttributesInto(const nsMappedAttributes* aAttributes,
- GenericSpecifiedValues* aData)
+ MappedDeclarations& aDecls)
{
- nsGenericHTMLElement::MapWidthAttributeInto(aAttributes, aData);
- nsGenericHTMLElement::MapHeightAttributeInto(aAttributes, aData);
+ nsGenericHTMLElement::MapWidthAttributeInto(aAttributes, aDecls);
+ nsGenericHTMLElement::MapHeightAttributeInto(aAttributes, aDecls);
}
void
nsGenericHTMLElement::MapImageBorderAttributeInto(const nsMappedAttributes* aAttributes,
- GenericSpecifiedValues* aData)
+ MappedDeclarations& aDecls)
{
// border: pixels
const nsAttrValue* value = aAttributes->GetAttr(nsGkAtoms::border);
if (!value)
return;
nscoord val = 0;
if (value->Type() == nsAttrValue::eInteger)
@@ -1435,48 +1435,48 @@ nsGenericHTMLElement::MapImageBorderAttr
aData->SetCurrentColorIfUnset(eCSSProperty_border_top_color);
aData->SetCurrentColorIfUnset(eCSSProperty_border_right_color);
aData->SetCurrentColorIfUnset(eCSSProperty_border_bottom_color);
aData->SetCurrentColorIfUnset(eCSSProperty_border_left_color);
}
void
nsGenericHTMLElement::MapBackgroundInto(const nsMappedAttributes* aAttributes,
- GenericSpecifiedValues* aData)
+ MappedDeclarations& aDecls)
{
if (!aData->PropertyIsSet(eCSSProperty_background_image)) {
// background
nsAttrValue* value =
const_cast<nsAttrValue*>(aAttributes->GetAttr(nsGkAtoms::background));
if (value) {
aData->SetBackgroundImage(*value);
}
}
}
void
nsGenericHTMLElement::MapBGColorInto(const nsMappedAttributes* aAttributes,
- GenericSpecifiedValues* aData)
+ MappedDeclarations& aDecls)
{
if (!aData->PropertyIsSet(eCSSProperty_background_color)) {
const nsAttrValue* value = aAttributes->GetAttr(nsGkAtoms::bgcolor);
nscolor color;
if (value && value->GetColorValue(color)) {
aData->SetColorValue(eCSSProperty_background_color, color);
}
}
}
void
nsGenericHTMLElement::MapBackgroundAttributesInto(const nsMappedAttributes* aAttributes,
- GenericSpecifiedValues* aData)
+ MappedDeclarations& aDecls)
{
- MapBackgroundInto(aAttributes, aData);
- MapBGColorInto(aAttributes, aData);
+ MapBackgroundInto(aAttributes, aDecls);
+ MapBGColorInto(aAttributes, aDecls);
}
//----------------------------------------------------------------------
int32_t
nsGenericHTMLElement::GetIntAttr(nsAtom* aAttr, int32_t aDefault) const
{
const nsAttrValue* attrVal = mAttrsAndChildren.GetAttr(aAttr);
--- a/dom/mathml/nsMathMLElement.cpp
+++ b/dom/mathml/nsMathMLElement.cpp
@@ -495,17 +495,17 @@ nsMathMLElement::ParseNumericValue(const
}
aCSSValue.SetFloatValue(floatValue, cssUnit);
return true;
}
void
nsMathMLElement::MapMathMLAttributesInto(const nsMappedAttributes* aAttributes,
- GenericSpecifiedValues* aData)
+ MappedDeclarations& aDecls)
{
// scriptsizemultiplier
//
// "Specifies the multiplier to be used to adjust font size due to changes
// in scriptlevel.
//
// values: number
// default: 0.71