diff --git a/mozilla/content/base/src/nsDocument.cpp b/mozilla/content/base/src/nsDocument.cpp index 27ed4eb70ca..3d2a19fa1c2 100644 --- a/mozilla/content/base/src/nsDocument.cpp +++ b/mozilla/content/base/src/nsDocument.cpp @@ -57,7 +57,6 @@ static NS_DEFINE_IID(kIDocumentIID, NS_IDOCUMENT_IID); #include "nsIDOMElement.h" static NS_DEFINE_IID(kIDOMDocumentIID, NS_IDOMDOCUMENT_IID); -static NS_DEFINE_IID(kIDOMNodeIID, NS_IDOMNODE_IID); static NS_DEFINE_IID(kIContentIID, NS_ICONTENT_IID); static NS_DEFINE_IID(kIDOMElementIID, NS_IDOMELEMENT_IID); static NS_DEFINE_IID(kIScriptObjectOwnerIID, NS_ISCRIPTOBJECTOWNER_IID); @@ -70,7 +69,6 @@ static NS_DEFINE_IID(kIDOMMouseMotionListenerIID, NS_IDOMMOUSEMOTIONLISTENER_IID static NS_DEFINE_IID(kIPrivateDOMEventIID, NS_IPRIVATEDOMEVENT_IID); static NS_DEFINE_IID(kIEventListenerManagerIID, NS_IEVENTLISTENERMANAGER_IID); static NS_DEFINE_IID(kIPostDataIID, NS_IPOSTDATA_IID); -static NS_DEFINE_IID(kICSSStyleSheetIID, NS_ICSS_STYLE_SHEET_IID); NS_LAYOUT nsresult NS_NewPostData(PRBool aIsFile, char* aData, diff --git a/mozilla/content/events/src/nsDOMEvent.cpp b/mozilla/content/events/src/nsDOMEvent.cpp index add7ab31093..32b43457e36 100644 --- a/mozilla/content/events/src/nsDOMEvent.cpp +++ b/mozilla/content/events/src/nsDOMEvent.cpp @@ -281,54 +281,39 @@ const char* nsDOMEvent::GetEventName(PRUint32 aEventType) case NS_MOUSE_MIDDLE_BUTTON_DOWN: case NS_MOUSE_RIGHT_BUTTON_DOWN: return mEventNames[eDOMEvents_mousedown]; - break; case NS_MOUSE_LEFT_BUTTON_UP: case NS_MOUSE_MIDDLE_BUTTON_UP: case NS_MOUSE_RIGHT_BUTTON_UP: return mEventNames[eDOMEvents_mouseup]; - break; case NS_MOUSE_LEFT_CLICK: case NS_MOUSE_RIGHT_CLICK: return mEventNames[eDOMEvents_click]; - break; case NS_MOUSE_LEFT_DOUBLECLICK: case NS_MOUSE_RIGHT_DOUBLECLICK: return mEventNames[eDOMEvents_dblclick]; - break; case NS_MOUSE_ENTER: return mEventNames[eDOMEvents_mouseover]; - break; case NS_MOUSE_EXIT: return mEventNames[eDOMEvents_mouseout]; - break; case NS_MOUSE_MOVE: return mEventNames[eDOMEvents_mousemove]; - break; case NS_KEY_UP: return mEventNames[eDOMEvents_keyup]; - break; case NS_KEY_DOWN: return mEventNames[eDOMEvents_keydown]; - break; case NS_GOTFOCUS: return mEventNames[eDOMEvents_focus]; - break; case NS_LOSTFOCUS: return mEventNames[eDOMEvents_blur]; - break; case NS_PAGE_LOAD: case NS_IMAGE_LOAD: return mEventNames[eDOMEvents_load]; - break; case NS_PAGE_UNLOAD: return mEventNames[eDOMEvents_unload]; - break; case NS_IMAGE_ABORT: return mEventNames[eDOMEvents_abort]; - break; case NS_IMAGE_ERROR: return mEventNames[eDOMEvents_error]; - break; default: break; } diff --git a/mozilla/content/html/document/src/nsHTMLContentSink.cpp b/mozilla/content/html/document/src/nsHTMLContentSink.cpp index d7acf98ee96..7db29adebc7 100644 --- a/mozilla/content/html/document/src/nsHTMLContentSink.cpp +++ b/mozilla/content/html/document/src/nsHTMLContentSink.cpp @@ -1574,7 +1574,6 @@ nsresult HTMLContentSink::ProcessAREATag(const nsIParserNode& aNode) nsAutoString shape, coords, href, target(mBaseTarget), alt; PRInt32 ac = aNode.GetAttributeCount(); PRBool suppress = PR_FALSE; - PRBool setTarget = PR_TRUE; for (PRInt32 i = 0; i < ac; i++) { // Get upper-cased key const nsString& key = aNode.GetKeyAt(i); diff --git a/mozilla/content/html/document/src/nsHTMLDocument.cpp b/mozilla/content/html/document/src/nsHTMLDocument.cpp index db2a13e7a23..872ce5d1716 100644 --- a/mozilla/content/html/document/src/nsHTMLDocument.cpp +++ b/mozilla/content/html/document/src/nsHTMLDocument.cpp @@ -196,8 +196,6 @@ nsHTMLDocument::EndLoad() return nsDocument::EndLoad(); } -static NS_DEFINE_IID(kIDocumentObserverIID, NS_IDOCUMENT_OBSERVER_IID); - NS_IMETHODIMP nsHTMLDocument::SetTitle(const nsString& aTitle) { if (nsnull == mDocumentTitle) { diff --git a/mozilla/content/html/document/src/nsMarkupDocument.cpp b/mozilla/content/html/document/src/nsMarkupDocument.cpp index 863a0c88ae3..35eaad98766 100644 --- a/mozilla/content/html/document/src/nsMarkupDocument.cpp +++ b/mozilla/content/html/document/src/nsMarkupDocument.cpp @@ -32,8 +32,6 @@ #include "nsHTMLValue.h" #include "nsXIFConverter.h" -static NS_DEFINE_IID(kIDOMNodeIID, NS_IDOMNODE_IID); -static NS_DEFINE_IID(kIDOMElementIID, NS_IDOMELEMENT_IID); static NS_DEFINE_IID(kIContentIID, NS_ICONTENT_IID); static NS_DEFINE_IID(kICSSStyleSheetIID, NS_ICSS_STYLE_SHEET_IID); diff --git a/mozilla/content/shared/src/nsCSSProps.cpp b/mozilla/content/shared/src/nsCSSProps.cpp index 44479e77776..6b2c8c2acfb 100644 --- a/mozilla/content/shared/src/nsCSSProps.cpp +++ b/mozilla/content/shared/src/nsCSSProps.cpp @@ -656,19 +656,16 @@ const char* nsCSSProps::LookupProperty(PRInt32 aProp, PRInt32 aIndex) case PROP_BORDER_RIGHT_STYLE: case PROP_BORDER_TOP_STYLE: return SearchKeywordTable(aIndex,kBorderStyleKTable); - break; case PROP_BORDER_BOTTOM_WIDTH: case PROP_BORDER_LEFT_WIDTH: case PROP_BORDER_RIGHT_WIDTH: case PROP_BORDER_TOP_WIDTH: return SearchKeywordTable(aIndex,kBorderWidthKTable); - break; case PROP_BORDER_WIDTH: case PROP_CLEAR: return SearchKeywordTable(aIndex,kClearKTable); - break; case PROP_CLIP: case PROP_COLOR: @@ -676,7 +673,6 @@ const char* nsCSSProps::LookupProperty(PRInt32 aProp, PRInt32 aIndex) case PROP_CURSOR: return SearchKeywordTable(aIndex,kCursorKTable); - break; case PROP_DIRECTION: return SearchKeywordTable(aIndex,kDirectionKTable); @@ -696,7 +692,6 @@ const char* nsCSSProps::LookupProperty(PRInt32 aProp, PRInt32 aIndex) case PROP_FONT_SIZE: return SearchKeywordTable(aIndex,kFontSizeKTable); - break; case PROP_FONT_STYLE: return SearchKeywordTable(aIndex,kFontStyleKTable); @@ -728,7 +723,6 @@ const char* nsCSSProps::LookupProperty(PRInt32 aProp, PRInt32 aIndex) case PROP_MARGIN_RIGHT: case PROP_MARGIN_TOP: return SearchKeywordTable(aIndex, kMarginSizeKTable); - break; case PROP_PADDING: case PROP_PADDING_BOTTOM: @@ -745,7 +739,6 @@ const char* nsCSSProps::LookupProperty(PRInt32 aProp, PRInt32 aIndex) case PROP_POSITION: return SearchKeywordTable(aIndex, kPositionKTable); - break; case PROP_TEXT_ALIGN: return SearchKeywordTable(aIndex, kTextAlignKTable); @@ -762,7 +755,6 @@ const char* nsCSSProps::LookupProperty(PRInt32 aProp, PRInt32 aIndex) case PROP_VERTICAL_ALIGN: return SearchKeywordTable(aIndex, kVerticalAlignKTable); - break; case PROP_VISIBILITY: return SearchKeywordTable(aIndex, kVisibilityKTable); diff --git a/mozilla/layout/base/public/nsIRunaround.h b/mozilla/layout/base/public/nsIRunaround.h index b7219e9aae6..4ded27862c9 100644 --- a/mozilla/layout/base/public/nsIRunaround.h +++ b/mozilla/layout/base/public/nsIRunaround.h @@ -64,12 +64,12 @@ public: * * @see nsISpaceManager#Translate() */ - NS_IMETHOD Reflow(nsIPresContext& aPresContext, - nsISpaceManager* aSpaceManager, - nsReflowMetrics& aDesiredSize, - const nsReflowState& aReflowState, - nsRect& aDesiredRect, // XXX FIX ME - nsReflowStatus& aStatus) = 0; + NS_IMETHOD ReflowAround(nsIPresContext& aPresContext, + nsISpaceManager* aSpaceManager, + nsReflowMetrics& aDesiredSize, + const nsReflowState& aReflowState, + nsRect& aDesiredRect, // XXX FIX ME + nsReflowStatus& aStatus) = 0; }; #endif /* nsIRunaround_h___ */ diff --git a/mozilla/layout/base/src/nsContainerFrame.cpp b/mozilla/layout/base/src/nsContainerFrame.cpp index 9fd4dc9be3b..a9a71e71f37 100644 --- a/mozilla/layout/base/src/nsContainerFrame.cpp +++ b/mozilla/layout/base/src/nsContainerFrame.cpp @@ -37,8 +37,6 @@ #undef NOISY #endif -static NS_DEFINE_IID(kIRunaroundIID, NS_IRUNAROUND_IID); - nsContainerFrame::nsContainerFrame(nsIContent* aContent, nsIFrame* aParent) : nsSplittableFrame(aContent, aParent), mLastContentIsComplete(PR_TRUE) diff --git a/mozilla/layout/base/src/nsDocument.cpp b/mozilla/layout/base/src/nsDocument.cpp index 27ed4eb70ca..3d2a19fa1c2 100644 --- a/mozilla/layout/base/src/nsDocument.cpp +++ b/mozilla/layout/base/src/nsDocument.cpp @@ -57,7 +57,6 @@ static NS_DEFINE_IID(kIDocumentIID, NS_IDOCUMENT_IID); #include "nsIDOMElement.h" static NS_DEFINE_IID(kIDOMDocumentIID, NS_IDOMDOCUMENT_IID); -static NS_DEFINE_IID(kIDOMNodeIID, NS_IDOMNODE_IID); static NS_DEFINE_IID(kIContentIID, NS_ICONTENT_IID); static NS_DEFINE_IID(kIDOMElementIID, NS_IDOMELEMENT_IID); static NS_DEFINE_IID(kIScriptObjectOwnerIID, NS_ISCRIPTOBJECTOWNER_IID); @@ -70,7 +69,6 @@ static NS_DEFINE_IID(kIDOMMouseMotionListenerIID, NS_IDOMMOUSEMOTIONLISTENER_IID static NS_DEFINE_IID(kIPrivateDOMEventIID, NS_IPRIVATEDOMEVENT_IID); static NS_DEFINE_IID(kIEventListenerManagerIID, NS_IEVENTLISTENERMANAGER_IID); static NS_DEFINE_IID(kIPostDataIID, NS_IPOSTDATA_IID); -static NS_DEFINE_IID(kICSSStyleSheetIID, NS_ICSS_STYLE_SHEET_IID); NS_LAYOUT nsresult NS_NewPostData(PRBool aIsFile, char* aData, diff --git a/mozilla/layout/base/src/nsFrame.cpp b/mozilla/layout/base/src/nsFrame.cpp index aa65395b6cc..ce9d479e024 100644 --- a/mozilla/layout/base/src/nsFrame.cpp +++ b/mozilla/layout/base/src/nsFrame.cpp @@ -629,9 +629,7 @@ NS_METHOD nsFrame::HandlePress(nsIPresContext& aPresContext, - PRInt32 offset = 0; PRUint32 actualOffset = 0; - PRInt32 width = 0; mDoingSelection = PR_TRUE; mDidDrag = PR_FALSE; @@ -830,8 +828,6 @@ NS_METHOD nsFrame::HandleDrag(nsIPresContext& aPresContext, nsIContent * startContent = mSelectionRange->GetStartContent(); nsIContent * endContent = mSelectionRange->GetEndContent(); - PRBool isNewFrame = PR_FALSE; // for testing (rcs) - mDidDrag = PR_TRUE; if (aFrame != nsnull) { @@ -839,7 +835,6 @@ NS_METHOD nsFrame::HandleDrag(nsIPresContext& aPresContext, // Check to see if we have changed frame if (aFrame != mCurrentFrame) { - isNewFrame = PR_TRUE; // We are in a new Frame! if (SELECTION_DEBUG) printf("HandleDrag::Different Frame in selection!\n"); diff --git a/mozilla/layout/css/layout/src/nsCSSBlockFrame.cpp b/mozilla/layout/css/layout/src/nsCSSBlockFrame.cpp index be8661571bf..27d58353fff 100644 --- a/mozilla/layout/css/layout/src/nsCSSBlockFrame.cpp +++ b/mozilla/layout/css/layout/src/nsCSSBlockFrame.cpp @@ -143,12 +143,12 @@ public: // XXX implement regular reflow method too! // nsIRunaround - NS_IMETHOD Reflow(nsIPresContext& aPresContext, - nsISpaceManager* aSpaceManager, - nsReflowMetrics& aDesiredSize, - const nsReflowState& aReflowState, - nsRect& aDesiredRect, - nsReflowStatus& aStatus); + NS_IMETHOD ReflowAround(nsIPresContext& aPresContext, + nsISpaceManager* aSpaceManager, + nsReflowMetrics& aDesiredSize, + const nsReflowState& aReflowState, + nsRect& aDesiredRect, + nsReflowStatus& aStatus); // nsIFloaterContainer virtual PRBool AddFloater(nsIPresContext* aPresContext, @@ -849,8 +849,6 @@ nsCSSBlockReflowState::~nsCSSBlockReflowState() void nsCSSBlockReflowState::GetAvailableSpace() { - nsresult rv = NS_OK; - nsISpaceManager* sm = mSpaceManager; // Fill in band data for the specific Y coordinate. Note: We don't @@ -1214,12 +1212,12 @@ nsCSSBlockFrame::GetLastContentOffset() const #endif NS_IMETHODIMP -nsCSSBlockFrame::Reflow(nsIPresContext& aPresContext, - nsISpaceManager* aSpaceManager, - nsReflowMetrics& aMetrics, - const nsReflowState& aReflowState, - nsRect& aDesiredRect, - nsReflowStatus& aStatus) +nsCSSBlockFrame::ReflowAround(nsIPresContext& aPresContext, + nsISpaceManager* aSpaceManager, + nsReflowMetrics& aMetrics, + const nsReflowState& aReflowState, + nsRect& aDesiredRect, + nsReflowStatus& aStatus) { NS_FRAME_TRACE(NS_FRAME_TRACE_CALLS, ("enter nsCSSBlockFrame::Reflow: maxSize=%d,%d reason=%d [%d,%d,%c]", @@ -2028,7 +2026,6 @@ nsCSSBlockFrame::ReflowLine(nsCSSBlockReflowState& aState, // Pull frames from the next line until we can't while (nsnull != aLine->mNext) { - LineData** linep = &aLine->mNext; keepGoing = PullFrame(aState, aLine, &aLine->mNext, PR_FALSE, aReflowResult); if (!keepGoing) { @@ -2224,8 +2221,8 @@ nsCSSBlockFrame::ReflowBlockFrame(nsCSSBlockReflowState& aState, reflowState.reason = reason; nsRect r; aState.mSpaceManager->Translate(x, y); - rv = runAround->Reflow(*aState.mPresContext, aState.mSpaceManager, - metrics, reflowState, r, reflowStatus); + rv = runAround->ReflowAround(*aState.mPresContext, aState.mSpaceManager, + metrics, reflowState, r, reflowStatus); aState.mSpaceManager->Translate(-x, -y); metrics.width = r.width; metrics.height = r.height; @@ -3201,7 +3198,6 @@ nsCSSBlockFrame::ContentDeleted(nsIPresShell* aShell, // Remove frame and its continuations PRBool pseudos = flow->IsPseudoFrame(); - nsIFrame* flowParent = flow->mGeometricParent; while (nsnull != deadFrame) { while ((nsnull != line) && (nsnull != deadFrame)) { #ifdef NS_DEBUG diff --git a/mozilla/layout/css/layout/src/nsCSSInlineLayout.cpp b/mozilla/layout/css/layout/src/nsCSSInlineLayout.cpp index 724c4621b08..ce0f12ac2f0 100644 --- a/mozilla/layout/css/layout/src/nsCSSInlineLayout.cpp +++ b/mozilla/layout/css/layout/src/nsCSSInlineLayout.cpp @@ -275,8 +275,9 @@ nsCSSInlineLayout::ReflowFrame(nsIFrame* aKidFrame, (void**)&runAround))) { nsRect r; mLineLayout.mSpaceManager->Translate(x, y); - runAround->Reflow(*mLineLayout.mPresContext, mLineLayout.mSpaceManager, - aMetrics, aReflowState, r, rv); + runAround->ReflowAround(*mLineLayout.mPresContext, + mLineLayout.mSpaceManager, + aMetrics, aReflowState, r, rv); mLineLayout.mSpaceManager->Translate(-x, -y); aMetrics.width = r.width; diff --git a/mozilla/layout/events/src/nsDOMEvent.cpp b/mozilla/layout/events/src/nsDOMEvent.cpp index add7ab31093..32b43457e36 100644 --- a/mozilla/layout/events/src/nsDOMEvent.cpp +++ b/mozilla/layout/events/src/nsDOMEvent.cpp @@ -281,54 +281,39 @@ const char* nsDOMEvent::GetEventName(PRUint32 aEventType) case NS_MOUSE_MIDDLE_BUTTON_DOWN: case NS_MOUSE_RIGHT_BUTTON_DOWN: return mEventNames[eDOMEvents_mousedown]; - break; case NS_MOUSE_LEFT_BUTTON_UP: case NS_MOUSE_MIDDLE_BUTTON_UP: case NS_MOUSE_RIGHT_BUTTON_UP: return mEventNames[eDOMEvents_mouseup]; - break; case NS_MOUSE_LEFT_CLICK: case NS_MOUSE_RIGHT_CLICK: return mEventNames[eDOMEvents_click]; - break; case NS_MOUSE_LEFT_DOUBLECLICK: case NS_MOUSE_RIGHT_DOUBLECLICK: return mEventNames[eDOMEvents_dblclick]; - break; case NS_MOUSE_ENTER: return mEventNames[eDOMEvents_mouseover]; - break; case NS_MOUSE_EXIT: return mEventNames[eDOMEvents_mouseout]; - break; case NS_MOUSE_MOVE: return mEventNames[eDOMEvents_mousemove]; - break; case NS_KEY_UP: return mEventNames[eDOMEvents_keyup]; - break; case NS_KEY_DOWN: return mEventNames[eDOMEvents_keydown]; - break; case NS_GOTFOCUS: return mEventNames[eDOMEvents_focus]; - break; case NS_LOSTFOCUS: return mEventNames[eDOMEvents_blur]; - break; case NS_PAGE_LOAD: case NS_IMAGE_LOAD: return mEventNames[eDOMEvents_load]; - break; case NS_PAGE_UNLOAD: return mEventNames[eDOMEvents_unload]; - break; case NS_IMAGE_ABORT: return mEventNames[eDOMEvents_abort]; - break; case NS_IMAGE_ERROR: return mEventNames[eDOMEvents_error]; - break; default: break; } diff --git a/mozilla/layout/html/base/src/nsBodyFrame.cpp b/mozilla/layout/html/base/src/nsBodyFrame.cpp index d96e154c309..f6380f308b0 100644 --- a/mozilla/layout/html/base/src/nsBodyFrame.cpp +++ b/mozilla/layout/html/base/src/nsBodyFrame.cpp @@ -210,8 +210,8 @@ NS_METHOD nsBodyFrame::Reflow(nsIPresContext& aPresContext, mFirstChild->WillReflow(aPresContext); mFirstChild->MoveTo(borderPadding.left, borderPadding.top); mFirstChild->QueryInterface(kIRunaroundIID, (void**)&reflowRunaround); - reflowRunaround->Reflow(aPresContext, mSpaceManager, aDesiredSize, - reflowState, desiredRect, aStatus); + reflowRunaround->ReflowAround(aPresContext, mSpaceManager, aDesiredSize, + reflowState, desiredRect, aStatus); // If the frame is complete, then check whether there's a next-in-flow that // needs to be deleted diff --git a/mozilla/layout/html/base/src/nsHTMLBase.cpp b/mozilla/layout/html/base/src/nsHTMLBase.cpp index fead72e57e5..85fc4956d17 100644 --- a/mozilla/layout/html/base/src/nsHTMLBase.cpp +++ b/mozilla/layout/html/base/src/nsHTMLBase.cpp @@ -40,8 +40,6 @@ nsHTMLBase::CreateViewForFrame(nsIPresContext* aPresContext, if (nsnull == view) { // We don't yet have a view; see if we need a view - PRBool scrollView = PR_FALSE; - // See if the opacity is not the same as the geometric parent // frames opacity. if (!aForce) { diff --git a/mozilla/layout/html/base/src/nsHTMLBullet.cpp b/mozilla/layout/html/base/src/nsHTMLBullet.cpp index 3e110de2ef9..5e28cda6d36 100644 --- a/mozilla/layout/html/base/src/nsHTMLBullet.cpp +++ b/mozilla/layout/html/base/src/nsHTMLBullet.cpp @@ -424,7 +424,6 @@ BulletFrame::GetListItemText(nsIPresContext* aCX, PRIntn len=decStr.Length(); PRIntn romanPos=len; PRIntn n; - PRBool negative=PRBool(ordinal<0); const char* achars; const char* bchars; diff --git a/mozilla/layout/html/base/src/nsHTMLContent.cpp b/mozilla/layout/html/base/src/nsHTMLContent.cpp index 6490126cfd7..b7cef9104c3 100644 --- a/mozilla/layout/html/base/src/nsHTMLContent.cpp +++ b/mozilla/layout/html/base/src/nsHTMLContent.cpp @@ -36,7 +36,6 @@ static NS_DEFINE_IID(kIContentDelegateIID, NS_ICONTENTDELEGATE_IID); static NS_DEFINE_IID(kIContentIID, NS_ICONTENT_IID); static NS_DEFINE_IID(kISupportsIID, NS_ISUPPORTS_IID); static NS_DEFINE_IID(kIDOMNodeIID, NS_IDOMNODE_IID); -static NS_DEFINE_IID(kIHTMLContent, NS_IHTMLCONTENT_IID); static NS_DEFINE_IID(kIScriptObjectOwnerIID, NS_ISCRIPTOBJECTOWNER_IID); static NS_DEFINE_IID(kIEventListenerManagerIID, NS_IEVENTLISTENERMANAGER_IID); static NS_DEFINE_IID(kIDOMEventReceiverIID, NS_IDOMEVENTRECEIVER_IID); @@ -560,7 +559,7 @@ nsHTMLContent::GetNextSibling(nsIDOMNode** aNextSibling) NS_IMETHODIMP nsHTMLContent::GetAttributes(nsIDOMNamedNodeMap** aAttributes) { - aAttributes = nsnull; + *aAttributes = nsnull; return NS_OK; } diff --git a/mozilla/layout/html/base/src/nsHTMLTagContent.cpp b/mozilla/layout/html/base/src/nsHTMLTagContent.cpp index 6b927fc05cc..6ae950f188f 100644 --- a/mozilla/layout/html/base/src/nsHTMLTagContent.cpp +++ b/mozilla/layout/html/base/src/nsHTMLTagContent.cpp @@ -46,7 +46,6 @@ static NS_DEFINE_IID(kIStyleRuleIID, NS_ISTYLE_RULE_IID); static NS_DEFINE_IID(kIDOMElementIID, NS_IDOMELEMENT_IID); static NS_DEFINE_IID(kIDOMDocumentIID, NS_IDOMDOCUMENT_IID); -static NS_DEFINE_IID(kIScriptObjectOwner, NS_ISCRIPTOBJECTOWNER_IID); static NS_DEFINE_IID(kIScriptEventListenerIID, NS_ISCRIPTEVENTLISTENER_IID); static NS_DEFINE_IID(kIDOMMouseListenerIID, NS_IDOMMOUSELISTENER_IID); static NS_DEFINE_IID(kIDOMKeyListenerIID, NS_IDOMKEYLISTENER_IID); diff --git a/mozilla/layout/html/base/src/nsTextContent.cpp b/mozilla/layout/html/base/src/nsTextContent.cpp index 7e9391a54dd..001342aee77 100644 --- a/mozilla/layout/html/base/src/nsTextContent.cpp +++ b/mozilla/layout/html/base/src/nsTextContent.cpp @@ -91,8 +91,6 @@ static NS_DEFINE_IID(kITextContentIID, NS_ITEXTCONTENT_IID); #endif -static NS_DEFINE_IID(kIScriptObjectOwner, NS_ISCRIPTOBJECTOWNER_IID); - class TextFrame; class TextTimer : public nsITimerCallback { @@ -625,10 +623,9 @@ char * TextFrame::CompressWhiteSpace(char * aBuffer, // whitespace; translating whitespace to literal spaces; // eliminating trailing whitespace. char* s = aBuffer; - char* s0 = s; PRInt32 maxLen = end - cp; if (maxLen > aBufSize) { - s0 = s = new char[maxLen]; + s = new char[maxLen]; aShouldDeleteStr = PR_TRUE; } @@ -1212,7 +1209,7 @@ TextFrame::ReflowNormal(nsCSSLineLayout& aLineLayout, nscoord maxWidth = aReflowState.maxSize.width; nscoord maxWordWidth = 0; const PRUnichar* lastWordEnd = cpStart; - const PRUnichar* lastWordStart = cpStart; +// const PRUnichar* lastWordStart = cpStart; PRBool hasMultibyte = PR_FALSE; PRBool endsInWhitespace = PR_FALSE; @@ -1246,7 +1243,7 @@ TextFrame::ReflowNormal(nsCSSLineLayout& aLineLayout, hasMultibyte = PR_TRUE; } const PRUnichar* wordStart = cp - 1; - lastWordStart = wordStart; +// lastWordStart = wordStart; while (cp < end) { ch = *cp; if (ch >= 256) { @@ -1486,7 +1483,6 @@ void TextFrame::CalcCursorPosition(nsIPresContext& aCX, nsIFontMetrics* fm = aCX.GetMetricsFor(font->mFont); - nscoord x = 0; nscoord width = 0; PRUint16 indexes[1024]; @@ -1497,9 +1493,9 @@ void TextFrame::CalcCursorPosition(nsIPresContext& aCX, compressedStr = CompressWhiteSpace(buf, sizeof(buf), indexes, compressedStrLen, shouldDelete); - PRUint32 i; + PRInt32 i; char buffer[1024]; - for (i=1;iGetWidth(buffer); @@ -2013,15 +2009,9 @@ NS_IMETHODIMP Text::Replace(PRUint32 aOffset, PRUint32 aCount, const nsString& aData) { // sanitize arguments - if (aOffset < 0) { - aOffset = 0; - } if (aOffset > (PRUint32)mLength) { aOffset = mLength; } - if (aCount < 0) { - aCount = 0; - } // Allocate new buffer PRInt32 endOffset = aOffset + aCount; diff --git a/mozilla/layout/html/document/src/nsHTMLContentSink.cpp b/mozilla/layout/html/document/src/nsHTMLContentSink.cpp index d7acf98ee96..7db29adebc7 100644 --- a/mozilla/layout/html/document/src/nsHTMLContentSink.cpp +++ b/mozilla/layout/html/document/src/nsHTMLContentSink.cpp @@ -1574,7 +1574,6 @@ nsresult HTMLContentSink::ProcessAREATag(const nsIParserNode& aNode) nsAutoString shape, coords, href, target(mBaseTarget), alt; PRInt32 ac = aNode.GetAttributeCount(); PRBool suppress = PR_FALSE; - PRBool setTarget = PR_TRUE; for (PRInt32 i = 0; i < ac; i++) { // Get upper-cased key const nsString& key = aNode.GetKeyAt(i); diff --git a/mozilla/layout/html/document/src/nsHTMLDocument.cpp b/mozilla/layout/html/document/src/nsHTMLDocument.cpp index db2a13e7a23..872ce5d1716 100644 --- a/mozilla/layout/html/document/src/nsHTMLDocument.cpp +++ b/mozilla/layout/html/document/src/nsHTMLDocument.cpp @@ -196,8 +196,6 @@ nsHTMLDocument::EndLoad() return nsDocument::EndLoad(); } -static NS_DEFINE_IID(kIDocumentObserverIID, NS_IDOCUMENT_OBSERVER_IID); - NS_IMETHODIMP nsHTMLDocument::SetTitle(const nsString& aTitle) { if (nsnull == mDocumentTitle) { diff --git a/mozilla/layout/html/document/src/nsHTMLFrameset.cpp b/mozilla/layout/html/document/src/nsHTMLFrameset.cpp index 1a8a99b9e56..c95ef8676a5 100644 --- a/mozilla/layout/html/document/src/nsHTMLFrameset.cpp +++ b/mozilla/layout/html/document/src/nsHTMLFrameset.cpp @@ -41,19 +41,6 @@ #include "nsHTMLBase.h" #include "nsIDocumentLoader.h" class nsHTMLIFrame; -static NS_DEFINE_IID(kIStreamObserverIID, NS_ISTREAMOBSERVER_IID); -static NS_DEFINE_IID(kISupportsIID, NS_ISUPPORTS_IID); -static NS_DEFINE_IID(kIWebShellIID, NS_IWEB_SHELL_IID); -static NS_DEFINE_IID(kIWebFrameIID, NS_IWEBFRAME_IID); -static NS_DEFINE_IID(kWebShellCID, NS_WEB_SHELL_CID); -static NS_DEFINE_IID(kIViewIID, NS_IVIEW_IID); -static NS_DEFINE_IID(kCViewCID, NS_VIEW_CID); -static NS_DEFINE_IID(kCChildCID, NS_CHILD_CID); -static NS_DEFINE_IID(kCDocumentLoaderCID, NS_DOCUMENTLOADER_CID); - -static NS_DEFINE_IID(kIContentViewerContainerIID, - NS_ICONTENT_VIEWER_CONTAINER_IID); -static NS_DEFINE_IID(kIDocumentLoaderIID, NS_IDOCUMENTLOADER_IID); /******************************************************************************* @@ -419,7 +406,6 @@ nsHTMLFramesetFrame::ParseRowColSpec(nsString& aSpec, PRInt32 aMaxNumValues, // Note: If end == start then it means that the token has no // data in it other than a terminating comma (or the end of the spec) - PRInt32 value = 1; aSpecs[i].mUnit = eFramesetUnit_Pixel; if (end > start) { PRInt32 numberEnd = end - 1; diff --git a/mozilla/layout/html/document/src/nsMarkupDocument.cpp b/mozilla/layout/html/document/src/nsMarkupDocument.cpp index 863a0c88ae3..35eaad98766 100644 --- a/mozilla/layout/html/document/src/nsMarkupDocument.cpp +++ b/mozilla/layout/html/document/src/nsMarkupDocument.cpp @@ -32,8 +32,6 @@ #include "nsHTMLValue.h" #include "nsXIFConverter.h" -static NS_DEFINE_IID(kIDOMNodeIID, NS_IDOMNODE_IID); -static NS_DEFINE_IID(kIDOMElementIID, NS_IDOMELEMENT_IID); static NS_DEFINE_IID(kIContentIID, NS_ICONTENT_IID); static NS_DEFINE_IID(kICSSStyleSheetIID, NS_ICSS_STYLE_SHEET_IID); diff --git a/mozilla/layout/html/forms/src/nsInput.cpp b/mozilla/layout/html/forms/src/nsInput.cpp index 93e2bcca7c6..75b9251050d 100644 --- a/mozilla/layout/html/forms/src/nsInput.cpp +++ b/mozilla/layout/html/forms/src/nsInput.cpp @@ -136,7 +136,6 @@ PRBool nsInput::IsSuccessful(nsIFormControl* aSubmitter) const nsrefcnt nsInput::Release() { --mRefCnt; - int debugRefCnt = mRefCnt; if (mRefCnt == 0) { delete this; return 0; diff --git a/mozilla/layout/html/forms/src/nsInputText.cpp b/mozilla/layout/html/forms/src/nsInputText.cpp index c87e90c4e73..5c281699913 100644 --- a/mozilla/layout/html/forms/src/nsInputText.cpp +++ b/mozilla/layout/html/forms/src/nsInputText.cpp @@ -207,8 +207,6 @@ nsInputTextFrame::GetDesiredSize(nsIPresContext* aPresContext, nsWidgetInitData* nsInputTextFrame::GetWidgetInitData(nsIPresContext& aPresContext) { - static NS_DEFINE_IID(kTextIID, NS_ITEXTWIDGET_IID); - nsTextWidgetInitData* data = nsnull; nsInputText* content; GetContent((nsIContent *&) content); diff --git a/mozilla/layout/html/forms/src/nsSelect.cpp b/mozilla/layout/html/forms/src/nsSelect.cpp index b911c8e09d5..b4d3f5525c7 100644 --- a/mozilla/layout/html/forms/src/nsSelect.cpp +++ b/mozilla/layout/html/forms/src/nsSelect.cpp @@ -486,7 +486,6 @@ nsSelect::Reset() { // PRBool allowMultiple; // super::GetAttribute(nsHTMLAtoms::multiple, allowMultiple); - PRBool haveSelection = PR_FALSE; PRInt32 numChildren = ChildCount(); nsIListWidget* list; diff --git a/mozilla/layout/html/style/src/nsCSSProps.cpp b/mozilla/layout/html/style/src/nsCSSProps.cpp index 44479e77776..6b2c8c2acfb 100644 --- a/mozilla/layout/html/style/src/nsCSSProps.cpp +++ b/mozilla/layout/html/style/src/nsCSSProps.cpp @@ -656,19 +656,16 @@ const char* nsCSSProps::LookupProperty(PRInt32 aProp, PRInt32 aIndex) case PROP_BORDER_RIGHT_STYLE: case PROP_BORDER_TOP_STYLE: return SearchKeywordTable(aIndex,kBorderStyleKTable); - break; case PROP_BORDER_BOTTOM_WIDTH: case PROP_BORDER_LEFT_WIDTH: case PROP_BORDER_RIGHT_WIDTH: case PROP_BORDER_TOP_WIDTH: return SearchKeywordTable(aIndex,kBorderWidthKTable); - break; case PROP_BORDER_WIDTH: case PROP_CLEAR: return SearchKeywordTable(aIndex,kClearKTable); - break; case PROP_CLIP: case PROP_COLOR: @@ -676,7 +673,6 @@ const char* nsCSSProps::LookupProperty(PRInt32 aProp, PRInt32 aIndex) case PROP_CURSOR: return SearchKeywordTable(aIndex,kCursorKTable); - break; case PROP_DIRECTION: return SearchKeywordTable(aIndex,kDirectionKTable); @@ -696,7 +692,6 @@ const char* nsCSSProps::LookupProperty(PRInt32 aProp, PRInt32 aIndex) case PROP_FONT_SIZE: return SearchKeywordTable(aIndex,kFontSizeKTable); - break; case PROP_FONT_STYLE: return SearchKeywordTable(aIndex,kFontStyleKTable); @@ -728,7 +723,6 @@ const char* nsCSSProps::LookupProperty(PRInt32 aProp, PRInt32 aIndex) case PROP_MARGIN_RIGHT: case PROP_MARGIN_TOP: return SearchKeywordTable(aIndex, kMarginSizeKTable); - break; case PROP_PADDING: case PROP_PADDING_BOTTOM: @@ -745,7 +739,6 @@ const char* nsCSSProps::LookupProperty(PRInt32 aProp, PRInt32 aIndex) case PROP_POSITION: return SearchKeywordTable(aIndex, kPositionKTable); - break; case PROP_TEXT_ALIGN: return SearchKeywordTable(aIndex, kTextAlignKTable); @@ -762,7 +755,6 @@ const char* nsCSSProps::LookupProperty(PRInt32 aProp, PRInt32 aIndex) case PROP_VERTICAL_ALIGN: return SearchKeywordTable(aIndex, kVerticalAlignKTable); - break; case PROP_VISIBILITY: return SearchKeywordTable(aIndex, kVisibilityKTable); diff --git a/mozilla/layout/html/table/src/nsTableFrame.cpp b/mozilla/layout/html/table/src/nsTableFrame.cpp index fe63b571ea8..3887fa1a3bb 100644 --- a/mozilla/layout/html/table/src/nsTableFrame.cpp +++ b/mozilla/layout/html/table/src/nsTableFrame.cpp @@ -905,19 +905,19 @@ void nsTableFrame::ListColumnLayoutData(FILE* out, PRInt32 aIndent) for (rowIndent = aIndent+2; --rowIndent >= 0; ) fputs(" ", out); - nscoord top,left,bottom,right; /* + nscoord top,left,bottom,right; top = (mBorderFrame[NS_SIDE_TOP] ? cellFrame->GetBorderWidth((nsIFrame*)mBorderFrame[NS_SIDE_TOP], NS_SIDE_TOP) : 0); left = (mBorderFrame[NS_SIDE_LEFT] ? cellFrame->GetBorderWidth((nsIFrame*)mBorderFrame[NS_SIDE_LEFT], NS_SIDE_LEFT) : 0); bottom = (mBorderFrame[NS_SIDE_BOTTOM] ? cellFrame->GetBorderWidth((nsIFrame*)mBorderFrame[NS_SIDE_BOTTOM], NS_SIDE_BOTTOM) : 0); right = (mBorderFrame[NS_SIDE_RIGHT] ? cellFrame->GetBorderWidth((nsIFrame*)mBorderFrame[NS_SIDE_RIGHT], NS_SIDE_RIGHT) : 0); - */ fprintf(out,"Border -- Top: %d Left: %d Bottom: %d Right: %d \n", NS_TWIPS_TO_POINTS_INT(top), NS_TWIPS_TO_POINTS_INT(left), NS_TWIPS_TO_POINTS_INT(bottom), NS_TWIPS_TO_POINTS_INT(right)); + */ } } } diff --git a/mozilla/layout/html/table/src/nsTableRow.cpp b/mozilla/layout/html/table/src/nsTableRow.cpp index 47818a7eec6..1460980ecf1 100644 --- a/mozilla/layout/html/table/src/nsTableRow.cpp +++ b/mozilla/layout/html/table/src/nsTableRow.cpp @@ -198,7 +198,6 @@ nsTableRow::ReplaceChildAt (nsIContent *aContent, PRInt32 aIndex, NS_IF_RELEASE(oldChild); // oldChild: REFCNT-- #endif } - return rv; } /** diff --git a/mozilla/layout/html/table/src/nsTableRowFrame.cpp b/mozilla/layout/html/table/src/nsTableRowFrame.cpp index 73f9f2eff41..51bdbe69a3f 100644 --- a/mozilla/layout/html/table/src/nsTableRowFrame.cpp +++ b/mozilla/layout/html/table/src/nsTableRowFrame.cpp @@ -505,7 +505,7 @@ nsTableRowFrame::InitialReflow(nsIPresContext& aPresContext, nscoord maxTopMargin = 0; nscoord maxBottomMargin = 0; nscoord x = 0; - nsresult result; + nsresult result = NS_OK; for (;;) { // Get the next content object @@ -638,7 +638,7 @@ nsresult nsTableRowFrame::RecoverState(nsIPresContext& aPresContext, // Walk the list of children looking for aKidFrame. While we're at // it get the maxCellHeight and maxVertCellSpace for all the // frames except aKidFrame - nsIFrame* prevKidFrame = nsnull; +// nsIFrame* prevKidFrame = nsnull; for (nsIFrame* frame = mFirstChild; nsnull != frame;) { if (frame != aKidFrame) { // Update the max top and bottom margins @@ -699,7 +699,7 @@ nsresult nsTableRowFrame::RecoverState(nsIPresContext& aPresContext, } // Remember the frame that precedes aKidFrame - prevKidFrame = frame; +// prevKidFrame = frame; frame->GetNextSibling(frame); } diff --git a/mozilla/layout/style/nsCSSProps.cpp b/mozilla/layout/style/nsCSSProps.cpp index 44479e77776..6b2c8c2acfb 100644 --- a/mozilla/layout/style/nsCSSProps.cpp +++ b/mozilla/layout/style/nsCSSProps.cpp @@ -656,19 +656,16 @@ const char* nsCSSProps::LookupProperty(PRInt32 aProp, PRInt32 aIndex) case PROP_BORDER_RIGHT_STYLE: case PROP_BORDER_TOP_STYLE: return SearchKeywordTable(aIndex,kBorderStyleKTable); - break; case PROP_BORDER_BOTTOM_WIDTH: case PROP_BORDER_LEFT_WIDTH: case PROP_BORDER_RIGHT_WIDTH: case PROP_BORDER_TOP_WIDTH: return SearchKeywordTable(aIndex,kBorderWidthKTable); - break; case PROP_BORDER_WIDTH: case PROP_CLEAR: return SearchKeywordTable(aIndex,kClearKTable); - break; case PROP_CLIP: case PROP_COLOR: @@ -676,7 +673,6 @@ const char* nsCSSProps::LookupProperty(PRInt32 aProp, PRInt32 aIndex) case PROP_CURSOR: return SearchKeywordTable(aIndex,kCursorKTable); - break; case PROP_DIRECTION: return SearchKeywordTable(aIndex,kDirectionKTable); @@ -696,7 +692,6 @@ const char* nsCSSProps::LookupProperty(PRInt32 aProp, PRInt32 aIndex) case PROP_FONT_SIZE: return SearchKeywordTable(aIndex,kFontSizeKTable); - break; case PROP_FONT_STYLE: return SearchKeywordTable(aIndex,kFontStyleKTable); @@ -728,7 +723,6 @@ const char* nsCSSProps::LookupProperty(PRInt32 aProp, PRInt32 aIndex) case PROP_MARGIN_RIGHT: case PROP_MARGIN_TOP: return SearchKeywordTable(aIndex, kMarginSizeKTable); - break; case PROP_PADDING: case PROP_PADDING_BOTTOM: @@ -745,7 +739,6 @@ const char* nsCSSProps::LookupProperty(PRInt32 aProp, PRInt32 aIndex) case PROP_POSITION: return SearchKeywordTable(aIndex, kPositionKTable); - break; case PROP_TEXT_ALIGN: return SearchKeywordTable(aIndex, kTextAlignKTable); @@ -762,7 +755,6 @@ const char* nsCSSProps::LookupProperty(PRInt32 aProp, PRInt32 aIndex) case PROP_VERTICAL_ALIGN: return SearchKeywordTable(aIndex, kVerticalAlignKTable); - break; case PROP_VISIBILITY: return SearchKeywordTable(aIndex, kVisibilityKTable); diff --git a/mozilla/layout/tables/nsTableFrame.cpp b/mozilla/layout/tables/nsTableFrame.cpp index fe63b571ea8..3887fa1a3bb 100644 --- a/mozilla/layout/tables/nsTableFrame.cpp +++ b/mozilla/layout/tables/nsTableFrame.cpp @@ -905,19 +905,19 @@ void nsTableFrame::ListColumnLayoutData(FILE* out, PRInt32 aIndent) for (rowIndent = aIndent+2; --rowIndent >= 0; ) fputs(" ", out); - nscoord top,left,bottom,right; /* + nscoord top,left,bottom,right; top = (mBorderFrame[NS_SIDE_TOP] ? cellFrame->GetBorderWidth((nsIFrame*)mBorderFrame[NS_SIDE_TOP], NS_SIDE_TOP) : 0); left = (mBorderFrame[NS_SIDE_LEFT] ? cellFrame->GetBorderWidth((nsIFrame*)mBorderFrame[NS_SIDE_LEFT], NS_SIDE_LEFT) : 0); bottom = (mBorderFrame[NS_SIDE_BOTTOM] ? cellFrame->GetBorderWidth((nsIFrame*)mBorderFrame[NS_SIDE_BOTTOM], NS_SIDE_BOTTOM) : 0); right = (mBorderFrame[NS_SIDE_RIGHT] ? cellFrame->GetBorderWidth((nsIFrame*)mBorderFrame[NS_SIDE_RIGHT], NS_SIDE_RIGHT) : 0); - */ fprintf(out,"Border -- Top: %d Left: %d Bottom: %d Right: %d \n", NS_TWIPS_TO_POINTS_INT(top), NS_TWIPS_TO_POINTS_INT(left), NS_TWIPS_TO_POINTS_INT(bottom), NS_TWIPS_TO_POINTS_INT(right)); + */ } } } diff --git a/mozilla/layout/tables/nsTableRowFrame.cpp b/mozilla/layout/tables/nsTableRowFrame.cpp index 73f9f2eff41..51bdbe69a3f 100644 --- a/mozilla/layout/tables/nsTableRowFrame.cpp +++ b/mozilla/layout/tables/nsTableRowFrame.cpp @@ -505,7 +505,7 @@ nsTableRowFrame::InitialReflow(nsIPresContext& aPresContext, nscoord maxTopMargin = 0; nscoord maxBottomMargin = 0; nscoord x = 0; - nsresult result; + nsresult result = NS_OK; for (;;) { // Get the next content object @@ -638,7 +638,7 @@ nsresult nsTableRowFrame::RecoverState(nsIPresContext& aPresContext, // Walk the list of children looking for aKidFrame. While we're at // it get the maxCellHeight and maxVertCellSpace for all the // frames except aKidFrame - nsIFrame* prevKidFrame = nsnull; +// nsIFrame* prevKidFrame = nsnull; for (nsIFrame* frame = mFirstChild; nsnull != frame;) { if (frame != aKidFrame) { // Update the max top and bottom margins @@ -699,7 +699,7 @@ nsresult nsTableRowFrame::RecoverState(nsIPresContext& aPresContext, } // Remember the frame that precedes aKidFrame - prevKidFrame = frame; +// prevKidFrame = frame; frame->GetNextSibling(frame); }