summaryrefslogtreecommitdiffstats
path: root/dom/chrome-webidl
diff options
context:
space:
mode:
Diffstat (limited to 'dom/chrome-webidl')
-rw-r--r--dom/chrome-webidl/InspectorUtils.webidl50
-rw-r--r--dom/chrome-webidl/UniFFI.webidl8
2 files changed, 54 insertions, 4 deletions
diff --git a/dom/chrome-webidl/InspectorUtils.webidl b/dom/chrome-webidl/InspectorUtils.webidl
index b379118e8a..40c57182d3 100644
--- a/dom/chrome-webidl/InspectorUtils.webidl
+++ b/dom/chrome-webidl/InspectorUtils.webidl
@@ -227,3 +227,53 @@ interface InspectorFontFace {
readonly attribute DOMString format; // as per http://www.w3.org/TR/css3-webfonts/#referencing
readonly attribute DOMString metadata; // XML metadata from WOFF file (if any)
};
+
+dictionary InspectorCSSToken {
+ // The token type.
+ required UTF8String tokenType;
+
+ // Text associated with the token.
+ required UTF8String text;
+
+ // Value of the token. Might differ from `text`:
+ // - for `Function` tokens, text contains the opening paren, `value` does not (e.g. `var(` vs `var`)
+ // - for `AtKeyword` tokens, text contains the leading `@`, `value` does not (e.g. `@media` vs `media`)
+ // - for `Hash` and `IDHash` tokens, text contains the leading `#`, `value` does not (e.g. `#myid` vs `myid`)
+ // - for `UnquotedUrl` tokens, text contains the `url(` parts, `value` only holds the url (e.g. `url(test.jpg)` vs `test.jpg`)
+ // - for `QuotedString` tokens, text contains the wrapping quotes, `value` does not (e.g. `"hello"` vs `hello`)
+ // - for `Comment` tokens, text contains leading `/*` and trailing `*/`, `value` does not (e.g. `/* yo */` vs ` yo `)
+ required UTF8String? value;
+
+ // Unit for Dimension tokens
+ required UTF8String? unit;
+
+ // Float value for Dimension, Number and Percentage tokens
+ double? number = null;
+};
+
+/**
+ * InspectorCSSParser is an interface to the CSS lexer. It tokenizes an
+ * input stream and returns CSS tokens.
+ */
+[Func="nsContentUtils::IsCallerChromeOrFuzzingEnabled",
+ Exposed=Window]
+interface InspectorCSSParser {
+ constructor(UTF8String text);
+
+ /**
+ * The line number of the most recently returned token. Line
+ * numbers are 0-based.
+ */
+ readonly attribute unsigned long lineNumber;
+
+ /**
+ * The column number of the most recently returned token. Column
+ * numbers are 1-based.
+ */
+ readonly attribute unsigned long columnNumber;
+
+ /**
+ * Return the next token, or null at EOF.
+ */
+ InspectorCSSToken? nextToken();
+};
diff --git a/dom/chrome-webidl/UniFFI.webidl b/dom/chrome-webidl/UniFFI.webidl
index e24fc9cc5d..ea250771f8 100644
--- a/dom/chrome-webidl/UniFFI.webidl
+++ b/dom/chrome-webidl/UniFFI.webidl
@@ -43,7 +43,7 @@ interface UniFFIPointer { };
// to an int including Boolean and CallbackInterface.
// - ArrayBuffer is used for RustBuffer
// - UniFFIPointer is used for Arc pointers
-typedef (double or ArrayBuffer or UniFFIPointer) UniFFIScaffoldingType;
+typedef (double or ArrayBuffer or UniFFIPointer) UniFFIScaffoldingValue;
// The result of a call into UniFFI scaffolding call
enum UniFFIScaffoldingCallCode {
@@ -56,7 +56,7 @@ dictionary UniFFIScaffoldingCallResult {
required UniFFIScaffoldingCallCode code;
// For success, this will be the return value for non-void returns
// For error, this will be an ArrayBuffer storing the serialized error value
- UniFFIScaffoldingType data;
+ UniFFIScaffoldingValue data;
// For internal-error, this will be a utf-8 string describing the error
ByteString internalErrorMessage;
};
@@ -72,13 +72,13 @@ namespace UniFFIScaffolding {
//
// id is a unique identifier for the function, known to both the C++ and JS code
[Throws]
- Promise<UniFFIScaffoldingCallResult> callAsync(UniFFIFunctionId id, UniFFIScaffoldingType... args);
+ Promise<UniFFIScaffoldingCallResult> callAsync(UniFFIFunctionId id, UniFFIScaffoldingValue... args);
// Call a scaffolding function on the main thread
//
// id is a unique identifier for the function, known to both the C++ and JS code
[Throws]
- UniFFIScaffoldingCallResult callSync(UniFFIFunctionId id, UniFFIScaffoldingType... args);
+ UniFFIScaffoldingCallResult callSync(UniFFIFunctionId id, UniFFIScaffoldingValue... args);
// Read a UniFFIPointer from an ArrayBuffer
//