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

44 Коммитов

Автор SHA1 Сообщение Дата
Xidorn Quan 60bcaa5c0b Bug 1257121 part 4 - Use return value rather than out param to return font metrics. r=jfkthame
MozReview-Commit-ID: 6xrHYbgHGVd

--HG--
extra : rebase_source : 4d0cea24689588d8a1daa1869502e31ac7c3dc56
2016-03-17 13:55:48 +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
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
Andrea Marchesini 77aab8ab51 Bug 1134280 - Get rid of Tag() - patch 2.4 - layout/mathml - Fix all the occurrences, m=smaug, r=surkov 2015-03-03 11:09:00 +00:00
Frédéric Wang ce3221837c Bug 1002526 - Part 1 - Pass the font inflation parameter to nsLayoutUtils::GetFontMetricsFor* methods. b=1002526. r=karl 2014-10-25 08:29:00 +02:00
Jonathan Watt 4f23ebac06 Bug 1088625, part 3 - Remove nsRenderingContext's SetFont, FontMetrics and SetTextRunRTL methods now that no one uses them any more. r=mstange 2014-10-24 16:28:15 +01:00
James Kitchener 9f763ef993 Bug 1069929 - Flag dtls font feature setting for <mover> elements. r=fredw 2014-09-24 04:33:00 -04:00
Frédéric Wang 08fc27fb9b Bug 961365 - Part 5: Use MATH constants for limits. r=jfkthame 2014-06-17 04:42:00 -04:00
Frédéric Wang bbe8cb6e9f Bug 961365 - Part 4: Use MATH constants for scripts. r=jfkthame 2014-06-17 04:09:00 -04:00
Simon Montagu ca20e365ef Replace Get/SetTopAscent with Get/SetBlockStartAscent. Bug 789096, r=jfkthame 2014-06-11 02:45:31 -07:00
Mats Palmgren c5cb22f48c Bug 508665 - part 15, s/mParent/GetParent()/ in a bunch of nsIFrame sub-classes. r=roc 2014-05-24 22:20:41 +00:00
Arnaud Sourioux 2d583fd28f Bug 919806: Get rid of NS_IMETHOD in nsIFrame.h and its implementations r=dholbert 2014-02-17 23:47:48 -08:00
Peiyong Lin 14bf63554d Bug 959874 - Reorder two parameters in nsContainerFrame::FinishReflowChild(), for consistency with nsContainerFrame::ReflowChild(). r=dholbert 2014-01-16 17:34:44 -08:00
Frédéric Wang d09cde4286 Bug 838509 - Part 1: Make MathML frames use GetAttr instead of GetAttribute. r=roc 2014-01-15 10:07:06 -05:00
James Kitchener d1622128f3 Bug 442637 - MathML changes to support ssty setting. r=fredw 2014-01-15 09:49:00 -05:00
Frédéric Wang 9875abbbcd Bug 838506 - Part 3: Changes to MathML frames. r=roc 2014-01-14 09:39:50 -05:00
Jonathan Kew a7837e1ffa bug 735577 - pt 4.1 - use accessor functions for some physical-coordinate fields in nsHTMLReflowMetrics, in preparation for logicalization. r=smontagu 2013-12-27 17:59:52 +00:00
Ehsan Akhgari 669ff96c05 Bug 911292 - Minimize the #includes in layout/mathml; r=mats 2013-08-30 17:37:12 -04:00
James Kitchener 17378468b0 Bug 827713 - Use mmultiscripts to handle all script shift elements. r=fredw 2013-08-19 09:11:50 -04:00
Mats Palmgren b7ae90666d Bug 786533 - Replace NS_MIN/NS_MAX with std::min/std::max and #include <algorithm> where needed. r=ehsan 2013-01-15 13:22:03 +01:00
rfw2nd@gmail.com 394d5e66e0 Bug 553917 - Add helper methods and logic for error logging to MathML module. r=karlt 2012-12-27 11:12:05 -05: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
Aryeh Gregor d0ad5a7d0c Bug 777292 part 2 - Change all nsnull to nullptr 2012-07-30 17:20:58 +03:00
Gervase Markham 82ff7027aa Bug 716478 - update licence to MPL 2. 2012-05-21 12:12:37 +01:00
Frédéric Wang ec70dcfbda munder, mover, munderover: add support for the align attribute (bug 557476). r=karlt
--HG--
extra : rebase_source : 84702b0b078b0c85b10f9a168fbf64c1210a80ce
2012-01-05 11:20:39 +13: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
L. David Baron d2b6891283 Switch lots of callers to using nsLayoutUtils::GetFontMetricsForFrame and nsLayoutUtils::GetFontMetricsForStyleContext. (Bug 678671, patch 1) r=roc
This changes a number of callers that were previously bypassing the use
of the correct language (with either no language or the charset-detected
language on the pres context via nsPresContext::GetMetricsFor) and/or
the correct user font set to pass the correct values, which should
improve the correctness of the behavior of whatever they were using the
fonts for, and also reduce the number of unique sets of font metrics
requested (which helps nsFontCache effectiveness).
2011-08-14 10:08:04 -07:00
Jonathan Hage d68cbdf102 Bug 669713 - Increment the scriptlevel of the over child in <munderover accent=true> when rendered as a supscript; r=karlt 2011-08-14 11:17:22 +02:00
Jonathan Hage c9d5ac8edc Bug 668204 - Merge nsMathMLmunderFrame and nsMathMLmoverFrame into nsMathMLmunderoverFrame. r=karlt 2011-08-13 17:22:12 +02:00
Frédéric Wang 03b8e81191 b=669932 munderover: do not add space above/below when the over/under script is empty r=karlt
--HG--
extra : transplant_source : f%2B%7D%0A%8E%3F%3A%F5%B3I%E0%86%5E%99%E1%5D%D9%AEJ%C4
2011-08-05 13:04:43 +12:00
Frédéric Wang da0a470d47 b=669932 take into account the base child vertical metrics for the computation of the munderover ascent/descent. r=karlt
--HG--
extra : transplant_source : %B7%0DP%06xl%02t%24%AF%2B%EAiM%29%CC%A5%0C%9F%DE
2011-08-05 12:59:12 +12:00
Frédéric Wang c9ae4d40a0 b=669932 munderover: consider underscript vertical metrics during the underscript attachment phase instead of the overscript attachment phase. r=karlt
--HG--
extra : transplant_source : %B6%29%E1%1B%D4%0D%84fV%B9%1F%16%15%3Cu%A4%22%A0%94%F1
2011-08-05 12:57:27 +12:00
Frédéric Wang 8b4f6eb2f4 Support for attributes "accent" and "accentunder" on mstyle (bug 569125). r=karlt
--HG--
extra : rebase_source : 349a7d0fa10c165404592576fb9eb31d95b2dbb7
2011-05-13 09:31:52 +12:00
Zack Weinberg ef90e52c10 Bug 174055, part 6: eliminate pointless nsresult return values. 2011-04-07 21:18:43 -07:00
Zack Weinberg b6b73ad75a Bug 174055, part 4: mechanical fixups outside gfx. 2011-04-07 18:05:49 -07:00
Zack Weinberg 9f143f420f Bug 174055, part 1: minimize inclusion of nsI(Thebes)FontMetrics.h. 2011-04-07 18:04:41 -07:00
Zack Weinberg 86131020a5 Bug 266236 part 8: Change nsRenderingContext::GetDeviceContext and ::GetFontMetrics to return bare pointers.
--HG--
rename : gfx/src/nsThebesRenderingContext.cpp => gfx/src/nsRenderingContext.cpp
rename : gfx/src/nsThebesRenderingContext.h => gfx/src/nsRenderingContext.h
extra : rebase_source : 36dd32d715cb75e99cd3a69e460c000c1777d6a6
2011-04-07 18:04:40 -07:00
Jan Küchler c510bc3046 Bug 266236 part 3: Mechanical rename of nsIRenderingContext and nsThebesRenderingContext to nsRenderingContext. Mechanical substitution of nsRefPtr<nsRenderingContext> for nsCOMPtr<nsRenderingContext>.
--HG--
rename : gfx/src/nsThebesRenderingContext.cpp => gfx/src/nsRenderingContext.cpp
extra : rebase_source : 34884bfcafd885feaf73300bc7246cd192062a48
2011-04-07 18:04:40 -07:00
Jan Küchler ebb2f0c7ec Bug 266236 part 1: Preliminary API cleanup on nsIRenderingContext.
--HG--
extra : rebase_source : a21ffad484f47103e403b8316eae5fdfd815c2cb
2011-04-07 18:04:39 -07:00
Robert O'Callahan 3133bff6c6 Bug 537890. Part 10: Fix nsPresContext and nsIDeviceContext unit-conversion methods to be explicit about using CSS logical units instead of physical units. r=dbaron 2010-08-13 21:58:04 +12:00
Jonathan Kew 365fbafa0d Bug 524107 - part 1 - pass original value of 'lang' to gfx text code rather than only a 'langGroup' value, to allow language-specific font rendering. r=roc sr=mats 2010-02-24 09:57:44 -08:00
Mats Palmgren dea07412a1 Replace PR_MIN/PR_MAX with NS_MIN/NS_MAX. b=512106 r=roc 2009-09-16 17:01:36 +02:00
Zack Weinberg d47e0f433b Bug 497495 part 3: Add methods to every nsFrame subclass that expose the as-allocated identity of every frame object. Also some cleanups to the QueryFrame implementation. r=dbaron sr=roc 2009-09-12 17:49:24 +01:00
Robert O'Callahan beac740c0f Bug 484766. Clean up MathML directory structure. r=karlt,ted
--HG--
extra : rebase_source : 1c88ebe3a41dee12a982442ad2e711aa287ed55f
2009-03-30 13:48:52 +13:00