Commit Graph

652 Commits

Author SHA1 Message Date
Masayuki Nakano
ab19f1368c Bug 1879765 - part 2: Make BrowserChild store the last code value of consumed eKeyDown event r=smaug
The builtin legacy IME of Windows to type a Unicode with typing a code point
causes consumed `eKeyDown` events while typing the code point, i.e., without
`eKeyPress` (FYI: The consumed state is not exposed to the web, it's used only
in chrome UI for the compatibility with Chrome).  Then, `BrowserChild` store
whether the last `eKeyDown` was consumed or not to prevent the following
`eKeyPress`.  Finally, a `eKeyPress` event is fired to input the Unicode
character after `eKeyUp` for `Alt`.  The stored value is set to new value only
when another `eKeyDown` event is sent from the parent process.  Therefore,
the last digit inputting `eKeyDown` causes `BrowserChild` thinking the last
`eKeyDown` is consumed so that the last `eKeyPress` is not dispatched.

This patch makes `BrowserChild` to store the `code` value of the last consumed
`eKeyDown` and check the `code` value to consider whether coming `eKeyPress`
should be or not be dispatched to `PresShell` and the DOM.

Differential Revision: https://phabricator.services.mozilla.com/D207957
2024-05-16 02:36:03 +00:00
Tamas Szentpeteri
26e6238bd3 Backed out 2 changesets (bug 1879765) for causing failures on test_nsITextInputProcessor.xhtml. CLOSED TREE
Backed out changeset 6214b15c2021 (bug 1879765)
Backed out changeset 87e77d284071 (bug 1879765)
2024-05-15 15:15:50 +03:00
Masayuki Nakano
cbc30f77ec Bug 1879765 - part 2: Make BrowserChild store the last code value of consumed eKeyDown event r=smaug
The builtin legacy IME of Windows to type a Unicode with typing a code point
causes consumed `eKeyDown` events while typing the code point, i.e., without
`eKeyPress` (FYI: The consumed state is not exposed to the web, it's used only
in chrome UI for the compatibility with Chrome).  Then, `BrowserChild` store
whether the last `eKeyDown` was consumed or not to prevent the following
`eKeyPress`.  Finally, a `eKeyPress` event is fired to input the Unicode
character after `eKeyUp` for `Alt`.  The stored value is set to new value only
when another `eKeyDown` event is sent from the parent process.  Therefore,
the last digit inputting `eKeyDown` causes `BrowserChild` thinking the last
`eKeyDown` is consumed so that the last `eKeyPress` is not dispatched.

This patch makes `BrowserChild` to store the `code` value of the last consumed
`eKeyDown` and check the `code` value to consider whether coming `eKeyPress`
should be or not be dispatched to `PresShell` and the DOM.

Differential Revision: https://phabricator.services.mozilla.com/D207957
2024-05-15 05:42:33 +00:00
Emilio Cobos Álvarez
a705793753 Bug 1895229 - Remove nsIWebBrowserChromeFocus. r=hsivonen,dom-core
It's only implemented by BrowserChild, we can do this more directly.

Differential Revision: https://phabricator.services.mozilla.com/D209534
2024-05-06 11:30:34 +00:00
Nika Layzell
715c98639b Bug 1875528 - Part 3: Remove unnecessary VsyncChild strong reference in BrowserChild, r=smaug
This reference created a cycle after the strong Manager() reference added in an earlier part.

With the reference removed, the VsyncChild will be kept alive via the IPC link
instead, and will be torn down when the IPDL actor is destroyed.

Differential Revision: https://phabricator.services.mozilla.com/D198626
2024-04-22 17:13:23 +00:00
Greg Stoll
1a4633232d Bug 1875481 - Part 3: Add content analysis support to printing operations r=handyman,spohl,fluent-reviewers,kpatenio,smaug,emilio
Differential Revision: https://phabricator.services.mozilla.com/D200979
2024-04-10 00:15:47 +00:00
Stanca Serban
4c0f6b30c1 Backed out 3 changesets (bug 1875481) for basicWindowDotPrintTest related junit failures.
Backed out changeset cd024cb2768e (bug 1875481)
Backed out changeset 6b7be15cd017 (bug 1875481)
Backed out changeset d1da53c0673b (bug 1875481)
2024-04-09 05:56:47 +03:00
Greg Stoll
77cb63d2a3 Bug 1875481 - Part 3: Add content analysis support to printing operations r=handyman,spohl,fluent-reviewers,kpatenio,smaug,emilio
Differential Revision: https://phabricator.services.mozilla.com/D200979
2024-04-08 23:53:58 +00:00
Peter Van der Beken
0cf1288004 Bug 1883278 - Force-enable platform collection code of session store when SHIP is enabled. r=farre,geckoview-reviewers,sessionstore-reviewers
If session history in the parent is enabled then session store only works
correctly if the platform collection code is turned on.

Differential Revision: https://phabricator.services.mozilla.com/D203375
2024-03-13 10:56:33 +00:00
Sean Feng
d7254ccf1b Bug 1483828 - [Part 1] Disallow <tab> to move focus to root element r=smaug
Brings us on-par with Chrome and Safari

Differential Revision: https://phabricator.services.mozilla.com/D198436
2024-03-04 14:16:30 +00:00
Gabriele Svelto
e1e9346196 Bug 1831092 - Use the new pull-based API for all crash annotations and remove the global annotations table r=jgilbert,necko-reviewers,media-playback-reviewers,profiler-reviewers,win-reviewers,padenot,handyman,afranchuk,valentin,alwu,sotaro
This changes comes with several different refactorings all rolled into one,
unfotunately I couldn't find a way to pull them apart:
- First of all annotations now can either recorded (that is, we copy the value
  and have the crash reporting code own the copy) or registered. Several
  annotations are changed to use this functionality so that we don't need to
  update them as their value change.
- The code in the exception handler is modified to read the annotations from
  the mozannotation_client crate. This has the unfortunate side-effect that
  we need three different bits of code to serialize them: one for annotations
  read from a child process, one for reading annotations from the main process
  outside of the exception handler and one for reading annotations from the
  main process within the exception handler. As we move to fully
  out-of-process crash reporting the last two methods will go away.
- The mozannotation_client crate now doesn't record annotation types anymore.
  I realized as I was working on this that storing types at runtime has two
  issues: the first one is that buggy code might change the type of an
  annotation (that is record it under two different types at two different
  moments), the second issue is that types might become corrupt during a
  crash, so better enforce them at annotation-writing time. The end result is
  that the mozannotation_* crates now only store byte buffers, track the
  format the data is stored in (null-terminated string, fixed size buffer,
  etc...) but not the type of data each annotation is supposed to contain.
- Which brings us to the next change: concrete types for annotations are now
  enforced when they're written out. If an annotation doesn't match the
  expected type it's skipped. Storing an annotation with the wrong type will
  also trigger an assertion in debug builds.

Differential Revision: https://phabricator.services.mozilla.com/D195248
2024-03-04 10:24:43 +00:00
Stanca Serban
6980988721 Backed out 6 changesets (bug 1875528) for causing leakcheck failures. CLOSED TREE
Backed out changeset dcbbb7316940 (bug 1875528)
Backed out changeset a5c0564f9761 (bug 1875528)
Backed out changeset f3bc6e972f79 (bug 1875528)
Backed out changeset 535378dd79b0 (bug 1875528)
Backed out changeset 3cef14ed0f25 (bug 1875528)
Backed out changeset f0941fdbbabb (bug 1875528)
2024-01-25 01:26:46 +02:00
Nika Layzell
1863636c52 Bug 1875528 - Part 3: Remove unnecessary VsyncChild strong reference in BrowserChild, r=smaug
This reference created a cycle after the strong Manager() reference added in an earlier part.

With the reference removed, the VsyncChild will be kept alive via the IPC link
instead, and will be torn down when the IPDL actor is destroyed.

Differential Revision: https://phabricator.services.mozilla.com/D198626
2024-01-24 20:54:40 +00:00
Tooru Fujisawa
36c7ec1d88 Bug 1873330 - Part 6: Reflect UserActivation::Modifiers to window.open location. r=smaug
Reflect modifiers to chromeFlags and nsIBrowserDOMWindow::OPEN_* location,
to perform the equivalent of BrowserUtils.whereToOpenLink in window.open with
modifier keys.

Differential Revision: https://phabricator.services.mozilla.com/D197864
2024-01-11 17:24:03 +00:00
Tooru Fujisawa
9fb2cbc815 Bug 1873330 - Part 5: Add UserActivation::Modifiers parameters for window.open-related functions. r=smaug
Pass UserActivation::Modifiers from nsGlobalWindowOuter::OpenInternal
to nsPIWindowWatcher.openWindowWithRemoteTab, through the following interfaces
and protocol:
  * nsPIWindowWatcher.openWindow2
  * nsIWindowProvider.provideWindow
  * PContent.CreateWindow or PContent.CreateWindowInDifferentProcess
  * nsPIWindowWatcher.openWindowWithRemoteTab

Differential Revision: https://phabricator.services.mozilla.com/D197863
2024-01-11 17:24:03 +00:00
Edgar Chen
3d56f815a9 Bug 1833172 - Remove unused data from PasteTransferable IPC; r=masayuki
The PasteTransferable IPC is used for sending the nsITransferable in paste
command to content process. And the nsITransferable in paste command is from
 - https://searchfox.org/mozilla-central/rev/eb07633057d66ab25f9db4c5900eeb6913da7579/widget/android/GeckoEditableSupport.cpp#1685
 - https://searchfox.org/mozilla-central/rev/eb07633057d66ab25f9db4c5900eeb6913da7579/widget/cocoa/nsChildView.mm#4528
 - or from nsIDOMWindowUtils::sendContentCommandEvent which is used for tests.

None of them have valid requesting principal and content policy type set.

Differential Revision: https://phabricator.services.mozilla.com/D195948
2023-12-20 13:18:23 +00:00
Randell Jesup
2fece2d0d8 Bug 1847298: IPC constructor cleanup r=nika,padenot,dom-storage-reviewers,necko-reviewers,cookie-reviewers,asuth,Jamie
Differential Revision: https://phabricator.services.mozilla.com/D185472
2023-12-08 15:56:39 +00:00
Hiroyuki Ikezoe
ad709bfe9d Bug 1715179 - Propagate VisualViewport rect and the root scrollable rect and use them on the main-thread. r=botond
Depends on D186323

Differential Revision: https://phabricator.services.mozilla.com/D186324
2023-12-04 09:31:22 +00:00
Stanca Serban
358a6e26a0 Backed out 5 changesets (bug 1715179) for causing mochitests failures in test_group_double_tap_zoom-2.html. CLOSED TREE
Backed out changeset 600afc2dc0ca (bug 1715179)
Backed out changeset 75c2c7f6230e (bug 1715179)
Backed out changeset b851e0aff383 (bug 1715179)
Backed out changeset 0acfcbbdf460 (bug 1715179)
Backed out changeset b0c83c964ccf (bug 1715179)
2023-11-28 18:45:32 +02:00
Hiroyuki Ikezoe
6017e8b01f Bug 1715179 - Propagate VisualViewport rect and the root scrollable rect and use them on the main-thread. r=botond
Depends on D186323

Differential Revision: https://phabricator.services.mozilla.com/D186324
2023-11-28 09:42:21 +00:00
Jonathan Watt
61ff6ba12e Bug 1866011 p2. Rename nsIDocShell.contentViewer. r=emilio,credential-management-reviewers,devtools-reviewers,sgalich
Differential Revision: https://phabricator.services.mozilla.com/D194370
2023-11-24 09:10:52 +00:00
Jonathan Watt
839fe1be5d Bug 1865995 p6. Rename createAboutBlankContentViewer to match nsIDocumentViewer's new name. r=emilio,webdriver-reviewers,devtools-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D194340
2023-11-23 21:35:21 +00:00
Kagami Sascha Rosylight
c1e45850a8 Bug 1862244 - Add GlobalTeardownHelper r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D193295
2023-11-23 17:17:39 +00:00
Jonathan Watt
efb5a74fbc Bug 1865480. Rename nsIContentViewer to nsIDocumentViewer. r=layout-reviewers,emilio
Differential Revision: https://phabricator.services.mozilla.com/D193987
2023-11-21 12:45:59 +00:00
Tom Schuster
b69f140767 Bug 1847990 - Canvas fingerprinting telemetry. r=timhuang,anti-tracking-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D189111
2023-11-13 10:05:22 +00:00
Adam Brouwers-Harries
4a2ba69cbc Bug 1421651 - Remove obseleted timeline and TimelineMarker code r=canaltinova,webidl,devtools-reviewers,saschanaz,smaug,ochameau
This patch removes the old docshell timeline and timeline markers codebase and replaces them with equivalent Gecko profiler marker. This patch also fixes Bug 1834143, which is a subset of 1421651.

Differential Revision: https://phabricator.services.mozilla.com/D184217
2023-10-24 15:18:12 +00:00
Narcis Beleuzu
67b61b8b2c Backed out changeset 714aaf6484fb (bug 1421651) for causing Bug 1860719. CLOSED TREE 2023-10-24 17:31:02 +03:00
Adam Brouwers-Harries
720e582a3a Bug 1421651 - Remove obseleted timeline and TimelineMarker code r=canaltinova,webidl,devtools-reviewers,saschanaz,smaug,ochameau
This patch removes the old docshell timeline and timeline markers codebase and replaces them with equivalent Gecko profiler marker. This patch also fixes Bug 1834143, which is a subset of 1421651.

Differential Revision: https://phabricator.services.mozilla.com/D184217
2023-10-23 13:55:50 +00:00
Emilio Cobos Álvarez
d02e297b2d Bug 1624819 - Remove TaskCategory and other quantum dom remnants. r=smaug,media-playback-reviewers,credential-management-reviewers,cookie-reviewers,places-reviewers,win-reviewers,valentin,mhowell,sgalich,alwu
Sorry this is not a particularly easy patch to review. But it should be
mostly straight-forward.

I kept Document::Dispatch mostly for convenience, but could be
cleaned-up too / changed by SchedulerGroup::Dispatch. Similarly maybe
that can just be NS_DispatchToMainThread if we add an NS_IsMainThread
check there or something (to preserve shutdown semantics).

Differential Revision: https://phabricator.services.mozilla.com/D190450
2023-10-10 08:51:12 +00:00
Dan Robertson
a62cae6009 Bug 1856716 - Ensure that we hold a strong reference to the APZ event state. r=hiro
- Ensure that we hold a strong reference to the APZ event state before
   calling ProcessSingleTap, as ProcessSingleTap fires events.
 - Mark ProcessSingleTap as MOZ_CAN_RUN_SCRIPT since it can fire events.

Differential Revision: https://phabricator.services.mozilla.com/D190228
2023-10-05 22:34:32 +00:00
Dan Robertson
88fcf3a2f7 Bug 1816473 - Do not delay dispatching synthesized mouse events. r=botond,edgar
Do not delay dispatching synthesized mouse events for a single tap
gesture.

Differential Revision: https://phabricator.services.mozilla.com/D184051
2023-09-25 19:13:07 +00:00
Emilio Cobos Álvarez
93252b3465 Bug 1847584 - Account for IsUnderHiddenEmbedderElement() for BrowserChild visibility. r=smaug
Test by Gijs. Note that I removed the .isActive assertion, because this doesn't
affect activeness.

We could make that change too, but that's a bigger change, and I think we want
to do this regardless.

The CAN_RUN_SCRIPT annotations are obsolete (they come from bug 1582042
which directly fired docshell activity events, but that's not true
anymore, bug 1635914 changed the setup a bit later).

Differential Revision: https://phabricator.services.mozilla.com/D185643
2023-09-05 16:13:00 +00:00
Emilio Cobos Álvarez
f589903d08 Bug 1848357 - Remove PaintWhileInterruptingJSNoOp(). r=mconley
This should not be needed anymore. We no longer need to "ack" an epoch,
since there's no epoch.

Make the logic to trigger a paint and request composite a bit more
generic. That doesn't change behavior right now, because our visibility
state is tied to mRenderLayers, but without this change setting
renderLayers = true on a display: none iframe will trigger a useless
paint after bug 1847584.

Differential Revision: https://phabricator.services.mozilla.com/D187293
2023-09-02 07:09:01 +00:00
afarwees
1168c2c194 Bug 1850608 BrowserChild::NotifyAPZStateChange updated have a void return type. r=dlrobertson
Differential Revision: https://phabricator.services.mozilla.com/D187248
2023-09-02 00:58:07 +00:00
Emilio Cobos Álvarez
11692470d4 Bug 1848357 - Cleanup layer observer handling. r=mconley,gfx-reviewers,bradwerth
This seems to work, and turns out I need to fix this before bug 1847584,
because the epoch handling breaks with those patches in the case
customize mode sets display: none on browser elements.

Instead of dealing with epochs, just always report the last "has layers"
state to BrowserParent. This is both simpler and more reliable (there
were a couple hacks in WebRenderBridgeParent to make sure we notified
even though a transaction failed).

AsyncTabSwitcher pretty much already deals with this correctly because
it already needs to deal with browsers that already have layers, we only
had to loosen some assertions for potentially previous messages which
are fine.

Differential Revision: https://phabricator.services.mozilla.com/D187203
2023-09-01 17:09:27 +00:00
Stanca Serban
3fdab1cbc9 Backed out 2 changesets (bug 1816473) for causing Android junit failures. CLOSED TREE
Backed out changeset eccf1dcce67f (bug 1816473)
Backed out changeset e974d872becd (bug 1816473)
2023-08-30 18:42:40 +03:00
Dan Robertson
7cc1ade4d6 Bug 1816473 - Do not delay dispatching synthesized mouse events. r=botond,edgar
Do not delay dispatching synthesized mouse events for a single tap
gesture.

Differential Revision: https://phabricator.services.mozilla.com/D184051
2023-08-30 12:49:22 +00:00
Cristian Tuns
58e4ef4e8e Backed out changeset a741e0bcdca4 (bug 1847584) for causing bc failures in browser_reload_tab.js CLOSED TREE 2023-08-18 14:24:03 -04:00
Emilio Cobos Álvarez
91faba9e00 Bug 1847584 - Account for IsUnderHiddenEmbedderElement() for BrowserChild visibility. r=smaug
Test by Gijs. Note that I removed the .isActive assertion, because this doesn't
affect activeness.

We could make that change too, but that's a bigger change, and I think we want
to do this regardless.

The CAN_RUN_SCRIPT annotations are obsolete (they come from bug 1582042
which directly fired docshell activity events, but that's not true
anymore, bug 1635914 changed the setup a bit later).

Differential Revision: https://phabricator.services.mozilla.com/D185643
2023-08-18 16:17:31 +00:00
Emilio Cobos Álvarez
12547c0c1c Bug 1847929 - Don't throttle zero-size in-viewport OOP iframes. r=smaug
Use edge-inclusive intersection like IntersectionObserver, to make
zero-size iframes that are in the viewport considered visible. This is
consistent with how we treat zero-sized in-process iframes.

Differential Revision: https://phabricator.services.mozilla.com/D185808
2023-08-10 09:30:02 +00:00
Emilio Cobos Álvarez
913904e183 Bug 1847584 - Misc BrowserChild clean-ups. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D185642
2023-08-09 13:08:59 +00:00
Natalia Csoregi
f2ac649fc6 Backed out 3 changesets (bug 1847584) for causing vsync failures. CLOSED TREE
Backed out changeset bdfc3c7388cf (bug 1847584)
Backed out changeset 54b34c76db47 (bug 1847584)
Backed out changeset 03bf43b4ae07 (bug 1847584)
2023-08-09 15:47:03 +03:00
Emilio Cobos Álvarez
c6e1796127 Bug 1847584 - Account for IsUnderHiddenEmbedderElement() for BrowserChild visibility. r=smaug
Test by Gijs. Note that I removed the .isActive assertion, because this doesn't
affect activeness.

We could make that change too, but that's a bigger change, and I think we want
to do this regardless.

The CAN_RUN_SCRIPT annotations are obsolete (they come from bug 1582042
which directly fired docshell activity events, but that's not true
anymore, bug 1635914 changed the setup a bit later).

Differential Revision: https://phabricator.services.mozilla.com/D185643
2023-08-09 10:57:42 +00:00
Emilio Cobos Álvarez
5d9ee8cee0 Bug 1847584 - Misc BrowserChild clean-ups. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D185642
2023-08-09 09:32:27 +00:00
Emilio Cobos Álvarez
93c47f7ddf Bug 1800897 - Don't fire resize events along before/afterprint. r=dholbert
This partially backs out bug 774398.

This code was added to match what Chromium was doing, but it seems (per
discussions with Chromium engineers) that:

 * Resize event listener in Chromium never changed
   innerWidth/innerHeight. That doesn't match my recollection from bug
   774398, but it's true now in Chrome stable, at least.

 * Chromium canary no longer fires a resize event
   (https://crbug.com/1076867).

 * WebKit doesn't fire resize either.

So let's get rid of this, which also causes some correctness issues with
some iframes, and keep just the media query listeners firing.

Differential Revision: https://phabricator.services.mozilla.com/D185404
2023-08-04 21:37:41 +00:00
Peter Van der Beken
c10814e75a Bug 1846277 - Remove nsGlobalWindow.h. r=dom-core,necko-reviewers,jesup,farre
Differential Revision: https://phabricator.services.mozilla.com/D184973
2023-08-02 20:41:48 +00:00
Masayuki Nakano
ae2415dd66 Bug 1690827 - part 1: Number each composition for native IME or synthesized in the parent process r=smaug
For handling (ignoring) "too late" composition commit request from content
process, we need to distinguish a request is for which composition.  Therefore,
we need to number each composition originated in the parent process.

This patch makes `TextComposition` instance which is created at first
composition event for a composition consider a composition ID in the parent
process and set it to composition events which are dispatched into the DOM
tree in the parent or sent to a remote process.

And also this patch adds the composition ID param to the request method of
committing composition and reply methods to notify the parent process of ending
a composition event handling.

The last patch handle them in `ContentCacheInParent` to consider
whether a request/reply should be ignored or handled.

Differential Revision: https://phabricator.services.mozilla.com/D179310
2023-06-14 01:57:33 +00:00
Cosmin Sabou
db0847b0f7 Backed out 6 changesets (bug 1690827, bug 1835577, bug 1835578) for causing build bustages on widget/ContentCache.cpp. CLOSED TREE
Backed out changeset 8f96604b79a6 (bug 1835578)
Backed out changeset 3afcf20d7fb6 (bug 1835577)
Backed out changeset 41105bb6e199 (bug 1690827)
Backed out changeset feedd62f908d (bug 1690827)
Backed out changeset bc45f9483150 (bug 1690827)
Backed out changeset d2c874809470 (bug 1690827)
2023-06-13 09:31:03 +03:00
Masayuki Nakano
15b0e0a16e Bug 1690827 - part 1: Number each composition for native IME or synthesized in the parent process r=smaug
For handling (ignoring) "too late" composition commit request from content
process, we need to distinguish a request is for which composition.  Therefore,
we need to number each composition originated in the parent process.

This patch makes `TextComposition` instance which is created at first
composition event for a composition consider a composition ID in the parent
process and set it to composition events which are dispatched into the DOM
tree in the parent or sent to a remote process.

And also this patch adds the composition ID param to the request method of
committing composition and reply methods to notify the parent process of ending
a composition event handling.

The last patch handle them in `ContentCacheInParent` to consider
whether a request/reply should be ignored or handled.

Differential Revision: https://phabricator.services.mozilla.com/D179310
2023-06-13 04:07:45 +00:00
Neil Deakin
44b3909607 Bug 1776339, add a browsing context field that syncs the isUnderHiddenEmbedderElement state, r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D168440
2023-05-31 19:46:49 +00:00