Bug 500629. Remove NS_SCROLL_PROPERTY_ALWAYS_BLIT, only XUL listboxes use it, and for no good reason. r+sr=bzbarsky

--HG--
extra : rebase_source : 262ff065fd9bbc7687a5aa1f9c330626878cdf25
This commit is contained in:
Robert O'Callahan 2009-06-29 10:48:59 +12:00
Родитель 9201670f7a
Коммит 5e4839edb9
4 изменённых файлов: 3 добавлений и 41 удалений

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

@ -220,8 +220,6 @@ nsListBoxBodyFrame::Init(nsIContent* aContent,
NS_ENSURE_SUCCESS(rv, rv);
nsIScrollableFrame* scrollFrame = nsLayoutUtils::GetScrollableFrameFor(this);
if (scrollFrame) {
nsIScrollableView* scrollableView = scrollFrame->GetScrollableView();
scrollableView->SetScrollProperties(NS_SCROLL_PROPERTY_ALWAYS_BLIT);
nsIBox* verticalScrollbar = scrollFrame->GetScrollbarBox(PR_TRUE);
if (verticalScrollbar) {
nsIScrollbarFrame* scrollbarFrame = do_QueryFrame(verticalScrollbar);

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

@ -47,8 +47,8 @@ struct nsSize;
// IID for the nsIScrollableView interface
#define NS_ISCROLLABLEVIEW_IID \
{ 0x00bba69f, 0xbbef, 0x4725, \
{ 0x8b, 0xee, 0xec, 0xfe, 0x82, 0xf7, 0xbd, 0xb0 } }
{ 0x74254899, 0xccc9, 0x4e67, \
{ 0xa6, 0x78, 0x6b, 0x79, 0xfa, 0x72, 0xb4, 0x86 } }
/**
* A scrolling view allows an arbitrary view that you supply to be scrolled
@ -106,22 +106,6 @@ public:
*/
NS_IMETHOD ScrollTo(nscoord aX, nscoord aY, PRUint32 aUpdateFlags) = 0;
/**
* Set the properties describing how scrolling can be performed
* in this scrollable.
* @param aProperties new properties
* @return error status
*/
NS_IMETHOD SetScrollProperties(PRUint32 aProperties) = 0;
/**
* Get the properties describing how scrolling can be performed
* in this scrollable.
* @param aProperties out parameter for current properties
* @return error status
*/
NS_IMETHOD GetScrollProperties(PRUint32 *aProperties) = 0;
/**
* Set the height of a line used for line scrolling.
* @param aHeight new line height in app units. the default
@ -236,8 +220,4 @@ public:
NS_DEFINE_STATIC_IID_ACCESSOR(nsIScrollableView, NS_ISCROLLABLEVIEW_IID)
//regardless of the transparency or opacity settings
//for this view, it can always be scrolled via a blit
#define NS_SCROLL_PROPERTY_ALWAYS_BLIT 0x0001
#endif

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

@ -372,18 +372,6 @@ NS_IMETHODIMP nsScrollPortView::GetScrollPosition(nscoord &aX, nscoord &aY) cons
return NS_OK;
}
NS_IMETHODIMP nsScrollPortView::SetScrollProperties(PRUint32 aProperties)
{
mScrollProperties = aProperties;
return NS_OK;
}
NS_IMETHODIMP nsScrollPortView::GetScrollProperties(PRUint32 *aProperties)
{
*aProperties = mScrollProperties;
return NS_OK;
}
NS_IMETHODIMP nsScrollPortView::SetLineHeight(nscoord aHeight)
{
mLineHeight = aHeight;
@ -579,8 +567,7 @@ void nsScrollPortView::Scroll(nsView *aScrolledView, nsPoint aTwipsDelta, nsIntP
nsIWidget *scrollWidget = GetWidget();
nsRegion updateRegion;
PRBool canBitBlit = scrollWidget &&
((mScrollProperties & NS_SCROLL_PROPERTY_ALWAYS_BLIT) ||
mViewManager->CanScrollWithBitBlt(aScrolledView, aTwipsDelta, &updateRegion)) &&
mViewManager->CanScrollWithBitBlt(aScrolledView, aTwipsDelta, &updateRegion) &&
scrollWidget->GetTransparencyMode() != eTransparencyTransparent;
if (canBitBlit) {

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

@ -67,8 +67,6 @@ public:
NS_IMETHOD GetScrollPosition(nscoord &aX, nscoord &aY) const;
NS_IMETHOD ScrollTo(nscoord aX, nscoord aY, PRUint32 aUpdateFlags);
NS_IMETHOD SetScrollProperties(PRUint32 aProperties);
NS_IMETHOD GetScrollProperties(PRUint32 *aProperties);
NS_IMETHOD SetLineHeight(nscoord aHeight);
NS_IMETHOD GetLineHeight(nscoord *aHeight);
NS_IMETHOD ScrollByLines(PRInt32 aNumLinesX, PRInt32 aNumLinesY,
@ -115,7 +113,6 @@ protected:
nscoord mOffsetX, mOffsetY;
nscoord mDestinationX, mDestinationY;
PRUint32 mScrollProperties;
nscoord mLineHeight;
nsISupportsArray *mListeners;
};