зеркало из https://github.com/mozilla/gecko-dev.git
Bug 172560. Don't find visibility hidden/collapsed stuff in typeaheadfidn. r=kyle, sr=alecf
This commit is contained in:
Родитель
d75a61ab3b
Коммит
24ba7cfe03
|
@ -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
|
||||
|
|
Загрузка…
Ссылка в новой задаче