mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-12 21:05:36 +00:00
Back out bidi visual selection. Bug 76190, r=mjudge, sr=kin, a=asa.
This commit is contained in:
parent
007ef76f6d
commit
244a1b0f8d
@ -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);
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user