Closed Bug 563558 Opened 14 years ago Closed 14 years ago

inDOMView contentRemoved implementation doesn't take into account hidden whitespace nodes

Categories

(Other Applications :: DOM Inspector, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: crussell, Assigned: crussell)

Details

Attachments

(2 files, 1 obsolete file)

Attached file minimal test case
layout/inspector/src/inDOMView.cpp:965:
   if (container->GetChildCount() == 0) {
     // Fix up the parent
     parentNode->isContainer = PR_FALSE;
     parentNode->isOpen = PR_FALSE;
     mTree->InvalidateRow(NodeToRow(parentNode));
   }

Non-zero child count doesn't mean we're showing anything. If all of the children are ignorable whitespace, we need to update the parent row to no longer be a container.

1. Inspect the attached document, making sure "Show whitespace nodes" is off.
2. Open the BODY element
3. Delete the DIV

Note that the BODY element is still a container. You can even continue to toggle the open state, but there are no non-whitespace children to show.
Shawn, can you review this? If not, any suggestions? Boris? Neil?
Assignee: nobody → Sevenspade
Status: NEW → ASSIGNED
Attachment #446132 - Flags: review?(sdwilsh)
Comment on attachment 446132 [details] [diff] [review]
Check inDOMViewNode's previous and next pointers for visible rows

A layout peer is probably best, and this shouldn't need sr.
Attachment #446132 - Flags: review?(sdwilsh) → review?(roc)
Instead of letting previousNode and nextNode hang around, which looks slightly dangerous here since we're deleting stuff, how about setting a PRBool "isOnlyChild" and then testing it below after deleting stuff?
Attachment #446132 - Attachment is obsolete: true
Attachment #449568 - Flags: review?(roc)
Attachment #446132 - Flags: review?(roc)
http://hg.mozilla.org/mozilla-central/rev/a3eb83c7e386
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: