зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
26a36cc8f0
Коммит
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
|
||||
|
|
Загрузка…
Ссылка в новой задаче