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

115 Коммитов

Автор SHA1 Сообщение Дата
Birunthan Mohanathas 690e6fe38b Bug 1235261 - Part 3: Switch remaining uses of AutoFallibleTArray to AutoTArray. r=froydnj
This is effectively a no-op because the affected array operations already use
`mozilla::fallible`.
2016-02-02 17:36:30 +02:00
Birunthan Mohanathas d7371d07d0 Bug 1235261 - Part 1: Rename nsAutoTArray to AutoTArray. r=froydnj 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 720fce4f80 Bug 1235261 - Part 3: Switch remaining uses of AutoFallibleTArray to AutoTArray. r=froydnj
This is effectively a no-op because the affected array operations already use
`mozilla::fallible`.
2016-01-31 17:12:12 +02:00
Birunthan Mohanathas 373593275e Bug 1235261 - Part 1: Rename nsAutoTArray to AutoTArray. r=froydnj 2016-01-31 17:12:12 +02:00
Jonathan Kew 7e3bfd83c4 Bug 1228540 - pt 2 - Remove our HBGetGlyphHOrigin callback, as the default behavior is sufficient. r=jdaggett 2016-01-15 08:45:31 +00:00
Nicholas Nethercote 06e901cb9f Bug 1231550 - Use DrawTarget instead of gfxContext and/or nsRenderingContext in many places in font/text code. r=jfkthame.
AutoTextRun now only needs a DrawTarget instead of an nsRenderingContext, and
similar nsRenderingContext/gfxContext-to-DrawTarget replacements can be
propagated a long way up the call graph. This patch replaces 93 occurrences of
nsRenderingContext and 135 occurrences of gfxContext with DrawTarget; that's
13% of them.

The patch is mostly plumbing changes. A couple of not-entirely-plumbing
changes:

- It adds a comment about the null check in
  gfxGlyphExtents::GetTightGlyphExtentsAppUnits().

- A couple of functions simply had an unused gfxContext or nsRenderingContext
  parameter removed, e.g. SetLineBreaks().

--HG--
extra : rebase_source : 8f56994bb4d254a86788b17ab2864ebc758a7e6b
2015-12-15 13:56:41 -08:00
Nicholas Nethercote 16ee19fe3f Bug 1232822 (part 5) - Moz2Dify GetRoundOffsetsToPixels(). r=jfkthame.
Make GetRoundOffsetsToPixel() take a DrawTarget instead of a gfxContext. This
requires moving it into gfxFontShaper. The only change of note within the
function is the use of aDrawTarget->GetTransform().HasNonTranslation() instead
of CurrentMatrix().HasNonTranslation().
2015-12-15 13:56:40 -08:00
Nicholas Nethercote 2a8e0225ac Bug 1232822 (part 1) - Moz2Dify SetupCairoFont(). r=jfkthame.
This is now trivial.
2015-12-15 13:56:40 -08:00
Nicholas Nethercote 4fdc67c5bd Bug 1230413 (part 2) - Change CallbackData::mContext to a DrawTarget. r=jfkthame.
Also remove CallbackData::mShaper, which is unused.

--HG--
extra : rebase_source : 6e25d4fd10b490a7b5c2f772a51b268cb05cb1f6
2015-12-06 14:13:19 -08:00
Sotaro Ikeda ba3b3090fd Bug 1187145 - Replace nsBaseHashtable::Enumerate() calls in gfx/ with iterators r=njn 2015-09-24 08:31:30 -07:00
Jonathan Kew 7ab6a729ab Bug 1201518 - Remove the (unused) HBGetEastAsianWidth callback from gfxHarfBuzzShaper. r=jdaggett 2015-09-04 12:59:19 +01:00
Khaled Hosny 4851eca724 Bug 729993 - Use finer HarfBuzz cluster level. r=jfkthame 2015-08-09 22:01:32 +01:00
Jonathan Kew 810f7a1dfe Bug 1148660 - Correct the handling of glyph positioning offsets in vertical-upright mode. r=jdaggett 2015-06-01 09:12:46 +01:00
Botond Ballo 2e2a504271 Bug 1119980 - Use 'snprintf' instead of 'sprintf' to avoid a warning on Lollipop-based builds. r=froydnj
--HG--
extra : source : 7468f9a3aa03520a29e138d4df431f0b5d90967c
2015-05-26 14:33:55 -04:00
Phil Ringnalda 49dd872168 Back out 3 changesets (bug 1119980) for emulator-l bustage
CLOSED TREE

Backed out changeset 12ce98475c6e (bug 1119980)
Backed out changeset bdb8d05f8870 (bug 1119980)
Backed out changeset a68a18840492 (bug 1119980)
2015-05-25 18:48:51 -07:00
Botond Ballo 9934d127c1 Bug 1119980 - Use 'snprintf' instead of 'sprintf' to avoid a warning on Lollipop-based builds. r=froydnj
--HG--
extra : rebase_source : 4e915a12ba662ed45788238a5f0a45533888bd92
2015-05-25 20:45:17 -04:00
Jonathan Kew a692669079 Bug 1164835 - Use vertical presentation forms (where available) in vertical-upright text as fallback if the font does not support the 'vert' feature. r=jdaggett 2015-05-22 08:40:04 +01:00
Birunthan Mohanathas 735ccdd101 Bug 968520 - Add mozilla::fallible to Fallible{Auto,}TArray::SetLength calls. r=froydnj 2015-05-18 13:50:35 -07:00
Jonathan Kew d9a2e331d5 Bug 1161900 - Use ICU normalization support during shaping if available, to support decomposable characters in more recently-encoded scripts. r=jdaggett,gps 2015-05-11 19:57:28 +01:00
Jonathan Kew 2fad07bfc9 Bug 1137588 - patch 2 - Use a better default vOrigin in fonts without real vertical metrics. r=jdaggett 2015-03-26 12:23:55 +00:00
Jonathan Kew 179a4271ab Bug 1137588 - patch 1 - Read the second array in 'vmtx' correctly to get glyph vertical origins. r=jdaggett 2015-03-26 12:23:45 +00:00
Jonathan Kew 05cc1cb432 Bug 1139646 - Ensure gfxHarfBuzzShaper only loads the vmtx table once, to avoid leaking it. r=smontagu 2015-03-12 10:03:09 +00:00
Jonathan Kew 7425b37e9b Bug 1139888 - Check for missing glyph metrics tables. r=jdaggett 2015-03-09 12:16:22 +00:00
Jonathan Kew 5840767b60 Bug 1127935 - Check for null when trying to load 'head' table, to avoid crashing on non-sfnt fonts. r=jdaggett 2015-02-10 09:18:23 +00:00
Jonathan Kew e34e642e4d Bug 1108177 - Implement harfbuzz glyph-extents callback, so that fallback mark positioning works in legacy truetype fonts. r=jdaggett 2015-01-28 09:03:28 +00:00
Nicholas Nethercote b31f8f25e5 Bug 1124545 - Avoid creating the mergedFeatures hash table when possible. r=jdaggett.
When scrolling all the way through
https://bugzilla.mozilla.org/show_bug.cgi?id=MNG, |mergedFeatures| gets
initialized more than 50,000 times -- each one involving a heap allocation for
the entry storage -- but it never has anything put into it.

This patch refactors MergeFontFeatures to move |mergedFeatures| inside it. It
now doesn't get created in the common case.

--HG--
extra : rebase_source : 5a8d44b30f90169b70e5f50a5e38bbe57f02b12b
2015-01-21 22:41:02 -08:00
Jonathan Kew e2f83ce0e3 Bug 1120101 - Calculate vertical glyph origin based on 'vmtx' table in TrueType fonts. r=jdaggett 2015-01-15 11:07:26 +00:00
Jonathan Kew 2cef5d1c88 Bug 1090329 - gfxHarfBuzzShaper::GetGlyphVAdvance should never use the backend-specific GetGlyphWidth method, which is for horizontal width only. r=smontagu 2015-01-06 20:56:01 +00:00
Jonathan Kew 3478d8e504 Bug 1108616 - part 3 - Only do language-specific shaping when the language was explicitly tagged. r=jdaggett 2014-12-23 12:50:10 +00:00
Jonathan Watt d6d15a2f78 Bug 1093811 - Convert the gfxFont::GetGlyphWidth() virtual method to take a Moz2D DrawTarget instead of a Thebes gfxContext. r=jfkthame 2014-11-10 21:41:41 +00:00
Jonathan Watt c29761b789 Bug 1093813 - Remove the gfxContext argument from gfxHarfBuzzShaper's GetGlyphHAdvance, GetGlyphVAdvance and GetGlyphVOrigin methods. r=jfkthame 2014-11-10 21:41:41 +00:00
Jonathan Kew b2c88c5dfe Bug 902762 pt 1 - Pass a 'vertical' flag to font shapers, and support vertical shaping through harfbuzz. r=jdaggett 2014-10-01 20:25:48 +01:00
Jonathan Kew 50b0ff2a5d bug 1066043 - split gfxFont.cpp and .h into more manageably-sized pieces. r=jdaggett
--HG--
rename : gfx/thebes/gfxFont.cpp => gfx/thebes/gfxFontEntry.cpp
rename : gfx/thebes/gfxFont.h => gfx/thebes/gfxFontEntry.h
rename : gfx/thebes/gfxFont.cpp => gfx/thebes/gfxGlyphExtents.cpp
rename : gfx/thebes/gfxFont.h => gfx/thebes/gfxGlyphExtents.h
rename : gfx/thebes/gfxFont.cpp => gfx/thebes/gfxTextRun.cpp
rename : gfx/thebes/gfxFont.h => gfx/thebes/gfxTextRun.h
2014-09-16 10:58:12 +01:00
Jonathan Kew 123708b9c7 bug 1063931 - support cmap subtable format 10 in gfxHarfBuzzShaper::GetGlyph. r=jdaggett 2014-09-08 09:53:29 +01:00
John Daggett 780497e3ca Bug 1059691. Cleanup tabs in gfx/thebes source files. r=mkato 2014-08-29 13:18:28 +09:00
John Daggett 94caf2851e Bug 1024804 p2 - scan scriptrun for characters lacking variant glyphs. r=jfkthame 2014-07-22 09:02:48 +09:00
John Daggett b69e91abce Bug 961558 - add fallback support for font-variant-caps values. r=jfkthame 2014-06-23 12:09:16 +09:00
Jonathan Kew e551329cb7 bug 1012365 - workaround for Devanagari fonts that lack support for U+0972 on Android. r=jdaggett 2014-06-02 12:46:49 +01:00
Frédéric Wang dd936cd2e4 Bug 407059 - Part 4: Use gfxHarfbuzzShaper::GetGlyphHAdvance() for math operators. r=jfkthame 2014-04-23 06:57:42 -07:00
Ryan VanderMeulen 0691160cfe Backed out 5 changesets (bug 407059) for reftest asserts.
Backed out changeset 21fee1261f2e (bug 407059)
Backed out changeset c940a2d399c4 (bug 407059)
Backed out changeset 77593dd1b044 (bug 407059)
Backed out changeset cfcbc731d4db (bug 407059)
Backed out changeset d8244f3ecdcb (bug 407059)
2014-04-22 11:00:13 -04:00
Frédéric Wang b7d34cd584 Bug 407059 - Part 4: Use gfxHarfbuzzShaper::GetGlyphHAdvance() for math operators. r=jfkthame 2014-04-22 08:44:04 -04:00
Masatoshi Kimura 5e7240163c Bug 989557 - Implement a fallback for CJK Compatibility Ideographs Standardized Variants. r=jfkthame
--HG--
rename : layout/reftests/fonts/gw432047-license.txt => layout/reftests/fonts/glyphwiki-license.txt
2014-04-01 02:30:26 +09:00
Ehsan Akhgari 4b12513f89 Bug 969866 - Use fallible allocations in some places in our font/text shaping code; r=jfkthame
It seems like the sizes for these data structures can be controlled from
Web content, and we are already prepared to deal with OOM conditions,
except that we are using infallible allocations by mistake.
2014-02-08 13:10:07 -05:00
James Kitchener 719046a9e6 Bug 953385 - Set math script where applicable in /gfx. r=jfkthame 2014-01-30 10:59:16 -05:00
Ehsan Akhgari 1b83407ce9 Bug 927728 - Part 1: Replace PRUnichar with char16_t; r=roc
This patch was automatically generated by the following script:

#!/bin/bash
# Command to convert PRUnichar to char16_t

function convert() {
echo "Converting $1 to $2..."
find . ! -wholename "*nsprpub*" \
       ! -wholename "*security/nss*" \
       ! -wholename "*modules/libmar*" \
       ! -wholename "*/.hg*" \
       ! -wholename "obj-ff-dbg*" \
       ! -name prtypes.h \
       ! -name Char16.h \
         -type f \
      \( -iname "*.cpp" \
         -o -iname "*.h" \
         -o -iname "*.c" \
         -o -iname "*.cc" \
         -o -iname "*.idl" \
         -o -iname "*.ipdl" \
         -o -iname "*.ipdlh" \
         -o -iname "*.mm" \) | \
    xargs -n 1 sed -i -e "s/\b$1\b/$2/g"
}

convert PRUnichar char16_t
2014-01-04 10:02:17 -05:00
Ehsan Akhgari 3e096d9c3d Bug 939585 - Build gfx/thebes in unified mode; r=BenWa 2013-11-27 08:03:04 -05:00
Phil Ringnalda 022d398c91 Back out d280a1c64f76 (bug 939585) for Mac build bustage
CLOSED TREE
2013-11-24 18:02:14 -08:00
Benoit Girard 49ae528201 Bug 939585 - Build gfx/thebes in unified mode. r=ehsan,bjacob 2013-11-21 14:22:45 -05:00
Ehsan Akhgari eff9a278ad Bug 924221 - Minimize the #includes in gfx/thebes; r=bjacob
--HG--
extra : rebase_source : af198eb9b9739ce718ba0d16c385624a722cde51
2013-10-07 19:15:59 -04:00