diff --git a/content/base/src/nsSelection.cpp b/content/base/src/nsSelection.cpp index 144abfcdd8f4..777fc026c755 100644 --- a/content/base/src/nsSelection.cpp +++ b/content/base/src/nsSelection.cpp @@ -427,6 +427,7 @@ private: PRUint32 aContentOffset, PRUint32 aKeycode); void BidiLevelFromClick(nsIContent *aNewFocus, PRUint32 aContentOffset); +#ifdef VISUALSELECTION NS_IMETHOD VisualSelectFrames(nsIPresContext* aContext, nsIFrame* aCurrentFrame, nsPeekOffsetStruct aPos); @@ -449,6 +450,7 @@ private: nsIFrame* aCurrentFrame, PRInt32 aCurrentOffset, nsPeekOffsetStruct aPos); +#endif // VISUALSELECTION #endif // IBMBIDI //post and pop reasons for notifications. we may stack these later @@ -1738,6 +1740,7 @@ nsSelection::MoveCaret(PRUint32 aKeycode, PRBool aContinue, nsSelectionAmount aA BidiLevelFromMove(context, shell, pos.mResultContent, pos.mContentOffset, aKeycode); } } +#ifdef VISUALSELECTION // Handle visual selection if (aContinue) { @@ -1749,6 +1752,9 @@ nsSelection::MoveCaret(PRUint32 aKeycode, PRBool aContinue, nsSelectionAmount aA result = TakeFocus(pos.mResultContent, pos.mContentOffset, pos.mContentOffset, aContinue, PR_FALSE); } else +#else + } +#endif // VISUALSELECTION #endif // IBMBIDI result = TakeFocus(pos.mResultContent, pos.mContentOffset, pos.mContentOffset, aContinue, PR_FALSE); } @@ -1908,6 +1914,7 @@ nsresult FindLineContaining(nsIFrame* aFrame, nsIFrame** aBlock, PRInt32* aLine) return it->FindLineContaining(thisBlock, aLine); } +#ifdef VISUALSELECTION NS_IMETHODIMP nsSelection::VisualSequence(nsIPresContext *aPresContext, nsIFrame* aSelectFrame, @@ -2288,6 +2295,7 @@ nsSelection::VisualSelectFrames(nsIPresContext *aPresContext, NotifySelectionListeners(nsISelectionController::SELECTION_NORMAL); return NS_OK; } +#endif // VISUALSELECTION NS_IMETHODIMP nsSelection::GetPrevNextBidiLevels(nsIPresContext *aPresContext, @@ -2740,6 +2748,7 @@ nsSelection::HandleDrag(nsIPresContext *aPresContext, nsIFrame *aFrame, nsPoint& if (NS_SUCCEEDED(result)) { #ifdef IBMBIDI +#ifdef VISUALSELECTION PRBool bidiEnabled = PR_FALSE; aPresContext->GetBidiEnabled(&bidiEnabled); if (bidiEnabled) { @@ -2764,6 +2773,7 @@ nsSelection::HandleDrag(nsIPresContext *aPresContext, nsIFrame *aFrame, nsPoint& mHint = saveHint; } else +#endif // VISUALSELECTION #endif // IBMBIDI result = HandleClick(newContent, startPos, contentOffsetEnd, PR_TRUE, PR_FALSE, beginOfContent); diff --git a/layout/generic/nsSelection.cpp b/layout/generic/nsSelection.cpp index 144abfcdd8f4..777fc026c755 100644 --- a/layout/generic/nsSelection.cpp +++ b/layout/generic/nsSelection.cpp @@ -427,6 +427,7 @@ private: PRUint32 aContentOffset, PRUint32 aKeycode); void BidiLevelFromClick(nsIContent *aNewFocus, PRUint32 aContentOffset); +#ifdef VISUALSELECTION NS_IMETHOD VisualSelectFrames(nsIPresContext* aContext, nsIFrame* aCurrentFrame, nsPeekOffsetStruct aPos); @@ -449,6 +450,7 @@ private: nsIFrame* aCurrentFrame, PRInt32 aCurrentOffset, nsPeekOffsetStruct aPos); +#endif // VISUALSELECTION #endif // IBMBIDI //post and pop reasons for notifications. we may stack these later @@ -1738,6 +1740,7 @@ nsSelection::MoveCaret(PRUint32 aKeycode, PRBool aContinue, nsSelectionAmount aA BidiLevelFromMove(context, shell, pos.mResultContent, pos.mContentOffset, aKeycode); } } +#ifdef VISUALSELECTION // Handle visual selection if (aContinue) { @@ -1749,6 +1752,9 @@ nsSelection::MoveCaret(PRUint32 aKeycode, PRBool aContinue, nsSelectionAmount aA result = TakeFocus(pos.mResultContent, pos.mContentOffset, pos.mContentOffset, aContinue, PR_FALSE); } else +#else + } +#endif // VISUALSELECTION #endif // IBMBIDI result = TakeFocus(pos.mResultContent, pos.mContentOffset, pos.mContentOffset, aContinue, PR_FALSE); } @@ -1908,6 +1914,7 @@ nsresult FindLineContaining(nsIFrame* aFrame, nsIFrame** aBlock, PRInt32* aLine) return it->FindLineContaining(thisBlock, aLine); } +#ifdef VISUALSELECTION NS_IMETHODIMP nsSelection::VisualSequence(nsIPresContext *aPresContext, nsIFrame* aSelectFrame, @@ -2288,6 +2295,7 @@ nsSelection::VisualSelectFrames(nsIPresContext *aPresContext, NotifySelectionListeners(nsISelectionController::SELECTION_NORMAL); return NS_OK; } +#endif // VISUALSELECTION NS_IMETHODIMP nsSelection::GetPrevNextBidiLevels(nsIPresContext *aPresContext, @@ -2740,6 +2748,7 @@ nsSelection::HandleDrag(nsIPresContext *aPresContext, nsIFrame *aFrame, nsPoint& if (NS_SUCCEEDED(result)) { #ifdef IBMBIDI +#ifdef VISUALSELECTION PRBool bidiEnabled = PR_FALSE; aPresContext->GetBidiEnabled(&bidiEnabled); if (bidiEnabled) { @@ -2764,6 +2773,7 @@ nsSelection::HandleDrag(nsIPresContext *aPresContext, nsIFrame *aFrame, nsPoint& mHint = saveHint; } else +#endif // VISUALSELECTION #endif // IBMBIDI result = HandleClick(newContent, startPos, contentOffsetEnd, PR_TRUE, PR_FALSE, beginOfContent);