Commit Graph

91 Commits

Author SHA1 Message Date
Nathan Froyd
e4e2da55c9 Bug 1207245 - part 6 - rename nsRefPtr<T> to RefPtr<T>; r=ehsan; a=Tomcat
The bulk of this commit was generated with a script, executed at the top
level of a typical source code checkout.  The only non-machine-generated
part was modifying MFBT's moz.build to reflect the new naming.

CLOSED TREE makes big refactorings like this a piece of cake.

 # The main substitution.
find . -name '*.cpp' -o -name '*.cc' -o -name '*.h' -o -name '*.mm' -o -name '*.idl'| \
    xargs perl -p -i -e '
 s/nsRefPtr\.h/RefPtr\.h/g; # handle includes
 s/nsRefPtr ?</RefPtr</g;   # handle declarations and variables
'

 # Handle a special friend declaration in gfx/layers/AtomicRefCountedWithFinalize.h.
perl -p -i -e 's/::nsRefPtr;/::RefPtr;/' gfx/layers/AtomicRefCountedWithFinalize.h

 # Handle nsRefPtr.h itself, a couple places that define constructors
 # from nsRefPtr, and code generators specially.  We do this here, rather
 # than indiscriminantly s/nsRefPtr/RefPtr/, because that would rename
 # things like nsRefPtrHashtable.
perl -p -i -e 's/nsRefPtr/RefPtr/g' \
     mfbt/nsRefPtr.h \
     xpcom/glue/nsCOMPtr.h \
     xpcom/base/OwningNonNull.h \
     ipc/ipdl/ipdl/lower.py \
     ipc/ipdl/ipdl/builtin.py \
     dom/bindings/Codegen.py \
     python/lldbutils/lldbutils/utils.py

 # In our indiscriminate substitution above, we renamed
 # nsRefPtrGetterAddRefs, the class behind getter_AddRefs.  Fix that up.
find . -name '*.cpp' -o -name '*.h' -o -name '*.idl' | \
    xargs perl -p -i -e 's/nsRefPtrGetterAddRefs/RefPtrGetterAddRefs/g'

if [ -d .git ]; then
    git mv mfbt/nsRefPtr.h mfbt/RefPtr.h
else
    hg mv mfbt/nsRefPtr.h mfbt/RefPtr.h
fi
2015-10-18 01:24:48 -04:00
John Daggett
f1a6d52792 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
8fd9cbd2d0 Bug 1209206 (part 2) - Rename and re-comment HasNonOpaqueColor(). r=jdaggett.
So that the comment and the name match what the code is doing.
2015-09-28 13:20:06 -07:00
John Daggett
54ef2c180d Bug 1182361 p7 - fixups based on review comments. r=heycam 2015-09-29 10:51:29 +09:00
John Daggett
e87f3a8bf3 Bug 1182361 p6 - eliminate old pref font caching. r=heycam 2015-09-29 10:51:29 +09:00
John Daggett
dd7e44c9c1 Bug 1182361 p5 - cache pref fonts per langGroup. r=heycam 2015-09-29 10:51:29 +09:00
John Daggett
f066f7abaa Bug 1182361 p4 - move pref font util methods to platform fontlist. r=heycam 2015-09-29 10:51:28 +09:00
John Daggett
07261a8702 Bug 1182361 p3 - move generic lookup methods to platform fontlist. r=heycam 2015-09-29 10:51:28 +09:00
John Daggett
fedd10aa75 Bug 1182361 p2 - count generic lookups. r=heycam 2015-09-29 10:51:28 +09:00
John Daggett
b5a1d5dbd5 Bug 1182361 p1 - move old generic lookup methods into gfxPangoFontGroup. r=heycam 2015-09-29 10:51:28 +09:00
Nicholas Nethercote
bcd2fb7111 Bug 1208345 - Remove gfxContext::GraphicsOperator. r=jwatt.
Also...

- Rename various "operator" identifiers as "op" to match |CompositionOp|.

- Rename |nsBackgroundLayerState::mCompositingOp| as |mCompositionOp| to match
  |CompositionOp|.

- Remove some deprecated functions that are no longer needed.
2015-09-24 22:38:58 -07:00
Nicholas Nethercote
55d5c653f3 Bug 1207944 (part 5) - Use SetColor(const Color&) when setting from a constructed gfxRGBA. r=jwatt.
In various places SetColor() gets passed a gfxRBGA that is constructed at the
call site. This patch changes these to construct a gfx::Color directly,
avoiding the subsequent conversion.
2015-09-23 23:42:58 -07:00
Nicholas Nethercote
efccf08686 Bug 1207944 (part 2) - Pass a gfx::Color& instead of a gfxRGBA& to GetDeviceColor(). r=jwatt.
This requires doing likewise for GetSolidColor(), PushSolidColor()
HasNonOpaqueColor().

This removes a ThebesRGBA() call in GetDeviceColor() and a ThebesColor() call in
GetSolidColor().
2015-09-23 23:36:15 -07:00
Chris Peterson
3c966099cb Bug 1204400 - Fix -Wshadow warnings in gfx/thebes and suppress those from Skia headers. r=BenWa 2015-09-11 20:30:14 -07:00
John Daggett
cd38bedf03 Bug 1203809 - pass textperf obj into gfxFontGroup constructor. r=m_kato 2015-09-11 13:24:33 +09:00
John Daggett
6cbe560b2a Bug 1197650 - remove duplicate validity check for newly created fonts. r=m_kato 2015-08-25 09:10:17 +09:00
Mike Hommey
ee2ebc37ea Bug 1194497 - Convert a few remaining PRUnichar to char16_t. r=roc 2015-08-18 08:09:14 +09:00
John Daggett
6e58b08bf2 Bug 1192699 - eliminate the two-stage system fontlist initialization under DirectWrite. r=m_kato 2015-08-13 15:04:25 +09:00
John Daggett
4507f17810 Bug 1189129 - annotate no default font aborts. r=bas 2015-08-05 11:03:41 +09:00
Nicholas Nethercote
242308999c 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
Milan Sreckovic
c46f24fc84 Bug 1173579 - Take the first valid default font. r=jdagget 2015-07-21 14:22:25 -04:00
Eric Rahm
68c138bf3a Bug 1184282 - Remove break suggested inside cluster warning. r=roc 2015-07-16 16:43:04 -07:00
John Daggett
d957784eac Bug 1171357 - log font matching for textruns. r=m_kato 2015-07-06 10:11:19 +09:00
John Daggett
ebf204369e Bug 1165179 - use all style matched faces within a font family. r=heycam 2015-07-02 10:44:14 +09:00
Brian Birtles
a86aca7d21 Bug 1170688 - Move initialization of text-run parameters until *after* the draw target has been updated; r=jfkthame
This fixes a regression when painting semi-transparent synthetic bold text. When
we do that we update the draw target but refactoring in bug 1037340 part
2 caused us to store the draw target before it was updated.
2015-06-22 11:45:39 +09:00
Ryan VanderMeulen
13c416162a Backed out changeset 7d0d8d304cd8 (bug 1171357) for bustage. 2015-06-04 10:45:34 -04:00
John Daggett
87346193d6 Bug 1171357 - log font matching for textruns. r=m_kato 2015-06-04 23:24:55 +09:00
Eric Rahm
9100016c49 Bug 1165515 - Part 13-2: Replace usage of PRLogModuleLevel and PR_LOG_*. rs=froydnj
This is straightforward mapping of PR_LOG levels to their LogLevel
counterparts:
  PR_LOG_ERROR   -> LogLevel::Error
  PR_LOG_WARNING -> LogLevel::Warning
  PR_LOG_WARN    -> LogLevel::Warning
  PR_LOG_INFO    -> LogLevel::Info
  PR_LOG_DEBUG   -> LogLevel::Debug
  PR_LOG_NOTICE  -> LogLevel::Debug
  PR_LOG_VERBOSE -> LogLevel::Verbose

Instances of PRLogModuleLevel were mapped to a fully qualified
mozilla::LogLevel, instances of PR_LOG levels in #defines were mapped to a
fully qualified mozilla::LogLevel::* level, and all other instances were
mapped to us a shorter format of LogLevel::*.

Bustage for usage of the non-fully qualified LogLevel were fixed by adding
|using mozilla::LogLevel;| where appropriate.
2015-06-03 15:25:57 -07:00
Eric Rahm
6d13987359 Bug 1165515 - Part 3: Convert PR_LOG_TEST to MOZ_LOG_TEST. r=froydnj 2015-06-03 15:22:28 -07:00
Carsten "Tomcat" Book
9432818a46 Backed out 14 changesets (bug 1165515) for linux x64 e10s m2 test failures
Backed out changeset d68dcf2ef372 (bug 1165515)
Backed out changeset 7c3b45a47811 (bug 1165515)
Backed out changeset b668b617bef2 (bug 1165515)
Backed out changeset d0916e1283a2 (bug 1165515)
Backed out changeset ac4dc7489942 (bug 1165515)
Backed out changeset e9632ce8bc65 (bug 1165515)
Backed out changeset c16d215cc7e4 (bug 1165515)
Backed out changeset e4d474f3c51a (bug 1165515)
Backed out changeset d87680bf9f7c (bug 1165515)
Backed out changeset b3c0a45ba99e (bug 1165515)
Backed out changeset 9370fa197674 (bug 1165515)
Backed out changeset 50970d668ca1 (bug 1165515)
Backed out changeset ffa4eb6d24b9 (bug 1165515)
Backed out changeset 5fcf1203cc1d (bug 1165515)
2015-06-02 13:05:56 +02:00
Eric Rahm
14740fdf18 Bug 1165515 - Part 13-2: Replace usage of PRLogModuleLevel and PR_LOG_*. rs=froydnj
This is straightforward mapping of PR_LOG levels to their LogLevel
counterparts:
  PR_LOG_ERROR   -> LogLevel::Error
  PR_LOG_WARNING -> LogLevel::Warning
  PR_LOG_WARN    -> LogLevel::Warning
  PR_LOG_INFO    -> LogLevel::Info
  PR_LOG_DEBUG   -> LogLevel::Debug
  PR_LOG_NOTICE  -> LogLevel::Debug
  PR_LOG_VERBOSE -> LogLevel::Verbose

Instances of PRLogModuleLevel were mapped to a fully qualified
mozilla::LogLevel, instances of PR_LOG levels in #defines were mapped to a
fully qualified mozilla::LogLevel::* level, and all other instances were
mapped to us a shorter format of LogLevel::*.

Bustage for usage of the non-fully qualified LogLevel were fixed by adding
|using mozilla::LogLevel;| where appropriate.
2015-06-01 22:17:33 -07:00
Eric Rahm
83ec610692 Bug 1165515 - Part 3: Convert PR_LOG_TEST to MOZ_LOG_TEST. r=froydnj 2015-06-01 22:17:19 -07:00
Wes Kocher
fcc808d96c Backed out 14 changesets (bug 1165515) for b2g mochitest-6 permafail CLOSED TREE
Backed out changeset 9b97e2aa2ed9 (bug 1165515)
Backed out changeset 150606c022a2 (bug 1165515)
Backed out changeset 4e875a488349 (bug 1165515)
Backed out changeset 467e7feeb546 (bug 1165515)
Backed out changeset d6b6cc373197 (bug 1165515)
Backed out changeset 0615265b593c (bug 1165515)
Backed out changeset fafd1dce9f08 (bug 1165515)
Backed out changeset d1df869245f9 (bug 1165515)
Backed out changeset 6876a7c63611 (bug 1165515)
Backed out changeset b7841c94a9a3 (bug 1165515)
Backed out changeset e5e3617f7c73 (bug 1165515)
Backed out changeset 39be3db95978 (bug 1165515)
Backed out changeset 0ec74176f8de (bug 1165515)
Backed out changeset 5b928dd10d71 (bug 1165515)
2015-06-01 17:57:58 -07:00
Eric Rahm
579c7d8013 Bug 1165515 - Part 13-2: Replace usage of PRLogModuleLevel and PR_LOG_*. rs=froydnj
This is straightforward mapping of PR_LOG levels to their LogLevel
counterparts:
  PR_LOG_ERROR   -> LogLevel::Error
  PR_LOG_WARNING -> LogLevel::Warning
  PR_LOG_WARN    -> LogLevel::Warning
  PR_LOG_INFO    -> LogLevel::Info
  PR_LOG_DEBUG   -> LogLevel::Debug
  PR_LOG_NOTICE  -> LogLevel::Debug
  PR_LOG_VERBOSE -> LogLevel::Verbose

Instances of PRLogModuleLevel were mapped to a fully qualified
mozilla::LogLevel, instances of PR_LOG levels in #defines were mapped to a
fully qualified mozilla::LogLevel::* level, and all other instances were
mapped to us a shorter format of LogLevel::*.

Bustage for usage of the non-fully qualified LogLevel were fixed by adding
|using mozilla::LogLevel;| where appropriate.
2015-06-01 14:31:01 -07:00
Eric Rahm
a50b98baa8 Bug 1165515 - Part 3: Convert PR_LOG_TEST to MOZ_LOG_TEST. r=froydnj 2015-06-01 14:31:00 -07:00
Botond Ballo
ad4aea9284 Bug 1119980 - Use 'snprintf' instead of 'sprintf' to avoid a warning on Lollipop-based builds. r=froydnj 2015-05-26 14:33:55 -04:00
Phil Ringnalda
7886a51923 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
eeb3ca1139 Bug 1119980 - Use 'snprintf' instead of 'sprintf' to avoid a warning on Lollipop-based builds. r=froydnj 2015-05-25 20:45:17 -04:00
Eric Rahm
bac140c6c1 Bug 1165515 - Part 1: Convert PR_LOG to MOZ_LOG. r=froydnj 2015-05-21 13:22:04 -07:00
John Daggett
ea444c9c23 Bug 1056479 p7 - fixup assertion for non-italic fallback. r=m_kato 2015-05-13 14:11:26 +09:00
John Daggett
ea003cf539 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
John Daggett
b1af25f195 Bug 1056479 p1a - use lang as part of pref font fallback. r=karlt 2015-05-13 14:11:25 +09:00
John Daggett
1b2469fc0b Bug 1056479 p1 - add language to FindFamily parameters. r=jfkthame 2015-05-13 14:11:25 +09:00
Carsten "Tomcat" Book
7ac330396a Backed out changeset 8bd3335d77d2 (bug 1056479) 2015-05-12 12:21:20 +02:00
Carsten "Tomcat" Book
1f3e44bf6d Backed out changeset c72465a4c424 (bug 1056479) 2015-05-12 12:21:14 +02:00
Carsten "Tomcat" Book
c9d696c90e Backed out changeset 1223b73d62dc (bug 1056479) 2015-05-12 12:21:09 +02:00
Carsten "Tomcat" Book
d45c00e4b7 Backed out changeset f18546e7f271 (bug 1056479) 2015-05-12 12:20:43 +02:00
John Daggett
8ad3c76401 Bug 1056479 p7 - fixup assertion for non-italic fallback. r=m_kato 2015-05-12 17:44:32 +09:00
John Daggett
ed4b836eba 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
John Daggett
a20a9ac26f Bug 1056479 p1a - use lang as part of pref font fallback. r=karlt 2015-05-12 17:44:13 +09:00