Daniel Holbert
5df3673fc8
Bug 1321387 part 3: Add "mozilla::" namespace prefix to some types in header files. r=TYLin
...
(The only reason this isn't triggering a compile error is due to .cpp files'
"using namespace mozilla" getting haphazardly shared via unified builds.)
MozReview-Commit-ID: 1zhJueMWOav
--HG--
extra : rebase_source : d08f18573d823968f654491e61428aa70a4c217c
2016-11-30 14:50:22 -08:00
Jonathan Kew
061ab35e2b
Bug 1308502 followup, add missing const-ness to gfxTextRun::SetPotentialLineBreaks param, tidy up a bit. r=m_kato
2016-10-11 13:47:11 +01:00
Jonathan Kew
477e0a395a
Bug 1288975 - Make innerText use nsCaseTransformTextRunFactory::TransformString to implement text-transform, so that it benefits from language-specific behaviors. r=mats
2016-08-20 00:08:24 +01:00
Jonathan Kew
95a82f84cc
Bug 1280887
- patch 2 - Make gfxTextRun refcounted, replace usage of UniquePtr<> with RefPtr<> for textruns, and make nsTextFrame hold a strong reference to its run(s). r=mats
2016-08-19 13:14:22 +01:00
Michael Li
7fc51f7d9e
Bug 1283273 - Change nsAutoPtr to UniquePtr in classes within layout/generic. r=dholbert
2016-07-08 08:08:00 +02:00
Jonathan Watt
b15368cfcb
Bug 1279451 - Remove a lot of unnecessary includes of nsAutoPtr.h. rs=sparky
2016-06-07 21:10:18 +01:00
Xidorn Quan
d8f6beea61
Bug 1097499 part 9 - Transform full-width characters to non-full-width correspondents for combined text. r=jfkthame
...
MozReview-Commit-ID: CXntBz9HPJu
--HG--
extra : source : 950029490bd0f6d5900140693e8ab193a9efe543
2016-04-22 09:18:41 +10:00
Jonathan Kew
cb1c20b3c3
Bug 1265459 - Replace uses of nsAutoPtr<gfxTextRun> with UniquePtr, and let MakeTextRun and similar methods return a UniquePtr. r=jrmuizel
2016-04-19 17:13:28 +01:00
Xidorn Quan
b3ea3fa801
Bug 1251995 part 2 - Add gfxTextRun::Range to replace parameter pairs like (offset, length) and (start, end). r=jfkthame
...
Although this makes some places more complicated, code should generally
be simpler and clearer. It could slightly improve performance on x64 for
functions with more than four parameters, since it makes more data be
passed via registers rather than the stack.
MozReview-Commit-ID: D0GM2Jyrr6W
--HG--
extra : source : bd88a2e478e23edf1845f724a32fef908c8cc007
2016-03-08 15:56:18 +08:00
Carsten "Tomcat" Book
b9f86983b1
Backed out changeset bf004c055beb (bug 1251995)
2016-03-07 12:18:19 +01:00
Xidorn Quan
8e3206382b
Bug 1251995 part 2 - Add gfxTextRun::Range to replace parameter pairs like (offset, length) and (start, end). r=jfkthame
...
Although this makes some places more complicated, code should generally
be simpler and clearer. It could slightly improve performance on x64 for
functions with more than four parameters, since it makes more data be
passed via registers rather than the stack.
MozReview-Commit-ID: D0GM2Jyrr6W
--HG--
extra : rebase_source : 29961e56b5fe14b244046b3dc52b1f922c206218
2016-02-29 16:50:17 +08: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
8dba3aa24f
Bug 1232822 (part 4) - Remove unused argument from SetPotentialLineBreaks(). r=jfkthame.
2015-12-15 13:56:40 -08:00
Nathan Froyd
01583602a9
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
--HG--
rename : mfbt/nsRefPtr.h => mfbt/RefPtr.h
2015-10-18 01:24:48 -04:00
Ehsan Akhgari
883849ee32
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
Cameron McCormack
af83082186
Bug 1067755 - Store relevant style data rather than style context pointers on transformed text runs. r=jdaggett
2015-02-10 21:30:25 +11:00
Carsten "Tomcat" Book
f760432a03
Backed out changeset cab2c930fa02 (bug 1067755) for static analysis build bustage
2015-02-10 11:15:33 +01:00
Cameron McCormack
40ade93e4b
Bug 1067755 - Store relevant style data rather than style context pointers on transformed text runs. r=jdaggett
2015-02-10 20:35:59 +11:00
Jonathan Kew
b77ae133f8
Bug 619521 - Part 1: Send a notification of any scripts for which font coverage is lacking. r=jdaggett
2014-12-22 16:35:54 +00: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
Trevor Saunders
fd5e9d1fcc
bug 1047696 - mark a number of classes MOZ_FINAL to get compilers to devirtualize more r=froydnj
2014-08-05 13:33:55 -04:00
Ehsan Akhgari
5833657423
Bug 1055519 - Fix some more bad implicit constructors in layout and widget; r=roc
2014-08-20 00:58:22 -04:00
Jonathan Kew
181a74e5b2
bug 1015603 part 6 - remove nsFontVariantTextRunFactory from layout, leaving gfx to handle small-caps. r=roc
2014-05-26 14:23:32 +01:00
Jonathan Kew
35a3de2e99
bug 1015603 part 5 - implement fake small-caps in gfx using a reduced-size clone of the font. r=roc
2014-05-26 14:23:32 +01:00
Jonathan Kew
c167886ae7
bug 1015603 part 1 - factor out case transformation from nsCaseTransformTextRunFactory::RebuildTextRun into a separate function. r=roc
2014-05-26 14:23:30 +01: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
James Kitchener
665c0d2ff1
Bug 114365 - Textrun transformations and TextFrame changes for mathvariant. r=roc
2013-12-02 11:49:27 -05:00
Catalin Iacob
6f4758d23e
Bug 798914 (part 5) - Use newly introduced mozilla::MallocSizeOf instead of nsMallocSizeOfFun. r=njn.
...
--HG--
extra : rebase_source : fc472490dd978d165f02f77ed37f07aed6e5bb61
2013-06-23 14:03:39 +02:00
Joshua Cranmer
5765d5aec4
Bug 767563 - Add a clang static checker, part 3: Move the MOZ_MUST_OVERRIDE macro to MFBT. r=Waldo
2013-03-23 21:14:43 -05:00
Arnaud Sourioux
a84a1b22ad
Bug 733186: Annotate ~1000 methods with MOZ_OVERRIDE in /layout r=dholbert r=dbaron
2012-09-14 09:10:08 -07:00
Ehsan Akhgari
e368dc9c85
Bug 579517 - Part 1: Automated conversion of NSPR numeric types to stdint types in Gecko; r=bsmedberg
...
This patch was generated by a script. Here's the source of the script for
future reference:
function convert() {
echo "Converting $1 to $2..."
find . ! -wholename "*nsprpub*" \
! -wholename "*security/nss*" \
! -wholename "*/.hg*" \
! -wholename "obj-ff-dbg*" \
! -name nsXPCOMCID.h \
! -name prtypes.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 PRInt8 int8_t
convert PRUint8 uint8_t
convert PRInt16 int16_t
convert PRUint16 uint16_t
convert PRInt32 int32_t
convert PRUint32 uint32_t
convert PRInt64 int64_t
convert PRUint64 uint64_t
convert PRIntn int
convert PRUintn unsigned
convert PRSize size_t
convert PROffset32 int32_t
convert PROffset64 int64_t
convert PRPtrdiff ptrdiff_t
convert PRFloat64 double
2012-08-22 11:56:38 -04:00
Gervase Markham
82ff7027aa
Bug 716478 - update licence to MPL 2.
2012-05-21 12:12:37 +01:00
Jonathan Kew
58ed975449
bug 735419 - eliminate unused parameter in the gfxTextRun constructor. r=jdaggett
2012-03-15 09:03:51 +00:00
Jonathan Kew
dbd498b32b
bug 703100 - pt 5 - optimize allocation of gfxTextRun objects to avoid separate allocation for CompressedGlyph records. r=roc
2012-01-05 11:54:45 +00:00
Jonathan Kew
3ef19fe4f9
bug 703100 - pt 3 - remove copy of original characters from gfxTextRun. r=roc
2011-12-06 12:39:19 +00:00
Nicholas Nethercote
6c6258e659
Bug 698968 - Add mallocSizeOf functions and start using them. r=jlebar,bhackett,jfkthame, sr=bz.
2011-11-27 19:03:14 -08:00
Ehsan Akhgari
92064e6d3f
Bug 690892 - Replace PR_TRUE/PR_FALSE with true/false on mozilla-central; rs=dbaron
...
Landing on a CLOSED TREE
2011-10-17 10:59:28 -04:00
Jonathan Kew
b679a433d9
bug 671297 - add memory reporting for textRuns. r=roc,jlebar
2011-10-14 08:06:35 +01:00
Michael Wu
d2b70213ac
Bug 675553 - Switch from PRBool to bool on a CLOSED TREE , r=bsmedberg,khuey,bz,cjones
...
--HG--
rename : tools/trace-malloc/bloatblame.c => tools/trace-malloc/bloatblame.cpp
2011-09-28 23:19:26 -07:00
Michael Wu
79d88fac19
Bug 675556 - Switch from PRPackedBool to PRUint8 in nsILineBreaker, r=roc
2011-08-01 18:20:52 -07:00
Jonathan Kew
4b78f496fe
Bug 545989 - don't throw an exception if unable to allocate storage for gfxTextRun creation. r=roc
2010-02-18 11:52:34 +00:00
Robert O'Callahan
f55e9aee2a
Bug 472909. Need to call FinishSettingProperties on nsTranformedTextRuns that we create as parts of other transformed textruns. r=smontagu
...
--HG--
extra : rebase_source : 38adef908b1ec8d6fcc97b1b6cb42690733ae752
2009-01-16 21:17:46 +13:00
Robert O'Callahan
fe457806bc
Bug 430332. Defer nsTransformingTextRun::RebuildTextRun until the linebreaker has completely set up the break and capitalization data on the transformed text run. r=smontagu
2009-01-09 13:23:28 +13:00
roc+@cs.cmu.edu
3c977c106b
Bug 403589. Fuse memory allocations in gfxTextRun. r=pavlov
2007-11-15 17:43:47 -08:00
roc+@cs.cmu.edu
909f85c005
Bug 389707. Rework text-transform:capitalize by putting logic to decide what to capitalize into nsLineBreaker. r=smontagu
2007-11-11 17:51:31 -08:00
roc+@cs.cmu.edu
a8c03abdb3
Bug 384836. Relanding fix to pass around gfxContexts a bit more instead of hanging on to one in nsTransformedTextRun. r=smontagu,pavlov
2007-06-26 21:22:21 -07:00
dbaron@dbaron.org
ebcc8539e8
Back out bug 384836 to diagnose Tp/Tp2 regression bug 385957.
2007-06-26 15:16:34 -07:00
roc+@cs.cmu.edu
87eb460430
Bug 384836. Avoid using a stale gfxContext, by not holding onto one in nsTransformedTextRun, passing in a gfxContext when required instead. r=pavlov,smontagu
2007-06-25 21:25:00 -07:00
roc+@cs.cmu.edu
e7e11676c0
Bug 380692. Change gfxTextRun API so the textrun copies text, if necessary, instead of the caller having to do it. r=vlad
2007-05-14 20:56:47 -07:00
roc+@cs.cmu.edu
cc1cbf7323
Not part of the build. Update new text frame for textrun API changes. Also implements a textrun cache for the new text frame
2007-05-09 15:04:56 -07:00