[webkit-help] RTL
Jarek M
barcode at o2.pl
Fri Sep 21 01:27:10 PDT 2012
Hi.
I got a somewhat odd question to ask. I am working with an older version of wekbit, 2010 namely (http://opensource.apple.com/source/WebCore/WebCore-855.7/)
This version has a problem when displaying RTL text, the letters end up displayed LTR, the characters are mirrored.
I managed to use fribidi inside TextRun to get things converted, however TextRun is called so many times, I dont think it is efficient.
Is anyone aware why that version of webkit is having such RTL problems and what could be done about it? I ran few tests on the code and it seems the problem is in RenderBlockLineLayout.cpp (Webcore/rendering), method layoutInlineChildren, class RenderBlock, void return type.
The function fails on the following if condition:
BidiRun* trailingSpaceRun = 0;
if (!previousLineBrokeCleanly && resolver.runCount()
&& resolver.logicallyLastRun()->m_object->style()->breakOnlyAfterWhiteSpace() && resolver.logicallyLastRun()->m_object->style()->autoWrap())
The third condition resolver.logicallyLastRun()->m_object->style()->breakOnlyAfterWhiteSpace() is false.
Has anyone been long enough to be aware of problems with this implementation? From what I see the later versions got completely redesigned and RenderBlockLineLayout got simplified quite a bit.
I'm wondering right now is it worth merging later versions or just to stick to fribidi ;-) or/and what kind of problems were in this early implementation. Does webkit handle converting to RTL? If so, does it use some sort of heuristics (fribidi) or does it need RTL indicator in HTML.
Any help greatly appreciated, the problem is I cannot really run the code in debugger (there are certain conditions here), all I can do is to dump debug statements to the screen or file.
Best Regards and Thanx,
Jarek
More information about the webkit-help
mailing list