зеркало из https://github.com/mozilla/pjs.git
work in progress
This commit is contained in:
Родитель
4c990c96b5
Коммит
7e47414af3
|
@ -649,6 +649,25 @@ nsEditor::EndTransaction()
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult nsEditor::ScrollIntoView(PRBool aScrollToBegin)
|
||||
{
|
||||
nsresult result;
|
||||
/*
|
||||
if (mPresShell)
|
||||
{
|
||||
nsCOMPtr<nsIDOMSelection> selection;
|
||||
result = mPresShell->GetSelection(getter_AddRefs(selection));
|
||||
if (NS_SUCCEEDED(result) && selection)
|
||||
{
|
||||
// get the content of the start of the selection
|
||||
// get its layout object
|
||||
// get its frame
|
||||
// scroll that frame into view
|
||||
mPresShell->
|
||||
*/
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
nsresult nsEditor::CreateNode(const nsString& aTag,
|
||||
nsIDOMNode * aParent,
|
||||
|
|
|
@ -160,6 +160,8 @@ public:
|
|||
|
||||
virtual nsresult EndTransaction();
|
||||
|
||||
virtual nsresult ScrollIntoView(PRBool aScrollToBegin);
|
||||
|
||||
/*END nsIEditor interfaces*/
|
||||
|
||||
|
||||
|
|
|
@ -370,7 +370,7 @@ nsresult nsTextEditor::ScrollIntoView(PRBool aScrollToBegin)
|
|||
nsresult result=NS_ERROR_NOT_INITIALIZED;
|
||||
if (mEditor)
|
||||
{
|
||||
result = NS_ERROR_NOT_IMPLEMENTED;
|
||||
result = mEditor->ScrollIntoView(aScrollToBegin);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
|
|
@ -649,6 +649,25 @@ nsEditor::EndTransaction()
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult nsEditor::ScrollIntoView(PRBool aScrollToBegin)
|
||||
{
|
||||
nsresult result;
|
||||
/*
|
||||
if (mPresShell)
|
||||
{
|
||||
nsCOMPtr<nsIDOMSelection> selection;
|
||||
result = mPresShell->GetSelection(getter_AddRefs(selection));
|
||||
if (NS_SUCCEEDED(result) && selection)
|
||||
{
|
||||
// get the content of the start of the selection
|
||||
// get its layout object
|
||||
// get its frame
|
||||
// scroll that frame into view
|
||||
mPresShell->
|
||||
*/
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
nsresult nsEditor::CreateNode(const nsString& aTag,
|
||||
nsIDOMNode * aParent,
|
||||
|
|
|
@ -160,6 +160,8 @@ public:
|
|||
|
||||
virtual nsresult EndTransaction();
|
||||
|
||||
virtual nsresult ScrollIntoView(PRBool aScrollToBegin);
|
||||
|
||||
/*END nsIEditor interfaces*/
|
||||
|
||||
|
||||
|
|
|
@ -264,6 +264,12 @@ public:
|
|||
*/
|
||||
virtual nsresult EndTransaction()=0;
|
||||
|
||||
/** scroll the viewport so the selection is in view.
|
||||
* @param aScrollToBegin PR_TRUE if the beginning of the selection is to be scrolled into view.
|
||||
* PR_FALSE if the end of the selection is to be scrolled into view
|
||||
*/
|
||||
virtual nsresult ScrollIntoView(PRBool aScrollToBegin)=0;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче