Closed Bug 1370053 Opened 3 years ago Closed 3 years ago

Bidi reordering regression in gmail compose message


(Core :: Layout: Text and Fonts, defect)

Not set



Tracking Status
firefox55 --- fixed


(Reporter: smontagu, Assigned: jfkthame)




(2 files)

I didn't manage to create a reduced testcase for this, but I can reliably reproduce it in gmail with the display language set to an RTL language.

Steps to reproduce: 

start to compose a new message in gmail
type a single LTR character in the "To" textbox ("אל" in Hebrew), e.g. J

expected results:
Contacts whose name begins with J appear in a listbox, correctly ordered, with J in boldface

actual results:
The bold J appears at the end of the contacts' names, e.g. "ohn SmithJ"

Regression range:
Yes, I can reliably reproduce this in gmail, though I haven't come up with a simplified testcase yet.

The problem seems to arise from the code in ResolveParagraph that takes a short-circuit in the case of an empty textframe. I have a patch that I think may fix the issue; I've pushed a try job ( and will post it for review if that looks OK.
OK, this fixes the bug seen in gmail, and doesn't regress anything else (afaict so far...)
Attachment #8874740 - Flags: review?(smontagu)
Assignee: nobody → jfkthame
While we're here, a couple of typos caught my eye. (No actual code changes here.)
Attachment #8874741 - Flags: review?(smontagu)
Attachment #8874740 - Flags: review?(smontagu) → review+
Attachment #8874741 - Flags: review?(smontagu) → review+
Could you add a test for it?
I'd like to, but so far I haven't come up with a reasonable-sized testcase (i.e. something less than interacting with the Compose panel on a Gmail page!) that reproduces the bug. Simply trying to recreate a similar frame subtree doesn't seem to be sufficient; I think it may be dependent on exactly how it gets dynamically created. (I guess that's not totally surprising, considering that bug 489887 -- where the special handling of an empty text node was originally added -- was about inconsistency after a dynamic change.)
Bug 1370053 - Don't do the empty-frame short-circuit in ResolveParagraph until after updating the current bidi run if necessary. r=smontagu
Bug 1370053 - Fix a couple of comment/variable-name typos in ResolveParagraph. r=smontagu
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
Depends on: 1426042
You need to log in before you can comment on or make changes to this bug.