[Webkit-unassigned] [Bug 52128] ISO-8859-8 Hebrew text displayed reversed with dir="rtl"

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jan 11 15:47:49 PST 2011


https://bugs.webkit.org/show_bug.cgi?id=52128





--- Comment #8 from Xiaomei Ji <xji at chromium.org>  2011-01-11 15:47:48 PST ---
Following change fixes the problem.

Index: RenderBlockLineLayout.cpp
===================================================================
--- RenderBlockLineLayout.cpp   (revision 75315)
+++ RenderBlockLineLayout.cpp   (working copy)
@@ -269,7 +269,7 @@
         parentBox->addToLine(box);

         bool visuallyOrdered = r->m_object->style()->visuallyOrdered();
-        box->setBidiLevel(visuallyOrdered ? 0 : r->level());
+        box->setBidiLevel(visuallyOrdered ? (style()->isLeftToRightDirection()
? 0 : 1) : r->level());

         if (box->isInlineTextBox()) {
             InlineTextBox* text = static_cast<InlineTextBox*>(box);




One question is how to handle the following case:
<div>שנב <span dir=rtl>גקכ</span></div>

FF and IE give different result on displaying גקכ. FF displays it LTR, while IE displays it RTL. 

RFC1556 says:
Visual

   Visual directionality is a presentation method that displays text
   according to the primary display direction only, which is left to
   right.  All text is viewed in the same direction which is the primary
   display direction.  The displaying application is not aware of the
   contents direction and displays the text as if it were a uni-
   directional text.  The composing application needs to prepare the
   text in such a way that it will be displayed correctly.  No control
   characters or algorithms are used to determine how the data is to be
   displayed. This is the simplest of all methods and the default method
   for use with MIME encoded texts.


Looks like using the block's directionality as primary display directionality is more reasonable. Above fix matches the FF behavior.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the webkit-unassigned mailing list