Bas Schouten
2c20988af9
Bug 1457110: Restore behavior of maintaining width/height when one of the two is exactly zero. r=jrmuizel
...
MozReview-Commit-ID: 5OpjfTnJQxe
2018-05-25 18:16:52 +02:00
Bas Schouten
8338ab994b
Bug 1387399: Add SIMD optimizations for methods used frequently in nsRect. r=jrmuizel
...
This improves the DisplayList Mutate Talos test by about 5% on windows, as well as numerous smaller improvements on DisplayList heavy tasks.
MozReview-Commit-ID: tlEtPjqWI4
2018-04-19 15:56:29 +02:00
Cosmin Sabou
b9a82af44a
Backed out 2 changesets (bug 1387399) for OSX reftests permafailures on attachment-local-positioning-2.html. a=backout
...
Backed out changeset b78a225fa8c9 (bug 1387399)
Backed out changeset 4beeacb75bf5 (bug 1387399)
2018-04-20 06:47:41 +03:00
Bas Schouten
0dee5c2745
Bug 1387399: Add SIMD optimizations for methods used frequently in nsRect. r=jrmuizel
...
This improves the DisplayList Mutate Talos test by about 5% on windows, as well as numerous smaller improvements on DisplayList heavy tasks.
MozReview-Commit-ID: tlEtPjqWI4
2018-04-19 15:56:29 +02:00
Milan Sreckovic
e3960c6dce
Bug 1429602: Rename BaseRect::IsZero to BaseRect::IsZeroArea. Also slip in some corrections to using BaseRect methods instead of direct member access. r=bas.schouten
...
MozReview-Commit-ID: H3ApaWesbKF
--HG--
extra : rebase_source : c4f73da113a604c14fbf0f1ef4c598d032d68792
2018-01-10 17:57:10 -05:00
Milan Sreckovic
bf8a535a29
Bug 1428348: Allow Set{Left,Right,Top,Bottom}Edge methods to compute negative width/height without asserting. r=bas.schouten
...
MozReview-Commit-ID: EOGgAvq4lPW
--HG--
extra : rebase_source : 359dc88940a6f9d353b33d6b5a264dc88955157d
2018-01-09 11:24:37 -05:00
Matt Woodrow
1a07a450f8
Bug 1344971 - Part 3: Don't compute a region for nsDisplayBorder when we only want a rect. r=mstange
2017-03-07 14:07:33 +13:00
Milan Sreckovic
099cfc4242
Bug 1423570: Use BaseRect access methods instead of member variables in gfx/ r=bas.schouten
...
MozReview-Commit-ID: ZGySgc9oP3
--HG--
extra : rebase_source : 23aadc10e9885002290155684b2c495780d979ce
2017-12-19 15:48:39 -05:00
Milan Sreckovic
e9ad31bdf1
Bug 1423919: Additional methods for BaseRect for convinient modifications/testing of the member variable values. Force inline some commonly used methods. r=milan.schouten
...
MozReview-Commit-ID: 8zALRpsKLXx
--HG--
extra : rebase_source : ac6e88124c924c65cb79b3a97da0a90fedaa1689
2017-12-07 14:14:04 -05:00
Jeff Muizelaar
dce6b5fece
Bug 1422321. Eliminate double promotion in Round(). r=kats
...
This uses std::floor(T) instead of floor(double) so that we end up calling
floorf(float) for floats instead floor(double). It also changes the literals to
be floats. 0.5f is exactly representable in float and so will transparently
promote to double as needed.
--HG--
extra : rebase_source : ea193026b3c7d1f97f5abbc3f9220eca5ac5523c
2017-11-30 13:23:56 -05:00
Daniel Holbert
126bd9e1a4
Bug 1412427 part 8: (automated patch) Switch a bunch of C++ files in gfx to use our standard mode lines. r=jrmuizel
...
This patch was generated automatically by the "modeline.py" script, available
here: https://github.com/amccreight/moz-source-tools/blob/master/modeline.py
For every file that is modified in this patch, the changes are as follows:
(1) The patch changes the file to use the exact C++ mode lines from the
Mozilla coding style guide, available here:
https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Coding_Style#Mode_Line
(2) The patch deletes any blank lines between the mode line & the MPL
boilerplate comment.
(3) If the file previously had the mode lines and MPL boilerplate in a
single contiguous C++ comment, then the patch splits them into
separate C++ comments, to match the boilerplate in the coding style.
MozReview-Commit-ID: 77D61xpSmIl
--HG--
extra : rebase_source : c6162fa3cf539a07177a19838324bf368faa162b
2017-10-27 16:10:06 -07:00
Milan Sreckovic
15f0b9e537
Bug 1388892: TableArea doesn't really need to own the rectangle, except for the union call. Especially since we're exposing the addresses of the members. r=xidorn
...
MozReview-Commit-ID: BAjQ20ngkIM
--HG--
extra : rebase_source : 8ed144bf053dc5c7c26201ec023aac3a00a2c7e5
2017-08-31 16:00:44 -04:00
Milan Sreckovic
56c2b6e6f7
Bug 1386277: Add set methods for width and height that change nothing else, as well as the Swap method r=bas
...
MozReview-Commit-ID: 6TZ977mvH5C
--HG--
extra : rebase_source : 3f124c682ac914f3fde27c396c2fb21b324ed521
2017-08-03 15:29:35 -04:00
Wes Kocher
12a2e09564
Backed out changeset f56d71bbd7eb (bug 1386277) for build bustage in BaseRect.h a=backout
...
MozReview-Commit-ID: GNqvDrHn8No
2017-08-03 12:14:32 -07:00
Milan Sreckovic
325b9a25eb
Bug 1386277: Add set methods for width and height that change nothing else, as well as the Swap method r=bas
...
MozReview-Commit-ID: 5pN2aMrvAuD
--HG--
extra : rebase_source : ed9740538808803f9c8e0e6d59a559e03c4b4dad
2017-08-03 14:40:14 -04:00
Botond Ballo
c697659438
Bug 1352863 - Add a DistanceTo() method to BaseRect. r=kats
...
MozReview-Commit-ID: BHGXvNFlfb4
--HG--
extra : rebase_source : d26190c57e396671f68f679aa33aa1df0bfe5bea
2017-05-19 20:10:30 -04:00
Ting-Yu Lin
e857e2115f
Bug 1320014 Part 15 - Replace RectCorner with Corner. r=mats
...
Rewrite RectCornerRadii::operator==() and RectCornerRadii::AreRadiiSame() by
explicitly expand all the comparisons, and rewrite other explicit for-loops
with NS_FOR_CSS_FULL_CORNERS.
MozReview-Commit-ID: BLBJHla8kyk
--HG--
extra : rebase_source : 464d8973eae6fa58e6931cc65d61900605926b85
2017-01-05 17:07:07 +08:00
Ting-Yu Lin
754b6c9659
Bug 1317588 Part 3 - Remove #define NS_SIDE_TOP/RIGHT/BOTTOM/LEFT. r=mats
...
This patch was written with the help of the following script. Also, manually
add mozilla qualifier to the enum values in nsStyleCoord.h, gfxRect.h, and
Types.h to make it build.
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 "NS_SIDE_TOP" "eSideTop"
rename "NS_SIDE_RIGHT" "eSideRight"
rename "NS_SIDE_BOTTOM" "eSideBottom"
rename "NS_SIDE_LEFT" "eSideLeft"
MozReview-Commit-ID: 9T0ORsqM6nP
--HG--
extra : rebase_source : 884ad96104c6e9cf6c8b3145d2d3a071ecccfe6a
2016-11-18 18:12:25 +08:00
Nicolas Silva
79bb9f5c0e
Bug 1284837 - Disallow implicit conversions from float to integer when creating. r=botond
2016-09-16 17:49:39 +02:00
Kartikaya Gupta
85a734ff8d
Bug 1283826
. r=mstange,Bas
...
MozReview-Commit-ID: HiwjHBlhmKk
2016-07-19 21:50:09 -04:00
Wes Kocher
881322b8cb
Backed out changeset 7985dab6e65e (bug 1283826
) for crashtest failures CLOSED TREE
2016-07-18 11:43:15 -07:00
Kartikaya Gupta
f006a9f9b3
Bug 1283826
. r=mstange,Bas
...
MozReview-Commit-ID: HiwjHBlhmKk
2016-07-18 11:15:00 -04:00
Milan Sreckovic
17dda1461b
Bug 1272767: More graphics MOZ_CRASH-es getting GFX prefix. Also, follow up on bug 1270180 comments. r=mchang
...
MozReview-Commit-ID: 1rlHdDG4Cbw
--HG--
extra : rebase_source : 8bf84d2b1c4cc5bc48821b1eadbadf8edc6ce1ba
2016-05-13 16:34:41 -04:00
Nicholas Nethercote
2511b2c327
Bug 1267550 (part 2) - Rename MOZ_WARN_UNUSED_RESULT as MOZ_MUST_USE. r=froydnj.
...
It's an annotation that is used a lot, and should be used even more, so a
shorter name is better.
MozReview-Commit-ID: 1VS4Dney4WX
--HG--
extra : rebase_source : b26919c1b0fcb32e5339adeef5be5becae6032cf
2016-04-27 14:16:50 +10:00
Kartikaya Gupta
726b05f89b
Bug 1231396 - Add a pref to record and print out the number of pixels painted. r=mstange
...
MozReview-Commit-ID: 2qqnL6rqjcL
2016-04-19 17:07:57 -04:00
Matt Woodrow
2f1cbec9a2
Bug 1224433 - Part 2: Clamp the invalidation rect to values that fit within nscoord. r=roc
...
--HG--
extra : rebase_source : 0aaede54d8622786cddaf8365e6bf091d6bff8f8
2016-02-12 11:35:17 +13:00
Timothy Nikkel
2dbd0146a5
Bug 1223639. Rename ForceInside to MoveInsideAndClamp so it's clearer what it does. r=botond
...
This has led to confusion at least twice.
2015-11-11 16:38:25 -06:00
Xidorn Quan
53b6bfd6d2
Bug 962249 part 2 - Add Edge() helper method to BaseRect. r=roc
...
--HG--
extra : source : 4b1e87fe574699d40f1c949d2347ecf30eb5b065
2015-10-27 13:38:02 +09: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
Markus Stange
ac9d8fb8d7
Bug 1152838 - Fix BaseRect::InflateToMultiple and move it to nsIntRect. r=mattwoodrow, r=jrmuizel
...
--HG--
extra : rebase_source : 71717edbccf311c7f9101e7a9fccd5901406fe10
2015-04-09 15:49:25 -04:00
Seth Fowler
39007175b4
Bug 1147706 - Warn if we don't use the result of const methods on BaseRect and its subclasses. r=tn
2015-03-26 15:39:47 -07:00
Benoit Girard
64d4c32b50
Bug 1135677
- Deal with overflowing rects. r=bas
...
--HG--
extra : rebase_source : d5b26d8d1e35f9138ad81af0650f3817c3d43b09
2015-02-23 14:09:56 -05:00
Robert Longson
4b9965e1ed
Bug 1099197 - Determine the bounds of unstroked polylines/polygons directly. r=jwatt
2014-11-24 14:28:58 +00:00
Jonathan Watt
660d648ee6
Bug 1092222, part 2 - Add CCWCorner, CCWCorner and CWCorner methods to BaseRect. r=roc
2014-11-03 10:01:58 +00:00
Botond Ballo
bb5b3e24c2
Bug 1057642 - More convenient formatting of BasePoint. r=BenWa,kats
...
--HG--
extra : rebase_source : bf75da112714f584ce3fc802d716a6c969e1d160
2014-08-27 19:25:53 -04:00
Matt Woodrow
1fe5ef80f4
Bug 1048110 - Pad visible regions out by 1 pixel to avoid sampling from invalid content. r=Bas
2014-08-05 12:17:47 +12:00
Jonathan Watt
424ac90bb3
Bug 1049593 - Make BaseRect::Contains(point) behave correctly for floating point rect/point. r=Bas
2014-08-07 06:24:54 +01:00
Botond Ballo
49966e8549
Bug 961289 - Add support for writing a BaseRect to an output stream. r=Bas
...
--HG--
extra : source : 2f5a1727bfe5c95c99aced1221c816fefcb95b0c
2014-05-07 16:29:44 -04:00
Markus Stange
6cedf152d2
Bug 1008154 - Make BaseRect::Intersects return false if at least one of the rects is empty. r=roc
2014-05-11 17:48:32 +02:00
Doug Sherk
44492a6505
Bug 1002289 - Allow adding/subtracting of BaseSize on BaseRect. r=botond, Bas
2014-05-02 11:22:54 -04:00
Benjamin Bouvier
460c4df9b5
Bug 939843: Required changes in the rest of the tree; r=froydnj
...
--HG--
extra : rebase_source : 5757eb2b73755c8da08112b91b025a8fa860d7e8
2014-02-27 16:23:16 +01:00
Anthony Jones
ee3c6259c8
Bug 951463 - Rename ClampRect to ForceInside; r=botond
2014-01-06 10:05:07 -05:00
Jonathan Watt
286fe2eb0f
Bug 934157 - Fix BaseRect::IsFinite() to actually work. r=Bas
2013-11-03 20:47:05 +00:00
Daniel Holbert
b922a25b2e
Backout e67dad88f860 and assertion-count-tweak followups (bug 914919), since including nsDebug.h in gfx/2d causes issues with some skia headers.
2013-10-09 17:03:35 -07:00
Corey Ford
f17aaa5a04
Bug 914919 - Downgrade BaseRect::Set*Edge assertions to be non-fatal. r=dholbert
2013-09-11 16:27:14 -07:00
Kartikaya Gupta
1bbf96a8d3
Bug 907906 - Finish templating the gfx::Margin type, and add a gfx::IntMargin type to go with it. r=Cwiiis
2013-08-22 12:41:51 -04:00
Milan Sreckovic
501c4cfc89
Bug 905219 - BaseRect::IsFinite() now uses std::isfinite(), rather than NS_finite(). r=jrmuizel
2013-08-14 12:29:47 -04:00
Milan Sreckovic
ec1c424f28
Bug 903526 - Add BaseRect::IsFinite() method. r=bas
2013-08-13 14:48:17 -04:00
Bas Schouten
8c309fb1dc
Bug 878032 - Part 2: Factor out partial bitmap uploading and scaling. r=jrmuizel
2013-06-19 22:48:40 +02:00
Ehsan Akhgari
9b5acabd5a
Backed out 2 changesets (bug 878032) because of Windows build bustage
...
Backed out changeset 3cb61a7d5746 (bug 878032)
Backed out changeset 627c03f469d8 (bug 878032)
Landed on a CLOSED TREE
2013-06-19 17:35:21 -04:00