fix for 42188,42347 r=akkana . use selection controller to tell the doc if it should display non-text-selection.

This commit is contained in:
mjudge%netscape.com 2000-06-23 04:01:19 +00:00
Родитель 4c93ab28d6
Коммит b1d39dcd30
5 изменённых файлов: 43 добавлений и 2 удалений

Просмотреть файл

@ -66,6 +66,18 @@ interface nsISelectionController : nsISupports
*/
short getDisplaySelection();
/**
* SetDisplayNonTextSelection used to set whether you want to see HRULES/IMAGES with border.
* also used to tell if the presshell is an editor right now. this should change
*/
void setDisplayNonTextSelection(in boolean toggle);
/**
* GetDisplayNonTextSelection used to get whether you want to see HRULES/IMAGES with border.
* also used to tell if the presshell is an editor right now. this should change
*/
boolean getDisplayNonTextSelection();
/**
* GetSelection will return the selection that the presentation
* shell may implement.

Просмотреть файл

@ -66,6 +66,18 @@ interface nsISelectionController : nsISupports
*/
short getDisplaySelection();
/**
* SetDisplayNonTextSelection used to set whether you want to see HRULES/IMAGES with border.
* also used to tell if the presshell is an editor right now. this should change
*/
void setDisplayNonTextSelection(in boolean toggle);
/**
* GetDisplayNonTextSelection used to get whether you want to see HRULES/IMAGES with border.
* also used to tell if the presshell is an editor right now. this should change
*/
boolean getDisplayNonTextSelection();
/**
* GetSelection will return the selection that the presentation
* shell may implement.

Просмотреть файл

@ -267,6 +267,8 @@ public:
//NSISELECTIONCONTROLLER INTERFACES
NS_IMETHOD SetDisplaySelection(PRInt16 toggle);
NS_IMETHOD GetDisplaySelection(PRInt16 *_retval);
NS_IMETHOD SetDisplayNonTextSelection(PRBool toggle);
NS_IMETHOD GetDisplayNonTextSelection(PRBool *_retval);
NS_IMETHOD GetSelection(PRInt16 type, nsIDOMSelection **_retval);
NS_IMETHOD ScrollSelectionIntoView(PRInt16 type, PRInt16 region);
NS_IMETHOD RepaintSelection(PRInt16 type);
@ -355,6 +357,18 @@ nsTextInputSelectionImpl::GetDisplaySelection(PRInt16 *aToggle)
return NS_ERROR_NULL_POINTER;
}
NS_IMETHODIMP
nsTextInputSelectionImpl::SetDisplayNonTextSelection(PRBool aToggle)
{
return NS_OK;//stub this out. not used in input
}
NS_IMETHODIMP
nsTextInputSelectionImpl::GetDisplayNonTextSelection(PRBool *aToggle)
{
return NS_OK;//stub this out. not used in input
}
NS_IMETHODIMP
nsTextInputSelectionImpl::GetSelection(PRInt16 type, nsIDOMSelection **_retval)
{
@ -915,6 +929,7 @@ nsGfxTextControlFrame2::ReflowStandard(nsIPresContext* aPresContext,
}
PRInt32
nsGfxTextControlFrame2::CalculateSizeStandard (nsIPresContext* aPresContext,
nsIRenderingContext* aRendContext,
@ -1413,6 +1428,8 @@ nsGfxTextControlFrame2::GetPrefSize(nsBoxLayoutState& aState, nsSize& aSize)
return NS_OK;
}
NS_IMETHODIMP
nsGfxTextControlFrame2::GetMinSize(nsBoxLayoutState& aState, nsSize& aSize)
{