KeyboardEvent::InitNativeKey() should initialize NativeKey if it's created for handling an orphan WM_CHAR message, however, if it the charCode isn't a printable character such as 0x0D for Enter key, it shouldn't refer it because focused editor shouldn't handle keyboard event as inputting the non-printable character.
MozReview-Commit-ID: FwTdGqhPEld
--HG--
extra : rebase_source : 69da91ad47e64199c8ff6c120522eb7e153122cd
The spec recently changed to match browsers better. There's currently
not much interop in exact details of how this work. This brings us in
line with the spec except for the limit of 1000 on the span attribute.
The added textarea failures are spurious, because I'm not updating our
local tests in this commit. The new tests are submitted upstream at
<https://github.com/w3c/web-platform-tests/pull/3518>.
MozReview-Commit-ID: 1L8aUtF47Qi
This fix is not related to the referenced bug but came up during review.
MozReview-Commit-ID: IjrxWzkLIq1
--HG--
extra : rebase_source : d53179af98106049bcf1a12efed74c4527ac62c1
And change `this.global.Object.create(null)` to
`Cu.createObjectIn(this.global)`. The tests pass either way, but
`Cu.createObjectIn` is more explicit.
MozReview-Commit-ID: LmL6rTru5zZ
--HG--
extra : rebase_source : 4cf7b1463bf8b6882b6fd453657eae0ff43ed64d
Split the `shouldInject` method into separate methods:
- `shouldInject` to determine whether the API (or namespace)
should be injected.
- `getImplementation` to return the actual implementation.
Introduced `SchemaAPIInterface` for documentation purposes, and
two concrete implementations `LocalAPIImplementation` and
`ProxyAPIImplementation` which provide the functionality to run a local
and remote implementation of the API for which the schema API is
generated, respectively. These classes store the necessary details for
the invocation, so the methods that were formerly in the `Context` in
Schemas.jsm no longer get the `pathObj`, `path` or `name` parameters.
And merge the `path` and `name` in the implementation of remote APIs
because there is no need for having them separate, as the callers and
callees often did redundant pre/post-processing on `data.path` because
of the way it was implemented.
MozReview-Commit-ID: isbG9i9pNP
--HG--
extra : rebase_source : 22cdc3ab3d14c6381f9f540739d6750281ae8c71
The API implementation is already available upfront when the schema API
is generated, so `pathObj` has the implementation and can be used
instead of looking up the implementation over and over again with
`findPathInObject`.
MozReview-Commit-ID: FnCIyoaxgA4
--HG--
extra : rebase_source : 440b25fcfb4a0438b1ff8680ad770930e7427de7
- This was the last non-schema-generated API in content scripts.
MozReview-Commit-ID: FaIOCHoircf
--HG--
extra : rebase_source : 7bab2249a7462a581e493f7aa937df45cb895107
- Use schema-generated runtime API for content scripts instead of
untyped API.
- Move logic that cannot be run in the main process to a new file.
Together with the previous patch that migrated the i18n API, this
concludes the fix for bug 1286712.
MozReview-Commit-ID: A3yG0x1kjwx
--HG--
extra : rebase_source : 19efe95149c423c0f9284bb70e289a282fb758c1
Use schema-generated i18n API for both content script and
addon contexts, instead of just the addon context.
MozReview-Commit-ID: AKDAFxNv6Zs
--HG--
extra : rebase_source : ea66e8bab7b4713d971614ce27e8c1d9350a0a14
- By default, schema APIs are not injected in content scripts unless
the JSON schema sets the "restrictions" attribute to `["content"]`.
- Added the "restrictions" attribute to the storage and test schemas.
Other APIs will follow in subsequent commits and make use of the
primitives introduced in this commit.
MozReview-Commit-ID: 1rNjQap0BiM
--HG--
extra : rebase_source : bf2c7fb70a38fbf13cdfd4337cb3cb6fef7e67e8