diff --git a/xpfe/browser/resources/content/navigator.js b/xpfe/browser/resources/content/navigator.js
index 52857824bbb0..39a1f807bab3 100644
--- a/xpfe/browser/resources/content/navigator.js
+++ b/xpfe/browser/resources/content/navigator.js
@@ -906,11 +906,11 @@ function RevealSearchPanel()
newWin.saveFileAndPos = true;
}
- const nsIFilePicker = Components.interfaces.nsIFilePicker;
function BrowserOpenFileWindow()
{
// Get filepicker component.
try {
+ var nsIFilePicker = Components.interfaces.nsIFilePicker;
var fp = Components.classes["component://mozilla/filepicker"].createInstance(nsIFilePicker);
fp.init(window, bundle.GetStringFromName("openFile"), nsIFilePicker.modeOpen);
fp.appendFilters(nsIFilePicker.filterHTML | nsIFilePicker.filterText |
@@ -1587,3 +1587,63 @@ function postURLToNativeWidget() {
}
}
+/**
+ * Content area tooltip.
+ * XXX - this must move into XBL binding/equiv! Do not want to pollute
+ * navigator.js with functionality that can be encapsulated into
+ * browser widget. TEMPORARY!
+ **/
+function FillInHTMLTooltip ( tipElement )
+{
+ var HTMLNS = "http://www.w3.org/1999/xhtml";
+ var XULNS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
+ var XLinkNS = "http://www.w3.org/1999/xlink";
+
+ var retVal = false;
+ var tipNode = document.getElementById("HTML_TOOLTIP_tooltipBox");
+ if ( tipNode ) {
+ try {
+ while ( tipNode.hasChildNodes() ) {
+ tipNode.removeChild( tipNode.firstChild );
+ }
+
+ var titleText = "";
+ var XLinkTitleText = "";
+ var summaryText = "";
+
+ while ( titleText == "" && summaryText == "" && XLinkTitleText == "" && tipElement ) {
+ if ( tipElement.nodeType == 1 ) {
+ titleText = tipElement.getAttributeNS(HTMLNS, "title");
+ XLinkTitleText = tipElement.getAttributeNS(XLinkNS, "title");
+ if ( (tipElement.namespaceURI == "" || tipElement.namespaceURI == HTMLNS)
+ && tipElement.tagName.toLowerCase() == "table" ) {
+ summaryText = tipElement.getAttributeNS(HTMLNS, "summary");
+ }
+ }
+ tipElement = tipElement.parentNode;
+ }
+
+ var texts = [ titleText, summaryText, XLinkTitleText ];
+
+ for (var i = 0; i < texts.length; i++) {
+ var t = texts[i];
+ if ( t.search(/\S/) >= 0 ) {
+ if ( tipNode.hasChildNodes() ) {
+ var blankLineElem = tipNode.ownerDocument.createElementNS(XULNS, "text");
+ tipNode.appendChild(blankLineElem);
+ }
+
+ var tipLineElem = tipNode.ownerDocument.createElementNS(XULNS, "text");
+ tipLineElem.setAttribute("value", t);
+ tipNode.appendChild(tipLineElem);
+
+ retVal = true;
+ }
+ }
+ }
+ catch (e) { retVal = false; }
+ }
+
+ return retVal;
+}
+
diff --git a/xpfe/browser/resources/content/navigator.xul b/xpfe/browser/resources/content/navigator.xul
index 2f1f6c9b1691..2459f0ed43ff 100644
--- a/xpfe/browser/resources/content/navigator.xul
+++ b/xpfe/browser/resources/content/navigator.xul
@@ -61,6 +61,7 @@ Contributor(s): ______________________________________. -->
+
@@ -86,9 +87,14 @@ Contributor(s): ______________________________________. -->
-
-
+
+
+
+
+
+
+
@@ -232,7 +245,7 @@ Contributor(s): ______________________________________. -->
-
+
-
@@ -391,7 +404,7 @@ Contributor(s): ______________________________________. -->
+ src="about:blank" flex="1" tooltip="aHTMLTooltip"/>
diff --git a/xpfe/browser/resources/content/navigatorDD.js b/xpfe/browser/resources/content/navigatorDD.js
index 7dd76d035b90..88efa6bb2e74 100644
--- a/xpfe/browser/resources/content/navigatorDD.js
+++ b/xpfe/browser/resources/content/navigatorDD.js
@@ -134,10 +134,13 @@ var personalToolbarObserver = {
var potentialTitle = null;
var historyDS = gRDFService.GetDataSource("rdf:history");
var historyEntry = gRDFService.GetResource(element);
- var historyTitleProperty = gRDFService.GetResource(NC_RDF("URL"));
+ var historyTitleProperty = gRDFService.GetResource(NC_RDF("Name"));
var titleFromHistory = historyDS.GetTarget(historyEntry, historyTitleProperty, true);
- if (titleFromHistory)
-// titleFromHistory = titleFromHistory.QueryInterface(Components.interfaces.nsIRDFLiteral);
+ dump("*** titleFromHistory = " + titleFromHistory + "\n");
+ if (titleFromHistory) {
+ titleFromHistory = titleFromHistory.QueryInterface(Components.interfaces.nsIRDFLiteral);
+ dump("*** titleFromHistory2 = " + titleFromHistory + "\n");
+}
if (titleFromHistory)
potentialTitle = titleFromHistory.Value;
linkTitle = potentialTitle ? potentialTitle : element;