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

98907 Коммитов

Автор SHA1 Сообщение Дата
Masayuki Nakano 9ede86a56a Bug 1541915 - part 2: Make `test_scroll_per_page.html` never timed out r=smaug
It waits a `scroll` event after synthesizing `PageDown` or `PageUp` key event
and it causes intermittent timeout if unexpected cases occurred randomly.
Therefore, we've not have enough hint to fix the existing intermittent timeout.

For making this bug forward, it should stop waiting a `scroll` event with a
`Promise`.  Instead, it should check whether a `scroll` event fired or not
with a few times retry.

Differential Revision: https://phabricator.services.mozilla.com/D103014
2021-02-02 03:05:07 +00:00
Masayuki Nakano fef8b70479 Bug 1541915 - part 1: Move scroll position tests from `layout/base/tests` to `dom/events/test` and disable async font loading in `dom/events/test` r=smaug,jfkthame
Asynchronous font loading occurs during scroll position tests, it resets
scroll positions to 0.  So, this causes intermittent failures in such tests.
Disabling the async font loading under `layout/base/tests` may not be proper
solution because some layout tests may work perfectly even if global reflow
may occur.

Therefore, this patch moves 2 tests which check scroll position to under
`dom/events/test` and disabling the async font loading since the global reflow
shouldn't be related to the tests under `dom/events`.

Differential Revision: https://phabricator.services.mozilla.com/D103013
2021-02-02 03:05:04 +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
Masayuki Nakano cb448c5095 Bug 1685491 - part.1: Map typical commands to synthesized keyboard events for test on Linux and macOS r=smaug,remote-protocol-reviewers
Currently, we don't allow keyboard events synthesized for tests retrieve native
key bindings in content process.  However, due to this, we cannot test keyboard
navigation, deleting per word, etc on Linux and macOS either with mochitest
or WPT.  For making better compatibility with the other browsers, we should
write WPT more with the test driver.  Therefore, we should allow keyboard
events synthesized for tests retrieve native key bindings.

On the other hand, if we make them retrieve customized keyboard shortcuts
in the environment, some developers may not be able to run tests locally without
resetting their customization.  Therefore, this patch makes `NativeKeyBindings`
set "standard" shortcut keys on the platform instead of retrieving actual
shortcut key results.

If referring the default shortcut key bindings is not good thing for
WebDriver/CDP, perhaps, `TextInputProcessor` should have a new flag which can
refer customized shortcut keys even in content process.  But I think that it
should be done in another bug because some edit commands are mapped forcibly
like this patch.
https://searchfox.org/mozilla-central/rev/c03e8de87cdb0ce0378c0886d3c0ce8bbf9dc44e/remote/domains/parent/Input.jsm#82-102

Differential Revision: https://phabricator.services.mozilla.com/D102877
2021-02-02 03:02:30 +00:00
Andreea Pavel 44363cdd0e Bug 1683016 - disable browser_remove_controllable_media_for_active_controller.js on linux 64 not asan r=intermittent-reviewers,jmaher DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D103721
2021-02-01 23:29:31 +00:00
Kartikaya Gupta f1852fa271 Bug 1688475 - Remove usage of waitForApzFlushedRepaints from test_bug500885.html. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D103123
2021-02-01 23:48:34 +00:00
Kartikaya Gupta b8be8cf94d Bug 1688475 - Robustify test_bug946632.html against some intermittent failures. r=botond
The sendWheelAndPaint call returns before it's done all its work. The way
this test uses the function, it can advance onto the next testcase before
the previous sendWheelAndPaint is done and the callback is invoked. This
can cause one testcase to pollute the next one which seems inadvisable.
Waiting for the sendWheelAndPaint callback to be triggered ensures that
all the work sendWheelAndPaint is going to do gets completed before the
next testcase is processed.

Differential Revision: https://phabricator.services.mozilla.com/D103122
2021-02-01 23:44:56 +00:00
Kartikaya Gupta c90dbb6eee Bug 1688475 - Remove usage of waitForApzFlushedRepaints from test_bug946632.html. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D103121
2021-02-01 23:42:52 +00:00
Kartikaya Gupta a047004d0d Bug 1688475 - Trivial replacement of some waitForApzFlushedRepaints callers. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D103117
2021-01-31 17:37:56 +00:00
Emilio Cobos Álvarez a503e68a03 Bug 1637651 - Don't skip over empty value in link header parsing. r=smaug
With crossorigin, empty value and no value are two different things, so
the link header parser needs to handle it.

Without this change the updated test would fail with two entries rather
than one getting returned from:

  numberOfResourceTimingEntries("resources/dummy.css?link-header-crossorigin-preload2")

Differential Revision: https://phabricator.services.mozilla.com/D103570
2021-02-01 23:23:42 +00:00
Emilio Cobos Álvarez fe36177806 Bug 1637651 - Assume non-quirks mode for style Link header preloads. r=smaug
This is an issue I found while going through this code and
writing/debugging a test for the bug at hand. Without this, the test in
the actual fix for this bug will fail to actually reuse the preloaded
stylesheet.

It seems reasonable to assume that the intersection of quirks mode
documents using link preload headers is small (and in that case we'd
parse the sheet twice, but oh well).

Differential Revision: https://phabricator.services.mozilla.com/D103567
2021-02-01 23:23:50 +00:00
Randell Jesup 140a416459 Bug 1673617 - Create BrowsingContext::mChildSessionHistory more aggressively, r=nika
Differential Revision: https://phabricator.services.mozilla.com/D100348
2021-02-01 22:57:12 +00:00
Bryce Seager van Dyk 87d30338ce Bug 1685099 - Don't reinit TrackBuffersManager on repeat video init data. r=alwu
This updates the repeat init data detection code in TrackBuffersManager to also
detect repeat video init data. This will also detect cases where the init
segment contains repeat video and audio init data if both the audio and video
are the same as the previous init data.

Differential Revision: https://phabricator.services.mozilla.com/D103174
2021-01-29 20:28:29 +00:00
Bryce Seager van Dyk 4e55af3a39 Bug 1685099 - Refactor TrackBuffersManager repeat init data check into a method. r=alwu
This should be a strict refactor (no functional changes), but makes the
boundaries of the code doing the repeat check more clear. This code will be
updated in a following patch.

Differential Revision: https://phabricator.services.mozilla.com/D103173
2021-01-29 21:07:27 +00:00
Butkovits Atila cc5cb272ff Backed out 2 changesets (bug 1685677) for causing xpcshell failure. CLOSED TREE
Backed out changeset 26e9adf102c8 (bug 1685677)
Backed out changeset ed3a62552625 (bug 1685677)
2021-02-01 22:54:39 +02:00
Simon Giesecke 3086414ac3 Bug 1685677 - Harmonize LockedGetOriginInfosExceedingGroupLimit and LockedGetOriginInfosExceedingGlobalLimit. r=dom-workers-and-storage-reviewers,janv
Instead of inserting all elements into OriginInfo array, and then removing
or skipping irrelevant entries, only insert the relevant ones in the first
place, using a new utility function template MaybeAppendOriginInfos.

Sort them by in least-recently used order according to the access timestamp.

Iterate over them to identify the threshold.

Finally, truncate the array to the threshold position.

Differential Revision: https://phabricator.services.mozilla.com/D101146
2021-02-01 14:42:12 +00:00
Simon Giesecke f78d2e7d7e Bug 1685677 - Extract functions from CheckTemporaryStorageLimits and rename it to CleanupTemporaryStorage. r=dom-workers-and-storage-reviewers,janv
Extracts parts of CheckTemporaryStorageLimits into the following new private
member functions of QuotaManager:
* LockedGetOriginInfosExceedingGroupLimit
* LockedGetOriginInfosExceedingGlobalLimit
* GetOriginInfosExceedingLimits
* ClearOrigins

Differential Revision: https://phabricator.services.mozilla.com/D101145
2021-02-01 14:42:15 +00:00
Tom Ritter 9ee7ae5669 Bug 1687891: Add Telemetry for an invalid principal being received from a Fission process r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D102906
2021-02-01 15:32:03 +00:00
Emilio Cobos Álvarez 435f9af544 Bug 1689853 - Cleanup browser_multiple_popups.js. r=edgar
This will make easier to add more tests in the future.

Differential Revision: https://phabricator.services.mozilla.com/D103572
2021-02-01 14:41:40 +00:00
smolnar 0fc1e1e521 Backed out 4 changesets (bug 1685677) for causing xpcshell failures in test_storagePressure. CLOSED TREE
Backed out changeset 263d593f8609 (bug 1685677)
Backed out changeset 81a737afce4f (bug 1685677)
Backed out changeset ea958694bd17 (bug 1685677)
Backed out changeset 121e93b3787f (bug 1685677)
2021-02-01 16:38:01 +02:00
Emilio Cobos Álvarez cb38bec4d1 Bug 1689853 - Fake a user interaction when handling LOAD_FLAGS_ALLOW_POPUPS. r=edgar
I'll simplify all the popup-blocking setup in a follow-up, but this is
the low-risk change.

Need to add a test for this of course. Kinda baffled we did not have
any.

Differential Revision: https://phabricator.services.mozilla.com/D103571
2021-02-01 14:17:55 +00:00
Simon Giesecke b46dca3235 Bug 1685677 - Reduce scope of variables only used within an if statement. r=jstutte
Differential Revision: https://phabricator.services.mozilla.com/D101181
2021-02-01 13:37:53 +00:00
Simon Giesecke b9443d148e Bug 1685677 - Don't unnecessarily materialize a flattened array of OriginInfo*. r=dom-workers-and-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D101151
2021-02-01 13:37:45 +00:00
Simon Giesecke 991f534d51 Bug 1685677 - Harmonize LockedGetOriginInfosExceedingGroupLimit and LockedGetOriginInfosExceedingGlobalLimit. r=dom-workers-and-storage-reviewers,janv
Instead of inserting all elements into OriginInfo array, and then removing
or skipping irrelevant entries, only insert the relevant ones in the first
place, using a new utility function template MaybeAppendOriginInfos.

Sort them by in least-recently used order according to the access timestamp.

Iterate over them to identify the threshold.

Finally, truncate the array to the threshold position.

Differential Revision: https://phabricator.services.mozilla.com/D101146
2021-02-01 13:37:38 +00:00
Simon Giesecke 1134a78170 Bug 1685677 - Extract functions from CheckTemporaryStorageLimits and rename it to CleanupTemporaryStorage. r=dom-workers-and-storage-reviewers,janv
Extracts parts of CheckTemporaryStorageLimits into the following new private
member functions of QuotaManager:
* LockedGetOriginInfosExceedingGroupLimit
* LockedGetOriginInfosExceedingGlobalLimit
* GetOriginInfosExceedingLimits
* ClearOrigins

Differential Revision: https://phabricator.services.mozilla.com/D101145
2021-02-01 13:37:30 +00:00
dluca dd05c52966 Backed out 2 changesets (bug 1689853) for Browser-chrome crash in [@ mozilla::(anonymous namespace)::RunWatchdog(void*)]. CLOSED TREE
Backed out changeset f37f0997d677 (bug 1689853)
Backed out changeset 16c796643d52 (bug 1689853)
2021-02-01 15:18:08 +02:00
Emilio Cobos Álvarez 32578965d5 Bug 1689853 - Cleanup browser_multiple_popups.js. r=edgar
This will make easier to add more tests in the future.

Differential Revision: https://phabricator.services.mozilla.com/D103572
2021-02-01 11:50:51 +00:00
Emilio Cobos Álvarez 36bf950113 Bug 1689853 - Fake a user interaction when handling LOAD_FLAGS_ALLOW_POPUPS. r=edgar
I'll simplify all the popup-blocking setup in a follow-up, but this is
the low-risk change.

Need to add a test for this of course. Kinda baffled we did not have
any.

Differential Revision: https://phabricator.services.mozilla.com/D103571
2021-02-01 10:15:15 +00:00
Simon Giesecke b94886b64c Bug 1682536 - Use NotNull with FileInfoEntry. r=dom-workers-and-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D99783
2021-02-01 10:46:44 +00:00
Simon Giesecke 357de2c905 Bug 1682536 - Use NotNull with FileInfo. r=dom-workers-and-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D99781
2021-02-01 10:46:37 +00:00
Simon Giesecke 79f07deece Bug 1682536 - Use references/NotNull for DirectoryLockImpl. r=dom-workers-and-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D99779
2021-02-01 10:46:29 +00:00
Emma Malysz 036272d9b2 Bug 1649611: Remove OS.File usage from DownloadIntegration.jsm and respect umask in IOUtils::SetPermissions r=barret
Depends on D103520

Differential Revision: https://phabricator.services.mozilla.com/D99729
2021-01-30 00:50:47 +00:00
Daisuke Akatsuka f172e68f63 Bug 1689275: Avoid notifying empty events. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D103268
2021-02-01 01:41:46 +00:00
Barret Rennie eebe62f30e Bug 1689740 - Check for nsIFile::GetParent() returning null in IOUtils r=emalysz
Differential Revision: https://phabricator.services.mozilla.com/D103520
2021-01-30 05:47:25 +00:00
Emilio Cobos Álvarez 0f3f2503ea Bug 1598613 - Remove some useless kNamespaceID_Nones in HTMLLinkElement. r=edgar
Just drive-by clean-up, no behavior change.

Differential Revision: https://phabricator.services.mozilla.com/D103562
2021-01-31 21:17:18 +00:00
Jan de Mooij 41621582c6 Bug 1674777 part 3 - Change Get*LengthAndData outparam from uint32_t to size_t. r=sfink,aosmond
Differential Revision: https://phabricator.services.mozilla.com/D103275
2021-01-31 08:35:40 +00:00
Jan de Mooij e6456075d7 Bug 1674777 part 1 - Change JS::NewArrayBuffer and JS_New*Array size argument from uint32_t to size_t. r=sfink
A later patch will add a jsapi-test for this.

Differential Revision: https://phabricator.services.mozilla.com/D103273
2021-01-28 15:53:44 +00:00
Emilio Cobos Álvarez 6168703191 Bug 1689854, bug 1689855 - Two more nnt fuzzy tweaks.
MANUAL PUSH: Unreviewed intermittent fix.
2021-01-31 09:04:03 +01:00
Jan de Mooij 8d290159a6 Bug 1688616 part 2 - Check for large ArrayBuffer{View}s in WebIDL bindings. r=edgar,lth
The dom::TypedArray type currently represents its length as uint32_t. Changing
that to size_t/uint64_t would cause problems (truncation) for many 'Length()' callers.
Instead of requiring a length check for each of those call sites, for now check for
and reject large array buffers and views in the generated bindings.

Code and tests are based on the implementation of the [AllowShared] attribute.
Additional tests for the new JSAPIs will be added as part of bug 1674777.

Differential Revision: https://phabricator.services.mozilla.com/D102912
2021-01-31 07:33:41 +00:00
Emilio Cobos Álvarez 4d3481a3a2 Bug 1689359 - Two more fuzzy annotation tweaks.
MANUAL PUSH: Orange fix
2021-01-31 03:16:52 +01:00
Butkovits Atila 80ba5dd933 Backed out 2 changesets (bug 1688616) for casing failures on test_large_arraybuffers.html. CLOSED TREE
Backed out changeset 560718ce8d2c (bug 1688616)
Backed out changeset 7985fd012bc7 (bug 1688616)
2021-01-30 18:10:09 +02:00
Jan de Mooij 2192481240 Bug 1688616 part 2 - Check for large ArrayBuffer{View}s in WebIDL bindings. r=edgar,lth
The dom::TypedArray type currently represents its length as uint32_t. Changing
that to size_t/uint64_t would cause problems (truncation) for many 'Length()' callers.
Instead of requiring a length check for each of those call sites, for now check for
and reject large array buffers and views in the generated bindings.

Code and tests are based on the implementation of the [AllowShared] attribute.
Additional tests for the new JSAPIs will be added as part of bug 1674777.

Depends on D102911

Differential Revision: https://phabricator.services.mozilla.com/D102912
2021-01-27 14:01:44 +00:00
Mats Palmgren f6ef0ea044 Bug 1683748 - Support Grid/Flex/Table/Column layout for the rendered legend of a fieldset. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D101555
2021-01-30 13:47:10 +00:00
Butkovits Atila ae40e11a24 Backed out changeset 4500122fa98d (bug 476384) as requested by Henri. CLOSED TREE 2021-01-30 11:36:07 +02:00
Butkovits Atila 254a9c3644 Backed out changeset 1acbaa0d067c (bug 1689541) as requested by Henri. CLOSED TREE 2021-01-30 11:35:29 +02:00
Barret Rennie 60d382943b Bug 1688711 - Don't write to empty JsBuffer when reading compressed files r=emalysz
Differential Revision: https://phabricator.services.mozilla.com/D103524
2021-01-30 00:33:21 +00:00
Narcis Beleuzu 37d1a797ce Backed out 2 changesets (bug 1689740, bug 1649611) for mochitest failures on test_ioutils_mkdir.html
Backed out changeset 91181a01b68c (bug 1649611)
Backed out changeset 4dd71fe08a0e (bug 1689740)
2021-01-30 02:47:37 +02:00
Ted Campbell f5fafb46ce Bug 1689734 - Further restrict ScriptPreloader use of CompileOptions. r=kmag,arai
The JS CompileOptions used to load cache entries must be consistent with
eachother to avoid subtle and serious bugs. This adds additional checks and
makes more consistent use of `FillCompileOptionsForCachedScript`.

This patch is a refactoring and should not change any behaviour.

Depends on D103515

Differential Revision: https://phabricator.services.mozilla.com/D103516
2021-01-29 22:54:59 +00:00
Ted Campbell a70f9b9fe5 Bug 1689734 - Cleanup lazy-source in nsFrameMessageManager if using ScriptPreloader. r=kmag
For consistency with other uses of the ScriptPreloader, we ensure we use lazy
script source when compiling for the cache. This generates full bytecode for
the cache but also avoids saving a copy of the source. If the frame script
were to call Function.prototype.toString, the existing source-hook would load
it in the same way as the JSM loader. In practice, we avoid relying on this
in our chrome code. If we will not be writing to the cache, we can instead
compile with the JS syntax parser, similar to what we do for JSM loader.

Differential Revision: https://phabricator.services.mozilla.com/D103515
2021-01-29 22:53:26 +00:00
Emma Malysz e13166a7b1 Bug 1649611: Remove OS.File usage from DownloadIntegration.jsm and respect umask in IOUtils::SetPermissions r=barret
Depends on D103520

Differential Revision: https://phabricator.services.mozilla.com/D99729
2021-01-29 22:56:54 +00:00