Fix for bug 83650 (textarea control has problems with caret positioning at end)

and bug 97207 (textarea pastes sometimes misplaced by failing to reposition).

  - Added new utility method GetOriginToViewOffset().

  - Modified nsPresShell::HandleEvent(), nsBoxFrame::GetFrameForPoint(),
    and nsContainerFrame::GetFrameForPointUsing() to factor in the
    offset from GetOriginToViewOffset() to insure that the point
    used is always transformed into the correct coordinate system.

Files modified:

    mozilla/layout/base/public/nsIFrame.h
    mozilla/layout/html/base/src/nsContainerFrame.cpp
    mozilla/layout/html/base/src/nsFrame.cpp
    mozilla/layout/html/base/src/nsFrame.h
    mozilla/layout/html/base/src/nsPresShell.cpp
    mozilla/layout/xul/base/src/nsBoxFrame.cpp

r=kmcclusk@netscape.com  sr=sfraser@netscape.com


git-svn-id: svn://10.0.0.236/trunk@113914 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
kin%netscape.com
2002-02-07 22:39:15 +00:00
parent af3ba622f8
commit 9d69384546
11 changed files with 198 additions and 11 deletions

View File

@@ -293,8 +293,16 @@ nsContainerFrame::GetFrameForPointUsing(nsIPresContext* aPresContext,
FirstChild(aPresContext, aList, &kid);
*aFrame = nsnull;
tmp.MoveTo(aPoint.x - mRect.x, aPoint.y - mRect.y);
nsPoint originOffset;
nsIView *view = nsnull;
nsresult rv = GetOriginToViewOffset(aPresContext, originOffset, &view);
if (NS_SUCCEEDED(rv) && view)
tmp += originOffset;
while (nsnull != kid) {
nsresult rv = kid->GetFrameForPoint(aPresContext, tmp, aWhichLayer, &hit);
rv = kid->GetFrameForPoint(aPresContext, tmp, aWhichLayer, &hit);
if (NS_SUCCEEDED(rv) && hit) {
*aFrame = hit;