Closed Bug 1155015 Opened 5 years ago Closed 5 years ago

haXe-Starling demo fails due to document.fonts error

Categories

(Core :: DOM: Core & HTML, defect)

x86
Linux
defect
Not set

Tracking

()

RESOLVED FIXED
mozilla40
Tracking Status
firefox40 --- fixed

People

(Reporter: azakai, Assigned: heycam)

References

()

Details

Attachments

(1 file)

The HTML5 demo on this page

http://blog.peteshand.net/starling-for-haxe/

fails to load on firefox nightly with "NS_ERROR_NOT_IMPLEMENTED:".

The failing line is

  if(window.document.fonts && window.document.fonts.load) window.document.fonts.load("1em '" + font + "'").then(function(_) {

so looks like something to do with document.fonts.

The page works properly in chrome.
FontFaceSet::Load just always throws NS_ERROR_NOT_IMPLEMENTED.  So yes, the line above would fail.

Seems to me like we should put load() behind a separate pref from the main font API, if we're not going to implement it at the same time...  or flip back the pref on the main font API, becuase otherwise we'll break stuff on nightly and aurora.

The bug tracking implementing load() is bug 1072102, fwiw.
Blocks: 1088437
Depends on: 1072102
Flags: needinfo?(cam)
Is there an advantage to putting load/check behind a separate pref?  How about just commenting out the IDL bits for load/check and then once we land support for them put them under the existing Font Loading API pref?
Flags: needinfo?(cam) → needinfo?(bzbarsky)
That sounds just fine too, yes.
Flags: needinfo?(bzbarsky)
Attached patch patchSplinter Review
I trust this patch is small enough to bypass your "not doing reviews" filter. :)

Turns out we already had check commented out, too.
Assignee: nobody → cam
Status: NEW → ASSIGNED
Attachment #8593678 - Flags: review?(bzbarsky)
Comment on attachment 8593678 [details] [diff] [review]
patch

r=me
Attachment #8593678 - Flags: review?(bzbarsky) → review+
https://hg.mozilla.org/mozilla-central/rev/bc1d404bec20
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla40
QA Whiteboard: [good first verify]
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.