gecko-dev/dom
Jessica Jong 3342b6100d Bug 1375599 - Change IsDisabled() to look at NS_EVENT_STATE_DISABLED instead of the "disabled" attribute. r=bz
In order to speed up IsDisabled(), instead of querying for the @disabled
attribute, we're now using the NS_EVENT_STATE_DISABLED flag to know whether an
element is disabled.
It is safe to use the NS_EVENT_STATE_DISABLED flag for the following reasons:
- For form elements, nsGenericHTMLFormElement::IsDisabled() is only called on
  form elements that can be disabled; form elements that can't be disabled
  overrides IsDisabled() to return false directly.
  And, before this patch, NS_EVENT_STATE_DISABLED flag is set by
  nsGenericHTMLFormElement::IntrinsicState() if and only if IsDisabled() in all
  cases when CanBeDisabled() is true, and when CanBeDisabled() is false then
  IsDisabled() is always false and the flag is not set.
- For non form elements, optgroup and option have the flag matching
  IsDisabled(). Note that option's IsDisabled() should also refer to optgroup's
  (if it exists) disabled state, which was not done before this patch.

For this to work correctly, we need to set NS_EVENT_STATE_DISABLED earlier,
that is, in AfterSetAttr(), before any consumer of IsDisabled().
We also need to update the flag whenever the element's parent (e.g. fieldset or
optgroup) disabled state changes and when moving into/out of a parent
container.

Note that NS_EVENT_STATE_DISABLED/ENABLED is now part of the
EXTERNALLY_MANAGED_STATES.

MozReview-Commit-ID: KSceikeqvvU
2017-07-20 02:15:00 -04:00
..
animation Bug 1367904 - Part 10: stylo: Switch Gecko over to ServoStyleContext; r=bholley 2017-07-17 21:00:46 -07:00
asmjscache
audiochannel Backed out changeset af66c0b94881 for landing with the wrong bug number in the commit message. 2017-06-28 18:37:16 -04:00
base merge mozilla-central to mozilla-inbound. r=merge a=merge 2017-07-20 13:25:57 +02:00
battery
bindings Bug 1363959 - Compare jsid equality instead of string comparison in XrayResolveOwnProperty(). r=bholley 2017-07-20 15:12:03 +08:00
broadcastchannel Bug 1374282 - script generated patch to remove Task.jsm calls, r=Mossop. 2017-06-22 12:51:42 +02:00
browser-element Bug 1332862 - remove useless test. r=baku 2017-07-18 14:45:57 +08:00
cache Bug 1350958 - Finish labeling ProxyReleaseEvent, r=billm 2017-07-14 08:49:22 +02:00
canvas Bug 1382358 - Allow unusual/spurious glsl versions in non-DEBUG builds. - r=kvark 2017-07-19 18:04:03 -07:00
commandhandler
console Bug 1350958 - Finish labeling ProxyReleaseEvent, r=billm 2017-07-14 08:49:22 +02:00
credentialmanagement
crypto
encoding Bug 1373984 - Turn nsIDocument::mCharacterSet into mozilla::NotNull<const mozilla::Encoding*>. r=hsivonen 2017-06-18 20:37:50 +09:00
events Bug 1375599 - Change IsDisabled() to look at NS_EVENT_STATE_DISABLED instead of the "disabled" attribute. r=bz 2017-07-20 02:15:00 -04:00
fetch Bug 1380604 - Use Killing when dispatching the sync runnable in FetchBodyConsumer::ShutDownMainThreadConsuming. r=baku 2017-07-13 12:17:21 +01:00
file Bug 1377589 - FileReader should create a pipe if the stream is blocking, r=smaug 2017-07-14 15:31:23 +02:00
filehandle
filesystem Bug 1350958 - Finish labeling ProxyReleaseEvent, r=billm 2017-07-14 08:49:22 +02:00
flyweb Bug 1381854 - FlyWeb events must mark the Response as BodyUsed, r=djvj 2017-07-19 09:12:41 +02:00
gamepad Backed out changeset bec6c4becfd9 (bug 1375816) for bustage in gfxVROculus.cpp on Windows. r=backout 2017-07-18 11:49:37 +02:00
geolocation Bug 1372069 - Part 1: Disable Geolocation when 'privacy.resistFingerprinting' is true. r=arthuredelstein,smaug 2017-07-13 14:11:08 +08:00
grid
html Bug 1375599 - Change IsDisabled() to look at NS_EVENT_STATE_DISABLED instead of the "disabled" attribute. r=bz 2017-07-20 02:15:00 -04:00
imptests
indexedDB Bug 1222284 - Part 3: Enable test browser_permissionsPromptWorker.js again on mac, r=btseng 2017-07-20 15:10:39 +08:00
interfaces Backed out changeset b2f02ad2c82b (bug 1363361) for frequently failing browser_appmenu_reflows.js on OS X. r=backout a=backout 2017-07-20 13:23:53 +02:00
ipc Backed out 13 changesets (bug 1366294) for leaking base::Histogram::FactoryGet a=backout CLOSED TREE 2017-07-19 12:49:46 -07:00
json
jsurl Bug 1379786, part 1 - Remove dead code related to the security manager. r=mrbkap 2017-07-07 15:59:29 -07:00
locales Bug 1266495 - Remove <isindex>. r=wchen 2017-07-05 11:42:04 +03:00
manifest Bug 1374282 - hand cleanup for the script generated patch to remove Task.jsm calls, r=Mossop. 2017-06-22 12:51:42 +02:00
mathml Bug 1378712 - Remove all trailing whitespaces r=Ehsan 2017-07-06 14:00:35 +02:00
media Merge inbound to m-c. a=merge 2017-07-19 10:00:35 -04:00
messagechannel Bug 1371259 part 3. Change UnwrapObject<> and the UNWRAP_OBJECT macro to allow passing in mutable object or value handles for the thing being unwrapped, and do so at various callsites. r=peterv 2017-07-10 16:05:24 -04:00
network Bug 1378712 - Remove all trailing whitespaces r=Ehsan 2017-07-06 14:00:35 +02:00
notification Bug 1371259 part 3. Change UnwrapObject<> and the UNWRAP_OBJECT macro to allow passing in mutable object or value handles for the thing being unwrapped, and do so at various callsites. r=peterv 2017-07-10 16:05:24 -04:00
offline Bug 1378712 - Remove all trailing whitespaces r=Ehsan 2017-07-06 14:00:35 +02:00
payments Bug 1318988 - Implement allowPaymentRequest on iframe. r=baku 2017-07-18 10:16:28 +08:00
performance Bug 1159003 - setResourceTimingBufferSize shouldn't affect user timing, but we should clean user markers if we have memory pressure, r=bz 2017-07-20 12:57:08 +02:00
permission
plugins Bug 1352559 followup (part 4) - remove remaining references to NPN_DestroyStream called by internal code on stream teardown, r=qdot 2017-07-17 13:06:01 -04:00
power Bug 1378712 - Remove all trailing whitespaces r=Ehsan 2017-07-06 14:00:35 +02:00
presentation Bug 1371259 part 3. Change UnwrapObject<> and the UNWRAP_OBJECT macro to allow passing in mutable object or value handles for the thing being unwrapped, and do so at various callsites. r=peterv 2017-07-10 16:05:24 -04:00
promise Bug 1371259 part 3. Change UnwrapObject<> and the UNWRAP_OBJECT macro to allow passing in mutable object or value handles for the thing being unwrapped, and do so at various callsites. r=peterv 2017-07-10 16:05:24 -04:00
push Bug 1368456 - remove Promise.jsm imports in tests, r=mconley. 2017-06-23 11:25:52 +02:00
quota Bug 1370701 - Part 2: Null out the private window, r=btseng 2017-07-18 15:31:03 +08:00
res
script Bug 1381888 - Hard-code the current size factor between the source size and the bytecode size. r=mrbkap 2017-07-18 10:09:00 -04:00
secureelement
security Merge m-c to autoland. a=merge 2017-07-14 09:52:56 -04:00
smil Bug 1375596 - Use valueToAdd in AddAccumulateOrValue, not valueToAddWrapper; r=hiro 2017-07-18 16:24:28 +09:00
storage Merge m-c to autoland, a=merge 2017-07-06 16:19:38 -07:00
svg Bug 1352669 - Hook up Stylo CSS parser to Gecko error reporter. r=emilio 2017-07-10 17:52:00 -04:00
system Bug 1369319 - Part 1: Block device sensor events when 'privacy.resistFingerprinting' is true. r=arthuredelstein,bz 2017-06-20 11:10:06 +08:00
tests Merge inbound to central, a=merge CLOSED TREE 2017-07-19 17:29:56 -07:00
time Bug 1378712 - Remove all trailing whitespaces r=Ehsan 2017-07-06 14:00:35 +02:00
u2f
url Bug 1379113 - Deleting non-existing URL query parameters should remove ?, r=qdot 2017-07-19 09:12:41 +02:00
vr Backed out changeset 498baf1613db (bug 1375816) 2017-07-18 11:48:22 +02:00
webauthn Merge m-c to autoland, a=merge 2017-07-14 17:27:36 -07:00
webbrowserpersist Bug 1380415 part 1. Remove unused bits of nsIDOMHTMLInputElement. r=mccr8 2017-07-13 23:46:13 -04:00
webidl Backed out 4 changesets (bug 1315885) for merge conflicts with bug 1377993. 2017-07-18 12:58:46 -04:00
workers Bug 1159003 - setResourceTimingBufferSize shouldn't affect user timing, but we should clean user markers if we have memory pressure, r=bz 2017-07-20 12:57:08 +02:00
worklet
xbl Bug 1381736 - Fix modifier masks for APZ keyboard shortcuts. r=masayuki 2017-07-18 02:03:14 -04:00
xhr Bug 1378712 - Remove all trailing whitespaces r=Ehsan 2017-07-06 14:00:35 +02:00
xml Bug 1379786, part 4 - Use GetIsSystemPrincipal() method instead of going through secman in CHECK_PRINCIPAL_AND_DATA. r=mrbkap 2017-07-10 15:00:03 -07:00
xslt Bug 1380227 - Avoid many UTF16toUTF8 and UTF8toUTF16 conversions in nsStringBundle. r=emk. 2017-07-12 15:13:37 +10:00
xul Bug 1379312 - Improve nsAssignment's hashing algorithm by redoing it on top of mozilla::HashGeneric(); r=mystor 2017-07-19 00:01:04 -04:00
jar.mn
moz.build