Closed Bug 412148 Opened 17 years ago Closed 17 years ago

Drop support for unused view features

Categories

(Firefox :: Bookmarks & History, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
Firefox 3 beta3

People

(Reporter: asaf, Assigned: asaf)

References

Details

Attachments

(1 file, 3 obsolete files)

Attached patch patch (obsolete) — Splinter Review
While trying to rewrite the remaining broken selection-restoration code, I figured we're still keeping few unused and untested view features:
 * view observers , I should have removed this when i had moved the tree-view implementation to browser/.
 * peerDropTypes / childDropTypes - we're using some other ways to indicate drag&drop commands state by now.
 * flatItemCount - duplicate of nsITreeView::rowCount, unused. This is meaningless outside of trees.
Flags: blocking-firefox3?
Attachment #296786 - Flags: review?(dietrich)
Attached patch v1.1 (obsolete) — Splinter Review
Attachment #296786 - Attachment is obsolete: true
Attachment #296787 - Flags: review?(dietrich)
Attachment #296786 - Flags: review?(dietrich)
Attached patch v1.2 (obsolete) — Splinter Review
Attachment #296787 - Attachment is obsolete: true
Attachment #296789 - Flags: review?(dietrich)
Attachment #296787 - Flags: review?(dietrich)
Comment on attachment 296789 [details] [diff] [review]
v1.2


>         <setter><![CDATA[
>-          // Map for containerNodes<->domNodes. There's only one map per
>-          // result/viewer, the field is initialized once for the root menu,
>-          // for sub menus it is set to the root's map (see insertNewItem)
>-          this._containerNodesMap = [];
>-
>           this.setAttribute("place", val);
>           var queries = { }, options = { };
>           PlacesUtils.history.queryStringToQueries(val, queries, { }, options);
>           if (!queries.value.length)
>             queries.value = [PlacesUtils.history.getNewQuery()];
>-          this._result =
>+          var result =
>             PlacesUtils.history.executeQueries(queries.value,
>                                                queries.value.length,
>                                                options.value);

so the result is setting viewer.result which is setting this view's ._result.

yes, we need to revisit the viewers. *sigh*

>@@ -440,16 +433,27 @@
> 
>           for (var i=0; i < this._self._containerNodesMap.length; i++) {
>             if (this._self._containerNodesMap[i].resultNode == aNode)
>               return this._self._containerNodesMap[i].domNode;
>           }
>           throw("Container view not found");
>         },
> 
>+        get result() {
>+          return this._self._result;
>+        },
>+
>+        set result(val) {
>+          this._self._result = val;
>+	if (val)
>+            val.root.containerOpen = true;
>+          return val;
>+        },

nit: wonky indentation

so, r=me for code simplification and reduction. however, i'm worried about more dnd regressions (since we have zero automated tests for this stuff), so maybe run through the bookmark and history BFTs related to dnd, or ping QA to see if someone there can do it?
Attachment #296789 - Flags: review?(dietrich) → review+
d&d is kinda broken in the organizer already, and various bugs are already filed on that, I'll test basic d&d in the bookmarks sidebar before landing this.
Attachment #296789 - Flags: approval1.9?
Attachment #296789 - Flags: approval1.9? → approval1.9+
Attachment #296789 - Attachment is obsolete: true
Attachment #300055 - Flags: review?(dietrich)
Comment on attachment 300055 [details] [diff] [review]
now with d&d working


>Index: browser/components/places/content/toolbar.xml
>===================================================================
>RCS file: /cvsroot/mozilla/browser/components/places/content/toolbar.xml,v
>retrieving revision 1.116
>diff -u -p -8 -r1.116 toolbar.xml
>--- browser/components/places/content/toolbar.xml	25 Jan 2008 19:01:18 -0000	1.116
>+++ browser/components/places/content/toolbar.xml	29 Jan 2008 17:30:21 -0000

>@@ -440,16 +433,27 @@
> 
>           for (var i=0; i < this._self._containerNodesMap.length; i++) {
>             if (this._self._containerNodesMap[i].resultNode == aNode)
>               return this._self._containerNodesMap[i].domNode;
>           }
>           throw("Container view not found");
>         },
> 
>+        get result() {
>+          return this._self._result;
>+        },
>+
>+        set result(val) {
>+          this._self._result = val;
>+	if (val)
>+            val.root.containerOpen = true;
>+          return val;
>+        },

nit: indentation

>+  // XXXmano: these two are copied over from tree.xml, to fix this we need to
>+  // either add a helper to PlacesUtils or keep it here and add insertionPoint
>+  // to the view interface.

the 2nd option sounds more appropriate; please file a followup.
Attachment #300055 - Flags: review?(dietrich) → review+
mozilla/browser/base/content/browser-places.js 1.84
mozilla/browser/components/places/content/controller.js 1.195
mozilla/browser/components/places/content/menu.xml 1.98
mozilla/browser/components/places/content/toolbar.xml 1.117
mozilla/browser/components/places/content/tree.xml 1.91
mozilla/browser/components/places/content/treeView.js 1.33
mozilla/toolkit/components/places/public/nsINavHistoryService.idl 1.78

Filed Bug 414630.
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
work : 20080129_1119_firefox-3.0b3pre.en-US.win32.zip
false : 20080129_1206_firefox-3.0b3pre.en-US.win32.zip


cannot D&D url from locationbar to bookmarks toolbar.

is this checkin cause a problem ?
(In reply to comment #8)
> work : 20080129_1119_firefox-3.0b3pre.en-US.win32.zip
> false : 20080129_1206_firefox-3.0b3pre.en-US.win32.zip
> 
> 
> cannot D&D url from locationbar to bookmarks toolbar.
> 
> is this checkin cause a problem ?
> 
Should be fixed in bug 414930
Flags: blocking-firefox3?
regressions probably caused by this: Bug 415390, Bug 415915
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: