``` >+ readonly attribute TreeColumn? previousVisibleSibling; ``` I'm not sure about the naming here, since it might not in fact be visible (e.g. could be width 0, no?). ``` >+++ b/layout/xul/tree/nsTreeColumns.cpp >+already_AddRefed<nsTreeColumn> nsTreeColumn::GetPreviousVisibleSibling() { >+ frame->GetContent() && ``` No need; the only frame with a null GetContent() is the viewport. ``` >+ RefPtr<nsTreeColumn> column = >+ mColumns->GetColumnFor(frame->GetContent()->AsElement()); ``` So this walks elements backwards one by one and for each element walks the columns forward from the front, right? Seems like it could have O(N^2) behavior in weird cases. Do we need to worry about that?
Bug 1519960 Comment 1 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
>+ readonly attribute TreeColumn? previousVisibleSibling; I'm not sure about the naming here, since it might not in fact be visible (e.g. could be width 0, no?). >+++ b/layout/xul/tree/nsTreeColumns.cpp >+already_AddRefed<nsTreeColumn> nsTreeColumn::GetPreviousVisibleSibling() { >+ frame->GetContent() && No need; the only frame with a null GetContent() is the viewport. >+ RefPtr<nsTreeColumn> column = >+ mColumns->GetColumnFor(frame->GetContent()->AsElement()); So this walks elements backwards one by one and for each element walks the columns forward from the front, right? Seems like it could have O(N^2) behavior in weird cases. Do we need to worry about that?