mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-29 15:52:07 +00:00
GetFrameForNodeOffset: if aNode has no children and the offset is 0, return the frame corresponding to aNode rather than failing. patch by Nian Liu <nian.liu@sun.com>. bug=363198 r=uriber sr=roc.
This commit is contained in:
parent
26a36cc8f0
commit
1f1b745917
@ -2586,12 +2586,14 @@ nsFrameSelection::GetFrameForNodeOffset(nsIContent *aNode,
|
||||
childIndex = aOffset;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIContent> childNode = theNode->GetChildAt(childIndex);
|
||||
if (aOffset != 0 || numChildren != 0) {
|
||||
nsCOMPtr<nsIContent> childNode = theNode->GetChildAt(childIndex);
|
||||
|
||||
if (!childNode)
|
||||
return nsnull;
|
||||
if (!childNode)
|
||||
return nsnull;
|
||||
|
||||
theNode = childNode;
|
||||
theNode = childNode;
|
||||
}
|
||||
|
||||
#ifdef DONT_DO_THIS_YET
|
||||
// XXX: We can't use this code yet because the hinting
|
||||
|
Loading…
Reference in New Issue
Block a user