Bug 172560. Don't find visibility hidden/collapsed stuff in typeaheadfidn. r=kyle, sr=alecf

This commit is contained in:
aaronl%netscape.com 2002-10-08 17:55:18 +00:00
Родитель d75a61ab3b
Коммит 24ba7cfe03
1 изменённых файлов: 12 добавлений и 0 удалений

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

@ -64,6 +64,7 @@
#include "nsIContent.h"
#include "nsIFrame.h"
#include "nsFrameTraversal.h"
#include "nsIStyleContext.h"
#include "nsIDOMDocument.h"
#include "nsIDOMHTMLDocument.h"
#include "nsIDOMHTMLElement.h"
@ -2175,6 +2176,17 @@ nsTypeAheadFind::IsRangeVisible(nsIPresShell *aPresShell,
return PR_FALSE;
}
nsCOMPtr<nsIStyleContext> styleContext;
frame->GetStyleContext(getter_AddRefs(styleContext));
if (styleContext) {
const nsStyleVisibility* vis =
(const nsStyleVisibility*)styleContext->GetStyleData(eStyleStruct_Visibility);
if (!vis || !vis->IsVisible()) {
return PR_FALSE;
}
}
// ---- We have a frame ----
if (!aMustBeInViewPort) {
// Don't need it to be on screen, just in rendering tree