Bug 1187605 pt 1 - In vertical writing modes, add an 'orientation' attribute with value='left' or 'right' to the <select> control's dropdown button. r=smontagu

This commit is contained in:
Jonathan Kew 2015-08-03 18:45:20 +01:00
parent ee2586be5f
commit 5068a1ca21

View File

@ -1221,6 +1221,14 @@ nsComboboxControlFrame::CreateAnonymousContent(nsTArray<ContentInfo>& aElements)
mButtonContent->SetAttr(kNameSpaceID_None, nsGkAtoms::tabindex,
NS_LITERAL_STRING("-1"), false);
WritingMode wm = GetWritingMode();
if (wm.IsVertical()) {
mButtonContent->SetAttr(kNameSpaceID_None, nsGkAtoms::orientation,
wm.IsVerticalRL() ? NS_LITERAL_STRING("left")
: NS_LITERAL_STRING("right"),
false);
}
if (!aElements.AppendElement(mButtonContent))
return NS_ERROR_OUT_OF_MEMORY;