Commit Graph

750379 Commits

Author SHA1 Message Date
Swapnik Katkoori
9e2f72d5ac Bug 1697616 - Hide toggle when video duration is NaN. r=mtigley,mhowell
Differential Revision: https://phabricator.services.mozilla.com/D108241
2021-03-23 19:39:13 +00:00
Mike Conley
15246d9023 Bug 1697533 - Update the organization of the Bookmarks toolbar menu popup, and change style for Proton. r=mak,harry,desktop-theme-reviewers
Given the time constraints, and how fiddly this menupopup is (it's a menupopup
masquerading as a panel), I opted to not try to fix bug 985024. Instead, I've
applied the Proton styles as best I can given what I know about the styles
applied for the other menus.

Differential Revision: https://phabricator.services.mozilla.com/D109151
2021-03-23 19:35:32 +00:00
Masayuki Nakano
9892a73421 Bug 1220696 - part 6: Support insertLineBreak and insertParagraphSeparator commands in <textarea> r=smaug
Those command handlers just check whether the given editor is an `HTMLEditor`
or not.  Therefore, we should make them check whether the given editor is
a single line editor or not instead.

Differential Revision: https://phabricator.services.mozilla.com/D108572
2021-03-23 19:29:23 +00:00
Masayuki Nakano
843cdb6b35 Bug 1220696 - part 5: Support "contentReadOnly" and "getHTML" commands in <input> and <textarea> r=smaug
Although these commands supported supported only by Gecko, we shouldn't stop
supporting them unless we know the usage in the wild.  Therefore, this patch
adds the handling code for `TextEditor` too.

Differential Revision: https://phabricator.services.mozilla.com/D108571
2021-03-23 19:29:23 +00:00
Masayuki Nakano
4bce87d3e4 Bug 1220696 - part 4: Make Document consider whether the target is editable or not-editable with target editor r=smaug
Currently, `Document` checks it only with whether the document is editable
or not.  Only with this check, `execCommand` and the other related methods
work only when there is `contenteditable`.

Therefore, this patch makes it to check whether the target is editable or not
with target editor.

Differential Revision: https://phabricator.services.mozilla.com/D108570
2021-03-23 19:29:22 +00:00
Masayuki Nakano
fc94975380 Bug 1220696 - part 3: Make AutoEditorCommandTarget consider command handling editor with command and focused TextEditor or HTMLEditor r=smaug
For making `execCommand` and related methods with `<input>` and `<textarea>`
even if they are in `contenteditable` and focused, command should be handled
in active editor (focused editor if in foreground window and tab).

However, some commands should be handled by `HTMLEditor` even if an `TextEditor`
has focus.  Therefore, this patch adds new enum class which have 3 state into
`InternalCommandData` and makes `AutoEditorCommandTarget` consider it with the
enum class.

Note that the new failures about `contentReadOnly` command will be fixed by
a following patch.

Differential Revision: https://phabricator.services.mozilla.com/D108569
2021-03-23 19:29:22 +00:00
Masayuki Nakano
79e9ddf2f5 Bug 1220696 - part 2: Make related methods of Document::ExecCommand use AutoEditorCommandTarget r=smaug
This will guarantee that when `<input>` or `<textarea>` is in `contenteditable`,
`execCommand` and the other related methods work with same command class
instance and same command context (in this case, it's editor instance).

Differential Revision: https://phabricator.services.mozilla.com/D108568
2021-03-23 19:29:21 +00:00
Masayuki Nakano
7c376d3a5d Bug 1220696 - part 1: Split off the code considering EditorCommand in Document::ExecCommand r=smaug
Editor command should be handled in same command table between `ExecCommand`
and the other related methods.  However, currently, only `ExecCommand` does
optimized things.  For using same logic in the other methods, the code should
be in an independent stack class.

Differential Revision: https://phabricator.services.mozilla.com/D108567
2021-03-23 19:29:21 +00:00
Masayuki Nakano
4a5ceb1077 Bug 1220696 - part 0: Update exec-command-with-text-editor.tentative.html for testing the following patches more r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D108566
2021-03-23 19:29:20 +00:00
Emilio Cobos Álvarez
2366c509a8 WIP: Bug 1700132 - Annotate an intermittent test failure in forms/input/number/focus-handling.html.
This is a real issue, but realistically we're probably not going to dig
a lot into it, and it wasn't really caused by the regressing bug in any
meaningful way.

Differential Revision: https://phabricator.services.mozilla.com/D109532
2021-03-23 19:27:51 +00:00
Asif Youssuff
cfed153db9 Bug 1700001 - Added quit option for appmenu in Linux r=flod
Differential Revision: https://phabricator.services.mozilla.com/D109455
2021-03-23 19:25:52 +00:00
Masayuki Nakano
b4094e2c64 Bug 1528289 - part 4: Prevent click event if APZC cancels autoscroll synchronously r=botond
The automated tests become orange only in macOS and 32bit Windows builds.  It
fails when left mouse button down is synthesized in the autoscroller (a XUL
`<panel>` element).  Although I'm not sure why that depends on the platform,
APZ cancels active autoscrolling before dispatching `mousedown` event.
Therefore, `AutoScrollParent` nor `AutoScrollChild` cannot block the following
click event.

Therefore, this patch adds new field into `APZEventResult` and set it to `true`
when APZ runs `autoscroll` but canceled by a mouse input.  Then, `nsBaseWidget`
can prevent following click event of `eMouseDown` and `eMouseUp` events as
expected before dispatching them into the DOM tree.  (FYI: Preventing click
event of either `eMouseDown` or `eMouseUp` can prevent the following `click`
event, etc.)

Differential Revision: https://phabricator.services.mozilla.com/D107325
2021-03-23 19:22:49 +00:00
Masayuki Nakano
95157ad499 Bug 1528289 - part 3: Make AutoScrollChild check this._scrollable whether the autoscroller is open or closed r=Gijs
I was confused by the old flag `this._ignoreMouseEvents`.  It's now set to
`true` by `startAutoscroll`, but `stopScroll` does not set it to `false`.
Instead, `this._scrollable` is available for this purpose.

Then, the test does not pass only on 32bit Windows and macOS.  The failure is,
when clicking on left mouse button, `click` event is fired in the content.
The difference from the other platforms, the click is handled by APZ on them.
Therefore, there is no chance to consume click event in `AutoScrollParent`,
`AutoScrollChild` nor `browser-custom-element`.

Differential Revision: https://phabricator.services.mozilla.com/D107324
2021-03-23 19:22:49 +00:00
Masayuki Nakano
7653ddaefd Bug 1528289 - part 2: Dispatch same events on the web contents when autoscroll is canceled with a click r=Gijs,edgar
Chrome behaves like this:

1. When user starts autoscroll with a middle click, `mousedown` and `mouseup`
   are fired, but `auxclick` nor `paste` event is not fired.
2. When user ends autoscroll with a left click, only `mouseup` event is fired.
   I.e, `mousedown` nor `click` event is not fired.
3. When user ends autoscroll with a middle click, only `mouseup` event is fired.
   I.e., `mousedown`, `auxclick` nor `paste` events is not fired.
4. When user ends autoscroll with a right click, `mouseup` and `contextmenu`
   events are fired, but `mousedown` and `auxclick` events are not fired.

This patch emulates these Chrome's behavior as far as possible.  However,
unfortunately, we cannot do exactly same behavior without some big patches
because each widget (`nsWindow` or `nsChildView`) discards a mouse event
which rolled up a widget before dispatching it into the DOM.  Therefore,
for now, this patch does not fix the following issues:

1. `mousedown` event is not fired in content when clicking outside the
   autoscroller to close it except when pressing the secondary button or on any
   buttons on Linux.
2. `mouseup` event is not fired in content when clicking outside the
   autoscroller to close it except when pressing the primary button macOS.
3. `click` event and `auxclick` events are fired when clicking outside the
   autoscroller with the secondary button.

So, the middle button `click`/`auxclick` events and `paste` event which is
reported to the bug won't be fired with this patch.  I'll file follow up bugs.

Differential Revision: https://phabricator.services.mozilla.com/D104652
2021-03-23 19:22:48 +00:00
Masayuki Nakano
2ad57f8fae Bug 1528289 - part 1: Move selection at middle button down rather than middle button up r=edgar
Chrome and Safari move selection at middle button down and does not modify the
range at middle button up.  However, they handle middle button down with
`Shift` key is "continue selection".  So, we should handle selection in
nsIFrame when `mousedown` event for middle mouse button is fired, but ignore
multiple selection, drag and drop and maintaining selection for aligning the
behavior to the other browsers.

This patch splits `nsIFrame::HandlePress()` and calls new method which
moves selection from `nsIFrame::HandleEvent()` when middle button is pressed.
(Note that this patch does not check whether middle click paste is enabled
because Chrome moves selection even on Windows which Chrome always disable
middle click paste on.)

With this change, "paste" event target is changed.  Previously, we used target
of the preceding `mouseup` event, but we start to use the target of the
preceding `mousedown` event.

Note that even with this patch, we still behave differently from Chrome even
in the following cases:
- middle mouse button down in selected range, we collapse it, but Chrome keeps
  the selection.
- middle mouse button click in selected range, we dispatch "paste" event, but
  Chrome collapse selection and not dispatch "paste" event.
- middle mouse button down in selected range and up in different element,
  Chrome does not modify the range nor dispatch "paste" event.
- Shift + middle mouse button in editable `<table>` works as non-editable
  in Chrome, but our editor handles it with special path.  Therefore, we
  don't modify the range but dispatch "paste" event in the selected range.

Changing them requires bigger change and probably requires some other features'
behavior changes.  Therefore, we shouldn't touch these issues until they are
actually reported as web-compat issues.

Differential Revision: https://phabricator.services.mozilla.com/D103997
2021-03-23 19:22:48 +00:00
Sebastian Hengst
a2f8d0f50b Bug 1699812 - set getsubstringlength-emoji-ligatures.html as failing on Android with Release and Beta r=emilio DONTBUILD
Test got added in bug 1697762 but build didn't get changed. Issue is pending
further investigation.

Differential Revision: https://phabricator.services.mozilla.com/D109341
2021-03-23 19:22:46 +00:00
Hubert Boma Manilla
af3289f596 Bug 1666386 - [devtools] Find blocked request using url name fixes intermittent r=nchevobbe
The test previously depended on the position of the blocked request
in the request list view, This causes the test to fail intermittently
when the list is out of order.

This fix instead finds the request using the name in the url which is
more consistent.

Differential Revision: https://phabricator.services.mozilla.com/D109497
2021-03-23 19:21:21 +00:00
Masayuki Nakano
b21e72004b Bug 1693049 - Add a crashtest (the bug itself was fixed in bug 1669342) r=mbrodesser
Differential Revision: https://phabricator.services.mozilla.com/D109034
2021-03-23 19:20:59 +00:00
Emma Malysz
f417785508 Bug 1699552, change downloads panel font and width when proton is enabled r=mconley
Differential Revision: https://phabricator.services.mozilla.com/D109412
2021-03-23 19:14:27 +00:00
Aaron Klotz
ed199e4918 Bug 1698174: Remove support for MOZ_DEBUG_*_WAIT_FOR_JAVA_DEBUGGER environment variables; r=geckoview-reviewers,agi
This is in favour of using `adb shell am set-debug-app` instead.

Differential Revision: https://phabricator.services.mozilla.com/D108977
2021-03-23 18:59:54 +00:00
Andrew Halberstadt
74c8246561 WIP: Bug 1638991 - [telemetry-tests-client] Don't use relative imports in telemetry_harness. CLOSED TREE
Differential Revision: https://phabricator.services.mozilla.com/D109533
2021-03-23 19:27:08 +00:00
Butkovits Atila
7ff95ae753 Backed out changeset 01519685a650 (bug 1679645) for causing failures at test_bug600570.html. 2021-03-23 22:44:33 +02:00
Butkovits Atila
adba45a57a Backed out 2 changesets (bug 1699851) for causing build bustages.
Backed out changeset b361eb0f908c (bug 1699851)
Backed out changeset 668ca9d231cb (bug 1699851)
2021-03-23 22:42:11 +02:00
Iain Ireland
9f15769517 Bug 1699851: Inline ArrayIteratorNext r=jandem
We improve by ~40% on a microbenchmark because we can scalar-replace the result object.

Differential Revision: https://phabricator.services.mozilla.com/D109166
2021-03-23 18:47:51 +00:00
Iain Ireland
5e8227c559 Bug 1699851: Improve scalar replacement of objects r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D109165
2021-03-23 18:47:50 +00:00
Iain Ireland
7d47a32bf6 Bug 1699910: Fix anyFormalIsAliased assertion r=jandem
When we are guarding that no argument is forwarded, ArgumentsReplacer::visitGuardArgumentsObjectFlags asserts that no formal argument is aliased. This is too general: in strict mode, arguments can be aliased by the call object, but not forwarded.

This patch fixes the check in `anyFormalIsAliased` and renames it for clarity.

(I tried adding assertions in `MaybeForwardToCallObject` that we only mark arguments as forwarded if `script->anyFormalIsAliased()`, but that runs into problems with `arguments.callee.arguments` and `ArgumentsObject::createUnexpected`.)

Differential Revision: https://phabricator.services.mozilla.com/D109413
2021-03-23 18:47:17 +00:00
Iain Ireland
3dc4f56cce Bug 1687025: Inline Array#forEach and friends r=evilpie
This was ~3x faster in a microbenchmark for `forEach`, `every`, and `some`, and ~2x faster for `map`.

Differential Revision: https://phabricator.services.mozilla.com/D109415
2021-03-23 18:46:38 +00:00
Iain Ireland
0ca48fa876 Bug 1688033: Use scalar replacement of arguments by default r=jandem
Now that the the train has left for 88, we can turn this on by default to get as much testing as possible.

Differential Revision: https://phabricator.services.mozilla.com/D109416
2021-03-23 18:46:17 +00:00
Erik Rose
b1265899bc Bug 1681985 - Add and call Fathom ruleset. r=zbraniecki
* We make some changes to heuristicsRegexp.js to improve accuracy. (Nothing else uses these regexps, so they're safe to change.) The commenting out of some languages in the expiration fields are because they caused a lot of false positives, according to Daniel Hertenstein's recollection. In any case, we've never preffed CC autofill on for those languages.
* Delete a few tests from test_known_strings.js and one from test_getInfo.js, which were testing for the presence of regexes we removed.
* Delete tests of CC autofill against third-party sites. These tests no longer work as xpcshell tests, since Fathom expects full layout and style information. The spirit of these tests is maintained by adding these pages to Fathom's training, validation, and testing corpora at 2bfcdf23dc. A few don't make it due to iframes which confound Fathom's capture tools, but the rest all succeed--and now improve the ML model as well as acting as tests. The training results after said integration reflect this improvement, which boosts testing precision and recall for every type.
* Add a mochitest to ensure the Fathom integration code can surface a decision that a field should not be autofilled. Decisions that go the other way are taken care of by the existing autofill tests.

Differential Revision: https://phabricator.services.mozilla.com/D100141
2021-03-23 18:31:08 +00:00
Erik Rose
e3982bb0f0 Bug 1681985 - Update Fathom to 3.7.3. r=zbraniecki
Get a version which will throw a specific error when isVisible() is run on elements that aren't in a window.

Some of the xpcshell tests crash because they transit through the codepath that calls Fathom, even though they don't do anything with its output. Fathom gets cranky and throws an exception because the elements it's evaluating don't live within a window object (an artifact of the test harness). This lets us swallow that exception and no others.

Differential Revision: https://phabricator.services.mozilla.com/D107906
2021-03-23 18:31:07 +00:00
Erik Rose
52703e294a Bug 1681985 - Extract LabelUtils to FormAutofillUtils.jsm. r=zbraniecki
We need it from both FormAutofillHeuristics and CreditCardRuleset, and it would make a circular import otherwise: FormAutofillHeuristics -> CreditCardRuleset -> FormAutofillHeuristics.

Differential Revision: https://phabricator.services.mozilla.com/D100140
2021-03-23 18:31:07 +00:00
Barret Rennie
fe5c743b15 Bug 1649598 - Migrate ProfileAge.jsm to IOUtils and PathUtils r=emalysz
Differential Revision: https://phabricator.services.mozilla.com/D96888
2021-03-23 18:27:40 +00:00
Tom Ritter
93ca1b2915 Bug 1610570: Add a 'NoTaint=allvalid' attribute as well, and cut Gamepad over to it r=cmartin
Depends on D108247

Differential Revision: https://phabricator.services.mozilla.com/D108248
2021-03-23 18:26:30 +00:00
Tom Ritter
cbeb7d2c9d Bug 1610570: Apply the passback attribute to gamepad r=cmartin
Differential Revision: https://phabricator.services.mozilla.com/D108247
2021-03-23 18:26:30 +00:00
Tom Ritter
a40387b8a8 Bug 1610570: Pass attributes through so lower.py can change code emission, and handle NoTaint r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D108246
2021-03-23 18:26:30 +00:00
Tom Ritter
7275e370ec Bug 1610570: Support the NoTaint attribute on method parameters with the passback value r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D108245
2021-03-23 18:26:29 +00:00
Miko Mynttinen
40648350fd Bug 1679645 - Cache the selection state in nsTextFrame rather than in nsDisplayText r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D108646
2021-03-23 18:21:02 +00:00
Emilio Cobos Álvarez
51a69dce6a Bug 1700379 - Remove unused nsDisplayListBuilder::IsInPageSequence. r=miko
Differential Revision: https://phabricator.services.mozilla.com/D109509
2021-03-23 18:02:49 +00:00
Anny Gakhokidze
eb737dfce2 Bug 1698104 - Fix session restore for about:reader, r=nika,kashav
Implement an observer to wait for correct window events in order to restore tab
content.  Non-SHIP code restores about:reader scroll position after receiving
"AboutReaderContentReady" event, so to achieve the same thing with session
history in parent enabled, we can wait for "AboutReader:Ready" event.

Differential Revision: https://phabricator.services.mozilla.com/D108712
2021-03-23 18:01:23 +00:00
Kashav Madan
6d6c056ad0 Bug 1698878 - Verify formdata URL in the parent, r=nika
This should happen before any data is sent down to the content process.

Differential Revision: https://phabricator.services.mozilla.com/D108830
2021-03-23 18:01:22 +00:00
Kashav Madan
5df6022cf9 Bug 1597499 - Enable some sessionstore Fission/SHIP tests, r=farre
Differential Revision: https://phabricator.services.mozilla.com/D108693
2021-03-23 18:01:22 +00:00
Kashav Madan
5dc7379641 Bug 1597499 - Make Session Restore work in Fission, r=nika
Differential Revision: https://phabricator.services.mozilla.com/D107883
2021-03-23 18:01:21 +00:00
Kashav Madan
7f683be5f5 Bug 1597499 - Add SessionStoreTypes.ipdlh, r=farre
Originally authored by :farre for bug 1572084.

Depends on D89969

Differential Revision: https://phabricator.services.mozilla.com/D108791
2021-03-23 18:01:21 +00:00
Kashav Madan
c91bbe8c6d Bug 1597499 - Move nsIDocShell::ChildOffset to BrowsingContext, r=nika
Differential Revision: https://phabricator.services.mozilla.com/D89969
2021-03-23 18:01:20 +00:00
Emma Malysz
14f7b0bd69 Bug 1698065, ensure fxa button is hidden from overflow menu if not signed in r=sfoster
Differential Revision: https://phabricator.services.mozilla.com/D109406
2021-03-23 17:55:09 +00:00
Marco Bonardo
779e36c5a0 Bug 1700137 - Add Search Engine is missing in address bar context menu after customization. r=harry
Differential Revision: https://phabricator.services.mozilla.com/D109480
2021-03-23 17:54:31 +00:00
Butkovits Atila
f632200fb8 Backed out changeset 1d7fcfd34752 (bug 1699858) for causing build bustages. CLOSED TREE 2021-03-23 20:28:57 +02:00
Butkovits Atila
f52312fa46 Backed out changeset 065644a4b755 (bug 1649604) for causing failure on test_update_theme.js 2021-03-23 20:20:53 +02:00
Sam Foster
24df036753 Bug 1699858 - Avoid using the toolkit/global icons which are about to change for proton. r=nchevobbe,jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D109186
2021-03-23 17:36:46 +00:00
Masatoshi Kimura
696e9fb640 Bug 1700339 - Use /clang:-undef to undefine predefined macros when clang-cl is used. r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D109500
2021-03-23 17:34:31 +00:00