diff --git a/mozilla/htmlparser/src/CNavDTD.cpp b/mozilla/htmlparser/src/CNavDTD.cpp index 5190962e132..b25a0eb37a8 100644 --- a/mozilla/htmlparser/src/CNavDTD.cpp +++ b/mozilla/htmlparser/src/CNavDTD.cpp @@ -1268,8 +1268,6 @@ PRBool CNavDTD::CanContainIndirect(eHTMLTags aParent,eHTMLTags aChild) const { } break; - result=PR_TRUE; break; - default: break; } @@ -2720,8 +2718,7 @@ PRInt32 CNavDTD::ConsumeToken(CToken*& aToken){ nsAutoString temp(aChar); return ConsumeText(temp,*theScanner,aToken); } - else return ConsumeWhitespace(aChar,*theScanner,aToken); - break; + return ConsumeWhitespace(aChar,*theScanner,aToken); } //switch break; } //switch diff --git a/mozilla/htmlparser/src/nsIDTDDebug.h b/mozilla/htmlparser/src/nsIDTDDebug.h index 8fbeaad4ca3..bc443037f6c 100644 --- a/mozilla/htmlparser/src/nsIDTDDebug.h +++ b/mozilla/htmlparser/src/nsIDTDDebug.h @@ -55,4 +55,4 @@ public: extern NS_EXPORT nsresult NS_NewDTDDebug(nsIDTDDebug** aInstancePtrResult); -#endif /* NS_IDTDDEBUG__ */ \ No newline at end of file +#endif /* NS_IDTDDEBUG__ */ diff --git a/mozilla/htmlparser/src/nsParser.cpp b/mozilla/htmlparser/src/nsParser.cpp index abaefe55acf..85a223787f3 100644 --- a/mozilla/htmlparser/src/nsParser.cpp +++ b/mozilla/htmlparser/src/nsParser.cpp @@ -418,7 +418,7 @@ PRInt32 nsParser::DidBuildModel(PRInt32 anErrorCode) { } #endif - return anErrorCode; + return result; } /** diff --git a/mozilla/htmlparser/src/prstrm.h b/mozilla/htmlparser/src/prstrm.h index 6bd41f3990f..7fbd36add2c 100644 --- a/mozilla/htmlparser/src/prstrm.h +++ b/mozilla/htmlparser/src/prstrm.h @@ -41,7 +41,7 @@ #define _PRSTR_DELBUF_C(c, x) /* as nothing */ #else #define _PRSTR_BP bp -// Unix compilers don't believe in encapsulation +// Unix compilers do not believe in encapsulation // At least on Solaris this is also ignored #define _PRSTR_DELBUF(x) delbuf = x #define _PRSTR_DELBUF_C(c, x) c::_PRSTR_DELBUF(x) @@ -103,4 +103,4 @@ public: void close(); }; -#endif /* __PRSTRM */ \ No newline at end of file +#endif /* __PRSTRM */ diff --git a/mozilla/parser/htmlparser/src/CNavDTD.cpp b/mozilla/parser/htmlparser/src/CNavDTD.cpp index 5190962e132..b25a0eb37a8 100644 --- a/mozilla/parser/htmlparser/src/CNavDTD.cpp +++ b/mozilla/parser/htmlparser/src/CNavDTD.cpp @@ -1268,8 +1268,6 @@ PRBool CNavDTD::CanContainIndirect(eHTMLTags aParent,eHTMLTags aChild) const { } break; - result=PR_TRUE; break; - default: break; } @@ -2720,8 +2718,7 @@ PRInt32 CNavDTD::ConsumeToken(CToken*& aToken){ nsAutoString temp(aChar); return ConsumeText(temp,*theScanner,aToken); } - else return ConsumeWhitespace(aChar,*theScanner,aToken); - break; + return ConsumeWhitespace(aChar,*theScanner,aToken); } //switch break; } //switch diff --git a/mozilla/parser/htmlparser/src/nsIDTDDebug.h b/mozilla/parser/htmlparser/src/nsIDTDDebug.h index 8fbeaad4ca3..bc443037f6c 100644 --- a/mozilla/parser/htmlparser/src/nsIDTDDebug.h +++ b/mozilla/parser/htmlparser/src/nsIDTDDebug.h @@ -55,4 +55,4 @@ public: extern NS_EXPORT nsresult NS_NewDTDDebug(nsIDTDDebug** aInstancePtrResult); -#endif /* NS_IDTDDEBUG__ */ \ No newline at end of file +#endif /* NS_IDTDDEBUG__ */ diff --git a/mozilla/parser/htmlparser/src/nsParser.cpp b/mozilla/parser/htmlparser/src/nsParser.cpp index abaefe55acf..85a223787f3 100644 --- a/mozilla/parser/htmlparser/src/nsParser.cpp +++ b/mozilla/parser/htmlparser/src/nsParser.cpp @@ -418,7 +418,7 @@ PRInt32 nsParser::DidBuildModel(PRInt32 anErrorCode) { } #endif - return anErrorCode; + return result; } /** diff --git a/mozilla/parser/htmlparser/src/prstrm.h b/mozilla/parser/htmlparser/src/prstrm.h index 6bd41f3990f..7fbd36add2c 100644 --- a/mozilla/parser/htmlparser/src/prstrm.h +++ b/mozilla/parser/htmlparser/src/prstrm.h @@ -41,7 +41,7 @@ #define _PRSTR_DELBUF_C(c, x) /* as nothing */ #else #define _PRSTR_BP bp -// Unix compilers don't believe in encapsulation +// Unix compilers do not believe in encapsulation // At least on Solaris this is also ignored #define _PRSTR_DELBUF(x) delbuf = x #define _PRSTR_DELBUF_C(c, x) c::_PRSTR_DELBUF(x) @@ -103,4 +103,4 @@ public: void close(); }; -#endif /* __PRSTRM */ \ No newline at end of file +#endif /* __PRSTRM */ diff --git a/mozilla/uriloader/base/nsDocLoader.cpp b/mozilla/uriloader/base/nsDocLoader.cpp index 9d0cccd4e39..b540b579160 100644 --- a/mozilla/uriloader/base/nsDocLoader.cpp +++ b/mozilla/uriloader/base/nsDocLoader.cpp @@ -494,8 +494,8 @@ NS_METHOD nsDocumentBindInfo::OnStopBinding(PRInt32 aStatus, const nsString& aMs /******************************************* -/* nsDocLoaderFactory -/*******************************************/ + * nsDocLoaderFactory + *******************************************/ static NS_DEFINE_IID(kIFactoryIID, NS_IFACTORY_IID); static NS_DEFINE_IID(kCDocumentLoader, NS_DOCUMENTLOADER_CID); diff --git a/mozilla/webshell/src/nsDocLoader.cpp b/mozilla/webshell/src/nsDocLoader.cpp index 9d0cccd4e39..b540b579160 100644 --- a/mozilla/webshell/src/nsDocLoader.cpp +++ b/mozilla/webshell/src/nsDocLoader.cpp @@ -494,8 +494,8 @@ NS_METHOD nsDocumentBindInfo::OnStopBinding(PRInt32 aStatus, const nsString& aMs /******************************************* -/* nsDocLoaderFactory -/*******************************************/ + * nsDocLoaderFactory + *******************************************/ static NS_DEFINE_IID(kIFactoryIID, NS_IFACTORY_IID); static NS_DEFINE_IID(kCDocumentLoader, NS_DOCUMENTLOADER_CID); diff --git a/mozilla/webshell/src/nsWebWidget.cpp b/mozilla/webshell/src/nsWebWidget.cpp index 48b72c783c0..1d131f7cce2 100644 --- a/mozilla/webshell/src/nsWebWidget.cpp +++ b/mozilla/webshell/src/nsWebWidget.cpp @@ -149,8 +149,6 @@ private: //static nsIWebWidget* gRootWebWidget; nsString* mName; nsIDeviceContext *mDeviceContext; - - friend class WebWidgetImpl; }; //---------------------------------------------------------------------- @@ -1136,8 +1134,8 @@ nsresult WebWidgetImpl::GetDOMDocument(nsIDOMDocument** aDocument) } /******************************************* -/* nsWebWidgetFactory -/*******************************************/ + * nsWebWidgetFactory + *******************************************/ //static NS_DEFINE_IID(kISupportsIID, NS_ISUPPORTS_IID); static NS_DEFINE_IID(kIFactoryIID, NS_IFACTORY_IID); diff --git a/mozilla/webshell/tests/viewer/Makefile b/mozilla/webshell/tests/viewer/Makefile index 03065e262f8..14a4a818c5c 100644 --- a/mozilla/webshell/tests/viewer/Makefile +++ b/mozilla/webshell/tests/viewer/Makefile @@ -40,14 +40,7 @@ EX_LIBS = \ $(DIST)/bin/libgfxunix.so \ $(DIST)/bin/libraptorhtml.so \ $(DIST)/bin/libgmbaseunix.so \ - $(DIST)/bin/libraptorhtmlbase_s.so \ - $(DIST)/bin/libraptorhtmldoc_s.so \ - $(DIST)/bin/libraptorhtmlforms_s.so \ $(DIST)/bin/libraptorhtmlpars.so \ - $(DIST)/bin/libraptorhtmlstyle_s.so \ - $(DIST)/bin/libraptorhtmltable_s.so \ - $(DIST)/bin/libraptorlayout_s.so \ - $(DIST)/bin/libraptorevents_s.so \ $(DIST)/bin/libraptorview.so \ $(DIST)/bin/libreg.so \ $(DIST)/bin/libabouturl.so \ @@ -85,8 +78,6 @@ EX_LIBS = \ $(DIST)/bin/libxp.so \ $(DIST)/bin/libxpcom.so \ $(DIST)/bin/libzlib.so \ - $(DIST)/bin/libnglcsslay_s.so \ - $(DIST)/bin/libnglhtmlcon_s.so \ $(NULL) ifeq ($(OS_ARCH),Linux) diff --git a/mozilla/webshell/tests/viewer/nsEditorInterfaces.h b/mozilla/webshell/tests/viewer/nsEditorInterfaces.h index 933353c93f3..87544a51a63 100644 --- a/mozilla/webshell/tests/viewer/nsEditorInterfaces.h +++ b/mozilla/webshell/tests/viewer/nsEditorInterfaces.h @@ -66,4 +66,4 @@ extern nsresult NS_NewEditorKeyListener(nsIDOMEventListener ** aInstancePtrResul extern nsresult NS_NewEditorMouseListener(nsIDOMEventListener ** aInstancePtrResult); -#endif //nsEditorInterfaces_h__ \ No newline at end of file +#endif //nsEditorInterfaces_h__ diff --git a/mozilla/webshell/tests/viewer/nsEditorMode.cpp b/mozilla/webshell/tests/viewer/nsEditorMode.cpp index 4ade2e67ab5..e08463904f5 100644 --- a/mozilla/webshell/tests/viewer/nsEditorMode.cpp +++ b/mozilla/webshell/tests/viewer/nsEditorMode.cpp @@ -167,4 +167,4 @@ nsresult nsAppendText(nsString *aStr) NS_IF_RELEASE(mNode); return NS_OK; -} \ No newline at end of file +} diff --git a/mozilla/webshell/tests/viewer/nsEditorMode.h b/mozilla/webshell/tests/viewer/nsEditorMode.h index a480f8d8097..06e73e72a4d 100644 --- a/mozilla/webshell/tests/viewer/nsEditorMode.h +++ b/mozilla/webshell/tests/viewer/nsEditorMode.h @@ -30,4 +30,4 @@ extern nsresult nsGetCurrentNode(nsIDOMNode **aNode); nsresult RegisterEventListeners(); nsresult GetFirstTextNode(nsIDOMNode *aNode, nsIDOMNode **aRetNode); -#endif //nsEditorMode_h__ \ No newline at end of file +#endif //nsEditorMode_h__ diff --git a/mozilla/webshell/tests/viewer/nsViewer.cpp b/mozilla/webshell/tests/viewer/nsViewer.cpp index 37f20657d1f..8ba9a80de2e 100644 --- a/mozilla/webshell/tests/viewer/nsViewer.cpp +++ b/mozilla/webshell/tests/viewer/nsViewer.cpp @@ -607,16 +607,14 @@ nsEventStatus PR_CALLBACK HandleEventApp(nsGUIEvent *aEvent) gTheViewer->Stop(); } - return nsEventStatus_eConsumeDoDefault; } + return nsEventStatus_eConsumeDoDefault; default: - return(gTheViewer->DispatchMenuItem(aEvent)); break; } - - return(nsEventStatus_eIgnore); + return(gTheViewer->DispatchMenuItem(aEvent)); } void ReleaseMemory() diff --git a/mozilla/widget/src/motif/nsTextAreaWidget.cpp b/mozilla/widget/src/motif/nsTextAreaWidget.cpp index 1415408d242..77bb8839bbb 100644 --- a/mozilla/widget/src/motif/nsTextAreaWidget.cpp +++ b/mozilla/widget/src/motif/nsTextAreaWidget.cpp @@ -271,7 +271,7 @@ void nsTextAreaWidget::AggTextAreaWidget::SetPassword(PRBool aIsPassword) //-------------------------------------------------------------- PRBool nsTextAreaWidget::AggTextAreaWidget::SetReadOnly(PRBool aReadOnlyFlag) { - GET_OUTER()->SetReadOnly(aReadOnlyFlag); + return GET_OUTER()->SetReadOnly(aReadOnlyFlag); } //-------------------------------------------------------------- diff --git a/mozilla/widget/src/motif/nsTextWidget.cpp b/mozilla/widget/src/motif/nsTextWidget.cpp index 79cacaa642e..4f866543e7e 100644 --- a/mozilla/widget/src/motif/nsTextWidget.cpp +++ b/mozilla/widget/src/motif/nsTextWidget.cpp @@ -296,7 +296,7 @@ void nsTextWidget::AggTextWidget::SetPassword(PRBool aIsPassword) //-------------------------------------------------------------- PRBool nsTextWidget::AggTextWidget::SetReadOnly(PRBool aReadOnlyFlag) { - GET_OUTER()->SetReadOnly(aReadOnlyFlag); + return GET_OUTER()->SetReadOnly(aReadOnlyFlag); } //-------------------------------------------------------------- diff --git a/mozilla/widget/src/motif/nsWidgetFactory.cpp b/mozilla/widget/src/motif/nsWidgetFactory.cpp index 747b3527f8f..176b9c897fc 100644 --- a/mozilla/widget/src/motif/nsWidgetFactory.cpp +++ b/mozilla/widget/src/motif/nsWidgetFactory.cpp @@ -202,8 +202,6 @@ nsresult nsWidgetFactory::CreateInstance(nsISupports *aOuter, } return res; - - return NS_OK; } nsresult nsWidgetFactory::LockFactory(PRBool aLock) diff --git a/mozilla/widget/src/motif/nsWindow.cpp b/mozilla/widget/src/motif/nsWindow.cpp index fbf5797d13c..ac76ab53fb2 100644 --- a/mozilla/widget/src/motif/nsWindow.cpp +++ b/mozilla/widget/src/motif/nsWindow.cpp @@ -116,7 +116,7 @@ nsrefcnt nsWindow::AddRef(void) */ nsrefcnt nsWindow::Release(void) { - return NS_RELEASE(mOuter); + return mOuter->Release(); } @@ -791,42 +791,27 @@ void nsWindow::Invalidate(PRBool aIsSynchronous) //------------------------------------------------------------------------- void* nsWindow::GetNativeData(PRUint32 aDataType) { - switch(aDataType) { + switch(aDataType) { - case NS_NATIVE_WINDOW: - { - return (void*)XtWindow(mWidget); - } - break; - case NS_NATIVE_DISPLAY: - { - return (void*)XtDisplay(mWidget); - } - break; - case NS_NATIVE_WIDGET: - { - return (void*)(mWidget); - } - break; - case NS_NATIVE_GRAPHIC: - { - // We Cache a Read-Only Shared GC in the Toolkit. If we don't - // have one ourselves (because it needs to be writeable) grab the - // the shared GC - - if (nsnull == mGC) - return (((nsToolkit *)mToolkit)->GetSharedGC()); - - return ((void*)mGC); - } - break; - case NS_NATIVE_COLORMAP: - default: - break; - } - - return NULL; + case NS_NATIVE_WINDOW: + return (void*)XtWindow(mWidget); + case NS_NATIVE_DISPLAY: + return (void*)XtDisplay(mWidget); + case NS_NATIVE_WIDGET: + return (void*)(mWidget); + case NS_NATIVE_GRAPHIC: + // We Cache a Read-Only Shared GC in the Toolkit. If we don't + // have one ourselves (because it needs to be writeable) grab the + // the shared GC + if (nsnull == mGC) + return (((nsToolkit *)mToolkit)->GetSharedGC()); + return ((void*)mGC); + case NS_NATIVE_COLORMAP: + default: + break; + } + return NULL; } @@ -968,18 +953,15 @@ PRBool nsWindow::ConvertStatus(nsEventStatus aStatus) switch(aStatus) { case nsEventStatus_eIgnore: return(PR_FALSE); - break; case nsEventStatus_eConsumeNoDefault: return(PR_TRUE); - break; case nsEventStatus_eConsumeDoDefault: return(PR_FALSE); - break; default: NS_ASSERTION(0, "Illegal nsEventStatus enumeration value"); - return(PR_FALSE); - break; + break; } + return(PR_FALSE); } //------------------------------------------------------------------------- diff --git a/mozilla/widget/src/motif/nsWindow.h b/mozilla/widget/src/motif/nsWindow.h index 5e416b8f2ff..287fe14667c 100644 --- a/mozilla/widget/src/motif/nsWindow.h +++ b/mozilla/widget/src/motif/nsWindow.h @@ -489,7 +489,7 @@ public: \ } \ PRBool _classname::_aggname::OnResize(nsSizeEvent &aEvent) \ { \ - GET_OUTER()->OnResize(aEvent); \ + return GET_OUTER()->OnResize(aEvent); \ } \ PRBool _classname::_aggname::OnKey(PRUint32 aEventType, PRUint32 aKeyCode) \ { \