aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/webidls
diff options
context:
space:
mode:
authorManish Goregaokar <manishsmail@gmail.com>2016-11-10 16:16:56 -0800
committerManish Goregaokar <manishsmail@gmail.com>2016-11-15 06:56:18 -0800
commit177d6fa4eefd347645de18bc58120340e16e23f7 (patch)
treebaecfa9af78df9b3d1947159b9e872dfdf0f5d62 /components/script/dom/webidls
parent2220fcdc0bbb46b907a3a5ed974508c67ddb2890 (diff)
downloadservo-177d6fa4eefd347645de18bc58120340e16e23f7.tar.gz
servo-177d6fa4eefd347645de18bc58120340e16e23f7.zip
Support basic immutable CSSOM
Diffstat (limited to 'components/script/dom/webidls')
-rw-r--r--components/script/dom/webidls/CSSFontFaceRule.webidl17
-rw-r--r--components/script/dom/webidls/CSSGroupingRule.webidl12
-rw-r--r--components/script/dom/webidls/CSSKeyframesRule.webidl14
-rw-r--r--components/script/dom/webidls/CSSMediaRule.webidl9
-rw-r--r--components/script/dom/webidls/CSSNamespaceRule.webidl10
-rw-r--r--components/script/dom/webidls/CSSRule.webidl33
-rw-r--r--components/script/dom/webidls/CSSRuleList.webidl11
-rw-r--r--components/script/dom/webidls/CSSStyleRule.webidl10
-rw-r--r--components/script/dom/webidls/CSSStyleSheet.webidl12
-rw-r--r--components/script/dom/webidls/CSSViewportRule.webidl9
10 files changed, 137 insertions, 0 deletions
diff --git a/components/script/dom/webidls/CSSFontFaceRule.webidl b/components/script/dom/webidls/CSSFontFaceRule.webidl
new file mode 100644
index 00000000000..56f5f6338d2
--- /dev/null
+++ b/components/script/dom/webidls/CSSFontFaceRule.webidl
@@ -0,0 +1,17 @@
+/* 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/. */
+
+// https://drafts.csswg.org/css-fonts/#cssfontfacerule
+[Exposed=(Window,Worker)]
+interface CSSFontFaceRule : CSSRule {
+ // attribute DOMString family;
+ // attribute DOMString src;
+ // attribute DOMString style;
+ // attribute DOMString weight;
+ // attribute DOMString stretch;
+ // attribute DOMString unicodeRange;
+ // attribute DOMString variant;
+ // attribute DOMString featureSettings;
+};
+
diff --git a/components/script/dom/webidls/CSSGroupingRule.webidl b/components/script/dom/webidls/CSSGroupingRule.webidl
new file mode 100644
index 00000000000..fdf5f22fbcc
--- /dev/null
+++ b/components/script/dom/webidls/CSSGroupingRule.webidl
@@ -0,0 +1,12 @@
+/* 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/. */
+
+// https://drafts.csswg.org/cssom/#the-cssgroupingrule-interface
+[Exposed=(Window,Worker)]
+interface CSSGroupingRule : CSSRule {
+ // [SameObject] readonly attribute CSSRuleList cssRules;
+ // unsigned long insertRule(DOMString rule, unsigned long index);
+ // void deleteRule(unsigned long index);
+};
+
diff --git a/components/script/dom/webidls/CSSKeyframesRule.webidl b/components/script/dom/webidls/CSSKeyframesRule.webidl
new file mode 100644
index 00000000000..e2c9fe68058
--- /dev/null
+++ b/components/script/dom/webidls/CSSKeyframesRule.webidl
@@ -0,0 +1,14 @@
+/* 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/. */
+
+// https://drafts.csswg.org/css-animations/#interface-csskeyframesrule
+[Exposed=(Window,Worker)]
+interface CSSKeyframesRule : CSSRule {
+ // attribute DOMString name;
+ // readonly attribute CSSRuleList cssRules;
+
+ // void appendRule(DOMString rule);
+ // void deleteRule(DOMString select);
+ // CSSKeyframeRule? findRule(DOMString select);
+};
diff --git a/components/script/dom/webidls/CSSMediaRule.webidl b/components/script/dom/webidls/CSSMediaRule.webidl
new file mode 100644
index 00000000000..4d83f8255d8
--- /dev/null
+++ b/components/script/dom/webidls/CSSMediaRule.webidl
@@ -0,0 +1,9 @@
+/* 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/. */
+
+// https://drafts.csswg.org/cssom/#the-cssmediarule-interface
+[Exposed=(Window,Worker)]
+interface CSSMediaRule : CSSGroupingRule {
+ // [SameObject, PutForwards=mediaText] readonly attribute MediaList media;
+};
diff --git a/components/script/dom/webidls/CSSNamespaceRule.webidl b/components/script/dom/webidls/CSSNamespaceRule.webidl
new file mode 100644
index 00000000000..5ee1013a82b
--- /dev/null
+++ b/components/script/dom/webidls/CSSNamespaceRule.webidl
@@ -0,0 +1,10 @@
+/* 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/. */
+
+// https://drafts.csswg.org/cssom/#the-cssnamespacerule-interface
+[Exposed=(Window,Worker)]
+interface CSSNamespaceRule : CSSRule {
+ // readonly attribute DOMString namespaceURI;
+ // readonly attribute DOMString prefix;
+};
diff --git a/components/script/dom/webidls/CSSRule.webidl b/components/script/dom/webidls/CSSRule.webidl
new file mode 100644
index 00000000000..1c1015c9fe4
--- /dev/null
+++ b/components/script/dom/webidls/CSSRule.webidl
@@ -0,0 +1,33 @@
+/* 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/. */
+
+// https://drafts.csswg.org/cssom/#the-cssrule-interface
+[Exposed=(Window,Worker)]
+interface CSSRule {
+ const unsigned short STYLE_RULE = 1;
+ const unsigned short CHARSET_RULE = 2; // historical
+ const unsigned short IMPORT_RULE = 3;
+ const unsigned short MEDIA_RULE = 4;
+ const unsigned short FONT_FACE_RULE = 5;
+ const unsigned short PAGE_RULE = 6;
+ const unsigned short MARGIN_RULE = 9;
+ const unsigned short NAMESPACE_RULE = 10;
+
+ readonly attribute unsigned short type;
+ attribute DOMString cssText;
+ // readonly attribute CSSRule? parentRule;
+ readonly attribute CSSStyleSheet? parentStyleSheet;
+};
+
+// https://drafts.csswg.org/css-animations/#interface-cssrule-idl
+partial interface CSSRule {
+ const unsigned short KEYFRAMES_RULE = 7;
+ const unsigned short KEYFRAME_RULE = 8;
+};
+
+// https://drafts.csswg.org/css-device-adapt/#css-rule-interface
+partial interface CSSRule {
+ const unsigned short VIEWPORT_RULE = 15;
+};
+
diff --git a/components/script/dom/webidls/CSSRuleList.webidl b/components/script/dom/webidls/CSSRuleList.webidl
new file mode 100644
index 00000000000..9947ca8473b
--- /dev/null
+++ b/components/script/dom/webidls/CSSRuleList.webidl
@@ -0,0 +1,11 @@
+/* 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/. */
+
+// https://drafts.csswg.org/cssom/#cssrulelist
+// [LegacyArrayClass]
+[Exposed=(Window,Worker)]
+interface CSSRuleList {
+ getter CSSRule? item(unsigned long index);
+ readonly attribute unsigned long length;
+};
diff --git a/components/script/dom/webidls/CSSStyleRule.webidl b/components/script/dom/webidls/CSSStyleRule.webidl
new file mode 100644
index 00000000000..acf2386cc18
--- /dev/null
+++ b/components/script/dom/webidls/CSSStyleRule.webidl
@@ -0,0 +1,10 @@
+/* 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/. */
+
+// https://drafts.csswg.org/cssom/#the-cssstylerule-interface
+[Exposed=(Window,Worker)]
+interface CSSStyleRule : CSSRule {
+ // attribute DOMString selectorText;
+ // [SameObject, PutForwards=cssText] readonly attribute CSSStyleDeclaration style;
+};
diff --git a/components/script/dom/webidls/CSSStyleSheet.webidl b/components/script/dom/webidls/CSSStyleSheet.webidl
new file mode 100644
index 00000000000..e30663fc778
--- /dev/null
+++ b/components/script/dom/webidls/CSSStyleSheet.webidl
@@ -0,0 +1,12 @@
+/* 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/. */
+
+// https://drafts.csswg.org/cssom/#the-cssstylesheet-interface
+[Exposed=(Window,Worker)]
+interface CSSStyleSheet : StyleSheet {
+ // readonly attribute CSSRule? ownerRule;
+ [SameObject] readonly attribute CSSRuleList cssRules;
+ // unsigned long insertRule(DOMString rule, unsigned long index);
+ // void deleteRule(unsigned long index);
+};
diff --git a/components/script/dom/webidls/CSSViewportRule.webidl b/components/script/dom/webidls/CSSViewportRule.webidl
new file mode 100644
index 00000000000..bea63540527
--- /dev/null
+++ b/components/script/dom/webidls/CSSViewportRule.webidl
@@ -0,0 +1,9 @@
+/* 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/. */
+
+// https://drafts.csswg.org/css-device-adapt/#css-viewport-rule-interface
+[Exposed=(Window,Worker)]
+interface CSSViewportRule : CSSRule {
+ // readonly attribute CSSStyleDeclaration style;
+};