Commit Graph

187 Commits

Author SHA1 Message Date
Ehsan Akhgari
9b4894557d Bug 1060985 - Fix more bad implicit constructors in layout; r=roc 2014-08-31 23:36:37 -04:00
Arnaud Sourioux
c2140d346d Bug 1040582 - Change nsLayoutUtils.cpp's MULDIV Macro to inline function in nsCoord.h. r=dholbert 2014-08-29 01:14:00 -04:00
Daniel Holbert
7adc149934 Bug 1059138 band-aid: Skip flex item sortedness assertion if the first flex item is part of a shadow DOM. r=bz
Not sure what the right fix is here yet, but this should stop the new 'gaia-header' web component from making this dominate the logcat output.
2014-08-27 17:48:21 -07:00
Daniel Holbert
4625d2bc21 Bug 1032922 part 2: Rename flex-basis's "auto" keyword to "main-size" (but retain "flex:auto" as shorthand for "1 1 main-size"). r=heycam 2014-08-07 22:11:48 -07:00
Jonathan Kew
1bd7871acc bug 1031241 pt 4 - Rename the {MIN,PREF}_WIDTH constants used to identify the type of intrinsic inline-size. r=smontagu 2014-07-24 18:03:26 +01:00
Jonathan Kew
136de998f8 bug 1031241 pt 3 - Also rename Intrinsic{Width,Height} to Intrinsic{I,B}Size. r=smontagu 2014-07-24 18:03:26 +01:00
Jonathan Kew
324f2b8312 bug 1031241 pt 1 - Rename Get{Min,Pref}Width to Get{Min,Pref}ISize throughout layout. r=dbaron,smontagu 2014-07-24 18:03:25 +01:00
Simon Montagu
251c4d696a Bug 789096 patch 9: use logical coordinates in nsHTMLReflowState available size. r=jfkthame 2014-07-24 01:28:46 -07:00
Daniel Holbert
2f8e9dec2a Bug 1015474 part 1: Update behavior of "min-width:auto"/"min-height:auto" to match current spec text. r=mats
This updates min-width:auto / min-height:auto to now take several more things
into account, beyond just a flex item's min-content size. Now we'll also
consider its used 'flex-basis', its main max-size property ('max-width' or
'max-height'), and its intrinsic ratio & any constraints in the other
dimension.
2014-07-22 08:24:37 -07:00
Daniel Holbert
fd1ff0cc24 Bug 1037177 part 4: Call ResolveAutoFlexBasisAndMinSize at the end of GenerateFlexItemForChild, instead of just after it. r=mats 2014-07-22 08:24:36 -07:00
Daniel Holbert
3e3f37cd31 Bug 1037177 part 3: Split out flexbox's auto-height-measuring code into its own dedicated function. r=mats 2014-07-22 08:24:36 -07:00
Daniel Holbert
52a9932d7d Bug 1037177 part 2: Rename ResolveFlexItemMaxContentSizing to ResolveAutoFlexBasisAndMinSize. r=mats 2014-07-22 08:24:36 -07:00
Daniel Holbert
eabd84853d Bug 1037177 part 1: Make FlexItem() constructor take a reflow state as a parameter, to reduce arg-count and get faster access to style structs. r=mats 2014-07-22 08:24:36 -07:00
Daniel Holbert
2807393ce8 Bug 984711 part 5: Add back handling for min-height:auto to nsFlexContainerFrame. r=mats
This conceptually reverts changeset 7a289f49170f from bug 848539, though the code being modified looks a bit different now.
2014-07-22 08:24:35 -07:00
Mats Palmgren
82223ffa28 Bug 1031701 - Remove FlexContainerFrame::MarginComponentForSide(), use nsMargin::Side() instead. r=dholbert 2014-07-01 17:58:14 +00:00
Mats Palmgren
b9e51ca2f6 Bug 1028460 - part 3, Change the return type for Get*SkipSides(). r=roc 2014-06-28 10:13:13 +00:00
Phil Ringnalda
e41382e94d Back out 5 changesets (bug 1028460, bug 1031444) for somehow breaking asmjscache/test/test_cachingBasic.html on Android 2.2
Backed out changeset 0b5918ec6521 (bug 1031444)
Backed out changeset 663ff18cd4a1 (bug 1028460)
Backed out changeset ae01b3919c8c (bug 1028460)
Backed out changeset 316c8dfeca9b (bug 1028460)
Backed out changeset e237b2c61ea2 (bug 1028460)
2014-06-28 22:01:28 -07:00
Mats Palmgren
7a89d0eea9 Bug 1028460 - part 3, Change the return type for Get*SkipSides(). r=roc 2014-06-28 10:13:13 +00:00
Jonathan Watt
b6e95499e1 Bug 1030843 - Fix crash in nsNativeThemeCocoa::GetMinimumWidgetSize. r=roc 2014-06-27 10:19:00 +01:00
Mats Palmgren
01d6c4f07f Bug 1025669 - part 0, Add BaseMargin::ApplySkipSides, remove nsIFrame::Apply*SkipSides, and change call sites to use the former. r=roc 2014-06-24 17:52:19 +00:00
Simon Montagu
64e7db84ac Bug 789096 patch 8: use logical coordinates in nsBlockReflowState. r=jfkthame 2014-06-20 02:55:35 -07:00
Simon Montagu
759b949444 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
Daniel Holbert
1aa2afe367 Bug 1024875: Make reflow-related functions in nsFlexContainerFrame return void, now that Reflow returns void. r=mats 2014-06-13 08:37:02 -07:00
Simon Montagu
30b9d24621 Replace Get/SetTopAscent with Get/SetBlockStartAscent. Bug 789096, r=jfkthame 2014-06-11 02:45:31 -07:00
Daniel Holbert
176e414851 Bug 1018449: Don't opportunistically stretch flex items to container's cross-size if the container is multi-line. r=mats 2014-06-06 15:55:58 -07:00
Daniel Holbert
7f8577fcb8 Bug 1015563: Soften flexbox assertion that can fail from integer overflow. r=mats 2014-06-02 15:15:23 -07:00
Mats Palmgren
d149ed014e Bug 508665 - part 4, Make nsCSSFrameConstructor use nsContainerFrame* for frames used as parent frames. r=roc 2014-05-24 22:20:40 +00:00
Mats Palmgren
d73f500b5f Bug 1009272 - [css-grid] Add some sanity checks for the grid container child frame lists. r=dholbert 2014-05-19 23:57:00 +00:00
Wes Kocher
08e5150265 Backed out changeset 40c010000007 (bug 1009272) for B2G build bustage 2014-05-19 17:20:05 -07:00
Mats Palmgren
73bd791d41 Bug 1009272 - [css-grid] Add some sanity checks for the grid container child frame lists. r=dholbert 2014-05-19 23:57:00 +00:00
Daniel Holbert
9fde6a894c Bug 1011311: Drop no-longer-necessary check on availableFreeSpace's sign, in ResolveFlexibleLengths(). r=mats 2014-05-17 18:49:47 -07:00
Daniel Holbert
de1b127bc9 Bug 1005660: Add an "early freeze" step, to freeze flex items that clearly can't grow (or shrink, if we're shrinking). r=mats 2014-05-17 18:49:06 -07:00
Mats Palmgren
e1c8446c27 Bug 1008917 - part 5,6,7, make ReflowChild() and FinishReflowChild() return type 'void', and make a few related helper methods 'void' too. r=roc 2014-05-13 00:47:53 +00:00
Mats Palmgren
0e3e44e19c Bug 1008917 - part 2,3,4, make Reflow() return type 'void', and make a few reflow related helper methods 'void' too. r=roc 2014-05-13 00:47:52 +00:00
Wes Kocher
a3ae69617c Backed out 11 changesets (bug 1008917) for apparently introducing an intermittent failure of B2G Crashtest-2 on a CLOSED TREE
Backed out changeset e2ab653f688a (bug 1008917)
Backed out changeset b52154d8d900 (bug 1008917)
Backed out changeset 2ab5b01da4de (bug 1008917)
Backed out changeset f7a38df1d44f (bug 1008917)
Backed out changeset 80304bb9a572 (bug 1008917)
Backed out changeset 10ed89a302e9 (bug 1008917)
Backed out changeset 161c41991d46 (bug 1008917)
Backed out changeset 25b2475d2368 (bug 1008917)
Backed out changeset b8000b31277c (bug 1008917)
Backed out changeset 9afa5e7715e1 (bug 1008917)
Backed out changeset 5c380c21351f (bug 1008917)
2014-05-12 15:47:41 -07:00
Mats Palmgren
afeea09f92 Bug 1008917 - part 5,6,7, make ReflowChild() and FinishReflowChild() return type 'void', and make a few related helper methods 'void' too. r=roc 2014-05-12 17:40:29 +00:00
Mats Palmgren
aa51f3f125 Bug 1008917 - part 2,3,4, make Reflow() return type 'void', and make a few reflow related helper methods 'void' too. r=roc 2014-05-12 17:40:28 +00:00
Daniel Holbert
ea8650181b Bug 1001653: Return early & break out of loops early in FlexLine::ResolveFlexibleLengths, when we have no unfrozen items remaining. r=mats 2014-05-04 19:05:51 -07:00
Daniel Holbert
5c25bcfc2e Bug 985304 part 2: Make flex algorithm gracefully handle flex factors that sum to < 1. r=mats
When our flexibilities sum to a fraction < 1, we clamp the free space to be no
greater than that same fraction of the original free space. This effectively
makes us treat a flexibility of e.g. "0.01" as "1% of the original free space"
in that sort of situation (while still treating it as a normal flex factor if
the sum of the flex factors is greater than 1).
2014-05-04 09:10:28 -07:00
Daniel Holbert
a92674c20a Bug 985304 part 1: Shorten "flex weight" to "weight" in variable & function names. r=mats
The phrase "flex weight" used to be a term defined in the spec, but it's
long-since been replaced with "flex factor" and "scaled flex factor".

I'm now using the term "weight" to mean "flex factor, with any necessary scaling already done, ready to be used as a weight for apportioning free space".

I'm dropping the "flex" modifier from "flex weight" both for brevity & to make
it more clearly-distinguishable from actual "flex factor" usages in the code.
2014-05-04 09:10:28 -07:00
Daniel Holbert
b94eb57155 Bug 985304 part 0: Drop "running" prefix on variable 'runningFlexWeightSum', for clarity. r=mats 2014-05-04 09:10:27 -07:00
Daniel Holbert
76f7a6c968 Bug 983427 part 5: Toggle switch to enable the code added in this bug & avoid reflowing flex items in bottom-to-top order. r=mats 2014-04-11 14:22:12 -07:00
Daniel Holbert
44fd755c5a (no bug) Update ResolveFlexibleLengths() documentation & drop whitespace on blank line. comment/whitespace-only
(Prior to this commit, the documentation mentioned long-since-removed params aTotalFreeSpace and aItems.)
2014-04-11 14:22:10 -07:00
Daniel Holbert
3a2377b08b Bug 983427 part 4c: If axes are reversed, compute flex container's baseline using the *last* flex line (which in reality is the first line). r=mats 2014-04-07 17:17:43 -07:00
Daniel Holbert
60596fc507 Bug 983427 part 4b: If axes are reversed, align baseline-aligned items with respect to to the flex-end edge (which is the "real" flex-start edge). r=mats 2014-04-07 17:17:43 -07:00
Daniel Holbert
bc07f71ba1 Bug 983427 part 4a: Expand FlexItem baseline accessor to let caller pick the edge as well as the axis. r=mats 2014-04-07 17:17:43 -07:00
Daniel Holbert
523dfed6f1 Bug 983427 part 3: If axes are reversed, swap "flex-start" and "flex-end" alignment (& treat "stretch" as a variety of "flex-start"). r=mats 2014-04-07 17:17:42 -07:00
Daniel Holbert
21b807e55f Bug 983427 part 2: If axes are reversed, link up our lists of FlexLines & FlexItems in reverse, too. r=mats 2014-04-07 17:17:42 -07:00
Daniel Holbert
a515ca6ad8 Bug 983427 part 1: Add FlexboxAxisTracker flag to indicate whether we've detected bottom-to-top flow & are internally reversing axes. r=mats 2014-04-07 17:17:42 -07:00
Daniel Holbert
e1e2408909 Bug 991512: Add convenience methods to calculate outer main & cross size of a FlexItem. r=mats 2014-04-03 10:40:12 -07:00