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

77 Коммитов

Автор SHA1 Сообщение Дата
Jeremy Chen 213197e5e1 Bug 1328540 - trim trailing whitespaces. r=jeremychen
Trim trailing whitespaces for files that are touched in this bug:

  gfxTextRun.h
  gfxTextRun.cpp
  nsTextFrame.cpp
  nsCSSProps.cpp

MozReview-Commit-ID: FmiW2QiCoFv

--HG--
extra : rebase_source : cbc9ae8c3c4410d1fe79c027d4ccf11b45c8bd19
2017-01-04 23:55:16 +08:00
Jeremy Chen f735dd2d2c Bug 1328540 - convert NS_STYLE_HYPHENS_* to an enum class. r=xidorn
MozReview-Commit-ID: BwTzbA29Y3H

--HG--
extra : rebase_source : fc07d2c881a8ccc618fd1776d1e977c051b0032f
2017-01-04 23:55:16 +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
Jason Woofenden 77865e4a08 Bug 1008019 - Allow whitespace to "hang" at soft-wrap boundaries when white-space:pre-wrap is in effect. r=jfkthame 2016-03-20 17:54:00 -04:00
Ryan VanderMeulen ce55e7b71a Merge m-c to inbound. a=merge 2016-08-19 09:59:49 -04:00
Mats Palmgren ddef8b6119 Bug 1280887 - patch 4 - Remove (unused) class gfxTextRun::ClusterIterator. r=jfkthame 2016-08-19 13:14:45 +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
Jonathan Kew 76f40e7bdc Bug 1280887 - patch 1 - Declare a bunch of gfxTextRun* variables as const pointers, for clarity. r=mats 2016-07-07 13:51:24 +01:00
Xidorn Quan 09f09b5e7b Bug 1288255 - Clear hyphen width cache when user fonts update. r=jfkthame
MozReview-Commit-ID: 66zUQIFafdh

--HG--
extra : rebase_source : c8deb44e0f2eb6de0aedc7041bb79435d18ca354
2016-08-18 11:26:50 +10: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
Andi-Bogdan Postelnicu a40e2399f2 Bug 1282408 - add ignore initialization check flag for variables from GlyphRunIterator. r=jrmuizel
MozReview-Commit-ID: 1KAlxDtZyMe
2016-07-28 11:30:09 +03:00
Kevin Chen cac9daeb79 Bug 1275693 - Refactor <canvas> strokeText drawing to re-use gfxTextRun::Draw. r=jfkthame 2016-07-14 02:00:00 +02:00
Jonathan Kew 48c59f0c3d Bug 1282248 - Declare a bunch of gfxTextRun measurement/drawing methods and related helpers as const. r=m_kato 2016-06-27 17:41:55 +01:00
Thomas Wisniewski 9b377bb0ef Bug 955857 - Replace CSS word-wrap with overflow-wrap, and add it back as a CSS_PROP_ALIAS. r=dbaron
MozReview-Commit-ID: FiZJvm25rNN

--HG--
extra : rebase_source : c7b16fc302e5c7905beea98353faa960db0a9248
2016-05-23 20:27:21 -04:00
Xidorn Quan 74d7d74ae8 Bug 1275059 followup - Use MOZ_ASSERT for methods of gfxTestRun. r=jfkthame
MozReview-Commit-ID: 9etLeUprAic

--HG--
extra : source : 109f6c2cdf31850a36f8c0cc251e9bbc2bb48606
2016-05-25 09:54:37 +10:00
Jeremy Chen f7a19af3e7 Bug 1248708 - Part2.2: render -webkit-text-stroke property. r=jfkthame 2016-04-23 01:40:39 +08:00
Jonathan Kew c60f6a1ae4 Bug 1266391 - Introduce an enum class mozilla::unicode::Script, and use this instead of bare integers to specify script codes for better type checking. r=masayuki 2016-04-21 18:58:59 +01:00
Jonathan Kew 97936698fe Bug 1265648 - Remove the global nsTextFrameTextRunCache, as it no longer serves any useful purpose. r=mats 2016-04-20 10:54:43 +01: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
Jonathan Kew 28a9e2cf14 Bug 1265452 - Remove use of nsAutoPtr from gfx/thebes. r=jrmuizel 2016-04-15 20:45:37 +01:00
Jonathan Kew f269e60c82 Bug 1119619 - Allow font-selection to fall back to an alternative face within the same family if the first-found face was not Regular, to handle cases where some styled faces have a reduced character set. r=m_kato 2016-04-14 21:02:12 +01:00
Xidorn Quan 1a5d64446b Bug 1251995 part 3 - Use struct to pass params for gfxTextRun::Draw. r=jfkthame
MozReview-Commit-ID: HAqtS3VXPHH

--HG--
extra : source : e6a45ca0a21666b4e01c217e0bb42772e4dd918f
2016-03-08 15:56:18 +08: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
Xidorn Quan ab357753a9 Bug 1251995 part 1 - Add helper functions to simplify code. r=jfkthame
MozReview-Commit-ID: 6UBvmEpo12f

--HG--
extra : source : d14cafc0e378ab7356c32a0b469ed783244aa48b
2016-03-08 15:56:18 +08:00
Carsten "Tomcat" Book 41a0c1ddb8 Backed out changeset d88221aad093 (bug 1251995) for reftest failures 2016-03-07 12:18:40 +01:00
Carsten "Tomcat" Book b9f86983b1 Backed out changeset bf004c055beb (bug 1251995) 2016-03-07 12:18:19 +01:00
Carsten "Tomcat" Book 1d0a6281ac Backed out changeset 3f9fbbef0294 (bug 1251995) 2016-03-07 12:18:17 +01:00
Xidorn Quan 11bea4b5a2 Bug 1251995 part 3 - Use struct to pass params for gfxTextRun::Draw. r=jfkthame
MozReview-Commit-ID: HAqtS3VXPHH

--HG--
extra : rebase_source : de01c02d3baf3e8c648d6301bd6ff283d76ae212
2016-02-29 19:06:05 +08: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
Xidorn Quan 5b1f34e2f6 Bug 1251995 part 1 - Add helper functions to simplify code. r=jfkthame
MozReview-Commit-ID: 6UBvmEpo12f

--HG--
extra : rebase_source : e967015366b727f199fe3febedc70f1f43f19725
2016-03-04 19:20:43 +08: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 373593275e Bug 1235261 - Part 1: Rename nsAutoTArray to AutoTArray. r=froydnj 2016-01-31 17:12:12 +02: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
Nicholas Nethercote 0a1ca6ebfe Bug 1231256 (part 4) - Remove dead SetContext() declaration. r=jfkthame.
--HG--
extra : rebase_source : f06b122d91c426e655414b27ec4b2e3c2c1ca587
2015-12-07 15:19:56 -08:00
Nicholas Nethercote 02842898a0 Bug 1230413 (part 3) - Remove unused gfxContext argument from SetSpaceGlyphIfSimple(). r=jfkthame.
--HG--
extra : rebase_source : fbd23567601680bd165a72abf1ca6a70f2e3a453
2015-12-06 14:13:25 -08:00
Xidorn Quan 6fdb9fbeaa Bug 1040668 part 10 - Implement emphasis mark rendering. r=jfkthame
--HG--
extra : source : 1c53ccbaece3931ffe1da5610977e92fcce5f3f6
2015-11-28 11:56:33 +11:00
Xidorn Quan d80f4dcc15 Bug 1040668 part 7 - Add NO_EMPHASIS_MARK flag in CompressedGlyph. r=jfkthame
--HG--
extra : source : 5c13435d3c7ffbc551350beb817a1abb027d5f58
2015-11-28 11:56:33 +11:00
Xidorn Quan 185af4c21b Bug 1040668 part 6 - Add some specifier on gfxTextRun and gfxShapedWord so that compilers are able to reason out certain optimizations. r=jfkthame
--HG--
extra : source : d1f878808c0dc8b159180f387ea563c3561c806a
2015-11-28 11:56:33 +11:00
Xidorn Quan 376e37ea32 Bug 1040668 part 4 - Add helper function for ensuring a glyph is a complex glyph. r=jfkthame
--HG--
extra : source : 8bca69909dc703b60b69eef08fa0be68e3bb16fc
2015-11-28 11:56:33 +11:00
Xidorn Quan 43a7a409cb Bug 1040668 part 3 - Add helper function gfxTextRun::GetAdvanceForGlyph. r=jfkthame
--HG--
extra : source : 48bbf945343431b077bb0e3f788828f8d1606992
2015-11-28 11:56:33 +11:00
John Daggett b788233f65 Bug 1213280 - fix OSX font selection under 10.11. r=jfkthame 2015-11-20 22:01:12 +09:00
John Daggett e85da43d87 Bug 1160506 - support intra-family font fallback. r=heycam
Fontconfig allows for fonts to be arbitrarily mapped into another font
family. Under some versions of Debian and Fedora, families like Droid
Sans Japanese were mapped into the Droid Sans family. To match these
font families properly, it's necessary to test multiple fonts within a
single given family. Since this is a relatively time consuming
procedure, only do this when there are multiple regular faces for a
given family.
2015-11-11 21:13:33 +09:00
Jonathan Kew a48628058f Bug 1216427 - part 1 - Ensure a character+VS sequence or a ligated Regional-Indicator flag symbol is deleted as a single unit when backspacing. r=emk 2015-10-26 10:47:16 +00: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
John Daggett 84f181826e Bug 1182361 p7 - fixups based on review comments. r=heycam 2015-09-29 10:51:29 +09:00
John Daggett 72bb57d48b Bug 1182361 p4 - move pref font util methods to platform fontlist. r=heycam 2015-09-29 10:51:28 +09:00
John Daggett f2ee55e64a Bug 1182361 p3 - move generic lookup methods to platform fontlist. r=heycam 2015-09-29 10:51:28 +09:00
John Daggett c84b59dee7 Bug 1182361 p1 - move old generic lookup methods into gfxPangoFontGroup. r=heycam 2015-09-29 10:51:28 +09:00