public override void GetFirstAndLastRowVisible(out int firstRowVisible, out int lastRowVisible)
{
if (base.m_TreeView.isSearching)
{
base.GetFirstAndLastRowVisible(out firstRowVisible, out lastRowVisible);
}
else
{
int rowCount = base.m_TreeView.data.rowCount;
if (rowCount != this.m_RowRects.Count)
{
Debug.LogError("Mismatch in state: rows vs cached rects");
}
int num2 = -1;
int num3 = -1;
float y = base.m_TreeView.state.scrollPos.y;
float height = base.m_TreeView.GetTotalRect().height;
for (int i = 0; i < this.m_RowRects.Count; i++)
{
Rect rect2 = this.m_RowRects[i];
if (rect2.y > y)
{
Rect rect3 = this.m_RowRects[i];
if (rect3.y < (y + height))
{
goto Label_00FC;
}
}
Rect rect4 = this.m_RowRects[i];
System.Boolean ReflectorVariable0 = true;
goto Label_00FD;
Label_00FC:
ReflectorVariable0 = false;
Label_00FD:
if (ReflectorVariable0 ? ((rect4.yMax > y) && (this.m_RowRects[i].yMax < (y + height))) : true)
{
if (num2 == -1)
{
num2 = i;
}
num3 = i;
}
}
if ((num2 != -1) && (num3 != -1))
{
firstRowVisible = num2;
lastRowVisible = num3;
}
else
{
firstRowVisible = 0;
lastRowVisible = rowCount - 1;
}
}
}