summaryrefslogtreecommitdiffstats
path: root/dom/chrome-webidl
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:13:27 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:13:27 +0000
commit40a355a42d4a9444dc753c04c6608dade2f06a23 (patch)
tree871fc667d2de662f171103ce5ec067014ef85e61 /dom/chrome-webidl
parentAdding upstream version 124.0.1. (diff)
downloadfirefox-40a355a42d4a9444dc753c04c6608dade2f06a23.tar.xz
firefox-40a355a42d4a9444dc753c04c6608dade2f06a23.zip
Adding upstream version 125.0.1.upstream/125.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'dom/chrome-webidl')
-rw-r--r--dom/chrome-webidl/ChromeUtils.webidl18
-rw-r--r--dom/chrome-webidl/ConsoleInstance.webidl179
-rw-r--r--dom/chrome-webidl/FrameLoader.webidl7
-rw-r--r--dom/chrome-webidl/IOUtils.webidl2
-rw-r--r--dom/chrome-webidl/InspectorUtils.webidl36
-rw-r--r--dom/chrome-webidl/JSProcessActor.webidl3
-rw-r--r--dom/chrome-webidl/JSWindowActor.webidl3
-rw-r--r--dom/chrome-webidl/moz.build1
8 files changed, 228 insertions, 21 deletions
diff --git a/dom/chrome-webidl/ChromeUtils.webidl b/dom/chrome-webidl/ChromeUtils.webidl
index 443afcb86d..3ccb125a1e 100644
--- a/dom/chrome-webidl/ChromeUtils.webidl
+++ b/dom/chrome-webidl/ChromeUtils.webidl
@@ -327,6 +327,8 @@ namespace ChromeUtils {
*
* In worker threads, aOption is required and only { global: "current" } and
* { global: "contextual" } are supported.
+ *
+ * In DevTools distinct global, aOptions.global is reuiqred.
*/
[Throws]
object importESModule(DOMString aResourceURI,
@@ -344,6 +346,8 @@ namespace ChromeUtils {
*
* In worker threads, aOption is required and only { global: "current" } and
* { global: "contextual" } are supported.
+ *
+ * In DevTools distinct global, aOptions.global is reuiqred.
*/
[Throws]
undefined defineESModuleGetters(object aTarget, object aModules,
@@ -540,6 +544,9 @@ partial namespace ChromeUtils {
* the same file will not cause the module to be re-evaluated, but
* the symbols in EXPORTED_SYMBOLS will be exported into the
* specified target object and the global object returned as above.
+ *
+ * TODO: Remove this once m-c, c-c, and out-of-tree code migrations finish
+ * (bug 1881888).
*/
[Throws]
object import(UTF8String aResourceURI, optional object aTargetObj);
@@ -947,7 +954,6 @@ dictionary IOActivityDataDictionary {
[GenerateInitFromJSON]
dictionary OriginAttributesDictionary {
unsigned long userContextId = 0;
- boolean inIsolatedMozBrowser = false;
unsigned long privateBrowsingId = 0;
DOMString firstPartyDomain = "";
DOMString geckoViewSessionContextId = "";
@@ -957,7 +963,6 @@ dictionary OriginAttributesDictionary {
[GenerateInitFromJSON, GenerateToJSON]
dictionary OriginAttributesPatternDictionary {
unsigned long userContextId;
- boolean inIsolatedMozBrowser;
unsigned long privateBrowsingId;
DOMString firstPartyDomain;
DOMString geckoViewSessionContextId;
@@ -1030,13 +1035,8 @@ enum ImportESModuleTargetGlobal {
};
dictionary ImportESModuleOptionsDictionary {
- /**
- * If true, a distinct module loader will be used, in the system principal,
- * but with a distinct global so that the DevTools can load a distinct set
- * of modules and do not interfere with its debuggee.
- */
- boolean loadInDevToolsLoader;
-
+ // This field is required for importESModule and defineESModuleGetters in
+ // DevTools distinct global.
ImportESModuleTargetGlobal global;
};
diff --git a/dom/chrome-webidl/ConsoleInstance.webidl b/dom/chrome-webidl/ConsoleInstance.webidl
new file mode 100644
index 0000000000..b80a0da0f9
--- /dev/null
+++ b/dom/chrome-webidl/ConsoleInstance.webidl
@@ -0,0 +1,179 @@
+/* -*- Mode: IDL; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* vim: set ts=2 et sw=2 tw=80: */
+/* 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/.
+ *
+ * For more information on this interface, please see
+ * https://console.spec.whatwg.org/#console-namespace
+ */
+
+// This is used to propagate console events to the observers.
+[GenerateConversionToJS]
+dictionary ConsoleEvent {
+ (unsigned long long or DOMString) ID;
+ (unsigned long long or DOMString) innerID;
+ DOMString consoleID = "";
+ DOMString addonId = "";
+ DOMString level = "";
+ DOMString filename = "";
+ // Unique identifier within the process for the script source this event is
+ // associated with, or zero.
+ unsigned long sourceId = 0;
+ unsigned long lineNumber = 0;
+ unsigned long columnNumber = 0;
+ DOMString functionName = "";
+ double timeStamp = 0;
+ double microSecondTimeStamp = 0;
+ sequence<any> arguments;
+ sequence<DOMString?> styles;
+ boolean private = false;
+ // stacktrace is handled via a getter in some cases so we can construct it
+ // lazily. Note that we're not making this whole thing an interface because
+ // consumers expect to see own properties on it, which would mean making the
+ // props unforgeable, which means lots of JSFunction allocations. Maybe we
+ // should fix those consumers, of course....
+ // sequence<ConsoleStackEntry> stacktrace;
+ DOMString groupName = "";
+ any timer = null;
+ any counter = null;
+ DOMString prefix = "";
+ boolean chromeContext = false;
+};
+
+// Event for profile operations
+[GenerateConversionToJS]
+dictionary ConsoleProfileEvent {
+ DOMString action = "";
+ sequence<any> arguments;
+ boolean chromeContext = false;
+};
+
+// This dictionary is used to manage stack trace data.
+[GenerateConversionToJS]
+dictionary ConsoleStackEntry {
+ DOMString filename = "";
+ // Unique identifier within the process for the script source this entry is
+ // associated with, or zero.
+ unsigned long sourceId = 0;
+ unsigned long lineNumber = 0;
+ unsigned long columnNumber = 0;
+ DOMString functionName = "";
+ DOMString? asyncCause;
+};
+
+[GenerateConversionToJS]
+dictionary ConsoleTimerStart {
+ DOMString name = "";
+};
+
+[GenerateConversionToJS]
+dictionary ConsoleTimerLogOrEnd {
+ DOMString name = "";
+ double duration = 0;
+};
+
+[GenerateConversionToJS]
+dictionary ConsoleTimerError {
+ DOMString error = "";
+ DOMString name = "";
+};
+
+[GenerateConversionToJS]
+dictionary ConsoleCounter {
+ DOMString label = "";
+ unsigned long count = 0;
+};
+
+[GenerateConversionToJS]
+dictionary ConsoleCounterError {
+ DOMString label = "";
+ DOMString error = "";
+};
+
+[ChromeOnly,
+ Exposed=(Window,Worker,WorkerDebugger,Worklet)]
+// This is basically a copy of the console namespace.
+interface ConsoleInstance {
+ // Logging
+ undefined assert(optional boolean condition = false, any... data);
+ undefined clear();
+ undefined count(optional DOMString label = "default");
+ undefined countReset(optional DOMString label = "default");
+ undefined debug(any... data);
+ undefined error(any... data);
+ undefined info(any... data);
+ undefined log(any... data);
+ undefined table(any... data); // FIXME: The spec is still unclear about this.
+ undefined trace(any... data);
+ undefined warn(any... data);
+ undefined dir(any... data); // FIXME: This doesn't follow the spec yet.
+ undefined dirxml(any... data);
+
+ // Grouping
+ undefined group(any... data);
+ undefined groupCollapsed(any... data);
+ undefined groupEnd();
+
+ // Timing
+ undefined time(optional DOMString label = "default");
+ undefined timeLog(optional DOMString label = "default", any... data);
+ undefined timeEnd(optional DOMString label = "default");
+
+ // Mozilla only or Webcompat methods
+
+ undefined _exception(any... data);
+ undefined timeStamp(optional any data);
+
+ undefined profile(any... data);
+ undefined profileEnd(any... data);
+
+ // Returns true if the given level would log a message. Used for avoiding
+ // long/significant processing when logging messages.
+ boolean shouldLog(ConsoleLogLevel level);
+};
+
+callback ConsoleInstanceDumpCallback = undefined (DOMString message);
+
+enum ConsoleLogLevel {
+ "All", "Debug", "Log", "Info", "Clear", "Trace", "TimeLog", "TimeEnd", "Time",
+ "Group", "GroupEnd", "Profile", "ProfileEnd", "Dir", "Dirxml", "Warn", "Error",
+ "Off"
+};
+
+dictionary ConsoleInstanceOptions {
+ // An optional function to intercept all strings written to stdout.
+ ConsoleInstanceDumpCallback dump;
+
+ // An optional prefix string to be printed before the actual logged message.
+ DOMString prefix = "";
+
+ // An ID representing the source of the message. Normally the inner ID of a
+ // DOM window.
+ DOMString innerID = "";
+
+ // String identified for the console, this will be passed through the console
+ // notifications.
+ DOMString consoleID = "";
+
+ // Identifier that allows to filter which messages are logged based on their
+ // log level.
+ ConsoleLogLevel maxLogLevel;
+
+ // String pref name which contains the level to use for maxLogLevel. If the
+ // pref doesn't exist, gets removed or it is used in workers, the maxLogLevel
+ // will default to the value passed to this constructor (or "all" if it wasn't
+ // specified).
+ UTF8String maxLogLevelPref = "";
+};
+
+enum ConsoleLevel { "log", "warning", "error" };
+
+// this interface is just for testing
+partial interface ConsoleInstance {
+ [ChromeOnly]
+ undefined reportForServiceWorkerScope(DOMString scope, DOMString message,
+ DOMString filename, unsigned long lineNumber,
+ unsigned long columnNumber,
+ ConsoleLevel level);
+};
diff --git a/dom/chrome-webidl/FrameLoader.webidl b/dom/chrome-webidl/FrameLoader.webidl
index df3d03f2b7..e05d5b236b 100644
--- a/dom/chrome-webidl/FrameLoader.webidl
+++ b/dom/chrome-webidl/FrameLoader.webidl
@@ -123,13 +123,6 @@ interface FrameLoader {
readonly attribute unsigned long long childID;
/**
- * Find out whether the owner content really is a mozbrowser. <xul:browser>
- * is not considered to be a mozbrowser frame.
- */
- [Pure]
- readonly attribute boolean ownerIsMozBrowserFrame;
-
- /**
* The last known width of the frame. Reading this property will not trigger
* a reflow, and therefore may not reflect the current state of things. It
* should only be used in asynchronous APIs where values are not guaranteed
diff --git a/dom/chrome-webidl/IOUtils.webidl b/dom/chrome-webidl/IOUtils.webidl
index a3e19c0401..cc0d25bcd6 100644
--- a/dom/chrome-webidl/IOUtils.webidl
+++ b/dom/chrome-webidl/IOUtils.webidl
@@ -417,7 +417,7 @@ partial namespace IOUtils {
* but it would use u16-based strings, so it would basically be a separate
* copy of the bindings.)
*
- * This interface was added for use by `Subprocess.sys.jsm`; other would-be
+ * This interface was added for use by `Subprocess.sys.mjs`; other would-be
* callers may want to just use Subprocess instead of calling this directly.
*
* @param argv The command to run and its arguments.
diff --git a/dom/chrome-webidl/InspectorUtils.webidl b/dom/chrome-webidl/InspectorUtils.webidl
index e3ca8a3b51..64cd610804 100644
--- a/dom/chrome-webidl/InspectorUtils.webidl
+++ b/dom/chrome-webidl/InspectorUtils.webidl
@@ -23,16 +23,17 @@ namespace InspectorUtils {
unsigned long getRelativeRuleLine(CSSRule rule);
sequence<unsigned long> getRuleIndex(CSSRule rule);
boolean hasRulesModifiedByCSSOM(CSSStyleSheet sheet);
- // Get a flat list of all rules (including nested ones) of a given stylesheet.
- // Useful for DevTools as this is faster than in JS where we'd have a lot of
- // proxy access overhead building the same list.
- sequence<CSSRule> getAllStyleSheetCSSStyleRules(CSSStyleSheet sheet);
+ // Get a flat list of specific at-rules (including nested ones) of a given stylesheet.
+ // Useful for DevTools (StyleEditor at-rules sidebar) as this is faster than in JS
+ // where we'd have a lot of proxy access overhead building the same list.
+ InspectorStyleSheetRuleCountAndAtRulesResult getStyleSheetRuleCountAndAtRules(CSSStyleSheet sheet);
boolean isInheritedProperty(Document document, UTF8String property);
sequence<DOMString> getCSSPropertyNames(optional PropertyNamesOptions options = {});
sequence<PropertyPref> getCSSPropertyPrefs();
[Throws] sequence<DOMString> getCSSValuesForProperty(UTF8String property);
UTF8String rgbToColorName(octet r, octet g, octet b);
InspectorRGBATuple? colorToRGBA(UTF8String colorString, optional Document? doc = null);
+ InspectorColorToResult? colorTo(UTF8String fromColor, UTF8String toColorSpace);
boolean isValidCSSColor(UTF8String colorString);
[Throws] sequence<DOMString> getSubpropertiesForCSSProperty(UTF8String property);
[Throws] boolean cssPropertyIsShorthand(UTF8String property);
@@ -87,6 +88,17 @@ namespace InspectorUtils {
[NewObject] NodeList getOverflowingChildrenOfElement(Element element);
sequence<DOMString> getRegisteredCssHighlights(Document document, optional boolean activeOnly = false);
sequence<InspectorCSSPropertyDefinition> getCSSRegisteredProperties(Document document);
+
+ // Get the start and end offsets of the first rule body within initialText
+ // Consider the following example:
+ // p {
+ // line-height: 2em;
+ // color: blue;
+ // }
+ // Calling the function with the whole text above would return offsets we can use to
+ // get "line-height: 2em; color: blue;"
+ // Returns null when opening curly bracket wasn't found in initialText
+ InspectorGetRuleBodyTextResult? getRuleBodyTextOffsets(UTF8String initialText);
};
dictionary SupportsOptions {
@@ -119,6 +131,12 @@ dictionary InspectorRGBATuple {
double a = 1;
};
+dictionary InspectorColorToResult {
+ required DOMString color;
+ required sequence<float> components;
+ required boolean adjusted;
+};
+
// Any update to this enum should probably also update
// devtools/shared/css/constants.js
enum InspectorPropertyType {
@@ -159,6 +177,16 @@ dictionary InspectorCSSPropertyDefinition {
required boolean fromJS;
};
+dictionary InspectorGetRuleBodyTextResult {
+ required double startOffset;
+ required double endOffset;
+};
+
+dictionary InspectorStyleSheetRuleCountAndAtRulesResult {
+ required sequence<CSSRule> atRules;
+ required unsigned long ruleCount;
+};
+
[Func="nsContentUtils::IsCallerChromeOrFuzzingEnabled",
Exposed=Window]
interface InspectorFontFace {
diff --git a/dom/chrome-webidl/JSProcessActor.webidl b/dom/chrome-webidl/JSProcessActor.webidl
index a4dc3d69e1..f158af53b3 100644
--- a/dom/chrome-webidl/JSProcessActor.webidl
+++ b/dom/chrome-webidl/JSProcessActor.webidl
@@ -74,6 +74,9 @@ dictionary ProcessActorSidedOptions {
*
* If neither this nor `esModuleURI` is passed, the specified side cannot receive
* messages, but may send them using `sendAsyncMessage` or `sendQuery`.
+ *
+ * TODO: Remove this once m-c, c-c, and out-of-tree code migrations finish
+ * (bug 1866732).
*/
ByteString moduleURI;
diff --git a/dom/chrome-webidl/JSWindowActor.webidl b/dom/chrome-webidl/JSWindowActor.webidl
index 767b4854c5..09432e7e67 100644
--- a/dom/chrome-webidl/JSWindowActor.webidl
+++ b/dom/chrome-webidl/JSWindowActor.webidl
@@ -132,6 +132,9 @@ dictionary WindowActorSidedOptions {
*
* If neither this nor `esModuleURI` is passed, the specified side cannot receive
* messages, but may send them using `sendAsyncMessage` or `sendQuery`.
+ *
+ * TODO: Remove this once m-c, c-c, and out-of-tree code migrations finish
+ * (bug 1866732).
*/
ByteString moduleURI;
diff --git a/dom/chrome-webidl/moz.build b/dom/chrome-webidl/moz.build
index c34b5f6432..54c40cdab9 100644
--- a/dom/chrome-webidl/moz.build
+++ b/dom/chrome-webidl/moz.build
@@ -50,6 +50,7 @@ WEBIDL_FILES = [
"ChromeNodeList.webidl",
"ClonedErrorHolder.webidl",
"CommandEvent.webidl",
+ "ConsoleInstance.webidl",
"CSSCustomPropertyRegisteredEvent.webidl",
"DebuggerNotification.webidl",
"DebuggerNotificationObserver.webidl",