Closed Bug 554188 Opened 10 years ago Closed 10 years ago

Packaged Unittests on 10.6 are failing tests/layout/reftests/bugs/534919-1.html

Categories

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

x86
macOS
defect
Not set
major

Tracking

()

RESOLVED FIXED

People

(Reporter: lsblakk, Assigned: jfkthame)

References

Details

Attachments

(2 files)

Attached file reftest fail snippet
We're working on getting packaged unittests running on Talos platforms - and reftests are consistently failing on snowleopard machines on just this one test.
(log snippet attached)
Blocks: 548768
Jonathan, any thoughts on this? Comparing the test/reference images from the log, it looks like there's extra spacing in the test image.
Blocks: 534919
Whiteboard: [orange]
(In reply to comment #1)
> Jonathan, any thoughts on this? Comparing the test/reference images from the
> log, it looks like there's extra spacing in the test image.

Yeah - it looks like a bug in textrun setup, triggered by the font change (fallback) at the zwnj character next to the space, perhaps only in RTL runs. I don't understand why it's failing on 10.6 machines but not on 10.5, though. I'm suspicious that it is caused by a change (bug?) in Core Text behavior on Snow Leopard, but I haven't isolated exactly what's happening yet.
Can you take this bug? It's blocking running unittests on 10.6 on tinderbox.
Ok, I've assigned it to me and will try to get to the root of it. If you want to move forward in the meantime, I'd suggest marking it random-if OS X, as it seems to depend on the OS version.
Assignee: nobody → jfkthame
Status: NEW → ASSIGNED
We can even make the "random-if" check specific to *just* 10.6 if we want -- the syntax is given in the removed line in the following (old) changeset.  The line there was for marking a test as random on OS X 10.4.
  http://hg.mozilla.org/mozilla-central/rev/b4ad886d0baf

That might be a good idea if this stays open for more than a few days, so we can still catch failures on
...so we can still catch [unexpected] failures on 10.5.
Followed up as described:
http://hg.mozilla.org/mozilla-central/rev/0b2e87e6b84e

Using fails-if also means that if something else fixes this bug, we'll know.
This seems to happen because the glyph runs that we get back from Core Text on 10.6 are different from those we were getting on 10.5; in particular, trailing whitespace and invisible glyphs (such as direction overrides) at run boundaries are not always treated the same. This is confusing the code that extracts the glyphs from Core Text and stores them into our textruns.

To fix this, I think we can use the same trick we used with the old ATSUI code, adding a non-whitespace character (such as period) when we "wrap" text in directional overrides. This ensures that any trailing whitespace in the run will not be treated as trailing by Core Text's glyph layout process, so we get consistent behavior.
Attachment #437412 - Flags: review?(roc)
Pushed fix and re-enabled the reftest:
http://hg.mozilla.org/mozilla-central/rev/6bdb8153b671
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
No longer blocks: 548768
You need to log in before you can comment on or make changes to this bug.