Commit acac1ce
bors-servo
Auto merge of servo#185 - servo:…, r=emilio
Fix interaction of skip_whitespace and nested blocks
This fixes (at least some of) the test failures at servo/servo#18171
In code like this:
```css
unsupported selector ! { stuff }
valid selector { color: green }
```
`rules_and_declarations::parse_qualified_rule` would leave the parser just after the first `{` with `Parser::at_start_of == Some(BlockType::CurlyBracket)`. The latter means that, unless `Parser::parse_nested_block` is called, the parser needs to skip over this block until the matching `}` before doing anything else. This PR makes `Parser::skip_whitespace` and `Parser::skip_cdc_and_cdo` (both added recently in servo#181) take care of `Parser::at_start_of` correctly the same way `Parser::next` does.
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/rust-cssparser/185)
<!-- Reviewable:end -->1 file changed
+6
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
300 | 300 | | |
301 | 301 | | |
302 | 302 | | |
303 | | - | |
304 | | - | |
305 | | - | |
306 | | - | |
| 303 | + | |
| 304 | + | |
307 | 305 | | |
308 | 306 | | |
309 | 307 | | |
310 | 308 | | |
311 | 309 | | |
312 | 310 | | |
313 | 311 | | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
314 | 316 | | |
315 | 317 | | |
316 | 318 | | |
| |||
0 commit comments