Граф коммитов

218 Коммитов

Автор SHA1 Сообщение Дата
Cameron McCormack 2aaac38e66 Bug 1376964 - Part 3: Add a generation counter to the user font cache. r=jfkthame
MozReview-Commit-ID: 3zCPC9Pfikc

--HG--
extra : rebase_source : 7fd68667fef4acf3ad4fd050b480feec7c2c101f
2017-07-06 16:00:34 +08:00
Carsten "Tomcat" Book d767449ced Backed out changeset 0cd32b60dabe (bug 1376964) 2017-07-12 12:41:37 +02:00
Carsten "Tomcat" Book 23de9ec977 Backed out changeset 6bfb66a2c03e (bug 1376964) 2017-07-12 12:41:35 +02:00
Carsten "Tomcat" Book 614a232c25 Backed out changeset d9a88d8324ff (bug 1376964) 2017-07-12 12:41:31 +02:00
Carsten "Tomcat" Book a269ba0e44 Backed out changeset aafb719b4379 (bug 1376964) 2017-07-12 12:41:29 +02:00
Carsten "Tomcat" Book 4177255107 Backed out changeset 041b34959d76 (bug 1376964) 2017-07-12 12:41:25 +02:00
Carsten "Tomcat" Book cefff8d9f4 Backed out changeset c40e5fbbdccf (bug 1376964) 2017-07-12 12:41:22 +02:00
Cameron McCormack 55c888b885 Bug 1376964 - Part 10: Allow style worker threads to pick fonts out of the user font cache. r=jfkthame
MozReview-Commit-ID: FX0T5ltA2u4

--HG--
extra : rebase_source : fc8a271f5ae1e0a897cd051b30da252be4176a4e
2017-07-12 16:36:46 +08:00
Cameron McCormack 82079904e6 Bug 1376964 - Part 9: Use gfxFontSrcPrincipal in the user font set and cache. r=jfkthame
MozReview-Commit-ID: LRRFbkhbgts

--HG--
extra : rebase_source : 1dac8a8e9a817edb086bb75f9f842c1d4df37a1a
2017-07-12 16:36:42 +08:00
Cameron McCormack ab22ddb3c6 Bug 1376964 - Part 7: Remove unused nsIURI argument from gfxPlatform::IsFontFormatSupported. r=jfkthame
MozReview-Commit-ID: LJ6nnZEGz7D

--HG--
extra : rebase_source : a12c270beb85467955c044c9c068d22de5db8f45
2017-07-12 16:36:15 +08:00
Cameron McCormack 47621aa57e Bug 1376964 - Part 6: Use gfxFontSrcURI in the user font set and cache. r=jfkthame
MozReview-Commit-ID: 7eWOTs4kF4v

--HG--
extra : rebase_source : 9cb5a0f71ad756b224ebc01d13437a8113e53bb1
2017-07-12 16:36:14 +08:00
Cameron McCormack a6f94afca7 Bug 1376964 - Part 4: Call FontLoadAllowed ahead of time and cache the results for style worker threads. r=jfkthame
Handling a document's node principal changing is done in part 9.

MozReview-Commit-ID: 1gPtRpddys5

--HG--
extra : rebase_source : def889e9ae4a428ccc02f9b5ac18f2ce640dc652
2017-07-12 16:35:46 +08:00
Cameron McCormack 439419baf9 Bug 1376964 - Part 3: Add a generation counter to the user font cache. r=jfkthame
MozReview-Commit-ID: 3zCPC9Pfikc

--HG--
extra : rebase_source : 7186ed96da1b1a6710ef4f5b2f1443ddfe0ddc29
2017-07-12 16:35:45 +08:00
Carsten "Tomcat" Book 488c1fa3cb Backed out changeset 381e0b72dd55 (bug 1376964) 2017-07-12 10:32:22 +02:00
Carsten "Tomcat" Book 532a99b12a Backed out changeset 20866468f52d (bug 1376964) 2017-07-12 10:32:20 +02:00
Carsten "Tomcat" Book 625eb4c653 Backed out changeset 292d20d46d1f (bug 1376964) 2017-07-12 10:32:16 +02:00
Carsten "Tomcat" Book 3a6a347356 Backed out changeset a60731cb1a7f (bug 1376964) 2017-07-12 10:32:15 +02:00
Carsten "Tomcat" Book c897b5dc70 Backed out changeset b7424dfa039c (bug 1376964) 2017-07-12 10:32:11 +02:00
Carsten "Tomcat" Book 0972af5c76 Backed out changeset 38bc7707e46f (bug 1376964) 2017-07-12 10:32:09 +02:00
Cameron McCormack 0a4aa02ea9 Bug 1376964 - Part 10: Allow style worker threads to pick fonts out of the user font cache. r=jfkthame
MozReview-Commit-ID: FX0T5ltA2u4

--HG--
extra : rebase_source : d11e47aa707965b083b364e8d2e6c4b9988985ba
2017-07-12 13:03:35 +08:00
Cameron McCormack 2fe9111db4 Bug 1376964 - Part 9: Use gfxFontSrcPrincipal in the user font set and cache. r=jfkthame
MozReview-Commit-ID: LRRFbkhbgts

--HG--
extra : rebase_source : 0fa11b180383795272e7a5daf87a41a5c51ec221
2017-07-12 13:03:35 +08:00
Cameron McCormack c4d27f68a0 Bug 1376964 - Part 7: Remove unused nsIURI argument from gfxPlatform::IsFontFormatSupported. r=jfkthame
MozReview-Commit-ID: LJ6nnZEGz7D

--HG--
extra : rebase_source : 1636e695ca025e6fbcade8258746ffb38adc5b26
2017-07-12 13:03:35 +08:00
Cameron McCormack 0732a234be Bug 1376964 - Part 6: Use gfxFontSrcURI in the user font set and cache. r=jfkthame
MozReview-Commit-ID: 7eWOTs4kF4v

--HG--
extra : rebase_source : eba5d82be3cbbeaa64a7e5f677ba365ac8aeac29
2017-07-12 13:03:35 +08:00
Cameron McCormack b2cd9f4a51 Bug 1376964 - Part 4: Call FontLoadAllowed ahead of time and cache the results for style worker threads. r=jfkthame
Handling a document's node principal changing is done in part 9.

MozReview-Commit-ID: 1gPtRpddys5

--HG--
extra : rebase_source : 5b1d40af5ad0484440075e7229dc9ae3d5a13764
2017-07-12 13:03:35 +08:00
Cameron McCormack 5b5b4e145c Bug 1376964 - Part 3: Add a generation counter to the user font cache. r=jfkthame
MozReview-Commit-ID: 3zCPC9Pfikc

--HG--
extra : rebase_source : bfc5bd72b382b538448cb90ecc1208cea08216b8
2017-07-12 13:03:35 +08:00
Jonathan Kew 4e933d3a3f Bug 1378718 - pt 2 - Remove support for persistently caching omnijar data-URI fonts in the user-font cache. r=heycam 2017-07-06 15:06:53 +01:00
Xidorn Quan 747d424555 Bug 1375944 - Increment font set generation when font-face is synchronously loaded in post-traversal. r=heycam
MozReview-Commit-ID: IJO6Uggpca4

--HG--
rename : layout/reftests/fonts/Ahem.ttf => layout/style/test/Ahem.ttf
extra : rebase_source : 0fc61d16412ff48eb50129bc614607a647293542
2017-06-28 11:14:18 -07:00
Cameron McCormack 2fadc51f72 Bug 1352531 - Make dom::FontFace cache its gfxCharacterMap instead of rebuilding it every time. r=dbaron
MozReview-Commit-ID: INmKPdC9dq5

--HG--
extra : rebase_source : a7f0636168784227fb2b6a381fa72cf652038c12
2017-04-20 17:00:59 +10:00
Cameron McCormack 756d5f5a9a Bug 1356103 - Part 9: Use a PostTraversalTask to deal with downloadable fonts in gfxUserFontSet. r=bholley,jfkthame
Here we add a new UserFontLoadState value, STATUS_LOAD_PENDING, which
represents the state just after a gfxUserFontEntry's url()-valued source
would being loading, except that we can't start the load due to being
on a Servo style worker thread.  In that case, we defer the work of
initiating the load until just after the Servo traversal is finished.

URLs that can normally be loaded synchronously, such as data: URLs
and script-implemented protocols marked as synchronous, must be
handled asynchronously when encountered during Servo traversal, since
various main-thread only work (in FontFaceSet::SyncLoadFontData) must
happen.  This is a user visible change from stock Gecko, but should
only happen when font metrics for a data: URL font are requested
due to ch/ex unit resolution when layout hasn't previously requested
the font load.  Hopefully nobody relies on synchronous resolution of
ch/ex units with data: URLs.

We unfortunately also can't pick gfxUserFontEntry objects out of the
UserFontCache during Servo traversal, since validating the cache
entry involves doing content policy checking, which is not thread-safe
(due in part to taking strong references to nsIPrincipals).

Platform fonts and ArrayBuffer-backed DOM FontFace objects continue
to be handled synchronously.

The PostTraversalTask does not take a strong reference to the
gfxUserFontEntry object, since it is held on to by the DOM FontFace
object, which itself won't go away before the PostTraversalTask
is run.

MozReview-Commit-ID: J9ODLsusrNV

--HG--
extra : rebase_source : d3e3d1dc187cb252750b57bcecd0b1ed77a15a7c
2017-04-30 14:57:25 +08:00
Iris Hsiao 0a6db9e69f Backed out 12 changesets (bug 1356103) for build bustage at PostTraversalTask.h
Backed out changeset 9fb487252c28 (bug 1356103)
Backed out changeset 301237c65945 (bug 1356103)
Backed out changeset 7bc3a4861a39 (bug 1356103)
Backed out changeset 2f383d89184b (bug 1356103)
Backed out changeset a03112e1c9d5 (bug 1356103)
Backed out changeset c60b4c9cbd83 (bug 1356103)
Backed out changeset 34280baeaabe (bug 1356103)
Backed out changeset 31a0881cfb47 (bug 1356103)
Backed out changeset 529d037f9c33 (bug 1356103)
Backed out changeset 1c7831db6b07 (bug 1356103)
Backed out changeset 559f06e32df3 (bug 1356103)
Backed out changeset 784865d234cd (bug 1356103)
2017-05-04 17:56:25 +08:00
Cameron McCormack d3acda35aa Bug 1356103 - Part 9: Use a PostTraversalTask to deal with downloadable fonts in gfxUserFontSet. r=bholley,jfkthame
Here we add a new UserFontLoadState value, STATUS_LOAD_PENDING, which
represents the state just after a gfxUserFontEntry's url()-valued source
would being loading, except that we can't start the load due to being
on a Servo style worker thread.  In that case, we defer the work of
initiating the load until just after the Servo traversal is finished.

URLs that can normally be loaded synchronously, such as data: URLs
and script-implemented protocols marked as synchronous, must be
handled asynchronously when encountered during Servo traversal, since
various main-thread only work (in FontFaceSet::SyncLoadFontData) must
happen.  This is a user visible change from stock Gecko, but should
only happen when font metrics for a data: URL font are requested
due to ch/ex unit resolution when layout hasn't previously requested
the font load.  Hopefully nobody relies on synchronous resolution of
ch/ex units with data: URLs.

We unfortunately also can't pick gfxUserFontEntry objects out of the
UserFontCache during Servo traversal, since validating the cache
entry involves doing content policy checking, which is not thread-safe
(due in part to taking strong references to nsIPrincipals).

Platform fonts and ArrayBuffer-backed DOM FontFace objects continue
to be handled synchronously.

The PostTraversalTask does not take a strong reference to the
gfxUserFontEntry object, since it is held on to by the DOM FontFace
object, which itself won't go away before the PostTraversalTask
is run.

MozReview-Commit-ID: J9ODLsusrNV

--HG--
extra : rebase_source : 1651e2917bd31b87fc1c1be94b0eced1273df86a
2017-04-30 14:57:25 +08:00
Manish Goregaokar 6be22491bd Bug 1341724 - Part 4: stylo: Make font metrics usage threadsafe; r=heycam
MozReview-Commit-ID: 3EqpUy09UuI
2017-04-10 17:06:19 +08:00
Jeff Muizelaar da3210576b Bug 1119128. Eliminate gfxPangoFontGroup and gfxFontconfigUtils. r=lsalzman 2017-03-22 14:58:19 -04:00
Jonathan Kew a43a48e31a Bug 1341085 - Implement a pref that allows OpenType Variation tables to bypass the sanitizer, as it doesn't know about them. r=jrmuizel 2017-02-20 18:00:54 +00:00
Jonathan Kew 8121d39a0b Bug 1331737 - Expose a pref to control the validation of OpenType Layout tables, so that Nightly/Aurora users can choose to bypass validation (like we do on Beta/Release) if they really want out-of-spec fonts to be loaded. r=jrmuizel 2017-02-16 17:16:09 +00:00
Jonathan Kew 8b97dd574a Bug 1329293 - Truncate overly long URIs in downloadable font error/warning messages. r=jrmuizel 2017-01-18 20:38:04 +00:00
Jonathan Kew 7dac7f4e74 Bug 1315642 - Check that font resource decoded/sanitized by OTS is a usable OpenType format (in particular, we do NOT yet support TrueType Collection resources, even though OTS can decode them). r=jrmuizel 2016-11-14 14:54:23 +00:00
Sebastian Hengst cdcc9e20da Bug 1304829 - rename RELEASE_BUILD to RELEASE_OR_BETA: main part. r=ted,Mossop
MozReview-Commit-ID: 1lCt0xTMV5O
2016-10-08 11:14:49 +02:00
Jonathan Kew 6e6135e988 Bug 1306715 - Ignore the font whitelist if we're not using a gfxPlatformFontList backend (i.e. using the old Linux/fontconfig backend). r=jrmuizel 2016-10-06 21:00:24 +01:00
Arthur Edelstein cdccbe2abb Bug 1121643 - Add "font.system.whitelist" pref to resist font-based fingerprinting. r=jfkthame 2016-08-23 00:06:07 +00:00
Nicholas Nethercote 742fc7eb48 Bug 1297961 (part 1) - Introduce nsURI::GetSpecOrDefault(). r=hurley.
This function is an infallible alternative to nsIURI::GetSpec(). It's useful
when it's appropriate to handle a GetSpec() failure with a failure string, e.g.
for log/warning/error messages. It allows code like this:

  nsAutoCString spec;
  uri->GetSpec(spec);
  printf("uri: %s", spec.get());

to be changed to this:

  printf("uri: %s", uri->GetSpecOrDefault().get());

This introduces a slight behavioural change. Previously, if GetSpec() failed,
an empty string would be used here. Now, "[nsIURI::GetSpec failed]" will be
produced instead. In most cases this failure string will make for a clearer
log/warning/error message than the empty string.
* * *
Bug 1297961 (part 1b) - More GetSpecOrDefault() additions. r=hurley.

I will fold this into part 1 before landing.

--HG--
extra : rebase_source : ddc19a5624354ac098be019ca13cc24b99b80ddc
2016-08-26 16:02:31 +10:00
Nicholas Nethercote c2306345d5 Bug 1297658 - Avoid unnecessary checking in memory reporters. r=erahm.
This patch removes checking of all the callback calls in memory reporter
CollectReport() functions, because it's not useful.

The patch also does some associated clean-up.

- Replaces some uses of nsIMemoryReporterCallback with the preferred
  nsIHandleReportCallback typedef.

- Replaces aCallback/aCb/aClosure with aHandleRepor/aData for CollectReports()
  parameter names, for consistency.

- Adds MOZ_MUST_USE/[must_use] in a few places in nsIMemoryReporter.idl.

- Uses the MOZ_COLLECT_REPORT macro in all suitable places.

Overall the patch reduces code size by ~300 lines and reduces the size of
libxul by about 37 KiB on my Linux64 builds.

--HG--
extra : rebase_source : e94323614bd10463a0c5134a7276238a7ca1cf23
2016-08-24 15:23:45 +10:00
David Anderson 572069e3e9 Move D3D11 checking logic out of gfxWindowsPlatform. (bug 1282364 part 2, r=mattwoodrow)
--HG--
extra : rebase_source : df247cc5d03a111075eb4b201618dd957213d76f
2016-07-26 13:19:48 -07:00
Andi-Bogdan Postelnicu 5ddeb9e636 Bug 1273409 - add assert for mFontEntry. r=jrmuizel
MozReview-Commit-ID: 645INbJtJFq

--HG--
extra : rebase_source : 6beea5fcd4ade24f7d45eb704334f6e0aa5f7f00
2016-05-17 12:05:23 +03:00
Nicholas Nethercote 98af1a5331 Bug 1271164 - Add a missing null check in user font memory reporting. r=jfkthame.
--HG--
extra : rebase_source : 139652b681a50b3a38c0d3e99578db9ae32b8195
2016-05-09 11:57:44 +10:00
Jonathan Kew fb5e0a3be3 Bug 1268021 - Implement memory reporting for the user-font cache. r=njn 2016-05-03 12:14:34 +01:00
Jonathan Kew 1be69b60f6 Backout 86bea1a981f9 (bug 1268021) for causing Windows crashes on a CLOSED TREE. 2016-05-03 13:36:28 +01:00
Jonathan Kew a4e2a6456b Bug 1268878 - Include various of gfxFontEntry's sub-objects in memory reporting. r=njn 2016-05-03 12:14:35 +01:00
Jonathan Kew 11b4815d30 Bug 1268951 - Reallocate sanitized user font data into an appropriately-sized block, to reduce ongoing RAM footprint. r=jrmuizel 2016-05-03 12:14:34 +01:00
Jonathan Kew d1f897d72c Bug 1268021 - Implement memory reporting for the user-font cache. r=njn 2016-05-03 12:14:34 +01:00