Closed Bug 172991 Opened 22 years ago Closed 22 years ago

Dialog find should not find invisible text

Categories

(SeaMonkey :: UI Design, defect)

defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED
mozilla1.3beta

People

(Reporter: aaronlev, Assigned: aaronlev)

References

Details

Either nsFind or nsWebBrowserFind should check the returned range to see if it has visible frames. Display:none styled content has no frames at all. Visibility:hidden and visibility:collapsed frames can be found using the following code: nsCOMPtr<nsIStyleContext> styleContext; frame->GetStyleContext(getter_AddRefs(styleContext)); if (styleContext) { const nsStyleVisibility* vis = (const nsStyleVisibility*)styleContext->GetStyleData(eStyleStruct_Visibility); if (!vis->IsVisible()) printf("The frame is not visible!"); }
Summary: Dialog find should not invisible text → Dialog find should not find invisible text
we have a bug on this already, somewhere.
As part of the design, I explicitly didn't check with layout for visibility of nodes while searching, for performance reasons (it's slow to ask layout that information). But that was assuming checking visibility of every node; if find just waited until it found something, then checked visibility of the found range before returning, that shouldn't hurt performance too much. It's not necessarily completely accurate -- for instance, if we search for mozilla and look through the string mozil<b>floopy</b>a where the <b> and its children are invisible, we still won't find it. But at least we won't find totally invisible content, like we can now. Kin, does this sound like it would be a good change? (Simon's probably right that there's already a bug covering this somewhere ... I'm not sure where, though; it's not on my list and I don't see it under the (somewhat out of date) tracking bug 106961.
Blocks: 106961
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla1.3beta
I have a fix for this in bug 175046, seeking r=akkana, sr=sfraser in that one.
Assignee: akkana → aaronl
Status: ASSIGNED → NEW
Depends on: 175046
this was fixed with checkin for bug 175046.
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Component: Search → XP Apps: GUI Features
QA Contact: claudius → pmac
QA Contact: pmac → sairuh
rs vrfy.
Status: RESOLVED → VERIFIED
Product: Core → Mozilla Application Suite
Component: XP Apps: GUI Features → UI Design
You need to log in before you can comment on or make changes to this bug.