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

105 Коммитов

Автор SHA1 Сообщение Дата
Xidorn Quan 97d13f46a3 Bug 1303241 part 2 - Make GetVisitedDependentColor use style structs directly. r=dbaron
I think there are three advantages of this change:
1. removes some dependencies from layout / painting code to pre-computed
   value stuff in the style system;
2. makes it easier to audit usage of specific fields in style structs
   (which is probably a side effect of the first one);
3. potentially improves performance since it doesn't go through the
   unnecessary general logic in ExtractComputedValue.

Also, combined with the part before, we get a unified list for visited-
dependent properties so that we can ensure the assertion here and the
style difference calc code are consistent.

MozReview-Commit-ID: 5B9aN7CfRgI

--HG--
extra : rebase_source : ac80eaea2474b9ec4b47b1cc9a5bdd2e61f6ec4d
2016-12-31 00:57:37 +11:00
Xidorn Quan 6b6e2ad7b2 Bug 1299741 part 11 - Change text-{emphasis,fill,stroke}-color to using StyleComplexColor. r=dbaron
MozReview-Commit-ID: 1MlgGAkdPn8

--HG--
extra : rebase_source : 293aa61adaa091bb3d4350a4b86ec9cfbb40eb02
2016-09-16 14:40:45 +10:00
Jonathan Chan 4b87f11bd9 Bug 1293739 - Part 1: Rename nsCSSProperty to nsCSSPropertyID. r=dholbert
This patch is generated by the following commands (note: if you're running
using OS X's sed, which accepts slightly different flags, you'll have to
specify an actual backup suffix in -i, or use gsed from Homebrew):

  hg stat -c \
  | cut -c 3-  \
  | tr '\n' '\0' \
  | xargs -0 -P 8 gsed --follow-symlinks 's/\bnsCSSProperty\b/nsCSSPropertyID/g' -i''

Then:

  hg mv layout/style/nsCSSProperty.h layout/style/nsCSSPropertyID.h

... and finally, manually renaming nsCSSProperty in the include guard in
nsCSSProperty.h.

MozReview-Commit-ID: ZV6jyvmLfA

--HG--
rename : layout/style/nsCSSProperty.h => layout/style/nsCSSPropertyID.h
2016-08-16 18:37:48 -07:00
Gregory Szorc 1794619188 Backed out changesets dcdb85fc5517, 702bca0deee2, 9cKX8gC1ATA (bug 1293739) for build bustage; a=bustage
The merge from inbound to central conflicted with the merge from
autoland to central, it appears. Per tree rules, the commit from the
autoland repo wins and the inbound commit gets backed out.

CLOSED TREE

--HG--
extra : amend_source : 927e1cdfa8e55ccbd873d404d905caf6871c8c4f
extra : histedit_source : 07095868c3f767258e1d7d2645193bf4811b13bb%2Ca49ae5a28bf6e67298b6208ee9254c25a2539712
2016-08-16 17:50:40 -07:00
Jonathan Chan 9c62a2c11c Bug 1293739 - Part 1: Rename nsCSSProperty to nsCSSPropertyID. r=dholbert
This patch is generated by the following commands (note: if you're running
using OS X's sed, which accepts slightly different flags, you'll have to
specify an actual backup suffix in -i, or use gsed from Homebrew):

  hg stat -c \
  | cut -c 3-  \
  | tr '\n' '\0' \
  | xargs -0 -P 8 gsed --follow-symlinks 's/\bnsCSSProperty\b/nsCSSPropertyID/g' -i''

Then:

  hg mv layout/style/nsCSSProperty.h layout/style/nsCSSPropertyID.h

... and finally, manually renaming nsCSSProperty in the include guard in
nsCSSProperty.h.

MozReview-Commit-ID: ZV6jyvmLfA

--HG--
rename : layout/style/nsCSSProperty.h => layout/style/nsCSSPropertyID.h
2016-08-09 16:28:19 -07:00
CJKu ccf25559ce Bug 1261578 - Part 4. Correct text overflow color; r=jfkthame
MozReview-Commit-ID: 2zbmsHxb6II

--HG--
extra : rebase_source : ebdd4caffd9ef5e578880aa0cc325b5ad47decaf
2016-04-19 17:10:17 +08:00
Seth Fowler 5973113f1b Bug 1157546 - Replace the image visibility API with a more general API that tracks visibility for any kind of frame. r=mstange 2016-03-25 14:49:43 -07: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
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
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
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
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
Jonathan Kew 4e6c40d7ea Bug 1131451 part 1 - Replace containerWidth with containerSize in logical-coordinate classes and APIs, frame classes, etc. r=dholbert 2015-07-16 10:07:57 +01:00
Birunthan Mohanathas a8939590de Bug 1182996 - Fix and add missing namespace comments. rs=ehsan
The bulk of this commit was generated by running:

  run-clang-tidy.py \
    -checks='-*,llvm-namespace-comment' \
    -header-filter=^/.../mozilla-central/.* \
    -fix
2015-07-13 08:25:42 -07:00
Jonathan Kew ed4f94f6c0 Bug 1157951 patch 1 - Rename fields and variables in nsCharClipDisplayItem etc using VisIStart/End instead of left/right. r=roc 2015-04-29 08:18:53 +01:00
Xidorn Quan ff400fb4a5 Bug 1117227 part 5 - Render ellipsis in correct orientation. r=jfkthame
--HG--
extra : source : 4766d98091b93c120d41a5118406d82a38d9ff62
2015-04-24 10:15:32 +12:00
Xidorn Quan 3d4aa499c8 Bug 1117227 part 4 - Make overflow mark baseline computation aware of writing-mode. r=jfkthame
--HG--
extra : source : 4dc392ec04f77fd74811dc5595d6f199f99b8796
2015-04-24 10:15:32 +12:00
Xidorn Quan cb03df0c0b Bug 1117227 part 2 - Convert TextOverflow to logical coordinate. r=roc
--HG--
extra : source : fc021c6ca3be7dbbe30fadfbe41f9e8b69c2f6a3
2015-04-24 10:15:32 +12: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
Kartikaya Gupta 6e2b17d2de Bug 990907 - Don't add text-overflow markers while being actively scrolled by APZ. r=mstange,tn 2015-02-25 09:33:00 -05:00
Jonathan Watt bf49eb7f25 Bug 651021 - Make nsRenderingContext a stack class. r=jrmuizel 2014-10-31 20:08:49 +00:00
Jonathan Watt 1d2c31c63d Bug 1088781 - Rename nsLayoutUtils::GetStringWidth to nsLayoutUtils::AppUnitWidthOfStringBidi. r=dholbert 2014-10-26 17:57:49 +00: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 a0f005a778 Bug 1088625, part 1 - Add lots of missing nsFontMetrics.h and gfxTextRun.h includes 2014-10-24 16:28:14 +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
Ehsan Akhgari 60360fc645 Bug 1060985 - Fix more bad implicit constructors in layout; r=roc 2014-08-31 23:36:37 -04:00
Robert O'Callahan 150ec76871 Bug 1048752. Part 24: Rename and deCOM Set/GetCaretVisible. r=tn
--HG--
extra : rebase_source : 04249e9b22a62b8f2952515fa48f4ba3227e235e
2014-08-06 17:19:29 +12:00
Robert O'Callahan 0a6d04586e Bug 1048752. Part 17: Rename Get/SetCaretDOMSelection to Get/SetSelection. r=tn
The forward declaration of Selection in nsCaret.h will be used in later patches.

--HG--
extra : rebase_source : d1b749adac983c04d3365bb6bfb76a50101beeb5
2014-08-06 17:19:27 +12:00
Robert O'Callahan 2489dc1f01 Bug 1048752. Part 16: Move nsFrameSelection::HINT to CaretAssociationHint.h. r=tn
This patch started an attempt to remove nsFrameSelection.h from nsCaret.h
and metastasized into a rather large refactoring patch that removed it
from some other header files as well, and changed nsFrameSelection::HINT
into a global-scope enum with better names. I also converted bools
into CaretAssociationHint in a few places where that was appropriate,
but there are still some more places (GetChildFrameContainingOffset)
where bools need to be converted. I figured this patch was big enough already.

--HG--
extra : rebase_source : cc618ef60e707e1360644340a2648de389383da0
2014-08-06 17:19:27 +12:00
Nicholas Nethercote a7cf4142b4 Bug 1050009 - Initialize pldhash tables with a length, not a capacity. r=roc.
* * *
imported patch rm-dummy-params

--HG--
extra : rebase_source : c25987eb11bae197218d5fc53b77def19afa36ac
2014-08-06 06:31:21 -07: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
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
Timothy Nikkel b92f05ed72 Bug 1002992. Part 1. Don't bother to do text-overflow clipping when building display lists for image visibility. r=mats
It's not important to do and simplifies things.
2014-06-06 21:23:20 -05:00
Simon Montagu f8a68ec80e Make nsLineBox.mBounds a LogicalRect. Bug 789096, r=jfkthame 2014-04-16 01:03:28 -07:00
Daniel Holbert 61204d781b Bug 996351: Rename nsPresShell::GetReferenceRenderingContext() to CreateReferenceRenderingContext(), to reduce implication of fallibility. r=roc 2014-04-14 21:30:25 -07:00
Mats Palmgren efd3ece2e8 Bug 990655 - Don't apply 'text-overflow' to nsComboboxControlFrame, its anon block deals with it. r=roc 2014-04-03 18:02:09 +00:00
Arnaud Sourioux e53280194e Bug 974687 - Part 2: Fix more than 80cols issues caused by MOZ_OVERRIDE annotation. r=dholbert 2014-02-24 09:41:56 -05:00
Arnaud Sourioux a127266e74 Bug 974687 - Part 1: Add about 300 MOZ_OVERRIDE in layout/. r=dholbert 2014-02-24 09:41:56 -05:00