зеркало из https://github.com/mozilla/gecko-dev.git
fix Bug 70989 Clean up lots of "shadows" and other common warnings
r=peterv, jst, ducarroz, edburns. sr=jst, shaver
This commit is contained in:
Родитель
bfac41a0f4
Коммит
e76ccfd647
|
@ -470,9 +470,7 @@ nsDOMAttributeMap::SizeOfNamedNodeMap(nsIDOMNamedNodeMap* aMap,
|
|||
PRUint32* aResult)
|
||||
{
|
||||
if (!aResult) return NS_ERROR_NULL_POINTER;
|
||||
nsDOMAttributeMap* map = (nsDOMAttributeMap*) aMap;
|
||||
PRUint32 sum = sizeof(nsDOMAttributeMap);
|
||||
*aResult = sum;
|
||||
*aResult = sizeof(nsDOMAttributeMap);
|
||||
return NS_OK;
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -1128,7 +1128,7 @@ nsHTMLCopyEncoder::SetSelection(nsISelection* aSelection)
|
|||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
NS_ENSURE_TRUE(currentItem, NS_ERROR_FAILURE);
|
||||
|
||||
nsCOMPtr<nsIDOMRange> range( do_QueryInterface(currentItem) );
|
||||
range = do_QueryInterface(currentItem);
|
||||
NS_ENSURE_TRUE(range, NS_ERROR_FAILURE);
|
||||
nsCOMPtr<nsIDOMRange> myRange;
|
||||
range->CloneRange(getter_AddRefs(myRange));
|
||||
|
|
|
@ -564,7 +564,7 @@ nsHTMLInputElement::SetPresStateChecked(nsIHTMLContent * aHTMLContent,
|
|||
|
||||
// Obtain the value property from the presentation state.
|
||||
if (presState) {
|
||||
nsAutoString value; value.AssignWithConversion( aValue ? "1" : "0" );
|
||||
nsAutoString value; value.Assign(aValue ? NS_LITERAL_STRING("1") : NS_LITERAL_STRING("0"));
|
||||
presState->SetStateProperty(NS_LITERAL_STRING("checked"), value);
|
||||
}
|
||||
}
|
||||
|
@ -587,7 +587,7 @@ nsHTMLInputElement::SetChecked(PRBool aValue)
|
|||
nsIFormControlFrame* formControlFrame = nsnull;
|
||||
if (NS_SUCCEEDED(GetPrimaryFrame(this, formControlFrame))) {
|
||||
// the value is being toggled
|
||||
nsAutoString val; val.AssignWithConversion(aValue ? "1" : "0");
|
||||
nsAutoString val; val.Assign(aValue ? NS_LITERAL_STRING("1") : NS_LITERAL_STRING("0"));
|
||||
|
||||
formControlFrame->SetProperty(presContext, nsHTMLAtoms::checked, val);
|
||||
}
|
||||
|
@ -608,7 +608,6 @@ nsHTMLInputElement::SetChecked(PRBool aValue)
|
|||
SetPresStateChecked(this, stateType, aValue);
|
||||
|
||||
if (stateType == nsIStatefulFrame::eRadioType) {
|
||||
nsIDOMHTMLInputElement *radioElement = this;
|
||||
nsAutoString name;
|
||||
GetName(name);
|
||||
|
||||
|
|
|
@ -577,8 +577,6 @@ nsHTMLTableRowElement::InsertCell(PRInt32 aIndex, nsIDOMHTMLElement** aValue)
|
|||
{
|
||||
*aValue = nsnull;
|
||||
|
||||
PRInt32 refIndex = (0 <= aIndex) ? aIndex : 0;
|
||||
|
||||
nsCOMPtr<nsIDOMHTMLCollection> cells;
|
||||
|
||||
GetCells(getter_AddRefs(cells));
|
||||
|
|
|
@ -1027,7 +1027,7 @@ GetWindowProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
|
|||
{
|
||||
JSObject* global = JS_GetGlobalObject(cx);
|
||||
if (global != obj) {
|
||||
nsIScriptSecurityManager *secMan = nsJSUtils::nsGetSecurityManager(cx, obj);
|
||||
secMan = nsJSUtils::nsGetSecurityManager(cx, obj);
|
||||
rv = secMan->CheckScriptAccess(cx, obj,
|
||||
NS_DOM_PROP_WINDOW_SCRIPTGLOBALS,
|
||||
PR_FALSE);
|
||||
|
|
|
@ -230,7 +230,6 @@ GetHTMLSelectElementProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
|
|||
nsIDOMNode* prop;
|
||||
nsIDOMNSHTMLSelectElement* b;
|
||||
if (NS_OK == a->QueryInterface(kINSHTMLSelectElementIID, (void **)&b)) {
|
||||
nsresult result = NS_OK;
|
||||
rv = b->Item(JSVAL_TO_INT(id), &prop);
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
// get the js object
|
||||
|
|
|
@ -61,10 +61,10 @@ struct URIData
|
|||
};
|
||||
|
||||
nsWebBrowserPersist::nsWebBrowserPersist() :
|
||||
mFirstAndOnlyUse(PR_TRUE),
|
||||
mFileCounter(1),
|
||||
mFrameCounter(1),
|
||||
mTaskCounter(0)
|
||||
mTaskCounter(0),
|
||||
mFirstAndOnlyUse(PR_TRUE)
|
||||
{
|
||||
NS_INIT_REFCNT();
|
||||
}
|
||||
|
|
|
@ -1376,7 +1376,7 @@ permission_Unblock(char * host, PRInt32 type) {
|
|||
if (typeStruct->permission == PR_FALSE) {
|
||||
hostStruct->permissionList->RemoveElementAt(typeIndex);
|
||||
/* if no more types are present, remove the entry */
|
||||
PRInt32 count2 = hostStruct->permissionList->Count();
|
||||
count2 = hostStruct->permissionList->Count();
|
||||
if (count2 == 0) {
|
||||
PR_FREEIF(hostStruct->permissionList);
|
||||
cookie_permissionList->RemoveElementAt(hostIndex);
|
||||
|
|
|
@ -102,7 +102,6 @@ NS_IMETHODIMP nsDeviceContextGTK::Init(nsNativeWidget aNativeWidget)
|
|||
// get the screen object and its width/height
|
||||
// XXXRight now this will only get the primary monitor.
|
||||
|
||||
nsresult ignore;
|
||||
if (!mScreenManager)
|
||||
mScreenManager = do_GetService("@mozilla.org/gfx/screenmanager;1");
|
||||
if (!mScreenManager) {
|
||||
|
|
|
@ -6959,7 +6959,6 @@ nsCSSFrameConstructor::ConstructSVGFrame(nsIPresShell* aPresShell,
|
|||
|
||||
// Initialize the new frame
|
||||
nsIFrame* newFrame = nsnull;
|
||||
nsIFrame* ignore = nsnull;
|
||||
//nsSVGTableCreator svgTableCreator(aPresShell); // Used to make table views.
|
||||
|
||||
// See if the element is absolute or fixed positioned
|
||||
|
@ -7203,8 +7202,8 @@ nsCSSFrameConstructor::ConstructFrameInternal( nsIPresShell* aPresShe
|
|||
(lastChild == aFrameItems.lastChild))) {
|
||||
// When there is no explicit frame to create, assume it's a
|
||||
// container and let display style dictate the rest
|
||||
const nsStyleDisplay* display = (const nsStyleDisplay*)
|
||||
styleContext->GetStyleData(eStyleStruct_Display);
|
||||
display = NS_STATIC_CAST(const nsStyleDisplay*,
|
||||
styleContext->GetStyleData(eStyleStruct_Display));
|
||||
|
||||
rv = ConstructFrameByDisplayType(aPresShell, aPresContext, aState, display, aContent,
|
||||
aParentFrame, styleContext, aFrameItems);
|
||||
|
|
|
@ -75,8 +75,8 @@ nsCaret::nsCaret()
|
|||
, mCaretTwipsWidth(-1)
|
||||
, mCaretPixelsWidth(1)
|
||||
, mVisible(PR_FALSE)
|
||||
, mReadOnly(PR_FALSE)
|
||||
, mDrawn(PR_FALSE)
|
||||
, mReadOnly(PR_FALSE)
|
||||
, mShowWhenSelection(PR_FALSE)
|
||||
, mLastCaretFrame(nsnull)
|
||||
, mLastCaretView(nsnull)
|
||||
|
@ -745,7 +745,6 @@ void nsCaret::GetViewForRendering(nsIFrame *caretFrame, EViewCoordinates coordTy
|
|||
// coorinates relative to the view we are going to use for drawing
|
||||
if (coordType == eRenderingViewCoordinates)
|
||||
{
|
||||
nsIView* startingView = theView;
|
||||
nsIScrollableView* scrollableView = nsnull;
|
||||
|
||||
nsPoint drawViewOffset(0, 0); // offset to the view we are using to draw
|
||||
|
|
|
@ -75,8 +75,8 @@ nsCaret::nsCaret()
|
|||
, mCaretTwipsWidth(-1)
|
||||
, mCaretPixelsWidth(1)
|
||||
, mVisible(PR_FALSE)
|
||||
, mReadOnly(PR_FALSE)
|
||||
, mDrawn(PR_FALSE)
|
||||
, mReadOnly(PR_FALSE)
|
||||
, mShowWhenSelection(PR_FALSE)
|
||||
, mLastCaretFrame(nsnull)
|
||||
, mLastCaretView(nsnull)
|
||||
|
@ -745,7 +745,6 @@ void nsCaret::GetViewForRendering(nsIFrame *caretFrame, EViewCoordinates coordTy
|
|||
// coorinates relative to the view we are going to use for drawing
|
||||
if (coordType == eRenderingViewCoordinates)
|
||||
{
|
||||
nsIView* startingView = theView;
|
||||
nsIScrollableView* scrollableView = nsnull;
|
||||
|
||||
nsPoint drawViewOffset(0, 0); // offset to the view we are using to draw
|
||||
|
|
|
@ -1365,7 +1365,7 @@ nsComboboxControlFrame::Reflow(nsIPresContext* aPresContext,
|
|||
aReflowState.reflowCommand->GetNext(incrementalChild);
|
||||
nsRect rect;
|
||||
plainLstFrame->GetRect(rect);
|
||||
nsresult rvv = plainLstFrame->Reflow(aPresContext, aDesiredSize, aReflowState, aStatus);
|
||||
plainLstFrame->Reflow(aPresContext, aDesiredSize, aReflowState, aStatus);
|
||||
|
||||
aDesiredSize.width = mCacheSize.width;
|
||||
aDesiredSize.height = mCacheSize.height;
|
||||
|
|
|
@ -3068,7 +3068,6 @@ nsListControlFrame::IsTargetOptionDisabled(PRBool &aIsDisabled)
|
|||
NS_IMETHODIMP
|
||||
nsListControlFrame::IsOptionDisabled(PRInt32 anIndex, PRBool &aIsDisabled)
|
||||
{
|
||||
PRBool isOptDisabled = PR_FALSE;
|
||||
nsCOMPtr<nsIDOMHTMLCollection> options = getter_AddRefs(GetOptions(mContent));
|
||||
nsCOMPtr<nsIDOMHTMLOptionElement> optionElement;
|
||||
if (options) {
|
||||
|
|
|
@ -2350,7 +2350,7 @@ nsBlockFrame::ComputeFinalSize(const nsHTMLReflowState& aReflowState,
|
|||
// XXX_perf: This can be done incrementally
|
||||
nscoord xa = 0, ya = 0, xb = aMetrics.width, yb = aMetrics.height;
|
||||
if (NS_STYLE_OVERFLOW_HIDDEN != aReflowState.mStyleDisplay->mOverflow) {
|
||||
nsLineBox* line = mLines;
|
||||
line = mLines;
|
||||
while (nsnull != line) {
|
||||
// Compute min and max x/y values for the reflowed frame's
|
||||
// combined areas
|
||||
|
|
|
@ -2350,7 +2350,7 @@ nsBlockFrame::ComputeFinalSize(const nsHTMLReflowState& aReflowState,
|
|||
// XXX_perf: This can be done incrementally
|
||||
nscoord xa = 0, ya = 0, xb = aMetrics.width, yb = aMetrics.height;
|
||||
if (NS_STYLE_OVERFLOW_HIDDEN != aReflowState.mStyleDisplay->mOverflow) {
|
||||
nsLineBox* line = mLines;
|
||||
line = mLines;
|
||||
while (nsnull != line) {
|
||||
// Compute min and max x/y values for the reflowed frame's
|
||||
// combined areas
|
||||
|
|
|
@ -2350,7 +2350,7 @@ nsBlockFrame::ComputeFinalSize(const nsHTMLReflowState& aReflowState,
|
|||
// XXX_perf: This can be done incrementally
|
||||
nscoord xa = 0, ya = 0, xb = aMetrics.width, yb = aMetrics.height;
|
||||
if (NS_STYLE_OVERFLOW_HIDDEN != aReflowState.mStyleDisplay->mOverflow) {
|
||||
nsLineBox* line = mLines;
|
||||
line = mLines;
|
||||
while (nsnull != line) {
|
||||
// Compute min and max x/y values for the reflowed frame's
|
||||
// combined areas
|
||||
|
|
|
@ -146,9 +146,6 @@ nsContainerFrame::PaintChildren(nsIPresContext* aPresContext,
|
|||
const nsRect& aDirtyRect,
|
||||
nsFramePaintLayer aWhichLayer)
|
||||
{
|
||||
const nsStyleDisplay* disp = (const nsStyleDisplay*)
|
||||
mStyleContext->GetStyleData(eStyleStruct_Display);
|
||||
|
||||
nsIFrame* kid = mFrames.FirstChild();
|
||||
while (nsnull != kid) {
|
||||
PaintChild(aPresContext, aRenderingContext, aDirtyRect, kid, aWhichLayer);
|
||||
|
|
|
@ -358,9 +358,13 @@ nsImageFrame::GetDesiredSize(nsIPresContext* aPresContext,
|
|||
{
|
||||
PRBool cancelledReflow = PR_FALSE;
|
||||
|
||||
if (mLowSrcImageLoader != nsnull && !(mImageLoader.GetLoadStatus() & NS_IMAGE_LOAD_STATUS_IMAGE_READY)) {
|
||||
PRBool gotDesiredSize = mLowSrcImageLoader->GetDesiredSize(aPresContext, &aReflowState, aDesiredSize);
|
||||
/*if (gotDesiredSize) {
|
||||
if (mLowSrcImageLoader && !(mImageLoader.GetLoadStatus() & NS_IMAGE_LOAD_STATUS_IMAGE_READY)) {
|
||||
#ifdef DEBUG_RODS
|
||||
PRBool gotDesiredSize =
|
||||
#endif
|
||||
mLowSrcImageLoader->GetDesiredSize(aPresContext, &aReflowState, aDesiredSize);
|
||||
#ifdef DEBUG_RODS
|
||||
if (gotDesiredSize) {
|
||||
// We have our "final" desired size. Cancel any pending
|
||||
// incremental reflows aimed at this frame.
|
||||
nsIPresShell* shell;
|
||||
|
@ -369,7 +373,8 @@ nsImageFrame::GetDesiredSize(nsIPresContext* aPresContext,
|
|||
shell->CancelReflowCommand(this, nsnull);
|
||||
NS_RELEASE(shell);
|
||||
}
|
||||
}*/
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
// Must ask for desiredSize to start loading of image
|
||||
|
|
|
@ -91,20 +91,12 @@ SpacerFrame::Reflow(nsIPresContext* aPresContext,
|
|||
aMetrics.ascent = 0;
|
||||
aMetrics.descent = 0;
|
||||
|
||||
nscoord width = 0;
|
||||
nscoord height = 0;
|
||||
|
||||
const nsStylePosition* position;
|
||||
GetStyleData(eStyleStruct_Position, (const nsStyleStruct*&)position);
|
||||
|
||||
PRUint8 type = GetType();
|
||||
switch (type) {
|
||||
case TYPE_WORD:
|
||||
if (0 != width) {
|
||||
if (eStyleUnit_Coord == position->mWidth.GetUnit()) {
|
||||
aMetrics.width = position->mWidth.GetCoordValue();
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case TYPE_LINE:
|
||||
|
|
|
@ -2350,7 +2350,7 @@ nsBlockFrame::ComputeFinalSize(const nsHTMLReflowState& aReflowState,
|
|||
// XXX_perf: This can be done incrementally
|
||||
nscoord xa = 0, ya = 0, xb = aMetrics.width, yb = aMetrics.height;
|
||||
if (NS_STYLE_OVERFLOW_HIDDEN != aReflowState.mStyleDisplay->mOverflow) {
|
||||
nsLineBox* line = mLines;
|
||||
line = mLines;
|
||||
while (nsnull != line) {
|
||||
// Compute min and max x/y values for the reflowed frame's
|
||||
// combined areas
|
||||
|
|
|
@ -2350,7 +2350,7 @@ nsBlockFrame::ComputeFinalSize(const nsHTMLReflowState& aReflowState,
|
|||
// XXX_perf: This can be done incrementally
|
||||
nscoord xa = 0, ya = 0, xb = aMetrics.width, yb = aMetrics.height;
|
||||
if (NS_STYLE_OVERFLOW_HIDDEN != aReflowState.mStyleDisplay->mOverflow) {
|
||||
nsLineBox* line = mLines;
|
||||
line = mLines;
|
||||
while (nsnull != line) {
|
||||
// Compute min and max x/y values for the reflowed frame's
|
||||
// combined areas
|
||||
|
|
|
@ -2350,7 +2350,7 @@ nsBlockFrame::ComputeFinalSize(const nsHTMLReflowState& aReflowState,
|
|||
// XXX_perf: This can be done incrementally
|
||||
nscoord xa = 0, ya = 0, xb = aMetrics.width, yb = aMetrics.height;
|
||||
if (NS_STYLE_OVERFLOW_HIDDEN != aReflowState.mStyleDisplay->mOverflow) {
|
||||
nsLineBox* line = mLines;
|
||||
line = mLines;
|
||||
while (nsnull != line) {
|
||||
// Compute min and max x/y values for the reflowed frame's
|
||||
// combined areas
|
||||
|
|
|
@ -146,9 +146,6 @@ nsContainerFrame::PaintChildren(nsIPresContext* aPresContext,
|
|||
const nsRect& aDirtyRect,
|
||||
nsFramePaintLayer aWhichLayer)
|
||||
{
|
||||
const nsStyleDisplay* disp = (const nsStyleDisplay*)
|
||||
mStyleContext->GetStyleData(eStyleStruct_Display);
|
||||
|
||||
nsIFrame* kid = mFrames.FirstChild();
|
||||
while (nsnull != kid) {
|
||||
PaintChild(aPresContext, aRenderingContext, aDirtyRect, kid, aWhichLayer);
|
||||
|
|
|
@ -358,9 +358,13 @@ nsImageFrame::GetDesiredSize(nsIPresContext* aPresContext,
|
|||
{
|
||||
PRBool cancelledReflow = PR_FALSE;
|
||||
|
||||
if (mLowSrcImageLoader != nsnull && !(mImageLoader.GetLoadStatus() & NS_IMAGE_LOAD_STATUS_IMAGE_READY)) {
|
||||
PRBool gotDesiredSize = mLowSrcImageLoader->GetDesiredSize(aPresContext, &aReflowState, aDesiredSize);
|
||||
/*if (gotDesiredSize) {
|
||||
if (mLowSrcImageLoader && !(mImageLoader.GetLoadStatus() & NS_IMAGE_LOAD_STATUS_IMAGE_READY)) {
|
||||
#ifdef DEBUG_RODS
|
||||
PRBool gotDesiredSize =
|
||||
#endif
|
||||
mLowSrcImageLoader->GetDesiredSize(aPresContext, &aReflowState, aDesiredSize);
|
||||
#ifdef DEBUG_RODS
|
||||
if (gotDesiredSize) {
|
||||
// We have our "final" desired size. Cancel any pending
|
||||
// incremental reflows aimed at this frame.
|
||||
nsIPresShell* shell;
|
||||
|
@ -369,7 +373,8 @@ nsImageFrame::GetDesiredSize(nsIPresContext* aPresContext,
|
|||
shell->CancelReflowCommand(this, nsnull);
|
||||
NS_RELEASE(shell);
|
||||
}
|
||||
}*/
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
// Must ask for desiredSize to start loading of image
|
||||
|
|
|
@ -91,20 +91,12 @@ SpacerFrame::Reflow(nsIPresContext* aPresContext,
|
|||
aMetrics.ascent = 0;
|
||||
aMetrics.descent = 0;
|
||||
|
||||
nscoord width = 0;
|
||||
nscoord height = 0;
|
||||
|
||||
const nsStylePosition* position;
|
||||
GetStyleData(eStyleStruct_Position, (const nsStyleStruct*&)position);
|
||||
|
||||
PRUint8 type = GetType();
|
||||
switch (type) {
|
||||
case TYPE_WORD:
|
||||
if (0 != width) {
|
||||
if (eStyleUnit_Coord == position->mWidth.GetUnit()) {
|
||||
aMetrics.width = position->mWidth.GetCoordValue();
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case TYPE_LINE:
|
||||
|
|
|
@ -1365,7 +1365,7 @@ nsComboboxControlFrame::Reflow(nsIPresContext* aPresContext,
|
|||
aReflowState.reflowCommand->GetNext(incrementalChild);
|
||||
nsRect rect;
|
||||
plainLstFrame->GetRect(rect);
|
||||
nsresult rvv = plainLstFrame->Reflow(aPresContext, aDesiredSize, aReflowState, aStatus);
|
||||
plainLstFrame->Reflow(aPresContext, aDesiredSize, aReflowState, aStatus);
|
||||
|
||||
aDesiredSize.width = mCacheSize.width;
|
||||
aDesiredSize.height = mCacheSize.height;
|
||||
|
|
|
@ -666,7 +666,7 @@ NS_NewFormFrame(nsIPresShell* aPresShell, nsIFrame** aNewFrame, PRUint32 aFlags)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
#ifdef NS_DEBUG
|
||||
#if 0
|
||||
|
||||
PRIVATE
|
||||
void DebugPrint(char* aLabel, nsString aString)
|
||||
|
|
|
@ -3068,7 +3068,6 @@ nsListControlFrame::IsTargetOptionDisabled(PRBool &aIsDisabled)
|
|||
NS_IMETHODIMP
|
||||
nsListControlFrame::IsOptionDisabled(PRInt32 anIndex, PRBool &aIsDisabled)
|
||||
{
|
||||
PRBool isOptDisabled = PR_FALSE;
|
||||
nsCOMPtr<nsIDOMHTMLCollection> options = getter_AddRefs(GetOptions(mContent));
|
||||
nsCOMPtr<nsIDOMHTMLOptionElement> optionElement;
|
||||
if (options) {
|
||||
|
|
|
@ -6959,7 +6959,6 @@ nsCSSFrameConstructor::ConstructSVGFrame(nsIPresShell* aPresShell,
|
|||
|
||||
// Initialize the new frame
|
||||
nsIFrame* newFrame = nsnull;
|
||||
nsIFrame* ignore = nsnull;
|
||||
//nsSVGTableCreator svgTableCreator(aPresShell); // Used to make table views.
|
||||
|
||||
// See if the element is absolute or fixed positioned
|
||||
|
@ -7203,8 +7202,8 @@ nsCSSFrameConstructor::ConstructFrameInternal( nsIPresShell* aPresShe
|
|||
(lastChild == aFrameItems.lastChild))) {
|
||||
// When there is no explicit frame to create, assume it's a
|
||||
// container and let display style dictate the rest
|
||||
const nsStyleDisplay* display = (const nsStyleDisplay*)
|
||||
styleContext->GetStyleData(eStyleStruct_Display);
|
||||
display = NS_STATIC_CAST(const nsStyleDisplay*,
|
||||
styleContext->GetStyleData(eStyleStruct_Display));
|
||||
|
||||
rv = ConstructFrameByDisplayType(aPresShell, aPresContext, aState, display, aContent,
|
||||
aParentFrame, styleContext, aFrameItems);
|
||||
|
|
|
@ -746,7 +746,6 @@ BasicTableLayoutStrategy::ComputeNonPctColspanWidths(PRInt32 aWidthInd
|
|||
colFrame->GetWidth(aWidthIndex + NUM_MAJOR_WIDTHS));
|
||||
colWidth = PR_MAX(colWidth, minWidth);
|
||||
|
||||
nscoord numeratorMin = 0;
|
||||
nscoord numeratorPct = 0;
|
||||
nscoord numeratorFix = 0;
|
||||
nscoord numeratorAutoDes = 0;
|
||||
|
@ -1039,7 +1038,6 @@ BasicTableLayoutStrategy::AssignNonPctColumnWidths(nsIPresContext* aPre
|
|||
colFrame->SetWidth(MIN_PRO, colFrame->GetMinWidth());
|
||||
}
|
||||
else if ((rawProp > 0) && (rawPropTotal > 0)) {
|
||||
nscoord desWidth = colFrame->GetDesWidth();
|
||||
nscoord propWidth = NSToCoordRound( ((float)maxPropTotal) * ((float)rawProp) / (float)rawPropTotal ) ;
|
||||
propWidth = nsTableFrame::RoundToPixel(propWidth, aPixelToTwips);
|
||||
colFrame->SetWidth(MIN_PRO, PR_MAX(propWidth, colFrame->GetMinWidth()));
|
||||
|
@ -1329,7 +1327,6 @@ BasicTableLayoutStrategy::AssignPctColumnWidths(const nsHTMLReflowState& aReflow
|
|||
} // end for (colX ..
|
||||
|
||||
float perTotal = 0.0f; // total of percentage constrained cols and/or cells in cols
|
||||
nscoord fixWidthTotal = 0; // total of fixed widths of all cols
|
||||
PRInt32 numPerCols = 0; // number of colums that have percentage constraints
|
||||
nscoord fixDesTotal = 0; // total of fix or des widths of cols
|
||||
nscoord fixDesTotalNoPct = 0; // total of fix or des widths of cols without pct
|
||||
|
@ -1435,8 +1432,8 @@ BasicTableLayoutStrategy::AssignPctColumnWidths(const nsHTMLReflowState& aReflow
|
|||
for (rowX = 0; (rowX < numRows) && !done; rowX++) {
|
||||
PRBool originates;
|
||||
PRInt32 colSpan;
|
||||
nsTableCellFrame* cellFrame = mTableFrame->GetCellInfoAt(rowX, colX, &originates, &colSpan);
|
||||
if (!originates || (1 == colSpan)) {
|
||||
mTableFrame->GetCellInfoAt(rowX, colX, &originates, &colSpan);
|
||||
if (!originates || 1 == colSpan) {
|
||||
continue;
|
||||
}
|
||||
// determine if the cell spans cols which have a pct value
|
||||
|
@ -1599,7 +1596,6 @@ void BasicTableLayoutStrategy::CalculateTotals(PRInt32* aTotalCounts,
|
|||
aTotalWidths[FIX] += PR_MAX(fix, minCol);
|
||||
aDupedWidths[FIX] += minCol;
|
||||
}
|
||||
nscoord desCon = colFrame->GetWidth(DES_CON);
|
||||
if (fixAdj > 0) {
|
||||
if (fixAdj > fix) {
|
||||
aTotalCounts[FIX_ADJ]++;
|
||||
|
|
|
@ -2276,7 +2276,6 @@ nsTableFrame::AppendFrames(nsIPresContext* aPresContext,
|
|||
// Append the new col group frame
|
||||
mColGroups.AppendFrame(nsnull, f);
|
||||
} else if (IsRowGroup(display->mDisplay)) {
|
||||
nsIFrame* prevSibling = mFrames.LastChild();
|
||||
// Append the new row group frame to the sibling chain
|
||||
mFrames.AppendFrame(nsnull, f);
|
||||
|
||||
|
@ -2340,7 +2339,6 @@ nsTableFrame::InsertFrames(nsIPresContext* aPresContext,
|
|||
SetNeedStrategyInit(PR_TRUE);
|
||||
} else if (IsRowGroup(display->mDisplay)) {
|
||||
// get the starting row index of the new rows and insert them into the table
|
||||
PRInt32 rowIndex = 0;
|
||||
nsTableRowGroupFrame* prevRowGroup = (nsTableRowGroupFrame *)nsTableFrame::GetFrameAtOrBefore(aPresContext, this, aPrevFrame, nsLayoutAtoms::tableRowGroupFrame);
|
||||
nsFrameList newList(aFrameList);
|
||||
nsIFrame* lastSibling = newList.LastChild();
|
||||
|
|
|
@ -299,7 +299,6 @@ nsTableRowFrame::DidResize(nsIPresContext* aPresContext,
|
|||
nsTableFrame* tableFrame;
|
||||
nsTableFrame::GetTableFrame(this, tableFrame);
|
||||
if (!tableFrame) return;
|
||||
nscoord cellSpacingY = tableFrame->GetCellSpacingY();
|
||||
|
||||
nsTableIterator iter(aPresContext, *this, eTableDIR);
|
||||
nsIFrame* childFrame = iter.First();
|
||||
|
@ -417,7 +416,6 @@ nsTableRowFrame::CalcTallestCell()
|
|||
nsresult rv = nsTableFrame::GetTableFrame(this, tableFrame);
|
||||
if (NS_FAILED(rv)) return;
|
||||
|
||||
nscoord cellSpacingX = tableFrame->GetCellSpacingX();
|
||||
ResetTallestCell(0);
|
||||
|
||||
for (nsIFrame* kidFrame = mFrames.FirstChild(); kidFrame; kidFrame->GetNextSibling(&kidFrame)) {
|
||||
|
@ -435,6 +433,7 @@ nsTableRowFrame::CalcTallestCell()
|
|||
}
|
||||
}
|
||||
|
||||
#if 0
|
||||
static
|
||||
PRBool IsFirstRow(nsIPresContext* aPresContext,
|
||||
nsTableFrame& aTable,
|
||||
|
@ -451,7 +450,7 @@ PRBool IsFirstRow(nsIPresContext* aPresContext,
|
|||
}
|
||||
return PR_FALSE;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
NS_METHOD nsTableRowFrame::Paint(nsIPresContext* aPresContext,
|
||||
nsIRenderingContext& aRenderingContext,
|
||||
|
|
|
@ -642,7 +642,7 @@ nsTableRowGroupFrame::CalculateRowHeights(nsIPresContext* aPresContext,
|
|||
// iterate every row starting at last row spanned and up to the row with
|
||||
// the spanning cell. do this bottom up so that special rows can get a full
|
||||
// allocation before other rows.
|
||||
PRInt32 startRowIndex = rowIndex + rowSpan - 1;
|
||||
startRowIndex = rowIndex + rowSpan - 1;
|
||||
for (PRInt32 rowX = startRowIndex; (rowX >= rowIndex) && (excessAvail > 0); rowX--) {
|
||||
nscoord excessForRow = 0;
|
||||
// special rows gets as much as they can
|
||||
|
|
|
@ -258,7 +258,7 @@ nsPolygonFrame::GetPoints()
|
|||
mNumPnts = mPoints.Count()+1;
|
||||
mPnts = new nsPoint[mNumPnts];
|
||||
for (cnt=0;cnt<mNumPnts-1;cnt++) {
|
||||
nsPoint * pnt = (nsPoint*)mPoints.ElementAt(cnt);
|
||||
pnt = NS_REINTERPRET_CAST(nsPoint*, mPoints.ElementAt(cnt));
|
||||
mPnts[cnt] = *pnt;
|
||||
delete pnt;
|
||||
}
|
||||
|
|
|
@ -176,7 +176,6 @@ nsSVGContainerFrame::Reflow(nsIPresContext* aPresContext,
|
|||
|
||||
nsIFrame * child = mFrames.FirstChild();
|
||||
while (child != nsnull) {
|
||||
nsRect rect;
|
||||
child->GetRect(rect);
|
||||
nsCOMPtr<nsISVGFrame> svgFrame = do_QueryInterface(child);
|
||||
if (svgFrame) {
|
||||
|
|
|
@ -746,7 +746,6 @@ BasicTableLayoutStrategy::ComputeNonPctColspanWidths(PRInt32 aWidthInd
|
|||
colFrame->GetWidth(aWidthIndex + NUM_MAJOR_WIDTHS));
|
||||
colWidth = PR_MAX(colWidth, minWidth);
|
||||
|
||||
nscoord numeratorMin = 0;
|
||||
nscoord numeratorPct = 0;
|
||||
nscoord numeratorFix = 0;
|
||||
nscoord numeratorAutoDes = 0;
|
||||
|
@ -1039,7 +1038,6 @@ BasicTableLayoutStrategy::AssignNonPctColumnWidths(nsIPresContext* aPre
|
|||
colFrame->SetWidth(MIN_PRO, colFrame->GetMinWidth());
|
||||
}
|
||||
else if ((rawProp > 0) && (rawPropTotal > 0)) {
|
||||
nscoord desWidth = colFrame->GetDesWidth();
|
||||
nscoord propWidth = NSToCoordRound( ((float)maxPropTotal) * ((float)rawProp) / (float)rawPropTotal ) ;
|
||||
propWidth = nsTableFrame::RoundToPixel(propWidth, aPixelToTwips);
|
||||
colFrame->SetWidth(MIN_PRO, PR_MAX(propWidth, colFrame->GetMinWidth()));
|
||||
|
@ -1329,7 +1327,6 @@ BasicTableLayoutStrategy::AssignPctColumnWidths(const nsHTMLReflowState& aReflow
|
|||
} // end for (colX ..
|
||||
|
||||
float perTotal = 0.0f; // total of percentage constrained cols and/or cells in cols
|
||||
nscoord fixWidthTotal = 0; // total of fixed widths of all cols
|
||||
PRInt32 numPerCols = 0; // number of colums that have percentage constraints
|
||||
nscoord fixDesTotal = 0; // total of fix or des widths of cols
|
||||
nscoord fixDesTotalNoPct = 0; // total of fix or des widths of cols without pct
|
||||
|
@ -1435,8 +1432,8 @@ BasicTableLayoutStrategy::AssignPctColumnWidths(const nsHTMLReflowState& aReflow
|
|||
for (rowX = 0; (rowX < numRows) && !done; rowX++) {
|
||||
PRBool originates;
|
||||
PRInt32 colSpan;
|
||||
nsTableCellFrame* cellFrame = mTableFrame->GetCellInfoAt(rowX, colX, &originates, &colSpan);
|
||||
if (!originates || (1 == colSpan)) {
|
||||
mTableFrame->GetCellInfoAt(rowX, colX, &originates, &colSpan);
|
||||
if (!originates || 1 == colSpan) {
|
||||
continue;
|
||||
}
|
||||
// determine if the cell spans cols which have a pct value
|
||||
|
@ -1599,7 +1596,6 @@ void BasicTableLayoutStrategy::CalculateTotals(PRInt32* aTotalCounts,
|
|||
aTotalWidths[FIX] += PR_MAX(fix, minCol);
|
||||
aDupedWidths[FIX] += minCol;
|
||||
}
|
||||
nscoord desCon = colFrame->GetWidth(DES_CON);
|
||||
if (fixAdj > 0) {
|
||||
if (fixAdj > fix) {
|
||||
aTotalCounts[FIX_ADJ]++;
|
||||
|
|
|
@ -2276,7 +2276,6 @@ nsTableFrame::AppendFrames(nsIPresContext* aPresContext,
|
|||
// Append the new col group frame
|
||||
mColGroups.AppendFrame(nsnull, f);
|
||||
} else if (IsRowGroup(display->mDisplay)) {
|
||||
nsIFrame* prevSibling = mFrames.LastChild();
|
||||
// Append the new row group frame to the sibling chain
|
||||
mFrames.AppendFrame(nsnull, f);
|
||||
|
||||
|
@ -2340,7 +2339,6 @@ nsTableFrame::InsertFrames(nsIPresContext* aPresContext,
|
|||
SetNeedStrategyInit(PR_TRUE);
|
||||
} else if (IsRowGroup(display->mDisplay)) {
|
||||
// get the starting row index of the new rows and insert them into the table
|
||||
PRInt32 rowIndex = 0;
|
||||
nsTableRowGroupFrame* prevRowGroup = (nsTableRowGroupFrame *)nsTableFrame::GetFrameAtOrBefore(aPresContext, this, aPrevFrame, nsLayoutAtoms::tableRowGroupFrame);
|
||||
nsFrameList newList(aFrameList);
|
||||
nsIFrame* lastSibling = newList.LastChild();
|
||||
|
|
|
@ -299,7 +299,6 @@ nsTableRowFrame::DidResize(nsIPresContext* aPresContext,
|
|||
nsTableFrame* tableFrame;
|
||||
nsTableFrame::GetTableFrame(this, tableFrame);
|
||||
if (!tableFrame) return;
|
||||
nscoord cellSpacingY = tableFrame->GetCellSpacingY();
|
||||
|
||||
nsTableIterator iter(aPresContext, *this, eTableDIR);
|
||||
nsIFrame* childFrame = iter.First();
|
||||
|
@ -417,7 +416,6 @@ nsTableRowFrame::CalcTallestCell()
|
|||
nsresult rv = nsTableFrame::GetTableFrame(this, tableFrame);
|
||||
if (NS_FAILED(rv)) return;
|
||||
|
||||
nscoord cellSpacingX = tableFrame->GetCellSpacingX();
|
||||
ResetTallestCell(0);
|
||||
|
||||
for (nsIFrame* kidFrame = mFrames.FirstChild(); kidFrame; kidFrame->GetNextSibling(&kidFrame)) {
|
||||
|
@ -435,6 +433,7 @@ nsTableRowFrame::CalcTallestCell()
|
|||
}
|
||||
}
|
||||
|
||||
#if 0
|
||||
static
|
||||
PRBool IsFirstRow(nsIPresContext* aPresContext,
|
||||
nsTableFrame& aTable,
|
||||
|
@ -451,7 +450,7 @@ PRBool IsFirstRow(nsIPresContext* aPresContext,
|
|||
}
|
||||
return PR_FALSE;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
NS_METHOD nsTableRowFrame::Paint(nsIPresContext* aPresContext,
|
||||
nsIRenderingContext& aRenderingContext,
|
||||
|
|
|
@ -642,7 +642,7 @@ nsTableRowGroupFrame::CalculateRowHeights(nsIPresContext* aPresContext,
|
|||
// iterate every row starting at last row spanned and up to the row with
|
||||
// the spanning cell. do this bottom up so that special rows can get a full
|
||||
// allocation before other rows.
|
||||
PRInt32 startRowIndex = rowIndex + rowSpan - 1;
|
||||
startRowIndex = rowIndex + rowSpan - 1;
|
||||
for (PRInt32 rowX = startRowIndex; (rowX >= rowIndex) && (excessAvail > 0); rowX--) {
|
||||
nscoord excessForRow = 0;
|
||||
// special rows gets as much as they can
|
||||
|
|
|
@ -103,14 +103,12 @@ nsBox::ListBox(nsAutoString& aResult)
|
|||
{
|
||||
namedMap->Item(i, getter_AddRefs(attribute));
|
||||
nsCOMPtr<nsIDOMAttr> attr(do_QueryInterface(attribute));
|
||||
nsAutoString name;
|
||||
attr->GetName(name);
|
||||
nsAutoString value;
|
||||
attr->GetValue(value);
|
||||
AppendAttribute(name, value, aResult);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
|
@ -447,17 +445,15 @@ nsBox::RelayoutDirtyChild(nsBoxLayoutState& aState, nsIBox* aChild)
|
|||
frame->SetFrameState(state);
|
||||
NeedsRecalc();
|
||||
|
||||
nsIBox* parent = nsnull;
|
||||
GetParentBox(&parent);
|
||||
if (parent)
|
||||
return parent->RelayoutDirtyChild(aState, this);
|
||||
else {
|
||||
nsIFrame* parent = nsnull;
|
||||
frame->GetParent(&parent);
|
||||
nsCOMPtr<nsIPresShell> shell;
|
||||
aState.GetPresShell(getter_AddRefs(shell));
|
||||
return parent->ReflowDirtyChild(shell, frame);
|
||||
}
|
||||
nsIBox* parentBox = nsnull;
|
||||
GetParentBox(&parentBox);
|
||||
if (parentBox)
|
||||
return parentBox->RelayoutDirtyChild(aState, this);
|
||||
nsIFrame* parent = nsnull;
|
||||
frame->GetParent(&parent);
|
||||
nsCOMPtr<nsIPresShell> shell;
|
||||
aState.GetPresShell(getter_AddRefs(shell));
|
||||
return parent->ReflowDirtyChild(shell, frame);
|
||||
} else {
|
||||
#ifdef DEBUG_COELESCED
|
||||
Coelesced();
|
||||
|
|
|
@ -1272,8 +1272,9 @@ nsBoxFrame::Paint(nsIPresContext* aPresContext,
|
|||
nsFramePaintLayer aWhichLayer)
|
||||
{
|
||||
|
||||
const nsStyleDisplay* disp = (const nsStyleDisplay*)
|
||||
mStyleContext->GetStyleData(eStyleStruct_Display);
|
||||
const nsStyleDisplay* disp =
|
||||
NS_STATIC_CAST(const nsStyleDisplay*,
|
||||
mStyleContext->GetStyleData(eStyleStruct_Display));
|
||||
|
||||
// if collapsed nothing is drawn
|
||||
if (disp->mVisible == NS_STYLE_VISIBILITY_COLLAPSE)
|
||||
|
@ -1283,8 +1284,6 @@ nsBoxFrame::Paint(nsIPresContext* aPresContext,
|
|||
return NS_OK;
|
||||
}
|
||||
if (NS_FRAME_PAINT_LAYER_BACKGROUND == aWhichLayer) {
|
||||
const nsStyleDisplay* disp = (const nsStyleDisplay*)
|
||||
mStyleContext->GetStyleData(eStyleStruct_Display);
|
||||
if (disp->IsVisible() && mRect.width && mRect.height) {
|
||||
// Paint our background and border
|
||||
PRIntn skipSides = GetSkipSides();
|
||||
|
|
|
@ -944,7 +944,7 @@ nsBoxToBlockAdaptor::Reflow(nsBoxLayoutState& aState,
|
|||
}
|
||||
|
||||
if (redrawAfterReflow) {
|
||||
nsIFrame* frame = nsnull;
|
||||
frame = nsnull;
|
||||
GetFrame(&frame);
|
||||
nsRect r;
|
||||
frame->GetRect(r);
|
||||
|
@ -959,8 +959,6 @@ nsBoxToBlockAdaptor::Reflow(nsBoxLayoutState& aState,
|
|||
changedSize = PR_TRUE;
|
||||
|
||||
nsContainerFrame::FinishReflowChild(mFrame, aPresContext, aDesiredSize, aX, aY, NS_FRAME_NO_MOVE_FRAME);
|
||||
|
||||
|
||||
}
|
||||
|
||||
#ifdef DEBUG_REFLOW
|
||||
|
|
|
@ -235,8 +235,6 @@ nsBulletinBoardLayout::Layout(nsIBox* aBox, nsBoxLayoutState& aState)
|
|||
|
||||
nsIBox* child = nsnull;
|
||||
aBox->GetChildBox(&child);
|
||||
nsRect damageRect;
|
||||
PRBool damageRectSet = PR_FALSE;
|
||||
|
||||
while (child)
|
||||
{
|
||||
|
|
|
@ -862,7 +862,6 @@ nsSplitterFrameInner::MouseDown(nsIDOMEvent* aMouseEvent)
|
|||
nsIFrame* childFrame = nsnull;
|
||||
childBox->GetFrame(&childFrame);
|
||||
|
||||
nsCOMPtr<nsIContent> content;
|
||||
childFrame->GetContent(getter_AddRefs(content));
|
||||
nsCOMPtr<nsIAtom> atom;
|
||||
nsresult rv;
|
||||
|
|
|
@ -380,7 +380,6 @@ nsSprocketLayout::Layout(nsIBox* aBox, nsBoxLayoutState& aState)
|
|||
PRBool possibleRedraw = PR_FALSE;
|
||||
|
||||
if (sizeChanged) {
|
||||
nsSize maxSize;
|
||||
child->GetMaxSize(aState, maxSize);
|
||||
|
||||
// make sure the size is in our max size.
|
||||
|
@ -1146,7 +1145,6 @@ nsSprocketLayout::ComputeChildSizes(nsIBox* aBox,
|
|||
|
||||
// ---- once we have removed and min and max issues just stretch us out in the remaining space
|
||||
// ---- or shrink us. Depends on the size remaining and the spring constants
|
||||
nscoord oldsize = aGivenSize;
|
||||
aGivenSize = 0;
|
||||
boxSizes = aBoxSizes;
|
||||
computedBoxSizes = aComputedBoxSizes;
|
||||
|
|
|
@ -231,7 +231,6 @@ nsTempleLayout::DesecrateMonuments(nsIBox* aBox, nsBoxLayoutState& aState)
|
|||
parent->DesecrateMonuments(parentBox, aState);
|
||||
|
||||
if (mMonuments) {
|
||||
nsBoxSizeList* tmp = mMonuments;
|
||||
mMonuments->Destroy(aState);
|
||||
mMonuments = nsnull;
|
||||
}
|
||||
|
|
|
@ -204,7 +204,6 @@ nsTreeItemDragCapturer :: ConvertEventCoordsToRowCoords ( nsIDOMEvent* inDragEve
|
|||
mouseEvent->GetClientY(&y);
|
||||
float p2t;
|
||||
mPresContext->GetScaledPixelsToTwips(&p2t);
|
||||
nscoord onePixel = NSIntPixelsToTwips(1, p2t);
|
||||
nscoord xp = NSIntPixelsToTwips(x, p2t);
|
||||
nscoord yp = NSIntPixelsToTwips(y, p2t);
|
||||
|
||||
|
|
|
@ -337,8 +337,6 @@ nsTreeLayout::LazyRowCreator(nsBoxLayoutState& aState, nsXULTreeGroupFrame* aGro
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
nsSize size;
|
||||
|
||||
// get the first tree box. If there isn't one create one.
|
||||
PRBool created = PR_FALSE;
|
||||
nsIBox* box = aGroup->GetFirstTreeBox(&created);
|
||||
|
|
|
@ -163,7 +163,6 @@ public:
|
|||
nsScrollSmoother::nsScrollSmoother(nsXULTreeOuterGroupFrame* aOuter)
|
||||
{
|
||||
NS_INIT_REFCNT();
|
||||
nsresult rv = NS_OK;
|
||||
mDelta = 0;
|
||||
mOuter = aOuter;
|
||||
}
|
||||
|
@ -1322,7 +1321,6 @@ nsXULTreeOuterGroupFrame::ReflowFinished(nsIPresShell* aPresShell, PRBool* aFlus
|
|||
treeLayout->LazyRowCreator(state, this);
|
||||
|
||||
if (mAdjustScroll) {
|
||||
PRInt32 pos = mCurrentIndex*mRowHeight;
|
||||
VerticalScroll(mYPosition);
|
||||
mAdjustScroll = PR_FALSE;
|
||||
}
|
||||
|
|
|
@ -454,7 +454,7 @@ nsresult nsAbDirectory::RemoveCardFromAddressList(const nsIAbCard* card)
|
|||
rv = pAddressLists->Count(&total);
|
||||
for (j = total - 1; j >= 0; j--)
|
||||
{
|
||||
nsCOMPtr<nsISupports> pSupport = getter_AddRefs(pAddressLists->ElementAt(j));
|
||||
pSupport = getter_AddRefs(pAddressLists->ElementAt(j));
|
||||
nsCOMPtr<nsIAbCard> cardInList(do_QueryInterface(pSupport, &rv));
|
||||
if (card == cardInList.get())
|
||||
pAddressLists->RemoveElementAt(j);
|
||||
|
@ -491,11 +491,10 @@ NS_IMETHODIMP nsAbDirectory::DeleteCards(nsISupportsArray *cards)
|
|||
mDatabase->DeleteCardFromMailList(this, card, PR_TRUE);
|
||||
|
||||
PRUint32 cardTotal;
|
||||
PRInt32 i;
|
||||
rv = m_AddressList->Count(&cardTotal);
|
||||
for (i = cardTotal - 1; i >= 0; i--)
|
||||
for (PRInt32 k = cardTotal - 1; k >= 0; k--)
|
||||
{
|
||||
nsCOMPtr<nsISupports> pSupport = getter_AddRefs(m_AddressList->ElementAt(i));
|
||||
nsCOMPtr<nsISupports> pSupport = getter_AddRefs(m_AddressList->ElementAt(k));
|
||||
if (!pSupport)
|
||||
continue;
|
||||
|
||||
|
@ -508,7 +507,7 @@ NS_IMETHODIMP nsAbDirectory::DeleteCards(nsISupportsArray *cards)
|
|||
card->GetDbTableID(&cardTableID);
|
||||
card->GetDbRowID(&cardRowID);
|
||||
if (tableID == cardTableID && rowID == cardRowID)
|
||||
m_AddressList->RemoveElementAt(i);
|
||||
m_AddressList->RemoveElementAt(k);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -525,7 +524,7 @@ NS_IMETHODIMP nsAbDirectory::DeleteCards(nsISupportsArray *cards)
|
|||
char *listUri = PR_smprintf("%s/MailList%ld", mURI, rowID);
|
||||
if (listUri)
|
||||
{
|
||||
nsresult rv = NS_OK;
|
||||
rv = NS_OK;
|
||||
NS_WITH_SERVICE(nsIRDFService, rdfService, kRDFServiceCID, &rv);
|
||||
if(NS_FAILED(rv))
|
||||
return rv;
|
||||
|
@ -671,7 +670,7 @@ NS_IMETHODIMP nsAbDirectory::DeleteDirectory(nsIAbDirectory *directory)
|
|||
}
|
||||
else
|
||||
{ //it's a mailing list
|
||||
nsresult rv = NS_OK;
|
||||
rv = NS_OK;
|
||||
|
||||
nsXPIDLCString uri;
|
||||
rv = directory->GetDirUri(getter_Copies(uri));
|
||||
|
|
|
@ -552,7 +552,6 @@ nsresult AddressBookParser::ParseFile()
|
|||
if (PL_strcmp(fileName, kPersonalAddressbook) == 0)
|
||||
{
|
||||
// This is the personal address book, get name from prefs
|
||||
nsresult rv = NS_OK;
|
||||
NS_WITH_SERVICE(nsIPref, pPref, kPrefCID, &rv);
|
||||
if (NS_FAILED(rv) || !pPref)
|
||||
return nsnull;
|
||||
|
|
|
@ -2003,7 +2003,7 @@ nsresult DIR_DeleteServerFromList(DIR_Server *server)
|
|||
DIR_SetServerPosition(dirList, server, DIR_POS_DELETE);
|
||||
DIR_DeleteServer(server);
|
||||
|
||||
nsresult rv = NS_OK;
|
||||
rv = NS_OK;
|
||||
NS_WITH_SERVICE(nsIPref, pPref, kPrefCID, &rv);
|
||||
if (NS_FAILED(rv) || !pPref)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
|
|
@ -640,7 +640,7 @@ nsresult nsAbDirectoryDataSource::DoDeleteFromDirectory(nsISupportsArray *parent
|
|||
nsCOMPtr<nsIAbDirectory> parent = do_QueryInterface(supports, &rv);
|
||||
if (NS_SUCCEEDED(rv))
|
||||
{
|
||||
nsCOMPtr<nsISupports> supports = getter_AddRefs(delDirs->ElementAt(item));
|
||||
supports = getter_AddRefs(delDirs->ElementAt(item));
|
||||
nsCOMPtr<nsIAbDirectory> deletedDir(do_QueryInterface(supports));
|
||||
if(deletedDir)
|
||||
{
|
||||
|
|
|
@ -273,7 +273,6 @@ nsresult nsMsgSearchNews::Encode (nsCString *outEncoding)
|
|||
if (encoding)
|
||||
{
|
||||
PL_strcpy (encoding, "?search");
|
||||
PRUint32 numTerms;
|
||||
|
||||
m_searchTerms->Count(&numTerms);
|
||||
|
||||
|
|
|
@ -149,7 +149,7 @@ nsMsgPrintEngine::OnEndDocumentLoad(nsIDocumentLoader *loader, nsIRequest *reque
|
|||
else
|
||||
{
|
||||
// Tell the user we started printing...
|
||||
PRUnichar *msg = GetString(NS_ConvertASCIItoUCS2("PrintingMessage").GetUnicode());
|
||||
msg = GetString(NS_LITERAL_STRING("PrintingMessage").get());
|
||||
SetStatusMessage( msg );
|
||||
PR_FREEIF(msg);
|
||||
}
|
||||
|
|
|
@ -314,7 +314,7 @@ NS_IMETHODIMP nsMsgWindow::SetDOMWindow(nsIDOMWindowInternal *aWindow)
|
|||
|
||||
nsAutoString childName; childName.AssignWithConversion("messagepane");
|
||||
nsCOMPtr<nsIDocShellTreeNode> rootAsNode(do_QueryInterface(rootAsItem));
|
||||
nsCOMPtr<nsIDocShell> docShell(do_QueryInterface(rootAsItem));
|
||||
docShell = do_QueryInterface(rootAsItem);
|
||||
mRootDocShellWeak = getter_AddRefs(NS_GetWeakReference(docShell));
|
||||
|
||||
// force ourselves to figure out the message pane
|
||||
|
|
|
@ -3774,9 +3774,7 @@ NS_IMETHODIMP nsMsgDatabase::ApplyRetentionSettings(nsIMsgRetentionSettings *msg
|
|||
nsMsgRetainByPreference retainByPreference;
|
||||
PRUint32 daysToKeepHdrs = 0;
|
||||
PRUint32 numHeadersToKeep = 0;
|
||||
PRUint32 keepUnreadMessagesProp = 0;
|
||||
PRBool keepUnreadMessagesOnly = PR_FALSE;
|
||||
PRUint32 daysToKeepBodies = 0;
|
||||
msgRetentionSettings->GetRetainByPreference(&retainByPreference);
|
||||
msgRetentionSettings->GetKeepUnreadMessagesOnly(&keepUnreadMessagesOnly);
|
||||
|
||||
|
|
|
@ -480,7 +480,6 @@ nsImapIncomingServer::LoadNextQueuedUrl(PRBool *aResult)
|
|||
if (aImapUrl)
|
||||
{
|
||||
nsCOMPtr <nsIImapMockChannel> mockChannel;
|
||||
nsCOMPtr<nsIURI> url(do_QueryInterface(aSupport, &rv));
|
||||
|
||||
if (NS_SUCCEEDED(aImapUrl->GetMockChannel(getter_AddRefs(mockChannel))) && mockChannel)
|
||||
{
|
||||
|
|
|
@ -4484,7 +4484,7 @@ nsresult nsImapMailFolder::GetClearedOriginalOp(nsIMsgOfflineImapOperation *op,
|
|||
{
|
||||
nsMsgKey originalKey;
|
||||
op->GetMessageKey(&originalKey);
|
||||
nsresult rv = (*originalDB)->GetOfflineOpForKey(originalKey, PR_FALSE, &returnOp);
|
||||
rv = (*originalDB)->GetOfflineOpForKey(originalKey, PR_FALSE, &returnOp);
|
||||
if (NS_SUCCEEDED(rv) && returnOp)
|
||||
{
|
||||
nsXPIDLCString moveDestination;
|
||||
|
@ -4532,7 +4532,7 @@ nsresult nsImapMailFolder::GetOriginalOp(nsIMsgOfflineImapOperation *op, nsIMsgO
|
|||
{
|
||||
nsMsgKey originalKey;
|
||||
op->GetMessageKey(&originalKey);
|
||||
nsresult rv = (*originalDB)->GetOfflineOpForKey(originalKey, PR_FALSE, &returnOp);
|
||||
rv = (*originalDB)->GetOfflineOpForKey(originalKey, PR_FALSE, &returnOp);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -4554,7 +4554,6 @@ nsresult nsImapMailFolder::CopyMessagesOffline(nsIMsgFolder* srcFolder,
|
|||
NS_ENSURE_ARG(messages);
|
||||
nsresult rv = NS_OK;
|
||||
nsresult stopit = 0;
|
||||
PRBool operationOnMoveResult = PR_FALSE;
|
||||
nsCOMPtr <nsIMsgDatabase> sourceMailDB;
|
||||
nsCOMPtr <nsIDBFolderInfo> srcDbFolderInfo;
|
||||
srcFolder->GetDBFolderInfoAndDB(getter_AddRefs(srcDbFolderInfo), getter_AddRefs(sourceMailDB));
|
||||
|
@ -4589,7 +4588,6 @@ nsresult nsImapMailFolder::CopyMessagesOffline(nsIMsgFolder* srcFolder,
|
|||
{
|
||||
// get the highest key in the dest db, so we can make up our fake keys
|
||||
PRBool highWaterDeleted = PR_FALSE;
|
||||
PRBool haveWarnedUserAboutMoveTargets = PR_FALSE;
|
||||
nsMsgKey fakeBase = 1;
|
||||
nsCOMPtr <nsIDBFolderInfo> folderInfo;
|
||||
rv = mDatabase->GetDBFolderInfo(getter_AddRefs(folderInfo));
|
||||
|
@ -4664,7 +4662,6 @@ nsresult nsImapMailFolder::CopyMessagesOffline(nsIMsgFolder* srcFolder,
|
|||
{
|
||||
nsXPIDLCString folderURI;
|
||||
GetURI(getter_Copies(folderURI));
|
||||
nsOfflineImapOperationType opType = nsIMsgOfflineImapOperation::kMsgCopy;
|
||||
|
||||
if (isMove)
|
||||
{
|
||||
|
|
|
@ -234,8 +234,10 @@ nsImapOfflineSync::ProcessAppendMsgOperation(nsIMsgOfflineImapOperation *current
|
|||
nsCOMPtr <nsIMsgDBHdr> mailHdr;
|
||||
nsMsgKey msgKey;
|
||||
currentOp->GetMessageKey(&msgKey);
|
||||
#ifndef NOT_IMPL_YET
|
||||
m_currentDB->GetMsgHdrForKey(msgKey, getter_AddRefs(mailHdr));
|
||||
#else
|
||||
nsresult rv = m_currentDB->GetMsgHdrForKey(msgKey, getter_AddRefs(mailHdr));
|
||||
#ifdef NOT_IMPL_YET
|
||||
if (NS_SUCCEEDED(rv) && mailHdr)
|
||||
{
|
||||
char *msg_file_name = WH_TempName (xpFileToPost, "nsmail");
|
||||
|
|
|
@ -364,11 +364,9 @@ NS_IMETHODIMP nsImapUrl::GetImapPartToFetch(char **result)
|
|||
if (wherepart)
|
||||
{
|
||||
char *wherelibmimepart = PL_strstr(wherepart, "&part=");
|
||||
int len = PL_strlen(m_listOfMessageIds), numCharsToCopy = 0;
|
||||
if (wherelibmimepart)
|
||||
numCharsToCopy = (wherelibmimepart - wherepart);
|
||||
else
|
||||
numCharsToCopy = PL_strlen(m_listOfMessageIds) - (wherepart - m_listOfMessageIds);
|
||||
int numCharsToCopy = (wherelibmimepart) ?
|
||||
wherelibmimepart - wherepart :
|
||||
PL_strlen(m_listOfMessageIds) - (wherepart - m_listOfMessageIds);
|
||||
if (numCharsToCopy)
|
||||
{
|
||||
*result = (char *) PR_Malloc(sizeof(char) * (numCharsToCopy + 1));
|
||||
|
@ -884,7 +882,6 @@ NS_IMETHODIMP nsImapUrl::AllocateServerPath(const char * canonicalPath, char onl
|
|||
NS_IMETHODIMP nsImapUrl::AllocateCanonicalPath(const char *serverPath, char onlineDelimiter, char **allocatedPath )
|
||||
{
|
||||
nsresult rv = NS_ERROR_NULL_POINTER;
|
||||
char *canonicalPath = nsnull;
|
||||
char delimiterToUse = onlineDelimiter;
|
||||
char *serverKey = nsnull;
|
||||
nsString aString;
|
||||
|
|
|
@ -858,7 +858,6 @@ NS_IMETHODIMP nsMsgLocalMailFolder::Compact(nsIUrlListener *aListener)
|
|||
nsCOMPtr<nsIDBFolderInfo> folderInfo;
|
||||
PRUint32 expungedBytes = 0;
|
||||
nsCOMPtr<nsIMsgDatabase> mailDBFactory;
|
||||
nsresult folderOpen = NS_OK;
|
||||
nsCOMPtr<nsIFileSpec> pathSpec;
|
||||
|
||||
rv = GetExpungedBytes(&expungedBytes);
|
||||
|
|
|
@ -353,7 +353,7 @@ get_JSPrincipals_from_java_caller_impl(JNIEnv *pJNIEnv, JSContext *pJSContext, v
|
|||
}
|
||||
|
||||
static jobject PR_CALLBACK
|
||||
get_java_wrapper_impl(JNIEnv *pJNIEnv, jint jsobject)
|
||||
get_java_wrapper_impl(JNIEnv *pJNIEnv, jint a_jsobject)
|
||||
{
|
||||
nsresult err = NS_OK;
|
||||
jobject pJSObjectWrapper = NULL;
|
||||
|
@ -361,7 +361,7 @@ get_java_wrapper_impl(JNIEnv *pJNIEnv, jint jsobject)
|
|||
if (pJVMMgr != NULL) {
|
||||
nsIJVMPlugin* pJVMPI = pJVMMgr->GetJVMPlugin();
|
||||
if (pJVMPI != NULL) {
|
||||
err = pJVMPI->GetJavaWrapper(pJNIEnv, jsobject, &pJSObjectWrapper);
|
||||
err = pJVMPI->GetJavaWrapper(pJNIEnv, a_jsobject, &pJSObjectWrapper);
|
||||
//pJVMPI->Release();
|
||||
}
|
||||
pJVMMgr->Release();
|
||||
|
@ -421,8 +421,6 @@ enter_js_from_java_impl(JNIEnv *jEnv, char **errp,
|
|||
|
||||
if (pNSISecurityContext != nsnull) {
|
||||
if (pJSCX) {
|
||||
JSPrincipals *jsprin = nsnull;
|
||||
|
||||
nsCOMPtr<nsIScriptContext> scriptContext = (nsIScriptContext*)JS_GetContextPrivate(pJSCX);
|
||||
if (scriptContext) {
|
||||
nsCOMPtr<nsIScriptGlobalObject> global = scriptContext->GetGlobalObject();
|
||||
|
|
|
@ -82,8 +82,6 @@ nsCSecurityContext::QueryInterface(const nsIID& aIID, void** aInstancePtr)
|
|||
NS_METHOD
|
||||
nsCSecurityContext::Implies(const char* target, const char* action, PRBool *bAllowedAccess)
|
||||
{
|
||||
nsIPrincipal* pIPrincipal = NULL;
|
||||
|
||||
if(!bAllowedAccess) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
@ -124,8 +122,6 @@ nsCSecurityContext::GetOrigin(char* buf, int buflen)
|
|||
// that case we are not done.
|
||||
|
||||
if (!m_pPrincipal && m_pJSCX ) {
|
||||
JSPrincipals *jsprin = nsnull;
|
||||
|
||||
nsCOMPtr<nsIScriptContext> scriptContext = (nsIScriptContext*)JS_GetContextPrivate(m_pJSCX);
|
||||
if (scriptContext) {
|
||||
nsCOMPtr<nsIScriptGlobalObject> global = scriptContext->GetGlobalObject();
|
||||
|
|
|
@ -839,7 +839,6 @@ nsJVMManager::IsAllPermissionGranted(
|
|||
PRBool * isGranted)
|
||||
{
|
||||
nsresult rv = NS_OK;
|
||||
PRBool success = PR_FALSE;
|
||||
|
||||
nsIPrincipal* pIPrincipal = NULL;
|
||||
|
||||
|
@ -886,15 +885,13 @@ nsJVMManager::IsAppletTrusted(
|
|||
nsIPrincipal** pIPrincipal)
|
||||
{
|
||||
nsresult rv = NS_OK;
|
||||
PRBool success = PR_FALSE;
|
||||
|
||||
//-- Get the signature verifier service
|
||||
NS_WITH_SERVICE(nsISignatureVerifier, verifier, SIGNATURE_VERIFIER_CONTRACTID, &rv);
|
||||
if (NS_FAILED(rv)) // No signature verifier available
|
||||
return NS_OK;
|
||||
|
||||
|
||||
// Get the Script Security Manager.
|
||||
// Get the Script Security Manager.
|
||||
|
||||
NS_WITH_SERVICE(nsIScriptSecurityManager, secMan,
|
||||
NS_SCRIPTSECURITYMANAGER_CONTRACTID, &rv)
|
||||
|
|
|
@ -379,7 +379,6 @@ nsresult nsDocumentOpenInfo::DispatchContent(nsIRequest *request, nsISupports *
|
|||
nsCOMPtr<nsIURI> uri;
|
||||
PRBool abortProcess = PR_FALSE;
|
||||
aChannel->GetURI(getter_AddRefs(uri));
|
||||
nsCOMPtr<nsIStreamListener> contentStreamListener;
|
||||
nsCOMPtr<nsIExternalHelperAppService> helperAppService (do_GetService(NS_EXTERNALHELPERAPPSERVICE_CONTRACTID));
|
||||
if (helperAppService)
|
||||
{
|
||||
|
|
|
@ -211,7 +211,7 @@ NS_IMETHODIMP nsExternalHelperAppService::DoContent(const char *aMimeContentType
|
|||
nsXPIDLCString fileExtension;
|
||||
|
||||
// (1) Try to find a mime object by looking the mime type
|
||||
nsresult rv = GetFromMIMEType(aMimeContentType, getter_AddRefs(mimeInfo));
|
||||
GetFromMIMEType(aMimeContentType, getter_AddRefs(mimeInfo));
|
||||
|
||||
// here's a nifty little trick. If we got a match back for the content type; but the content type is
|
||||
// unknown or octet (both of these are pretty much unhelpful mime objects), then see if the file extension
|
||||
|
@ -848,7 +848,6 @@ NS_IMETHODIMP nsExternalAppHandler::OnDataAvailable(nsIRequest *request, nsISupp
|
|||
return request->Cancel(NS_BINDING_ABORTED);
|
||||
|
||||
// read the data out of the stream and write it to the temp file.
|
||||
PRUint32 numBytesRead = 0;
|
||||
if (mOutStream && mDataBuffer && count > 0)
|
||||
{
|
||||
PRUint32 numBytesRead = 0;
|
||||
|
@ -869,7 +868,6 @@ NS_IMETHODIMP nsExternalAppHandler::OnDataAvailable(nsIRequest *request, nsISupp
|
|||
NS_IMETHODIMP nsExternalAppHandler::OnStopRequest(nsIRequest *request, nsISupports *aCtxt,
|
||||
nsresult aStatus, const PRUnichar * errorMsg)
|
||||
{
|
||||
nsresult rv = NS_OK;
|
||||
mStopRequestIssued = PR_TRUE;
|
||||
|
||||
// first, check to see if we've been canceled....
|
||||
|
|
|
@ -450,10 +450,11 @@ NS_IMETHODIMP nsView :: SynchWidgetSizePosition()
|
|||
mViewManager->GetDeviceContext(dx);
|
||||
dx->GetAppUnitsToDevUnits(t2p);
|
||||
NS_RELEASE(dx);
|
||||
|
||||
#if 0
|
||||
/* You would think that doing a move and resize all in one operation would
|
||||
* be faster but its not. Something is really broken here. So I'm comenting
|
||||
* this out for now
|
||||
*/
|
||||
// if we moved and resized do it all in one shot
|
||||
if (mVFlags & NS_VIEW_PUBLIC_FLAG_WIDGET_MOVED && mVFlags & NS_VIEW_PUBLIC_FLAG_WIDGET_RESIZED)
|
||||
{
|
||||
|
@ -483,7 +484,7 @@ NS_IMETHODIMP nsView :: SynchWidgetSizePosition()
|
|||
return NS_OK;
|
||||
}
|
||||
}
|
||||
*/
|
||||
#endif
|
||||
// if we just resized do it
|
||||
if (mVFlags & NS_VIEW_PUBLIC_FLAG_WIDGET_RESIZED)
|
||||
{
|
||||
|
@ -495,7 +496,9 @@ NS_IMETHODIMP nsView :: SynchWidgetSizePosition()
|
|||
mWindow->GetBounds(bounds);
|
||||
|
||||
if (bounds.width != width || bounds.height != bounds.height) {
|
||||
#ifdef DEBUG_evaughan
|
||||
printf("%d) Resize(%d,%d)\n", this, width, height);
|
||||
#endif
|
||||
mWindow->Resize(width,height, PR_TRUE);
|
||||
}
|
||||
|
||||
|
@ -517,7 +520,9 @@ NS_IMETHODIMP nsView :: SynchWidgetSizePosition()
|
|||
mWindow->GetBounds(bounds);
|
||||
|
||||
if (bounds.x != x || bounds.y != y) {
|
||||
#ifdef DEBUG_evaughan
|
||||
printf("%d) Move(%d,%d)\n", this, x, y);
|
||||
#endif
|
||||
mWindow->Move(x,y);
|
||||
}
|
||||
|
||||
|
|
|
@ -2879,7 +2879,6 @@ NS_IMETHODIMP nsViewManager::Display(nsIView* aView, nscoord aX, nscoord aY)
|
|||
}
|
||||
|
||||
aView->GetBounds(trect);
|
||||
nscoord x = trect.x, y = trect.y;
|
||||
|
||||
localcx->Translate(aX, aY);
|
||||
|
||||
|
|
|
@ -884,7 +884,7 @@ nsWebCrawler::LoadNextURL(PRBool aQueueLoad)
|
|||
|
||||
if ((mMaxPages < 0) || (mMaxPages > 0)) {
|
||||
while (0 != mPendingURLs.Count()) {
|
||||
nsString* url = (nsString*) mPendingURLs.ElementAt(0);
|
||||
url = NS_REINTERPRET_CAST(nsString*, mPendingURLs.ElementAt(0));
|
||||
mPendingURLs.RemoveElementAt(0);
|
||||
if (nsnull != url) {
|
||||
if (OkToLoad(*url)) {
|
||||
|
|
|
@ -41,7 +41,7 @@ public:
|
|||
printf("failed to get current thread\n");
|
||||
return rv;
|
||||
}
|
||||
printf("running %d on thread %x\n", mNum, thread.get());
|
||||
printf("running %d on thread %p\n", mNum, (void *)thread.get());
|
||||
|
||||
// if we don't do something slow, we'll never see the other
|
||||
// worker threads run
|
||||
|
|
Загрузка…
Ссылка в новой задаче