Bug 99192 - don't tab into popups. r=jag, sr=hyatt.

This commit is contained in:
bryner%netscape.com 2001-09-18 02:25:07 +00:00
Родитель 90035d68f1
Коммит 3a64c9e985
2 изменённых файлов: 36 добавлений и 0 удалений

Просмотреть файл

@ -127,6 +127,7 @@ private:
nsIFrame* GetRealFrame(nsIFrame* aFrame);
nsIFrame* GetPlaceholderFrame(nsIFrame* aFrame);
PRBool IsPopupFrame(nsIFrame* aFrame);
nsIPresContext* mPresContext;
};
@ -483,6 +484,14 @@ nsFocusIterator::GetRealFrame(nsIFrame* aFrame)
return result;
}
PRBool
nsFocusIterator::IsPopupFrame(nsIFrame* aFrame)
{
nsStyleDisplay* display;
aFrame->GetStyleData(eStyleStruct_Display, (const nsStyleStruct*&) display);
return (display->mDisplay == NS_STYLE_DISPLAY_POPUP);
}
nsIFrame*
nsFocusIterator::GetParentFrame(nsIFrame* aFrame)
{
@ -502,6 +511,9 @@ nsFocusIterator::GetFirstChild(nsIFrame* aFrame)
if (result)
result = GetRealFrame(result);
if (result && IsPopupFrame(result))
result = GetNextSibling(result);
return result;
}
@ -516,6 +528,9 @@ nsFocusIterator::GetNextSibling(nsIFrame* aFrame)
result = GetRealFrame(result);
}
if (result && IsPopupFrame(result))
result = GetNextSibling(result);
return result;
}
@ -535,6 +550,9 @@ nsFocusIterator::GetPrevSibling(nsIFrame* aFrame)
}
}
if (result && IsPopupFrame(result))
result = GetPrevSibling(result);
return result;
}

Просмотреть файл

@ -127,6 +127,7 @@ private:
nsIFrame* GetRealFrame(nsIFrame* aFrame);
nsIFrame* GetPlaceholderFrame(nsIFrame* aFrame);
PRBool IsPopupFrame(nsIFrame* aFrame);
nsIPresContext* mPresContext;
};
@ -483,6 +484,14 @@ nsFocusIterator::GetRealFrame(nsIFrame* aFrame)
return result;
}
PRBool
nsFocusIterator::IsPopupFrame(nsIFrame* aFrame)
{
nsStyleDisplay* display;
aFrame->GetStyleData(eStyleStruct_Display, (const nsStyleStruct*&) display);
return (display->mDisplay == NS_STYLE_DISPLAY_POPUP);
}
nsIFrame*
nsFocusIterator::GetParentFrame(nsIFrame* aFrame)
{
@ -502,6 +511,9 @@ nsFocusIterator::GetFirstChild(nsIFrame* aFrame)
if (result)
result = GetRealFrame(result);
if (result && IsPopupFrame(result))
result = GetNextSibling(result);
return result;
}
@ -516,6 +528,9 @@ nsFocusIterator::GetNextSibling(nsIFrame* aFrame)
result = GetRealFrame(result);
}
if (result && IsPopupFrame(result))
result = GetNextSibling(result);
return result;
}
@ -535,6 +550,9 @@ nsFocusIterator::GetPrevSibling(nsIFrame* aFrame)
}
}
if (result && IsPopupFrame(result))
result = GetPrevSibling(result);
return result;
}