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

3981 Коммитов

Автор SHA1 Сообщение Дата
Kagami Sascha Rosylight 2111b10482 Bug 1672141 - Part 4: Set fling stopper threshold to MAX_VALUE r=botond
Currently the test intermittently fails without firing additional touchstart/touchend, but scroll event still fires. This can happen if the previous swiping caused fling and it's still ongoing when a new swipe starts.

The ideal fix would be to detect the end of fling but there currently is no good way to do that. Instead this patch tries setting higher value for `apz.fling_stopped_threshold` to prevent flings from happening.

Differential Revision: https://phabricator.services.mozilla.com/D109684
2021-03-27 00:51:55 +00:00
Butkovits Atila 46dbedb9cc Bug 1681368 - disable test_focus_blur_on_click_in_deep_cross_origin_iframe.html on Windows&Mac_64 for frequent failures. r=intermittent-reviewers,aki DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D109575
2021-03-26 06:52:50 +00:00
Edgar Chen e33744908c Bug 1699284 - Part 4: Continue to search/try next accesskey target if current target is not focusable; r=masayuki
For example, if the target element is disabled, we could not move focus to it,
then we cycle to next accesskey target.

Differential Revision: https://phabricator.services.mozilla.com/D109621
2021-03-25 16:09:54 +00:00
Edgar Chen 51ffc89b34 Bug 1699284 - Part 2: Delegate focus handling to Element if accesskey won't cause activation; r=masayuki
So Element could decide how focus should be handled if accesskey shouldn't cause
activation, e.g. label element would forward focus to control element.

This could make behavior saner a bit, though there is still something we could
improve, e.g. if the control element doesn't have same accesskey, we are unable
to cycle to the next one in order while pressing same accesskey again.

But this is still better than stuck somewhere if label element is not focusable.

Differential Revision: https://phabricator.services.mozilla.com/D109067
2021-03-25 16:09:53 +00:00
Edgar Chen 3704fb9a8e Bug 1699284 - Part 1: Update comment for PerformAccesskey; r=masayuki
I moved nsIContent::PerformAccesskey to Element in bug 1699755, but forget to
update the comment.

Differential Revision: https://phabricator.services.mozilla.com/D109564
2021-03-25 16:09:53 +00:00
Simon Giesecke 760cc7e936 Bug 1679522 - Fix include directives and forward declarations. r=andi,necko-reviewers,jgilbert
- Add missing include directives and forward declarations.
- Remove some extra include directives.
- Add missing namespace qualifications.
- Move include directives out of namespace in toolkit/xre/GlobalSemaphore.h

Differential Revision: https://phabricator.services.mozilla.com/D98894
2021-03-25 10:19:44 +00:00
Masayuki Nakano 5b18850f6e Bug 1686662 - Stop starting autoscroll if requested browsing context is not in foreground tab anymore r=smaug,Gijs
`AutoScrollParent` starts autoscroll even if the requested tab has already
been in background tab.  In this case, it does not make sense to start
autoscrolling in new foreground window since it may not be scrollable.

Additionally, our `mousedown` event default action activates the DOM window,
but in the DuckDuckGo's case, focus shouldn't be backed to the clicked tab.

Differential Revision: https://phabricator.services.mozilla.com/D106590
2021-03-23 22:21:29 +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
Kagami Sascha Rosylight 710889efe3 Bug 1672141 - Part 3: Add touchstart logging to tocuh_action_helpers r=edgar
This is to check whether the intermittent failure is missing only touchend or missing the whole touch event sequences.

Differential Revision: https://phabricator.services.mozilla.com/D109482
2021-03-23 14:18:03 +00:00
Tom Schuster 01d4cafbb1 Bug 1536094 - Support dynamic import from content scripts (sandboxed code) r=smaug,jonco
Firstly we need to find a usable ScriptLoader for code in the content script sandbox,
for that we use the normal ScriptLoader associated with DOMWindow wrapped by the sandbox.

Secondly we need to execute the module in the global of the sandbox instead of the
"ScriptGlobal" the ScriptLoader is actually associated with. The main
behavior change here comes from using xpc::NativeGlobal in HostImportModuleDynamically
and passing that global around inside ScriptFetchOptions.

To ensure that content-scripts and the webpage don't share imported modules,
the module map (mFetchingModules and mFetchedModules) now uses a complex key
of <URI, Global>. The Global is a nullptr for normal imports from a webpage.

Differential Revision: https://phabricator.services.mozilla.com/D107076
2021-03-23 11:15:11 +00:00
Kartikaya Gupta 4b1b64c91f Bug 1699601 - Rename promiseApzRepaintsFlushed to promiseOnlyApzControllerFlushed. r=botond
This was a mechanical search-and-replace operation, plus adding some docs on
renamed function.

Differential Revision: https://phabricator.services.mozilla.com/D109245
2021-03-22 23:25:40 +00:00
Kris Maglione ed88fc8bd1 Bug 1646510: Remove deprecated nsContentUtils::GetCrossDocParentNode. r=nika
Moves its last remaining (parent-process-only) caller to use a local static
copy instead.

Differential Revision: https://phabricator.services.mozilla.com/D109420
2021-03-22 23:19:59 +00:00
Bogdan Tara a3fae8602d Backed out 3 changesets (bug 1536094) for causing bug 1700228 CLOSED TREE
Backed out changeset 464143c2b6ac (bug 1536094)
Backed out changeset 3462cb6573b1 (bug 1536094)
Backed out changeset d566c1c9e82f (bug 1536094)
2021-03-23 00:46:34 +02:00
Kagami Sascha Rosylight 24e9b29c8d Bug 1699707 - Remove DeviceProximityEvent and UserProximityEvent r=agi,annevk,smaug
Note that this removes `window.ondeviceproximity` and `window.onuserproximity` which unexpectedly have been exposed unconditionally.

Differential Revision: https://phabricator.services.mozilla.com/D109160
2021-03-22 18:16:16 +00:00
Tom Schuster bcb6e45e17 Bug 1536094 - Support dynamic import from content scripts (sandboxed code) r=smaug,jonco
Firstly we need to find a usable ScriptLoader for code in the content script sandbox,
for that we use the normal ScriptLoader associated with DOMWindow wrapped by the sandbox.

Secondly we need to execute the module in the global of the sandbox instead of the
"ScriptGlobal" the ScriptLoader is actually associated with. The main
behavior change here comes from using xpc::NativeGlobal in HostImportModuleDynamically
and passing that global around inside ScriptFetchOptions.

To ensure that content-scripts and the webpage don't share imported modules,
the module map (mFetchingModules and mFetchedModules) now uses a complex key
of <URI, Global>. The Global is a nullptr for normal imports from a webpage.

Differential Revision: https://phabricator.services.mozilla.com/D107076
2021-03-22 16:22:27 +00:00
Cosmin Sabou cac540c776 Backed out 3 changesets (bug 1536094) for causing valgrind failures.
Backed out changeset dfe051a9c91a (bug 1536094)
Backed out changeset c73979442002 (bug 1536094)
Backed out changeset 863933e887e8 (bug 1536094)
2021-03-22 20:34:36 +02:00
Tom Schuster aa320997de Bug 1536094 - Support dynamic import from content scripts (sandboxed code) r=smaug,jonco
Firstly we need to find a usable ScriptLoader for code in the content script sandbox,
for that we use the normal ScriptLoader associated with DOMWindow wrapped by the sandbox.

Secondly we need to execute the module in the global of the sandbox instead of the
"ScriptGlobal" the ScriptLoader is actually associated with. The main
behavior change here comes from using xpc::NativeGlobal in HostImportModuleDynamically
and passing that global around inside ScriptFetchOptions.

To ensure that content-scripts and the webpage don't share imported modules,
the module map (mFetchingModules and mFetchedModules) now uses a complex key
of <URI, Global>. The Global is a nullptr for normal imports from a webpage.

Differential Revision: https://phabricator.services.mozilla.com/D107076
2021-03-22 16:22:27 +00:00
Kagami Sascha Rosylight bf334c85a9 Bug 1672141 - Part 2: Remove fails_with_native_injection flag from test_wpt_touch_action r=edgar
This test synthesizes touch input only in continuous way via dragging functions, so theoretically it should never trigger InjectTouchInput() 100ms timeout issue.

Depends on D109158

Differential Revision: https://phabricator.services.mozilla.com/D109159
2021-03-20 00:16:26 +00:00
Kagami Sascha Rosylight 6f1f65561f Bug 1672141 - Part 1: Use promiseNativePointerDrag in touch action helpers r=edgar
Differential Revision: https://phabricator.services.mozilla.com/D109158
2021-03-20 00:16:26 +00:00
Edgar Chen 58408449f9 Bug 1699635 - Part 3: Cleanup IsAccessKeyTarget in EventStateManager.cpp; r=masayuki
1. Use Element as argument as we always pass Element.
2. Get frame from the Element argument.

Differential Revision: https://phabricator.services.mozilla.com/D109042
2021-03-19 23:21:22 +00:00
Edgar Chen 4ddbc4b626 Bug 1699635 - Part 2: Use Element for EventStateManager::mAccessKeys; r=masayuki
As we always add Element into the array

Differential Revision: https://phabricator.services.mozilla.com/D109041
2021-03-19 23:21:22 +00:00
Edgar Chen 5cb610c73f Bug 1699635 - Part 1: Rename EventStateManager::GetFocusedContent to GetFocusedElement; r=masayuki
And make it return Element*

Differential Revision: https://phabricator.services.mozilla.com/D109040
2021-03-19 23:21:21 +00:00
Emilio Cobos Álvarez f2d4b8c005 Bug 1699570 - Make mouse_focuses_formcontrol on chrome documents match the old behavior. r=mstange
For that, we make accessibility.mouse_focuses_formcontrol a static pref,
and make it work in all platforms because it's simpler and allows to
test mac-specific things on other platforms more easily.

Differential Revision: https://phabricator.services.mozilla.com/D109006
2021-03-18 23:01:45 +00:00
Sean Feng 395458ba54 Bug 1698643 - Implement a telemetry probe to collect the input latency from mouseup(followed by a click) to the next composition r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D108647
2021-03-18 14:20:20 +00:00
Emilio Cobos Álvarez 83d5691cbc Bug 1614658 - Enable accessibility.mouse_focuses_formcontrol by default. r=mac-reviewers,bradwerth,mstange
This aligns Mac's focus model with other platforms. Matches Chromium, but not
Safari.

Reasons why I think it's worth making this change:

 * Consistency with all other platforms.
 * Makes the :focus-visible implementation more useful.
 * Fixes focus navigation after e.g. clicking a button.
 * Shouldn't cause a lot more outlines to show up (at least not by default).

An example of the second point:

    data:text/html,<button onclick="this.nextElementSibling.focus()">Click</button><button>Imagine I'm a dialog close button or something</button>

In non-macOS platforms, we won't show an outline for the button in that case,
which matches the developer expectations (links below). We don't show the
outline because the focus comes from an element that has been focused by mouse
(and thus didn't show an outline). But on macOS that doesn't work, because the
button is not focused.

For completeness, the actual heuristics for :focus-visible may change a bit as
a result of the discussions in:

  * https://github.com/w3c/csswg-drafts/issues/5885
  * https://github.com/web-platform-tests/wpt/pull/27806

But it's not clear to me how to best define this so it works on the macOS focus
model.

An example of the third point:

    data:text/html,<input type=text><input type=submit><input type=text>

On Safari and Chrome (and Firefox on non-macOS platforms), clicking the button,
then pressing tab, goes to the input on the right. In Firefox on macOS it
doesn't because the button doesn't gain focus nor is selectable.

Differential Revision: https://phabricator.services.mozilla.com/D108808
2021-03-17 22:34:55 +00:00
Florian Quèze 93ae28290a Bug 1698769 - browser_alt_keyup_in_content.js should not rely on the implicit 100ms initial timer from TestUtils.waitForCondition, r=smaug.
Differential Revision: https://phabricator.services.mozilla.com/D108615
2021-03-17 17:39:36 +00:00
Simon Giesecke b9621d6376 Bug 1695162 - Use range-based for instead of custom hashtable iterators. r=xpcom-reviewers,kmag
Differential Revision: https://phabricator.services.mozilla.com/D108585
2021-03-17 15:49:46 +00:00
Kartikaya Gupta 7f6293bb4f Bug 1698439 - Replace calls to flushApzRepaints with promise equivalent. r=tnikkel
These tests are too annoying to restructure completely, so I'm just
doing a local inlining of the function here.

Depends on D108438

Differential Revision: https://phabricator.services.mozilla.com/D108439
2021-03-16 00:02:20 +00:00
Makoto Kato 605d5484aa Bug 1692052 - Don't notify IMEContext of widget when IMEStateManger doesn't manage this content. r=masayuki
This test case doesn't generate body element and isn't general case. Actually
since we don't manage current IME focus on IMEStateManager, we shouldn't notify
IMEContext of widget.

Differential Revision: https://phabricator.services.mozilla.com/D108366
2021-03-15 09:31:58 +00:00
Simon Giesecke c153cfe233 Bug 1674080 - Add some required includes to the bindings generator. r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D95147
2021-03-11 13:38:31 +00:00
Jonathan Kew ceb44d34d6 Bug 1664730 - Disable async font fallback when running mochitests, to avoid unpredictable extra reflows that can disrupt event-/timing-sensitive tests. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D107284
2021-03-10 12:26:52 +00:00
Simon Giesecke ad01a10a3b Bug 1634281 - Use nsTHashMap instead of nsDataHashtable. r=xpcom-reviewers,necko-reviewers,jgilbert,nika,valentin
Note that this patch only transforms the use of the nsDataHashtable type alias
to a directly equivalent use of nsTHashMap. It does not change the specification
of the hash key type to make use of the key class deduction that nsTHashMap
allows for in some cases. That can be done in a separate step, but requires more
attention.

Differential Revision: https://phabricator.services.mozilla.com/D106008
2021-03-10 10:47:47 +00:00
Masayuki Nakano 468bffc558 Bug 1429523 - Make IMEContentObserver ignore character data change notifications of invisible data nodes r=smaug
E.g., comment node is an invisible data node, and it's not handled by
`HTMLEditor` nor `ContentEventHandler`.  Therefore, `IMEContentObserver`
should ignore invisible data nodes, which are not derived from `dom::Text`.

Differential Revision: https://phabricator.services.mozilla.com/D107590
2021-03-09 23:57:56 +00:00
Simon Giesecke bc9766c354 Bug 1634281 - Use nsTHashMap for nsBaseHashtable/nsDataHashtable uses with RefPtr data type. r=xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D105963
2021-03-09 11:39:36 +00:00
Emilio Cobos Álvarez f36c63a891 Bug 1684001 - Add a pref-based blocklist to control default deltaMode. r=masayuki
Depends on D107456

Differential Revision: https://phabricator.services.mozilla.com/D107457
2021-03-09 01:59:43 +00:00
Emilio Cobos Álvarez 94b828fd9f Bug 1675949 - Keep rounding to integer sizes. a=orange
CSSIntSize::FromAppUnits actually doesn't return a CSSIntSize, it
returns a CSSSize.

MANUAL PUSH: Rounding orange on win/macos on a CLOSED TREE.
2021-03-08 02:34:36 +01:00
Emilio Cobos Álvarez 757f7268c6 Bug 1675949 - Use a non-fixed value for pixel deltas. r=masayuki
Your call if you think this is worth it. Might need some test
adjustments.

Differential Revision: https://phabricator.services.mozilla.com/D107199
2021-03-08 00:24:04 +00:00
Kagami Sascha Rosylight a2323b59a0 Bug 1691515 - Add MOZ_KNOWN_LIVE member annotation r=andi
Differential Revision: https://phabricator.services.mozilla.com/D107321
2021-03-05 23:23:03 +00:00
Alexandru Michis 4cff4186cb Backed out changeset 2d9ef4afb05d (bug 1675949) for causing mochitest plain failures in test_dom_wheel_event.html
CLOSED TREE
2021-03-05 05:51:36 +02:00
Emilio Cobos Álvarez e1a48f33c9 Bug 1675949 - Use a non-fixed value for pixel deltas. r=masayuki
Your call if you think this is worth it. Might need some test
adjustments.

Differential Revision: https://phabricator.services.mozilla.com/D107199
2021-03-05 02:28:21 +00:00
Kagami Sascha Rosylight a9417a719e Bug 1360715 - Part 2: Modify instanceofs in tests to non-cross-context r=edgar
Differential Revision: https://phabricator.services.mozilla.com/D106662
2021-03-04 22:03:57 +00:00
Brindusan Cristian b926d96be6 Backed out 3 changesets (bug 1360715) for mochitest failures at test_WebCrypto.html. CLOSED TREE
Backed out changeset b4a14c42313d (bug 1360715)
Backed out changeset 0e4b1b65fcbe (bug 1360715)
Backed out changeset fb8b9841d82b (bug 1360715)
2021-03-04 21:15:16 +02:00
Kagami Sascha Rosylight 73ec445d30 Bug 1360715 - Part 2: Modify instanceofs in tests to non-cross-context r=edgar
Differential Revision: https://phabricator.services.mozilla.com/D106662
2021-03-04 15:05:26 +00:00
Simon Giesecke c6ace2f153 Bug 1673931 - Avoid including BindingDeclarations.h from header files. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D97612
2021-03-04 14:32:14 +00:00
Butkovits Atila 4a2aa0080e Merge mozilla-central to autoland. CLOSED TREE 2021-03-04 00:23:06 +02:00
Andreea Pavel 002023eb26 Merge autoland to mozilla-central a=merge 2021-03-03 23:49:23 +02:00
Micah Tigley 99ac1f352b Bug 1695402 - Support image-set() on the cursor property. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D106745
2021-03-03 18:34:46 +00:00
Csoregi Natalia de702c9eb1 Backed out changeset 78567f53575e (bug 1695402) for failures on test_css-properties-db.js. CLOSED TREE 2021-03-03 19:54:08 +02:00
Micah Tigley dee15c3162 Bug 1695402 - Support image-set() on the cursor property. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D106745
2021-03-03 16:34:39 +00:00