gecko-dev/dom
Olli Pettay abf54817b9 Bug 1428246 - The attributeChangedCallback is fired twice for the *first* style attribute change, r=peterv
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
2018-06-26 12:54:00 +03:00
..
abort
animation Bug 1469769 - Part 6: Replace non-failing NS_NOTREACHED with MOZ_ASSERT_UNREACHABLE. r=froydnj 2018-06-17 22:43:11 -07:00
asmjscache Bug 1465585: Switch from mozilla::Move to std::move. r=froydnj 2018-06-01 10:45:27 +02:00
audiochannel Bug 1458383 - Don't dispatch mediaBlockStop notification. r=baku 2018-05-09 16:22:40 +12:00
base Bug 1428246 - The attributeChangedCallback is fired twice for the *first* style attribute change, r=peterv 2018-06-26 12:54:00 +03:00
battery Backed out 8 changesets (bug 1453011, bug 1452981, bug 1146316) For xpcshell and mochitest failures on multiple files. CLOSED TREE 2018-04-20 21:40:24 +03:00
bindings Bug 1447951 - Store nsDynamicAtom's chars after the end of the object. r=froydnj 2018-06-22 09:38:42 +10:00
broadcastchannel Bug 1470578 - Rename the anti-tracking pref, r=francois 2018-06-25 22:46:13 +02:00
browser-element Bug 1466379 - fall back to currentURI in case images are blocked, r=bz,dao 2018-06-07 16:20:29 +01:00
cache Bug 1405428 - skip-if = verify on mochitests which do not pass test-verify. r=gbrown 2018-06-10 05:01:47 -04:00
canvas Backed out 2 changesets (bug 1349799) for build bustages on WebGLContext.cpp. CLOSED TREE 2018-06-26 04:21:08 +03:00
chrome-webidl Backed out 5 changesets (bug 1340498) for build bustages on SelectionChangeListener.h on a CLOSED TREE 2018-06-26 07:59:01 +03:00
clients Bug 1469941 Note DOMContentLoaded on the ClientSource and trigger service worker update in appropriate process. r=mrbkap 2018-06-23 10:11:47 -07:00
commandhandler Bug 1457813 - Part 2: Replace non-asserting NS_PRECONDITIONs with MOZ_ASSERTs. r=froydnj 2018-04-28 12:50:58 -07:00
console Bug 1469217 part 2 - Add APIs taking getter/setter objects instead of JSNatives. r=anba 2018-06-21 11:05:42 +02:00
credentialmanagement
crypto Bug 1455256 - Port more components to WorkerRef - part 3 - WebCrypto, r=asuth 2018-06-18 16:37:21 -04:00
encoding Bug 1461292 part 1 - Rename JSAutoCompartment to JSAutoRealm. r=bz,luke 2018-05-16 10:53:16 +02:00
events Bug 1469329, ensure mRetargetedTouchTargets has touch objects before using it, r=masayuki 2018-06-19 11:48:40 +03:00
fetch Bug 1469769 - Part 6: Replace non-failing NS_NOTREACHED with MOZ_ASSERT_UNREACHABLE. r=froydnj 2018-06-17 22:43:11 -07:00
file Bug 1469769 - Part 6: Replace non-failing NS_NOTREACHED with MOZ_ASSERT_UNREACHABLE. r=froydnj 2018-06-17 22:43:11 -07:00
filehandle Bug 1465585: Switch from mozilla::Move to std::move. r=froydnj 2018-06-01 10:45:27 +02:00
filesystem Bug 1453795 - DOM/Filesystem - Initialize member fields in classes/ structures. r=baku 2018-06-14 22:19:52 +03:00
flex Bug 1455676 part 19. Remove some remaining nsIDOMNode uses. r=qdot 2018-05-29 22:58:50 -04:00
gamepad Bug 1460940 - Clean up most remaining C++-side uses of nsIDOMDocument. r=bz 2018-05-11 19:46:15 +02:00
geolocation Bug 1441295 - Reverted the changes in bug 1372069 and modified test; r=baku 2018-06-15 23:23:40 -04:00
grid Backed out 2 changesets (bug 1468416) for failing nsGridContainerFrame CLOSED TREE 2018-06-22 21:37:15 +03:00
html Merge mozilla-central to inbound. a=merge CLOSED TREE 2018-06-26 12:24:32 +03:00
imptests No bug - fix typos in Bugzilla components metadata in moz.build files. r=me DONTBUILD 2018-04-19 15:50:31 +03:00
indexedDB Bug 1469769 - Part 6: Replace non-failing NS_NOTREACHED with MOZ_ASSERT_UNREACHABLE. r=froydnj 2018-06-17 22:43:11 -07:00
interfaces Bug 1466298 part 3. Remove nsIDOMGeoGeolocation. r=mccr8 2018-06-04 12:41:09 -04:00
ipc Merge mozilla-central to inbound. a=merge CLOSED TREE 2018-06-26 12:24:32 +03:00
jsurl Bug 1469769 - Part 6: Replace non-failing NS_NOTREACHED with MOZ_ASSERT_UNREACHABLE. r=froydnj 2018-06-17 22:43:11 -07:00
locales Bug 1422225: Error reporting fixes. r=xidorn 2018-06-25 21:19:39 +02:00
manifest Bug 1405428 - skip-if = verify on mochitests which do not pass test-verify. r=gbrown 2018-06-10 05:01:47 -04:00
mathml Bug 1449806: Merge {Servo,Generic}SpecifiedValues into MappedDeclarations. r=xidorn 2018-06-25 11:14:39 +02:00
media Merge mozilla-central to inbound. a=merge CLOSED TREE 2018-06-26 12:24:32 +03:00
messagechannel Bug 1467179 - MessagePort should implement DisconnectFromOwner() instead using innerID comparison, r=bkelly 2018-06-13 08:37:26 -07:00
midi Bug 1455674 part 10. Remove nsIDOMElement use from remaining dom/ xpidl files. r=qdot 2018-04-26 23:36:10 -04:00
network Bug 1469879 - Add check for closed socket on Multicast IPC parent funcs; r=baku 2018-06-25 16:59:08 -07:00
notification Backed out 7 changesets (bug 1469181) for debug mochitest crashes. CLOSED TREE 2018-06-19 03:47:01 +03:00
offline Bug 1455052 part 8. Stop using nsIDOMEvent in docshell and dom. r=masayuki 2018-04-20 12:55:30 -04:00
payments Bug 1470750 - Don't run DOM payment tests for non-Nightly. r=mrbkap 2018-06-25 01:50:40 +03:00
performance Backed out 3 changesets (bug 1462879) for failing mochitests on Android at dom/tests/mochitest/general/test_resource_timing.html 2018-06-15 05:03:06 +03:00
permission
plugins Bug 1469769 - Part 6: Replace non-failing NS_NOTREACHED with MOZ_ASSERT_UNREACHABLE. r=froydnj 2018-06-17 22:43:11 -07:00
power
presentation Bug 1469769 - Part 6: Replace non-failing NS_NOTREACHED with MOZ_ASSERT_UNREACHABLE. r=froydnj 2018-06-17 22:43:11 -07:00
promise Bug 1466385. Use forwarding reference in MaybeResolve. r=bz 2018-06-02 13:26:06 +02:00
push Bug 1470254 Don't send push events to child process when e10s pref is flipped. r=mrbkap 2018-06-23 10:13:10 -07:00
quota Bug 1469769 - Part 6: Replace non-failing NS_NOTREACHED with MOZ_ASSERT_UNREACHABLE. r=froydnj 2018-06-17 22:43:11 -07:00
res
script Bug 1465585: Switch from mozilla::Move to std::move. r=froydnj 2018-06-01 10:45:27 +02:00
security Backed out changeset 638eb8a41245 (bug 1453751) for frequent linux debug e-10s failures on test_ext_webrequest_filter.html 2018-06-26 07:29:35 +03:00
serviceworkers Bug 1469769 - Part 6: Replace non-failing NS_NOTREACHED with MOZ_ASSERT_UNREACHABLE. r=froydnj 2018-06-17 22:43:11 -07:00
smil Bug 1469769 - Part 6: Replace non-failing NS_NOTREACHED with MOZ_ASSERT_UNREACHABLE. r=froydnj 2018-06-17 22:43:11 -07:00
storage Backed out 18 changesets (bug 1462784) for failures in devtools/client/performance/test/unit/test_tree-model-08.js on a CLOSED TREE 2018-06-01 01:06:29 +03:00
svg Bug 1469769 - Part 6: Replace non-failing NS_NOTREACHED with MOZ_ASSERT_UNREACHABLE. r=froydnj 2018-06-17 22:43:11 -07:00
system Bug 1464548: Part 3 - Update callers to use defineLazyGlobalGetters. r=mccr8 2018-05-25 17:02:29 -07:00
tests Bug 1428246 - The attributeChangedCallback is fired twice for the *first* style attribute change, r=peterv 2018-06-26 12:54:00 +03:00
u2f Bug 1465060 - Part 1: Fix warnings for std::move() use r=froydnj 2018-06-01 17:59:07 +02:00
url Backed out 3 changesets (bug 1389251) for browser-chrome failure on browser/base/content/test/pageinfo/browser_pageinfo_image_info.js. CLOSED TREE 2018-06-15 06:18:04 +03:00
vr Bug 1469972 - Remove VRPose::mFrameId and its accessor as it is unused r=rbarker 2018-06-20 13:02:03 -07:00
webauthn bug 1468909 - enforce that all given RP IDs be valid domain strings in webauthn r=qdot 2018-06-19 14:29:45 -07:00
webbrowserpersist Bug 1448330 - Make nsIURI.clone a private method r=mayhemer 2018-06-14 13:05:43 +02:00
webidl Backed out 2 changesets (bug 1349799) for build bustages on WebGLContext.cpp. CLOSED TREE 2018-06-26 04:21:08 +03:00
websocket Bug 1465585: Switch from mozilla::Move to std::move. r=froydnj 2018-06-01 10:45:27 +02:00
workers Bug 1469769 - Part 6: Replace non-failing NS_NOTREACHED with MOZ_ASSERT_UNREACHABLE. r=froydnj 2018-06-17 22:43:11 -07:00
worklet Bug 1405428 - skip-if = verify on mochitests which do not pass test-verify. r=gbrown 2018-06-10 05:01:47 -04:00
xbl Bug 1469217 part 2 - Add APIs taking getter/setter objects instead of JSNatives. r=anba 2018-06-21 11:05:42 +02:00
xhr Bug 1469769 - Part 6: Replace non-failing NS_NOTREACHED with MOZ_ASSERT_UNREACHABLE. r=froydnj 2018-06-17 22:43:11 -07:00
xml Bug 1469769 - Part 6: Replace non-failing NS_NOTREACHED with MOZ_ASSERT_UNREACHABLE. r=froydnj 2018-06-17 22:43:11 -07:00
xslt Bug 1469769 - Part 6: Replace non-failing NS_NOTREACHED with MOZ_ASSERT_UNREACHABLE. r=froydnj 2018-06-17 22:43:11 -07:00
xul Bug 1469769 - Part 6: Replace non-failing NS_NOTREACHED with MOZ_ASSERT_UNREACHABLE. r=froydnj 2018-06-17 22:43:11 -07:00
jar.mn
moz.build Bug 1465875 part 5. Eliminate nsIDOMNSEditableElement. r=qdot 2018-06-01 22:35:23 -04:00