зеркало из https://github.com/mozilla/pjs.git
remove unused quickdraw code. b=364415 r=cl
This commit is contained in:
Родитель
aab43bb34f
Коммит
fe90e92c5c
|
@ -269,7 +269,6 @@ public:
|
||||||
virtual PRBool DispatchWindowEvent(nsGUIEvent &event,nsEventStatus &aStatus);
|
virtual PRBool DispatchWindowEvent(nsGUIEvent &event,nsEventStatus &aStatus);
|
||||||
virtual void AcceptFocusOnClick(PRBool aBool) { mAcceptFocusOnClick = aBool;};
|
virtual void AcceptFocusOnClick(PRBool aBool) { mAcceptFocusOnClick = aBool;};
|
||||||
PRBool AcceptFocusOnClick() { return mAcceptFocusOnClick;};
|
PRBool AcceptFocusOnClick() { return mAcceptFocusOnClick;};
|
||||||
void Flash(nsPaintEvent &aEvent);
|
|
||||||
|
|
||||||
void LiveResizeStarted();
|
void LiveResizeStarted();
|
||||||
void LiveResizeEnded();
|
void LiveResizeEnded();
|
||||||
|
@ -290,16 +289,11 @@ protected:
|
||||||
|
|
||||||
virtual PRBool OnPaint(nsPaintEvent & aEvent);
|
virtual PRBool OnPaint(nsPaintEvent & aEvent);
|
||||||
|
|
||||||
// override to create different kinds of child views. Autoreleases, so
|
// override to create different kinds of child views. Autoreleases, so
|
||||||
// caller must retain.
|
// caller must retain.
|
||||||
virtual NSView* CreateCocoaView(NSRect inFrame);
|
virtual NSView* CreateCocoaView(NSRect inFrame);
|
||||||
void TearDownView();
|
void TearDownView();
|
||||||
|
|
||||||
// Find a quickdraw port in which to draw (needed by GFX until it
|
|
||||||
// is converted to Cocoa). This MUST be overridden if CreateCocoaView()
|
|
||||||
// does not create something that inherits from NSQuickDrawView!
|
|
||||||
virtual GrafPtr GetQuickDrawPort(); // gets plugin port or view's port
|
|
||||||
|
|
||||||
// return qdPort for a focussed ChildView, and null otherwise
|
// return qdPort for a focussed ChildView, and null otherwise
|
||||||
GrafPtr GetChildViewQuickDrawPort();
|
GrafPtr GetChildViewQuickDrawPort();
|
||||||
|
|
||||||
|
|
|
@ -1117,24 +1117,6 @@ inline PRUint16 COLOR8TOCOLOR16(PRUint8 color8)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
|
||||||
nsChildView::Flash(nsPaintEvent &aEvent)
|
|
||||||
{
|
|
||||||
#if 0
|
|
||||||
Rect flashRect;
|
|
||||||
if (debug_WantPaintFlashing() && aEvent.rect ) {
|
|
||||||
::SetRect ( &flashRect, aEvent.rect->x, aEvent.rect->y, aEvent.rect->x + aEvent.rect->width,
|
|
||||||
aEvent.rect->y + aEvent.rect->height );
|
|
||||||
StPortSetter portSetter(GetQuickDrawPort());
|
|
||||||
unsigned long endTicks;
|
|
||||||
::InvertRect ( &flashRect );
|
|
||||||
::Delay(10, &endTicks);
|
|
||||||
::InvertRect ( &flashRect );
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Dummy impl, meant to be overridden
|
// Dummy impl, meant to be overridden
|
||||||
PRBool
|
PRBool
|
||||||
nsChildView::OnPaint(nsPaintEvent &event)
|
nsChildView::OnPaint(nsPaintEvent &event)
|
||||||
|
@ -1171,10 +1153,9 @@ NS_IMETHODIMP nsChildView::Scroll(PRInt32 aDx, PRInt32 aDy, nsRect *aClipRect)
|
||||||
// Scroll the children (even if the widget is not visible)
|
// Scroll the children (even if the widget is not visible)
|
||||||
for (nsIWidget* kid = mFirstChild; kid; kid = kid->GetNextSibling()) {
|
for (nsIWidget* kid = mFirstChild; kid; kid = kid->GetNextSibling()) {
|
||||||
// We use resize rather than move since it gives us control
|
// We use resize rather than move since it gives us control
|
||||||
// over repainting. In the case of blitting, Quickdraw views
|
// over repainting. We can scroll like a bat out of hell
|
||||||
// draw their child widgets on the blit, so we can scroll
|
// by not wasting time invalidating the widgets, since it's
|
||||||
// like a bat out of hell by not wasting time invalidating
|
// completely unnecessary to do so.
|
||||||
// the widgets, since it's completely unnecessary to do so.
|
|
||||||
nsRect bounds;
|
nsRect bounds;
|
||||||
kid->GetBounds(bounds);
|
kid->GetBounds(bounds);
|
||||||
kid->Resize(bounds.x + aDx, bounds.y + aDy, bounds.width, bounds.height, PR_FALSE);
|
kid->Resize(bounds.x + aDx, bounds.y + aDy, bounds.width, bounds.height, PR_FALSE);
|
||||||
|
@ -1613,19 +1594,6 @@ NS_IMETHODIMP nsChildView::CancelIMEComposition()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Find a quickdraw port in which to draw (needed by GFX until it
|
|
||||||
// is converted to Cocoa). This must be overridden if CreateCocoaView()
|
|
||||||
// does not create something that inherits from NSQuickDrawView!
|
|
||||||
GrafPtr
|
|
||||||
nsChildView::GetQuickDrawPort()
|
|
||||||
{
|
|
||||||
if (mPluginPort)
|
|
||||||
return mPluginPort->port;
|
|
||||||
|
|
||||||
return GetChildViewQuickDrawPort();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
GrafPtr
|
GrafPtr
|
||||||
nsChildView::GetChildViewQuickDrawPort()
|
nsChildView::GetChildViewQuickDrawPort()
|
||||||
{
|
{
|
||||||
|
|
|
@ -39,13 +39,12 @@
|
||||||
#ifndef nsNativeScrollbar_h__
|
#ifndef nsNativeScrollbar_h__
|
||||||
#define nsNativeScrollbar_h__
|
#define nsNativeScrollbar_h__
|
||||||
|
|
||||||
|
#include "mozView.h"
|
||||||
#include "nsChildView.h"
|
#include "nsChildView.h"
|
||||||
|
|
||||||
#include "nsINativeScrollbar.h"
|
#include "nsINativeScrollbar.h"
|
||||||
#include "nsIContent.h"
|
#include "nsIContent.h"
|
||||||
|
|
||||||
#import "mozView.h"
|
|
||||||
|
|
||||||
class nsIScrollbarMediator;
|
class nsIScrollbarMediator;
|
||||||
|
|
||||||
@class NativeScrollbarView;
|
@class NativeScrollbarView;
|
||||||
|
@ -87,7 +86,6 @@ protected:
|
||||||
void RecreateHorizontalScrollbar();
|
void RecreateHorizontalScrollbar();
|
||||||
|
|
||||||
virtual NSView* CreateCocoaView(NSRect inFrame);
|
virtual NSView* CreateCocoaView(NSRect inFrame);
|
||||||
virtual GrafPtr GetQuickDrawPort();
|
|
||||||
|
|
||||||
void UpdateScroller();
|
void UpdateScroller();
|
||||||
|
|
||||||
|
|
|
@ -104,19 +104,6 @@ nsNativeScrollbar::CreateCocoaView(NSRect inFrame)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
GrafPtr
|
|
||||||
nsNativeScrollbar::GetQuickDrawPort ( )
|
|
||||||
{
|
|
||||||
// pray we're always a child of a NSQuickDrawView
|
|
||||||
if ( [mParentView isKindOfClass: [ChildView class]] ) {
|
|
||||||
NSQuickDrawView* parent = NS_STATIC_CAST(NSQuickDrawView*, mParentView);
|
|
||||||
return (GrafPtr)[parent qdPort];
|
|
||||||
}
|
|
||||||
|
|
||||||
return nsnull;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// DoScroll
|
// DoScroll
|
||||||
//
|
//
|
||||||
|
|
Загрузка…
Ссылка в новой задаче