From 09110a5680284d9d563c033cee140a2736fa9cdc Mon Sep 17 00:00:00 2001 From: "mjudge%netscape.com" Date: Tue, 16 Apr 2002 23:02:11 +0000 Subject: [PATCH] bs7868. bug driving me crazy i keep putting it into trunk but i keep failing. this patch was in 9.9 and 9.8 will go into branch soonest --- layout/base/nsPresShell.cpp | 3 +++ layout/generic/nsFrame.cpp | 4 +++- layout/html/base/src/nsFrame.cpp | 4 +++- layout/html/base/src/nsPresShell.cpp | 3 +++ 4 files changed, 12 insertions(+), 2 deletions(-) diff --git a/layout/base/nsPresShell.cpp b/layout/base/nsPresShell.cpp index c1e218d59ff0..8cff3e1ac5d6 100644 --- a/layout/base/nsPresShell.cpp +++ b/layout/base/nsPresShell.cpp @@ -1478,6 +1478,9 @@ PresShell::QueryInterface(const nsIID& aIID, void** aInstancePtr) } else if (aIID.Equals(NS_GET_IID(nsISelectionController))) { nsISelectionController* tmp = this; *aInstancePtr = (void*) tmp; + } else if (aIID.Equals(NS_GET_IID(nsISelectionDisplay))) { + nsISelectionController* tmp = this; + *aInstancePtr = (void*) tmp; } else if (aIID.Equals(NS_GET_IID(nsISupportsWeakReference))) { nsISupportsWeakReference* tmp = this; *aInstancePtr = (void*) tmp; diff --git a/layout/generic/nsFrame.cpp b/layout/generic/nsFrame.cpp index c92ff7b48cb4..f3e96daefef2 100644 --- a/layout/generic/nsFrame.cpp +++ b/layout/generic/nsFrame.cpp @@ -1762,7 +1762,9 @@ nsresult nsFrame::GetContentAndOffsetsFromPoint(nsIPresContext* aCX, aContentOffsetEnd = aContentOffset +1; else { - if ((thisRect.x + thisRect.width) < aPoint.x || thisRect.y > aPoint.y) + //if we are a collapsed frame then dont check to see if we need to skip past this content + //see bug http://bugzilla.mozilla.org/show_bug.cgi?id=103888 + if (thisRect.width && thisRect.height && ((thisRect.x + thisRect.width) < aPoint.x || thisRect.y > aPoint.y)) { aBeginFrameContent = PR_FALSE; aContentOffset++; diff --git a/layout/html/base/src/nsFrame.cpp b/layout/html/base/src/nsFrame.cpp index c92ff7b48cb4..f3e96daefef2 100644 --- a/layout/html/base/src/nsFrame.cpp +++ b/layout/html/base/src/nsFrame.cpp @@ -1762,7 +1762,9 @@ nsresult nsFrame::GetContentAndOffsetsFromPoint(nsIPresContext* aCX, aContentOffsetEnd = aContentOffset +1; else { - if ((thisRect.x + thisRect.width) < aPoint.x || thisRect.y > aPoint.y) + //if we are a collapsed frame then dont check to see if we need to skip past this content + //see bug http://bugzilla.mozilla.org/show_bug.cgi?id=103888 + if (thisRect.width && thisRect.height && ((thisRect.x + thisRect.width) < aPoint.x || thisRect.y > aPoint.y)) { aBeginFrameContent = PR_FALSE; aContentOffset++; diff --git a/layout/html/base/src/nsPresShell.cpp b/layout/html/base/src/nsPresShell.cpp index c1e218d59ff0..8cff3e1ac5d6 100644 --- a/layout/html/base/src/nsPresShell.cpp +++ b/layout/html/base/src/nsPresShell.cpp @@ -1478,6 +1478,9 @@ PresShell::QueryInterface(const nsIID& aIID, void** aInstancePtr) } else if (aIID.Equals(NS_GET_IID(nsISelectionController))) { nsISelectionController* tmp = this; *aInstancePtr = (void*) tmp; + } else if (aIID.Equals(NS_GET_IID(nsISelectionDisplay))) { + nsISelectionController* tmp = this; + *aInstancePtr = (void*) tmp; } else if (aIID.Equals(NS_GET_IID(nsISupportsWeakReference))) { nsISupportsWeakReference* tmp = this; *aInstancePtr = (void*) tmp;