diff --git a/mozilla/browser/components/build/nsBrowserCompsCID.h b/mozilla/browser/components/build/nsBrowserCompsCID.h
index 5e73bda3f99..ddfd0d8364e 100644
--- a/mozilla/browser/components/build/nsBrowserCompsCID.h
+++ b/mozilla/browser/components/build/nsBrowserCompsCID.h
@@ -88,6 +88,12 @@
#define NS_NAVHISTORYSERVICE_CONTRACTID \
"@mozilla.org/browser/nav-history-service;1"
+#define NS_NAVHISTORYRESULTTREEVIEWER_CID \
+{ 0x2ea8966f, 0x0671, 0x4c02, { 0x9c, 0x70, 0x94, 0x59, 0x56, 0xd4, 0x54, 0x34 } }
+
+#define NS_NAVHISTORYRESULTTREEVIEWER_CONTRACTID \
+ "@mozilla.org/browser/nav-history/result-tree-viewer;1"
+
#define NS_ANNOTATIONSERVICE_CID \
{ 0x5e8d4751, 0x1852, 0x434b, { 0xa9, 0x92, 0x2c, 0x6d, 0x2a, 0x25, 0xfa, 0x46 } }
diff --git a/mozilla/browser/components/build/nsModule.cpp b/mozilla/browser/components/build/nsModule.cpp
index 5ea2896b410..dd33dd35746 100644
--- a/mozilla/browser/components/build/nsModule.cpp
+++ b/mozilla/browser/components/build/nsModule.cpp
@@ -82,6 +82,7 @@
#ifdef MOZ_PLACES
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsNavHistory, Init)
+NS_GENERIC_FACTORY_CONSTRUCTOR(nsNavHistoryResultTreeViewer)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsAnnoProtocolHandler)
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsAnnotationService, Init)
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsNavBookmarks, Init)
@@ -152,6 +153,11 @@ static const nsModuleComponentInfo components[] =
"@mozilla.org/autocomplete/search;1?name=history",
nsNavHistoryConstructor },
+ { "History tree view",
+ NS_NAVHISTORYRESULTTREEVIEWER_CID,
+ NS_NAVHISTORYRESULTTREEVIEWER_CONTRACTID,
+ nsNavHistoryResultTreeViewerConstructor },
+
{ "Page Annotation Service",
NS_ANNOTATIONSERVICE_CID,
NS_ANNOTATIONSERVICE_CONTRACTID,
diff --git a/mozilla/browser/components/places/content/tree.xml b/mozilla/browser/components/places/content/tree.xml
index 21799829ffc..3fafd204665 100644
--- a/mozilla/browser/components/places/content/tree.xml
+++ b/mozilla/browser/components/places/content/tree.xml
@@ -28,12 +28,13 @@
]]>
+ val.QueryInterface(Ci.nsINavHistoryResultViewer).addViewObserver(
+ this._viewObserver, false);
+ ]]>
@@ -92,7 +93,13 @@
options.expandQueries = this.expandQueries;
var result = this.history.executeQueries(queries, queries.length,
options);
- this.view = result.QueryInterface(Ci.nsITreeView);
+
+ var treeviewer = Cc["@mozilla.org/browser/nav-history/result-tree-viewer;1"].
+ createInstance(Ci.nsINavHistoryResultViewer);
+ result.viewer = treeviewer;
+
+ treeviewer.QueryInterface(Ci.nsITreeView);
+ this.view = treeviewer;
]]>