mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-27 04:05:32 +00:00
887b300cf4
This change moves several chrome-only WebIDL files to a separate chrome-only directory. There are several other chrome-only interfaces which are heavily tied to DOM code. Since those should probably still require DOM peer review for changes, I left them where they were. MozReview-Commit-ID: K3NsNtfntV6 --HG-- rename : dom/webidl/ChannelWrapper.webidl => dom/chrome-webidl/ChannelWrapper.webidl rename : dom/webidl/ChromeUtils.webidl => dom/chrome-webidl/ChromeUtils.webidl rename : dom/webidl/DominatorTree.webidl => dom/chrome-webidl/DominatorTree.webidl rename : dom/webidl/HeapSnapshot.webidl => dom/chrome-webidl/HeapSnapshot.webidl rename : dom/webidl/InspectorUtils.webidl => dom/chrome-webidl/InspectorUtils.webidl rename : dom/webidl/MatchGlob.webidl => dom/chrome-webidl/MatchGlob.webidl rename : dom/webidl/MatchPattern.webidl => dom/chrome-webidl/MatchPattern.webidl rename : dom/webidl/MozStorageAsyncStatementParams.webidl => dom/chrome-webidl/MozStorageAsyncStatementParams.webidl rename : dom/webidl/MozStorageStatementParams.webidl => dom/chrome-webidl/MozStorageStatementParams.webidl rename : dom/webidl/MozStorageStatementRow.webidl => dom/chrome-webidl/MozStorageStatementRow.webidl rename : dom/webidl/PrecompiledScript.webidl => dom/chrome-webidl/PrecompiledScript.webidl rename : dom/webidl/PromiseDebugging.webidl => dom/chrome-webidl/PromiseDebugging.webidl rename : dom/webidl/StructuredCloneHolder.webidl => dom/chrome-webidl/StructuredCloneHolder.webidl rename : dom/webidl/WebExtensionContentScript.webidl => dom/chrome-webidl/WebExtensionContentScript.webidl rename : dom/webidl/WebExtensionPolicy.webidl => dom/chrome-webidl/WebExtensionPolicy.webidl rename : dom/webidl/moz.build => dom/chrome-webidl/moz.build extra : rebase_source : e1ea7dad6450a10e5f48e622814efe28e0c13977 extra : intermediate-source : 9f46e7d52b9b2e30bf0ccf64bb5805168dd79c29 extra : source : 195cbf3d34334978e5a9d101d4b79f899598159c
129 lines
3.8 KiB
Plaintext
129 lines
3.8 KiB
Plaintext
/* 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/. */
|
|
|
|
interface Cookie;
|
|
interface URI;
|
|
|
|
/**
|
|
* A URL match pattern as used by the WebExtension and Chrome extension APIs.
|
|
*
|
|
* A match pattern is a string with one of the following formats:
|
|
*
|
|
* - "<all_urls>"
|
|
* The literal string "<all_urls>" matches any URL with a supported
|
|
* protocol.
|
|
*
|
|
* - <proto>://<host>/<path>
|
|
* A URL pattern with the following placeholders:
|
|
*
|
|
* - <proto>
|
|
* The protocol to match, or "*" to match either "http" or "https".
|
|
* - <host>
|
|
* The hostname to match. May be either a complete, literal hostname to
|
|
* match a specific host, the wildcard character "*", to match any host,
|
|
* or a subdomain pattern, with "*." followed by a domain name, to match
|
|
* that domain name or any subdomain thereof.
|
|
* - <path>
|
|
* A glob pattern for paths to match. A "*" may appear anywhere within
|
|
* the path, and will match any string of characters. If no "*" appears,
|
|
* the URL path must exactly match the pattern path.
|
|
*/
|
|
[Constructor(DOMString pattern, optional MatchPatternOptions options),
|
|
ChromeOnly, Exposed=(Window,System)]
|
|
interface MatchPattern {
|
|
/**
|
|
* Returns true if the given URI matches the pattern.
|
|
*
|
|
* If explicit is true, only explicit domain matches, without wildcards, are
|
|
* considered.
|
|
*/
|
|
[Throws]
|
|
boolean matches(URI uri, optional boolean explicit = false);
|
|
|
|
[Throws]
|
|
boolean matches(DOMString url, optional boolean explicit = false);
|
|
|
|
/**
|
|
* Returns true if a URL exists which a) would be able to access the given
|
|
* cookie, and b) would be matched by this match pattern.
|
|
*/
|
|
boolean matchesCookie(Cookie cookie);
|
|
|
|
/**
|
|
* Returns true if this pattern will match any host which would be matched
|
|
* by the given pattern.
|
|
*/
|
|
boolean subsumes(MatchPattern pattern);
|
|
|
|
/**
|
|
* Returns true if there is any host which would be matched by both this
|
|
* pattern and the given pattern.
|
|
*/
|
|
boolean overlaps(MatchPattern pattern);
|
|
|
|
/**
|
|
* The match pattern string represented by this pattern.
|
|
*/
|
|
[Constant]
|
|
readonly attribute DOMString pattern;
|
|
};
|
|
|
|
/**
|
|
* A set of MatchPattern objects, which implements the MatchPattern API and
|
|
* matches when any of its sub-patterns matches.
|
|
*/
|
|
[Constructor(sequence<(DOMString or MatchPattern)> patterns, optional MatchPatternOptions options),
|
|
ChromeOnly, Exposed=(Window,System)]
|
|
interface MatchPatternSet {
|
|
/**
|
|
* Returns true if the given URI matches any sub-pattern.
|
|
*
|
|
* If explicit is true, only explicit domain matches, without wildcards, are
|
|
* considered.
|
|
*/
|
|
[Throws]
|
|
boolean matches(URI uri, optional boolean explicit = false);
|
|
|
|
[Throws]
|
|
boolean matches(DOMString url, optional boolean explicit = false);
|
|
|
|
/**
|
|
* Returns true if any sub-pattern matches the given cookie.
|
|
*/
|
|
boolean matchesCookie(Cookie cookie);
|
|
|
|
/**
|
|
* Returns true if any sub-pattern subsumes the given pattern.
|
|
*/
|
|
boolean subsumes(MatchPattern pattern);
|
|
|
|
/**
|
|
* Returns true if any sub-pattern overlaps the given pattern.
|
|
*/
|
|
boolean overlaps(MatchPattern pattern);
|
|
|
|
/**
|
|
* Returns true if any sub-pattern overlaps any sub-pattern the given
|
|
* pattern set.
|
|
*/
|
|
boolean overlaps(MatchPatternSet patternSet);
|
|
|
|
/**
|
|
* Returns true if any sub-pattern overlaps *every* sub-pattern in the given
|
|
* pattern set.
|
|
*/
|
|
boolean overlapsAll(MatchPatternSet patternSet);
|
|
|
|
[Cached, Constant, Frozen]
|
|
readonly attribute sequence<MatchPattern> patterns;
|
|
};
|
|
|
|
dictionary MatchPatternOptions {
|
|
/**
|
|
* If true, the path portion of the pattern is ignored, and replaced with a
|
|
* wildcard. The `pattern` property is updated to reflect this.
|
|
*/
|
|
boolean ignorePath = false;
|
|
};
|