mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-26 06:38:36 +00:00
Fix for bugs:
120299 - Drop feedback is narrow first time 121187 - drag of message summary line (even without drop) garbles bounding box r=sfraser, sr=hyatt
This commit is contained in:
parent
97b9729140
commit
145837642f
@ -304,7 +304,7 @@ nsOutlinerBodyFrame::nsOutlinerBodyFrame(nsIPresShell* aPresShell)
|
||||
:nsLeafBoxFrame(aPresShell), mPresContext(nsnull), mOutlinerBoxObject(nsnull), mImageCache(nsnull),
|
||||
mColumns(nsnull), mScrollbar(nsnull), mTopRowIndex(0), mRowHeight(0), mIndentation(0), mStringWidth(-1),
|
||||
mFocused(PR_FALSE), mColumnsDirty(PR_TRUE), mDropAllowed(PR_FALSE), mHasFixedRowCount(PR_FALSE),
|
||||
mVerticalOverflow(PR_FALSE), mDropRow(-1), mDropOrient(-1), mOpenTimer(nsnull)
|
||||
mVerticalOverflow(PR_FALSE), mImageGuard(PR_FALSE), mDropRow(-1), mDropOrient(-1), mOpenTimer(nsnull)
|
||||
{
|
||||
NS_NewISupportsArray(getter_AddRefs(mScratchArray));
|
||||
}
|
||||
@ -781,6 +781,9 @@ NS_IMETHODIMP nsOutlinerBodyFrame::InvalidateCell(PRInt32 aIndex, const PRUnicha
|
||||
if (aIndex < mTopRowIndex || aIndex > mTopRowIndex + mPageCount + 1)
|
||||
return NS_OK;
|
||||
|
||||
if (mImageGuard)
|
||||
return NS_OK;
|
||||
|
||||
nscoord currX = mInnerBox.x;
|
||||
nscoord yPos = mInnerBox.y+mRowHeight*(aIndex-mTopRowIndex);
|
||||
for (nsOutlinerColumn* currCol = mColumns; currCol && currX < mInnerBox.x+mInnerBox.width;
|
||||
@ -1659,7 +1662,12 @@ nsOutlinerBodyFrame::GetImage(PRInt32 aRowIndex, const PRUnichar* aColID,
|
||||
|
||||
nsresult rv;
|
||||
nsCOMPtr<imgILoader> il(do_GetService("@mozilla.org/image/loader;1", &rv));
|
||||
mImageGuard = PR_TRUE;
|
||||
il->LoadImage(srcURI, nsnull, listener, mPresContext, nsIRequest::LOAD_NORMAL, nsnull, nsnull, getter_AddRefs(imageRequest));
|
||||
mImageGuard = PR_FALSE;
|
||||
|
||||
// In a case it was already cached.
|
||||
imageRequest->GetImage(aResult);
|
||||
|
||||
if (!mImageCache) {
|
||||
mImageCache = new nsSupportsHashtable(64);
|
||||
|
@ -466,6 +466,9 @@ protected: // Data Members
|
||||
|
||||
PRPackedBool mVerticalOverflow;
|
||||
|
||||
// A guard that prevents us from recursive painting.
|
||||
PRPackedBool mImageGuard;
|
||||
|
||||
// The row the mouse is hovering over during a drop.
|
||||
PRInt32 mDropRow;
|
||||
// Where we want to draw feedback (above/on this row/below) if allowed.
|
||||
|
@ -304,7 +304,7 @@ nsOutlinerBodyFrame::nsOutlinerBodyFrame(nsIPresShell* aPresShell)
|
||||
:nsLeafBoxFrame(aPresShell), mPresContext(nsnull), mOutlinerBoxObject(nsnull), mImageCache(nsnull),
|
||||
mColumns(nsnull), mScrollbar(nsnull), mTopRowIndex(0), mRowHeight(0), mIndentation(0), mStringWidth(-1),
|
||||
mFocused(PR_FALSE), mColumnsDirty(PR_TRUE), mDropAllowed(PR_FALSE), mHasFixedRowCount(PR_FALSE),
|
||||
mVerticalOverflow(PR_FALSE), mDropRow(-1), mDropOrient(-1), mOpenTimer(nsnull)
|
||||
mVerticalOverflow(PR_FALSE), mImageGuard(PR_FALSE), mDropRow(-1), mDropOrient(-1), mOpenTimer(nsnull)
|
||||
{
|
||||
NS_NewISupportsArray(getter_AddRefs(mScratchArray));
|
||||
}
|
||||
@ -781,6 +781,9 @@ NS_IMETHODIMP nsOutlinerBodyFrame::InvalidateCell(PRInt32 aIndex, const PRUnicha
|
||||
if (aIndex < mTopRowIndex || aIndex > mTopRowIndex + mPageCount + 1)
|
||||
return NS_OK;
|
||||
|
||||
if (mImageGuard)
|
||||
return NS_OK;
|
||||
|
||||
nscoord currX = mInnerBox.x;
|
||||
nscoord yPos = mInnerBox.y+mRowHeight*(aIndex-mTopRowIndex);
|
||||
for (nsOutlinerColumn* currCol = mColumns; currCol && currX < mInnerBox.x+mInnerBox.width;
|
||||
@ -1659,7 +1662,12 @@ nsOutlinerBodyFrame::GetImage(PRInt32 aRowIndex, const PRUnichar* aColID,
|
||||
|
||||
nsresult rv;
|
||||
nsCOMPtr<imgILoader> il(do_GetService("@mozilla.org/image/loader;1", &rv));
|
||||
mImageGuard = PR_TRUE;
|
||||
il->LoadImage(srcURI, nsnull, listener, mPresContext, nsIRequest::LOAD_NORMAL, nsnull, nsnull, getter_AddRefs(imageRequest));
|
||||
mImageGuard = PR_FALSE;
|
||||
|
||||
// In a case it was already cached.
|
||||
imageRequest->GetImage(aResult);
|
||||
|
||||
if (!mImageCache) {
|
||||
mImageCache = new nsSupportsHashtable(64);
|
||||
|
@ -466,6 +466,9 @@ protected: // Data Members
|
||||
|
||||
PRPackedBool mVerticalOverflow;
|
||||
|
||||
// A guard that prevents us from recursive painting.
|
||||
PRPackedBool mImageGuard;
|
||||
|
||||
// The row the mouse is hovering over during a drop.
|
||||
PRInt32 mDropRow;
|
||||
// Where we want to draw feedback (above/on this row/below) if allowed.
|
||||
|
Loading…
x
Reference in New Issue
Block a user