mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-30 16:22:00 +00:00
Bug 1093553 - Followup to fix positioning of the caret with writing-mode:vertical-lr and text-orientation:sideways-right. r=smontagu
This commit is contained in:
parent
34fea182cd
commit
5182bb2e02
@ -309,9 +309,14 @@ nsCaret::GetGeometryForFrame(nsIFrame* aFrame,
|
||||
descent = fm->MaxDescent();
|
||||
}
|
||||
nscoord height = ascent + descent;
|
||||
bool vertical = aFrame->GetWritingMode().IsVertical();
|
||||
WritingMode wm = aFrame->GetWritingMode();
|
||||
bool vertical = wm.IsVertical();
|
||||
if (vertical) {
|
||||
framePos.x = baseline - ascent;
|
||||
if (wm.IsLineInverted()) {
|
||||
framePos.x = baseline - descent;
|
||||
} else {
|
||||
framePos.x = baseline - ascent;
|
||||
}
|
||||
} else {
|
||||
framePos.y = baseline - ascent;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user