mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-14 18:51:28 +00:00
fix for bug #55921 - Clicking to the right of a link doesn't clear selection
sr/r=joki, sfraser
This commit is contained in:
parent
f32e0cfb52
commit
9ac401dd8b
@ -1033,7 +1033,20 @@ nsFrame::HandlePress(nsIPresContext* aPresContext,
|
||||
// in the presence of an href with a value!
|
||||
nsAutoString href;
|
||||
if (NS_CONTENT_ATTR_HAS_VALUE == content->GetAttribute(kNameSpaceID_None, nsHTMLAtoms::href, href))
|
||||
{// fix for bug #55921
|
||||
nsIView *dummyView = 0;
|
||||
nsRect frameRect = mRect;
|
||||
nsPoint offsetPoint;
|
||||
|
||||
GetOffsetFromView(aPresContext, offsetPoint, &dummyView);
|
||||
|
||||
frameRect.x = offsetPoint.x;
|
||||
frameRect.y = offsetPoint.y;
|
||||
|
||||
if (frameRect.x <= aEvent->point.x && (frameRect.x + frameRect.width >= aEvent->point.x) &&
|
||||
frameRect.y <= aEvent->point.y && (frameRect.y + frameRect.height >= aEvent->point.y))
|
||||
return NS_OK;
|
||||
}
|
||||
}
|
||||
|
||||
// now try the parent
|
||||
|
@ -1033,7 +1033,20 @@ nsFrame::HandlePress(nsIPresContext* aPresContext,
|
||||
// in the presence of an href with a value!
|
||||
nsAutoString href;
|
||||
if (NS_CONTENT_ATTR_HAS_VALUE == content->GetAttribute(kNameSpaceID_None, nsHTMLAtoms::href, href))
|
||||
{// fix for bug #55921
|
||||
nsIView *dummyView = 0;
|
||||
nsRect frameRect = mRect;
|
||||
nsPoint offsetPoint;
|
||||
|
||||
GetOffsetFromView(aPresContext, offsetPoint, &dummyView);
|
||||
|
||||
frameRect.x = offsetPoint.x;
|
||||
frameRect.y = offsetPoint.y;
|
||||
|
||||
if (frameRect.x <= aEvent->point.x && (frameRect.x + frameRect.width >= aEvent->point.x) &&
|
||||
frameRect.y <= aEvent->point.y && (frameRect.y + frameRect.height >= aEvent->point.y))
|
||||
return NS_OK;
|
||||
}
|
||||
}
|
||||
|
||||
// now try the parent
|
||||
|
Loading…
Reference in New Issue
Block a user