Skip to content

Commit b5d604c

Browse files
emilioJordan Taylor
authored and
Jordan Taylor
committed
[cssom] CSSStyleDeclaration.cssText should return the empty string for computed style.
Closes w3c#1033
1 parent 2a028b0 commit b5d604c

File tree

1 file changed

+19
-16
lines changed

1 file changed

+19
-16
lines changed

cssom-1/Overview.bs

Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1808,7 +1808,7 @@ On setting the {{CSSStyleRule/selectorText}} attribute these steps must be run:
18081808
The style attribute must return a CSSStyleDeclaration object for the style rule, with the
18091809
following properties:
18101810
1811-
1811+
18121812
Unset.
18131813
18141814
The declared declarations in the rule, in specified order.
@@ -1908,7 +1908,7 @@ On setting the {{CSSPageRule/selectorText}} attribute these steps must be run:
19081908
The style attribute must return a CSSStyleDeclaration object for the
19091909
@page at-rule, with the following properties:
19101910
1911-
1911+
19121912
Unset.
19131913
19141914
The declared declarations in the rule, in specified order.
@@ -1938,7 +1938,7 @@ included in the name. [[!CSS3SYN]]
19381938
The style attribute must return a CSSStyleDeclaration object for the
19391939
margin at-rule, with the following properties:
19401940
1941-
1941+
19421942
Unset.
19431943
19441944
The declared declarations in the rule, in specified order.
@@ -1996,9 +1996,9 @@ the DOM a CSS declaration block is a
19961996
CSS declaration block has the following associated properties:
19971997

19981998
1999-
readonly flag
2000-
Unset if the object can be manipulated. Set if it can not be
2001-
manipulated. Unless otherwise stated it is unset.
1999+
computed flag
2000+
Set if the object is a computed style declaration, rather than a specified
2001+
style. Unless otherwise stated it is unset.
20022002

20032003
declarations
20042004
The CSS declarations associated with the object.
@@ -2099,7 +2099,7 @@ A CSS declaration block has these attribute change steps for its <
20992099
with localName, value, and namespace:
21002100

21012101
    2102-
  1. If the readonly flag is set, then return.
  2. 2102+
  3. If the computed flag is set, then return.
  4. 21032103
  5. If the updating flag is set, then return.
  6. 21042104
  7. If localName is not "style", or namespace is not null, then return.
  8. 21052105
  9. If value is null, empty the declarations.
  10. @@ -2111,7 +2111,7 @@ When a CSS declaration block object is created, then:
    21112111

    21122112
      21132113
    1. Let owner node be the owner node.
    2. 2114-
    3. If owner node is null, or the readonly flag is set, then return.
    4. 2114+
    5. If owner node is null, or the computed flag is set, then return.
    6. 21152115
    7. Let value be the result of getting an attribute
    8. 21162116
      given null, "style", and owner node.
      21172117
    9. If value is not null, let the declarations be the result of
    10. @@ -2121,7 +2121,7 @@ When a CSS declaration block object is created, then:
      21212121
      To update style attribute for declaration block means to run the steps below:
      21222122

      21232123
        2124-
      1. Assert: declaration block's readonly flag is unset.
      2. 2124+
      3. Assert: declaration block's computed flag is unset.
      4. 21252125
      5. Let owner node be declaration block's owner node.
      6. 21262126
      7. If owner node is null, then return.
      8. 21272127
      9. Set declaration block's updating flag.
      10. @@ -2164,11 +2164,14 @@ The object's supported property indices are the numbers in the range zero
        21642164
        CSS declarations in the declarations. If there are no such
        21652165
        21662166

        2167-
        The cssText attribute must return the result of
        2168-
        2167+
        Getting the cssText attribute must run these steps:
        2168+
        2169+
        1. If the computed flag is set, then return the empty string.
        2170+
        2. Return the result of serializing the declarations.
        2171+
        21692172
        Setting the {{CSSStyleDeclaration/cssText}} attribute must run these steps:
        21702173
          2171-
        1. If the readonly flag is set,
        2. 2174+
        3. If the computed flag is set,
        4. 21722175
          then throw a {{NoModificationAllowedError}} exception.
          21732176
        5. Empty the declarations.
        6. 21742177
        7. Parse the given value and, if the return value is not the empty list, insert the items in the list
        8. @@ -2234,7 +2237,7 @@ value would be "important".
          22342237

          22352238
          The setProperty(property, value, priority) method must run these steps:
          22362239
            2237-
          1. If the readonly flag is set,
          2. 2240+
          3. If the computed flag is set,
          4. 22382241
            then throw a {{NoModificationAllowedError}} exception.
            22392242
          5. If property is not a custom property, follow these substeps:
          6. 22402243
              @@ -2349,7 +2352,7 @@ use different algorithms as long as the constraints above hold.
              23492352

              23502353
              The removeProperty(property) method must run these steps:
              23512354
                2352-
              1. If the readonly flag is set,
              2. 2355+
              3. If the computed flag is set,
              4. 23532356
                then throw a {{NoModificationAllowedError}} exception.
                23542357
              5. If property is not a custom property,
              6. 23552358
                let property be property converted to ASCII lowercase.
                @@ -2801,7 +2804,7 @@ interface mixin ElementCSSInlineStyle {
                28012804
                28022805

                28032806
                The style attribute must return a CSS declaration block object whose
                2804-
                readonly flag is unset, whose parent CSS rule is null, and
                2807+
                computed flag is unset, whose parent CSS rule is null, and
                28052808
                28062809

                28072810
                If the user agent supports HTML, the following IDL applies: [[HTML]]
                @@ -2859,7 +2862,7 @@ steps:
                28592862
              7. 28602863
                Return a live CSS declaration block with the following properties:
                28612864
                2862-
                2865+
                28632866
                Set.
                28642867
                28652868
                decls.

                0 commit comments

                Comments
                 (0)