Closed Bug 282683 Opened 20 years ago Closed 3 years ago

nsIBoxObject traversal methods suck

Categories

(Core :: XUL, defect)

defect
Not set
critical

Tracking

()

RESOLVED INCOMPLETE

People

(Reporter: neil, Unassigned, NeedInfo)

References

Details

Follow-up to bug 282481. The XUL box ordinal group layout feature allows XUL
elements to be displayed in a non-document order. The nsIBoxObject traversal
methods were written to allow XUL elements to be traversed in display order.
So the problem is that these methods iterate the frame tree and return nodes. 
They seem to assume that the following invariants will hold:

1)  Each object has only one frame.
2)  This frame is the primary frame.

These are manifestly false in a lot of cases... In addition to the table
pseudo-frame stuff I mentioned in bug 282481, there's also a problem with bidi
reordering, possibly.

The basic problem is that there is no way to specify a position in the visual
display via a DOMElement.  So I think the only way this interface can work is if
it uses objects that have a lot more state than DOMElements do....

Either that, or we need to have the methods throw any time they encounter a
non-xul box and maybe need to be moved from nsIBoxObject to a XUL-only interface
(since not creating box objects for non-xul nodes is not an option at this point).

Severity is critical, since iteration of the tree with this interface in
situations when it fails will lead to an infinite loop.
Severity: minor → critical
Component: XP Toolkit/Widgets: XUL → XUL
QA Contact: xptoolkit.widgets

Hey Neil, It's been a long time since this issue was reported. Could you please look into it and close it if it's no longer reproducible or update it with the current affected versions. Thanks!

Flags: needinfo?(neil)

Closing as Resolved: Incomplete due to no update from the reporter. If anyone can still reproduce this issue, please feel free to reopen the bug. Thanks!

Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.