Commit graph

328 commits

Author SHA1 Message Date
Gurzau Raul
70be85b9cd Merge inbound to mozilla-central. a=merge 2018-03-16 19:53:35 +02:00
Mats Palmgren
259eae8a43 Bug 1445230 - [css-grid] Use IntegerRange to make iterating over LineRange more ergonomic (idempotent change). r=dholbert 2018-03-16 12:11:38 +01:00
Mats Palmgren
91a1041da4 Bug 1445229 - [css-grid] Store the number of grid items per span-length to avoid iterating them again (idempotent change). r=dholbert 2018-03-16 12:11:37 +01:00
Sylvestre Ledru
fa45a3c670 Bug 1443080 - Use the static call for static methods (not instance) r=Ehsan
MozReview-Commit-ID: JwHh4bzxuTR

--HG--
extra : rebase_source : 5f5e37517aa80c2e7b5933962178d761074886e7
2018-03-16 14:29:15 +01:00
Mats Palmgren
1fcb898d22 Bug 1425599 - [css-grid] Follow-up bustage fix for stupid compiler warnings. r=me CLOSED TREE 2018-03-15 23:21:41 +01:00
Mats Palmgren
d1d09beb86 Bug 1425599 part 16 - [css-grid] Make SizeContributionForPhase a template. rs=dholbert 2018-03-15 22:41:25 +01:00
Mats Palmgren
7ec9323bf6 Bug 1425599 part 14 - [css-grid] Use iterators instead of an array + start/end index for the item data (idempotent change). r=dholbert 2018-03-15 22:41:25 +01:00
Mats Palmgren
98e4b80bd5 Bug 1425599 part 13 - [css-grid] Merge Grow[Base|Limits]ForSpanningItems into a templated method instead (idempotent change). r=dholbert 2018-03-15 22:41:25 +01:00
Mats Palmgren
7aeff4c91f Bug 1425599 part 12 - [css-grid] Merge CopyPlanToBase/Limits into a templated method instead (idempotent change). r=dholbert 2018-03-15 22:41:24 +01:00
Mats Palmgren
06a85186ef Bug 1425599 part 11 - [css-grid] Hoist the marking of excluded tracks out from GrowSelectedTracksUnlimited to a separate method (idempotent change). r=dholbert 2018-03-15 22:41:24 +01:00
Mats Palmgren
a39d52bb0b Bug 1425599 part 10 - [css-grid] Make MarkExcludedTracks a static method since it doesn't use 'this' (idempotent change). r=dholbert 2018-03-15 22:41:24 +01:00
Mats Palmgren
c635cef6a8 Bug 1425599 part 9 - [css-grid] Merge DistributeToTrackLimits/Bases (idempotent change). r=dholbert 2018-03-15 22:41:24 +01:00
Mats Palmgren
0d5ad6e072 Bug 1425599 part 8 - [css-grid] Factor out the fit-content clamping function from DistributeToTrackLimits and pass it as a param instead (idempotent change). r=dholbert 2018-03-15 22:41:24 +01:00
Mats Palmgren
9fa33326f8 Bug 1425599 part 7 - [css-grid] Remove the 'limits' copy of track sizes since they are no longer needed (idempotent change). r=dholbert 2018-03-15 22:41:24 +01:00
Mats Palmgren
22697a61e7 Bug 1425599 part 6 - [css-grid] Make the size distribution methods templated with the intent of merging them in a later patch (idempotent change). r=dholbert
This patch also introduces an eInfinitelyGrowable bit to help
get rid of the 'limits' temporary track sizes in the next patch.
2018-03-15 22:41:24 +01:00
Mats Palmgren
2720195299 Bug 1425599 part 5 - [css-grid] Make CollectGrowable a templated method so that it works with either base/limit sizes (idempotent change). r=dholbert 2018-03-15 22:41:24 +01:00
Mats Palmgren
0214a637ef Bug 1425599 part 4 - [css-grid] Factor out the starting base/limit size to a templated method (idempotent change). r=dholbert 2018-03-15 22:41:24 +01:00
Mats Palmgren
c11cc9b466 Bug 1425599 part 3 - [css-grid] Factor out most of the max-sizing parts of the track sizing for spanned items to a templated method (idempotent change). r=dholbert 2018-03-15 22:41:24 +01:00
Mats Palmgren
77f3d19f2c Bug 1425599 part 2 - [css-grid] Factor out the min-sizing parts of the track sizing for spanned items to a templated method (idempotent change). r=dholbert 2018-03-15 22:41:23 +01:00
Mats Palmgren
c8fd367dc3 Bug 1425599 part 1 - [css-grid] Change the track sizing algorithm for spanning items so that it accumulates individual item contributions to the plan by max() rather than incrementing the planned size directly. r=dholbert
Also, fix a bug when copying back the planned limits after
updating it for the first span group.  It should only copy
back track sizes that were actaully spanned by those items,
other content-sized tracks' limits should remain at "infinity".
2018-03-15 22:41:23 +01:00
Mats Palmgren
e06a462e0f Bug 1427608 - [css-grid] Fix span=1 'auto' min-sizing for intrinsic sizing. r=dholbert
When sizing the container under a min- or max-content constraint,
the item's min/max-content contribution needs to be clamped (when
Automatic Minimum Size / clamping applies) if its size is 'auto'.
That'll give the container the right intrinsic size. In Reflow,
we'll size the track initially to the clamped min-content
contribution again (in the Resolve Intrinsic Track Sizes step),
but since the container now has a definite size we'll grow
the track in the Maximize Tracks step up to its limit
(i.e. the clamp size).

For more details on the underlying issue, see:
https://github.com/w3c/csswg-drafts/issues/2303
2018-02-28 03:56:13 +01:00
Cameron McCormack
d02e54b79b Bug 1430014 - Part 5: Stop building old style system classes when MOZ_OLD_STYLE is not defined. r=xidorn
MozReview-Commit-ID: CIHyPdF7Exl

--HG--
extra : source : 78a2fc781eead47af3923efcde58569c5d882ab1
2018-02-01 15:04:04 +11:00
Mats Palmgren
a688df9570 Bug 1430757 - Subtract the size of the grid gaps the item spans from "space to fill" when calculating the "Find the Size of an 'fr'" for a grid item. r=dholbert
I.e. in the second bullet of "If the free space is an indefinite length" here:
https://drafts.csswg.org/css-grid/#algo-flex-tracks
2018-01-18 23:06:23 +01:00
Brad Werth
b61d32f5ef Bug 1423378 Part 1: Specially treat the explicit line names following a repeat auto-fit or auto-fill declaration to ensure they are always applied to the following line. r=mats
MozReview-Commit-ID: iFM5J6wRL6
2017-12-05 14:51:06 -08:00
Mats Palmgren
23b6600c9c Bug 1423292 - [css-grid] Add a couple of ItemState bits to Dump(), and make an ItemState assertion stricter (DEBUG-only changes). r=dholbert
MozReview-Commit-ID: 7JhmMenpXN
2017-12-07 18:44:57 +01:00
Mats Palmgren
49e389c837 Bug 1418727 part 2 - [css-grid] Require that an item spans at least one track with an 'auto' min sizing function for Automatic Minimum Size to apply. r=dholbert
MozReview-Commit-ID: KTVul2XQGsa
2017-12-07 18:44:57 +01:00
Mats Palmgren
055bc089c7 Bug 1418727 part 1 - [css-grid] Introduce StateBitsForRange() that collects the union of the state bits for a range of tracks (idempotent change). r=dholbert
MozReview-Commit-ID: HzSxwPMkBEu
2017-12-07 18:44:57 +01:00
Brad Werth
7fd0630c3b Bug 1416350 - Part 1: Correctly account for removed 'auto-fit' tracks also when there are leading implicit tracks. r=mats
MozReview-Commit-ID: 5aJucB3BM59

--HG--
extra : rebase_source : 249eaee7ee637933e14d8884f6190afba0169dfb
extra : histedit_source : 5840d8ae82ace6b05b508b1664cad1162a1851cc
2017-11-09 17:21:23 -08:00
Brad Werth
3b3999ddad Bug 1421420 - Hold onto a weak reference to the grid container frame across reflow flushes triggered by devtools. r=dholbert
MozReview-Commit-ID: 2lkQr1jbnFd
2017-11-28 15:05:48 -08:00
Mats Palmgren
d848b3123d Bug 1417711 - [css-grid] An abs.pos. grid container child that only covers removed 'auto-fit' tracks should not span to the end padding edge. r=dholbert
MozReview-Commit-ID: INVYIFawiuT
2017-11-29 06:51:41 +01:00
Ting-Yu Lin
dc7e13b5d5 Bug 1418905 - Move nsRuleNode::ComputeCoordPercentCalc() into nsStyleCoord. r=heycam
MozReview-Commit-ID: GLLseBxhUiP

--HG--
extra : rebase_source : 2940610dbb5e81e463db82459a46a54eb693e5cb
2017-11-20 14:05:19 +08:00
Mats Palmgren
e471cefe55 Bug 1415683 - Make nsGridContainerFrame aware of the ::backdrop placeholder list. r=dholbert
MozReview-Commit-ID: KtOTmQSYgAn
2017-11-10 19:28:05 +01:00
Mats Palmgren
1c2b8c222e Bug 1414666 part 1 - Add nsIFrame::PresShell() for convenient access to the shell. r=emilio
MozReview-Commit-ID: 8FPTPKWyVtY
2017-11-09 03:00:48 +01: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
Daniel Holbert
a7f82bed77 Bug 1412346 part 4: Update stale MPL license boilerplate on a few files in layout. r=jfkthame
We have a fair number of files that have a particular stale version of the MPL
boilerplate.  (It was probably originally correct, and then the official
boilerplate changed, and the stale MPL boilerplate continued to propagate via
copypasting from neighboring files into newly-added files.)

This patch updates this stale MPL text (and *only* the MPL text) to the latest
version, which can be found at https://www.mozilla.org/en-US/MPL/headers/ and
https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Coding_Style#Mode_Line

MozReview-Commit-ID: 8WeBb8b0uRo

--HG--
extra : rebase_source : 2c3aa8d07ba23714501c9e26ad03625aeab36a7a
2017-10-27 10:09:35 -07:00
Ting-Yu Lin
2e869d8f3d Bug 1341009 - Add nsReflowStatus::IsEmpty() assertions to all nsIFrame::Reflow() methods and some reflow helpers, and remove unneeded Reset(). r=dholbert
nsReflowStatus::IsEmpty() assertions are added after DISPLAY_REFLOW in the
beginning of the Reflow().

A few Reflow() implementations have Reset() calls at the end which are left
in place by this patch (with an explanatory comment added to each). These
ending Reset()s are only needed for cases where a non-splittable frame
passes its own nsReflowStatus to a child's reflow method. Just in case the
child leaves a "not fully complete" value in the nsReflowStatus, the
non-splittable parent frame must clear out the nsReflowStatus before
returning, so that its own parent doesn't then try to split it.

MozReview-Commit-ID: 6Jj3jfMAqj4

--HG--
extra : rebase_source : e1fe6a775ad97e16a6d7cc224634ff962ccb0fbf
2017-09-13 18:00:25 +08:00
Wes Kocher
5a4357c768 Merge inbound to central, a=merge
MozReview-Commit-ID: GArkKmOFIVH
2017-08-11 13:15:33 -07:00
Xidorn Quan
b97e3aed9b Bug 1388255 - Make nsStylePosition::mGridTemplate{Columns,Rows} a UniquePtr. r=canaltinova,dholbert
MozReview-Commit-ID: 8SOE6sAavCX

--HG--
extra : rebase_source : 666c95221e059da9b1a729eea3584e2060968582
2017-08-09 11:30:25 +10:00
Matt Woodrow
40f5b92e3b Bug 1388161 - Store the dirty rect on the display list builder rather than passing it as a parameter to BuildDisplayList. r=mstange 2017-08-07 14:23:35 +12:00
Sebastian Hengst
8257b2d113 Backed out changeset 8f2dd8f13b53 (bug 1388161) for failing chrome's test_animation_performance_warning.html | preserve-3d transform. r=backout 2017-08-10 14:40:21 +02:00
Matt Woodrow
a3a130b6ff Bug 1388161 - Store the dirty rect on the display list builder rather than passing it as a parameter to BuildDisplayList. r=mstange 2017-08-07 14:23:35 +12:00
Mats Palmgren
489c03b415 Bug 1378481 - Assign 'roundingError' in the default branch too, to avoid a maybe-uninitialized compiler warning. r=dholbert
MozReview-Commit-ID: CQk1PBaflct
2017-07-05 23:07:11 +02:00
Nicholas Nethercote
f1364a75ea Bug 1374580 (part 3) - Remove ns{,C}Substring typedefs. r=froydnj.
All the instances are converted as follows.

- nsSubstring  --> nsAString
- nsCSubstring --> nsACString

--HG--
extra : rebase_source : cfd2238c52e3cb4d13e3bd5ddb80ba6584ab6d91
2017-06-20 19:19:52 +10:00
Alexis Beingessner
adb013669b Bug 1088760 - Remove nsRenderingContext, replacing all of its uses with gfxContext. r=jwatt,jrmuizel
MozReview-Commit-ID: K1WUIOnvazF
2017-06-13 11:00:10 -04:00
Sebastian Hengst
f3bf820bfd Backed out changeset 3d1ce85e6348 (bug 1088760) for bustage, at least on Android at layout/generic/nsPluginFrame.cpp:1612. r=backout 2017-06-13 00:30:03 +02:00
Alexis Beingessner
c75211cb95 Bug 1088760 - Remove nsRenderingContext, replacing all of its uses with gfxContext. r=jwatt,jrmuizel
MozReview-Commit-ID: K1WUIOnvazF
2017-06-12 17:32:48 -04:00
Jonathan Kew
a8f81efd8e Bug 1365982 - Attach frame properties to each frame instead of looking them up in a hashtable on the prescontext. r=mats
--HG--
rename : layout/base/FramePropertyTable.cpp => layout/base/FrameProperties.cpp
rename : layout/base/FramePropertyTable.h => layout/base/FrameProperties.h
2017-05-27 12:36:00 +01:00
Mats Palmgren
1a7ef0cf26 Bug 1349320 part 2 - [css-grid] Make nsLayoutUtils::IntrinsicForAxis take an optional percentage basis to use for resolving transferred percentages. r=dholbert
If the percentage basis isn't provided it will be calculated from the ancestors
as before.  Note that that algorithm is only valid if the frame's containing
block is the ancestor's content box, which isn't the case for grid items.
So grid layout MUST provide a percentage basis, although the given value may
be NS_UNCONSTRAINEDSIZE for either axis if the value is indefinite.

MozReview-Commit-ID: 7nvAuR43xfM
2017-05-11 02:33:14 +02:00
Mats Palmgren
216858e554 Bug 1349320 part 1 - [css-grid] Calculate (and cache) an item's percentage basis to use for resolving transferred percentages in intrinsic sizing. r=dholbert
MozReview-Commit-ID: 7SsRRqM7Vbk
2017-05-11 02:33:14 +02:00
Emilio Cobos Álvarez
23bce99ae1 Bug 1361051: rename mozilla::FrameType to mozilla::LayoutFrameType. r=xidorn
This avoids conflicts with mozilla::dom::FrameType.

MozReview-Commit-ID: 7aEMbHRaTFk

--HG--
extra : rebase_source : 2d01321f5ce0ec8c0e3f70984674f82678034b3c
2017-05-01 19:32:52 +02:00