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

303 Коммитов

Автор SHA1 Сообщение Дата
Jonathan Kew 9ae6c0bed1 Bug 1619349 - patch 1 - Record statistics about font-matching behavior in the presContext. r=jwatt
Differential Revision: https://phabricator.services.mozilla.com/D67787

--HG--
extra : moz-landing-system : lando
2020-04-02 01:38:18 +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 82984492e6 Bug 1619349 - patch 1 - Record statistics about font-matching behavior in the presContext. r=jwatt
Differential Revision: https://phabricator.services.mozilla.com/D67787

--HG--
extra : moz-landing-system : lando
2020-04-01 21:42:36 +00:00
Jonathan Kew e819c27aa8 Bug 1309934 - Apply NFC normalization in preference to falling back to a different font for combining marks. r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D67945

--HG--
extra : moz-landing-system : lando
2020-03-23 21:37:12 +00:00
Andrew Osmond 91b071ed14 Bug 1618345 - Enforce proper color management by splitting gfx::Color into sRGBColor and DeviceColor types. r=jrmuizel
gfx::Color is currently misused in many places. The DrawTargets expect
the color space to be in device space, e.g. what we are actually going
to draw using. Everything sitting above generally deals with sRGB, as
specified in CSS. Sometimes we missed the conversion from sRGB to device
space when issuing draw calls, and similarly sometimes we converted the
color to device space twice.

This patch splits the type in two. sRGBColor and DeviceColor now
represent sRGB and device color spaces respectively. DrawTarget only
accepts DeviceColor, and one can get a DeviceColor from an sRGBColor via
the ToDeviceColor helper API. The reftests now pass with color
management enabled for everything (e.g. CSS) instead of just tagged
raster images.

There will be a follow up patch to enable color management everywhere by
default on all supported platforms.

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

--HG--
extra : moz-landing-system : lando
2020-03-09 14:16:17 +00:00
Simon Giesecke dce1e48caf Bug 1613985 - Use default for equivalent-to-default constructors/destructors in gfx. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D65288

--HG--
extra : moz-landing-system : lando
2020-03-04 15:39:20 +00:00
Jonathan Kew bbb6c04d13 Bug 1616268 - Back out changeset 780285749c80 (bug 1611617) for cold-start regressions on various sites. r=heycam
Differential Revision: https://phabricator.services.mozilla.com/D63376

--HG--
extra : moz-landing-system : lando
2020-02-20 02:33:41 +00:00
Jonathan Kew 5c0973b9b0 Bug 1611617 - Don't let gfxFontGroup::GetFirstValidFont return a font from the font-family list that doesn't support the given character (prefer to fall back to the default font). r=heycam
Differential Revision: https://phabricator.services.mozilla.com/D61068

--HG--
extra : moz-landing-system : lando
2020-02-17 09:29:21 +00:00
Jonathan Kew a6920a844b Bug 1612610 - Use the bounding box of the full textrun range, not just an individual glyph run, when double-buffering for color/bold drawing. r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D62900

--HG--
extra : moz-landing-system : lando
2020-02-14 16:16:57 +00:00
Jonathan Kew aeebaadaae Bug 1606305 - Don't forget to record the location of newline and tab characters when creating a textrun for a zero-size font. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D59608

--HG--
extra : moz-landing-system : lando
2020-01-13 12:03:56 +00:00
Chris Peterson 406763af7f Bug 1570499 - Part 1: Replace MOZ_FALLTHROUGH macro with C++17's [[fallthrough]] attribute. r=froydnj
This changeset is a simple find and replace of `MOZ_FALLTHROUGH` and `[[fallthrough]]`.

Unfortunately, the MOZ_FALLTHROUGH_ASSERT macro (to assert on case fallthrough in debug builds) is still necessary after switching from [[clang::fallthrough]] to [[fallthrough]] because:

* MOZ_ASSERT(false) followed by [[fallthrough]] triggers a -Wunreachable-code warning in DEBUG builds
* but MOZ_ASSERT(false) without [[fallthrough]] triggers a -Wimplicit-fallthrough warning in NDEBUG builds.

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

--HG--
extra : moz-landing-system : lando
2019-12-20 07:16:43 +00:00
Jonathan Kew 0d5e98aa7d Bug 1601851 - Use fallible allocation for Spacing arrays in gfxTextRun. r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D56189

--HG--
extra : moz-landing-system : lando
2019-12-06 20:47:21 +00:00
Jonathan Kew 1598ebe8a8 Bug 1598063 - Don't hide text styled with a pending user font when drawing canvas text, just draw with fallback instead. r=heycam
Differential Revision: https://phabricator.services.mozilla.com/D55707

--HG--
extra : moz-landing-system : lando
2019-12-03 21:14:52 +00:00
Jonathan Kew e317a07882 Bug 1554819 - Ensure fontgroups attached to CanvasRenderingContext2D get reset after a shared-fontlist rebuild. r=jwatt
Differential Revision: https://phabricator.services.mozilla.com/D53264

--HG--
extra : moz-landing-system : lando
2019-11-17 11:49:20 +00:00
Jonathan Kew e9be3568fe Bug 1589888 - Handle glyph buffering for color or synthetic-bold fonts with partial opacity on a per-glyphrun basis. r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D52877

--HG--
extra : moz-landing-system : lando
2019-11-13 17:33:34 +00:00
Jonathan Kew 4c6b51d9d2 Bug 1591863 - Ensure we don't sometimes bypass the possibility of intra-family style fallback in system fonts. r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D50930

--HG--
extra : moz-landing-system : lando
2019-10-29 18:38:10 +00:00
Alex Henrie 74cc0f4dce Bug 1591490 - Use the NS_IS_SURROGATE_PAIR macro everywhere. r=Ehsan
Differential Revision: https://phabricator.services.mozilla.com/D50697

--HG--
extra : moz-landing-system : lando
2019-10-27 05:05:51 +00:00
Jonathan Kew 02d0612b29 Bug 1584143 - Don't try to reinitialize platform font list from GetDefaultFont() if we're not on the main thread. r=jwatt
This can happen if we need to use gfxFontGroup::GetDefaultFont() during stylo traversal,
but we initially failed to create the required font because the font list is stale.
In this case, use a "last-resort" default font entry as a stopgap until the font list
update is completed.

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

--HG--
extra : moz-landing-system : lando
2019-10-03 09:49:04 +00:00
Jonathan Kew 1121f75128 Bug 1576553 - Partial ligatures need to be drawn if either GLYPH_FILL or GLYPH_STROKE is in effect. r=heycam
Differential Revision: https://phabricator.services.mozilla.com/D43409

--HG--
extra : moz-landing-system : lando
2019-08-27 00:49:52 +00:00
Andreea Pavel 0b1366e317 Backed out 2 changesets (bug 1576553) for failing reftest at 1576553-1.html on a CLOSED TREE
Backed out changeset bc36c4359eef (bug 1576553)
Backed out changeset d653382c7997 (bug 1576553)
2019-08-27 03:43:54 +03:00
Jonathan Kew a358049095 Bug 1576553 - Partial ligatures need to be drawn if either GLYPH_FILL or GLYPH_STROKE is in effect. r=heycam
Differential Revision: https://phabricator.services.mozilla.com/D43409

--HG--
extra : moz-landing-system : lando
2019-08-26 23:05:45 +00:00
Jonathan Kew 19da5d26be Bug 1575315 - Add noncharacter codepoints to those for which we never attempt font fallback. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D42730

--HG--
extra : moz-landing-system : lando
2019-08-22 20:59:57 +00:00
Jonathan Kew 147bae39f1 Bug 1573249 followup, clang-format nits. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D42938

--HG--
extra : moz-landing-system : lando
2019-08-21 19:37:24 +00:00
Jonathan Kew 129e7436f7 Bug 1573249 - patch 2 - Don't apply skip-ink to runs of CJK text, because it looks bad with many fonts. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D42529

--HG--
extra : moz-landing-system : lando
2019-08-21 15:07:20 +00:00
Jonathan Kew 38828a9be9 Bug 1573249 - patch 1 - Clean up some management of the GlyphRun array in gfxTextRun. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D42528

--HG--
extra : moz-landing-system : lando
2019-08-21 15:07:08 +00:00
Coroiu Cristina f2e9770b54 Backed out 3 changesets (bug 1573249) for chrome failures at layout/inspector/tests/chrome/test_fontFaceGeneric.xul on a CLOSED TREE
Backed out changeset bdba80dae6e2 (bug 1573249)
Backed out changeset 21306e3f8d31 (bug 1573249)
Backed out changeset 3576d5b9f2db (bug 1573249)
2019-08-21 14:01:11 +03:00
Jonathan Kew 2898eb876f Bug 1573249 - patch 2 - Don't apply skip-ink to runs of CJK text, because it looks bad with many fonts. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D42529

--HG--
extra : moz-landing-system : lando
2019-08-21 09:39:02 +00:00
Jonathan Kew 64239ebc50 Bug 1573249 - patch 1 - Clean up some management of the GlyphRun array in gfxTextRun. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D42528

--HG--
extra : moz-landing-system : lando
2019-08-20 18:06:13 +00:00
Charlie Marlow f8d1049107 Bug 1411922: Part 1: Add rendering support for text-decoration-skip-ink r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D39377

--HG--
extra : moz-landing-system : lando
2019-08-07 17:41:13 +00:00
Jonathan Kew 4650cbd942 Bug 1559044 - Improve criteria for deciding whether to kick off download of a @font-face resource, so that we don't defer resources that will actually be needed. r=heycam
The original patch in bug 1422530 checked whether we're currently hiding a given piece of text
because we're waiting for a resource to download, and used this as a signal that we should not
initiate another download.

However, that's not really a good criterion to use when we're doing font selection for a given
character, both because it's an indirect signal -- whether painting the text is suppressed will
depend on timing and the font-display property -- and because it doesn't consider whether any
resource that's already being downloaded will actually be relevant for the specific character
we're trying to display.

So this patch instead checks for a relevant in-progress load earlier in the font list during
the specific FindFontForChar call, so that when unicode-range is used to split a font across
multiple subsets, an in-progress load for one subset won't make us defer the downloads of other
subsets if they are also needed for the characters present in the text.

With this, the repeated blinking no longer happens on the site here, as loading of all the
required font subsets is initiated early.

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

--HG--
extra : moz-landing-system : lando
2019-07-03 15:14:24 +00:00
violet d5bbf998dd Bug 1351432 - Implement the break-spaces value of the white-space property r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D34499

--HG--
extra : moz-landing-system : lando
2019-06-12 10:23:49 +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
Sylvestre Ledru 7f60810d86 Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2019-04-12 13:14:25 +00:00
Jonathan Kew 8f7eaa249c Bug 1465771 - Avoid possibly treating a quoted font-family name as a CSS generic in the fontconfig-based backend. r=jwatt
Differential Revision: https://phabricator.services.mozilla.com/D26916

--HG--
extra : moz-landing-system : lando
2019-04-10 21:42:26 +00:00
Jonathan Kew 9c39f45719 Bug 723045 - Remove nsUnicodeRange and instead use ICU to look up Unicode blocks. r=jwatt
Differential Revision: https://phabricator.services.mozilla.com/D25377

--HG--
extra : moz-landing-system : lando
2019-04-10 21:43:22 +00:00
Emilio Cobos Álvarez 19c116ce06 Bug 1537575 - Cleanup generic font-family handling. r=jfkthame
To be more similar between Rust and C++. This introduces GenericFontFamily and
exposes that plus FontFamilyNameSyntax to C++, using that where appropriate
instead of plain uint8_t as we were doing.

As a follow-up, as discussed on IRC with Jonathan, we can remove the -moz-fixed
family, and turn it just into an alias of Monospace.

The only non-trivial change is the MatchType changes, but they're ok I think.
The code already assumed at most one CSS generic, and the struct still takes 8
bits. I've verified that the relevant tests are passing (though try is closed).

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

--HG--
extra : moz-landing-system : lando
2019-04-01 21:47:59 +00:00
arthur.iakab cd473e09f4 Backed out 3 changesets (bug 1537594, bug 1537575) for causing build bustages on mathml/nsMathMLChar.cpp CLOSED TREE
Backed out changeset 7375a830b5ef (bug 1537594)
Backed out changeset 0cd1411e2fb3 (bug 1537575)
Backed out changeset c7565f50239a (bug 1537575)
2019-04-01 23:41:04 +03:00
Emilio Cobos Álvarez 2188b25101 Bug 1537575 - Cleanup generic font-family handling. r=jfkthame
To be more similar between Rust and C++. This introduces GenericFontFamily and
exposes that plus FontFamilyNameSyntax to C++, using that where appropriate
instead of plain uint8_t as we were doing.

As a follow-up, as discussed on IRC with Jonathan, we can remove the -moz-fixed
family, and turn it just into an alias of Monospace.

The only non-trivial change is the MatchType changes, but they're ok I think.
The code already assumed at most one CSS generic, and the struct still takes 8
bits. I've verified that the relevant tests are passing (though try is closed).

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

--HG--
extra : moz-landing-system : lando
2019-04-01 18:48:10 +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
Jonathan Kew 5f45afb7ec Bug 1533428 - patch 6 - Consistently use the gfxPlatformFontList::PrefFontList type instead of repeatedly spelling out the array declaration. r=jwatt
Differential Revision: https://phabricator.services.mozilla.com/D22930

--HG--
extra : moz-landing-system : lando
2019-04-01 14:33:16 +00:00
Jonathan Kew a978a2a32d Bug 1533428 - patch 2 - Move the Orientation enum from gfxFont to nsFontMetrics to enable some #include-elimination, in particular to avoid including gfxTextRun.h in nsFontMetrics.h. r=jwatt
Differential Revision: https://phabricator.services.mozilla.com/D22913

--HG--
extra : moz-landing-system : lando
2019-04-01 14:32:19 +00:00
Jonathan Kew c671cf4509 Bug 1533395 - Refactor gfxTextRange struct, moving the MatchType enum to gfxTypes.h as FontMatchType, and the struct inside gfxFontGroup as a local type. r=jwatt
This allows us to reduce #include usage of the massive gfxFont.h header,
and keeps this specialized kind of TextRange struct local to where it's used.

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

--HG--
extra : moz-landing-system : lando
2019-04-01 14:32:06 +00:00
Chris Peterson 8e1848413c Bug 1507049 - Rename MOZ_CRASH_UNSAFE_OOL MOZ_CRASH_UNSAFE. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D18515

--HG--
extra : rebase_source : e8ef6eec0f7542bb381e2da81ae6431b2828aabc
extra : source : a8c262b4a2579e6def1b3a5a8220f5197b443e34
2019-02-03 00:09:37 -08:00
Jonathan Kew 06b936f643 Bug 1507661 - Don't treat an explicit hyphen as though it could be a soft-hyphenation position. r=jwatt 2019-02-07 12:13:19 +00:00
Jonathan Kew 3a5283ff8f Bug 1522857 - Ensure the CHAR_IS_SPACE flag is set properly in the textrun's mCharacterGlyphs array even when the space glyph does not fit into a simple CompressedGlyph record. r=jrmuizel 2019-01-26 15:48:38 +00:00
Ehsan Akhgari e5e885ae31 Bug 1521000 - Part 2: Adjust our clang-format rules to include spaces after the hash for nested preprocessor directives r=sylvestre
# ignore-this-changeset

--HG--
extra : amend_source : 7221c8d15a765df71171099468e7c7faa648f37c
extra : histedit_source : a0cce6015636202bff09e35a13f72e03257a7695
2019-01-18 10:16:18 +01: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
Benjamin Bouvier a7f1d173a0 Bug 1511383: Update vim modelines after clang-format; r=sylvestre
- modify line wrap up to 80 chars; (tw=80)
- modify size of tab to 2 chars everywhere; (sts=2, sw=2)

--HG--
extra : rebase_source : 7eedce0311b340c9a5a1265dc42d3121cc0f32a0
extra : amend_source : 9cb4ffdd5005f5c4c14172390dd00b04b2066cd7
2018-11-30 16:39:55 +01: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
Ehsan Akhgari ca162bee20 Bug 1508472 - Part 4: Fourth batch of comment fix-ups in preparation for the tree reformat r=sylvestre
This is a best effort attempt at ensuring that the adverse impact of
reformatting the entire tree over the comments would be minimal.  I've used a
combination of strategies including disabling of formatting, some manual
formatting and some changes to formatting to work around some clang-format
limitations.

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

--HG--
extra : moz-landing-system : lando
2018-11-28 09:16:55 +00:00