Make selecting parts of a line in align:justify work right on

Mac/Linux.  Bug 58704, r=akkana, sr=kin


git-svn-id: svn://10.0.0.236/trunk@120236 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
bzbarsky%mit.edu 2002-04-29 22:03:41 +00:00
parent c441f7150a
commit 1e4a6df19b
2 changed files with 4 additions and 10 deletions

View File

@ -2557,15 +2557,12 @@ nsTextFrame::GetPositionSlowly(nsIPresContext* aPresContext,
{
if (NS_SUCCEEDED(prefs->GetIntPref("browser.drag_out_of_frame_style", &prefInt)) && prefInt)
{
nsRect bounds(mRect);
bounds.MoveBy(origin.x, origin.y);
if (aPoint.y < bounds.y)//above rectangle
if (aPoint.y < origin.y)//above rectangle
{
aOffset = mContentOffset;
outofstylehandled = PR_TRUE;
}
else if (aPoint.y > (bounds.y + bounds.height))
else if ((aPoint.y - origin.y) > mRect.height)
{
aOffset = mContentOffset + mContentLength;
outofstylehandled = PR_TRUE;

View File

@ -2557,15 +2557,12 @@ nsTextFrame::GetPositionSlowly(nsIPresContext* aPresContext,
{
if (NS_SUCCEEDED(prefs->GetIntPref("browser.drag_out_of_frame_style", &prefInt)) && prefInt)
{
nsRect bounds(mRect);
bounds.MoveBy(origin.x, origin.y);
if (aPoint.y < bounds.y)//above rectangle
if (aPoint.y < origin.y)//above rectangle
{
aOffset = mContentOffset;
outofstylehandled = PR_TRUE;
}
else if (aPoint.y > (bounds.y + bounds.height))
else if ((aPoint.y - origin.y) > mRect.height)
{
aOffset = mContentOffset + mContentLength;
outofstylehandled = PR_TRUE;