зеркало из https://github.com/mozilla/pjs.git
Bug 393970 - "Grid columns don't line up if one <rows> block is scrollable" (patch #1) [p=trev.moz@adblockplus.org (Wladimir Palant) r+sr+a1.9=roc]
This commit is contained in:
Родитель
e775d9969f
Коммит
fe66af4a1c
|
@ -258,6 +258,7 @@ nsGridRowLeafLayout::ComputeChildSizes(nsIBox* aBox,
|
||||||
// see if we are in a scrollable frame. If we are then there could be scrollbars present
|
// see if we are in a scrollable frame. If we are then there could be scrollbars present
|
||||||
// if so we need to subtract them out to make sure our columns line up.
|
// if so we need to subtract them out to make sure our columns line up.
|
||||||
if (aBox) {
|
if (aBox) {
|
||||||
|
PRBool isHorizontal = aBox->IsHorizontal();
|
||||||
|
|
||||||
// go up the parent chain looking for scrollframes
|
// go up the parent chain looking for scrollframes
|
||||||
aBox = aBox->GetParentBox();
|
aBox = aBox->GetParentBox();
|
||||||
|
@ -273,7 +274,7 @@ nsGridRowLeafLayout::ComputeChildSizes(nsIBox* aBox,
|
||||||
ourRect.Deflate(padding);
|
ourRect.Deflate(padding);
|
||||||
|
|
||||||
nscoord diff;
|
nscoord diff;
|
||||||
if (aBox->IsHorizontal()) {
|
if (isHorizontal) {
|
||||||
diff = scrollbarSizes.left + scrollbarSizes.right;
|
diff = scrollbarSizes.left + scrollbarSizes.right;
|
||||||
} else {
|
} else {
|
||||||
diff = scrollbarSizes.top + scrollbarSizes.bottom;
|
diff = scrollbarSizes.top + scrollbarSizes.bottom;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче