зеркало из https://github.com/mozilla/pjs.git
assorted code style and comment changes, no actual code changes. no bug. sr=sparky
This commit is contained in:
Родитель
c8394765b6
Коммит
6dabe39351
|
@ -301,8 +301,6 @@ public:
|
|||
NS_IMETHOD EndDrawPlugin();
|
||||
|
||||
// Mac specific methods
|
||||
virtual void CalcWindowRegions();
|
||||
|
||||
virtual PRBool PointInWidget(Point aThePoint);
|
||||
|
||||
virtual PRBool DispatchWindowEvent(nsGUIEvent& event);
|
||||
|
|
|
@ -707,7 +707,6 @@ NS_IMETHODIMP nsChildView::ModalEventFilter(PRBool aRealEvent, void *aEvent,
|
|||
}
|
||||
|
||||
|
||||
// Enable/disable this view
|
||||
NS_IMETHODIMP nsChildView::Enable(PRBool aState)
|
||||
{
|
||||
return NS_OK;
|
||||
|
@ -723,24 +722,21 @@ NS_IMETHODIMP nsChildView::IsEnabled(PRBool *aState)
|
|||
}
|
||||
|
||||
|
||||
// Set the focus on this component
|
||||
NS_IMETHODIMP nsChildView::SetFocus(PRBool aRaise)
|
||||
{
|
||||
NSWindow* window = [mView window];
|
||||
if (window)
|
||||
[window makeFirstResponder: mView];
|
||||
[window makeFirstResponder:mView];
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
// Get this component font
|
||||
nsIFontMetrics* nsChildView::GetFont(void)
|
||||
{
|
||||
return nsnull;
|
||||
}
|
||||
|
||||
|
||||
// Set this component font
|
||||
NS_IMETHODIMP nsChildView::SetFont(const nsFont &aFont)
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
|
@ -1405,53 +1401,36 @@ PRBool nsChildView::DispatchMouseEvent(nsMouseEvent &aEvent)
|
|||
|
||||
PRBool nsChildView::ReportDestroyEvent()
|
||||
{
|
||||
// nsEvent
|
||||
nsGUIEvent event(PR_TRUE, NS_DESTROY, this);
|
||||
event.time = PR_IntervalNow();
|
||||
|
||||
// dispatch event
|
||||
return (DispatchWindowEvent(event));
|
||||
return DispatchWindowEvent(event);
|
||||
}
|
||||
|
||||
|
||||
PRBool nsChildView::ReportMoveEvent()
|
||||
{
|
||||
// nsEvent
|
||||
nsGUIEvent moveEvent(PR_TRUE, NS_MOVE, this);
|
||||
moveEvent.refPoint.x = mBounds.x;
|
||||
moveEvent.refPoint.y = mBounds.y;
|
||||
moveEvent.time = PR_IntervalNow();
|
||||
|
||||
// dispatch event
|
||||
return (DispatchWindowEvent(moveEvent));
|
||||
moveEvent.refPoint.x = mBounds.x;
|
||||
moveEvent.refPoint.y = mBounds.y;
|
||||
moveEvent.time = PR_IntervalNow();
|
||||
return DispatchWindowEvent(moveEvent);
|
||||
}
|
||||
|
||||
|
||||
PRBool nsChildView::ReportSizeEvent()
|
||||
{
|
||||
// nsEvent
|
||||
nsSizeEvent sizeEvent(PR_TRUE, NS_SIZE, this);
|
||||
sizeEvent.time = PR_IntervalNow();
|
||||
|
||||
// nsSizeEvent
|
||||
sizeEvent.windowSize = &mBounds;
|
||||
sizeEvent.mWinWidth = mBounds.width;
|
||||
sizeEvent.mWinHeight = mBounds.height;
|
||||
|
||||
// dispatch event
|
||||
return(DispatchWindowEvent(sizeEvent));
|
||||
return DispatchWindowEvent(sizeEvent);
|
||||
}
|
||||
|
||||
|
||||
#pragma mark -
|
||||
|
||||
|
||||
void nsChildView::CalcWindowRegions()
|
||||
{
|
||||
// i don't think this is necessary anymore...
|
||||
}
|
||||
|
||||
|
||||
/* Calculate the x and y offsets for this particular widget
|
||||
* @update ps 09/22/98
|
||||
* @param aX -- x offset amount
|
||||
|
@ -1567,7 +1546,7 @@ NS_IMETHODIMP nsChildView::CaptureRollupEvents(nsIRollupListener * aListener,
|
|||
|
||||
NS_IMETHODIMP nsChildView::SetTitle(const nsAString& title)
|
||||
{
|
||||
// nothing to do here
|
||||
// child views don't have titles
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
|
|
@ -1202,6 +1202,7 @@ NS_IMETHODIMP nsCocoaWindow::GetAnimatedResize(PRUint16* aAnimation)
|
|||
RollUpPopups();
|
||||
}
|
||||
|
||||
|
||||
- (void)windowDidMove:(NSNotification *)aNotification
|
||||
{
|
||||
// Dispatch the move event to Gecko
|
||||
|
@ -1215,6 +1216,7 @@ NS_IMETHODIMP nsCocoaWindow::GetAnimatedResize(PRUint16* aAnimation)
|
|||
mGeckoWindow->DispatchEvent(&guiEvent, status);
|
||||
}
|
||||
|
||||
|
||||
- (BOOL)windowShouldClose:(id)sender
|
||||
{
|
||||
// We only want to send NS_XUL_CLOSE and let gecko close the window
|
||||
|
@ -1300,6 +1302,7 @@ NS_IMETHODIMP nsCocoaWindow::GetAnimatedResize(PRUint16* aAnimation)
|
|||
return YES;
|
||||
}
|
||||
|
||||
|
||||
// Dispatch a toolbar pill button clicked message to Gecko
|
||||
- (void)_toolbarPillButtonClicked:(id)sender
|
||||
{
|
||||
|
@ -1423,6 +1426,7 @@ NS_IMETHODIMP nsCocoaWindow::GetAnimatedResize(PRUint16* aAnimation)
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
- (id)initWithContentRect:(NSRect)contentRect styleMask:(unsigned int)styleMask
|
||||
backing:(NSBackingStoreType)bufferingType defer:(BOOL)deferCreation
|
||||
{
|
||||
|
@ -1431,11 +1435,13 @@ NS_IMETHODIMP nsCocoaWindow::GetAnimatedResize(PRUint16* aAnimation)
|
|||
backing:bufferingType defer:deferCreation];
|
||||
}
|
||||
|
||||
|
||||
- (BOOL)isContextMenu
|
||||
{
|
||||
return mIsContextMenu;
|
||||
}
|
||||
|
||||
|
||||
- (void)setIsContextMenu:(BOOL)flag
|
||||
{
|
||||
mIsContextMenu = flag;
|
||||
|
|
|
@ -106,12 +106,10 @@
|
|||
@end
|
||||
|
||||
|
||||
//
|
||||
// TopLevelWindowData
|
||||
//
|
||||
// This class holds data about top-level windows. We can't use a window
|
||||
// delegate, because an embedder may already have one.
|
||||
//
|
||||
|
||||
@implementation TopLevelWindowData
|
||||
|
||||
|
@ -180,4 +178,3 @@
|
|||
}
|
||||
|
||||
@end
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче