Auto merge of #11428 - g-k:csstext, r=SimonSapin

csstext

- [x] These changes fix #4431.
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy --faster` reports one error for the `css_properties_accessors!` macro not having a spec link

```
$ git log -1 --format=oneline
91fb9bf1d3 fixup! implement cssText
$ ./mach build -d
   Compiling style v0.0.1 (file:///Users/greg/servo/components/style)
   Compiling gfx v0.0.1 (file:///Users/greg/servo/components/gfx)
   Compiling script v0.0.1 (file:///Users/greg/servo/components/script)
   Compiling layout_traits v0.0.1 (file:///Users/greg/servo/components/layout_traits)
   Compiling compositing v0.0.1 (file:///Users/greg/servo/components/compositing)
   Compiling glutin_app v0.0.1 (file:///Users/greg/servo/ports/glutin)
   Compiling constellation v0.0.1 (file:///Users/greg/servo/components/constellation)
   Compiling layout v0.0.1 (file:///Users/greg/servo/components/layout)
   Compiling servo v0.0.1 (file:///Users/greg/servo/components/servo)
Build completed in 0:05:11.475584
$ ./mach test-tidy --faster
Checking files for tidiness...
./components/script/dom/cssstyledeclaration.rs:386: method declared in webidl is missing a comment with a specification link
  Progress: 100% (12/12)
```

- [x] There are tests for these changes.  More CSSOM tests pass, but others fail that probably shouldn't:

* `./mach test-css tests/wpt/css-tests/cssom-1_dev/html/index-002.htm` and a bunch of the other tests in `/css-tests/cssom-1_dev/html/ crash when run individually
* `./mach test-css tests/wpt/css-tests/cssom-1_dev/html/cssom-cssText-serialize.htm` fails to strip a trailing semicolon (`left: 10px` vs `left: 10px;`)
* `./mach test-css tests/wpt/css-tests/cssom-1_dev/html/index-001.htm` shared shorthand values aren't coalesced (`margin: 20px` vs. `margin: 20px 20px 20px 20px`)
* `./mach test-css tests/wpt/css-tests/cssom-1_dev/html/cssstyledeclaration-csstext.htm` also crashes and fails for `color: red;` vs. `color: RED;`,  preserving declaration insertion order, whitespace in the value, and setting an unknown style property.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11428)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2016-06-01 01:59:12 -05:00
commit 09e6f4ac54
8 changed files with 42 additions and 37 deletions

View file

@ -1,5 +0,0 @@
[computed-style-001.htm]
type: testharness
[read_only]
expected: FAIL

View file

@ -1,17 +1,8 @@
[cssstyledeclaration-csstext.htm]
type: testharness
[uppercase property]
expected: FAIL
[uppercase value]
expected: FAIL
[overwriting with invalid value]
expected: FAIL
[use rgb]
expected: FAIL
[cssText order]
expected: FAIL

View file

@ -1,8 +1,5 @@
[cssstyledeclaration-mutability.htm]
type: testharness
[HTMLElement's CSSStyleDeclaration is mutable]
expected: FAIL
[StyleSheet's CSSStyleDeclaration is mutable]
expected: FAIL

View file

@ -30,27 +30,15 @@
[border is expected to be border-width: 1px;]
expected: FAIL
[overflow is expected to be overflow: scroll hidden;]
expected: FAIL
[overflow is expected to be overflow: scroll;]
expected: FAIL
[outline is expected to be outline: blue dotted 2px;]
expected: FAIL
[margin is expected to be margin: 1px 2px 3px 4px;]
expected: FAIL
[list is expected to be list-style: circle inside;]
expected: FAIL
[list is expected to be list-style-type: lower-alpha;]
expected: FAIL
[font-family is expected to be font-family: sans-serif; line-height: 2em; font-size: 3em; font-style: italic; font-weight: bold;]
expected: FAIL
[padding is expected to be padding: 1px 2px 3px 4px;]
expected: FAIL

View file

@ -474,9 +474,6 @@
[CSSNamespaceRule interface: attribute prefix]
expected: FAIL
[CSSStyleDeclaration interface: attribute cssText]
expected: FAIL
[CSSStyleDeclaration interface: attribute parentRule]
expected: FAIL