remove XP_MAC usage. b=281889 r=cbarrett sr=roc a=roc
git-svn-id: svn://10.0.0.236/trunk@237027 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
0d734a97f5
commit
7fbad72616
@ -61,7 +61,7 @@ class nsIFocusController;
|
|||||||
class imgIContainer;
|
class imgIContainer;
|
||||||
|
|
||||||
// mac uses click-hold context menus, a holdover from 4.x
|
// mac uses click-hold context menus, a holdover from 4.x
|
||||||
#if defined(XP_MAC) || defined(XP_MACOSX)
|
#ifdef XP_MACOSX
|
||||||
#define CLICK_HOLD_CONTEXT_MENUS 1
|
#define CLICK_HOLD_CONTEXT_MENUS 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@ -88,12 +88,6 @@
|
|||||||
// PSM2 includes
|
// PSM2 includes
|
||||||
#include "nsISecureBrowserUI.h"
|
#include "nsISecureBrowserUI.h"
|
||||||
|
|
||||||
#if (defined(XP_MAC) || defined(XP_MACOSX)) && !defined(MOZ_WIDGET_COCOA)
|
|
||||||
#include <MacWindows.h>
|
|
||||||
#include "nsWidgetSupport.h"
|
|
||||||
#include "nsIEventSink.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static NS_DEFINE_IID(kWindowCID, NS_WINDOW_CID);
|
static NS_DEFINE_IID(kWindowCID, NS_WINDOW_CID);
|
||||||
static NS_DEFINE_CID(kChildCID, NS_CHILD_CID);
|
static NS_DEFINE_CID(kChildCID, NS_CHILD_CID);
|
||||||
static NS_DEFINE_CID(kLookAndFeelCID, NS_LOOKANDFEEL_CID);
|
static NS_DEFINE_CID(kLookAndFeelCID, NS_LOOKANDFEEL_CID);
|
||||||
@ -117,9 +111,6 @@ nsWebBrowser::nsWebBrowser() : mDocShellTreeOwner(nsnull),
|
|||||||
mStream(nsnull),
|
mStream(nsnull),
|
||||||
mParentWidget(nsnull),
|
mParentWidget(nsnull),
|
||||||
mListenerArray(nsnull)
|
mListenerArray(nsnull)
|
||||||
#if (defined(XP_MAC) || defined(XP_MACOSX)) && !defined(MOZ_WIDGET_COCOA)
|
|
||||||
, mTopLevelWidget(nsnull)
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
mInitInfo = new nsWebBrowserInitInfo();
|
mInitInfo = new nsWebBrowserInitInfo();
|
||||||
mWWatch = do_GetService(NS_WINDOWWATCHER_CONTRACTID);
|
mWWatch = do_GetService(NS_WINDOWWATCHER_CONTRACTID);
|
||||||
@ -162,10 +153,6 @@ NS_IMETHODIMP nsWebBrowser::InternalDestroy()
|
|||||||
mListenerArray = nsnull;
|
mListenerArray = nsnull;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if (defined(XP_MAC) || defined(XP_MACOSX)) && !defined(MOZ_WIDGET_COCOA)
|
|
||||||
NS_IF_RELEASE(mTopLevelWidget);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -206,11 +193,6 @@ NS_IMETHODIMP nsWebBrowser::GetInterface(const nsIID& aIID, void** aSink)
|
|||||||
if(NS_SUCCEEDED(QueryInterface(aIID, aSink)))
|
if(NS_SUCCEEDED(QueryInterface(aIID, aSink)))
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
|
|
||||||
#if (defined(XP_MAC) || defined(XP_MACOSX)) && !defined(MOZ_WIDGET_COCOA)
|
|
||||||
if (aIID.Equals(NS_GET_IID(nsIEventSink)) && mTopLevelWidget)
|
|
||||||
return mTopLevelWidget->QueryInterface(NS_GET_IID(nsIEventSink), aSink);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (mDocShell) {
|
if (mDocShell) {
|
||||||
#ifdef NS_PRINTING
|
#ifdef NS_PRINTING
|
||||||
if (aIID.Equals(NS_GET_IID(nsIWebBrowserPrint))) {
|
if (aIID.Equals(NS_GET_IID(nsIWebBrowserPrint))) {
|
||||||
@ -376,40 +358,6 @@ NS_IMETHODIMP nsWebBrowser::EnableGlobalHistory(PRBool aEnable)
|
|||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if (defined(XP_MAC) || defined(XP_MACOSX)) && !defined(MOZ_WIDGET_COCOA)
|
|
||||||
NS_IMETHODIMP nsWebBrowser::EnsureTopLevelWidget(nativeWindow aWindow)
|
|
||||||
{
|
|
||||||
WindowPtr macWindow = static_cast<WindowPtr>(aWindow);
|
|
||||||
nsIWidget *widget = nsnull;
|
|
||||||
nsCOMPtr<nsIWidget> newWidget;
|
|
||||||
nsresult rv = NS_ERROR_FAILURE;
|
|
||||||
|
|
||||||
::GetWindowProperty(macWindow, kTopLevelWidgetPropertyCreator,
|
|
||||||
kTopLevelWidgetRefPropertyTag, sizeof(nsIWidget*), nsnull, (void*)&widget);
|
|
||||||
if (!widget) {
|
|
||||||
newWidget = do_CreateInstance(kWindowCID, &rv);
|
|
||||||
if (NS_SUCCEEDED(rv)) {
|
|
||||||
|
|
||||||
// Create it with huge bounds. The actual bounds that matters is that of the
|
|
||||||
// nsIBaseWindow. The bounds of the top level widget clips its children so
|
|
||||||
// we just have to make sure it is big enough to always contain the children.
|
|
||||||
|
|
||||||
nsRect r(0, 0, 32000, 32000);
|
|
||||||
rv = newWidget->Create(macWindow, r, nsnull, nsnull, nsnull, nsnull, nsnull);
|
|
||||||
if (NS_SUCCEEDED(rv))
|
|
||||||
widget = newWidget;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
NS_ASSERTION(widget, "Failed to get or create a toplevel widget!!");
|
|
||||||
if (widget) {
|
|
||||||
mTopLevelWidget = widget;
|
|
||||||
NS_ADDREF(mTopLevelWidget); // Allows multiple nsWebBrowsers to be in 1 window.
|
|
||||||
rv = NS_OK;
|
|
||||||
}
|
|
||||||
return rv;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
NS_IMETHODIMP nsWebBrowser::GetContainerWindow(nsIWebBrowserChrome** aTopWindow)
|
NS_IMETHODIMP nsWebBrowser::GetContainerWindow(nsIWebBrowserChrome** aTopWindow)
|
||||||
{
|
{
|
||||||
NS_ENSURE_ARG_POINTER(aTopWindow);
|
NS_ENSURE_ARG_POINTER(aTopWindow);
|
||||||
@ -1426,13 +1374,7 @@ NS_IMETHODIMP nsWebBrowser::SetParentNativeWindow(nativeWindow aParentNativeWind
|
|||||||
{
|
{
|
||||||
NS_ENSURE_STATE(!mDocShell);
|
NS_ENSURE_STATE(!mDocShell);
|
||||||
|
|
||||||
#if (defined(XP_MAC) || defined(XP_MACOSX)) && !defined(MOZ_WIDGET_COCOA)
|
|
||||||
nsresult rv = EnsureTopLevelWidget(aParentNativeWindow);
|
|
||||||
NS_ENSURE_SUCCESS(rv, rv);
|
|
||||||
mParentNativeWindow = mTopLevelWidget->GetNativeData(NS_NATIVE_WINDOW);
|
|
||||||
#else
|
|
||||||
mParentNativeWindow = aParentNativeWindow;
|
mParentNativeWindow = aParentNativeWindow;
|
||||||
#endif
|
|
||||||
|
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -190,13 +190,6 @@ protected:
|
|||||||
//Weak Reference interfaces...
|
//Weak Reference interfaces...
|
||||||
nsIWidget* mParentWidget;
|
nsIWidget* mParentWidget;
|
||||||
nsVoidArray * mListenerArray;
|
nsVoidArray * mListenerArray;
|
||||||
|
|
||||||
#if (defined(XP_MAC) || defined(XP_MACOSX)) && !defined(MOZ_WIDGET_COCOA)
|
|
||||||
NS_IMETHOD EnsureTopLevelWidget(nativeWindow aWindow);
|
|
||||||
|
|
||||||
nsIWidget* mTopLevelWidget;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* nsWebBrowser_h__ */
|
#endif /* nsWebBrowser_h__ */
|
||||||
|
|||||||
@ -450,9 +450,6 @@ void nsCaret::PaintCaret(nsDisplayListBuilder *aBuilder,
|
|||||||
aCtx->FillRect(GetHookRect() + aOffset);
|
aCtx->FillRect(GetHookRect() + aOffset);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef XP_MAC
|
|
||||||
#pragma mark -
|
|
||||||
#endif
|
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
NS_IMETHODIMP nsCaret::NotifySelectionChanged(nsIDOMDocument *, nsISelection *aDomSel, PRInt16 aReason)
|
NS_IMETHODIMP nsCaret::NotifySelectionChanged(nsIDOMDocument *, nsISelection *aDomSel, PRInt16 aReason)
|
||||||
@ -485,9 +482,6 @@ NS_IMETHODIMP nsCaret::NotifySelectionChanged(nsIDOMDocument *, nsISelection *aD
|
|||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef XP_MAC
|
|
||||||
#pragma mark -
|
|
||||||
#endif
|
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
void nsCaret::KillTimer()
|
void nsCaret::KillTimer()
|
||||||
@ -796,7 +790,7 @@ void nsCaret::GetViewForRendering(nsIFrame *caretFrame,
|
|||||||
// Our best approach is to use the event fired widget related view.
|
// Our best approach is to use the event fired widget related view.
|
||||||
// But if we do so, we need large change for editor and this.
|
// But if we do so, we need large change for editor and this.
|
||||||
if (coordType == eIMECoordinates) {
|
if (coordType == eIMECoordinates) {
|
||||||
#if defined(XP_MAC) || defined(XP_MACOSX) || defined(XP_WIN)
|
#if defined(XP_MACOSX) || defined(XP_WIN)
|
||||||
// #59405 and #313918, on Mac and Windows, the coordinate for IME need to be
|
// #59405 and #313918, on Mac and Windows, the coordinate for IME need to be
|
||||||
// root view related.
|
// root view related.
|
||||||
coordType = eTopLevelWindowCoordinates;
|
coordType = eTopLevelWindowCoordinates;
|
||||||
@ -1126,10 +1120,6 @@ void nsCaret::InvalidateRects(const nsRect &aRect, const nsRect &aHook,
|
|||||||
aFrame->Invalidate(rect, PR_FALSE);
|
aFrame->Invalidate(rect, PR_FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef XP_MAC
|
|
||||||
#pragma mark -
|
|
||||||
#endif
|
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
/* static */
|
/* static */
|
||||||
void nsCaret::CaretBlinkCallback(nsITimer *aTimer, void *aClosure)
|
void nsCaret::CaretBlinkCallback(nsITimer *aTimer, void *aClosure)
|
||||||
|
|||||||
@ -1550,7 +1550,7 @@ nsFrame::GetDataForTableSelection(nsFrameSelection *aFrameSelection,
|
|||||||
{
|
{
|
||||||
// In Browser, special 'table selection' key must be pressed for table selection
|
// In Browser, special 'table selection' key must be pressed for table selection
|
||||||
// or when just Shift is pressed and we're already in table/cell selection mode
|
// or when just Shift is pressed and we're already in table/cell selection mode
|
||||||
#if defined(XP_MAC) || defined(XP_MACOSX)
|
#ifdef XP_MACOSX
|
||||||
doTableSelection = aMouseEvent->isMeta || (aMouseEvent->isShift && selectingTableCells);
|
doTableSelection = aMouseEvent->isMeta || (aMouseEvent->isShift && selectingTableCells);
|
||||||
#else
|
#else
|
||||||
doTableSelection = aMouseEvent->isControl || (aMouseEvent->isShift && selectingTableCells);
|
doTableSelection = aMouseEvent->isControl || (aMouseEvent->isShift && selectingTableCells);
|
||||||
@ -1786,7 +1786,7 @@ nsFrame::HandlePress(nsPresContext* aPresContext,
|
|||||||
|
|
||||||
nsMouseEvent *me = (nsMouseEvent *)aEvent;
|
nsMouseEvent *me = (nsMouseEvent *)aEvent;
|
||||||
|
|
||||||
#if defined(XP_MAC) || defined(XP_MACOSX)
|
#ifdef XP_MACOSX
|
||||||
if (me->isControl)
|
if (me->isControl)
|
||||||
return NS_OK;//short ciruit. hard coded for mac due to time restraints.
|
return NS_OK;//short ciruit. hard coded for mac due to time restraints.
|
||||||
#endif
|
#endif
|
||||||
@ -1866,7 +1866,7 @@ nsFrame::HandlePress(nsPresContext* aPresContext,
|
|||||||
|
|
||||||
frameselection->SetMouseDownState(PR_TRUE);
|
frameselection->SetMouseDownState(PR_TRUE);
|
||||||
|
|
||||||
#if defined(XP_MAC) || defined(XP_MACOSX)
|
#ifdef XP_MACOSX
|
||||||
PRBool control = me->isMeta;
|
PRBool control = me->isMeta;
|
||||||
#else
|
#else
|
||||||
PRBool control = me->isControl;
|
PRBool control = me->isControl;
|
||||||
|
|||||||
@ -809,9 +809,6 @@ nsSelectionIterator::IsDone()
|
|||||||
|
|
||||||
////////////END nsSelectionIterator methods
|
////////////END nsSelectionIterator methods
|
||||||
|
|
||||||
#ifdef XP_MAC
|
|
||||||
#pragma mark -
|
|
||||||
#endif
|
|
||||||
|
|
||||||
////////////BEGIN nsFrameSelection methods
|
////////////BEGIN nsFrameSelection methods
|
||||||
|
|
||||||
@ -1124,9 +1121,6 @@ nsFrameSelection::UndefineCaretBidiLevel()
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef XP_MAC
|
|
||||||
#pragma mark -
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef PRINT_RANGE
|
#ifdef PRINT_RANGE
|
||||||
void printRange(nsIDOMRange *aDomRange)
|
void printRange(nsIDOMRange *aDomRange)
|
||||||
@ -3156,7 +3150,7 @@ printf("HandleTableSelection: Mouse UP event. mDragSelectingCells=%d, mStartSele
|
|||||||
// Any other mouseup actions require that Ctrl or Cmd key is pressed
|
// Any other mouseup actions require that Ctrl or Cmd key is pressed
|
||||||
// else stop table selection mode
|
// else stop table selection mode
|
||||||
PRBool doMouseUpAction = PR_FALSE;
|
PRBool doMouseUpAction = PR_FALSE;
|
||||||
#if defined(XP_MAC) || defined(XP_MACOSX)
|
#ifdef XP_MACOSX
|
||||||
doMouseUpAction = aMouseEvent->isMeta;
|
doMouseUpAction = aMouseEvent->isMeta;
|
||||||
#else
|
#else
|
||||||
doMouseUpAction = aMouseEvent->isControl;
|
doMouseUpAction = aMouseEvent->isControl;
|
||||||
@ -3880,10 +3874,6 @@ nsFrameSelection::SetAncestorLimiter(nsIContent *aLimiter)
|
|||||||
//END nsFrameSelection methods
|
//END nsFrameSelection methods
|
||||||
|
|
||||||
|
|
||||||
#ifdef XP_MAC
|
|
||||||
#pragma mark -
|
|
||||||
#endif
|
|
||||||
|
|
||||||
//BEGIN nsISelection interface implementations
|
//BEGIN nsISelection interface implementations
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -904,7 +904,7 @@ nsPrintEngine::GetCurrentPrintSettings(nsIPrintSettings * *aCurrentPrintSettings
|
|||||||
nsresult
|
nsresult
|
||||||
nsPrintEngine::CheckForPrinters(nsIPrintSettings* aPrintSettings)
|
nsPrintEngine::CheckForPrinters(nsIPrintSettings* aPrintSettings)
|
||||||
{
|
{
|
||||||
#if defined(XP_MAC) || defined(XP_MACOSX)
|
#ifdef XP_MACOSX
|
||||||
// Mac doesn't support retrieving a printer list.
|
// Mac doesn't support retrieving a printer list.
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
#else
|
#else
|
||||||
|
|||||||
@ -109,12 +109,12 @@ void nsMenuBarListener::InitAccessKey()
|
|||||||
|
|
||||||
// Compiled-in defaults, in case we can't get LookAndFeel --
|
// Compiled-in defaults, in case we can't get LookAndFeel --
|
||||||
// mac doesn't have menu shortcuts, other platforms use alt.
|
// mac doesn't have menu shortcuts, other platforms use alt.
|
||||||
#if !(defined(XP_MAC) || defined(XP_MACOSX))
|
#ifdef XP_MACOSX
|
||||||
mAccessKey = nsIDOMKeyEvent::DOM_VK_ALT;
|
|
||||||
mAccessKeyMask = MODIFIER_ALT;
|
|
||||||
#else
|
|
||||||
mAccessKey = 0;
|
mAccessKey = 0;
|
||||||
mAccessKeyMask = 0;
|
mAccessKeyMask = 0;
|
||||||
|
#else
|
||||||
|
mAccessKey = nsIDOMKeyEvent::DOM_VK_ALT;
|
||||||
|
mAccessKeyMask = MODIFIER_ALT;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Get the menu access key value from prefs, overriding the default:
|
// Get the menu access key value from prefs, overriding the default:
|
||||||
@ -249,7 +249,7 @@ nsMenuBarListener::KeyPress(nsIDOMEvent* aKeyEvent)
|
|||||||
retVal = NS_OK; // I am consuming event
|
retVal = NS_OK; // I am consuming event
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#if !defined(XP_MAC) && !defined(XP_MACOSX)
|
#ifndef XP_MACOSX
|
||||||
// Also need to handle F10 specially on Non-Mac platform.
|
// Also need to handle F10 specially on Non-Mac platform.
|
||||||
else if (keyCode == NS_VK_F10) {
|
else if (keyCode == NS_VK_F10) {
|
||||||
if ((GetModifiers(keyEvent) & ~MODIFIER_CONTROL) == 0) {
|
if ((GetModifiers(keyEvent) & ~MODIFIER_CONTROL) == 0) {
|
||||||
@ -262,7 +262,7 @@ nsMenuBarListener::KeyPress(nsIDOMEvent* aKeyEvent)
|
|||||||
return NS_OK; // consume the event
|
return NS_OK; // consume the event
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif // !XP_MAC && !XP_MACOSX
|
#endif // !XP_MACOSX
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1075,7 +1075,7 @@ nsMenuFrame::BuildAcceleratorText()
|
|||||||
{
|
{
|
||||||
// Compiled-in defaults, in case we can't get LookAndFeel --
|
// Compiled-in defaults, in case we can't get LookAndFeel --
|
||||||
// command for mac, control for all other platforms.
|
// command for mac, control for all other platforms.
|
||||||
#if defined(XP_MAC) || defined(XP_MACOSX)
|
#ifdef XP_MACOSX
|
||||||
accelKey = nsIDOMKeyEvent::DOM_VK_META;
|
accelKey = nsIDOMKeyEvent::DOM_VK_META;
|
||||||
#else
|
#else
|
||||||
accelKey = nsIDOMKeyEvent::DOM_VK_CONTROL;
|
accelKey = nsIDOMKeyEvent::DOM_VK_CONTROL;
|
||||||
|
|||||||
@ -45,7 +45,7 @@
|
|||||||
#include "nsRepeatService.h"
|
#include "nsRepeatService.h"
|
||||||
#include "nsIServiceManager.h"
|
#include "nsIServiceManager.h"
|
||||||
|
|
||||||
#if defined(XP_MAC) || defined(XP_MACOSX)
|
#ifdef XP_MACOSX
|
||||||
#define INITAL_REPEAT_DELAY 250
|
#define INITAL_REPEAT_DELAY 250
|
||||||
#define REPEAT_DELAY 25
|
#define REPEAT_DELAY 25
|
||||||
#else
|
#else
|
||||||
|
|||||||
@ -1759,13 +1759,13 @@ nsXULPopupManager::KeyPress(nsIDOMEvent* aKeyEvent)
|
|||||||
ShowMenu(content, PR_TRUE, PR_FALSE);
|
ShowMenu(content, PR_TRUE, PR_FALSE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#if !defined(XP_MAC) && !defined(XP_MACOSX)
|
#ifndef XP_MACOSX
|
||||||
else if (theChar == NS_VK_F10) {
|
else if (theChar == NS_VK_F10) {
|
||||||
// doesn't matter what modifier keys are down in Non-Mac platform
|
// doesn't matter what modifier keys are down in Non-Mac platform
|
||||||
// if the menu bar is active and F10 is pressed - deactivate it
|
// if the menu bar is active and F10 is pressed - deactivate it
|
||||||
Rollup();
|
Rollup();
|
||||||
}
|
}
|
||||||
#endif // !XP_MAC && !XP_MACOSX
|
#endif // !XP_MACOSX
|
||||||
else {
|
else {
|
||||||
HandleShortcutNavigation(keyEvent, nsnull);
|
HandleShortcutNavigation(keyEvent, nsnull);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -672,7 +672,7 @@ nsTreeBodyFrame::InvalidateRow(PRInt32 aIndex)
|
|||||||
return NS_OK;
|
return NS_OK;
|
||||||
|
|
||||||
nsRect rowRect(mInnerBox.x, mInnerBox.y+mRowHeight*aIndex, mInnerBox.width, mRowHeight);
|
nsRect rowRect(mInnerBox.x, mInnerBox.y+mRowHeight*aIndex, mInnerBox.width, mRowHeight);
|
||||||
#if defined(XP_MAC) || defined(XP_MACOSX)
|
#ifdef XP_MACOSX
|
||||||
// Mac can't process the event loop during a drag, so if we're dragging,
|
// Mac can't process the event loop during a drag, so if we're dragging,
|
||||||
// invalidate synchronously.
|
// invalidate synchronously.
|
||||||
nsLeafBoxFrame::Invalidate(rowRect, mSlots && mSlots->mDragSession ? PR_TRUE : PR_FALSE);
|
nsLeafBoxFrame::Invalidate(rowRect, mSlots && mSlots->mDragSession ? PR_TRUE : PR_FALSE);
|
||||||
@ -2565,7 +2565,9 @@ nsTreeBodyFrame::HandleEvent(nsPresContext* aPresContext,
|
|||||||
mSlots->mDropAllowed = PR_FALSE;
|
mSlots->mDropAllowed = PR_FALSE;
|
||||||
InvalidateDropFeedback(lastDropRow, lastDropOrient);
|
InvalidateDropFeedback(lastDropRow, lastDropOrient);
|
||||||
}
|
}
|
||||||
#if !defined(XP_MACOSX)
|
#ifdef XP_MACOSX
|
||||||
|
ScrollByLines(mSlots->mScrollLines);
|
||||||
|
#else
|
||||||
if (!lastScrollLines) {
|
if (!lastScrollLines) {
|
||||||
// Cancel any previously initialized timer.
|
// Cancel any previously initialized timer.
|
||||||
if (mSlots->mTimer) {
|
if (mSlots->mTimer) {
|
||||||
@ -2578,8 +2580,6 @@ nsTreeBodyFrame::HandleEvent(nsPresContext* aPresContext,
|
|||||||
LazyScrollCallback, nsITimer::TYPE_ONE_SHOT,
|
LazyScrollCallback, nsITimer::TYPE_ONE_SHOT,
|
||||||
getter_AddRefs(mSlots->mTimer));
|
getter_AddRefs(mSlots->mTimer));
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
ScrollByLines(mSlots->mScrollLines);
|
|
||||||
#endif
|
#endif
|
||||||
// Bail out to prevent spring loaded timer and feedback line settings.
|
// Bail out to prevent spring loaded timer and feedback line settings.
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
@ -3880,7 +3880,7 @@ nsresult nsTreeBodyFrame::ScrollToRowInternal(const ScrollParts& aParts, PRInt32
|
|||||||
{
|
{
|
||||||
ScrollInternal(aParts, aRow);
|
ScrollInternal(aParts, aRow);
|
||||||
|
|
||||||
#if defined(XP_MAC) || defined(XP_MACOSX)
|
#ifdef XP_MACOSX
|
||||||
// mac can't process the event loop during a drag, so if we're dragging,
|
// mac can't process the event loop during a drag, so if we're dragging,
|
||||||
// grab the scroll widget and make it paint synchronously. This is
|
// grab the scroll widget and make it paint synchronously. This is
|
||||||
// sorta slow (having to paint the entire tree), but it works.
|
// sorta slow (having to paint the entire tree), but it works.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user