nsTextBoxFrame doesn't layout RTL unless RTL characters are present

RESOLVED FIXED in Firefox 40

Status

()

RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: gw280, Assigned: gw280)

Tracking

unspecified
mozilla40
Points:
---

Firefox Tracking Flags

(e10sm6+, firefox40 fixed)

Details

Attachments

(2 attachments)

If you style a XUL label with "direction: rtl;", unless it contains RTL characters, it prematurely optimises away the bidi processing.

We should change it to also do bidi processing if the CSS style is set to RTL.
Created attachment 8593561 [details] [diff] [review]
rtl-nstextboxframe.patch
Attachment #8593561 - Flags: review?(roc)
Blocks: 1103635
Comment on attachment 8593561 [details] [diff] [review]
rtl-nstextboxframe.patch

Review of attachment 8593561 [details] [diff] [review]:
-----------------------------------------------------------------

::: layout/xul/nsTextBoxFrame.cpp
@@ +636,5 @@
>                                                aRenderingContext);
>      if (titleWidth <= aWidth) {
>          mCroppedTitle = mTitle;
> +        if (HasRTLChars(mTitle) ||
> +            StyleContext()->StyleVisibility()->mDirection == NS_STYLE_DIRECTION_RTL) {

StyleContext()-> is redundant, remove it
Attachment #8593561 - Flags: review?(roc) → review+

Comment 4

4 years ago
Created attachment 8594006 [details] [diff] [review]
Add a reftest
Attachment #8594006 - Flags: review?(gwright)
Comment on attachment 8594006 [details] [diff] [review]
Add a reftest

Review of attachment 8594006 [details] [diff] [review]:
-----------------------------------------------------------------

Oops, sorry I forgot to do this!
Attachment #8594006 - Flags: review?(gwright) → review+

Updated

4 years ago
tracking-e10s: --- → m6+
https://hg.mozilla.org/mozilla-central/rev/6dc252c85f6c
Status: NEW → RESOLVED
Last Resolved: 4 years ago
status-firefox40: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla40
You need to log in before you can comment on or make changes to this bug.