mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 367246. When the scrolled frame's width exceeds its available width (because its padding alone is greater than the available width) and the direction is RTL, the scrolled frame should be positioned with its right edge at the right edge of the scrollport. r+sr=dbaron
This commit is contained in:
parent
59f23d63e8
commit
042de9c4e3
9
layout/generic/crashtests/367246-1.html
Normal file
9
layout/generic/crashtests/367246-1.html
Normal file
@ -0,0 +1,9 @@
|
||||
<html>
|
||||
<body>
|
||||
|
||||
<div style="direction: rtl">
|
||||
<div style="padding: 10px; width: 1px; overflow: scroll;">Foopy</div>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
@ -31,6 +31,7 @@ load 364686-1.xhtml
|
||||
load 366021-1.xhtml
|
||||
load 366667-1.html
|
||||
load 366952-1.html
|
||||
load 367246-1.html
|
||||
load 368330-1.html
|
||||
load 368461-1.xhtml
|
||||
load 368860-1.html
|
||||
|
@ -2610,6 +2610,14 @@ nsGfxScrollFrameInner::GetScrolledRect(const nsSize& aScrollPortSize) const
|
||||
} else {
|
||||
if (x2 > aScrollPortSize.width)
|
||||
x2 = aScrollPortSize.width;
|
||||
// When the scrolled frame chooses a size larger than its available width (because
|
||||
// its padding alone is larger than the available width), we need to keep the
|
||||
// start-edge of the scroll frame anchored to the start-edge of the scrollport.
|
||||
// When the scrolled frame is RTL, this means moving it in our left-based
|
||||
// coordinate system, so we need to compensate for its extra width here by
|
||||
// effectively repositioning the frame.
|
||||
nscoord extraWidth = PR_MAX(0, mScrolledFrame->GetSize().width - aScrollPortSize.width);
|
||||
x2 += extraWidth;
|
||||
}
|
||||
|
||||
return nsRect(x1, y1, x2 - x1, y2 - y1);
|
||||
|
Loading…
Reference in New Issue
Block a user