зеркало из https://github.com/mozilla/gecko-dev.git
Make <li> and <caption> use the dir and lang attrs correctly. Bug
125506, r=dbaron, sr=attinasi, a=asa
This commit is contained in:
Родитель
07b878eefd
Коммит
fad20abf78
|
@ -224,16 +224,18 @@ static void
|
|||
MapAttributesIntoRule(const nsIHTMLMappedAttributes* aAttributes,
|
||||
nsRuleData* aData)
|
||||
{
|
||||
if (!aAttributes || !aData || !aData->mListData)
|
||||
if (!aAttributes || !aData)
|
||||
return;
|
||||
|
||||
if (aData->mListData->mType.GetUnit() == eCSSUnit_Null) {
|
||||
nsHTMLValue value;
|
||||
if (aData->mListData) {
|
||||
if (aData->mListData->mType.GetUnit() == eCSSUnit_Null) {
|
||||
nsHTMLValue value;
|
||||
|
||||
// type: enum
|
||||
aAttributes->GetAttribute(nsHTMLAtoms::type, value);
|
||||
if (value.GetUnit() == eHTMLUnit_Enumerated)
|
||||
aData->mListData->mType.SetIntValue(value.GetIntValue(), eCSSUnit_Enumerated);
|
||||
// type: enum
|
||||
aAttributes->GetAttribute(nsHTMLAtoms::type, value);
|
||||
if (value.GetUnit() == eHTMLUnit_Enumerated)
|
||||
aData->mListData->mType.SetIntValue(value.GetIntValue(), eCSSUnit_Enumerated);
|
||||
}
|
||||
}
|
||||
|
||||
nsGenericHTMLElement::MapCommonAttributesInto(aAttributes, aData);
|
||||
|
|
|
@ -203,14 +203,16 @@ nsHTMLTableCaptionElement::AttributeToString(nsIAtom* aAttribute,
|
|||
static
|
||||
void MapAttributesIntoRule(const nsIHTMLMappedAttributes* aAttributes, nsRuleData* aData)
|
||||
{
|
||||
if (!aAttributes || !aData || aData->mSID != eStyleStruct_TableBorder || !aData->mTableData)
|
||||
if (!aAttributes || !aData)
|
||||
return;
|
||||
|
||||
if (aData->mTableData->mCaptionSide.GetUnit() == eCSSUnit_Null) {
|
||||
nsHTMLValue value;
|
||||
aAttributes->GetAttribute(nsHTMLAtoms::align, value);
|
||||
if (value.GetUnit() == eHTMLUnit_Enumerated)
|
||||
aData->mTableData->mCaptionSide.SetIntValue(value.GetIntValue(), eCSSUnit_Enumerated);
|
||||
if (aData->mSID == eStyleStruct_TableBorder && aData->mTableData) {
|
||||
if (aData->mTableData->mCaptionSide.GetUnit() == eCSSUnit_Null) {
|
||||
nsHTMLValue value;
|
||||
aAttributes->GetAttribute(nsHTMLAtoms::align, value);
|
||||
if (value.GetUnit() == eHTMLUnit_Enumerated)
|
||||
aData->mTableData->mCaptionSide.SetIntValue(value.GetIntValue(), eCSSUnit_Enumerated);
|
||||
}
|
||||
}
|
||||
|
||||
nsGenericHTMLElement::MapCommonAttributesInto(aAttributes, aData);
|
||||
|
|
Загрузка…
Ссылка в новой задаче