diff --git a/layout/generic/nsSelection.cpp b/layout/generic/nsSelection.cpp index d11b0b8d83c2..4e9ed8092f3d 100644 --- a/layout/generic/nsSelection.cpp +++ b/layout/generic/nsSelection.cpp @@ -3981,12 +3981,12 @@ Selection::SelectAllFramesForContent(nsIContentIterator* aInnerIter, } /** - * The idea of this helper method is to select, deselect "top to bottom" + * The idea of this helper method is to select or deselect "top to bottom", * traversing through the frames */ nsresult Selection::selectFrames(nsPresContext* aPresContext, nsRange* aRange, - bool aFlags) + bool aSelect) { if (!mFrameSelection || !aPresContext || !aPresContext->GetPresShell()) { // nothing to do @@ -4025,7 +4025,7 @@ Selection::selectFrames(nsPresContext* aPresContext, nsRange* aRange, } else { endOffset = content->Length(); } - textFrame->SetSelectedRange(startOffset, endOffset, aFlags, mType); + textFrame->SetSelectedRange(startOffset, endOffset, aSelect, mType); } } @@ -4033,7 +4033,7 @@ Selection::selectFrames(nsPresContext* aPresContext, nsRange* aRange, nsCOMPtr inneriter = NS_NewContentIterator(); for (iter->First(); !iter->IsDone(); iter->Next()) { content = do_QueryInterface(iter->GetCurrentNode()); - SelectAllFramesForContent(inneriter, content, aFlags); + SelectAllFramesForContent(inneriter, content, aSelect); } // We must now do the last one if it is not the same as the first @@ -4048,7 +4048,7 @@ Selection::selectFrames(nsPresContext* aPresContext, nsRange* aRange, // The frame could be an SVG text frame, in which case we'll ignore it. if (frame && frame->GetType() == nsGkAtoms::textFrame) { nsTextFrame* textFrame = static_cast(frame); - textFrame->SetSelectedRange(0, aRange->EndOffset(), aFlags, mType); + textFrame->SetSelectedRange(0, aRange->EndOffset(), aSelect, mType); } } }