Closed Bug 517726 Opened 15 years ago Closed 15 years ago

Update SeaMonkey's treeView.js to match new view API

Categories

(SeaMonkey :: General, defect)

x86
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
seamonkey2.1a1

People

(Reporter: asaf, Assigned: neil)

References

Details

Attachments

(2 files)

In bug 498130, we're changing the nsINavHistoryResultView and other places APIs. The new API isn't comapatible with he places tree view implementation of SM. I'm pretty sure that at this point you can just copy over the FX implementaion (we've removed showSessions too).

The API showed at the last patch there is very likely final. Please let me know if you want to correspond patch-landings.
Thanks for the note about it - I just so much would hope we'd have branched already, then doing this for trunk only would be fine, but due to Thunderbird folks blocking that branching, we need to keep things working with at least both 1.9.1 and trunk for now, and that complicates this. :(

Mark, here's a bug that we should take into account with branching plans, even if it's SeaMonkey-only.
(In reply to comment #0)
> I'm pretty sure that at this point you can just copy over the FX
> implementaion (we've removed showSessions too).
We didn't before, so we may want to merge changes instead.
Depends on: 498130
Whiteboard: [needs branch]
It's now checked in.
Version: unspecified → Trunk
Attached patch Possible patchSplinter Review
This is the minimum necessary to fix the bug. Places used to define a viewIndex property on their nodes which defaulted to -1; we now have to set that on the root manually but fortunately their nodes have classInfo which means that we can set arbitrary properties.
As a followup we could change our code to match their code more in two ways:
1. Rename viewIndex to _viewIndex
2. Move .properties to .node._cellProperties and eliminate the holder object
Assignee: nobody → neil
Status: NEW → ASSIGNED
Attachment #414728 - Flags: review?(iann_bugzilla)
Comment on attachment 414728 [details] [diff] [review]
Possible patch

r=me, could you file the follow up bug(s) please?
Attachment #414728 - Flags: review?(iann_bugzilla) → review+
Pushed changeset 5d3acfe7d0d7 to comm-central.
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Whiteboard: [needs branch]
Blocks: 531696
Target Milestone: --- → seamonkey2.1a1
You didn't update the observing methods afiact (item_Title_Changed etc.)).
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
(In reply to comment #7)
> You didn't update the observing methods afiact (item_Title_Changed etc.)).
Could you be more specific? Neither item_Title_Changed nor itemTitleChanged show up in an MXR of mozilla-1.9.1 and there is one hit in mozilla-central.
Oh, I see now, it used to be called itemChanged but now it's nodeXXXChanged.
* Renamed itemChanged to invalidateNode
* Added nodeXXXChanged methods
* Renamed [Ii]tem to [Nn]ode almost everywhere
Attachment #415655 - Flags: review?(iann_bugzilla)
Comment on attachment 415655 [details] [diff] [review]
Update observing methods

>+   * This counts how many rows an node takes in the tree, that is, the
Nit: "a" rather than "an".

>+   * node itself plus any nodes following it with an increased indent.
>+   * This allows you to figure out how many rows an node (=1) or a
Nit: "a" rather than "an".

>     if (oldViewIndex > this._visibleElements.length)
>-      throw("Trying to remove an item with an invalid viewIndex");
>+      throw("Trying to remove an node with an invalid viewIndex");
Nit: "a" rather than "an".
Attachment #415655 - Flags: review?(iann_bugzilla) → review+
Pushed changeset 4b63c4badb42 to comm-central.
Status: REOPENED → RESOLVED
Closed: 15 years ago15 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: