Commit Graph

302 Commits

Author SHA1 Message Date
Nicholas Nethercote
f23a15f104 Bug 1189156 (part 2) - Don't use enumeration style for nsTHashtable::SizeOf{In,Ex}cludingThis(). r=erahm.
After this change, we have ShallowSizeOf{In,Ex}cludingThis(), which don't do
anything to measure children. (They can be combined with iteration to measure
children.)

And we still have the existing single-arg SizeOf{In,Ex}cluding() functions,
which work if the entry type itself defines SizeOfExcludingThis().
2015-07-29 01:50:52 -07:00
Nicholas Nethercote
b003fba482 Bug 1188745 - Rename nsTArray::SizeOfExcludingThis() as ShallowSizeOfExcludingThis(). r=froydnj.
This makes it clearer that, unlike how SizeOf*() functions usually work, this
doesn't measure any children hanging off the array.

And do likewise for nsTObserverArray.
2015-07-28 23:24:24 -07:00
Nicholas Nethercote
6c8339c14c Bug 1182962 (part 2) - Use nsTHashtable::Iterator in gfxFont. r=jfkthame. 2015-07-13 19:08:16 -07:00
Birunthan Mohanathas
e52329c788 Bug 1182996 - Fix and add missing namespace comments. rs=ehsan
The bulk of this commit was generated by running:

  run-clang-tidy.py \
    -checks='-*,llvm-namespace-comment' \
    -header-filter=^/.../mozilla-central/.* \
    -fix
2015-07-13 08:25:42 -07:00
Nathan Froyd
46d6f38e68 Bug 1161627 - part 2 - machine-convert TemporaryRef<T> to already_AddRefed<T>; r=ehsan
This conversion was done with the script:

  find . -name '*.cpp' -o -name '*.h' -o -name '*.mm' -o -name '*.idl' | \
    egrep -v 'cairo-win32-refptr.h|RefPtr.h|TestRefPtr.cpp' | \
    xargs sed -i -e 's/mozilla::TemporaryRef</already_AddRefed</g' \
                 -e 's/TemporaryRef</already_AddRefed</g'

Manual fixups were performed in the following instances:

- We handled mfbt/RefPtr.h manually so as to not convert TemporaryRef itself
  into already_AddRefed.

- The following files had explicit Move() calls added to make up for the lack
  of a copy constructor on already_AddRefed:

  dom/base/ImageEncoder.cpp
  dom/media/MediaTaskQueue.{h,cpp}
  dom/media/webaudio/PannerNode.cpp

- A redundant overload for MediaTaskQueue::Dispatch was deleted.

- A few manual fixups were required in mfbt/tests/TestRefPtr.cpp.

- Comments, using declarations, and forward declarations relating to
  TemporaryRef in dom/canvas/ and gfx/layers/ were changed to refer to
  already_AddRefed.
2015-06-17 10:00:52 -04:00
Michael Layzell
5a500aadd3 Bug 1168176 - Mark gfxFontShaper::mFont as MOZ_NON_OWNING_REF. r=jtd 2015-05-25 11:32:00 -04:00
Michael Layzell
b1d4d5baa3 Bug 1167403 - Mark gfxFont::GlyphChangeObserver::mFont as MOZ_NON_OWNING_REF. r=jtd 2015-05-22 08:23:00 -04:00
Nicolas Belleville
f5697275ec Bug 948466: Rename gfxPangoFonts to gfxFontconfigFonts. r=nical 2015-05-20 17:44:09 +02:00
John Daggett
65205f109b Bug 1056479 p2 - implement platform fontlist based on fontconfig. r=karlt
This patch implements a derived class of gfxPlatformFontList and a set of associated objects that uses fontconfig. It's a replacement for the existing gfxPangoFontGroup and gfxFontconfigUtils code. The fontconfig API is used to lookup all fonts on the system, which are grouped by family name.

Changes due to this patch:
- font style matching, the mapping of style attributes to a specific font, is now handled by the same Gecko code that is used on other plaforms. fontconfig substitutions are handled but fontconfig style matching no longer used.
- downloadable fonts using unicode-range are now supported
- local fullname lookups are only done with the English name of the font, as per the CSS3 Fonts spec, and not only other localized fullnames
- size-specific bitmap fonts are no longer supported
- fonts lacking a Unicode character map are no longer supported
2015-05-13 14:11:25 +09:00
Carsten "Tomcat" Book
75c678bdd3 Backed out changeset 1223b73d62dc (bug 1056479) 2015-05-12 12:21:09 +02:00
John Daggett
6609ef3561 Bug 1056479 p2 - implement platform fontlist based on fontconfig. r=karlt
This patch implements a derived class of gfxPlatformFontList and a set of associated objects that uses fontconfig. It's a replacement for the existing gfxPangoFontGroup and gfxFontconfigUtils code. The fontconfig API is used to lookup all fonts on the system, which are grouped by family name.

Changes due to this patch:
- font style matching, the mapping of style attributes to a specific font, is now handled by the same Gecko code that is used on other plaforms. fontconfig substitutions are handled but fontconfig style matching no longer used.
- downloadable fonts using unicode-range are now supported
- local fullname lookups are only done with the English name of the font, as per the CSS3 Fonts spec, and not only other localized fullnames
- size-specific bitmap fonts are no longer supported
- fonts lacking a Unicode character map are no longer supported
2015-05-12 17:44:16 +09:00
Carsten "Tomcat" Book
1c0b0eacfa Backed out 10 changesets (bug 1056479) for bustage on a CLOSED TREE
Backed out changeset d5b1f2b78915 (bug 1056479)
Backed out changeset bcc65b714dd6 (bug 1056479)
Backed out changeset 0b35e8a463d2 (bug 1056479)
Backed out changeset 0933391809c9 (bug 1056479)
Backed out changeset 93bd67204fac (bug 1056479)
Backed out changeset 5260b93eb0b9 (bug 1056479)
Backed out changeset 130bea3f8623 (bug 1056479)
Backed out changeset 408e078cc18d (bug 1056479)
Backed out changeset a651c240979d (bug 1056479)
Backed out changeset d74ae8fcaac9 (bug 1056479)
2015-05-12 08:25:19 +02:00
John Daggett
448b24f80f Bug 1056479 p2 - implement platform fontlist based on fontconfig. r=karlt
This patch implements a derived class of gfxPlatformFontList and a set of associated objects that uses fontconfig. It's a replacement for the existing gfxPangoFontGroup and gfxFontconfigUtils code. The fontconfig API is used to lookup all fonts on the system, which are grouped by family name.

Changes due to this patch:
- font style matching, the mapping of style attributes to a specific font, is now handled by the same Gecko code that is used on other plaforms. fontconfig substitutions are handled but fontconfig style matching no longer used.
- downloadable fonts using unicode-range are now supported
- local fullname lookups are only done with the English name of the font, as per the CSS3 Fonts spec, and not only other localized fullnames
- size-specific bitmap fonts are no longer supported
- fonts lacking a Unicode character map are no longer supported
2015-05-12 14:51:17 +09:00
Jonathan Kew
c050cf8885 Bug 1155261 - Fix computation of glyph extents and text-frame visual overflow for vertical text frames. r=smontagu 2015-04-27 09:45:55 +01:00
L. David Baron
12ac8aff8f Bug 1144885 - Treat font-size-adjust: none as separate from font-size-adjust: 0. r=jdaggett
Without the patch, the addition to property_database.js leads to
failures related to the "0.0" and "0" values in
layout/style/test/test_value_computation.html .
2015-04-20 23:10:40 -07:00
Mike Hommey
4da5ed0b71 Bug 1138293 - Use malloc/free/realloc/calloc instead of moz_malloc/moz_free/moz_realloc/moz_calloc. r=njn
The distinction between moz_malloc/moz_free and malloc/free is not
interesting. We are inconsistent in our use of one or the other, and
I wouldn't be surprised if we are mixing them anyways.
2015-03-31 12:32:49 +09:00
Ehsan Akhgari
33bb32f549 Bug 1145631 - Part 1: Replace MOZ_OVERRIDE and MOZ_FINAL with override and final in the tree; r=froydnj
This patch was automatically generated using the following script:

function convert() {
echo "Converting $1 to $2..."
find . \
       ! -wholename "*/.git*" \
       ! -wholename "obj-ff-dbg*" \
         -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 MOZ_OVERRIDE override
convert MOZ_FINAL final
2015-03-21 12:28:04 -04:00
Jonathan Kew
3e891b661e Bug 1128190 - Always use a mask to render shadows for color glyphs, regardless of blur radius. r=roc 2015-02-02 09:19:28 +00:00
Nicholas Nethercote
7d9cc5ecf2 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
Trevor Saunders
85fffc7c71 bug 1122065 - use MOZ_OVERRIDE more in gfxish things r=jrmuizel 2015-01-19 17:41:12 -05:00
Robert O'Callahan
68c074dcb8 Bug 1099977. Part 2: Make gfxFont::Measure return an empty bounding-box when all glyphs are invisible. r=jfkthame
--HG--
extra : rebase_source : 41a9f586ef2992d96b789d6bd55daae18f15ed2f
2014-11-18 23:23:45 +13:00
Jonathan Kew
d3b227a612 Bug 1062108 - Don't increase glyph advances when applying fake-bold to a fixed-pitch font. r=jdaggett 2015-01-08 12:51:00 +00:00
Jonathan Kew
0dd36ab38e Bug 1116480 - gfxTextRun::Measure needs to account for fake-italic transform when returning the bounding box. r=roc 2014-12-31 22:35:40 +00:00
Jonathan Kew
cc0d8158c6 Bug 1108616 - part 2 - Add an explicitLanguage field to gfxFontStyle, and pass it down from callers. r=dbaron 2014-12-23 12:50:10 +00:00
Jonathan Kew
70f0d0c0ca Bug 1090168 - part 1 - Make textBaseline attribute in <canvas> work for vertical text. r=jdaggett 2014-11-13 08:58:04 +00:00
Jonathan Watt
788f36f152 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
John Daggett
2bf063af98 Bug 475891 - support unicode-range when matching userfonts (non-linux). r=jfkthame 2014-11-06 13:42:50 +09:00
Markus Stange
dc285f3c81 Bug 1055634 - Propagate font smoothing background colors to layers. r=roc 2014-10-24 18:32:23 +02:00
Jonathan Kew
acd271ded7 Bug 1081867 - Convert textrun metrics to physical coordinates before merging with visual-overflow region. r=smontagu 2014-10-16 09:40:19 +01:00
Carsten "Tomcat" Book
e98d3a9fb7 Backed out changeset 1abddb50ed34 (bug 1081867) for bustage on a CLOSED TREE 2014-10-16 11:42:11 +02:00
Jonathan Kew
7630381bcf Bug 1081867 - Convert textrun metrics to physical coordinates before merging with visual-overflow region. r=smontagu 2014-10-16 09:40:19 +01:00
Jonathan Kew
de65ac10da Bug 902762 pt 2 - Support for vertical textruns and fonts through gfxTextRun::Draw. r=jdaggett 2014-10-01 20:25:48 +01:00
Jonathan Kew
315fe696fe 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
9407713a2b Bug 1065002 pt 1.3 - Add an Orientation parameter to gfxFont::GetMetrics and dispatch to horizontal or vertical as needed. r=jdaggett 2014-09-30 07:38:26 +01:00
Jonathan Kew
cbdf2b8244 Bug 1065002 pt 1.2 - Add CreateVerticalMetrics to gfxFont, to read/synthesize metrics for vertical layout. r=jdaggett 2014-09-30 07:38:06 +01:00
Jonathan Kew
08e2504e53 Bug 1065002 pt 1.1 - Rename gfxFont::GetMetrics to GetHorizontalMetrics, and add a GetMetrics wrapper to access it. r=jdaggett 2014-09-30 07:37:40 +01:00
Jonathan Kew
8a86870edc bug 1057331 - add orientation flags to gfxShapedText/gfxTextRun and to glyph runs within the text run, and split glyph runs on orientation changes. r=jdaggett 2014-09-16 12:25:45 +01:00
Jonathan Kew
08babb6a11 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
John Daggett
b59e49acf6 Bug 1062058 part 3 - make userfont entry a container of the platform font entry. r=heycam 2014-09-08 16:23:20 +09:00
John Daggett
4152f3896a Bug 1062058 part 2 - rename userfont classes and adjust flags. r=heycam 2014-09-08 16:23:20 +09:00
Ehsan Akhgari
de9c38a70c Bug 1048243 - Fix more bad implicit constructors in gfx; r=jrmuizel 2014-08-05 17:58:40 -04:00
Andrew McCreight
edbfabc8f6 Bug 1046281 - Use the simpler version of nsTHashtable memory reporters. r=njn 2014-08-05 13:27:41 -07:00
Jonathan Kew
a11954ec76 bug 1044706 - handle temporary contextPaint as part of fontParams. r=smontagu 2014-07-29 11:58:15 +01:00
Carsten "Tomcat" Book
6e79f9134f Backed out changeset c8d0a8cf50a1 (bug 1044706) for Reftest Failures 2014-07-29 13:41:42 +02:00
Jonathan Kew
5ae6b4463b bug 1044706 - handle temporary contextPaint as part of fontParams. r=smontagu 2014-07-29 11:58:15 +01:00
Jonathan Kew
9197e51f6b bug 1037340 pt 2 - hoist the setup of some unvarying parameters from gfxFont::Draw up to gfxTextRun::Draw. r=jdaggett 2014-07-25 09:38:55 +01:00
Jonathan Kew
59503ff766 bug 1037340 pt 1 - refactor gfxFont::Draw for better maintainability. r=jdaggett 2014-07-25 09:38:44 +01:00
Jonathan Kew
365bdad4b4 Bug 1024804 followup - replace gfxFont::CalculateSubSuperSizeAndOffset with gfxFontStyle::AdjustForSubSuperscript. r=jdaggett 2014-07-11 22:37:27 +01:00
John Daggett
a982b2ef3a Bug 1024804 p2 - scan scriptrun for characters lacking variant glyphs. r=jfkthame 2014-07-22 09:02:48 +09:00
John Daggett
e65545b3f2 Bug 1024804 p1 - implement fallback for font-variant-position sub/superscript glyphs. r=jfkthame 2014-07-22 09:02:45 +09:00