Commit Graph

703941 Commits

Author SHA1 Message Date
Christoph Kerschbaumer
59c7891e26 Bug 1575356: Update Mixed Content Blocker to rely on BrowsingContext instead of nsIDocShellTreeItem. r=baku,smaug
Differential Revision: https://phabricator.services.mozilla.com/D71547
2020-04-28 07:32:51 +00:00
Botond Ballo
2cb46cfa4b 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
9910a0e22a Bug 1631568 - Move ViewportType and RelativeTo into a separate header. r=tnikkel
This allows headers which nsLayoutUtils.h includes to use these types without
creating a circular dependency.

As part of this change, the types are also moved into namespace mozilla.

Differential Revision: https://phabricator.services.mozilla.com/D71704
2020-04-28 07:22:59 +00:00
Botond Ballo
42e78685e5 Bug 1556556 - Run helper_drag_root_scrollbar.html with zooming enabled as well. r=kats
This is the anti-climactic end of the patch series.

I set out in this bug to get this test case to pass with apz.allow_zooming.
It took all these changes to do so without regressing other tests.

Differential Revision: https://phabricator.services.mozilla.com/D69644
2020-04-28 07:22:59 +00:00
Botond Ballo
3aed1ee626 Bug 1556556 - Update test expectations for tests which are now passing. r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D69642
2020-04-28 01:43:09 +00:00
Botond Ballo
444afd7fd4 Bug 1556556 - Update test expectations for elementTiming.html. r=mstange
This test is failing due to the rounding error described in bug 1627365.
As this is a web platform test, it seems inappropriate to modify the
test itself upstream to avoid a Firefox-specific rounding error.

Differential Revision: https://phabricator.services.mozilla.com/D69641
2020-04-28 01:43:02 +00:00
Botond Ballo
29e3ec7e90 Bug 1556556 - Convert mRefPoint to visual coordinates for synthesized events. r=tnikkel
As part of this change, PresShell::mMouseLocation in stored visual coordinates.

Differential Revision: https://phabricator.services.mozilla.com/D69640
2020-04-28 01:42:49 +00:00
Botond Ballo
08aae3b474 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
ac2a49da72 Bug 1556556 - Perform app unit to milimetre conversion correctly in PositionedEventTargeting. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D68922
2020-04-28 01:42:19 +00:00
Botond Ballo
1a5df93508 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
a44bc6dd0b 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
c2e68749af Bug 1556556 - Use FrameForPointOption::IsRelativeToLayoutViewport when passing layout-relative coordinates to GetFrameForPoint(). r=kats
Differential Revision: https://phabricator.services.mozilla.com/D71455
2020-04-28 01:40:52 +00:00
Botond Ballo
405c8807cd 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
219449f114 Bug 1556556 - Document WidgetEvent::mRefPoint as being in visual coordinates. r=kats
This is already the case for real input events since that's how they
arrive from APZ, and we are no longer changing the coordinates at
the process boundary.

For synthesized events, a future patch will add layout-to-visual
converions to code that sets mRefPoint as appropriate.

Differential Revision: https://phabricator.services.mozilla.com/D68917
2020-04-28 01:38:15 +00:00
Botond Ballo
a420b5e399 Bug 1556556 - Introduce ViewportType and RelativeTo. r=kats,mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D68916
2020-04-28 01:38:08 +00:00
Botond Ballo
bc3d0b2701 Bug 1556556 - Use the "relative to layout viewport" flag to determine when to divide the composition bounds clip by the resolution. r=mstange
We were using "during event delivery" as a proxy for this, but it was an inaccurate proxy.

Differential Revision: https://phabricator.services.mozilla.com/D68915
2020-04-28 01:38:00 +00:00
Botond Ballo
7fdd59addd 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
b11a399d42 Bug 1556556 - Remove many uses of IgnoreRootScrollFrame. r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D68913
2020-04-28 02:25:51 +00:00
Botond Ballo
480ee775c9 Bug 1556556 - Apply the visual-to-layout transform during display list building and display list based hit testing. r=kats,mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D68728
2020-04-28 01:36:34 +00:00
Botond Ballo
af40ffccfd Bug 1556556 - Add ViewportUtils::IsZoomedContentRoot(). r=kats,mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D68727
2020-04-28 01:36:26 +00:00
Botond Ballo
fe49daa3d5 Bug 1556556 - Support both CSS and LayoutDevice units in GetVisualToLayoutTransform(). r=kats
Differential Revision: https://phabricator.services.mozilla.com/D68725
2020-04-28 01:36:24 +00:00
Botond Ballo
62546b2e8b Bug 1556556 - Add some VisualToLayout() and LayoutToVisual() wrappers to ViewportUtils. r=kats
Differential Revision: https://phabricator.services.mozilla.com/D68724
2020-04-28 01:36:22 +00:00
Botond Ballo
3bb8b9c86c Bug 1556556 - Rename GetCallbackTransform() to GetVisualToLayoutTransform(). r=kats
We will be applying and unapplying this transform in many places, and
thinking about those operations as "applying the callback transform" and
"unapplying the callback transform" is not very intuitive, especially since
applying the callback transform involves *un*applying the resolution.

Rather, going forward we will use the terminology "visual coordinates"
and "layout coordinates" and use this function to convert back and forth
between them.

ApplyCallbackTransform() is not renamed here because subsequent patches will
transition its callers to use GetVisualToLayoutTransform() and
ApplyCallbackTransform() will be removed.

Differential Revision: https://phabricator.services.mozilla.com/D68297
2020-04-28 01:35:18 +00:00
Botond Ballo
20522092c5 Bug 1556556 - Move GetCallbackTransform() into a new ViewportUtils class. r=kats
This function (and helper functions that wrap it) will be used extensively
throughout layout code, so keeping it in APZCCallbackHelper seems awkward.

nsLayoutUtils would also be a reasonable place but has the downside that
adding a new function to it triggers recompiling the world.

Differential Revision: https://phabricator.services.mozilla.com/D68296
2020-04-28 01:35:05 +00:00
Botond Ballo
92101bb12f Bug 1556556 - Have GetCallbackTransform take just a scroll id rather than an entire guid. r=kats
The implementation was already only using the scroll id, so there is no
functional change, but this change will make it easier to new call sites
to come up with the function's inputs.

Differential Revision: https://phabricator.services.mozilla.com/D68277
2020-04-28 01:34:48 +00:00
Botond Ballo
09e7b83dc2 Bug 1556556 - Remove APZCCallbackHelper::ApplyCallbackTransform(). r=kats
It has no more callers.

Differential Revision: https://phabricator.services.mozilla.com/D68276
2020-04-28 01:34:35 +00:00
Botond Ballo
f9e919a8f4 Bug 1556556 - Remove applications of the visual-to-layout transform at the process boundary (and equivalent places for non-e10s). r=kats
Note that the propagation of the target guid to places where the transform
will be applied is best-effort at the moment. In particular, the
InputAPZContext will result in the correct guid being available in places
that are called synchronously from the Recv*() functions, but not places
called asynhcronously (e.g. via DelayedFireSingleTapEvent).

To mitigate this, places where the transform is applied fall back on the
RCD-RSF if a guid is not available via InputAPZContext (added in a
subsequent patch).

The cases that this gets wrong are fairly edge casey (it requires (a) an
asynchronous codepath, (b) an event targeting a subframe, and (c) that
subframe having a "could not accept the APZ scroll position" transform),
so we just punt on them for now. If it turns out to be important to handle,
then options for doing so include (1) propagating the guid through each of
the affected asynchronous codepaths, or (2) attaching the guid to the event
itself.

Differential Revision: https://phabricator.services.mozilla.com/D68723
2020-04-28 01:34:22 +00:00
Botond Ballo
ac1f44da5d Bug 1556556 - Change the default value of InputAPZContext::sApzResponse to nsEventStatus_eSentinel. r=kats
Differential Revision: https://phabricator.services.mozilla.com/D70084
2020-04-28 01:34:05 +00:00
Botond Ballo
2290774510 Bug 1556556 - Factor out an APZCCallbackHelper::GetCallbackTransform() helper. r=kats
This is to facilitate call sites that need to incorporate the transform into
a larger transform matrix rather than immediately applying the callback
transform to a point.

Differential Revision: https://phabricator.services.mozilla.com/D68275
2020-04-28 01:33:57 +00:00
Botond Ballo
2037608c4a Bug 1556556 - Clarify the documentation of APZCCallbackHelper::ApplyCallbackTransform(). r=kats
Differential Revision: https://phabricator.services.mozilla.com/D68274
2020-04-28 01:33:40 +00:00
Botond Ballo
5e9a66a3de 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
alwu
b368e58a84 Bug 1632301 - part4 : rename 'ControlledMediaState' to 'MediaPlaybackState'. r=bryce
This patch will do :
- rename `ControlledMediaState` to `MediaPlaybackState`
- rename the related functions

The advantage of doing so :
- more consistent with `MediaAudibleState`

Differential Revision: https://phabricator.services.mozilla.com/D72060
2020-04-28 07:14:05 +00:00
alwu
d1cbaeb672 Bug 1632301 - part3 : use MediaAudibleState to replace boolean value. r=bryce
This patch will do :
- replace `boolean` with enum class `MediaAudibleState`

The advantage of doing so :
- It's easier to understand what actually meaning of the parameter we set

Differential Revision: https://phabricator.services.mozilla.com/D72058
2020-04-28 07:14:05 +00:00
alwu
db7bb9c21e Bug 1632301 - part2 : use ContentControlKeyEventReceiver's browsing context to notify any changes. r=bryce
This patch will do :
- use current broswing context as a parameter when propagate state change to the chrome process.

The advantage of doing so :
- the chrome process can know which browsing context the state change actually comes from.

---

More details about this change :

Currently, when we propagate any controlled media related states, we would find the top level browsing context first, then pass it through IPC in order to get the correct media controller in the chrome process. However, we have implemented [1] which can find the correct media controller even if we are not passing the top level browsing context.

In addition, in bug1627999, we would like to know which browsing context those states come from. Therefore, we should replace the top browsing context with the current browsing context where controlled media exists.

[1] https://searchfox.org/mozilla-central/rev/41c3ea3ee8eab9ce7b82932257cb80b703cbba67/docshell/base/CanonicalBrowsingContext.cpp#511-515

Differential Revision: https://phabricator.services.mozilla.com/D72056
2020-04-28 05:10:21 +00:00
alwu
25b47e1707 Bug 1632301 - part1 : decouple ContentMediaController from MediaControlKeysEventListener/MediaControlKeysEventSource. r=bryce
This patch will do :
- remove the inheritance relationship for `ContentControlKeyEventReceiver` and `ContentMediaAgent` and manually implement the methods we need
- `MediaControlEventListener` will inherit from `ContentControlKeyEventReceiver` directly

The advantage of doing so :
- increase the flexibilty of modification of `ContentMediaAgent` and those modification won't affect other classes inherited from `MediaControlKeysEventListener`

---

More details about this change :

As we would like to extend the class `ContentMediaAgent` and allow the `ContentMediaController` to call its extended method, but if we want to do so in current implementation, the extended method would also affect other classes inherited from `MediaControlKeysEventListener` and that is something we don't want to see.

Considering that, I decided to decouple the inheritance relationship and manually create the function I need (which will be implemented in the next patch)

Differential Revision: https://phabricator.services.mozilla.com/D72054
2020-04-28 05:10:03 +00:00
Florin Strugariu
6d34b7e399 Bug 1633391 - Remove tp6-facebook-old test and replace the recording in tp6-facebook desktop tests r=perftest-reviewers,davehunt
Differential Revision: https://phabricator.services.mozilla.com/D72648
2020-04-27 13:27:48 +00:00
Csoregi Natalia
0185f41854 Backed out changeset 14568f3c84b6 (bug 1575356) for failures on test_iframe_referrer.html. CLOSED TREE 2020-04-28 10:01:30 +03:00
Christoph Kerschbaumer
73c3fa2f74 Bug 1575356: Update Mixed Content Blocker to rely on BrowsingContext instead of nsIDocShellTreeItem. r=baku,smaug
Differential Revision: https://phabricator.services.mozilla.com/D71547
2020-04-28 05:18:28 +00:00
Tim Huang
95475507c9 Bug 1632500 - Part 2: Add a test case for ensuring the sub-iframes won't get storage access if the cookie behavior is REJECT_TRACKER. r=baku
Differential Revision: https://phabricator.services.mozilla.com/D72310
2020-04-27 14:22:23 +00:00
Tim Huang
a9dc501224 Bug 1632500 - Part 1: Add a first-level iframe check in ContentBlocking::ShouldAllowAccessFor() for cookie behavior REJECT_TRACKER. r=baku
Differential Revision: https://phabricator.services.mozilla.com/D72309
2020-04-27 14:22:16 +00:00
Lina Cambridge
c13f9f9d49 Bug 1626128 - Change Golden Gate to depend on sync15_traits. r=markh
Now that `BridgedEngine` has been moved to `sync15_traits`, we can
remove `golden_gate_traits` from the tree, and change Golden Gate to
depend on `sync15_traits` directly.

This commit also adds a Cargo feature, `services_sync`, which reflects
the `MOZ_SERVICES_SYNC` config option. In the future, we'll use this
feature to gate implementations of `mozIBridgedSyncEngine`.

Differential Revision: https://phabricator.services.mozilla.com/D72784
2020-04-28 04:13:04 +00:00
Mike Hommey
f319da1846 Bug 1633639 - Fix new warnings about unused doc comments with rustc 1.43. r=lina
Differential Revision: https://phabricator.services.mozilla.com/D72793
2020-04-28 04:11:09 +00:00
Chris Peterson
bb98712768 Bug 1594529 - Replace MOZ_MUST_USE with [[nodiscard]] in dom/media. r=bryce
Depends on D72565

Differential Revision: https://phabricator.services.mozilla.com/D72566
2020-04-27 15:18:07 +00:00
Chris Peterson
d8873bd7de Bug 1594529 - Replace MOZ_MUST_USE with [[nodiscard]] in dom/media/webaudio. r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D72565
2020-04-27 11:46:32 +00:00
Lee Salzman
418deed8c5 Bug 1633617 - round quantized coordinates in SWGL bilinear filtering. r=jimb
Differential Revision: https://phabricator.services.mozilla.com/D72782
2020-04-28 03:32:10 +00:00
Jeff Muizelaar
951ea8e9b4 Bug 1628809. Allow WebRender on Nvidia+battery all screen sizes. r=aosmond
We want this to ride into 77. It's a very small population.

Differential Revision: https://phabricator.services.mozilla.com/D72761
2020-04-27 22:24:37 +00:00
Razvan Maries
2bfe3415fb Backed out changeset 7fedd8fbdd5e (bug 1620776) for SM bustages. CLOSED TREE 2020-04-28 04:34:50 +03:00
Mats Palmgren
32769d9cf6 Bug 1607954 part 3 - [css-grid][css-align] Add tentative tests and update devtools support files for Masonry layout. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D67063
2020-04-28 01:24:37 +00:00
Mats Palmgren
3622105887 Bug 1607954 part 2 - [css-grid][css-align] Implement Masonry layout. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D67062
2020-04-28 01:18:47 +00:00
Mats Palmgren
12bca02735 Bug 1607954 part 1 - [css-grid][css-align] Implement style system support for Masonry layout. r=emilio
This implements support for this CSS Masonry layout proposal:
https://github.com/w3c/csswg-drafts/issues/4650

I've intentionally left out a shorthand (place-tracks?) for now until
we have a draft CSS spec for this.

Differential Revision: https://phabricator.services.mozilla.com/D67061
2020-04-28 01:18:44 +00:00