Commit Graph

343 Commits

Author SHA1 Message Date
Sebastian Hengst
d91e9954eb Backed out 4 changesets (bug 525063) on request from Andi. a=backout
Backed out changeset 516c4fb1e4b8 (bug 525063)
Backed out changeset 6ff8aaef2866 (bug 525063)
Backed out changeset bf13e4103150 (bug 525063)
Backed out changeset d7d2f08e051c (bug 525063)
2018-04-13 16:01:28 +03:00
Tristan Bourvon
6095241db8 Bug 525063 - Initialize uninitialized class attributes in m-c. r=ehsan 2018-04-10 21:11:02 +02:00
Mats Palmgren
f3a0c9e1e8 Bug 1434478 part 6 - Propagate a percentage basis to nsIFrame::IntrinsicISizeOffsets for resolving padding/margin. r=dholbert
This is needed only for CSS Grid since in other cases we're
only using IntrinsicISizeOffsets in the inline-axis and
the percentage basis is always indefinite for *intrinsic
sizing*.  When calculating the intrinsic size of grid items
in the grid container's block axis however, we do have
a definite size for the grid area in the inline-axis and it
should be used per:
https://drafts.csswg.org/css-grid/#algo-overview
"2. Next, the track sizing algorithm resolves the sizes of
the grid rows, using the grid column sizes calculated in
the previous step."

(Percentage padding/margin for grid items is always resolved
against the grid area's inline-size nowadays.)
2018-04-10 00:16:58 +02:00
Mats Palmgren
19c9f7ee3a Bug 1434478 part 2 - Stop back-computing percentage padding/margin when the percentage basis is indefinite. Treat them as zero sized instead. r=dholbert 2018-04-10 00:16:57 +02:00
Mats Palmgren
5a88f05c3a Bug 1434478 part 1 - [css-grid] Stop back-computing percentage grid gaps when the percentage basis is indefinite. Treat them as zero sized instead. r=dholbert 2018-04-10 00:16:57 +02:00
Jonathan Watt
dcee05dad5 Bug 1452170 follow-up - Fix Windows unified build bustage by adding missing AutoRestore.h includes. r=me on CLOSED TREE 2018-04-09 10:21:42 +01:00
Mats Palmgren
6b98f79a2a Bug 1447166 part 4 - [css-grid] Make InitializeItemBaselines iterate the GridItemInfo array instead of using a CSSOrderAwareFrameIterator (idempotent change). r=dholbert 2018-03-24 23:03:44 +01:00
Mats Palmgren
65d9e940f7 Bug 1447166 part 3 - [css-grid] Switch from stable to unstable sort in grid track ResolveIntrinsicSize function. r=dholbert
No need to use a stable sort here since track sizing doesn't
depend on which order we process items (other than span length).
2018-03-24 23:03:44 +01:00
Mats Palmgren
38ebf8ba49 Bug 1447166 part 2 - [css-grid] Make ResolveIntrinsicSize iterate the GridItemInfo array instead of using a CSSOrderAwareFrameIterator (idempotent change). r=dholbert 2018-03-24 23:03:43 +01:00
Mats Palmgren
7775d3cdb1 Bug 1447166 part 1 - [css-grid] Make FindUsedFlexFraction iterate the GridItemInfo array instead of using a CSSOrderAwareFrameIterator (idempotent change). r=dholbert 2018-03-24 23:03:43 +01:00
Mats Palmgren
ec39c082df Bug 1447059 - [css-grid] Remove some redundant checks regarding eClampMarginBoxMinSize (idempotent change). r=dholbert 2018-03-24 23:03:43 +01:00
Emilio Cobos Álvarez
1d4859a89a Bug 1447483: Merge nsStyleContext and ServoStyleContext, rename to ComputedStyle. r=jwatt on a CLOSED TREE
MozReview-Commit-ID: JPopq0LudD
2018-03-22 20:06:24 +01:00
Emilio Cobos Álvarez
97286b35c8 Back out changeset b683bb3f22a1 (Bug 1447483) for not landing with all the files. r=me on a CLOSED TREE
This reverts commit 1808914126bb9f9e4a82d2c3d7ac961885fe7d62.

MozReview-Commit-ID: 5skESBseEvo
2018-03-22 20:05:22 +01:00
Emilio Cobos Álvarez
1f5d8de5cc Bug 1447483: Merge nsStyleContext and ServoStyleContext, rename to ComputedStyle. r=jwatt
MozReview-Commit-ID: JPopq0LudD
2018-03-22 19:48:42 +01:00
Emilio Cobos Álvarez
b1a35fbef7 Bug 1447358: Unifdef the old style system code. r=jwatt
Summary:
This has been automatically generated using:

  http://dotat.at/prog/unifdef/

And:

find $OBJDIR -type f -name '*.h' |
while read FILE; do
  echo "$FILE"
  unifdef -m -DMOZ_STYLO -UMOZ_OLD_STYLE "$FILE";
done

find $OBJDIR -type f -name '*.cpp' |
while read FILE; do
  echo "$FILE"
  unifdef -m -DMOZ_STYLO -UMOZ_OLD_STYLE "$FILE";
done

MozReview-Commit-ID: I4NdKqbMXzJ

Reviewers: jwatt

Bug #: 1447358

Differential Revision: https://phabricator.services.mozilla.com/D779
2018-03-21 10:20:34 +01:00
Gurzau Raul
c60fd45dd3 Merge inbound to mozilla-central. a=merge 2018-03-16 19:53:35 +02:00
Mats Palmgren
c255a0ab9b 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
6089b23afe 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
055d8432e6 Bug 1443080 - Use the static call for static methods (not instance) r=Ehsan
MozReview-Commit-ID: JwHh4bzxuTR
2018-03-16 14:29:15 +01:00
Mats Palmgren
224220ae28 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
5fdb9a4bc2 Bug 1425599 part 16 - [css-grid] Make SizeContributionForPhase a template. rs=dholbert 2018-03-15 22:41:25 +01:00
Mats Palmgren
0eed68afc0 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
ee9987aa03 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
0def1405f7 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
483412d8b8 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
32df4babac 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
5bca480805 Bug 1425599 part 9 - [css-grid] Merge DistributeToTrackLimits/Bases (idempotent change). r=dholbert 2018-03-15 22:41:24 +01:00
Mats Palmgren
5674e180ed 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
4df007040c 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
25e80d8922 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
799c57c4cd 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
7aa10194e5 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
5f51b0a30d 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
9896a0db39 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
8fb4d09fc2 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
3698c3287f 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
34288f7f48 Bug 1430014 - Part 5: Stop building old style system classes when MOZ_OLD_STYLE is not defined. r=xidorn
MozReview-Commit-ID: CIHyPdF7Exl
2018-02-01 15:04:04 +11:00
Mats Palmgren
87b8f69d9e 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
bbf66e2b5f 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
83a7a0aaf3 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
20c5636844 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
3720c08cd5 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
c2b64603a0 Bug 1416350 - Part 1: Correctly account for removed 'auto-fit' tracks also when there are leading implicit tracks. r=mats
MozReview-Commit-ID: 5aJucB3BM59
2017-11-09 17:21:23 -08:00
Brad Werth
6102d3c1e5 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
c23587f9ee 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
5ef96b463f Bug 1418905 - Move nsRuleNode::ComputeCoordPercentCalc() into nsStyleCoord. r=heycam
MozReview-Commit-ID: GLLseBxhUiP
2017-11-20 14:05:19 +08:00
Mats Palmgren
c8c39ac5b0 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
2544eb586c 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
8fea3c215f 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
2017-10-27 10:33:53 -07:00
Daniel Holbert
6d371062a3 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
2017-10-27 10:09:35 -07:00