Bug 91312 TITLE texts should follow the same BiDi directionality as the source object

patch by mozilla-bugzilla@future.shiny.co.il r=smontagu sr=roc a=asa
This commit is contained in:
timeless%mozdev.org 2004-07-10 00:56:41 +00:00
Родитель 921ed2d43c
Коммит 352b310090
1 изменённых файлов: 3 добавлений и 0 удалений

Просмотреть файл

@ -354,17 +354,20 @@ function FillInHTMLTooltip(tipElement)
var titleText = null; var titleText = null;
var XLinkTitleText = null; var XLinkTitleText = null;
var direction = "inherit";
while (!titleText && !XLinkTitleText && tipElement) { while (!titleText && !XLinkTitleText && tipElement) {
if (tipElement.nodeType == Node.ELEMENT_NODE) { if (tipElement.nodeType == Node.ELEMENT_NODE) {
titleText = tipElement.getAttribute("title"); titleText = tipElement.getAttribute("title");
XLinkTitleText = tipElement.getAttributeNS(XLinkNS, "title"); XLinkTitleText = tipElement.getAttributeNS(XLinkNS, "title");
direction = tipElement.ownerDocument.defaultView.getComputedStyle(tipElement, "").getPropertyValue("direction");
} }
tipElement = tipElement.parentNode; tipElement = tipElement.parentNode;
} }
var texts = [titleText, XLinkTitleText]; var texts = [titleText, XLinkTitleText];
var tipNode = document.getElementById("aHTMLTooltip"); var tipNode = document.getElementById("aHTMLTooltip");
tipNode.style.direction = direction;
for (var i = 0; i < texts.length; ++i) { for (var i = 0; i < texts.length; ++i) {
var t = texts[i]; var t = texts[i];