Make selecting parts of a line in align:justify work right on
Mac/Linux. Bug 58704, r=akkana, sr=kin
This commit is contained in:
@@ -2557,15 +2557,12 @@ nsTextFrame::GetPositionSlowly(nsIPresContext* aPresContext,
|
|||||||
{
|
{
|
||||||
if (NS_SUCCEEDED(prefs->GetIntPref("browser.drag_out_of_frame_style", &prefInt)) && prefInt)
|
if (NS_SUCCEEDED(prefs->GetIntPref("browser.drag_out_of_frame_style", &prefInt)) && prefInt)
|
||||||
{
|
{
|
||||||
nsRect bounds(mRect);
|
if (aPoint.y < origin.y)//above rectangle
|
||||||
|
|
||||||
bounds.MoveBy(origin.x, origin.y);
|
|
||||||
if (aPoint.y < bounds.y)//above rectangle
|
|
||||||
{
|
{
|
||||||
aOffset = mContentOffset;
|
aOffset = mContentOffset;
|
||||||
outofstylehandled = PR_TRUE;
|
outofstylehandled = PR_TRUE;
|
||||||
}
|
}
|
||||||
else if (aPoint.y > (bounds.y + bounds.height))
|
else if ((aPoint.y - origin.y) > mRect.height)
|
||||||
{
|
{
|
||||||
aOffset = mContentOffset + mContentLength;
|
aOffset = mContentOffset + mContentLength;
|
||||||
outofstylehandled = PR_TRUE;
|
outofstylehandled = PR_TRUE;
|
||||||
|
|||||||
@@ -2557,15 +2557,12 @@ nsTextFrame::GetPositionSlowly(nsIPresContext* aPresContext,
|
|||||||
{
|
{
|
||||||
if (NS_SUCCEEDED(prefs->GetIntPref("browser.drag_out_of_frame_style", &prefInt)) && prefInt)
|
if (NS_SUCCEEDED(prefs->GetIntPref("browser.drag_out_of_frame_style", &prefInt)) && prefInt)
|
||||||
{
|
{
|
||||||
nsRect bounds(mRect);
|
if (aPoint.y < origin.y)//above rectangle
|
||||||
|
|
||||||
bounds.MoveBy(origin.x, origin.y);
|
|
||||||
if (aPoint.y < bounds.y)//above rectangle
|
|
||||||
{
|
{
|
||||||
aOffset = mContentOffset;
|
aOffset = mContentOffset;
|
||||||
outofstylehandled = PR_TRUE;
|
outofstylehandled = PR_TRUE;
|
||||||
}
|
}
|
||||||
else if (aPoint.y > (bounds.y + bounds.height))
|
else if ((aPoint.y - origin.y) > mRect.height)
|
||||||
{
|
{
|
||||||
aOffset = mContentOffset + mContentLength;
|
aOffset = mContentOffset + mContentLength;
|
||||||
outofstylehandled = PR_TRUE;
|
outofstylehandled = PR_TRUE;
|
||||||
|
|||||||
Reference in New Issue
Block a user