Bug 451252 - "Highlight All" find selection not visible in elements that have -moz-user-select: none set; r+sr=roc
authorGraeme McCutcheon <graememcc_firefox@graeme-online.co.uk>
Sun, 07 Sep 2008 16:12:50 +0200
changeset 18931 6cbd63d2a897c4319ca54f6dff31613e77cd0064
parent 18930 a81c47c501a8f2ab66924d519ff163ac6f78687c
child 18932 8fd8740ce2b0d5d4468cf727fe72b96c29acb760
push id1836
push usersgautherie.bz@free.fr
push dateSun, 07 Sep 2008 14:13:39 +0000
treeherdermozilla-central@6cbd63d2a897 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs451252
milestone1.9.1b1pre
Bug 451252 - "Highlight All" find selection not visible in elements that have -moz-user-select: none set; r+sr=roc
layout/generic/nsFirstLetterFrame.cpp
layout/generic/nsFirstLetterFrame.h
layout/generic/nsFrame.cpp
layout/generic/nsFrame.h
layout/generic/nsIFrame.h
layout/generic/nsSelection.cpp
layout/generic/nsTextFrame.h
layout/generic/nsTextFrameThebes.cpp
layout/svg/base/src/nsSVGGlyphFrame.cpp
layout/svg/base/src/nsSVGGlyphFrame.h
layout/tables/nsTableCellFrame.cpp
layout/tables/nsTableCellFrame.h
layout/tables/nsTableFrame.cpp
layout/tables/nsTableFrame.h
layout/tables/nsTableOuterFrame.cpp
layout/tables/nsTableOuterFrame.h
--- a/layout/generic/nsFirstLetterFrame.cpp
+++ b/layout/generic/nsFirstLetterFrame.cpp
@@ -106,24 +106,24 @@ nsFirstLetterFrame::SetInitialChildList(
   for (nsIFrame* frame = aChildList; frame; frame = frame->GetNextSibling()) {
     NS_ASSERTION(frame->GetParent() == this, "Unexpected parent");
     frameManager->ReParentStyleContext(frame);
   }
   return NS_OK;
 }
 
 NS_IMETHODIMP
-nsFirstLetterFrame::SetSelected(nsPresContext* aPresContext, nsIDOMRange *aRange,PRBool aSelected, nsSpread aSpread)
+nsFirstLetterFrame::SetSelected(nsPresContext* aPresContext, nsIDOMRange *aRange,PRBool aSelected, nsSpread aSpread, SelectionType aType)
 {
   if (aSelected && ParentDisablesSelection())
     return NS_OK;
   nsIFrame *child = GetFirstChild(nsnull);
   while (child)
   {
-    child->SetSelected(aPresContext, aRange, aSelected, aSpread);
+    child->SetSelected(aPresContext, aRange, aSelected, aSpread, aType);
     // don't worry about result. there are more frames to come
     child = child->GetNextSibling();
   }
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsFirstLetterFrame::GetChildFrameContainingOffset(PRInt32 inContentOffset,
--- a/layout/generic/nsFirstLetterFrame.h
+++ b/layout/generic/nsFirstLetterFrame.h
@@ -78,17 +78,17 @@ public:
                              PRBool aShrinkWrap);
   NS_IMETHOD Reflow(nsPresContext*          aPresContext,
                     nsHTMLReflowMetrics&     aDesiredSize,
                     const nsHTMLReflowState& aReflowState,
                     nsReflowStatus&          aStatus);
 
   virtual PRBool CanContinueTextRun() const;
 
-  NS_IMETHOD SetSelected(nsPresContext* aPresContext, nsIDOMRange *aRange,PRBool aSelected, nsSpread aSpread);
+  NS_IMETHOD SetSelected(nsPresContext* aPresContext, nsIDOMRange *aRange,PRBool aSelected, nsSpread aSpread, SelectionType aType);
 
 //override of nsFrame method
   NS_IMETHOD GetChildFrameContainingOffset(PRInt32 inContentOffset,
                                            PRBool inHint,
                                            PRInt32* outFrameContentOffset,
                                            nsIFrame **outChildFrame);
 
   nscoord GetFirstLetterBaseline() const { return mBaseline; }
--- a/layout/generic/nsFrame.cpp
+++ b/layout/generic/nsFrame.cpp
@@ -4143,28 +4143,30 @@ nsFrame::VerifyTree() const
   NS_ASSERTION(0 == (mState & NS_FRAME_IN_REFLOW), "frame is in reflow");
   return NS_OK;
 }
 #endif
 
 /*this method may.. invalidate if the state was changed or if aForceRedraw is PR_TRUE
   it will not update immediately.*/
 NS_IMETHODIMP
-nsFrame::SetSelected(nsPresContext* aPresContext, nsIDOMRange *aRange, PRBool aSelected, nsSpread aSpread)
+nsFrame::SetSelected(nsPresContext* aPresContext, nsIDOMRange *aRange, PRBool aSelected, nsSpread aSpread, SelectionType aType)
 {
 /*
   if (aSelected && ParentDisablesSelection())
     return NS_OK;
 */
 
-  // check whether style allows selection
-  PRBool  selectable;
-  IsSelectable(&selectable, nsnull);
-  if (!selectable)
-    return NS_OK;
+  if (aType == nsISelectionController::SELECTION_NORMAL) {
+    // check whether style allows selection
+    PRBool  selectable;
+    IsSelectable(&selectable, nsnull);
+    if (!selectable)
+      return NS_OK;
+  }
 
 /*
   if (eSpreadDown == aSpread){
     nsIFrame* kid = GetFirstChild(nsnull);
     while (nsnull != kid) {
       kid->SetSelected(nsnull,aSelected,aSpread);
       kid = kid->GetNextSibling();
     }
@@ -4181,17 +4183,17 @@ nsFrame::SetSelected(nsPresContext* aPre
 
 #ifdef IBMBIDI
   PRInt32 start, end;
   nsIFrame* frame = GetNextSibling();
   if (frame) {
     GetFirstLeaf(aPresContext, &frame);
     GetOffsets(start, end);
     if (start && end) {
-      frame->SetSelected(aPresContext, aRange, aSelected, aSpread);
+      frame->SetSelected(aPresContext, aRange, aSelected, aSpread, aType);
     }
   }
 #endif // IBMBIDI
 
   return NS_OK;
 }
 
 NS_IMETHODIMP
--- a/layout/generic/nsFrame.h
+++ b/layout/generic/nsFrame.h
@@ -233,17 +233,17 @@ public:
 #ifdef NS_DEBUG
   NS_IMETHOD  List(FILE* out, PRInt32 aIndent) const;
   NS_IMETHOD  GetFrameName(nsAString& aResult) const;
   NS_IMETHOD_(nsFrameState) GetDebugStateBits() const;
   NS_IMETHOD  DumpRegressionData(nsPresContext* aPresContext, FILE* out, PRInt32 aIndent, PRBool aIncludeStyleData);
   NS_IMETHOD  VerifyTree() const;
 #endif
 
-  NS_IMETHOD  SetSelected(nsPresContext* aPresContext, nsIDOMRange *aRange,PRBool aSelected, nsSpread aSpread);
+  NS_IMETHOD  SetSelected(nsPresContext* aPresContext, nsIDOMRange *aRange,PRBool aSelected, nsSpread aSpread, SelectionType aType);
   NS_IMETHOD  GetSelected(PRBool *aSelected) const;
   NS_IMETHOD  IsSelectable(PRBool* aIsSelectable, PRUint8* aSelectStyle) const;
 
   NS_IMETHOD  GetSelectionController(nsPresContext *aPresContext, nsISelectionController **aSelCon);
 
   virtual PRBool PeekOffsetNoAmount(PRBool aForward, PRInt32* aOffset);
   virtual PRBool PeekOffsetCharacter(PRBool aForward, PRInt32* aOffset);
   virtual PRBool PeekOffsetWord(PRBool aForward, PRBool aWordSelectEatSpace, PRBool aIsKeyboardSelect,
--- a/layout/generic/nsIFrame.h
+++ b/layout/generic/nsIFrame.h
@@ -1719,21 +1719,23 @@ public:
    */
   /** 
    *  Called to set the selection of the frame based on frame offsets.  you can FORCE the frame
    *  to redraw event if aSelected == the frame selection with the last parameter.
    *  data in struct may be changed when passed in.
    *  @param aRange is the range that will dictate if the frames need to be redrawn null means the whole content needs to be redrawn
    *  @param aSelected is it selected?
    *  @param aSpread should it spread the selection to flow elements around it? or go down to its children?
+   *  @param aType the selection type of the selection that you are setting on the frame
    */
   NS_IMETHOD  SetSelected(nsPresContext* aPresContext,
                           nsIDOMRange*    aRange,
                           PRBool          aSelected,
-                          nsSpread        aSpread) = 0;
+                          nsSpread        aSpread,
+                          SelectionType   aType) = 0;
 
   NS_IMETHOD  GetSelected(PRBool *aSelected) const = 0;
 
   /**
    *  called to discover where this frame, or a parent frame has user-select style
    *  applied, which affects that way that it is selected.
    *    
    *  @param aIsSelectable out param. Set to true if the frame can be selected
--- a/layout/generic/nsSelection.cpp
+++ b/layout/generic/nsSelection.cpp
@@ -5054,17 +5054,17 @@ nsTypedSelection::selectFrames(nsPresCon
   nsIFrame *frame;
   if (NS_SUCCEEDED(result))
   {
     // First select frame of content passed in
     frame = mFrameSelection->GetShell()->GetPrimaryFrameFor(aContent);
     if (frame)
     {
       //NOTE: eSpreadDown is now IGNORED. Selected state is set only for given frame
-      frame->SetSelected(aPresContext, nsnull, aFlags, eSpreadDown);
+      frame->SetSelected(aPresContext, nsnull, aFlags, eSpreadDown, mType);
 #ifndef OLD_TABLE_SELECTION
       if (mFrameSelection->GetTableCellSelection())
       {
         nsITableCellLayout *tcl = nsnull;
         CallQueryInterface(frame, &tcl);
         if (tcl)
         {
           return NS_OK;
@@ -5079,29 +5079,29 @@ nsTypedSelection::selectFrames(nsPresCon
 
       frame = mFrameSelection->GetShell()->GetPrimaryFrameFor(innercontent);
       if (frame)
       {
         //NOTE: eSpreadDown is now IGNORED. Selected state is set only
         //for given frame
 
         //spread from here to hit all frames in flow
-        frame->SetSelected(aPresContext, nsnull,aFlags,eSpreadDown);
+        frame->SetSelected(aPresContext, nsnull, aFlags, eSpreadDown, mType);
         nsRect frameRect = frame->GetRect();
 
         //if a rect is 0 height/width then try to notify next
         //available in flow of selection status.
         while (!frameRect.width || !frameRect.height)
         {
           //try to notify next in flow that its content is selected.
           frame = frame->GetNextInFlow();
           if (frame)
           {
             frameRect = frame->GetRect();
-            frame->SetSelected(aPresContext, nsnull,aFlags,eSpreadDown);
+            frame->SetSelected(aPresContext, nsnull, aFlags, eSpreadDown, mType);
           }
           else
             break;
         }
         //if the frame is splittable and this frame is 0,0 then set
         //the next in flow frame to be selected also
       }
 
@@ -5157,17 +5157,17 @@ nsTypedSelection::selectFrames(nsPresCon
     content = do_QueryInterface(FetchStartParent(aRange), &result);
     if (NS_FAILED(result) || !content)
       return result;
 
     if (!content->IsNodeOfType(nsINode::eELEMENT))
     {
       frame = mFrameSelection->GetShell()->GetPrimaryFrameFor(content);
       if (frame)
-        frame->SetSelected(aPresContext, aRange,aFlags,eSpreadDown);//spread from here to hit all frames in flow
+        frame->SetSelected(aPresContext, aRange, aFlags, eSpreadDown, mType);//spread from here to hit all frames in flow
     }
 //end start content
     iter->First();
 
     while (!iter->IsDone())
     {
       content = iter->GetCurrentNode();
 
@@ -5181,17 +5181,17 @@ nsTypedSelection::selectFrames(nsPresCon
       content = do_QueryInterface(FetchEndParent(aRange), &result);
       if (NS_FAILED(result) || !content)
         return result;
 
       if (!content->IsNodeOfType(nsINode::eELEMENT))
       {
         frame = mFrameSelection->GetShell()->GetPrimaryFrameFor(content);
         if (frame)
-           frame->SetSelected(aPresContext, aRange,aFlags,eSpreadDown);//spread from here to hit all frames in flow
+           frame->SetSelected(aPresContext, aRange, aFlags, eSpreadDown, mType);//spread from here to hit all frames in flow
       }
     }
 //end end parent
   }
   return result;
 }
 
 // nsTypedSelection::LookUpSelection
--- a/layout/generic/nsTextFrame.h
+++ b/layout/generic/nsTextFrame.h
@@ -148,17 +148,18 @@ public:
   NS_IMETHOD_(nsFrameState) GetDebugStateBits() const ;
 #endif
   
   virtual ContentOffsets CalcContentOffsetsFromFramePoint(nsPoint aPoint);
    
   NS_IMETHOD SetSelected(nsPresContext* aPresContext,
                          nsIDOMRange *aRange,
                          PRBool aSelected,
-                         nsSpread aSpread);
+                         nsSpread aSpread,
+                         SelectionType aType);
   
   virtual PRBool PeekOffsetNoAmount(PRBool aForward, PRInt32* aOffset);
   virtual PRBool PeekOffsetCharacter(PRBool aForward, PRInt32* aOffset);
   virtual PRBool PeekOffsetWord(PRBool aForward, PRBool aWordSelectEatSpace, PRBool aIsKeyboardSelect,
                                 PRInt32* aOffset, PeekWordState* aState);
 
   NS_IMETHOD CheckVisibility(nsPresContext* aContext, PRInt32 aStartIndex, PRInt32 aEndIndex, PRBool aRecurse, PRBool *aFinished, PRBool *_retval);
   
--- a/layout/generic/nsTextFrameThebes.cpp
+++ b/layout/generic/nsTextFrameThebes.cpp
@@ -4607,32 +4607,35 @@ nsTextFrame::HasSelectionOverflowingDeco
   return retval;
 }
 
 //null range means the whole thing
 NS_IMETHODIMP
 nsTextFrame::SetSelected(nsPresContext* aPresContext,
                          nsIDOMRange *aRange,
                          PRBool aSelected,
-                         nsSpread aSpread)
+                         nsSpread aSpread,
+                         SelectionType aType)
 {
   DEBUG_VERIFY_NOT_DIRTY(mState);
 #if 0 //XXXrbs disable due to bug 310318
   if (mState & NS_FRAME_IS_DIRTY)
     return NS_ERROR_UNEXPECTED;
 #endif
 
   if (aSelected && ParentDisablesSelection())
     return NS_OK;
 
-  // check whether style allows selection
-  PRBool selectable;
-  IsSelectable(&selectable, nsnull);
-  if (!selectable)
-    return NS_OK;//do not continue no selection for this frame.
+  if (aType == nsISelectionController::SELECTION_NORMAL) {
+    // check whether style allows selection
+    PRBool selectable;
+    IsSelectable(&selectable, nsnull);
+    if (!selectable)
+      return NS_OK;//do not continue no selection for this frame.
+  }
 
   PRBool found = PR_FALSE;
   if (aRange) {
     //lets see if the range contains us, if so we must redraw!
     nsCOMPtr<nsIDOMNode> endNode;
     PRInt32 endOffset;
     nsCOMPtr<nsIDOMNode> startNode;
     PRInt32 startOffset;
@@ -4702,22 +4705,22 @@ nsTextFrame::SetSelected(nsPresContext* 
     }
     // Selection might change anything. Invalidate the overflow area.
     Invalidate(GetOverflowRect(), PR_FALSE);
   }
   if (aSpread == eSpreadDown)
   {
     nsIFrame* frame = GetPrevContinuation();
     while(frame){
-      frame->SetSelected(aPresContext, aRange,aSelected,eSpreadNone);
+      frame->SetSelected(aPresContext, aRange,aSelected,eSpreadNone, aType);
       frame = frame->GetPrevContinuation();
     }
     frame = GetNextContinuation();
     while (frame){
-      frame->SetSelected(aPresContext, aRange,aSelected,eSpreadNone);
+      frame->SetSelected(aPresContext, aRange,aSelected,eSpreadNone, aType);
       frame = frame->GetNextContinuation();
     }
   }
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsTextFrame::GetPointFromOffset(PRInt32 inOffset,
--- a/layout/svg/base/src/nsSVGGlyphFrame.cpp
+++ b/layout/svg/base/src/nsSVGGlyphFrame.cpp
@@ -237,29 +237,32 @@ nsSVGGlyphFrame::DidSetStyleContext()
 
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsSVGGlyphFrame::SetSelected(nsPresContext* aPresContext,
                              nsIDOMRange*    aRange,
                              PRBool          aSelected,
-                             nsSpread        aSpread)
+                             nsSpread        aSpread,
+                             SelectionType   aType)
 {
 #if defined(DEBUG) && defined(SVG_DEBUG_SELECTION)
   printf("nsSVGGlyphFrame(%p)::SetSelected()\n", this);
 #endif
-//  return nsSVGGlyphFrameBase::SetSelected(aPresContext, aRange, aSelected, aSpread);
+//  return nsSVGGlyphFrameBase::SetSelected(aPresContext, aRange, aSelected, aSpread, aType);
 
-  // check whether style allows selection
-  PRBool  selectable;
-  IsSelectable(&selectable, nsnull);
-  if (!selectable)
-    return NS_OK;
-  
+  if (aType == nsISelectionController::SELECTION_NORMAL) {
+    // check whether style allows selection
+    PRBool  selectable;
+    IsSelectable(&selectable, nsnull);
+    if (!selectable)
+      return NS_OK;
+  }
+
   if ( aSelected ){
     mState |=  NS_FRAME_SELECTED_CONTENT;
   }
   else
     mState &= ~NS_FRAME_SELECTED_CONTENT;
 
   nsSVGUtils::UpdateGraphic(this);
 
--- a/layout/svg/base/src/nsSVGGlyphFrame.h
+++ b/layout/svg/base/src/nsSVGGlyphFrame.h
@@ -81,17 +81,18 @@ public:
                                    nsIContent*     aChild,
                                    PRBool          aAppend);
 
   NS_IMETHOD  DidSetStyleContext();
 
   NS_IMETHOD  SetSelected(nsPresContext* aPresContext,
                           nsIDOMRange*    aRange,
                           PRBool          aSelected,
-                          nsSpread        aSpread);
+                          nsSpread        aSpread,
+                          SelectionType   aType);
   NS_IMETHOD  GetSelected(PRBool *aSelected) const;
   NS_IMETHOD  IsSelectable(PRBool* aIsSelectable, PRUint8* aSelectStyle) const;
 
   /**
    * Get the "type" of the frame
    *
    * @see nsGkAtoms::svgGlyphFrame
    */
--- a/layout/tables/nsTableCellFrame.cpp
+++ b/layout/tables/nsTableCellFrame.cpp
@@ -488,33 +488,34 @@ nsTableCellFrame::BuildDisplayList(nsDis
   return OverflowClip(aBuilder, set, aLists, clip + aBuilder->ToReferenceFrame(this));
 }
 
 //null range means the whole thing
 NS_IMETHODIMP
 nsTableCellFrame::SetSelected(nsPresContext* aPresContext,
                               nsIDOMRange*    aRange,
                               PRBool          aSelected,
-                              nsSpread        aSpread)
+                              nsSpread        aSpread,
+                              SelectionType   aType)
 {
   //traverse through children unselect tables
 #if 0
   if ((aSpread == eSpreadDown)){
     nsIFrame* kid = GetFirstChild(nsnull);
     while (nsnull != kid) {
       kid->SetSelected(nsnull, aSelected, eSpreadDown);
       kid = kid->GetNextSibling();
     }
   }
   //return nsFrame::SetSelected(aRange,aSelected,eSpreadNone);
 #endif
   // Must call base class to set mSelected state and trigger repaint of frame
   // Note that in current version, aRange and aSpread are ignored,
   //   only this frame is considered
-  nsFrame::SetSelected(aPresContext, aRange, aSelected, aSpread);
+  nsFrame::SetSelected(aPresContext, aRange, aSelected, aSpread, aType);
 
   nsCOMPtr<nsFrameSelection> frameSelection =
     aPresContext->PresShell()->FrameSelection();
   if (frameSelection->GetTableCellSelection()) {
     // Selection can affect content, border and outline
     Invalidate(GetOverflowRect(), PR_FALSE);
   }
   return NS_OK;
--- a/layout/tables/nsTableCellFrame.h
+++ b/layout/tables/nsTableCellFrame.h
@@ -125,17 +125,18 @@ public:
                               const nsDisplayListSet& aLists);
                               
   void PaintCellBackground(nsIRenderingContext& aRenderingContext,
                            const nsRect& aDirtyRect, nsPoint aPt);
 
   NS_IMETHOD SetSelected(nsPresContext* aPresContext,
                          nsIDOMRange *aRange,
                          PRBool aSelected,
-                         nsSpread aSpread);
+                         nsSpread aSpread,
+                         SelectionType aType);
 
   virtual nscoord GetMinWidth(nsIRenderingContext *aRenderingContext);
   virtual nscoord GetPrefWidth(nsIRenderingContext *aRenderingContext);
   virtual IntrinsicWidthOffsetData
     IntrinsicWidthOffsets(nsIRenderingContext* aRenderingContext);
 
   NS_IMETHOD Reflow(nsPresContext*      aPresContext,
                     nsHTMLReflowMetrics& aDesiredSize,
--- a/layout/tables/nsTableFrame.cpp
+++ b/layout/tables/nsTableFrame.cpp
@@ -1478,33 +1478,34 @@ nsTableFrame::PaintTableBorderBackground
   }
 }
 
 //null range means the whole thing
 NS_IMETHODIMP
 nsTableFrame::SetSelected(nsPresContext* aPresContext,
                           nsIDOMRange *aRange,
                           PRBool aSelected,
-                          nsSpread aSpread)
+                          nsSpread aSpread,
+                          SelectionType aType)
 {
 #if 0
   //traverse through children unselect tables
   if ((aSpread == eSpreadDown)){
     nsIFrame* kid = GetFirstChild(nsnull);
     while (kid) {
       kid->SetSelected(nsnull, aSelected, eSpreadDown);
       kid = kid->GetNextSibling();
     }
   }
 #endif
   // Must call base class to set mSelected state and trigger repaint of frame
   // Note that in current version, aRange and aSpread are ignored,
   //   only this frame is considered
-  nsFrame::SetSelected(aPresContext, aRange, aSelected, aSpread);
-  return NS_OK;//return nsFrame::SetSelected(aRange,aSelected,eSpreadNone);
+  nsFrame::SetSelected(aPresContext, aRange, aSelected, aSpread, aType);
+  return NS_OK;//return nsFrame::SetSelected(aRange,aSelected,eSpreadNone, aType);
   
 }
 
 PRBool nsTableFrame::ParentDisablesSelection() const //override default behavior
 {
   PRBool returnval;
   if (NS_FAILED(GetSelected(&returnval)))
     return PR_FALSE;
--- a/layout/tables/nsTableFrame.h
+++ b/layout/tables/nsTableFrame.h
@@ -310,17 +310,18 @@ public:
   void PaintBCBorders(nsIRenderingContext& aRenderingContext,
                       const nsRect&        aDirtyRect);
 
   /** nsIFrame method overridden to handle table specifics
   */
   NS_IMETHOD SetSelected(nsPresContext* aPresContext,
                          nsIDOMRange *aRange,
                          PRBool aSelected,
-                         nsSpread aSpread);
+                         nsSpread aSpread,
+                         SelectionType aType);
 
   virtual void MarkIntrinsicWidthsDirty();
   // For border-collapse tables, the caller must not add padding and
   // border to the results of these functions.
   virtual nscoord GetMinWidth(nsIRenderingContext *aRenderingContext);
   virtual nscoord GetPrefWidth(nsIRenderingContext *aRenderingContext);
   virtual IntrinsicWidthOffsetData
     IntrinsicWidthOffsets(nsIRenderingContext* aRenderingContext);
--- a/layout/tables/nsTableOuterFrame.cpp
+++ b/layout/tables/nsTableOuterFrame.cpp
@@ -403,21 +403,22 @@ nsTableOuterFrame::BuildDisplayListForIn
     kid = kid->GetNextSibling();
   }
   return NS_OK;
 }
 
 NS_IMETHODIMP nsTableOuterFrame::SetSelected(nsPresContext* aPresContext,
                                              nsIDOMRange *aRange,
                                              PRBool aSelected,
-                                             nsSpread aSpread)
+                                             nsSpread aSpread,
+                                             SelectionType aType)
 {
-  nsresult result = nsFrame::SetSelected(aPresContext, aRange,aSelected, aSpread);
+  nsresult result = nsFrame::SetSelected(aPresContext, aRange,aSelected, aSpread, aType);
   if (NS_SUCCEEDED(result) && mInnerTableFrame)
-    return mInnerTableFrame->SetSelected(aPresContext, aRange,aSelected, aSpread);
+    return mInnerTableFrame->SetSelected(aPresContext, aRange,aSelected, aSpread, aType);
   return result;
 }
 
 NS_IMETHODIMP 
 nsTableOuterFrame::GetParentStyleContextFrame(nsPresContext* aPresContext,
                                               nsIFrame**      aProviderFrame,
                                               PRBool*         aIsChild)
 {
--- a/layout/tables/nsTableOuterFrame.h
+++ b/layout/tables/nsTableOuterFrame.h
@@ -170,17 +170,18 @@ public:
   NS_IMETHOD GetFrameName(nsAString& aResult) const;
 #endif
 
   /** SetSelected needs to be overridden to talk to inner tableframe
    */
   NS_IMETHOD SetSelected(nsPresContext* aPresContext,
                          nsIDOMRange *aRange,
                          PRBool aSelected,
-                         nsSpread aSpread);
+                         nsSpread aSpread,
+                         SelectionType aType);
 
   NS_IMETHOD GetParentStyleContextFrame(nsPresContext* aPresContext,
                                         nsIFrame**      aProviderFrame,
                                         PRBool*         aIsChild);
 
   /*---------------- nsITableLayout methods ------------------------*/
 
   /** @see nsITableFrame::GetCellDataAt */