bug 15982 r=cmanske. needed more places to add checks for style turning off normal selection.

git-svn-id: svn://10.0.0.236/trunk@57411 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
mjudge%netscape.com
2000-01-11 19:44:59 +00:00
parent 9df8bc0d71
commit 070645421e
4 changed files with 60 additions and 0 deletions

View File

@@ -2098,6 +2098,21 @@ nsTextFrame::SetSelected(nsIPresContext* aPresContext,
return NS_OK;
}*/
// check whether style allows selection
const nsStyleUserInterface* userinterface;
GetStyleData(eStyleStruct_UserInterface, (const nsStyleStruct*&)userinterface);
if (userinterface) {
if (userinterface->mUserSelect == NS_STYLE_USER_SELECT_AUTO) {
// if 'user-select' isn't set for this frame, use the parent's
if (mParent) {
mParent->GetStyleData(eStyleStruct_UserInterface, (const nsStyleStruct*&)userinterface);
}
}
if (userinterface->mUserSelect == NS_STYLE_USER_SELECT_NONE) {
return NS_OK;//do not continue no selection for this frame.
}
}
PRBool found = PR_FALSE;
PRBool wholeContentFound = PR_FALSE;//if the entire content we look at is selected.
if (aRange) {