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

92 Коммитов

Автор SHA1 Сообщение Дата
Jonathan Kew 1e295dc3cc Bug 1619350 - patch 1 - Add a FontVisibility enumeration to determine whether fonts should be visible by name to CSS, and provide a visibility field in font family records. r=jwatt
This replaces and extends the "hidden" flag we currently use on macOS to mark internal system fonts
like .LastResort and .Keyboard that should not be exposed; rather than just a boolean "hidden" flag
we'll have several levels of visibility, some of which the user may opt in to exposing (at the cost
of potentially becoming more fingerprintable).

The current patch assumes three levels besides always-hidden:

  Base     - fonts that are part of the base OS install and always available
  LangPack - fonts that are provided by the OS subject to user's chosen language options
  User     - user-installed fonts that were not provided by the OS

(This categorization may be subject to revision as we learn more about real-world needs and
configurations.)

Differential Revision: https://phabricator.services.mozilla.com/D66124

--HG--
extra : moz-landing-system : lando
2020-04-02 12:36:24 +00:00
Ciure Andrei e1cb0f1e21 Backed out 4 changesets (bug 1619349, bug 1619350) for causing test_font_whitelist.html to fail CLOSED TREE
Backed out changeset ba16b09b5da0 (bug 1619349)
Backed out changeset f8ca02252dfc (bug 1619349)
Backed out changeset 01a2a527aa1a (bug 1619350)
Backed out changeset 67ee13868a44 (bug 1619350)
2020-04-02 04:34:31 +03:00
Jonathan Kew 503dffb1e0 Bug 1619350 - patch 1 - Add a FontVisibility enumeration to determine whether fonts should be visible by name to CSS, and provide a visibility field in font family records. r=jwatt
This replaces and extends the "hidden" flag we currently use on macOS to mark internal system fonts
like .LastResort and .Keyboard that should not be exposed; rather than just a boolean "hidden" flag
we'll have several levels of visibility, some of which the user may opt in to exposing (at the cost
of potentially becoming more fingerprintable).

The current patch assumes three levels besides always-hidden:

  Base     - fonts that are part of the base OS install and always available
  LangPack - fonts that are provided by the OS subject to user's chosen language options
  User     - user-installed fonts that were not provided by the OS

(This categorization may be subject to revision as we learn more about real-world needs and
configurations.)

Differential Revision: https://phabricator.services.mozilla.com/D66124

--HG--
extra : moz-landing-system : lando
2020-03-26 18:39:43 +00:00
Jonathan Kew 315b16ea22 Bug 1621248 - Declare various gfxPlatform and font-list subclasses as 'final'. r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D66204

--HG--
extra : moz-landing-system : lando
2020-03-10 15:00:56 +00:00
Jonathan Kew 300d6b5a42 Bug 1514869 - patch 2 - Adapt platform-font-list code to work with either the existing in-process font list or cross-process shared font list. r=jwatt
Differential Revision: https://phabricator.services.mozilla.com/D22938

--HG--
extra : moz-landing-system : lando
2019-04-27 15:37:58 +00:00
Jonathan Kew d2a3361fa4 Bug 1533428 - patch 7 - Create a FontFamily type that wraps either a gfxFontFamily pointer or a mozilla::fontlist::Family pointer (to be used by the shared font list), and use this in various places where we need to pass families around. r=jwatt
Differential Revision: https://phabricator.services.mozilla.com/D22934

--HG--
extra : moz-landing-system : lando
2019-04-01 14:33:34 +00:00
Tooru Fujisawa 7983faeb5d Bug 1511393 - Use c-basic-offset: 2 in Emacs mode line for C/C++ code. r=nbp 2018-12-01 04:52:05 +09:00
Sylvestre Ledru 265e672179 Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
# ignore-this-changeset

--HG--
extra : amend_source : 4d301d3b0b8711c4692392aa76088ba7fd7d1022
2018-11-30 11:46:48 +01:00
Jonathan Kew 6f42f167fb Bug 1490402 - Use UTF-8 strings (in place of UTF-16) for font family/face names in the system font list, to reduce memory footprint. r=lsalzman 2018-09-12 20:34:57 +01:00
Jonathan Kew d4b7d95206 Bug 1464400 - Keep track of CSS generics when resolving to actual font families and faces, and expose as a new CSSGeneric attribute on InspectorFontFace. r=jwatt 2018-05-25 14:07:57 +01:00
Brindusan Cristian 2c5b7db570 Backed out changeset f8dbb1d2d07c (bug 1464400) for mochitest failures on test_font_whitelist.html. CLOSED TREE 2018-06-01 19:07:24 +03:00
Jonathan Kew 0cc7412d4f Bug 1464400 - Keep track of CSS generics when resolving to actual font families and faces, and expose as a new CSSGeneric attribute on InspectorFontFace. r=jwatt 2018-05-25 14:07:57 +01:00
Jonathan Kew e92b9e44cf Bug 1449605 - part 1 - Rearrange thebes font code so that the decision whether to apply synthetic-bold is deferred until actually instantiating a font, not made during the font-matching process. r=jwatt
This rearranges how synthetic-bold use is determined in the font selection
& rendering code. Previously, we would decide during the font-selection
algorithm whether we need to apply synthetic-bold to the chosen face, and
then pass that decision through the fontgroup (storing it in the FamilyFace
entries of the mFonts array there) down to the actual rendering code that
instantiates fonts from the faces (font entries) we've selected.

That became a problem for variation fonts because in the case of a user
font, we may not have downloaded the resource yet, so we just have a "user
font container" entry, which carries the descriptors from the @font-face
rule and will fetch the actual resource when needed. But in the case of a
@font-face rule without a weight descriptor, we don't actually know at
font-selection time whether the face will support "true" bold (via a
variation axis) or not, so we can't reliably make the right decision about
applying synthetic bold.

So we now defer that decision until we actually instantiate a platform font
object to shape/measure/draw text. At that point, we have the requested
style and we also have the real font resource, so we can easily determine
whether fake-bold is required.

(This patch should not result in any visible behavior change; that will
come in a second patch now that the architecture supports it.)
2018-05-01 10:30:50 +01:00
Jonathan Kew d384879f12 Bug 1457103 - patch 3 - Make gfxFontEntry::GetVariationAxes and GetVariationInstances pure virtual, and provide missing subclass implementations. r=jwatt 2018-04-26 17:08:18 +01:00
Jonathan Kew 6ad9a5ee43 Bug 1457103 - patch 1 - Make gfxFontEntry::HasVariations a pure-virtual method, and fill in missing subclass implementations, particularly in FT2FontEntry. r=jwatt 2018-04-26 17:08:18 +01:00
Jonathan Kew c57f185cd9 Bug 1454598 - part 3 - Use WeightRange more extensively in place of FontWeight throughout user-font handling and font-entry creation, and handle Stretch and SlantStyle similarly. r=jwatt 2018-04-25 07:18:23 +01:00
Jonathan Kew 7e27ba83c3 Backed out 4 changesets from bug 1454598 (26e036b1c703, bc910e36a7d7, bac001216577, 5af215d265b6) due to macOS 10.12 font issues. 2018-04-25 10:18:07 +01:00
Jonathan Kew 8489323f79 Bug 1454598 - part 3 - Use WeightRange more extensively in place of FontWeight throughout user-font handling and font-entry creation, and handle Stretch and SlantStyle similarly. r=jwatt 2018-04-25 07:18:23 +01:00
Jonathan Watt 156c4af1ec Bug 1436048: Use user defined types for font-stretch / font-style. r=jfkthame,jwatt
Co-authored-by: Emilio Cobos Álvarez <emilio@crisal.io>

MozReview-Commit-ID: 7ONYtICeAqb
2018-04-23 18:22:05 +02:00
Jonathan Kew 7b924dade9 Bug 1436048 part 2 - Store FontWeight as a fixed-point value to support fractional font-weight values. r=jwatt 2018-04-16 20:26:08 +01:00
Jonathan Kew 94238d9823 Bug 1452973 - Update NS_FONT_STRETCH_* constants to values based on the percentage definitions in css fonts 4. r=jwatt 2018-04-16 10:00:57 +01:00
Jonathan Watt 1e7f76576a Bug 1436048 part 1 - Use a user defined type for font weight everywhere. r=jfkthame,emilio
--HG--
extra : rebase_source : 2e267ff99de6f52484e34ac15c39e5ca8b473394
2018-04-13 20:34:37 +01:00
Nicholas Nethercote d41188c796 Bug 1445117 - Remove duplicates from nsGkAtoms. r=froydnj
In each case, the atom had an obvious name and a weird name. Where possible, I
kept the obvious name and commented out the weird name, viz:

- `mixed` over `_mixed` for "mixed"
- `el` over `el_` for "el"
- `other` over `other_` for "other"
- `remote` over `Remote` for "remote"

But for several of them I didn't do that, because the weird name is used
within the HTML5 parser -- which is a huge pain to modify because it involves
code generated by code from another repo -- so I kept the weird name and
commented out the obvious name, viz:

- `list_` over `list` for "list"
- `svgSwitch` over `_switch` for "switch"
- `set_` over `set` for "set"

MozReview-Commit-ID: Jp3CpdWXNDm

--HG--
extra : rebase_source : 421ce5316772f1951488307e81f2ceee696d363d
2018-03-14 10:27:25 +11:00
Chris Peterson d09123f248 Bug 1436263 - Part 1: Replace `final override` virtual function specifiers with just `final`. r=froydnj
MozReview-Commit-ID: DE5HkIhsZ6D

--HG--
extra : rebase_source : 94831c1e13a840dd2ea0600f64bcf70c2bf938d9
extra : source : cf9283bf1b0bca3a6311c98e227329d451f80ecb
2018-02-05 22:46:57 -08:00
Chris Peterson 37efe4d0e6 Bug 1428535 - Add missing override specifiers to overridden virtual functions. r=froydnj
MozReview-Commit-ID: DCPTnyBooIe

--HG--
extra : rebase_source : cfec2d96faeb11656d86d760a34e0a04cacddb13
extra : intermediate-source : 6176724d63788b0fe8caa3f91607c2d93dbaa7ec
extra : source : eebbb0600447f9b64aae3bcd47b4be66c02a51ea
2017-11-05 19:37:28 -08:00
Jonathan Kew 620b5d3c57 Bug 1419615 - Remove old synthetic-italic support from the GDI font code, so we don't double-slant text now that we have generic support in gfxFont. r=lsalzman 2017-11-23 19:38:17 +00:00
Lee Salzman 600dccf87f Bug 1404742 - track ScaledFont and UnscaledFont lifetimes with ThreadSafeWeakPointer. r=bas
MozReview-Commit-ID: GRSEYh1fG4U
2017-10-18 14:22:09 -04:00
Nicholas Nethercote d225f7151b Bug 1400460 - Rename nsIAtom as nsAtom. r=hiro.
(Path is actually r=froydnj.)

Bug 1400459 devirtualized nsIAtom so that it is no longer a subclass of
nsISupports. This means that nsAtom is now a better name for it than nsIAtom.

MozReview-Commit-ID: 91U22X2NydP

--HG--
rename : xpcom/ds/nsIAtom.h => xpcom/ds/nsAtom.h
extra : rebase_source : ac3e904a21b8b48e74534fff964f1623ee937c67
2017-10-03 09:05:19 +11:00
Jonathan Kew 162dd2e4e1 Bug 1395061 - patch 4 - Refactor checks in the gfxPlatformFontList::GetFontList loop to use a single virtual method call instead of three separate calls. r=jrmuizel 2017-09-11 19:24:01 +01:00
Jonathan Kew 82bdaf03b2 Bug 1395061 - patch 3 - Clean up vestigial code that existed to support setting the gfxFontEntry::mSymbolFont flag. r=jrmuizel 2017-09-11 19:23:30 +01:00
Jonathan Kew 379ddad597 Bug 1395061 - patch 2 - Implement default gfxFontFamily::IsSymbolFontFamily, and provide override for GDI font backend. r=jrmuizel 2017-09-11 19:22:57 +01:00
Myk Melez aa59a13010 Bug 1395061 - patch 1 - Refactor gfxFontEntry::SupportsLangGroup and MatchesGenericFamily into gfxFontFamily. r=jfkthame 2017-09-11 19:22:15 +01:00
Jonathan Kew 6ceb7d87f9 Bug 835204 - Accept styled font-family names as used in the legacy GDI model, for compatibility with content that assumes GDI-style font naming. r=heycam 2017-08-01 11:25:35 +01:00
JerryShih fcec675802 Bug 1368531 - Put the task gfxPlatformFontList::InitOtherFamilyNames() into idle queue. r=jfkthame
Add a boolean value in FindFamily() to check if gecko needs to defer the
InitOtherFamilyNames() task into idle queue.

Add a new telemetry data FONTLIST_INITOTHERFAMILYNAMES_NO_DEFERRING for the
execution time of InitOtherFamilyNames() running regularly at main thread
instead of in idle queue.

MozReview-Commit-ID: A3YPDcHtXrX
2017-08-02 20:33:00 -04:00
Sebastian Hengst c2b9c2c204 Backed out changeset e1d538cd1cf8 (bug 1368531) for bustage on Windows: 'gfxPlatformFontList::InitOtherFamilyNamesRunnable::Cancel': overriding virtual function differs from 'mozilla::CancelableRunnable::Cancel' only by calling convention. r=backout 2017-08-02 21:12:51 +02:00
JerryShih 0138441875 Bug 1368531 - Put the task gfxPlatformFontList::InitOtherFamilyNames() into idle queue. r=jfkthame
Add a boolean value in FindFamily() to check if gecko needs to defer the
InitOtherFamilyNames() task into idle queue.

Add a new telemetry data FONTLIST_INITOTHERFAMILYNAMES_NO_DEFERRING for the
execution time of InitOtherFamilyNames() running regularly at main thread
instead of in idle queue.

MozReview-Commit-ID: A3YPDcHtXrX
2017-08-01 01:07:00 -04:00
Lee Salzman a168dcdbf3 Bug 1348980 - implement UnscaledFont API for Moz2D and thebes. r=jfkthame 2017-04-06 17:41:02 -04:00
Masatoshi Kimura 28ee0edbb2 Bug 1334860 - Remove WinXP-only ClearType prefs. r=jfkthame
MozReview-Commit-ID: 1LOrMmR6WHy

--HG--
extra : rebase_source : 92097c501b689b550007a1abc6f82064a48342ec
2017-01-29 11:46:24 +09:00
Ting-Yu Chou 3b76c1d27b Bug 1322465 part 5 - Use explicit/MOZ_IMPLICIT for the unary constructors in gfx/. r=Ehsan
MozReview-Commit-ID: 5sdclirTQCV

--HG--
extra : rebase_source : 65b8fe4357ee19e858d3ee406495a1c2c3046c90
2016-12-16 15:54:32 +08: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
Jonathan Kew 0a9b1ea9b9 Bug 1245811 - part 1 (based on patch by Andrew Comminos) - Replace gfxPlatformFontList::FindFamily with FindAndAddFamilies to allow for the possibility of the implementation returning multiple font families (e.g. when fontconfig has 'prefer' aliases). r=karlt 2016-04-12 07:06:22 +01:00
Birunthan Mohanathas 9137955c65 Bug 1235261 - Part 2: Switch some uses of AutoFallibleTArray to AutoTArray. r=froydnj
This changes some function signatures to take a nsTArray<T>& instead of a
FallibleTArray<T>& because AutoTArray does not inherit from FallibleTArray.

This is effectively a no-op because the affected array operations already use
`mozilla::fallible`.
2016-02-02 17:36:30 +02:00
Phil Ringnalda d381b4bca6 Back out 7 changesets (bug 1235261) for cpptest failures in TestTArray
CLOSED TREE

Backed out changeset d66c3f19a210 (bug 1235261)
Backed out changeset 467d945426bb (bug 1235261)
Backed out changeset 32b61df13142 (bug 1235261)
Backed out changeset c50bb8ed4196 (bug 1235261)
Backed out changeset 0ff0fa6fe81f (bug 1235261)
Backed out changeset df70e89669da (bug 1235261)
Backed out changeset 064969357fc9 (bug 1235261)
2016-01-31 10:10:57 -08:00
Birunthan Mohanathas 53bb27f2a4 Bug 1235261 - Part 2: Switch some uses of AutoFallibleTArray to AutoTArray. r=froydnj
This changes some function signatures to take a nsTArray<T>& instead of a
FallibleTArray<T>& because AutoTArray does not inherit from FallibleTArray.

This is effectively a no-op because the affected array operations already use
`mozilla::fallible`.
2016-01-31 17:12:12 +02:00
John Daggett b788233f65 Bug 1213280 - fix OSX font selection under 10.11. r=jfkthame 2015-11-20 22:01:12 +09:00
John Daggett f4458274bd Bug 543715 p1 - distinguish between italic and oblique. r=jfkthame 2015-10-19 11:16:43 +09:00
Phil Ringnalda adfbc1f710 Back out 2 changesets (bug 543715) because Mulet is why we can't have nice things
Backed out changeset 2d1d8e9b095c (bug 543715)
Backed out changeset bc90276ec090 (bug 543715)
2015-10-18 11:22:22 -07:00
John Daggett 72b6bcd6d6 Bug 543715 p1 - distinguish between italic and oblique. r=jfkthame 2015-10-18 22:17:46 +09:00
John Daggett 1b7d8ac5fd Bug 1201318 - revise OSX system font handling. r=mstange
Rework system font lookup under OSX so that the style system passes around the same "meta" name used by Webkit, -apple-system. This makes it so that the hidden system fonts used aren't exposed to authors. It also allows us to handle the two optical sizes of font families used under OSX 10.11, which uses San Francisco as the new UI font, with one family for text sizes and another for larger, display sizes. The patch here:

  - moves system font lookup into gfxMacPlatformFontList
  - assigns the font family name to "-apple-system"
  - derives FindFamily to take a gfxFontStyle parameter to allow size-based lookups
  - maintains a list of hidden system font families (not exposed to authors)
  - maintains a mapping from -apple-system to the underlying hidden font families
2015-10-08 15:04:08 +09:00
Nicholas Nethercote fea58e7707 Bug 1189156 (part 3) - Factor out FontTable better. r=jfkthame.
--HG--
extra : rebase_source : 696db4f6384229336966ca86fa47faaf21382f1e
2015-07-30 21:15:16 -07:00