Closed
Bug 166471
Opened 24 years ago
Closed 24 years ago
nsIFind can return bogus ranges
Categories
(SeaMonkey :: UI Design, defect)
SeaMonkey
UI Design
Tracking
(Not tracked)
VERIFIED
FIXED
mozilla1.2final
People
(Reporter: aaronlev, Assigned: aaronlev)
References
Details
Attachments
(2 files)
|
554 bytes,
text/html
|
Details | |
|
1.32 KB,
patch
|
Details | Diff | Splinter Review |
If the search range used with nsIFind coverse the entire document, nsIFind can
return bogus ranges where the start and/or end container is null.
There are multiple problems here:
1. nsIFind::Find does not check the return values for range SetStart or SetEnd
2. nsIFind should be skipping over all comment nodes, but it doesn't appear to
be when they're before the <head>.
Test case is the same as for bug 166340, when the fix for that bug is reversed.
The only reason this hasn't been a problem so far is becase nsWebBrowserFind
uses GetBody(). However, I don't think GetBody() will work with xml content
documents.
Comment 1•24 years ago
|
||
Apparently layout is treating those comments outside the <html> tag differently
from normal comments inside the body, and SkipNode isn't catching them.
Updated•24 years ago
|
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla1.2beta
Updated•24 years ago
|
QA Contact: paw → pmac
Comment 2•24 years ago
|
||
The test cases no longer demonstrates anything, since aaron has worked around
this, but more error checking is still a good idea. So here it is. Aaron, can
you review?
Updated•24 years ago
|
Target Milestone: mozilla1.2beta → mozilla1.2final
| Assignee | ||
Comment 3•24 years ago
|
||
Akkana, this fixes the problem of the bogus ranges, but should we find out why
the nsFind code sometimes searches comment nodes? The test case in bug 175046
shows that.
| Assignee | ||
Comment 5•24 years ago
|
||
checked in with fix for bug 175046.
Status: NEW → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Updated•23 years ago
|
QA Contact: pmac → sairuh
Comment 6•23 years ago
|
||
the test case appears fine with 2003.01.08.08 on linux rh8.
Status: RESOLVED → VERIFIED
Updated•21 years ago
|
Product: Core → Mozilla Application Suite
You need to log in
before you can comment on or make changes to this bug.
Description
•