Closed
Bug 518357
Opened 15 years ago
Closed 15 years ago
make reftests less sensitive to default font settings
Categories
(Core :: Layout, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: jfkthame, Unassigned)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
39.63 KB,
patch
|
roc
:
review+
|
Details | Diff | Splinter Review |
We have a number of reftests that are liable to fail if the browser's font settings are changed from the defaults (or in some cases, they might fail if the available fonts on the platform are not "as expected").
This showed up as a number of reftest failures when I was running tests with Charis SIL as my default serif font (primarily chosen for its large character repertoire and good diacritic support, when testing the Core Text backend). Charis has unusually tall font metrics, and this led to a couple of dozen test failures where the increased metrics affected the testcase and reference pages in different ways.
For comparison, I also tried running reftest with the default font set to Times 32 (instead of Times 16); this led to a similiar collection of failures.
Ideally, reftests would be independent of the exact font defaults in the browser; this will make them more robust across platforms and configurations, and may be increasingly important as we deal with different devices and display resolutions.
The attached patch modifies a number of tests that failed, making them more robust in the face of varying font settings. Two main strategies are used in this patch:
(1) Replace pixel-oriented dimensions in the tests with dimensions expressed in "em", so that the entire test scales according to the browser's font size. In general, I prefer this approach.
However, with some tests it may become tricky to handle all the relevant dimensions in a consistent way, while preserving the intent of the test, so in a number of cases, I used an alternative:
(2) Force the font size in the test to 16px (or sometimes smaller, to allow for fonts like Charis with unusually tall metrics), so that text does not extend beyond the area that was expected.
Attachment #402364 -
Flags: review?(roc)
Attachment #402364 -
Flags: review?(roc) → review+
Reporter | ||
Comment 1•15 years ago
|
||
pushed to mozilla-central:
http://hg.mozilla.org/mozilla-central/rev/d88156be6c3f
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Reporter | ||
Comment 2•15 years ago
|
||
The change to media-query-remove-1 turned out to be fragile on Linux tinderboxen, so was reverted to the previous state:
http://hg.mozilla.org/mozilla-central/rev/dd3b6bdeb0f7
You need to log in
before you can comment on or make changes to this bug.
Description
•