gecko-dev/layout
Emilio Cobos Álvarez 584d9d8e68 Bug 1668156 - Fix some IntersectionObserver edge cases, and enable the assertion for good. r=hiro
This patch fixes two issues, described below:

First, the GetTopLevelDocument function was looking at the browsing
context tree. It should look at the window context tree, as looking at
the browsing context tree means that if you're in a discarded or
about-to-get-discarded document, you can end up with a document from a
different tree. Computing intersections between those of course makes no
sense and triggers the assertion we're enabling.

Second, this patch fixes an issue when you have fission enabled, and a
setup such as:

  A1 -> B1 -> A2

If you try to use IntersectionObserver from A2 with the implicit root,
we'd end up with:

  * rootRect: A1's root scrollport rect (this is fine, because it's only
              used to compute the root margin and bounds and so on, not
              to compute geometry).

  * rootFrame: A1's root scroll frame (this is _not_ fine, see below).

Then, we'd try to map rects from A2's target to A1's viewport, and we
can't really do that sensibly with the existing nsLayoutUtils functions,
because we're not accounting for all the OOP iframe transforms that may
be going on. This also triggers the assertion that this patch enables in
same-origin-grand-child-iframe.sub.html.

To fix it, for the A2 case, use the same code that we have for other OOP
iframes. The test tweaks fails with fission enabled without the patch
(because we don't account for the OOP iframe clip).

Differential Revision: https://phabricator.services.mozilla.com/D92089
2020-10-01 22:41:55 +00:00
..
base Bug 1668156 - Fix some IntersectionObserver edge cases, and enable the assertion for good. r=hiro 2020-10-01 22:41:55 +00:00
build Bug 1667594 - Move nsLayoutUtils::RectCallback to namespace scope. r=emilio,jgilbert 2020-09-30 21:06:47 +00:00
docs Bug 1665152 - Initial CSS Masonry draft spec. r=dholbert 2020-09-23 23:21:38 +00:00
forms Bug 1667510 - Make nsDateTimeControlFrame not do math on nscoord_MAX. r=dholbert 2020-09-28 18:31:20 +00:00
generic Bug 1668406 - Introduce nsIPrintSettings.honorPageRuleMargins. r=jfkthame 2020-10-01 13:18:01 +00:00
inspector Bug 1665955 - Stop including nsIScrollableFrame.h from Element.h. r=emilio 2020-09-18 18:32:13 +00:00
ipc Bug 1613985 - Use default for equivalent-to-default constructors/destructors in layout. r=dholbert 2020-03-17 09:38:32 +00:00
mathml Bug 1667594 - Move nsLayoutUtils::SurfaceFromElementResult to its own file. r=emilio 2020-09-30 21:05:34 +00:00
media
painting Bug 1668411 - Change IS_TRUE_OVERFLOW_CONTAINER macro into a nsIFrame's inline method. r=emilio 2020-10-01 02:39:40 +00:00
printing Bug 1668301. Merge the 'printing-widget' NSPR module into the 'printing' module. r=bobowen 2020-09-30 16:36:29 +00:00
reftests Bug 1667707 - Optimize clip image mask rendering for axis-aligned masks. r=jrmuizel 2020-09-29 22:59:10 +00:00
style Bug 1660122 Part 6 - Move static function IsXULDisplayType() into nsStyleDisplay. r=emilio 2020-09-29 22:32:57 +00:00
svg Bug 1660122 Part 7 - Implement GetAspectRatio(). r=emilio 2020-09-29 22:33:05 +00:00
tables Bug 1667594 - Move nsLayoutUtils::SurfaceFromElementResult to its own file. r=emilio 2020-09-30 21:05:34 +00:00
tools Bug 1661138 - Make WPT print reftests not open new windows. r=jgraham,marionette-reviewers 2020-09-25 09:15:48 +00:00
xul Bug 1640567 Pass expected window position to the NativeMoveResizeWaylandPopup to avoid repositioning; r=stransky 2020-10-01 10:18:37 +00:00
moz.build Bug 1628958 Part 1 - Add Layout & CSS section to Mozilla Source Tree Documentation. r=firefox-source-docs-reviewers,sylvestre 2020-04-15 18:07:24 +00:00