From 5db88db8fc38e4932075817eeb0d0627d332b5b6 Mon Sep 17 00:00:00 2001 From: violet Date: Mon, 24 Jun 2019 04:07:42 +0000 Subject: [PATCH] style: paint-order parsing has off-by-one error. A couple of firefox only WPT failure caused by this off-by-one bug. Differential Revision: https://phabricator.services.mozilla.com/D35630 --- components/style/values/specified/svg.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/style/values/specified/svg.rs b/components/style/values/specified/svg.rs index 578870a4a91..2ce12ce467a 100644 --- a/components/style/values/specified/svg.rs +++ b/components/style/values/specified/svg.rs @@ -200,7 +200,7 @@ impl Parse for SVGPaintOrder { // fill in rest for i in pos..PAINT_ORDER_COUNT { - for paint in 0..PAINT_ORDER_COUNT { + for paint in 1..(PAINT_ORDER_COUNT + 1) { // if not seen, set bit at position, mark as seen if (seen & (1 << paint)) == 0 { seen |= 1 << paint;