Compare commits
313
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
778d93ac49 | ||
|
|
f9ba08fa11 | ||
|
|
95911aa2ce | ||
|
|
ccbea05142 | ||
|
|
867c957ceb | ||
|
|
0d2ff3ee65 | ||
|
|
5871ce0b85 | ||
|
|
6237c680ca | ||
|
|
facdbf7bc0 | ||
|
|
8f54050907 | ||
|
|
2fbe032ee9 | ||
|
|
a8a68383cb | ||
|
|
e3f67c01a2 | ||
|
|
a1fe345c98 | ||
|
|
a1caa316a7 | ||
|
|
1011058248 | ||
|
|
dc9a5cd350 | ||
|
|
80c7d08eee | ||
|
|
a8c59c38d4 | ||
|
|
9bf46d80f1 | ||
|
|
638c7f07f7 | ||
|
|
8e01b2d181 | ||
|
|
14122475be | ||
|
|
d881e7ed56 | ||
|
|
9b0054c55f | ||
|
|
baeae97784 | ||
|
|
0324bfa219 | ||
|
|
b279fd025b | ||
|
|
f31546817a | ||
|
|
f272382a9c | ||
|
|
aa8af9d7f8 | ||
|
|
e1f03ae019 | ||
|
|
f316bc6535 | ||
|
|
82e4c66520 | ||
|
|
3c923e0467 | ||
|
|
866985ac88 | ||
|
|
ba772b40ad | ||
|
|
7a86f0e1b7 | ||
|
|
7e9286f2d8 | ||
|
|
b0d1e365ec | ||
|
|
dbd5a2cbf4 | ||
|
|
d60fb1d5c0 | ||
|
|
29c91fcdba | ||
|
|
fe65674f3f | ||
|
|
a3a6b5ed7e | ||
|
|
d2de8658a7 | ||
|
|
be785b4783 | ||
|
|
70e34941c4 | ||
|
|
545d52572d | ||
|
|
dfa0736b49 | ||
|
|
c7bb5664d9 | ||
|
|
6bbc6f3417 | ||
|
|
631169a312 | ||
|
|
427b3312a6 | ||
|
|
2287b0b57a | ||
|
|
56aaba09b1 | ||
|
|
332938fef3 | ||
|
|
13710f7a06 | ||
|
|
530693099b | ||
|
|
f68aa7ea88 | ||
|
|
5bdaee5e40 | ||
|
|
1b465bc2e2 | ||
|
|
e455021bea | ||
|
|
4fe1246bcc | ||
|
|
59b4ac4d5f | ||
|
|
de641fedfe | ||
|
|
cb99fabcc0 | ||
|
|
f996ea12c2 | ||
|
|
4e7fb3e0ea | ||
|
|
e7cbbbef0f | ||
|
|
a181078981 | ||
|
|
987a662b51 | ||
|
|
77e3e14e55 | ||
|
|
98ddf30155 | ||
|
|
83da5c58a2 | ||
|
|
7136ae45a7 | ||
|
|
97d3d61749 | ||
|
|
9c8bf1fe5d | ||
|
|
d1cc6ff3cb | ||
|
|
db76d74820 | ||
|
|
8fdd9d52f9 | ||
|
|
d42797f587 | ||
|
|
6b9c1f6ab8 | ||
|
|
4aedc96db2 | ||
|
|
234830da1e | ||
|
|
244b95968f | ||
|
|
810cd553b5 | ||
|
|
e52eaa961c | ||
|
|
b7827091b8 | ||
|
|
2e344377b5 | ||
|
|
15335ce39d | ||
|
|
14b03e1f8c | ||
|
|
0968b94e5c | ||
|
|
ba6b2258aa | ||
|
|
1e1715ff11 | ||
|
|
c93381fa79 | ||
|
|
65b0a59757 | ||
|
|
c785639043 | ||
|
|
512c259822 | ||
|
|
90fea6f0d4 | ||
|
|
d892468fd0 | ||
|
|
81ab98b329 | ||
|
|
3f1cacd3e6 | ||
|
|
6e41e01a29 | ||
|
|
9ce81488d4 | ||
|
|
25bc2630d9 | ||
|
|
e5b69418a0 | ||
|
|
229a69be5f | ||
|
|
7f2561312a | ||
|
|
93d11a07f9 | ||
|
|
8e5e24c4c6 | ||
|
|
517ee6754c | ||
|
|
47690c287c | ||
|
|
364b95170e | ||
|
|
407006d673 | ||
|
|
2d60605cc6 | ||
|
|
2d1129eb7e | ||
|
|
495b4980e7 | ||
|
|
ad480be112 | ||
|
|
a06001c022 | ||
|
|
6cbda74aeb | ||
|
|
576fbdf490 | ||
|
|
52b00c38ea | ||
|
|
8ec56f459b | ||
|
|
5cbe423461 | ||
|
|
369fbba750 | ||
|
|
8e3c35efc6 | ||
|
|
b3b852b877 | ||
|
|
d5c6e20e9e | ||
|
|
89b36775fb | ||
|
|
df16df5693 | ||
|
|
aa1fd576ac | ||
|
|
2512188ca7 | ||
|
|
89e88ca6a0 | ||
|
|
2697dd162f | ||
|
|
53a4179c4a | ||
|
|
a120731ddd | ||
|
|
bda611a41a | ||
|
|
5a02a4a1a4 | ||
|
|
e59f358b45 | ||
|
|
90c9535b39 | ||
|
|
ad778bbfdb | ||
|
|
8868552b24 | ||
|
|
66826eb487 | ||
|
|
39127b5ee9 | ||
|
|
80cff816a8 | ||
|
|
e9dda8dafa | ||
|
|
11fc818dfb | ||
|
|
84ed844e3f | ||
|
|
50af804f1c | ||
|
|
82ce93bce9 | ||
|
|
228abc8259 | ||
|
|
1692fa5291 | ||
|
|
bb58c6ae38 | ||
|
|
4f58dc27f9 | ||
|
|
fc5324b9f7 | ||
|
|
561f65aabf | ||
|
|
9acfe36b95 | ||
|
|
ce495cbd85 | ||
|
|
c44020f188 | ||
|
|
35e7a695af | ||
|
|
7a55055d22 | ||
|
|
061900b87f | ||
|
|
abe32f7309 | ||
|
|
7bfd4c7fe7 | ||
|
|
859d6a3e2c | ||
|
|
c2f05f99af | ||
|
|
55b33fb02b | ||
|
|
c247e40d41 | ||
|
|
05c58f159d | ||
|
|
67d5fefcf2 | ||
|
|
aad017be9e | ||
|
|
4543dbf3ff | ||
|
|
b1cb7e0a8f | ||
|
|
1c6d21c97d | ||
|
|
fc42fb38c9 | ||
|
|
618068c15b | ||
|
|
808516a0a8 | ||
|
|
7d6b806040 | ||
|
|
6b4e2c9d73 | ||
|
|
787883f6a4 | ||
|
|
7f02753c04 | ||
|
|
8fa38b3445 | ||
|
|
541c5f9f45 | ||
|
|
4b6bd4976a | ||
|
|
a0843d52b4 | ||
|
|
977a8cbed8 | ||
|
|
1e85085305 | ||
|
|
188f61505f | ||
|
|
a514d7f6a4 | ||
|
|
47c2c75ceb | ||
|
|
7082ec8a9a | ||
|
|
2907a84362 | ||
|
|
b8d1ee05c3 | ||
|
|
0b625e624a | ||
|
|
a4da712f91 | ||
|
|
185f124e87 | ||
|
|
8633077691 | ||
|
|
39a1899045 | ||
|
|
4dc011a187 | ||
|
|
ccb12e1dda | ||
|
|
63f0d3e295 | ||
|
|
09d598c496 | ||
|
|
7e60482d80 | ||
|
|
10b3237e52 | ||
|
|
99af7cc028 | ||
|
|
76b360b5d1 | ||
|
|
4001b58a3e | ||
|
|
134a8aac87 | ||
|
|
3e2e48872a | ||
|
|
622b43cbc5 | ||
|
|
75b44ef620 | ||
|
|
00084ea49c | ||
|
|
b6fae24296 | ||
|
|
13c6b7422d | ||
|
|
24f2e663cd | ||
|
|
f96b155988 | ||
|
|
d5cc24e916 | ||
|
|
8eba271c5f | ||
|
|
19955c82b3 | ||
|
|
80ae8aec7c | ||
|
|
d8441d7c81 | ||
|
|
c2446f2478 | ||
|
|
6efb7a1904 | ||
|
|
fa0b03a10f | ||
|
|
3ae2972950 | ||
|
|
2d48de9998 | ||
|
|
3b029cdfe4 | ||
|
|
ea9077a8a5 | ||
|
|
b4af6b6265 | ||
|
|
ae1d53ceb1 | ||
|
|
c3f4709d5e | ||
|
|
a7bb3fc175 | ||
|
|
6a0203f25f | ||
|
|
b0dfcb147f | ||
|
|
06fd4c9357 | ||
|
|
b9ea7fd9ee | ||
|
|
58308a5c7a | ||
|
|
88c7d54975 | ||
|
|
eadb5678b3 | ||
|
|
54e3e60796 | ||
|
|
2a05494abe | ||
|
|
bc89e58def | ||
|
|
3a009b97f6 | ||
|
|
a105f6d5e9 | ||
|
|
5db241c0c0 | ||
|
|
d38dca10e5 | ||
|
|
54fc723126 | ||
|
|
9b8ca17ee4 | ||
|
|
cddc95b39b | ||
|
|
5676529793 | ||
|
|
ce68156cf4 | ||
|
|
5032ad9593 | ||
|
|
b55f765f2e | ||
|
|
856078d435 | ||
|
|
c74c262d2f | ||
|
|
787e29e374 | ||
|
|
e439896c9b | ||
|
|
15b508f1fb | ||
|
|
5651ebfc76 | ||
|
|
593bfc1ce8 | ||
|
|
28953cda7a | ||
|
|
516f3f545d | ||
|
|
83aff65a42 | ||
|
|
5bd97df957 | ||
|
|
8772711181 | ||
|
|
dc9526f4c6 | ||
|
|
9ab36e7ae0 | ||
|
|
e8d30841e7 | ||
|
|
9faf29374e | ||
|
|
75e4818d36 | ||
|
|
a65144e9e0 | ||
|
|
4f29548526 | ||
|
|
528db2cbd8 | ||
|
|
84e6bcc1e6 | ||
|
|
0dc9ff518d | ||
|
|
a2e3bd44aa | ||
|
|
163a0e7caf | ||
|
|
49a86db5f3 | ||
|
|
2640953d8b | ||
|
|
7eb7d67f7a | ||
|
|
e28860ba7f | ||
|
|
49a96b1d91 | ||
|
|
3130812693 | ||
|
|
71ae69aea8 | ||
|
|
9e34d697c7 | ||
|
|
8fa9125d02 | ||
|
|
4b4488c3e4 | ||
|
|
248db7d301 | ||
|
|
e199f2949b | ||
|
|
456b5450a4 | ||
|
|
d8e629c4a3 | ||
|
|
4898c4f297 | ||
|
|
7cd578bbc6 | ||
|
|
1e91df628a | ||
|
|
b110549cbd | ||
|
|
971047835a | ||
|
|
dd4d9eb032 | ||
|
|
8b94f1e480 | ||
|
|
c89610a5c7 | ||
|
|
217963cbed | ||
|
|
c4f4e18340 | ||
|
|
8a7c0e7345 | ||
|
|
52e304d450 | ||
|
|
cfc0eeca53 | ||
|
|
ebd3dd9228 | ||
|
|
cb40e4e7ef | ||
|
|
662dba55fd | ||
|
|
8760ce023c | ||
|
|
b86e148bb7 | ||
|
|
9e83721e5e | ||
|
|
dc2d6c2e60 | ||
|
|
4ada6f6762 |
No files matched your search
@@ -304,12 +304,18 @@ Element::TabIndex()
|
||||
}
|
||||
|
||||
void
|
||||
Element::Focus(mozilla::ErrorResult& aError)
|
||||
Element::Focus(const FocusOptions& aOptions, ErrorResult& aError)
|
||||
{
|
||||
nsCOMPtr<nsIDOMElement> domElement = do_QueryInterface(this);
|
||||
nsIFocusManager* fm = nsFocusManager::GetFocusManager();
|
||||
// Also other browsers seem to have the hack to not re-focus (and flush) when
|
||||
// the element is already focused.
|
||||
// Until https://github.com/whatwg/html/issues/4512 is clarified, we'll
|
||||
// maintain interoperatibility by not re-focusing, independent of aOptions.
|
||||
// I.e., `focus({ preventScroll: true})` followed by `focus( { preventScroll:
|
||||
// false })` won't re-focus.
|
||||
if (fm && domElement) {
|
||||
aError = fm->SetFocus(domElement, 0);
|
||||
aError = fm->SetFocus(domElement, nsFocusManager::FocusOptionsToFocusManagerFlags(aOptions));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -216,7 +216,7 @@ public:
|
||||
/**
|
||||
* Make focus on this element.
|
||||
*/
|
||||
virtual void Focus(mozilla::ErrorResult& aError);
|
||||
virtual void Focus(const FocusOptions& aOptions, ErrorResult& aError);
|
||||
|
||||
/**
|
||||
* Show blur and clear focus.
|
||||
|
||||
@@ -2259,6 +2259,31 @@ nsContentUtils::IsCallerContentXBL()
|
||||
return xpc::IsContentXBLScope(c);
|
||||
}
|
||||
|
||||
bool
|
||||
nsContentUtils::IsSystemCaller(JSContext* aCx)
|
||||
{
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
|
||||
// This is similar to what SubjectPrincipal() does, except we do in fact
|
||||
// assume that we're in a compartment here; anyone who calls this function in
|
||||
// situations where that's not the case is doing it wrong.
|
||||
JSCompartment *compartment = js::GetContextCompartment(aCx);
|
||||
MOZ_ASSERT(compartment);
|
||||
|
||||
JSPrincipals *principals = JS_GetCompartmentPrincipals(compartment);
|
||||
return nsJSPrincipals::get(principals) == sSystemPrincipal;
|
||||
}
|
||||
|
||||
bool
|
||||
nsContentUtils::ThreadsafeIsSystemCaller(JSContext* aCx)
|
||||
{
|
||||
if (NS_IsMainThread()) {
|
||||
return IsSystemCaller(aCx);
|
||||
}
|
||||
|
||||
return workers::GetWorkerPrivateFromContext(aCx)->UsesSystemPrincipal();
|
||||
}
|
||||
|
||||
// static
|
||||
bool
|
||||
nsContentUtils::LookupBindingMember(JSContext* aCx, nsIContent *aContent,
|
||||
@@ -7336,6 +7361,17 @@ nsContentUtils::HasDistributedChildren(nsIContent* aContent)
|
||||
return false;
|
||||
}
|
||||
|
||||
// static
|
||||
bool nsContentUtils::IsNodeInEditableRegion(nsINode* aNode) {
|
||||
while (aNode) {
|
||||
if (aNode->IsEditable()) {
|
||||
return true;
|
||||
}
|
||||
aNode = aNode->GetParent();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// static
|
||||
bool
|
||||
nsContentUtils::IsForbiddenRequestHeader(const nsACString& aHeader,
|
||||
|
||||
@@ -202,6 +202,23 @@ public:
|
||||
static bool ThreadsafeIsCallerChrome();
|
||||
static bool IsCallerContentXBL();
|
||||
|
||||
// The APIs for checking whether the caller is system (in the sense of system
|
||||
// principal) should only be used when the JSContext is known to accurately
|
||||
// represent the caller. In practice, that means you should only use them in
|
||||
// two situations at the moment:
|
||||
//
|
||||
// 1) Functions used in WebIDL Func annotations.
|
||||
// 2) Bindings code.
|
||||
//
|
||||
// Use pretty much anywhere else is almost certainly wrong and should be
|
||||
// replaced with [NeedsCallerType] annotations in bindings.
|
||||
|
||||
// Check whether the caller is system if you know you're on the main thread.
|
||||
static bool IsSystemCaller(JSContext* aCx);
|
||||
|
||||
// Check whether the caller is system if you might be on a worker thread.
|
||||
static bool ThreadsafeIsSystemCaller(JSContext* aCx);
|
||||
|
||||
// In the traditional Gecko architecture, both C++ code and untrusted JS code
|
||||
// needed to rely on the same XPCOM method/getter/setter to get work done.
|
||||
// This required lots of security checks in the various exposed methods, which
|
||||
@@ -2550,6 +2567,13 @@ public:
|
||||
*/
|
||||
static bool GPCEnabled();
|
||||
|
||||
/**
|
||||
* Returns whether a node has an editable ancestor.
|
||||
*
|
||||
* @param aNode The node to test.
|
||||
*/
|
||||
static bool IsNodeInEditableRegion(nsINode* aNode);
|
||||
|
||||
/**
|
||||
* Returns a LogModule that dump calls from content script are logged to.
|
||||
* This can be enabled with the 'Dump' module, and is useful for synchronizing
|
||||
|
||||
@@ -48,6 +48,7 @@
|
||||
|
||||
#include "mozilla/ContentEvents.h"
|
||||
#include "mozilla/dom/Element.h"
|
||||
#include "mozilla/dom/ElementBinding.h"
|
||||
#include "mozilla/dom/ShadowRoot.h"
|
||||
#include "mozilla/dom/HTMLInputElement.h"
|
||||
#include "mozilla/dom/HTMLSlotElement.h"
|
||||
@@ -2999,6 +3000,11 @@ nsFocusManager::DetermineElementToMoveFocus(nsPIDOMWindowOuter* aWindow,
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
uint32_t nsFocusManager::FocusOptionsToFocusManagerFlags(
|
||||
const mozilla::dom::FocusOptions& aOptions) {
|
||||
return aOptions.mPreventScroll ? nsIFocusManager::FLAG_NOSCROLL : 0;
|
||||
}
|
||||
|
||||
static bool
|
||||
IsHostOrSlot(nsIContent* aContent)
|
||||
{
|
||||
|
||||
@@ -26,6 +26,7 @@ class nsIMessageBroadcaster;
|
||||
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
struct FocusOptions;
|
||||
class TabParent;
|
||||
}
|
||||
}
|
||||
@@ -110,6 +111,9 @@ public:
|
||||
static nsIContent* GetFocusedDescendant(nsPIDOMWindowOuter* aWindow, bool aDeep,
|
||||
nsPIDOMWindowOuter** aFocusedWindow);
|
||||
|
||||
static uint32_t FocusOptionsToFocusManagerFlags(
|
||||
const mozilla::dom::FocusOptions& aOptions);
|
||||
|
||||
/**
|
||||
* Returns the content node that focus will be redirected to if aContent was
|
||||
* focused. This is used for the special case of certain XUL elements such
|
||||
|
||||
@@ -7395,9 +7395,10 @@ nsGlobalWindow::Confirm(const nsAString& aMessage,
|
||||
|
||||
already_AddRefed<Promise>
|
||||
nsGlobalWindow::Fetch(const RequestOrUSVString& aInput,
|
||||
const RequestInit& aInit, ErrorResult& aRv)
|
||||
const RequestInit& aInit,
|
||||
CallerType aCallerType, ErrorResult& aRv)
|
||||
{
|
||||
return FetchRequest(this, aInput, aInit, aRv);
|
||||
return FetchRequest(this, aInput, aInit, aCallerType, aRv);
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
@@ -929,6 +929,7 @@ public:
|
||||
already_AddRefed<mozilla::dom::cache::CacheStorage> GetCaches(mozilla::ErrorResult& aRv);
|
||||
already_AddRefed<mozilla::dom::Promise> Fetch(const mozilla::dom::RequestOrUSVString& aInput,
|
||||
const mozilla::dom::RequestInit& aInit,
|
||||
mozilla::dom::CallerType aCallerType,
|
||||
mozilla::ErrorResult& aRv);
|
||||
void PrintOuter(mozilla::ErrorResult& aError);
|
||||
void Print(mozilla::ErrorResult& aError);
|
||||
|
||||
@@ -37,7 +37,7 @@ native Visibility(mozilla::Visibility);
|
||||
* observers to check which request they are getting notifications for.
|
||||
*
|
||||
* Please make sure to update the MozImageLoadingContent WebIDL
|
||||
* interface to mirror this interface when changing it.
|
||||
* mixin to mirror this interface when changing it.
|
||||
*/
|
||||
|
||||
[scriptable, builtinclass, uuid(0357123d-9224-4d12-a47e-868c32689777)]
|
||||
|
||||
+10
-22
@@ -4464,9 +4464,6 @@ def getJSToNativeConversionInfo(type, descriptorProvider, failureCode=None,
|
||||
isOptional=False,
|
||||
invalidEnumValueFatal=True,
|
||||
defaultValue=None,
|
||||
treatNullAs="Default",
|
||||
isEnforceRange=False,
|
||||
isClamp=False,
|
||||
isNullOrUndefined=False,
|
||||
exceptionCode=None,
|
||||
lenientFloatCode=None,
|
||||
@@ -4544,6 +4541,12 @@ def getJSToNativeConversionInfo(type, descriptorProvider, failureCode=None,
|
||||
# And we can't both be an object and be null or undefined
|
||||
assert not isDefinitelyObject or not isNullOrUndefined
|
||||
|
||||
# Types can also have extended attributes, copy them over
|
||||
isClamp = type.clamp
|
||||
isEnforceRange = type.enforceRange
|
||||
if type.treatNullAsEmpty:
|
||||
treatNullAs = "EmptyString"
|
||||
|
||||
# If exceptionCode is not set, we'll just rethrow the exception we got.
|
||||
# Note that we can't just set failureCode to exceptionCode, because setting
|
||||
# failureCode will prevent pending exceptions from being set in cases when
|
||||
@@ -5648,6 +5651,10 @@ def getJSToNativeConversionInfo(type, descriptorProvider, failureCode=None,
|
||||
undefinedBehavior = "eNull"
|
||||
else:
|
||||
undefinedBehavior = "eStringify"
|
||||
if type.treatNullAsEmpty:
|
||||
treatNullAs = "EmptyString"
|
||||
else:
|
||||
treatNullAs = "Default"
|
||||
nullBehavior = treatAs[treatNullAs]
|
||||
|
||||
def getConversionCode(varName):
|
||||
@@ -6297,9 +6304,6 @@ class CGArgumentConverter(CGThing):
|
||||
not self.argument.variadic),
|
||||
invalidEnumValueFatal=self.invalidEnumValueFatal,
|
||||
defaultValue=self.argument.defaultValue,
|
||||
treatNullAs=self.argument.treatNullAs,
|
||||
isEnforceRange=self.argument.enforceRange,
|
||||
isClamp=self.argument.clamp,
|
||||
lenientFloatCode=self.lenientFloatCode,
|
||||
isMember="Variadic" if self.argument.variadic else False,
|
||||
allowTreatNonCallableAsNull=self.argument.allowTreatNonCallableAsNull(),
|
||||
@@ -8370,18 +8374,6 @@ class FakeArgument():
|
||||
self.variadic = False
|
||||
self.defaultValue = None
|
||||
self._allowTreatNonCallableAsNull = allowTreatNonCallableAsNull
|
||||
# For FakeArguments generated by maplike/setlike convenience functions,
|
||||
# we won't have an interfaceMember to pass in.
|
||||
if interfaceMember:
|
||||
self.treatNullAs = interfaceMember.treatNullAs
|
||||
else:
|
||||
self.treatNullAs = "Default"
|
||||
if isinstance(interfaceMember, IDLAttribute):
|
||||
self.enforceRange = interfaceMember.enforceRange
|
||||
self.clamp = interfaceMember.clamp
|
||||
else:
|
||||
self.enforceRange = False
|
||||
self.clamp = False
|
||||
|
||||
self.identifier = FakeIdentifier(name)
|
||||
|
||||
@@ -11063,7 +11055,6 @@ class CGProxySpecialOperation(CGPerSignatureCall):
|
||||
argument = arguments[1]
|
||||
info = getJSToNativeConversionInfo(
|
||||
argument.type, descriptor,
|
||||
treatNullAs=argument.treatNullAs,
|
||||
sourceDescription=("value being assigned to %s setter" %
|
||||
descriptor.interface.identifier.name))
|
||||
if argumentHandleValue is None:
|
||||
@@ -12694,8 +12685,6 @@ class CGDictionary(CGThing):
|
||||
getJSToNativeConversionInfo(
|
||||
member.type,
|
||||
descriptorProvider,
|
||||
isEnforceRange=member.enforceRange,
|
||||
isClamp=member.clamp,
|
||||
isMember="Dictionary",
|
||||
isOptional=member.canHaveMissingValue(),
|
||||
defaultValue=member.defaultValue,
|
||||
@@ -15575,7 +15564,6 @@ class CGCallbackInterface(CGCallback):
|
||||
|
||||
class FakeMember():
|
||||
def __init__(self, name=None):
|
||||
self.treatNullAs = "Default"
|
||||
if name is not None:
|
||||
self.identifier = FakeIdentifier(name)
|
||||
|
||||
|
||||
@@ -45,7 +45,8 @@ class Configuration(DescriptorProvider):
|
||||
# Our build system doesn't support dep build involving
|
||||
# addition/removal of "implements" statements that appear in a
|
||||
# different .webidl file than their LHS interface. Make sure we
|
||||
# don't have any of those.
|
||||
# don't have any of those. See similar block below for partial
|
||||
# interfaces!
|
||||
#
|
||||
# But whitelist a RHS that is LegacyQueryInterface,
|
||||
# since people shouldn't be adding any of those.
|
||||
@@ -66,6 +67,33 @@ class Configuration(DescriptorProvider):
|
||||
if not thing.isInterface() and not thing.isNamespace():
|
||||
continue
|
||||
iface = thing
|
||||
# Our build system doesn't support dep builds involving
|
||||
# addition/removal of partial interfaces that appear in a different
|
||||
# .webidl file than the interface they are extending. Make sure we
|
||||
# don't have any of those. See similar block above for "implements"
|
||||
# statements!
|
||||
if not iface.isExternal():
|
||||
for partialIface in iface.getPartials():
|
||||
if (partialIface.filename() != iface.filename() and
|
||||
# Unfortunately, NavigatorProperty does exactly the
|
||||
# thing we're trying to prevent here. I'm not sure how
|
||||
# to deal with that, short of effectively requiring a
|
||||
# clobber when NavigatorProperty is added/removed and
|
||||
# whitelisting the things it outputs here as
|
||||
# restrictively as I can.
|
||||
(partialIface.identifier.name != "Navigator" or
|
||||
len(partialIface.members) != 1 or
|
||||
partialIface.members[0].location != partialIface.location or
|
||||
partialIface.members[0].identifier.location.filename() !=
|
||||
"<builtin>")):
|
||||
raise TypeError(
|
||||
"The binding build system doesn't really support "
|
||||
"partial interfaces which don't appear in the "
|
||||
"file in which the interface they are extending is "
|
||||
"defined. Don't do this.\n"
|
||||
"%s\n"
|
||||
"%s" %
|
||||
(partialIface.location, iface.location))
|
||||
self.interfaces[iface.identifier.name] = iface
|
||||
if iface.identifier.name not in config:
|
||||
# Completely skip consequential interfaces with no descriptor
|
||||
|
||||
@@ -13,7 +13,7 @@ from mozbuild import shellutil
|
||||
# (whether camelCase, _underscorePrefixed, etc.) and the given array of
|
||||
# extended attributes.
|
||||
def generateLine(propName, extendedAttrs):
|
||||
return " [%s] attribute DOMString %s;\n" % (", ".join(extendedAttrs),
|
||||
return " [%s] attribute [TreatNullAs=EmptyString] DOMString %s;\n" % (", ".join(extendedAttrs),
|
||||
propName)
|
||||
def generate(output, idlFilename, preprocessorHeader):
|
||||
print(idlFilename)
|
||||
@@ -30,7 +30,7 @@ def generate(output, idlFilename, preprocessorHeader):
|
||||
continue
|
||||
# Unfortunately, even some of the getters here are fallible
|
||||
# (e.g. on nsComputedDOMStyle).
|
||||
extendedAttrs = ["Throws", "TreatNullAs=EmptyString"]
|
||||
extendedAttrs = ["Throws"]
|
||||
if pref is not "":
|
||||
extendedAttrs.append('Pref="%s"' % pref)
|
||||
|
||||
|
||||
+692
-299
File diff suppressed because it is too large.
Load diff
Vendored
+7
-5
@@ -311,7 +311,7 @@ Cache::MatchAll(JSContext* aCx, const Optional<RequestOrUSVString>& aRequest,
|
||||
|
||||
already_AddRefed<Promise>
|
||||
Cache::Add(JSContext* aContext, const RequestOrUSVString& aRequest,
|
||||
ErrorResult& aRv)
|
||||
CallerType aCallerType, ErrorResult& aRv)
|
||||
{
|
||||
if (NS_WARN_IF(!mActor)) {
|
||||
aRv.Throw(NS_ERROR_UNEXPECTED);
|
||||
@@ -341,12 +341,13 @@ Cache::Add(JSContext* aContext, const RequestOrUSVString& aRequest,
|
||||
}
|
||||
|
||||
requestList.AppendElement(Move(request));
|
||||
return AddAll(global, Move(requestList), aRv);
|
||||
return AddAll(global, Move(requestList), aCallerType, aRv);
|
||||
}
|
||||
|
||||
already_AddRefed<Promise>
|
||||
Cache::AddAll(JSContext* aContext,
|
||||
const Sequence<OwningRequestOrUSVString>& aRequestList,
|
||||
CallerType aCallerType,
|
||||
ErrorResult& aRv)
|
||||
{
|
||||
if (NS_WARN_IF(!mActor)) {
|
||||
@@ -390,7 +391,7 @@ Cache::AddAll(JSContext* aContext,
|
||||
requestList.AppendElement(Move(request));
|
||||
}
|
||||
|
||||
return AddAll(global, Move(requestList), aRv);
|
||||
return AddAll(global, Move(requestList), aCallerType, aRv);
|
||||
}
|
||||
|
||||
already_AddRefed<Promise>
|
||||
@@ -579,7 +580,8 @@ Cache::ExecuteOp(AutoChildOpArgs& aOpArgs, ErrorResult& aRv)
|
||||
|
||||
already_AddRefed<Promise>
|
||||
Cache::AddAll(const GlobalObject& aGlobal,
|
||||
nsTArray<RefPtr<Request>>&& aRequestList, ErrorResult& aRv)
|
||||
nsTArray<RefPtr<Request>>&& aRequestList,
|
||||
CallerType aCallerType, ErrorResult& aRv)
|
||||
{
|
||||
MOZ_DIAGNOSTIC_ASSERT(mActor);
|
||||
|
||||
@@ -605,7 +607,7 @@ Cache::AddAll(const GlobalObject& aGlobal,
|
||||
RequestOrUSVString requestOrString;
|
||||
requestOrString.SetAsRequest() = aRequestList[i];
|
||||
RefPtr<Promise> fetch = FetchRequest(mGlobal, requestOrString,
|
||||
RequestInit(), aRv);
|
||||
RequestInit(), aCallerType, aRv);
|
||||
if (NS_WARN_IF(aRv.Failed())) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
Vendored
+5
-3
@@ -28,6 +28,7 @@ class RequestOrUSVString;
|
||||
class Response;
|
||||
template<typename T> class Optional;
|
||||
template<typename T> class Sequence;
|
||||
enum class CallerType : uint32_t;
|
||||
|
||||
namespace cache {
|
||||
|
||||
@@ -50,10 +51,11 @@ public:
|
||||
const CacheQueryOptions& aOptions, ErrorResult& aRv);
|
||||
already_AddRefed<Promise>
|
||||
Add(JSContext* aContext, const RequestOrUSVString& aRequest,
|
||||
ErrorResult& aRv);
|
||||
CallerType aCallerType, ErrorResult& aRv);
|
||||
already_AddRefed<Promise>
|
||||
AddAll(JSContext* aContext,
|
||||
const Sequence<OwningRequestOrUSVString>& aRequests, ErrorResult& aRv);
|
||||
const Sequence<OwningRequestOrUSVString>& aRequests,
|
||||
CallerType aCallerType, ErrorResult& aRv);
|
||||
already_AddRefed<Promise>
|
||||
Put(JSContext* aCx, const RequestOrUSVString& aRequest, Response& aResponse,
|
||||
ErrorResult& aRv);
|
||||
@@ -97,7 +99,7 @@ private:
|
||||
|
||||
already_AddRefed<Promise>
|
||||
AddAll(const GlobalObject& aGlobal, nsTArray<RefPtr<Request>>&& aRequestList,
|
||||
ErrorResult& aRv);
|
||||
CallerType aCallerType, ErrorResult& aRv);
|
||||
|
||||
already_AddRefed<Promise>
|
||||
PutAll(JSContext* aCx, const nsTArray<RefPtr<Request>>& aRequestList,
|
||||
|
||||
+4
-5
@@ -21,6 +21,7 @@
|
||||
#include "nsProxyRelease.h"
|
||||
|
||||
#include "mozilla/ErrorResult.h"
|
||||
#include "mozilla/dom/BindingDeclarations.h"
|
||||
#include "mozilla/dom/BodyUtil.h"
|
||||
#include "mozilla/dom/DOMError.h"
|
||||
#include "mozilla/dom/Exceptions.h"
|
||||
@@ -317,7 +318,7 @@ public:
|
||||
|
||||
already_AddRefed<Promise>
|
||||
FetchRequest(nsIGlobalObject* aGlobal, const RequestOrUSVString& aInput,
|
||||
const RequestInit& aInit, ErrorResult& aRv)
|
||||
const RequestInit& aInit, CallerType aCallerType, ErrorResult& aRv)
|
||||
{
|
||||
RefPtr<Promise> p = Promise::Create(aGlobal, aRv);
|
||||
if (NS_WARN_IF(aRv.Failed())) {
|
||||
@@ -325,12 +326,10 @@ FetchRequest(nsIGlobalObject* aGlobal, const RequestOrUSVString& aInput,
|
||||
}
|
||||
|
||||
// Double check that we have chrome privileges if the Request's content
|
||||
// policy type has been overridden. Note, we must do this before
|
||||
// entering the global below. Otherwise the IsCallerChrome() will
|
||||
// always fail.
|
||||
// policy type has been overridden.
|
||||
MOZ_ASSERT_IF(aInput.IsRequest() &&
|
||||
aInput.GetAsRequest().IsContentPolicyTypeOverridden(),
|
||||
nsContentUtils::IsCallerChrome());
|
||||
aCallerType == CallerType::System);
|
||||
|
||||
AutoJSAPI jsapi;
|
||||
if (!jsapi.Init(aGlobal)) {
|
||||
|
||||
+3
-1
@@ -35,6 +35,7 @@ class InternalRequest;
|
||||
class OwningBlobOrArrayBufferViewOrArrayBufferOrFormDataOrURLSearchParamsOrUSVString;
|
||||
struct ReadableStream;
|
||||
class RequestOrUSVString;
|
||||
enum class CallerType : uint32_t;
|
||||
|
||||
namespace workers {
|
||||
class WorkerPrivate;
|
||||
@@ -42,7 +43,8 @@ class WorkerPrivate;
|
||||
|
||||
already_AddRefed<Promise>
|
||||
FetchRequest(nsIGlobalObject* aGlobal, const RequestOrUSVString& aInput,
|
||||
const RequestInit& aInit, ErrorResult& aRv);
|
||||
const RequestInit& aInit, CallerType aCallerType,
|
||||
ErrorResult& aRv);
|
||||
|
||||
nsresult
|
||||
UpdateRequestReferrer(nsIGlobalObject* aGlobal, InternalRequest* aRequest);
|
||||
|
||||
@@ -3590,7 +3590,7 @@ HTMLInputElement::Blur(ErrorResult& aError)
|
||||
}
|
||||
|
||||
void
|
||||
HTMLInputElement::Focus(ErrorResult& aError)
|
||||
HTMLInputElement::Focus(const FocusOptions& aOptions, ErrorResult& aError)
|
||||
{
|
||||
if (mType == NS_FORM_INPUT_NUMBER) {
|
||||
// Focus our anonymous text control, if we have one.
|
||||
@@ -3600,7 +3600,7 @@ HTMLInputElement::Focus(ErrorResult& aError)
|
||||
RefPtr<HTMLInputElement> textControl =
|
||||
numberControlFrame->GetAnonTextControl();
|
||||
if (textControl) {
|
||||
textControl->Focus(aError);
|
||||
textControl->Focus(aOptions, aError);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -3616,7 +3616,7 @@ HTMLInputElement::Focus(ErrorResult& aError)
|
||||
}
|
||||
|
||||
if (mType != NS_FORM_INPUT_FILE) {
|
||||
nsGenericHTMLElement::Focus(aError);
|
||||
nsGenericHTMLElement::Focus(aOptions, aError);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -134,7 +134,8 @@ public:
|
||||
virtual int32_t TabIndexDefault() override;
|
||||
using nsGenericHTMLElement::Focus;
|
||||
virtual void Blur(ErrorResult& aError) override;
|
||||
virtual void Focus(ErrorResult& aError) override;
|
||||
virtual void Focus(const FocusOptions& aOptions,
|
||||
ErrorResult& aError) override;
|
||||
|
||||
// nsINode
|
||||
#if !defined(XP_MACOSX)
|
||||
|
||||
@@ -93,14 +93,15 @@ HTMLLabelElement::GetForm() const
|
||||
}
|
||||
|
||||
void
|
||||
HTMLLabelElement::Focus(ErrorResult& aError)
|
||||
HTMLLabelElement::Focus(const FocusOptions& aOptions,
|
||||
ErrorResult& aError)
|
||||
{
|
||||
// retarget the focus method at the for content
|
||||
nsIFocusManager* fm = nsFocusManager::GetFocusManager();
|
||||
if (fm) {
|
||||
nsCOMPtr<nsIDOMElement> elem = do_QueryObject(GetLabeledElement());
|
||||
if (elem)
|
||||
fm->SetFocus(elem, 0);
|
||||
fm->SetFocus(elem, nsFocusManager::FocusOptionsToFocusManagerFlags(aOptions));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -56,7 +56,8 @@ public:
|
||||
}
|
||||
|
||||
using nsGenericHTMLElement::Focus;
|
||||
virtual void Focus(mozilla::ErrorResult& aError) override;
|
||||
virtual void Focus(const FocusOptions& aOptions,
|
||||
ErrorResult& aError) override;
|
||||
|
||||
virtual bool IsDisabled() const override { return false; }
|
||||
|
||||
|
||||
@@ -86,7 +86,8 @@ HTMLLegendElement::UnbindFromTree(bool aDeep, bool aNullParent)
|
||||
}
|
||||
|
||||
void
|
||||
HTMLLegendElement::Focus(ErrorResult& aError)
|
||||
HTMLLegendElement::Focus(const FocusOptions& aOptions,
|
||||
ErrorResult& aError)
|
||||
{
|
||||
nsIFrame* frame = GetPrimaryFrame();
|
||||
if (!frame) {
|
||||
@@ -95,7 +96,7 @@ HTMLLegendElement::Focus(ErrorResult& aError)
|
||||
|
||||
int32_t tabIndex;
|
||||
if (frame->IsFocusable(&tabIndex, false)) {
|
||||
nsGenericHTMLElement::Focus(aError);
|
||||
nsGenericHTMLElement::Focus(aOptions, aError);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -108,7 +109,8 @@ HTMLLegendElement::Focus(ErrorResult& aError)
|
||||
|
||||
nsCOMPtr<nsIDOMElement> result;
|
||||
aError = fm->MoveFocus(nullptr, this, nsIFocusManager::MOVEFOCUS_FORWARD,
|
||||
nsIFocusManager::FLAG_NOPARENTFRAME,
|
||||
nsIFocusManager::FLAG_NOPARENTFRAME |
|
||||
nsFocusManager::FocusOptionsToFocusManagerFlags(aOptions),
|
||||
getter_AddRefs(result));
|
||||
}
|
||||
|
||||
@@ -116,9 +118,10 @@ bool
|
||||
HTMLLegendElement::PerformAccesskey(bool aKeyCausesActivation,
|
||||
bool aIsTrustedEvent)
|
||||
{
|
||||
// just use the same behaviour as the focus method
|
||||
FocusOptions options;
|
||||
ErrorResult rv;
|
||||
Focus(rv);
|
||||
|
||||
Focus(options, rv);
|
||||
return NS_SUCCEEDED(rv.StealNSResult());
|
||||
}
|
||||
|
||||
|
||||
@@ -24,7 +24,8 @@ public:
|
||||
NS_IMPL_FROMCONTENT_HTML_WITH_TAG(HTMLLegendElement, legend)
|
||||
|
||||
using nsGenericHTMLElement::Focus;
|
||||
virtual void Focus(ErrorResult& aError) override;
|
||||
virtual void Focus(const FocusOptions& aOptions,
|
||||
ErrorResult& aError) override;
|
||||
|
||||
virtual bool PerformAccesskey(bool aKeyCausesActivation,
|
||||
bool aIsTrustedEvent) override;
|
||||
|
||||
@@ -150,8 +150,9 @@ public:
|
||||
// If something is focused in the same document, ignore autofocus.
|
||||
if (!fm->GetFocusedContent() ||
|
||||
fm->GetFocusedContent()->OwnerDoc() != document) {
|
||||
mozilla::ErrorResult rv;
|
||||
mElement->Focus(rv);
|
||||
FocusOptions options;
|
||||
ErrorResult rv;
|
||||
mElement->Focus(options, rv);
|
||||
return rv.StealNSResult();
|
||||
}
|
||||
|
||||
|
||||
@@ -434,8 +434,9 @@ public:
|
||||
return rv.StealNSResult();
|
||||
}
|
||||
NS_IMETHOD Focus() final override {
|
||||
mozilla::dom::FocusOptions options;
|
||||
mozilla::ErrorResult rv;
|
||||
Focus(rv);
|
||||
Focus(options, rv);
|
||||
return rv.StealNSResult();
|
||||
}
|
||||
NS_IMETHOD GetDraggable(bool* aDraggable) final override {
|
||||
|
||||
@@ -4,10 +4,12 @@
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
|
||||
#include "nsMathMLElement.h"
|
||||
#include "mozilla/dom/MathMLElement.h"
|
||||
|
||||
#include "base/compiler_specific.h"
|
||||
#include "mozilla/ArrayUtils.h"
|
||||
#include "nsGkAtoms.h"
|
||||
#include "nsIContentInlines.h"
|
||||
#include "nsITableCellLayout.h" // for MAX_COLSPAN / MAX_ROWSPAN
|
||||
#include "nsCRT.h"
|
||||
#include "nsLayoutStylesheetCache.h"
|
||||
@@ -26,7 +28,8 @@
|
||||
|
||||
#include "mozilla/EventDispatcher.h"
|
||||
#include "mozilla/EventStates.h"
|
||||
#include "mozilla/dom/ElementBinding.h"
|
||||
#include "mozilla/EventListenerManager.h" // for EventListenerManager
|
||||
#include "mozilla/dom/MathMLElementBinding.h"
|
||||
|
||||
using namespace mozilla;
|
||||
using namespace mozilla::dom;
|
||||
@@ -34,7 +37,7 @@ using namespace mozilla::dom;
|
||||
//----------------------------------------------------------------------
|
||||
// nsISupports methods:
|
||||
|
||||
NS_IMPL_ISUPPORTS_INHERITED(nsMathMLElement, nsMathMLElementBase,
|
||||
NS_IMPL_ISUPPORTS_INHERITED(MathMLElement, MathMLElementBase,
|
||||
nsIDOMElement, nsIDOMNode, Link)
|
||||
|
||||
static nsresult
|
||||
@@ -75,28 +78,28 @@ ReportParseErrorNoTag(const nsString& aValue,
|
||||
"AttributeParsingErrorNoTag", argv, 2);
|
||||
}
|
||||
|
||||
nsMathMLElement::nsMathMLElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo)
|
||||
: nsMathMLElementBase(aNodeInfo),
|
||||
MathMLElement::MathMLElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo)
|
||||
: MathMLElementBase(aNodeInfo),
|
||||
ALLOW_THIS_IN_INITIALIZER_LIST(Link(this)),
|
||||
mIncrementScriptLevel(false)
|
||||
{
|
||||
}
|
||||
|
||||
nsMathMLElement::nsMathMLElement(already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo)
|
||||
: nsMathMLElementBase(aNodeInfo),
|
||||
MathMLElement::MathMLElement(already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo)
|
||||
: MathMLElementBase(aNodeInfo),
|
||||
ALLOW_THIS_IN_INITIALIZER_LIST(Link(this)),
|
||||
mIncrementScriptLevel(false)
|
||||
{
|
||||
}
|
||||
|
||||
nsresult
|
||||
nsMathMLElement::BindToTree(nsIDocument* aDocument, nsIContent* aParent,
|
||||
nsIContent* aBindingParent,
|
||||
bool aCompileEventHandlers)
|
||||
MathMLElement::BindToTree(nsIDocument* aDocument, nsIContent* aParent,
|
||||
nsIContent* aBindingParent,
|
||||
bool aCompileEventHandlers)
|
||||
{
|
||||
Link::ResetLinkState(false, Link::ElementHasHref());
|
||||
|
||||
nsresult rv = nsMathMLElementBase::BindToTree(aDocument, aParent,
|
||||
nsresult rv = MathMLElementBase::BindToTree(aDocument, aParent,
|
||||
aBindingParent,
|
||||
aCompileEventHandlers);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
@@ -130,7 +133,7 @@ nsMathMLElement::BindToTree(nsIDocument* aDocument, nsIContent* aParent,
|
||||
}
|
||||
|
||||
void
|
||||
nsMathMLElement::UnbindFromTree(bool aDeep, bool aNullParent)
|
||||
MathMLElement::UnbindFromTree(bool aDeep, bool aNullParent)
|
||||
{
|
||||
// If this link is ever reinserted into a document, it might
|
||||
// be under a different xml:base, so forget the cached state now.
|
||||
@@ -141,14 +144,14 @@ nsMathMLElement::UnbindFromTree(bool aDeep, bool aNullParent)
|
||||
doc->UnregisterPendingLinkUpdate(this);
|
||||
}
|
||||
|
||||
nsMathMLElementBase::UnbindFromTree(aDeep, aNullParent);
|
||||
MathMLElementBase::UnbindFromTree(aDeep, aNullParent);
|
||||
}
|
||||
|
||||
bool
|
||||
nsMathMLElement::ParseAttribute(int32_t aNamespaceID,
|
||||
nsIAtom* aAttribute,
|
||||
const nsAString& aValue,
|
||||
nsAttrValue& aResult)
|
||||
MathMLElement::ParseAttribute(int32_t aNamespaceID,
|
||||
nsIAtom* aAttribute,
|
||||
const nsAString& aValue,
|
||||
nsAttrValue& aResult)
|
||||
{
|
||||
MOZ_ASSERT(IsMathMLElement());
|
||||
if (aNamespaceID == kNameSpaceID_None) {
|
||||
@@ -166,6 +169,9 @@ nsMathMLElement::ParseAttribute(int32_t aNamespaceID,
|
||||
aAttribute == nsGkAtoms::mathbackground_) {
|
||||
return aResult.ParseColor(aValue);
|
||||
}
|
||||
if (aAttribute == nsGkAtoms::tabindex) {
|
||||
return aResult.ParseIntValue(aValue);
|
||||
}
|
||||
if (mNodeInfo->Equals(nsGkAtoms::mtd_)) {
|
||||
if (aAttribute == nsGkAtoms::columnspan_) {
|
||||
aResult.ParseClampedNonNegativeInt(aValue, 1, 1, MAX_COLSPAN);
|
||||
@@ -178,8 +184,8 @@ nsMathMLElement::ParseAttribute(int32_t aNamespaceID,
|
||||
}
|
||||
}
|
||||
|
||||
return nsMathMLElementBase::ParseAttribute(aNamespaceID, aAttribute,
|
||||
aValue, aResult);
|
||||
return MathMLElementBase::ParseAttribute(aNamespaceID, aAttribute,
|
||||
aValue, aResult);
|
||||
}
|
||||
|
||||
static Element::MappedAttributeEntry sMtableStyles[] = {
|
||||
@@ -218,7 +224,7 @@ static Element::MappedAttributeEntry sDirStyles[] = {
|
||||
};
|
||||
|
||||
bool
|
||||
nsMathMLElement::IsAttributeMapped(const nsIAtom* aAttribute) const
|
||||
MathMLElement::IsAttributeMapped(const nsIAtom* aAttribute) const
|
||||
{
|
||||
MOZ_ASSERT(IsMathMLElement());
|
||||
|
||||
@@ -287,7 +293,7 @@ nsMathMLElement::IsAttributeMapped(const nsIAtom* aAttribute) const
|
||||
}
|
||||
|
||||
nsMapRuleToAttributesFunc
|
||||
nsMathMLElement::GetAttributeMappingFunction() const
|
||||
MathMLElement::GetAttributeMappingFunction() const
|
||||
{
|
||||
// It doesn't really matter what our tag is here, because only attributes
|
||||
// that satisfy IsAttributeMapped will be stored in the mapped attributes
|
||||
@@ -296,9 +302,9 @@ nsMathMLElement::GetAttributeMappingFunction() const
|
||||
}
|
||||
|
||||
/* static */ bool
|
||||
nsMathMLElement::ParseNamedSpaceValue(const nsString& aString,
|
||||
nsCSSValue& aCSSValue,
|
||||
uint32_t aFlags)
|
||||
MathMLElement::ParseNamedSpaceValue(const nsString& aString,
|
||||
nsCSSValue& aCSSValue,
|
||||
uint32_t aFlags)
|
||||
{
|
||||
int32_t i = 0;
|
||||
// See if it is one of the 'namedspace' (ranging -7/18em, -6/18, ... 7/18em)
|
||||
@@ -378,10 +384,10 @@ nsMathMLElement::ParseNamedSpaceValue(const nsString& aString,
|
||||
// number)"
|
||||
//
|
||||
/* static */ bool
|
||||
nsMathMLElement::ParseNumericValue(const nsString& aString,
|
||||
nsCSSValue& aCSSValue,
|
||||
uint32_t aFlags,
|
||||
nsIDocument* aDocument)
|
||||
MathMLElement::ParseNumericValue(const nsString& aString,
|
||||
nsCSSValue& aCSSValue,
|
||||
uint32_t aFlags,
|
||||
nsIDocument* aDocument)
|
||||
{
|
||||
nsAutoString str(aString);
|
||||
str.CompressWhitespace(); // aString is const in this code...
|
||||
@@ -429,6 +435,13 @@ nsMathMLElement::ParseNumericValue(const nsString& aString,
|
||||
number.Append(c);
|
||||
}
|
||||
|
||||
if (gotDot && str[i - 1] == '.') {
|
||||
if (!(aFlags & PARSE_SUPPRESS_WARNINGS)) {
|
||||
ReportLengthParseError(aString, aDocument);
|
||||
}
|
||||
return false; // Number ending with a dot.
|
||||
}
|
||||
|
||||
// Convert number to floating point
|
||||
nsresult errorCode;
|
||||
float floatValue = number.ToFloat(&errorCode);
|
||||
@@ -499,8 +512,8 @@ nsMathMLElement::ParseNumericValue(const nsString& aString,
|
||||
}
|
||||
|
||||
void
|
||||
nsMathMLElement::MapMathMLAttributesInto(const nsMappedAttributes* aAttributes,
|
||||
nsRuleData* aData)
|
||||
MathMLElement::MapMathMLAttributesInto(const nsMappedAttributes* aAttributes,
|
||||
nsRuleData* aData)
|
||||
{
|
||||
if (aData->mSIDs & NS_STYLE_INHERIT_BIT(Font)) {
|
||||
// scriptsizemultiplier
|
||||
@@ -918,7 +931,7 @@ nsMathMLElement::MapMathMLAttributesInto(const nsMappedAttributes* aAttributes,
|
||||
}
|
||||
|
||||
nsresult
|
||||
nsMathMLElement::GetEventTargetParent(EventChainPreVisitor& aVisitor)
|
||||
MathMLElement::GetEventTargetParent(EventChainPreVisitor& aVisitor)
|
||||
{
|
||||
nsresult rv = Element::GetEventTargetParent(aVisitor);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
@@ -927,30 +940,30 @@ nsMathMLElement::GetEventTargetParent(EventChainPreVisitor& aVisitor)
|
||||
}
|
||||
|
||||
nsresult
|
||||
nsMathMLElement::PostHandleEvent(EventChainPostVisitor& aVisitor)
|
||||
MathMLElement::PostHandleEvent(EventChainPostVisitor& aVisitor)
|
||||
{
|
||||
return PostHandleEventForLinks(aVisitor);
|
||||
}
|
||||
|
||||
NS_IMPL_ELEMENT_CLONE(nsMathMLElement)
|
||||
NS_IMPL_ELEMENT_CLONE(MathMLElement)
|
||||
|
||||
EventStates
|
||||
nsMathMLElement::IntrinsicState() const
|
||||
MathMLElement::IntrinsicState() const
|
||||
{
|
||||
return Link::LinkState() | nsMathMLElementBase::IntrinsicState() |
|
||||
return Link::LinkState() | MathMLElementBase::IntrinsicState() |
|
||||
(mIncrementScriptLevel ?
|
||||
NS_EVENT_STATE_INCREMENT_SCRIPT_LEVEL : EventStates());
|
||||
}
|
||||
|
||||
bool
|
||||
nsMathMLElement::IsNodeOfType(uint32_t aFlags) const
|
||||
MathMLElement::IsNodeOfType(uint32_t aFlags) const
|
||||
{
|
||||
return !(aFlags & ~eCONTENT);
|
||||
}
|
||||
|
||||
void
|
||||
nsMathMLElement::SetIncrementScriptLevel(bool aIncrementScriptLevel,
|
||||
bool aNotify)
|
||||
MathMLElement::SetIncrementScriptLevel(bool aIncrementScriptLevel,
|
||||
bool aNotify)
|
||||
{
|
||||
if (aIncrementScriptLevel == mIncrementScriptLevel)
|
||||
return;
|
||||
@@ -961,26 +974,55 @@ nsMathMLElement::SetIncrementScriptLevel(bool aIncrementScriptLevel,
|
||||
UpdateState(true);
|
||||
}
|
||||
|
||||
bool
|
||||
nsMathMLElement::IsFocusableInternal(int32_t* aTabIndex, bool aWithMouse)
|
||||
int32_t
|
||||
MathMLElement::TabIndexDefault()
|
||||
{
|
||||
nsCOMPtr<nsIURI> uri;
|
||||
if (IsLink(getter_AddRefs(uri))) {
|
||||
return IsLink(getter_AddRefs(uri)) ? 0 : -1;
|
||||
}
|
||||
|
||||
// XXX Bug 1586011: Share logic with other element classes.
|
||||
bool
|
||||
MathMLElement::IsFocusableInternal(int32_t* aTabIndex, bool aWithMouse)
|
||||
{
|
||||
nsIDocument* doc = GetComposedDoc();
|
||||
if (!doc || doc->HasFlag(NODE_IS_EDITABLE)) {
|
||||
// In designMode documents we only allow focusing the document.
|
||||
if (aTabIndex) {
|
||||
*aTabIndex = ((sTabFocusModel & eTabFocus_linksMask) == 0 ? -1 : 0);
|
||||
*aTabIndex = -1;
|
||||
}
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
int32_t tabIndex = TabIndex();
|
||||
if (aTabIndex) {
|
||||
*aTabIndex = tabIndex;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIURI> uri;
|
||||
if (!IsLink(getter_AddRefs(uri))) {
|
||||
// If a tabindex is specified at all we're focusable
|
||||
return HasAttr(kNameSpaceID_None, nsGkAtoms::tabindex);
|
||||
}
|
||||
|
||||
// Links that are in an editable region should never be focusable, even if
|
||||
// they are in a contenteditable="false" region.
|
||||
if (nsContentUtils::IsNodeInEditableRegion(this)) {
|
||||
if (aTabIndex) {
|
||||
*aTabIndex = -1;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
if (aTabIndex && (sTabFocusModel & eTabFocus_linksMask) == 0) {
|
||||
*aTabIndex = -1;
|
||||
}
|
||||
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
nsMathMLElement::IsLink(nsIURI** aURI) const
|
||||
MathMLElement::IsLink(nsIURI** aURI) const
|
||||
{
|
||||
// http://www.w3.org/TR/2010/REC-MathML3-20101021/chapter6.html#interf.link
|
||||
// The REC says that the following elements should not be linking elements:
|
||||
@@ -1051,7 +1093,7 @@ nsMathMLElement::IsLink(nsIURI** aURI) const
|
||||
}
|
||||
|
||||
void
|
||||
nsMathMLElement::GetLinkTarget(nsAString& aTarget)
|
||||
MathMLElement::GetLinkTarget(nsAString& aTarget)
|
||||
{
|
||||
const nsAttrValue* target = mAttrsAndChildren.GetAttr(nsGkAtoms::target,
|
||||
kNameSpaceID_XLink);
|
||||
@@ -1077,14 +1119,59 @@ nsMathMLElement::GetLinkTarget(nsAString& aTarget)
|
||||
}
|
||||
|
||||
already_AddRefed<nsIURI>
|
||||
nsMathMLElement::GetHrefURI() const
|
||||
MathMLElement::GetHrefURI() const
|
||||
{
|
||||
nsCOMPtr<nsIURI> hrefURI;
|
||||
return IsLink(getter_AddRefs(hrefURI)) ? hrefURI.forget() : nullptr;
|
||||
}
|
||||
|
||||
// XXX Bug 1586014: Share logic with other element classes.
|
||||
void
|
||||
MathMLElement::RecompileScriptEventListeners() {
|
||||
int32_t i, count = mAttrsAndChildren.AttrCount();
|
||||
for (i = 0; i < count; ++i) {
|
||||
const nsAttrName* name = mAttrsAndChildren.AttrNameAt(i);
|
||||
|
||||
// Eventlistenener-attributes are always in the null namespace
|
||||
if (!name->IsAtom()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
nsIAtom* attr = name->Atom();
|
||||
if (!IsEventAttributeName(attr)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
nsAutoString value;
|
||||
GetAttr(kNameSpaceID_None, attr, value);
|
||||
SetEventHandler(attr, value, true);
|
||||
}
|
||||
}
|
||||
|
||||
bool
|
||||
MathMLElement::IsEventAttributeNameInternal(nsIAtom* aName) {
|
||||
// The intent is to align MathML event attributes on HTML5, so the flag
|
||||
// EventNameType_HTML is used here.
|
||||
return nsContentUtils::IsEventAttributeName(aName, EventNameType_HTML);
|
||||
}
|
||||
|
||||
nsresult
|
||||
nsMathMLElement::AfterSetAttr(int32_t aNameSpaceID, nsIAtom* aName,
|
||||
MathMLElement::BeforeSetAttr(int32_t aNamespaceID, nsIAtom* aName,
|
||||
const nsAttrValueOrString* aValue,
|
||||
bool aNotify) {
|
||||
if (aNamespaceID == kNameSpaceID_None) {
|
||||
if (!aValue && IsEventAttributeName(aName)) {
|
||||
if (EventListenerManager* manager = GetExistingListenerManager()) {
|
||||
manager->RemoveEventHandler(aName, EmptyString());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return MathMLElementBase::BeforeSetAttr(aNamespaceID, aName, aValue, aNotify);
|
||||
}
|
||||
|
||||
nsresult
|
||||
MathMLElement::AfterSetAttr(int32_t aNameSpaceID, nsIAtom* aName,
|
||||
const nsAttrValue* aValue,
|
||||
const nsAttrValue* aOldValue,
|
||||
nsIPrincipal* aSubjectPrincipal,
|
||||
@@ -1105,13 +1192,22 @@ nsMathMLElement::AfterSetAttr(int32_t aNameSpaceID, nsIAtom* aName,
|
||||
Link::ResetLinkState(aNotify, aValue || Link::ElementHasHref());
|
||||
}
|
||||
|
||||
return nsMathMLElementBase::AfterSetAttr(aNameSpaceID, aName, aValue,
|
||||
aOldValue, aSubjectPrincipal,
|
||||
aNotify);
|
||||
if (aNameSpaceID == kNameSpaceID_None) {
|
||||
if (IsEventAttributeName(aName) && aValue) {
|
||||
MOZ_ASSERT(aValue->Type() == nsAttrValue::eString,
|
||||
"Expected string value for script body");
|
||||
nsresult rv = SetEventHandler(aName, aValue->GetStringValue());
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
}
|
||||
}
|
||||
|
||||
return MathMLElementBase::AfterSetAttr(aNameSpaceID, aName, aValue,
|
||||
aOldValue, aSubjectPrincipal,
|
||||
aNotify);
|
||||
}
|
||||
|
||||
JSObject*
|
||||
nsMathMLElement::WrapNode(JSContext *aCx, JS::Handle<JSObject*> aGivenProto)
|
||||
MathMLElement::WrapNode(JSContext *aCx, JS::Handle<JSObject*> aGivenProto)
|
||||
{
|
||||
return ElementBinding::Wrap(aCx, this, aGivenProto);
|
||||
return MathMLElementBinding::Wrap(aCx, this, aGivenProto);
|
||||
}
|
||||
@@ -3,8 +3,8 @@
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#ifndef nsMathMLElement_h
|
||||
#define nsMathMLElement_h
|
||||
#ifndef mozilla_dom_MathMLElement_h_
|
||||
#define mozilla_dom_MathMLElement_h_
|
||||
|
||||
#include "mozilla/Attributes.h"
|
||||
#include "mozilla/dom/ElementInlines.h"
|
||||
@@ -15,28 +15,30 @@
|
||||
|
||||
class nsCSSValue;
|
||||
|
||||
typedef nsMappedAttributeElement nsMathMLElementBase;
|
||||
|
||||
namespace mozilla {
|
||||
class EventChainPostVisitor;
|
||||
class EventChainPreVisitor;
|
||||
} // namespace mozilla
|
||||
namespace dom {
|
||||
|
||||
typedef nsMappedAttributeElement MathMLElementBase;
|
||||
|
||||
/*
|
||||
* The base class for MathML elements.
|
||||
*/
|
||||
class nsMathMLElement final : public nsMathMLElementBase,
|
||||
public nsIDOMElement,
|
||||
public mozilla::dom::Link
|
||||
class MathMLElement final : public MathMLElementBase,
|
||||
public nsIDOMElement,
|
||||
public mozilla::dom::Link
|
||||
{
|
||||
public:
|
||||
explicit nsMathMLElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo);
|
||||
explicit nsMathMLElement(already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
|
||||
explicit MathMLElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo);
|
||||
explicit MathMLElement(already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
|
||||
|
||||
// Implementation of nsISupports is inherited from nsMathMLElementBase
|
||||
// Implementation of nsISupports is inherited from MathMLElementBase
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
|
||||
// Forward implementations of parent interfaces of nsMathMLElement to
|
||||
NS_IMPL_FROMCONTENT(MathMLElement, kNameSpaceID_MathML)
|
||||
|
||||
// Forward implementations of parent interfaces of MathMLElement to
|
||||
// our base class
|
||||
NS_FORWARD_NSIDOMNODE_TO_NSINODE
|
||||
NS_FORWARD_NSIDOMELEMENT_TO_GENERIC
|
||||
@@ -88,6 +90,7 @@ public:
|
||||
return mIncrementScriptLevel;
|
||||
}
|
||||
|
||||
int32_t TabIndexDefault() final;
|
||||
virtual bool IsFocusableInternal(int32_t* aTabIndex, bool aWithMouse) override;
|
||||
virtual bool IsLink(nsIURI** aURI) const override;
|
||||
virtual void GetLinkTarget(nsAString& aTarget) override;
|
||||
@@ -95,11 +98,16 @@ public:
|
||||
|
||||
virtual nsIDOMNode* AsDOMNode() override { return this; }
|
||||
|
||||
void RecompileScriptEventListeners() override;
|
||||
bool IsEventAttributeNameInternal(nsIAtom* aName);
|
||||
|
||||
protected:
|
||||
virtual ~nsMathMLElement() {}
|
||||
virtual ~MathMLElement() {}
|
||||
|
||||
virtual JSObject* WrapNode(JSContext *aCx, JS::Handle<JSObject*> aGivenProto) override;
|
||||
|
||||
nsresult BeforeSetAttr(int32_t aNamespaceID, nsIAtom* aName,
|
||||
const nsAttrValueOrString* aValue, bool aNotify) override;
|
||||
virtual nsresult AfterSetAttr(int32_t aNameSpaceID, nsIAtom* aName,
|
||||
const nsAttrValue* aValue,
|
||||
const nsAttrValue* aOldValue,
|
||||
@@ -110,4 +118,7 @@ private:
|
||||
bool mIncrementScriptLevel;
|
||||
};
|
||||
|
||||
#endif // nsMathMLElement_h
|
||||
} // namespace dom
|
||||
} // namespace mozilla
|
||||
|
||||
#endif // mozilla_dom_MathMLElement_h_
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
#include "nsContentCreatorFunctions.h"
|
||||
#include "nsGkAtoms.h"
|
||||
#include "nsMathMLElement.h"
|
||||
#include "mozilla/dom/MathMLElement.h"
|
||||
|
||||
using namespace mozilla::dom;
|
||||
|
||||
@@ -13,6 +13,6 @@ using namespace mozilla::dom;
|
||||
nsresult
|
||||
NS_NewMathMLElement(Element** aResult, already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo)
|
||||
{
|
||||
NS_ADDREF(*aResult = new nsMathMLElement(aNodeInfo));
|
||||
NS_ADDREF(*aResult = new MathMLElement(aNodeInfo));
|
||||
return NS_OK;
|
||||
}
|
||||
@@ -3,9 +3,13 @@
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
EXPORTS.mozilla.dom += [
|
||||
'MathMLElement.h',
|
||||
]
|
||||
|
||||
UNIFIED_SOURCES += [
|
||||
'nsMathMLElement.cpp',
|
||||
'nsMathMLElementFactory.cpp',
|
||||
'MathMLElement.cpp',
|
||||
'MathMLElementFactory.cpp',
|
||||
]
|
||||
|
||||
include('/ipc/chromium/chromium-config.mozbuild')
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
[NoInterfaceObject, Exposed=(Window,Worker,System)]
|
||||
interface AbstractWorker {
|
||||
[Exposed=(Window,Worker)]
|
||||
interface mixin AbstractWorker {
|
||||
attribute EventHandler onerror;
|
||||
};
|
||||
@@ -45,4 +45,4 @@ interface AnalyserNode : AudioNode {
|
||||
};
|
||||
|
||||
// Mozilla extension
|
||||
AnalyserNode implements AudioNodePassThrough;
|
||||
AnalyserNode includes AudioNodePassThrough;
|
||||
@@ -18,8 +18,7 @@ dictionary AnimationFilter {
|
||||
boolean subtree = false;
|
||||
};
|
||||
|
||||
[NoInterfaceObject]
|
||||
interface Animatable {
|
||||
interface mixin Animatable {
|
||||
[Func="nsDocument::IsElementAnimateEnabled", Throws]
|
||||
Animation animate(object? keyframes,
|
||||
optional UnrestrictedDoubleOrKeyframeAnimationOptions options);
|
||||
|
||||
@@ -42,4 +42,4 @@ interface AudioBufferSourceNode : AudioNode {
|
||||
};
|
||||
|
||||
// Mozilla extensions
|
||||
AudioBufferSourceNode implements AudioNodePassThrough;
|
||||
AudioBufferSourceNode includes AudioNodePassThrough;
|
||||
@@ -67,8 +67,7 @@ partial interface AudioNode {
|
||||
[ChromeOnly]
|
||||
readonly attribute unsigned long id;
|
||||
};
|
||||
[NoInterfaceObject]
|
||||
interface AudioNodePassThrough {
|
||||
interface mixin AudioNodePassThrough {
|
||||
[ChromeOnly]
|
||||
attribute boolean passThrough;
|
||||
};
|
||||
|
||||
@@ -46,5 +46,5 @@ interface BiquadFilterNode : AudioNode {
|
||||
};
|
||||
|
||||
// Mozilla extension
|
||||
BiquadFilterNode implements AudioNodePassThrough;
|
||||
BiquadFilterNode includes AudioNodePassThrough;
|
||||
|
||||
@@ -27,8 +27,8 @@ interface Blob {
|
||||
//slice Blob into byte-ranged chunks
|
||||
|
||||
[Throws]
|
||||
Blob slice([Clamp] optional long long start,
|
||||
[Clamp] optional long long end,
|
||||
Blob slice(optional [Clamp] long long start,
|
||||
optional [Clamp] long long end,
|
||||
optional DOMString contentType = "");
|
||||
|
||||
// void close(); TODO bug 1048325
|
||||
|
||||
@@ -19,15 +19,7 @@ dictionary BrowserElementExecuteScriptOptions {
|
||||
DOMString? origin;
|
||||
};
|
||||
|
||||
[NoInterfaceObject]
|
||||
interface BrowserElement {
|
||||
};
|
||||
|
||||
BrowserElement implements BrowserElementCommon;
|
||||
BrowserElement implements BrowserElementPrivileged;
|
||||
|
||||
[NoInterfaceObject]
|
||||
interface BrowserElementCommon {
|
||||
interface mixin BrowserElementCommon {
|
||||
[Throws,
|
||||
Pref="dom.mozBrowserFramesEnabled",
|
||||
ChromeOnly]
|
||||
@@ -60,7 +52,7 @@ interface BrowserElementCommon {
|
||||
};
|
||||
|
||||
[NoInterfaceObject]
|
||||
interface BrowserElementPrivileged {
|
||||
interface BrowserElement {
|
||||
[Throws,
|
||||
Pref="dom.mozBrowserFramesEnabled",
|
||||
ChromeOnly]
|
||||
@@ -176,3 +168,6 @@ interface BrowserElementPrivileged {
|
||||
DOMRequest getWebManifest();
|
||||
|
||||
};
|
||||
|
||||
BrowserElement includes BrowserElementCommon;
|
||||
|
||||
@@ -29,7 +29,7 @@ interface BrowserElementAudioChannel : EventTarget {
|
||||
DOMRequest isActive();
|
||||
};
|
||||
|
||||
partial interface BrowserElementPrivileged {
|
||||
interface mixin BrowserElementPrivileged {
|
||||
[Pure, Cached, Throws,
|
||||
Pref="dom.mozBrowserFramesEnabled",
|
||||
ChromeOnly]
|
||||
|
||||
@@ -11,5 +11,5 @@
|
||||
ChromeOnly]
|
||||
interface BrowserElementProxy : EventTarget {
|
||||
};
|
||||
BrowserElementProxy implements BrowserElementCommon;
|
||||
BrowserElementProxy implements BrowserElementPrivileged;
|
||||
BrowserElementProxy includes BrowserElementCommon;
|
||||
BrowserElementProxy includes BrowserElementPrivileged;
|
||||
@@ -22,4 +22,4 @@ interface CSSPseudoElement {
|
||||
};
|
||||
|
||||
// https://w3c.github.io/web-animations/#extensions-to-the-pseudoelement-interface
|
||||
CSSPseudoElement implements Animatable;
|
||||
CSSPseudoElement includes Animatable;
|
||||
@@ -21,7 +21,7 @@ interface CSSStyleDeclaration {
|
||||
CSSValue? getPropertyCSSValue(DOMString property);
|
||||
DOMString getPropertyPriority(DOMString property);
|
||||
[CEReactions, Throws]
|
||||
void setProperty(DOMString property, [TreatNullAs=EmptyString] DOMString value, [TreatNullAs=EmptyString] optional DOMString priority = "");
|
||||
void setProperty(DOMString property, [TreatNullAs=EmptyString] DOMString value, optional [TreatNullAs=EmptyString] DOMString priority = "");
|
||||
[CEReactions, Throws]
|
||||
DOMString removeProperty(DOMString property);
|
||||
|
||||
|
||||
@@ -17,9 +17,9 @@ interface Cache {
|
||||
Promise<Response> match(RequestInfo request, optional CacheQueryOptions options);
|
||||
[NewObject]
|
||||
Promise<sequence<Response>> matchAll(optional RequestInfo request, optional CacheQueryOptions options);
|
||||
[NewObject]
|
||||
[NewObject, NeedsCallerType]
|
||||
Promise<void> add(RequestInfo request);
|
||||
[NewObject]
|
||||
[NewObject, NeedsCallerType]
|
||||
Promise<void> addAll(sequence<RequestInfo> requests);
|
||||
[NewObject]
|
||||
Promise<void> put(RequestInfo request, Response response);
|
||||
|
||||
@@ -59,7 +59,7 @@ interface CanvasRenderingContext2D {
|
||||
DOMMatrix getTransform();
|
||||
[Throws, LenientFloat]
|
||||
void setTransform(double a, double b, double c, double d, double e, double f);
|
||||
[Throws, LenientFloat]
|
||||
[Throws]
|
||||
void setTransform(optional DOMMatrix2DInit transform);
|
||||
[Throws]
|
||||
void resetTransform();
|
||||
@@ -239,11 +239,10 @@ interface CanvasRenderingContext2D {
|
||||
[ChromeOnly]
|
||||
void demote();
|
||||
};
|
||||
CanvasRenderingContext2D implements CanvasDrawingStyles;
|
||||
CanvasRenderingContext2D implements CanvasPathMethods;
|
||||
CanvasRenderingContext2D includes CanvasDrawingStyles;
|
||||
CanvasRenderingContext2D includes CanvasPathMethods;
|
||||
|
||||
[NoInterfaceObject]
|
||||
interface CanvasDrawingStyles {
|
||||
interface mixin CanvasDrawingStyles {
|
||||
// line caps/joins
|
||||
[LenientFloat]
|
||||
attribute double lineWidth; // (default 1)
|
||||
@@ -265,8 +264,7 @@ interface CanvasDrawingStyles {
|
||||
attribute DOMString textBaseline; // "top", "hanging", "middle", "alphabetic", "ideographic", "bottom" (default: "alphabetic")
|
||||
};
|
||||
|
||||
[NoInterfaceObject]
|
||||
interface CanvasPathMethods {
|
||||
interface mixin CanvasPathMethods {
|
||||
// shared path API methods
|
||||
void closePath();
|
||||
[LenientFloat]
|
||||
@@ -342,4 +340,4 @@ interface Path2D
|
||||
{
|
||||
[Throws] void addPath(Path2D path, optional DOMMatrix2DInit transformation);
|
||||
};
|
||||
Path2D implements CanvasPathMethods;
|
||||
Path2D includes CanvasPathMethods;
|
||||
@@ -11,8 +11,8 @@
|
||||
*/
|
||||
|
||||
interface CharacterData : Node {
|
||||
[TreatNullAs=EmptyString, Pure, SetterThrows]
|
||||
attribute DOMString data;
|
||||
[Pure, SetterThrows]
|
||||
attribute [TreatNullAs=EmptyString] DOMString data;
|
||||
[Pure]
|
||||
readonly attribute unsigned long length;
|
||||
[Throws]
|
||||
@@ -27,5 +27,5 @@ interface CharacterData : Node {
|
||||
void replaceData(unsigned long offset, unsigned long count, DOMString data);
|
||||
};
|
||||
|
||||
CharacterData implements ChildNode;
|
||||
CharacterData implements NonDocumentTypeChildNode;
|
||||
CharacterData includes ChildNode;
|
||||
CharacterData includes NonDocumentTypeChildNode;
|
||||
@@ -7,8 +7,7 @@
|
||||
* http://dom.spec.whatwg.org/#interface-childnode
|
||||
*/
|
||||
|
||||
[NoInterfaceObject]
|
||||
interface ChildNode {
|
||||
interface mixin ChildNode {
|
||||
[CEReactions, Throws, Unscopable]
|
||||
void before((Node or DOMString)... nodes);
|
||||
[CEReactions, Throws, Unscopable]
|
||||
@@ -19,8 +18,7 @@ interface ChildNode {
|
||||
void remove();
|
||||
};
|
||||
|
||||
[NoInterfaceObject]
|
||||
interface NonDocumentTypeChildNode {
|
||||
interface mixin NonDocumentTypeChildNode {
|
||||
[Pure]
|
||||
readonly attribute Element? previousElementSibling;
|
||||
[Pure]
|
||||
|
||||
@@ -26,5 +26,5 @@ interface ConvolverNode : AudioNode {
|
||||
};
|
||||
|
||||
// Mozilla extension
|
||||
ConvolverNode implements AudioNodePassThrough;
|
||||
ConvolverNode includes AudioNodePassThrough;
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
* https://dvcs.w3.org/hg/webcrypto-api/raw-file/tip/spec/Overview.html#crypto-interface
|
||||
*/
|
||||
|
||||
[NoInterfaceObject, Exposed=(Window,Worker)]
|
||||
interface GlobalCrypto {
|
||||
[Exposed=(Window,Worker)]
|
||||
interface mixin GlobalCrypto {
|
||||
[Throws] readonly attribute Crypto crypto;
|
||||
};
|
||||
|
||||
|
||||
@@ -10,4 +10,4 @@ interface DOMCursor : EventTarget {
|
||||
void continue();
|
||||
};
|
||||
|
||||
DOMCursor implements DOMRequestShared;
|
||||
DOMCursor includes DOMRequestShared;
|
||||
@@ -15,9 +15,7 @@
|
||||
|
||||
interface StackFrame;
|
||||
|
||||
[NoInterfaceObject,
|
||||
Exposed=(Window,Worker)]
|
||||
interface ExceptionMembers
|
||||
interface mixin ExceptionMembers
|
||||
{
|
||||
// A custom message set by the thrower. LenientThis so it can be
|
||||
// gotten on the prototype, which Error.prototype.toString will do
|
||||
@@ -68,7 +66,7 @@ interface Exception {
|
||||
stringifier;
|
||||
};
|
||||
|
||||
Exception implements ExceptionMembers;
|
||||
Exception includes ExceptionMembers;
|
||||
|
||||
// XXXkhuey this is an 'exception', not an interface, but we don't have any
|
||||
// parser or codegen mechanisms for dealing with exceptions.
|
||||
@@ -107,4 +105,4 @@ interface DOMException {
|
||||
|
||||
// XXXkhuey copy all of Gecko's non-standard stuff onto DOMException, but leave
|
||||
// the prototype chain sane.
|
||||
DOMException implements ExceptionMembers;
|
||||
DOMException includes ExceptionMembers;
|
||||
@@ -5,8 +5,8 @@
|
||||
|
||||
enum DOMRequestReadyState { "pending", "done" };
|
||||
|
||||
[Exposed=(Window,Worker,System), NoInterfaceObject]
|
||||
interface DOMRequestShared {
|
||||
[Exposed=(Window,Worker)]
|
||||
interface mixin DOMRequestShared {
|
||||
readonly attribute DOMRequestReadyState readyState;
|
||||
|
||||
readonly attribute any result;
|
||||
@@ -26,4 +26,4 @@ interface DOMRequest : EventTarget {
|
||||
[TreatNonCallableAsNull] optional AnyCallback? rejectCallback = null);
|
||||
};
|
||||
|
||||
DOMRequest implements DOMRequestShared;
|
||||
DOMRequest includes DOMRequestShared;
|
||||
@@ -24,5 +24,5 @@ interface DelayNode : AudioNode {
|
||||
};
|
||||
|
||||
// Mozilla extension
|
||||
DelayNode implements AudioNodePassThrough;
|
||||
DelayNode includes AudioNodePassThrough;
|
||||
|
||||
@@ -155,9 +155,6 @@ partial interface Document {
|
||||
|
||||
// Gecko extensions?
|
||||
attribute EventHandler onwheel;
|
||||
attribute EventHandler oncopy;
|
||||
attribute EventHandler oncut;
|
||||
attribute EventHandler onpaste;
|
||||
attribute EventHandler onbeforescriptexecute;
|
||||
attribute EventHandler onafterscriptexecute;
|
||||
|
||||
@@ -440,11 +437,12 @@ partial interface Document {
|
||||
[Func="IsChromeOrXBL"] readonly attribute boolean inlineScriptAllowedByCSP;
|
||||
};
|
||||
|
||||
Document implements XPathEvaluator;
|
||||
Document implements GlobalEventHandlers;
|
||||
Document implements TouchEventHandlers;
|
||||
Document implements ParentNode;
|
||||
Document implements OnErrorEventHandlerForNodes;
|
||||
Document implements GeometryUtils;
|
||||
Document implements FontFaceSource;
|
||||
Document implements DocumentOrShadowRoot;
|
||||
Document includes XPathEvaluatorMixin;
|
||||
Document includes GlobalEventHandlers;
|
||||
Document includes DocumentAndElementEventHandlers;
|
||||
Document includes TouchEventHandlers;
|
||||
Document includes ParentNode;
|
||||
Document includes OnErrorEventHandlerForNodes;
|
||||
Document includes GeometryUtils;
|
||||
Document includes FontFaceSource;
|
||||
Document includes DocumentOrShadowRoot;
|
||||
@@ -24,4 +24,4 @@ partial interface DocumentFragment {
|
||||
NodeList querySelectorAll(DOMString selectors);
|
||||
};
|
||||
|
||||
DocumentFragment implements ParentNode;
|
||||
DocumentFragment includes ParentNode;
|
||||
@@ -8,8 +8,7 @@
|
||||
* http://w3c.github.io/webcomponents/spec/shadow/#extensions-to-the-documentorshadowroot-mixin
|
||||
*/
|
||||
|
||||
[NoInterfaceObject]
|
||||
interface DocumentOrShadowRoot {
|
||||
interface mixin DocumentOrShadowRoot {
|
||||
// Not implemented yet: bug 1430308.
|
||||
// Selection? getSelection();
|
||||
Element? elementFromPoint (float x, float y);
|
||||
|
||||
@@ -16,4 +16,4 @@ interface DocumentType : Node {
|
||||
readonly attribute DOMString systemId;
|
||||
};
|
||||
|
||||
DocumentType implements ChildNode;
|
||||
DocumentType includes ChildNode;
|
||||
@@ -32,5 +32,5 @@ interface DynamicsCompressorNode : AudioNode {
|
||||
};
|
||||
|
||||
// Mozilla extension
|
||||
DynamicsCompressorNode implements AudioNodePassThrough;
|
||||
DynamicsCompressorNode includes AudioNodePassThrough;
|
||||
|
||||
@@ -163,6 +163,29 @@ interface Element : Node {
|
||||
sequence<Grid> getGridFragments();
|
||||
};
|
||||
|
||||
// https://drafts.csswg.org/cssom/#the-elementcssinlinestyle-mixin
|
||||
interface mixin ElementCSSInlineStyle {
|
||||
[SameObject, PutForwards=cssText]
|
||||
readonly attribute CSSStyleDeclaration style;
|
||||
};
|
||||
|
||||
// https://html.spec.whatwg.org/#focus-management-apis
|
||||
dictionary FocusOptions {
|
||||
boolean preventScroll = false;
|
||||
};
|
||||
|
||||
interface mixin HTMLOrForeignElement {
|
||||
[SameObject] readonly attribute DOMStringMap dataset;
|
||||
// See bug 1389421
|
||||
// attribute DOMString nonce; // intentionally no [CEReactions]
|
||||
|
||||
// See bug 1575154
|
||||
// [CEReactions] attribute boolean autofocus;
|
||||
[CEReactions, SetterThrows, Pure] attribute long tabIndex;
|
||||
[Throws] void focus(optional FocusOptions options);
|
||||
[Throws] void blur();
|
||||
};
|
||||
|
||||
// http://dev.w3.org/csswg/cssom-view/
|
||||
enum ScrollLogicalPosition { "start", "center", "end", "nearest" };
|
||||
dictionary ScrollIntoViewOptions : ScrollOptions {
|
||||
@@ -212,10 +235,10 @@ partial interface Element {
|
||||
|
||||
// http://domparsing.spec.whatwg.org/#extensions-to-the-element-interface
|
||||
partial interface Element {
|
||||
[CEReactions, Pure,SetterThrows,TreatNullAs=EmptyString]
|
||||
attribute DOMString innerHTML;
|
||||
[CEReactions, Pure,SetterThrows,TreatNullAs=EmptyString]
|
||||
attribute DOMString outerHTML;
|
||||
[CEReactions, Pure, SetterThrows]
|
||||
attribute [TreatNullAs=EmptyString] DOMString innerHTML;
|
||||
[CEReactions, Pure, SetterThrows]
|
||||
attribute [TreatNullAs=EmptyString] DOMString outerHTML;
|
||||
[CEReactions, Throws]
|
||||
void insertAdjacentHTML(DOMString position, DOMString text);
|
||||
};
|
||||
@@ -246,11 +269,11 @@ partial interface Element {
|
||||
attribute DOMString slot;
|
||||
};
|
||||
|
||||
Element implements ChildNode;
|
||||
Element implements NonDocumentTypeChildNode;
|
||||
Element implements ParentNode;
|
||||
Element implements Animatable;
|
||||
Element implements GeometryUtils;
|
||||
Element includes ChildNode;
|
||||
Element includes NonDocumentTypeChildNode;
|
||||
Element includes ParentNode;
|
||||
Element includes Animatable;
|
||||
Element includes GeometryUtils;
|
||||
|
||||
// https://fullscreen.spec.whatwg.org/#api
|
||||
partial interface Element {
|
||||
|
||||
@@ -24,8 +24,7 @@ typedef OnBeforeUnloadEventHandlerNonNull? OnBeforeUnloadEventHandler;
|
||||
callback OnErrorEventHandlerNonNull = boolean ((Event or DOMString) event, optional DOMString source, optional unsigned long lineno, optional unsigned long column, optional any error);
|
||||
typedef OnErrorEventHandlerNonNull? OnErrorEventHandler;
|
||||
|
||||
[NoInterfaceObject]
|
||||
interface GlobalEventHandlers {
|
||||
interface mixin GlobalEventHandlers {
|
||||
attribute EventHandler onabort;
|
||||
attribute EventHandler onblur;
|
||||
// We think the spec is wrong here. See OnErrorEventHandlerForNodes/Window
|
||||
@@ -147,8 +146,7 @@ interface GlobalEventHandlers {
|
||||
attribute EventHandler onwebkittransitionend;
|
||||
};
|
||||
|
||||
[NoInterfaceObject]
|
||||
interface WindowEventHandlers {
|
||||
interface mixin WindowEventHandlers {
|
||||
attribute EventHandler onafterprint;
|
||||
attribute EventHandler onbeforeprint;
|
||||
attribute OnBeforeUnloadEventHandler onbeforeunload;
|
||||
@@ -166,17 +164,21 @@ interface WindowEventHandlers {
|
||||
attribute EventHandler onunload;
|
||||
};
|
||||
|
||||
interface mixin DocumentAndElementEventHandlers {
|
||||
attribute EventHandler oncopy;
|
||||
attribute EventHandler oncut;
|
||||
attribute EventHandler onpaste;
|
||||
};
|
||||
|
||||
// The spec has |attribute OnErrorEventHandler onerror;| on
|
||||
// GlobalEventHandlers, and calls the handler differently depending on
|
||||
// whether an ErrorEvent was fired. We don't do that, and until we do we'll
|
||||
// need to distinguish between onerror on Window or on nodes.
|
||||
|
||||
[NoInterfaceObject]
|
||||
interface OnErrorEventHandlerForNodes {
|
||||
interface mixin OnErrorEventHandlerForNodes {
|
||||
attribute EventHandler onerror;
|
||||
};
|
||||
|
||||
[NoInterfaceObject]
|
||||
interface OnErrorEventHandlerForWindow {
|
||||
interface mixin OnErrorEventHandlerForWindow {
|
||||
attribute OnErrorEventHandler onerror;
|
||||
};
|
||||
@@ -10,8 +10,7 @@
|
||||
typedef object JSON;
|
||||
typedef (Blob or BufferSource or FormData or URLSearchParams or USVString) BodyInit;
|
||||
|
||||
[NoInterfaceObject, Exposed=(Window,Worker)]
|
||||
interface Body {
|
||||
interface mixin Body {
|
||||
readonly attribute boolean bodyUsed;
|
||||
[Throws]
|
||||
Promise<ArrayBuffer> arrayBuffer();
|
||||
|
||||
@@ -10,8 +10,7 @@
|
||||
* liability, trademark and document use rules apply.
|
||||
*/
|
||||
|
||||
[NoInterfaceObject]
|
||||
interface FontFaceSource {
|
||||
interface mixin FontFaceSource {
|
||||
|
||||
[Pref="layout.css.font-loading-api.enabled"]
|
||||
readonly attribute FontFaceSet fonts;
|
||||
|
||||
@@ -23,5 +23,5 @@ interface GainNode : AudioNode {
|
||||
};
|
||||
|
||||
// Mozilla extension
|
||||
GainNode implements AudioNodePassThrough;
|
||||
GainNode includes AudioNodePassThrough;
|
||||
|
||||
@@ -21,8 +21,7 @@ dictionary ConvertCoordinateOptions {
|
||||
CSSBoxType toBox = "border";
|
||||
};
|
||||
|
||||
[NoInterfaceObject]
|
||||
interface GeometryUtils {
|
||||
interface mixin GeometryUtils {
|
||||
[Throws, Func="nsINode::HasBoxQuadsSupport"]
|
||||
sequence<DOMQuad> getBoxQuads(optional BoxQuadOptions options);
|
||||
[Throws, Pref="layout.css.convertFromNode.enabled"]
|
||||
@@ -33,6 +32,6 @@ interface GeometryUtils {
|
||||
DOMPoint convertPointFromNode(DOMPointInit point, GeometryNode from, optional ConvertCoordinateOptions options);
|
||||
};
|
||||
|
||||
// PseudoElement implements GeometryUtils;
|
||||
// PseudoElement includes GeometryUtils;
|
||||
|
||||
typedef (Text or Element /* or PseudoElement */ or Document) GeometryNode;
|
||||
@@ -35,7 +35,7 @@ interface HTMLAnchorElement : HTMLElement {
|
||||
attribute DOMString text;
|
||||
};
|
||||
|
||||
HTMLAnchorElement implements HTMLHyperlinkElementUtils;
|
||||
HTMLAnchorElement includes HTMLHyperlinkElementUtils;
|
||||
|
||||
// http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
|
||||
partial interface HTMLAnchorElement {
|
||||
|
||||
@@ -38,6 +38,6 @@ interface HTMLAppletElement : HTMLElement {
|
||||
attribute DOMString width;
|
||||
};
|
||||
|
||||
HTMLAppletElement implements MozImageLoadingContent;
|
||||
HTMLAppletElement implements MozFrameLoaderOwner;
|
||||
HTMLAppletElement implements MozObjectLoadingContent;
|
||||
HTMLAppletElement includes MozImageLoadingContent;
|
||||
HTMLAppletElement includes MozFrameLoaderOwner;
|
||||
HTMLAppletElement includes MozObjectLoadingContent;
|
||||
@@ -35,7 +35,7 @@ interface HTMLAreaElement : HTMLElement {
|
||||
readonly attribute DOMTokenList relList;
|
||||
};
|
||||
|
||||
HTMLAreaElement implements HTMLHyperlinkElementUtils;
|
||||
HTMLAreaElement includes HTMLHyperlinkElementUtils;
|
||||
|
||||
// http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
|
||||
partial interface HTMLAreaElement {
|
||||
|
||||
@@ -16,18 +16,18 @@ interface HTMLBodyElement : HTMLElement {
|
||||
};
|
||||
|
||||
partial interface HTMLBodyElement {
|
||||
[CEReactions, TreatNullAs=EmptyString, SetterThrows]
|
||||
attribute DOMString text;
|
||||
[CEReactions, TreatNullAs=EmptyString, SetterThrows]
|
||||
attribute DOMString link;
|
||||
[CEReactions, TreatNullAs=EmptyString, SetterThrows]
|
||||
attribute DOMString vLink;
|
||||
[CEReactions, TreatNullAs=EmptyString, SetterThrows]
|
||||
attribute DOMString aLink;
|
||||
[CEReactions, TreatNullAs=EmptyString, SetterThrows]
|
||||
attribute DOMString bgColor;
|
||||
[CEReactions, SetterThrows]
|
||||
attribute [TreatNullAs=EmptyString] DOMString text;
|
||||
[CEReactions, SetterThrows]
|
||||
attribute [TreatNullAs=EmptyString] DOMString link;
|
||||
[CEReactions, SetterThrows]
|
||||
attribute [TreatNullAs=EmptyString] DOMString vLink;
|
||||
[CEReactions, SetterThrows]
|
||||
attribute [TreatNullAs=EmptyString] DOMString aLink;
|
||||
[CEReactions, SetterThrows]
|
||||
attribute [TreatNullAs=EmptyString] DOMString bgColor;
|
||||
[CEReactions, SetterThrows]
|
||||
attribute DOMString background;
|
||||
};
|
||||
|
||||
HTMLBodyElement implements WindowEventHandlers;
|
||||
HTMLBodyElement includes WindowEventHandlers;
|
||||
@@ -57,11 +57,11 @@ interface HTMLDocument : Document {
|
||||
[Throws]
|
||||
DOMString queryCommandValue(DOMString commandId);
|
||||
|
||||
[CEReactions, TreatNullAs=EmptyString] attribute DOMString fgColor;
|
||||
[CEReactions, TreatNullAs=EmptyString] attribute DOMString linkColor;
|
||||
[CEReactions, TreatNullAs=EmptyString] attribute DOMString vlinkColor;
|
||||
[CEReactions, TreatNullAs=EmptyString] attribute DOMString alinkColor;
|
||||
[CEReactions, TreatNullAs=EmptyString] attribute DOMString bgColor;
|
||||
[CEReactions] attribute [TreatNullAs=EmptyString] DOMString fgColor;
|
||||
[CEReactions] attribute [TreatNullAs=EmptyString] DOMString linkColor;
|
||||
[CEReactions] attribute [TreatNullAs=EmptyString] DOMString vlinkColor;
|
||||
[CEReactions] attribute [TreatNullAs=EmptyString] DOMString alinkColor;
|
||||
[CEReactions] attribute [TreatNullAs=EmptyString] DOMString bgColor;
|
||||
|
||||
[Pure]
|
||||
readonly attribute HTMLCollection anchors;
|
||||
|
||||
@@ -22,22 +22,14 @@ interface HTMLElement : Element {
|
||||
// attribute boolean translate;
|
||||
[CEReactions, SetterThrows, Pure]
|
||||
attribute DOMString dir;
|
||||
[Constant]
|
||||
readonly attribute DOMStringMap dataset;
|
||||
|
||||
[CEReactions, GetterThrows, Pure, TreatNullAs=EmptyString]
|
||||
attribute DOMString innerText;
|
||||
[CEReactions, GetterThrows, Pure]
|
||||
attribute [TreatNullAs=EmptyString] DOMString innerText;
|
||||
|
||||
// user interaction
|
||||
[CEReactions, SetterThrows, Pure]
|
||||
attribute boolean hidden;
|
||||
void click();
|
||||
[CEReactions, SetterThrows, Pure]
|
||||
attribute long tabIndex;
|
||||
[Throws]
|
||||
void focus();
|
||||
[Throws]
|
||||
void blur();
|
||||
[CEReactions, SetterThrows, Pure]
|
||||
attribute DOMString accessKey;
|
||||
[Pure]
|
||||
@@ -61,15 +53,6 @@ interface HTMLElement : Element {
|
||||
//readonly attribute boolean? commandHidden;
|
||||
//readonly attribute boolean? commandDisabled;
|
||||
//readonly attribute boolean? commandChecked;
|
||||
|
||||
// styling
|
||||
[PutForwards=cssText, Constant]
|
||||
readonly attribute CSSStyleDeclaration style;
|
||||
|
||||
// Mozilla specific stuff
|
||||
attribute EventHandler oncopy;
|
||||
attribute EventHandler oncut;
|
||||
attribute EventHandler onpaste;
|
||||
};
|
||||
|
||||
// http://dev.w3.org/csswg/cssom-view/#extensions-to-the-htmlelement-interface
|
||||
@@ -89,8 +72,7 @@ partial interface HTMLElement {
|
||||
attribute boolean scrollgrab;
|
||||
};
|
||||
|
||||
[NoInterfaceObject]
|
||||
interface TouchEventHandlers {
|
||||
interface mixin TouchEventHandlers {
|
||||
[Func="nsGenericHTMLElement::TouchEventsEnabled"]
|
||||
attribute EventHandler ontouchstart;
|
||||
[Func="nsGenericHTMLElement::TouchEventsEnabled"]
|
||||
@@ -101,8 +83,11 @@ interface TouchEventHandlers {
|
||||
attribute EventHandler ontouchcancel;
|
||||
};
|
||||
|
||||
HTMLElement implements GlobalEventHandlers;
|
||||
HTMLElement implements TouchEventHandlers;
|
||||
HTMLElement implements OnErrorEventHandlerForNodes;
|
||||
HTMLElement includes GlobalEventHandlers;
|
||||
HTMLElement includes HTMLOrForeignElement;
|
||||
HTMLElement includes DocumentAndElementEventHandlers;
|
||||
HTMLElement includes ElementCSSInlineStyle;
|
||||
HTMLElement includes TouchEventHandlers;
|
||||
HTMLElement includes OnErrorEventHandlerForNodes;
|
||||
|
||||
interface HTMLUnknownElement : HTMLElement {};
|
||||
@@ -41,6 +41,6 @@ partial interface HTMLEmbedElement {
|
||||
Document? getSVGDocument();
|
||||
};
|
||||
|
||||
HTMLEmbedElement implements MozImageLoadingContent;
|
||||
HTMLEmbedElement implements MozFrameLoaderOwner;
|
||||
HTMLEmbedElement implements MozObjectLoadingContent;
|
||||
HTMLEmbedElement includes MozImageLoadingContent;
|
||||
HTMLEmbedElement includes MozFrameLoaderOwner;
|
||||
HTMLEmbedElement includes MozObjectLoadingContent;
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
[HTMLConstructor]
|
||||
interface HTMLFontElement : HTMLElement {
|
||||
[CEReactions, TreatNullAs=EmptyString, SetterThrows] attribute DOMString color;
|
||||
[CEReactions, SetterThrows] attribute [TreatNullAs=EmptyString] DOMString color;
|
||||
[CEReactions, SetterThrows] attribute DOMString face;
|
||||
[CEReactions, SetterThrows] attribute DOMString size;
|
||||
};
|
||||
@@ -29,10 +29,10 @@ interface HTMLFrameElement : HTMLElement {
|
||||
readonly attribute Document? contentDocument;
|
||||
readonly attribute WindowProxy? contentWindow;
|
||||
|
||||
[CEReactions, TreatNullAs=EmptyString, SetterThrows]
|
||||
attribute DOMString marginHeight;
|
||||
[CEReactions, TreatNullAs=EmptyString, SetterThrows]
|
||||
attribute DOMString marginWidth;
|
||||
[CEReactions, SetterThrows]
|
||||
attribute [TreatNullAs=EmptyString] DOMString marginHeight;
|
||||
[CEReactions, SetterThrows]
|
||||
attribute [TreatNullAs=EmptyString] DOMString marginWidth;
|
||||
};
|
||||
|
||||
HTMLFrameElement implements MozFrameLoaderOwner;
|
||||
HTMLFrameElement includes MozFrameLoaderOwner;
|
||||
@@ -19,4 +19,4 @@ interface HTMLFrameSetElement : HTMLElement {
|
||||
attribute DOMString rows;
|
||||
};
|
||||
|
||||
HTMLFrameSetElement implements WindowEventHandlers;
|
||||
HTMLFrameSetElement includes WindowEventHandlers;
|
||||
@@ -10,8 +10,7 @@
|
||||
* and create derivative works of this document.
|
||||
*/
|
||||
|
||||
[NoInterfaceObject]
|
||||
interface HTMLHyperlinkElementUtils {
|
||||
interface mixin HTMLHyperlinkElementUtils {
|
||||
// Bug 824857: no support for stringifier attributes yet.
|
||||
// stringifier attribute USVString href;
|
||||
|
||||
|
||||
@@ -45,10 +45,10 @@ partial interface HTMLIFrameElement {
|
||||
[CEReactions, SetterThrows, Pure]
|
||||
attribute DOMString longDesc;
|
||||
|
||||
[CEReactions, TreatNullAs=EmptyString, SetterThrows, Pure]
|
||||
attribute DOMString marginHeight;
|
||||
[CEReactions, TreatNullAs=EmptyString, SetterThrows, Pure]
|
||||
attribute DOMString marginWidth;
|
||||
[CEReactions, SetterThrows, Pure]
|
||||
attribute [TreatNullAs=EmptyString] DOMString marginHeight;
|
||||
[CEReactions, SetterThrows, Pure]
|
||||
attribute [TreatNullAs=EmptyString] DOMString marginWidth;
|
||||
};
|
||||
|
||||
partial interface HTMLIFrameElement {
|
||||
@@ -59,9 +59,9 @@ partial interface HTMLIFrameElement {
|
||||
|
||||
partial interface HTMLIFrameElement {
|
||||
// nsIDOMMozBrowserFrame
|
||||
[ChromeOnly,SetterThrows]
|
||||
[ChromeOnly, SetterThrows]
|
||||
attribute boolean mozbrowser;
|
||||
};
|
||||
|
||||
HTMLIFrameElement implements MozFrameLoaderOwner;
|
||||
HTMLIFrameElement includes MozFrameLoaderOwner;
|
||||
HTMLIFrameElement implements BrowserElement;
|
||||
@@ -55,7 +55,7 @@ partial interface HTMLImageElement {
|
||||
[CEReactions, SetterThrows]
|
||||
attribute DOMString longDesc;
|
||||
|
||||
[CEReactions, TreatNullAs=EmptyString,SetterThrows] attribute DOMString border;
|
||||
[CEReactions, SetterThrows] attribute [TreatNullAs=EmptyString] DOMString border;
|
||||
};
|
||||
|
||||
// [Update me: not in whatwg spec yet]
|
||||
@@ -77,8 +77,7 @@ partial interface HTMLImageElement {
|
||||
readonly attribute long y;
|
||||
};
|
||||
|
||||
[NoInterfaceObject]
|
||||
interface MozImageLoadingContent {
|
||||
interface mixin MozImageLoadingContent {
|
||||
// Mirrored chrome-only nsIImageLoadingContent methods. Please make sure
|
||||
// to update this list if nsIImageLoadingContent changes.
|
||||
[ChromeOnly]
|
||||
@@ -108,4 +107,4 @@ interface MozImageLoadingContent {
|
||||
void forceImageState(boolean aForce, unsigned long long aState);
|
||||
};
|
||||
|
||||
HTMLImageElement implements MozImageLoadingContent;
|
||||
HTMLImageElement includes MozImageLoadingContent;
|
||||
@@ -89,8 +89,8 @@ interface HTMLInputElement : HTMLElement {
|
||||
attribute DOMString type;
|
||||
[CEReactions, Pure, SetterThrows]
|
||||
attribute DOMString defaultValue;
|
||||
[CEReactions, Pure, TreatNullAs=EmptyString, Throws]
|
||||
attribute DOMString value;
|
||||
[CEReactions, Pure, SetterThrows]
|
||||
attribute [TreatNullAs=EmptyString] DOMString value;
|
||||
[Throws, Func="HTMLInputElement::ValueAsDateEnabled"]
|
||||
attribute Date? valueAsDate;
|
||||
[Pure, SetterThrows]
|
||||
@@ -226,14 +226,13 @@ partial interface HTMLInputElement {
|
||||
void chooseDirectory();
|
||||
};
|
||||
|
||||
[NoInterfaceObject]
|
||||
interface MozPhonetic {
|
||||
interface mixin MozPhonetic {
|
||||
[Pure, ChromeOnly]
|
||||
readonly attribute DOMString phonetic;
|
||||
};
|
||||
|
||||
HTMLInputElement implements MozImageLoadingContent;
|
||||
HTMLInputElement implements MozPhonetic;
|
||||
HTMLInputElement includes MozImageLoadingContent;
|
||||
HTMLInputElement includes MozPhonetic;
|
||||
|
||||
// Webkit/Blink
|
||||
partial interface HTMLInputElement {
|
||||
|
||||
@@ -36,7 +36,7 @@ interface HTMLLinkElement : HTMLElement {
|
||||
attribute DOMString referrerPolicy;
|
||||
[PutForwards=value] readonly attribute DOMTokenList sizes;
|
||||
};
|
||||
HTMLLinkElement implements LinkStyle;
|
||||
HTMLLinkElement includes LinkStyle;
|
||||
|
||||
// http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
|
||||
partial interface HTMLLinkElement {
|
||||
|
||||
@@ -70,8 +70,8 @@ partial interface HTMLObjectElement {
|
||||
[CEReactions, Pure, SetterThrows]
|
||||
attribute DOMString codeType;
|
||||
|
||||
[CEReactions, TreatNullAs=EmptyString, Pure, SetterThrows]
|
||||
attribute DOMString border;
|
||||
[CEReactions, Pure, SetterThrows]
|
||||
attribute [TreatNullAs=EmptyString] DOMString border;
|
||||
};
|
||||
|
||||
partial interface HTMLObjectElement {
|
||||
@@ -80,8 +80,7 @@ partial interface HTMLObjectElement {
|
||||
Document? getSVGDocument();
|
||||
};
|
||||
|
||||
[NoInterfaceObject]
|
||||
interface MozObjectLoadingContent {
|
||||
interface mixin MozObjectLoadingContent {
|
||||
// Mirrored chrome-only scriptable nsIObjectLoadingContent methods. Please
|
||||
// make sure to update this list if nsIObjectLoadingContent changes. Also,
|
||||
// make sure everything on here is [ChromeOnly].
|
||||
@@ -222,6 +221,6 @@ dictionary MozPluginParameter {
|
||||
DOMString value = "";
|
||||
};
|
||||
|
||||
HTMLObjectElement implements MozImageLoadingContent;
|
||||
HTMLObjectElement implements MozFrameLoaderOwner;
|
||||
HTMLObjectElement implements MozObjectLoadingContent;
|
||||
HTMLObjectElement includes MozImageLoadingContent;
|
||||
HTMLObjectElement includes MozFrameLoaderOwner;
|
||||
HTMLObjectElement includes MozObjectLoadingContent;
|
||||
@@ -21,5 +21,5 @@ interface HTMLStyleElement : HTMLElement {
|
||||
[SetterThrows, Pure]
|
||||
attribute boolean scoped;
|
||||
};
|
||||
HTMLStyleElement implements LinkStyle;
|
||||
HTMLStyleElement includes LinkStyle;
|
||||
|
||||
@@ -48,6 +48,6 @@ partial interface HTMLTableCellElement {
|
||||
[CEReactions, SetterThrows]
|
||||
attribute DOMString vAlign;
|
||||
|
||||
[CEReactions, TreatNullAs=EmptyString, SetterThrows]
|
||||
attribute DOMString bgColor;
|
||||
[CEReactions, SetterThrows]
|
||||
attribute [TreatNullAs=EmptyString] DOMString bgColor;
|
||||
};
|
||||
@@ -53,10 +53,10 @@ partial interface HTMLTableElement {
|
||||
[CEReactions, SetterThrows]
|
||||
attribute DOMString width;
|
||||
|
||||
[CEReactions, TreatNullAs=EmptyString, SetterThrows]
|
||||
attribute DOMString bgColor;
|
||||
[CEReactions, TreatNullAs=EmptyString, SetterThrows]
|
||||
attribute DOMString cellPadding;
|
||||
[CEReactions, TreatNullAs=EmptyString, SetterThrows]
|
||||
attribute DOMString cellSpacing;
|
||||
[CEReactions, SetterThrows]
|
||||
attribute [TreatNullAs=EmptyString] DOMString bgColor;
|
||||
[CEReactions, SetterThrows]
|
||||
attribute [TreatNullAs=EmptyString] DOMString cellPadding;
|
||||
[CEReactions, SetterThrows]
|
||||
attribute [TreatNullAs=EmptyString] DOMString cellSpacing;
|
||||
};
|
||||
@@ -32,6 +32,6 @@ partial interface HTMLTableRowElement {
|
||||
[CEReactions, SetterThrows]
|
||||
attribute DOMString vAlign;
|
||||
|
||||
[CEReactions, TreatNullAs=EmptyString, SetterThrows]
|
||||
attribute DOMString bgColor;
|
||||
[CEReactions, SetterThrows]
|
||||
attribute [TreatNullAs=EmptyString] DOMString bgColor;
|
||||
};
|
||||
@@ -48,7 +48,7 @@ interface HTMLTextAreaElement : HTMLElement {
|
||||
readonly attribute DOMString type;
|
||||
[CEReactions, SetterThrows, Pure]
|
||||
attribute DOMString defaultValue;
|
||||
[CEReactions, TreatNullAs=EmptyString] attribute DOMString value;
|
||||
[CEReactions] attribute [TreatNullAs=EmptyString] DOMString value;
|
||||
readonly attribute unsigned long textLength;
|
||||
|
||||
readonly attribute boolean willValidate;
|
||||
|
||||
@@ -58,14 +58,14 @@ interface IDBIndex {
|
||||
|
||||
partial interface IDBIndex {
|
||||
[Throws]
|
||||
IDBRequest mozGetAll (optional any key, [EnforceRange] optional unsigned long limit);
|
||||
IDBRequest mozGetAll (optional any key, optional [EnforceRange] unsigned long limit);
|
||||
|
||||
[Throws]
|
||||
IDBRequest mozGetAllKeys (optional any key, [EnforceRange] optional unsigned long limit);
|
||||
IDBRequest mozGetAllKeys (optional any key, optional [EnforceRange] unsigned long limit);
|
||||
|
||||
[Throws]
|
||||
IDBRequest getAll (optional any key, [EnforceRange] optional unsigned long limit);
|
||||
IDBRequest getAll (optional any key, optional [EnforceRange] unsigned long limit);
|
||||
|
||||
[Throws]
|
||||
IDBRequest getAllKeys (optional any key, [EnforceRange] optional unsigned long limit);
|
||||
IDBRequest getAllKeys (optional any key, optional [EnforceRange] unsigned long limit);
|
||||
};
|
||||
@@ -20,7 +20,7 @@ interface IDBKeyRange {
|
||||
[Constant]
|
||||
readonly attribute boolean upperOpen;
|
||||
[Throws]
|
||||
boolean includes(any key);
|
||||
boolean _includes(any key);
|
||||
|
||||
|
||||
[NewObject, Throws]
|
||||
|
||||
@@ -61,13 +61,13 @@ interface IDBObjectStore {
|
||||
partial interface IDBObjectStore {
|
||||
// Success fires IDBTransactionEvent, result == array of values for given keys
|
||||
[Throws]
|
||||
IDBRequest mozGetAll (optional any key, [EnforceRange] optional unsigned long limit);
|
||||
IDBRequest mozGetAll (optional any key, optional [EnforceRange] unsigned long limit);
|
||||
|
||||
[Throws]
|
||||
IDBRequest getAll (optional any key, [EnforceRange] optional unsigned long limit);
|
||||
IDBRequest getAll (optional any key, optional [EnforceRange] unsigned long limit);
|
||||
|
||||
[Throws]
|
||||
IDBRequest getAllKeys (optional any key, [EnforceRange] optional unsigned long limit);
|
||||
IDBRequest getAllKeys (optional any key, optional [EnforceRange] unsigned long limit);
|
||||
|
||||
[Throws]
|
||||
IDBRequest openKeyCursor (optional any range, optional IDBCursorDirection direction = "next");
|
||||
|
||||
@@ -21,4 +21,4 @@ interface IIRFilterNode : AudioNode {
|
||||
};
|
||||
|
||||
// Mozilla extension
|
||||
IIRFilterNode implements AudioNodePassThrough;
|
||||
IIRFilterNode includes AudioNodePassThrough;
|
||||
@@ -7,88 +7,85 @@
|
||||
interface nsISupports;
|
||||
interface IID;
|
||||
|
||||
[NoInterfaceObject,
|
||||
// Need Exposed here, because this is a mixin onto things like Event
|
||||
// that are exposed in workers.
|
||||
Exposed=(Window,Worker,System)]
|
||||
interface LegacyQueryInterface {
|
||||
[Exposed=Window]
|
||||
interface mixin LegacyQueryInterface {
|
||||
// Legacy QueryInterface, only exposed to chrome or XBL code on the
|
||||
// main thread.
|
||||
[Exposed=Window]
|
||||
nsISupports queryInterface(IID iid);
|
||||
};
|
||||
|
||||
Attr implements LegacyQueryInterface;
|
||||
BarProp implements LegacyQueryInterface;
|
||||
BoxObject implements LegacyQueryInterface;
|
||||
CaretPosition implements LegacyQueryInterface;
|
||||
Comment implements LegacyQueryInterface;
|
||||
Crypto implements LegacyQueryInterface;
|
||||
CSSMozDocumentRule implements LegacyQueryInterface;
|
||||
CSSPrimitiveValue implements LegacyQueryInterface;
|
||||
CSSStyleDeclaration implements LegacyQueryInterface;
|
||||
CSSStyleRule implements LegacyQueryInterface;
|
||||
CSSValueList implements LegacyQueryInterface;
|
||||
DOMImplementation implements LegacyQueryInterface;
|
||||
DOMParser implements LegacyQueryInterface;
|
||||
DOMStringMap implements LegacyQueryInterface;
|
||||
DOMTokenList implements LegacyQueryInterface;
|
||||
Document implements LegacyQueryInterface;
|
||||
DocumentFragment implements LegacyQueryInterface;
|
||||
DocumentType implements LegacyQueryInterface;
|
||||
Element implements LegacyQueryInterface;
|
||||
Event implements LegacyQueryInterface;
|
||||
EventSource implements LegacyQueryInterface;
|
||||
FileList implements LegacyQueryInterface;
|
||||
FormData implements LegacyQueryInterface;
|
||||
HTMLCollection implements LegacyQueryInterface;
|
||||
History implements LegacyQueryInterface;
|
||||
MimeTypeArray implements LegacyQueryInterface;
|
||||
NamedNodeMap implements LegacyQueryInterface;
|
||||
MutationObserver implements LegacyQueryInterface;
|
||||
MutationRecord implements LegacyQueryInterface;
|
||||
Navigator implements LegacyQueryInterface;
|
||||
NodeIterator implements LegacyQueryInterface;
|
||||
NodeList implements LegacyQueryInterface;
|
||||
Notification implements LegacyQueryInterface;
|
||||
OfflineResourceList implements LegacyQueryInterface;
|
||||
PaintRequest implements LegacyQueryInterface;
|
||||
PaintRequestList implements LegacyQueryInterface;
|
||||
Performance implements LegacyQueryInterface;
|
||||
Attr includes LegacyQueryInterface;
|
||||
BarProp includes LegacyQueryInterface;
|
||||
BoxObject includes LegacyQueryInterface;
|
||||
CaretPosition includes LegacyQueryInterface;
|
||||
Comment includes LegacyQueryInterface;
|
||||
Crypto includes LegacyQueryInterface;
|
||||
CSSMozDocumentRule includes LegacyQueryInterface;
|
||||
CSSPrimitiveValue includes LegacyQueryInterface;
|
||||
CSSStyleDeclaration includes LegacyQueryInterface;
|
||||
CSSStyleRule includes LegacyQueryInterface;
|
||||
CSSValueList includes LegacyQueryInterface;
|
||||
DOMImplementation includes LegacyQueryInterface;
|
||||
DOMParser includes LegacyQueryInterface;
|
||||
DOMStringMap includes LegacyQueryInterface;
|
||||
DOMTokenList includes LegacyQueryInterface;
|
||||
Document includes LegacyQueryInterface;
|
||||
DocumentFragment includes LegacyQueryInterface;
|
||||
DocumentType includes LegacyQueryInterface;
|
||||
Element includes LegacyQueryInterface;
|
||||
Event includes LegacyQueryInterface;
|
||||
EventSource includes LegacyQueryInterface;
|
||||
FileList includes LegacyQueryInterface;
|
||||
FormData includes LegacyQueryInterface;
|
||||
HTMLCollection includes LegacyQueryInterface;
|
||||
History includes LegacyQueryInterface;
|
||||
MimeTypeArray includes LegacyQueryInterface;
|
||||
NamedNodeMap includes LegacyQueryInterface;
|
||||
MutationObserver includes LegacyQueryInterface;
|
||||
MutationRecord includes LegacyQueryInterface;
|
||||
Navigator includes LegacyQueryInterface;
|
||||
NodeIterator includes LegacyQueryInterface;
|
||||
NodeList includes LegacyQueryInterface;
|
||||
Notification includes LegacyQueryInterface;
|
||||
OfflineResourceList includes LegacyQueryInterface;
|
||||
PaintRequest includes LegacyQueryInterface;
|
||||
PaintRequestList includes LegacyQueryInterface;
|
||||
Performance includes LegacyQueryInterface;
|
||||
#ifdef MOZ_ENABLE_NPAPI
|
||||
Plugin implements LegacyQueryInterface;
|
||||
PluginArray implements LegacyQueryInterface;
|
||||
Plugin includes LegacyQueryInterface;
|
||||
PluginArray includes LegacyQueryInterface;
|
||||
#endif
|
||||
ProcessingInstruction implements LegacyQueryInterface;
|
||||
Range implements LegacyQueryInterface;
|
||||
Rect implements LegacyQueryInterface;
|
||||
Selection implements LegacyQueryInterface;
|
||||
SVGAnimatedEnumeration implements LegacyQueryInterface;
|
||||
SVGAnimatedInteger implements LegacyQueryInterface;
|
||||
SVGAnimatedNumber implements LegacyQueryInterface;
|
||||
SVGAnimatedNumberList implements LegacyQueryInterface;
|
||||
SVGAnimatedPreserveAspectRatio implements LegacyQueryInterface;
|
||||
SVGAnimatedString implements LegacyQueryInterface;
|
||||
SVGLengthList implements LegacyQueryInterface;
|
||||
SVGNumberList implements LegacyQueryInterface;
|
||||
SVGPathSegList implements LegacyQueryInterface;
|
||||
SVGPoint implements LegacyQueryInterface;
|
||||
SVGPointList implements LegacyQueryInterface;
|
||||
SVGPreserveAspectRatio implements LegacyQueryInterface;
|
||||
SVGRect implements LegacyQueryInterface;
|
||||
SVGStringList implements LegacyQueryInterface;
|
||||
SVGTransformList implements LegacyQueryInterface;
|
||||
Screen implements LegacyQueryInterface;
|
||||
StyleSheet implements LegacyQueryInterface;
|
||||
Text implements LegacyQueryInterface;
|
||||
Touch implements LegacyQueryInterface;
|
||||
TouchList implements LegacyQueryInterface;
|
||||
TreeColumns implements LegacyQueryInterface;
|
||||
TreeWalker implements LegacyQueryInterface;
|
||||
ValidityState implements LegacyQueryInterface;
|
||||
WebSocket implements LegacyQueryInterface;
|
||||
Window implements LegacyQueryInterface;
|
||||
XMLHttpRequest implements LegacyQueryInterface;
|
||||
XMLHttpRequestUpload implements LegacyQueryInterface;
|
||||
XMLSerializer implements LegacyQueryInterface;
|
||||
XPathEvaluator implements LegacyQueryInterface;
|
||||
ProcessingInstruction includes LegacyQueryInterface;
|
||||
Range includes LegacyQueryInterface;
|
||||
Rect includes LegacyQueryInterface;
|
||||
Selection includes LegacyQueryInterface;
|
||||
SVGAnimatedEnumeration includes LegacyQueryInterface;
|
||||
SVGAnimatedInteger includes LegacyQueryInterface;
|
||||
SVGAnimatedNumber includes LegacyQueryInterface;
|
||||
SVGAnimatedNumberList includes LegacyQueryInterface;
|
||||
SVGAnimatedPreserveAspectRatio includes LegacyQueryInterface;
|
||||
SVGAnimatedString includes LegacyQueryInterface;
|
||||
SVGLengthList includes LegacyQueryInterface;
|
||||
SVGNumberList includes LegacyQueryInterface;
|
||||
SVGPathSegList includes LegacyQueryInterface;
|
||||
SVGPoint includes LegacyQueryInterface;
|
||||
SVGPointList includes LegacyQueryInterface;
|
||||
SVGPreserveAspectRatio includes LegacyQueryInterface;
|
||||
SVGRect includes LegacyQueryInterface;
|
||||
SVGStringList includes LegacyQueryInterface;
|
||||
SVGTransformList includes LegacyQueryInterface;
|
||||
Screen includes LegacyQueryInterface;
|
||||
StyleSheet includes LegacyQueryInterface;
|
||||
Text includes LegacyQueryInterface;
|
||||
Touch includes LegacyQueryInterface;
|
||||
TouchList includes LegacyQueryInterface;
|
||||
TreeColumns includes LegacyQueryInterface;
|
||||
TreeWalker includes LegacyQueryInterface;
|
||||
ValidityState includes LegacyQueryInterface;
|
||||
WebSocket includes LegacyQueryInterface;
|
||||
Window includes LegacyQueryInterface;
|
||||
XMLHttpRequest includes LegacyQueryInterface;
|
||||
XMLHttpRequestUpload includes LegacyQueryInterface;
|
||||
XMLSerializer includes LegacyQueryInterface;
|
||||
XPathEvaluator includes LegacyQueryInterface;
|
||||
@@ -7,8 +7,7 @@
|
||||
* http://dev.w3.org/csswg/cssom/#the-linkstyle-interface
|
||||
*/
|
||||
|
||||
[NoInterfaceObject]
|
||||
interface LinkStyle {
|
||||
interface mixin LinkStyle {
|
||||
readonly attribute StyleSheet? sheet;
|
||||
};
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
||||
* You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*
|
||||
* The origin of this IDL file is
|
||||
* https://mathml-refresh.github.io/mathml-core/
|
||||
*
|
||||
* Copyright © 2019 W3C® (MIT, ERCIM, Keio, Beihang). W3C liability, trademark
|
||||
* and permissive document license rules apply.
|
||||
*/
|
||||
|
||||
[Exposed=Window]
|
||||
interface MathMLElement : Element { };
|
||||
MathMLElement includes GlobalEventHandlers;
|
||||
MathMLElement includes HTMLOrForeignElement;
|
||||
MathMLElement includes DocumentAndElementEventHandlers;
|
||||
MathMLElement includes ElementCSSInlineStyle;
|
||||
MathMLElement includes TouchEventHandlers;
|
||||
@@ -21,5 +21,5 @@ interface MediaElementAudioSourceNode : AudioNode {
|
||||
};
|
||||
|
||||
// Mozilla extensions
|
||||
MediaElementAudioSourceNode implements AudioNodePassThrough;
|
||||
MediaElementAudioSourceNode includes AudioNodePassThrough;
|
||||
|
||||
@@ -7,8 +7,7 @@
|
||||
|
||||
[ArrayClass]
|
||||
interface MediaList {
|
||||
[TreatNullAs=EmptyString]
|
||||
attribute DOMString mediaText;
|
||||
attribute [TreatNullAs=EmptyString] DOMString mediaText;
|
||||
|
||||
readonly attribute unsigned long length;
|
||||
getter DOMString? item(unsigned long index);
|
||||
|
||||
@@ -21,5 +21,5 @@ interface MediaStreamAudioSourceNode : AudioNode {
|
||||
};
|
||||
|
||||
// Mozilla extensions
|
||||
MediaStreamAudioSourceNode implements AudioNodePassThrough;
|
||||
MediaStreamAudioSourceNode includes AudioNodePassThrough;
|
||||
|
||||
@@ -20,7 +20,6 @@ interface MessagePort : EventTarget {
|
||||
// event handlers
|
||||
attribute EventHandler onmessage;
|
||||
};
|
||||
// MessagePort implements Transferable;
|
||||
|
||||
// Used to declare which objects should be transferred.
|
||||
dictionary StructuredSerializeOptions {
|
||||
|
||||
+22
-30
@@ -24,18 +24,17 @@
|
||||
interface Navigator {
|
||||
// objects implementing this interface also implement the interfaces given below
|
||||
};
|
||||
Navigator implements NavigatorID;
|
||||
Navigator implements NavigatorLanguage;
|
||||
Navigator implements NavigatorOnLine;
|
||||
Navigator implements NavigatorContentUtils;
|
||||
Navigator implements NavigatorStorageUtils;
|
||||
Navigator implements NavigatorConcurrentHardware;
|
||||
Navigator implements NavigatorStorage;
|
||||
Navigator implements NavigatorGlobalPrivacyControl;
|
||||
Navigator implements NavigatorAutomationInformation;
|
||||
Navigator includes NavigatorID;
|
||||
Navigator includes NavigatorLanguage;
|
||||
Navigator includes NavigatorOnLine;
|
||||
Navigator includes NavigatorContentUtils;
|
||||
Navigator includes NavigatorStorageUtils;
|
||||
Navigator includes NavigatorConcurrentHardware;
|
||||
Navigator includes NavigatorStorage;
|
||||
Navigator includes NavigatorGlobalPrivacyControl;
|
||||
Navigator includes NavigatorAutomationInformation;
|
||||
|
||||
[NoInterfaceObject, Exposed=(Window,Worker)]
|
||||
interface NavigatorID {
|
||||
interface mixin NavigatorID {
|
||||
// WebKit/Blink/Trident/Presto support this (hardcoded "Mozilla").
|
||||
[Constant, Cached]
|
||||
readonly attribute DOMString appCodeName; // constant "Mozilla"
|
||||
@@ -55,8 +54,7 @@ interface NavigatorID {
|
||||
boolean taintEnabled(); // constant false
|
||||
};
|
||||
|
||||
[NoInterfaceObject, Exposed=(Window,Worker)]
|
||||
interface NavigatorLanguage {
|
||||
interface mixin NavigatorLanguage {
|
||||
|
||||
// These two attributes are cached because this interface is also implemented
|
||||
// by Workernavigator and this way we don't have to go back to the
|
||||
@@ -69,13 +67,11 @@ interface NavigatorLanguage {
|
||||
readonly attribute sequence<DOMString> languages;
|
||||
};
|
||||
|
||||
[NoInterfaceObject, Exposed=(Window,Worker)]
|
||||
interface NavigatorOnLine {
|
||||
interface mixin NavigatorOnLine {
|
||||
readonly attribute boolean onLine;
|
||||
};
|
||||
|
||||
[NoInterfaceObject]
|
||||
interface NavigatorContentUtils {
|
||||
interface mixin NavigatorContentUtils {
|
||||
// content handler registration
|
||||
[Throws]
|
||||
void registerProtocolHandler(DOMString scheme, DOMString url, DOMString title);
|
||||
@@ -88,14 +84,13 @@ interface NavigatorContentUtils {
|
||||
//void unregisterContentHandler(DOMString mimeType, DOMString url);
|
||||
};
|
||||
|
||||
[NoInterfaceObject, Exposed=(Window,Worker)]
|
||||
interface NavigatorStorage {
|
||||
[SecureContext]
|
||||
interface mixin NavigatorStorage {
|
||||
[Func="mozilla::dom::StorageManager::PrefEnabled"]
|
||||
readonly attribute StorageManager storage;
|
||||
};
|
||||
|
||||
[NoInterfaceObject]
|
||||
interface NavigatorStorageUtils {
|
||||
interface mixin NavigatorStorageUtils {
|
||||
// NOT IMPLEMENTED
|
||||
//void yieldForStorageUpdates();
|
||||
};
|
||||
@@ -117,18 +112,17 @@ partial interface Navigator {
|
||||
};
|
||||
|
||||
// https://globalprivacycontrol.github.io/gpc-spec/
|
||||
[NoInterfaceObject, Exposed=(Window,Worker)]
|
||||
interface NavigatorGlobalPrivacyControl {
|
||||
[Exposed=(Window,Worker)]
|
||||
interface mixin NavigatorGlobalPrivacyControl {
|
||||
readonly attribute boolean globalPrivacyControl;
|
||||
};
|
||||
|
||||
// http://www.w3.org/TR/geolocation-API/#geolocation_interface
|
||||
[NoInterfaceObject]
|
||||
interface NavigatorGeolocation {
|
||||
interface mixin NavigatorGeolocation {
|
||||
[Throws, Pref="geo.enabled"]
|
||||
readonly attribute Geolocation geolocation;
|
||||
};
|
||||
Navigator implements NavigatorGeolocation;
|
||||
Navigator includes NavigatorGeolocation;
|
||||
|
||||
// http://www.w3.org/TR/pointerevents/#extensions-to-the-navigator-interface
|
||||
partial interface Navigator {
|
||||
@@ -312,8 +306,7 @@ partial interface Navigator {
|
||||
readonly attribute LegacyMozTCPSocket mozTCPSocket;
|
||||
};
|
||||
|
||||
[NoInterfaceObject, Exposed=(Window,Worker)]
|
||||
interface NavigatorConcurrentHardware {
|
||||
interface mixin NavigatorConcurrentHardware {
|
||||
readonly attribute unsigned long long hardwareConcurrency;
|
||||
};
|
||||
|
||||
@@ -324,8 +317,7 @@ partial interface Navigator {
|
||||
};
|
||||
|
||||
// https://w3c.github.io/webdriver/webdriver-spec.html#interface
|
||||
[NoInterfaceObject, Exposed=Window]
|
||||
interface NavigatorAutomationInformation {
|
||||
interface mixin NavigatorAutomationInformation {
|
||||
[Pref="dom.webdriver.enabled"]
|
||||
readonly attribute boolean webdriver;
|
||||
};
|
||||
@@ -4,7 +4,7 @@
|
||||
* You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*
|
||||
* The origin of this IDL file is
|
||||
* http://notifications.spec.whatwg.org/
|
||||
* https://notifications.spec.whatwg.org/
|
||||
*
|
||||
* Copyright:
|
||||
* To the extent possible under law, the editors have waived all copyright and
|
||||
@@ -96,10 +96,3 @@ enum NotificationDirection {
|
||||
"ltr",
|
||||
"rtl"
|
||||
};
|
||||
|
||||
partial interface ServiceWorkerRegistration {
|
||||
[Throws, Func="mozilla::dom::ServiceWorkerRegistration::NotificationAPIVisible"]
|
||||
Promise<void> showNotification(DOMString title, optional NotificationOptions options);
|
||||
[Throws, Func="mozilla::dom::ServiceWorkerRegistration::NotificationAPIVisible"]
|
||||
Promise<sequence<Notification>> getNotifications(optional GetNotificationOptions filter);
|
||||
};
|
||||
@@ -20,8 +20,3 @@ interface NotificationEvent : ExtendableEvent {
|
||||
dictionary NotificationEventInit : ExtendableEventInit {
|
||||
required Notification notification;
|
||||
};
|
||||
|
||||
partial interface ServiceWorkerGlobalScope {
|
||||
attribute EventHandler onnotificationclick;
|
||||
attribute EventHandler onnotificationclose;
|
||||
};
|
||||
@@ -26,4 +26,3 @@ interface OffscreenCanvas : EventTarget {
|
||||
optional any encoderOptions);
|
||||
};
|
||||
|
||||
// OffscreenCanvas implements Transferable;
|
||||
@@ -46,4 +46,4 @@ interface OscillatorNode : AudioNode {
|
||||
};
|
||||
|
||||
// Mozilla extensions
|
||||
OscillatorNode implements AudioNodePassThrough;
|
||||
OscillatorNode includes AudioNodePassThrough;
|
||||
@@ -75,5 +75,5 @@ interface PannerNode : AudioNode {
|
||||
};
|
||||
|
||||
// Mozilla extension
|
||||
PannerNode implements AudioNodePassThrough;
|
||||
PannerNode includes AudioNodePassThrough;
|
||||
|
||||
Loaded 100 of 215 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user