Commit Graph

3589 Commits

Author SHA1 Message Date
Kashav Madan
2b70b9d821 Bug 1703692 - Store the latest embedder's permanent key on CanonicalBrowsingContext, r=nika,mccr8
And include it in Session Store flushes to avoid dropping updates in case the
browser is unavailable.

Differential Revision: https://phabricator.services.mozilla.com/D118385
2021-06-26 20:25:29 +00:00
Dorel Luca
40fe0b4056 Backed out 3 changesets (bug 1703692) for Browser-chrome failures in browser/components/sessionstore/test/browser_broadcast.js. CLOSED TREE
Backed out changeset fe5703d7b580 (bug 1703692)
Backed out changeset eec4a4138ca7 (bug 1703692)
Backed out changeset 6745b363a745 (bug 1703692)
2021-06-26 10:09:23 +03:00
Kashav Madan
e6788be168 Bug 1703692 - Store the latest embedder's permanent key on CanonicalBrowsingContext, r=nika,mccr8
And include it in Session Store flushes to avoid dropping updates in case the
browser is unavailable.

Differential Revision: https://phabricator.services.mozilla.com/D118385
2021-06-26 05:49:12 +00:00
Iulian Moraru
7a2e51ed62 Backed out 3 changesets (bug 1703692) for causing bc failures on multiple files.
Backed out changeset a199dfd8ce8d (bug 1703692)
Backed out changeset 599a0a99ded9 (bug 1703692)
Backed out changeset 14fe807e6be4 (bug 1703692)
2021-06-25 00:43:23 +03:00
Kashav Madan
c75e110512 Bug 1703692 - Store the latest embedder's permanent key on CanonicalBrowsingContext, r=nika,mccr8
And include it in Session Store flushes to avoid dropping updates in case the
browser is unavailable.

Differential Revision: https://phabricator.services.mozilla.com/D118385
2021-06-24 20:26:13 +00:00
Henri Sivonen
7df7939f77 Bug 1713627 - Remove code obsoleted by the replacing the Text Encoding menu with one item. r=jaws,emk
Differential Revision: https://phabricator.services.mozilla.com/D116391
2021-06-21 12:09:01 +00:00
Dorel Luca
2118316ba4 Backed out changeset 4891a17c55e2 (bug 1713627) for Browser-chrome failures in docshell/test/browser/browser_bug673087-1.js. CLOSED TREE 2021-06-21 12:10:54 +03:00
Henri Sivonen
abbbf94915 Bug 1713627 - Remove code obsoleted by the replacing the Text Encoding menu with one item. r=jaws,emk
Differential Revision: https://phabricator.services.mozilla.com/D116391
2021-06-21 08:09:43 +00:00
Henri Sivonen
3e40a36745 Bug 1713624 - Null out mFocusedWindow when receiving OOP focused BrowsingContext. r=NeilDeakin
Differential Revision: https://phabricator.services.mozilla.com/D117156
2021-06-09 15:08:36 +00:00
Yaron Tausky
8bccb10c7f Bug 1496997 - Remove rest of child intercept code from dom/serviceworkers r=asuth,dom-workers-and-storage-reviewers,sg,jdescottes,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D101763
2021-06-08 21:02:54 +00:00
Yaron Tausky
dde1fe54eb Bug 1496997 - Remove a chunk of child intercept code from dom/serviceworkers r=asuth,dom-workers-and-storage-reviewers,sg
Differential Revision: https://phabricator.services.mozilla.com/D101632
2021-06-08 21:02:54 +00:00
Steve Fink
3f752fc5a8 Bug 1712614 - Allow passing a GC reason through pokeGC and runNextCollectorSlice for testing, to allow removing a special case in the code r=pbone,smaug
Differential Revision: https://phabricator.services.mozilla.com/D115833
2021-05-26 21:01:50 +00:00
Emilio Cobos Álvarez
2314b37da7 Bug 1712724 - Don't trigger select on programmatic focus during keyboard events. r=smaug
Depends on D115900

Differential Revision: https://phabricator.services.mozilla.com/D115901
2021-05-26 11:21:44 +00:00
Emilio Cobos Álvarez
d289bd695b Bug 1712724 - Cleanup focus method mask usage. r=smaug
No behavior change, since `GetLastFocusMethod` is only checked by `HTMLInputElement.cpp` / `nsGlobalWindowInner.cpp` for FLAG_BYKEY, and some JS code for `FLAG_BYMOUSE`.

But this makes the next patch more straight-forward.

Differential Revision: https://phabricator.services.mozilla.com/D115900
2021-05-26 11:21:44 +00:00
Alexandru Michis
1df3b4b4d2 Backed out 3 changesets (bug 1712724) for causing mochitests without e10s failures in test_focus.xhtml
CLOSED TREE

Backed out changeset 61d8ca98120b (bug 1712724)
Backed out changeset 46b1d60b6b6b (bug 1712724)
Backed out changeset 36504d508b34 (bug 1712724)
2021-05-26 08:18:02 +03:00
Emilio Cobos Álvarez
ef6415ef1f Bug 1712724 - Don't trigger select on programmatic focus during keyboard events. r=smaug
Depends on D115900

Differential Revision: https://phabricator.services.mozilla.com/D115901
2021-05-25 22:29:02 +00:00
Emilio Cobos Álvarez
8dea5d3fa5 Bug 1712724 - Cleanup focus method mask usage. r=smaug
No behavior change, since `GetLastFocusMethod` is only checked by `HTMLInputElement.cpp` / `nsGlobalWindowInner.cpp` for FLAG_BYKEY, and some JS code for `FLAG_BYMOUSE`.

But this makes the next patch more straight-forward.

Differential Revision: https://phabricator.services.mozilla.com/D115900
2021-05-25 22:29:01 +00:00
Masayuki Nakano
e9d6280e92 Bug 1520983 - part 1: Add new content command event for inserting text r=smaug
For inserting text from OS in special cases, e.g., when inserting 2 or more characters
per keydown or inserting text without key press, we use a set of composition events on
macOS, but the other browsers don't use composition events.  Instead, they expose only
`beforeinput` event and `input` event.  We should follow their behavior for web-compat
because `beforeinput` events for IME composition are never cancelable, but the
`beforeinput` events for the cases are cancelable of the other browsers.

Differential Revision: https://phabricator.services.mozilla.com/D114826
2021-05-18 06:30:35 +00:00
Butkovits Atila
f3f08e64ba Backed out 2 changesets (bug 1520983) for causing build bustages. CLOSED TREE
Backed out changeset c09060ee8358 (bug 1520983)
Backed out changeset b4c25d047cee (bug 1520983)
2021-05-18 07:47:57 +03:00
Masayuki Nakano
1bb2df9ea3 Bug 1520983 - part 1: Add new content command event for inserting text r=smaug
For inserting text from OS in special cases, e.g., when inserting 2 or more characters
per keydown or inserting text without key press, we use a set of composition events on
macOS, but the other browsers don't use composition events.  Instead, they expose only
`beforeinput` event and `input` event.  We should follow their behavior for web-compat
because `beforeinput` events for IME composition are never cancelable, but the
`beforeinput` events for the cases are cancelable of the other browsers.

Differential Revision: https://phabricator.services.mozilla.com/D114826
2021-05-17 23:52:43 +00:00
Nika Layzell
86d93eb604 Bug 1708254 - Move CreateAboutBlankContentViewer logic into platform, r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D114789
2021-05-12 20:01:17 +00:00
Paul Bone
ca8f5e7a0d Bug 1629064 - pt 5. Expose PokeGC from DOMWindowUtils r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D109853
2021-05-12 06:46:09 +00:00
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