Closed Bug 373838 Opened 17 years ago Closed 17 years ago

Implement browser-specific places tree view in JS

Categories

(Firefox :: Bookmarks & History, defect, P2)

defect

Tracking

()

RESOLVED FIXED
Firefox 3 alpha4

People

(Reporter: asaf, Assigned: asaf)

References

Details

Attachments

(1 file, 6 obsolete files)

For the use of Firefox, we need its own variant of a places tree view. This implementation would also take care of annotations set by the firefox front-end (e.g. microsummaries).

I don't have a strong opinion on whether or not we should ship a basic implementation in toolkit (i.e. nsNavHistoryResultTreeViewer).
Attached patch wip (obsolete) — Splinter Review
Attached patch more... (obsolete) — Splinter Review
Attachment #258499 - Attachment is obsolete: true
Attached patch more... (obsolete) — Splinter Review
Attachment #258615 - Attachment is obsolete: true
Attached patch typos and stuff (obsolete) — Splinter Review
Attachment #258737 - Attachment is obsolete: true
Attached patch stable (obsolete) — Splinter Review
Attachment #258823 - Attachment is obsolete: true
Attachment #259166 - Flags: review?(dietrich)
Attached patch remove c++ view (obsolete) — Splinter Review
Attachment #259367 - Flags: review?(dietrich)
been playing with both patches in my tree as I work on bug #369813, no problems yet, but:

+ isContainerEmpty: function PTV_isContainerOpen(aRow) {

shouldn't that be:

+ isContainerEmpty: function PTV_isContainerEmpty(aRow) {
copy-pasto.
Comment on attachment 259166 [details] [diff] [review]
stable

a few nits:

>+  SESSION_STATUS_NONE: 0,
>+  SESSION_STATUS_START: 1,
>+  SESSION_STATUS_CONTINUE: 2,
>+  _getRowSessionStatus: function PTV__getRowSessionStatus(aRow) {
>+    this._ensureValidRow(aRow);
>+    var node = this._visibleElements[aRow];
>+    if (!PlacesUtils.nodeIsVisit(node))
>+      return this.SESSION_STATUS_NONE;
>+
>+    asVisit(node);
>+    if (node.sessionId != 0) {
>+      if (aRow == 0)
>+        return this.SESSION_STATUS_START;
>+
>+      var previousNode = this._visibleElements[aRow - 1];
>+      if (PlacesUtils.nodeIsVisit(previousNode) &&
>+          node.sessionId != asVisit(previousNode).sessionId)
>+        return this.SESSION_STATUS_START;
>+
>+      return this.SESSION_STATUS_CONTINUE;
>+    }

should return SESSION_STATUS_NONE here?

>+  },
>+
>+  _buildVisibleSection:
>+  function PTV__buildVisibleSelection(aContainer, aVisible, aVisibleStartIndex)

s/Selection/Section

>+      // repaint the region that stayed the same, also including the
>+      // container element itself since its twisty could have changed.
>+      var minLength;
>+      if (replaceCount > newElements.length)
>+        minLength = newElements.length;
>+      else
>+        minLength = replaceCount;
>+      this._tree.invalidateRange(startReplacement - 1,
>+                                 startReplacement + minLength - 1);

"stayed the same"? this comment should be reworded. or i'm misunderstanding what's going on here?
Attachment #259166 - Flags: review?(dietrich) → review+
Attachment #259367 - Flags: review?(dietrich) → review+
Attached patch as checked inSplinter Review
mozilla/browser/components/places/jar.mn 1.34
mozilla/browser/components/places/content/placesOverlay.xul 1.9
mozilla/browser/components/places/content/tree.xml 1.59
mozilla/browser/components/places/content/treeView.js initial revision: 1.1 (and 1.2)
mozilla/browser/components/places/content/utils.js 1.23
mozilla/toolkit/components/build/nsToolkitCompsCID.h 1.23
mozilla/toolkit/components/places/public/nsIFaviconService.idl 1.6
mozilla/toolkit/components/places/src/nsFaviconService.cpp 1.12
mozilla/toolkit/components/places/src/nsNavHistory.cpp 1.11
mozilla/toolkit/components/places/src/nsNavHistory.h 1.71
mozilla/toolkit/components/places/src/nsNavHistoryResult.cpp 1.83
mozilla/toolkit/components/places/src/nsNavHistoryResult.h 1.29
mozilla/toolkit/components/places/src/nsPlacesModule.cpp 1.3
Attachment #259166 - Attachment is obsolete: true
Attachment #259367 - Attachment is obsolete: true
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Target Milestone: Firefox 3 alpha3 → Firefox 3 alpha4
Priority: -- → P2
mano, is there anything in this change that needs tests?
Flags: in-testsuite?
I found a trivial typo in:
http://mxr.mozilla.org/mozilla/source/browser/components/places/content/treeView.js#1271

s/PTV_selectionChnaged/PTV_selectionChanged/
Bug 451915 - move Firefox/Places bugs to Firefox/Bookmarks and History. Remove all bugspam from this move by filtering for the string "places-to-b-and-h".

In Thunderbird 3.0b, you do that as follows:
Tools | Message Filters
Make sure the correct account is selected. Click "New"
Conditions: Body   contains   places-to-b-and-h
Change the action to "Delete Message".
Select "Manually Run" from the dropdown at the top.
Click OK.

Select the filter in the list, make sure "Inbox" is selected at the bottom, and click "Run Now". This should delete all the bugspam. You can then delete the filter.

Gerv
Component: Places → Bookmarks & History
QA Contact: places → bookmarks
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: