Closed
Bug 585357
Opened 15 years ago
Closed 7 years ago
DOM Nodes's find behavior should match browser find
Categories
(Other Applications :: DOM Inspector, enhancement)
Other Applications
DOM Inspector
Tracking
(Not tracked)
RESOLVED
INCOMPLETE
People
(Reporter: crussell, Unassigned)
References
Details
Steps to reproduce, supposing you have some nodes which appear in this order:
DIV id="A"
DIV id="B"
DIV id="C"
1. Set the tree's currentIndex to the "B" row (e.g., click on it to make the focus rect appear).
2. Open Find Nodes dialog.
3. Search for a DIV, using search by tag.
Expected results:
The tree will reveal the "C" div.
Actual results:
The tree reveals the "A" div.
Find uses an internally-maintained pointer (via the tree walker it uses). It distinguishes between Find and Find Next by setting the node pointer to the tree's root node (via instantiating a new tree walker) for Find, and relying on the walker's last position for Find Next. Instead, it should only ever start at the root node if:
a) currentIndex is -1
b) we reach the end of the document
A consequence of b is that fixing this bug effectively implements wraparound find.
Implementation caveats:
inDeepTreeWalker currently doesn't support setting currentNode <http://mxr.mozilla.org/mozilla/source/layout/inspector/src/inDeepTreeWalker.cpp#168>. When this gets fixed on mozilla-central, we will need a JS workaround for supported legacy platforms, which, upon failure to set currentNode, just loops over undesirable nodes that precede the desired currentNode.
| Reporter | ||
Updated•13 years ago
|
Comment 1•7 years ago
|
||
Bulk close. This component is no longer supported or maintained.
https://bugzilla.mozilla.org/show_bug.cgi?id=1499023
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → INCOMPLETE
Comment 2•7 years ago
|
||
Bulk close. This component is no longer supported or maintained.
https://bugzilla.mozilla.org/show_bug.cgi?id=1499023
You need to log in
before you can comment on or make changes to this bug.
Description
•