This reverts commit d33dcda2c6.
Revert "Bug 1950338 - Part 8: Rename invoketarget->commandfor, invokeaction->command r=webidl,devtools-reviewers,nchevobbe,smaug"
This reverts commit 0fe8930d32.
Revert "Bug 1950338 - Part 7: Move command&commandfor logic to HTMLButtonElement r=smaug"
This reverts commit 5a9255cd0b.
Revert "Bug 1950338 - Part 6: Rename invoker functions to command functions r=dom-core,masayuki"
This reverts commit 76f840a55a.
Revert "Bug 1950338 - Part 5: Remove InvokeEvent, migrate .invoker to CommandEvent .source r=webidl,devtools-reviewers,nchevobbe,emilio,smaug"
This reverts commit f7d2727969.
Revert "Bug 1950338 - Part 4: Move invokeTargetElement, invokeAction to HTMLButtonElement IDL r=webidl,smaug"
This reverts commit a7a025a843.
Revert "Bug 1950338 - Part 3: Expose CommandEvent in commandfor pref; move from chrome-webidl to webidl r=webidl,emilio"
This reverts commit eb133a45e6.
Revert "Bug 1950338 - Part 2: Move invokers meta ini to correct directory r=dom-core,sefeng"
This reverts commit face866adb.
Revert "Bug 1950338 - Part 1: Rename `dom.element.invokers` flag to `dom.element.commandfor` r=webidl,devtools-reviewers,nchevobbe,smaug"
This reverts commit 532bb887b5.
This will make the underlying feature more discoverable
and should help people doing accessibility work.
We take this as an opportunity to export attribute types
from node-attribute-parser.js so we can do proper check.
Since we're adding a click event listener in markup container,
to handle keyboard activation, we take care of all the
event listeners lifecycle with an abort controller.
The existing test on aria attributes is updated to also
test the button. This should be enough as this cover both
idref and idreflist cases.
Differential Revision: https://phabricator.services.mozilla.com/D193309
This will make the underlying feature more discoverable
and should help people doing accessibility work.
We take this as an opportunity to export attribute types
from node-attribute-parser.js so we can do proper check.
Since we're adding a click event listener in markup container,
to handle keyboard activation, we take care of all the
event listeners lifecycle with an abort controller.
The existing test on aria attributes is updated to also
test the button. This should be enough as this cover both
idref and idreflist cases.
Differential Revision: https://phabricator.services.mozilla.com/D193309
We can speed up the getType function by changing the dataType into an object from an array.
That way we avoid looping looking for the matching tagName and namespaceURI and access the typeData directly by their tagName.
Differential Revision: https://phabricator.services.mozilla.com/D38196
`hasAttribute` and `getAttribute` were using for..of loop to
get what they wanted, which wasn't ideal.
Moreover, most of those operations were happening because we
didn't pass the attribute value to the parseAttribute function,
only an array of all the attributes. This is a bit unfortunate
there's only one place where we call the parseAttribute function,
and there, we have easy access to the attribute value.
This patch removes direct calls to hasAttribute and getAttribute.
hasAttribute is removed, but we need to keep getAttribute for the
isValid function in parsers.
We add an `attributeValue` parameter to the parseAttribute function.
The unit test for this function is also modified to pass the attribute
value.
perfherder reports a ~2.5% improvement on custom open and ~3% on
custom reload.
Differential Revision: https://phabricator.services.mozilla.com/D37551
`ATTRIBUTE_TYPES` was an object and we used to access it's attributes using e.g.
`ATTRIBUTE_TYPES["href"]`, which is fine in almost all cases.
The problem occurred when the attribute name was `"constructor"`. This caused us
to attempt to parse `ATTRIBUTE_TYPES["constructor"]`, which returned
`{}.constructor` therefore breaking the attribute parser.
Changing `ATTRIBUTE_TYPES` to a Map fixes the issue because
`ATTRIBUTE_TYPES.get("constructor")` returns null rather than an object
constructor.
Differential Revision: https://phabricator.services.mozilla.com/D18220
- sort-statics-last is no longer meaningful now non-static (ie template) items don't exist
- we don't use the 'resource' attribute anywhere in XUL.
- sortResource/sortResource2 are unused.
- we don't have meaningful consumers for sortSeparators
MozReview-Commit-ID: C31vC9MCrDo
For simple rules like function spacing, we can auto-fix these across the code
base so they are followed in a consistent way.
To generate this patch, I ran:
./mach eslint devtools --no-ignore --fix
After this, I reverted any changes to third party files that we really do want
to ignore.
MozReview-Commit-ID: 6Q8BApkAW20
Move major DevTools files to new directories using the following steps:
hg mv browser/devtools devtools/client
hg mv toolkit/devtools/server devtools/server
hg mv toolkit/devtools devtools/shared
No other changes are made.