RESOLVED FIXED 103869
INPUT_MULTIPLE_FIELDS_UI doesn't render digits well in RTL locales
https://bugs.webkit.org/show_bug.cgi?id=103869
Summary INPUT_MULTIPLE_FIELDS_UI doesn't render digits well in RTL locales
Kent Tamura
Reported 2012-12-03 02:03:49 PST
http://code.google.com/p/chromium/issues/detail?id=163108 Many RTL locales use LTR digits. So, we should show "23:59" (visual order) for "23:59" (logical order) even in an RTL locale. WebCore applies such bidi re-ordering automatically. However, we wrap these characters with display:inline-block elements in INPUT_MULTIPLE_FIELDS_UI and WebCore can't apply the bidi re-ordering to block elements. We should use display:inline in INPUT_MULTIPLE_FIELDS_UI.
Attachments
Patch (571.16 KB, patch)
2012-12-03 21:12 PST, Kent Tamura
morrita: review+
Kent Tamura
Comment 1 2012-12-03 21:12:01 PST
Kentaro Hara
Comment 2 2012-12-03 22:22:38 PST
Comment on attachment 177412 [details] Patch morrita-san: I'm not familiar with the code. Could you take a look?
Hajime Morrita
Comment 3 2012-12-05 21:34:43 PST
Comment on attachment 177412 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=177412&action=review > Source/WebCore/dom/Element.h:398 > + virtual bool isDateTimeFieldElement() const; Nit: OK to be inlined like other isXxxElement(). Having extra if/endif in .cpp file seems a bit mess. > Source/WebCore/html/shadow/DateTimeEditElement.cpp:358 > + width += static_cast<DateTimeFieldElement*>(childElement)->maximumWidth(style->font()); You might able to override didStyleRecalc() instead of this one. It allows you to modify createdStyle. > Source/WebCore/html/shadow/DateTimeEditElement.cpp:362 > + width += style->font().width(childElement->textContent()); Doesn't textContent() change?
Hajime Morrita
Comment 4 2012-12-05 21:46:04 PST
Comment on attachment 177412 [details] Patch I hope there were better way to handle this kind of workaround. I have no good idea though.
Kent Tamura
Comment 5 2012-12-05 22:40:58 PST
Comment on attachment 177412 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=177412&action=review >> Source/WebCore/html/shadow/DateTimeEditElement.cpp:362 >> + width += style->font().width(childElement->textContent()); > > Doesn't textContent() change? Right. It is fixed.
Kent Tamura
Comment 6 2012-12-05 22:42:29 PST
(In reply to comment #4) > (From update of attachment 177412 [details]) > I hope there were better way to handle this kind of workaround. I have no good idea though. The calculation is a kind of layout. So the ideal solution might be to add a new renderer ;-(
Kent Tamura
Comment 7 2012-12-05 23:11:20 PST
Note You need to log in before you can comment on or make changes to this bug.