зеркало из https://github.com/mozilla/pjs.git
Always initialize numChildren, now that it's always checked. bug=368893 r=nian.liu sr=roc
This commit is contained in:
Родитель
6b812142b4
Коммит
a5064f7ba6
|
@ -2564,7 +2564,7 @@ nsFrameSelection::GetFrameForNodeOffset(nsIContent *aNode,
|
|||
if (aNode->IsNodeOfType(nsINode::eELEMENT))
|
||||
{
|
||||
PRInt32 childIndex = 0;
|
||||
PRInt32 numChildren = 0;
|
||||
PRInt32 numChildren = theNode->GetChildCount();
|
||||
|
||||
if (aHint == HINTLEFT)
|
||||
{
|
||||
|
@ -2575,8 +2575,6 @@ nsFrameSelection::GetFrameForNodeOffset(nsIContent *aNode,
|
|||
}
|
||||
else // HINTRIGHT
|
||||
{
|
||||
numChildren = theNode->GetChildCount();
|
||||
|
||||
if (aOffset >= numChildren)
|
||||
{
|
||||
if (numChildren > 0)
|
||||
|
|
Загрузка…
Ссылка в новой задаче