mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Make dir=rtl reverse layout direction in horizontal orientation only. Bug 750551, r=dholbert
This commit is contained in:
parent
2ac39573ec
commit
f6a32bdd95
@ -518,13 +518,18 @@ nsBoxFrame::GetInitialDirection(bool& aIsNormal)
|
|||||||
|
|
||||||
// Now see if we have an attribute. The attribute overrides
|
// Now see if we have an attribute. The attribute overrides
|
||||||
// the style system value.
|
// the style system value.
|
||||||
static nsIContent::AttrValuesArray strings[] =
|
if (IsHorizontal()) {
|
||||||
{&nsGkAtoms::reverse, &nsGkAtoms::ltr, &nsGkAtoms::rtl, nsnull};
|
static nsIContent::AttrValuesArray strings[] =
|
||||||
PRInt32 index = GetContent()->FindAttrValueIn(kNameSpaceID_None, nsGkAtoms::dir,
|
{&nsGkAtoms::reverse, &nsGkAtoms::ltr, &nsGkAtoms::rtl, nsnull};
|
||||||
strings, eCaseMatters);
|
PRInt32 index = GetContent()->FindAttrValueIn(kNameSpaceID_None, nsGkAtoms::dir,
|
||||||
if (index >= 0) {
|
strings, eCaseMatters);
|
||||||
bool values[] = {!aIsNormal, true, false};
|
if (index >= 0) {
|
||||||
aIsNormal = values[index];
|
bool values[] = {!aIsNormal, true, false};
|
||||||
|
aIsNormal = values[index];
|
||||||
|
}
|
||||||
|
} else if (GetContent()->AttrValueIs(kNameSpaceID_None, nsGkAtoms::dir,
|
||||||
|
nsGkAtoms::reverse, eCaseMatters)) {
|
||||||
|
aIsNormal = !aIsNormal;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user