mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1157951 patch 2 - Make nsCharClipDisplayItem aware of vertical writing modes. r=roc
This commit is contained in:
parent
d5046e2945
commit
7aa0db553c
@ -3625,9 +3625,17 @@ public:
|
||||
nscoord aVisIStartEdge, nscoord aVisIEndEdge) {
|
||||
nsRect r = aItem.Frame()->GetScrollableOverflowRect() +
|
||||
aItem.ToReferenceFrame();
|
||||
mVisIStart = aVisIStartEdge > 0 ? r.x + aVisIStartEdge : nscoord_MIN;
|
||||
mVisIEnd = aVisIEndEdge > 0
|
||||
? std::max(r.XMost() - aVisIEndEdge, mVisIStart) : nscoord_MAX;
|
||||
if (aItem.Frame()->GetWritingMode().IsVertical()) {
|
||||
mVisIStart = aVisIStartEdge > 0 ? r.y + aVisIStartEdge : nscoord_MIN;
|
||||
mVisIEnd =
|
||||
aVisIEndEdge > 0 ? std::max(r.YMost() - aVisIEndEdge, mVisIStart)
|
||||
: nscoord_MAX;
|
||||
} else {
|
||||
mVisIStart = aVisIStartEdge > 0 ? r.x + aVisIStartEdge : nscoord_MIN;
|
||||
mVisIEnd =
|
||||
aVisIEndEdge > 0 ? std::max(r.XMost() - aVisIEndEdge, mVisIStart)
|
||||
: nscoord_MAX;
|
||||
}
|
||||
}
|
||||
void Intersect(nscoord* aVisIStart, nscoord* aVisISize) const {
|
||||
nscoord end = *aVisIStart + *aVisISize;
|
||||
|
@ -6311,8 +6311,9 @@ nsTextFrame::DrawTextRunAndDecorations(
|
||||
const nsSize frameSize = GetSize();
|
||||
nscoord measure = verticalRun ? frameSize.height : frameSize.width;
|
||||
|
||||
// XXX todo: probably should have a vertical version of this...
|
||||
if (!verticalRun) {
|
||||
if (verticalRun) {
|
||||
aClipEdges.Intersect(&y, &measure);
|
||||
} else {
|
||||
aClipEdges.Intersect(&x, &measure);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user