Closed Bug 1155359 Opened 10 years ago Closed 10 years ago

nsTextBoxFrame doesn't layout RTL unless RTL characters are present

Categories

(Core :: XUL, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla40
Tracking Status
e10s m6+ ---
firefox40 --- fixed

People

(Reporter: gw280, Assigned: gw280)

References

Details

Attachments

(2 files)

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+
Attached 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+
tracking-e10s: --- → m6+
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla40
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: