diff --git a/mozilla/content/xul/document/src/nsXULDocument.cpp b/mozilla/content/xul/document/src/nsXULDocument.cpp index 28c2a82405c..33e7f04f18c 100644 --- a/mozilla/content/xul/document/src/nsXULDocument.cpp +++ b/mozilla/content/xul/document/src/nsXULDocument.cpp @@ -1748,7 +1748,7 @@ nsXULDocument::SelectAll() startPnt->SetPoint(start, -1, PR_TRUE); endPnt->SetPoint(end, -1, PR_FALSE); #endif - SetDisplaySelection(nsIDocument::SELECTION_ON); + SetDisplaySelection(nsISelectionController::SELECTION_ON); return NS_OK; } diff --git a/mozilla/rdf/content/src/nsXULDocument.cpp b/mozilla/rdf/content/src/nsXULDocument.cpp index 28c2a82405c..33e7f04f18c 100644 --- a/mozilla/rdf/content/src/nsXULDocument.cpp +++ b/mozilla/rdf/content/src/nsXULDocument.cpp @@ -1748,7 +1748,7 @@ nsXULDocument::SelectAll() startPnt->SetPoint(start, -1, PR_TRUE); endPnt->SetPoint(end, -1, PR_FALSE); #endif - SetDisplaySelection(nsIDocument::SELECTION_ON); + SetDisplaySelection(nsISelectionController::SELECTION_ON); return NS_OK; } diff --git a/mozilla/webshell/tests/viewer/nsBrowserWindow.cpp b/mozilla/webshell/tests/viewer/nsBrowserWindow.cpp index a3727cea87c..75e53d05f47 100644 --- a/mozilla/webshell/tests/viewer/nsBrowserWindow.cpp +++ b/mozilla/webshell/tests/viewer/nsBrowserWindow.cpp @@ -3352,11 +3352,12 @@ nsBrowserWindow::DoToggleSelection() { nsIPresShell* shell = GetPresShell(); if (nsnull != shell) { - nsCOMPtr doc; - shell->GetDocument(getter_AddRefs(doc)); - if (doc) { - PRInt8 current = doc->GetDisplaySelection(); - doc->SetDisplaySelection(!current); + nsCOMPtr selCon; + selCon = do_QueryInterface(shell); + if (selCon) { + PRInt16 current; + selCon->GetDisplaySelection(¤t); + selCon->SetDisplaySelection(!current); ForceRefresh(); } NS_RELEASE(shell); diff --git a/mozilla/webshell/tests/viewer/nsEditorMode.cpp b/mozilla/webshell/tests/viewer/nsEditorMode.cpp index 034188fa8ba..f0c498bff17 100644 --- a/mozilla/webshell/tests/viewer/nsEditorMode.cpp +++ b/mozilla/webshell/tests/viewer/nsEditorMode.cpp @@ -37,6 +37,8 @@ #include "nsIComponentManager.h" #include "nsIServiceManager.h" #include "resources.h" +#include "nsISelectionController.h" +#include "nsIPresShell.h" static nsIEditor *gEditor; @@ -81,8 +83,9 @@ nsresult NS_InitEditorMode(nsIDOMDocument *aDOMDocument, nsIPresShell* aPresShel if (!gEditor) { return NS_ERROR_OUT_OF_MEMORY; } - - result = gEditor->Init(aDOMDocument, aPresShell, 0); + nsCOMPtr selCon; + selCon = do_QueryInterface(aPresShell); + result = gEditor->Init(aDOMDocument, aPresShell, selCon, 0); if (NS_SUCCEEDED(result)) result = gEditor->PostCreate(); return result;