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

386 Коммитов

Автор SHA1 Сообщение Дата
Sebastian Hengst c1cc60ba6f Backed out changeset 0998d26202bd (bug 1408612) for reftest failures e.g. layout/reftests/svg/text-gradient-01.svg and layout/reftests/writing-mode/1193519-sideways-lr-decoration-1.html. r=backout on a CLOSED TREE
--HG--
extra : amend_source : 9939a46e37da653be63d9e9ba6a079a05851780d
2017-10-26 23:08:29 +02:00
Jonathan Kew c9060d927c Bug 1408612 followup - Change a few more doubles to floats in the gfxFont drawing code paths. r=jrmuizel 2017-10-26 21:00:22 +01:00
Jonathan Kew 2660b7f4db Bug 1408612 - patch 2 - Create templated gfxFont::DrawGlyphs and DrawOneGlyph methods to allow parts of their complexity to be optimized away at compile time for the most common cases (no color glyphs, no inter-glyph spacing). r=jrmuizel 2017-10-24 15:06:45 +01:00
Jonathan Kew 793b63713b Bug 1408612 - patch 1 - Use single-precision floats more consistently for glyph position computations when drawing text. r=jrmuizel 2017-10-24 09:59:09 +01:00
Jonathan Kew fef1726255 Bug 1361631 - patch 1 - Rearrange handling of textrun/glyph orientation so that we pass the resolved 'orientation' value of each glyph run from gfxFontGroup::InitScriptRun through to gfxFont::SplitAndInitTextRun, rather than just a boolean 'vertical' flag. (No functional change.) r=xidorn 2017-10-20 11:20:18 +01: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
Nicholas Nethercote dfd3b7e7aa Bug 1400459 (part 2) - Devirtualize nsIAtom. r=heycam.
This patch merges nsAtom into nsIAtom. For the moment, both names can be used
interchangeably due to a typedef. The patch also devirtualizes nsIAtom, by
making it not inherit from nsISupports, removing NS_DECL_NSIATOM, and dropping
the use of NS_IMETHOD_. It also removes nsIAtom's IIDs.

These changes trigger knock-on changes throughout the codebase, changing the
types of lots of things as follows.

- nsCOMPtr<nsIAtom> --> RefPtr<nsIAtom>

- nsCOMArray<nsIAtom> --> nsTArray<RefPtr<nsIAtom>>
  - Count() --> Length()
  - ObjectAt() --> ElementAt()
  - AppendObject() --> AppendElement()
  - RemoveObjectAt() --> RemoveElementAt()

- ns*Hashtable<nsISupportsHashKey, ...> -->
  ns*Hashtable<nsRefPtrHashKey<nsIAtom>, ...>

- nsInterfaceHashtable<T, nsIAtom> --> nsRefPtrHashtable<T, nsIAtom>
  - This requires adding a Get() method to nsRefPtrHashtable that it lacks but
    nsInterfaceHashtable has.

- nsCOMPtr<nsIMutableArray> --> nsTArray<RefPtr<nsIAtom>>
  - nsArrayBase::Create() --> nsTArray()
  - GetLength() --> Length()
  - do_QueryElementAt() --> operator[]

The patch also has some changes to Rust code that manipulates nsIAtom.

MozReview-Commit-ID: DykOl8aEnUJ

--HG--
extra : rebase_source : 254404e318e94b4c93ec8d4081ff0f0fda8aa7d1
2017-09-26 08:33:21 +10:00
Alexis Beingessner 9022c22b82 Bug 1400382 - Replace explicit TextDrawTarget passing with cast-based system. r=mstange
MozReview-Commit-ID: EQtFvLQCT2U

--HG--
extra : rebase_source : 1fff1b545c18d42403cf9c30172528e553a6af48
2017-09-21 15:15:58 -04:00
Alexis Beingessner 6b38993c8b Bug 1399274 - Block invisible text optimizations when using WebRender. r=jrmuizel
Mostly just threading the TextDrawTarget deeper into the code to use a boolean.
A lot of places are trying to optimize away invisible text!

MozReview-Commit-ID: 89sDAwUv0HA

--HG--
extra : rebase_source : 8d800702232aec6626a33f2d6be893708d0bbfee
2017-09-13 14:05:51 -04:00
Bevis Tseng c94ae9c213 Bug 1367497 - Part 2: Make gfxFontCache use an expiration tracker that can assert the Servo font metrics mutex is locked. r=bevis,jfkthame
--HG--
extra : source : 26e12505e1aebb4fff765f4248d60dac73a71c48
2017-08-15 10:04:32 +08:00
Sebastian Hengst 55ac9b6fc7 Backed out changeset 26e12505e1ae (bug 1367497) 2017-08-15 18:46:53 +02:00
Bevis Tseng 13f67fed92 Bug 1367497 - Part 2: Make gfxFontCache use an expiration tracker that can assert the Servo font metrics mutex is locked. r=bevis,jfkthame 2017-08-15 10:04:32 +08:00
Bevis Tseng b82cc3550d Backed out changeset 2ae749fba6a0
--HG--
extra : rebase_source : d111b3773db29497456484f535963f439283433b
2017-08-15 10:45:00 +08:00
Bevis Tseng 5c9d90a951 Bug 1367497 - Part 2: Make gfxFontCache use an expiration tracker that can assert the Servo font metrics mutex is locked. r=bevis,jfkthame 2017-08-15 10:04:32 +08:00
Jonathan Kew 2e91c61468 Bug 1377328 - part 2 - Annotate raw pointers used for refcounted objects in font-related code. r=milan 2017-06-29 17:52:43 -07:00
Jonathan Kew 4ea7df6c56 Bug 1377328 - part 1 - Annotate some font-related helper classes as MOZ_STACK_CLASS. r=milan 2017-06-29 17:52:38 -07:00
Lee Salzman 24cb8efdec Bug 1385029 - remove virtual from gfxFont::GetCairoScaledFont. r=jfkthame
MozReview-Commit-ID: FNXL9aKtlKa
2017-08-07 16:20:48 -04:00
Lee Salzman a21ad6d19e Bug 1385029 - require implementation of gfxFont::GetScaledFont and remove unnecessary gfxPlatform::GetScaledFontForFont. r=jfkthame
MozReview-Commit-ID: GP1Aekecb0s
2017-08-07 16:20:44 -04:00
Jonathan Kew 5133782794 Bug 1364224 - Reduce refcount churn on gfxFont by using raw pointers where no strong ownership is needed. r=jrmuizel 2017-06-29 15:37:52 -07:00
Jonathan Kew 982e744811 Bug 1376136 - Remove the shapedText flag TEXT_IS_PERSISTENT, as nothing depends on it any longer. r=mats 2017-06-25 09:30:28 +01:00
Jonathan Kew fd5dc7dd5e Bug 1364089 - Eliminate some unnecessary virtual calls in gfxFont-related code. r=jrmuizel 2017-06-01 15:42:07 +01:00
Morris Tseng fa0c122cf9 Bug 1365185 - Clear extents cache after pref "gfx.font_rendering.opentype_svg.enabled" is changed. r=jfkthame
MozReview-Commit-ID: E1whRwmuMGu

--HG--
extra : rebase_source : 40d36395cbb32d55200a884971974bb787dc4e45
2017-05-16 13:30:15 +08:00
Jonathan Kew 4b5525bbf7 Bug 1362167 - Use strongly-typed enum classes instead of generic uint16_t fields for the gfxShapedText and gfxTextRun flags. r=jrmuizel 2017-05-04 22:27:05 +01:00
Jonathan Kew 6fc5313103 Bug 1362167 - Split gfxShapedText.mFlags into two 16-bit flags fields, and arrange storage more compactly to reduce size of gfxShapedWord and gfxTextRun objects. r=jrmuizel 2017-05-04 22:25:16 +01:00
Jonathan Kew 25183dff43 Bug 1353000 - Respect the round-to-pixels flags when caching shaped-word data. r=jrmuizel 2017-04-12 14:55:13 +01:00
vincentliu 3b05828b37 Bug 1350677 - Add Labeling for gfxFontCache. r=jfkthame
From cef7c4838ae3efa519e4d20953cac7dbe40d1aca Mon Sep 17 00:00:00 2001
2017-04-13 09:59:05 +08:00
Wes Kocher 1196244596 Backed out 3 changesets (bug 1353000) for devtools failures a=backout CLOSED TREE
Backed out changeset 7ef3333cedf5 (bug 1353000)
Backed out changeset bd127ce305c7 (bug 1353000)
Backed out changeset 10e777bb90dc (bug 1353000)

--HG--
extra : amend_source : 8db7e67b22347962be0fdb055df1bb2c1853ab67
2017-04-12 10:59:12 -07:00
Jonathan Kew c336bff796 Bug 1353000 - Respect the round-to-pixels flags when caching shaped-word data. r=jrmuizel 2017-04-12 14:55:13 +01:00
Jonathan Kew 6f0d451756 Bug 1352528 - Hoist call to GetRoundOffsetsToPixels out of the inner loop of text shaping. r=jrmuizel 2017-04-03 17:49:17 +01: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
Lee Salzman a168dcdbf3 Bug 1348980 - implement UnscaledFont API for Moz2D and thebes. r=jfkthame 2017-04-06 17:41:02 -04:00
Paul Bignier bc0c1045c5 Bug 1352848 - Fix spelling of 'settings' in comment. r=MattN
MozReview-Commit-ID: J6PjvNRKhEm

--HG--
extra : rebase_source : 09e4d07f42767e63a604015d18871ae1fb92bac7
2017-04-03 15:24:46 -07:00
Jeremy Chen c41d8342dd Bug 1347819 - change nsFont::languageOverride to store uint32_t directly. r=jfkthame
Since font-language-override can only have a single three-letter tag, and it is
eventually converted to uint32_t while creating gfxFontStyle, we should be able
to move the conversion ahead, to an earlier stage.

In this patch, we move the ParseFontLanguageOverride to nsRuleNode, so we could
do the nsString-to-uint32_t conversion during computing time.

MozReview-Commit-ID: LA4Bv3wV7K

--HG--
extra : rebase_source : 48059a9913d58363f78dea59b1b7811d9f038352
2017-03-23 21:59:55 +08:00
Daniel Holbert 9e6a8900f0 Bug 1291483 part 2: Use UniquePtr/MakeUnique more thoroughly in chain-of-custody for gfxFont::mVerticalMetrics. r=jfkthame
This member-var has type 'UniquePtr', but (up until this patch) its value
is set up using "new" and raw pointers. This patch improves that codepath by
using UniquePtr & MakeUnique, for stronger ownership guarantees.

MozReview-Commit-ID: KWZVpvr9bYj

--HG--
extra : rebase_source : 4e46d355078c7da6ae750f3ca06586dc8703e8a7
2017-03-09 16:38:58 -08:00
Carsten "Tomcat" Book cc77b844e8 Backed out changeset c8bfaf1927b6 (bug 1291483) 2017-03-10 15:47:28 +01:00
Daniel Holbert 9a0f32abc3 Bug 1291483 part 2: Use UniquePtr/MakeUnique more thoroughly in chain-of-custody for gfxFont::mVerticalMetrics. r=jfkthame
This member-var has type 'UniquePtr', but (up until this patch) its value
is set up using "new" and raw pointers. This patch improves that codepath by
using UniquePtr & MakeUnique, for stronger ownership guarantees.

MozReview-Commit-ID: KWZVpvr9bYj

--HG--
extra : rebase_source : 4e46d355078c7da6ae750f3ca06586dc8703e8a7
2017-03-09 16:38:58 -08:00
Daniel Holbert eb14ae51cf Bug 1329670: Change gfxFont::CopyWithAntialiasOption to return UniquePtr instead of raw pointer. r=jfkthame
MozReview-Commit-ID: B5UNazyXPL2
2017-01-09 09:41:35 -08:00
Jonathan Kew 9317d239af Bug 1321022 pt 2.1 - While we're here, remove an obsolete declaration. r=dholbert 2016-12-03 12:18:31 +00:00
Jonathan Kew 19f9ad164e Bug 1321022 pt 2 - Add an array of font variations to gfxFontStyle. r=dholbert 2016-12-03 12:18:29 +00:00
Jonathan Kew 72436283c9 Bug 1321022 pt 1.5 - Delete the redundant copy constructor in gfxFontStyle (default copy constructor is fine), and rationalize field ordering a bit. r=dholbert 2016-12-03 12:18:28 +00:00
Frédéric Wang 5f755e9bc4 Bug 1305977 - Use HarfBuzz ot-math API to parse the OpenType MATH table. r=jfkthame 2016-11-02 11:47:18 -07:00
Wes Kocher c91def63e7 Backed out changeset 961a84574836 (bug 1305977) for multiscripts-1.html failures a=backout 2016-11-02 11:45:41 -07:00
Frédéric Wang 1c9167ba68 Bug 1305977 - Use HarfBuzz ot-math API to parse the OpenType MATH table. r=jfkthame
--HG--
extra : rebase_source : 743927b509e8e4b37334c46f32e4e69b3ba35091
2016-10-31 04:18:00 +01:00
Jonathan Kew c6471e4eeb Bug 1304699 - Pass the proper unicode-range when looking up a font in the global font cache. r=jrmuizel 2016-09-27 01:48:56 +01:00
Phil Ringnalda 340cda4e5f Backed out changeset 66b8ea362db8 (bug 1304699) for build bustage
CLOSED TREE
2016-09-26 18:37:13 -07:00
Jonathan Kew 60fef630a5 Bug 1304699 - Pass the proper unicode-range when looking up a font in the global font cache. r=jrmuizel 2016-09-27 01:48:56 +01:00
Jonathan Kew 993ba1a742 Bug 1296742 - Initialize gfxGDIFont's metrics at construction time, like other platform font subclasses, and remove its no-longer-needed support for init-on-first-use pattern. r=jrmuizel 2016-08-22 21:39:19 +01:00
Jeremy Chen 7fe92af520 Bug 1293210 - add cap height support to nsFontMetrics. r=jfkthame
MozReview-Commit-ID: 8EXWUtbuN3s

--HG--
extra : rebase_source : 120cc3476faae7d63f2e96f2973ea9e6d9a93c16
2016-08-18 17:43:54 +08:00
Emilio Cobos Álvarez e1e6b574d9 Bug 1288938: layout: Move the GlyphObserver to the text run instead of the frame. r=jfkthame
MozReview-Commit-ID: KphTCkcZeid
2016-08-03 10:53:37 -07:00
Jonathan Watt db80f397f6 Bug 1058040, part 2 - Rename gfxTextContextPaint to SVGContextPaint and add some code comments. r=dholbert 2016-07-22 14:56:09 +01:00