From 8aa6498c803d0c77e3d119b9c19be5b610f1707f Mon Sep 17 00:00:00 2001 From: Tab Atkins-Bittner Date: Fri, 20 Apr 2018 14:36:29 -0700 Subject: [PATCH] [cssom][css-images][css-conditional] Re-up and apply the patch from #473, switching CSS from interface to namespace. Closes #437. --- css-conditional-3/Overview.bs | 8 ++++---- css-images-4/Overview.bs | 6 ++++-- cssom-1/Overview.bs | 17 ++++++++++++----- 3 files changed, 20 insertions(+), 11 deletions(-) diff --git a/css-conditional-3/Overview.bs b/css-conditional-3/Overview.bs index 80370b563de4..3bf380b45532 100644 --- a/css-conditional-3/Overview.bs +++ b/css-conditional-3/Overview.bs @@ -999,12 +999,12 @@ interface CSSDocumentRule : CSSConditionRule {

The CSS interface, and the supports() function

-The {{CSS}} interface holds useful CSS-related functions that do not belong elsewhere. +The {{CSS}} namespace holds useful CSS-related functions that do not belong elsewhere.
-partial interface CSS {
-  static boolean supports(CSSOMString property, CSSOMString value);
-  static boolean supports(CSSOMString conditionText);
+partial namespace CSS {
+  boolean supports(CSSOMString property, CSSOMString value);
+  boolean supports(CSSOMString conditionText);
 };
 
diff --git a/css-images-4/Overview.bs b/css-images-4/Overview.bs index c00f73344797..fc26d2ed12a8 100644 --- a/css-images-4/Overview.bs +++ b/css-images-4/Overview.bs @@ -685,11 +685,13 @@ Using Out-Of-Document Sources: the ElementSources interface The elementSources Map object provides this.
-		partial interface CSS {
-			[SameObject] readonly attribute Map elementSources;
+		partial namespace CSS {
+			// [SameObject] readonly attribute Map elementSources;
 		};
 	
+ Issue(428): IDL namespaces don't support attributes yet. + Any entries in the elementSources map with a string key and a value that is an object providing a paint source are made available to the ''element()'' function. diff --git a/cssom-1/Overview.bs b/cssom-1/Overview.bs index 9cbeef82933f..a9ad193ea29e 100644 --- a/cssom-1/Overview.bs +++ b/cssom-1/Overview.bs @@ -2812,16 +2812,23 @@ Utility APIs {#utility-apis} The CSS.escape() Method {#the-css.escape()-method} ------------------------------------------------------ -The CSS interface holds useful CSS-related functions that do not belong elsewhere. +The CSS namespace holds useful CSS-related functions that do not belong elsewhere.
 [Exposed=Window]
-interface CSS {
-  static CSSOMString escape(CSSOMString ident);
+namespace CSS {
+  CSSOMString escape(CSSOMString ident);
 };
 
-The escape(ident) method must return the result of invoking serialize an identifier of +Issue: This was previously specified as an IDL interface +that only held static methods. +Switching to an IDL namespace is *nearly* identical, +so it's expected that there won't be any compat concerns. +If any are discovered, please report +so we can consider reverting this change. + +The escape(ident) operation must return the result of invoking serialize an identifier of ident.
@@ -2835,7 +2842,7 @@ The escape(ident) method must return the re
var element = document.querySelector('a[href="#' + CSS.escape(fragment) + '"]');
-Specifications that define static functions on the {{CSS}} interface and want to +Specifications that define operations on the {{CSS}} namespace and want to store some state should store the state on the current global object's associated Document.