[Webkit-unassigned] [Bug 24187] RTL: tooltip does not get its directionality from its element's directionality
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri May 29 14:39:52 PDT 2009
https://bugs.webkit.org/show_bug.cgi?id=24187
------- Comment #4 from xji at chromium.org 2009-05-29 14:39 PDT -------
The following patch in HitTestResult::title() seems fixes the bug, but I am not
sure whether this is the right place to fix it and whether this is the right
fix.
Please advice.
Index: HitTestResult.cpp
===================================================================
--- HitTestResult.cpp (revision 43938)
+++ HitTestResult.cpp (working copy)
@@ -21,6 +21,7 @@
#include "config.h"
#include "HitTestResult.h"
+#include "CharacterNames.h"
#include "Frame.h"
#include "FrameTree.h"
#include "HTMLAnchorElement.h"
@@ -180,8 +181,24 @@
for (Node* titleNode = m_innerNode.get(); titleNode; titleNode =
titleNode-
>parentNode()) {
if (titleNode->isElementNode()) {
String title = static_cast<Element*>(titleNode)->title();
- if (!title.isEmpty())
- return title;
+ if (!title.isEmpty()) {
+ String displayTitle;
+ const RenderObject* renderer = titleNode->renderer();
+ if (!renderer)
+ return title;
+ if (renderer->style()->direction() == LTR) {
+ // This node is a LTR node.
+ displayTitle.append(leftToRightEmbed);
+ displayTitle.append(title);
+ displayTitle.append(popDirectionalFormatting);
+ } else {
+ // This node is an RTL node.
+ displayTitle.append(rightToLeftEmbed);
+ displayTitle.append(title);
+ displayTitle.append(popDirectionalFormatting);
+ }
+ return displayTitle;
+ }
}
}
return String();
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
More information about the webkit-unassigned
mailing list