Commit Graph

2542 Commits

Author SHA1 Message Date
Ting-Yu Lin
1bcc656a6a Bug 1638928 Part 2 - Rename nsIFrame's GetChildLists() to ChildLists(). r=mats
This patch is generated by using my editor's rename functionality.

In the next patch, `nsIFrame::` prefix is going to be removed manually
from all the ChildLists() calls.

Differential Revision: https://phabricator.services.mozilla.com/D75893
2020-05-19 12:37:37 +00:00
Dorel Luca
ac1c2045e3 Backed out changeset 39dff7adfc30 (bug 1634911) for build bustage in layout/generic/nsBlockFrame.cpp. CLOSED TREE 2020-05-19 20:10:12 +03:00
Shishir Jaiswal
34bc8520ca Bug 1634911 - Simplify loops over lines in block layout to use ranged for. r=emilio
- Fixed clang-tidy warning
- Addressed the final review comments.
- Fixed the build failures happening in DEBUG mode. Had to revert the range based for loop usage at one place.

Differential Revision: https://phabricator.services.mozilla.com/D75673
2020-05-19 16:54:02 +00:00
Ting-Yu Lin
fa348f911f Bug 1635319 Part 4 - Have GetCrossDocChildLists() return an array of ChildList, and use it in range-based for loops instead of FrameChildListArrayIterator. r=mats
Differential Revision: https://phabricator.services.mozilla.com/D75655
2020-05-18 01:06:58 +00:00
Ting-Yu Lin
59cb4b8a77 Bug 1635319 Part 2 - Use range-based for loops and array iterators instead of ChildListIterator in layout/generic/. r=mats
Differential Revision: https://phabricator.services.mozilla.com/D75653
2020-05-18 01:17:15 +00:00
longsonr
2a15970acc Bug 1636119 - Don't snap SVG content during animation r=hiro
Differential Revision: https://phabricator.services.mozilla.com/D74505
2020-05-14 10:43:11 +00:00
Nicolas Silva
794ebc767d Bug 1636841 - Revert snapping the displayport by 512 increments with WR. r=kats
The original change causes a large  tscrollx linux64-shippable-qr regression, we'll have to revisit this after we better understand the regression.

Differential Revision: https://phabricator.services.mozilla.com/D75045
2020-05-13 10:55:32 +00:00
Hiroyuki Ikezoe
dfcb8e297c Bug 1634616 - Calculate a perfect square based on the viewport size and rotate it to adjust the partial prerender area for rotation transforms. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D74521
2020-05-12 21:24:40 +00:00
Hiroyuki Ikezoe
afeee51c5f Bug 1634616 - Unscale pre-render area for transform animations too. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D74520
2020-05-12 20:58:09 +00:00
Hiroyuki Ikezoe
bd351593a3 Bug 1637149 - Use a ctor of nsDisplayTransform which doesn't require a boolean argument for |allowAsyncAnimation| in nsLayoutUtils::GetLayerTransformForFrame. r=miko
Differential Revision: https://phabricator.services.mozilla.com/D74803
2020-05-12 12:24:37 +00:00
Coroiu Cristina
a9cc814af1 Backed out 3 changesets (bug 1634616) for reftest failures at layout/reftests/transform/partial-prerender-expansion-rotate.html on a CLOSED TREE
Backed out changeset 53da1ae188f4 (bug 1634616)
Backed out changeset 60271de42eb8 (bug 1634616)
Backed out changeset 4279b1647e47 (bug 1634616)
2020-05-12 13:47:25 +03:00
Hiroyuki Ikezoe
ec23a82f08 Bug 1634616 - Calculate a perfect square based on the viewport size and rotate it to adjust the partial prerender area for rotation transforms. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D74521
2020-05-12 08:32:45 +00:00
Hiroyuki Ikezoe
9d21d30221 Bug 1634616 - Unscale pre-render area for transform animations too. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D74520
2020-05-12 08:32:15 +00:00
Nicolas Silva
a777561d0d Bug 1635472 - Move the displayport by 512 increments with WebRender. r=kats
Differential Revision: https://phabricator.services.mozilla.com/D73914
2020-05-07 10:29:23 +00:00
Narcis Beleuzu
758119cf89 Backed out changeset e9afce8fbf79 (bug 1635472) for mochitest failures on test_group_zoom.html . CLOSED TREE 2020-05-06 13:38:53 +03:00
Nicolas Silva
53e62e8839 Bug 1635472 - Move the displayport by 512 increments with WebRender. r=kats
Differential Revision: https://phabricator.services.mozilla.com/D73914
2020-05-05 23:09:32 +00:00
Botond Ballo
6748fc1cb3 Bug 1631568 - Have nsLayoutUtils::GetFrameForPoint() and GetFramesForArea() take a RelativeTo parameter. r=tnikkel
This removes the need for FrameForPointOptions::IsRelativeToLayoutViewport,
and makes sure each call site of these functions indicates whether the
input point/rect is in visual or layout coordinates.

Several call sites were passing in layout coordinates without setting the
IsRelativeToLayoutViewport flag, which this patch corrects.

Differential Revision: https://phabricator.services.mozilla.com/D71705
2020-05-05 15:24:12 +00:00
Botond Ballo
9703b5367d Bug 1556556 - Miscellaneous fixes related to event coordinate transformations. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D69639
2020-05-05 19:28:15 +00:00
Botond Ballo
5a09afe62e Bug 1556556 - Handle visual/layout coordinate conversions correctly in GetEventCoordinatesRelativeTo(). r=kats,mattwoodrow
The idea here is:

  * The incoming point comes from WidgetEvent::mRefPoint which is in
    visual coordinates.

  * Depending on the value of the target RelativeTo parameter, we
    may need to convert this to layout coordinates.

  * In the fast-path, we do a direct check on the viewport type
    and apply the visual-to-layout transform if appropriate.

  * In the slow path, we rely on TransformRootPointToFrame() (which
    calls GetTransformToAncestor()) to include the visual-to-layout
    transform if appropriate, by correctly passing in
    ViewportType::Visual as the starting point.

     * To make sure we get into TransformRootPointToFrame(), we
       set transformFound if we'll be crossing a zoomed content root.

Differential Revision: https://phabricator.services.mozilla.com/D68921
2020-05-05 19:27:50 +00:00
Botond Ballo
3a89751d73 Bug 1556556 - Include the layout-to-visual transform for a zoomed content root in GetTransformMatrix(). r=kats,mattwoodrow
This is the "core" change of the patch series, which causes most
existing layout codepaths to correctly factor in the visual to
layout transform (or its inverse), as long as the callers correctly
propagate it in the correct ViewportType.

Differential Revision: https://phabricator.services.mozilla.com/D68920
2020-05-05 19:27:47 +00:00
Botond Ballo
731c9522be Bug 1556556 - Propagate RelativeTo far and wide. r=kats,mattwoodrow
This "upgrades" various nsLayoutUtils functions which take as inputs
a set of coordinates and a frame that the coordinates are relative to,
to accept a RelativeTo object instead of a frame.

Most of the patch is just dumb propagation, but the few places where
we use an explicit ViewportType::Visual are important. There are
probably a few other places I've overlooked, but this seems to cover
the important ones that come up commonly.

There are undoubtedly other functions into which we can propagate
RelativeTo, in this patch I've propagated it as far as necessary
for my needs in this bug (mainly GetTransformToAncestor() and
GetEventCoordinatesRelativeTo()).

Differential Revision: https://phabricator.services.mozilla.com/D68919
2020-05-05 19:26:38 +00:00
Botond Ballo
f66e578e97 Bug 1556556 - Add a "relative to layout viewport" option for display list building. r=mstange,mattwoodrow
Use it in document.elementFromPoint().

Differential Revision: https://phabricator.services.mozilla.com/D68914
2020-05-05 19:24:08 +00:00
Botond Ballo
7cd506ba3d Bug 1556556 - Remove some cruft related to handling the resolution in non-e10s setups. r=tnikkel
Prior to this bug, it was necessary to handle non-e10s specially, because the
resolution was being unapplied at the process boundary, and in non-e10s there
was no process boundary.

The remaining patches in this bug move the resolution unapplication away from
the process boundary in all cases, making special handling for non-e10s
unnecessary.

Differential Revision: https://phabricator.services.mozilla.com/D68273
2020-05-05 19:20:00 +00:00
Mats Palmgren
e7f922b1e5 Bug 1633045 - Don't use the Print Preview viewport scroll frame as a scroll container for 'position:sticky' content. r=TYLin
Differential Revision: https://phabricator.services.mozilla.com/D72529
2020-04-27 19:19:38 +00:00
Csoregi Natalia
bdf8849001 Backed out 30 changesets (bug 1556556, bug 1631568) for multiple mochitest failures. CLOSED TREE
Backed out changeset edd529f7a9c5 (bug 1631568)
Backed out changeset 1cc0881e244b (bug 1631568)
Backed out changeset ed3c1e85d5e3 (bug 1556556)
Backed out changeset 38ffc6215bbf (bug 1556556)
Backed out changeset 03c2c25d8023 (bug 1556556)
Backed out changeset 9c717eb067b8 (bug 1556556)
Backed out changeset 98e26bc98b85 (bug 1556556)
Backed out changeset 05a6a581e755 (bug 1556556)
Backed out changeset 867946cf05bb (bug 1556556)
Backed out changeset 20d72a334530 (bug 1556556)
Backed out changeset 2c62e61d9054 (bug 1556556)
Backed out changeset 62a223d057d2 (bug 1556556)
Backed out changeset 2c5d55a1f0b1 (bug 1556556)
Backed out changeset 700447945b4e (bug 1556556)
Backed out changeset 93190ae4f5ff (bug 1556556)
Backed out changeset a7bd34d961bb (bug 1556556)
Backed out changeset fccd1d3c7189 (bug 1556556)
Backed out changeset 24056e47183d (bug 1556556)
Backed out changeset 204881474cc1 (bug 1556556)
Backed out changeset 387320881876 (bug 1556556)
Backed out changeset be8f5eb58460 (bug 1556556)
Backed out changeset 629c58a9166b (bug 1556556)
Backed out changeset 4312b2b5dda8 (bug 1556556)
Backed out changeset d11dbf6403a5 (bug 1556556)
Backed out changeset 95c54c023779 (bug 1556556)
Backed out changeset 80fcb7e71188 (bug 1556556)
Backed out changeset d75a4ecb0d47 (bug 1556556)
Backed out changeset 903c4de34e7a (bug 1556556)
Backed out changeset f15334a3e803 (bug 1556556)
Backed out changeset 9553e99137ea (bug 1556556)
2020-04-28 12:43:11 +03:00
Botond Ballo
953fb069fa Bug 1631568 - Have nsLayoutUtils::GetFrameForPoint() and GetFramesForArea() take a RelativeTo parameter. r=tnikkel
This removes the need for FrameForPointOptions::IsRelativeToLayoutViewport,
and makes sure each call site of these functions indicates whether the
input point/rect is in visual or layout coordinates.

Several call sites were passing in layout coordinates without setting the
IsRelativeToLayoutViewport flag, which this patch corrects.

Differential Revision: https://phabricator.services.mozilla.com/D71705
2020-04-28 01:44:43 +00:00
Botond Ballo
6ae11be824 Bug 1556556 - Miscellaneous fixes related to event coordinate transformations. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D69639
2020-04-28 01:42:26 +00:00
Botond Ballo
8304e4699b Bug 1556556 - Handle visual/layout coordinate conversions correctly in GetEventCoordinatesRelativeTo(). r=kats,mattwoodrow
The idea here is:

  * The incoming point comes from WidgetEvent::mRefPoint which is in
    visual coordinates.

  * Depending on the value of the target RelativeTo parameter, we
    may need to convert this to layout coordinates.

  * In the fast-path, we do a direct check on the viewport type
    and apply the visual-to-layout transform if appropriate.

  * In the slow path, we rely on TransformRootPointToFrame() (which
    calls GetTransformToAncestor()) to include the visual-to-layout
    transform if appropriate, by correctly passing in
    ViewportType::Visual as the starting point.

     * To make sure we get into TransformRootPointToFrame(), we
       set transformFound if we'll be crossing a zoomed content root.

Differential Revision: https://phabricator.services.mozilla.com/D68921
2020-04-28 01:42:17 +00:00
Botond Ballo
8e84771610 Bug 1556556 - Include the layout-to-visual transform for a zoomed content root in GetTransformMatrix(). r=kats,mattwoodrow
This is the "core" change of the patch series, which causes most
existing layout codepaths to correctly factor in the visual to
layout transform (or its inverse), as long as the callers correctly
propagate it in the correct ViewportType.

Differential Revision: https://phabricator.services.mozilla.com/D68920
2020-04-28 01:42:14 +00:00
Botond Ballo
69b3b241f8 Bug 1556556 - Propagate RelativeTo far and wide. r=kats,mattwoodrow
This "upgrades" various nsLayoutUtils functions which take as inputs
a set of coordinates and a frame that the coordinates are relative to,
to accept a RelativeTo object instead of a frame.

Most of the patch is just dumb propagation, but the few places where
we use an explicit ViewportType::Visual are important. There are
probably a few other places I've overlooked, but this seems to cover
the important ones that come up commonly.

There are undoubtedly other functions into which we can propagate
RelativeTo, in this patch I've propagated it as far as necessary
for my needs in this bug (mainly GetTransformToAncestor() and
GetEventCoordinatesRelativeTo()).

Differential Revision: https://phabricator.services.mozilla.com/D68919
2020-04-28 01:40:35 +00:00
Botond Ballo
a371a07def Bug 1556556 - Add a "relative to layout viewport" option for display list building. r=mstange,mattwoodrow
Use it in document.elementFromPoint().

Differential Revision: https://phabricator.services.mozilla.com/D68914
2020-04-28 01:37:47 +00:00
Botond Ballo
79ea91cf68 Bug 1556556 - Remove some cruft related to handling the resolution in non-e10s setups. r=tnikkel
Prior to this bug, it was necessary to handle non-e10s specially, because the
resolution was being unapplied at the process boundary, and in non-e10s there
was no process boundary.

The remaining patches in this bug move the resolution unapplication away from
the process boundary in all cases, making special handling for non-e10s
unnecessary.

Differential Revision: https://phabricator.services.mozilla.com/D68273
2020-04-28 02:03:18 +00:00
Sylvestre Ledru
3322a82478 Bug 1619165 - Reformat recent changes to the Google coding style r=andi
First reformat with clang-format 10

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D68802
2020-04-25 09:40:08 +00:00
Kagami Sascha Rosylight
052ab6a04a Bug 1630704 - Merge nsBox into nsIFrame r=emilio
We want to merge nsFrame into nsIFrame, so this patch merges nsBox first which is the superclass of nsFrame.

Differential Revision: https://phabricator.services.mozilla.com/D71161
2020-04-18 12:06:09 +00:00
Cameron McCormack
4dcefcaa81 Bug 1616411 - Part 6: When -moz-element references an image, use the target orientation. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D70276
2020-04-17 02:57:44 +00:00
Cameron McCormack
3d153d107b Bug 1616411 - Part 4: Make nsLayoutUtils::OrientImage undo any automatic RasterImage orientation when required. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D70274
2020-04-17 02:57:32 +00:00
Csoregi Natalia
ee575ba419 Backed out 8 changesets (bug 1616411) for webgl failures on test_2_conformance__textures__misc__texture-upload-size.html. CLOSED TREE
Backed out changeset 03dd88d53439 (bug 1616411)
Backed out changeset cfee2ce9405d (bug 1616411)
Backed out changeset 0a323c33506f (bug 1616411)
Backed out changeset 1a25353a07b0 (bug 1616411)
Backed out changeset dc64af52b5f8 (bug 1616411)
Backed out changeset 0f54b1b12105 (bug 1616411)
Backed out changeset 4dee3e753e8e (bug 1616411)
Backed out changeset 034a30a6b088 (bug 1616411)
2020-04-16 05:43:16 +03:00
Cameron McCormack
b34f7525b7 Bug 1616411 - Part 6: When -moz-element references an image, use the target orientation. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D70276
2020-04-16 00:34:43 +00:00
Cameron McCormack
dacef64792 Bug 1616411 - Part 4: Make nsLayoutUtils::OrientImage undo any automatic RasterImage orientation when required. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D70274
2020-04-16 00:34:31 +00:00
Timothy Nikkel
095c72865a Bug 1629466. Don't clear wasPainted on the display port data if we don't have a frame. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D70666
2020-04-13 19:14:14 +00:00
Cameron McCormack
d50887d77d Bug 1629451 - Return earlier from SetDisplayPortMargins to avoid a warning in the second GetHighResolutionDisplayPort call. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D70662
2020-04-13 04:06:36 +00:00
Botond Ballo
e9713aee1e Bug 1628043 - Have GetFrameForPoint and GetFramesForArea take a const nsIFrame*. r=tnikkel
This allows us to have a single const_cast inside GetFramesForArea, and
avoid several callers of these functions (which, as of bug 1556556,
get a const nsIFrame* from RelativeTo inputs) having to const_cast.

Differential Revision: https://phabricator.services.mozilla.com/D70068
2020-04-07 18:27:38 +00:00
Jonathan Kew
902aa21fe9 Bug 1619349 - patch 1 - Record statistics about font-matching behavior in the presContext. r=jwatt
Differential Revision: https://phabricator.services.mozilla.com/D67787
2020-04-02 01:38:18 +00:00
Ciure Andrei
9b6eb90683 Backed out 4 changesets (bug 1619349, bug 1619350) for causing test_font_whitelist.html to fail CLOSED TREE
Backed out changeset ba16b09b5da0 (bug 1619349)
Backed out changeset f8ca02252dfc (bug 1619349)
Backed out changeset 01a2a527aa1a (bug 1619350)
Backed out changeset 67ee13868a44 (bug 1619350)
2020-04-02 04:34:31 +03:00
Timothy Nikkel
03eedf84a9 Bug 1626155. nsLayoutUtils::TransformAncestorPointToFrame passes null for ancestor frame. r=botond
It probably doesn't case any problems because the two callers of the function don't hit the case with the bug.

nsLayoutUtils::TransformRootPointToFrame passes nullptr for the ancester frame.

nsIFrame::GetContentOffsetsFromPoint only calls this function if aFrame is in an svg text subtree, so it takes the other branch.

Looks like this was a simple oversight in this change

https://hg.mozilla.org/mozilla-central/rev/204b51a6c6458a30be158a3d1bdca8e9b4edfd67

where TransformRootPointToFrame was changed to TransformAncestorPointToFrame and it originally passed nullptr (which was correct to the Root version fo the function) but didn't get updated in the change.

Differential Revision: https://phabricator.services.mozilla.com/D68954
2020-04-02 00:38:46 +00:00
Jonathan Kew
f275b6005e Bug 1619349 - patch 1 - Record statistics about font-matching behavior in the presContext. r=jwatt
Differential Revision: https://phabricator.services.mozilla.com/D67787
2020-04-01 21:42:36 +00:00
Philipp Zech
912bb5248d Bug 1625699 - Convert control-character-visibility #defines to an enum class. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D68705
2020-03-28 22:17:50 +00:00
Botond Ballo
0a55d35fb4 Bug 1623476 - Rename enum RelativeTo to DisplayportRelativeTo. r=tnikkel
This is in anticipation of introducing a struct named RelativeTo
in bug 1556556.

Differential Revision: https://phabricator.services.mozilla.com/D67515
2020-03-23 22:20:11 +00:00
Botond Ballo
800e8a79b9 Bug 1623476 - Some const-correctness improvements (nsIFrame* --> const nsIFrame*) in nsLayoutUtils functions. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D67514
2020-03-23 22:19:12 +00:00
Agi Sferro
2fc8d8abb4 Bug 1621966 - Don't crash when the dynamic toolbar is bigger than the screen. r=botond,snorp
There are cases when GV is being animated and it ends up being smaller than the
dynamic toolbar for a few frames. When that happens we really don't want to
crash and we can just ignore it.

Differential Revision: https://phabricator.services.mozilla.com/D67364
2020-03-18 20:29:27 +00:00