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

133 Коммитов

Автор SHA1 Сообщение Дата
Ting-Yu Lin 40fcd21b9a Bug 1277129 Part 7b - Rename various ReflowState variables to ReflowInput. r=dbaron
This patch is generated by the following script:

function rename() {
find .\
     -type f\
     ! -path "./obj*"\
     ! -path "./.git"\
     ! -path "./.hg"\
     \( -name "*.cpp" -or\
        -name "*.h" \)\
        -exec sed -i -r "s/$1/$2/g" "{}" \;
}

rename "([[:alpha:]]*)([rR])eflowState(s?)" "\1\2eflowInput\3"

MozReview-Commit-ID: ITFO7uMTkSb

--HG--
extra : rebase_source : c91a2e174a0baec60c1b0111ac7636295004ab35
2016-07-21 18:36:39 +08:00
Ting-Yu Lin 55cde36029 Bug 1277129 Part 6b - Rename rendContext to mRenderingContext in SizeComputationInput. r=dbaron
MozReview-Commit-ID: LczLJDtDncy

--HG--
extra : rebase_source : c32e928ae25f94305fb907db89278dce7304a903
2016-07-21 18:36:38 +08:00
Ting-Yu Lin 4053c4c028 Bug 1277129 Part 5c - Rename nsHTMLReflowMetrics to ReflowOutput. r=dbaron
This patch is generated by the following script:

function rename() {
find .\
     -type f\
     ! -path "./obj*"\
     ! -path "./.git"\
     ! -path "./.hg"\
     \( -name "*.cpp" -or\
        -name "*.h" \)\
        -exec sed -i -e "s/$1/$2/g" "{}" \;
}

rename "nsHTMLReflowMetrics" "ReflowOutput"

MozReview-Commit-ID: 2HBb7DkooH5

--HG--
extra : rebase_source : acfa442a6483772fcb5748dc6f5e7072e599032a
2016-07-21 18:36:38 +08:00
Ting-Yu Lin 820f88de49 Bug 1277129 Part 1c - Rename nsHTMLReflowState to ReflowInput. r=dbaron
This patch is generated by the following script:

function rename() {
find .\
     -type f\
     ! -path "./obj*"\
     ! -path "./.git"\
     ! -path "./.hg"\
     \( -name "*.cpp" -or\
        -name "*.h" \)\
        -exec sed -i -e "s/$1/$2/g" "{}" \;
}

rename nsHTMLReflowState ReflowInput

MozReview-Commit-ID: 9r9vdVv1pXc

--HG--
extra : rebase_source : 623ec822996ba0ea0058dd137acf5a658cdea04a
2016-07-21 18:36:35 +08:00
Brad Werth bb6b3396a0 Bug 1243559 - Removes static casts from calls to FrameProperties::Get, ::Set, and ::Remove, and forces callers to use the type associated with the property. r=dbaron 2016-06-21 13:17:11 -07:00
Phil Ringnalda 28ae5ce216 Back out changeset 0bb00282a4c2 (bug 1243559) for widespread SVG assertion failures
CLOSED TREE
2016-06-22 18:45:08 -07:00
Brad Werth 179aa18d0d Bug 1243559 - Removes static casts from calls to FrameProperties::Get, ::Set, and ::Remove, and forces callers to use the type associated with the property. r=dbaron
--HG--
extra : rebase_source : fd19554f1611f8028a364ce93e833d8939688bfb
2016-06-21 13:17:11 -07: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
Matt Woodrow 47cde44daf Bug 1243610 - Refactor UpdateOverflow to separate out local overflow from that contributed by descendants. r=dbaron 2016-05-04 12:27:43 +12:00
Matt Woodrow 7980b88d54 Bug 1243614 - Implement UpdateOverflow for nsMathMLContainerFrame. r=roc 2016-05-04 12:26:42 +12:00
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
Xidorn Quan 8acf32453c Bug 1257121 part 3 - Add GetInflatedFontMetricsForFrame function to simplify a common use pattern. r=jfkthame
MozReview-Commit-ID: 4KMLCz6wQHQ

--HG--
extra : rebase_source : 08964aef3b335163985dd6818b4a6ae3a4e34fce
2016-03-17 12:07:47 +08:00
Ting-Yu Lin 2d02ad0652 Bug 1227927 Part 3 - Use ranged-based for-loop to rewrite some simple loops in part 2. r=mats
--HG--
extra : commitid : CcdpGdlMNIk
extra : rebase_source : 9c184cb8107bf6276c237d03d240f8755fd61553
2016-01-29 22:42:15 +08:00
Ting-Yu Lin 1889f6bc41 Bug 1227927 Part 2 - Remove nsIFrame::GetFirstPrincipalChild(). r=mats
--HG--
extra : commitid : 5qtaK1nS8RC
extra : rebase_source : dcc98f423b2446269beb6fa6a9d092ae8213f38e
2016-01-29 22:42:14 +08:00
Xidorn Quan e397870be2 Bug 1230034 part 5 - Convert all frame properties which use DeleteValue and ReleaseValue as destructor to be typesafe. r=dbaron
By changing signature of those two functions, we make compiler complain about
all their existing uses, so we can find all of them and convert them.

Some of the callsites of Get() with those properties are also converted, but not
all of them. It is fine because if there is any incorrect conversion, compilers
is able to find out now. So they are completely typesafe.

--HG--
extra : source : 808415985d3d446f18941eb007a9be9d69d180ce
2016-01-28 14:23:59 +11: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
Xidorn Quan a1dd9fc19e Bug 1216332 - Remove framearena helpers from abstract frame classes and stop them from being instantiated. r=dbaron
--HG--
extra : source : 9f59591f02706190e56db8ad89ff5a769b5c47dd
2015-11-04 20:57:35 +11: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
Nicholas Nethercote a37228e1fe Bug 1207944 (part 4) - Use SetColor(const Color&) when setting from an nscolor. r=jwatt.
In various places SetColor() gets passed an nscolor. These are converted
(either implicitly or explicitly) to a gfxRBGA, and then to a gfx::Color.

This patch changes all these cases to avoid the middle step, by (a)
constructing a gfx::Color directly instead of an nscolor, or (b) by converting
an nscolor with Color::FromABGR().

--HG--
extra : rebase_source : ae423a422b37ada8ca0cb6f130350b4a71d58fc4
2015-09-23 23:41:30 -07:00
Mats Palmgren ed9ed2d61a Bug 1148833 part 3 - Remove nsIFrame::WillReflow and add a non-virtual MarkInReflow method instead that sets NS_FRAME_IN_REFLOW. Call it at the start of Reflow(). r=roc 2015-03-29 22:38:40 +00:00
Mats Palmgren 47bcd96eb6 Bug 1148833 part 1 - Remove nsMathMLContainerFrame::WillReflow, reset the NS_MATHML_ERROR bit at the start of Reflow instead. r=roc 2015-03-29 22:38:39 +00: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
Robert O'Callahan ac7d5cd4af Bug 1139709. Address review comments. r=mats
--HG--
extra : rebase_source : c9ddf3b8061f8624cddea8cf12b82f030330ac34
2015-03-05 17:22:26 +13:00
Robert O'Callahan aaa040a415 Bug 1139709. Cache nsMathMLContainerFrame's intrinsic width. r=mats
For me, this reduces the load time of the testcase in bug 1139709 from
68s to 34s.

--HG--
extra : rebase_source : 3b308584a9985e5ce55297fff6bb7f35acadcf0e
2015-03-05 14:30:07 +13: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
Andrea Marchesini 2c4f63331f Bug 1134280 - Get rid of Tag() - patch 1 - Is{HTML,XUL,MathML,SVG}Element and IsAnyOf{HTML,XUL,MathML,SVG}Elements, r=smaug 2015-03-03 11:08:59 +00:00
Seth Fowler a271bba567 Bug 1128356 - Add template functions for common frame property destructors. r=dbaron 2015-02-04 15:22:27 -08: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
Jonathan Watt 1c3326bede Bug 1088625, part 2 - Pass nsFontMetrics objects through to code that needs it instead of storing it on the nsRenderingContext. r=mstange 2014-10-24 16:28:14 +01:00
Jonathan Watt 35505a8b96 Bug 1088599 - Move nsRenderingContext::GetBoundingMetrics to nsLayoutUtils. r=mstange 2014-10-24 16:28:14 +01:00
Jonathan Watt 0e920978be Bug 1088071, part 1 - Wrap the callers of the final nsRenderingContext::DrawString method up in a new nsLayoutUtils::DrawUniDirString method. r=jfkthame 2014-10-24 11:00:23 +01:00
Jonathan Watt 09f54bbbb9 Bug 1086708 - Rename the snapping variant of NSRectToRect to NSRectToSnappedRect. r=mattwoodrow 2014-10-22 12:29:06 +01:00
Jonathan Watt 251f92b10b Bug 1085165 - Get rid of the nsRenderingContext::SetColor() method. r=mattwoodrow
--HG--
extra : rebase_source : dc4604e04cae84b8dcbd2d9890191713555c8c7a
2014-10-20 10:55:49 +01:00
Jonathan Watt b8b833765e Bug 1083753, part 2 - Port the code that uses nsRenderingContext::FillRect(nsRect) to Moz2D. r=mattwoodrow 2014-10-19 13:22:22 +01:00
James Kitchener c7c77e1e40 Bug 687807 - Improvements to stretching of embellished operators. r=karlt 2014-09-19 20:13:00 +02:00
Markus Stange e5d05a9461 Bug 1021564 - Make sure that FinishAndStoreOverflow is called for MathML frames even if they are in an error state. r=roc 2014-08-30 18:22:42 +02:00
Seth Fowler 3be514e0be Bug 981924 - Update ReportToConsole calls in layout code to use the right category. r=dbaron 2014-08-11 16:52:01 -07:00
Jonathan Kew 76bdb9472c bug 1031241 pt 4 - Rename the {MIN,PREF}_WIDTH constants used to identify the type of intrinsic inline-size. r=smontagu 2014-07-24 18:03:26 +01:00
Jonathan Kew 55170c430a bug 1031241 pt 3 - Also rename Intrinsic{Width,Height} to Intrinsic{I,B}Size. r=smontagu 2014-07-24 18:03:26 +01:00
Jonathan Kew ce9cbe4216 bug 1031241 pt 1 - Rename Get{Min,Pref}Width to Get{Min,Pref}ISize throughout layout. r=dbaron,smontagu 2014-07-24 18:03:25 +01:00
Simon Montagu 18c9f2f61a Bug 789096 patch 10: make Reflow set nsHTMLReflowMetrics.ISize and BSize instead of Width and Height. r=jfkthame 2014-07-24 01:30:07 -07:00
Simon Montagu c3b44c4dad Bug 789096 patch 9: use logical coordinates in nsHTMLReflowState available size. r=jfkthame 2014-07-24 01:28:46 -07:00
Simon Montagu 8147ef2061 Bug 1028521: Use the nsHTMLReflowMetrics' writing mode passed in from the container in nsMathMLContainerFrame::ReflowChild, not the child frame's. r=jfkthame 2014-06-24 01:36:45 -07:00
Simon Montagu aaa4878ee5 Replace GetBaseline with GetLogicalBaseline and use logical coordinates in the line position and baseline getters in nsLayoutUtils. Bug 789096, r=jfkthame 2014-06-17 05:19:38 -07:00
Simon Montagu ca20e365ef Replace Get/SetTopAscent with Get/SetBlockStartAscent. Bug 789096, r=jfkthame 2014-06-11 02:45:31 -07:00
Mats Palmgren f08f841973 Bug 1015781 - part 1+2, Make the SetInitialChildList/AppendFrames/InsertFrames/RemoveFrame methods return void (scripted change). Remove code handling the return values. r=roc 2014-05-28 19:36:58 +00: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
Mats Palmgren a6feda0f22 Bug 508665 - part 1, Change the signature of SetParent/GetParent from nsIFrame* to nsContainerFrame*. r=roc 2014-05-24 22:20:39 +00:00
Mats Palmgren 9f6f93ca23 Bug 1008917 - part 5,6,7, make ReflowChild() and FinishReflowChild() return type 'void', and make a few related helper methods 'void' too. r=roc 2014-05-13 00:47:53 +00:00