mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-20 00:35:44 +00:00
Bug 1097499 part 6 - Inherit move direction from parent for horizontal-in-vertical text. r=jfkthame
MozReview-Commit-ID: 28mBKQnYydp --HG-- extra : source : cf2271efff54b97ccbf30a73c903d577fca72dab
This commit is contained in:
parent
79d3a9f880
commit
752571191a
@ -2126,7 +2126,17 @@ nsFrameSelection::PhysicalMove(int16_t aDirection, int16_t aAmount,
|
||||
if (NS_SUCCEEDED(sel->GetPrimaryFrameForFocusNode(&frame, &offsetused,
|
||||
true))) {
|
||||
if (frame) {
|
||||
wm = frame->GetWritingMode();
|
||||
if (!frame->StyleContext()->IsTextCombined()) {
|
||||
wm = frame->GetWritingMode();
|
||||
} else {
|
||||
// Using different direction for horizontal-in-vertical would
|
||||
// make it hard to navigate via keyboard. Inherit the moving
|
||||
// direction from its parent.
|
||||
MOZ_ASSERT(frame->GetType() == nsGkAtoms::textFrame);
|
||||
wm = frame->GetParent()->GetWritingMode();
|
||||
MOZ_ASSERT(wm.IsVertical(), "Text combined "
|
||||
"can only appear in vertical text");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user