Closed Bug 1089581 Opened 10 years ago Closed 10 years ago

nsLineBox::SlideBy incorrectly treats logical coordinates as if they were physical

Categories

(Core :: Layout: Block and Inline, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla36

People

(Reporter: jfkthame, Assigned: jfkthame)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

(The nsLineBox::SlideBy version of bug 1089388.) This method takes a parameter that's defined as a block-dir coordinate delta, but then applies it as a physical y-coordinate delta. As a result, we get messed-up overflow areas for lines within blocks that have vertical writing mode. I don't have a simple standalone testcase for this, but it definitely leads to flaky painting behavior (as one would expect), and fixing it provides a much more stable experience.
Attachment #8511918 - Flags: review?(dbaron)
Assignee: nobody → jfkthame
Status: NEW → ASSIGNED
Blocks: 1088025
Attachment #8511918 - Flags: review?(dbaron) → review?(smontagu)
Comment on attachment 8511918 [details] [diff] [review] Convert nsLineBox::SlideBy to use logical coordinates. Review of attachment 8511918 [details] [diff] [review]: ----------------------------------------------------------------- ::: layout/generic/nsLineBox.h @@ +473,5 @@ > mContainerWidth = aContainerWidth; > mBounds.BStart(mWritingMode) += aDBCoord; > if (mData) { > + nsPoint physicalDelta = mozilla::LogicalPoint(mWritingMode, 0, aDBCoord). > + GetPhysicalPoint(mWritingMode, 0); It took me a little time to convince myself that it's kosher to overload nsPoint and nsLogicalPoint like this for offset coordinates with zero container-width, but it gives the right results so I'm not complaining.
Attachment #8511918 - Flags: review?(smontagu) → review+
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: