Bug 939296 - Build content/html in unified mode; r=jst,bzbarsky

--HG--
extra : rebase_source : e8cf6dfa1b5fc1b3a3db8742e4010fc2479740ed
This commit is contained in:
Ehsan Akhgari 2013-11-19 14:21:29 -05:00
parent f88cd39b32
commit b1b1ffcb35
55 changed files with 212 additions and 103 deletions

View File

@ -116,6 +116,10 @@ protected:
void WakeLockUpdate();
nsCOMPtr<nsIDOMMozWakeLock> mScreenWakeLock;
private:
static void MapAttributesIntoRule(const nsMappedAttributes* aAttributes,
nsRuleData* aData);
};
} // namespace dom

View File

@ -57,9 +57,9 @@ HTMLBRElement::ParseAttribute(int32_t aNamespaceID,
aResult);
}
static void
MapAttributesIntoRule(const nsMappedAttributes* aAttributes,
nsRuleData* aData)
void
HTMLBRElement::MapAttributesIntoRule(const nsMappedAttributes* aAttributes,
nsRuleData* aData)
{
if (aData->mSIDs & NS_STYLE_INHERIT_BIT(Display)) {
nsCSSValue* clear = aData->ValueForClear();

View File

@ -46,6 +46,10 @@ public:
virtual JSObject* WrapNode(JSContext *aCx,
JS::Handle<JSObject*> aScope) MOZ_OVERRIDE;
private:
static void MapAttributesIntoRule(const nsMappedAttributes* aAttributes,
nsRuleData* aData);
};
} // namespace dom

View File

@ -348,8 +348,9 @@ HTMLBodyElement::UnbindFromTree(bool aDeep, bool aNullParent)
nsGenericHTMLElement::UnbindFromTree(aDeep, aNullParent);
}
static
void MapAttributesIntoRule(const nsMappedAttributes* aAttributes, nsRuleData* aData)
void
HTMLBodyElement::MapAttributesIntoRule(const nsMappedAttributes* aAttributes,
nsRuleData* aData)
{
if (aData->mSIDs & NS_STYLE_INHERIT_BIT(Display)) {
// When display if first asked for, go ahead and get our colors set up.

View File

@ -136,6 +136,10 @@ protected:
JS::Handle<JSObject*> aScope) MOZ_OVERRIDE;
nsRefPtr<BodyRule> mContentStyleRule;
private:
static void MapAttributesIntoRule(const nsMappedAttributes* aAttributes,
nsRuleData* aData);
};
} // namespace dom

View File

@ -62,8 +62,9 @@ HTMLDivElement::ParseAttribute(int32_t aNamespaceID,
aResult);
}
static void
MapAttributesIntoRule(const nsMappedAttributes* aAttributes, nsRuleData* aData)
void
HTMLDivElement::MapAttributesIntoRule(const nsMappedAttributes* aAttributes,
nsRuleData* aData)
{
nsGenericHTMLElement::MapDivAlignAttributeInto(aAttributes, aData);
nsGenericHTMLElement::MapCommonAttributesInto(aAttributes, aData);

View File

@ -60,6 +60,10 @@ public:
protected:
virtual JSObject* WrapNode(JSContext *aCx,
JS::Handle<JSObject*> aScope) MOZ_OVERRIDE;
private:
static void MapAttributesIntoRule(const nsMappedAttributes* aAttributes,
nsRuleData* aData);
};
} // namespace dom

View File

@ -53,9 +53,9 @@ HTMLFontElement::ParseAttribute(int32_t aNamespaceID,
aResult);
}
static void
MapAttributesIntoRule(const nsMappedAttributes* aAttributes,
nsRuleData* aData)
void
HTMLFontElement::MapAttributesIntoRule(const nsMappedAttributes* aAttributes,
nsRuleData* aData)
{
if (aData->mSIDs & NS_STYLE_INHERIT_BIT(Font)) {
// face: string list

View File

@ -56,6 +56,10 @@ public:
protected:
virtual JSObject* WrapNode(JSContext *aCx,
JS::Handle<JSObject*> aScope) MOZ_OVERRIDE;
private:
static void MapAttributesIntoRule(const nsMappedAttributes* aAttributes,
nsRuleData* aData);
};
} // namespace dom

View File

@ -81,9 +81,9 @@ HTMLFrameElement::ParseAttribute(int32_t aNamespaceID,
aValue, aResult);
}
static void
MapAttributesIntoRule(const nsMappedAttributes* aAttributes,
nsRuleData* aData)
void
HTMLFrameElement::MapAttributesIntoRule(const nsMappedAttributes* aAttributes,
nsRuleData* aData)
{
nsGenericHTMLElement::MapScrollingAttributeInto(aAttributes, aData);
nsGenericHTMLElement::MapCommonAttributesInto(aAttributes, aData);

View File

@ -99,6 +99,10 @@ public:
protected:
virtual JSObject* WrapNode(JSContext* aCx,
JS::Handle<JSObject*> aScope) MOZ_OVERRIDE;
private:
static void MapAttributesIntoRule(const nsMappedAttributes* aAttributes,
nsRuleData* aData);
};
} // namespace dom

View File

@ -32,19 +32,19 @@ NS_IMPL_STRING_ATTR(HTMLHRElement, Size, size)
NS_IMPL_STRING_ATTR(HTMLHRElement, Width, width)
NS_IMPL_STRING_ATTR(HTMLHRElement, Color, color)
static const nsAttrValue::EnumTable kAlignTable[] = {
{ "left", NS_STYLE_TEXT_ALIGN_LEFT },
{ "right", NS_STYLE_TEXT_ALIGN_RIGHT },
{ "center", NS_STYLE_TEXT_ALIGN_CENTER },
{ 0 }
};
bool
HTMLHRElement::ParseAttribute(int32_t aNamespaceID,
nsIAtom* aAttribute,
const nsAString& aValue,
nsAttrValue& aResult)
{
static const nsAttrValue::EnumTable kAlignTable[] = {
{ "left", NS_STYLE_TEXT_ALIGN_LEFT },
{ "right", NS_STYLE_TEXT_ALIGN_RIGHT },
{ "center", NS_STYLE_TEXT_ALIGN_CENTER },
{ 0 }
};
if (aNamespaceID == kNameSpaceID_None) {
if (aAttribute == nsGkAtoms::width) {
return aResult.ParseSpecialIntValue(aValue);
@ -64,9 +64,9 @@ HTMLHRElement::ParseAttribute(int32_t aNamespaceID,
aResult);
}
static void
MapAttributesIntoRule(const nsMappedAttributes* aAttributes,
nsRuleData* aData)
void
HTMLHRElement::MapAttributesIntoRule(const nsMappedAttributes* aAttributes,
nsRuleData* aData)
{
bool noshade = false;

View File

@ -73,6 +73,10 @@ public:
protected:
virtual JSObject* WrapNode(JSContext* aCx,
JS::Handle<JSObject*> aScope) MOZ_OVERRIDE;
private:
static void MapAttributesIntoRule(const nsMappedAttributes* aAttributes,
nsRuleData* aData);
};
} // namespace dom

View File

@ -50,8 +50,9 @@ HTMLHeadingElement::ParseAttribute(int32_t aNamespaceID,
aResult);
}
static void
MapAttributesIntoRule(const nsMappedAttributes* aAttributes, nsRuleData* aData)
void
HTMLHeadingElement::MapAttributesIntoRule(const nsMappedAttributes* aAttributes,
nsRuleData* aData)
{
nsGenericHTMLElement::MapDivAlignAttributeInto(aAttributes, aData);
nsGenericHTMLElement::MapCommonAttributesInto(aAttributes, aData);

View File

@ -43,6 +43,10 @@ public:
protected:
virtual JSObject* WrapNode(JSContext *aCx,
JS::Handle<JSObject*> aScope) MOZ_OVERRIDE;
private:
static void MapAttributesIntoRule(const nsMappedAttributes* aAttributes,
nsRuleData* aData);
};
} // namespace mozilla

View File

@ -106,9 +106,9 @@ HTMLIFrameElement::ParseAttribute(int32_t aNamespaceID,
aValue, aResult);
}
static void
MapAttributesIntoRule(const nsMappedAttributes* aAttributes,
nsRuleData* aData)
void
HTMLIFrameElement::MapAttributesIntoRule(const nsMappedAttributes* aAttributes,
nsRuleData* aData)
{
if (aData->mSIDs & NS_STYLE_INHERIT_BIT(Border)) {
// frameborder: 0 | 1 (| NO | YES in quirks mode)

View File

@ -174,6 +174,10 @@ protected:
virtual JSObject* WrapNode(JSContext* aCx,
JS::Handle<JSObject*> aScope) MOZ_OVERRIDE;
private:
static void MapAttributesIntoRule(const nsMappedAttributes* aAttributes,
nsRuleData* aData);
};
} // namespace dom

View File

@ -232,9 +232,9 @@ HTMLImageElement::ParseAttribute(int32_t aNamespaceID,
aResult);
}
static void
MapAttributesIntoRule(const nsMappedAttributes* aAttributes,
nsRuleData* aData)
void
HTMLImageElement::MapAttributesIntoRule(const nsMappedAttributes* aAttributes,
nsRuleData* aData)
{
nsGenericHTMLElement::MapImageAlignAttributeInto(aAttributes, aData);
nsGenericHTMLElement::MapImageBorderAttributeInto(aAttributes, aData);

View File

@ -190,6 +190,10 @@ protected:
// This is a weak reference that this element and the HTMLFormElement
// cooperate in maintaining.
HTMLFormElement* mForm;
private:
static void MapAttributesIntoRule(const nsMappedAttributes* aAttributes,
nsRuleData* aData);
};
} // namespace dom

View File

@ -4456,9 +4456,9 @@ HTMLInputElement::ParseAttribute(int32_t aNamespaceID,
aResult);
}
static void
MapAttributesIntoRule(const nsMappedAttributes* aAttributes,
nsRuleData* aData)
void
HTMLInputElement::MapAttributesIntoRule(const nsMappedAttributes* aAttributes,
nsRuleData* aData)
{
const nsAttrValue* value = aAttributes->GetAttr(nsGkAtoms::type);
if (value && value->Type() == nsAttrValue::eEnum &&
@ -6822,3 +6822,5 @@ HTMLInputElement::WrapNode(JSContext* aCx, JS::Handle<JSObject*> aScope)
} // namespace dom
} // namespace mozilla
#undef NS_ORIGINAL_CHECKED_VALUE

View File

@ -1219,6 +1219,8 @@ protected:
bool mProgressTimerIsActive : 1;
private:
static void MapAttributesIntoRule(const nsMappedAttributes* aAttributes,
nsRuleData* aData);
/**
* Returns true if this input's type will fire a DOM "change" event when it

View File

@ -69,9 +69,9 @@ HTMLLIElement::ParseAttribute(int32_t aNamespaceID,
aResult);
}
static void
MapAttributesIntoRule(const nsMappedAttributes* aAttributes,
nsRuleData* aData)
void
HTMLLIElement::MapAttributesIntoRule(const nsMappedAttributes* aAttributes,
nsRuleData* aData)
{
if (aData->mSIDs & NS_STYLE_INHERIT_BIT(List)) {
nsCSSValue* listStyleType = aData->ValueForListStyleType();

View File

@ -59,6 +59,10 @@ public:
protected:
virtual JSObject* WrapNode(JSContext *aCx,
JS::Handle<JSObject*> aScope) MOZ_OVERRIDE;
private:
static void MapAttributesIntoRule(const nsMappedAttributes* aAttributes,
nsRuleData* aData);
};
} // namespace dom

View File

@ -21,16 +21,6 @@ HTMLLegendElement::~HTMLLegendElement()
NS_IMPL_ELEMENT_CLONE(HTMLLegendElement)
// this contains center, because IE4 does
static const nsAttrValue::EnumTable kAlignTable[] = {
{ "left", NS_STYLE_TEXT_ALIGN_LEFT },
{ "right", NS_STYLE_TEXT_ALIGN_RIGHT },
{ "center", NS_STYLE_TEXT_ALIGN_CENTER },
{ "bottom", NS_STYLE_VERTICAL_ALIGN_BOTTOM },
{ "top", NS_STYLE_VERTICAL_ALIGN_TOP },
{ 0 }
};
nsIContent*
HTMLLegendElement::GetFieldSet()
{
@ -49,6 +39,16 @@ HTMLLegendElement::ParseAttribute(int32_t aNamespaceID,
const nsAString& aValue,
nsAttrValue& aResult)
{
// this contains center, because IE4 does
static const nsAttrValue::EnumTable kAlignTable[] = {
{ "left", NS_STYLE_TEXT_ALIGN_LEFT },
{ "right", NS_STYLE_TEXT_ALIGN_RIGHT },
{ "center", NS_STYLE_TEXT_ALIGN_CENTER },
{ "bottom", NS_STYLE_VERTICAL_ALIGN_BOTTOM },
{ "top", NS_STYLE_VERTICAL_ALIGN_TOP },
{ 0 }
};
if (aAttribute == nsGkAtoms::align && aNamespaceID == kNameSpaceID_None) {
return aResult.ParseEnumValue(aValue, kAlignTable, false);
}

View File

@ -490,3 +490,5 @@ HTMLMenuItemElement::WrapNode(JSContext* aCx, JS::Handle<JSObject*> aScope)
} // namespace dom
} // namespace mozilla
#undef NS_ORIGINAL_CHECKED_VALUE

View File

@ -366,9 +366,9 @@ HTMLObjectElement::ParseAttribute(int32_t aNamespaceID,
aValue, aResult);
}
static void
MapAttributesIntoRule(const nsMappedAttributes *aAttributes,
nsRuleData *aData)
void
HTMLObjectElement::MapAttributesIntoRule(const nsMappedAttributes *aAttributes,
nsRuleData *aData)
{
nsGenericHTMLFormElement::MapImageAlignAttributeInto(aAttributes, aData);
nsGenericHTMLFormElement::MapImageBorderAttributeInto(aAttributes, aData);

View File

@ -239,6 +239,9 @@ private:
virtual JSObject* WrapNode(JSContext *aCx,
JS::Handle<JSObject*> aScope) MOZ_OVERRIDE;
static void MapAttributesIntoRule(const nsMappedAttributes* aAttributes,
nsRuleData* aData);
bool mIsDoneAddingChildren;
};

View File

@ -41,8 +41,9 @@ HTMLParagraphElement::ParseAttribute(int32_t aNamespaceID,
aResult);
}
static void
MapAttributesIntoRule(const nsMappedAttributes* aAttributes, nsRuleData* aData)
void
HTMLParagraphElement::MapAttributesIntoRule(const nsMappedAttributes* aAttributes,
nsRuleData* aData)
{
nsGenericHTMLElement::MapDivAlignAttributeInto(aAttributes, aData);
nsGenericHTMLElement::MapCommonAttributesInto(aAttributes, aData);

View File

@ -50,6 +50,10 @@ public:
protected:
virtual JSObject* WrapNode(JSContext *aCx,
JS::Handle<JSObject*> aScope) MOZ_OVERRIDE;
private:
static void MapAttributesIntoRule(const nsMappedAttributes* aAttributes,
nsRuleData* aData);
};
} // namespace dom

View File

@ -47,9 +47,9 @@ HTMLPreElement::ParseAttribute(int32_t aNamespaceID,
aResult);
}
static void
MapAttributesIntoRule(const nsMappedAttributes* aAttributes,
nsRuleData* aData)
void
HTMLPreElement::MapAttributesIntoRule(const nsMappedAttributes* aAttributes,
nsRuleData* aData)
{
if (aData->mSIDs & NS_STYLE_INHERIT_BIT(Position)) {
nsCSSValue* width = aData->ValueForWidth();

View File

@ -54,6 +54,10 @@ public:
protected:
virtual JSObject* WrapNode(JSContext *aCx,
JS::Handle<JSObject*> aScope) MOZ_OVERRIDE;
private:
static void MapAttributesIntoRule(const nsMappedAttributes* aAttributes,
nsRuleData* aData);
};
} // namespace dom

View File

@ -1426,9 +1426,9 @@ HTMLSelectElement::ParseAttribute(int32_t aNamespaceID,
aResult);
}
static void
MapAttributesIntoRule(const nsMappedAttributes* aAttributes,
nsRuleData* aData)
void
HTMLSelectElement::MapAttributesIntoRule(const nsMappedAttributes* aAttributes,
nsRuleData* aData)
{
nsGenericHTMLFormElementWithState::MapImageAlignAttributeInto(aAttributes, aData);
nsGenericHTMLFormElementWithState::MapCommonAttributesInto(aAttributes, aData);

View File

@ -647,6 +647,10 @@ protected:
* The live list of selected options.
*/
nsRefPtr<nsContentList> mSelectedOptions;
private:
static void MapAttributesIntoRule(const nsMappedAttributes* aAttributes,
nsRuleData* aData);
};
} // namespace dom

View File

@ -89,8 +89,9 @@ HTMLSharedListElement::ParseAttribute(int32_t aNamespaceID,
aResult);
}
static void
MapAttributesIntoRule(const nsMappedAttributes* aAttributes, nsRuleData* aData)
void
HTMLSharedListElement::MapAttributesIntoRule(const nsMappedAttributes* aAttributes,
nsRuleData* aData)
{
if (aData->mSIDs & NS_STYLE_INHERIT_BIT(List)) {
nsCSSValue* listStyleType = aData->ValueForListStyleType();

View File

@ -79,6 +79,10 @@ public:
protected:
virtual JSObject* WrapNode(JSContext *aCx,
JS::Handle<JSObject*> aScope) MOZ_OVERRIDE;
private:
static void MapAttributesIntoRule(const nsMappedAttributes* aAttributes,
nsRuleData* aData);
};
} // namespace dom

View File

@ -260,9 +260,9 @@ MapAttributesIntoRuleExceptHidden(const nsMappedAttributes *aAttributes,
nsGenericHTMLElement::MapCommonAttributesIntoExceptHidden(aAttributes, aData);
}
static void
MapAttributesIntoRule(const nsMappedAttributes *aAttributes,
nsRuleData *aData)
void
HTMLSharedObjectElement::MapAttributesIntoRule(const nsMappedAttributes *aAttributes,
nsRuleData *aData)
{
MapAttributesIntoRuleBase(aAttributes, aData);
nsGenericHTMLElement::MapCommonAttributesInto(aAttributes, aData);

View File

@ -223,6 +223,9 @@ private:
virtual JSObject* WrapNode(JSContext *aCx,
JS::Handle<JSObject*> aScope) MOZ_OVERRIDE;
static void MapAttributesIntoRule(const nsMappedAttributes* aAttributes,
nsRuleData* aData);
};
} // namespace dom

View File

@ -55,8 +55,9 @@ HTMLTableCaptionElement::ParseAttribute(int32_t aNamespaceID,
aResult);
}
static
void MapAttributesIntoRule(const nsMappedAttributes* aAttributes, nsRuleData* aData)
void
HTMLTableCaptionElement::MapAttributesIntoRule(const nsMappedAttributes* aAttributes,
nsRuleData* aData)
{
if (aData->mSIDs & NS_STYLE_INHERIT_BIT(TableBorder)) {
nsCSSValue* captionSide = aData->ValueForCaptionSide();

View File

@ -49,6 +49,10 @@ public:
protected:
virtual JSObject* WrapNode(JSContext *aCx,
JS::Handle<JSObject*> aScope) MOZ_OVERRIDE;
private:
static void MapAttributesIntoRule(const nsMappedAttributes* aAttributes,
nsRuleData* aData);
};
} // namespace dom

View File

@ -435,9 +435,9 @@ HTMLTableCellElement::ParseAttribute(int32_t aNamespaceID,
aResult);
}
static
void MapAttributesIntoRule(const nsMappedAttributes* aAttributes,
nsRuleData* aData)
void
HTMLTableCellElement::MapAttributesIntoRule(const nsMappedAttributes* aAttributes,
nsRuleData* aData)
{
if (aData->mSIDs & NS_STYLE_INHERIT_BIT(Position)) {
// width: value

View File

@ -162,6 +162,10 @@ protected:
HTMLTableElement* GetTable() const;
HTMLTableRowElement* GetRow() const;
private:
static void MapAttributesIntoRule(const nsMappedAttributes* aAttributes,
nsRuleData* aData);
};
} // namespace dom

View File

@ -62,8 +62,9 @@ HTMLTableColElement::ParseAttribute(int32_t aNamespaceID,
aResult);
}
static
void MapAttributesIntoRule(const nsMappedAttributes* aAttributes, nsRuleData* aData)
void
HTMLTableColElement::MapAttributesIntoRule(const nsMappedAttributes* aAttributes,
nsRuleData* aData)
{
if (aData->mSIDs & NS_STYLE_INHERIT_BIT(Table)) {
nsCSSValue *span = aData->ValueForSpan();

View File

@ -82,6 +82,10 @@ public:
protected:
virtual JSObject* WrapNode(JSContext *aCx,
JS::Handle<JSObject*> aScope) MOZ_OVERRIDE;
private:
static void MapAttributesIntoRule(const nsMappedAttributes* aAttributes,
nsRuleData* aData);
};
} // namespace dom

View File

@ -701,9 +701,9 @@ HTMLTableElement::ParseAttribute(int32_t aNamespaceID,
static void
MapAttributesIntoRule(const nsMappedAttributes* aAttributes,
nsRuleData* aData)
void
HTMLTableElement::MapAttributesIntoRule(const nsMappedAttributes* aAttributes,
nsRuleData* aData)
{
// XXX Bug 211636: This function is used by a single style rule
// that's used to match two different type of elements -- tables, and

View File

@ -222,6 +222,10 @@ protected:
nsMappedAttributes *mTableInheritedAttributes;
void BuildInheritedAttributes();
void ReleaseInheritedAttributes();
private:
static void MapAttributesIntoRule(const nsMappedAttributes* aAttributes,
nsRuleData* aData);
};
} // namespace dom

View File

@ -261,8 +261,9 @@ HTMLTableRowElement::ParseAttribute(int32_t aNamespaceID,
aResult);
}
static
void MapAttributesIntoRule(const nsMappedAttributes* aAttributes, nsRuleData* aData)
void
HTMLTableRowElement::MapAttributesIntoRule(const nsMappedAttributes* aAttributes,
nsRuleData* aData)
{
if (aData->mSIDs & NS_STYLE_INHERIT_BIT(Position)) {
// height: value

View File

@ -96,6 +96,10 @@ protected:
HTMLTableSectionElement* GetSection() const;
HTMLTableElement* GetTable() const;
nsRefPtr<nsContentList> mCells;
private:
static void MapAttributesIntoRule(const nsMappedAttributes* aAttributes,
nsRuleData* aData);
};
} // namespace dom

View File

@ -161,8 +161,9 @@ HTMLTableSectionElement::ParseAttribute(int32_t aNamespaceID,
aResult);
}
static
void MapAttributesIntoRule(const nsMappedAttributes* aAttributes, nsRuleData* aData)
void
HTMLTableSectionElement::MapAttributesIntoRule(const nsMappedAttributes* aAttributes,
nsRuleData* aData)
{
if (aData->mSIDs & NS_STYLE_INHERIT_BIT(Position)) {
// height: value

View File

@ -77,6 +77,10 @@ protected:
JS::Handle<JSObject*> aScope) MOZ_OVERRIDE;
nsRefPtr<nsContentList> mRows;
private:
static void MapAttributesIntoRule(const nsMappedAttributes* aAttributes,
nsRuleData* aData);
};
} // namespace dom

View File

@ -400,9 +400,9 @@ HTMLTextAreaElement::ParseAttribute(int32_t aNamespaceID,
aResult);
}
static void
MapAttributesIntoRule(const nsMappedAttributes* aAttributes,
nsRuleData* aData)
void
HTMLTextAreaElement::MapAttributesIntoRule(const nsMappedAttributes* aAttributes,
nsRuleData* aData)
{
nsGenericHTMLFormElementWithState::MapDivAlignAttributeInto(aAttributes, aData);
nsGenericHTMLFormElementWithState::MapCommonAttributesInto(aAttributes, aData);

View File

@ -356,6 +356,10 @@ protected:
* @return whether the current value is the empty string.
*/
bool IsValueEmpty() const;
private:
static void MapAttributesIntoRule(const nsMappedAttributes* aAttributes,
nsRuleData* aData);
};
} // namespace dom

View File

@ -102,9 +102,9 @@ HTMLVideoElement::ParseAttribute(int32_t aNamespaceID,
aResult);
}
static void
MapAttributesIntoRule(const nsMappedAttributes* aAttributes,
nsRuleData* aData)
void
HTMLVideoElement::MapAttributesIntoRule(const nsMappedAttributes* aAttributes,
nsRuleData* aData)
{
nsGenericHTMLElement::MapImageSizeAttributesInto(aAttributes, aData);
nsGenericHTMLElement::MapCommonAttributesInto(aAttributes, aData);

View File

@ -75,7 +75,7 @@ EXPORTS.mozilla.dom += [
'ValidityState.h',
]
SOURCES += [
UNIFIED_SOURCES += [
'HTMLAnchorElement.cpp',
'HTMLAreaElement.cpp',
'HTMLAudioElement.cpp',

View File

@ -1182,24 +1182,6 @@ nsGenericHTMLElement::GetPresContext()
return nullptr;
}
static const nsAttrValue::EnumTable kAlignTable[] = {
{ "left", NS_STYLE_TEXT_ALIGN_LEFT },
{ "right", NS_STYLE_TEXT_ALIGN_RIGHT },
{ "top", NS_STYLE_VERTICAL_ALIGN_TOP },
{ "middle", NS_STYLE_VERTICAL_ALIGN_MIDDLE_WITH_BASELINE },
{ "bottom", NS_STYLE_VERTICAL_ALIGN_BASELINE },
{ "center", NS_STYLE_VERTICAL_ALIGN_MIDDLE_WITH_BASELINE },
{ "baseline", NS_STYLE_VERTICAL_ALIGN_BASELINE },
{ "texttop", NS_STYLE_VERTICAL_ALIGN_TEXT_TOP },
{ "absmiddle", NS_STYLE_VERTICAL_ALIGN_MIDDLE },
{ "abscenter", NS_STYLE_VERTICAL_ALIGN_MIDDLE },
{ "absbottom", NS_STYLE_VERTICAL_ALIGN_BOTTOM },
{ 0 }
};
static const nsAttrValue::EnumTable kDivAlignTable[] = {
{ "left", NS_STYLE_TEXT_ALIGN_MOZ_LEFT },
{ "right", NS_STYLE_TEXT_ALIGN_MOZ_RIGHT },
@ -1240,6 +1222,24 @@ bool
nsGenericHTMLElement::ParseAlignValue(const nsAString& aString,
nsAttrValue& aResult)
{
static const nsAttrValue::EnumTable kAlignTable[] = {
{ "left", NS_STYLE_TEXT_ALIGN_LEFT },
{ "right", NS_STYLE_TEXT_ALIGN_RIGHT },
{ "top", NS_STYLE_VERTICAL_ALIGN_TOP },
{ "middle", NS_STYLE_VERTICAL_ALIGN_MIDDLE_WITH_BASELINE },
{ "bottom", NS_STYLE_VERTICAL_ALIGN_BASELINE },
{ "center", NS_STYLE_VERTICAL_ALIGN_MIDDLE_WITH_BASELINE },
{ "baseline", NS_STYLE_VERTICAL_ALIGN_BASELINE },
{ "texttop", NS_STYLE_VERTICAL_ALIGN_TEXT_TOP },
{ "absmiddle", NS_STYLE_VERTICAL_ALIGN_MIDDLE },
{ "abscenter", NS_STYLE_VERTICAL_ALIGN_MIDDLE },
{ "absbottom", NS_STYLE_VERTICAL_ALIGN_BOTTOM },
{ 0 }
};
return aResult.ParseEnumValue(aString, kAlignTable, false);
}

View File

@ -13,7 +13,7 @@ EXPORTS.mozilla.dom += [
'ImageDocument.h',
]
SOURCES += [
UNIFIED_SOURCES += [
'HTMLAllCollection.cpp',
'ImageDocument.cpp',
'MediaDocument.cpp',