зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1309818 - Fixing some warning when compiling dom/*, r=smaug
This commit is contained in:
Родитель
38b4c31828
Коммит
793b227795
|
@ -1313,7 +1313,7 @@ nsContentSubtreeIterator::Init(nsIDOMRange* aRange)
|
||||||
// find first node in range
|
// find first node in range
|
||||||
int32_t offset = mRange->StartOffset();
|
int32_t offset = mRange->StartOffset();
|
||||||
|
|
||||||
nsINode* node;
|
nsINode* node = nullptr;
|
||||||
if (!startParent->GetChildCount()) {
|
if (!startParent->GetChildCount()) {
|
||||||
// no children, start at the node itself
|
// no children, start at the node itself
|
||||||
node = startParent;
|
node = startParent;
|
||||||
|
|
|
@ -1313,7 +1313,7 @@ ContentEventHandler::OnQuerySelectedText(WidgetQueryContentEvent* aEvent)
|
||||||
NS_ENSURE_SUCCESS(rv, rv);
|
NS_ENSURE_SUCCESS(rv, rv);
|
||||||
|
|
||||||
nsCOMPtr<nsINode> anchorNode, focusNode;
|
nsCOMPtr<nsINode> anchorNode, focusNode;
|
||||||
int32_t anchorOffset, focusOffset;
|
int32_t anchorOffset = 0, focusOffset = 0;
|
||||||
if (mSelection->RangeCount()) {
|
if (mSelection->RangeCount()) {
|
||||||
// If there is only one selection range, the anchor/focus node and offset
|
// If there is only one selection range, the anchor/focus node and offset
|
||||||
// are the information of the range. Therefore, we have the direction
|
// are the information of the range. Therefore, we have the direction
|
||||||
|
@ -1813,7 +1813,7 @@ ContentEventHandler::OnQueryTextRectArray(WidgetQueryContentEvent* aEvent)
|
||||||
// charRect).
|
// charRect).
|
||||||
nsRect lastCharRect;
|
nsRect lastCharRect;
|
||||||
// lastFrame is base frame of lastCharRect.
|
// lastFrame is base frame of lastCharRect.
|
||||||
nsIFrame* lastFrame;
|
nsIFrame* lastFrame = nullptr;
|
||||||
while (offset < kEndOffset) {
|
while (offset < kEndOffset) {
|
||||||
nsCOMPtr<nsIContent> lastTextContent;
|
nsCOMPtr<nsIContent> lastTextContent;
|
||||||
rv = SetRangeFromFlatTextOffset(range, offset, 1, lineBreakType, true,
|
rv = SetRangeFromFlatTextOffset(range, offset, 1, lineBreakType, true,
|
||||||
|
|
|
@ -106,7 +106,7 @@ public:
|
||||||
// If there is no securityUI, document doesn't have a security state to
|
// If there is no securityUI, document doesn't have a security state to
|
||||||
// update. But we still want to set the document flags, so we don't return
|
// update. But we still want to set the document flags, so we don't return
|
||||||
// early.
|
// early.
|
||||||
nsresult stateRV;
|
nsresult stateRV = NS_ERROR_FAILURE;
|
||||||
if (securityUI) {
|
if (securityUI) {
|
||||||
stateRV = securityUI->GetState(&state);
|
stateRV = securityUI->GetState(&state);
|
||||||
}
|
}
|
||||||
|
|
|
@ -835,9 +835,9 @@ XPC_WN_Helper_Resolve(JSContext* cx, HandleObject obj, HandleId id, bool* resolv
|
||||||
XPCNativeSet* set = wrapper->GetSet();
|
XPCNativeSet* set = wrapper->GetSet();
|
||||||
XPCNativeSet* protoSet = wrapper->HasProto() ?
|
XPCNativeSet* protoSet = wrapper->HasProto() ?
|
||||||
wrapper->GetProto()->GetSet() : nullptr;
|
wrapper->GetProto()->GetSet() : nullptr;
|
||||||
XPCNativeMember* member;
|
XPCNativeMember* member = nullptr;
|
||||||
RefPtr<XPCNativeInterface> iface;
|
RefPtr<XPCNativeInterface> iface;
|
||||||
bool IsLocal;
|
bool IsLocal = false;
|
||||||
|
|
||||||
if (set->FindMember(id, &member, &iface, protoSet, &IsLocal) &&
|
if (set->FindMember(id, &member, &iface, protoSet, &IsLocal) &&
|
||||||
IsLocal) {
|
IsLocal) {
|
||||||
|
|
|
@ -2431,7 +2431,7 @@ nsTableFrame::HomogenousInsertFrames(ChildListID aListID,
|
||||||
// over... Oh, well.
|
// over... Oh, well.
|
||||||
nsIFrame* pseudoFrame = aFrameList.FirstChild();
|
nsIFrame* pseudoFrame = aFrameList.FirstChild();
|
||||||
nsIContent* parentContent = GetContent();
|
nsIContent* parentContent = GetContent();
|
||||||
nsIContent* content;
|
nsIContent* content = nullptr;
|
||||||
aPrevFrame = nullptr;
|
aPrevFrame = nullptr;
|
||||||
while (pseudoFrame && (parentContent ==
|
while (pseudoFrame && (parentContent ==
|
||||||
(content = pseudoFrame->GetContent()))) {
|
(content = pseudoFrame->GetContent()))) {
|
||||||
|
@ -2441,7 +2441,7 @@ nsTableFrame::HomogenousInsertFrames(ChildListID aListID,
|
||||||
if (MOZ_LIKELY(container)) { // XXX need this null-check, see bug 411823.
|
if (MOZ_LIKELY(container)) { // XXX need this null-check, see bug 411823.
|
||||||
int32_t newIndex = container->IndexOf(content);
|
int32_t newIndex = container->IndexOf(content);
|
||||||
nsIFrame* kidFrame;
|
nsIFrame* kidFrame;
|
||||||
nsTableColGroupFrame* lastColGroup;
|
nsTableColGroupFrame* lastColGroup = nullptr;
|
||||||
if (isColGroup) {
|
if (isColGroup) {
|
||||||
kidFrame = mColGroups.FirstChild();
|
kidFrame = mColGroups.FirstChild();
|
||||||
lastColGroup = nsTableColGroupFrame::GetLastRealColGroup(this);
|
lastColGroup = nsTableColGroupFrame::GetLastRealColGroup(this);
|
||||||
|
|
|
@ -845,7 +845,7 @@ nsTableWrapperFrame::Reflow(nsPresContext* aPresContext,
|
||||||
InnerTableFrame()->HasAnyStateBits(NS_FRAME_FIRST_REFLOW);
|
InnerTableFrame()->HasAnyStateBits(NS_FRAME_FIRST_REFLOW);
|
||||||
nsRect origCaptionRect;
|
nsRect origCaptionRect;
|
||||||
nsRect origCaptionVisualOverflow;
|
nsRect origCaptionVisualOverflow;
|
||||||
bool captionFirstReflow;
|
bool captionFirstReflow = false;
|
||||||
if (mCaptionFrames.NotEmpty()) {
|
if (mCaptionFrames.NotEmpty()) {
|
||||||
origCaptionRect = mCaptionFrames.FirstChild()->GetRect();
|
origCaptionRect = mCaptionFrames.FirstChild()->GetRect();
|
||||||
origCaptionVisualOverflow =
|
origCaptionVisualOverflow =
|
||||||
|
|
|
@ -1324,7 +1324,7 @@ nsMenuPopupFrame::SetPopupPosition(nsIFrame* aAnchorFrame, bool aIsMove, bool aS
|
||||||
nsRect anchorRect;
|
nsRect anchorRect;
|
||||||
|
|
||||||
// Width of the parent, used when aSizedToPopup is true.
|
// Width of the parent, used when aSizedToPopup is true.
|
||||||
int32_t parentWidth;
|
int32_t parentWidth = 0;
|
||||||
|
|
||||||
bool anchored = IsAnchored();
|
bool anchored = IsAnchored();
|
||||||
if (anchored || aSizedToPopup) {
|
if (anchored || aSizedToPopup) {
|
||||||
|
|
|
@ -932,7 +932,7 @@ nsSprocketLayout::AlignChildren(nsIFrame* aBox,
|
||||||
// These are only calculated if needed
|
// These are only calculated if needed
|
||||||
nsIFrame::Halignment halign;
|
nsIFrame::Halignment halign;
|
||||||
nsIFrame::Valignment valign;
|
nsIFrame::Valignment valign;
|
||||||
nscoord maxAscent;
|
nscoord maxAscent = 0;
|
||||||
bool isLTR;
|
bool isLTR;
|
||||||
|
|
||||||
if (isHorizontal) {
|
if (isHorizontal) {
|
||||||
|
@ -957,7 +957,7 @@ nsSprocketLayout::AlignChildren(nsIFrame* aBox,
|
||||||
const nscoord endAlign =
|
const nscoord endAlign =
|
||||||
clientRect.YMost() - margin.bottom - childRect.height;
|
clientRect.YMost() - margin.bottom - childRect.height;
|
||||||
|
|
||||||
nscoord y;
|
nscoord y = 0;
|
||||||
switch (valign) {
|
switch (valign) {
|
||||||
case nsBoxFrame::vAlign_Top:
|
case nsBoxFrame::vAlign_Top:
|
||||||
y = startAlign;
|
y = startAlign;
|
||||||
|
@ -986,7 +986,7 @@ nsSprocketLayout::AlignChildren(nsIFrame* aBox,
|
||||||
const nscoord rightAlign =
|
const nscoord rightAlign =
|
||||||
clientRect.XMost() - margin.right - childRect.width;
|
clientRect.XMost() - margin.right - childRect.width;
|
||||||
|
|
||||||
nscoord x;
|
nscoord x = 0;
|
||||||
switch (halign) {
|
switch (halign) {
|
||||||
case nsBoxFrame::hAlign_Left: // start
|
case nsBoxFrame::hAlign_Left: // start
|
||||||
x = isLTR ? leftAlign : rightAlign;
|
x = isLTR ? leftAlign : rightAlign;
|
||||||
|
|
|
@ -399,12 +399,12 @@ nsTextBoxFrame::DrawText(nsRenderingContext& aRenderingContext,
|
||||||
DrawTarget* drawTarget = aRenderingContext.GetDrawTarget();
|
DrawTarget* drawTarget = aRenderingContext.GetDrawTarget();
|
||||||
|
|
||||||
// paint the title
|
// paint the title
|
||||||
nscolor overColor;
|
nscolor overColor = 0;
|
||||||
nscolor underColor;
|
nscolor underColor = 0;
|
||||||
nscolor strikeColor;
|
nscolor strikeColor = 0;
|
||||||
uint8_t overStyle;
|
uint8_t overStyle = 0;
|
||||||
uint8_t underStyle;
|
uint8_t underStyle = 0;
|
||||||
uint8_t strikeStyle;
|
uint8_t strikeStyle = 0;
|
||||||
|
|
||||||
// Begin with no decorations
|
// Begin with no decorations
|
||||||
uint8_t decorations = NS_STYLE_TEXT_DECORATION_LINE_NONE;
|
uint8_t decorations = NS_STYLE_TEXT_DECORATION_LINE_NONE;
|
||||||
|
|
|
@ -93,7 +93,7 @@ TreeBoxObject::GetTreeBodyFrame(bool aFlushLayout)
|
||||||
// is true we need to make sure to flush no matter what.
|
// is true we need to make sure to flush no matter what.
|
||||||
// XXXbz except that flushing style when we were not asked to flush
|
// XXXbz except that flushing style when we were not asked to flush
|
||||||
// layout here breaks things. See bug 585123.
|
// layout here breaks things. See bug 585123.
|
||||||
nsIFrame* frame;
|
nsIFrame* frame = nullptr;
|
||||||
if (aFlushLayout) {
|
if (aFlushLayout) {
|
||||||
frame = GetFrame(aFlushLayout);
|
frame = GetFrame(aFlushLayout);
|
||||||
if (!frame)
|
if (!frame)
|
||||||
|
|
Загрузка…
Ссылка в новой задаче