Remove most compiler warnings on IRIX

This commit is contained in:
kipp%netscape.com 1998-07-29 20:19:08 +00:00
Родитель 34a439aae2
Коммит 4a52add42a
33 изменённых файлов: 41 добавлений и 153 удалений

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

@ -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,

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

@ -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;
}

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

@ -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);

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

@ -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) {

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

@ -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);

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

@ -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);

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

@ -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___ */

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

@ -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)

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

@ -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,

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

@ -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");

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

@ -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

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

@ -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;

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

@ -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;
}

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

@ -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

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

@ -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) {

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

@ -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;

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

@ -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;
}

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

@ -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);

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

@ -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;i<compressedStrLen;i++) {
for (i=1;i<PRInt32(compressedStrLen);i++) {
strncpy(buffer, compressedStr, i);
buffer[i] = 0;
width = fm->GetWidth(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;

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

@ -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);

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

@ -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) {

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

@ -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;

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

@ -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);

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

@ -136,7 +136,6 @@ PRBool nsInput::IsSuccessful(nsIFormControl* aSubmitter) const
nsrefcnt nsInput::Release()
{
--mRefCnt;
int debugRefCnt = mRefCnt;
if (mRefCnt == 0) {
delete this;
return 0;

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

@ -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);

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

@ -486,7 +486,6 @@ nsSelect::Reset()
{
// PRBool allowMultiple;
// super::GetAttribute(nsHTMLAtoms::multiple, allowMultiple);
PRBool haveSelection = PR_FALSE;
PRInt32 numChildren = ChildCount();
nsIListWidget* list;

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

@ -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);

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

@ -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));
*/
}
}
}

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

@ -198,7 +198,6 @@ nsTableRow::ReplaceChildAt (nsIContent *aContent, PRInt32 aIndex,
NS_IF_RELEASE(oldChild); // oldChild: REFCNT--
#endif
}
return rv;
}
/**

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

@ -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);
}

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

@ -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);

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

@ -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));
*/
}
}
}

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

@ -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);
}