Issue #1885 - Allow unitless rootMargin entries for IntersectionObserver.

I could have done this through a CSSLoader to allow all CSS unit quirks but
I wasn't planning to start passing around document and element references
everywhere, so instead just did it manually by accepting numbers/floats in
addition to pixel and percent.
This commit is contained in:
Moonchild 2022-04-24 17:00:46 +00:00 committed by roytam1
commit 7c93047283
2 changed files with 6 additions and 2 deletions

View file

@ -2315,7 +2315,7 @@ CSSParserImpl::ParseMarginString(const nsSubstring& aBuffer,
} else {
UngetToken();
// Parse a margin, and check that there's nothing else after it.
marginParsed = ParseGroupedBoxProperty(VARIANT_LP, aValue, 0) &&
marginParsed = ParseGroupedBoxProperty(VARIANT_LPN, aValue, 0) &&
!GetToken(true);
}