mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Back out patch for bug 144000 (backout patch by jst@mozilla.org, r=uriber, sr=peterv, a=beltzner)
This commit is contained in:
parent
46555abf29
commit
1a44673b56
@ -1181,8 +1181,6 @@ protected:
|
||||
ReflowCountMgr * mReflowCountMgr;
|
||||
#endif
|
||||
|
||||
nsresult CompleteMoveInner(PRBool aForward, PRBool aExtend, PRBool sScrollIntoView);
|
||||
|
||||
private:
|
||||
|
||||
PRBool InZombieDocument(nsIContent *aContent);
|
||||
@ -2898,12 +2896,7 @@ PresShell::CompleteMove(PRBool aForward, PRBool aExtend)
|
||||
{
|
||||
// Beware! This may flush notifications via synchronous
|
||||
// ScrollSelectionIntoView.
|
||||
return CompleteMoveInner(aForward, aExtend, PR_TRUE);
|
||||
}
|
||||
|
||||
nsresult
|
||||
PresShell::CompleteMoveInner(PRBool aForward, PRBool aExtend, PRBool aScrollIntoView)
|
||||
{
|
||||
nsIContent* root = mSelection->GetAncestorLimiter();
|
||||
nsIDocument* doc;
|
||||
if (root && (doc = root->GetOwnerDoc()) && doc->GetRootContent() != root) {
|
||||
@ -2934,16 +2927,12 @@ PresShell::CompleteMoveInner(PRBool aForward, PRBool aExtend, PRBool aScrollInto
|
||||
// HandleClick resets ancestorLimiter, so set it again.
|
||||
mSelection->SetAncestorLimiter(root);
|
||||
|
||||
if (aScrollIntoView) {
|
||||
// After ScrollSelectionIntoView(), the pending notifications might be
|
||||
// flushed and PresShell/PresContext/Frames may be dead. See bug 418470.
|
||||
return
|
||||
ScrollSelectionIntoView(nsISelectionController::SELECTION_NORMAL,
|
||||
nsISelectionController::SELECTION_FOCUS_REGION,
|
||||
PR_TRUE);
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
// After ScrollSelectionIntoView(), the pending notifications might be
|
||||
// flushed and PresShell/PresContext/Frames may be dead. See bug 418470.
|
||||
return
|
||||
ScrollSelectionIntoView(nsISelectionController::SELECTION_NORMAL,
|
||||
nsISelectionController::SELECTION_FOCUS_REGION,
|
||||
PR_TRUE);
|
||||
}
|
||||
|
||||
nsIScrollableView *scrollableView;
|
||||
@ -2980,15 +2969,11 @@ PresShell::CompleteMoveInner(PRBool aForward, PRBool aExtend, PRBool aScrollInto
|
||||
|
||||
mSelection->HandleClick(pos.mResultContent ,pos.mContentOffset ,pos.mContentOffset/*End*/ ,aExtend, PR_FALSE, aForward);
|
||||
|
||||
if (aScrollIntoView) {
|
||||
// After ScrollSelectionIntoView(), the pending notifications might be
|
||||
// flushed and PresShell/PresContext/Frames may be dead. See bug 418470.
|
||||
result = ScrollSelectionIntoView(nsISelectionController::SELECTION_NORMAL,
|
||||
nsISelectionController::SELECTION_FOCUS_REGION, PR_TRUE);
|
||||
if (NS_FAILED(result))
|
||||
return result;
|
||||
}
|
||||
return NS_OK;
|
||||
// After ScrollSelectionIntoView(), the pending notifications might be
|
||||
// flushed and PresShell/PresContext/Frames may be dead. See bug 418470.
|
||||
return ScrollSelectionIntoView(nsISelectionController::SELECTION_NORMAL,
|
||||
nsISelectionController::SELECTION_FOCUS_REGION,
|
||||
PR_TRUE);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
@ -4356,18 +4341,6 @@ PresShell::UnsuppressAndInvalidate()
|
||||
|
||||
if (mViewManager)
|
||||
mViewManager->SynthesizeMouseMove(PR_FALSE);
|
||||
|
||||
// If there is no selection, create a collapsed selection at the top of the document.
|
||||
if (mSelection) {
|
||||
nsISelection* domSelection = mSelection->
|
||||
GetSelection(nsISelectionController::SELECTION_NORMAL);
|
||||
if (domSelection) {
|
||||
PRInt32 rangeCount;
|
||||
domSelection->GetRangeCount(&rangeCount);
|
||||
if (rangeCount == 0)
|
||||
CompleteMoveInner(PR_FALSE, PR_FALSE, PR_FALSE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
|
Loading…
Reference in New Issue
Block a user