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

3567 Коммитов

Автор SHA1 Сообщение Дата
Edgar Chen 41dbb6af4d Bug 1705660 - Remove nsIDOMWindowUtils::deprecatedOuterWindowID; r=kmag
As it is not used now (after bug 1612831).

Differential Revision: https://phabricator.services.mozilla.com/D112327
2021-04-20 09:04:42 +00:00
David Parks 7a4e918916 Bug 1682030 - Clean up NPAPI plugin fallback behavior. r=jmathies,emilio
Similifies use of EventStates and ObjectType/FallbackType enums since most states they represented are no longer valid with the removal of NPAPI plugins.  The state machine for (unsupported) plugin elements is now much simpler but still distinguishes between HTML fallbacks, fallbacks leading to a "BROKEN" state (e.g. failing to load the image the element refers to), and fallbacks that would simply lead the element to occupy an empty region.  The last type of fallback is behind a pref "layout.use-plugin-fallback" and is disabled by default.

Simplifying the state machine allows us to clean up nsObjectLoadingContent.  We also update many of the enums which refered to plugins, which would otherwise get confusing.

Differential Revision: https://phabricator.services.mozilla.com/D107158
2021-04-06 19:28:18 +00:00
Neil Deakin 54687b47ef Bug 1701668, remove nsIWebBrowserChrome3 interface, r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D110103
2021-04-06 18:52:47 +00:00
Csoregi Natalia d68661e2cc Backed out 24 changesets (bug 1682030) for bustage on ProcessHangMonitor.cpp and nsCOMPtr.h. CLOSED TREE
Backed out changeset 5b1644096477 (bug 1682030)
Backed out changeset 35ae60eea3c7 (bug 1682030)
Backed out changeset 3eca76a6d639 (bug 1682030)
Backed out changeset 259c45447ad9 (bug 1682030)
Backed out changeset de9222dc8c31 (bug 1682030)
Backed out changeset 2986c7e14349 (bug 1682030)
Backed out changeset 6af3410bdb93 (bug 1682030)
Backed out changeset 42b0621c2927 (bug 1682030)
Backed out changeset 366e3e371858 (bug 1682030)
Backed out changeset 9adb2865adea (bug 1682030)
Backed out changeset 6af6af3bc03a (bug 1682030)
Backed out changeset da94a91b35ae (bug 1682030)
Backed out changeset 9143da258d0e (bug 1682030)
Backed out changeset 5e20d06952ba (bug 1682030)
Backed out changeset 6253d7e1ce7d (bug 1682030)
Backed out changeset 0e06ddeea3e2 (bug 1682030)
Backed out changeset 9c58d57c9e44 (bug 1682030)
Backed out changeset e90edd89430e (bug 1682030)
Backed out changeset 5861b8166b10 (bug 1682030)
Backed out changeset b4b88cdc7993 (bug 1682030)
Backed out changeset b80054e9805c (bug 1682030)
Backed out changeset 580d857674c0 (bug 1682030)
Backed out changeset a9cdf93c2662 (bug 1682030)
Backed out changeset 9c9c8b4998e2 (bug 1682030)
2021-04-06 03:54:12 +03:00
David Parks ef8f5b1e09 Bug 1682030 - Clean up NPAPI plugin fallback behavior. r=jmathies,emilio
Similifies use of EventStates and ObjectType/FallbackType enums since most states they represented are no longer valid with the removal of NPAPI plugins.  The state machine for (unsupported) plugin elements is now much simpler but still distinguishes between HTML fallbacks, fallbacks leading to a "BROKEN" state (e.g. failing to load the image the element refers to), and fallbacks that would simply lead the element to occupy an empty region.  The last type of fallback is behind a pref "layout.use-plugin-fallback" and is disabled by default.

Simplifying the state machine allows us to clean up nsObjectLoadingContent.  We also update many of the enums which refered to plugins, which would otherwise get confusing.

Differential Revision: https://phabricator.services.mozilla.com/D107158
2021-04-05 23:48:42 +00:00
Emilio Cobos Álvarez a8f3c5d571 Bug 1699259 - Add a ChromeOnly FocusOptions.preventFocusRing to opt out of focus ring heuristics. r=edgar,Gijs
This seems easier than making those heuristics work across processes
somehow.

Differential Revision: https://phabricator.services.mozilla.com/D108931
2021-03-20 14:49:01 +00:00
Alexandru Michis c3da6488ee Backed out changeset f588378316fd (bug 1699259) for causing mochitest failures in test_focusrings.xhtml
CLOSED TREE
2021-03-20 03:10:02 +02:00
Emilio Cobos Álvarez 9d854aa834 Bug 1699259 - Add a ChromeOnly FocusOptions.preventFocusRing to opt out of focus ring heuristics. r=edgar,Gijs
This seems easier than making those heuristics work across processes
somehow.

Differential Revision: https://phabricator.services.mozilla.com/D108931
2021-03-19 23:10:35 +00:00
Timothy Nikkel 957d767576 Bug 1696802. Add test. r=botond,mstange
Creating an event with type NSEventTypeSmartMagnify does not work with either NSEvent mouseEventWithType or NSEvent otherEventWithType (they both hit an assert in the appkit code). So the best we can do is call the same function.

Differential Revision: https://phabricator.services.mozilla.com/D107792
2021-03-12 02:10:43 +00:00
Nika Layzell 1dfe5d5e5b Bug 1663757 - Part 3: Start sending web progress events in oop subframes, r=annyG
Previously, we would only send web progress events from the toplevel
BrowserParent, as other frames would never have the browser-child.js framescript
loaded in them, and so would never start sending events. This change moves the
decision to begin sending events into BrowserChild itself around the same time
as it would've happened previously with the framescript.

This new callsite should still avoid sending events for the creation of the
initial about:blank document in the BrowserChild, while not skipping any other
events, as before.

Differential Revision: https://phabricator.services.mozilla.com/D105558
2021-03-09 15:29:41 +00:00
Kagami Sascha Rosylight 9fccbff1fd Bug 1648267 - Part 4: Add OS native pen input injection r=edgar,aklotz
Differential Revision: https://phabricator.services.mozilla.com/D106050
2021-03-02 18:29:45 +00:00
Jim Blandy d05c7d7131 Bug 1694547: Let chrome JavaScript control WebRender capture sequence parameters. r=jrmuizel
This patch is plumbing to get a path and a flags word through from the content
process to the graphics process, to pass to `wr_api_start_capture_sequence`.

Differential Revision: https://phabricator.services.mozilla.com/D106229
2021-02-24 18:52:08 +00:00
Masayuki Nakano ef2253b4a1 Bug 1691622 - part 9: Make `nsIWidget::SynthesizeNativeMouseEvent` take an XP button ID and abstract message value r=smaug,geckoview-reviewers,agi,m_kato
Currently, it takes a raw native message value, but it makes JS content too
complicated.  And on Linux, it cannot synthesize non-primary button events
because GDK has only button press and release messages which dont' include
mouse button information.

For solving these problems, this patch creates a new abstract native message
as `nsIWidget::NativeMouseMessage` and makes each widget converts it to
a platform native message.

Additionally, this patch adds an argument to make it possible its callers
to specify pressing or releasing mouse button with a DOM mouse button value.

Note that the following patch adds new argument to
`synthesizeNativeEventMouse*` for mochitests and which will be tested by
new tests.

Differential Revision: https://phabricator.services.mozilla.com/D105763
2021-02-24 01:27:10 +00:00
Masayuki Nakano e675c8343f Bug 1691622 - part 8: Get rid of `nsIDOMWindowUtils::SendNativeMouseMove()` r=smaug
Now, there are no users of this API.  However,
`nsIWidget::SynthesizeNativeMouseMove()` is still used by `EventStateManager`.
Even though it's just redirected to `nsIWidget::SynthesizeNativeMouseEvent()`,
but it hides the native event message from `EventStateManager`.  Therefore,
this patch keeps the widget API for now.

Differential Revision: https://phabricator.services.mozilla.com/D105762
2021-02-24 01:27:09 +00:00
Masayuki Nakano b63882dde8 Bug 1691622 - part 4: Make `synthesizeNativeMouseClick*()` aware of modifiers r=smaug,geckoview-reviewers,m_kato
Surprisingly, they don't take modifiers, and
`nsIWidget::SynthesizeNativeMouseEvent()` which are implementations of
`nsIDOMWindowUtils::SendNativeMouseEvent()` treat given modifier flags
are native's ones, and handle modifiers only on macOS.  Therefore, this
patch makes them handle native modifiers of Gecko.

Unfortunately, I'm not so familiar with Android API, and in the short
term, I don't need the support on Android.  Therefore, this patch just
adds a TODO comment on Android widget.

Additionally, we don't have a simple way to set modifier only while
posting a mouse input on Windows too.  It requires complicated code.
Therefore, I don't add the support for it on Windows too.

Differential Revision: https://phabricator.services.mozilla.com/D105758
2021-02-24 01:27:07 +00:00
alaaemad cf0d502d81 Bug 1640186 - Add machinery for sending native pinch gestures from a test, and a test which uses it r=botond
Currently implemented for Linux

Differential Revision: https://phabricator.services.mozilla.com/D103929
2021-02-19 05:35:40 +00:00
Neil Deakin 0507ed1cd2 Bug 1684795 - Account for desktop zooming when opening content popups. r=tnikkel
In OOP iframes, we don't have desktop zoom value specifically in each iframe
documents, instead we have a transform matrix,
nsIWidget::WidgetToTopLevelWidgetTransform(), on each the __top__ level OOP
iframe document that the matrix includes the desktop zoom scale value along with
translations by ancestor scroll containers, ancestor CSS transforms, etc.

Note that if the document is not in OOP iframes, i.e. it's in the top level
content subtree, the transform, nsIWidget::WidgetToTopLevelWidgetTransform()
doesn't include the destktop zoom value, so for documents in the top level
content document subtree, ViewportUtils::DocumentRelativeLayoutToVisual applies
the desktop zoom value via PresShell::GetResolution().

Differential Revision: https://phabricator.services.mozilla.com/D102219
2021-02-07 21:33:39 +00:00
Emilio Cobos Álvarez 635e3580e3 Bug 1655967 - Move serviceWorkersTestingEnabled to BrowsingContext. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D103757
2021-02-03 10:38:43 +00:00
Masayuki Nakano a25988774a Bug 1685491 - part 5: Move the code remapping arrow keys in vertical content to `NativeKeyBindings` r=smaug,jfkthame
Currently, this feature is implemented only on Linux and macOS (see also
bug 1077515 and bug 1301497), and the code is really similar each other.
Additionally, it always tries to query selection to check whether the caret is
in vertical content or not if arrow keys are pressed.  For avoiding a lot of
query, this patch makes `TextEventDispatcher` cache writing mode at every
selection change notification.  However, unfortunately, it's not available when
non-editable content has focus, but it should be out of scope of this bug since
it requires a lot of changes.

Anyway, with this patch, we can write a mochitest only on Linux and macOS.
The following patch adds a test for this as a fix of bug 1103374.

Differential Revision: https://phabricator.services.mozilla.com/D102881
2021-02-02 03:29:31 +00:00
Mirko Brodesser 217ea6c8ea Bug 1685303: part 14) Annotate `SelectByTypeAtPoint` with `MOZ_CAN_RUN_SCRIPT`. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D101762
2021-01-15 09:28:07 +00:00
Paul Zuehlcke 547f195fc5 Bug 1679512 - Move contentBlockingAllowListPrincipal to WindowGlobalParent. r=timhuang,nika
We only use the contentBlockingAllowListPrincipal for excluding sites from content
blocking for top level documents. We don't need it in the content process and should
not compute it for every document.

Differential Revision: https://phabricator.services.mozilla.com/D100781
2021-01-14 20:37:35 +00:00
Masatoshi Kimura 3f402bfcc4 Bug 1683464 - Reduce nsContentPolicyType usage. r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D100181
2021-01-07 15:18:52 +00:00
Razvan Maries 6a4eb25b10 Backed out 4 changesets (bug 1683464) for multiple perma failures. CLOSED TREE
Backed out changeset a5d315c017d0 (bug 1683464)
Backed out changeset 5f91001e4923 (bug 1683464)
Backed out changeset 1b7fe904e8af (bug 1683464)
Backed out changeset eb1c479fddca (bug 1683464)
2021-01-05 16:47:22 +02:00
Masatoshi Kimura dfb97ca7cf Bug 1683464 - Reduce nsContentPolicyType usage. r=ckerschb
Depends on D100180

Differential Revision: https://phabricator.services.mozilla.com/D100181
2021-01-05 12:21:46 +00:00
Masatoshi Kimura 44274c030b Bug 1683464 - Remove aMimeTypeGuess from nsIContentSecurityPolicy::ShouldLoad. r=ckerschb
This parameter is unused.

Depends on D100178

Differential Revision: https://phabricator.services.mozilla.com/D100179
2021-01-04 17:05:01 +00:00
Masatoshi Kimura 60442b1dea Bug 1683464 - Make CSPDirective a CEnum type. r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D100178
2021-01-04 17:01:31 +00:00
Masayuki Nakano d876b20aaa Bug 1683226 - part 2: Make `HTMLEmbedElement` and `HTMLObjectElement` stop overriding `nsIContent::GetDesiredIMEState()` r=smaug
Currently, they are never focusable when its type is "plugin".
So, making stop them returning `IMEEnabled::Plugin` won't change
anything, but it guarantees that nobody will see `IMEEnabled::Plugin`
at runtime.  This is a preparation for the following patches.

Differential Revision: https://phabricator.services.mozilla.com/D100101
2020-12-21 05:52:26 +00:00
Sean Feng 12424aa6b0 Bug 1662265 - Fix input events handling for sync XHR when both TaskController and e10s are enabled r=smaug
There are two issues in our current setup

1) Input events which are occurring in the same tab are going to be lost
because sync XHR. We have event handling suppression for synx XHR, so input
events are going to be discarded.

2) Input events that are happening in another tab (same process as the
synx XHR tab) are not going to be delayed. This is not correct since
sync XHR should block the Javascript execution.

This patches fixes the above cases for when both TaskController and e10s are
enabled by suspending the InputTaskManager during sync XHR, which
delays the input event handling and keeps the events around.

Differential Revision: https://phabricator.services.mozilla.com/D90780
2020-12-15 01:33:24 +00:00
Emilio Cobos Álvarez 3987c781d0 Bug 1635914 - Move active flag handling explicitly to BrowsingContext. r=nika
And have it mirror in the parent process more automatically.

The docShellIsActive setter in the browser-custom-element side needs to
be there rather than in the usual DidSet() calls because the
AsyncTabSwitcher code relies on getting an exact amount of notifications
as response to that specific setter. Not pretty, but...

BrowserChild no longer sets IsActive() on the docshell itself for OOP
iframes. This fixes bug 1679521. PresShell activeness is used to
throttle rAF as well, which handles OOP iframes nicely as well.

Differential Revision: https://phabricator.services.mozilla.com/D96072
2020-12-11 15:43:19 +00:00
Simon Giesecke 5db2472bdf Bug 1673931 - Avoid including ReferrerPolicyBinding.h from header files. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D97610
2020-12-10 11:09:29 +00:00
Emilio Cobos Álvarez 75be5de2e1 Bug 1666739 - Add an optional opacity threshold for visibility hit-test. r=mconley,miko
This is a best-effort thing of course, but so is the rest of the
visibility threshold stuff in practice and this should be good enough.

Differential Revision: https://phabricator.services.mozilla.com/D98360
2020-12-04 00:48:45 +00:00
Kagami Sascha Rosylight 296459ef20 Bug 1680167 - Part 9: Mark setFocus() as [can_run_script] r=masayuki
Depends on D98631

Differential Revision: https://phabricator.services.mozilla.com/D98632
2020-12-03 22:15:52 +00:00
Kagami Sascha Rosylight 00c44d3b04 Bug 1680167 - Part 4: MOZ_CAN_RUN_SCRIPT in dom/xul r=masayuki
Differential Revision: https://phabricator.services.mozilla.com/D98627
2020-12-03 22:08:44 +00:00
Razvan Maries fd89df3f6d Backed out changeset 432c83951167 (bug 1662265) for perma failures on test_sync_xhr_event_handling_switch_bcg.html. CLOSED TREE 2020-12-03 23:03:05 +02:00
Sean Feng f521450d39 Bug 1662265 - Fix input events handling for sync XHR when both TaskController and e10s are enabled r=smaug
There are two issues in our current setup

1) Input events which are occurring in the same tab are going to be lost
because sync XHR. We have event handling suppression for synx XHR, so input
events are going to be discarded.

2) Input events that are happening in another tab (same process as the
synx XHR tab) are not going to be delayed. This is not correct since
sync XHR should block the Javascript execution.

This patches fixes the above cases for when both TaskController and e10s are
enabled by suspending the InputTaskManager during sync XHR, which
delays the input event handling and keeps the events around.

Differential Revision: https://phabricator.services.mozilla.com/D90780
2020-12-03 03:13:04 +00:00
Emilio Cobos Álvarez 5f931a6c28 Bug 1680158 - Expose focused content browsing context to chrome code. r=hsivonen
This is useful for printing. Naming is confusing IMO, but my read of the
docs and experimentation agree this is what we want :)

Differential Revision: https://phabricator.services.mozilla.com/D98415
2020-12-02 08:50:45 +00:00
Emilio Cobos Álvarez 0ebfee88c4 Bug 1676932 - Remove VisibilityChange/nsIContentPermissionRequestCallback. r=nika
Also unused.

Differential Revision: https://phabricator.services.mozilla.com/D96884
2020-11-13 20:55:17 +00:00
Emilio Cobos Álvarez ab402ee088 Bug 1676932 - Remove nsIContentPermissionRequester. r=nika
It's an empty, useless interface after the previous patches. Also remove
a bunch of expired geolocation probes which were null-checking the requester
object for some reason.

Depends on D96882

Differential Revision: https://phabricator.services.mozilla.com/D96883
2020-11-12 20:23:52 +00:00
Emilio Cobos Álvarez fa458d34ab Bug 1676932 - Remove nsIContentPermissionRequester.onVisibilityChange. r=nika
Also unused.

Depends on D96881

Differential Revision: https://phabricator.services.mozilla.com/D96882
2020-11-12 19:10:28 +00:00
Emilio Cobos Álvarez 1239692187 Bug 1676932 - Remove nsIContentPermissionRequester.getVisibility. r=nika
It's unused.

Differential Revision: https://phabricator.services.mozilla.com/D96881
2020-11-12 19:10:10 +00:00
Emilio Cobos Álvarez 4d7336a5cf Bug 1674078 - Remove nsIBrowserDOMWindow.OPEN_SWITCHTAB. r=edgar
Dead code is dead.

Differential Revision: https://phabricator.services.mozilla.com/D95122
2020-10-29 10:59:24 +00:00
Emilio Cobos Álvarez e5a63697bf Bug 1673707 - Simplify handling of the suspendMediaWhenInactive flag. r=nika
Make it a synced field on the top browsing context. This handling the
propagation right and is much simpler.

This should fix cases where we don't look at the top level docshell to
figure out if we should suspend media.

Differential Revision: https://phabricator.services.mozilla.com/D94878
2020-10-27 19:55:47 +00:00
Ricky Stewart 02a7b4ebdf Bug 1654103: Standardize on Black for Python code in `mozilla-central`.
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Make some ad-hoc manual updates to `testing/marionette/client/setup.py`, `testing/marionette/harness/setup.py`, and `testing/firefox-ui/harness/setup.py`, which have hard-coded regexes that break after the reformat.

5. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-26 18:34:53 +00:00
Bogdan Tara da1098d4aa Backed out 10 changesets (bug 1654103, bug 1672023, bug 1518999) for PanZoomControllerTest.touchEventForResult gv-junit failures CLOSED TREE
Backed out changeset ff3fb0b4a512 (bug 1672023)
Backed out changeset e7834b600201 (bug 1654103)
Backed out changeset 807893ca8069 (bug 1518999)
Backed out changeset 13e6b92440e9 (bug 1518999)
Backed out changeset 8b2ac5a6c98a (bug 1518999)
Backed out changeset 575748295752 (bug 1518999)
Backed out changeset 65f07ce7b39b (bug 1518999)
Backed out changeset 4bb80556158d (bug 1518999)
Backed out changeset 8ac8461d7bd7 (bug 1518999)
Backed out changeset e8ba13ee17f5 (bug 1518999)
2020-10-24 03:36:18 +03:00
Ricky Stewart c0cea3b0fa Bug 1654103: Standardize on Black for Python code in `mozilla-central`. r=remote-protocol-reviewers,marionette-reviewers,webdriver-reviewers,perftest-reviewers,devtools-backward-compat-reviewers,jgilbert,preferences-reviewers,sylvestre,maja_zf,webcompat-reviewers,denschub,ntim,whimboo,sparky
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Make some ad-hoc manual updates to `testing/marionette/client/setup.py`, `testing/marionette/harness/setup.py`, and `testing/firefox-ui/harness/setup.py`, which have hard-coded regexes that break after the reformat.

5. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-23 20:40:42 +00:00
Dorel Luca 1ff59cb7a3 Backed out changeset 7558c8821a07 (bug 1654103) for multiple failures. CLOSED TREE 2020-10-22 03:51:06 +03:00
Ricky Stewart 50762dacab Bug 1654103: Standardize on Black for Python code in `mozilla-central`. r=remote-protocol-reviewers,marionette-reviewers,webdriver-reviewers,perftest-reviewers,devtools-backward-compat-reviewers,jgilbert,preferences-reviewers,sylvestre,maja_zf,webcompat-reviewers,denschub,ntim,whimboo,sparky
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-21 21:27:27 +00:00
Agi Sferro 05cc37d7c1 Bug 1667471 - Expose IsCORSSafelistedRequestHeader in WindowUtils. r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D91981
2020-10-15 00:43:19 +00:00
Razvan Maries 99ae18f920 Backed out 3 changesets (bug 1667471) for perma failures on NavigationDelegateTest. CLOSED TREE
Backed out changeset cfd11957a8a0 (bug 1667471)
Backed out changeset fdc015927934 (bug 1667471)
Backed out changeset ad8b66ec5171 (bug 1667471)
2020-10-15 01:53:02 +03:00
Agi Sferro 19fef5d6af Bug 1667471 - Expose IsCORSSafelistedRequestHeader in WindowUtils. r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D91981
2020-10-14 22:14:12 +00:00