Bug 415257 - "Editable trees: input sized wrongly and rows jumping with flexible and non-flexible treecols" [p=paul.rouget@gmail.com (Paul Rouget) r+sr=Neil a1.9=beltzner]

This commit is contained in:
reed@reedloden.com 2008-03-18 12:41:34 -07:00
Родитель 227abae696
Коммит 89641f288f
2 изменённых файлов: 3 добавлений и 8 удалений

Просмотреть файл

@ -1109,15 +1109,14 @@ nsTreeBodyFrame::GetCoordsForCellItem(PRInt32 aRow, nsITreeColumn* aCol, const n
*aWidth = 0;
*aHeight = 0;
nscoord currX = mInnerBox.x;
nscoord currX = mInnerBox.x - mHorzPosition;
// The Rect for the requested item.
nsRect theRect;
nsPresContext* presContext = PresContext();
for (nsTreeColumn* currCol = mColumns->GetFirstColumn(); currCol && currX < mInnerBox.x + mInnerBox.width;
currCol = currCol->GetNext()) {
for (nsTreeColumn* currCol = mColumns->GetFirstColumn(); currCol; currCol = currCol->GetNext()) {
// The Rect for the current cell.
nscoord colWidth;
@ -1133,7 +1132,6 @@ nsTreeBodyFrame::GetCoordsForCellItem(PRInt32 aRow, nsITreeColumn* aCol, const n
currX += cellRect.width;
continue;
}
// Now obtain the properties for our cell.
PrefillPropertyArray(aRow, currCol);
mView->GetCellProperties(aRow, currCol, mScratchArray);
@ -3849,9 +3847,6 @@ NS_IMETHODIMP nsTreeBodyFrame::EnsureCellIsVisible(PRInt32 aRow, nsITreeColumn*
rv = col->GetWidthInTwips(this, &columnWidth);
if(NS_FAILED(rv)) return rv;
if (col->IsLastVisible(this))
columnWidth -= mAdjustWidth; // this is one case we don't want to adjust
// If the start of the column is before the
// start of the horizontal view, then scroll
if (columnPos < mHorzPosition)

Просмотреть файл

@ -331,7 +331,6 @@
this.stopEditing();
var input = this.inputField;
input.hidden = false;
var box = this.treeBoxObject;
box.ensureCellIsVisible(row, column);
@ -353,6 +352,7 @@
coords = box.getCoordsForCellItem(row, column, "cell",
outx, outy, outwidth, outheight);
input.width = outwidth.value - (left - outx.value);
input.hidden = false;
input.value = this.view.getCellText(row, column);
var selectText = function selectText() {