Closed
Bug 187414
Opened 23 years ago
Closed 23 years ago
Use NodeFilters for DOM View
Categories
(Other Applications :: DOM Inspector, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: caillon, Assigned: caillon)
Details
Attachments
(1 file)
|
8.40 KB,
patch
|
sicking
:
review+
bzbarsky
:
superreview+
|
Details | Diff | Splinter Review |
| Assignee | ||
Comment 1•23 years ago
|
||
| Assignee | ||
Updated•23 years ago
|
Attachment #110476 -
Flags: superreview?(bzbarsky)
Attachment #110476 -
Flags: review?(bugmail)
Comment 2•23 years ago
|
||
Comment on attachment 110476 [details] [diff] [review]
Why didn't it use NodeFilter before?
> + PRUint32 filterForNodeType = 1 << (nodeType - 1);
Ew. This assumes all sorts of stuff about the filter consts and the node
types...
Perhaps an inline function to do this would be in order; one which asserts that
|nodeType| is in a certain range (that standardized by the existing DOM3 spec?)
At the very least, this line deserves a nice comment explaining what's going
on.
Other than that, looks good.
Attachment #110476 -
Flags: superreview?(bzbarsky) → superreview+
Comment on attachment 110476 [details] [diff] [review]
Why didn't it use NodeFilter before?
>+ PRUint32 filterForNodeType = 1 << (nodeType - 1);
What bz said. Please add checks to make sure that nodeType is within the
allowed range (1-12).
>Index: extensions/inspector/resources/content/viewers/domNode/domNode.js
>===================================================================
>@@ -71,7 +71,7 @@
>
> // prepare and attach the DOM DataSource
> this.mDOMView = XPCU.createInstance(kDOMViewCID, "inIDOMView");
>- this.mDOMView.addFilterByType(2, true);
>+ this.mDOMView.whatToShow |= NodeFilter.SHOW_ATTRIBUTE;
Shouldn't this be
this.mDOMView.whatToShow = NodeFilter.SHOW_ATTRIBUTE;
since the second argument was |true|.
with that, r=sicking
Attachment #110476 -
Flags: review?(bugmail) → review+
| Assignee | ||
Comment 4•23 years ago
|
||
Checked in.
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Updated•21 years ago
|
Product: Core → Other Applications
Updated•18 years ago
|
QA Contact: timeless → dom-inspector
You need to log in
before you can comment on or make changes to this bug.
Description
•