Commit Graph

55 Commits

Author SHA1 Message Date
Kartikaya Gupta
87186734ba Bug 1416540 - Convert AnimationValue::GetStyleValue to return a float-based Size. r=mattwoodrow
This follows from the previous patch; these values feed into UpdateMinMaxScale
as well, which explicitly wants to use floats, so there's no point in creating
doubles. The source of this information is also a float-based matrix.

MozReview-Commit-ID: LPk4Xm9AaJJ

--HG--
extra : rebase_source : d7714755fb1078880133d6f044cc9bc7743439ee
2017-11-12 18:37:33 -05:00
Daniel Holbert
680815cd6e Bug 1412346 part 5: (automated patch) Switch a bunch of C++ files in layout to use our standard mode lines. r=jfkthame
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: EuRsDue63tK

--HG--
extra : rebase_source : 3356d4b80ff6213935192e87cdbc9103fec6084c
2017-10-27 10:33:53 -07:00
Boris Chiou
8e1fff1e15 Bug 1384656 - Use GeckoStyleContext in nsStyleTransformMatrix::ProcessTranslatePart. r=emilio
The unit of nsCSSValue is always number/pixel/percent or eCSSUnit_Calc,
so we don't need the style context for Servo backend.
Besides, ReadTransform is a public API used in many places, so we keep
its argument type as nsStyleContext.

MozReview-Commit-ID: KLdrJ5BJXg8

--HG--
extra : rebase_source : 778ca38b06e2a13d3db0465b9e74bd0c33c62a88
2017-07-31 17:31:27 +08:00
Kartikaya Gupta
4826f32d87 Bug 1377169 - Turn gfxRect into a typedef. r=jrmuizel
One thing to note here is that the Scale function on gfxRect has a
different implementation than that in gfx::Rect which is replacing it.
The former just scales the width/height directly whereas the latter
scales the XMost/YMost and recomputes the width/height.

MozReview-Commit-ID: 5FImdIaNfC3

--HG--
extra : rebase_source : 98662d2a52ff9652ec60b066641a07c6d5ee8e08
2017-07-05 11:22:00 -04:00
Kartikaya Gupta
56edc85a6e Bug 1376782 - Replace gfxPoint with a typedef to PointDouble. r=jrmuizel
This also moves the WithinEpsilonOf function from gfxPoint into
PointTyped, and changes call sites that are using
gfxPoint::Transform(Matrix4x4) to use Matrix4x4::TransformPoint(Point)
instead, which should be equivalent.

MozReview-Commit-ID: 3Z0bsU41rQt

--HG--
extra : rebase_source : 390e8de546d641d324e7125a06d0b8b51a48b946
2017-06-28 11:42:23 -04:00
Markus Stange
284a74c2dc Bug 1370034 - Call SetWindowTransform with the right values from -moz-window-transform(-origin). r=dbaron
MozReview-Commit-ID: 3IVl3kdbpTd

--HG--
extra : rebase_source : 969b912c1be199844575c8b9e196f07d59638043
2017-06-19 00:49:52 -04:00
Cameron McCormack
1849ea4995 Backout bug 1291457 and bug 1370034 for bustage. 2017-06-19 13:55:15 +08:00
Markus Stange
af3291fdf2 Bug 1370034 - Call SetWindowTransform with the right values from -moz-window-transform(-origin). r=dbaron
MozReview-Commit-ID: 3IVl3kdbpTd

--HG--
extra : rebase_source : 3d1b52a352f21b25a8e4ed683575d0277f7c4dd2
2017-06-19 00:49:52 -04:00
Boris Chiou
46a0e62893 Bug 1335998 - Part 2: Delegate matrix decomposition/interpolation/recomposition to Servo. r=birtles,manishearth
Use Servo backend to decompose/interpolate/recompose matrices on both
main thread and compositor thread.

Note: Due there may be differences in precision used to represent the
      components, and the computation of matrix interpolation are not
      exactly same (still following the formulas in spec). There are some
      tiny differences between the interpolation results of 2d/3d
      matrices on Gecko and Servo, especially if there is skew() or any 3d
      transform function.

MozReview-Commit-ID: 6T8vlR4MJGr

--HG--
extra : rebase_source : 3309f4a4541c6612109a441c38bb896deb83c018
2017-06-07 11:25:14 +08:00
Boris Chiou
93878e807e Bug 1335942 - Part 5: Add AnimationValue::GetScaleValue(). r=hiro
Move the common part of GetScaleValue into nsStyleTransformMatrix, and add a
new method, GetScaleValue, on AnimationValue, which can get the scale value from
StyleAnimationValue or RawServoAnimationValue.

MozReview-Commit-ID: 4spi1LkZrWP

--HG--
extra : rebase_source : 81e352edb85c9abb16fb0ef2780ff27c4f264709
2017-02-06 16:32:21 +08:00
Xidorn Quan
c3e6a81bc4 Bug 1316236 - Treat perspective(0) as perspective(infinity). r=dholbert
MozReview-Commit-ID: H9xlpjxrzht

--HG--
extra : rebase_source : 5060ae56163446a9dd6ae816c548ecd987a6e33e
2017-01-20 12:45:33 +11:00
Hiroyuki Ikezoe
c661a36ecc Bug 1304886 - Part 8: Add Accumulate operator. r=boris,derf
MozReview-Commit-ID: Bzcn3IRSx6L

--HG--
extra : rebase_source : 854c39f38953a400407bcf976ebd68f25f4b6396
2016-11-16 20:32:33 +09:00
Boris Chiou
304026cd9d Bug 1272549 - Part 9: Compute distance for mismatched transform lists. r=birtles
MozReview-Commit-ID: JJWcMgj88GX

--HG--
extra : rebase_source : 3f1c314a2bf9c7c12991fb3873738c79b0152ea9
2016-10-05 15:36:16 +08:00
Boris Chiou
5e9077980f Bug 1272549 - Part 7: Compute distance for matrix and matrix3d. r=birtles
Decompose the 2d/3d matrix and calculate the Euclidean distance of
translate, scale, skew, quaternion, and perspective vectors.

MozReview-Commit-ID: 5nX9EeqvZi9

--HG--
extra : rebase_source : a15f2e4350e5c097eee8856a76244a81d589427a
2016-10-04 18:32:20 +08:00
Boris Chiou
17e5c4df16 Bug 1272549 - Part 6: Use enum class for shear in decomposition functions. r=birtles
MozReview-Commit-ID: 4exovhbjHI3

--HG--
extra : rebase_source : 99705c1bb2c980be06f7c662698241dde5ee9ab9
2016-10-12 12:36:58 +08:00
Boris Chiou
c82cb7f0df Bug 1272549 - Part 5: Move decompose matrix to nsStyleTransformMatrix. r=birtles
Move Decompose2DMatrix and Decompose3DMatrix into nsStyleTransformMatrix
and remove some trailing spaces.

Both AddWeighted and ComputeDistance need Decompose2DMatrix and
Decompose3DMatrix on transform property, and both decomposition functions are
related to nsStyleTransformMatrix, so we move them into nsStyleTransformMatrix
to make StyleAnimationValue more concise.

MozReview-Commit-ID: 5aVK7971rDD

--HG--
extra : rebase_source : 75823b96a165ef65e3edfb00978b706d9db09393
2016-10-04 15:00:31 +08:00
Boris Chiou
fe6b56e5e8 Bug 1272549 - Part 4: Compute distance for none and a valid transform list. r=birtles
Reuse AddTransformLists to get the identity transform functions to
replace none, and then treat them with another transform list as two matched
ones.

MozReview-Commit-ID: HwdBPCiUivg

--HG--
extra : rebase_source : 552ff668e2ac19dbfcfe2a37894b278f699f0c0b
2016-10-03 17:43:20 +08:00
William Chen
96cc20f039 Bug 1241575 - Use transform property syntax to parse WebKitCSSMatrix transform list. r=heycam 2016-02-01 16:45:09 -08:00
Kearwood (Kip) Gilbert
c06afa1c7f Bug 1181240 - Part 2: Replace gfx3DMatrix with Matrix4x4 in layout,r=vlad
- Refactored code to use Matrix4x4 instead of gfx3DMatrix.
- There is not expected to be any functional effect.
2015-07-10 17:05:47 -07: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
Cameron McCormack
225f3dd70d Bug 804975 - Part 2: Add a RuleNodeCacheConditions class and use it instead of a boolean canStoreInRuleTree during style computation. r=dbaron 2015-06-23 11:48:18 +10:00
Jonathan Watt
13ebd5c893 Bug 923193, part 4 - Implement support for the 'transform-origin' property in SVG. r=heycam 2015-05-24 22:40:37 +01:00
Jonathan Watt
b9b0d2b3c3 Bug 923193, part 1 - Avoid calculation of the reference box for transforms unless they're actually needed. r=roc
--HG--
extra : rebase_source : 8ffca8102a9648642f9166c213ce9e964c34b2af
2015-04-28 19:55:42 +01:00
Brian Birtles
65c7f861cb Bug 1010067 part 1 - Rename nsStyleAnimation::Value to mozilla::StyleAnimationValue; r=dbaron
This patch also moves the static methods defined on nsStyleAnimation so that
they are part of StyleAnimationValue class.

Renaming nsStyleAnimation.h to StyleAnimationValue.h is performed in a separate
patch to simplify the diff (since some tools may not handle file renames
elegantly).
2014-06-24 15:29:54 +09:00
Matt Woodrow
da8180da9c Bug 995871 - Apply CSS transforms in CSS pixel space instead of device pixel space. r=dbaron 2014-05-08 17:35:00 +12:00
Ehsan Akhgari
6ada2899b2 Bug 916610 - Minimize the #includes in layout/style; r=roc 2013-09-15 21:06:52 -04:00
David Zbarsky
3250bd906e [Bug 847110] Fix up includes in layout/style r=dbaron 2013-03-02 19:31:48 -05:00
Nicholas Cameron
c54f8d4754 Bug 780692; throttle OMTA (rollup patch). r=dbaron,bz
--HG--
extra : rebase_source : 1207275df5c509ac1974e2b9333c738b995f9d5e
2012-12-12 10:12:43 +13:00
David Zbarsky
bf4f8d3c97 Bug 755084 Part 2: Perform CSS animations of transform and opacity on the compositor r=roc, dbaron 2012-07-31 10:28:21 -07:00
Mark Finkle
ecceaf8977 Backout 169ff207ed19, a34baed70c1b, f9ccdd490bd7, 39550ed860e6, 2194a2dd66b2, 908eb2e26843, a76e0a267f26 due to mobile viewport bustage (bug 778580) 2012-07-30 14:36:12 -04:00
David Zbarsky
93b20c52d3 Bug 755084 Part 2: Perform CSS animations of transform and opacity on the compositor r=roc, dbaron 2012-07-27 13:23:44 -07:00
Ed Morley
3ed23376d4 Backout 1244b8a8e57a (bug 755084), 32d16d0f87c9 (bug 706179), 8548e016d4a9 (bug 768440), 697f5b87eae9 (bug 768440), 808fc2bd4e8c (bug 755084), 54b1484cd125 (bug 755084), 876726b632c0 (bug 706179) for xul android R3 failures 2012-07-25 16:37:04 +01:00
David Zbarsky
630069520d Bug 755084 Part 2: Perform CSS animations of transform and opacity on the compositor r=roc, dbaron 2012-07-25 01:48:09 -07:00
Matt Brubeck
90029e0bf6 Back out f4f5189b1d0c, 3b4f0606c547, b8a5a1ab8a5f, 5078933d6954, 7e0260c45de9 (bug 768440, bug 755084, bug 706179) because of reftest failures 2012-07-23 20:25:51 -07:00
David Zbarsky
ffaa635014 Bug 755084 Part 2: Perform CSS animations of transform and opacity on the compositor r=roc, dbaron 2012-07-23 17:34:46 -07:00
Gervase Markham
82ff7027aa Bug 716478 - update licence to MPL 2. 2012-05-21 12:12:37 +01: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
Matt Woodrow
1c7000d5d8 Part 20 - Add more gfx3DMatrix transformation function and use these in nsStyleTransformMatrix. r=derf 2011-09-27 10:54:45 +13:00
Matt Woodrow
bbeb8ef9e1 Bug 505115 - Part 19 - Make the matrix*() transform function handles both length and number values. r=dbaron 2011-09-27 10:54:30 +13:00
Matt Woodrow
b4bfd8dd6a Bug 505115 - Part 9 - Implement the perspective() transform function and the perspective CSS property. r=dbaron 2011-08-03 15:04:22 +12:00
Matt Woodrow
c2d638a2ab Bug 505115 - Part 6 - Implement the 3d -moz-transform functions. r=dbaron 2011-08-03 15:04:19 +12:00
Matt Woodrow
d71d3420c7 Bug 505115 - Part 5 - Use gfx3DMatrix in layout. r=roc 2011-07-23 10:28:51 +12:00
Matt Woodrow
5afc317166 Bug 505115 - Part 3 - Convert nsStyleTransformMatrix to be backed by a 4x4 matrix. r=dbaron 2011-07-23 10:28:07 +12:00
Jonathan Watt
06594c58c1 Bug 614732 part 2 - Doc changes (clarify why nsDisplayTransform requires a bounds rect, and correctly associate nsStyleTransformMatrix's doxygen comment with it). r=roc. 2011-05-25 09:01:11 +01:00
L. David Baron
a5966c5522 Implement animation of -moz-transform property. (Bug 531344) r=dholbert 2010-07-02 21:18:56 -07:00
L. David Baron
5d4b53b370 Move ReadTransforms from nsRuleNode to nsStyleTransformMatrix. (Bug 531344) r=dholbert 2010-07-02 21:18:56 -07:00
L. David Baron
d9e602a186 Fix comment in nsStyleTransformMatrix.h. 2009-12-11 08:13:19 -08:00
L. David Baron
8ba395c73e Rename aInherited/inherited to aCanStoreInRuleTree/canStoreInRuleTree. (Bug 476598) r+sr=bzbarsky 2009-02-04 13:24:18 -08:00
L. David Baron
36813aa498 Reverse the boolean meaning of inherited/aInherited. (This patch, without the next patch to rename things, makes the code make less sense.) (Bug 476598) r+sr=bzbarsky 2009-02-04 13:24:18 -08:00
L. David Baron
d06d163f83 Fix failure to propagate aInherited result of nsRuleNode::CalcLength. (Bug 460440) r=kschwarz sr=bzbarsky 2008-10-20 14:07:09 +02:00