From 2c0e8a2bb425f91e6ebb908bbc2b1a5373007717 Mon Sep 17 00:00:00 2001 From: "gavin@gavinsharp.com" Date: Thu, 12 Jul 2007 08:04:00 -0700 Subject: [PATCH] Bug 387685: clean up Firefox tooltip code now that bug 279703 has landed (back out most of the patch for bug 218223), r=Enn (original SeaMonkey patch by Neil Rashbrook in bug 386390) --- browser/base/content/browser.js | 12 +++++------- browser/base/content/browser.xul | 6 +----- browser/themes/pinstripe/browser/browser.css | 7 ------- browser/themes/winstripe/browser/browser.css | 7 ------- 4 files changed, 6 insertions(+), 26 deletions(-) diff --git a/browser/base/content/browser.js b/browser/base/content/browser.js index 1e8b480f18a..3025a8f1054 100644 --- a/browser/base/content/browser.js +++ b/browser/base/content/browser.js @@ -2608,12 +2608,11 @@ function FillInHTMLTooltip(tipElement) tipElement = tipElement.parentNode; } - var tipNode = document.getElementById("aHTMLTooltip").firstChild; - var label = tipNode.firstChild; - + var tipNode = document.getElementById("aHTMLTooltip"); + tipNode.style.direction = direction; + for each (var t in [titleText, XLinkTitleText]) { if (t && /\S/.test(t)) { - tipNode.style.direction = direction; // Per HTML 4.01 6.2 (CDATA section), literal CRs and tabs should be // replaced with spaces, and LFs should be removed entirely. @@ -2622,9 +2621,8 @@ function FillInHTMLTooltip(tipElement) // distinguish that from a literal character in the source by this point. t = t.replace(/[\r\t]/g, ' '); t = t.replace(/\n/g, ''); - - label.textContent = t; - + + tipNode.setAttribute("label", t); retVal = true; } } diff --git a/browser/base/content/browser.xul b/browser/base/content/browser.xul index ab66a74dcfa..95397d79006 100644 --- a/browser/base/content/browser.xul +++ b/browser/base/content/browser.xul @@ -101,11 +101,7 @@ onpopupshowing="return BrowserForwardMenu(event);" oncommand="gotoHistoryIndex(event);" onclick="checkForMiddleClick(this, event);"/> - - - - + diff --git a/browser/themes/pinstripe/browser/browser.css b/browser/themes/pinstripe/browser/browser.css index 8f8c41cb00b..f2e00a37682 100755 --- a/browser/themes/pinstripe/browser/browser.css +++ b/browser/themes/pinstripe/browser/browser.css @@ -1332,10 +1332,3 @@ toolbarbutton.bookmark-item[dragover="true"][open="true"] { -moz-border-bottom-colors: -moz-mac-menushadow -moz-mac-menushadow ThreeDShadow !important; -moz-border-left-colors: ThreeDLightShadow ThreeDHighlight !important; } - -/* ::::: Tooltips (multi-line) from content ::::: */ -.htmltooltip-label { - max-width: 40em; - margin: 0; - white-space: -moz-pre-wrap; -} diff --git a/browser/themes/winstripe/browser/browser.css b/browser/themes/winstripe/browser/browser.css index 8f323d87fb3..308f59e0b35 100644 --- a/browser/themes/winstripe/browser/browser.css +++ b/browser/themes/winstripe/browser/browser.css @@ -1460,10 +1460,3 @@ toolbarbutton.bookmark-item[dragover="true"][open="true"] { -moz-border-bottom-colors: #000000; } %endif - -/* ::::: Tooltips (multi-line) from content ::::: */ -.htmltooltip-label { - max-width: 40em; - margin: 0; - white-space: -moz-pre-wrap; -}