Auto merge of #18917 - heycam:observer-test, r=emilio

style: Add some more tests for disallowed rootMargin values.

<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/18917)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2017-10-17 08:11:16 -05:00 committed by GitHub
commit aa3122e7d1
3 changed files with 19 additions and 2 deletions

View file

@ -81,6 +81,11 @@ impl ToNsCssValue for PixelOrPercentage {
}
/// The value of an IntersectionObserver's rootMargin property.
///
/// Only bare px or percentage values are allowed. Other length units and
/// calc() values are not allowed.
///
/// https://w3c.github.io/IntersectionObserver/#parse-a-root-margin
pub struct IntersectionObserverRootMargin(pub Rect<PixelOrPercentage>);
impl Parse for IntersectionObserverRootMargin {