Commit f13595ac authored by Emilio Cobos Álvarez's avatar Emilio Cobos Álvarez
Browse files

Bug 1745233 - Update CSSOM for layer rules to the spec....

Bug 1745233 - Update CSSOM for layer rules to the spec. r=firefox-style-system-reviewers,layout-reviewers,boris

Pretty mechanical.

Tests are in https://wpt.live/css/css-cascade/layer-rules-cssom.html
which (with a fix for @import tests which I'll submit separately) we
pass.

Sync for that is bug 1743936.

Differential Revision: https://phabricator.services.mozilla.com/D133387
parent d84300e6
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -283,7 +283,9 @@ var interfaceNamesInGlobalScope = [
  // IMPORTANT: Do not change this list without review from a DOM peer!
  { name: "CSSKeyframesRule", insecureContext: true },
  // IMPORTANT: Do not change this list without review from a DOM peer!
  { name: "CSSLayerRule", insecureContext: true, nightly: true },
  { name: "CSSLayerBlockRule", insecureContext: true, nightly: true },
  // IMPORTANT: Do not change this list without review from a DOM peer!
  { name: "CSSLayerStatementRule", insecureContext: true, nightly: true },
  // IMPORTANT: Do not change this list without review from a DOM peer!
  { name: "CSSMediaRule", insecureContext: true },
  // IMPORTANT: Do not change this list without review from a DOM peer!
+6 −0
Original line number Diff line number Diff line
@@ -19,3 +19,9 @@ interface CSSImportRule : CSSRule {
  // be.  See <https://bugzilla.mozilla.org/show_bug.cgi?id=1326509>.
  [SameObject, BinaryName="styleSheetForBindings"] readonly attribute CSSStyleSheet? styleSheet;
};

// https://drafts.csswg.org/css-cascade-5/#extensions-to-cssimportrule-interface
partial interface CSSImportRule {
  [Pref="layout.css.cascade-layers.enabled"]
  readonly attribute UTF8String? layerName;
};
+4 −4
Original line number Diff line number Diff line
@@ -3,10 +3,10 @@
 * 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/.
 *
 * This is just scaffolding waiting for
 * https://github.com/w3c/csswg-drafts/issues/6576 to get resolved.
 * The origin of this IDL file is
 * https://drafts.csswg.org/css-cascade-5/#the-csslayerblockrule-interface
 */

[Exposed=Window, Pref="layout.css.cascade-layers.enabled"]
interface CSSLayerRule : CSSGroupingRule {
interface CSSLayerBlockRule : CSSGroupingRule {
  readonly attribute UTF8String name;
};
+14 −0
Original line number Diff line number Diff line
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* 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/.
 *
 * The origin of this IDL file is
 * https://drafts.csswg.org/css-cascade-5/#the-csslayerstatementrule-interface
 */
[Exposed=Window, Pref="layout.css.cascade-layers.enabled"]
interface CSSLayerStatementRule : CSSRule {
  // readonly attribute FrozenArray<CSSOMString> nameList;
  [Frozen, Cached, Pure]
  readonly attribute sequence<UTF8String> nameList;
};
+2 −1
Original line number Diff line number Diff line
@@ -478,7 +478,8 @@ WEBIDL_FILES = [
    "CSSImportRule.webidl",
    "CSSKeyframeRule.webidl",
    "CSSKeyframesRule.webidl",
    "CSSLayerRule.webidl",
    "CSSLayerBlockRule.webidl",
    "CSSLayerStatementRule.webidl",
    "CSSMediaRule.webidl",
    "CSSMozDocumentRule.webidl",
    "CSSNamespaceRule.webidl",
Loading