Граф коммитов

40 Коммитов

Автор SHA1 Сообщение Дата
Emilio Cobos Álvarez 8101ae2ea8 Bug 1523071 - Use Rust lengths for margin / padding / inset. r=jwatt
Also for the intersection observer root margin, since it was easier to fix it
up and clean it up than not doing it.

This is the first big step to get rid of nscoord. It duplicates a bit of logic
in nsLayoutUtils since for now max/min-width/height are still represented with
nsStyleCoord, but I think I prefer to land this incrementally.

I didn't add helpers for the physical accessors of the style rect sides that
nsStyleSides has (top/bottom/left/right) since I think we generally should
encourage the logical versions, but let me know if you want me to do that.

Differential Revision: https://phabricator.services.mozilla.com/D17739
2019-02-10 04:11:58 +01:00
Kartikaya Gupta 09dccca832 Bug 1496194 - Ensure the inner sticky rect stays inside the outer sticky rect. r=botond
Depends on D15136

Differential Revision: https://phabricator.services.mozilla.com/D15137

--HG--
extra : moz-landing-system : lando
2018-12-21 22:37:28 +00:00
Sylvestre Ledru 265e672179 Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
# ignore-this-changeset

--HG--
extra : amend_source : 4d301d3b0b8711c4692392aa76088ba7fd7d1022
2018-11-30 11:46:48 +01:00
Emilio Cobos Álvarez 2265ef0801 Bug 1448688: Remove RestyleTracker, ComputedStyle::AsServo, old style system element bits. r=xidorn
MozReview-Commit-ID: ALiOngGqozN
2018-03-26 09:38:07 +02:00
Botond Ballo b4385a3fda Bug 1442767 - Rename Box to RectAbsolute (Gecko changes). r=kats
MozReview-Commit-ID: 1wrzwQw8bdx

--HG--
rename : gfx/src/nsCoordBox.h => gfx/src/nsRectAbsolute.h
extra : rebase_source : ec71a9add57c07887cb37f2d105390072e13d98d
2018-03-05 18:08:18 -05:00
Botond Ballo d6cea6bca1 Bug 1434250 - Use a Box, rather than a Rect, representation for position:sticky inner/outer rects in the Layers API. r=kats
MozReview-Commit-ID: 4LDQ3XmWynx

--HG--
extra : rebase_source : cebe70a08b27d930618f44cb3923d3ede1171724
2018-02-09 15:40:13 -05:00
Emilio Cobos Álvarez 033d6b32fc Bug 975644: Enable position sticky in table parts. r=bz
MozReview-Commit-ID: 85nCuChHdTa
2017-12-21 20:29:20 +01:00
Emilio Cobos Álvarez fb0dc0f67a Bug 975644: Add a hack to skip table row groups for sticky positioning. r=bz
This matches Blink's behavior.

Just skipping table row groups from being containing blocks makes
layout/reftests/table-overflow/table-cell-block-overflow.html render differently
(and way more different than any other browser, actually...), so I avoided doing
that.

Though I'm not really proud of this one, better ideas welcome. Maybe I should
just fix table layout so that we agree with WebKit / Blink... But that seemed
harder, too.

MozReview-Commit-ID: AkUB4MFzwZK
2017-12-21 20:29:19 +01:00
Kartikaya Gupta 48f2490228 Bug 1413666 - Fix off-by-one error in sticky positioning code. r=botond
MozReview-Commit-ID: J33lrH03HyA

--HG--
extra : rebase_source : 4d9074d1db8a48a3f18961da413b2ec719efbd0e
2017-11-01 16:13:18 -04: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
Sylvestre Ledru 4e9cf83ee8 Bug 1378712 - Remove all trailing whitespaces r=Ehsan
MozReview-Commit-ID: Kdz2xtTF9EG

--HG--
extra : rebase_source : 7235b3802f25bab29a8c6ba40a181a722f3df0ce
2017-07-06 14:00:35 +02: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
Botond Ballo cdbef9ee0c Bug 1316101 - Avoid excessive clamping in StickyScrollContainer::GetScrollRanges(). r=mstange
Excessive clamping can cause incorrect behaviour in the presence of negative
margins.

MozReview-Commit-ID: AkQEqcQpAxx

--HG--
extra : rebase_source : 33cde31c15608792299a1dbef475e0fe0936270d
2016-11-14 19:01:37 -05:00
Botond Ballo 4df075436c Bug 1293125 - Work around a layout issue that causes StickyScrollContainer::GetScrollRanges() to compute malformed rects. r=mstange
MozReview-Commit-ID: IClxdc8tfBh

--HG--
extra : rebase_source : 1be980c68b93244b1cf910335f3693c682c2ba22
2016-10-07 19:31:14 -04:00
Corey Ford 55d426b404 Bug 1280344 - Use first continuation's normal position in computing sticky scroll ranges for APZ. r=dholbert
MozReview-Commit-ID: L0wRgCvb8h8
2016-07-12 12:36:31 -04:00
Brad Werth bb6b3396a0 Bug 1243559 - Removes static casts from calls to FrameProperties::Get, ::Set, and ::Remove, and forces callers to use the type associated with the property. r=dbaron 2016-06-21 13:17:11 -07:00
Phil Ringnalda 28ae5ce216 Back out changeset 0bb00282a4c2 (bug 1243559) for widespread SVG assertion failures
CLOSED TREE
2016-06-22 18:45:08 -07:00
Brad Werth 179aa18d0d Bug 1243559 - Removes static casts from calls to FrameProperties::Get, ::Set, and ::Remove, and forces callers to use the type associated with the property. r=dbaron
--HG--
extra : rebase_source : fd19554f1611f8028a364ce93e833d8939688bfb
2016-06-21 13:17:11 -07:00
Xidorn Quan e397870be2 Bug 1230034 part 5 - Convert all frame properties which use DeleteValue and ReleaseValue as destructor to be typesafe. r=dbaron
By changing signature of those two functions, we make compiler complain about
all their existing uses, so we can find all of them and convert them.

Some of the callsites of Get() with those properties are also converted, but not
all of them. It is fine because if there is any incorrect conversion, compilers
is able to find out now. So they are completely typesafe.

--HG--
extra : source : 808415985d3d446f18941eb007a9be9d69d180ce
2016-01-28 14:23:59 +11:00
Seth Fowler a271bba567 Bug 1128356 - Add template functions for common frame property destructors. r=dbaron 2015-02-04 15:22:27 -08:00
Mats Palmgren 3ffa9baecc Bug 1028460 - part 3, Change the return type for Get*SkipSides(). r=roc 2014-06-28 10:13:13 +00:00
Phil Ringnalda 811c3783d4 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 4e879335f7 Bug 1028460 - part 3, Change the return type for Get*SkipSides(). r=roc 2014-06-28 10:13:13 +00:00
Kearwood (Kip) Gilbert de99f78284 Bug 920688 - Remove FIXME comment from StickyScrollContainer::ComputeStickyLimits. r=dbaron
- The condition described in the FIXME comment is already handled by
  GetNearestBlockContainer in nsFrame.cpp (helper for
  nsIFrame::GetContainingBlock).
2014-04-22 15:30:00 +02:00
Kearwood (Kip) Gilbert c0402875df Bug 984226 - Add parameter to OverflowChangedTracker::AddFrame to distingush between frames that need nsIFrame::UpdateOverflow called and frames that only have a transform that has changed. r=dbaron
- OverflowChangedTracker::AddFrame now accepts an enumerated type parameter to
  indicate if the overflow areas of children have changed (CHILDREN_CHANGED),
  the overflow areas of the children have changed and the parent have changed
  (CHILDREN_AND_PARENT_CHANGED), or if only the transform has changed
  (TRANSFORM_CHANGED).
- OverflowChangedTracker::Flush no longer falls back to calling
  nsIFrame::UpdateOverflow when a frame lacks a PreTransformOverflowAreas
  property.
- Added an additional change hint, nsChangeHint_ChildrenOnlyTransform, which
  results in TRANSFORM_CHANGED being passed in to
  OverflowChangedTracker::AddFrame.
- In nsIFrame::FinishAndStoreOverflow, the passed in overflow is now stored as
  the InitialTransformProperty for elements that are IsTransformed().
- Partially corrected Bug 926155, by only calling
  OverflowChangedTracker::AddFrame on parents of the sticky element during
  StickyScrollContainer::UpdatePositions, using CHILDREN_CHANGED.
2014-03-13 17:21:25 -07:00
Ryan VanderMeulen abc7729b7a Backed out changeset 7be71c699b85 (bug 984226) for crashtest asserts. 2014-04-08 15:31:45 -04:00
Kearwood (Kip) Gilbert 74b70bdbd0 Bug 984226 - Add parameter to OverflowChangedTracker::AddFrame to distingush between frames that need nsIFrame::UpdateOverflow called and frames that only have a transform that has changed. r=dbaron
- OverflowChangedTracker::AddFrame now accepts an enumerated type parameter to
  indicate if the overflow areas of children have changed (CHILDREN_CHANGED) or
  if the transform has changed (TRANSFORM_CHANGED).
- OverflowChangedTracker::Flush no longer falls back to calling
  nsIFrame::UpdateOverflow when a frame lacks a PreTransformOverflowAreas
  property.
- Added an additional change hint, nsChangeHint_ChildrenOnlyTransform, which
  results in TRANSFORM_CHANGED being passed in to
  OverflowChangedTracker::AddFrame.
- In nsIFrame::FinishAndStoreOverflow, the passed in overflow is now stored as
  the InitialTransformProperty for elements that are IsTransformed().
- Partially corrected Bug 926155, by only calling
  OverflowChangedTracker::AddFrame on parents of the sticky element during
  StickyScrollContainer::UpdatePositions, using CHILDREN_CHANGED.
2014-03-13 17:21:25 -07:00
Abel Lin 5760a3a1f1 Bug 980247 - Use offsets from GetNormalPosition() when updating continuations of position:sticky elements instead of assuming that they're all currently offset by the same amount. r=dbaron, r=corey 2014-03-26 14:45:17 -04:00
L. David Baron d31701cad1 Bug 91419 patch 9: Fix comments and debugging output referring to "special" frames. r=mats 2014-02-06 17:45:33 -08:00
L. David Baron 82503f4eca Bug 91419 patch 5: Rename everything with SpecialSibling to IBSplitSibling. r=mats 2014-02-06 17:45:31 -08:00
Mats Palmgren 47faef9328 Bug 949932 - Null-check the new StickyScrollContainer in case we don't have any scroll frame ancestors, e.g. in a position:fixed sub-tree. r=roc 2013-12-13 12:46:59 -05:00
Corey Ford 0eb7828baa Bug 916302 - Part 2: In sticky positioning calculations, use the union of the element's margin boxes and the union of the containing-block element's content boxes. r=dholbert 2013-12-03 11:28:32 -08:00
Robert O'Callahan 154278f277 Bug 931460. Part 1: When a <legend>'s frame is reparented to the <fieldset>, update StickyScrollContainers to match if necessary. r=mats
--HG--
extra : rebase_source : 05a224b4cf49b93c529a476f5c667d91a6e9f3e5
2013-11-23 22:48:26 +13:00
L. David Baron d0255c650f Bug 828312 patch 9a: Make sticky positioning handle block-in-inline splits correctly. r=dholbert
This assumes that the specification for how position:sticky behaves for
block-in-inline splits matches the specification for position:relative,
in other words, matches
http://www.w3.org/TR/CSS21/visuren.html#anonymous-block-level .

It's also necessary for patch 9b since the new rule for handling of
style change hints is that a style change hint applies to all
continuations and all block-in-inline siblings ("special siblings").

The change in StickyScrollContainer::GetScrollRanges is really the fix
for bug 918994, but adjusted for the change here to use block-in-inline
siblings ("special siblings") in addition to continuations.
2013-09-25 12:28:08 -07:00
Corey Ford 7597b90beb Bug 904197 - Use the union of continuations' rects in sticky positioning calculations. r=dholbert
Reftest inline-3.html fails because handling the sticky element's margin correctly will take more work; similarly, border/padding on containing-block continuations won't be handled quite right. Reftest column-contain-1a fails because some of the anonymous blocks inside an nsColumnSetFrame have 0 height.
2013-09-13 16:53:48 -07:00
Daniel Holbert 3a0897f083 Bug 916115: In StickyScrollContainer::UpdatePositions, put do_QueryFrame result in a local var before comparing it for equality. r=corey 2013-09-13 10:04:23 -07:00
Corey Ford 5eef149568 Bug 897105 - Part 3: Keep sticky position layers fixed during async panning, within certain scroll ranges. r=roc 2013-09-11 21:24:32 -07:00
Corey Ford 23d185d13b Bug 911786 - Part 1: Store computed relative position offsets. r=dholbert 2013-09-10 11:33:59 -07:00
Corey Ford 295f63ce42 Bug 914891 - Bail gracefully on sticky positioning with no scroll container. r=dholbert 2013-09-11 16:30:56 -07:00
Corey Ford fecfb82b09 Bug 886646 - Part 6: Implement sticky positioning, calculated on reflow and scroll. r=dbaron, r=dholbert 2013-09-06 09:35:16 -04:00