nsTextBoxFrame doesn't layout RTL unless RTL characters are present

RESOLVED FIXED in Firefox 40

Status

()

defect
RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: gw280, Assigned: gw280)

Tracking

unspecified
mozilla40
Points:
---
Dependency tree / graph

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.
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+
Posted patch Add a reftestSplinter Review
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+
https://hg.mozilla.org/mozilla-central/rev/6dc252c85f6c
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla40
You need to log in before you can comment on or make changes to this bug.