Moved DoSelectAll() outside of a #ifdef NS_DEBUG

This commit is contained in:
troy%netscape.com 1998-08-04 20:04:55 +00:00
Родитель 18f5085562
Коммит f727367ea6
2 изменённых файлов: 38 добавлений и 38 удалений

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

@ -410,6 +410,41 @@ nsBrowserWindow::DoFileOpen()
}
}
void
nsBrowserWindow::DoSelectAll()
{
nsIPresShell* shell = GetPresShell();
if (nsnull != shell) {
nsIDocument* doc = shell->GetDocument();
if (nsnull != doc) {
doc->SelectAll();
ForceRefresh();
NS_RELEASE(doc);
}
NS_RELEASE(shell);
}
}
void
nsBrowserWindow::ForceRefresh()
{
nsIPresShell* shell = GetPresShell();
if (nsnull != shell) {
nsIViewManager* vm = shell->GetViewManager();
if (nsnull != vm) {
nsIView* root = vm->GetRootView();
if (nsnull != root) {
vm->UpdateView(root, (nsIRegion*)nsnull, NS_VMREFRESH_IMMEDIATE);
NS_RELEASE(root);
}
NS_RELEASE(vm);
}
NS_RELEASE(shell);
}
}
//----------------------------------------------------------------------
// Note: operator new zeros our memory
@ -1248,24 +1283,6 @@ nsBrowserWindow::ToggleFrameBorders()
ForceRefresh();
}
void
nsBrowserWindow::ForceRefresh()
{
nsIPresShell* shell = GetPresShell();
if (nsnull != shell) {
nsIViewManager* vm = shell->GetViewManager();
if (nsnull != vm) {
nsIView* root = vm->GetRootView();
if (nsnull != root) {
vm->UpdateView(root, (nsIRegion*)nsnull, NS_VMREFRESH_IMMEDIATE);
NS_RELEASE(root);
}
NS_RELEASE(vm);
}
NS_RELEASE(shell);
}
}
void
nsBrowserWindow::ShowContentSize()
{
@ -1457,24 +1474,6 @@ nsBrowserWindow::DoDebugSave()
}
}
void
nsBrowserWindow::DoSelectAll()
{
nsIPresShell* shell = GetPresShell();
if (nsnull != shell) {
nsIDocument* doc = shell->GetDocument();
if (nsnull != doc) {
doc->SelectAll();
ForceRefresh();
NS_RELEASE(doc);
}
NS_RELEASE(shell);
}
}
void
nsBrowserWindow::DoToggleSelection()
{

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

@ -117,6 +117,9 @@ public:
void DoCopy();
nsIPresShell* GetPresShell();
void DoSelectAll();
void ForceRefresh();
#ifdef NS_DEBUG
void DumpContent(FILE *out = stdout);
void DumpFrames(FILE *out = stdout);
@ -125,7 +128,6 @@ public:
void DumpStyleSheets(FILE *out = stdout);
void DumpStyleContexts(FILE *out = stdout);
void ToggleFrameBorders();
void ForceRefresh();
void ShowContentSize();
void ShowFrameSize();
void ShowStyleSize();
@ -135,7 +137,6 @@ public:
void DoSiteWalker();
void DoJSConsole();
void DoEditorMode();
void DoSelectAll();
nsEventStatus DispatchDebugMenu(PRInt32 aID);
#endif