The idea with this patch is that style code will first call
InlineStyleDeclarationWillChange before style declaration has changed, and SetInlineStyleDeclaration once it has changed.
In order to be able to report old attribute value, InlineStyleDeclarationWillChange reads the value and also calls AttributeWillChange (so that DOMMutationObserser can grab the old value). Later SetInlineStyleDeclaration passes the old value to
SetAttrAndNotify so that mutation events and attributeChanged callbacks are handled correctly.
Because of performance, declaration can't be cloned for reading the old value. And that is why the recently-added callback is used to detect when declaration is about to change (bug 1466963 and followup bug 1468665).
To keep the expected existing behavior, even if declaration isn't changed, but just a new declaration was created (since there wasn't any), we need to still run all these
willchange/set calls. That is when the code has 'if (created)' checks.
Since there are several declaration implementation and only nsDOMCSSAttributeDeclaration needs the about-to-change callback, GetPropertyChangeClosure is the one to initialize the callback closure, and the struct which is then passes as data to the closure.
Apparently we lost mutation event testing on style attribute when the pref was added, so test_style_attr_listener.html is modified to test both pref values.
--HG--
extra : rebase_source : 9e605d43f22e650ac3912fbfb41abb8d5a2a0c8f
Now uses StaticPrefs instead of DOMPrefs, and how we count dispatches for Workers.
MozReview-Commit-ID: DTumwcI5bG
--HG--
extra : rebase_source : 0cf5312e714fb260c01df647b2cd1fcc28ffc415
Generalizes NetworkActivity so it can be used for sockets but also disk files.
The host/port data becomes a single location string prefixed with socket://
or file:// and we're not using the FD as the identifier anymore.
IOActivityMonitor is now used in three places:
- nsFileStreams for plain files
- TelemetryVFS for sqlite files
- nsSocketTransport & nsUDPSocket for UDP & TCP sockets
MozReview-Commit-ID: GNu5o400PaV
--HG--
rename : netwerk/base/NetworkActivityMonitor.cpp => netwerk/base/IOActivityMonitor.cpp
rename : netwerk/base/NetworkActivityMonitor.h => netwerk/base/IOActivityMonitor.h
rename : netwerk/base/nsINetworkActivityData.idl => netwerk/base/nsIIOActivityData.idl
extra : rebase_source : 55a1c51b261ffbe16f88671d55445d1b0d9106b6
Disable NetworkGeolocationProvider.js request cache for test cases that change the geo.wifi.uri. The cache does not remember from which location service the cached request came from and we expect different results when we change the provider URL (geo.wifi.uri).
MozReview-Commit-ID: 7SbhBOkek4H
--HG--
extra : rebase_source : 2ce410953eaa76e259472397163c304621449a61
extra : source : 058acdfc4d995120d0d2ed34c60b6151ce670d63
We expose the relevant APIs on textarea and input elements anyway
(chromeonly). The QIs will throw on a non-input or non-textarea element, but
none of these consumers expect that to happen.
These tests ensures the feature interacts well with our setup in XUL.
They work when bug 1460815 was implemented so they sits in its own changeset.
MozReview-Commit-ID: Ia08tAewZyN
--HG--
extra : rebase_source : b7ee577efc5cb5cc573cb07df2cfeeb0a9c88699
extra : source : c142c5c69a04c86f192526f8324a0278cbb721ba
nsContentUtils::NS_NewXULOrHTMLElement will call into
CustomElementRegisty::RegisterCallbackUpgradeElement, which keeps
the newly created element, allowing RunCustomElementCreationCallback
to upgrade them after the callback runs.
It is unclear if this changes the order of constructor executions,
but even so it should not affact our use case.
MozReview-Commit-ID: LWTn7B35aBv
--HG--
extra : rebase_source : 15382431f34dd887c14142ff47337e8d1eec74ef
extra : source : 47058a61951c2974514e41e316e5370cfa4f9d8b
This would help in the case where it is safe to run script in-place and
the CustomElementDefinition is available before the function exits.
This fixes the tests changed.
MozReview-Commit-ID: Ays91W94WZm
--HG--
extra : rebase_source : 6b0f1f90de9a6bfd7db577f1fb0e76564c3627e7
extra : source : 47c62a1e2f268e1be24c3fddfc006c3ad45ba4ac
Nodes copied from DOMParser document fragment would need to be
created with the proper custom element data.
CustomElementRegistry::IsCustomElementEnabled() is changed to allow
it to run in the test document.
MozReview-Commit-ID: 4GACDR8FIc7
--HG--
extra : rebase_source : 39da41dd1ca56bf62043418c503c526e2895254f
This patch enables us to specify a custom element type with |is| attribute
or property when creating a XUL element. Because non-dashed names are valid
custom element names in XUL (bug 1446247), other checks has to modified
accordingly.
The checks I am settling with are
1) Forbids the custom built-in element names to be a non-dashed name.
2) Forbids the custom built-in element to extend a dashed built-in element name.
This also ensures the custom built-in element types don't take on the same
name as the element name it extends.
MozReview-Commit-ID: GCQ9RnfvvrC
--HG--
extra : rebase_source : 2fa13742525d2107580d50872ff5b0fc42539498
extra : source : 2dc5513660d78a4de4801109140743ffc9297f71
This patch creates a chrome-only method
customElements.setElementCreationCallback() so that custom elements migrated
from XBL bindings doesn't have to be define()'d on document loading. With this
method, we will set callbacks and the platform will get back to us when it
encounters a matched custom element type -- and the callback will load the
relevant script.
It's important to note that the callback runs after construction of the first
element; it will be upgraded when it's being appended.
MozReview-Commit-ID: 80z72zwXRlf
--HG--
extra : rebase_source : 826188e56bb0b167d1e5bafb7d2a487a32bd9dfa
I can land the removal behind a pref first if you want and all that instead.
Again, this doesn't remove the internal usage for getComputedStyle (yet).
MozReview-Commit-ID: LA157ohfLhu
This also removes any redundant Ci.nsISupports elements in the interface
lists.
This was done using the following script:
acecb401b7/processors/chromeutils-generateQI.jsm
MozReview-Commit-ID: AIx10P8GpZY
--HG--
extra : rebase_source : a29c07530586dc18ba040f19215475ac20fcfb3b
Test changes for removal of PopupBoxObject and popup.xml methods, some reflow tests now have different stacks now that they are not going through popup.xml binding methods, test_popupanchor.xul changes due to need to wait for popuppositioned event after resizing. The old code would just adjust the arrow directly when sizeTo was called, but the new code does this through an asynchronous popuppositioned event. Changes to some places that check for XULElement class.
--HG--
rename : dom/webidl/PopupBoxObject.webidl => dom/webidl/XULPopupElement.webidl
rename : layout/xul/PopupBoxObject.cpp => dom/xul/XULPopupElement.cpp
rename : layout/xul/PopupBoxObject.h => dom/xul/XULPopupElement.h
PerformanceCounters are currently disabled in two ways:
- a preference that's off by default "dom.performance.enable_scheduler_timing"
- calls made only for nightly using #ifndef RELEASE_OR_BETA
In order to simplify the code, let's remove the #ifndef and rely only on the pref.
That will also allows us to use the feature in every version going forward.
The performance will not be impacted since the current code is already using
the (cached) pref value to determine if the counters are used.
MozReview-Commit-ID: 47t2M1O13aH
--HG--
extra : rebase_source : e129e1829f1dc37c019e50e156474c4876d6d6cb
The old name no longer makes sense, since it no longer exports an spawn_task
symbol, and add_task is what we really care about.
MozReview-Commit-ID: IE7B8Czv8DH
--HG--
rename : testing/mochitest/tests/SimpleTest/SpawnTask.js => testing/mochitest/tests/SimpleTest/AddTask.js
extra : rebase_source : 03bca5aa69a7625a49b4455a6c96ce4c59de3a5a
This will make it possible to migrate existing bindings without also needing to
mass-rewrite frontend code at the same time.
MozReview-Commit-ID: IBBqC4eeDDX
--HG--
extra : rebase_source : e901ac665208b3a683668c1bb33a26dcf479580c
postMessage doesn't really have different origins for file: URIs;
to send to them you need "*", and `location.origin` is null. So
testing jar:file separately doesn't seem to make much sense, so
let's just remove the test now that jar: will only really be
usable with a local/file inner URI.
MozReview-Commit-ID: 7vvlrugi3xv
--HG--
extra : rebase_source : 3b31b817da3922c30691654ae49ab3c9130e6b36
postMessage doesn't really have different origins for file: URIs;
to send to them you need "*", and `location.origin` is null. So
testing jar:file separately doesn't seem to make much sense, so
let's just remove the test now that jar: will only really be
usable with a local/file inner URI.
MozReview-Commit-ID: 7vvlrugi3xv
--HG--
extra : rebase_source : cfa701fd5fa03bf8d03a2bd773ec908a26020944
Chromeutils.RequestPerformanceMetrics() is now composed of two parts:
- calls content processes via IPDL to get their counters
- directly dispatch counters from the parent process
MozReview-Commit-ID: HlgcEOzkyAq
--HG--
extra : rebase_source : 60e81a27cd3a1bf1378e6b977529964507633b63
This will make it possible to migrate existing bindings without also needing to
mass-rewrite frontend code at the same time.
MozReview-Commit-ID: IBBqC4eeDDX
--HG--
extra : rebase_source : e901ac665208b3a683668c1bb33a26dcf479580c
This allows custom elements to work in any document in the parent process that
allows XUL and XBL. The test takes the easy option of moving the existing XUL
custom element test to a run with the custom element pref disabled.
MozReview-Commit-ID: CMiLzmp60jA
--HG--
extra : rebase_source : 735688061116c633b816f4f9d488712408df11a5
extra : source : 794ee6857d83dfe0b18629c12e96a622fc899586
This allows custom elements to work in any document in the parent process that
allows XUL and XBL. The test takes the easy option of moving the existing XUL
custom element test to a run with the custom element pref disabled.
MozReview-Commit-ID: CMiLzmp60jA
--HG--
extra : rebase_source : b9632de82cf79c1df15be09fadf1d25817c8a894
extra : amend_source : 235a76453d1d6782903d5051ee8e234b965dcc36
Adds the IPDL layer to asynchronously retrieve in the parent process the performance counters.
MozReview-Commit-ID: RbKstNx8pi
--HG--
extra : rebase_source : d7c00f2ef16623dbbd88ede0f6636ca56501e151
Adds the IPDL layer to asynchronously retrieve in the parent process the performance counters.
MozReview-Commit-ID: RbKstNx8pi
--HG--
extra : rebase_source : f81058b9bdd67c2f77bb5cd45d3838bc12f406ea
This isn't needed since Console is an interface and not an object
MozReview-Commit-ID: ZoIo2TS9QL
--HG--
extra : rebase_source : 7ccb86dd4290e5d7ac829cab6dcf2f9548d89f11
For FF59, we disabled WebVR for macOS before allowing it to ride the trains to release. Softvision was unable to verify for QA due to challenges getting a working hardware configuration for macOS VR at SoftVision.
We have since gained approval from the Firefox Release Team to re-enable WebVR for macOS in release for FF60.
Essentially, we need to reverse the changes in bug 1426500 and uplift to FF59/Beta before the next cycle.
--HG--
extra : rebase_source : 1b0c68b130f869f0e71cf2d93db92bb78dddc79b
This is enough to get the stylo-enabled build green.
There's still some orange in WPT with stylo disabled (due to interfaces not
exposed and that) that I'll update tomorrow.
Will send a different patch on top of this for that, though I'll land together.
MozReview-Commit-ID: CsN5CM93RUz
This patch disables device sensors except orientation by default.
It implements per-sensor prefs to disable orientation, motion, proximity and ambient light
selectively. The patch also makes the pref checks happen at runtime (versus on process
start) using Preferences::AddBoolVarCache.
The patch also removes the related Event constructors also.
MozReview-Commit-ID: EA8ARjjtlkF
--HG--
rename : dom/events/test/test_bug742376.html => dom/events/test/test_deviceSensor.html
rename : dom/events/test/test_eventctors.html => dom/events/test/test_disabled_events.html
rename : dom/events/test/test_eventctors.html => dom/events/test/test_eventctors_sensors.html
extra : rebase_source : 39da98ac9226ac727f5197d28561b0b762da06f4
Note that this patch also replaces legacy VK_* with KEY_*, and replaces
synthesizeKey() for inputting some characters with sendString() because
it's better and clearer what it does and it sets shiftKey state properly.
MozReview-Commit-ID: De4enbjux3T
--HG--
extra : rebase_source : 2296b84bff8e22f01eeb48cd8614fac5db11136a
Now, callers of EventUtils.synthesizeKey() don't need to specify
KeyboardEvent.code value anymore if they assume that active keyboard layout
is US keyboard layout.
Note that this patch changes the meaning of only test_bug551434.html.
Some callers in it don't match the key value and code value but that looks
like that they don't checking such odd keyboard events. So, they must be
bug of the test.
MozReview-Commit-ID: Itxo7yZ9rkK
--HG--
extra : rebase_source : 856ef3715c924ca16e993ea57d92d1243b5cc6be
In our current implementation for media query stuff, it's possible to change
media features inside the callback for media query list events and the events
are dispatched at an early stage in flush pending styles. Whereas at a later
stage in flush pending styles, we don't allow pending media feature changes.
According to the spec [1], the media query list events have to be dispatched
in a different place from flush pending styles. We have to move the event
handling someday, but as for test_contentViewer_overrideDPPX.html, we don't
need to change media features inside the callbacks (precisely it has done
inside a Promise for the callbacks), so we add setTimeout call to make sure
the media feature changes are processed after the flush pending styles.
[1] https://html.spec.whatwg.org/multipage/webappapis.html#processing-model-8
MozReview-Commit-ID: 5VoQJ1uGUwD
--HG--
extra : rebase_source : 47443f7dc00aa62a35f570796eeec547526d8142
There are a few different reasons why tests needed updating (not an exhaustive list):
- Tests assume that successive operations take place at different times.
- Tests assume that an operation took a minimum amount of time.
- Tests hardcodes a specific delay.
In most cases we hardcode the preference off. In some cases this is the best approach,
in others, we would like to improve. The bug for tracking those improvements is Bug 1429648
An improvement that is present in some tests is to hardcode a specific precision reduction
that is acceptable based on the confides of the test. (Obviously this needs to be a fix for
the test framework and not a requirement on the feature being tested.)
In a few places, the test itself can be fixed, for example to no longer require the end
time of an operation to be strictly greater than the start time, and allows it to be equal
to it.
MozReview-Commit-ID: J59c7xQtZZJ
--HG--
extra : rebase_source : df8a03e76eaf9cdc9524dbb3eb9035af237e534b
This patch was autogenerated by my decomponents.py
It covers almost every file with the extension js, jsm, html, py,
xhtml, or xul.
It removes blank lines after removed lines, when the removed lines are
preceded by either blank lines or the start of a new block. The "start
of a new block" is defined fairly hackily: either the line starts with
//, ends with */, ends with {, <![CDATA[, """ or '''. The first two
cover comments, the third one covers JS, the fourth covers JS embedded
in XUL, and the final two cover JS embedded in Python. This also
applies if the removed line was the first line of the file.
It covers the pattern matching cases like "var {classes: Cc,
interfaces: Ci, utils: Cu, results: Cr} = Components;". It'll remove
the entire thing if they are all either Ci, Cr, Cc or Cu, or it will
remove the appropriate ones and leave the residue behind. If there's
only one behind, then it will turn it into a normal, non-pattern
matching variable definition. (For instance, "const { classes: Cc,
Constructor: CC, interfaces: Ci, utils: Cu } = Components" becomes
"const CC = Components.Constructor".)
MozReview-Commit-ID: DeSHcClQ7cG
--HG--
extra : rebase_source : d9c41878036c1ef7766ef5e91a7005025bc1d72b
This was done using the following script:
37e3803c7a/processors/chromeutils-import.jsm
MozReview-Commit-ID: 1Nc3XDu0wGl
--HG--
extra : source : 12fc4dee861c812fd2bd032c63ef17af61800c70
extra : intermediate-source : 34c999fa006bffe8705cf50c54708aa21a962e62
extra : histedit_source : b2be2c5e5d226e6c347312456a6ae339c1e634b0
This was done using the following script:
37e3803c7a/processors/chromeutils-import.jsm
MozReview-Commit-ID: 1Nc3XDu0wGl
--HG--
extra : source : 12fc4dee861c812fd2bd032c63ef17af61800c70
This was done using the following script:
37e3803c7a/processors/chromeutils-import.jsm
MozReview-Commit-ID: 1Nc3XDu0wGl
--HG--
extra : rebase_source : c004a023389f1f6bf3d2f3efe93c13d423b23ccd
Embarassingly, when Bug 1432542 enabled WebAuthn to ride the trains, I neglected
to adjust test_interfaces, prompting this bug.
So... oops-fix!
MozReview-Commit-ID: 62Q0gA5KoBC
--HG--
extra : rebase_source : d072d9390c864ce1e23e0a4823f7c32dd4c39a3e
The big data tables had the following search-and-replaces done on them:
name: "\([^"]+\)" -> name: "\1", insecureContext: true
"\([^"]+\)",$ -> {name: "\1", insecureContext: true},
followed by removal of both isSecureContext and insecureContext annotations
where both appeared.
MozReview-Commit-ID: BkqAwXFf48x
The spec changed in order to align with the error thrown by importNode.
--HG--
rename : dom/tests/mochitest/webcomponents/test_bug1176757.html => dom/tests/mochitest/webcomponents/test_shadowroot_clonenode.html
* * *
Bug 1428745 - Remove support for version parameter from script loader - fixing a broken depending test - CLOSED TREE, r=me
* * *
Bug 1428745 - Remove support for version parameter from script loader - fixing WPTs - CLOSED TREE, r=me
* * *
Bug 1428745 - Remove support for version parameter from script loader - fixing tests - CLOSED TREE, r=me
Most of the Shadow DOM related code are behind "dom.webcomponents.enabled" and
this pref is only used by Shadow DOM right now, so we should rename it to
"dom.webcomponents.shadowdom.enabled"
MozReview-Commit-ID: er1c7AsSSW
This patch includes:
1. Introduce PerformanceServerTiming.webidl.
2. Add serverTiming in PerformanceResourceTiming.webidl.
3. Get serverTiming data from nsITimedChannel and keep it in PerformanceTimng class.
4. Add PerformanceServerTiming to test_interfaces.js.
Now, we use the CSS parser, instead of SVG parser, so we also need to
update the tests of DOMMatrix, i.e. we don't support unitless tranform
list on CSS parser.
MozReview-Commit-ID: 86F992rIa4J
--HG--
extra : rebase_source : 0f3b529b605ab765ea9c10c93cfb09f09234e7c3
Attribute changed callback now is fired only when the attribute is in observedAttributes list
which is introduced in latest spec, so in this patch, we change the tests for attribute changed
callback to use customElements.define() to register customElements definition instead.
MozReview-Commit-ID: 2s1qj3UsFUS
--HG--
rename : dom/tests/mochitest/webcomponents/test_document_register_lifecycle.html => dom/tests/mochitest/webcomponents/test_custom_element_lifecycle.html
rename : dom/tests/mochitest/webcomponents/test_document_register_stack.html => dom/tests/mochitest/webcomponents/test_custom_element_stack.html
extra : rebase_source : f37c52c8c6ffa80439692d4ba6a8b1a6888e20f2
Previously this was safe, as the synthesized mouse event would be processed in
the child process, updating the focus state, in order - before the content
process would try to check its focus state. Now, thanks to multiple event queues
work, this isn't guaranteed.
This patch just adds retrying to the logic, so we retry up to 10 times, 100ms
apart. This should ensure that we don't incorrectly detect a test failure
intermittently.
MozReview-Commit-ID: J4uzl9jeafC
CustomElements feature now is only controlled by dom.webcomponents.customelements.enabled pref.
MozReview-Commit-ID: G6hdIAsSeX7
--HG--
extra : rebase_source : 064349a0319e445e4bcd6bfbdcd69b7085c347b6
Turns out that the patches in bug 1398448 fixed most of the layout stuff.
There's a GeckoRestyleManager assertion in test_shadowroot_style.html about
document mismatches while restyling, which looks scary, but I haven't
investigated (nor plan to, since that code is hopefully going away soon).
MozReview-Commit-ID: 4km5NCr5xp2
--HG--
extra : rebase_source : 32eef715d6509f25449edb967dee8ac6f18c5f84