Closed Bug 211537 Opened 21 years ago Closed 21 years ago

Dom Inspector not working properly-doesn't display full tree of nodes

Categories

(Other Applications :: DOM Inspector, defect)

x86
Windows 98
defect
Not set
major

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: charles.fenwick, Assigned: neil)

References

()

Details

(Keywords: regression, testcase)

Attachments

(2 files, 1 obsolete file)

In today's build, I tried examining a site in the DOM inspector and was unable
to do so.

To reproduce: Bring up the DOM inspector and type a website into the address bar
and press enter (mozilla.org for instance)

After the page loads, notice in the left hand pane there's only two items
visible #document and html.
There's nothing to expand.

Compare to a fully functioning DOM Inspector. When you bring up the page, you
see in the left pane #document, html, html.  Clicking on the lower html expands
the tree to head, text, body, etc.

This works properly in 062808 build (the most recently nightly I have besides
this one).
I've seen the bug Mr. Fenwick reports here; the reason dbaron and bz are cc'd
are because they've authored the only two checkins to extensions/inspector/*.*
in the last seven days.

DOM Inspector is totally unuseable with this regression.
*** Bug 211539 has been marked as a duplicate of this bug. ***
So... The main tree renders fine for me, but I see some problems with attributes
not being shown (in fact, spent a few hours today trying to figure out which of
my local changes caused that).

Given the hint that it's present in nightlies, I've found the culprit for my
attribute problem -- the checkin for bug 208093.  I seem to recall seeing some
tree assertions in Inspector even in my debug build (which did not have the
patch for bug 208903 in it at the time...).

Neil, any ideas as to what Inspector is doing wrong with its tree magic?
Attached file Proposed patch (obsolete) —
Comment on attachment 126991 [details]
Proposed patch

Begin/End Update Batch are new methods that Jan recently added to make it easy
to rebuild a tree.
Attachment #126991 - Flags: superreview?(bzbarsky)
Attachment #126991 - Flags: review?(caillon)
So... I can't sr this unless I have some idea of why this works?  Why is calling
beginUpdateBatch/endUpdateBatch supposed to work while invalidate() does not? 
Calling those without doing anything in between seems a bit fishy to me in any
case...

Also, the JS changes look wrong -- what's beginBatchUpdate? 
Comment on attachment 126991 [details]
Proposed patch

Ah, I'd forgotton to check that code path :-/
Attachment #126991 - Attachment is patch: false
Attachment #126991 - Flags: superreview?(bzbarsky)
Attachment #126991 - Flags: review?(caillon)
Attached patch Try again :-[Splinter Review
The point of invalidate() only requests that the tree repaint itself.
If you change the number of rows in the tree, then you could call
rowCountChanged() but that requires you to a) add or remove all the rows at the
same point b) know each time you call rowCountChanged() what the change and new
number of rows is.
This was inconvenient when rebuilding from an RDF data source (bookmarks in
particular) so Jan added begin/endUpdateBatch methods to suppress checks and
allow you to muck about generally when making extensive changes to the tree.
Attachment #126991 - Attachment is obsolete: true
Attachment #127011 - Flags: superreview?(bzbarsky)
Attachment #127011 - Flags: review?(caillon)
Comment on attachment 127011 [details] [diff] [review]
Try again :-[

How about clearly documenting that in the interface or something useful like
that?

So what this patch does is to ask the tree to completely rebuild itself on any
sort of random changes, huh?  I suppose that works, though it may be overkill
for the removeProperty case... (for setProperty it may actually be needed).

Also, shouldn't the update batch begin _before_ we make the actual changes to
the style rule?  I guess it doesn't matter since the rule won't be affecting
the tree, but that would make a lot more sense to me from a style point of
view....

sr=me with that change.
Attachment #127011 - Flags: superreview?(bzbarsky) → superreview+
Comment on attachment 127011 [details] [diff] [review]
Try again :-[

r=caillon with bz's requested changes.
Attachment #127011 - Flags: review?(caillon) → review+
Fix checked in.
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Reopened for two reasons:

1. The assignee of this bug is incorrect.  Please fix that.
2. This checkin modified EVERY LINE in 2 files and was backed out by me.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Yes, it was turning ports red and you were nowhere to be found.  I am going to
try and get the rcs files fixed on Monday when leaf is around, so we can get a
reasonable blame history again.  In the meantime, I suggest not re-landing this
patch until then.
Assignee: caillon → neil.parkwaycc.co.uk
Status: REOPENED → NEW
Don't mean to interfere (CVS history preservation is a good thing, enough to
warrant queueing up for leaf to do the deed), but turning ports red is not
enough cause for a back-out, strictly speaking.  I should know, I've burned some
ports lately and picked up the pieces a day or two later.

/be
We probably don't want to ship 1.5a with a broken Inspector.
Flags: blocking1.5a?
Line endings problem :-[
Status: NEW → RESOLVED
Closed: 21 years ago21 years ago
Resolution: --- → FIXED
Flags: blocking1.5a? → blocking1.5a+
Product: Core → Other Applications
QA Contact: timeless → dom-inspector
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: