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

29 Коммитов

Автор SHA1 Сообщение Дата
Boris Zbarsky e5497b955e Bug 1423562 part 3. Remove [PrimaryGlobal] and require explicit [Exposed] annotations on everything. r=edgar
For review purposes, the important changes are in dom/bindings/Configuration.py
and dom/bindings/parser.

The changes to the IDL files were done by running these in dom/webidl
and dom/bindings/test:

  perl -pi -e 's/^interface ([A-Za-z0-9_]+)($| [:{])/[Exposed=Window]\ninterface \1\2/' *.webidl

  perl -pi -e 'BEGIN { $/ = undef; } s/\[HTMLConstructor\]\n\[Exposed=Window\]/[HTMLConstructor,\n Exposed=Window]/g' *.webidl

  perl -pi -e 'BEGIN { $/ = undef; } s/\[NoInterfaceObject\]\n\[Exposed=Window\]/[NoInterfaceObject,\n Exposed=Window]/g' *.webidl

  perl -pi -e 'BEGIN { $/ = undef; } s/\[ChromeOnly\]\n\[Exposed=Window\]/[ChromeOnly,\n Exposed=Window]/g' *.webidl

And running this in dom/chrome-webidl:

  perl -pi -e 'BEGIN { $/ = undef; } s/\[ChromeOnly\]\ninterface/[ChromeOnly, Exposed=Window]\ninterface/g' *.webidl

and then fixing all the resulting parser failures.  I then verified that the
generated code is the same as before this change.

Differential Revision: https://phabricator.services.mozilla.com/D46697

--HG--
extra : moz-landing-system : lando
2019-09-27 15:26:14 +00:00
Boris Zbarsky 3f72fbb470 Bug 1574195 part 2. Switch key event interfaces to IDL mixins. r=masayuki
Differential Revision: https://phabricator.services.mozilla.com/D46521

--HG--
extra : moz-landing-system : lando
2019-09-20 01:50:49 +00:00
Boris Zbarsky cdf754533a Bug 1578173 part 5. Remove vestigial binaryNames annotations from Bindings.conf. r=edgar
Differential Revision: https://phabricator.services.mozilla.com/D45393

--HG--
extra : moz-landing-system : lando
2019-09-11 21:23:25 +00:00
Boris Zbarsky 14c30e58d6 Bug 1578173 part 4. Switch event subclasses to constructor operations. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D45391

--HG--
extra : moz-landing-system : lando
2019-09-11 14:35:28 +00:00
Boris Zbarsky 19251f27ce Bug 1562680. Implement the new syntax for Web IDL dictionary defaulting. r=peterv
`= {}` can now be used to indicate that an optional dictionary should have the
default value of 'default-initialized dictionary'

Differential Revision: https://phabricator.services.mozilla.com/D36504

--HG--
extra : moz-landing-system : lando
2019-07-03 07:52:35 +00:00
Cosmin Sabou 3ef8d24958 Backed out changeset 8e16f13a88c8 (bug 1562680) for colliding with Bug 1366738 that was backed out. CLOSED TREE 2019-07-03 10:46:39 +03:00
Boris Zbarsky 73f095abc4 Bug 1562680. Implement the new syntax for Web IDL dictionary defaulting. r=peterv
`= {}` can now be used to indicate that an optional dictionary should have the
default value of 'default-initialized dictionary'

Differential Revision: https://phabricator.services.mozilla.com/D36504

--HG--
extra : moz-landing-system : lando
2019-07-03 06:44:36 +00:00
Mihai Alexandru Michis c7fc76c18f Backed out changeset 12653dd76667 (bug 1562680) for causing bustages in FuzzingFunctions.webidl CLOSED TREE 2019-07-03 09:34:48 +03:00
Boris Zbarsky 3a5c721abb Bug 1562680. Implement the new syntax for Web IDL dictionary defaulting. r=peterv
`= {}` can now be used to indicate that an optional dictionary should have the
default value of 'default-initialized dictionary'

Differential Revision: https://phabricator.services.mozilla.com/D36504

--HG--
extra : moz-landing-system : lando
2019-07-03 06:15:54 +00:00
Masayuki Nakano 06267cb849 Bug 1479964 - Set KeyboardEvent.keyCode and KeyboardEvent.charCode to same value if the event is "keypress" event r=smaug
Chrome sets both KeyboardEvent.keyCode and KeyboardEvent.charCode of "keypress"
event to same value.  On the other hand, our traditional behavior is, sets
one of them to 0.

Therefore, we need to set keyCode value to charCode value if the keypress
event is caused by a non-function key, i.e., it may be a printable key with
specific modifier state and/or different keyboard layout for compatibility
with Chrome.  Similarly, we need to set charCode value to keyCode value if
the keypress event is caused by a function key which is not mapped to producing
a character.

Note that this hack is for compatibility with Chrome.  So, for now, it's enough
to change the behavior only for "keypress" event handlers in web content.  If
we completely change the behavior, we need to fix a lot of default handlers
and mochitests too.  However, it's really difficult because default handlers
check whether keypress events are printable or not with following code:

> if (event.charCode &&
>     !event.altKey && !event.ctrlKey && !event.metaKey) {

or

> if (!event.keyCode &&
>     !event.altKey && !event.ctrlKey && !event.metaKey) {

So, until we stop dispatching "keypress" events for non-printable keys,
we need complicated check in each of them.

And also note that this patch changes the behavior of KeyboardEvent::KeyCode()
when spoofing is enabled and the instance is initialized by initKeyEvent() or
initKeyboardEvent().  That was changed by bug 1222285 unexpectedly and keeping
the behavior makes patched code really ugly.  Therefore, this takes back the
old behavior even if spoofing is enabled.

Differential Revision: https://phabricator.services.mozilla.com/D7974

--HG--
extra : moz-landing-system : lando
2018-10-09 04:43:37 +00:00
Cosmin Sabou 679b5e2db1 Backed out 5 changesets (bug 1485040) for causing build bustages on test_mozwebidlcodegen. CLOSED TREE
Backed out changeset b417c2d937e8 (bug 1485040)
Backed out changeset c567c4c7438f (bug 1485040)
Backed out changeset 806c36cb2c4c (bug 1485040)
Backed out changeset 0fbb490ffc7f (bug 1485040)
Backed out changeset a9622e7761eb (bug 1485040)
2018-09-13 23:04:55 +03:00
Andrew McCreight 93b3b0138c Bug 1485040, part 5 - Automatically fix mode lines in WebIDL files r=qdot
This patch was generated by my modeline.py script.

MozReview-Commit-ID: EbVjPLwiUAT

Depends on D4159

Differential Revision: https://phabricator.services.mozilla.com/D4161

--HG--
extra : moz-landing-system : lando
2018-09-13 19:30:51 +00:00
Tim Huang 8933d9d799 Bug 1222285 - Part 1: Spoofing the keyboard event to mimc a certain keyboard layout according to the content-language of the document when 'privacy.resistFingerprinting' is true. r=arthuredelstein,masayuki,smaug
This patch makes Firefox to spoof keyboardEvent.code, keyboardEvent.keycode and
modifier states, for 'Shift', 'Alt', 'Control' and 'AltGraph', when 'privacy.resistFingerprinting'
is true. Firefox will spoof keyboard events as a certain keyboard layout according
to the content language of the document, for example, we use US English keyboard for
English content. Right now, it only supports English contents, we will add more
support for more languages later. The spoofing only affects content, chrome
can still see real keyboard events.

MozReview-Commit-ID: 40JPvwLmMMB

--HG--
extra : rebase_source : 870224ba4f87b3e336c5b061ac6859dd1c48c4f2
2017-08-29 11:33:27 +08:00
Aryeh Gregor 2df3e475b4 Bug 1387828 - Reinstate support for initKeyboardEvent; r=smaug
https://github.com/w3c/uievents/issues/112

This is supported by all other UAs.  In the past we had compatibility
problems when trying to add support, but it seems these might be fixed
if we make all arguments optional beyond the first.

The interface chosen for the method is from the spec, which has been
updated to match Chrome.  This is also very similar to WebKit, but the
final four arguments are different from IE.

MozReview-Commit-ID: 36AeX1JwJTt

--HG--
extra : rebase_source : 28b298d370f0f9a5ab4090a71a2aae91f1d90025
2017-08-06 16:52:39 +03:00
Masayuki Nakano 7fff9e9d7f Bug 1352949 Remove dom.keyboardevent.code.enabled r=smaug
KeyboardEvent.code has already been enabled and it's already available with Chrome too. So, we won't disable it.

MozReview-Commit-ID: LLlAoMebtsU
2017-04-03 18:04:27 +09:00
chunminchang c2b718ebb8 Bug 1110030 - part5 - Expose KeyboardEventInit dictionary. r=masayuki, r=smaug 2016-03-15 13:46:29 +08:00
Masayuki Nakano db9a97210a Bug 1124608 Support D3E EventModifierInit r=smaug 2015-04-13 16:16:13 +09:00
Masayuki Nakano 7a0cea6729 Bug 936313 part.1 Remove DOM_KEY_LOCATION_MOBILE and DOM_KEY_LOCATION_JOYSTICK r=smaug+mwu+cpeterson, sr=smaug 2015-01-28 22:36:53 +09:00
Boris Zbarsky 91f20e5cc5 Bug 1087378. Stop using WindowProxy for arguments in Web IDL; Window expresses what's going on more clearly. r=peterv 2014-10-29 15:06:20 -04:00
Ryan VanderMeulen 2cb6c8079d Backed out changeset 4b4c7462ec89 (bug 1087378) for bustage.
CLOSED TREE
2014-10-29 16:27:15 -04:00
Boris Zbarsky 0b450f98d6 Bug 1087378. Stop using WindowProxy for arguments in Web IDL; Window expresses what's going on more clearly. r=peterv 2014-10-29 15:06:20 -04:00
Masayuki Nakano aa909719cd Bug 865649 part.1 Implement KeyboardEvent.code r=smaug 2014-05-25 11:08:58 +09:00
Masayuki Nakano 5e612fc7b4 Bug 999645 Cancel implementing KeyboardEvent.initKeyboardEvent() because it completely breaks feature detection in web apps r=smaug 2014-04-25 13:16:20 +09:00
Masayuki Nakano 02d157a1ed Bug 930893 part.2 Implement KeyboardEvent.initKeyboardEvent() r=smaug 2014-04-14 15:37:48 +09:00
Masayuki Nakano d930f4e3f8 Bug 930893 part.1 Implement constructor of KeyboardEvent r=smaug 2014-04-14 15:37:47 +09:00
Masayuki Nakano 7cede8a035 Bug 993234 part.1 Implement KeyboardEvent.isComposing r=smaug 2014-04-10 16:11:36 +09:00
Masayuki Nakano 0070ecb340 Bug 600117 part.1 Implement KeyboardEvent.repeat r=smaug, sr=jst 2013-11-07 20:17:32 +09:00
Masatoshi Kimura 855ede8376 Bug 871786 - Separate D2E KeyEvent constants and a method from KeyboardEvent. r=smaug, bz
--HG--
rename : dom/webidl/KeyboardEvent.webidl => dom/webidl/KeyEvent.webidl
2013-05-19 10:28:47 +09:00
Masatoshi Kimura 0e8df20868 Bug 871153 - Rename KeyEvent back to KeyboardEvent. r=smaug
--HG--
rename : dom/webidl/KeyEvent.webidl => dom/webidl/KeyboardEvent.webidl
2013-05-12 14:08:37 +09:00