implement @font-face { src:local() } on Linux

RESOLVED FIXED in mozilla1.9.1b3

Status

()

P4
normal
RESOLVED FIXED
10 years ago
10 years ago

People

(Reporter: karlt, Assigned: karlt)

Tracking

({fixed1.9.1, platform-parity})

Trunk
mozilla1.9.1b3
x86
Linux
fixed1.9.1, platform-parity
Points:
---
Dependency tree / graph
Bug Flags:
blocking1.9.1 +
in-testsuite +

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments, 3 obsolete attachments)

Comment hidden (empty)
(Assignee)

Comment 1

10 years ago
I guess this blocks 1.9.1 for platform parity reasons, at least.
Flags: blocking1.9.1?
Flags: blocking1.9.1? → blocking1.9.1+
Priority: -- → P4
(Assignee)

Updated

10 years ago
Depends on: 469752
(Assignee)

Comment 2

10 years ago
Posted patch patch (obsolete) — Splinter Review
I'll do a little more testing and see if I can put together some reftests.

This patch also changes the creation of patterns for gfxDownloadedFcFontEntry from lazy to immediate.  Fonts are only downloaded when they are expected to be used, so lazy creation of patterns was an unnecessary complication.
(In reply to comment #2)
> I'll do a little more testing and see if I can put together some reftests.

That sounds a little challenging, but I can imagine you might be able to put something together using nsIFontEnumerator:
http://mxr.mozilla.org/mozilla-central/source/gfx/idl/nsIFontEnumerator.idl
You might actually want to combine that with the reftest-inside-mochitest stuff that bz put together:
http://mxr.mozilla.org/mozilla-central/search?string=WindowSnapshot
(That would let you find a 'font-family: foo' that causes the text to appear different from 'font-family: bar', and then check that you get the expected results with src:local(foo) and src:local(bar) in various combinations, including, perhaps, fun with other descriptors.)

But if you had other ideas for how to test, don't let this one stop you...
(Assignee)

Comment 4

10 years ago
Posted patch reftestSplinter Review
Thanks for your suggestions, David.  My plans weren't quite that fancy.

This just tries a set of fonts, at least one of which is expected to be present on almost every system.
(Assignee)

Comment 5

10 years ago
Posted patch patch v1.0.1 (obsolete) — Splinter Review
Corrected a wrong variable name being used by non-OpenType fonts (detected by the reftest).
Attachment #354274 - Attachment is obsolete: true
Attachment #354474 - Flags: review?(roc)
(Assignee)

Comment 6

10 years ago
Posted patch patch v1.0.2 (obsolete) — Splinter Review
correction to the wrong variable correction
Attachment #354474 - Attachment is obsolete: true
Attachment #354480 - Flags: review?(roc)
Attachment #354474 - Flags: review?(roc)
For what it's worth, there's an existing test that does the font-enumerator half of comment 3, in layout/base/tests/test_bug394057.html .
Comment on attachment 354480 [details] [diff] [review]
patch v1.0.2

+    if (mPatterns.Length() != 0) {
         // Remove back reference to this font entry and the face in case
         // anyone holds a reference to the pattern.

Shouldn't we assert here that mPatterns.Length() == 1? It seems to me that a gfxDownloadedFcFontEntry never has more than one pattern, is that true? If so, should be documented.

Otherwise the patch looks good.
Attachment #354480 - Flags: review?(roc) → review+
(Assignee)

Comment 9

10 years ago
Posted patch patch v1.1Splinter Review
(In reply to comment #8)
> Shouldn't we assert here that mPatterns.Length() == 1? It seems to me that a
> gfxDownloadedFcFontEntry never has more than one pattern, is that true? If so,
> should be documented.

Yes, that's right.  Added assertion, as well as a comment in InitPattern().
Attachment #354480 - Attachment is obsolete: true
(Assignee)

Comment 10

10 years ago
Fixed on m-c:
http://hg.mozilla.org/mozilla-central/rev/b66168eafccb

In testsuite:
http://hg.mozilla.org/mozilla-central/rev/073903c476f3
Status: ASSIGNED → RESOLVED
Last Resolved: 10 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.1b3
(Assignee)

Comment 12

10 years ago
Forgot some new files in the reftest on 1.9.1:
http://hg.mozilla.org/releases/mozilla-1.9.1/rev/9152e412a70f
You need to log in before you can comment on or make changes to this bug.