mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-01 19:39:13 +00:00
Bug 1901769 - Fix RTL offsets to be logical. r=fix
MANUAL PUSH: Orange fix CLOSED TREE
This commit is contained in:
parent
0a72f7d63c
commit
71c181f755
@ -2160,13 +2160,19 @@ nsMargin nsMenuPopupFrame::GetMargin() const {
|
||||
margin.top += auOffset;
|
||||
margin.bottom += auOffset;
|
||||
}
|
||||
margin.top += mExtraMargin.y;
|
||||
margin.left += mExtraMargin.x;
|
||||
// TODO(emilio): We should consider make these properly mirrored (that is,
|
||||
// changing -= to += here), but some tests rely on the old behavior of the
|
||||
// anchor moving physically to the bottom / right regardless of alignment...
|
||||
// changing -= to += here, and removing the rtl special case), but some tests
|
||||
// rely on the old behavior of the anchor moving physically regardless of
|
||||
// alignment...
|
||||
margin.top += mExtraMargin.y;
|
||||
margin.bottom -= mExtraMargin.y;
|
||||
margin.right -= mExtraMargin.x;
|
||||
if (IsDirectionRTL()) {
|
||||
margin.left += mExtraMargin.x;
|
||||
margin.right -= mExtraMargin.x;
|
||||
} else {
|
||||
margin.left -= mExtraMargin.x;
|
||||
margin.right += mExtraMargin.x;
|
||||
}
|
||||
return margin;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user