mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-10 17:24:29 +00:00
Bug 1134744 - Fix baseline for form controls when line is inverted relative to block dir. r=smontagu
This commit is contained in:
parent
e673083ef6
commit
4c781f24a6
@ -70,9 +70,13 @@ nsFormControlFrame::GetLogicalBaseline(WritingMode aWritingMode) const
|
||||
NS_ASSERTION(!NS_SUBTREE_DIRTY(this),
|
||||
"frame must not be dirty");
|
||||
// Treat radio buttons and checkboxes as having an intrinsic baseline
|
||||
// at the bottom of the control (use the bottom content edge rather
|
||||
// than the bottom margin edge).
|
||||
return BSize(aWritingMode) -
|
||||
// at the block-end of the control (use the block-end content edge rather
|
||||
// than the margin edge).
|
||||
// For "inverted" lines (typically in writing-mode:vertical-lr), use the
|
||||
// block-start end instead.
|
||||
return aWritingMode.IsLineInverted()
|
||||
? GetLogicalUsedBorderAndPadding(aWritingMode).BStart(aWritingMode)
|
||||
: BSize(aWritingMode) -
|
||||
GetLogicalUsedBorderAndPadding(aWritingMode).BEnd(aWritingMode);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user