Commit Graph

762917 Commits

Author SHA1 Message Date
Masayuki Nakano
d3e59b2f42 Bug 1718924 - part 15: Move TextServicesDocument::mSelStartIndex and TextServicesDocument::mSelEndIndex into OffsetEntryArray r=m_kato
They are indices of `OffsetEntryArray`. Therefore, they should be managed in it.

Depends on D119161

Differential Revision: https://phabricator.services.mozilla.com/D119162
2021-07-13 10:57:48 +00:00
Masayuki Nakano
987147357a Bug 1718924 - part 14: Move TextServicesDocument::SplitOffsetEntry to OffsetEntryArray r=m_kato
Depends on D119160

Differential Revision: https://phabricator.services.mozilla.com/D119161
2021-07-13 10:51:46 +00:00
Masayuki Nakano
f4d6fde8cd Bug 1718924 - part 13: Move TextServicesDocument::NodeHasOffsetEntry() into OffsetEntryArray r=m_kato
Depends on D119159

Differential Revision: https://phabricator.services.mozilla.com/D119160
2021-07-13 10:46:40 +00:00
Masayuki Nakano
5f44d6166c Bug 1718924 - part 12: Move TextServicesDocument::FindWordBounds() to OffsetEntryArray r=m_kato
Depends on D119158

Differential Revision: https://phabricator.services.mozilla.com/D119159
2021-07-13 10:19:40 +00:00
Julien Cristau
3a66c9fb13 Bug 1717540 - Add esr91 support. r=releng-reviewers,taskgraph-reviewers,aki
Differential Revision: https://phabricator.services.mozilla.com/D119521
2021-07-13 10:17:48 +00:00
Julien Cristau
829145a951 Bug 1717540 - remove comm-* from PER_PROJECT_PARAMETERS. r=rjl
Differential Revision: https://phabricator.services.mozilla.com/D119525
2021-07-13 10:17:47 +00:00
Masayuki Nakano
e2aec22fef Bug 1718924 - part 11: Create custom class of nsTArray<UniquePtr<OffsetEntry>> r=m_kato
There are some methods in `TextServicesDocument` which work only with
`TextServicesDocument::mOffsetTable`.  Once we move such methods to custom
class of `nsTArray<UniquePtr<OffsetEntry>>`, we can make `TextServicesDocument`
simpler.

Depends on D119157

Differential Revision: https://phabricator.services.mozilla.com/D119158
2021-07-13 10:11:06 +00:00
Masayuki Nakano
3169bc5de5 Bug 1720252 - Get rid of "dom.input_events.beforeinput.enabled" from tests r=smaug
`beforeinput` event was shipped and it won't be disabled for avoiding confusion
of web developers. So, we can drop the pref setting of
"dom.input_events.beforeinput.enabled" in our tests.

Depends on D119716

Differential Revision: https://phabricator.services.mozilla.com/D119729
2021-07-13 10:02:12 +00:00
Masayuki Nakano
b823b8b79c Bug 1715083 - Make test_coalesce_mousehweel.html wait to receive a user input event before running the first test r=smaug
Similarly, the test uses `synthesizeWheel` and it may be handled by the main
process before APZC has the `<iframe>`'s layout information.  So, it should
wait `promiseElementReadyForUserInput` before running its first test.

Differential Revision: https://phabricator.services.mozilla.com/D119716
2021-07-13 10:02:11 +00:00
Masayuki Nakano
931a8fba11 Bug 1716810 - Make test_deltaMode_lines_always_enabled.html wait to first user input via the parent process r=smaug
`synthesizeWheel` dispatches a `wheel` event via APZ.
* https://searchfox.org/mozilla-central/rev/b79212b4fc017f27ac2435a658d4e9b9798efa86/dom/base/nsDOMWindowUtils.cpp#755,789
* https://searchfox.org/mozilla-central/rev/b79212b4fc017f27ac2435a658d4e9b9798efa86/widget/PuppetWidget.cpp#383,386,396-397

So, it's important that the `<iframe>`'s layout information is registered in
the parent process.  Otherwise, the `wheel` event will be dispatched on the
`<iframe>` in the parent document instead.

Therefore, the test needs to wait a synthesized event via the parent process
before using `synthesizeWheel`.

Depends on D119596

Differential Revision: https://phabricator.services.mozilla.com/D119715
2021-07-13 10:02:11 +00:00
Masayuki Nakano
afce03d9c7 Bug 1718924 - part 10: Make all OffsetEntry instances unique pointers r=m_kato
Now, it stores `dom::Text` with `OwningNonNull`.  So, once it's leaked, it
wastes a lot of memory spaces.  Therefore, we should make `mOffsetTable`
store `UniquePtr<OffsetEntry>` instead of `OffsetEntry*`.

Depends on D119156

Differential Revision: https://phabricator.services.mozilla.com/D119157
2021-07-13 09:55:59 +00:00
Masayuki Nakano
b8ea33dddf Bug 1718924 - part 9: Rename TextServicesDocument::mSel(Start|End)Offset r=m_kato
Now, the meaning of `OffsetEntry` is clear.  Therefore, this patch adds comment
explaining the class and its members.

Then, the meaning of `TextServicesDocument::mSelStartOffset` and
`TextServicesDocument::mSelEndOffset` becomes clearer since they are used to
create `OffsetEntry` instances.  Therefore, this patch renames them.

Depends on D119155

Differential Revision: https://phabricator.services.mozilla.com/D119156
2021-07-13 09:42:34 +00:00
Jan de Mooij
f0855a566f Bug 1719795 part 6 - Remove null check for JS::GetClass return value. r=mccr8
Every JSObject has a non-null JSClass and a lot of code depends on this.

Differential Revision: https://phabricator.services.mozilla.com/D119618
2021-07-13 09:31:34 +00:00
Jan de Mooij
59f8590115 Bug 1719795 part 5 - Change JSCLASS_PRIVATE_IS_NSISUPPORTS JSClasses to use a reserved slot instead. r=mccr8,jonco
This is a step towards removing object private slots.

Classes with JSCLASS_PRIVATE_IS_NSISUPPORTS now use JSCLASS_SLOT0_IS_NSISUPPORTS
instead. For most classes this means we need to add an extra reserved slot and remove
the private slot.

Global objects (SimpleGlobalObject and the XPConnect BackstagePass and Sandbox globals)
however can use the JSCLASS_GLOBAL_APPLICATION_SLOTS already there. These slots were
only used for WebIDL DOM globals until now.

Differential Revision: https://phabricator.services.mozilla.com/D119502
2021-07-13 09:31:34 +00:00
Jan de Mooij
5285ac89a9 Bug 1719795 part 4 - Remove unused AutoClonePrivateGuard. r=mccr8
Depends on D119500

Differential Revision: https://phabricator.services.mozilla.com/D119501
2021-07-13 09:31:34 +00:00
Jan de Mooij
da70f70b5d Bug 1719795 part 3 - Inline XPC_WRAPPER_FLAGS. r=jonco,peterv
It's easier to reason about the JSClass flags without the extra level of indirection.

Depends on D119499

Differential Revision: https://phabricator.services.mozilla.com/D119500
2021-07-13 09:31:33 +00:00
Jan de Mooij
ae80d7fdf0 Bug 1719795 part 2 - Use SandboxPrivate::GetPrivate more. r=mccr8
Depends on D119498

Differential Revision: https://phabricator.services.mozilla.com/D119499
2021-07-13 09:31:33 +00:00
Jan de Mooij
bd355121f9 Bug 1719795 part 1 - Add a helper function for getting a SimpleGlobalObject's native global. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D119498
2021-07-13 09:31:32 +00:00
Kershaw Chang
bba712b93d Bug 1654507 - Part2: Plumbing for echRetry, r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D119403
2021-07-13 09:24:26 +00:00
Kershaw Chang
3b354571f5 Bug 1654507 - Part1: Plumbing for setting ech config, r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D119402
2021-07-13 09:24:25 +00:00
Masayuki Nakano
9ccb5fd526 Bug 1718924 - part 8: Add OffsetEntry::OffsetInTextInBlockIsInRangeOrEndOffset() r=m_kato
Depends on D119154

Differential Revision: https://phabricator.services.mozilla.com/D119155
2021-07-13 09:06:04 +00:00
Masayuki Nakano
36c6e61f3c Bug 1718924 - part 7: Add OffsetEntry::EndOffsetInTextInBlock() r=m_kato
Depends on D119153

Differential Revision: https://phabricator.services.mozilla.com/D119154
2021-07-13 08:49:47 +00:00
Nicolas Chevobbe
06c5735c82 Bug 1715908 - [devtools] Replace usage of navigate with DOCUMENT_EVENT dom-loading resource in service worker legacy listener. r=ochameau.
Differential Revision: https://phabricator.services.mozilla.com/D118670
2021-07-13 08:46:18 +00:00
Nicolas Chevobbe
204de9f82f Bug 1715908 - [devtools] Flush resources on dom-loading.r=ochameau.
This fixes intermittent failures on browser_target_list_service_workers_navigation.js
that were appearing with the next patch on the queue (switching to dom-loading resource
in legacy service worker watcher).

Differential Revision: https://phabricator.services.mozilla.com/D119511
2021-07-13 08:46:18 +00:00
Mike Hommey
6a07c778d8 Bug 1719852 - Derive addon sideload default from milestone rather than update channel. r=firefox-build-system-reviewers,mhentges
Differential Revision: https://phabricator.services.mozilla.com/D119683
2021-07-13 08:43:53 +00:00
Mike Hommey
a6909dc7da Bug 1719852 - Disable MOZ_REQUIRE_SIGNING on esr. r=jcristau,firefox-build-system-reviewers,mhentges
It was enabled in bug 1712633 by mistake.

Because there wasn't a way to distinguish esr yet, we add one, and while
at it, expose it to the build system.

Differential Revision: https://phabricator.services.mozilla.com/D119682
2021-07-13 08:43:52 +00:00
Mike Hommey
155e5f6d8b Bug 1719852 - Remove leftovers from bug 1712633. r=jcristau
Differential Revision: https://phabricator.services.mozilla.com/D119681
2021-07-13 08:43:52 +00:00
Masayuki Nakano
91272b59bb Bug 1718924 - part 6: Rename OffsetEntry::mStrOffset to mOffsetInTextInBlock r=m_kato
Depends on D119152

Differential Revision: https://phabricator.services.mozilla.com/D119153
2021-07-13 08:42:01 +00:00
Masayuki Nakano
d1c80af6c8 Bug 1718924 - part 5: Add OffsetEntry::OffsetInTextNodeIsInRangeOrEndOffset() r=m_kato
Depends on D119151

Differential Revision: https://phabricator.services.mozilla.com/D119152
2021-07-13 08:42:00 +00:00
Masayuki Nakano
84f8568e67 Bug 1718924 - part 4: Add OffsetEntry::EndOffsetInTextNode() r=m_kato
Depends on D119150

Differential Revision: https://phabricator.services.mozilla.com/D119151
2021-07-13 08:35:32 +00:00
Masayuki Nakano
59ed2fb43b Bug 1718924 - part 3: Rename OffsetEntry::mNodeOffset to mOffsetInTextNode r=m_kato
Depends on D119149

Differential Revision: https://phabricator.services.mozilla.com/D119150
2021-07-13 08:20:13 +00:00
Masayuki Nakano
f7a5d2ebbe Bug 1718924 - part 2: Change OffsetEntry::mNode to OwningNonNull<Text> r=m_kato
Now, `mNode` is always a text node, and it may store across "can run script"
boundaries.  So, it should be `OwningNonNull<Text>`.

Depends on D119148

Differential Revision: https://phabricator.services.mozilla.com/D119149
2021-07-13 08:20:13 +00:00
Masayuki Nakano
f334ac54b8 Bug 1715603 - part 2: Make AutoScrollChild not start autoscroll if a modifier key is pressed r=Gijs
Now, `nsIFrame::HandleEvent` moves selection at middle mouse button down.  This
occurs before dispatching the event into the system event group.  Therefore,
`AutoScrollChild` cannot prevent it.

On the other hand, Chrome does not start autoscroll when a modifier is pressed.
This means that our users may not be able to use middle click with modifiers
if web apps do not call `preventDefault()` as expected.  So, this difference
is a potential risk of web-compat.

Therefore, this patch makes `AutoScrollChild` stop starting autoscroll if
`Shift` key is pressed.

Differential Revision: https://phabricator.services.mozilla.com/D119253
2021-07-13 08:15:55 +00:00
Masayuki Nakano
1125b625c3 Bug 1715603 - part 1: Don't extend selection into a link r=edgar
If middle button click with `Shift` key occurs, Chrome and Safari extend the
selection in most cases.  However, if the clicked position is in a link,
Chrome does:
* If editable, collapse selection into the link instead of extending selection.
* If not editable, not extending selection and open tabs.

We should follow this behavior for both backward compatibility and web-compat.

Differential Revision: https://phabricator.services.mozilla.com/D119252
2021-07-13 08:15:55 +00:00
Masayuki Nakano
bbfaac5e36 Bug 1718924 - part 1: Get rid of TextServicesDocument::IsTextNode() and use AsText() if it's safe r=m_kato
It seems that it treats mainly a text node in various places, but it's not
guaranteed by any variable declarations.  So, first of all, I'd like to make
it clearer.

`TextServicesDocument::IsTextNode()` isn't necessary because `nsINode::IsText()`
is enough useful.  And `AsText()` should be zero cost at runtime.  So, in blocks
which guarantee specific content node is a text node, this patch appends
`AsText()` for making the code clearer.

Differential Revision: https://phabricator.services.mozilla.com/D119148
2021-07-13 08:13:11 +00:00
Glenn Watson
669caffa87 Bug 1696842 - Establish raster roots for more picture composite modes r=gfx-reviewers,lsalzman
Add MixBlend and ComponentTransfer to the picture composite modes that
unconditionally establish a raster root.

All the known bugs with the raster root code have been fixed, so let's
start incrementally enabling raster roots for more picture modes, and
fix any regressions that come from these before making raster roots
the default for all surfaces.

Differential Revision: https://phabricator.services.mozilla.com/D117954
2021-07-13 06:01:37 +00:00
Sandor Molnar
6c075398dd Backed out 2 changesets (bug 1718570, bug 1718569) for causing wpt failures in /css/css-flexbox/flexbox-align-self-vert-001. CLOSED TREE
Backed out changeset 59cdbaaa6a7b (bug 1718570)
Backed out changeset 489ce763c140 (bug 1718569)
2021-07-13 08:52:28 +03:00
Emma Malysz
b683e4147a Bug 1703051, apply proton panel styling to other bookmarks dropdown and overflow menu in bookmarks toolbar r=desktop-theme-reviewers,mconley,jaws,harry
Differential Revision: https://phabricator.services.mozilla.com/D113200
2021-07-13 05:10:19 +00:00
Masayuki Nakano
8166b13197 Bug 1668945 - Make test_bug1581192.html wait for the click target interactive r=smaug
When the test times out, the `<iframe>` element in the parent document receives
the mouse button events.  This may happen if APZC has not received layout
information from subframe's document yet.

For solving this issue, this patch adds a utility method into `EventUtils.js`
that waits a `mousemove` event synthesized on the given target.

Differential Revision: https://phabricator.services.mozilla.com/D119596
2021-07-13 04:27:35 +00:00
Marcos Cáceres
77d16c7a16 Bug 1718221 - Set gamepad policy allow list to 'all' r=smaug
temporarily setting the allow list to all until we can figure out why "self" is not working.

Differential Revision: https://phabricator.services.mozilla.com/D119471
2021-07-13 03:46:22 +00:00
Paul Bone
2885e22066 Bug 1718184 - pt 3. Use TimeDuration more in CCGCScheduler r=nika
Differential Revision: https://phabricator.services.mozilla.com/D118793
2021-07-13 01:42:32 +00:00
Paul Bone
3402a68121 Bug 1718184 - pt 2. Add a comment about units for this pref r=nika
Differential Revision: https://phabricator.services.mozilla.com/D118792
2021-07-13 01:42:32 +00:00
Paul Bone
2ff6954e0f Bug 1718184 - pt 1. IdleTaskRunner now uses TimeDuration r=nika
Differential Revision: https://phabricator.services.mozilla.com/D118791
2021-07-13 01:42:32 +00:00
Barret Rennie
a7f4b085d8 Bug 1715643 - Add a task for running the desktop recorder r=ahal
This patch allows the desktop recorder to be run manually. A subsequent patch
will enable it for every m-c push once the hardware is deployed.

Differential Revision: https://phabricator.services.mozilla.com/D117367
2021-07-13 01:28:08 +00:00
Dzmitry Malyshau
504ad98a7b Bug 1680377 - Follow-up fixes to WebGPU error scope
addressing post-landing review notes of
https://phabricator.services.mozilla.com/D118741

Differential Revision: https://phabricator.services.mozilla.com/D119654
2021-07-13 01:26:46 +00:00
Robert Mader
7f684896cb Bug 1718570 - Implement full partial damage support, r=gfx-reviewers,aosmond
This becomes possible as a side effect of making sure that the current
buffer content is always completely valid, by blitting from the
previous buffer, analogous to
`NativeLayerCA::HandlePartialUpdate` and
`WindowSurfaceWaylandMB::HandlePartialUpdate`.

Apart from reducing overpaint, this improves correctness is many
situations, avoiding glitches.

Note: the approach here may not be optimal concerning efficiency yet
and improvements are planed after further refactoring.

Depends on D118925

Differential Revision: https://phabricator.services.mozilla.com/D119015
2021-07-13 00:55:30 +00:00
Robert Mader
f3231d9976 Bug 1718569 - Implement custom FBO management, r=jgilbert,gfx-reviewers
Instead of using the Wayland EGL platform. The later is very convenient
but has several limitations. Managing FBOs allows to make our code more
similar to that of MacOS as well as the Wayland software backend.

Most importantly, it will allow us to cleanly implement partial damage
by giving us direct acces to previously submitted buffers, allowing us
to blit back from them, similar like in
`NativeLayerCA::HandlePartialUpdate`.
There are several other fields where more control over buffers will
come in handy, too many to describe them here in detail.

Note: we still use individual buffer pools for each tile. However, this
change brings everything into place to allow us to change to a more
`SurfacePoolCA`-style shared pool. That will reduce GPU-memory usage.

Includes some minor cleanups here and there.

Depends on D119013

Differential Revision: https://phabricator.services.mozilla.com/D118925
2021-07-13 00:55:29 +00:00
Matthew Noorenberghe
aa67c5a592 Bug 1670027 - Always compute isPrintSelectionRBEnabled for the settings passed to the system print dialog. r=mstriemer
When the Mozilla PDF printer is selected, a new settings object was created without the value of isPrintSelectionRBEnabled computed.

Differential Revision: https://phabricator.services.mozilla.com/D119578
2021-07-13 00:25:38 +00:00
Markus Stange
56da3bf9e0 Bug 1715786 - Observe dynamic changes to the ScrollToClick system pref. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D119684
2021-07-12 23:17:28 +00:00
Markus Stange
c4e62f99d4 Bug 1600430 - Observe changes to the full keyboard access system pref. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D119680
2021-07-12 23:17:28 +00:00