Back out bug 613659 (for regression bug 998792)
authorMats Palmgren <matspal@gmail.com>
Sun, 20 Apr 2014 19:39:24 +0000
changeset 179365 4bc69199b7e1
parent 179341 c2ff93dab24e
child 179366 28dc0100f9b0
push id26620
push usermpalmgren@mozilla.com
push dateSun, 20 Apr 2014 19:41:30 +0000
treeherdermozilla-central@28dc0100f9b0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs613659, 998792
milestone31.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Back out bug 613659 (for regression bug 998792)
gfx/thebes/gfxContext.h
layout/base/nsCSSRendering.cpp
layout/base/nsCSSRendering.h
layout/base/nsCSSRenderingBorders.cpp
layout/base/nsCSSRenderingBorders.h
layout/base/nsDisplayList.cpp
layout/generic/crashtests/383089-1.html
layout/generic/nsContainerFrame.cpp
layout/generic/nsFrame.cpp
layout/generic/nsGfxScrollFrame.cpp
layout/generic/nsGfxScrollFrame.h
layout/generic/nsIFrame.h
layout/generic/nsImageFrame.cpp
layout/generic/nsInlineFrame.cpp
layout/generic/nsLineLayout.cpp
layout/generic/nsSplittableFrame.cpp
layout/reftests/backgrounds/background-size-bounding-box.html
layout/reftests/backgrounds/background-size-clone.html
layout/reftests/backgrounds/background-size-continuous.html
layout/reftests/backgrounds/background-size-cover-bounding-box.html
layout/reftests/backgrounds/background-size-cover-clone.html
layout/reftests/backgrounds/background-size-cover-continuous.html
layout/reftests/backgrounds/background-size-cover-each-box.html
layout/reftests/backgrounds/background-size-cover-slice.html
layout/reftests/backgrounds/background-size-each-box.html
layout/reftests/backgrounds/background-size-slice.html
layout/reftests/backgrounds/reftest.list
layout/reftests/bugs/368020-3-ref.html
layout/reftests/bugs/368020-3.html
layout/reftests/bugs/368020-4-ref.html
layout/reftests/bugs/368020-4.html
layout/reftests/bugs/368020-5-ref.html
layout/reftests/bugs/368020-5.html
layout/reftests/bugs/reftest.list
layout/reftests/css-break/box-decoration-break-1-ref.html
layout/reftests/css-break/box-decoration-break-1.html
layout/reftests/css-break/box-decoration-break-with-inset-box-shadow-1-ref.html
layout/reftests/css-break/box-decoration-break-with-inset-box-shadow-1.html
layout/reftests/css-break/box-decoration-break-with-outset-box-shadow-1-ref.html
layout/reftests/css-break/box-decoration-break-with-outset-box-shadow-1.html
layout/reftests/css-break/green-circle-alpha-32x32.png
layout/reftests/css-break/reftest.list
layout/reftests/reftest.list
layout/style/nsCSSKeywordList.h
layout/style/nsCSSPropList.h
layout/style/nsCSSProps.cpp
layout/style/nsCSSProps.h
layout/style/nsComputedDOMStyle.cpp
layout/style/nsComputedDOMStyle.h
layout/style/nsComputedDOMStylePropertyList.h
layout/style/nsRuleNode.cpp
layout/style/nsStyleConsts.h
layout/style/nsStyleStruct.cpp
layout/style/nsStyleStruct.h
layout/style/test/property_database.js
layout/style/test/test_shorthand_property_getters.html
layout/tables/nsTableCellFrame.cpp
layout/tables/nsTableCellFrame.h
layout/tables/nsTableColGroupFrame.cpp
layout/tables/nsTableFrame.cpp
layout/tables/nsTableRowFrame.cpp
layout/tables/nsTableRowGroupFrame.cpp
modules/libpref/src/init/all.js
--- a/gfx/thebes/gfxContext.h
+++ b/gfx/thebes/gfxContext.h
@@ -826,22 +826,24 @@ public:
   }
 
   void SetContext(gfxContext *aContext) {
     NS_ASSERTION(!mContext, "Not going to call Restore() on some context!!!");
     mContext = aContext;
     mContext->Save();    
   }
 
-  void EnsureSaved(gfxContext *aContext) {
-    MOZ_ASSERT(!mContext || mContext == aContext, "wrong context");
-    if (!mContext) {
-        mContext = aContext;
-        mContext->Save();
+  void Reset(gfxContext *aContext) {
+    // Do the equivalent of destroying and re-creating this object.
+    NS_PRECONDITION(aContext, "must provide a context");
+    if (mContext) {
+      mContext->Restore();
     }
+    mContext = aContext;
+    mContext->Save();
   }
 
 private:
   gfxContext *mContext;
 };
 
 /**
  * Sentry helper class for functions with multiple return points that need to
--- a/layout/base/nsCSSRendering.cpp
+++ b/layout/base/nsCSSRendering.cpp
@@ -56,29 +56,16 @@
 using namespace mozilla;
 using namespace mozilla::css;
 using namespace mozilla::gfx;
 using mozilla::image::ImageOps;
 using mozilla::CSSSizeOrRatio;
 
 static int gFrameTreeLockCount = 0;
 
-static void
-ApplySkipSides(int aSkipSides, nsMargin* aMargin)
-{
-  if (aSkipSides & SIDE_BIT_LEFT)
-    aMargin->left = 0;
-  if (aSkipSides & SIDE_BIT_TOP)
-    aMargin->top = 0;
-  if (aSkipSides & SIDE_BIT_RIGHT)
-    aMargin->right = 0;
-  if (aSkipSides & SIDE_BIT_BOTTOM)
-    aMargin->bottom = 0;
-}
-
 // To avoid storing this data on nsInlineFrame (bloat) and to avoid
 // recalculating this for each frame in a continuation (perf), hold
 // a cache of various coordinate information that we need in order
 // to paint inline backgrounds.
 struct InlineBackgroundData
 {
   InlineBackgroundData()
       : mFrame(nullptr), mBlockFrame(nullptr)
@@ -89,44 +76,39 @@ struct InlineBackgroundData
   {
   }
 
   void Reset()
   {
     mBoundingBox.SetRect(0,0,0,0);
     mContinuationPoint = mLineContinuationPoint = mUnbrokenWidth = 0;
     mFrame = mBlockFrame = nullptr;
-    mLeftBorderData.Reset();
   }
 
-  /**
-   * Return a continuous rect for (an inline) aFrame relative to the
-   * continuation that draws the left-most part of the background.
-   * This is used when painting backgrounds.
-   */
   nsRect GetContinuousRect(nsIFrame* aFrame)
   {
-    MOZ_ASSERT(aFrame->GetType() == nsGkAtoms::inlineFrame);
-
     SetFrame(aFrame);
 
     nscoord x;
     if (mBidiEnabled) {
       x = mLineContinuationPoint;
 
       // Scan continuations on the same line as aFrame and accumulate the widths
       // of frames that are to the left (if this is an LTR block) or right
       // (if it's RTL) of the current one.
       bool isRtlBlock = (mBlockFrame->StyleVisibility()->mDirection ==
                            NS_STYLE_DIRECTION_RTL);
       nscoord curOffset = aFrame->GetOffsetTo(mBlockFrame).x;
 
+      // No need to use our GetPrevContinuation/GetNextContinuation methods
+      // here, since ib-split siblings are certainly not on the same line.
+
+      nsIFrame* inlineFrame = aFrame->GetPrevContinuation();
       // If the continuation is fluid we know inlineFrame is not on the same line.
       // If it's not fluid, we need to test further to be sure.
-      nsIFrame* inlineFrame = aFrame->GetPrevContinuation();
       while (inlineFrame && !inlineFrame->GetNextInFlow() &&
              AreOnSameLine(aFrame, inlineFrame)) {
         nscoord frameXOffset = inlineFrame->GetOffsetTo(mBlockFrame).x;
         if(isRtlBlock == (frameXOffset >= curOffset)) {
           x += inlineFrame->GetSize().width;
         }
         inlineFrame = inlineFrame->GetPrevContinuation();
       }
@@ -153,49 +135,16 @@ struct InlineBackgroundData
     }
 
     // Assume background-origin: border and return a rect with offsets
     // relative to (0,0).  If we have a different background-origin,
     // then our rect should be deflated appropriately by our caller.
     return nsRect(-x, 0, mUnbrokenWidth, mFrame->GetSize().height);
   }
 
-  /**
-   * Return a continuous rect for (an inline) aFrame relative to the
-   * continuation that should draw the left-border.  This is used when painting
-   * borders and clipping backgrounds.  This may NOT be the same continuous rect
-   * as for drawing backgrounds; the continuation with the left-border might be
-   * somewhere in the middle of that rect (e.g. BIDI), in those cases we need
-   * the reverse background order starting at the left-border continuation.
-   */
-  nsRect GetBorderContinuousRect(nsIFrame* aFrame, nsRect aBorderArea)
-  {
-    // Calling GetContinuousRect(aFrame) here may lead to Reset/Init which
-    // resets our mLeftBorderData so we save it ...
-    LeftBorderData saved(mLeftBorderData);
-    nsRect joinedBorderArea = GetContinuousRect(aFrame);
-    if (!saved.mIsValid || saved.mFrame != mLeftBorderData.mFrame) {
-      if (aFrame == mLeftBorderData.mFrame) {
-        mLeftBorderData.SetX(joinedBorderArea.x);
-      } else if (mLeftBorderData.mFrame) {
-        mLeftBorderData.SetX(GetContinuousRect(mLeftBorderData.mFrame).x);
-      }
-    } else {
-      // ... and restore it when possible.
-      mLeftBorderData.mX = saved.mX;
-    }
-    if (joinedBorderArea.x > mLeftBorderData.mX) {
-      joinedBorderArea.x =
-        -(mUnbrokenWidth + joinedBorderArea.x - aBorderArea.width);
-    } else {
-      joinedBorderArea.x -= mLeftBorderData.mX;
-    }
-    return joinedBorderArea;
-  }
-
   nsRect GetBoundingRect(nsIFrame* aFrame)
   {
     SetFrame(aFrame);
 
     // Move the offsets relative to (0,0) which puts the bounding box into
     // our coordinate system rather than our parent's.  We do this by
     // moving it the back distance from us to the bounding box.
     // This also assumes background-origin: border, so our caller will
@@ -203,32 +152,23 @@ struct InlineBackgroundData
     nsRect boundingBox(mBoundingBox);
     nsPoint point = mFrame->GetPosition();
     boundingBox.MoveBy(-point.x, -point.y);
 
     return boundingBox;
   }
 
 protected:
-  struct LeftBorderData {
-    nsIFrame* mFrame;   // the continuation that may have a left-border
-    nscoord   mX;       // cached GetContinuousRect(mFrame).x
-    bool      mIsValid; // true if mX is valid
-    void Reset() { mFrame = nullptr; mIsValid = false; }
-    void SetX(nscoord aX) { mX = aX; mIsValid = true; }
-  };
-
-  nsIFrame*      mFrame;
-  nsBlockFrame*  mBlockFrame;
-  nsRect         mBoundingBox;
-  nscoord        mContinuationPoint;
-  nscoord        mUnbrokenWidth;
-  nscoord        mLineContinuationPoint;
-  LeftBorderData mLeftBorderData;
-  bool           mBidiEnabled;
+  nsIFrame*     mFrame;
+  nsBlockFrame* mBlockFrame;
+  nsRect        mBoundingBox;
+  nscoord       mContinuationPoint;
+  nscoord       mUnbrokenWidth;
+  nscoord       mLineContinuationPoint;
+  bool          mBidiEnabled;
 
   void SetFrame(nsIFrame* aFrame)
   {
     NS_PRECONDITION(aFrame, "Need a frame");
     NS_ASSERTION(gFrameTreeLockCount > 0,
                  "Can't call this when frame tree is not locked");
 
     if (aFrame == mFrame) {
@@ -291,56 +231,48 @@ protected:
         NS_ASSERTION(nextCont, "How did that happen?");
       }
     }
     return nextCont;
   }
 
   void Init(nsIFrame* aFrame)
   {
-    mLeftBorderData.Reset();
     mBidiEnabled = aFrame->PresContext()->BidiEnabled();
     if (mBidiEnabled) {
       // Find the containing block frame
       nsIFrame* frame = aFrame;
       do {
         frame = frame->GetParent();
         mBlockFrame = do_QueryFrame(frame);
       }
       while (frame && frame->IsFrameOfType(nsIFrame::eLineParticipant));
 
       NS_ASSERTION(mBlockFrame, "Cannot find containing block.");
     }
 
     // Start with the previous flow frame as our continuation point
     // is the total of the widths of the previous frames.
     nsIFrame* inlineFrame = GetPrevContinuation(aFrame);
+
     while (inlineFrame) {
-      if (!mLeftBorderData.mFrame &&
-          !(inlineFrame->GetSkipSides() & SIDE_BIT_LEFT)) {
-        mLeftBorderData.mFrame = inlineFrame;
-      }
       nsRect rect = inlineFrame->GetRect();
       mContinuationPoint += rect.width;
       if (mBidiEnabled && !AreOnSameLine(aFrame, inlineFrame)) {
         mLineContinuationPoint += rect.width;
       }
       mUnbrokenWidth += rect.width;
       mBoundingBox.UnionRect(mBoundingBox, rect);
       inlineFrame = GetPrevContinuation(inlineFrame);
     }
 
     // Next add this frame and subsequent frames to the bounding box and
     // unbroken width.
     inlineFrame = aFrame;
     while (inlineFrame) {
-      if (!mLeftBorderData.mFrame &&
-          !(inlineFrame->GetSkipSides() & SIDE_BIT_LEFT)) {
-        mLeftBorderData.mFrame = inlineFrame;
-      }
       nsRect rect = inlineFrame->GetRect();
       mUnbrokenWidth += rect.width;
       mBoundingBox.UnionRect(mBoundingBox, rect);
       inlineFrame = GetNextContinuation(inlineFrame);
     }
 
     mFrame = aFrame;
   }
@@ -434,116 +366,16 @@ MakeBevelColor(mozilla::css::Side whichS
   case NS_SIDE_LEFT:
   default:
     theColor = colors[0];
     break;
   }
   return theColor;
 }
 
-static bool
-GetRadii(nsIFrame* aForFrame, const nsStyleBorder& aBorder,
-         const nsRect& aOrigBorderArea, const nsRect& aBorderArea,
-         gfxCornerSizes* aBgRadii)
-{
-  nscoord radii[8];
-  bool haveRoundedCorners;
-  nsSize sz = aBorderArea.Size();
-  nsSize frameSize = aForFrame->GetSize();
-  if (&aBorder == aForFrame->StyleBorder() &&
-      frameSize == aOrigBorderArea.Size()) {
-    haveRoundedCorners = aForFrame->GetBorderRadii(sz, sz, 0, radii);
-   } else {
-    haveRoundedCorners =
-      nsIFrame::ComputeBorderRadii(aBorder.mBorderRadius, frameSize, sz, 0, radii);
-  }
-  if (haveRoundedCorners) {
-    auto d2a = aForFrame->PresContext()->AppUnitsPerDevPixel();
-    nsCSSRendering::ComputePixelRadii(radii, d2a, aBgRadii);
-  }
-  return haveRoundedCorners;
-}
-
-static nsRect
-JoinBoxesForVerticalSlice(nsIFrame* aFrame, const nsRect& aBorderArea)
-{
-  // Inflate vertically as if our continuations were laid out vertically
-  // adjacent. Note that we don't touch the width.
-  nsRect borderArea = aBorderArea;
-  nscoord h = 0;
-  nsIFrame* f = aFrame->GetNextContinuation();
-  for (; f; f = f->GetNextContinuation()) {
-    MOZ_ASSERT(!(f->GetStateBits() & NS_FRAME_PART_OF_IBSPLIT),
-               "anonymous ib-split block shouldn't have border/background");
-    h += f->GetRect().height;
-  }
-  borderArea.height += h;
-  h = 0;
-  f = aFrame->GetPrevContinuation();
-  for (; f; f = f->GetPrevContinuation()) {
-    MOZ_ASSERT(!(f->GetStateBits() & NS_FRAME_PART_OF_IBSPLIT),
-               "anonymous ib-split block shouldn't have border/background");
-    h += f->GetRect().height;
-  }
-  borderArea.y -= h;
-  borderArea.height += h;
-  return borderArea;
-}
-
-/**
- * Inflate aBorderArea which is relative to aFrame's origin to calculate
- * a hypothetical non-split frame area for all the continuations.
- * See "Joining Boxes for 'slice'" in
- * http://dev.w3.org/csswg/css-break/#break-decoration
- */
-enum InlineBoxOrder { eForBorder, eForBackground };
-static nsRect
-JoinBoxesForSlice(nsIFrame* aFrame, const nsRect& aBorderArea,
-                  InlineBoxOrder aOrder)
-{
-  if (aFrame->GetType() == nsGkAtoms::inlineFrame) {
-    return (aOrder == eForBorder
-            ? gInlineBGData->GetBorderContinuousRect(aFrame, aBorderArea)
-            : gInlineBGData->GetContinuousRect(aFrame)) +
-      aBorderArea.TopLeft();
-  }
-  return JoinBoxesForVerticalSlice(aFrame, aBorderArea);
-}
-
-static bool
-IsBoxDecorationSlice(const nsStyleBorder& aStyleBorder)
-{
-  return aStyleBorder.mBoxDecorationBreak ==
-           NS_STYLE_BOX_DECORATION_BREAK_SLICE;
-}
-
-static nsRect
-BoxDecorationRectForBorder(nsIFrame* aFrame, const nsRect& aBorderArea,
-                           const nsStyleBorder* aStyleBorder = nullptr)
-{
-  if (!aStyleBorder) {
-    aStyleBorder = aFrame->StyleBorder();
-  }
-  return ::IsBoxDecorationSlice(*aStyleBorder)
-           ? ::JoinBoxesForSlice(aFrame, aBorderArea, eForBorder)
-           : aBorderArea;
-}
-
-static nsRect
-BoxDecorationRectForBackground(nsIFrame* aFrame, const nsRect& aBorderArea,
-                               const nsStyleBorder* aStyleBorder = nullptr)
-{
-  if (!aStyleBorder) {
-    aStyleBorder = aFrame->StyleBorder();
-  }
-  return ::IsBoxDecorationSlice(*aStyleBorder)
-           ? ::JoinBoxesForSlice(aFrame, aBorderArea, eForBackground)
-           : aBorderArea;
-}
-
 //----------------------------------------------------------------------
 // Thebes Border Rendering Code Start
 
 /*
  * Compute the float-pixel radii that should be used for drawing
  * this border/outline, given the various input bits.
  */
 /* static */ void
@@ -612,16 +444,20 @@ nsCSSRendering::PaintBorderWithStyleBord
                                            nsRenderingContext& aRenderingContext,
                                            nsIFrame* aForFrame,
                                            const nsRect& aDirtyRect,
                                            const nsRect& aBorderArea,
                                            const nsStyleBorder& aStyleBorder,
                                            nsStyleContext* aStyleContext,
                                            int aSkipSides)
 {
+  nsMargin            border;
+  nscoord             twipsRadii[8];
+  nsCompatibility     compatMode = aPresContext->CompatibilityMode();
+
   SN("++ PaintBorder");
 
   // Check to see if we have an appearance defined.  If so, we let the theme
   // renderer draw the border.  DO not get the data from aForFrame, since the passed in style context
   // may be different!  Always use |aStyleContext|!
   const nsStyleDisplay* displayData = aStyleContext->StyleDisplay();
   if (displayData->mAppearance) {
     nsITheme *theme = aPresContext->GetTheme();
@@ -633,112 +469,111 @@ nsCSSRendering::PaintBorderWithStyleBord
     DrawBorderImage(aPresContext, aRenderingContext, aForFrame,
                     aBorderArea, aStyleBorder, aDirtyRect);
     return;
   }
 
   // Get our style context's color struct.
   const nsStyleColor* ourColor = aStyleContext->StyleColor();
 
-  // In NavQuirks mode we want to use the parent's context as a starting point
-  // for determining the background color.
-  bool quirks = aPresContext->CompatibilityMode() == eCompatibility_NavQuirks;
-  nsIFrame* bgFrame = FindNonTransparentBackgroundFrame(aForFrame, quirks);
+  // in NavQuirks mode we want to use the parent's context as a starting point
+  // for determining the background color
+  nsIFrame* bgFrame = nsCSSRendering::FindNonTransparentBackgroundFrame
+    (aForFrame, compatMode == eCompatibility_NavQuirks ? true : false);
   nsStyleContext* bgContext = bgFrame->StyleContext();
   nscolor bgColor =
     bgContext->GetVisitedDependentColor(eCSSProperty_background_color);
 
-  nsMargin border = aStyleBorder.GetComputedBorder();
+  border = aStyleBorder.GetComputedBorder();
   if ((0 == border.left) && (0 == border.right) &&
       (0 == border.top) && (0 == border.bottom)) {
     // Empty border area
     return;
   }
 
-  // Compute the outermost boundary of the area that might be painted.
-  // Same coordinate space as aBorderArea & aBGClipRect.
-  nsRect joinedBorderArea =
-    ::BoxDecorationRectForBorder(aForFrame, aBorderArea, &aStyleBorder);
-  gfxCornerSizes bgRadii;
-  ::GetRadii(aForFrame, aStyleBorder, aBorderArea, joinedBorderArea, &bgRadii);
-
-
-  SF(" joinedBorderArea: %d %d %d %d\n", joinedBorderArea.x, joinedBorderArea.y,
-     joinedBorderArea.width, joinedBorderArea.height);
-
-  // start drawing
-  gfxContext* ctx = aRenderingContext.ThebesContext();
-  ctx->Save();
-
-  if (::IsBoxDecorationSlice(aStyleBorder)) {
-    if (aSkipSides == 0) {
-      // No continuations most likely, or ::first-letter that wants all border-
-      // sides on the first continuation.
-      joinedBorderArea = aBorderArea;
-    } else if (joinedBorderArea.IsEqualEdges(aBorderArea)) {
-      // No need for a clip, just skip the sides we don't want.
-      ::ApplySkipSides(aSkipSides, &border);
-    } else {
-      // We're drawing borders around the joined continuation boxes so we need
-      // to clip that to the slice that we want for this frame.
-      aRenderingContext.IntersectClip(aBorderArea);
-    }
+  nsSize frameSize = aForFrame->GetSize();
+  if (&aStyleBorder == aForFrame->StyleBorder() &&
+      frameSize == aBorderArea.Size()) {
+    aForFrame->GetBorderRadii(twipsRadii);
   } else {
-    MOZ_ASSERT(joinedBorderArea.IsEqualEdges(aBorderArea),
-               "Should use aBorderArea for box-decoration-break:clone");
-    MOZ_ASSERT(aForFrame->GetSkipSides() == 0,
-               "Should not skip sides for box-decoration-break:clone except "
-               "::first-letter/line continuations or other frame types that "
-               "don't have borders but those shouldn't reach this point.");
+    nsIFrame::ComputeBorderRadii(aStyleBorder.mBorderRadius, frameSize,
+                                 aBorderArea.Size(), aSkipSides, twipsRadii);
   }
 
-  // Convert to dev pixels.
+  // Turn off rendering for all of the zero sized sides
+  if (aSkipSides & SIDE_BIT_TOP) border.top = 0;
+  if (aSkipSides & SIDE_BIT_RIGHT) border.right = 0;
+  if (aSkipSides & SIDE_BIT_BOTTOM) border.bottom = 0;
+  if (aSkipSides & SIDE_BIT_LEFT) border.left = 0;
+
+  // get the inside and outside parts of the border
+  nsRect outerRect(aBorderArea);
+
+  SF(" outerRect: %d %d %d %d\n", outerRect.x, outerRect.y, outerRect.width, outerRect.height);
+
+  // we can assume that we're already clipped to aDirtyRect -- I think? (!?)
+
+  // Get our conversion values
   nscoord twipsPerPixel = aPresContext->DevPixelsToAppUnits(1);
-  gfxRect joinedBorderAreaPx =
-    nsLayoutUtils::RectToGfxRect(joinedBorderArea, twipsPerPixel);
+
+  // convert outer and inner rects
+  gfxRect oRect(nsLayoutUtils::RectToGfxRect(outerRect, twipsPerPixel));
+
+  // convert the border widths
   gfxFloat borderWidths[4] = { gfxFloat(border.top / twipsPerPixel),
                                gfxFloat(border.right / twipsPerPixel),
                                gfxFloat(border.bottom / twipsPerPixel),
                                gfxFloat(border.left / twipsPerPixel) };
 
+  // convert the radii
+  gfxCornerSizes borderRadii;
+  ComputePixelRadii(twipsRadii, twipsPerPixel, &borderRadii);
+
   uint8_t borderStyles[4];
   nscolor borderColors[4];
   nsBorderColors *compositeColors[4];
 
   // pull out styles, colors, composite colors
   NS_FOR_CSS_SIDES (i) {
     bool foreground;
     borderStyles[i] = aStyleBorder.GetBorderStyle(i);
     aStyleBorder.GetBorderColor(i, borderColors[i], foreground);
     aStyleBorder.GetCompositeColors(i, &compositeColors[i]);
 
     if (foreground)
       borderColors[i] = ourColor->mColor;
   }
 
   SF(" borderStyles: %d %d %d %d\n", borderStyles[0], borderStyles[1], borderStyles[2], borderStyles[3]);
-  //SF ("bgRadii: %f %f %f %f\n", bgRadii[0], bgRadii[1], bgRadii[2], bgRadii[3]);
+
+  // start drawing
+  gfxContext *ctx = aRenderingContext.ThebesContext();
+
+  ctx->Save();
 
 #if 0
-  // this will draw a transparent red backround underneath the border area
+  // this will draw a transparent red backround underneath the oRect area
   ctx->Save();
-  ctx->Rectangle(joinedBorderAreaPx);
+  ctx->Rectangle(oRect);
   ctx->SetColor(gfxRGBA(1.0, 0.0, 0.0, 0.5));
   ctx->Fill();
   ctx->Restore();
 #endif
 
+  //SF ("borderRadii: %f %f %f %f\n", borderRadii[0], borderRadii[1], borderRadii[2], borderRadii[3]);
+
   nsCSSBorderRenderer br(twipsPerPixel,
                          ctx,
-                         joinedBorderAreaPx,
+                         oRect,
                          borderStyles,
                          borderWidths,
-                         bgRadii,
+                         borderRadii,
                          borderColors,
                          compositeColors,
+                         aSkipSides,
                          bgColor);
   br.DrawBorders();
 
   ctx->Restore();
 
   SN();
 }
 
@@ -848,17 +683,17 @@ nsCSSRendering::PaintOutline(nsPresConte
 
   nsCSSBorderRenderer br(twipsPerPixel,
                          ctx,
                          oRect,
                          outlineStyles,
                          outlineWidths,
                          outlineRadii,
                          outlineColors,
-                         nullptr,
+                         nullptr, 0,
                          bgColor);
   br.DrawBorders();
 
   ctx->Restore();
 
   SN();
 }
 
@@ -901,17 +736,17 @@ nsCSSRendering::PaintFocus(nsPresContext
   // and PaintOutline do.)
   nsCSSBorderRenderer br(oneDevPixel,
                          ctx,
                          focusRect,
                          focusStyles,
                          focusWidths,
                          focusRadii,
                          focusColors,
-                         nullptr,
+                         nullptr, 0,
                          NS_RGB(255, 0, 0));
   br.DrawBorders();
 
   ctx->Restore();
 
   SN();
 }
 
@@ -1156,53 +991,44 @@ nsCSSRendering::PaintBoxShadowOuter(nsPr
                                     const nsRect& aFrameArea,
                                     const nsRect& aDirtyRect,
                                     float aOpacity)
 {
   const nsStyleBorder* styleBorder = aForFrame->StyleBorder();
   nsCSSShadowArray* shadows = styleBorder->mBoxShadow;
   if (!shadows)
     return;
-
-  gfxContextAutoSaveRestore gfxStateRestorer;
+  nscoord twipsPerPixel = aPresContext->DevPixelsToAppUnits(1);
+
   bool hasBorderRadius;
   bool nativeTheme; // mutually exclusive with hasBorderRadius
+  gfxCornerSizes borderRadii;
+
+  // Get any border radius, since box-shadow must also have rounded corners if the frame does
   const nsStyleDisplay* styleDisplay = aForFrame->StyleDisplay();
   nsITheme::Transparency transparency;
   if (aForFrame->IsThemed(styleDisplay, &transparency)) {
     // We don't respect border-radius for native-themed widgets
     hasBorderRadius = false;
     // For opaque (rectangular) theme widgets we can take the generic
     // border-box path with border-radius disabled.
     nativeTheme = transparency != nsITheme::eOpaque;
   } else {
     nativeTheme = false;
-    hasBorderRadius = true; // we'll update this below
-  }
-
-  nsRect frameRect = nativeTheme ?
-    aForFrame->GetVisualOverflowRectRelativeToSelf() + aFrameArea.TopLeft() :
-    aFrameArea;
-  frameRect = ::BoxDecorationRectForBorder(aForFrame, frameRect);
-
-  // Get any border radius, since box-shadow must also have rounded corners if
-  // the frame does.
-  gfxCornerSizes borderRadii;
-  const nscoord twipsPerPixel = aPresContext->DevPixelsToAppUnits(1);
-  if (hasBorderRadius) {
     nscoord twipsRadii[8];
     NS_ASSERTION(aFrameArea.Size() == aForFrame->VisualBorderRectRelativeToSelf().Size(),
                  "unexpected size");
-    nsSize sz = frameRect.Size();
-    hasBorderRadius = aForFrame->GetBorderRadii(sz, sz, 0, twipsRadii);
+    hasBorderRadius = aForFrame->GetBorderRadii(twipsRadii);
     if (hasBorderRadius) {
       ComputePixelRadii(twipsRadii, twipsPerPixel, &borderRadii);
     }
   }
 
+  nsRect frameRect =
+    nativeTheme ? aForFrame->GetVisualOverflowRectRelativeToSelf() + aFrameArea.TopLeft() : aFrameArea;
   gfxRect frameGfxRect(nsLayoutUtils::RectToGfxRect(frameRect, twipsPerPixel));
   frameGfxRect.Round();
 
   // We don't show anything that intersects with the frame we're blurring on. So tell the
   // blurrer not to do unnecessary work there.
   gfxRect skipGfxRect = frameGfxRect;
   bool useSkipGfxRect = true;
   if (nativeTheme) {
@@ -1216,17 +1042,16 @@ nsCSSRendering::PaintBoxShadowOuter(nsPr
       aForFrame->GetPaddingRect() - aForFrame->GetPosition() + aFrameArea.TopLeft();
     skipGfxRect = nsLayoutUtils::RectToGfxRect(paddingRect, twipsPerPixel);
   } else if (hasBorderRadius) {
     skipGfxRect.Deflate(gfxMargin(
         std::max(borderRadii[C_TL].height, borderRadii[C_TR].height), 0,
         std::max(borderRadii[C_BL].height, borderRadii[C_BR].height), 0));
   }
 
-  int skipSides = aForFrame->GetSkipSides();
   for (uint32_t i = shadows->Length(); i > 0; --i) {
     nsCSSShadowItem* shadowItem = shadows->ShadowAt(i - 1);
     if (shadowItem->mInset)
       continue;
 
     nsRect shadowRect = frameRect;
     shadowRect.MoveBy(shadowItem->mXOffset, shadowItem->mYOffset);
     if (!nativeTheme) {
@@ -1297,58 +1122,28 @@ nsCSSRendering::PaintBoxShadowOuter(nsPr
       aPresContext->GetTheme()->DrawWidgetBackground(wrapperCtx, aForFrame,
           styleDisplay->mAppearance, aFrameArea, nativeRect);
 
       blurringArea.DoPaint();
       renderContext->Restore();
     } else {
       renderContext->Save();
       // Clip out the area of the actual frame so the shadow is not shown within
-      // the frame.
+      // the frame
       renderContext->NewPath();
       renderContext->Rectangle(shadowGfxRectPlusBlur);
       if (hasBorderRadius) {
         renderContext->RoundedRectangle(frameGfxRect, borderRadii);
       } else {
         renderContext->Rectangle(frameGfxRect);
       }
 
       renderContext->SetFillRule(gfxContext::FILL_RULE_EVEN_ODD);
       renderContext->Clip();
 
-      // Clip the shadow so that we only get the part that applies to aForFrame.
-      nsRect fragmentClip = shadowRectPlusBlur;
-      if (skipSides) {
-        if (skipSides & SIDE_BIT_LEFT) {
-          nscoord xmost = fragmentClip.XMost();
-          fragmentClip.x = aFrameArea.x;
-          fragmentClip.width = xmost - fragmentClip.x;
-        }
-        if (skipSides & SIDE_BIT_RIGHT) {
-          nscoord xmost = fragmentClip.XMost();
-          nscoord overflow = xmost - aFrameArea.XMost();
-          if (overflow > 0) {
-            fragmentClip.width -= overflow;
-          }
-        }
-        if (skipSides & SIDE_BIT_TOP) {
-          nscoord ymost = fragmentClip.YMost();
-          fragmentClip.y = aFrameArea.y;
-          fragmentClip.height = ymost - fragmentClip.y;
-        }
-        if (skipSides & SIDE_BIT_BOTTOM) {
-          nscoord ymost = fragmentClip.YMost();
-          nscoord overflow = ymost - aFrameArea.YMost();
-          if (overflow > 0) {
-            fragmentClip.height -= overflow;
-          }
-        }
-      }
-      aRenderingContext.IntersectClip(fragmentClip);
-
       gfxCornerSizes clipRectRadii;
       if (hasBorderRadius) {
         gfxFloat spreadDistance = shadowItem->mSpread / twipsPerPixel;
 
         gfxFloat borderSizes[4];
 
         borderSizes[NS_SIDE_LEFT] = spreadDistance;
         borderSizes[NS_SIDE_TOP] = spreadDistance;
@@ -1388,30 +1183,28 @@ nsCSSRendering::PaintBoxShadowInner(nsPr
       !nsContentUtils::IsChromeDoc(aForFrame->GetContent()->GetCurrentDoc())) {
     // There's no way of getting hold of a shape corresponding to a
     // "padding-box" for native-themed widgets, so just don't draw
     // inner box-shadows for them. But we allow chrome to paint inner
     // box shadows since chrome can be aware of the platform theme.
     return;
   }
 
-  NS_ASSERTION(aForFrame->GetType() == nsGkAtoms::fieldSetFrame ||
-               aFrameArea.Size() == aForFrame->GetSize(), "unexpected size");
-
-  nsRect frameRect = ::BoxDecorationRectForBorder(aForFrame, aFrameArea);
-  nsRect paddingRect = frameRect;
-  nsMargin border = aForFrame->GetUsedBorder();
-  paddingRect.Deflate(border);
-
   // Get any border radius, since box-shadow must also have rounded corners
   // if the frame does.
   nscoord twipsRadii[8];
-  nsSize sz = frameRect.Size();
-  bool hasBorderRadius = aForFrame->GetBorderRadii(sz, sz, 0, twipsRadii);
-  const nscoord twipsPerPixel = aPresContext->DevPixelsToAppUnits(1);
+  NS_ASSERTION(aForFrame->GetType() == nsGkAtoms::fieldSetFrame ||
+               aFrameArea.Size() == aForFrame->GetSize(), "unexpected size");
+  bool hasBorderRadius = aForFrame->GetBorderRadii(twipsRadii);
+  nscoord twipsPerPixel = aPresContext->DevPixelsToAppUnits(1);
+
+  nsRect paddingRect = aFrameArea;
+  nsMargin border = aForFrame->GetUsedBorder();
+  aForFrame->ApplySkipSides(border);
+  paddingRect.Deflate(border);
 
   gfxCornerSizes innerRadii;
   if (hasBorderRadius) {
     gfxCornerSizes borderRadii;
 
     ComputePixelRadii(twipsRadii, twipsPerPixel, &borderRadii);
     gfxFloat borderSizes[4] = {
       gfxFloat(border.top / twipsPerPixel),
@@ -1423,19 +1216,23 @@ nsCSSRendering::PaintBoxShadowInner(nsPr
                                            &innerRadii);
   }
 
   for (uint32_t i = shadows->Length(); i > 0; --i) {
     nsCSSShadowItem* shadowItem = shadows->ShadowAt(i - 1);
     if (!shadowItem->mInset)
       continue;
 
-    // shadowPaintRect: the area to paint on the temp surface
-    // shadowClipRect: the area on the temporary surface within shadowPaintRect
-    //                 that we will NOT paint in
+    /*
+     * shadowRect: the frame's padding rect
+     * shadowPaintRect: the area to paint on the temp surface, larger than shadowRect
+     *                  so that blurs still happen properly near the edges
+     * shadowClipRect: the area on the temporary surface within shadowPaintRect
+     *                 that we will NOT paint in
+     */
     nscoord blurRadius = shadowItem->mRadius;
     nsMargin blurMargin =
       nsContextBoxBlur::GetBlurRadiusMargin(blurRadius, twipsPerPixel);
     nsRect shadowPaintRect = paddingRect;
     shadowPaintRect.Inflate(blurMargin);
 
     nsRect shadowClipRect = paddingRect;
     shadowClipRect.MoveBy(shadowItem->mXOffset, shadowItem->mYOffset);
@@ -1704,17 +1501,16 @@ GetBackgroundClip(gfxContext *aCtx, uint
                   const gfxCornerSizes& aBGRadii, nscoord aAppUnitsPerPixel,
                   /* out */ BackgroundClipState* aClipState)
 {
   aClipState->mBGClipArea = aBorderArea;
   aClipState->mHasAdditionalBGClipArea = false;
   aClipState->mCustomClip = false;
   aClipState->mRadiiAreOuter = true;
   aClipState->mClippedRadii = aBGRadii;
-
   if (aForFrame->GetType() == nsGkAtoms::scrollFrame &&
         NS_STYLE_BG_ATTACHMENT_LOCAL == aBackgroundAttachment) {
     // As of this writing, this is still in discussion in the CSS Working Group
     // http://lists.w3.org/Archives/Public/www-style/2013Jul/0250.html
 
     // The rectangle for 'background-clip' scrolls with the content,
     // but the background is also clipped at a non-scrolling 'padding-box'
     // like the content. (See below.)
@@ -1803,23 +1599,25 @@ SetupBackgroundClip(BackgroundClipState&
 
   // If we have rounded corners, clip all subsequent drawing to the
   // rounded rectangle defined by bgArea and bgRadii (we don't know
   // whether the rounded corners intrude on the dirtyRect or not).
   // Do not do this if we have a caller-provided clip rect --
   // as above with bgArea, arguably a bug, but table painting seems
   // to depend on it.
 
+  if (aHaveRoundedCorners || aClipState.mHasAdditionalBGClipArea) {
+    aAutoSR->Reset(aCtx);
+  }
+
   if (aClipState.mHasAdditionalBGClipArea) {
     gfxRect bgAreaGfx = nsLayoutUtils::RectToGfxRect(
       aClipState.mAdditionalBGClipArea, aAppUnitsPerPixel);
     bgAreaGfx.Round();
     bgAreaGfx.Condition();
-
-    aAutoSR->EnsureSaved(aCtx);
     aCtx->NewPath();
     aCtx->Rectangle(bgAreaGfx, true);
     aCtx->Clip();
   }
 
   if (aHaveRoundedCorners) {
     gfxRect bgAreaGfx =
       nsLayoutUtils::RectToGfxRect(aClipState.mBGClipArea, aAppUnitsPerPixel);
@@ -1830,17 +1628,16 @@ SetupBackgroundClip(BackgroundClipState&
       // I think it's become possible to hit this since
       // http://hg.mozilla.org/mozilla-central/rev/50e934e4979b landed.
       NS_WARNING("converted background area should not be empty");
       // Make our caller not do anything.
       aClipState.mDirtyRectGfx.SizeTo(gfxSize(0.0, 0.0));
       return;
     }
 
-    aAutoSR->EnsureSaved(aCtx);
     aCtx->NewPath();
     aCtx->RoundedRectangle(bgAreaGfx, aClipState.mClippedRadii, aClipState.mRadiiAreOuter);
     aCtx->Clip();
   }
 }
 
 static void
 DrawBackgroundColor(BackgroundClipState& aClipState, gfxContext *aCtx,
@@ -2605,33 +2402,43 @@ nsCSSRendering::PaintBackgroundWithSC(ns
 
   // At this point, drawBackgroundImage and drawBackgroundColor are
   // true if and only if we are actually supposed to paint an image or
   // color into aDirtyRect, respectively.
   if (!drawBackgroundImage && !drawBackgroundColor)
     return;
 
   // Compute the outermost boundary of the area that might be painted.
-  // Same coordinate space as aBorderArea & aBGClipRect.
-  nsRect paintBorderArea =
-    ::BoxDecorationRectForBackground(aForFrame, aBorderArea, &aBorder);
-  nsRect clipBorderArea =
-    ::BoxDecorationRectForBorder(aForFrame, aBorderArea, &aBorder);
+  gfxContext *ctx = aRenderingContext.ThebesContext();
+  nscoord appUnitsPerPixel = aPresContext->AppUnitsPerDevPixel();
+
+  // Same coordinate space as aBorderArea & aBGClipRect
   gfxCornerSizes bgRadii;
-  bool haveRoundedCorners =
-    ::GetRadii(aForFrame, aBorder, aBorderArea, clipBorderArea, &bgRadii);
+  bool haveRoundedCorners;
+  {
+    nscoord radii[8];
+    nsSize frameSize = aForFrame->GetSize();
+    if (&aBorder == aForFrame->StyleBorder() &&
+        frameSize == aBorderArea.Size()) {
+      haveRoundedCorners = aForFrame->GetBorderRadii(radii);
+    } else {
+      haveRoundedCorners = nsIFrame::ComputeBorderRadii(aBorder.mBorderRadius,
+                                   frameSize, aBorderArea.Size(),
+                                   aForFrame->GetSkipSides(), radii);
+    }
+    if (haveRoundedCorners)
+      ComputePixelRadii(radii, appUnitsPerPixel, &bgRadii);
+  }
 
   // The 'bgClipArea' (used only by the image tiling logic, far below)
   // is the caller-provided aBGClipRect if any, or else the area
   // determined by the value of 'background-clip' in
   // SetupCurrentBackgroundClip.  (Arguably it should be the
   // intersection, but that breaks the table painter -- in particular,
   // taking the intersection breaks reftests/bugs/403249-1[ab].)
-  gfxContext* ctx = aRenderingContext.ThebesContext();
-  nscoord appUnitsPerPixel = aPresContext->AppUnitsPerDevPixel();
   BackgroundClipState clipState;
   uint8_t currentBackgroundClip;
   bool isSolidBorder;
   if (aBGClipRect) {
     clipState.mBGClipArea = *aBGClipRect;
     clipState.mCustomClip = true;
     SetupDirtyRects(clipState.mBGClipArea, aDirtyRect, appUnitsPerPixel,
                     &clipState.mDirtyRect, &clipState.mDirtyRectGfx);
@@ -2651,27 +2458,25 @@ nsCSSRendering::PaintBackgroundWithSC(ns
       // If we have rounded corners, we need to inflate the background
       // drawing area a bit to avoid seams between the border and
       // background.
       currentBackgroundClip = haveRoundedCorners ?
         NS_STYLE_BG_CLIP_MOZ_ALMOST_PADDING : NS_STYLE_BG_CLIP_PADDING;
     }
 
     GetBackgroundClip(ctx, currentBackgroundClip, bg->BottomLayer().mAttachment,
-                      aForFrame, clipBorderArea,
+                      aForFrame, aBorderArea,
                       aDirtyRect, haveRoundedCorners, bgRadii, appUnitsPerPixel,
                       &clipState);
   }
 
   // If we might be using a background color, go ahead and set it now.
   if (drawBackgroundColor && !isCanvasFrame)
     ctx->SetColor(gfxRGBA(bgColor));
 
-  // NOTE: no Save() yet, we do that later by calling autoSR.EnsureSaved(ctx)
-  // in the cases we need it.
   gfxContextAutoSaveRestore autoSR;
 
   // If there is no background image, draw a color.  (If there is
   // neither a background image nor a color, we wouldn't have gotten
   // this far.)
   if (!drawBackgroundImage) {
     if (!isCanvasFrame) {
       DrawBackgroundColor(clipState, ctx, haveRoundedCorners, appUnitsPerPixel);
@@ -2721,49 +2526,38 @@ nsCSSRendering::PaintBackgroundWithSC(ns
             NS_STYLE_BG_CLIP_MOZ_ALMOST_PADDING : NS_STYLE_BG_CLIP_PADDING;
         }
         if (currentBackgroundClip != newBackgroundClip || !clipSet) {
           currentBackgroundClip = newBackgroundClip;
           // If clipSet is false that means this is the bottom layer and we
           // already called GetBackgroundClip above and it stored its results
           // in clipState.
           if (clipSet) {
-            autoSR = gfxContextAutoSaveRestore(); // reset the previous one
             GetBackgroundClip(ctx, currentBackgroundClip, layer.mAttachment, aForFrame,
-                              clipBorderArea, aDirtyRect, haveRoundedCorners,
+                              aBorderArea, aDirtyRect, haveRoundedCorners,
                               bgRadii, appUnitsPerPixel, &clipState);
           }
           SetupBackgroundClip(clipState, ctx, haveRoundedCorners,
                               appUnitsPerPixel, &autoSR);
           clipSet = true;
-          if (!clipBorderArea.IsEqualEdges(aBorderArea)) {
-            // We're drawing the background for the joined continuation boxes
-            // so we need to clip that to the slice that we want for this frame.
-            gfxRect clip =
-              nsLayoutUtils::RectToGfxRect(aBorderArea, appUnitsPerPixel);
-            autoSR.EnsureSaved(ctx);
-            ctx->NewPath();
-            ctx->SnappedRectangle(clip);
-            ctx->Clip();
-          }
         }
       }
       if ((aLayer < 0 || i == (uint32_t)startLayer) &&
           !clipState.mDirtyRectGfx.IsEmpty()) {
         nsBackgroundLayerState state = PrepareBackgroundLayer(aPresContext, aForFrame,
-            aFlags, paintBorderArea, clipState.mBGClipArea, layer);
+            aFlags, aBorderArea, clipState.mBGClipArea, *bg, layer);
         if (!state.mFillArea.IsEmpty()) {
           if (state.mCompositingOp != gfxContext::OPERATOR_OVER) {
             NS_ASSERTION(ctx->CurrentOperator() == gfxContext::OPERATOR_OVER,
                          "It is assumed the initial operator is OPERATOR_OVER, when it is restored later");
             ctx->SetOperator(state.mCompositingOp);
           }
           state.mImageRenderer.DrawBackground(aPresContext, aRenderingContext,
                                               state.mDestArea, state.mFillArea,
-                                              state.mAnchor + paintBorderArea.TopLeft(),
+                                              state.mAnchor + aBorderArea.TopLeft(),
                                               clipState.mDirtyRect);
           if (state.mCompositingOp != gfxContext::OPERATOR_OVER) {
             ctx->SetOperator(gfxContext::OPERATOR_OVER);
           }
         }
       }
     }
   }
@@ -2808,48 +2602,60 @@ nsCSSRendering::PaintBackgroundColorWith
 
   NS_ASSERTION(drawBackgroundImage || drawBackgroundColor,
                "Should not be trying to paint a background if we don't have one");
   if (!drawBackgroundColor) {
     return;
   }
 
   // Compute the outermost boundary of the area that might be painted.
-  // Same coordinate space as aBorderArea.
-  nsRect clipBorderArea =
-    ::BoxDecorationRectForBorder(aForFrame, aBorderArea, &aBorder);
+  gfxContext *ctx = aRenderingContext.ThebesContext();
+  nscoord appUnitsPerPixel = aPresContext->AppUnitsPerDevPixel();
+
+  // Same coordinate space as aBorderArea
   gfxCornerSizes bgRadii;
-  bool haveRoundedCorners =
-    ::GetRadii(aForFrame, aBorder, aBorderArea, clipBorderArea, &bgRadii);
+  bool haveRoundedCorners;
+  {
+    nscoord radii[8];
+    nsSize frameSize = aForFrame->GetSize();
+    if (&aBorder == aForFrame->StyleBorder() &&
+        frameSize == aBorderArea.Size()) {
+      haveRoundedCorners = aForFrame->GetBorderRadii(radii);
+    } else {
+      haveRoundedCorners = nsIFrame::ComputeBorderRadii(aBorder.mBorderRadius,
+                                   frameSize, aBorderArea.Size(),
+                                   aForFrame->GetSkipSides(), radii);
+    }
+    if (haveRoundedCorners)
+      ComputePixelRadii(radii, appUnitsPerPixel, &bgRadii);
+  }
 
   // The background is rendered over the 'background-clip' area,
   // which is normally equal to the border area but may be reduced
   // to the padding area by CSS.  Also, if the border is solid, we
   // don't need to draw outside the padding area.  In either case,
   // if the borders are rounded, make sure we use the same inner
   // radii as the border code will.
   // The background-color is drawn based on the bottom
   // background-clip.
-  gfxContext* ctx = aRenderingContext.ThebesContext();
-  nscoord appUnitsPerPixel = aPresContext->AppUnitsPerDevPixel();
   const nsStyleBackground *bg = aBackgroundSC->StyleBackground();
   uint8_t currentBackgroundClip = bg->BottomLayer().mClip;
   bool isSolidBorder =
     (aFlags & PAINTBG_WILL_PAINT_BORDER) && IsOpaqueBorder(aBorder);
   if (isSolidBorder && currentBackgroundClip == NS_STYLE_BG_CLIP_BORDER) {
     // If we have rounded corners, we need to inflate the background
     // drawing area a bit to avoid seams between the border and
     // background.
     currentBackgroundClip = haveRoundedCorners ?
       NS_STYLE_BG_CLIP_MOZ_ALMOST_PADDING : NS_STYLE_BG_CLIP_PADDING;
   }
 
   BackgroundClipState clipState;
   GetBackgroundClip(ctx, currentBackgroundClip, bg->BottomLayer().mAttachment,
-                    aForFrame, clipBorderArea,
+                    aForFrame, aBorderArea,
                     aDirtyRect, haveRoundedCorners, bgRadii, appUnitsPerPixel,
                     &clipState);
 
   ctx->SetColor(gfxRGBA(bgColor));
 
   gfxContextAutoSaveRestore autoSR;
   DrawBackgroundColor(clipState, ctx, haveRoundedCorners, appUnitsPerPixel);
 }
@@ -2864,27 +2670,57 @@ IsTransformed(nsIFrame* aForFrame, nsIFr
   }
   return false;
 }
 
 nsRect
 nsCSSRendering::ComputeBackgroundPositioningArea(nsPresContext* aPresContext,
                                                  nsIFrame* aForFrame,
                                                  const nsRect& aBorderArea,
+                                                 const nsStyleBackground& aBackground,
                                                  const nsStyleBackground::Layer& aLayer,
                                                  nsIFrame** aAttachedToFrame)
 {
   // Compute background origin area relative to aBorderArea now as we may need
   // it to compute the effective image size for a CSS gradient.
-  nsRect bgPositioningArea;
+  nsRect bgPositioningArea(0, 0, 0, 0);
 
   nsIAtom* frameType = aForFrame->GetType();
   nsIFrame* geometryFrame = aForFrame;
-  if (MOZ_UNLIKELY(frameType == nsGkAtoms::scrollFrame &&
-                   NS_STYLE_BG_ATTACHMENT_LOCAL == aLayer.mAttachment)) {
+  if (frameType == nsGkAtoms::inlineFrame) {
+    // XXXjwalden Strictly speaking this is not quite faithful to how
+    // background-break is supposed to interact with background-origin values,
+    // but it's a non-trivial amount of work to make it fully conformant, and
+    // until the specification is more finalized (and assuming background-break
+    // even makes the cut) it doesn't make sense to hammer out exact behavior.
+    switch (aBackground.mBackgroundInlinePolicy) {
+    case NS_STYLE_BG_INLINE_POLICY_EACH_BOX:
+      bgPositioningArea = nsRect(nsPoint(0,0), aBorderArea.Size());
+      break;
+    case NS_STYLE_BG_INLINE_POLICY_BOUNDING_BOX:
+      bgPositioningArea = gInlineBGData->GetBoundingRect(aForFrame);
+      break;
+    default:
+      NS_ERROR("Unknown background-inline-policy value!  "
+               "Please, teach me what to do.");
+    case NS_STYLE_BG_INLINE_POLICY_CONTINUOUS:
+      bgPositioningArea = gInlineBGData->GetContinuousRect(aForFrame);
+      break;
+    }
+  } else if (frameType == nsGkAtoms::canvasFrame) {
+    geometryFrame = aForFrame->GetFirstPrincipalChild();
+    // geometryFrame might be null if this canvas is a page created
+    // as an overflow container (e.g. the in-flow content has already
+    // finished and this page only displays the continuations of
+    // absolutely positioned content).
+    if (geometryFrame) {
+      bgPositioningArea = geometryFrame->GetRect();
+    }
+  } else if (frameType == nsGkAtoms::scrollFrame &&
+             NS_STYLE_BG_ATTACHMENT_LOCAL == aLayer.mAttachment) {
     nsIScrollableFrame* scrollableFrame = do_QueryFrame(aForFrame);
     bgPositioningArea = nsRect(
       scrollableFrame->GetScrolledFrame()->GetPosition()
         // For the dir=rtl case:
         + scrollableFrame->GetScrollRange().TopLeft(),
       scrollableFrame->GetScrolledRect().Size());
     // The ScrolledRect’s size does not include the borders or scrollbars,
     // reverse the handling of background-origin
@@ -2898,40 +2734,30 @@ nsCSSRendering::ComputeBackgroundPositio
       nsMargin padding = geometryFrame->GetUsedPadding();
       geometryFrame->ApplySkipSides(padding);
       bgPositioningArea.Deflate(padding);
       NS_ASSERTION(aLayer.mOrigin == NS_STYLE_BG_ORIGIN_CONTENT,
                    "unknown background-origin value");
     }
     *aAttachedToFrame = aForFrame;
     return bgPositioningArea;
-  }
-
-  if (MOZ_UNLIKELY(frameType == nsGkAtoms::canvasFrame)) {
-    geometryFrame = aForFrame->GetFirstPrincipalChild();
-    // geometryFrame might be null if this canvas is a page created
-    // as an overflow container (e.g. the in-flow content has already
-    // finished and this page only displays the continuations of
-    // absolutely positioned content).
-    if (geometryFrame) {
-      bgPositioningArea = geometryFrame->GetRect();
-    }
   } else {
     bgPositioningArea = nsRect(nsPoint(0,0), aBorderArea.Size());
   }
 
   // Background images are tiled over the 'background-clip' area
   // but the origin of the tiling is based on the 'background-origin' area
   if (aLayer.mOrigin != NS_STYLE_BG_ORIGIN_BORDER && geometryFrame) {
     nsMargin border = geometryFrame->GetUsedBorder();
     if (aLayer.mOrigin != NS_STYLE_BG_ORIGIN_PADDING) {
       border += geometryFrame->GetUsedPadding();
       NS_ASSERTION(aLayer.mOrigin == NS_STYLE_BG_ORIGIN_CONTENT,
                    "unknown background-origin value");
     }
+    geometryFrame->ApplySkipSides(border);
     bgPositioningArea.Deflate(border);
   }
 
   nsIFrame* attachedToFrame = aForFrame;
   if (NS_STYLE_BG_ATTACHMENT_FIXED == aLayer.mAttachment) {
     // If it's a fixed background attachment, then the image is placed
     // relative to the viewport, which is the area of the root frame
     // in a screen context or the page content frame in a print context.
@@ -3005,31 +2831,32 @@ ComputeDrawnSizeForBackground(const CSSS
 }
 
 nsBackgroundLayerState
 nsCSSRendering::PrepareBackgroundLayer(nsPresContext* aPresContext,
                                        nsIFrame* aForFrame,
                                        uint32_t aFlags,
                                        const nsRect& aBorderArea,
                                        const nsRect& aBGClipRect,
+                                       const nsStyleBackground& aBackground,
                                        const nsStyleBackground::Layer& aLayer)
 {
   /*
-   * The properties we need to keep in mind when drawing background
+   * The background properties we need to keep in mind when drawing background
    * layers are:
    *
    *   background-image
    *   background-repeat
    *   background-attachment
    *   background-position
    *   background-clip
    *   background-origin
    *   background-size
+   *   background-break (-moz-background-inline-policy)
    *   background-blend-mode
-   *   box-decoration-break
    *
    * (background-color applies to the entire element and not to individual
    * layers, so it is irrelevant to this method.)
    *
    * These properties have the following dependencies upon each other when
    * determining rendering:
    *
    *   background-image
@@ -3042,31 +2869,32 @@ nsCSSRendering::PrepareBackgroundLayer(n
    *     depends upon background-size (for the image's scaled size) and
    *     background-break (for the background positioning area)
    *   background-clip
    *     no dependencies
    *   background-origin
    *     depends upon background-attachment (only in the case where that value
    *     is 'fixed')
    *   background-size
-   *     depends upon box-decoration-break (for the background positioning area
-   *     for resolving percentages), background-image (for the image's intrinsic
+   *     depends upon background-break (for the background positioning area for
+   *     resolving percentages), background-image (for the image's intrinsic
    *     size), background-repeat (if that value is 'round'), and
    *     background-origin (for the background painting area, when
    *     background-repeat is 'round')
-   *   box-decoration-break
-   *     no dependencies
+   *   background-break
+   *     depends upon background-origin (specifying how the boxes making up the
+   *     background positioning area are determined)
    *
    * As a result of only-if dependencies we don't strictly do a topological
    * sort of the above properties when processing, but it's pretty close to one:
    *
    *   background-clip (by caller)
    *   background-image
-   *   box-decoration-break, background-origin
-   *   background-attachment (postfix for background-origin if 'fixed')
+   *   background-break, background-origin
+   *   background-attachment (postfix for background-{origin,break} if 'fixed')
    *   background-size
    *   background-position
    *   background-repeat
    */
 
   uint32_t irFlags = 0;
   if (aFlags & nsCSSRendering::PAINTBG_SYNC_DECODE_IMAGES) {
     irFlags |= nsImageRenderer::FLAG_SYNC_DECODE_IMAGES;
@@ -3082,17 +2910,17 @@ nsCSSRendering::PrepareBackgroundLayer(n
   }
 
   // The frame to which the background is attached
   nsIFrame* attachedToFrame = aForFrame;
   // Compute background origin area relative to aBorderArea now as we may need
   // it to compute the effective image size for a CSS gradient.
   nsRect bgPositioningArea =
     ComputeBackgroundPositioningArea(aPresContext, aForFrame, aBorderArea,
-                                     aLayer, &attachedToFrame);
+                                     aBackground, aLayer, &attachedToFrame);
 
   // For background-attachment:fixed backgrounds, we'll limit the area
   // where the background can be drawn to the viewport.
   nsRect bgClipRect = aBGClipRect;
 
   // Compute the anchor point.
   //
   // relative to aBorderArea.TopLeft() (which is where the top-left
@@ -3152,23 +2980,23 @@ nsCSSRendering::PrepareBackgroundLayer(n
   return state;
 }
 
 nsRect
 nsCSSRendering::GetBackgroundLayerRect(nsPresContext* aPresContext,
                                        nsIFrame* aForFrame,
                                        const nsRect& aBorderArea,
                                        const nsRect& aClipRect,
+                                       const nsStyleBackground& aBackground,
                                        const nsStyleBackground::Layer& aLayer,
                                        uint32_t aFlags)
 {
-  nsRect borderArea = ::BoxDecorationRectForBackground(aForFrame, aBorderArea);
   nsBackgroundLayerState state =
-      PrepareBackgroundLayer(aPresContext, aForFrame, aFlags, borderArea,
-                             aClipRect, aLayer);
+      PrepareBackgroundLayer(aPresContext, aForFrame, aFlags, aBorderArea,
+                             aClipRect, aBackground, aLayer);
   return state.mFillArea;
 }
 
 /* static */ bool
 nsCSSRendering::IsBackgroundImageDecodedForStyleContextAndLayer(
   const nsStyleBackground *aBackground, uint32_t aLayer)
 {
   const nsStyleImage* image = &aBackground->mLayers[aLayer].mImage;
@@ -5102,18 +4930,20 @@ nsContextBoxBlur::GetContext()
 
 /* static */ nsMargin
 nsContextBoxBlur::GetBlurRadiusMargin(nscoord aBlurRadius,
                                       int32_t aAppUnitsPerDevPixel)
 {
   gfxIntSize blurRadius = ComputeBlurRadius(aBlurRadius, aAppUnitsPerDevPixel);
 
   nsMargin result;
-  result.top = result.bottom = blurRadius.height * aAppUnitsPerDevPixel;
-  result.left = result.right = blurRadius.width  * aAppUnitsPerDevPixel;
+  result.top    = blurRadius.height * aAppUnitsPerDevPixel;
+  result.right  = blurRadius.width  * aAppUnitsPerDevPixel;
+  result.bottom = blurRadius.height * aAppUnitsPerDevPixel;
+  result.left   = blurRadius.width  * aAppUnitsPerDevPixel;
   return result;
 }
 
 /* static */ void
 nsContextBoxBlur::BlurRectangle(gfxContext* aDestinationCtx,
                                 const nsRect& aRect,
                                 int32_t aAppUnitsPerDevPixel,
                                 gfxCornerSizes* aCornerRadii,
--- a/layout/base/nsCSSRendering.h
+++ b/layout/base/nsCSSRendering.h
@@ -451,25 +451,27 @@ struct nsCSSRendering {
                            nsIFrame* aFrame,
                            bool& aDrawBackgroundImage,
                            bool& aDrawBackgroundColor);
 
   static nsRect
   ComputeBackgroundPositioningArea(nsPresContext* aPresContext,
                                    nsIFrame* aForFrame,
                                    const nsRect& aBorderArea,
+                                   const nsStyleBackground& aBackground,
                                    const nsStyleBackground::Layer& aLayer,
                                    nsIFrame** aAttachedToFrame);
 
   static nsBackgroundLayerState
   PrepareBackgroundLayer(nsPresContext* aPresContext,
                          nsIFrame* aForFrame,
                          uint32_t aFlags,
                          const nsRect& aBorderArea,
                          const nsRect& aBGClipRect,
+                         const nsStyleBackground& aBackground,
                          const nsStyleBackground::Layer& aLayer);
 
   /**
    * Render the background for an element using css rendering rules
    * for backgrounds.
    */
   enum {
     /**
@@ -535,16 +537,17 @@ struct nsCSSRendering {
    * Returns the rectangle covered by the given background layer image, taking
    * into account background positioning, sizing, and repetition, but not
    * clipping.
    */
   static nsRect GetBackgroundLayerRect(nsPresContext* aPresContext,
                                        nsIFrame* aForFrame,
                                        const nsRect& aBorderArea,
                                        const nsRect& aClipRect,
+                                       const nsStyleBackground& aBackground,
                                        const nsStyleBackground::Layer& aLayer,
                                        uint32_t aFlags);
 
   /**
    * Checks if image in layer aLayer of aBackground is currently decoded.
    */
   static bool IsBackgroundImageDecodedForStyleContextAndLayer(
     const nsStyleBackground *aBackground, uint32_t aLayer);
--- a/layout/base/nsCSSRenderingBorders.cpp
+++ b/layout/base/nsCSSRenderingBorders.cpp
@@ -115,25 +115,27 @@ typedef enum {
 nsCSSBorderRenderer::nsCSSBorderRenderer(int32_t aAppUnitsPerPixel,
                                          gfxContext* aDestContext,
                                          gfxRect& aOuterRect,
                                          const uint8_t* aBorderStyles,
                                          const gfxFloat* aBorderWidths,
                                          gfxCornerSizes& aBorderRadii,
                                          const nscolor* aBorderColors,
                                          nsBorderColors* const* aCompositeColors,
+                                         int aSkipSides,
                                          nscolor aBackgroundColor)
   : mContext(aDestContext),
     mOuterRect(aOuterRect),
     mBorderStyles(aBorderStyles),
     mBorderWidths(aBorderWidths),
     mBorderRadii(aBorderRadii),
     mBorderColors(aBorderColors),
     mCompositeColors(aCompositeColors),
     mAUPP(aAppUnitsPerPixel),
+    mSkipSides(aSkipSides),
     mBackgroundColor(aBackgroundColor)
 {
   if (!mCompositeColors) {
     static nsBorderColors * const noColors[4] = { nullptr };
     mCompositeColors = &noColors[0];
   }
 
   mInnerRect = mOuterRect;
--- a/layout/base/nsCSSRenderingBorders.h
+++ b/layout/base/nsCSSRenderingBorders.h
@@ -74,16 +74,17 @@ struct nsCSSBorderRenderer {
   nsCSSBorderRenderer(int32_t aAppUnitsPerPixel,
                       gfxContext* aDestContext,
                       gfxRect& aOuterRect,
                       const uint8_t* aBorderStyles,
                       const gfxFloat* aBorderWidths,
                       gfxCornerSizes& aBorderRadii,
                       const nscolor* aBorderColors,
                       nsBorderColors* const* aCompositeColors,
+                      int aSkipSides,
                       nscolor aBackgroundColor);
 
   gfxCornerSizes mBorderCornerDimensions;
 
   // destination context
   gfxContext* mContext;
 
   // the rectangle of the outside and the inside of the border
@@ -99,17 +100,18 @@ struct nsCSSBorderRenderer {
 
   // colors
   const nscolor* mBorderColors;
   nsBorderColors* const* mCompositeColors;
 
   // core app units per pixel
   int32_t mAUPP;
 
-  // the background color
+  // misc -- which sides to skip, the background color
+  int mSkipSides;
   nscolor mBackgroundColor;
 
   // calculated values
   bool mOneUnitBorder;
   bool mNoBorderRadius;
   bool mAvoidStroke;
 
   // For all the sides in the bitmask, would they be rendered
--- a/layout/base/nsDisplayList.cpp
+++ b/layout/base/nsDisplayList.cpp
@@ -1929,18 +1929,24 @@ nsDisplayBackgroundImage::IsSingleFixedP
   uint32_t flags = aBuilder->GetBackgroundPaintFlags();
   nsRect borderArea = nsRect(ToReferenceFrame(), mFrame->GetSize());
   const nsStyleBackground::Layer &layer = mBackgroundStyle->mLayers[mLayer];
 
   if (layer.mAttachment != NS_STYLE_BG_ATTACHMENT_FIXED)
     return false;
 
   nsBackgroundLayerState state =
-    nsCSSRendering::PrepareBackgroundLayer(presContext, mFrame, flags,
-                                           borderArea, aClipRect, layer);
+    nsCSSRendering::PrepareBackgroundLayer(presContext,
+                                           mFrame,
+                                           flags,
+                                           borderArea,
+                                           aClipRect,
+                                           *mBackgroundStyle,
+                                           layer);
+
   nsImageRenderer* imageRenderer = &state.mImageRenderer;
   // We only care about images here, not gradients.
   if (!imageRenderer->IsRasterImage())
     return false;
 
   int32_t appUnitsPerDevPixel = presContext->AppUnitsPerDevPixel();
   *aDestRect = nsLayoutUtils::RectToGfxRect(state.mFillArea, appUnitsPerDevPixel);
 
@@ -1963,18 +1969,24 @@ nsDisplayBackgroundImage::TryOptimizeToI
     return false;
   }
   nscoord radii[8];
   if (mFrame->GetBorderRadii(radii)) {
     return false;
   }
 
   nsBackgroundLayerState state =
-    nsCSSRendering::PrepareBackgroundLayer(presContext, mFrame, flags,
-                                           borderArea, borderArea, layer);
+    nsCSSRendering::PrepareBackgroundLayer(presContext,
+                                           mFrame,
+                                           flags,
+                                           borderArea,
+                                           borderArea,
+                                           *mBackgroundStyle,
+                                           layer);
+
   nsImageRenderer* imageRenderer = &state.mImageRenderer;
   // We only care about images here, not gradients.
   if (!imageRenderer->IsRasterImage())
     return false;
 
   nsRefPtr<ImageContainer> imageContainer = imageRenderer->GetContainer(aManager);
   // Image is not ready to be made into a layer yet
   if (!imageContainer)
@@ -2177,23 +2189,22 @@ nsDisplayBackgroundImage::GetOpaqueRegio
   *aSnap = false;
 
   if (!mBackgroundStyle)
     return result;
 
 
   *aSnap = true;
 
-  // For NS_STYLE_BOX_DECORATION_BREAK_SLICE, don't try to optimize here, since
+  // For policies other than EACH_BOX, don't try to optimize here, since
   // this could easily lead to O(N^2) behavior inside InlineBackgroundData,
   // which expects frames to be sent to it in content order, not reverse
   // content order which we'll produce here.
   // Of course, if there's only one frame in the flow, it doesn't matter.
-  if (mFrame->StyleBorder()->mBoxDecorationBreak ==
-        NS_STYLE_BOX_DECORATION_BREAK_CLONE ||
+  if (mBackgroundStyle->mBackgroundInlinePolicy == NS_STYLE_BG_INLINE_POLICY_EACH_BOX ||
       (!mFrame->GetPrevContinuation() && !mFrame->GetNextContinuation())) {
     const nsStyleBackground::Layer& layer = mBackgroundStyle->mLayers[mLayer];
     if (layer.mImage.IsOpaque() && layer.mBlendMode == NS_STYLE_BLEND_NORMAL) {
       nsPresContext* presContext = mFrame->PresContext();
       result = GetInsideClipRegion(this, presContext, layer.mClip, mBounds, aSnap);
     }
   }
 
@@ -2231,17 +2242,17 @@ nsDisplayBackgroundImage::GetPositioning
 {
   if (!mBackgroundStyle) {
     return nsRect();
   }
   nsIFrame* attachedToFrame;
   return nsCSSRendering::ComputeBackgroundPositioningArea(
       mFrame->PresContext(), mFrame,
       nsRect(ToReferenceFrame(), mFrame->GetSize()),
-      mBackgroundStyle->mLayers[mLayer],
+      *mBackgroundStyle, mBackgroundStyle->mLayers[mLayer],
       &attachedToFrame) + ToReferenceFrame();
 }
 
 bool
 nsDisplayBackgroundImage::RenderingMightDependOnPositioningAreaSizeChange()
 {
   if (!mBackgroundStyle)
     return false;
@@ -2345,17 +2356,18 @@ nsDisplayBackgroundImage::GetBoundsInter
   nsRect borderBox = nsRect(ToReferenceFrame(), mFrame->GetSize());
   nsRect clipRect = borderBox;
   if (mFrame->GetType() == nsGkAtoms::canvasFrame) {
     nsCanvasFrame* frame = static_cast<nsCanvasFrame*>(mFrame);
     clipRect = frame->CanvasArea() + ToReferenceFrame();
   }
   const nsStyleBackground::Layer& layer = mBackgroundStyle->mLayers[mLayer];
   return nsCSSRendering::GetBackgroundLayerRect(presContext, mFrame,
-                                                borderBox, clipRect, layer,
+                                                borderBox, clipRect,
+                                                *mBackgroundStyle, layer,
                                                 aBuilder->GetBackgroundPaintFlags());
 }
 
 uint32_t
 nsDisplayBackgroundImage::GetPerFrameKey()
 {
   return (mLayer << nsDisplayItem::TYPE_BITS) |
     nsDisplayItem::GetPerFrameKey();
@@ -2822,18 +2834,21 @@ nsDisplayBoxShadowOuter::Paint(nsDisplay
   nsPoint offset = ToReferenceFrame();
   nsRect borderRect = mFrame->VisualBorderRectRelativeToSelf() + offset;
   nsPresContext* presContext = mFrame->PresContext();
   nsAutoTArray<nsRect,10> rects;
   ComputeDisjointRectangles(mVisibleRegion, &rects);
 
   PROFILER_LABEL("nsDisplayBoxShadowOuter", "Paint");
   for (uint32_t i = 0; i < rects.Length(); ++i) {
+    aCtx->PushState();
+    aCtx->IntersectClip(rects[i]);
     nsCSSRendering::PaintBoxShadowOuter(presContext, *aCtx, mFrame,
                                         borderRect, rects[i], mOpacity);
+    aCtx->PopState();
   }
 }
 
 nsRect
 nsDisplayBoxShadowOuter::GetBounds(nsDisplayListBuilder* aBuilder, bool* aSnap) {
   *aSnap = false;
   return mBounds;
 }
--- a/layout/generic/crashtests/383089-1.html
+++ b/layout/generic/crashtests/383089-1.html
@@ -73,14 +73,14 @@ function foo()
 </style>
 
 </head><body onload="setTimeout(olo, 30);">
 
 <br style="overflow: visible;" id="br1">
 <br style="clear: none;" id="br2">
 <br style="height: auto; clear: both; width: auto;" id="br3">
 <br style="position: static;" id="br4">
-<br style="background: yellow none repeat scroll 0% 0%; background-clip: initial; background-origin: initial; display: inline;" id="br5">
+<br style="background: yellow none repeat scroll 0% 0%; background-clip: initial; background-origin: initial; -moz-background-inline-policy: initial; display: inline;" id="br5">
 <br style="width: 1px; visibility: visible;" id="br6">
 <br style="color: black; width: 2px; display: table-cell;" id="br7">
 <table border="1"><tbody><tr style="display: list-item;" id="tableRow"><td>x</td></tr></tbody></table>
 
 </body></html>
--- a/layout/generic/nsContainerFrame.cpp
+++ b/layout/generic/nsContainerFrame.cpp
@@ -844,52 +844,30 @@ nsContainerFrame::DoInlineIntrinsicWidth
 
   // This goes at the beginning no matter how things are broken and how
   // messy the bidi situations are, since per CSS2.1 section 8.6
   // (implemented in bug 328168), the startSide border is always on the
   // first line.
   // This frame is a first-in-flow, but it might have a previous bidi
   // continuation, in which case that continuation should handle the startSide
   // border.
-  // For box-decoration-break:clone we setup clonePBM = startPBM + endPBM and
-  // add that to each line.  For box-decoration-break:slice clonePBM is zero.
-  nscoord clonePBM = 0; // PBM = PaddingBorderMargin
-  const bool sliceBreak =
-    styleBorder->mBoxDecorationBreak == NS_STYLE_BOX_DECORATION_BREAK_SLICE;
   if (!GetPrevContinuation()) {
-    nscoord startPBM =
+    aData->currentLine +=
       // clamp negative calc() to 0
       std::max(GetCoord(stylePadding->mPadding.Get(startSide), 0), 0) +
       styleBorder->GetComputedBorderWidth(startSide) +
       GetCoord(styleMargin->mMargin.Get(startSide), 0);
-    if (MOZ_LIKELY(sliceBreak)) {
-      aData->currentLine += startPBM;
-    } else {
-      clonePBM = startPBM;
-    }
-  }
-
-  nscoord endPBM =
-    // clamp negative calc() to 0
-    std::max(GetCoord(stylePadding->mPadding.Get(endSide), 0), 0) +
-    styleBorder->GetComputedBorderWidth(endSide) +
-    GetCoord(styleMargin->mMargin.Get(endSide), 0);
-  if (MOZ_UNLIKELY(!sliceBreak)) {
-    clonePBM += endPBM;
   }
 
   const nsLineList_iterator* savedLine = aData->line;
   nsIFrame* const savedLineContainer = aData->lineContainer;
 
   nsContainerFrame *lastInFlow;
   for (nsContainerFrame *nif = this; nif;
        nif = static_cast<nsContainerFrame*>(nif->GetNextInFlow())) {
-    if (aData->currentLine == 0) {
-      aData->currentLine = clonePBM;
-    }
     for (nsIFrame *kid = nif->mFrames.FirstChild(); kid;
          kid = kid->GetNextSibling()) {
       if (aType == nsLayoutUtils::MIN_WIDTH)
         kid->AddInlineMinWidth(aRenderingContext,
                                static_cast<InlineMinWidthData*>(aData));
       else
         kid->AddInlinePrefWidth(aRenderingContext,
                                 static_cast<InlinePrefWidthData*>(aData));
@@ -908,18 +886,22 @@ nsContainerFrame::DoInlineIntrinsicWidth
 
   // This goes at the end no matter how things are broken and how
   // messy the bidi situations are, since per CSS2.1 section 8.6
   // (implemented in bug 328168), the endSide border is always on the
   // last line.
   // We reached the last-in-flow, but it might have a next bidi
   // continuation, in which case that continuation should handle
   // the endSide border.
-  if (MOZ_LIKELY(!lastInFlow->GetNextContinuation() && sliceBreak)) {
-    aData->currentLine += endPBM;
+  if (!lastInFlow->GetNextContinuation()) {
+    aData->currentLine +=
+      // clamp negative calc() to 0
+      std::max(GetCoord(stylePadding->mPadding.Get(endSide), 0), 0) +
+      styleBorder->GetComputedBorderWidth(endSide) +
+      GetCoord(styleMargin->mMargin.Get(endSide), 0);
   }
 }
 
 /* virtual */ nsSize
 nsContainerFrame::ComputeAutoSize(nsRenderingContext *aRenderingContext,
                                   nsSize aCBSize, nscoord aAvailableWidth,
                                   nsSize aMargin, nsSize aBorder,
                                   nsSize aPadding, bool aShrinkWrap)
--- a/layout/generic/nsFrame.cpp
+++ b/layout/generic/nsFrame.cpp
@@ -948,21 +948,16 @@ nsIFrame::GetUsedPadding() const
     NS_ASSERTION(hasPadding, "We should have padding here! (out of memory?)");
   }
   return padding;
 }
 
 int
 nsIFrame::GetSkipSides(const nsHTMLReflowState* aReflowState) const
 {
-  if (MOZ_UNLIKELY(StyleBorder()->mBoxDecorationBreak ==
-                     NS_STYLE_BOX_DECORATION_BREAK_CLONE)) {
-    return 0;
-  }
-
   // Convert the logical skip sides to physical sides using the frame's
   // writing mode
   WritingMode writingMode = GetWritingMode();
   int logicalSkip = GetLogicalSkipSides(aReflowState);
   int skip = 0;
 
   if (logicalSkip & LOGICAL_SIDE_B_START) {
     if (writingMode.IsVertical()) {
@@ -1277,42 +1272,34 @@ nsIFrame::OutsetBorderRadii(nscoord aRad
     if (aRadii[hc1] > 0)
       aRadii[hc1] += offset;
     if (aRadii[hc2] > 0)
       aRadii[hc2] += offset;
   }
 }
 
 /* virtual */ bool
-nsIFrame::GetBorderRadii(const nsSize& aFrameSize, const nsSize& aBorderArea,
-                         int aSkipSides, nscoord aRadii[8]) const
+nsIFrame::GetBorderRadii(nscoord aRadii[8]) const
 {
   if (IsThemed()) {
     // When we're themed, the native theme code draws the border and
     // background, and therefore it doesn't make sense to tell other
     // code that's interested in border-radius that we have any radii.
     //
     // In an ideal world, we might have a way for the them to tell us an
     // border radius, but since we don't, we're better off assuming
     // zero.
     NS_FOR_CSS_HALF_CORNERS(corner) {
       aRadii[corner] = 0;
     }
     return false;
   }
-  return ComputeBorderRadii(StyleBorder()->mBorderRadius,
-                            aFrameSize, aBorderArea,
-                            aSkipSides, aRadii);
-}
-
-bool
-nsIFrame::GetBorderRadii(nscoord aRadii[8]) const
-{
-  nsSize sz = GetSize();
-  return GetBorderRadii(sz, sz, GetSkipSides(), aRadii);
+  nsSize size = GetSize();
+  return ComputeBorderRadii(StyleBorder()->mBorderRadius, size, size,
+                            GetSkipSides(), aRadii);
 }
 
 bool
 nsIFrame::GetPaddingBoxBorderRadii(nscoord aRadii[8]) const
 {
   if (!GetBorderRadii(aRadii))
     return false;
   InsetBorderRadii(aRadii, GetUsedBorder());
--- a/layout/generic/nsGfxScrollFrame.cpp
+++ b/layout/generic/nsGfxScrollFrame.cpp
@@ -4361,25 +4361,20 @@ ReduceRadii(nscoord aXBorder, nscoord aY
  * Implement an override for nsIFrame::GetBorderRadii to ensure that
  * the clipping region for the border radius does not clip the scrollbars.
  *
  * In other words, we require that the border radius be reduced until the
  * inner border radius at the inner edge of the border is 0 wherever we
  * have scrollbars.
  */
 bool
-ScrollFrameHelper::GetBorderRadii(const nsSize& aFrameSize,
-                                  const nsSize& aBorderArea,
-                                  int aSkipSides,
-                                  nscoord aRadii[8]) const
+ScrollFrameHelper::GetBorderRadii(nscoord aRadii[8]) const
 {
-  if (!mOuter->nsContainerFrame::GetBorderRadii(aFrameSize, aBorderArea,
-                                                aSkipSides, aRadii)) {
+  if (!mOuter->nsContainerFrame::GetBorderRadii(aRadii))
     return false;
-  }
 
   // Since we can use GetActualScrollbarSizes (rather than
   // GetDesiredScrollbarSizes) since this doesn't affect reflow, we
   // probably should.
   nsMargin sb = GetActualScrollbarSizes();
   nsMargin border = mOuter->GetUsedBorder();
 
   if (sb.left > 0 || sb.top > 0) {
--- a/layout/generic/nsGfxScrollFrame.h
+++ b/layout/generic/nsGfxScrollFrame.h
@@ -66,18 +66,17 @@ public:
                         const nsDisplayListSet& aLists);
 
   void AppendScrollPartsTo(nsDisplayListBuilder*   aBuilder,
                            const nsRect&           aDirtyRect,
                            const nsDisplayListSet& aLists,
                            bool&                   aCreateLayer,
                            bool                    aPositioned);
 
-  bool GetBorderRadii(const nsSize& aFrameSize, const nsSize& aBorderArea,
-                      int aSkipSides, nscoord aRadii[8]) const;
+  bool GetBorderRadii(nscoord aRadii[8]) const;
 
   // nsIReflowCallback
   virtual bool ReflowFinished() MOZ_OVERRIDE;
   virtual void ReflowCallbackCanceled() MOZ_OVERRIDE;
 
   /**
    * @note This method might destroy the frame, pres shell and other objects.
    * Called when the 'curpos' attribute on one of the scrollbars changes.
@@ -467,19 +466,18 @@ public:
                                nsHTMLReflowMetrics* aMetrics,
                                bool aFirstPass);
   nsresult ReflowContents(ScrollReflowState* aState,
                           const nsHTMLReflowMetrics& aDesiredSize);
   void PlaceScrollArea(const ScrollReflowState& aState,
                        const nsPoint& aScrollPosition);
   nscoord GetIntrinsicVScrollbarWidth(nsRenderingContext *aRenderingContext);
 
-  virtual bool GetBorderRadii(const nsSize& aFrameSize, const nsSize& aBorderArea,
-                              int aSkipSides, nscoord aRadii[8]) const MOZ_OVERRIDE {
-    return mHelper.GetBorderRadii(aFrameSize, aBorderArea, aSkipSides, aRadii);
+  virtual bool GetBorderRadii(nscoord aRadii[8]) const MOZ_OVERRIDE {
+    return mHelper.GetBorderRadii(aRadii);
   }
 
   virtual nscoord GetMinWidth(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
   virtual nscoord GetPrefWidth(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
   virtual nsresult GetPadding(nsMargin& aPadding) MOZ_OVERRIDE;
   virtual bool IsCollapsed() MOZ_OVERRIDE;
   
   virtual nsresult Reflow(nsPresContext*           aPresContext,
@@ -805,19 +803,18 @@ public:
   virtual nsSize GetMinSize(nsBoxLayoutState& aBoxLayoutState) MOZ_OVERRIDE;
   virtual nsSize GetPrefSize(nsBoxLayoutState& aBoxLayoutState) MOZ_OVERRIDE;
   virtual nsSize GetMaxSize(nsBoxLayoutState& aBoxLayoutState) MOZ_OVERRIDE;
   virtual nscoord GetBoxAscent(nsBoxLayoutState& aBoxLayoutState) MOZ_OVERRIDE;
 
   NS_IMETHOD DoLayout(nsBoxLayoutState& aBoxLayoutState) MOZ_OVERRIDE;
   virtual nsresult GetPadding(nsMargin& aPadding) MOZ_OVERRIDE;
 
-  virtual bool GetBorderRadii(const nsSize& aFrameSize, const nsSize& aBorderArea,
-                              int aSkipSides, nscoord aRadii[8]) const MOZ_OVERRIDE {
-    return mHelper.GetBorderRadii(aFrameSize, aBorderArea, aSkipSides, aRadii);
+  virtual bool GetBorderRadii(nscoord aRadii[8]) const MOZ_OVERRIDE {
+    return mHelper.GetBorderRadii(aRadii);
   }
 
   nsresult Layout(nsBoxLayoutState& aState);
   void LayoutScrollArea(nsBoxLayoutState& aState, const nsPoint& aScrollPosition);
 
   static bool AddRemoveScrollbar(bool& aHasScrollbar, 
                                    nscoord& aXY, 
                                    nscoord& aSize, 
--- a/layout/generic/nsIFrame.h
+++ b/layout/generic/nsIFrame.h
@@ -1037,26 +1037,22 @@ public:
    * radii into zero, and OutsetBorderRadii does not inflate zero radii.
    * Therefore, callers should always inset or outset directly from the
    * original value coming from style.
    */
   static void InsetBorderRadii(nscoord aRadii[8], const nsMargin &aOffsets);
   static void OutsetBorderRadii(nscoord aRadii[8], const nsMargin &aOffsets);
 
   /**
-   * Fill in border radii for this frame.  Return whether any are nonzero.
+   * Fill in border radii for this frame.  Return whether any are
+   * nonzero.
+   *
    * Indices into aRadii are the NS_CORNER_* constants in nsStyleConsts.h
-   * aSkipSides is a union of SIDE_BIT_LEFT/RIGHT/TOP/BOTTOM bits that says
-   * which side(s) to skip.
    */
-  virtual bool GetBorderRadii(const nsSize& aFrameSize,
-                              const nsSize& aBorderArea,
-                              int aSkipSides,
-                              nscoord aRadii[8]) const;
-  bool GetBorderRadii(nscoord aRadii[8]) const;
+  virtual bool GetBorderRadii(nscoord aRadii[8]) const;
 
   bool GetPaddingBoxBorderRadii(nscoord aRadii[8]) const;
   bool GetContentBoxBorderRadii(nscoord aRadii[8]) const;
 
   /**
    * Get the position of the frame's baseline, relative to the top of
    * the frame (its top border edge).  Only valid when Reflow is not
    * needed.
--- a/layout/generic/nsImageFrame.cpp
+++ b/layout/generic/nsImageFrame.cpp
@@ -1777,20 +1777,16 @@ nsImageFrame::List(FILE* out, const char
   }
   fprintf_stderr(out, "%s\n", str.get());
 }
 #endif
 
 int
 nsImageFrame::GetLogicalSkipSides(const nsHTMLReflowState* aReflowState) const
 {
-  if (MOZ_UNLIKELY(StyleBorder()->mBoxDecorationBreak ==
-                     NS_STYLE_BOX_DECORATION_BREAK_CLONE)) {
-    return 0;
-  }
   int skip = 0;
   if (nullptr != GetPrevInFlow()) {
     skip |= LOGICAL_SIDE_B_START;
   }
   if (nullptr != GetNextInFlow()) {
     skip |= LOGICAL_SIDE_B_END;
   }
   return skip;
--- a/layout/generic/nsInlineFrame.cpp
+++ b/layout/generic/nsInlineFrame.cpp
@@ -110,21 +110,17 @@ nsInlineFrame::IsSelfEmpty()
     border->GetComputedBorderWidth(NS_SIDE_RIGHT) != 0 ||
     !nsLayoutUtils::IsPaddingZero(padding->mPadding.GetRight()) ||
     !IsMarginZero(margin->mMargin.GetRight());
   bool haveLeft =
     border->GetComputedBorderWidth(NS_SIDE_LEFT) != 0 ||
     !nsLayoutUtils::IsPaddingZero(padding->mPadding.GetLeft()) ||
     !IsMarginZero(margin->mMargin.GetLeft());
   if (haveLeft || haveRight) {
-    // We skip this block and return false for box-decoration-break:clone since
-    // in that case all the continuations will have the border/padding/margin.
-    if ((GetStateBits() & NS_FRAME_PART_OF_IBSPLIT) &&
-        StyleBorder()->mBoxDecorationBreak ==
-          NS_STYLE_BOX_DECORATION_BREAK_SLICE) {
+    if (GetStateBits() & NS_FRAME_PART_OF_IBSPLIT) {
       bool haveStart, haveEnd;
       if (NS_STYLE_DIRECTION_LTR == StyleVisibility()->mDirection) {
         haveStart = haveLeft;
         haveEnd = haveRight;
       } else {
         haveStart = haveRight;
         haveEnd = haveLeft;
       }
@@ -490,25 +486,19 @@ nsInlineFrame::ReflowFrames(nsPresContex
   nsresult rv = NS_OK;
   aStatus = NS_FRAME_COMPLETE;
 
   nsLineLayout* lineLayout = aReflowState.mLineLayout;
   bool inFirstLine = aReflowState.mLineLayout->GetInFirstLine();
   RestyleManager* restyleManager = aPresContext->RestyleManager();
   WritingMode wm = aReflowState.GetWritingMode();
   nscoord startEdge = 0;
-  const bool boxDecorationBreakClone =
-    MOZ_UNLIKELY(StyleBorder()->mBoxDecorationBreak ==
-                   NS_STYLE_BOX_DECORATION_BREAK_CLONE);
   // Don't offset by our start borderpadding if we have a prev continuation or
-  // if we're in a part of an {ib} split other than the first one. For
-  // box-decoration-break:clone we always offset our start since all
-  // continuations have border/padding.
-  if ((!GetPrevContinuation() && !FrameIsNonFirstInIBSplit()) ||
-      boxDecorationBreakClone) {
+  // if we're in a part of an {ib} split other than the first one.
+  if (!GetPrevContinuation() && !FrameIsNonFirstInIBSplit()) {
     startEdge = aReflowState.ComputedLogicalBorderPadding().IStart(wm);
   }
   nscoord availableISize = aReflowState.AvailableISize();
   NS_ASSERTION(availableISize != NS_UNCONSTRAINEDSIZE,
                "should no longer use available widths");
   // Subtract off inline axis border+padding from availableISize
   availableISize -= startEdge;
   availableISize -= aReflowState.ComputedLogicalBorderPadding().IEnd(wm);
@@ -659,35 +649,31 @@ nsInlineFrame::ReflowFrames(nsPresContex
   // that are empty we force to empty so that things like collapsed
   // whitespace in an inline element don't affect the line-height.
   aMetrics.ISize() = lineLayout->EndSpan(this);
 
   // Compute final width.
 
   // Make sure to not include our start border and padding if we have a prev
   // continuation or if we're in a part of an {ib} split other than the first
-  // one.  For box-decoration-break:clone we always include our start border
-  // and padding since all continuations have them.
-  if ((!GetPrevContinuation() && !FrameIsNonFirstInIBSplit()) ||
-      boxDecorationBreakClone) {
+  // one.
+  if (!GetPrevContinuation() && !FrameIsNonFirstInIBSplit()) {
     aMetrics.ISize() += aReflowState.ComputedLogicalBorderPadding().IStart(wm);
   }
 
   /*
    * We want to only apply the end border and padding if we're the last
    * continuation and either not in an {ib} split or the last part of it.  To
    * be the last continuation we have to be complete (so that we won't get a
    * next-in-flow) and have no non-fluid continuations on our continuation
-   * chain.  For box-decoration-break:clone we always apply the end border and
-   * padding since all continuations have them.
+   * chain.
    */
-  if ((NS_FRAME_IS_COMPLETE(aStatus) &&
-       !LastInFlow()->GetNextContinuation() &&
-       !FrameIsNonLastInIBSplit()) ||
-      boxDecorationBreakClone) {
+  if (NS_FRAME_IS_COMPLETE(aStatus) &&
+      !LastInFlow()->GetNextContinuation() &&
+      !FrameIsNonLastInIBSplit()) {
     aMetrics.Width() += aReflowState.ComputedLogicalBorderPadding().IEnd(wm);
   }
 
   nsRefPtr<nsFontMetrics> fm;
   float inflation = nsLayoutUtils::FontSizeInflationFor(this);
   nsLayoutUtils::GetFontMetricsForFrame(this, getter_AddRefs(fm), inflation);
   aReflowState.rendContext->SetFont(fm);
 
@@ -881,21 +867,16 @@ nsInlineFrame::PushFrames(nsPresContext*
 }
 
 
 //////////////////////////////////////////////////////////////////////
 
 int
 nsInlineFrame::GetLogicalSkipSides(const nsHTMLReflowState* aReflowState) const
 {
-  if (MOZ_UNLIKELY(StyleBorder()->mBoxDecorationBreak ==
-                     NS_STYLE_BOX_DECORATION_BREAK_CLONE)) {
-    return 0;
-  }
-
   int skip = 0;
   if (!IsFirst()) {
     nsInlineFrame* prev = (nsInlineFrame*) GetPrevContinuation();
     if ((GetStateBits() & NS_INLINE_FRAME_BIDI_VISUAL_STATE_IS_SET) ||
         (prev && (prev->mRect.height || prev->mRect.width))) {
       // Prev continuation is not empty therefore we don't render our start
       // border edge.
       skip |= LOGICAL_SIDE_I_START;
--- a/layout/generic/nsLineLayout.cpp
+++ b/layout/generic/nsLineLayout.cpp
@@ -1071,22 +1071,19 @@ nsLineLayout::ApplyStartMargin(PerFrameD
   WritingMode frameWM = pfd->mFrame->GetWritingMode();
   WritingMode lineWM = mRootSpan->mWritingMode;
 
   // Only apply start-margin on the first-in flow for inline frames,
   // and make sure to not apply it to any inline other than the first
   // in an ib split.  Note that the ib sibling (block-in-inline
   // sibling) annotations only live on the first continuation, but we
   // don't want to apply the start margin for later continuations
-  // anyway.  For box-decoration-break:clone we apply the start-margin
-  // on all continuations.
-  if ((pfd->mFrame->GetPrevContinuation() ||
-       pfd->mFrame->FrameIsNonFirstInIBSplit()) &&
-      aReflowState.mStyleBorder->mBoxDecorationBreak ==
-        NS_STYLE_BOX_DECORATION_BREAK_SLICE) {
+  // anyway.
+  if (pfd->mFrame->GetPrevContinuation() ||
+      pfd->mFrame->FrameIsNonFirstInIBSplit()) {
     // Zero this out so that when we compute the max-element-width of
     // the frame we will properly avoid adding in the starting margin.
     pfd->mMargin.IStart(frameWM) = 0;
   }
   if ((pfd->mFrame->LastInFlow()->GetNextContinuation() ||
       pfd->mFrame->FrameIsNonLastInIBSplit())
     && !pfd->GetFlag(PFD_ISLETTERFRAME)) {
     pfd->mMargin.IEnd(frameWM) = 0;
@@ -1158,30 +1155,25 @@ nsLineLayout::CanPlaceFrame(PerFrameData
    * 1) The frame is not complete (in this case it will get a next-in-flow)
    * 2) The frame is complete but has a non-fluid continuation on its
    *    continuation chain.  Note that if it has a fluid continuation, that
    *    continuation will get destroyed later, so we don't want to drop the
    *    end-margin in that case.
    * 3) The frame is in an {ib} split and is not the last part.
    *
    * However, none of that applies if this is a letter frame (XXXbz why?)
-   *
-   * For box-decoration-break:clone we apply the end margin on all
-   * continuations (that are not letter frames).
    */
   if (pfd->mFrame->GetPrevContinuation() ||
       pfd->mFrame->FrameIsNonFirstInIBSplit()) {
     pfd->mMargin.IStart(frameWM) = 0;
   }
   if ((NS_FRAME_IS_NOT_COMPLETE(aStatus) ||
        pfd->mFrame->LastInFlow()->GetNextContinuation() ||
-       pfd->mFrame->FrameIsNonLastInIBSplit()) &&
-      !pfd->GetFlag(PFD_ISLETTERFRAME) &&
-      pfd->mFrame->StyleBorder()->mBoxDecorationBreak ==
-        NS_STYLE_BOX_DECORATION_BREAK_SLICE) {
+       pfd->mFrame->FrameIsNonLastInIBSplit())
+      && !pfd->GetFlag(PFD_ISLETTERFRAME)) {
     pfd->mMargin.IEnd(frameWM) = 0;
   }
   LogicalMargin usedMargins = pfd->mMargin.ConvertTo(lineWM, frameWM);
   nscoord startMargin = usedMargins.IStart(lineWM);
   nscoord endMargin = usedMargins.IEnd(lineWM);
 
   if (!(lineWM.IsBidiLTR() && frameWM.IsBidiLTR())) {
     pfd->mBounds.IStart(lineWM) += startMargin;
--- a/layout/generic/nsSplittableFrame.cpp
+++ b/layout/generic/nsSplittableFrame.cpp
@@ -248,22 +248,18 @@ nsSplittableFrame::GetEffectiveComputedH
 
 int
 nsSplittableFrame::GetLogicalSkipSides(const nsHTMLReflowState* aReflowState) const
 {
   if (IS_TRUE_OVERFLOW_CONTAINER(this)) {
     return LOGICAL_SIDES_B_BOTH;
   }
 
-  if (MOZ_UNLIKELY(StyleBorder()->mBoxDecorationBreak ==
-                     NS_STYLE_BOX_DECORATION_BREAK_CLONE)) {
-    return 0;
-  }
+  int skip = 0;
 
-  int skip = 0;
   if (GetPrevInFlow()) {
     skip |= LOGICAL_SIDE_B_START;
   }
 
   if (aReflowState) {
     // We're in the midst of reflow right now, so it's possible that we haven't
     // created a nif yet. If our content height is going to exceed our available
     // height, though, then we're going to need a next-in-flow, it just hasn't
new file mode 100644
--- /dev/null
+++ b/layout/reftests/backgrounds/background-size-bounding-box.html
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<html>
+<head>
+  <title>background-break: bounding-box</title>
+  <style type="text/css">
+@font-face
+{
+  font-family: Ahem;
+  src: url(../fonts/Ahem.ttf);
+}
+
+#outer
+{
+  border: 1px solid black;
+  width: 10em;
+}
+#ahem-lines
+{
+  font-family: Ahem;
+  font-size: 32px;
+  white-space: pre;
+  background-image: url(blue-8x20-green-8x20.png);
+  background-repeat: no-repeat;
+  -moz-background-inline-policy: bounding-box;
+}
+</style>
+</head>
+<body>
+<div id="outer">
+<span id="ahem-lines">      <!-- EOL -->
+        <!-- mix it up for each-box and bounding-box --><!-- EOL -->
+      <!-- EOL -->
+      <!-- EOL -->
+      </span></div>
+</body>
+</html>
rename from layout/reftests/backgrounds/background-size-slice.html
rename to layout/reftests/backgrounds/background-size-continuous.html
--- a/layout/reftests/backgrounds/background-size-slice.html
+++ b/layout/reftests/backgrounds/background-size-continuous.html
@@ -1,12 +1,12 @@
 <!DOCTYPE html>
 <html>
 <head>
-  <title>box-decoration-break: slice</title>
+  <title>background-break: continuous</title>
   <style type="text/css">
 @font-face
 {
   font-family: Ahem;
   src: url(../fonts/Ahem.ttf);
 }
 
 #outer
@@ -16,21 +16,21 @@
 }
 #ahem-lines
 {
   font-family: Ahem;
   font-size: 32px;
   white-space: pre;
   background-image: url(blue-8x20-green-8x20.png);
   background-repeat: no-repeat;
-  box-decoration-break: slice;
+  -moz-background-inline-policy: continuous;
 }
 </style>
 </head>
 <body>
 <div id="outer">
 <span id="ahem-lines">      <!-- EOL -->
-        <!-- mix it up for slice --><!-- EOL -->
+        <!-- mix it up for each-box and bounding-box --><!-- EOL -->
       <!-- EOL -->
       <!-- EOL -->
       </span></div>
 </body>
 </html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/backgrounds/background-size-cover-bounding-box.html
@@ -0,0 +1,37 @@
+<!DOCTYPE html>
+<html>
+<head>
+  <title>background-size: cover; background-break: bounding-box</title>
+  <style type="text/css">
+@font-face
+{
+  font-family: Ahem;
+  src: url(../fonts/Ahem.ttf);
+}
+
+#outer
+{
+  border: 1px solid black;
+  width: 10em;
+}
+#ahem-lines
+{
+  font-family: Ahem;
+  font-size: 32px;
+  white-space: pre;
+  background-image: url(blue-8x20-green-8x20.png);
+  background-repeat: no-repeat;
+  background-size: cover;
+  -moz-background-inline-policy: bounding-box;
+}
+</style>
+</head>
+<body>
+<div id="outer">
+<span id="ahem-lines">      <!-- EOL -->
+        <!-- mix it up for each-box and bounding-box --><!-- EOL -->
+      <!-- EOL -->
+      <!-- EOL -->
+      </span></div>
+</body>
+</html>
rename from layout/reftests/backgrounds/background-size-cover-slice.html
rename to layout/reftests/backgrounds/background-size-cover-continuous.html
--- a/layout/reftests/backgrounds/background-size-cover-slice.html
+++ b/layout/reftests/backgrounds/background-size-cover-continuous.html
@@ -1,12 +1,12 @@
 <!DOCTYPE html>
 <html>
 <head>
-  <title>background-size: cover; box-decoration-break: slice</title>
+  <title>background-size: cover; background-break: continuous</title>
   <style type="text/css">
 @font-face
 {
   font-family: Ahem;
   src: url(../fonts/Ahem.ttf);
 }
 
 #outer
@@ -17,21 +17,21 @@
 #ahem-lines
 {
   font-family: Ahem;
   font-size: 32px;
   white-space: pre;
   background-image: url(blue-8x20-green-8x20.png);
   background-repeat: no-repeat;
   background-size: cover;
-  box-decoration-break: slice;
+  -moz-background-inline-policy: continuous;
 }
 </style>
 </head>
 <body>
 <div id="outer">
 <span id="ahem-lines">      <!-- EOL -->
-        <!-- mix it up for slice --><!-- EOL -->
+        <!-- mix it up for each-box and bounding-box --><!-- EOL -->
       <!-- EOL -->
       <!-- EOL -->
       </span></div>
 </body>
 </html>
rename from layout/reftests/backgrounds/background-size-cover-clone.html
rename to layout/reftests/backgrounds/background-size-cover-each-box.html
--- a/layout/reftests/backgrounds/background-size-cover-clone.html
+++ b/layout/reftests/backgrounds/background-size-cover-each-box.html
@@ -1,12 +1,12 @@
 <!DOCTYPE html>
 <html>
 <head>
-  <title>background-size: cover; box-decoration-break: clone</title>
+  <title>background-size: cover; background-break: each-box</title>
   <style type="text/css">
 @font-face
 {
   font-family: Ahem;
   src: url(../fonts/Ahem.ttf);
 }
 
 #outer
@@ -17,21 +17,21 @@
 #ahem-lines
 {
   font-family: Ahem;
   font-size: 32px;
   white-space: pre;
   background-image: url(blue-8x20-green-8x20.png);
   background-repeat: no-repeat;
   background-size: cover;
-  box-decoration-break: clone;
+  -moz-background-inline-policy: each-box;
 }
 </style>
 </head>
 <body>
 <div id="outer">
 <span id="ahem-lines">      <!-- EOL -->
-        <!-- mix it up for clone --><!-- EOL -->
+        <!-- mix it up for each-box and bounding-box --><!-- EOL -->
       <!-- EOL -->
       <!-- EOL -->
       </span></div>
 </body>
 </html>
rename from layout/reftests/backgrounds/background-size-clone.html
rename to layout/reftests/backgrounds/background-size-each-box.html
--- a/layout/reftests/backgrounds/background-size-clone.html
+++ b/layout/reftests/backgrounds/background-size-each-box.html
@@ -1,12 +1,12 @@
 <!DOCTYPE html>
 <html>
 <head>
-  <title>box-decoration-break: clone</title>
+  <title>background-break: each-box</title>
   <style type="text/css">
 @font-face
 {
   font-family: Ahem;
   src: url(../fonts/Ahem.ttf);
 }
 
 #outer
@@ -16,21 +16,21 @@
 }
 #ahem-lines
 {
   font-family: Ahem;
   font-size: 32px;
   white-space: pre;
   background-image: url(blue-8x20-green-8x20.png);
   background-repeat: no-repeat;
-  box-decoration-break: clone;
+  -moz-background-inline-policy: each-box;
 }
 </style>
 </head>
 <body>
 <div id="outer">
 <span id="ahem-lines">      <!-- EOL -->
-        <!-- mix it up for clone --><!-- EOL -->
+        <!-- mix it up for each-box and bounding-box --><!-- EOL -->
       <!-- EOL -->
       <!-- EOL -->
       </span></div>
 </body>
 </html>
--- a/layout/reftests/backgrounds/reftest.list
+++ b/layout/reftests/backgrounds/reftest.list
@@ -85,25 +85,29 @@ fails-if(smallScreen&&Android) != backgr
 == background-size-contain-clip-border.html background-size-contain-clip-border-ref.html
 == background-size-contain-position-fifty-fifty.html background-size-contain-position-fifty-fifty-ref.html
 == background-size-contain-clip-padding-origin-border.html background-size-contain-clip-padding-origin-border-ref.html
 == background-size-contain-clip-padding-origin-border-padding.html background-size-contain-clip-padding-origin-border-padding-ref.html
 
 skip-if(B2G) == background-layers-1a.html background-layers-1-ref.html # bug 773482
 == background-layers-1b.html background-layers-1-ref.html
 
-# box-decoration-break's effect on backgrounds is touchy and hard to test due to stretching
-# artifacts and the difficulty of covering exact lines, so just make sure
-# background-size results in a different rendering when present.
-pref(layout.css.box-decoration-break.enabled,true) != background-size-cover-slice.html background-size-slice.html
-pref(layout.css.box-decoration-break.enabled,true) != background-size-cover-clone.html background-size-clone.html
+# -moz-background-inline-policy is touchy and hard to test due to stretching
+# artifacts and the difficulty of covering exact lines, and its CSS3 analog is
+# on the chopping block at the moment, so just make sure background-size results
+# in a different rendering when present.
+!= background-size-cover-continuous.html background-size-continuous.html
+!= background-size-cover-each-box.html background-size-each-box.html
+!= background-size-cover-bounding-box.html background-size-bounding-box.html
 
 # ...and make sure each rendering with background-size is different from the
-# other
-pref(layout.css.box-decoration-break.enabled,true) != background-size-cover-slice.html background-size-cover-clone.html
+# others
+!= background-size-cover-continuous.html background-size-cover-each-box.html
+!= background-size-cover-continuous.html background-size-cover-bounding-box.html
+!= background-size-cover-each-box.html background-size-cover-bounding-box.html
 
 == background-size-monster-ch.html background-size-monster-ref.html
 == background-size-monster-cm.html background-size-monster-ref.html
 == background-size-monster-em.html background-size-monster-ref.html
 == background-size-monster-ex.html background-size-monster-ref.html
 == background-size-monster-inches.html background-size-monster-ref.html
 == background-size-monster-mm.html background-size-monster-ref.html
 == background-size-monster-pc.html background-size-monster-ref.html
--- a/layout/reftests/bugs/368020-3-ref.html
+++ b/layout/reftests/bugs/368020-3-ref.html
@@ -1,15 +1,15 @@
 <!DOCTYPE HTML>
 <html>
 <head>
 <title>Testcase, bug 368020</title>
 </head>
 <body style="line-height: 3; width: 500px; height: 250px;">
 
-    <span style="background: url(repeatable-diagonal-gradient.png); background-clip: border-box; background-origin: padding-box; margin: 7px 4px 2px 18px; border: 6px transparent solid; border-width: 2px 10px 15px 2px;">
+    <span style="background: url(repeatable-diagonal-gradient.png); background-clip: border-box; background-clip: border; background-origin: padding-box; background-origin: padding; margin: 7px 4px 2px 18px; border: 6px transparent solid; border-width: 2px 10px 15px 2px; -moz-background-inline-policy: continuous; background-inline-policy: continuous;">
         blah<br>
         blah<br>
         blah
     </span>
 
 </body>
 </html>
--- a/layout/reftests/bugs/368020-3.html
+++ b/layout/reftests/bugs/368020-3.html
@@ -1,15 +1,15 @@
 <!DOCTYPE HTML>
 <html>
 <head>
 <title>Testcase, bug 368020</title>
 </head>
 <body style="line-height: 3; width: 500px; height: 250px;">
 
-    <span style="background: url(repeatable-diagonal-gradient.png); background-clip: padding-box; background-origin: content-box; border: medium transparent solid; border-width: 7px 4px 2px 18px; padding: 2px 2% 3% 2px;">
+    <span style="background: url(repeatable-diagonal-gradient.png); background-clip: padding-box; background-clip: padding; background-origin: content-box; background-origin: content; border: medium transparent solid; border-width: 7px 4px 2px 18px; padding: 2px 2% 3% 2px; -moz-background-inline-policy: continuous; background-inline-policy: continuous;">
         blah<br>
         blah<br>
         blah
     </span>
 
 </body>
 </html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/bugs/368020-4-ref.html
@@ -0,0 +1,15 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<title>Testcase, bug 368020</title>
+</head>
+<body style="line-height: 3; width: 500px; height: 250px;">
+
+    <span style="background: url(repeatable-diagonal-gradient.png); background-clip: border-box; background-clip: border; background-origin: padding-box; background-origin: padding; margin: 7px 4px 2px 18px; border: 6px transparent solid; border-width: 2px 10px 15px 2px; -moz-background-inline-policy: bounding-box; background-inline-policy: bounding-box;">
+        blah<br>
+        blah<br>
+        blah
+    </span>
+
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/bugs/368020-4.html
@@ -0,0 +1,15 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<title>Testcase, bug 368020</title>
+</head>
+<body style="line-height: 3; width: 500px; height: 250px;">
+
+    <span style="background: url(repeatable-diagonal-gradient.png); background-clip: padding-box; background-clip: padding; background-origin: content-box; background-origin: content; border: medium transparent solid; border-width: 7px 4px 2px 18px; padding: 2px 2% 3% 2px; -moz-background-inline-policy: bounding-box; background-inline-policy: bounding-box;">
+        blah<br>
+        blah<br>
+        blah
+    </span>
+
+</body>
+</html>
--- a/layout/reftests/bugs/368020-5-ref.html
+++ b/layout/reftests/bugs/368020-5-ref.html
@@ -1,15 +1,15 @@
 <!DOCTYPE HTML>
 <html>
 <head>
 <title>Testcase, bug 368020</title>
 </head>
 <body style="line-height: 3; width: 500px; height: 250px;">
 
-    <span style="background: url(repeatable-diagonal-gradient.png); background-clip: border-box; background-origin: padding-box; margin: 7px 4px 2px 18px; border: 6px transparent solid; border-width: 2px 10px 15px 2px; box-decoration-break: clone;">
+    <span style="background: url(repeatable-diagonal-gradient.png); background-clip: border-box; background-clip: border; background-origin: padding-box; background-origin: padding; margin: 7px 4px 2px 18px; border: 6px transparent solid; border-width: 2px 10px 15px 2px; -moz-background-inline-policy: each-box; background-inline-policy: each-box;">
         blah<br>
         blah<br>
         blah
     </span>
 
 </body>
 </html>
--- a/layout/reftests/bugs/368020-5.html
+++ b/layout/reftests/bugs/368020-5.html
@@ -1,15 +1,15 @@
 <!DOCTYPE HTML>
 <html>
 <head>
 <title>Testcase, bug 368020</title>
 </head>
 <body style="line-height: 3; width: 500px; height: 250px;">
 
-    <span style="background: url(repeatable-diagonal-gradient.png); background-clip: padding-box; background-origin: content-box; border: medium transparent solid; border-width: 7px 4px 2px 18px; padding: 2px 10px 15px 2px; box-decoration-break: clone;">
+    <span style="background: url(repeatable-diagonal-gradient.png); background-clip: padding-box; background-clip: padding; background-origin: content-box; background-origin: content; border: medium transparent solid; border-width: 7px 4px 2px 18px; padding: 2px 10px 15px 2px; -moz-background-inline-policy: each-box; background-inline-policy: each-box;">
         blah<br>
         blah<br>
         blah
     </span>
 
 </body>
 </html>
--- a/layout/reftests/bugs/reftest.list
+++ b/layout/reftests/bugs/reftest.list
@@ -590,18 +590,19 @@ skip-if(B2G) == 367247-l-scroll.html 367
 == 367612-1b.html 367612-1-ref.html
 == 367612-1c.html 367612-1-ref.html
 == 367612-1d.html 367612-1-ref.html
 == 367612-1e.html 367612-1-ref.html
 == 367612-1f.html 367612-1-ref.html
 != 367612-1g.html 367612-1-ref.html
 skip-if(B2G) random-if(/^Windows\x20NT\x205\.1/.test(http.oscpu)) == 368020-1.html 368020-1-ref.html
 == 368020-2.html 368020-2-ref.html
-== 368020-3.html 368020-3-ref.html
-pref(layout.css.box-decoration-break.enabled,true) == 368020-5.html 368020-5-ref.html
+fails == 368020-3.html 368020-3-ref.html # bug 368085
+fails == 368020-4.html 368020-4-ref.html # bug 368085
+== 368020-5.html 368020-5-ref.html
 == 368155-1.xhtml 368155-1-ref.xhtml
 asserts(4) == 368155-negative-margins-1.html 368155-negative-margins-1-ref.html # bug 387205 / bug 457397
 # we can't test this because there's antialiasing involved, and our comparison
 # is too exact
 # == 368247-1.html 368247-1-ref.html
 == 368247-2.html 368247-2-ref.html
 == 368504-1.html 368504-1-ref.html
 == 368504-2.html 368504-2-ref.html
deleted file mode 100644
--- a/layout/reftests/css-break/box-decoration-break-1-ref.html
+++ /dev/null
@@ -1,67 +0,0 @@
-<!DOCTYPE HTML>
-<!--
-     Any copyright is dedicated to the Public Domain.
-     http://creativecommons.org/publicdomain/zero/1.0/
--->
-<html>
-<head>
-  <title>CSS Test: Testing box-decoration-break:clone</title>
-  <link rel="author" title="Mats Palmgren" href="https://bugzilla.mozilla.org/show_bug.cgi?id=613659">
-  <meta charset="utf-8">
-<style>
-
-span {
-  line-height:4em;
-  font-family:monospace;
-  padding: 3px 5px 7px 11px;
-  background-color: #0F0;
-  margin: 13px 17px 19px 23px;
-  border-left:13px dashed pink;
-  border-top:7px dashed blue;
-  border-right:3px dashed black;
-  border-bottom:1px dashed blue;
-}
-.o0 {
-  border-radius: 17px;
-}
-.o10 {
-  border-radius: 17px;
-  margin-left:0;
-}
-.o10x {
-  border-radius: 17px;
-  padding-right:0;
-}
-.so0 {
-  border-radius: 0px;
-}
-.so10 {
-  border-radius: 0px;
-  margin-right:0;
-}
-.so10x {
-  border-radius: 0px;
-  padding-left:0;
-}
-</style>
-</head>
-<body style="margin:10px">
-
-<table border=1 cellpadding=10><tr>
-<td><span class="o0"><b>&nbsp;&nbsp;a&nbsp;&nbsp;</b></span><br><span class="o0"><b>&nbsp;&nbsp;b&nbsp;&nbsp;</b></span><br><span class="o0"><b>&nbsp;&nbsp;c&nbsp;&nbsp;</b></span></td>
-<td><span class="o10"><b>&nbsp;&nbsp;a&nbsp;&nbsp;</b></span><br><span class="o10"><b>&nbsp;&nbsp;b&nbsp;&nbsp;</b></span><br><span class="o10"><b>&nbsp;&nbsp;c&nbsp;&nbsp;</b></span></td>
-<td><span class="o10x"><b>&nbsp;&nbsp;a&nbsp;&nbsp;</b></span><br><span class="o10x"><b>&nbsp;&nbsp;b&nbsp;&nbsp;</b></span><br><span class="o10x"><b>&nbsp;&nbsp;c&nbsp;&nbsp;</b></span></td>
-</tr>
-</table>
-
-<br>
-
-<table border=1 cellpadding=10><tr>
-<td><span class="so0"><b>&nbsp;&nbsp;a&nbsp;&nbsp;</b></span><br><span class="so0"><b>&nbsp;&nbsp;b&nbsp;&nbsp;</b></span><br><span class="so0"><b>&nbsp;&nbsp;c&nbsp;&nbsp;</b></span></td>
-<td><span class="so10"><b>&nbsp;&nbsp;a&nbsp;&nbsp;</b></span><br><span class="so10"><b>&nbsp;&nbsp;b&nbsp;&nbsp;</b></span><br><span class="so10"><b>&nbsp;&nbsp;c&nbsp;&nbsp;</b></span></td>
-<td><span class="so10x"><b>&nbsp;&nbsp;a&nbsp;&nbsp;</b></span><br><span class="so10x"><b>&nbsp;&nbsp;b&nbsp;&nbsp;</b></span><br><span class="so10x"><b>&nbsp;&nbsp;c&nbsp;&nbsp;</b></span></td>
-</tr>
-</table>
-
-</body>
-</html>
deleted file mode 100644
--- a/layout/reftests/css-break/box-decoration-break-1.html
+++ /dev/null
@@ -1,71 +0,0 @@
-<!DOCTYPE HTML>
-<!--
-     Any copyright is dedicated to the Public Domain.
-     http://creativecommons.org/publicdomain/zero/1.0/
--->
-<html>
-<head>
-  <title>CSS Test: Testing box-decoration-break:clone</title>
-  <link rel="author" title="Mats Palmgren" href="https://bugzilla.mozilla.org/show_bug.cgi?id=613659">
-  <link rel="help" href="http://dev.w3.org/csswg/css-break/#break-decoration">
-  <link rel="match" href="box-decoration-break-1-ref.html">
-  <meta charset="utf-8">
-<style>
-
-span {
-  box-decoration-break:clone;
-
-  line-height:4em;
-  font-family:monospace;
-  padding: 3px 5px 7px 11px;
-  background-color: #0F0;
-  margin: 13px 17px 19px 23px;
-  border-left:13px dashed pink;
-  border-top:7px dashed blue;
-  border-right:3px dashed black;
-  border-bottom:1px dashed blue;
-}
-.o0 {
-  border-radius: 17px;
-}
-.o10 {
-  border-radius: 17px;
-  margin-left:0;
-}
-.o10x {
-  border-radius: 17px;
-  padding-right:0;
-}
-.so0 {
-  border-radius: 0px;
-}
-.so10 {
-  border-radius: 0px;
-  margin-right:0;
-}
-.so10x {
-  border-radius: 0px;
-  padding-left:0;
-}
-</style>
-</head>
-<body style="margin:10px">
-
-<table border=1 cellpadding=10><tr>
-<td><span class="o0"><b>&nbsp;&nbsp;a&nbsp;&nbsp;<br>&nbsp;&nbsp;b&nbsp;&nbsp;<br>&nbsp;&nbsp;c&nbsp;&nbsp;</b></span></td>
-<td><span class="o10"><b>&nbsp;&nbsp;a&nbsp;&nbsp;<br>&nbsp;&nbsp;b&nbsp;&nbsp;<br>&nbsp;&nbsp;c&nbsp;&nbsp;</b></span></td>
-<td><span class="o10x"><b>&nbsp;&nbsp;a&nbsp;&nbsp;<br>&nbsp;&nbsp;b&nbsp;&nbsp;<br>&nbsp;&nbsp;c&nbsp;&nbsp;</b></span></td>
-</tr>
-</table>
-
-<br>
-
-<table border=1 cellpadding=10><tr>
-<td><span class="so0"><b>&nbsp;&nbsp;a&nbsp;&nbsp;<br>&nbsp;&nbsp;b&nbsp;&nbsp;<br>&nbsp;&nbsp;c&nbsp;&nbsp;</b></span><br></td>
-<td><span class="so10"><b>&nbsp;&nbsp;a&nbsp;&nbsp;<br>&nbsp;&nbsp;b&nbsp;&nbsp;<br>&nbsp;&nbsp;c&nbsp;&nbsp;</b></span><br></td>
-<td><span class="so10x"><b>&nbsp;&nbsp;a&nbsp;&nbsp;<br>&nbsp;&nbsp;b&nbsp;&nbsp;<br>&nbsp;&nbsp;c&nbsp;&nbsp;</b></span><br></td>
-</tr>
-</table>
-
-</body>
-</html>
deleted file mode 100644
--- a/layout/reftests/css-break/box-decoration-break-with-inset-box-shadow-1-ref.html
+++ /dev/null
@@ -1,132 +0,0 @@
-<!DOCTYPE HTML>
-<!--
-     Any copyright is dedicated to the Public Domain.
-     http://creativecommons.org/publicdomain/zero/1.0/
--->
-<html>
-<head>
-  <title>CSS Test: Testing box-decoration-break:clone with inset box-shadow</title>
-  <link rel="author" title="Mats Palmgren" href="https://bugzilla.mozilla.org/show_bug.cgi?id=613659">
-  <meta charset="utf-8">
-<style>
-span {  border:3px dashed pink; margin:0 1em; line-height:4em; }
-
-span {
-  font-family:monospace;
-  padding:1em 1em;
-  background-image: url(green-circle-alpha-32x32.png);
-}
-.o0 {
-  border-radius: 12px;
-  -webkit-box-shadow: inset 0px 0px 0px 10px #00F;
-          box-shadow: inset 0px 0px 0px 10px #00F;
-}
-.o10 {
-  border-radius: 12px;
-  -webkit-box-shadow: inset 0px 0px 7px 10px #00F;
-          box-shadow: inset 0px 0px 7px 10px #00F;
-}
-.o10x {
-  border-radius: 12px;
-  -webkit-box-shadow: inset 0px 0px 7px 0px #00F;
-          box-shadow: inset 0px 0px 7px 0px #00F;
-}
-.p0 {
-  border-radius: 12px;
-  -webkit-box-shadow: inset 15px 9px 0px 10px #00F;
-          box-shadow: inset 15px 9px 0px 10px #00F;
-}
-.p10 {
-  border-radius: 12px;
-  -webkit-box-shadow: inset 15px 9px 7px 10px #00F;
-          box-shadow: inset 15px 9px 7px 10px #00F;
-}
-.p10x {
-  border-radius: 12px;
-  -webkit-box-shadow: inset 15px 9px 7px 0px #00F;
-          box-shadow: inset 15px 9px 7px 0px #00F;
-}
-.so0 {
-  border-radius: 0px;
-  -webkit-box-shadow: inset 0px 0px 0px 10px #00F;
-          box-shadow: inset 0px 0px 0px 10px #00F;
-}
-.so10 {
-  border-radius: 0px;
-  -webkit-box-shadow: inset 0px 0px 7px 10px #00F;
-          box-shadow: inset 0px 0px 7px 10px #00F;
-}
-.so10x {
-  border-radius: 0px;
-  -webkit-box-shadow: inset 0px 0px 7px 0px #00F;
-          box-shadow: inset 0px 0px 7px 0px #00F;
-}
-.sp0 {
-  border-radius: 0px;
-  -webkit-box-shadow: inset 15px 9px 0px 10px #00F;
-          box-shadow: inset 15px 9px 0px 10px #00F;
-}
-.sp10 {
-  border-radius: 0px;
-  -webkit-box-shadow: inset 15px 9px 7px 10px #00F;
-          box-shadow: inset 15px 9px 7px 10px #00F;
-}
-.sp10x {
-  border-radius: 0px;
-  -webkit-box-shadow: inset 15px 9px 7px 0px #00F;
-          box-shadow: inset 15px 9px 7px 0px #00F;
-}
-
-.m b { visibility:hidden; }
-.m { box-shadow:none; background:none; border-style:solid; border-radius:0; border-color:transparent; }
-.m.o0, .m.o10, .m.o10x, .m.p0, .m.p10, .m.p10x { border-bottom-color: black; }
-</style>
-</head>
-<body style="margin:49px 50px;">
-
-<div style="position:relative">
-<table border=1 cellpadding=10><tr><td>
-<span class="o0"><b>&nbsp;&nbsp;a&nbsp;&nbsp;</b></span><br><span class="o0"><b>&nbsp;&nbsp;b&nbsp;&nbsp;</b></span><br><span class="o0"><b>&nbsp;&nbsp;c&nbsp;&nbsp;</b></span><br>
-<span class="o10"><b>&nbsp;&nbsp;a&nbsp;&nbsp;</b></span><br><span class="o10"><b>&nbsp;&nbsp;b&nbsp;&nbsp;</b></span><br><span class="o10"><b>&nbsp;&nbsp;c&nbsp;&nbsp;</b></span><br>
-<span class="o10x"><b>&nbsp;&nbsp;a&nbsp;&nbsp;</b></span><br><span class="o10x"><b>&nbsp;&nbsp;b&nbsp;&nbsp;</b></span><br><span class="o10x"><b>&nbsp;&nbsp;c&nbsp;&nbsp;</b></span><br>
-</td><td>
-<span class="p0"><b>&nbsp;&nbsp;a&nbsp;&nbsp;</b></span><br><span class="p0"><b>&nbsp;&nbsp;b&nbsp;&nbsp;</b></span><br></span><span class="p0"><b>&nbsp;&nbsp;c&nbsp;&nbsp;</b></span><br>
-<span class="p10"><b>&nbsp;&nbsp;a&nbsp;&nbsp;</b></span><br><span class="p10"><b>&nbsp;&nbsp;b&nbsp;&nbsp;</b></span><br><span class="p10"><b>&nbsp;&nbsp;c&nbsp;&nbsp;</b></span><br>
-<span class="p10x"><b>&nbsp;&nbsp;a&nbsp;&nbsp;</b></span><br><span class="p10x"><b>&nbsp;&nbsp;b&nbsp;&nbsp;</b></span><br><span class="p10x"><b>&nbsp;&nbsp;c&nbsp;&nbsp;</b></span><br>
-</td><td>
-<span class="so0"><b>&nbsp;&nbsp;a&nbsp;&nbsp;</b></span><br><span class="so0"><b>&nbsp;&nbsp;b&nbsp;&nbsp;</b></span><br><span class="so0"><b>&nbsp;&nbsp;c&nbsp;&nbsp;</b></span><br>
-<span class="so10"><b>&nbsp;&nbsp;a&nbsp;&nbsp;</b></span><br><span class="so10"><b>&nbsp;&nbsp;b&nbsp;&nbsp;</b></span><br><span class="so10"><b>&nbsp;&nbsp;c&nbsp;&nbsp;</b></span><br>
-<span class="so10x"><b>&nbsp;&nbsp;a&nbsp;&nbsp;</b></span><br><span class="so10x"><b>&nbsp;&nbsp;b&nbsp;&nbsp;</b></span><br><span class="so10x"><b>&nbsp;&nbsp;c&nbsp;&nbsp;</b></span><br>
-</td><td>
-<span class="sp0"><b>&nbsp;&nbsp;a&nbsp;&nbsp;</b></span><br><span class="sp0"><b>&nbsp;&nbsp;b&nbsp;&nbsp;</b></span><br><span class="sp0"><b>&nbsp;&nbsp;c&nbsp;&nbsp;</b></span><br>
-<span class="sp10"><b>&nbsp;&nbsp;a&nbsp;&nbsp;</b></span><br><span class="sp10"><b>&nbsp;&nbsp;b&nbsp;&nbsp;</b></span><br><span class="sp10"><b>&nbsp;&nbsp;c&nbsp;&nbsp;</b></span><br>
-<span class="sp10x"><b>&nbsp;&nbsp;a&nbsp;&nbsp;</b></span><br><span class="sp10x"><b>&nbsp;&nbsp;b&nbsp;&nbsp;</b></span><br><span class="sp10x"><b>&nbsp;&nbsp;c&nbsp;&nbsp;</b></span><br>
-</td></tr>
-</table>
-
-<div style="position:absolute; top:0px;left:0;">
-<!-- mask out 1px of outer edge of the rounded borders at some places due to rounding errors -->
-<table border=1 cellpadding=10><tr><td>
-<span class="m o0"><b>&nbsp;&nbsp;a&nbsp;&nbsp;</b></span><br><span class="m o0"><b>&nbsp;&nbsp;b&nbsp;&nbsp;</b></span><br><span class="m o0"><b>&nbsp;&nbsp;c&nbsp;&nbsp;</b></span><br>
-<span class="m o10"><b>&nbsp;&nbsp;a&nbsp;&nbsp;</b></span><br><span class="m o10"><b>&nbsp;&nbsp;b&nbsp;&nbsp;</b></span><br><span class="m o10"><b>&nbsp;&nbsp;c&nbsp;&nbsp;</b></span><br>
-<span class="m o10x"><b>&nbsp;&nbsp;a&nbsp;&nbsp;</b></span><br><span class="m o10x"><b>&nbsp;&nbsp;b&nbsp;&nbsp;</b></span><br><span class="m o10x"><b>&nbsp;&nbsp;c&nbsp;&nbsp;</b></span><br>
-</td><td>
-<span class="m p0"><b>&nbsp;&nbsp;a&nbsp;&nbsp;</b></span><br><span class="m p0"><b>&nbsp;&nbsp;b&nbsp;&nbsp;</b></span><br></span><span class="m p0"><b>&nbsp;&nbsp;c&nbsp;&nbsp;</b></span><br>
-<span class="m p10"><b>&nbsp;&nbsp;a&nbsp;&nbsp;</b></span><br><span class="m p10"><b>&nbsp;&nbsp;b&nbsp;&nbsp;</b></span><br><span class="m p10"><b>&nbsp;&nbsp;c&nbsp;&nbsp;</b></span><br>
-<span class="m p10x"><b>&nbsp;&nbsp;a&nbsp;&nbsp;</b></span><br><span class="m p10x"><b>&nbsp;&nbsp;b&nbsp;&nbsp;</b></span><br><span class="m p10x"><b>&nbsp;&nbsp;c&nbsp;&nbsp;</b></span><br>
-</td><td>
-<span class="m so0"><b>&nbsp;&nbsp;a&nbsp;&nbsp;</b></span><br><span class="m so0"><b>&nbsp;&nbsp;b&nbsp;&nbsp;</b></span><br><span class="m so0"><b>&nbsp;&nbsp;c&nbsp;&nbsp;</b></span><br>
-<span class="m so10"><b>&nbsp;&nbsp;a&nbsp;&nbsp;</b></span><br><span class="m so10"><b>&nbsp;&nbsp;b&nbsp;&nbsp;</b></span><br><span class="m so10"><b>&nbsp;&nbsp;c&nbsp;&nbsp;</b></span><br>
-<span class="m so10x"><b>&nbsp;&nbsp;a&nbsp;&nbsp;</b></span><br><span class="m so10x"><b>&nbsp;&nbsp;b&nbsp;&nbsp;</b></span><br><span class="m so10x"><b>&nbsp;&nbsp;c&nbsp;&nbsp;</b></span><br>
-</td><td>
-<span class="m sp0"><b>&nbsp;&nbsp;a&nbsp;&nbsp;</b></span><br><span class="m sp0"><b>&nbsp;&nbsp;b&nbsp;&nbsp;</b></span><br><span class="m sp0"><b>&nbsp;&nbsp;c&nbsp;&nbsp;</b></span><br>
-<span class="m sp10"><b>&nbsp;&nbsp;a&nbsp;&nbsp;</b></span><br><span class="m sp10"><b>&nbsp;&nbsp;b&nbsp;&nbsp;</b></span><br><span class="m sp10"><b>&nbsp;&nbsp;c&nbsp;&nbsp;</b></span><br>
-<span class="m sp10x"><b>&nbsp;&nbsp;a&nbsp;&nbsp;</b></span><br><span class="m sp10x"><b>&nbsp;&nbsp;b&nbsp;&nbsp;</b></span><br><span class="m sp10x"><b>&nbsp;&nbsp;c&nbsp;&nbsp;</b></span><br>
-</td></tr>
-</table>
-</div>
-
-</div>
-
-</body>
-
deleted file mode 100644
--- a/layout/reftests/css-break/box-decoration-break-with-inset-box-shadow-1.html
+++ /dev/null
@@ -1,134 +0,0 @@
-<!DOCTYPE HTML>
-<!--
-     Any copyright is dedicated to the Public Domain.
-     http://creativecommons.org/publicdomain/zero/1.0/
--->
-<html>
-<head>
-  <title>CSS Test: Testing box-decoration-break:clone with inset box-shadow</title>
-  <link rel="author" title="Mats Palmgren" href="https://bugzilla.mozilla.org/show_bug.cgi?id=613659">
-  <link rel="help" href="http://dev.w3.org/csswg/css-break/#break-decoration">
-  <link rel="match" href="box-decoration-break-with-inset-box-shadow-1-ref.html">
-  <meta charset="utf-8">
-<style>
-span {  border:3px dashed pink; margin:0 1em; line-height:4em; box-decoration-break:clone; }
-
-span {
-  font-family:monospace;
-  padding:1em 1em;
-  background-image: url(green-circle-alpha-32x32.png);
-}
-.o0 {
-  border-radius: 12px;
-  -webkit-box-shadow: inset 0px 0px 0px 10px #00F;
-          box-shadow: inset 0px 0px 0px 10px #00F;
-}
-.o10 {
-  border-radius: 12px;
-  -webkit-box-shadow: inset 0px 0px 7px 10px #00F;
-          box-shadow: inset 0px 0px 7px 10px #00F;
-}
-.o10x {
-  border-radius: 12px;
-  -webkit-box-shadow: inset 0px 0px 7px 0px #00F;
-          box-shadow: inset 0px 0px 7px 0px #00F;
-}
-.p0 {
-  border-radius: 12px;
-  -webkit-box-shadow: inset 15px 9px 0px 10px #00F;
-          box-shadow: inset 15px 9px 0px 10px #00F;
-}
-.p10 {
-  border-radius: 12px;
-  -webkit-box-shadow: inset 15px 9px 7px 10px #00F;
-          box-shadow: inset 15px 9px 7px 10px #00F;
-}
-.p10x {
-  border-radius: 12px;
-  -webkit-box-shadow: inset 15px 9px 7px 0px #00F;
-          box-shadow: inset 15px 9px 7px 0px #00F;
-}
-.so0 {
-  border-radius: 0px;
-  -webkit-box-shadow: inset 0px 0px 0px 10px #00F;
-          box-shadow: inset 0px 0px 0px 10px #00F;
-}
-.so10 {
-  border-radius: 0px;
-  -webkit-box-shadow: inset 0px 0px 7px 10px #00F;
-          box-shadow: inset 0px 0px 7px 10px #00F;
-}
-.so10x {
-  border-radius: 0px;
-  -webkit-box-shadow: inset 0px 0px 7px 0px #00F;
-          box-shadow: inset 0px 0px 7px 0px #00F;
-}
-.sp0 {
-  border-radius: 0px;
-  -webkit-box-shadow: inset 15px 9px 0px 10px #00F;
-          box-shadow: inset 15px 9px 0px 10px #00F;
-}
-.sp10 {
-  border-radius: 0px;
-  -webkit-box-shadow: inset 15px 9px 7px 10px #00F;
-          box-shadow: inset 15px 9px 7px 10px #00F;
-}
-.sp10x {
-  border-radius: 0px;
-  -webkit-box-shadow: inset 15px 9px 7px 0px #00F;
-          box-shadow: inset 15px 9px 7px 0px #00F;
-}
-
-.m b { visibility:hidden; }
-.m { box-shadow:none; background:none; border-style:solid; border-radius:0; border-color:transparent; }
-.m.o0, .m.o10, .m.o10x, .m.p0, .m.p10, .m.p10x { border-bottom-color: black; }
-</style>
-</head>
-<body style="margin:49px 50px;">
-
-<div style="position:relative">
-<table border=1 cellpadding=10><tr><td>
-<span class="o0"><b>&nbsp;&nbsp;a&nbsp;&nbsp;<br>&nbsp;&nbsp;b&nbsp;&nbsp;<br>&nbsp;&nbsp;c&nbsp;&nbsp;</b></span><br>
-<span class="o10"><b>&nbsp;&nbsp;a&nbsp;&nbsp;<br>&nbsp;&nbsp;b&nbsp;&nbsp;<br>&nbsp;&nbsp;c&nbsp;&nbsp;</b></span><br>
-<span class="o10x"><b>&nbsp;&nbsp;a&nbsp;&nbsp;<br>&nbsp;&nbsp;b&nbsp;&nbsp;<br>&nbsp;&nbsp;c&nbsp;&nbsp;</b></span><br>
-</td><td>
-<span class="p0"><b>&nbsp;&nbsp;a&nbsp;&nbsp;<br>&nbsp;&nbsp;b&nbsp;&nbsp;<br>&nbsp;&nbsp;c&nbsp;&nbsp;</b></span><br>
-<span class="p10"><b>&nbsp;&nbsp;a&nbsp;&nbsp;<br>&nbsp;&nbsp;b&nbsp;&nbsp;<br>&nbsp;&nbsp;c&nbsp;&nbsp;</b></span><br>
-<span class="p10x"><b>&nbsp;&nbsp;a&nbsp;&nbsp;<br>&nbsp;&nbsp;b&nbsp;&nbsp;<br>&nbsp;&nbsp;c&nbsp;&nbsp;</b></span><br>
-</td><td>
-<span class="so0"><b>&nbsp;&nbsp;a&nbsp;&nbsp;<br>&nbsp;&nbsp;b&nbsp;&nbsp;<br>&nbsp;&nbsp;c&nbsp;&nbsp;</b></span><br>
-<span class="so10"><b>&nbsp;&nbsp;a&nbsp;&nbsp;<br>&nbsp;&nbsp;b&nbsp;&nbsp;<br>&nbsp;&nbsp;c&nbsp;&nbsp;</b></span><br>
-<span class="so10x"><b>&nbsp;&nbsp;a&nbsp;&nbsp;<br>&nbsp;&nbsp;b&nbsp;&nbsp;<br>&nbsp;&nbsp;c&nbsp;&nbsp;</b></span><br>
-</td><td>
-<span class="sp0"><b>&nbsp;&nbsp;a&nbsp;&nbsp;<br>&nbsp;&nbsp;b&nbsp;&nbsp;<br>&nbsp;&nbsp;c&nbsp;&nbsp;</b></span><br>
-<span class="sp10"><b>&nbsp;&nbsp;a&nbsp;&nbsp;<br>&nbsp;&nbsp;b&nbsp;&nbsp;<br>&nbsp;&nbsp;c&nbsp;&nbsp;</b></span><br>
-<span class="sp10x"><b>&nbsp;&nbsp;a&nbsp;&nbsp;<br>&nbsp;&nbsp;b&nbsp;&nbsp;<br>&nbsp;&nbsp;c&nbsp;&nbsp;</b></span><br>
-</td></tr>
-</table>
-
-<div style="position:absolute; top:0px;left:0;">
-<!-- mask out 1px of outer edge of the rounded borders at some places due to rounding errors -->
-<table border=1 cellpadding=10><tr><td>
-<span class="m o0"><b>&nbsp;&nbsp;a&nbsp;&nbsp;<br>&nbsp;&nbsp;b&nbsp;&nbsp;<br>&nbsp;&nbsp;c&nbsp;&nbsp;</b></span><br>
-<span class="m o10"><b>&nbsp;&nbsp;a&nbsp;&nbsp;<br>&nbsp;&nbsp;b&nbsp;&nbsp;<br>&nbsp;&nbsp;c&nbsp;&nbsp;</b></span><br>
-<span class="m o10x"><b>&nbsp;&nbsp;a&nbsp;&nbsp;<br>&nbsp;&nbsp;b&nbsp;&nbsp;<br>&nbsp;&nbsp;c&nbsp;&nbsp;</b></span><br>
-</td><td>
-<span class="m p0"><b>&nbsp;&nbsp;a&nbsp;&nbsp;<br>&nbsp;&nbsp;b&nbsp;&nbsp;<br>&nbsp;&nbsp;c&nbsp;&nbsp;</b></span><br>
-<span class="m p10"><b>&nbsp;&nbsp;a&nbsp;&nbsp;<br>&nbsp;&nbsp;b&nbsp;&nbsp;<br>&nbsp;&nbsp;c&nbsp;&nbsp;</b></span><br>
-<span class="m p10x"><b>&nbsp;&nbsp;a&nbsp;&nbsp;<br>&nbsp;&nbsp;b&nbsp;&nbsp;<br>&nbsp;&nbsp;c&nbsp;&nbsp;</b></span><br>
-</td><td>
-<span class="m so0"><b>&nbsp;&nbsp;a&nbsp;&nbsp;<br>&nbsp;&nbsp;b&nbsp;&nbsp;<br>&nbsp;&nbsp;c&nbsp;&nbsp;</b></span><br>
-<span class="m so10"><b>&nbsp;&nbsp;a&nbsp;&nbsp;<br>&nbsp;&nbsp;b&nbsp;&nbsp;<br>&nbsp;&nbsp;c&nbsp;&nbsp;</b></span><br>
-<span class="m so10x"><b>&nbsp;&nbsp;a&nbsp;&nbsp;<br>&nbsp;&nbsp;b&nbsp;&nbsp;<br>&nbsp;&nbsp;c&nbsp;&nbsp;</b></span><br>
-</td><td>
-<span class="m sp0"><b>&nbsp;&nbsp;a&nbsp;&nbsp;<br>&nbsp;&nbsp;b&nbsp;&nbsp;<br>&nbsp;&nbsp;c&nbsp;&nbsp;</b></span><br>
-<span class="m sp10"><b>&nbsp;&nbsp;a&nbsp;&nbsp;<br>&nbsp;&nbsp;b&nbsp;&nbsp;<br>&nbsp;&nbsp;c&nbsp;&nbsp;</b></span><br>
-<span class="m sp10x"><b>&nbsp;&nbsp;a&nbsp;&nbsp;<br>&nbsp;&nbsp;b&nbsp;&nbsp;<br>&nbsp;&nbsp;c&nbsp;&nbsp;</b></span><br>
-</td></tr>
-</table>
-</div>
-
-</div>
-
-</body>
-</html>
deleted file mode 100644
--- a/layout/reftests/css-break/box-decoration-break-with-outset-box-shadow-1-ref.html
+++ /dev/null
@@ -1,131 +0,0 @@
-<!DOCTYPE HTML>
-<!--
-     Any copyright is dedicated to the Public Domain.
-     http://creativecommons.org/publicdomain/zero/1.0/
--->
-<html>
-<head>
-  <title>CSS Test: Testing box-decoration-break:clone with outset box-shadow</title>
-  <link rel="author" title="Mats Palmgren" href="https://bugzilla.mozilla.org/show_bug.cgi?id=613659">
-  <meta charset="utf-8">
-<style>
-span { border:3px dashed pink; line-height:80px; }
-
-span {
-  font-family:monospace;
-  padding:1em 1em;
-  background-image: url(green-circle-alpha-32x32.png);
-}
-.o0 {
-  border-radius: 12px;
-  -webkit-box-shadow: 0px 0px 0px 10px #00F;
-          box-shadow: 0px 0px 0px 10px #00F;
-}
-.o10 {
-  border-radius: 12px;
-  -webkit-box-shadow: 0px 0px 7px 10px #00F;
-          box-shadow: 0px 0px 7px 10px #00F;
-}
-.o10x {
-  border-radius: 12px;
-  -webkit-box-shadow: 0px 0px 7px 0px #00F;
-          box-shadow: 0px 0px 7px 0px #00F;
-}
-.p0 {
-  border-radius: 12px;
-  -webkit-box-shadow: 15px 9px 0px 10px #00F;
-          box-shadow: 15px 9px 0px 10px #00F;
-}
-.p10 {
-  border-radius: 12px;
-  -webkit-box-shadow: 15px 9px 7px 10px #00F;
-          box-shadow: 15px 9px 7px 10px #00F;
-}
-.p10x {
-  border-radius: 12px;
-  -webkit-box-shadow: 15px 9px 7px 0px #00F;
-          box-shadow: 15px 9px 7px 0px #00F;
-}
-.so0 {
-  border-radius: 0px;
-  -webkit-box-shadow: 0px 0px 0px 10px #00F;
-          box-shadow: 0px 0px 0px 10px #00F;
-}
-.so10 {
-  border-radius: 0px;
-  -webkit-box-shadow: 0px 0px 7px 10px #00F;
-          box-shadow: 0px 0px 7px 10px #00F;
-}
-.so10x {
-  border-radius: 0px;
-  -webkit-box-shadow: 0px 0px 7px 0px #00F;
-          box-shadow: 0px 0px 7px 0px #00F;
-}
-.sp0 {
-  border-radius: 0px;
-  -webkit-box-shadow: 15px 9px 0px 10px #00F;
-          box-shadow: 15px 9px 0px 10px #00F;
-}
-.sp10 {
-  border-radius: 0px;
-  -webkit-box-shadow: 15px 9px 7px 10px #00F;
-          box-shadow: 15px 9px 7px 10px #00F;
-}
-.sp10x {
-  border-radius: 0px;
-  -webkit-box-shadow: 15px 9px 7px 0px #00F;
-          box-shadow: 15px 9px 7px 0px #00F;
-}
-
-.m b { visibility:hidden; }
-.m { box-shadow:none; background:none; border-style:solid; border-radius:0; border-color:transparent; }
-.m.o0, .m.o10, .m.o10x, .m.p0, .m.p10, .m.p10x { border-bottom-color: black; }
-</style>
-</head>
-<body style="margin:49px 50px;">
-
-<div style="position:relative">
-<table border=1 cellpadding=50 ><tr><td>
-<span class="o0"><b>&nbsp;&nbsp;a&nbsp;&nbsp;</b></span><br><span class="o0"><b>&nbsp;&nbsp;b&nbsp;&nbsp;</b></span><br><span class="o0"><b>&nbsp;&nbsp;c&nbsp;&nbsp;</b></span><br>
-<span class="o10"><b>&nbsp;&nbsp;a&nbsp;&nbsp;</b></span><br><span class="o10"><b>&nbsp;&nbsp;b&nbsp;&nbsp;</b></span><br><span class="o10"><b>&nbsp;&nbsp;c&nbsp;&nbsp;</b></span><br>
-<span class="o10x"><b>&nbsp;&nbsp;a&nbsp;&nbsp;</b></span><br><span class="o10x"><b>&nbsp;&nbsp;b&nbsp;&nbsp;</b></span><br><span class="o10x"><b>&nbsp;&nbsp;c&nbsp;&nbsp;</b></span><br>
-</td><td>
-<span class="p0"><b>&nbsp;&nbsp;a&nbsp;&nbsp;</b></span><br><span class="p0"><b>&nbsp;&nbsp;b&nbsp;&nbsp;</b></span><br><span class="p0"><b>&nbsp;&nbsp;c&nbsp;&nbsp;</b></span><br>
-<span class="p10"><b>&nbsp;&nbsp;a&nbsp;&nbsp;</b></span><br><span class="p10"><b>&nbsp;&nbsp;b&nbsp;&nbsp;</b></span><br><span class="p10"><b>&nbsp;&nbsp;c&nbsp;&nbsp;</b></span><br>
-<span class="p10x"><b>&nbsp;&nbsp;a&nbsp;&nbsp;</b></span><br><span class="p10x"><b>&nbsp;&nbsp;b&nbsp;&nbsp;</b></span><br><span class="p10x"><b>&nbsp;&nbsp;c&nbsp;&nbsp;</b></span><br>
-</td><td>
-<span class="so0"><b>&nbsp;&nbsp;a&nbsp;&nbsp;</b></span><br><span class="so0"><b>&nbsp;&nbsp;b&nbsp;&nbsp;</b></span><br><span class="so0"><b>&nbsp;&nbsp;c&nbsp;&nbsp;</b></span><br>
-<span class="so10"><b>&nbsp;&nbsp;a&nbsp;&nbsp;</b></span><br><span class="so10"><b>&nbsp;&nbsp;b&nbsp;&nbsp;</b></span><br><span class="so10"><b>&nbsp;&nbsp;c&nbsp;&nbsp;</b></span><br>
-<span class="so10x"><b>&nbsp;&nbsp;a&nbsp;&nbsp;</b></span><br><span class="so10x"><b>&nbsp;&nbsp;b&nbsp;&nbsp;</b></span><br><span class="so10x"><b>&nbsp;&nbsp;c&nbsp;&nbsp;</b></span><br>
-</td><td>
-<span class="sp0"><b>&nbsp;&nbsp;a&nbsp;&nbsp;</b></span><br><span class="sp0"><b>&nbsp;&nbsp;b&nbsp;&nbsp;</b></span><br><span class="sp0"><b>&nbsp;&nbsp;c&nbsp;&nbsp;</b></span><br>
-<span class="sp10"><b>&nbsp;&nbsp;a&nbsp;&nbsp;</b></span><br><span class="sp10"><b>&nbsp;&nbsp;b&nbsp;&nbsp;</b></span><br><span class="sp10"><b>&nbsp;&nbsp;c&nbsp;&nbsp;</b></span><br>
-<span class="sp10x"><b>&nbsp;&nbsp;a&nbsp;&nbsp;</b></span><br><span class="sp10x"><b>&nbsp;&nbsp;b&nbsp;&nbsp;</b></span><br><span class="sp10x"><b>&nbsp;&nbsp;c&nbsp;&nbsp;</b></span><br>
-</td></tr>
-</table>
-
-<div style="position:absolute; top:0px;left:0;">
-<!-- mask out 1px of outer edge of the rounded borders at some places due to rounding errors -->
-<table border=1 cellpadding=50 ><tr><td>
-<span class="m o0"><b>&nbsp;&nbsp;a&nbsp;&nbsp;</b></span><br><span class="m o0"><b>&nbsp;&nbsp;b&nbsp;&nbsp;</b></span><br><span class="m o0"><b>&nbsp;&nbsp;c&nbsp;&nbsp;</b></span><br>
-<span class="m o10"><b>&nbsp;&nbsp;a&nbsp;&nbsp;</b></span><br><span class="m o10"><b>&nbsp;&nbsp;b&nbsp;&nbsp;</b></span><br><span class="m o10"><b>&nbsp;&nbsp;c&nbsp;&nbsp;</b></span><br>
-<span class="m o10x"><b>&nbsp;&nbsp;a&nbsp;&nbsp;</b></span><br><span class="m o10x"><b>&nbsp;&nbsp;b&nbsp;&nbsp;</b></span><br><span class="m o10x"><b>&nbsp;&nbsp;c&nbsp;&nbsp;</b></span><br>
-</td><td>
-<span class="m p0"><b>&nbsp;&nbsp;a&nbsp;&nbsp;</b></span><br><span class="m p0"><b>&nbsp;&nbsp;b&nbsp;&nbsp;</b></span><br><span class="m p0"><b>&nbsp;&nbsp;c&nbsp;&nbsp;</b></span><br>
-<span class="m p10"><b>&nbsp;&nbsp;a&nbsp;&nbsp;</b></span><br><span class="m p10"><b>&nbsp;&nbsp;b&nbsp;&nbsp;</b></span><br><span class="m p10"><b>&nbsp;&nbsp;c&nbsp;&nbsp;</b></span><br>
-<span class="m p10x"><b>&nbsp;&nbsp;a&nbsp;&nbsp;</b></span><br><span class="m p10x"><b>&nbsp;&nbsp;b&nbsp;&nbsp;</b></span><br><span class="m p10x"><b>&nbsp;&nbsp;c&nbsp;&nbsp;</b></span><br>
-</td><td>
-<span class="m so0"><b>&nbsp;&nbsp;a&nbsp;&nbsp;</b></span><br><span class="m so0"><b>&nbsp;&nbsp;b&nbsp;&nbsp;</b></span><br><span class="m so0"><b>&nbsp;&nbsp;c&nbsp;&nbsp;</b></span><br>
-<span class="m so10"><b>&nbsp;&nbsp;a&nbsp;&nbsp;</b></span><br><span class="m so10"><b>&nbsp;&nbsp;b&nbsp;&nbsp;</b></span><br><span class="m so10"><b>&nbsp;&nbsp;c&nbsp;&nbsp;</b></span><br>
-<span class="m so10x"><b>&nbsp;&nbsp;a&nbsp;&nbsp;</b></span><br><span class="m so10x"><b>&nbsp;&nbsp;b&nbsp;&nbsp;</b></span><br><span class="m so10x"><b>&nbsp;&nbsp;c&nbsp;&nbsp;</b></span><br>
-</td><td>
-<span class="m sp0"><b>&nbsp;&nbsp;a&nbsp;&nbsp;</b></span><br><span class="m sp0"><b>&nbsp;&nbsp;b&nbsp;&nbsp;</b></span><br><span class="m sp0"><b>&nbsp;&nbsp;c&nbsp;&nbsp;</b></span><br>
-<span class="m sp10"><b>&nbsp;&nbsp;a&nbsp;&nbsp;</b></span><br><span class="m sp10"><b>&nbsp;&nbsp;b&nbsp;&nbsp;</b></span><br><span class="m sp10"><b>&nbsp;&nbsp;c&nbsp;&nbsp;</b></span><br>
-<span class="m sp10x"><b>&nbsp;&nbsp;a&nbsp;&nbsp;</b></span><br><span class="m sp10x"><b>&nbsp;&nbsp;b&nbsp;&nbsp;</b></span><br><span class="m sp10x"><b>&nbsp;&nbsp;c&nbsp;&nbsp;</b></span><br>
-</td></tr>
-</table>
-</div>
-
-</div>
-</body>
-
deleted file mode 100644
--- a/layout/reftests/css-break/box-decoration-break-with-outset-box-shadow-1.html
+++ /dev/null
@@ -1,133 +0,0 @@
-<!DOCTYPE HTML>
-<!--
-     Any copyright is dedicated to the Public Domain.
-     http://creativecommons.org/publicdomain/zero/1.0/
--->
-<html>
-<head>
-  <title>CSS Test: Testing box-decoration-break:clone with outset box-shadow</title>
-  <link rel="author" title="Mats Palmgren" href="https://bugzilla.mozilla.org/show_bug.cgi?id=613659">
-  <link rel="help" href="http://dev.w3.org/csswg/css-break/#break-decoration">
-  <link rel="match" href="box-decoration-break-with-outset-box-shadow-1-ref.html">
-  <meta charset="utf-8">
-<style>
-span { border:3px dashed pink; line-height:80px; box-decoration-break:clone; }
-
-span {
-  font-family:monospace;
-  padding:1em 1em;
-  background-image: url(green-circle-alpha-32x32.png);
-}
-.o0 {
-  border-radius: 12px;
-  -webkit-box-shadow: 0px 0px 0px 10px #00F;
-          box-shadow: 0px 0px 0px 10px #00F;
-}
-.o10 {
-  border-radius: 12px;
-  -webkit-box-shadow: 0px 0px 7px 10px #00F;
-          box-shadow: 0px 0px 7px 10px #00F;
-}
-.o10x {
-  border-radius: 12px;
-  -webkit-box-shadow: 0px 0px 7px 0px #00F;
-          box-shadow: 0px 0px 7px 0px #00F;
-}
-.p0 {
-  border-radius: 12px;
-  -webkit-box-shadow: 15px 9px 0px 10px #00F;
-          box-shadow: 15px 9px 0px 10px #00F;
-}
-.p10 {
-  border-radius: 12px;
-  -webkit-box-shadow: 15px 9px 7px 10px #00F;
-          box-shadow: 15px 9px 7px 10px #00F;
-}
-.p10x {
-  border-radius: 12px;
-  -webkit-box-shadow: 15px 9px 7px 0px #00F;
-          box-shadow: 15px 9px 7px 0px #00F;
-}
-.so0 {
-  border-radius: 0px;
-  -webkit-box-shadow: 0px 0px 0px 10px #00F;
-          box-shadow: 0px 0px 0px 10px #00F;
-}
-.so10 {
-  border-radius: 0px;
-  -webkit-box-shadow: 0px 0px 7px 10px #00F;
-          box-shadow: 0px 0px 7px 10px #00F;
-}
-.so10x {
-  border-radius: 0px;
-  -webkit-box-shadow: 0px 0px 7px 0px #00F;
-          box-shadow: 0px 0px 7px 0px #00F;
-}
-.sp0 {
-  border-radius: 0px;
-  -webkit-box-shadow: 15px 9px 0px 10px #00F;
-          box-shadow: 15px 9px 0px 10px #00F;
-}
-.sp10 {
-  border-radius: 0px;
-  -webkit-box-shadow: 15px 9px 7px 10px #00F;
-          box-shadow: 15px 9px 7px 10px #00F;
-}
-.sp10x {
-  border-radius: 0px;
-  -webkit-box-shadow: 15px 9px 7px 0px #00F;
-          box-shadow: 15px 9px 7px 0px #00F;
-}
-
-.m b { visibility:hidden; }
-.m { box-shadow:none; background:none; border-style:solid; border-radius:0; border-color:transparent; }
-.m.o0, .m.o10, .m.o10x, .m.p0, .m.p10, .m.p10x { border-bottom-color: black; }
-</style>
-</head>
-<body style="margin:49px 50px;">
-
-<div style="position:relative">
-<table border=1 cellpadding=50 ><tr><td>
-<span class="o0"><b>&nbsp;&nbsp;a&nbsp;&nbsp;<br>&nbsp;&nbsp;b&nbsp;&nbsp;<br>&nbsp;&nbsp;c&nbsp;&nbsp;</b></span><br>
-<span class="o10"><b>&nbsp;&nbsp;a&nbsp;&nbsp;<br>&nbsp;&nbsp;b&nbsp;&nbsp;<br>&nbsp;&nbsp;c&nbsp;&nbsp;</b></span><br>
-<span class="o10x"><b>&nbsp;&nbsp;a&nbsp;&nbsp;<br>&nbsp;&nbsp;b&nbsp;&nbsp;<br>&nbsp;&nbsp;c&nbsp;&nbsp;</b></span><br>
-</td><td>
-<span class="p0"><b>&nbsp;&nbsp;a&nbsp;&nbsp;<br>&nbsp;&nbsp;b&nbsp;&nbsp;<br>&nbsp;&nbsp;c&nbsp;&nbsp;</b></span><br>
-<span class="p10"><b>&nbsp;&nbsp;a&nbsp;&nbsp;<br>&nbsp;&nbsp;b&nbsp;&nbsp;<br>&nbsp;&nbsp;c&nbsp;&nbsp;</b></span><br>
-<span class="p10x"><b>&nbsp;&nbsp;a&nbsp;&nbsp;<br>&nbsp;&nbsp;b&nbsp;&nbsp;<br>&nbsp;&nbsp;c&nbsp;&nbsp;</b></span><br>
-</td><td>
-<span class="so0"><b>&nbsp;&nbsp;a&nbsp;&nbsp;<br>&nbsp;&nbsp;b&nbsp;&nbsp;<br>&nbsp;&nbsp;c&nbsp;&nbsp;</b></span><br>
-<span class="so10"><b>&nbsp;&nbsp;a&nbsp;&nbsp;<br>&nbsp;&nbsp;b&nbsp;&nbsp;<br>&nbsp;&nbsp;c&nbsp;&nbsp;</b></span><br>
-<span class="so10x"><b>&nbsp;&nbsp;a&nbsp;&nbsp;<br>&nbsp;&nbsp;b&nbsp;&nbsp;<br>&nbsp;&nbsp;c&nbsp;&nbsp;</b></span><br>
-</td><td>
-<span class="sp0"><b>&nbsp;&nbsp;a&nbsp;&nbsp;<br>&nbsp;&nbsp;b&nbsp;&nbsp;<br>&nbsp;&nbsp;c&nbsp;&nbsp;</b></span><br>
-<span class="sp10"><b>&nbsp;&nbsp;a&nbsp;&nbsp;<br>&nbsp;&nbsp;b&nbsp;&nbsp;<br>&nbsp;&nbsp;c&nbsp;&nbsp;</b></span><br>
-<span class="sp10x"><b>&nbsp;&nbsp;a&nbsp;&nbsp;<br>&nbsp;&nbsp;b&nbsp;&nbsp;<br>&nbsp;&nbsp;c&nbsp;&nbsp;</b></span><br>
-</td></tr>
-</table>
-
-<div style="position:absolute; top:0px;left:0;">
-<!-- mask out 1px of outer edge of the rounded borders at some places due to rounding errors -->
-<table border=1 cellpadding=50 ><tr><td>
-<span class="m o0"><b>&nbsp;&nbsp;a&nbsp;&nbsp;<br>&nbsp;&nbsp;b&nbsp;&nbsp;<br>&nbsp;&nbsp;c&nbsp;&nbsp;</b></span><br>
-<span class="m o10"><b>&nbsp;&nbsp;a&nbsp;&nbsp;<br>&nbsp;&nbsp;b&nbsp;&nbsp;<br>&nbsp;&nbsp;c&nbsp;&nbsp;</b></span><br>
-<span class="m o10x"><b>&nbsp;&nbsp;a&nbsp;&nbsp;<br>&nbsp;&nbsp;b&nbsp;&nbsp;<br>&nbsp;&nbsp;c&nbsp;&nbsp;</b></span><br>
-</td><td>
-<span class="m p0"><b>&nbsp;&nbsp;a&nbsp;&nbsp;<br>&nbsp;&nbsp;b&nbsp;&nbsp;<br>&nbsp;&nbsp;c&nbsp;&nbsp;</b></span><br>
-<span class="m p10"><b>&nbsp;&nbsp;a&nbsp;&nbsp;<br>&nbsp;&nbsp;b&nbsp;&nbsp;<br>&nbsp;&nbsp;c&nbsp;&nbsp;</b></span><br>
-<span class="m p10x"><b>&nbsp;&nbsp;a&nbsp;&nbsp;<br>&nbsp;&nbsp;b&nbsp;&nbsp;<br>&nbsp;&nbsp;c&nbsp;&nbsp;</b></span><br>
-</td><td>
-<span class="m so0"><b>&nbsp;&nbsp;a&nbsp;&nbsp;<br>&nbsp;&nbsp;b&nbsp;&nbsp;<br>&nbsp;&nbsp;c&nbsp;&nbsp;</b></span><br>
-<span class="m so10"><b>&nbsp;&nbsp;a&nbsp;&nbsp;<br>&nbsp;&nbsp;b&nbsp;&nbsp;<br>&nbsp;&nbsp;c&nbsp;&nbsp;</b></span><br>
-<span class="m so10x"><b>&nbsp;&nbsp;a&nbsp;&nbsp;<br>&nbsp;&nbsp;b&nbsp;&nbsp;<br>&nbsp;&nbsp;c&nbsp;&nbsp;</b></span><br>
-</td><td>
-<span class="m sp0"><b>&nbsp;&nbsp;a&nbsp;&nbsp;<br>&nbsp;&nbsp;b&nbsp;&nbsp;<br>&nbsp;&nbsp;c&nbsp;&nbsp;</b></span><br>
-<span class="m sp10"><b>&nbsp;&nbsp;a&nbsp;&nbsp;<br>&nbsp;&nbsp;b&nbsp;&nbsp;<br>&nbsp;&nbsp;c&nbsp;&nbsp;</b></span><br>
-<span class="m sp10x"><b>&nbsp;&nbsp;a&nbsp;&nbsp;<br>&nbsp;&nbsp;b&nbsp;&nbsp;<br>&nbsp;&nbsp;c&nbsp;&nbsp;</b></span><br>
-</td></tr>
-</table>
-</div>
-
-</div>
-</body>
-
deleted file mode 100644
index a007675a176123cab7291d684537dde8961ecec7..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
--- a/layout/reftests/css-break/reftest.list
+++ /dev/null
@@ -1,4 +0,0 @@
-pref(layout.css.box-decoration-break.enabled,true) == box-decoration-break-1.html box-decoration-break-1-ref.html
-
-fuzzy(1,20) pref(layout.css.box-decoration-break.enabled,true) == box-decoration-break-with-inset-box-shadow-1.html box-decoration-break-with-inset-box-shadow-1-ref.html
-fuzzy(16,460) pref(layout.css.box-decoration-break.enabled,true) == box-decoration-break-with-outset-box-shadow-1.html box-decoration-break-with-outset-box-shadow-1-ref.html
--- a/layout/reftests/reftest.list
+++ b/layout/reftests/reftest.list
@@ -51,19 +51,16 @@ include bugs/reftest.list
 include canvas/reftest.list
 
 # css animations
 include css-animations/reftest.list
 
 # blending/
 include css-blending/reftest.list
 
-# Tests for the css-break spec
-include css-break/reftest.list
-
 # css calc() tests
 include css-calc/reftest.list
 
 # css character encoding tests
 include css-charset/reftest.list
 
 # css default pseudo class tests
 include css-default/reftest.list
--- a/layout/style/nsCSSKeywordList.h
+++ b/layout/style/nsCSSKeywordList.h
@@ -183,16 +183,17 @@ CSS_KEY(bold-fraktur, bold_fraktur)
 CSS_KEY(bold-italic, bold_italic)
 CSS_KEY(bold-sans-serif, bold_sans_serif)
 CSS_KEY(bold-script, bold_script)
 CSS_KEY(bolder, bolder)
 CSS_KEY(border-box, border_box)
 CSS_KEY(both, both)
 CSS_KEY(bottom, bottom)
 CSS_KEY(bottom-outside, bottom_outside)
+CSS_KEY(bounding-box, bounding_box)
 CSS_KEY(break-all, break_all)
 CSS_KEY(break-word, break_word)
 CSS_KEY(brightness, brightness)
 CSS_KEY(button, button)
 CSS_KEY(buttonface, buttonface)
 CSS_KEY(buttonhighlight, buttonhighlight)
 CSS_KEY(buttonshadow, buttonshadow)
 CSS_KEY(buttontext, buttontext)
@@ -202,17 +203,16 @@ CSS_KEY(captiontext, captiontext)
 CSS_KEY(cell, cell)
 CSS_KEY(center, center)
 CSS_KEY(ch, ch)
 CSS_KEY(character-variant, character_variant)
 CSS_KEY(circle, circle)
 CSS_KEY(cjk-decimal, cjk_decimal)
 CSS_KEY(cjk-ideographic, cjk_ideographic)
 CSS_KEY(clip, clip)
-CSS_KEY(clone, clone)
 CSS_KEY(close-quote, close_quote)
 CSS_KEY(closest-corner, closest_corner)
 CSS_KEY(closest-side, closest_side)
 CSS_KEY(cm, cm)
 CSS_KEY(col-resize, col_resize)
 CSS_KEY(collapse, collapse)
 CSS_KEY(color, color)
 CSS_KEY(color-burn, color_burn)
@@ -252,16 +252,17 @@ CSS_KEY(digits, digits)
 CSS_KEY(disabled, disabled)
 CSS_KEY(disc, disc)
 CSS_KEY(discretionary-ligatures, discretionary_ligatures)
 CSS_KEY(dotted, dotted)
 CSS_KEY(double, double)
 CSS_KEY(double-struck, double_struck)
 CSS_KEY(drop-shadow, drop_shadow)
 CSS_KEY(e-resize, e_resize)
+CSS_KEY(each-box, each_box)
 CSS_KEY(ease, ease)
 CSS_KEY(ease-in, ease_in)
 CSS_KEY(ease-in-out, ease_in_out)
 CSS_KEY(ease-out, ease_out)
 CSS_KEY(element, element)
 CSS_KEY(elements, elements)
 CSS_KEY(ellipse, ellipse)
 CSS_KEY(ellipsis, ellipsis)
@@ -490,17 +491,16 @@ CSS_KEY(show, show)
 CSS_KEY(sideways, sideways)
 CSS_KEY(simp-chinese-formal, simp_chinese_formal)
 CSS_KEY(simp-chinese-informal, simp_chinese_informal)
 CSS_KEY(simplified, simplified)
 CSS_KEY(skew, skew)
 CSS_KEY(skewx, skewx)
 CSS_KEY(skewy, skewy)
 CSS_KEY(slashed-zero, slashed_zero)
-CSS_KEY(slice, slice)
 CSS_KEY(small, small)
 CSS_KEY(small-caps, small_caps)
 CSS_KEY(small-caption, small_caption)
 CSS_KEY(smaller, smaller)
 CSS_KEY(soft, soft)
 CSS_KEY(soft-light, soft_light)
 CSS_KEY(solid, solid)
 CSS_KEY(space-around, space_around)
--- a/layout/style/nsCSSPropList.h
+++ b/layout/style/nsCSSPropList.h
@@ -269,16 +269,20 @@
 // :first-letter are: font properties, 'text-decoration',
 // 'text-transform', 'letter-spacing', 'word-spacing' (when
 // appropriate), 'line-height', 'float', 'vertical-align' (only if
 // 'float' is 'none'), margin properties, padding properties, border
 // properties, 'color', and background properties.  We also allow
 // 'text-shadow' (see above) and 'box-shadow' (which is like the
 // border properties).
 
+// We include '-moz-background-inline-policy' (css3-background's
+// 'background-break') in both as a background property, although this
+// is somewhat questionable.
+
 CSS_PROP_DISPLAY(
     -moz-appearance,
     appearance,
     CSS_PROP_DOMPROP_PREFIXED(Appearance),
     CSS_PROPERTY_PARSE_VALUE,
     "",
     VARIANT_HK,
     kAppearanceKTable,
@@ -529,16 +533,28 @@ CSS_PROP_BACKGROUND(
         CSS_PROPERTY_IGNORED_WHEN_COLORS_DISABLED |
         CSS_PROPERTY_START_IMAGE_LOADS,
     "",
     VARIANT_IMAGE, // used by list parsing
     nullptr,
     CSS_PROP_NO_OFFSET,
     eStyleAnimType_None)
 CSS_PROP_BACKGROUND(
+    -moz-background-inline-policy,
+    _moz_background_inline_policy,
+    CSS_PROP_DOMPROP_PREFIXED(BackgroundInlinePolicy),
+    CSS_PROPERTY_PARSE_VALUE |
+        CSS_PROPERTY_APPLIES_TO_FIRST_LETTER_AND_FIRST_LINE |
+        CSS_PROPERTY_APPLIES_TO_PLACEHOLDER,
+    "",
+    VARIANT_HK,
+    kBackgroundInlinePolicyKTable,
+    CSS_PROP_NO_OFFSET,
+    eStyleAnimType_None)
+CSS_PROP_BACKGROUND(
     background-blend-mode,
     background_blend_mode,
     BackgroundBlendMode,
     CSS_PROPERTY_PARSE_VALUE_LIST |
         CSS_PROPERTY_APPLIES_TO_FIRST_LETTER_AND_FIRST_LINE |
         CSS_PROPERTY_APPLIES_TO_PLACEHOLDER |
         CSS_PROPERTY_VALUE_LIST_USES_COMMAS,
     "layout.css.background-blend-mode.enabled",
@@ -1345,26 +1361,16 @@ CSS_PROP_POSITION(
         CSS_PROPERTY_UNITLESS_LENGTH_QUIRK |
         CSS_PROPERTY_GETCS_NEEDS_LAYOUT_FLUSH,
     "",
     VARIANT_AHLP | VARIANT_CALC,
     nullptr,
     offsetof(nsStylePosition, mOffset),
     eStyleAnimType_Sides_Bottom)
 CSS_PROP_BORDER(
-    box-decoration-break,
-    box_decoration_break,
-    BoxDecorationBreak,
-    CSS_PROPERTY_PARSE_VALUE,
-    "layout.css.box-decoration-break.enabled",
-    VARIANT_HK,
-    kBoxDecorationBreakKTable,
-    CSS_PROP_NO_OFFSET,
-    eStyleAnimType_None)
-CSS_PROP_BORDER(
     box-shadow,
     box_shadow,
     BoxShadow,
     CSS_PROPERTY_PARSE_FUNCTION |
         CSS_PROPERTY_APPLIES_TO_FIRST_LETTER |
         CSS_PROPERTY_VALUE_LIST_USES_COMMAS |
         CSS_PROPERTY_IGNORED_WHEN_COLORS_DISABLED,
         // NOTE: some components must be nonnegative
--- a/layout/style/nsCSSProps.cpp
+++ b/layout/style/nsCSSProps.cpp
@@ -671,16 +671,23 @@ const KTableValue nsCSSProps::kTransform
 
 const KTableValue nsCSSProps::kBackgroundAttachmentKTable[] = {
   eCSSKeyword_fixed, NS_STYLE_BG_ATTACHMENT_FIXED,
   eCSSKeyword_scroll, NS_STYLE_BG_ATTACHMENT_SCROLL,
   eCSSKeyword_local, NS_STYLE_BG_ATTACHMENT_LOCAL,
   eCSSKeyword_UNKNOWN,-1
 };
 
+const KTableValue nsCSSProps::kBackgroundInlinePolicyKTable[] = {
+  eCSSKeyword_each_box,     NS_STYLE_BG_INLINE_POLICY_EACH_BOX,
+  eCSSKeyword_continuous,   NS_STYLE_BG_INLINE_POLICY_CONTINUOUS,
+  eCSSKeyword_bounding_box, NS_STYLE_BG_INLINE_POLICY_BOUNDING_BOX,
+  eCSSKeyword_UNKNOWN,-1
+};
+
 static_assert(NS_STYLE_BG_CLIP_BORDER == NS_STYLE_BG_ORIGIN_BORDER &&
               NS_STYLE_BG_CLIP_PADDING == NS_STYLE_BG_ORIGIN_PADDING &&
               NS_STYLE_BG_CLIP_CONTENT == NS_STYLE_BG_ORIGIN_CONTENT,
               "bg-clip and bg-origin style constants must agree");
 const KTableValue nsCSSProps::kBackgroundOriginKTable[] = {
   eCSSKeyword_border_box, NS_STYLE_BG_ORIGIN_BORDER,
   eCSSKeyword_padding_box, NS_STYLE_BG_ORIGIN_PADDING,
   eCSSKeyword_content_box, NS_STYLE_BG_ORIGIN_CONTENT,
@@ -784,22 +791,16 @@ const KTableValue nsCSSProps::kBorderWid
 };
 
 const KTableValue nsCSSProps::kBoxPropSourceKTable[] = {
   eCSSKeyword_physical,     NS_BOXPROP_SOURCE_PHYSICAL,
   eCSSKeyword_logical,      NS_BOXPROP_SOURCE_LOGICAL,
   eCSSKeyword_UNKNOWN,-1
 };
 
-const KTableValue nsCSSProps::kBoxDecorationBreakKTable[] = {
-  eCSSKeyword_slice, NS_STYLE_BOX_DECORATION_BREAK_SLICE,
-  eCSSKeyword_clone, NS_STYLE_BOX_DECORATION_BREAK_CLONE,
-  eCSSKeyword_UNKNOWN,-1
-};
-
 const KTableValue nsCSSProps::kBoxShadowTypeKTable[] = {
   eCSSKeyword_inset, NS_STYLE_BOX_SHADOW_INSET,
   eCSSKeyword_UNKNOWN,-1
 };
 
 const KTableValue nsCSSProps::kBoxSizingKTable[] = {
   eCSSKeyword_content_box,  NS_STYLE_BOX_SIZING_CONTENT,
   eCSSKeyword_border_box,   NS_STYLE_BOX_SIZING_BORDER,
--- a/layout/style/nsCSSProps.h
+++ b/layout/style/nsCSSProps.h
@@ -501,30 +501,30 @@ public:
   static const KTableValue kAnimationIterationCountKTable[];
   static const KTableValue kAnimationPlayStateKTable[];
   static const KTableValue kAnimationTimingFunctionKTable[];
   static const KTableValue kAppearanceKTable[];
   static const KTableValue kAzimuthKTable[];
   static const KTableValue kBackfaceVisibilityKTable[];
   static const KTableValue kTransformStyleKTable[];
   static const KTableValue kBackgroundAttachmentKTable[];
+  static const KTableValue kBackgroundInlinePolicyKTable[];
   static const KTableValue kBackgroundOriginKTable[];
   static const KTableValue kBackgroundPositionKTable[];
   static const KTableValue kBackgroundRepeatKTable[];
   static const KTableValue kBackgroundRepeatPartKTable[];
   static const KTableValue kBackgroundSizeKTable[];
   static const KTableValue kBlendModeKTable[];
   static const KTableValue kBorderCollapseKTable[];
   static const KTableValue kBorderColorKTable[];
   static const KTableValue kBorderImageRepeatKTable[];
   static const KTableValue kBorderImageSliceKTable[];
   static const KTableValue kBorderStyleKTable[];
   static const KTableValue kBorderWidthKTable[];
   static const KTableValue kBoxAlignKTable[];
-  static const KTableValue kBoxDecorationBreakKTable[];
   static const KTableValue kBoxDirectionKTable[];
   static const KTableValue kBoxOrientKTable[];
   static const KTableValue kBoxPackKTable[];
   static const KTableValue kDominantBaselineKTable[];
   static const KTableValue kFillRuleKTable[];
   static const KTableValue kFilterFunctionKTable[];
   static const KTableValue kImageRenderingKTable[];
   static const KTableValue kShapeRenderingKTable[];
--- a/layout/style/nsComputedDOMStyle.cpp
+++ b/layout/style/nsComputedDOMStyle.cpp
@@ -2069,16 +2069,26 @@ nsComputedDOMStyle::DoGetBackgroundImage
     const nsStyleImage& image = bg->mLayers[i].mImage;
     SetValueToStyleImage(image, val);
   }
 
   return valueList;
 }
 
 CSSValue*
+nsComputedDOMStyle::DoGetBackgroundInlinePolicy()
+{
+  nsROCSSPrimitiveValue *val = new nsROCSSPrimitiveValue;
+  val->SetIdent(nsCSSProps::ValueToKeywordEnum(
+                  StyleBackground()->mBackgroundInlinePolicy,
+                  nsCSSProps::kBackgroundInlinePolicyKTable));
+  return val;
+}
+
+CSSValue*
 nsComputedDOMStyle::DoGetBackgroundBlendMode()
 {
   return GetBackgroundList(&nsStyleBackground::Layer::mBlendMode,
                            &nsStyleBackground::mBlendModeCount,
                            nsCSSProps::kBlendModeKTable);
 }
 
 CSSValue*
@@ -2966,26 +2976,16 @@ nsComputedDOMStyle::GetCSSShadowArray(ns
                                        nsCSSProps::kBoxShadowTypeKTable));
     }
   }
 
   return valueList;
 }
 
 CSSValue*
-nsComputedDOMStyle::DoGetBoxDecorationBreak()
-{
-  nsROCSSPrimitiveValue* val = new nsROCSSPrimitiveValue;
-  val->SetIdent(
-    nsCSSProps::ValueToKeywordEnum(StyleBorder()->mBoxDecorationBreak,
-                                   nsCSSProps::kBoxDecorationBreakKTable));
-  return val;
-}
-
-CSSValue*
 nsComputedDOMStyle::DoGetBoxShadow()
 {
   return GetCSSShadowArray(StyleBorder()->mBoxShadow,
                            StyleColor()->mColor,
                            true);
 }
 
 CSSValue*
--- a/layout/style/nsComputedDOMStyle.h
+++ b/layout/style/nsComputedDOMStyle.h
@@ -217,17 +217,16 @@ private:
    * To avoid a name conflict with nsIDOM*CSS2Properties, these are all
    * DoGetXXX instead of GetXXX.
    */
 
   mozilla::dom::CSSValue* DoGetAppearance();
 
   /* Box properties */
   mozilla::dom::CSSValue* DoGetBoxAlign();
-  mozilla::dom::CSSValue* DoGetBoxDecorationBreak();
   mozilla::dom::CSSValue* DoGetBoxDirection();
   mozilla::dom::CSSValue* DoGetBoxFlex();
   mozilla::dom::CSSValue* DoGetBoxOrdinalGroup();
   mozilla::dom::CSSValue* DoGetBoxOrient();
   mozilla::dom::CSSValue* DoGetBoxPack();
   mozilla::dom::CSSValue* DoGetBoxSizing();
 
   mozilla::dom::CSSValue* DoGetWidth();
@@ -279,16 +278,17 @@ private:
 
   /* Background properties */
   mozilla::dom::CSSValue* DoGetBackgroundAttachment();
   mozilla::dom::CSSValue* DoGetBackgroundColor();
   mozilla::dom::CSSValue* DoGetBackgroundImage();
   mozilla::dom::CSSValue* DoGetBackgroundPosition();
   mozilla::dom::CSSValue* DoGetBackgroundRepeat();
   mozilla::dom::CSSValue* DoGetBackgroundClip();
+  mozilla::dom::CSSValue* DoGetBackgroundInlinePolicy();
   mozilla::dom::CSSValue* DoGetBackgroundBlendMode();
   mozilla::dom::CSSValue* DoGetBackgroundOrigin();
   mozilla::dom::CSSValue* DoGetBackgroundSize();
 
   /* Padding properties */
   mozilla::dom::CSSValue* DoGetPaddingTop();
   mozilla::dom::CSSValue* DoGetPaddingBottom();
   mozilla::dom::CSSValue* DoGetPaddingLeft();
--- a/layout/style/nsComputedDOMStylePropertyList.h
+++ b/layout/style/nsComputedDOMStylePropertyList.h
@@ -225,16 +225,17 @@ COMPUTED_STYLE_PROP(word_wrap,          
 COMPUTED_STYLE_PROP(writing_mode,                  WritingMode)
 COMPUTED_STYLE_PROP(z_index,                       ZIndex)
 
 /* ******************************* *\
  * Implementations of -moz- styles *
 \* ******************************* */
 
 COMPUTED_STYLE_PROP(appearance,                    Appearance)
+COMPUTED_STYLE_PROP(_moz_background_inline_policy, BackgroundInlinePolicy)
 COMPUTED_STYLE_PROP(binding,                       Binding)
 COMPUTED_STYLE_PROP(border_bottom_colors,          BorderBottomColors)
 COMPUTED_STYLE_PROP(border_left_colors,            BorderLeftColors)
 COMPUTED_STYLE_PROP(border_right_colors,           BorderRightColors)
 COMPUTED_STYLE_PROP(border_top_colors,             BorderTopColors)
 COMPUTED_STYLE_PROP(box_align,                     BoxAlign)
 COMPUTED_STYLE_PROP(box_direction,                 BoxDirection)
 COMPUTED_STYLE_PROP(box_flex,                      BoxFlex)
--- a/layout/style/nsRuleNode.cpp
+++ b/layout/style/nsRuleNode.cpp
@@ -6234,16 +6234,24 @@ nsRuleNode::ComputeBackgroundData(void* 
 
   // background-clip: enum, inherit, initial [list]
   SetBackgroundList(aContext, *aRuleData->ValueForBackgroundClip(),
                     bg->mLayers,
                     parentBG->mLayers, &nsStyleBackground::Layer::mClip,
                     uint8_t(NS_STYLE_BG_CLIP_BORDER), parentBG->mClipCount,
                     bg->mClipCount, maxItemCount, rebuild, canStoreInRuleTree);
 
+  // background-inline-policy: enum, inherit, initial
+  SetDiscrete(*aRuleData->ValueForBackgroundInlinePolicy(),
+              bg->mBackgroundInlinePolicy,
+              canStoreInRuleTree,
+              SETDSC_ENUMERATED | SETDSC_UNSET_INITIAL,
+              parentBG->mBackgroundInlinePolicy,
+              NS_STYLE_BG_INLINE_POLICY_CONTINUOUS, 0, 0, 0, 0);
+
   // background-blend-mode: enum, inherit, initial [list]
   SetBackgroundList(aContext, *aRuleData->ValueForBackgroundBlendMode(),
                     bg->mLayers,
                     parentBG->mLayers, &nsStyleBackground::Layer::mBlendMode,
                     uint8_t(NS_STYLE_BLEND_NORMAL), parentBG->mBlendModeCount,
                     bg->mBlendModeCount, maxItemCount, rebuild,
                     canStoreInRuleTree);
 
@@ -6432,23 +6440,16 @@ nsRuleNode::ComputeBorderData(void* aSta
                               const nsRuleData* aRuleData,
                               nsStyleContext* aContext,
                               nsRuleNode* aHighestNode,
                               const RuleDetail aRuleDetail,
                               const bool aCanStoreInRuleTree)
 {
   COMPUTE_START_RESET(Border, (mPresContext), border, parentBorder)
 
-  // box-decoration-break: enum, inherit, initial
-  SetDiscrete(*aRuleData->ValueForBoxDecorationBreak(),
-              border->mBoxDecorationBreak, canStoreInRuleTree,
-              SETDSC_ENUMERATED | SETDSC_UNSET_INITIAL,
-              parentBorder->mBoxDecorationBreak,
-              NS_STYLE_BOX_DECORATION_BREAK_SLICE, 0, 0, 0, 0);
-
   // box-shadow: none, list, inherit, initial
   const nsCSSValue* boxShadowValue = aRuleData->ValueForBoxShadow();
   switch (boxShadowValue->GetUnit()) {
   case eCSSUnit_Null:
     break;
 
   case eCSSUnit_Initial:
   case eCSSUnit_Unset:
--- a/layout/style/nsStyleConsts.h
+++ b/layout/style/nsStyleConsts.h
@@ -112,20 +112,16 @@ static inline mozilla::css::Side operato
 #define NS_STYLE_BOX_ALIGN_END         4
 
 // box-pack
 #define NS_STYLE_BOX_PACK_START        0
 #define NS_STYLE_BOX_PACK_CENTER       1
 #define NS_STYLE_BOX_PACK_END          2
 #define NS_STYLE_BOX_PACK_JUSTIFY      3
 
-// box-decoration-break
-#define NS_STYLE_BOX_DECORATION_BREAK_SLICE  0
-#define NS_STYLE_BOX_DECORATION_BREAK_CLONE  1
-
 // box-direction
 #define NS_STYLE_BOX_DIRECTION_NORMAL    0
 #define NS_STYLE_BOX_DIRECTION_REVERSE   1
 
 // box-orient
 #define NS_STYLE_BOX_ORIENT_HORIZONTAL 0
 #define NS_STYLE_BOX_ORIENT_VERTICAL   1
 
--- a/layout/style/nsStyleStruct.cpp
+++ b/layout/style/nsStyleStruct.cpp
@@ -383,17 +383,16 @@ nsChangeHint nsStylePadding::CalcDiffere
 
 nsStyleBorder::nsStyleBorder(nsPresContext* aPresContext)
   : mBorderColors(nullptr),
     mBoxShadow(nullptr),
     mBorderImageFill(NS_STYLE_BORDER_IMAGE_SLICE_NOFILL),
     mBorderImageRepeatH(NS_STYLE_BORDER_IMAGE_REPEAT_STRETCH),
     mBorderImageRepeatV(NS_STYLE_BORDER_IMAGE_REPEAT_STRETCH),
     mFloatEdge(NS_STYLE_FLOAT_EDGE_CONTENT),
-    mBoxDecorationBreak(NS_STYLE_BOX_DECORATION_BREAK_SLICE),
     mComputedBorder(0, 0, 0, 0)
 {
   MOZ_COUNT_CTOR(nsStyleBorder);
 
   NS_FOR_CSS_HALF_CORNERS (corner) {
     mBorderRadius.Set(corner, nsStyleCoord(0, nsStyleCoord::CoordConstructor));
   }
 
@@ -435,17 +434,16 @@ nsStyleBorder::nsStyleBorder(const nsSty
     mBorderImageSource(aSrc.mBorderImageSource),
     mBorderImageSlice(aSrc.mBorderImageSlice),
     mBorderImageWidth(aSrc.mBorderImageWidth),
     mBorderImageOutset(aSrc.mBorderImageOutset),
     mBorderImageFill(aSrc.mBorderImageFill),
     mBorderImageRepeatH(aSrc.mBorderImageRepeatH),
     mBorderImageRepeatV(aSrc.mBorderImageRepeatV),
     mFloatEdge(aSrc.mFloatEdge),
-    mBoxDecorationBreak(aSrc.mBoxDecorationBreak),
     mComputedBorder(aSrc.mComputedBorder),
     mBorder(aSrc.mBorder),
     mTwipsPerPixel(aSrc.mTwipsPerPixel)
 {
   MOZ_COUNT_CTOR(nsStyleBorder);
   if (aSrc.mBorderColors) {
     EnsureBorderColors();
     for (int32_t i = 0; i < 4; i++)
@@ -525,18 +523,17 @@ nsChangeHint nsStyleBorder::CalcDifferen
   // Note that differences in mBorder don't affect rendering (which should only
   // use mComputedBorder), so don't need to be tested for here.
   // XXXbz we should be able to return a more specific change hint for
   // at least GetComputedBorder() differences...
   if (mTwipsPerPixel != aOther.mTwipsPerPixel ||
       GetComputedBorder() != aOther.GetComputedBorder() ||
       mFloatEdge != aOther.mFloatEdge ||
       mBorderImageOutset != aOther.mBorderImageOutset ||
-      (shadowDifference & nsChangeHint_NeedReflow) ||
-      mBoxDecorationBreak != aOther.mBoxDecorationBreak)
+      (shadowDifference & nsChangeHint_NeedReflow))
     return NS_STYLE_HINT_REFLOW;
 
   NS_FOR_CSS_SIDES(ix) {
     // See the explanation in nsChangeHint.h of
     // nsChangeHint_BorderStyleNoneChange .
     // Furthermore, even though we know *this* side is 0 width, just
     // assume a visual hint for some other change rather than bother
     // tracking this result through the rest of the function.
@@ -1966,16 +1963,17 @@ nsStyleBackground::nsStyleBackground()
   , mClipCount(1)
   , mOriginCount(1)
   , mRepeatCount(1)
   , mPositionCount(1)
   , mImageCount(1)
   , mSizeCount(1)
   , mBlendModeCount(1)
   , mBackgroundColor(NS_RGBA(0, 0, 0, 0))
+  , mBackgroundInlinePolicy(NS_STYLE_BG_INLINE_POLICY_CONTINUOUS)
 {
   MOZ_COUNT_CTOR(nsStyleBackground);
   Layer *onlyLayer = mLayers.AppendElement();
   NS_ASSERTION(onlyLayer, "auto array must have room for 1 element");
   onlyLayer->SetInitialValues();
 }
 
 nsStyleBackground::nsStyleBackground(const nsStyleBackground& aSource)
@@ -1984,16 +1982,17 @@ nsStyleBackground::nsStyleBackground(con
   , mOriginCount(aSource.mOriginCount)
   , mRepeatCount(aSource.mRepeatCount)
   , mPositionCount(aSource.mPositionCount)
   , mImageCount(aSource.mImageCount)
   , mSizeCount(aSource.mSizeCount)
   , mBlendModeCount(aSource.mBlendModeCount)
   , mLayers(aSource.mLayers) // deep copy
   , mBackgroundColor(aSource.mBackgroundColor)
+  , mBackgroundInlinePolicy(aSource.mBackgroundInlinePolicy)
 {
   MOZ_COUNT_CTOR(nsStyleBackground);
   // If the deep copy of mLayers failed, truncate the counts.
   uint32_t count = mLayers.Length();
   if (count != aSource.mLayers.Length()) {
     NS_WARNING("truncating counts due to out-of-memory");
     mAttachmentCount = std::max(mAttachmentCount, count);
     mClipCount = std::max(mClipCount, count);
@@ -2041,17 +2040,19 @@ nsChangeHint nsStyleBackground::CalcDiff
       }
     } else {
       if (moreLayers->mLayers[i].mImage.GetType() == eStyleImageType_Element)
         return NS_CombineHint(nsChangeHint_UpdateEffects, NS_STYLE_HINT_VISUAL);
       hasVisualDifference = true;
     }
   }
 
-  if (hasVisualDifference || mBackgroundColor != aOther.mBackgroundColor)
+  if (hasVisualDifference ||
+      mBackgroundColor != aOther.mBackgroundColor ||
+      mBackgroundInlinePolicy != aOther.mBackgroundInlinePolicy)
     return NS_STYLE_HINT_VISUAL;
 
   return NS_STYLE_HINT_NONE;
 }
 
 bool nsStyleBackground::HasFixedBackground() const
 {
   NS_FOR_VISIBLE_BACKGROUND_LAYERS_BACK_TO_FRONT(i, this) {
--- a/layout/style/nsStyleStruct.h
+++ b/layout/style/nsStyleStruct.h
@@ -534,16 +534,21 @@ struct nsStyleBackground {
     for (uint32_t var_ = (stylebg_) ? (stylebg_)->mImageCount : 1; var_-- != 0; )
   #define NS_FOR_VISIBLE_BACKGROUND_LAYERS_BACK_TO_FRONT_WITH_RANGE(var_, stylebg_, start_, count_) \
     NS_ASSERTION((int32_t)(start_) >= 0 && (uint32_t)(start_) < ((stylebg_) ? (stylebg_)->mImageCount : 1), "Invalid layer start!"); \
     NS_ASSERTION((count_) > 0 && (count_) <= (start_) + 1, "Invalid layer range!"); \
     for (uint32_t var_ = (start_) + 1; var_-- != (uint32_t)((start_) + 1 - (count_)); )
 
   nscolor mBackgroundColor;       // [reset]
 
+  // FIXME: This (now background-break in css3-background) should
+  // probably move into a different struct so that everything in
+  // nsStyleBackground is set by the background shorthand.
+  uint8_t mBackgroundInlinePolicy; // [reset] See nsStyleConsts.h
+
   // True if this background is completely transparent.
   bool IsTransparent() const;
 
   // We have to take slower codepaths for fixed background attachment,
   // but we don't want to do that when there's no image.
   // Not inline because it uses an nsCOMPtr<imgIRequest>
   // FIXME: Should be in nsStyleStructInlines.h.
   bool HasFixedBackground() const;
@@ -976,17 +981,16 @@ public:
   nsStyleSides   mBorderImageSlice;   // [reset] factor, percent
   nsStyleSides   mBorderImageWidth;   // [reset] length, factor, percent, auto
   nsStyleSides   mBorderImageOutset;  // [reset] length, factor
 
   uint8_t        mBorderImageFill;    // [reset]
   uint8_t        mBorderImageRepeatH; // [reset] see nsStyleConsts.h
   uint8_t        mBorderImageRepeatV; // [reset]
   uint8_t        mFloatEdge;          // [reset]
-  uint8_t        mBoxDecorationBreak; // [reset] see nsStyleConsts.h
 
 protected:
   // mComputedBorder holds the CSS2.1 computed border-width values.
   // In particular, these widths take into account the border-style
   // for the relevant side, and the values are rounded to the nearest
   // device pixel (which is not part of the definition of computed
   // values). The presence or absence of a border-image does not
   // affect border-width values.
--- a/layout/style/test/property_database.js
+++ b/layout/style/test/property_database.js
@@ -1,5398 +1,5395 @@
-/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* vim: set ts=2 sw=2 sts=2 et: */
+/* -*- Mode: Java; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
+/* vim: set shiftwidth=4 tabstop=4 autoindent cindent noexpandtab: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 // True longhand properties.
 const CSS_TYPE_LONGHAND = 0;
 
 // True shorthand properties.
 const CSS_TYPE_TRUE_SHORTHAND = 1;
 
 // Properties that we handle as shorthands but were longhands either in
 // the current spec or earlier versions of the spec.
 const CSS_TYPE_SHORTHAND_AND_LONGHAND = 2;
 
 // Each property has the following fields:
-//   domProp: The name of the relevant member of nsIDOM[NS]CSS2Properties
-//   inherited: Whether the property is inherited by default (stated as
-//     yes or no in the property header in all CSS specs)
-//   type: see above
-//   alias_for: optional, indicates that the property is an alias for
-//     some other property that is the preferred serialization.  (Type
-//     must not be CSS_TYPE_LONGHAND.)
-//   get_computed: if present, the property's computed value shows up on
-//     another property, and this is a function used to get it
-//   initial_values: Values whose computed value should be the same as the
-//     computed value for the property's initial value.
-//   other_values: Values whose computed value should be different from the
-//     computed value for the property's initial value.
-//   XXX Should have a third field for values whose computed value may or
-//     may not be the same as for the property's initial value.
-//   invalid_values: Things that are not values for the property and
-//     should be rejected, but which are balanced and should not absorb
-//     what follows
-//   quirks_values: Values that should be accepted in quirks mode only,
-//     mapped to the values they are equivalent to.
-//   unbalanced_values: Things that are not values for the property and
-//     should be rejected, and which also contain unbalanced constructs
-//     that should absorb what follows
+//	 domProp: The name of the relevant member of nsIDOM[NS]CSS2Properties
+//	 inherited: Whether the property is inherited by default (stated as
+//	   yes or no in the property header in all CSS specs)
+//	 type: see above
+//	 alias_for: optional, indicates that the property is an alias for
+//	   some other property that is the preferred serialization.  (Type
+//	   must not be CSS_TYPE_LONGHAND.)
+//	 get_computed: if present, the property's computed value shows up on
+//	   another property, and this is a function used to get it
+//	 initial_values: Values whose computed value should be the same as the
+//	   computed value for the property's initial value.
+//	 other_values: Values whose computed value should be different from the
+//	   computed value for the property's initial value.
+//	 XXX Should have a third field for values whose computed value may or
+//	   may not be the same as for the property's initial value.
+//	 invalid_values: Things that are not values for the property and
+//	   should be rejected, but which are balanced and should not absorb
+//	   what follows
+//	 quirks_values: Values that should be accepted in quirks mode only,
+//	   mapped to the values they are equivalent to.
+//	 unbalanced_values: Things that are not values for the property and
+//	   should be rejected, and which also contain unbalanced constructs
+//	   that should absorb what follows
 
 // Helper functions used to construct gCSSProperties.
 
 function initial_font_family_is_sans_serif()
 {
-  // The initial value of 'font-family' might be 'serif' or
-  // 'sans-serif'.
-  var div = document.createElement("div");
-  div.setAttribute("style", "font: initial");
-  return getComputedStyle(div, "").fontFamily == "sans-serif";
+	// The initial value of 'font-family' might be 'serif' or
+	// 'sans-serif'.
+	var div = document.createElement("div");
+	div.setAttribute("style", "font: initial");
+	return getComputedStyle(div, "").fontFamily == "sans-serif";
 }
 var gInitialFontFamilyIsSansSerif = initial_font_family_is_sans_serif();
 
 // shared by background-image and border-image-source
 var validGradientAndElementValues = [
-  "-moz-element(#a)",
-  "-moz-element(  #a  )",
-  "-moz-element(#a-1)",
-  "-moz-element(#a\\:1)",
-  /* gradient torture test */
-  "linear-gradient(red, blue)",
-  "linear-gradient(red, yellow, blue)",
-  "linear-gradient(red 1px, yellow 20%, blue 24em, green)",
-  "linear-gradient(red, yellow, green, blue 50%)",
-  "linear-gradient(red -50%, yellow -25%, green, blue)",
-  "linear-gradient(red -99px, yellow, green, blue 120%)",
-  "linear-gradient(#ffff00, #ef3, rgba(10, 20, 30, 0.4))",
-  "linear-gradient(rgba(10, 20, 30, 0.4), #ffff00, #ef3)",
+	"-moz-element(#a)",
+	"-moz-element(  #a  )",
+	"-moz-element(#a-1)",
+	"-moz-element(#a\\:1)",
+	/* gradient torture test */
+	"linear-gradient(red, blue)",
+	"linear-gradient(red, yellow, blue)",
+	"linear-gradient(red 1px, yellow 20%, blue 24em, green)",
+	"linear-gradient(red, yellow, green, blue 50%)",
+	"linear-gradient(red -50%, yellow -25%, green, blue)",
+	"linear-gradient(red -99px, yellow, green, blue 120%)",
+	"linear-gradient(#ffff00, #ef3, rgba(10, 20, 30, 0.4))",
+	"linear-gradient(rgba(10, 20, 30, 0.4), #ffff00, #ef3)",
 
-  "linear-gradient(to top, red, blue)",
-  "linear-gradient(to bottom, red, blue)",
-  "linear-gradient(to left, red, blue)",
-  "linear-gradient(to right, red, blue)",
-  "linear-gradient(to top left, red, blue)",
-  "linear-gradient(to top right, red, blue)",
-  "linear-gradient(to bottom left, red, blue)",
-  "linear-gradient(to bottom right, red, blue)",
-  "linear-gradient(to left top, red, blue)",
-  "linear-gradient(to left bottom, red, blue)",
-  "linear-gradient(to right top, red, blue)",
-  "linear-gradient(to right bottom, red, blue)",
+	"linear-gradient(to top, red, blue)",
+	"linear-gradient(to bottom, red, blue)",
+	"linear-gradient(to left, red, blue)",
+	"linear-gradient(to right, red, blue)",
+	"linear-gradient(to top left, red, blue)",
+	"linear-gradient(to top right, red, blue)",
+	"linear-gradient(to bottom left, red, blue)",
+	"linear-gradient(to bottom right, red, blue)",
+	"linear-gradient(to left top, red, blue)",
+	"linear-gradient(to left bottom, red, blue)",
+	"linear-gradient(to right top, red, blue)",
+	"linear-gradient(to right bottom, red, blue)",
 
-  "linear-gradient(-33deg, red, blue)",
-  "linear-gradient(30grad, red, blue)",
-  "linear-gradient(10deg, red, blue)",
-  "linear-gradient(1turn, red, blue)",
-  "linear-gradient(.414rad, red, blue)",
+	"linear-gradient(-33deg, red, blue)",
+	"linear-gradient(30grad, red, blue)",
+	"linear-gradient(10deg, red, blue)",
+	"linear-gradient(1turn, red, blue)",
+	"linear-gradient(.414rad, red, blue)",
 
-  "-moz-linear-gradient(red, blue)",
-  "-moz-linear-gradient(red, yellow, blue)",
-  "-moz-linear-gradient(red 1px, yellow 20%, blue 24em, green)",
-  "-moz-linear-gradient(red, yellow, green, blue 50%)",
-  "-moz-linear-gradient(red -50%, yellow -25%, green, blue)",
-  "-moz-linear-gradient(red -99px, yellow, green, blue 120%)",
-  "-moz-linear-gradient(#ffff00, #ef3, rgba(10, 20, 30, 0.4))",
-  "-moz-linear-gradient(rgba(10, 20, 30, 0.4), #ffff00, #ef3)",
+	"-moz-linear-gradient(red, blue)",
+	"-moz-linear-gradient(red, yellow, blue)",
+	"-moz-linear-gradient(red 1px, yellow 20%, blue 24em, green)",
+	"-moz-linear-gradient(red, yellow, green, blue 50%)",
+	"-moz-linear-gradient(red -50%, yellow -25%, green, blue)",
+	"-moz-linear-gradient(red -99px, yellow, green, blue 120%)",
+	"-moz-linear-gradient(#ffff00, #ef3, rgba(10, 20, 30, 0.4))",
+	"-moz-linear-gradient(rgba(10, 20, 30, 0.4), #ffff00, #ef3)",
 
-  "-moz-linear-gradient(to top, red, blue)",
-  "-moz-linear-gradient(to bottom, red, blue)",
-  "-moz-linear-gradient(to left, red, blue)",
-  "-moz-linear-gradient(to right, red, blue)",
-  "-moz-linear-gradient(to top left, red, blue)",
-  "-moz-linear-gradient(to top right, red, blue)",
-  "-moz-linear-gradient(to bottom left, red, blue)",
-  "-moz-linear-gradient(to bottom right, red, blue)",
-  "-moz-linear-gradient(to left top, red, blue)",
-  "-moz-linear-gradient(to left bottom, red, blue)",
-  "-moz-linear-gradient(to right top, red, blue)",
-  "-moz-linear-gradient(to right bottom, red, blue)",
+	"-moz-linear-gradient(to top, red, blue)",
+	"-moz-linear-gradient(to bottom, red, blue)",
+	"-moz-linear-gradient(to left, red, blue)",
+	"-moz-linear-gradient(to right, red, blue)",
+	"-moz-linear-gradient(to top left, red, blue)",
+	"-moz-linear-gradient(to top right, red, blue)",
+	"-moz-linear-gradient(to bottom left, red, blue)",
+	"-moz-linear-gradient(to bottom right, red, blue)",
+	"-moz-linear-gradient(to left top, red, blue)",
+	"-moz-linear-gradient(to left bottom, red, blue)",
+	"-moz-linear-gradient(to right top, red, blue)",
+	"-moz-linear-gradient(to right bottom, red, blue)",
 
-  "-moz-linear-gradient(top left, red, blue)",
-  "-moz-linear-gradient(0 0, red, blue)",
-  "-moz-linear-gradient(20% bottom, red, blue)",
-  "-moz-linear-gradient(center 20%, red, blue)",
-  "-moz-linear-gradient(left 35px, red, blue)",
-  "-moz-linear-gradient(10% 10em, red, blue)",
-  "-moz-linear-gradient(44px top, red, blue)",
+	"-moz-linear-gradient(top left, red, blue)",
+	"-moz-linear-gradient(0 0, red, blue)",
+	"-moz-linear-gradient(20% bottom, red, blue)",
+	"-moz-linear-gradient(center 20%, red, blue)",
+	"-moz-linear-gradient(left 35px, red, blue)",
+	"-moz-linear-gradient(10% 10em, red, blue)",
+	"-moz-linear-gradient(44px top, red, blue)",
 
-  "-moz-linear-gradient(top left 45deg, red, blue)",
-  "-moz-linear-gradient(20% bottom -300deg, red, blue)",
-  "-moz-linear-gradient(center 20% 1.95929rad, red, blue)",
-  "-moz-linear-gradient(left 35px 30grad, red, blue)",
-  "-moz-linear-gradient(left 35px 0.1turn, red, blue)",
-  "-moz-linear-gradient(10% 10em 99999deg, red, blue)",
-  "-moz-linear-gradient(44px top -33deg, red, blue)",
+	"-moz-linear-gradient(top left 45deg, red, blue)",
+	"-moz-linear-gradient(20% bottom -300deg, red, blue)",
+	"-moz-linear-gradient(center 20% 1.95929rad, red, blue)",
+	"-moz-linear-gradient(left 35px 30grad, red, blue)",
+	"-moz-linear-gradient(left 35px 0.1turn, red, blue)",
+	"-moz-linear-gradient(10% 10em 99999deg, red, blue)",
+	"-moz-linear-gradient(44px top -33deg, red, blue)",
 
-  "-moz-linear-gradient(-33deg, red, blue)",
-  "-moz-linear-gradient(30grad left 35px, red, blue)",
-  "-moz-linear-gradient(10deg 20px, red, blue)",
-  "-moz-linear-gradient(1turn 20px, red, blue)",
-  "-moz-linear-gradient(.414rad bottom, red, blue)",
+	"-moz-linear-gradient(-33deg, red, blue)",
+	"-moz-linear-gradient(30grad left 35px, red, blue)",
+	"-moz-linear-gradient(10deg 20px, red, blue)",
+	"-moz-linear-gradient(1turn 20px, red, blue)",
+	"-moz-linear-gradient(.414rad bottom, red, blue)",
 
-  "-moz-linear-gradient(blue calc(0px) ,green calc(25%) ,red calc(40px) ,blue calc(60px) , yellow  calc(100px))",
-  "-moz-linear-gradient(-33deg, blue calc(-25%) ,red 40px)",
-  "-moz-linear-gradient(10deg, blue calc(100px + -25%),red calc(40px))",
-  "-moz-linear-gradient(10deg, blue calc(-25px),red calc(100%))",
-  "-moz-linear-gradient(.414rad, blue calc(100px + -25px) ,green calc(100px + -25px) ,red calc(100px + -25%) ,blue calc(-25px) , yellow  calc(-25px))",
-  "-moz-linear-gradient(1turn, blue calc(-25%) ,green calc(25px) ,red calc(25%),blue calc(0px),white 50px, yellow  calc(-25px))",
+	"-moz-linear-gradient(blue calc(0px) ,green calc(25%) ,red calc(40px) ,blue calc(60px) , yellow  calc(100px))",
+	"-moz-linear-gradient(-33deg, blue calc(-25%) ,red 40px)",
+	"-moz-linear-gradient(10deg, blue calc(100px + -25%),red calc(40px))",
+	"-moz-linear-gradient(10deg, blue calc(-25px),red calc(100%))",
+	"-moz-linear-gradient(.414rad, blue calc(100px + -25px) ,green calc(100px + -25px) ,red calc(100px + -25%) ,blue calc(-25px) , yellow  calc(-25px))",
+	"-moz-linear-gradient(1turn, blue calc(-25%) ,green calc(25px) ,red calc(25%),blue calc(0px),white 50px, yellow  calc(-25px))",
 
-  "radial-gradient(red, blue)",
-  "radial-gradient(red, yellow, blue)",
-  "radial-gradient(red 1px, yellow 20%, blue 24em, green)",
-  "radial-gradient(red, yellow, green, blue 50%)",
-  "radial-gradient(red -50%, yellow -25%, green, blue)",
-  "radial-gradient(red -99px, yellow, green, blue 120%)",
-  "radial-gradient(#ffff00, #ef3, rgba(10, 20, 30, 0.4))",
+	"radial-gradient(red, blue)",
+	"radial-gradient(red, yellow, blue)",
+	"radial-gradient(red 1px, yellow 20%, blue 24em, green)",
+	"radial-gradient(red, yellow, green, blue 50%)",
+	"radial-gradient(red -50%, yellow -25%, green, blue)",
+	"radial-gradient(red -99px, yellow, green, blue 120%)",
+	"radial-gradient(#ffff00, #ef3, rgba(10, 20, 30, 0.4))",
 
-  "radial-gradient(0 0, red, blue)",
-  "radial-gradient(rgba(10, 20, 30, 0.4), #ffff00, #ef3)",
+	"radial-gradient(0 0, red, blue)",
+	"radial-gradient(rgba(10, 20, 30, 0.4), #ffff00, #ef3)",
 
-  "radial-gradient(at top left, red, blue)",
-  "radial-gradient(at 20% bottom, red, blue)",
-  "radial-gradient(at center 20%, red, blue)",
-  "radial-gradient(at left 35px, red, blue)",
-  "radial-gradient(at 10% 10em, red, blue)",
-  "radial-gradient(at 44px top, red, blue)",
-  "radial-gradient(at 0 0, red, blue)",
+	"radial-gradient(at top left, red, blue)",
+	"radial-gradient(at 20% bottom, red, blue)",
+	"radial-gradient(at center 20%, red, blue)",
+	"radial-gradient(at left 35px, red, blue)",
+	"radial-gradient(at 10% 10em, red, blue)",
+	"radial-gradient(at 44px top, red, blue)",
+	"radial-gradient(at 0 0, red, blue)",
 
-  "radial-gradient(farthest-corner, red, blue)",
-  "radial-gradient(circle, red, blue)",
-  "radial-gradient(ellipse closest-corner, red, blue)",
-  "radial-gradient(closest-corner ellipse, red, blue)",
+	"radial-gradient(farthest-corner, red, blue)",
+	"radial-gradient(circle, red, blue)",
+	"radial-gradient(ellipse closest-corner, red, blue)",
+	"radial-gradient(closest-corner ellipse, red, blue)",
 
-  "radial-gradient(43px, red, blue)",
-  "radial-gradient(43px 43px, red, blue)",
-  "radial-gradient(50% 50%, red, blue)",
-  "radial-gradient(43px 50%, red, blue)",
-  "radial-gradient(50% 43px, red, blue)",
-  "radial-gradient(circle 43px, red, blue)",
-  "radial-gradient(43px circle, red, blue)",
-  "radial-gradient(ellipse 43px 43px, red, blue)",
-  "radial-gradient(ellipse 50% 50%, red, blue)",
-  "radial-gradient(ellipse 43px 50%, red, blue)",
-  "radial-gradient(ellipse 50% 43px, red, blue)",
-  "radial-gradient(50% 43px ellipse, red, blue)",
+	"radial-gradient(43px, red, blue)",
+	"radial-gradient(43px 43px, red, blue)",
+	"radial-gradient(50% 50%, red, blue)",
+	"radial-gradient(43px 50%, red, blue)",
+	"radial-gradient(50% 43px, red, blue)",
+	"radial-gradient(circle 43px, red, blue)",
+	"radial-gradient(43px circle, red, blue)",
+	"radial-gradient(ellipse 43px 43px, red, blue)",
+	"radial-gradient(ellipse 50% 50%, red, blue)",
+	"radial-gradient(ellipse 43px 50%, red, blue)",
+	"radial-gradient(ellipse 50% 43px, red, blue)",
+	"radial-gradient(50% 43px ellipse, red, blue)",
 
-  "radial-gradient(farthest-corner at top left, red, blue)",
-  "radial-gradient(ellipse closest-corner at 45px, red, blue)",
-  "radial-gradient(circle farthest-side at 45px, red, blue)",
-  "radial-gradient(closest-side ellipse at 50%, red, blue)",
-  "radial-gradient(farthest-corner circle at 4em, red, blue)",
+	"radial-gradient(farthest-corner at top left, red, blue)",
+	"radial-gradient(ellipse closest-corner at 45px, red, blue)",
+	"radial-gradient(circle farthest-side at 45px, red, blue)",
+	"radial-gradient(closest-side ellipse at 50%, red, blue)",
+	"radial-gradient(farthest-corner circle at 4em, red, blue)",
 
-  "radial-gradient(30% 40% at top left, red, blue)",
-  "radial-gradient(50px 60px at 15% 20%, red, blue)",
-  "radial-gradient(7em 8em at 45px, red, blue)",
+	"radial-gradient(30% 40% at top left, red, blue)",
+	"radial-gradient(50px 60px at 15% 20%, red, blue)",
+	"radial-gradient(7em 8em at 45px, red, blue)",
 
-  "-moz-radial-gradient(red, blue)",
-  "-moz-radial-gradient(red, yellow, blue)",
-  "-moz-radial-gradient(red 1px, yellow 20%, blue 24em, green)",
-  "-moz-radial-gradient(red, yellow, green, blue 50%)",
-  "-moz-radial-gradient(red -50%, yellow -25%, green, blue)",
-  "-moz-radial-gradient(red -99px, yellow, green, blue 120%)",
-  "-moz-radial-gradient(#ffff00, #ef3, rgba(10, 20, 30, 0.4))",
+	"-moz-radial-gradient(red, blue)",
+	"-moz-radial-gradient(red, yellow, blue)",
+	"-moz-radial-gradient(red 1px, yellow 20%, blue 24em, green)",
+	"-moz-radial-gradient(red, yellow, green, blue 50%)",
+	"-moz-radial-gradient(red -50%, yellow -25%, green, blue)",
+	"-moz-radial-gradient(red -99px, yellow, green, blue 120%)",
+	"-moz-radial-gradient(#ffff00, #ef3, rgba(10, 20, 30, 0.4))",
 
-  "-moz-radial-gradient(top left, red, blue)",
-  "-moz-radial-gradient(20% bottom, red, blue)",
-  "-moz-radial-gradient(center 20%, red, blue)",
-  "-moz-radial-gradient(left 35px, red, blue)",
-  "-moz-radial-gradient(10% 10em, red, blue)",
-  "-moz-radial-gradient(44px top, red, blue)",
+	"-moz-radial-gradient(top left, red, blue)",
+	"-moz-radial-gradient(20% bottom, red, blue)",
+	"-moz-radial-gradient(center 20%, red, blue)",
+	"-moz-radial-gradient(left 35px, red, blue)",
+	"-moz-radial-gradient(10% 10em, red, blue)",
+	"-moz-radial-gradient(44px top, red, blue)",
 
-  "-moz-radial-gradient(top left 45deg, red, blue)",
-  "-moz-radial-gradient(0 0, red, blue)",
-  "-moz-radial-gradient(20% bottom -300deg, red, blue)",
-  "-moz-radial-gradient(center 20% 1.95929rad, red, blue)",
-  "-moz-radial-gradient(left 35px 30grad, red, blue)",
-  "-moz-radial-gradient(10% 10em 99999deg, red, blue)",
-  "-moz-radial-gradient(44px top -33deg, red, blue)",
-  "-moz-radial-gradient(rgba(10, 20, 30, 0.4), #ffff00, #ef3)",
+	"-moz-radial-gradient(top left 45deg, red, blue)",
+	"-moz-radial-gradient(0 0, red, blue)",
+	"-moz-radial-gradient(20% bottom -300deg, red, blue)",
+	"-moz-radial-gradient(center 20% 1.95929rad, red, blue)",
+	"-moz-radial-gradient(left 35px 30grad, red, blue)",
+	"-moz-radial-gradient(10% 10em 99999deg, red, blue)",
+	"-moz-radial-gradient(44px top -33deg, red, blue)",
+	"-moz-radial-gradient(rgba(10, 20, 30, 0.4), #ffff00, #ef3)",
 
-  "-moz-radial-gradient(-33deg, red, blue)",
-  "-moz-radial-gradient(30grad left 35px, red, blue)",
-  "-moz-radial-gradient(10deg 20px, red, blue)",
-  "-moz-radial-gradient(.414rad bottom, red, blue)",
+	"-moz-radial-gradient(-33deg, red, blue)",
+	"-moz-radial-gradient(30grad left 35px, red, blue)",
+	"-moz-radial-gradient(10deg 20px, red, blue)",
+	"-moz-radial-gradient(.414rad bottom, red, blue)",
 
-  "-moz-radial-gradient(cover, red, blue)",
-  "-moz-radial-gradient(circle, red, blue)",
-  "-moz-radial-gradient(ellipse closest-corner, red, blue)",
-  "-moz-radial-gradient(farthest-side circle, red, blue)",
+	"-moz-radial-gradient(cover, red, blue)",
+	"-moz-radial-gradient(circle, red, blue)",
+	"-moz-radial-gradient(ellipse closest-corner, red, blue)",
+	"-moz-radial-gradient(farthest-side circle, red, blue)",
 
-  "-moz-radial-gradient(top left, cover, red, blue)",
-  "-moz-radial-gradient(15% 20%, circle, red, blue)",
-  "-moz-radial-gradient(45px, ellipse closest-corner, red, blue)",
-  "-moz-radial-gradient(45px, farthest-side circle, red, blue)",
+	"-moz-radial-gradient(top left, cover, red, blue)",
+	"-moz-radial-gradient(15% 20%, circle, red, blue)",
+	"-moz-radial-gradient(45px, ellipse closest-corner, red, blue)",
+	"-moz-radial-gradient(45px, farthest-side circle, red, blue)",
 
-  "-moz-radial-gradient(99deg, cover, red, blue)",
-  "-moz-radial-gradient(-1.2345rad, circle, red, blue)",
-  "-moz-radial-gradient(399grad, ellipse closest-corner, red, blue)",
-  "-moz-radial-gradient(399grad, farthest-side circle, red, blue)",
+	"-moz-radial-gradient(99deg, cover, red, blue)",
+	"-moz-radial-gradient(-1.2345rad, circle, red, blue)",
+	"-moz-radial-gradient(399grad, ellipse closest-corner, red, blue)",
+	"-moz-radial-gradient(399grad, farthest-side circle, red, blue)",
 
-  "-moz-radial-gradient(top left 99deg, cover, red, blue)",
-  "-moz-radial-gradient(15% 20% -1.2345rad, circle, red, blue)",
-  "-moz-radial-gradient(45px 399grad, ellipse closest-corner, red, blue)",
-  "-moz-radial-gradient(45px 399grad, farthest-side circle, red, blue)",
+	"-moz-radial-gradient(top left 99deg, cover, red, blue)",
+	"-moz-radial-gradient(15% 20% -1.2345rad, circle, red, blue)",
+	"-moz-radial-gradient(45px 399grad, ellipse closest-corner, red, blue)",
+	"-moz-radial-gradient(45px 399grad, farthest-side circle, red, blue)",
 
-  "-moz-repeating-linear-gradient(red, blue)",
-  "-moz-repeating-linear-gradient(red, yellow, blue)",
-  "-moz-repeating-linear-gradient(red 1px, yellow 20%, blue 24em, green)",
-  "-moz-repeating-linear-gradient(red, yellow, green, blue 50%)",
-  "-moz-repeating-linear-gradient(red -50%, yellow -25%, green, blue)",
-  "-moz-repeating-linear-gradient(red -99px, yellow, green, blue 120%)",
-  "-moz-repeating-linear-gradient(#ffff00, #ef3, rgba(10, 20, 30, 0.4))",
-  "-moz-repeating-linear-gradient(rgba(10, 20, 30, 0.4), #ffff00, #ef3)",
+	"-moz-repeating-linear-gradient(red, blue)",
+	"-moz-repeating-linear-gradient(red, yellow, blue)",
+	"-moz-repeating-linear-gradient(red 1px, yellow 20%, blue 24em, green)",
+	"-moz-repeating-linear-gradient(red, yellow, green, blue 50%)",
+	"-moz-repeating-linear-gradient(red -50%, yellow -25%, green, blue)",
+	"-moz-repeating-linear-gradient(red -99px, yellow, green, blue 120%)",
+	"-moz-repeating-linear-gradient(#ffff00, #ef3, rgba(10, 20, 30, 0.4))",
+	"-moz-repeating-linear-gradient(rgba(10, 20, 30, 0.4), #ffff00, #ef3)",
 
-  "-moz-repeating-linear-gradient(to top, red, blue)",
-  "-moz-repeating-linear-gradient(to bottom, red, blue)",
-  "-moz-repeating-linear-gradient(to left, red, blue)",
-  "-moz-repeating-linear-gradient(to right, red, blue)",
-  "-moz-repeating-linear-gradient(to top left, red, blue)",
-  "-moz-repeating-linear-gradient(to top right, red, blue)",
-  "-moz-repeating-linear-gradient(to bottom left, red, blue)",
-  "-moz-repeating-linear-gradient(to bottom right, red, blue)",
-  "-moz-repeating-linear-gradient(to left top, red, blue)",
-  "-moz-repeating-linear-gradient(to left bottom, red, blue)",
-  "-moz-repeating-linear-gradient(to right top, red, blue)",
-  "-moz-repeating-linear-gradient(to right bottom, red, blue)",
+	"-moz-repeating-linear-gradient(to top, red, blue)",
+	"-moz-repeating-linear-gradient(to bottom, red, blue)",
+	"-moz-repeating-linear-gradient(to left, red, blue)",
+	"-moz-repeating-linear-gradient(to right, red, blue)",
+	"-moz-repeating-linear-gradient(to top left, red, blue)",
+	"-moz-repeating-linear-gradient(to top right, red, blue)",
+	"-moz-repeating-linear-gradient(to bottom left, red, blue)",
+	"-moz-repeating-linear-gradient(to bottom right, red, blue)",
+	"-moz-repeating-linear-gradient(to left top, red, blue)",
+	"-moz-repeating-linear-gradient(to left bottom, red, blue)",
+	"-moz-repeating-linear-gradient(to right top, red, blue)",
+	"-moz-repeating-linear-gradient(to right bottom, red, blue)",
 
-  "-moz-repeating-linear-gradient(top left, red, blue)",
-  "-moz-repeating-linear-gradient(0 0, red, blue)",
-  "-moz-repeating-linear-gradient(20% bottom, red, blue)",
-  "-moz-repeating-linear-gradient(center 20%, red, blue)",
-  "-moz-repeating-linear-gradient(left 35px, red, blue)",
-  "-moz-repeating-linear-gradient(10% 10em, red, blue)",
-  "-moz-repeating-linear-gradient(44px top, red, blue)",
+	"-moz-repeating-linear-gradient(top left, red, blue)",
+	"-moz-repeating-linear-gradient(0 0, red, blue)",
+	"-moz-repeating-linear-gradient(20% bottom, red, blue)",
+	"-moz-repeating-linear-gradient(center 20%, red, blue)",
+	"-moz-repeating-linear-gradient(left 35px, red, blue)",
+	"-moz-repeating-linear-gradient(10% 10em, red, blue)",
+	"-moz-repeating-linear-gradient(44px top, red, blue)",
 
-  "-moz-repeating-linear-gradient(top left 45deg, red, blue)",
-  "-moz-repeating-linear-gradient(20% bottom -300deg, red, blue)",
-  "-moz-repeating-linear-gradient(center 20% 1.95929rad, red, blue)",
-  "-moz-repeating-linear-gradient(left 35px 30grad, red, blue)",
-  "-moz-repeating-linear-gradient(10% 10em 99999deg, red, blue)",
-  "-moz-repeating-linear-gradient(44px top -33deg, red, blue)",
+	"-moz-repeating-linear-gradient(top left 45deg, red, blue)",
+	"-moz-repeating-linear-gradient(20% bottom -300deg, red, blue)",
+	"-moz-repeating-linear-gradient(center 20% 1.95929rad, red, blue)",
+	"-moz-repeating-linear-gradient(left 35px 30grad, red, blue)",
+	"-moz-repeating-linear-gradient(10% 10em 99999deg, red, blue)",
+	"-moz-repeating-linear-gradient(44px top -33deg, red, blue)",
 
-  "-moz-repeating-linear-gradient(-33deg, red, blue)",
-  "-moz-repeating-linear-gradient(30grad left 35px, red, blue)",
-  "-moz-repeating-linear-gradient(10deg 20px, red, blue)",
-  "-moz-repeating-linear-gradient(.414rad bottom, red, blue)",
+	"-moz-repeating-linear-gradient(-33deg, red, blue)",
+	"-moz-repeating-linear-gradient(30grad left 35px, red, blue)",
+	"-moz-repeating-linear-gradient(10deg 20px, red, blue)",
+	"-moz-repeating-linear-gradient(.414rad bottom, red, blue)",
 
-  "-moz-repeating-radial-gradient(red, blue)",
-  "-moz-repeating-radial-gradient(red, yellow, blue)",
-  "-moz-repeating-radial-gradient(red 1px, yellow 20%, blue 24em, green)",
-  "-moz-repeating-radial-gradient(red, yellow, green, blue 50%)",
-  "-moz-repeating-radial-gradient(red -50%, yellow -25%, green, blue)",
-  "-moz-repeating-radial-gradient(red -99px, yellow, green, blue 120%)",
-  "-moz-repeating-radial-gradient(#ffff00, #ef3, rgba(10, 20, 30, 0.4))",
-  "-moz-repeating-radial-gradient(rgba(10, 20, 30, 0.4), #ffff00, #ef3)",
+	"-moz-repeating-radial-gradient(red, blue)",
+	"-moz-repeating-radial-gradient(red, yellow, blue)",
+	"-moz-repeating-radial-gradient(red 1px, yellow 20%, blue 24em, green)",
+	"-moz-repeating-radial-gradient(red, yellow, green, blue 50%)",
+	"-moz-repeating-radial-gradient(red -50%, yellow -25%, green, blue)",
+	"-moz-repeating-radial-gradient(red -99px, yellow, green, blue 120%)",
+	"-moz-repeating-radial-gradient(#ffff00, #ef3, rgba(10, 20, 30, 0.4))",
+	"-moz-repeating-radial-gradient(rgba(10, 20, 30, 0.4), #ffff00, #ef3)",
 
-  "repeating-radial-gradient(at top left, red, blue)",
-  "repeating-radial-gradient(at 0 0, red, blue)",
-  "repeating-radial-gradient(at 20% bottom, red, blue)",
-  "repeating-radial-gradient(at center 20%, red, blue)",
-  "repeating-radial-gradient(at left 35px, red, blue)",
-  "repeating-radial-gradient(at 10% 10em, red, blue)",
-  "repeating-radial-gradient(at 44px top, red, blue)",
+	"repeating-radial-gradient(at top left, red, blue)",
+	"repeating-radial-gradient(at 0 0, red, blue)",
+	"repeating-radial-gradient(at 20% bottom, red, blue)",
+	"repeating-radial-gradient(at center 20%, red, blue)",
+	"repeating-radial-gradient(at left 35px, red, blue)",
+	"repeating-radial-gradient(at 10% 10em, red, blue)",
+	"repeating-radial-gradient(at 44px top, red, blue)",
 
-  "-moz-repeating-radial-gradient(farthest-corner, red, blue)",
-  "-moz-repeating-radial-gradient(circle, red, blue)",
-  "-moz-repeating-radial-gradient(ellipse closest-corner, red, blue)",
+	"-moz-repeating-radial-gradient(farthest-corner, red, blue)",
+	"-moz-repeating-radial-gradient(circle, red, blue)",
+	"-moz-repeating-radial-gradient(ellipse closest-corner, red, blue)",
 
-  "repeating-radial-gradient(farthest-corner at top left, red, blue)",
-  "repeating-radial-gradient(closest-corner ellipse at 45px, red, blue)",
-  "repeating-radial-gradient(farthest-side circle at 45px, red, blue)",
-  "repeating-radial-gradient(ellipse closest-side at 50%, red, blue)",
-  "repeating-radial-gradient(circle farthest-corner at 4em, red, blue)",
+	"repeating-radial-gradient(farthest-corner at top left, red, blue)",
+	"repeating-radial-gradient(closest-corner ellipse at 45px, red, blue)",
+	"repeating-radial-gradient(farthest-side circle at 45px, red, blue)",
+	"repeating-radial-gradient(ellipse closest-side at 50%, red, blue)",
+	"repeating-radial-gradient(circle farthest-corner at 4em, red, blue)",
 
-  "repeating-radial-gradient(30% 40% at top left, red, blue)",
-  "repeating-radial-gradient(50px 60px at 15% 20%, red, blue)",
-  "repeating-radial-gradient(7em 8em at 45px, red, blue)",
+	"repeating-radial-gradient(30% 40% at top left, red, blue)",
+	"repeating-radial-gradient(50px 60px at 15% 20%, red, blue)",
+	"repeating-radial-gradient(7em 8em at 45px, red, blue)",
 
-  "-moz-image-rect(url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==), 2, 10, 10, 2)",
-  "-moz-image-rect(url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==), 10%, 50%, 30%, 0%)",
-  "-moz-image-rect(url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==), 10, 50%, 30%, 0)",
+	"-moz-image-rect(url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==), 2, 10, 10, 2)",
+	"-moz-image-rect(url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==), 10%, 50%, 30%, 0%)",
+	"-moz-image-rect(url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==), 10, 50%, 30%, 0)",
 
-  "-moz-radial-gradient(calc(25%) top, red, blue)",
-  "-moz-radial-gradient(left calc(25%), red, blue)",
-  "-moz-radial-gradient(calc(25px) top, red, blue)",
-  "-moz-radial-gradient(left calc(25px), red, blue)",
-  "-moz-radial-gradient(calc(-25%) top, red, blue)",
-  "-moz-radial-gradient(left calc(-25%), red, blue)",
-  "-moz-radial-gradient(calc(-25px) top, red, blue)",
-  "-moz-radial-gradient(left calc(-25px), red, blue)",
-  "-moz-radial-gradient(calc(100px + -25%) top, red, blue)",
-  "-moz-radial-gradient(left calc(100px + -25%), red, blue)",
-  "-moz-radial-gradient(calc(100px + -25px) top, red, blue)",
-  "-moz-radial-gradient(left calc(100px + -25px), red, blue)"
+	"-moz-radial-gradient(calc(25%) top, red, blue)",
+	"-moz-radial-gradient(left calc(25%), red, blue)",
+	"-moz-radial-gradient(calc(25px) top, red, blue)",
+	"-moz-radial-gradient(left calc(25px), red, blue)",
+	"-moz-radial-gradient(calc(-25%) top, red, blue)",
+	"-moz-radial-gradient(left calc(-25%), red, blue)",
+	"-moz-radial-gradient(calc(-25px) top, red, blue)",
+	"-moz-radial-gradient(left calc(-25px), red, blue)",
+	"-moz-radial-gradient(calc(100px + -25%) top, red, blue)",
+	"-moz-radial-gradient(left calc(100px + -25%), red, blue)",
+	"-moz-radial-gradient(calc(100px + -25px) top, red, blue)",
+	"-moz-radial-gradient(left calc(100px + -25px), red, blue)"
 ];
 var invalidGradientAndElementValues = [
-  "-moz-element(#a:1)",
-  "-moz-element(a#a)",
-  "-moz-element(#a a)",
-  "-moz-element(#a+a)",
-  "-moz-element(#a())",
-  /* no quirks mode colors */
-  "linear-gradient(red, ff00ff)",
-  /* no quirks mode colors */
-  "-moz-radial-gradient(10% bottom, ffffff, black) scroll no-repeat",
-  /* no quirks mode lengths */
-  "-moz-linear-gradient(10 10px -45deg, red, blue) repeat",
-  "-moz-linear-gradient(10px 10 -45deg, red, blue) repeat",
-  "linear-gradient(red -99, yellow, green, blue 120%)",
-  /* Old syntax */
-  "-moz-linear-gradient(10px 10px, 20px, 30px 30px, 40px, from(blue), to(red))",
-  "-moz-radial-gradient(20px 20px, 10px 10px, from(green), to(#ff00ff))",
-  "-moz-radial-gradient(10px 10px, 20%, 40px 40px, 10px, from(green), to(#ff00ff))",
-  "-moz-linear-gradient(10px, 20px, 30px, 40px, color-stop(0.5, #00ccff))",
-  "-moz-linear-gradient(20px 20px, from(blue), to(red))",
-  "-moz-linear-gradient(40px 40px, 10px 10px, from(blue) to(red) color-stop(10%, fuchsia))",
-  "-moz-linear-gradient(20px 20px 30px, 10px 10px, from(red), to(#ff0000))",
-  "-moz-radial-gradient(left top, center, 20px 20px, 10px, from(blue), to(red))",
-  "-moz-linear-gradient(left left, top top, from(blue))",
-  "-moz-linear-gradient(inherit, 10px 10px, from(blue))",
-  /* New syntax */
-  "-moz-linear-gradient(10px 10px, 20px, 30px 30px, 40px, blue 0, red 100%)",
-  "-moz-radial-gradient(20px 20px, 10px 10px, from(green), to(#ff00ff))",
-  "-moz-radial-gradient(10px 10px, 20%, 40px 40px, 10px, from(green), to(#ff00ff))",
-  "-moz-linear-gradient(10px, 20px, 30px, 40px, #00ccff 50%)",
-  "-moz-linear-gradient(40px 40px, 10px 10px, blue 0 fuchsia 10% red 100%)",
-  "-moz-linear-gradient(20px 20px 30px, 10px 10px, red 0, #ff0000 100%)",
-  "-moz-radial-gradient(left top, center, 20px 20px, 10px, from(blue), to(red))",
-  "-moz-linear-gradient(left left, top top, blue 0)",
-  "-moz-linear-gradient(inherit, 10px 10px, blue 0)",
-  "-moz-linear-gradient(left left blue red)",
-  "-moz-linear-gradient(left left blue, red)",
-  "-moz-linear-gradient()",
-  "-moz-linear-gradient(cover, red, blue)",
-  "-moz-linear-gradient(auto, red, blue)",
-  "-moz-linear-gradient(22 top, red, blue)",
-  "-moz-linear-gradient(10% red blue)",
-  "-moz-linear-gradient(10%, red blue)",
-  "-moz-linear-gradient(10%,, red, blue)",
-  "-moz-linear-gradient(45px, center, red, blue)",
-  "-moz-linear-gradient(45px, center red, blue)",
-  "-moz-radial-gradient(contain, ellipse, red, blue)",
-  "-moz-radial-gradient(10deg contain, red, blue)",
-  "-moz-radial-gradient(10deg, contain,, red, blue)",
-  "-moz-radial-gradient(contain contain, red, blue)",
-  "-moz-radial-gradient(ellipse circle, red, blue)",
-  "-moz-radial-gradient(to top left, red, blue)",
-  "-moz-radial-gradient(center, 10%, red, blue)",
-  "-moz-radial-gradient(5rad, 20px, red, blue)",
-  "-moz-radial-gradient(40%, -100px -10%, red, blue)",
+	"-moz-element(#a:1)",
+	"-moz-element(a#a)",
+	"-moz-element(#a a)",
+	"-moz-element(#a+a)",
+	"-moz-element(#a())",
+	/* no quirks mode colors */
+	"linear-gradient(red, ff00ff)",
+	/* no quirks mode colors */
+	"-moz-radial-gradient(10% bottom, ffffff, black) scroll no-repeat",
+	/* no quirks mode lengths */
+	"-moz-linear-gradient(10 10px -45deg, red, blue) repeat",
+	"-moz-linear-gradient(10px 10 -45deg, red, blue) repeat",
+	"linear-gradient(red -99, yellow, green, blue 120%)",
+	/* Old syntax */
+	"-moz-linear-gradient(10px 10px, 20px, 30px 30px, 40px, from(blue), to(red))",
+	"-moz-radial-gradient(20px 20px, 10px 10px, from(green), to(#ff00ff))",
+	"-moz-radial-gradient(10px 10px, 20%, 40px 40px, 10px, from(green), to(#ff00ff))",
+	"-moz-linear-gradient(10px, 20px, 30px, 40px, color-stop(0.5, #00ccff))",
+	"-moz-linear-gradient(20px 20px, from(blue), to(red))",
+	"-moz-linear-gradient(40px 40px, 10px 10px, from(blue) to(red) color-stop(10%, fuchsia))",
+	"-moz-linear-gradient(20px 20px 30px, 10px 10px, from(red), to(#ff0000))",
+	"-moz-radial-gradient(left top, center, 20px 20px, 10px, from(blue), to(red))",
+	"-moz-linear-gradient(left left, top top, from(blue))",
+	"-moz-linear-gradient(inherit, 10px 10px, from(blue))",
+	/* New syntax */
+	"-moz-linear-gradient(10px 10px, 20px, 30px 30px, 40px, blue 0, red 100%)",
+	"-moz-radial-gradient(20px 20px, 10px 10px, from(green), to(#ff00ff))",
+	"-moz-radial-gradient(10px 10px, 20%, 40px 40px, 10px, from(green), to(#ff00ff))",
+	"-moz-linear-gradient(10px, 20px, 30px, 40px, #00ccff 50%)",
+	"-moz-linear-gradient(40px 40px, 10px 10px, blue 0 fuchsia 10% red 100%)",
+	"-moz-linear-gradient(20px 20px 30px, 10px 10px, red 0, #ff0000 100%)",
+	"-moz-radial-gradient(left top, center, 20px 20px, 10px, from(blue), to(red))",
+	"-moz-linear-gradient(left left, top top, blue 0)",
+	"-moz-linear-gradient(inherit, 10px 10px, blue 0)",
+	"-moz-linear-gradient(left left blue red)",
+	"-moz-linear-gradient(left left blue, red)",
+	"-moz-linear-gradient()",
+	"-moz-linear-gradient(cover, red, blue)",
+	"-moz-linear-gradient(auto, red, blue)",
+	"-moz-linear-gradient(22 top, red, blue)",
+	"-moz-linear-gradient(10% red blue)",
+	"-moz-linear-gradient(10%, red blue)",
+	"-moz-linear-gradient(10%,, red, blue)",
+	"-moz-linear-gradient(45px, center, red, blue)",
+	"-moz-linear-gradient(45px, center red, blue)",
+	"-moz-radial-gradient(contain, ellipse, red, blue)",
+	"-moz-radial-gradient(10deg contain, red, blue)",
+	"-moz-radial-gradient(10deg, contain,, red, blue)",
+	"-moz-radial-gradient(contain contain, red, blue)",
+	"-moz-radial-gradient(ellipse circle, red, blue)",
+	"-moz-radial-gradient(to top left, red, blue)",
+	"-moz-radial-gradient(center, 10%, red, blue)",
+	"-moz-radial-gradient(5rad, 20px, red, blue)",
+	"-moz-radial-gradient(40%, -100px -10%, red, blue)",
 
-  "-moz-radial-gradient(at top left to cover, red, blue)",
-  "-moz-radial-gradient(at 15% 20% circle, red, blue)",
+	"-moz-radial-gradient(at top left to cover, red, blue)",
+	"-moz-radial-gradient(at 15% 20% circle, red, blue)",
 
-  "-moz-radial-gradient(to cover, red, blue)",
-  "-moz-radial-gradient(to contain, red, blue)",
-  "-moz-radial-gradient(to closest-side circle, red, blue)",
-  "-moz-radial-gradient(to farthest-corner ellipse, red, blue)",
+	"-moz-radial-gradient(to cover, red, blue)",
+	"-moz-radial-gradient(to contain, red, blue)",
+	"-moz-radial-gradient(to closest-side circle, red, blue)",
+	"-moz-radial-gradient(to farthest-corner ellipse, red, blue)",
 
-  "-moz-radial-gradient(ellipse at 45px closest-corner, red, blue)",
-  "-moz-radial-gradient(circle at 45px farthest-side, red, blue)",
-  "-moz-radial-gradient(ellipse 45px, closest-side, red, blue)",
-  "-moz-radial-gradient(circle 45px, farthest-corner, red, blue)",
-  "-moz-radial-gradient(ellipse, ellipse closest-side, red, blue)",
-  "-moz-radial-gradient(circle, circle farthest-corner, red, blue)",
+	"-moz-radial-gradient(ellipse at 45px closest-corner, red, blue)",
+	"-moz-radial-gradient(circle at 45px farthest-side, red, blue)",
+	"-moz-radial-gradient(ellipse 45px, closest-side, red, blue)",
+	"-moz-radial-gradient(circle 45px, farthest-corner, red, blue)",
+	"-moz-radial-gradient(ellipse, ellipse closest-side, red, blue)",
+	"-moz-radial-gradient(circle, circle farthest-corner, red, blue)",
 
-  "-moz-radial-gradient(99deg to farthest-corner, red, blue)",
-  "-moz-radial-gradient(-1.2345rad circle, red, blue)",
-  "-moz-radial-gradient(ellipse 399grad to closest-corner, red, blue)",
-  "-moz-radial-gradient(circle 399grad to farthest-side, red, blue)",
+	"-moz-radial-gradient(99deg to farthest-corner, red, blue)",
+	"-moz-radial-gradient(-1.2345rad circle, red, blue)",
+	"-moz-radial-gradient(ellipse 399grad to closest-corner, red, blue)",
+	"-moz-radial-gradient(circle 399grad to farthest-side, red, blue)",
 
-  "-moz-radial-gradient(at top left 99deg, to farthest-corner, red, blue)",
-  "-moz-radial-gradient(circle at 15% 20% -1.2345rad, red, blue)",
-  "-moz-radial-gradient(to top left at 30% 40%, red, blue)",
-  "-moz-radial-gradient(ellipse at 45px 399grad, to closest-corner, red, blue)",
-  "-moz-radial-gradient(at 45px 399grad to farthest-side circle, red, blue)",
+	"-moz-radial-gradient(at top left 99deg, to farthest-corner, red, blue)",
+	"-moz-radial-gradient(circle at 15% 20% -1.2345rad, red, blue)",
+	"-moz-radial-gradient(to top left at 30% 40%, red, blue)",
+	"-moz-radial-gradient(ellipse at 45px 399grad, to closest-corner, red, blue)",
+	"-moz-radial-gradient(at 45px 399grad to farthest-side circle, red, blue)",
 
-  "-moz-radial-gradient(to 50%, red, blue)",
-  "-moz-radial-gradient(circle to 50%, red, blue)",
-  "-moz-radial-gradient(circle to 43px 43px, red, blue)",
-  "-moz-radial-gradient(circle to 50% 50%, red, blue)",
-  "-moz-radial-gradient(circle to 43px 50%, red, blue)",
-  "-moz-radial-gradient(circle to 50% 43px, red, blue)",
-  "-moz-radial-gradient(ellipse to 43px, red, blue)",
-  "-moz-radial-gradient(ellipse to 50%, red, blue)",
+	"-moz-radial-gradient(to 50%, red, blue)",
+	"-moz-radial-gradient(circle to 50%, red, blue)",
+	"-moz-radial-gradient(circle to 43px 43px, red, blue)",
+	"-moz-radial-gradient(circle to 50% 50%, red, blue)",
+	"-moz-radial-gradient(circle to 43px 50%, red, blue)",
+	"-moz-radial-gradient(circle to 50% 43px, red, blue)",
+	"-moz-radial-gradient(ellipse to 43px, red, blue)",
+	"-moz-radial-gradient(ellipse to 50%, red, blue)",
 
-  "-moz-linear-gradient(to 0 0, red, blue)",
-  "-moz-linear-gradient(to 20% bottom, red, blue)",
-  "-moz-linear-gradient(to center 20%, red, blue)",
-  "-moz-linear-gradient(to left 35px, red, blue)",
-  "-moz-linear-gradient(to 10% 10em, red, blue)",
-  "-moz-linear-gradient(to 44px top, red, blue)",
-  "-moz-linear-gradient(to top left 45deg, red, blue)",
-  "-moz-linear-gradient(to 20% bottom -300deg, red, blue)",
-  "-moz-linear-gradient(to center 20% 1.95929rad, red, blue)",
-  "-moz-linear-gradient(to left 35px 30grad, red, blue)",
-  "-moz-linear-gradient(to 10% 10em 99999deg, red, blue)",
-  "-moz-linear-gradient(to 44px top -33deg, red, blue)",
-  "-moz-linear-gradient(to -33deg, red, blue)",
-  "-moz-linear-gradient(to 30grad left 35px, red, blue)",
-  "-moz-linear-gradient(to 10deg 20px, red, blue)",
-  "-moz-linear-gradient(to .414rad bottom, red, blue)",
+	"-moz-linear-gradient(to 0 0, red, blue)",
+	"-moz-linear-gradient(to 20% bottom, red, blue)",
+	"-moz-linear-gradient(to center 20%, red, blue)",
+	"-moz-linear-gradient(to left 35px, red, blue)",
+	"-moz-linear-gradient(to 10% 10em, red, blue)",
+	"-moz-linear-gradient(to 44px top, red, blue)",
+	"-moz-linear-gradient(to top left 45deg, red, blue)",
+	"-moz-linear-gradient(to 20% bottom -300deg, red, blue)",
+	"-moz-linear-gradient(to center 20% 1.95929rad, red, blue)",
+	"-moz-linear-gradient(to left 35px 30grad, red, blue)",
+	"-moz-linear-gradient(to 10% 10em 99999deg, red, blue)",
+	"-moz-linear-gradient(to 44px top -33deg, red, blue)",
+	"-moz-linear-gradient(to -33deg, red, blue)",
+	"-moz-linear-gradient(to 30grad left 35px, red, blue)",
+	"-moz-linear-gradient(to 10deg 20px, red, blue)",
+	"-moz-linear-gradient(to .414rad bottom, red, blue)",
 
-  "-moz-linear-gradient(to top top, red, blue)",
-  "-moz-linear-gradient(to bottom bottom, red, blue)",
-  "-moz-linear-gradient(to left left, red, blue)",
-  "-moz-linear-gradient(to right right, red, blue)",
+	"-moz-linear-gradient(to top top, red, blue)",
+	"-moz-linear-gradient(to bottom bottom, red, blue)",
+	"-moz-linear-gradient(to left left, red, blue)",
+	"-moz-linear-gradient(to right right, red, blue)",
 
-  "-moz-repeating-linear-gradient(10px 10px, 20px, 30px 30px, 40px, blue 0, red 100%)",
-  "-moz-repeating-radial-gradient(20px 20px, 10px 10px, from(green), to(#ff00ff))",
-  "-moz-repeating-radial-gradient(10px 10px, 20%, 40px 40px, 10px, from(green), to(#ff00ff))",
-  "-moz-repeating-linear-gradient(10px, 20px, 30px, 40px, #00ccff 50%)",
-  "-moz-repeating-linear-gradient(40px 40px, 10px 10px, blue 0 fuchsia 10% red 100%)",
-  "-moz-repeating-linear-gradient(20px 20px 30px, 10px 10px, red 0, #ff0000 100%)",
-  "-moz-repeating-radial-gradient(left top, center, 20px 20px, 10px, from(blue), to(red))",
-  "-moz-repeating-linear-gradient(left left, top top, blue 0)",
-  "-moz-repeating-linear-gradient(inherit, 10px 10px, blue 0)",
-  "-moz-repeating-linear-gradient(left left blue red)",
-  "-moz-repeating-linear-gradient()",
+	"-moz-repeating-linear-gradient(10px 10px, 20px, 30px 30px, 40px, blue 0, red 100%)",
+	"-moz-repeating-radial-gradient(20px 20px, 10px 10px, from(green), to(#ff00ff))",
+	"-moz-repeating-radial-gradient(10px 10px, 20%, 40px 40px, 10px, from(green), to(#ff00ff))",
+	"-moz-repeating-linear-gradient(10px, 20px, 30px, 40px, #00ccff 50%)",
+	"-moz-repeating-linear-gradient(40px 40px, 10px 10px, blue 0 fuchsia 10% red 100%)",
+	"-moz-repeating-linear-gradient(20px 20px 30px, 10px 10px, red 0, #ff0000 100%)",
+	"-moz-repeating-radial-gradient(left top, center, 20px 20px, 10px, from(blue), to(red))",
+	"-moz-repeating-linear-gradient(left left, top top, blue 0)",
+	"-moz-repeating-linear-gradient(inherit, 10px 10px, blue 0)",
+	"-moz-repeating-linear-gradient(left left blue red)",
+	"-moz-repeating-linear-gradient()",
 
-  "-moz-repeating-linear-gradient(to 0 0, red, blue)",
-  "-moz-repeating-linear-gradient(to 20% bottom, red, blue)",
-  "-moz-repeating-linear-gradient(to center 20%, red, blue)",
-  "-moz-repeating-linear-gradient(to left 35px, red, blue)",
-  "-moz-repeating-linear-gradient(to 10% 10em, red, blue)",
-  "-moz-repeating-linear-gradient(to 44px top, red, blue)",
-  "-moz-repeating-linear-gradient(to top left 45deg, red, blue)",
-  "-moz-repeating-linear-gradient(to 20% bottom -300deg, red, blue)",
-  "-moz-repeating-linear-gradient(to center 20% 1.95929rad, red, blue)",
-  "-moz-repeating-linear-gradient(to left 35px 30grad, red, blue)",
-  "-moz-repeating-linear-gradient(to 10% 10em 99999deg, red, blue)",
-  "-moz-repeating-linear-gradient(to 44px top -33deg, red, blue)",
-  "-moz-repeating-linear-gradient(to -33deg, red, blue)",
-  "-moz-repeating-linear-gradient(to 30grad left 35px, red, blue)",
-  "-moz-repeating-linear-gradient(to 10deg 20px, red, blue)",
-  "-moz-repeating-linear-gradient(to .414rad bottom, red, blue)",
+	"-moz-repeating-linear-gradient(to 0 0, red, blue)",
+	"-moz-repeating-linear-gradient(to 20% bottom, red, blue)",
+	"-moz-repeating-linear-gradient(to center 20%, red, blue)",
+	"-moz-repeating-linear-gradient(to left 35px, red, blue)",
+	"-moz-repeating-linear-gradient(to 10% 10em, red, blue)",
+	"-moz-repeating-linear-gradient(to 44px top, red, blue)",
+	"-moz-repeating-linear-gradient(to top left 45deg, red, blue)",
+	"-moz-repeating-linear-gradient(to 20% bottom -300deg, red, blue)",
+	"-moz-repeating-linear-gradient(to center 20% 1.95929rad, red, blue)",
+	"-moz-repeating-linear-gradient(to left 35px 30grad, red, blue)",
+	"-moz-repeating-linear-gradient(to 10% 10em 99999deg, red, blue)",
+	"-moz-repeating-linear-gradient(to 44px top -33deg, red, blue)",
+	"-moz-repeating-linear-gradient(to -33deg, red, blue)",
+	"-moz-repeating-linear-gradient(to 30grad left 35px, red, blue)",
+	"-moz-repeating-linear-gradient(to 10deg 20px, red, blue)",
+	"-moz-repeating-linear-gradient(to .414rad bottom, red, blue)",
 
-  "-moz-repeating-linear-gradient(to top top, red, blue)",
-  "-moz-repeating-linear-gradient(to bottom bottom, red, blue)",
-  "-moz-repeating-linear-gradient(to left left, red, blue)",
-  "-moz-repeating-linear-gradient(to right right, red, blue)",
+	"-moz-repeating-linear-gradient(to top top, red, blue)",
+	"-moz-repeating-linear-gradient(to bottom bottom, red, blue)",
+	"-moz-repeating-linear-gradient(to left left, red, blue)",
+	"-moz-repeating-linear-gradient(to right right, red, blue)",
 
-  "-moz-repeating-radial-gradient(to top left at 30% 40%, red, blue)",
-  "-moz-repeating-radial-gradient(ellipse at 45px closest-corner, red, blue)",
-  "-moz-repeating-radial-gradient(circle at 45px farthest-side, red, blue)",
+	"-moz-repeating-radial-gradient(to top left at 30% 40%, red, blue)",
+	"-moz-repeating-radial-gradient(ellipse at 45px closest-corner, red, blue)",
+	"-moz-repeating-radial-gradient(circle at 45px farthest-side, red, blue)",
 
-  "radial-gradient(circle 175px 20px, black, white)",
-  "radial-gradient(175px 20px circle, black, white)",
-  "radial-gradient(ellipse 175px, black, white)",
-  "radial-gradient(175px ellipse, black, white)",
-  "radial-gradient(50%, red, blue)",
-  "radial-gradient(circle 50%, red, blue)",
-  "radial-gradient(50% circle, red, blue)",
+	"radial-gradient(circle 175px 20px, black, white)",
+	"radial-gradient(175px 20px circle, black, white)",
+	"radial-gradient(ellipse 175px, black, white)",
+	"radial-gradient(175px ellipse, black, white)",
+	"radial-gradient(50%, red, blue)",
+	"radial-gradient(circle 50%, red, blue)",
+	"radial-gradient(50% circle, red, blue)",
 
-  /* Valid only when prefixed */
-  "linear-gradient(top left, red, blue)",
-  "linear-gradient(0 0, red, blue)",
-  "linear-gradient(20% bottom, red, blue)",
-  "linear-gradient(center 20%, red, blue)",
-  "linear-gradient(left 35px, red, blue)",
-  "linear-gradient(10% 10em, red, blue)",
-  "linear-gradient(44px top, red, blue)",
+	/* Valid only when prefixed */
+	"linear-gradient(top left, red, blue)",
+	"linear-gradient(0 0, red, blue)",
+	"linear-gradient(20% bottom, red, blue)",
+	"linear-gradient(center 20%, red, blue)",
+	"linear-gradient(left 35px, red, blue)",
+	"linear-gradient(10% 10em, red, blue)",
+	"linear-gradient(44px top, red, blue)",
 
-  "linear-gradient(top left 45deg, red, blue)",
-  "linear-gradient(20% bottom -300deg, red, blue)",
-  "linear-gradient(center 20% 1.95929rad, red, blue)",
-  "linear-gradient(left 35px 30grad, red, blue)",
-  "linear-gradient(left 35px 0.1turn, red, blue)",
-  "linear-gradient(10% 10em 99999deg, red, blue)",
-  "linear-gradient(44px top -33deg, red, blue)",
+	"linear-gradient(top left 45deg, red, blue)",
+	"linear-gradient(20% bottom -300deg, red, blue)",
+	"linear-gradient(center 20% 1.95929rad, red, blue)",
+	"linear-gradient(left 35px 30grad, red, blue)",
+	"linear-gradient(left 35px 0.1turn, red, blue)",
+	"linear-gradient(10% 10em 99999deg, red, blue)",
+	"linear-gradient(44px top -33deg, red, blue)",
 
-  "linear-gradient(30grad left 35px, red, blue)",
-  "linear-gradient(10deg 20px, red, blue)",
-  "linear-gradient(1turn 20px, red, blue)",
-  "linear-gradient(.414rad bottom, red, blue)",
+	"linear-gradient(30grad left 35px, red, blue)",
+	"linear-gradient(10deg 20px, red, blue)",
+	"linear-gradient(1turn 20px, red, blue)",
+	"linear-gradient(.414rad bottom, red, blue)",
 
-  "radial-gradient(top left 45deg, red, blue)",
-  "radial-gradient(20% bottom -300deg, red, blue)",
-  "radial-gradient(center 20% 1.95929rad, red, blue)",
-  "radial-gradient(left 35px 30grad, red, blue)",
-  "radial-gradient(10% 10em 99999deg, red, blue)",
-  "radial-gradient(44px top -33deg, red, blue)",
+	"radial-gradient(top left 45deg, red, blue)",
+	"radial-gradient(20% bottom -300deg, red, blue)",
+	"radial-gradient(center 20% 1.95929rad, red, blue)",
+	"radial-gradient(left 35px 30grad, red, blue)",
+	"radial-gradient(10% 10em 99999deg, red, blue)",
+	"radial-gradient(44px top -33deg, red, blue)",
 
-  "radial-gradient(-33deg, red, blue)",
-  "radial-gradient(30grad left 35px, red, blue)",
-  "radial-gradient(10deg 20px, red, blue)",
-  "radial-gradient(.414rad bottom, red, blue)",
+	"radial-gradient(-33deg, red, blue)",
+	"radial-gradient(30grad left 35px, red, blue)",
+	"radial-gradient(10deg 20px, red, blue)",
+	"radial-gradient(.414rad bottom, red, blue)",
 
-  "radial-gradient(cover, red, blue)",
-  "radial-gradient(ellipse contain, red, blue)",
-  "radial-gradient(cover circle, red, blue)",
+	"radial-gradient(cover, red, blue)",
+	"radial-gradient(ellipse contain, red, blue)",
+	"radial-gradient(cover circle, red, blue)",
 
-  "radial-gradient(top left, cover, red, blue)",
-  "radial-gradient(15% 20%, circle, red, blue)",
-  "radial-gradient(45px, ellipse closest-corner, red, blue)",
-  "radial-gradient(45px, farthest-side circle, red, blue)",
+	"radial-gradient(top left, cover, red, blue)",
+	"radial-gradient(15% 20%, circle, red, blue)",
+	"radial-gradient(45px, ellipse closest-corner, red, blue)",
+	"radial-gradient(45px, farthest-side circle, red, blue)",
 
-  "radial-gradient(99deg, cover, red, blue)",
-  "radial-gradient(-1.2345rad, circle, red, blue)",
-  "radial-gradient(399grad, ellipse closest-corner, red, blue)",
-  "radial-gradient(399grad, farthest-side circle, red, blue)",
+	"radial-gradient(99deg, cover, red, blue)",
+	"radial-gradient(-1.2345rad, circle, red, blue)",
+	"radial-gradient(399grad, ellipse closest-corner, red, blue)",
+	"radial-gradient(399grad, farthest-side circle, red, blue)",
 
-  "radial-gradient(top left 99deg, cover, red, blue)",
-  "radial-gradient(15% 20% -1.2345rad, circle, red, blue)",
-  "radial-gradient(45px 399grad, ellipse closest-corner, red, blue)",
-  "radial-gradient(45px 399grad, farthest-side circle, red, blue)",
+	"radial-gradient(top left 99deg, cover, red, blue)",
+	"radial-gradient(15% 20% -1.2345rad, circle, red, blue)",
+	"radial-gradient(45px 399grad, ellipse closest-corner, red, blue)",
+	"radial-gradient(45px 399grad, farthest-side circle, red, blue)",
 
-  /* Valid only when unprefixed */
-  "-moz-radial-gradient(at top left, red, blue)",
-  "-moz-radial-gradient(at 20% bottom, red, blue)",
-  "-moz-radial-gradient(at center 20%, red, blue)",
-  "-moz-radial-gradient(at left 35px, red, blue)",
-  "-moz-radial-gradient(at 10% 10em, red, blue)",
-  "-moz-radial-gradient(at 44px top, red, blue)",
-  "-moz-radial-gradient(at 0 0, red, blue)",
+	/* Valid only when unprefixed */
+	"-moz-radial-gradient(at top left, red, blue)",
+	"-moz-radial-gradient(at 20% bottom, red, blue)",
+	"-moz-radial-gradient(at center 20%, red, blue)",
+	"-moz-radial-gradient(at left 35px, red, blue)",
+	"-moz-radial-gradient(at 10% 10em, red, blue)",
+	"-moz-radial-gradient(at 44px top, red, blue)",
+	"-moz-radial-gradient(at 0 0, red, blue)",
 
-  "-moz-radial-gradient(circle 43px, red, blue)",
-  "-moz-radial-gradient(ellipse 43px 43px, red, blue)",
-  "-moz-radial-gradient(ellipse 50% 50%, red, blue)",
-  "-moz-radial-gradient(ellipse 43px 50%, red, blue)",
-  "-moz-radial-gradient(ellipse 50% 43px, red, blue)",
+	"-moz-radial-gradient(circle 43px, red, blue)",
+	"-moz-radial-gradient(ellipse 43px 43px, red, blue)",
+	"-moz-radial-gradient(ellipse 50% 50%, red, blue)",
+	"-moz-radial-gradient(ellipse 43px 50%, red, blue)",
+	"-moz-radial-gradient(ellipse 50% 43px, red, blue)",
 
-  "-moz-radial-gradient(farthest-corner at top left, red, blue)",
-  "-moz-radial-gradient(ellipse closest-corner at 45px, red, blue)",
-  "-moz-radial-gradient(circle farthest-side at 45px, red, blue)",
-  "-moz-radial-gradient(closest-side ellipse at 50%, red, blue)",
-  "-moz-radial-gradient(farthest-corner circle at 4em, red, blue)",
+	"-moz-radial-gradient(farthest-corner at top left, red, blue)",
+	"-moz-radial-gradient(ellipse closest-corner at 45px, red, blue)",
+	"-moz-radial-gradient(circle farthest-side at 45px, red, blue)",
+	"-moz-radial-gradient(closest-side ellipse at 50%, red, blue)",
+	"-moz-radial-gradient(farthest-corner circle at 4em, red, blue)",
 
-  "-moz-radial-gradient(30% 40% at top left, red, blue)",
-  "-moz-radial-gradient(50px 60px at 15% 20%, red, blue)",
-  "-moz-radial-gradient(7em 8em at 45px, red, blue)"
+	"-moz-radial-gradient(30% 40% at top left, red, blue)",
+	"-moz-radial-gradient(50px 60px at 15% 20%, red, blue)",
+	"-moz-radial-gradient(7em 8em at 45px, red, blue)"
 ];
 var unbalancedGradientAndElementValues = [
-  "-moz-element(#a()",
+	"-moz-element(#a()",
 ];
 
 var gCSSProperties = {
-  "animation": {
-    domProp: "animation",
-    inherited: false,
-    type: CSS_TYPE_TRUE_SHORTHAND,
-    subproperties: [ "animation-name", "animation-duration", "animation-timing-function", "animation-delay", "animation-direction", "animation-fill-mode", "animation-iteration-count" ],
-    initial_values: [ "none none 0s 0s ease normal 1.0", "none", "0s", "ease", "normal", "1.0" ],
-    other_values: [ "bounce 1s linear 2s", "bounce 1s 2s linear", "bounce linear 1s 2s", "linear bounce 1s 2s", "linear 1s bounce 2s", "linear 1s 2s bounce", "1s bounce linear 2s", "1s bounce 2s linear", "1s 2s bounce linear", "1s linear bounce 2s", "1s linear 2s bounce", "1s 2s linear bounce", "bounce linear 1s", "bounce 1s linear", "linear bounce 1s", "linear 1s bounce", "1s bounce linear", "1s linear bounce", "1s 2s bounce", "1s bounce 2s", "bounce 1s 2s", "1s 2s linear", "1s linear 2s", "linear 1s 2s", "bounce 1s", "1s bounce", "linear 1s", "1s linear", "1s 2s", "2s 1s", "bounce", "linear", "1s", "height", "2s", "ease-in-out", "2s ease-in", "opacity linear", "ease-out 2s", "2s color, 1s bounce, 500ms height linear, 1s opacity 4s cubic-bezier(0.0, 0.1, 1.0, 1.0)", "1s \\32bounce linear 2s", "1s -bounce linear 2s", "1s -\\32bounce linear 2s", "1s \\32 0bounce linear 2s", "1s -\\32 0bounce linear 2s", "1s \\2bounce linear 2s", "1s -\\2bounce linear 2s", "2s, 1s bounce", "1s bounce, 2s", "2s all, 1s bounce", "1s bounce, 2s all", "1s bounce, 2s none", "2s none, 1s bounce", "2s bounce, 1s all", "2s all, 1s bounce" ],
-    invalid_values: [  "2s inherit", "inherit 2s", "2s bounce, 1s inherit", "2s inherit, 1s bounce", "2s initial", "2s all,, 1s bounce", "2s all, , 1s bounce" ]
-  },
-  "animation-delay": {
-    domProp: "animationDelay",
-    inherited: false,
-    type: CSS_TYPE_LONGHAND,
-    initial_values: [ "0s", "0ms" ],
-    other_values: [ "1s", "250ms", "-100ms", "-1s", "1s, 250ms, 2.3s"],
-    invalid_values: [ "0", "0px" ]
-  },
-  "animation-direction": {
-    domProp: "animationDirection",
-    inherited: false,
-    type: CSS_TYPE_LONGHAND,
-    initial_values: [ "normal" ],
-    other_values: [ "alternate", "normal, alternate", "alternate, normal", "normal, normal", "normal, normal, normal", "reverse", "alternate-reverse", "normal, reverse, alternate-reverse, alternate" ],
-    invalid_values: [ "normal normal", "inherit, normal", "reverse-alternate" ]
-  },
-  "animation-duration": {
-    domProp: "animationDuration",
-    inherited: false,
-    type: CSS_TYPE_LONGHAND,
-    initial_values: [ "0s", "0ms" ],
-    other_values: [ "1s", "250ms", "1s, 250ms, 2.3s"],
-    invalid_values: [ "0", "0px", "-1ms", "-2s" ]
-  },
-  "animation-fill-mode": {
-    domProp: "animationFillMode",
-    inherited: false,
-    type: CSS_TYPE_LONGHAND,
-    initial_values: [ "none" ],
-    other_values: [ "forwards", "backwards", "both", "none, none", "forwards, backwards", "forwards, none", "none, both" ],
-    invalid_values: [ "all"]
-  },
-  "animation-iteration-count": {
-    domProp: "animationIterationCount",
-    inherited: false,
-    type: CSS_TYPE_LONGHAND,
-    initial_values: [ "1" ],
-    other_values: [ "infinite", "0", "0.5", "7.75", "-0.0", "1, 2, 3", "infinite, 2", "1, infinite" ],
-    // negatives forbidden per
-    // http://lists.w3.org/Archives/Public/www-style/2011Mar/0355.html
-    invalid_values: [ "none", "-1", "-0.5", "-1, infinite", "infinite, -3" ]
-  },
-  "animation-name": {
-    domProp: "animationName",
-    inherited: false,
-    type: CSS_TYPE_LONGHAND,
-    initial_values: [ "none" ],
-    other_values: [ "all", "ball", "mall", "color", "bounce, bubble, opacity", "foobar", "auto", "\\32bounce", "-bounce", "-\\32bounce", "\\32 0bounce", "-\\32 0bounce", "\\2bounce", "-\\2bounce" ],
-    invalid_values: [ "bounce, initial", "initial, bounce", "bounce, inherit", "inherit, bounce" ]
-  },
-  "animation-play-state": {
-    domProp: "animationPlayState",
-    inherited: false,
-    type: CSS_TYPE_LONGHAND,
-    initial_values: [ "running" ],
-    other_values: [ "paused", "running, running", "paused, running", "paused, paused", "running, paused", "paused, running, running, running, paused, running" ],
-    invalid_values: [ "0" ]
-  },
-  "animation-timing-function": {
-    domProp: "animationTimingFunction",
-    inherited: false,
-    type: CSS_TYPE_LONGHAND,
-    initial_values: [ "ease", "cubic-bezier(0.25, 0.1, 0.25, 1.0)" ],
-    other_values: [ "linear", "ease-in", "ease-out", "ease-in-out", "linear, ease-in, cubic-bezier(0.1, 0.2, 0.8, 0.9)", "cubic-bezier(0.5, 0.5, 0.5, 0.5)", "cubic-bezier(0.25, 1.5, 0.75, -0.5)", "step-start", "step-end", "steps(1)", "steps(2, start)", "steps(386)", "steps(3, end)" ],
-    invalid_values: [ "none", "auto", "cubic-bezier(0.25, 0.1, 0.25)", "cubic-bezier(0.25, 0.1, 0.25, 0.25, 1.0)", "cubic-bezier(-0.5, 0.5, 0.5, 0.5)", "cubic-bezier(1.5, 0.5, 0.5, 0.5)", "cubic-bezier(0.5, 0.5, -0.5, 0.5)", "cubic-bezier(0.5, 0.5, 1.5, 0.5)", "steps(2, step-end)", "steps(0)", "steps(-2)", "steps(0, step-end, 1)" ]
-  },
-  "-moz-appearance": {
-    domProp: "MozAppearance",
-    inherited: false,
-    type: CSS_TYPE_LONGHAND,
-    initial_values: [ "none" ],
-    other_values: [ "radio", "menulist" ],
-    invalid_values: []
-  },
-  "-moz-binding": {
-    domProp: "MozBinding",
-    inherited: false,
-    type: CSS_TYPE_LONGHAND,
-    initial_values: [ "none" ],
-    other_values: [ "url(foo.xml)" ],
-    invalid_values: []
-  },
-  "-moz-border-bottom-colors": {
-    domProp: "MozBorderBottomColors",
-    inherited: false,
-    type: CSS_TYPE_LONGHAND,
-    initial_values: [ "none" ],
-    other_values: [ "red green", "red #fc3", "#ff00cc", "currentColor", "blue currentColor orange currentColor" ],
-    invalid_values: [ "red none", "red inherit", "red, green", "none red", "inherit red", "ff00cc" ]
-  },
-  "-moz-border-end": {
-    domProp: "MozBorderEnd",
-    inherited: false,
-    type: CSS_TYPE_TRUE_SHORTHAND,
-    subproperties: [ "-moz-border-end-color", "-moz-border-end-style", "-moz-border-end-width" ],
-    initial_values: [ "none", "medium", "currentColor", "thin", "none medium currentcolor" ],
-    other_values: [ "solid", "green", "medium solid", "green solid", "10px solid", "thick solid", "5px green none" ],
-    invalid_values: [ "5%", "5", "5 green none" ]
-  },
-  "-moz-border-end-color": {
-    domProp: "MozBorderEndColor",
-    inherited: false,
-    type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
-    get_computed: logical_box_prop_get_computed,
-    initial_values: [ "currentColor" ],
-    other_values: [ "green", "rgba(255,128,0,0.5)", "transparent" ],
-    invalid_values: [ "#0", "#00", "#0000", "#00000", "#0000000", "#00000000", "#000000000", "000000" ]
-  },
-  "-moz-border-end-style": {
-    domProp: "MozBorderEndStyle",
-    inherited: false,
-    type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
-    get_computed: logical_box_prop_get_computed,
-    /* XXX hidden is sometimes the same as initial */
-    initial_values: [ "none" ],
-    other_values: [ "solid", "dashed", "dotted", "double", "outset", "inset", "groove", "ridge" ],
-    invalid_values: []
-  },
-  "-moz-border-end-width": {
-    domProp: "MozBorderEndWidth",
-    inherited: false,
-    type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
-    get_computed: logical_box_prop_get_computed,
-    prerequisites: { "-moz-border-end-style": "solid" },
-    initial_values: [ "medium", "3px", "calc(4px - 1px)" ],
-    other_values: [ "thin", "thick", "1px", "2em",
-      "calc(2px)",
-      "calc(-2px)",
-      "calc(0em)",
-      "calc(0px)",
-      "calc(5em)",
-      "calc(3*25px)",
-      "calc(25px*3)",
-      "calc(3*25px + 5em)",
-    ],
-    invalid_values: [ "5%", "5" ]
-  },
-  "border-image": {
-    domProp: "borderImage",
-    inherited: false,
-    type: CSS_TYPE_TRUE_SHORTHAND,
-    subproperties: [ "border-image-source", "border-image-slice", "border-image-width", "border-image-outset", "border-image-repeat" ],
-    initial_values: [ "none" ],
-    other_values: [ "url('border.png') 27 27 27 27",
-            "url('border.png') 27",
-            "stretch url('border.png')",
-            "url('border.png') 27 fill",
-            "url('border.png') 27 27 27 27 repeat",
-            "repeat url('border.png') 27 27 27 27",
-            "url('border.png') repeat 27 27 27 27",
-            "url('border.png') fill 27 27 27 27 repeat",
-            "url('border.png') 27 27 27 27 / 1em",
-            "27 27 27 27 / 1em url('border.png') ",
-            "url('border.png') 27 27 27 27 / 10 10 10 / 10 10 repeat",
-            "repeat 27 27 27 27 / 10 10 10 / 10 10 url('border.png')",
-            "url('border.png') 27 27 27 27 / / 10 10 1em",
-            "fill 27 27 27 27 / / 10 10 1em url('border.png')",
-            "url('border.png') 27 27 27 27 / 1em 1em 1em 1em repeat",
-            "url('border.png') 27 27 27 27 / 1em 1em 1em 1em stretch round" ],
-    invalid_values: [ "url('border.png') 27 27 27 27 27",
-              "url('border.png') 27 27 27 27 / 1em 1em 1em 1em 1em",
-              "url('border.png') 27 27 27 27 /",
-              "url('border.png') fill",
-              "url('border.png') fill repeat",
-              "fill repeat",
-              "url('border.png') fill / 1em",
-              "url('border.png') / repeat",
-              "url('border.png') 1 /",
-              "url('border.png') 1 / /",
-              "1 / url('border.png')",
-              "url('border.png') / 1",
-              "url('border.png') / / 1"]
-  },
-  "border-image-source": {
-    domProp: "borderImageSource",
-    inherited: false,
-    type: CSS_TYPE_LONGHAND,
-    initial_values: [ "none" ],
-    other_values: [
-    "url('border.png')"
-    ].concat(validGradientAndElementValues),
-    invalid_values: [
-      "url('border.png') url('border.png')",
-    ].concat(invalidGradientAndElementValues),
-    unbalanced_values: [
-    ].concat(unbalancedGradientAndElementValues)
-  },
-  "border-image-slice": {
-    domProp: "borderImageSlice",
-    inherited: false,
-    type: CSS_TYPE_LONGHAND,
-    initial_values: [ "100%", "100% 100% 100% 100%" ],
-    other_values: [ "0%", "10", "10 100% 0 2", "0 0 0 0", "fill 10 10", "10 10 fill" ],
-    invalid_values: [ "-10%", "-10", "10 10 10 10 10", "10 10 10 10 -10", "10px", "-10px", "fill", "fill fill 10px", "10px fill fill" ]
-  },
-  "border-image-width": {
-    domProp: "borderImageWidth",
-    inherited: false,
-    type: CSS_TYPE_LONGHAND,
-    initial_values: [ "1", "1 1 1 1" ],
-    other_values: [ "0", "0%", "0px", "auto auto auto auto", "10 10% auto 15px", "10px 10px 10px 10px", "10", "10 10", "10 10 10" ],
-    invalid_values: [ "-10", "-10px", "-10%", "10 10 10 10 10", "10 10 10 10 auto", "auto auto auto auto auto" ]
-  },
-  "border-image-outset": {
-    domProp: "borderImageOutset",
-    inherited: false,
-    type: CSS_TYPE_LONGHAND,
-    initial_values: [ "0", "0 0 0 0" ],
-    other_values: [ "10px", "10", "10 10", "10 10 10", "10 10 10 10", "10px 10 10 10px" ],
-    invalid_values: [ "-10", "-10px", "-10%", "10%", "10 10 10 10 10" ]
-  },
-  "border-image-repeat": {
-    domProp: "borderImageRepeat",
-    inherited: false,
-    type: CSS_TYPE_LONGHAND,
-    initial_values: [ "stretch", "stretch stretch" ],
-    other_values: [ "round", "repeat", "stretch round", "repeat round", "stretch repeat", "round round", "repeat repeat" ],
-    invalid_values: [ "none", "stretch stretch stretch", "0", "10", "0%", "0px" ]
-  },
-  "-moz-border-left-colors": {
-    domProp: "MozBorderLeftColors",
-    inherited: false,
-    type: CSS_TYPE_LONGHAND,
-    initial_values: [ "none" ],
-    other_values: [ "red green", "red #fc3", "#ff00cc", "currentColor", "blue currentColor orange currentColor" ],
-    invalid_values: [ "red none", "red inherit", "red, green", "none red", "inherit red", "ff00cc" ]
-  },
-  "border-radius": {
-    domProp: "borderRadius",
-    inherited: false,
-    type: CSS_TYPE_TRUE_SHORTHAND,
-    prerequisites: { "width": "200px", "height": "100px", "display": "inline-block"},
-    subproperties: [ "border-bottom-left-radius", "border-bottom-right-radius", "border-top-left-radius", "border-top-right-radius" ],
-    initial_values: [ "0", "0px", "0%", "0px 0 0 0px", "calc(-2px)", "calc(-1%)", "calc(0px) calc(0pt) calc(0%) calc(0em)" ],
-    other_values: [ "3%", "1px", "2em", "3em 2px", "2pt 3% 4em", "2px 2px 2px 2px", // circular
-            "3% / 2%", "1px / 4px", "2em / 1em", "3em 2px / 2px 3em", "2pt 3% 4em / 4pt 1% 5em", "2px 2px 2px 2px / 4px 4px 4px 4px", "1pt / 2pt 3pt", "4pt 5pt / 3pt", // elliptical
-      "calc(2px)",
-      "calc(50%)",
-      "calc(3*25px)",
-      "calc(3*25px) 5px",
-      "5px calc(3*25px)",
-      "calc(20%) calc(3*25px)",
-      "calc(25px*3)",
-      "calc(3*25px + 50%)",
-      "2px 2px calc(2px + 1%) 2px",
-      "1px 2px 2px 2px / 2px 2px calc(2px + 1%) 2px",
-            ],
-    invalid_values: [ "2px -2px", "inherit 2px", "inherit / 2px", "2px inherit", "2px / inherit", "2px 2px 2px 2px 2px", "1px / 2px 2px 2px 2px 2px", "2", "2 2", "2px 2px 2px 2px / 2px 2px 2 2px" ]
-  },
-  "border-bottom-left-radius": {
-    domProp: "borderBottomLeftRadius",
-    inherited: false,
-    type: CSS_TYPE_LONGHAND,
-    prerequisites: { "width": "200px", "height": "100px", "display": "inline-block"},
-    initial_values: [ "0", "0px", "0%", "calc(-2px)", "calc(-1%)" ],
-    other_values: [ "3%", "1px", "2em", // circular
-            "3% 2%", "1px 4px", "2em 2pt", // elliptical
-      "calc(2px)",
-      "calc(50%)",
-      "calc(3*25px)",
-      "calc(3*25px) 5px",
-      "5px calc(3*25px)",
-      "calc(20%) calc(3*25px)",
-      "calc(25px*3)",
-      "calc(3*25px + 50%)",
-            ],
-    invalid_values: [ "-1px", "4px -2px", "inherit 2px", "2px inherit", "2", "2px 2", "2 2px" ]
-  },
-  "border-bottom-right-radius": {
-    domProp: "borderBottomRightRadius",
-    inherited: false,
-    type: CSS_TYPE_LONGHAND,
-    prerequisites: { "width": "200px", "height": "100px", "display": "inline-block"},
-    initial_values: [ "0", "0px", "0%", "calc(-2px)", "calc(-1%)" ],
-    other_values: [ "3%", "1px", "2em", // circular
-            "3% 2%", "1px 4px", "2em 2pt", // elliptical
-      "calc(2px)",
-      "calc(50%)",
-      "calc(3*25px)",
-      "calc(3*25px) 5px",
-      "5px calc(3*25px)",
-      "calc(20%) calc(3*25px)",
-      "calc(25px*3)",
-      "calc(3*25px + 50%)",
-            ],
-    invalid_values: [ "-1px", "4px -2px", "inherit 2px", "2px inherit", "2", "2px 2", "2 2px" ]
-  },
-  "border-top-left-radius": {
-    domProp: "borderTopLeftRadius",
-    inherited: false,
-    type: CSS_TYPE_LONGHAND,
-    prerequisites: { "width": "200px", "height": "100px", "display": "inline-block"},
-    initial_values: [ "0", "0px", "0%", "calc(-2px)", "calc(-1%)" ],
-    other_values: [ "3%", "1px", "2em", // circular
-            "3% 2%", "1px 4px", "2em 2pt", // elliptical
-      "calc(2px)",
-      "calc(50%)",
-      "calc(3*25px)",
-      "calc(3*25px) 5px",
-      "5px calc(3*25px)",
-      "calc(20%) calc(3*25px)",
-      "calc(25px*3)",
-      "calc(3*25px + 50%)",
-            ],
-    invalid_values: [ "-1px", "4px -2px", "inherit 2px", "2px inherit", "2", "2px 2", "2 2px" ]
-  },
-  "border-top-right-radius": {
-    domProp: "borderTopRightRadius",
-    inherited: false,
-    type: CSS_TYPE_LONGHAND,
-    prerequisites: { "width": "200px", "height": "100px", "display": "inline-block"},
-    initial_values: [ "0", "0px", "0%", "calc(-2px)", "calc(-1%)" ],
-    other_values: [ "3%", "1px", "2em", // circular
-            "3% 2%", "1px 4px", "2em 2pt", // elliptical
-      "calc(2px)",
-      "calc(50%)",
-      "calc(3*25px)",
-      "calc(3*25px) 5px",
-      "5px calc(3*25px)",
-      "calc(20%) calc(3*25px)",
-      "calc(25px*3)",
-      "calc(3*25px + 50%)",
-            ],
-    invalid_values: [ "-1px", "4px -2px", "inherit 2px", "2px inherit", "2", "2px 2", "2 2px" ]
-  },
-  "-moz-border-right-colors": {
-    domProp: "MozBorderRightColors",
-    inherited: false,
-    type: CSS_TYPE_LONGHAND,
-    initial_values: [ "none" ],
-    other_values: [ "red green", "red #fc3", "#ff00cc", "currentColor", "blue currentColor orange currentColor" ],
-    invalid_values: [ "red none", "red inherit", "red, green", "none red", "inherit red", "ff00cc" ]
-  },
-  "-moz-border-start": {
-    domProp: "MozBorderStart",
-    inherited: false,
-    type: CSS_TYPE_TRUE_SHORTHAND,
-    subproperties: [ "-moz-border-start-color", "-moz-border-start-style", "-moz-border-start-width" ],
-    initial_values: [ "none", "medium", "currentColor", "thin", "none medium currentcolor" ],
-    other_values: [ "solid", "green", "medium solid", "green solid", "10px solid", "thick solid", "5px green none" ],
-    invalid_values: [ "5%", "5", "5 green solid" ]
-  },
-  "-moz-border-start-color": {
-    domProp: "MozBorderStartColor",
-    inherited: false,
-    type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
-    get_computed: logical_box_prop_get_computed,
-    initial_values: [ "currentColor" ],
-    other_values: [ "green", "rgba(255,128,0,0.5)", "transparent" ],
-    invalid_values: [ "#0", "#00", "#0000", "#00000", "#0000000", "#00000000", "#000000000", "000000" ]
-  },
-  "-moz-border-start-style": {
-    domProp: "MozBorderStartStyle",
-    inherited: false,
-    type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
-    get_computed: logical_box_prop_get_computed,
-    /* XXX hidden is sometimes the same as initial */
-    initial_values: [ "none" ],
-    other_values: [ "solid", "dashed", "dotted", "double", "outset", "inset", "groove", "ridge" ],
-    invalid_values: []
-  },
-  "-moz-border-start-width": {
-    domProp: "MozBorderStartWidth",
-    inherited: false,
-    type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
-    get_computed: logical_box_prop_get_computed,
-    prerequisites: { "-moz-border-start-style": "solid" },
-    initial_values: [ "medium", "3px", "calc(4px - 1px)" ],
-    other_values: [ "thin", "thick", "1px", "2em",
-      "calc(2px)",
-      "calc(-2px)",
-      "calc(0em)",
-      "calc(0px)",
-      "calc(5em)",
-      "calc(3*25px)",
-      "calc(25px*3)",
-      "calc(3*25px + 5em)",
-    ],
-    invalid_values: [ "5%", "5" ]
-  },
-  "-moz-border-top-colors": {
-    domProp: "MozBorderTopColors",
-    inherited: false,
-    type: CSS_TYPE_LONGHAND,
-    initial_values: [ "none" ],
-    other_values: [ "red green", "red #fc3", "#ff00cc", "currentColor", "blue currentColor orange currentColor" ],
-    invalid_values: [ "red none", "red inherit", "red, green", "none red", "inherit red", "ff00cc" ]
-  },
-  "-moz-box-align": {
-    domProp: "MozBoxAlign",
-    inherited: false,
-    type: CSS_TYPE_LONGHAND,
-    initial_values: [ "stretch" ],
-    other_values: [ "start", "center", "baseline", "end" ],
-    invalid_values: []
-  },
-  "-moz-box-direction": {
-    domProp: "MozBoxDirection",
-    inherited: false,
-    type: CSS_TYPE_LONGHAND,
-    initial_values: [ "normal" ],
-    other_values: [ "reverse" ],
-    invalid_values: []
-  },
-  "-moz-box-flex": {
-    domProp: "MozBoxFlex",
-    inherited: false,
-    type: CSS_TYPE_LONGHAND,
-    initial_values: [ "0", "0.0", "-0.0" ],
-    other_values: [ "1", "100", "0.1" ],
-    invalid_values: [ "10px", "-1" ]
-  },
-  "-moz-box-ordinal-group": {
-    domProp: "MozBoxOrdinalGroup",
-    inherited: false,
-    type: CSS_TYPE_LONGHAND,
-    initial_values: [ "1" ],
-    other_values: [ "2", "100", "0" ],
-    invalid_values: [ "1.0", "-1", "-1000" ]
-  },
-  "-moz-box-orient": {
-    domProp: "MozBoxOrient",
-    inherited: false,
-    type: CSS_TYPE_LONGHAND,
-    initial_values: [ "horizontal", "inline-axis" ],
-    other_values: [ "vertical", "block-axis" ],
-    invalid_values: []
-  },
-  "-moz-box-pack": {
-    domProp: "MozBoxPack",
-    inherited: false,
-    type: CSS_TYPE_LONGHAND,
-    initial_values: [ "start" ],
-    other_values: [ "center", "end", "justify" ],
-    invalid_values: []
-  },
-  "box-sizing": {
-    domProp: "boxSizing",
-    inherited: false,
-    type: CSS_TYPE_LONGHAND,
-    initial_values: [ "content-box" ],
-    other_values: [ "border-box", "padding-box" ],
-    invalid_values: [ "margin-box", "content", "padding", "border", "margin" ]
-  },
-  "-moz-box-sizing": {
-    domProp: "MozBoxSizing",
-    inherited: false,
-    type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
-    alias_for: "box-sizing",
-    subproperties: [ "box-sizing" ],
-    initial_values: [ "content-box" ],
-    other_values: [ "border-box", "padding-box" ],
-    invalid_values: [ "margin-box", "content", "padding", "border", "margin" ]
-  },
-  "-moz-columns": {
-    domProp: "MozColumns",
-    inherited: false,
-    type: CSS_TYPE_TRUE_SHORTHAND,
-    subproperties: [ "-moz-column-count", "-moz-column-width" ],
-    initial_values: [ "auto", "auto auto" ],
-    other_values: [ "3", "20px", "2 10px", "10px 2", "2 auto", "auto 2", "auto 50px", "50px auto" ],
-    invalid_values: [ "5%", "-1px", "-1", "3 5", "10px 4px", "10 2px 5in", "30px -1",
-                      "auto 3 5px", "5 auto 20px", "auto auto auto" ]
-  },
-  "-moz-column-count": {
-    domProp: "MozColumnCount",
-    inherited: false,
-    type: CSS_TYPE_LONGHAND,
-    initial_values: [ "auto" ],
-    other_values: [ "1", "17" ],
-    // negative and zero invalid per editor's draft
-    invalid_values: [ "-1", "0", "3px" ]
-  },
+	"animation": {
+		domProp: "animation",
+		inherited: false,
+		type: CSS_TYPE_TRUE_SHORTHAND,
+		subproperties: [ "animation-name", "animation-duration", "animation-timing-function", "animation-delay", "animation-direction", "animation-fill-mode", "animation-iteration-count" ],
+		initial_values: [ "none none 0s 0s ease normal 1.0", "none", "0s", "ease", "normal", "1.0" ],
+		other_values: [ "bounce 1s linear 2s", "bounce 1s 2s linear", "bounce linear 1s 2s", "linear bounce 1s 2s", "linear 1s bounce 2s", "linear 1s 2s bounce", "1s bounce linear 2s", "1s bounce 2s linear", "1s 2s bounce linear", "1s linear bounce 2s", "1s linear 2s bounce", "1s 2s linear bounce", "bounce linear 1s", "bounce 1s linear", "linear bounce 1s", "linear 1s bounce", "1s bounce linear", "1s linear bounce", "1s 2s bounce", "1s bounce 2s", "bounce 1s 2s", "1s 2s linear", "1s linear 2s", "linear 1s 2s", "bounce 1s", "1s bounce", "linear 1s", "1s linear", "1s 2s", "2s 1s", "bounce", "linear", "1s", "height", "2s", "ease-in-out", "2s ease-in", "opacity linear", "ease-out 2s", "2s color, 1s bounce, 500ms height linear, 1s opacity 4s cubic-bezier(0.0, 0.1, 1.0, 1.0)", "1s \\32bounce linear 2s", "1s -bounce linear 2s", "1s -\\32bounce linear 2s", "1s \\32 0bounce linear 2s", "1s -\\32 0bounce linear 2s", "1s \\2bounce linear 2s", "1s -\\2bounce linear 2s", "2s, 1s bounce", "1s bounce, 2s", "2s all, 1s bounce", "1s bounce, 2s all", "1s bounce, 2s none", "2s none, 1s bounce", "2s bounce, 1s all", "2s all, 1s bounce" ],
+		invalid_values: [  "2s inherit", "inherit 2s", "2s bounce, 1s inherit", "2s inherit, 1s bounce", "2s initial", "2s all,, 1s bounce", "2s all, , 1s bounce" ]
+	},
+	"animation-delay": {
+		domProp: "animationDelay",
+		inherited: false,
+		type: CSS_TYPE_LONGHAND,
+		initial_values: [ "0s", "0ms" ],
+		other_values: [ "1s", "250ms", "-100ms", "-1s", "1s, 250ms, 2.3s"],
+		invalid_values: [ "0", "0px" ]
+	},
+	"animation-direction": {
+		domProp: "animationDirection",
+		inherited: false,
+		type: CSS_TYPE_LONGHAND,
+		initial_values: [ "normal" ],
+		other_values: [ "alternate", "normal, alternate", "alternate, normal", "normal, normal", "normal, normal, normal", "reverse", "alternate-reverse", "normal, reverse, alternate-reverse, alternate" ],
+		invalid_values: [ "normal normal", "inherit, normal", "reverse-alternate" ]
+	},
+	"animation-duration": {
+		domProp: "animationDuration",
+		inherited: false,
+		type: CSS_TYPE_LONGHAND,
+		initial_values: [ "0s", "0ms" ],
+		other_values: [ "1s", "250ms", "1s, 250ms, 2.3s"],
+		invalid_values: [ "0", "0px", "-1ms", "-2s" ]
+	},
+	"animation-fill-mode": {
+		domProp: "animationFillMode",
+		inherited: false,
+		type: CSS_TYPE_LONGHAND,
+		initial_values: [ "none" ],
+		other_values: [ "forwards", "backwards", "both", "none, none", "forwards, backwards", "forwards, none", "none, both" ],
+		invalid_values: [ "all"]
+	},
+	"animation-iteration-count": {
+		domProp: "animationIterationCount",
+		inherited: false,
+		type: CSS_TYPE_LONGHAND,
+		initial_values: [ "1" ],
+		other_values: [ "infinite", "0", "0.5", "7.75", "-0.0", "1, 2, 3", "infinite, 2", "1, infinite" ],
+		// negatives forbidden per
+		// http://lists.w3.org/Archives/Public/www-style/2011Mar/0355.html
+		invalid_values: [ "none", "-1", "-0.5", "-1, infinite", "infinite, -3" ]
+	},
+	"animation-name": {
+		domProp: "animationName",
+		inherited: false,
+		type: CSS_TYPE_LONGHAND,
+		initial_values: [ "none" ],
+		other_values: [ "all", "ball", "mall", "color", "bounce, bubble, opacity", "foobar", "auto", "\\32bounce", "-bounce", "-\\32bounce", "\\32 0bounce", "-\\32 0bounce", "\\2bounce", "-\\2bounce" ],
+		invalid_values: [ "bounce, initial", "initial, bounce", "bounce, inherit", "inherit, bounce" ]
+	},
+	"animation-play-state": {
+		domProp: "animationPlayState",
+		inherited: false,
+		type: CSS_TYPE_LONGHAND,
+		initial_values: [ "running" ],
+		other_values: [ "paused", "running, running", "paused, running", "paused, paused", "running, paused", "paused, running, running, running, paused, running" ],
+		invalid_values: [ "0" ]
+	},
+	"animation-timing-function": {
+		domProp: "animationTimingFunction",
+		inherited: false,
+		type: CSS_TYPE_LONGHAND,
+		initial_values: [ "ease", "cubic-bezier(0.25, 0.1, 0.25, 1.0)" ],
+		other_values: [ "linear", "ease-in", "ease-out", "ease-in-out", "linear, ease-in, cubic-bezier(0.1, 0.2, 0.8, 0.9)", "cubic-bezier(0.5, 0.5, 0.5, 0.5)", "cubic-bezier(0.25, 1.5, 0.75, -0.5)", "step-start", "step-end", "steps(1)", "steps(2, start)", "steps(386)", "steps(3, end)" ],
+		invalid_values: [ "none", "auto", "cubic-bezier(0.25, 0.1, 0.25)", "cubic-bezier(0.25, 0.1, 0.25, 0.25, 1.0)", "cubic-bezier(-0.5, 0.5, 0.5, 0.5)", "cubic-bezier(1.5, 0.5, 0.5, 0.5)", "cubic-bezier(0.5, 0.5, -0.5, 0.5)", "cubic-bezier(0.5, 0.5, 1.5, 0.5)", "steps(2, step-end)", "steps(0)", "steps(-2)", "steps(0, step-end, 1)" ]
+	},
+	"-moz-appearance": {
+		domProp: "MozAppearance",
+		inherited: false,
+		type: CSS_TYPE_LONGHAND,
+		initial_values: [ "none" ],
+		other_values: [ "radio", "menulist" ],
+		invalid_values: []
+	},
+	"-moz-background-inline-policy": {
+		domProp: "MozBackgroundInlinePolicy",
+		inherited: false,
+		type: CSS_TYPE_LONGHAND,
+		initial_values: [ "continuous" ],
+		other_values: ["bounding-box", "each-box" ],
+		invalid_values: []
+	},
+	"-moz-binding": {
+		domProp: "MozBinding",
+		inherited: false,
+		type: CSS_TYPE_LONGHAND,
+		initial_values: [ "none" ],
+		other_values: [ "url(foo.xml)" ],
+		invalid_values: []
+	},
+	"-moz-border-bottom-colors": {
+		domProp: "MozBorderBottomColors",
+		inherited: false,
+		type: CSS_TYPE_LONGHAND,
+		initial_values: [ "none" ],
+		other_values: [ "red green", "red #fc3", "#ff00cc", "currentColor", "blue currentColor orange currentColor" ],
+		invalid_values: [ "red none", "red inherit", "red, green", "none red", "inherit red", "ff00cc" ]
+	},
+	"-moz-border-end": {
+		domProp: "MozBorderEnd",
+		inherited: false,
+		type: CSS_TYPE_TRUE_SHORTHAND,
+		subproperties: [ "-moz-border-end-color", "-moz-border-end-style", "-moz-border-end-width" ],
+		initial_values: [ "none", "medium", "currentColor", "thin", "none medium currentcolor" ],
+		other_values: [ "solid", "green", "medium solid", "green solid", "10px solid", "thick solid", "5px green none" ],
+		invalid_values: [ "5%", "5", "5 green none" ]
+	},
+	"-moz-border-end-color": {
+		domProp: "MozBorderEndColor",
+		inherited: false,
+		type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
+		get_computed: logical_box_prop_get_computed,
+		initial_values: [ "currentColor" ],
+		other_values: [ "green", "rgba(255,128,0,0.5)", "transparent" ],
+		invalid_values: [ "#0", "#00", "#0000", "#00000", "#0000000", "#00000000", "#000000000", "000000" ]
+	},
+	"-moz-border-end-style": {
+		domProp: "MozBorderEndStyle",
+		inherited: false,
+		type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
+		get_computed: logical_box_prop_get_computed,
+		/* XXX hidden is sometimes the same as initial */
+		initial_values: [ "none" ],
+		other_values: [ "solid", "dashed", "dotted", "double", "outset", "inset", "groove", "ridge" ],
+		invalid_values: []
+	},
+	"-moz-border-end-width": {
+		domProp: "MozBorderEndWidth",
+		inherited: false,
+		type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
+		get_computed: logical_box_prop_get_computed,
+		prerequisites: { "-moz-border-end-style": "solid" },
+		initial_values: [ "medium", "3px", "calc(4px - 1px)" ],
+		other_values: [ "thin", "thick", "1px", "2em",
+			"calc(2px)",
+			"calc(-2px)",
+			"calc(0em)",
+			"calc(0px)",
+			"calc(5em)",
+			"calc(3*25px)",
+			"calc(25px*3)",
+			"calc(3*25px + 5em)",
+		],
+		invalid_values: [ "5%", "5" ]
+	},
+	"border-image": {
+		domProp: "borderImage",
+		inherited: false,
+		type: CSS_TYPE_TRUE_SHORTHAND,
+		subproperties: [ "border-image-source", "border-image-slice", "border-image-width", "border-image-outset", "border-image-repeat" ],
+		initial_values: [ "none" ],
+		other_values: [ "url('border.png') 27 27 27 27",
+						"url('border.png') 27",
+						"stretch url('border.png')",
+						"url('border.png') 27 fill",
+						"url('border.png') 27 27 27 27 repeat",
+						"repeat url('border.png') 27 27 27 27",
+						"url('border.png') repeat 27 27 27 27",
+						"url('border.png') fill 27 27 27 27 repeat",
+						"url('border.png') 27 27 27 27 / 1em",
+						"27 27 27 27 / 1em url('border.png') ",
+						"url('border.png') 27 27 27 27 / 10 10 10 / 10 10 repeat",
+						"repeat 27 27 27 27 / 10 10 10 / 10 10 url('border.png')",
+						"url('border.png') 27 27 27 27 / / 10 10 1em",
+						"fill 27 27 27 27 / / 10 10 1em url('border.png')",
+						"url('border.png') 27 27 27 27 / 1em 1em 1em 1em repeat",
+						"url('border.png') 27 27 27 27 / 1em 1em 1em 1em stretch round" ],
+		invalid_values: [ "url('border.png') 27 27 27 27 27",
+						  "url('border.png') 27 27 27 27 / 1em 1em 1em 1em 1em",
+						  "url('border.png') 27 27 27 27 /",
+						  "url('border.png') fill",
+						  "url('border.png') fill repeat",
+						  "fill repeat",
+						  "url('border.png') fill / 1em",
+						  "url('border.png') / repeat",
+						  "url('border.png') 1 /",
+						  "url('border.png') 1 / /",
+						  "1 / url('border.png')",
+						  "url('border.png') / 1",
+						  "url('border.png') / / 1"]
+	},
+	"border-image-source": {
+		domProp: "borderImageSource",
+		inherited: false,
+		type: CSS_TYPE_LONGHAND,
+		initial_values: [ "none" ],
+		other_values: [
+		"url('border.png')"
+		].concat(validGradientAndElementValues),
+		invalid_values: [
+			"url('border.png') url('border.png')",
+		].concat(invalidGradientAndElementValues),
+		unbalanced_values: [
+		].concat(unbalancedGradientAndElementValues)
+	},
+	"border-image-slice": {
+		domProp: "borderImageSlice",
+		inherited: false,
+		type: CSS_TYPE_LONGHAND,
+		initial_values: [ "100%", "100% 100% 100% 100%" ],
+		other_values: [ "0%", "10", "10 100% 0 2", "0 0 0 0", "fill 10 10", "10 10 fill" ],
+		invalid_values: [ "-10%", "-10", "10 10 10 10 10", "10 10 10 10 -10", "10px", "-10px", "fill", "fill fill 10px", "10px fill fill" ]
+	},
+	"border-image-width": {
+		domProp: "borderImageWidth",
+		inherited: false,
+		type: CSS_TYPE_LONGHAND,
+		initial_values: [ "1", "1 1 1 1" ],
+		other_values: [ "0", "0%", "0px", "auto auto auto auto", "10 10% auto 15px", "10px 10px 10px 10px", "10", "10 10", "10 10 10" ],
+		invalid_values: [ "-10", "-10px", "-10%", "10 10 10 10 10", "10 10 10 10 auto", "auto auto auto auto auto" ]
+	},
+	"border-image-outset": {
+		domProp: "borderImageOutset",
+		inherited: false,
+		type: CSS_TYPE_LONGHAND,
+		initial_values: [ "0", "0 0 0 0" ],
+		other_values: [ "10px", "10", "10 10", "10 10 10", "10 10 10 10", "10px 10 10 10px" ],
+		invalid_values: [ "-10", "-10px", "-10%", "10%", "10 10 10 10 10" ]
+	},
+	"border-image-repeat": {
+		domProp: "borderImageRepeat",
+		inherited: false,
+		type: CSS_TYPE_LONGHAND,
+		initial_values: [ "stretch", "stretch stretch" ],
+		other_values: [ "round", "repeat", "stretch round", "repeat round", "stretch repeat", "round round", "repeat repeat" ],
+		invalid_values: [ "none", "stretch stretch stretch", "0", "10", "0%", "0px" ]
+	},
+	"-moz-border-left-colors": {
+		domProp: "MozBorderLeftColors",
+		inherited: false,
+		type: CSS_TYPE_LONGHAND,
+		initial_values: [ "none" ],
+		other_values: [ "red green", "red #fc3", "#ff00cc", "currentColor", "blue currentColor orange currentColor" ],
+		invalid_values: [ "red none", "red inherit", "red, green", "none red", "inherit red", "ff00cc" ]
+	},
+	"border-radius": {
+		domProp: "borderRadius",
+		inherited: false,
+		type: CSS_TYPE_TRUE_SHORTHAND,
+		prerequisites: { "width": "200px", "height": "100px", "display": "inline-block"},
+		subproperties: [ "border-bottom-left-radius", "border-bottom-right-radius", "border-top-left-radius", "border-top-right-radius" ],
+		initial_values: [ "0", "0px", "0%", "0px 0 0 0px", "calc(-2px)", "calc(-1%)", "calc(0px) calc(0pt) calc(0%) calc(0em)" ],
+		other_values: [ "3%", "1px", "2em", "3em 2px", "2pt 3% 4em", "2px 2px 2px 2px", // circular
+						"3% / 2%", "1px / 4px", "2em / 1em", "3em 2px / 2px 3em", "2pt 3% 4em / 4pt 1% 5em", "2px 2px 2px 2px / 4px 4px 4px 4px", "1pt / 2pt 3pt", "4pt 5pt / 3pt", // elliptical
+			"calc(2px)",
+			"calc(50%)",
+			"calc(3*25px)",
+			"calc(3*25px) 5px",
+			"5px calc(3*25px)",
+			"calc(20%) calc(3*25px)",
+			"calc(25px*3)",
+			"calc(3*25px + 50%)",
+			"2px 2px calc(2px + 1%) 2px",
+			"1px 2px 2px 2px / 2px 2px calc(2px + 1%) 2px",
+					  ],
+		invalid_values: [ "2px -2px", "inherit 2px", "inherit / 2px", "2px inherit", "2px / inherit", "2px 2px 2px 2px 2px", "1px / 2px 2px 2px 2px 2px", "2", "2 2", "2px 2px 2px 2px / 2px 2px 2 2px" ]
+	},
+	"border-bottom-left-radius": {
+		domProp: "borderBottomLeftRadius",
+		inherited: false,
+		type: CSS_TYPE_LONGHAND,
+		prerequisites: { "width": "200px", "height": "100px", "display": "inline-block"},
+		initial_values: [ "0", "0px", "0%", "calc(-2px)", "calc(-1%)" ],
+		other_values: [ "3%", "1px", "2em", // circular
+						"3% 2%", "1px 4px", "2em 2pt", // elliptical
+			"calc(2px)",
+			"calc(50%)",
+			"calc(3*25px)",
+			"calc(3*25px) 5px",
+			"5px calc(3*25px)",
+			"calc(20%) calc(3*25px)",
+			"calc(25px*3)",
+			"calc(3*25px + 50%)",
+					  ],
+		invalid_values: [ "-1px", "4px -2px", "inherit 2px", "2px inherit", "2", "2px 2", "2 2px" ]
+	},
+	"border-bottom-right-radius": {
+		domProp: "borderBottomRightRadius",
+		inherited: false,
+		type: CSS_TYPE_LONGHAND,
+		prerequisites: { "width": "200px", "height": "100px", "display": "inline-block"},
+		initial_values: [ "0", "0px", "0%", "calc(-2px)", "calc(-1%)" ],
+		other_values: [ "3%", "1px", "2em", // circular
+						"3% 2%", "1px 4px", "2em 2pt", // elliptical
+			"calc(2px)",
+			"calc(50%)",
+			"calc(3*25px)",
+			"calc(3*25px) 5px",
+			"5px calc(3*25px)",
+			"calc(20%) calc(3*25px)",
+			"calc(25px*3)",
+			"calc(3*25px + 50%)",
+					  ],
+		invalid_values: [ "-1px", "4px -2px", "inherit 2px", "2px inherit", "2", "2px 2", "2 2px" ]
+	},
+	"border-top-left-radius": {
+		domProp: "borderTopLeftRadius",
+		inherited: false,
+		type: CSS_TYPE_LONGHAND,
+		prerequisites: { "width": "200px", "height": "100px", "display": "inline-block"},
+		initial_values: [ "0", "0px", "0%", "calc(-2px)", "calc(-1%)" ],
+		other_values: [ "3%", "1px", "2em", // circular
+						"3% 2%", "1px 4px", "2em 2pt", // elliptical
+			"calc(2px)",
+			"calc(50%)",
+			"calc(3*25px)",
+			"calc(3*25px) 5px",
+			"5px calc(3*25px)",
+			"calc(20%) calc(3*25px)",
+			"calc(25px*3)",
+			"calc(3*25px + 50%)",
+					  ],
+		invalid_values: [ "-1px", "4px -2px", "inherit 2px", "2px inherit", "2", "2px 2", "2 2px" ]
+	},
+	"border-top-right-radius": {
+		domProp: "borderTopRightRadius",
+		inherited: false,
+		type: CSS_TYPE_LONGHAND,
+		prerequisites: { "width": "200px", "height": "100px", "display": "inline-block"},
+		initial_values: [ "0", "0px", "0%", "calc(-2px)", "calc(-1%)" ],
+		other_values: [ "3%", "1px", "2em", // circular
+						"3% 2%", "1px 4px", "2em 2pt", // elliptical
+			"calc(2px)",
+			"calc(50%)",
+			"calc(3*25px)",
+			"calc(3*25px) 5px",
+			"5px calc(3*25px)",
+			"calc(20%) calc(3*25px)",
+			"calc(25px*3)",
+			"calc(3*25px + 50%)",
+					  ],
+		invalid_values: [ "-1px", "4px -2px", "inherit 2px", "2px inherit", "2", "2px 2", "2 2px" ]
+	},
+	"-moz-border-right-colors": {
+		domProp: "MozBorderRightColors",
+		inherited: false,
+		type: CSS_TYPE_LONGHAND,
+		initial_values: [ "none" ],
+		other_values: [ "red green", "red #fc3", "#ff00cc", "currentColor", "blue currentColor orange currentColor" ],
+		invalid_values: [ "red none", "red inherit", "red, green", "none red", "inherit red", "ff00cc" ]
+	},
+	"-moz-border-start": {
+		domProp: "MozBorderStart",
+		inherited: false,
+		type: CSS_TYPE_TRUE_SHORTHAND,
+		subproperties: [ "-moz-border-start-color", "-moz-border-start-style", "-moz-border-start-width" ],
+		initial_values: [ "none", "medium", "currentColor", "thin", "none medium currentcolor" ],
+		other_values: [ "solid", "green", "medium solid", "green solid", "10px solid", "thick solid", "5px green none" ],
+		invalid_values: [ "5%", "5", "5 green solid" ]
+	},
+	"-moz-border-start-color": {
+		domProp: "MozBorderStartColor",
+		inherited: false,
+		type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
+		get_computed: logical_box_prop_get_computed,
+		initial_values: [ "currentColor" ],
+		other_values: [ "green", "rgba(255,128,0,0.5)", "transparent" ],
+		invalid_values: [ "#0", "#00", "#0000", "#00000", "#0000000", "#00000000", "#000000000", "000000" ]
+	},
+	"-moz-border-start-style": {
+		domProp: "MozBorderStartStyle",
+		inherited: false,
+		type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
+		get_computed: logical_box_prop_get_computed,
+		/* XXX hidden is sometimes the same as initial */
+		initial_values: [ "none" ],
+		other_values: [ "solid", "dashed", "dotted", "double", "outset", "inset", "groove", "ridge" ],
+		invalid_values: []
+	},
+	"-moz-border-start-width": {
+		domProp: "MozBorderStartWidth",
+		inherited: false,
+		type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
+		get_computed: logical_box_prop_get_computed,
+		prerequisites: { "-moz-border-start-style": "solid" },
+		initial_values: [ "medium", "3px", "calc(4px - 1px)" ],
+		other_values: [ "thin", "thick", "1px", "2em",
+			"calc(2px)",
+			"calc(-2px)",
+			"calc(0em)",
+			"calc(0px)",
+			"calc(5em)",
+			"calc(3*25px)",
+			"calc(25px*3)",
+			"calc(3*25px + 5em)",
+		],
+		invalid_values: [ "5%", "5" ]
+	},
+	"-moz-border-top-colors": {
+		domProp: "MozBorderTopColors",
+		inherited: false,
+		type: CSS_TYPE_LONGHAND,
+		initial_values: [ "none" ],
+		other_values: [ "red green", "red #fc3", "#ff00cc", "currentColor", "blue currentColor orange currentColor" ],
+		invalid_values: [ "red none", "red inherit", "red, green", "none red", "inherit red", "ff00cc" ]
+	},
+	"-moz-box-align": {
+		domProp: "MozBoxAlign",
+		inherited: false,
+		type: CSS_TYPE_LONGHAND,
+		initial_values: [ "stretch" ],
+		other_values: [ "start", "center", "baseline", "end" ],
+		invalid_values: []
+	},
+	"-moz-box-direction": {
+		domProp: "MozBoxDirection",
+		inherited: false,
+		type: CSS_TYPE_LONGHAND,
+		initial_values: [ "normal" ],
+		other_values: [ "reverse" ],
+		invalid_values: []
+	},
+	"-moz-box-flex": {
+		domProp: "MozBoxFlex",
+		inherited: false,
+		type: CSS_TYPE_LONGHAND,
+		initial_values: [ "0", "0.0", "-0.0" ],
+		other_values: [ "1", "100", "0.1" ],
+		invalid_values: [ "10px", "-1" ]
+	},
+	"-moz-box-ordinal-group": {
+		domProp: "MozBoxOrdinalGroup",
+		inherited: false,
+		type: CSS_TYPE_LONGHAND,
+		initial_values: [ "1" ],
+		other_values: [ "2", "100", "0" ],
+		invalid_values: [ "1.0", "-1", "-1000" ]
+	},
+	"-moz-box-orient": {
+		domProp: "MozBoxOrient",
+		inherited: false,
+		type: CSS_TYPE_LONGHAND,
+		initial_values: [ "horizontal", "inline-axis" ],
+		other_values: [ "vertical", "block-axis" ],
+		invalid_values: []
+	},
+	"-moz-box-pack": {
+		domProp: "MozBoxPack",
+		inherited: false,
+		type: CSS_TYPE_LONGHAND,
+		initial_values: [ "start" ],
+		other_values: [ "center", "end", "justify" ],
+		invalid_values: []
+	},
+	"box-sizing": {
+		domProp: "boxSizing",
+		inherited: false,
+		type: CSS_TYPE_LONGHAND,
+		initial_values: [ "content-box" ],
+		other_values: [ "border-box", "padding-box" ],
+		invalid_values: [ "margin-box", "content", "padding", "border", "margin" ]
+	},
+	"-moz-box-sizing": {
+		domProp: "MozBoxSizing",
+		inherited: false,
+		type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
+		alias_for: "box-sizing",
+		subproperties: [ "box-sizing" ],
+		initial_values: [ "content-box" ],
+		other_values: [ "border-box", "padding-box" ],
+		invalid_values: [ "margin-box", "content", "padding", "border", "margin" ]
+	},
+	"-moz-columns": {
+		domProp: "MozColumns",
+		inherited: false,
+		type: CSS_TYPE_TRUE_SHORTHAND,
+		subproperties: [ "-moz-column-count", "-moz-column-width" ],
+		initial_values: [ "auto", "auto auto" ],
+		other_values: [ "3", "20px", "2 10px", "10px 2", "2 auto", "auto 2", "auto 50px", "50px auto" ],
+		invalid_values: [ "5%", "-1px", "-1", "3 5", "10px 4px", "10 2px 5in", "30px -1",
+		                  "auto 3 5px", "5 auto 20px", "auto auto auto" ]
+	},
+	"-moz-column-count": {
+		domProp: "MozColumnCount",
+		inherited: false,
+		type: CSS_TYPE_LONGHAND,
+		initial_values: [ "auto" ],
+		other_values: [ "1", "17" ],
+		// negative and zero invalid per editor's draft
+		invalid_values: [ "-1", "0", "3px" ]
+	},
         "-moz-column-fill": {
                 domProp: "MozColumnFill",
                 inherited: false,
                 type: CSS_TYPE_LONGHAND,
                 initial_values: [ "balance" ],
                 other_values: [ "auto" ],
                 invalid_values: [ "2px", "dotted", "5em" ]
         },
-  "-moz-column-gap": {
-    domProp: "MozColumnGap",
-    inherited: false,
-    type: CSS_TYPE_LONGHAND,
-    initial_values: [ "normal", "1em", "calc(-2em + 3em)" ],
-    other_values: [ "2px", "4em",
-      "calc(2px)",
-      "calc(-2px)",
-      "calc(0px)",
-      "calc(0pt)",
-      "calc(5em)",
-      "calc(3*25px)",
-      "calc(25px*3)",
-      "calc(3*25px + 5em)",
-    ],
-    invalid_values: [ "3%", "-1px", "4" ]
-  },
-  "-moz-column-rule": {
-    domProp: "MozColumnRule",
-    inherited: false,
-    type: CSS_TYPE_TRUE_SHORTHAND,
-    prerequisites: { "color": "green" },
-    subproperties: [ "-moz-column-rule-width", "-moz-column-rule-style", "-moz-column-rule-color" ],
-    initial_values: [ "medium none currentColor", "none", "medium", "currentColor" ],
-    other_values: [ "2px blue solid", "red dotted 1px", "ridge 4px orange", "5px solid" ],
-    invalid_values: [ "2px 3px 4px red", "dotted dashed", "5px dashed green 3px", "5 solid", "5 green solid" ]
-  },
-  "-moz-column-rule-width": {
-    domProp: "MozColumnRuleWidth",
-    inherited: false,
-    type: CSS_TYPE_LONGHAND,
-    prerequisites: { "-moz-column-rule-style": "solid" },
-    initial_values: [
-      "medium",
-      "3px",
-      "-moz-calc(3px)",
-      "-moz-calc(5em + 3px - 5em)",
-      "calc(3px)",
-      "calc(5em + 3px - 5em)",
-    ],
-    other_values: [ "thin", "15px",
-      /* valid -moz-calc() values */
-      "-moz-calc(-2px)",
-      "-moz-calc(2px)",
-      "-moz-calc(3em)",
-      "-moz-calc(3em + 2px)",
-      "-moz-calc( 3em + 2px)",
-      "-moz-calc(3em + 2px )",
-      "-moz-calc( 3em + 2px )",
-      "-moz-calc(3*25px)",
-      "-moz-calc(3 *25px)",
-      "-moz-calc(3 * 25px)",
-      "-moz-calc(3* 25px)",
-      "-moz-calc(25px*3)",
-      "-moz-calc(25px *3)",
-      "-moz-calc(25px* 3)",
-      "-moz-calc(25px * 3)",
-      "-moz-calc(25px * 3 / 4)",
-      "-moz-calc((25px * 3) / 4)",
-      "-moz-calc(25px * (3 / 4))",
-      "-moz-calc(3 * 25px / 4)",
-      "-moz-calc((3 * 25px) / 4)",
-      "-moz-calc(3 * (25px / 4))",
-      "-moz-calc(3em + 25px * 3 / 4)",
-      "-moz-calc(3em + (25px * 3) / 4)",
-      "-moz-calc(3em + 25px * (3 / 4))",
-      "-moz-calc(25px * 3 / 4 + 3em)",
-      "-moz-calc((25px * 3) / 4 + 3em)",
-      "-moz-calc(25px * (3 / 4) + 3em)",
-      "-moz-calc(3em + (25px * 3 / 4))",
-      "-moz-calc(3em + ((25px * 3) / 4))",
-      "-moz-calc(3em + (25px * (3 / 4)))",
-      "-moz-calc((25px * 3 / 4) + 3em)",
-      "-moz-calc(((25px * 3) / 4) + 3em)",
-      "-moz-calc((25px * (3 / 4)) + 3em)",
-      "-moz-calc(3*25px + 1in)",
-      "-moz-calc(1in - 3em + 2px)",
-      "-moz-calc(1in - (3em + 2px))",
-      "-moz-calc((1in - 3em) + 2px)",
-      "-moz-calc(50px/2)",
-      "-moz-calc(50px/(2 - 1))",
-      "-moz-calc(-3px)",
-      /* numeric reduction cases */
-      "-moz-calc(5 * 3 * 2em)",
-      "-moz-calc(2em * 5 * 3)",
-      "-moz-calc((5 * 3) * 2em)",
-      "-moz-calc(2em * (5 * 3))",
-      "-moz-calc((5 + 3) * 2em)",
-      "-moz-calc(2em * (5 + 3))",
-      "-moz-calc(2em / (5 + 3))",
-      "-moz-calc(2em * (5*2 + 3))",
-      "-moz-calc(2em * ((5*2) + 3))",
-      "-moz-calc(2em * (5*(2 + 3)))",
+	"-moz-column-gap": {
+		domProp: "MozColumnGap",
+		inherited: false,
+		type: CSS_TYPE_LONGHAND,
+		initial_values: [ "normal", "1em", "calc(-2em + 3em)" ],
+		other_values: [ "2px", "4em",
+			"calc(2px)",
+			"calc(-2px)",
+			"calc(0px)",
+			"calc(0pt)",
+			"calc(5em)",
+			"calc(3*25px)",
+			"calc(25px*3)",
+			"calc(3*25px + 5em)",
+		],
+		invalid_values: [ "3%", "-1px", "4" ]
+	},
+	"-moz-column-rule": {
+		domProp: "MozColumnRule",
+		inherited: false,
+		type: CSS_TYPE_TRUE_SHORTHAND,
+		prerequisites: { "color": "green" },
+		subproperties: [ "-moz-column-rule-width", "-moz-column-rule-style", "-moz-column-rule-color" ],
+		initial_values: [ "medium none currentColor", "none", "medium", "currentColor" ],
+		other_values: [ "2px blue solid", "red dotted 1px", "ridge 4px orange", "5px solid" ],
+		invalid_values: [ "2px 3px 4px red", "dotted dashed", "5px dashed green 3px", "5 solid", "5 green solid" ]
+	},
+	"-moz-column-rule-width": {
+		domProp: "MozColumnRuleWidth",
+		inherited: false,
+		type: CSS_TYPE_LONGHAND,
+		prerequisites: { "-moz-column-rule-style": "solid" },
+		initial_values: [
+			"medium",
+			"3px",
+			"-moz-calc(3px)",
+			"-moz-calc(5em + 3px - 5em)",
+			"calc(3px)",
+			"calc(5em + 3px - 5em)",
+		],
+		other_values: [ "thin", "15px",
+			/* valid -moz-calc() values */
+			"-moz-calc(-2px)",
+			"-moz-calc(2px)",
+			"-moz-calc(3em)",
+			"-moz-calc(3em + 2px)",
+			"-moz-calc( 3em + 2px)",
+			"-moz-calc(3em + 2px )",
+			"-moz-calc( 3em + 2px )",
+			"-moz-calc(3*25px)",
+			"-moz-calc(3 *25px)",
+			"-moz-calc(3 * 25px)",
+			"-moz-calc(3* 25px)",
+			"-moz-calc(25px*3)",
+			"-moz-calc(25px *3)",
+			"-moz-calc(25px* 3)",
+			"-moz-calc(25px * 3)",
+			"-moz-calc(25px * 3 / 4)",
+			"-moz-calc((25px * 3) / 4)",
+			"-moz-calc(25px * (3 / 4))",
+			"-moz-calc(3 * 25px / 4)",
+			"-moz-calc((3 * 25px) / 4)",
+			"-moz-calc(3 * (25px / 4))",
+			"-moz-calc(3em + 25px * 3 / 4)",
+			"-moz-calc(3em + (25px * 3) / 4)",
+			"-moz-calc(3em + 25px * (3 / 4))",
+			"-moz-calc(25px * 3 / 4 + 3em)",
+			"-moz-calc((25px * 3) / 4 + 3em)",
+			"-moz-calc(25px * (3 / 4) + 3em)",
+			"-moz-calc(3em + (25px * 3 / 4))",
+			"-moz-calc(3em + ((25px * 3) / 4))",
+			"-moz-calc(3em + (25px * (3 / 4)))",
+			"-moz-calc((25px * 3 / 4) + 3em)",
+			"-moz-calc(((25px * 3) / 4) + 3em)",
+			"-moz-calc((25px * (3 / 4)) + 3em)",
+			"-moz-calc(3*25px + 1in)",
+			"-moz-calc(1in - 3em + 2px)",
+			"-moz-calc(1in - (3em + 2px))",
+			"-moz-calc((1in - 3em) + 2px)",
+			"-moz-calc(50px/2)",
+			"-moz-calc(50px/(2 - 1))",
+			"-moz-calc(-3px)",
+			/* numeric reduction cases */
+			"-moz-calc(5 * 3 * 2em)",
+			"-moz-calc(2em * 5 * 3)",
+			"-moz-calc((5 * 3) * 2em)",
+			"-moz-calc(2em * (5 * 3))",
+			"-moz-calc((5 + 3) * 2em)",
+			"-moz-calc(2em * (5 + 3))",
+			"-moz-calc(2em / (5 + 3))",
+			"-moz-calc(2em * (5*2 + 3))",
+			"-moz-calc(2em * ((5*2) + 3))",
+			"-moz-calc(2em * (5*(2 + 3)))",
 
-      "-moz-calc((5 + 7) * 3em)",
-      "-moz-calc((5em + 3em) - 2em)",
-      "-moz-calc((5em - 3em) + 2em)",
-      "-moz-calc(2em - (5em - 3em))",
-      "-moz-calc(2em + (5em - 3em))",
-      "-moz-calc(2em - (5em + 3em))",
-      "-moz-calc(2em + (5em + 3em))",
-      "-moz-calc(2em + 5em - 3em)",
-      "-moz-calc(2em - 5em - 3em)",
-      "-moz-calc(2em + 5em + 3em)",
-      "-moz-calc(2em - 5em + 3em)",
+			"-moz-calc((5 + 7) * 3em)",
+			"-moz-calc((5em + 3em) - 2em)",
+			"-moz-calc((5em - 3em) + 2em)",
+			"-moz-calc(2em - (5em - 3em))",
+			"-moz-calc(2em + (5em - 3em))",
+			"-moz-calc(2em - (5em + 3em))",
+			"-moz-calc(2em + (5em + 3em))",
+			"-moz-calc(2em + 5em - 3em)",
+			"-moz-calc(2em - 5em - 3em)",
+			"-moz-calc(2em + 5em + 3em)",
+			"-moz-calc(2em - 5em + 3em)",
 
-      "-moz-calc(2em / 4 * 3)",
-      "-moz-calc(2em * 4 / 3)",
-      "-moz-calc(2em * 4 * 3)",
-      "-moz-calc(2em / 4 / 3)",
-      "-moz-calc(4 * 2em / 3)",
-      "-moz-calc(4 / 3 * 2em)",
+			"-moz-calc(2em / 4 * 3)",
+			"-moz-calc(2em * 4 / 3)",
+			"-moz-calc(2em * 4 * 3)",
+			"-moz-calc(2em / 4 / 3)",
+			"-moz-calc(4 * 2em / 3)",
+			"-moz-calc(4 / 3 * 2em)",
 
-      "-moz-calc((2em / 4) * 3)",
-      "-moz-calc((2em * 4) / 3)",
-      "-moz-calc((2em * 4) * 3)",
-      "-moz-calc((2em / 4) / 3)",
-      "-moz-calc((4 * 2em) / 3)",
-      "-moz-calc((4 / 3) * 2em)",
+			"-moz-calc((2em / 4) * 3)",
+			"-moz-calc((2em * 4) / 3)",
+			"-moz-calc((2em * 4) * 3)",
+			"-moz-calc((2em / 4) / 3)",
+			"-moz-calc((4 * 2em) / 3)",
+			"-moz-calc((4 / 3) * 2em)",
 
-      "-moz-calc(2em / (4 * 3))",
-      "-moz-calc(2em * (4 / 3))",
-      "-moz-calc(2em * (4 * 3))",
-      "-moz-calc(2em / (4 / 3))",
-      "-moz-calc(4 * (2em / 3))",
+			"-moz-calc(2em / (4 * 3))",
+			"-moz-calc(2em * (4 / 3))",
+			"-moz-calc(2em * (4 * 3))",
+			"-moz-calc(2em / (4 / 3))",
+			"-moz-calc(4 * (2em / 3))",
 
-      // Valid cases with unitless zero (which is never
-      // a length).
-      "-moz-calc(0 * 2em)",
-      "-moz-calc(2em * 0)",
-      "-moz-calc(3em + 0 * 2em)",
-      "-moz-calc(3em + 2em * 0)",
-      "-moz-calc((0 + 2) * 2em)",
-      "-moz-calc((2 + 0) * 2em)",
-      // And test zero lengths while we're here.
-      "-moz-calc(2 * 0px)",
-      "-moz-calc(0 * 0px)",
-      "-moz-calc(2 * 0em)",
-      "-moz-calc(0 * 0em)",
-      "-moz-calc(0px * 0)",
-      "-moz-calc(0px * 2)",
+			// Valid cases with unitless zero (which is never
+			// a length).
+			"-moz-calc(0 * 2em)",
+			"-moz-calc(2em * 0)",
+			"-moz-calc(3em + 0 * 2em)",
+			"-moz-calc(3em + 2em * 0)",
+			"-moz-calc((0 + 2) * 2em)",
+			"-moz-calc((2 + 0) * 2em)",
+			// And test zero lengths while we're here.
+			"-moz-calc(2 * 0px)",
+			"-moz-calc(0 * 0px)",
+			"-moz-calc(2 * 0em)",
+			"-moz-calc(0 * 0em)",
+			"-moz-calc(0px * 0)",
+			"-moz-calc(0px * 2)",
 
-      /* valid calc() values */
-      "calc(-2px)",
-      "calc(2px)",
-      "calc(3em)",
-      "calc(3em + 2px)",
-      "calc( 3em + 2px)",
-      "calc(3em + 2px )",
-      "calc( 3em + 2px )",
-      "calc(3*25px)",
-      "calc(3 *25px)",
-      "calc(3 * 25px)",
-      "calc(3* 25px)",
-      "calc(25px*3)",
-      "calc(25px *3)",
-      "calc(25px* 3)",
-      "calc(25px * 3)",
-      "calc(25px * 3 / 4)",
-      "calc((25px * 3) / 4)",
-      "calc(25px * (3 / 4))",
-      "calc(3 * 25px / 4)",
-      "calc((3 * 25px) / 4)",
-      "calc(3 * (25px / 4))",
-      "calc(3em + 25px * 3 / 4)",
-      "calc(3em + (25px * 3) / 4)",
-      "calc(3em + 25px * (3 / 4))",
-      "calc(25px * 3 / 4 + 3em)",
-      "calc((25px * 3) / 4 + 3em)",
-      "calc(25px * (3 / 4) + 3em)",
-      "calc(3em + (25px * 3 / 4))",
-      "calc(3em + ((25px * 3) / 4))",
-      "calc(3em + (25px * (3 / 4)))",
-      "calc((25px * 3 / 4) + 3em)",
-      "calc(((25px * 3) / 4) + 3em)",
-      "calc((25px * (3 / 4)) + 3em)",
-      "calc(3*25px + 1in)",
-      "calc(1in - 3em + 2px)",
-      "calc(1in - (3em + 2px))",
-      "calc((1in - 3em) + 2px)",
-      "calc(50px/2)",
-      "calc(50px/(2 - 1))",
-      "calc(-3px)",
-      /* numeric reduction cases */
-      "calc(5 * 3 * 2em)",
-      "calc(2em * 5 * 3)",
-      "calc((5 * 3) * 2em)",
-      "calc(2em * (5 * 3))",
-      "calc((5 + 3) * 2em)",
-      "calc(2em * (5 + 3))",
-      "calc(2em / (5 + 3))",
-      "calc(2em * (5*2 + 3))",
-      "calc(2em * ((5*2) + 3))",
-      "calc(2em * (5*(2 + 3)))",
+			/* valid calc() values */
+			"calc(-2px)",
+			"calc(2px)",
+			"calc(3em)",
+			"calc(3em + 2px)",
+			"calc( 3em + 2px)",
+			"calc(3em + 2px )",
+			"calc( 3em + 2px )",
+			"calc(3*25px)",
+			"calc(3 *25px)",
+			"calc(3 * 25px)",
+			"calc(3* 25px)",
+			"calc(25px*3)",
+			"calc(25px *3)",
+			"calc(25px* 3)",
+			"calc(25px * 3)",
+			"calc(25px * 3 / 4)",
+			"calc((25px * 3) / 4)",
+			"calc(25px * (3 / 4))",
+			"calc(3 * 25px / 4)",
+			"calc((3 * 25px) / 4)",
+			"calc(3 * (25px / 4))",
+			"calc(3em + 25px * 3 / 4)",
+			"calc(3em + (25px * 3) / 4)",
+			"calc(3em + 25px * (3 / 4))",
+			"calc(25px * 3 / 4 + 3em)",
+			"calc((25px * 3) / 4 + 3em)",
+			"calc(25px * (3 / 4) + 3em)",
+			"calc(3em + (25px * 3 / 4))",
+			"calc(3em + ((25px * 3) / 4))",
+			"calc(3em + (25px * (3 / 4)))",
+			"calc((25px * 3 / 4) + 3em)",
+			"calc(((25px * 3) / 4) + 3em)",
+			"calc((25px * (3 / 4)) + 3em)",
+			"calc(3*25px + 1in)",
+			"calc(1in - 3em + 2px)",
+			"calc(1in - (3em + 2px))",
+			"calc((1in - 3em) + 2px)",
+			"calc(50px/2)",
+			"calc(50px/(2 - 1))",
+			"calc(-3px)",
+			/* numeric reduction cases */
+			"calc(5 * 3 * 2em)",
+			"calc(2em * 5 * 3)",
+			"calc((5 * 3) * 2em)",
+			"calc(2em * (5 * 3))",
+			"calc((5 + 3) * 2em)",
+			"calc(2em * (5 + 3))",
+			"calc(2em / (5 + 3))",
+			"calc(2em * (5*2 + 3))",
+			"calc(2em * ((5*2) + 3))",
+			"calc(2em * (5*(2 + 3)))",
 
-      "calc((5 + 7) * 3em)",
-      "calc((5em + 3em) - 2em)",
-      "calc((5em - 3em) + 2em)",
-      "calc(2em - (5em - 3em))",
-      "calc(2em + (5em - 3em))",
-      "calc(2em - (5em + 3em))",
-      "calc(2em + (5em + 3em))",
-      "calc(2em + 5em - 3em)",
-      "calc(2em - 5em - 3em)",
-      "calc(2em + 5em + 3em)",
-      "calc(2em - 5em + 3em)",
+			"calc((5 + 7) * 3em)",
+			"calc((5em + 3em) - 2em)",
+			"calc((5em - 3em) + 2em)",
+			"calc(2em - (5em - 3em))",
+			"calc(2em + (5em - 3em))",
+			"calc(2em - (5em + 3em))",
+			"calc(2em + (5em + 3em))",
+			"calc(2em + 5em - 3em)",
+			"calc(2em - 5em - 3em)",
+			"calc(2em + 5em + 3em)",
+			"calc(2em - 5em + 3em)",
 
-      "calc(2em / 4 * 3)",
-      "calc(2em * 4 / 3)",
-      "calc(2em * 4 * 3)",
-      "calc(2em / 4 / 3)",
-      "calc(4 * 2em / 3)",
-      "calc(4 / 3 * 2em)",
+			"calc(2em / 4 * 3)",
+			"calc(2em * 4 / 3)",
+			"calc(2em * 4 * 3)",
+			"calc(2em / 4 / 3)",
+			"calc(4 * 2em / 3)",
+			"calc(4 / 3 * 2em)",
 
-      "calc((2em / 4) * 3)",
-      "calc((2em * 4) / 3)",
-      "calc((2em * 4) * 3)",
-      "calc((2em / 4) / 3)",
-      "calc((4 * 2em) / 3)",
-      "calc((4 / 3) * 2em)",
+			"calc((2em / 4) * 3)",
+			"calc((2em * 4) / 3)",
+			"calc((2em * 4) * 3)",
+			"calc((2em / 4) / 3)",
+			"calc((4 * 2em) / 3)",
+			"calc((4 / 3) * 2em)",
 
-      "calc(2em / (4 * 3))",
-      "calc(2em * (4 / 3))",
-      "calc(2em * (4 * 3))",
-      "calc(2em / (4 / 3))",
-      "calc(4 * (2em / 3))",
+			"calc(2em / (4 * 3))",
+			"calc(2em * (4 / 3))",
+			"calc(2em * (4 * 3))",
+			"calc(2em / (4 / 3))",
+			"calc(4 * (2em / 3))",
 
-      // Valid cases with unitless zero (which is never
-      // a length).
-      "calc(0 * 2em)",
-      "calc(2em * 0)",
-      "calc(3em + 0 * 2em)",
-      "calc(3em + 2em * 0)",
-      "calc((0 + 2) * 2em)",
-      "calc((2 + 0) * 2em)",
-      // And test zero lengths while we're here.
-      "calc(2 * 0px)",
-      "calc(0 * 0px)",
-      "calc(2 * 0em)",
-      "calc(0 * 0em)",
-      "calc(0px * 0)",
-      "calc(0px * 2)",
+			// Valid cases with unitless zero (which is never
+			// a length).
+			"calc(0 * 2em)",
+			"calc(2em * 0)",
+			"calc(3em + 0 * 2em)",
+			"calc(3em + 2em * 0)",
+			"calc((0 + 2) * 2em)",
+			"calc((2 + 0) * 2em)",
+			// And test zero lengths while we're here.
+			"calc(2 * 0px)",
+			"calc(0 * 0px)",
+			"calc(2 * 0em)",
+			"calc(0 * 0em)",
+			"calc(0px * 0)",
+			"calc(0px * 2)",
 
-    ],
-    invalid_values: [ "20", "-1px", "red", "50%",
-      /* invalid -moz-calc() values */
-      "-moz-calc(2em+ 2px)",
-      "-moz-calc(2em +2px)",
-      "-moz-calc(2em+2px)",
-      "-moz-calc(2em- 2px)",
-      "-moz-calc(2em -2px)",
-      "-moz-calc(2em-2px)",
-      /* invalid calc() values */
-      "calc(2em+ 2px)",
-      "calc(2em +2px)",
-      "calc(2em+2px)",
-      "calc(2em- 2px)",
-      "calc(2em -2px)",
-      "calc(2em-2px)",
-      "-moz-min()",
-      "calc(min())",
-      "-moz-max()",
-      "calc(max())",
-      "-moz-min(5px)",
-      "calc(min(5px))",
-      "-moz-max(5px)",
-      "calc(max(5px))",
-      "-moz-min(5px,2em)",
-      "calc(min(5px,2em))",
-      "-moz-max(5px,2em)",
-      "calc(max(5px,2em))",
-      "calc(50px/(2 - 2))",
-      "calc(5 + 5)",
-      "calc(5 * 5)",
-      "calc(5em * 5em)",
-      "calc(5em / 5em * 5em)",
+		],
+		invalid_values: [ "20", "-1px", "red", "50%",
+			/* invalid -moz-calc() values */
+			"-moz-calc(2em+ 2px)",
+			"-moz-calc(2em +2px)",
+			"-moz-calc(2em+2px)",
+			"-moz-calc(2em- 2px)",
+			"-moz-calc(2em -2px)",
+			"-moz-calc(2em-2px)",
+			/* invalid calc() values */
+			"calc(2em+ 2px)",
+			"calc(2em +2px)",
+			"calc(2em+2px)",
+			"calc(2em- 2px)",
+			"calc(2em -2px)",
+			"calc(2em-2px)",
+			"-moz-min()",
+			"calc(min())",
+			"-moz-max()",
+			"calc(max())",
+			"-moz-min(5px)",
+			"calc(min(5px))",
+			"-moz-max(5px)",
+			"calc(max(5px))",
+			"-moz-min(5px,2em)",
+			"calc(min(5px,2em))",
+			"-moz-max(5px,2em)",
+			"calc(max(5px,2em))",
+			"calc(50px/(2 - 2))",
+			"calc(5 + 5)",
+			"calc(5 * 5)",
+			"calc(5em * 5em)",
+			"calc(5em / 5em * 5em)",
 
-      "calc(4 * 3 / 2em)",
-      "calc((4 * 3) / 2em)",
-      "calc(4 * (3 / 2em))",
-      "calc(4 / (3 * 2em))",
+			"calc(4 * 3 / 2em)",
+			"calc((4 * 3) / 2em)",
+			"calc(4 * (3 / 2em))",
+			"calc(4 / (3 * 2em))",
 
-      // Tests for handling of unitless zero, which cannot
-      // be a length inside calc().
-      "calc(0)",
-      "calc(0 + 2em)",
-      "calc(2em + 0)",
-      "calc(0 * 2)",
-      "calc(2 * 0)",
-      "calc(1 * (2em + 0))",
-      "calc((2em + 0))",
-      "calc((2em + 0) * 1)",
-      "calc(1 * (0 + 2em))",
-      "calc((0 + 2em))",
-      "calc((0 + 2em) * 1)",
-    ]
-  },
-  "-moz-column-rule-style": {
-    domProp: "MozColumnRuleStyle",
-    inherited: false,
-    type: CSS_TYPE_LONGHAND,
-    initial_values: [ "none" ],
-    other_values: [ "solid", "hidden", "ridge", "groove", "inset", "outset", "double", "dotted", "dashed" ],
-    invalid_values: [ "20", "foo" ]
-  },
-  "-moz-column-rule-color": {
-    domProp: "MozColumnRuleColor",
-    inherited: false,
-    type: CSS_TYPE_LONGHAND,
-    prerequisites: { "color": "green" },
-    initial_values: [ "currentColor", "-moz-use-text-color" ],
-    other_values: [ "red", "blue", "#ffff00" ],
-    invalid_values: [ "ffff00" ]
-  },
-  "-moz-column-width": {
-    domProp: "MozColumnWidth",
-    inherited: false,
-    type: CSS_TYPE_LONGHAND,
-    initial_values: [ "auto" ],
-    other_values: [
-      "15px",
-      "calc(15px)",
-      "calc(30px - 3em)",
-      "calc(-15px)",
-      "0px",
-      "calc(0px)"
-    ],
-    invalid_values: [ "20", "-1px", "50%" ]
-  },
-  "-moz-float-edge": {
-    domProp: "MozFloatEdge",
-    inherited: false,
-    type: CSS_TYPE_LONGHAND,
-    initial_values: [ "content-box" ],
-    other_values: [ "margin-box" ],
-    invalid_values: [ "content", "padding", "border", "margin" ]
-  },
-  "-moz-force-broken-image-icon": {
-    domProp: "MozForceBrokenImageIcon",
-    inherited: false,
-    type: CSS_TYPE_LONGHAND,
-    initial_values: [ "0" ],
-    other_values: [ "1" ],
-    invalid_values: []
-  },
-  "-moz-image-region": {
-    domProp: "MozImageRegion",
-    inherited: true,
-    type: CSS_TYPE_LONGHAND,
-    initial_values: [ "auto" ],
-    other_values: [ "rect(3px 20px 15px 4px)", "rect(17px, 21px, 33px, 2px)" ],
-    invalid_values: [ "rect(17px, 21px, 33, 2px)" ]
-  },
-  "-moz-margin-end": {
-    domProp: "MozMarginEnd",
-    inherited: false,
-    type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
-    get_computed: logical_box_prop_get_computed,
-    /* no subproperties */
-    /* auto may or may not be initial */
-    initial_values: [ "0", "0px", "0%", "0em", "0ex", "calc(0pt)", "calc(0% + 0px)" ],
-    other_values: [ "1px", "3em",
-      "calc(2px)",
-      "calc(-2px)",
-      "calc(50%)",
-      "calc(3*25px)",
-      "calc(25px*3)",
-      "calc(3*25px + 50%)",
-    ],
-    invalid_values: [ "5" ]
-  },
-  "-moz-margin-start": {
-    domProp: "MozMarginStart",
-    inherited: false,
-    type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
-    get_computed: logical_box_prop_get_computed,
-    /* no subproperties */
-    /* auto may or may not be initial */
-    initial_values: [ "0", "0px", "0%", "0em", "0ex", "calc(0pt)", "calc(0% + 0px)" ],
-    other_values: [ "1px", "3em",
-      "calc(2px)",
-      "calc(-2px)",
-      "calc(50%)",
-      "calc(3*25px)",
-      "calc(25px*3)",
-      "calc(3*25px + 50%)",
-    ],
-    invalid_values: [ "5" ]
-  },
-  "-moz-outline-radius": {
-    domProp: "MozOutlineRadius",
-    inherited: false,
-    type: CSS_TYPE_TRUE_SHORTHAND,
-    prerequisites: { "width": "200px", "height": "100px", "display": "inline-block"},
-    subproperties: [ "-moz-outline-radius-bottomleft", "-moz-outline-radius-bottomright", "-moz-outline-radius-topleft", "-moz-outline-radius-topright" ],
-    initial_values: [ "0", "0px", "0%", "calc(-2px)", "calc(-1%)", "calc(0px) calc(0pt) calc(0%) calc(0em)" ],
-    other_values: [ "3%", "1px", "2em", "3em 2px", "2pt 3% 4em", "2px 2px 2px 2px", // circular
-            "3% / 2%", "1px / 4px", "2em / 1em", "3em 2px / 2px 3em", "2pt 3% 4em / 4pt 1% 5em", "2px 2px 2px 2px / 4px 4px 4px 4px", "1pt / 2pt 3pt", "4pt 5pt / 3pt", // elliptical
-      "calc(2px)",
-      "calc(50%)",
-      "calc(3*25px)",
-      "calc(3*25px) 5px",
-      "5px calc(3*25px)",
-      "calc(20%) calc(3*25px)",
-      "calc(25px*3)",
-      "calc(3*25px + 50%)",
-      "2px 2px calc(2px + 1%) 2px",
-      "1px 2px 2px 2px / 2px 2px calc(2px + 1%) 2px",
-            ],
-    invalid_values: [ "2px -2px", "inherit 2px", "inherit / 2px", "2px inherit", "2px / inherit", "2px 2px 2px 2px 2px", "1px / 2px 2px 2px 2px 2px", "2", "2 2", "2px 2px 2px 2px / 2px 2px 2 2px" ]
-  },
-  "-moz-outline-radius-bottomleft": {
-    domProp: "MozOutlineRadiusBottomleft",
-    inherited: false,
-    type: CSS_TYPE_LONGHAND,
-    prerequisites: { "width": "200px", "height": "100px", "display": "inline-block"},
-    initial_values: [ "0", "0px", "0%", "calc(-2px)", "calc(-1%)", "calc(0px)" ],
-    other_values: [ "3%", "1px", "2em", // circular
-            "3% 2%", "1px 4px", "2em 2pt", // elliptical
-      "calc(2px)",
-      "calc(50%)",
-      "calc(3*25px)",
-      "calc(3*25px) 5px",
-      "5px calc(3*25px)",
-      "calc(20%) calc(3*25px)",
-      "calc(25px*3)",
-      "calc(3*25px + 50%)",
-            ],
-    invalid_values: [ "-1px", "4px -2px", "inherit 2px", "2px inherit", "2", "2px 2", "2 2px" ]
-  },
-  "-moz-outline-radius-bottomright": {
-    domProp: "MozOutlineRadiusBottomright",
-    inherited: false,
-    type: CSS_TYPE_LONGHAND,
-    prerequisites: { "width": "200px", "height": "100px", "display": "inline-block"},
-    initial_values: [ "0", "0px", "0%", "calc(-2px)", "calc(-1%)", "calc(0px)" ],
-    other_values: [ "3%", "1px", "2em", // circular
-            "3% 2%", "1px 4px", "2em 2pt", // elliptical
-      "calc(2px)",
-      "calc(50%)",
-      "calc(3*25px)",
-      "calc(3*25px) 5px",
-      "5px calc(3*25px)",
-      "calc(20%) calc(3*25px)",
-      "calc(25px*3)",
-      "calc(3*25px + 50%)",
-            ],
-    invalid_values: [ "-1px", "4px -2px", "inherit 2px", "2px inherit", "2", "2px 2", "2 2px" ]
-  },
-  "-moz-outline-radius-topleft": {
-    domProp: "MozOutlineRadiusTopleft",
-    inherited: false,
-    type: CSS_TYPE_LONGHAND,
-    prerequisites: { "width": "200px", "height": "100px", "display": "inline-block"},
-    initial_values: [ "0", "0px", "0%", "calc(-2px)", "calc(-1%)", "calc(0px)" ],
-    other_values: [ "3%", "1px", "2em", // circular
-            "3% 2%", "1px 4px", "2em 2pt", // elliptical
-      "calc(2px)",
-      "calc(50%)",
-      "calc(3*25px)",
-      "calc(3*25px) 5px",
-      "5px calc(3*25px)",
-      "calc(20%) calc(3*25px)",
-      "calc(25px*3)",
-      "calc(3*25px + 50%)",
-            ],
-    invalid_values: [ "-1px", "4px -2px", "inherit 2px", "2px inherit", "2", "2px 2", "2 2px" ]
-  },
-  "-moz-outline-radius-topright": {
-    domProp: "MozOutlineRadiusTopright",
-    inherited: false,
-    type: CSS_TYPE_LONGHAND,
-    prerequisites: { "width": "200px", "height": "100px", "display": "inline-block"},
-    initial_values: [ "0", "0px", "0%", "calc(-2px)", "calc(-1%)", "calc(0px)" ],
-    other_values: [ "3%", "1px", "2em", // circular
-            "3% 2%", "1px 4px", "2em 2pt", // elliptical
-      "calc(2px)",
-      "calc(50%)",
-      "calc(3*25px)",
-      "calc(3*25px) 5px",
-      "5px calc(3*25px)",
-      "calc(20%) calc(3*25px)",
-      "calc(25px*3)",
-      "calc(3*25px + 50%)",
-            ],
-    invalid_values: [ "-1px", "4px -2px", "inherit 2px", "2px inherit", "2", "2px 2", "2 2px" ]
-  },
-  "-moz-padding-end": {
-    domProp: "MozPaddingEnd",
-    inherited: false,
-    type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
-    get_computed: logical_box_prop_get_computed,
-    /* no subproperties */
-    initial_values: [ "0", "0px", "0%", "0em", "0ex", "calc(0pt)", "calc(0% + 0px)", "calc(-3px)", "calc(-1%)" ],
-    other_values: [ "1px", "3em",
-      "calc(2px)",
-      "calc(50%)",
-      "calc(3*25px)",
-      "calc(25px*3)",
-      "calc(3*25px + 50%)",
-    ],
-    invalid_values: [ "5" ]
-  },
-  "-moz-padding-start": {
-    domProp: "MozPaddingStart",
-    inherited: false,
-    type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
-    get_computed: logical_box_prop_get_computed,
-    /* no subproperties */
-    initial_values: [ "0", "0px", "0%", "0em", "0ex", "calc(0pt)", "calc(0% + 0px)", "calc(-3px)", "calc(-1%)" ],
-    other_values: [ "1px", "3em",
-      "calc(2px)",
-      "calc(50%)",
-      "calc(3*25px)",
-      "calc(25px*3)",
-      "calc(3*25px + 50%)",
-    ],
-    invalid_values: [ "5" ]
-  },
-  "resize": {
-    domProp: "resize",
-    inherited: false,
-    type: CSS_TYPE_LONGHAND,
-    prerequisites: { "display": "block", "overflow": "auto" },
-    initial_values: [ "none" ],
-    other_values: [ "both", "horizontal", "vertical" ],
-    invalid_values: []
-  },
-  "-moz-stack-sizing": {
-    domProp: "MozStackSizing",
-    inherited: false,
-    type: CSS_TYPE_LONGHAND,
-    initial_values: [ "stretch-to-fit" ],
-    other_values: [ "ignore" ],
-    invalid_values: []
-  },
-  "-moz-tab-size": {
-    domProp: "MozTabSize",
-    inherited: true,
-    type: CSS_TYPE_LONGHAND,
-    initial_values: [ "8" ],
-    other_values: [ "0", "3", "99", "12000" ],
-    invalid_values: [ "-1", "-808", "3.0", "17.5" ]
-  },
-  "-moz-text-size-adjust": {
-    domProp: "MozTextSizeAdjust",
-    inherited: true,
-    type: CSS_TYPE_LONGHAND,
-    initial_values: [ "auto" ],
-    other_values: [ "none" ],
-    invalid_values: [ "-5%", "0", "100", "0%", "50%", "100%", "220.3%" ]
-  },
-  "transform": {
-    domProp: "transform",
-    inherited: false,
-    type: CSS_TYPE_LONGHAND,
-    prerequisites: { "width": "300px", "height": "50px" },
-    initial_values: [ "none" ],
-    other_values: [ "translatex(1px)", "translatex(4em)",
-      "translatex(-4px)", "translatex(3px)",
-      "translatex(0px) translatex(1px) translatex(2px) translatex(3px) translatex(4px)",
-      "translatey(4em)", "translate(3px)", "translate(10px, -3px)",
-      "rotate(45deg)", "rotate(45grad)", "rotate(45rad)",
-      "rotate(0.25turn)", "rotate(0)", "scalex(10)", "scaley(10)",
-      "scale(10)", "scale(10, 20)", "skewx(30deg)", "skewx(0)",
-      "skewy(0)", "skewx(30grad)", "skewx(30rad)", "skewx(0.08turn)",
-      "skewy(30deg)", "skewy(30grad)", "skewy(30rad)", "skewy(0.08turn)",
-      "rotate(45deg) scale(2, 1)", "skewx(45deg) skewx(-50grad)",
-      "translate(0, 0) scale(1, 1) skewx(0) skewy(0) matrix(1, 0, 0, 1, 0, 0)",
-      "translatex(50%)", "translatey(50%)", "translate(50%)",
-      "translate(3%, 5px)", "translate(5px, 3%)",
-      "matrix(1, 2, 3, 4, 5, 6)",
-      /* valid calc() values */
-      "translatex(calc(5px + 10%))",
-      "translatey(calc(0.25 * 5px + 10% / 3))",
-      "translate(calc(5px - 10% * 3))",
-      "translate(calc(5px - 3 * 10%), 50px)",
-      "translate(-50px, calc(5px - 10% * 3))",
-      "translatez(1px)", "translatez(4em)", "translatez(-4px)",
-      "translatez(0px)", "translatez(2px) translatez(5px)",
-      "translate3d(3px, 4px, 5px)", "translate3d(2em, 3px, 1em)",
-      "translatex(2px) translate3d(4px, 5px, 6px) translatey(1px)",
-      "scale3d(4, 4, 4)", "scale3d(-2, 3, -7)", "scalez(4)",
-      "scalez(-6)", "rotate3d(2, 3, 4, 45deg)",
-      "rotate3d(-3, 7, 0, 12rad)", "rotatex(15deg)", "rotatey(-12grad)",
-      "rotatez(72rad)", "rotatex(0.125turn)", "perspective(1000px)",
-      "matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16)",
-    ],
-    invalid_values: ["1px", "#0000ff", "red", "auto",
-      "translatex(1)", "translatey(1)", "translate(2)",
-      "translate(-3, -4)",
-      "translatex(1px 1px)", "translatex(translatex(1px))",
-      "translatex(#0000ff)", "translatex(red)", "translatey()",
-      "matrix(1px, 2px, 3px, 4px, 5px, 6px)", "scale(150%)",
-      "skewx(red)", "matrix(1%, 0, 0, 0, 0px, 0px)",
-      "matrix(0, 1%, 2, 3, 4px,5px)", "matrix(0, 1, 2%, 3, 4px, 5px)",
-      "matrix(0, 1, 2, 3%, 4%, 5%)", "matrix(1, 2, 3, 4, 5px, 6%)",
-      "matrix(1, 2, 3, 4, 5%, 6px)", "matrix(1, 2, 3, 4, 5%, 6%)",
-      "matrix(1, 2, 3, 4, 5px, 6em)",
-      /* invalid calc() values */
-      "translatey(-moz-min(5px,10%))",
-      "translatex(-moz-max(5px,10%))",
-      "translate(10px, calc(min(5px,10%)))",
-      "translate(calc(max(5px,10%)), 10%)",
-      "matrix(1, 0, 0, 1, max(5px * 3), calc(10% - 3px))",
-      "perspective(0px)", "perspective(-10px)", "matrix3d(dinosaur)",
-      "matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17)",
-      "matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15)",
-      "matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15%, 16)",
-      "matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16px)",
-      "rotatey(words)", "rotatex(7)", "translate3d(3px, 4px, 1px, 7px)",
-      "matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13px, 14em, 15px, 16)",
-      "matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 20%, 10%, 15, 16)"
-    ],
-  },
-  "transform-origin": {
-    domProp: "transformOrigin",
-    inherited: false,
-    type: CSS_TYPE_LONGHAND,
-    /* no subproperties */
-    prerequisites: { "width": "10px", "height": "10px", "display": "block"},
-    initial_values: [ "50% 50%", "center", "center center" ],
-    other_values: [ "25% 25%", "6px 5px", "20% 3em", "0 0", "0in 1in",
-            "top", "bottom","top left", "top right",
-            "top center", "center left", "center right",
-            "bottom left", "bottom right", "bottom center",
-            "20% center", "6px center", "13in bottom",
-            "left 50px", "right 13%", "center 40px",
-      "calc(20px)",
-      "calc(20px) 10px",
-      "10px calc(20px)",
-      "calc(20px) 25%",
-      "25% calc(20px)",
-      "calc(20px) calc(20px)",
-      "calc(20px + 1em) calc(20px / 2)",
-      "calc(20px + 50%) calc(50% - 10px)",
-      "calc(-20px) calc(-50%)",
-      "calc(-20%) calc(-50%)",
-      "6px 5px 5px",
-      "top center 10px"
-    ],
-    invalid_values: ["red", "auto", "none", "0.5 0.5", "40px #0000ff",
-             "border", "center red", "right diagonal",
-             "#00ffff bottom"]
-  },
-  "perspective-origin": {
-    domProp: "perspectiveOrigin",
-    inherited: false,
-    type: CSS_TYPE_LONGHAND,
-    /* no subproperties */
-    prerequisites: { "width": "10px", "height": "10px", "display": "block"},
-    initial_values: [ "50% 50%", "center", "center center" ],
-    other_values: [ "25% 25%", "6px 5px", "20% 3em", "0 0", "0in 1in",
-                    "top", "bottom","top left", "top right",
-                    "top center", "center left", "center right",
-                    "bottom left", "bottom right", "bottom center",
-                    "20% center", "6px center", "13in bottom",
-                    "left 50px", "right 13%", "center 40px",
-                    "calc(20px)",
-                    "calc(20px) 10px",
-                    "10px calc(20px)",
-                    "calc(20px) 25%",
-                    "25% calc(20px)",
-                    "calc(20px) calc(20px)",
-                    "calc(20px + 1em) calc(20px / 2)",
-                    "calc(20px + 50%) calc(50% - 10px)",
-                    "calc(-20px) calc(-50%)",
-                    "calc(-20%) calc(-50%)" ],
-    invalid_values: [ "red", "auto", "none", "0.5 0.5", "40px #0000ff",
-                      "border", "center red", "right diagonal",
-                      "#00ffff bottom"]
-  },
-  "perspective": {
-    domProp: "perspective",
-    inherited: false,
-    type: CSS_TYPE_LONGHAND,
-    initial_values: [ "none" ],
-    other_values: [ "1000px", "500.2px" ],
-    invalid_values: [ "pants", "200", "0", "-100px", "-27.2em", "0px" ]
-  },
-  "backface-visibility": {
-    domProp: "backfaceVisibility",
-    inherited: false,
-    type: CSS_TYPE_LONGHAND,
-    initial_values: [ "visible" ],
-    other_values: [ "hidden" ],
-    invalid_values: [ "collapse" ]
-  },
-  "transform-style": {
-    domProp: "transformStyle",
-    inherited: false,
-    type: CSS_TYPE_LONGHAND,
-    initial_values: [ "flat" ],
-    other_values: [ "preserve-3d" ],
-    invalid_values: []
-  },
-  "-moz-user-focus": {
-    domProp: "MozUserFocus",
-    inherited: true,
-    type: CSS_TYPE_LONGHAND,
-    initial_values: [ "none" ],
-    other_values: [ "normal", "ignore", "select-all", "select-before", "select-after", "select-same", "select-menu" ],
-    invalid_values: []
-  },
-  "-moz-user-input": {
-    domProp: "MozUserInput",
-    inherited: true,
-    type: CSS_TYPE_LONGHAND,
-    initial_values: [ "auto" ],
-    other_values: [ "none", "enabled", "disabled" ],
-    invalid_values: []
-  },
-  "-moz-user-modify": {
-    domProp: "MozUserModify",
-    inherited: true,
-    type: CSS_TYPE_LONGHAND,
-    initial_values: [ "read-only" ],
-    other_values: [ "read-write", "write-only" ],
-    invalid_values: []
-  },
-  "-moz-user-select": {
-    domProp: "MozUserSelect",
-    inherited: false,
-    type: CSS_TYPE_LONGHAND,
-    initial_values: [ "auto" ],
-    other_values: [ "none", "text", "element", "elements", "all", "toggle", "tri-state", "-moz-all", "-moz-none" ],
-    invalid_values: []
-  },
-  "-moz-window-shadow": {
-    domProp: "MozWindowShadow",
-    inherited: false,
-    type: CSS_TYPE_LONGHAND,
-    initial_values: [ "default" ],
-    other_values: [ "none", "menu", "tooltip", "sheet" ],
-    invalid_values: []
-  },
-  "background": {
-    domProp: "background",
-    inherited: false,
-    type: CSS_TYPE_TRUE_SHORTHAND,
-    subproperties: [ "background-attachment", "background-color", "background-image", "background-position", "background-repeat", "background-clip", "background-origin", "background-size" ],
-    initial_values: [ "transparent", "none", "repeat", "scroll", "0% 0%", "top left", "left top", "0% 0% / auto", "top left / auto", "left top / auto", "0% 0% / auto auto",
-      "transparent none", "top left none", "left top none", "none left top", "none top left", "none 0% 0%", "left top / auto none", "left top / auto auto none",
-      "transparent none repeat scroll top left", "left top repeat none scroll transparent", "transparent none repeat scroll top left / auto", "left top / auto repeat none scroll transparent", "none repeat scroll 0% 0% / auto auto transparent" ],
-    other_values: [
-        /* without multiple backgrounds */
-      "green",
-      "none green repeat scroll left top",
-      "url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==)",
-      "repeat url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==') transparent left top scroll",
-      "repeat-x",
-      "repeat-y",
-      "no-repeat",
-      "none repeat-y transparent scroll 0% 0%",
-      "fixed",
-      "0% top transparent fixed repeat none",
-      "top",
-      "left",
-      "50% 50%",
-      "center",
-      "top / 100px",
-      "left / contain",
-      "left / cover",
-      "10px / 10%",
-      "10em / calc(20px)",
-      "top left / 100px 100px",
-      "top left / 100px auto",
-      "top left / 100px 10%",
-      "top left / 100px calc(20px)",
-      "bottom right scroll none transparent repeat",
-      "50% transparent",
-      "transparent 50%",
-      "50%",
-      "-moz-radial-gradient(10% bottom, #ffffff, black) scroll no-repeat",
-      "-moz-linear-gradient(10px 10px -45deg, red, blue) repeat",
-      "-moz-linear-gradient(10px 10px -0.125turn, red, blue) repeat",
-      "-moz-repeating-radial-gradient(10% bottom, #ffffff, black) scroll no-repeat",
-      "-moz-repeating-linear-gradient(10px 10px -45deg, red, blue) repeat",
-      "-moz-element(#test) lime",
-        /* multiple backgrounds */
-        "url(404.png), url(404.png)",
-        "url(404.png), url(404.png) transparent",
-        "url(404.png), url(404.png) red",
-        "repeat-x, fixed, none",
-        "0% top url(404.png), url(404.png) 0% top",
-        "fixed repeat-y top left url(404.png), repeat-x green",
-        "url(404.png), -moz-linear-gradient(20px 20px -45deg, blue, green), -moz-element(#a) black",
-        "top left / contain, bottom right / cover",
-        /* test cases with clip+origin in the shorthand */
-        "url(404.png) green padding-box",
-        "url(404.png) border-box transparent",
-        "content-box url(404.png) blue",
-        "url(404.png) green padding-box padding-box",
-        "url(404.png) green padding-box border-box",
-        "content-box border-box url(404.png) blue",
-    ],
-    invalid_values: [
-      /* mixes with keywords have to be in correct order */
-      "50% left", "top 50%",
-      /* no quirks mode colors */
-      "-moz-radial-gradient(10% bottom, ffffff, black) scroll no-repeat",
-      /* no quirks mode lengths */
-      "-moz-linear-gradient(10 10px -45deg, red, blue) repeat",
-      "-moz-linear-gradient(10px 10 -45deg, red, blue) repeat",
-      "linear-gradient(red -99, yellow, green, blue 120%)",
-      /* bug 258080: don't accept background-position separated */
-      "left url(404.png) top", "top url(404.png) left",
-      /* not allowed to have color in non-bottom layer */
-      "url(404.png) transparent, url(404.png)",
-      "url(404.png) red, url(404.png)",
-      "url(404.png) transparent, url(404.png) transparent",
-      "url(404.png) transparent red, url(404.png) transparent red",
-      "url(404.png) red, url(404.png) red",
-      "url(404.png) rgba(0, 0, 0, 0), url(404.png)",
-      "url(404.png) rgb(255, 0, 0), url(404.png)",
-      "url(404.png) rgba(0, 0, 0, 0), url(404.png) rgba(0, 0, 0, 0)",
-      "url(404.png) rgba(0, 0, 0, 0) rgb(255, 0, 0), url(404.png) rgba(0, 0, 0, 0) rgb(255, 0, 0)",
-      "url(404.png) rgb(255, 0, 0), url(404.png) rgb(255, 0, 0)",
-      /* bug 513395: old syntax for gradients */
-      "-moz-radial-gradient(10% bottom, 30px, 20px 20px, 10px, from(#ffffff), to(black)) scroll no-repeat",
-      "-moz-linear-gradient(10px 10px, 20px 20px, from(red), to(blue)) repeat",
-      /* clip and origin separated in the shorthand */
-      "url(404.png) padding-box green border-box",
-      "url(404.png) padding-box green padding-box",
-      "transparent padding-box url(404.png) border-box",
-      "transparent padding-box url(404.png) padding-box",
-    ]
-  },
-  "background-attachment": {
-    domProp: "backgroundAttachment",
-    inherited: false,
-    type: CSS_TYPE_LONGHAND,
-    initial_values: [ "scroll" ],
-    other_values: [ "fixed", "local", "scroll,scroll", "fixed, scroll", "scroll, fixed, local, scroll", "fixed, fixed" ],
-    invalid_values: []
-  },
-  "background-clip": {
-    /*
-     * When we rename this to 'background-clip', we also
-     * need to rename the values to match the spec.
-     */
-    domProp: "backgroundClip",
-    inherited: false,
-    type: CSS_TYPE_LONGHAND,
-    initial_values: [ "border-box" ],
-    other_values: [ "content-box", "padding-box", "border-box, padding-box", "padding-box, padding-box, padding-box", "border-box, border-box" ],
-    invalid_values: [ "margin-box", "border-box border-box" ]
-  },
-  "background-color": {
-    domProp: "backgroundColor",
-    inherited: false,
-    type: CSS_TYPE_LONGHAND,
-    initial_values: [ "transparent", "rgba(255, 127, 15, 0)", "hsla(240, 97%, 50%, 0.0)", "rgba(0, 0, 0, 0)", "rgba(255,255,255,-3.7)" ],
-    other_values: [ "green", "rgb(255, 0, 128)", "#fc2", "#96ed2a", "black", "rgba(255,255,0,3)", "hsl(240, 50%, 50%)", "rgb(50%, 50%, 50%)", "-moz-default-background-color" ],
-    invalid_values: [ "#0", "#00", "#0000", "#00000", "#0000000", "#00000000", "#000000000", "rgb(100, 100.0, 100)" ],
-    quirks_values: { "000000": "#000000", "96ed2a": "#96ed2a" },
-  },
-  "background-image": {
-    domProp: "backgroundImage",
-    inherited: false,
-    type: CSS_TYPE_LONGHAND,
-    initial_values: [ "none" ],
-    other_values: [
-    "url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==)", "url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==')", 'url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==")',
-    "none, none",
-    "none, none, none, none, none",
-    "url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==), none",
-    "none, url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==), none",
-    "url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==), url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==)",
-    ].concat(validGradientAndElementValues),
-    invalid_values: [
-    ].concat(invalidGradientAndElementValues),
-    unbalanced_values: [
-    ].concat(unbalancedGradientAndElementValues)
-  },
-  "background-origin": {
-    domProp: "backgroundOrigin",
-    inherited: false,
-    type: CSS_TYPE_LONGHAND,
-    initial_values: [ "padding-box" ],
-    other_values: [ "border-box", "content-box", "border-box, padding-box", "padding-box, padding-box, padding-box", "border-box, border-box" ],
-    invalid_values: [ "margin-box", "padding-box padding-box" ]
-  },
-  "background-position": {
-    domProp: "backgroundPosition",
-    inherited: false,
-    type: CSS_TYPE_LONGHAND,
-    initial_values: [ "top 0% left 0%", "top 0% left", "top left", "left top", "0% 0%", "0% top", "left 0%" ],
-    other_values: [ "top", "left", "right", "bottom", "center", "center bottom", "bottom center", "center right", "right center", "center top", "top center", "center left", "left center", "right bottom", "bottom right", "50%", "top left, top left", "top left, top right", "top right, top left", "left top, 0% 0%", "10% 20%, 30%, 40%", "top left, bottom right", "right bottom, left top", "0%", "0px", "30px", "0%, 10%, 20%, 30%", "top, top, top, top, top",
-      "calc(20px)",
-      "calc(20px) 10px",
-      "10px calc(20px)",
-      "calc(20px) 25%",
-      "25% calc(20px)",
-      "calc(20px) calc(20px)",
-      "calc(20px + 1em) calc(20px / 2)",
-      "calc(20px + 50%) calc(50% - 10px)",
-      "calc(-20px) calc(-50%)",
-      "calc(-20%) calc(-50%)",
-      "0px 0px",
-      "right 20px top 60px",
-      "right 20px bottom 60px",
-      "left 20px top 60px",
-      "left 20px bottom 60px",
-      "right -50px top -50px",
-      "left -50px bottom -50px",
-      "right 20px top -50px",
-      "right -20px top 50px",
-      "right 3em bottom 10px",
-      "bottom 3em right 10px",
-      "top 3em right 10px",
-      "left 15px",
-      "10px top",
-      "left top 15px",
-      "left 10px top",
-      "left 20%",
-      "right 20%"
-    ],
-    invalid_values: [ "center 10px center 4px", "center 10px center",
-                      "top 20%", "bottom 20%", "50% left", "top 50%",
-                      "50% bottom 10%", "right 10% 50%", "left right",
-                      "top bottom", "left 10% right",
-                      "top 20px bottom 20px", "left left", "20 20" ]
-  },
-  "background-repeat": {
-    domProp: "backgroundRepeat",
-    inherited: false,
-    type: CSS_TYPE_LONGHAND,
-    initial_values: [ "repeat", "repeat repeat" ],
-    other_values: [ "repeat-x", "repeat-y", "no-repeat",
-      "repeat-x, repeat-x",
-      "repeat, no-repeat",
-      "repeat-y, no-repeat, repeat-y",
-      "repeat, repeat, repeat",
-      "repeat no-repeat",
-      "no-repeat repeat",
-      "no-repeat no-repeat",
-      "repeat repeat, repeat repeat",
-    ],
-    invalid_values: [ "repeat repeat repeat",
-                      "repeat-x repeat-y",
-                      "repeat repeat-x",
-                      "repeat repeat-y",
-                      "repeat-x repeat",
-                      "repeat-y repeat" ]
-  },
-  "background-size": {
-    domProp: "backgroundSize",
-    inherited: false,
-    type: CSS_TYPE_LONGHAND,
-    initial_values: [ "auto", "auto auto" ],
-    other_values: [ "contain", "cover", "100px auto", "auto 100px", "100% auto", "auto 100%", "25% 50px", "3em 40%",
-      "calc(20px)",
-      "calc(20px) 10px",
-      "10px calc(20px)",
-      "calc(20px) 25%",
-      "25% calc(20px)",
-      "calc(20px) calc(20px)",
-      "calc(20px + 1em) calc(20px / 2)",
-      "calc(20px + 50%) calc(50% - 10px)",
-      "calc(-20px) calc(-50%)",
-      "calc(-20%) calc(-50%)"
-    ],
-    invalid_values: [ "contain contain", "cover cover", "cover auto", "auto cover", "contain cover", "cover contain", "-5px 3px", "3px -5px", "auto -5px", "-5px auto", "5 3" ]
-  },
-  "border": {
-    domProp: "border",
-    inherited: false,
-    type: CSS_TYPE_TRUE_SHORTHAND,
-    subproperties: [ "border-bottom-color", "border-bottom-style", "border-bottom-width", "border-left-color", "border-left-style", "border-left-width", "border-right-color", "border-right-style", "border-right-width", "border-top-color", "border-top-style", "border-top-width", "-moz-border-top-colors", "-moz-border-right-colors", "-moz-border-bottom-colors", "-moz-border-left-colors", "border-image-source", "border-image-slice", "border-image-width", "border-image-outset", "border-image-repeat" ],
-    initial_values: [ "none", "medium", "currentColor", "thin", "none medium currentcolor", "calc(4px - 1px) none" ],
-    other_values: [ "solid", "medium solid", "green solid", "10px solid", "thick solid", "calc(2px) solid blue" ],
-    invalid_values: [ "5%", "medium solid ff00ff", "5 solid green" ]
-  },
-  "border-bottom": {
-    domProp: "borderBottom",
-    inherited: false,
-    type: CSS_TYPE_TRUE_SHORTHAND,
-    subproperties: [ "border-bottom-color", "border-bottom-style", "border-bottom-width" ],
-    initial_values: [ "none", "medium", "currentColor", "thin", "none medium currentcolor" ],
-    other_values: [ "solid", "green", "medium solid", "green solid", "10px solid", "thick solid", "5px green none" ],
-    invalid_values: [ "5%", "5", "5 solid green" ]
-  },
-  "border-bottom-color": {
-    domProp: "borderBottomColor",
-    inherited: false,
-    type: CSS_TYPE_LONGHAND,
-    prerequisites: { "color": "black" },
-    initial_values: [ "currentColor", "-moz-use-text-color" ],
-    other_values: [ "green", "rgba(255,128,0,0.5)", "transparent" ],
-    invalid_values: [ "#0", "#00", "#0000", "#00000", "#0000000", "#00000000", "#000000000" ],
-    quirks_values: { "000000": "#000000", "96ed2a": "#96ed2a" },
-  },
-  "border-bottom-style": {
-    domProp: "borderBottomStyle",
-    inherited: false,
-    type: CSS_TYPE_LONGHAND,
-    /* XXX hidden is sometimes the same as initial */
-    initial_values: [ "none" ],
-    other_values: [ "solid", "dashed", "dotted", "double", "outset", "inset", "groove", "ridge" ],
-    invalid_values: []
-  },
-  "border-bottom-width": {
-    domProp: "borderBottomWidth",
-    inherited: false,
-    type: CSS_TYPE_LONGHAND,
-    prerequisites: { "border-bottom-style": "solid" },
-    initial_values: [ "medium", "3px", "calc(4px - 1px)" ],
-    other_values: [ "thin", "thick", "1px", "2em",
-      "calc(2px)",
-      "calc(-2px)",
-      "calc(0em)",
-      "calc(0px)",
-      "calc(5em)",
-      "calc(3*25px)",
-      "calc(25px*3)",
-      "calc(3*25px + 5em)",
-    ],
-    invalid_values: [ "5%" ],
-    quirks_values: { "5": "5px" },
-  },
-  "border-collapse": {
-    domProp: "borderCollapse",
-    inherited: true,
-    type: CSS_TYPE_LONGHAND,
-    initial_values: [ "separate" ],
-    other_values: [ "collapse" ],
-    invalid_values: []
-  },
-  "border-color": {
-    domProp: "borderColor",
-    inherited: false,
-    type: CSS_TYPE_TRUE_SHORTHAND,
-    subproperties: [ "border-top-color", "border-right-color", "border-bottom-color", "border-left-color" ],
-    initial_values: [ "currentColor", "currentColor currentColor", "currentColor currentColor currentColor", "currentColor currentColor currentcolor CURRENTcolor" ],
-    other_values: [ "green", "currentColor green", "currentColor currentColor green", "currentColor currentColor currentColor green", "rgba(255,128,0,0.5)", "transparent" ],
-    invalid_values: [ "#0", "#00", "#0000", "#00000", "#0000000", "#00000000", "#000000000" ],
-    quirks_values: { "000000": "#000000", "96ed2a": "#96ed2a" },
-  },
-  "border-left": {
-    domProp: "borderLeft",
-    inherited: false,
-    type: CSS_TYPE_TRUE_SHORTHAND,
-    subproperties: [ "border-left-color", "border-left-style", "border-left-width" ],
-    initial_values: [ "none", "medium", "currentColor", "thin", "none medium currentcolor" ],
-    other_values: [ "solid", "green", "medium solid", "green solid", "10px solid", "thick solid", "5px green none" ],
-    invalid_values: [ "5%", "5", "5 solid green" ]
-  },
-  "border-left-color": {
-    domProp: "borderLeftColor",
-    inherited: false,
-    type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
-    prerequisites: { "color": "black" },
-    initial_values: [ "currentColor", "-moz-use-text-color" ],
-    other_values: [ "green", "rgba(255,128,0,0.5)", "transparent" ],
-    invalid_values: [ "#0", "#00", "#0000", "#00000", "#0000000", "#00000000", "#000000000" ],
-    quirks_values: { "000000": "#000000", "96ed2a": "#96ed2a" },
-  },
-  "border-left-style": {
-    domProp: "borderLeftStyle",
-    inherited: false,
-    type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
-    /* XXX hidden is sometimes the same as initial */
-    initial_values: [ "none" ],
-    other_values: [ "solid", "dashed", "dotted", "double", "outset", "inset", "groove", "ridge" ],
-    invalid_values: []
-  },
-  "border-left-width": {
-    domProp: "borderLeftWidth",
-    inherited: false,
-    type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
-    prerequisites: { "border-left-style": "solid" },
-    initial_values: [ "medium", "3px", "calc(4px - 1px)" ],
-    other_values: [ "thin", "thick", "1px", "2em",
-      "calc(2px)",
-      "calc(-2px)",
-      "calc(0em)",
-      "calc(0px)",
-      "calc(5em)",
-      "calc(3*25px)",
-      "calc(25px*3)",
-      "calc(3*25px + 5em)",
-    ],
-    invalid_values: [ "5%" ],
-    quirks_values: { "5": "5px" },
-  },
-  "border-right": {
-    domProp: "borderRight",
-    inherited: false,
-    type: CSS_TYPE_TRUE_SHORTHAND,
-    subproperties: [ "border-right-color", "border-right-style", "border-right-width" ],
-    initial_values: [ "none", "medium", "currentColor", "thin", "none medium currentcolor" ],
-    other_values: [ "solid", "green", "medium solid", "green solid", "10px solid", "thick solid", "5px green none" ],
-    invalid_values: [ "5%", "5", "5 solid green" ]
-  },
-  "border-right-color": {
-    domProp: "borderRightColor",
-    inherited: false,
-    type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
-    prerequisites: { "color": "black" },
-    initial_values: [ "currentColor", "-moz-use-text-color" ],
-    other_values: [ "green", "rgba(255,128,0,0.5)", "transparent" ],
-    invalid_values: [ "#0", "#00", "#0000", "#00000", "#0000000", "#00000000", "#000000000" ],
-    quirks_values: { "000000": "#000000", "96ed2a": "#96ed2a" },
-  },
-  "border-right-style": {
-    domProp: "borderRightStyle",
-    inherited: false,
-    type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
-    /* XXX hidden is sometimes the same as initial */
-    initial_values: [ "none" ],
-    other_values: [ "solid", "dashed", "dotted", "double", "outset", "inset", "groove", "ridge" ],
-    invalid_values: []
-  },
-  "border-right-width": {
-    domProp: "borderRightWidth",
-    inherited: false,
-    type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
-    prerequisites: { "border-right-style": "solid" },
-    initial_values: [ "medium", "3px", "calc(4px - 1px)" ],
-    other_values: [ "thin", "thick", "1px", "2em",
-      "calc(2px)",
-      "calc(-2px)",
-      "calc(0em)",
-      "calc(0px)",
-      "calc(5em)",
-      "calc(3*25px)",
-      "calc(25px*3)",
-      "calc(3*25px + 5em)",
-    ],
-    invalid_values: [ "5%" ],
-    quirks_values: { "5": "5px" },
-  },
-  "border-spacing": {
-    domProp: "borderSpacing",
-    inherited: true,
-    type: CSS_TYPE_LONGHAND,
-    initial_values: [ "0", "0 0", "0px", "0 0px", "calc(0px)", "calc(0px) calc(0em)", "calc(2em - 2em) calc(3px + 7px - 10px)", "calc(-5px)", "calc(-5px) calc(-5px)" ],
-    other_values: [ "3px", "4em 2px", "4em 0", "0px 2px", "calc(7px)", "0 calc(7px)", "calc(7px) 0", "calc(0px) calc(7px)", "calc(7px) calc(0px)", "7px calc(0px)", "calc(0px) 7px", "7px calc(0px)", "3px calc(2em)" ],
-    invalid_values: [ "0%", "0 0%", "-5px", "-5px -5px", "0 -5px", "-5px 0" ]
-  },
-  "border-style": {
-    domProp: "borderStyle",
-    inherited: false,
-    type: CSS_TYPE_TRUE_SHORTHAND,
-    subproperties: [ "border-top-style", "border-right-style", "border-bottom-style", "border-left-style" ],
-    /* XXX hidden is sometimes the same as initial */
-    initial_values: [ "none", "none none", "none none none", "none none none none" ],
-    other_values: [ "solid", "dashed", "dotted", "double", "outset", "inset", "groove", "ridge", "none solid", "none none solid", "none none none solid", "groove none none none", "none ridge none none", "none none double none", "none none none dotted" ],
-    invalid_values: []
-  },
-  "border-top": {
-    domProp: "borderTop",
-    inherited: false,
-    type: CSS_TYPE_TRUE_SHORTHAND,
-    subproperties: [ "border-top-color", "border-top-style", "border-top-width" ],
-    initial_values: [ "none", "medium", "currentColor", "thin", "none medium currentcolor" ],
-    other_values: [ "solid", "green", "medium solid", "green solid", "10px solid", "thick solid", "5px green none" ],
-    invalid_values: [ "5%", "5", "5 solid green" ]
-  },
-  "border-top-color": {
-    domProp: "borderTopColor",
-    inherited: false,
-    type: CSS_TYPE_LONGHAND,
-    prerequisites: { "color": "black" },
-    initial_values: [ "currentColor", "-moz-use-text-color" ],
-    other_values: [ "green", "rgba(255,128,0,0.5)", "transparent" ],
-    invalid_values: [ "#0", "#00", "#0000", "#00000", "#0000000", "#00000000", "#000000000" ],
-    quirks_values: { "000000": "#000000", "96ed2a": "#96ed2a" },
-  },
-  "border-top-style": {
-    domProp: "borderTopStyle",
-    inherited: false,
-    type: CSS_TYPE_LONGHAND,
-    /* XXX hidden is sometimes the same as initial */
-    initial_values: [ "none" ],
-    other_values: [ "solid", "dashed", "dotted", "double", "outset", "inset", "groove", "ridge" ],
-    invalid_values: []
-  },
-  "border-top-width": {
-    domProp: "borderTopWidth",
-    inherited: false,
-    type: CSS_TYPE_LONGHAND,
-    prerequisites: { "border-top-style": "solid" },
-    initial_values: [ "medium", "3px", "calc(4px - 1px)" ],
-    other_values: [ "thin", "thick", "1px", "2em",
-      "calc(2px)",
-      "calc(-2px)",
-      "calc(0em)",
-      "calc(0px)",
-      "calc(5em)",
-      "calc(3*25px)",
-      "calc(25px*3)",
-      "calc(3*25px + 5em)",
-    ],
-    invalid_values: [ "5%" ],
-    quirks_values: { "5": "5px" },
-  },
-  "border-width": {
-    domProp: "borderWidth",
-    inherited: false,
-    type: CSS_TYPE_TRUE_SHORTHAND,
-    subproperties: [ "border-top-width", "border-right-width", "border-bottom-width", "border-left-width" ],
-    prerequisites: { "border-style": "solid" },
-    initial_values: [ "medium", "3px", "medium medium", "3px medium medium", "medium 3px medium medium", "calc(3px) 3px calc(5px - 2px) calc(2px - -1px)" ],
-    other_values: [ "thin", "thick", "1px", "2em", "2px 0 0px 1em", "calc(2em)" ],
-    invalid_values: [ "5%" ],
-    quirks_values: { "5": "5px" },
-  },
-  "bottom": {
-    domProp: "bottom",
-    inherited: false,
-    type: CSS_TYPE_LONGHAND,
-    /* FIXME: run tests with multiple prerequisites */
-    prerequisites: { "position": "relative" },
-    /* XXX 0 may or may not be equal to auto */
-    initial_values: [ "auto" ],
-    other_values: [ "32px", "-3em", "12%",
-      "calc(2px)",
-      "calc(-2px)",
-      "calc(50%)",
-      "calc(3*25px)",
-      "calc(25px*3)",
-      "calc(3*25px + 50%)",
-    ],
-    invalid_values: [],
-    quirks_values: { "5": "5px" },
-  },
-  "box-shadow": {
-    domProp: "boxShadow",
-    inherited: false,
-    type: CSS_TYPE_LONGHAND,
-    initial_values: [ "none" ],
-    prerequisites: { "color": "blue" },
-    other_values: [ "2px 2px", "2px 2px 1px", "2px 2px 2px 2px", "blue 3px 2px", "2px 2px 1px 5px green", "2px 2px red", "green 2px 2px 1px", "green 2px 2px, blue 1px 3px 4px", "currentColor 3px 3px", "blue 2px 2px, currentColor 1px 2px, 1px 2px 3px 2px orange", "3px 0 0 0", "inset 2px 2px 3px 4px black", "2px -2px green inset, 4px 4px 3px blue, inset 2px 2px",
-      /* calc() values */
-      "2px 2px calc(-5px)", /* clamped */
-      "calc(3em - 2px) 2px green",
-      "green calc(3em - 2px) 2px",
-      "2px calc(2px + 0.2em)",
-      "blue 2px calc(2px + 0.2em)",
-      "2px calc(2px + 0.2em) blue",
-      "calc(-2px) calc(-2px)",
-      "-2px -2px",
-      "calc(2px) calc(2px)",
-      "calc(2px) calc(2px) calc(2px)",
-      "calc(2px) calc(2px) calc(2px) calc(2px)"
-    ],
-    invalid_values: [ "3% 3%", "1px 1px 1px 1px 1px", "2px 2px, none", "red 2px 2px blue", "inherit, 2px 2px", "2px 2px, inherit", "2px 2px -5px", "inset 4px 4px black inset", "inset inherit", "inset none", "3 3", "3px 3", "3 3px", "3px 3px 3", "3px 3px 3px 3" ]
-  },
-  "caption-side": {
-    domProp: "captionSide",
-    inherited: true,
-    type: CSS_TYPE_LONGHAND,
-    initial_values: [ "top" ],
-    other_values: [ "right", "left", "bottom", "top-outside", "bottom-outside" ],
-    invalid_values: []
-  },
-  "clear": {
-    domProp: "clear",
-    inherited: false,
-    type: CSS_TYPE_LONGHAND,
-    initial_values: [ "none" ],
-    other_values: [ "left", "right", "both" ],
-    invalid_values: []
-  },
-  "clip": {
-    domProp: "clip",
-    inherited: false,
-    type: CSS_TYPE_LONGHAND,
-    initial_values: [ "auto" ],
-    other_values: [ "rect(0 0 0 0)", "rect(auto,auto,auto,auto)", "rect(3px, 4px, 4em, 0)", "rect(auto, 3em, 4pt, 2px)", "rect(2px 3px 4px 5px)" ],
-    invalid_values: [ "rect(auto, 3em, 2%, 5px)" ],
-    quirks_values: { "rect(1, 2, 3, 4)": "rect(1px, 2px, 3px, 4px)" },
-  },
-  "color": {
-    domProp: "color",
-    inherited: true,
-    type: CSS_TYPE_LONGHAND,
-    /* XXX should test currentColor, but may or may not be initial */
-    initial_values: [ "black", "#000", "-moz-default-color" ],
-    other_values: [ "green", "#f3c", "#fed292", "rgba(45,300,12,2)", "transparent", "-moz-nativehyperlinktext", "rgba(255,128,0,0.5)" ],
-    invalid_values: [ "#f", "#ff", "#ffff", "#fffff", "#fffffff", "#ffffffff", "#fffffffff" ],
-    quirks_values: { "000000": "#000000", "96ed2a": "#96ed2a", "fff": "#ffffff", "ffffff": "#ffffff", },
-  },
-  "content": {
-    domProp: "content",
-    inherited: false,
-    type: CSS_TYPE_LONGHAND,
-    /* XXX needs to be on pseudo-elements */
-    initial_values: [ "normal", "none" ],
-    other_values: [ '""', "''", '"hello"', "url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==)", "url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==')", 'url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==")', 'counter(foo)', 'counter(bar, upper-roman)', 'counters(foo, ".")', "counters(bar, '-', lower-greek)", "'-' counter(foo) '.'", "attr(title)", "open-quote", "close-quote", "no-open-quote", "no-close-quote", "close-quote attr(title) counters(foo, '.', upper-alpha)", "counter(foo, none)", "counters(bar, '.', none)", "attr(\\32)", "attr(\\2)", "attr(-\\2)", "attr(-\\32)", "counter(\\2)", "counters(\\32, '.')", "counter(-\\32, upper-roman)", "counters(-\\2, '-', lower-greek)", "counter(\\()", "counters(a\\+b, '.')", "counter(\\}, upper-alpha)", "-moz-alt-content" ],
-    invalid_values: [ 'counters(foo)', 'counter(foo, ".")', 'attr("title")', "attr('title')", "attr(2)", "attr(-2)", "counter(2)", "counters(-2, '.')", "-moz-alt-content 'foo'", "'foo' -moz-alt-content" ]
-  },
-  "counter-increment": {
-    domProp: "counterIncrement",
-    inherited: false,
-    type: CSS_TYPE_LONGHAND,
-    initial_values: [ "none" ],
-    other_values: [ "foo 1", "bar", "foo 3 bar baz 2", "\\32  1", "-\\32  1", "-c 1", "\\32 1", "-\\32 1", "\\2  1", "-\\2  1", "-c 1", "\\2 1", "-\\2 1", "-\\7f \\9e 1" ],
-    invalid_values: [ "none foo", "none foo 3", "foo none", "foo 3 none" ],
-    unbalanced_values: [ "foo 1 (" ]
-  },
-  "counter-reset": {
-    domProp: "counterReset",
-    inherited: false,
-    type: CSS_TYPE_LONGHAND,
-    initial_values: [ "none" ],
-    other_values: [ "foo 1", "bar", "foo 3 bar baz 2", "\\32  1", "-\\32  1", "-c 1", "\\32 1", "-\\32 1", "\\2  1", "-\\2  1", "-c 1", "\\2 1", "-\\2 1", "-\\7f \\9e 1" ],
-    invalid_values: [ "none foo", "none foo 3", "foo none", "foo 3 none" ]
-  },
-  "cursor": {
-    domProp: "cursor",
-    inherited: true,
-    type: CSS_TYPE_LONGHAND,
-    initial_values: [ "auto" ],
-    other_values: [ "crosshair", "default", "pointer", "move", "e-resize", "ne-resize", "nw-resize", "n-resize", "se-resize", "sw-resize", "s-resize", "w-resize", "text", "wait", "help", "progress", "copy", "alias", "context-menu", "cell", "not-allowed", "col-resize", "row-resize", "no-drop", "vertical-text", "all-scroll", "nesw-resize", "nwse-resize", "ns-resize", "ew-resize", "none", "grab", "grabbing", "zoom-in", "zoom-out", "-moz-grab", "-moz-grabbing", "-moz-zoom-in", "-moz-zoom-out", "url(foo.png), move", "url(foo.png) 5 7, move", "url(foo.png) 12 3, url(bar.png), no-drop", "url(foo.png), url(bar.png) 7 2, wait", "url(foo.png) 3 2, url(bar.png) 7 9, pointer" ],
-    invalid_values: [ "url(foo.png)", "url(foo.png) 5 5" ]
-  },
-  "direction": {
-    domProp: "direction",
-    inherited: true,
-    type: CSS_TYPE_LONGHAND,
-    initial_values: [ "ltr" ],
-    other_values: [ "rtl" ],
-    invalid_values: []
-  },
-  "display": {
-    domProp: "display",
-    inherited: false,
-    type: CSS_TYPE_LONGHAND,
-    initial_values: [ "inline" ],
-    /* XXX none will really mess with other properties */
-    prerequisites: { "float": "none", "position": "static" },
-    other_values: [
-      "block",
-      "flex",
-      "inline-flex",
-      "list-item",
-      "inline-block",
-      "table",
-      "inline-table",
-      "table-row-group",
-      "table-header-group",
-      "table-footer-group",
-      "table-row",
-      "table-column-group",
-      "table-column",
-      "table-cell",
-      "table-caption",
-      "none"
-    ],
-    invalid_values: []
-  },
-  "empty-cells": {
-    domProp: "emptyCells",
-    inherited: true,
-    type: CSS_TYPE_LONGHAND,
-    initial_values: [ "show" ],
-    other_values: [ "hide", "-moz-show-background" ],
-    invalid_values: []
-  },
-  "float": {
-    domProp: "cssFloat",
-    inherited: false,
-    type: CSS_TYPE_LONGHAND,
-    initial_values: [ "none" ],
-    other_values: [ "left", "right" ],
-    invalid_values: []
-  },
-  "font": {
-    domProp: "font",
-    inherited: true,
-    type: CSS_TYPE_TRUE_SHORTHAND,
-    subproperties: [ "font-style", "font-variant", "font-weight", "font-size", "line-height", "font-family", "font-stretch", "font-size-adjust", "-moz-font-feature-settings", "-moz-font-language-override" ],
-    initial_values: [ (gInitialFontFamilyIsSansSerif ? "medium sans-serif" : "medium serif") ],
-    other_values: [ "large serif", "9px fantasy", "bold italic small-caps 24px/1.4 Times New Roman, serif", "small inherit roman", "small roman inherit",
-      // system fonts
-      "caption", "icon", "menu", "message-box", "small-caption", "status-bar",
-      // Gecko-specific system fonts
-      "-moz-window", "-moz-document", "-moz-desktop", "-moz-info", "-moz-dialog", "-moz-button", "-moz-pull-down-menu", "-moz-list", "-moz-field", "-moz-workspace",
-    ],
-    invalid_values: [ "9 fantasy", "-2px fantasy" ]
-  },
-  "font-family": {
-    domProp: "fontFamily",
-    inherited: true,
-    type: CSS_TYPE_LONGHAND,
-    initial_values: [ (gInitialFontFamilyIsSansSerif ? "sans-serif" : "serif") ],
-    other_values: [ (gInitialFontFamilyIsSansSerif ? "serif" : "sans-serif"), "Times New Roman, serif", "'Times New Roman', serif", "cursive", "fantasy", "\\\"Times New Roman", "\"Times New Roman\"", "Times, \\\"Times New Roman", "Times, \"Times New Roman\"", "-no-such-font-installed", "inherit roman", "roman inherit", "Times, inherit roman", "inherit roman, Times", "roman inherit, Times", "Times, roman inherit" ],
-    invalid_values: [ "\"Times New\" Roman", "\"Times New Roman\n", "Times, \"Times New Roman\n" ]
-  },
-  "-moz-font-feature-settings": {
-    domProp: "MozFontFeatureSettings",
-    inherited: true,
-    type: CSS_TYPE_LONGHAND,
-    initial_values: [ "normal" ],
-    other_values: [
-      "'liga' on", "'liga'", "\"liga\" 1", "'liga', 'clig' 1",
-      "\"liga\" off", "\"liga\" 0", '"cv01" 3, "cv02" 4',
-      '"cswh", "smcp" off, "salt" 4', '"cswh" 1, "smcp" off, "salt" 4',
-      '"cswh" 0, \'blah\', "liga", "smcp" off, "salt" 4',
-      '"liga"        ,"smcp" 0         , "blah"'
-    ],
-    invalid_values: [
-      'liga', 'liga 1', 'liga normal', '"liga" normal', 'normal liga',
-      'normal "liga"', 'normal, "liga"', '"liga=1"', "'foobar' on",
-      '"blahblah" 0', '"liga" 3.14', '"liga" 1 3.14', '"liga" 1 normal',
-      '"liga" 1 off', '"liga" on off', '"liga" , 0 "smcp"', '"liga" "smcp"'
-    ]
-  },
-  "-moz-font-language-override": {
-    domProp: "MozFontLanguageOverride",
-    inherited: true,
-    type: CSS_TYPE_LONGHAND,
-    initial_values: [ "normal" ],
-    other_values: [ "'ENG'", "'TRK'", "\"TRK\"", "'N\\'Ko'" ],
-    invalid_values: [ "TRK", "ja" ]
-  },
-  "font-size": {
-    domProp: "fontSize",
-    inherited: true,
-    type: CSS_TYPE_LONGHAND,
-    initial_values: [ "medium",
-      "1rem",
-      "calc(1rem)",
-      "calc(0.75rem + 200% - 125% + 0.25rem - 75%)"
-    ],
-    other_values: [ "large", "2em", "50%", "xx-small", "36pt", "8px", "larger", "smaller",
-      "0px",
-      "0%",
-      "calc(2em)",
-      "calc(36pt + 75% + (30% + 2em + 2px))",
-      "calc(-2em)",
-      "calc(-50%)",
-      "calc(-1px)"
-    ],
-    invalid_values: [ "-2em", "-50%", "-1px" ],
-    quirks_values: { "5": "5px" },
-  },
-  "font-size-adjust": {
-    domProp: "fontSizeAdjust",
-    inherited: true,
-    type: CSS_TYPE_LONGHAND,
-    initial_values: [ "none" ],
-    other_values: [ "0.3", "0.5", "0.7" ],
-    invalid_values: []
-  },
-  "font-stretch": {
-    domProp: "fontStretch",
-    inherited: true,
-    type: CSS_TYPE_LONGHAND,
-    initial_values: [ "normal" ],
-    other_values: [ "ultra-condensed", "extra-condensed", "condensed", "semi-condensed", "semi-expanded", "expanded", "extra-expanded", "ultra-expanded" ],
-    invalid_values: [ "narrower", "wider" ]
-  },
-  "font-style": {
-    domProp: "fontStyle",
-    inherited: true,
-    type: CSS_TYPE_LONGHAND,
-    initial_values: [ "normal" ],
-    other_values: [ "italic", "oblique" ],
-    invalid_values: []
-  },
-  "font-variant": {
-    domProp: "fontVariant",
-    inherited: true,
-    type: CSS_TYPE_LONGHAND,
-    initial_values: [ "normal" ],
-    other_values: [ "small-caps" ],
-    invalid_values: [ "small-caps normal" ]
-  },
-  "font-weight": {
-    domProp: "fontWeight",
-    inherited: true,
-    type: CSS_TYPE_LONGHAND,
-    initial_values: [ "normal", "400" ],
-    other_values: [ "bold", "100", "200", "300", "500", "600", "700", "800", "900", "bolder", "lighter" ],
-    invalid_values: [ "0", "100.0", "107", "399", "401", "699", "710", "1000" ]
-  },
-  "height": {
-    domProp: "height",
-    inherited: false,
-    type: CSS_TYPE_LONGHAND,
-    /* FIXME: test zero, and test calc clamping */
-    initial_values: [ " auto" ],
-    /* computed value tests for height test more with display:block */
-    prerequisites: { "display": "block" },
-    other_values: [ "15px", "3em", "15%",
-      "calc(2px)",
-      "calc(50%)",
-      "calc(3*25px)",
-      "calc(25px*3)",
-      "calc(3*25px + 50%)",
-    ],
-    invalid_values: [ "none", "-moz-max-content", "-moz-min-content", "-moz-fit-content", "-moz-available" ],
-    quirks_values: { "5": "5px" },
-  },
-  "ime-mode": {
-    domProp: "imeMode",
-    inherited: false,
-    type: CSS_TYPE_LONGHAND,
-    initial_values: [ "auto" ],
-    other_values: [ "normal", "disabled", "active", "inactive" ],
-    invalid_values: [ "none", "enabled", "1px" ]
-  },
-  "left": {
-    domProp: "left",
-    inherited: false,
-    type: CSS_TYPE_LONGHAND,
-    /* FIXME: run tests with multiple prerequisites */
-    prerequisites: { "position": "relative" },
-    /* XXX 0 may or may not be equal to auto */
-    initial_values: [ "auto" ],
-    other_values: [ "32px", "-3em", "12%",
-      "calc(2px)",
-      "calc(-2px)",
-      "calc(50%)",
-      "calc(3*25px)",
-      "calc(25px*3)",
-      "calc(3*25px + 50%)",
-    ],
-    invalid_values: [],
-    quirks_values: { "5": "5px" },
-  },
-  "letter-spacing": {
-    domProp: "letterSpacing",
-    inherited: true,
-    type: CSS_TYPE_LONGHAND,
-    initial_values: [ "normal" ],
-    other_values: [ "0", "0px", "1em", "2px", "-3px",
-      "calc(0px)", "calc(1em)", "calc(1em + 3px)",
-      "calc(15px / 2)", "calc(15px/2)", "calc(-3px)"
-    ],
-    invalid_values: [],
-    quirks_values: { "5": "5px" },
-  },
-  "line-height": {
-    domProp: "lineHeight",
-    inherited: true,
-    type: CSS_TYPE_LONGHAND,
-    /*
-     * Inheritance tests require consistent font size, since
-     * getComputedStyle (which uses the CSS2 computed value, or
-     * CSS2.1 used value) doesn't match what the CSS2.1 computed
-     * value is.  And they even require consistent font metrics for
-     * computation of 'normal'.   -moz-block-height requires height
-     * on a block.
-     */
-    prerequisites: { "font-size": "19px", "font-size-adjust": "none", "font-family": "serif", "font-weight": "normal", "font-style": "normal", "height": "18px", "display": "block"},
-    initial_values: [ "normal" ],
-    other_values: [ "1.0", "1", "1em", "47px", "-moz-block-height" ],
-    invalid_values: []
-  },
-  "list-style": {
-    domProp: "listStyle",
-    inherited: true,
-    type: CSS_TYPE_TRUE_SHORTHAND,
-    subproperties: [ "list-style-type", "list-style-position", "list-style-image" ],
-    initial_values: [ "outside", "disc", "disc outside", "outside disc", "disc none", "none disc", "none disc outside", "none outside disc", "disc none outside", "disc outside none", "outside none disc", "outside disc none" ],
-    other_values: [ "inside none", "none inside", "none none inside", "square", "none", "none none", "outside none none", "none outside none", "none none outside", "none outside", "outside none",
-      'url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==")',
-      'none url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==")',
-      'url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==") none',
-      'url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==") outside',
-      'outside url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==")',
-      'outside none url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==")',
-      'outside url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==") none',
-      'none url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==") outside',
-      'none outside url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==")',
-      'url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==") outside none',
-      'url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==") none outside'
-    ],
-    invalid_values: [ "outside outside", "disc disc", "unknown value", "none none none", "none disc url(404.png)", "none url(404.png) disc", "disc none url(404.png)", "disc url(404.png) none", "url(404.png) none disc", "url(404.png) disc none", "none disc outside url(404.png)" ]
-  },
-  "list-style-image": {
-    domProp: "listStyleImage",
-    inherited: true,
-    type: CSS_TYPE_LONGHAND,
-    initial_values: [ "none" ],
-    other_values: [ 'url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==")',
-      // Add some tests for interesting url() values here to test serialization, etc.
-      "url(\'data:text/plain,\"\')",
-      "url(\"data:text/plain,\'\")",
-      "url(\'data:text/plain,\\\'\')",
-      "url(\"data:text/plain,\\\"\")",
-      "url(\'data:text/plain,\\\"\')",
-      "url(\"data:text/plain,\\\'\")",
-      "url(data:text/plain,\\\\)",
-    ],
-    invalid_values: []
-  },
-  "list-style-position": {
-    domProp: "listStylePosition",
-    inherited: true,
-    type: CSS_TYPE_LONGHAND,
-    initial_values: [ "outside" ],
-    other_values: [ "inside" ],
-    invalid_values: []
-  },
-  "list-style-type": {
-    domProp: "listStyleType",
-    inherited: true,
-    type: CSS_TYPE_LONGHAND,
-    initial_values: [ "disc" ],
-    other_values: [ "none", "circle", "square",
-      "decimal", "decimal-leading-zero",
-      "lower-roman", "upper-roman", "lower-greek",
-      "lower-alpha", "lower-latin", "upper-alpha", "upper-latin",
-      "hebrew", "armenian", "georgian",
-      "cjk-decimal", "cjk-ideographic",
-      "hiragana", "katakana", "hiragana-iroha", "katakana-iroha",
-      "japanese-informal", "japanese-formal", "korean-hangul-formal",
-      "korean-hanja-informal", "korean-hanja-formal",
-      "simp-chinese-informal", "simp-chinese-formal",
-      "trad-chinese-informal", "trad-chinese-formal",
-      "-moz-cjk-heavenly-stem", "-moz-cjk-earthly-branch",
-      "-moz-trad-chinese-informal", "-moz-trad-chinese-formal",
-      "-moz-simp-chinese-informal", "-moz-simp-chinese-formal",
-      "-moz-japanese-informal", "-moz-japanese-formal",
-      "-moz-arabic-indic", "-moz-persian", "-moz-urdu",
-      "-moz-devanagari", "-moz-gurmukhi", "-moz-gujarati",
-      "-moz-oriya", "-moz-kannada", "-moz-malayalam", "-moz-bengali",
-      "-moz-tamil", "-moz-telugu", "-moz-thai", "-moz-lao",
-      "-moz-myanmar", "-moz-khmer",
-      "-moz-hangul", "-moz-hangul-consonant",
-      "-moz-ethiopic-halehame", "-moz-ethiopic-numeric",
-      "-moz-ethiopic-halehame-am",
-      "-moz-ethiopic-halehame-ti-er", "-moz-ethiopic-halehame-ti-et"
-    ],
-    invalid_values: []
-  },
-  "margin": {
-    domProp: "margin",
-    inherited: false,
-    type: CSS_TYPE_TRUE_SHORTHAND,
-    subproperties: [ "margin-top", "margin-right", "margin-bottom", "margin-left" ],
-    initial_values: [ "0", "0px 0 0em", "0% 0px 0em 0pt" ],
-    other_values: [ "3px 0", "2em 4px 2pt", "1em 2em 3px 4px" ],
-    invalid_values: [],
-    quirks_values: { "5": "5px", "3px 6px 2 5px": "3px 6px 2px 5px" },
-  },
-  "margin-bottom": {
-    domProp: "marginBottom",
-    inherited: false,
-    type: CSS_TYPE_LONGHAND,
-    /* XXX testing auto has prerequisites */
-    initial_values: [ "0", "0px", "0%", "calc(0pt)", "calc(0% + 0px)" ],
-    other_values: [ "1px", "2em", "5%",
-      "calc(2px)",
-      "calc(-2px)",
-      "calc(50%)",
-      "calc(3*25px)",
-      "calc(25px*3)",
-      "calc(3*25px + 50%)",
-    ],
-    invalid_values: [ ],
-    quirks_values: { "5": "5px" },
-  },
-  "margin-left": {
-    domProp: "marginLeft",
-    inherited: false,
-    type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
-    /* no subproperties */
-    /* XXX testing auto has prerequisites */
-    initial_values: [ "0", "0px", "0%", "calc(0pt)", "calc(0% + 0px)" ],
-    other_values: [ "1px", "2em", "5%", ".5px", "+32px", "+.789px", "-.328px", "+0.56px", "-0.974px", "237px", "-289px", "-056px", "1987.45px", "-84.32px",
-      "calc(2px)",
-      "calc(-2px)",
-      "calc(50%)",
-      "calc(3*25px)",
-      "calc(25px*3)",
-      "calc(3*25px + 50%)",
-    ],
-    invalid_values: [ "..25px", ".+5px", ".px", "-.px", "++5px", "-+4px", "+-3px", "--7px", "+-.6px", "-+.5px", "++.7px", "--.4px" ],
-    quirks_values: { "5": "5px" },
-  },
-  "margin-right": {
-    domProp: "marginRight",
-    inherited: false,
-    type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
-    /* no subproperties */
-    /* XXX testing auto has prerequisites */
-    initial_values: [ "0", "0px", "0%", "calc(0pt)", "calc(0% + 0px)" ],
-    other_values: [ "1px", "2em", "5%",
-      "calc(2px)",
-      "calc(-2px)",
-      "calc(50%)",
-      "calc(3*25px)",
-      "calc(25px*3)",
-      "calc(3*25px + 50%)",
-    ],
-    invalid_values: [ ],
-    quirks_values: { "5": "5px" },
-  },
-  "margin-top": {
-    domProp: "marginTop",
-    inherited: false,
-    type: CSS_TYPE_LONGHAND,
-    /* XXX testing auto has prerequisites */
-    initial_values: [ "0", "0px", "0%", "calc(0pt)", "calc(0% + 0px)" ],
-    other_values: [ "1px", "2em", "5%",
-      "calc(2px)",
-      "calc(-2px)",
-      "calc(50%)",
-      "calc(3*25px)",
-      "calc(25px*3)",
-      "calc(3*25px + 50%)",
-    ],
-    invalid_values: [ ],
-    quirks_values: { "5": "5px" },
-  },
-  "marker-offset": {
-    domProp: "markerOffset",
-    inherited: false,
-    type: CSS_TYPE_LONGHAND,
-    initial_values: [ "auto" ],
-    other_values: [ "6em", "-1px", "calc(0px)", "calc(3em + 2px - 4px)", "calc(-2em)" ],
-    invalid_values: []
-  },
-  "marks": {
-    /* XXX not a real property; applies only to page context */
-    domProp: "marks",
-    inherited: false,
-    backend_only: true,
-    type: CSS_TYPE_LONGHAND,
-    initial_values: [ "none" ],
-    other_values: [ "crop", "cross", "crop cross", "cross crop" ],
-    invalid_values: [ "none none", "crop none", "none crop", "cross none", "none cross" ]
-  },
-  "max-height": {
-    domProp: "maxHeight",
-    inherited: false,
-    type: CSS_TYPE_LONGHAND,
-    prerequisites: { "display": "block" },
-    initial_values: [ "none" ],
-    other_values: [ "30px", "50%", "0",
-      "calc(2px)",
-      "calc(-2px)",
-      "calc(0px)",
-      "calc(50%)",
-      "calc(3*25px)",
-      "calc(25px*3)",
-      "calc(3*25px + 50%)",
-    ],
-    invalid_values: [ "auto", "-moz-max-content", "-moz-min-content", "-moz-fit-content", "-moz-available", "5" ]
-  },
-  "max-width": {
-    domProp: "maxWidth",
-    inherited: false,
-    type: CSS_TYPE_LONGHAND,
-    prerequisites: { "display": "block" },
-    initial_values: [ "none" ],
-    other_values: [ "30px", "50%", "0", "-moz-max-content", "-moz-min-content", "-moz-fit-content", "-moz-available",
-      "calc(2px)",
-      "calc(-2px)",
-      "calc(0px)",
-      "calc(50%)",
-      "calc(3*25px)",
-      "calc(25px*3)",
-      "calc(3*25px + 50%)",
-    ],
-    invalid_values: [ "auto", "5" ]
-  },
-  "min-height": {
-    domProp: "minHeight",
-    inherited: false,
-    type: CSS_TYPE_LONGHAND,
-    prerequisites: { "display": "block" },
-    initial_values: [ "0", "calc(0em)", "calc(-2px)", "calc(-1%)" ],
-    other_values: [ "30px", "50%",
-      "calc(2px)",
-      "calc(50%)",
-      "calc(3*25px)",
-      "calc(25px*3)",
-      "calc(3*25px + 50%)",
-    ],
-    invalid_values: [ "auto", "none", "-moz-max-content", "-moz-min-content", "-moz-fit-content", "-moz-available", "5" ]
-  },
-  "min-width": {
-    domProp: "minWidth",
-    inherited: false,
-    type: CSS_TYPE_LONGHAND,
-    prerequisites: { "display": "block" },
-    initial_values: [ "0", "calc(0em)", "calc(-2px)", "calc(-1%)" ],
-    other_values: [ "30px", "50%", "-moz-max-content", "-moz-min-content", "-moz-fit-content", "-moz-available",
-      "calc(2px)",
-      "calc(50%)",
-      "calc(3*25px)",
-      "calc(25px*3)",
-      "calc(3*25px + 50%)",
-    ],
-    invalid_values: [ "auto", "none", "5" ]
-  },
+			// Tests for handling of unitless zero, which cannot
+			// be a length inside calc().
+			"calc(0)",
+			"calc(0 + 2em)",
+			"calc(2em + 0)",
+			"calc(0 * 2)",
+			"calc(2 * 0)",
+			"calc(1 * (2em + 0))",
+			"calc((2em + 0))",
+			"calc((2em + 0) * 1)",
+			"calc(1 * (0 + 2em))",
+			"calc((0 + 2em))",
+			"calc((0 + 2em) * 1)",
+		]
+	},
+	"-moz-column-rule-style": {
+		domProp: "MozColumnRuleStyle",
+		inherited: false,
+		type: CSS_TYPE_LONGHAND,
+		initial_values: [ "none" ],
+		other_values: [ "solid", "hidden", "ridge", "groove", "inset", "outset", "double", "dotted", "dashed" ],
+		invalid_values: [ "20", "foo" ]
+	},
+	"-moz-column-rule-color": {
+		domProp: "MozColumnRuleColor",
+		inherited: false,
+		type: CSS_TYPE_LONGHAND,
+		prerequisites: { "color": "green" },
+		initial_values: [ "currentColor", "-moz-use-text-color" ],
+		other_values: [ "red", "blue", "#ffff00" ],
+		invalid_values: [ "ffff00" ]
+	},
+	"-moz-column-width": {
+		domProp: "MozColumnWidth",
+		inherited: false,
+		type: CSS_TYPE_LONGHAND,
+		initial_values: [ "auto" ],
+		other_values: [
+			"15px",
+			"calc(15px)",
+			"calc(30px - 3em)",
+			"calc(-15px)",
+			"0px",
+			"calc(0px)"
+		],
+		invalid_values: [ "20", "-1px", "50%" ]
+	},
+	"-moz-float-edge": {
+		domProp: "MozFloatEdge",
+		inherited: false,
+		type: CSS_TYPE_LONGHAND,
+		initial_values: [ "content-box" ],
+		other_values: [ "margin-box" ],
+		invalid_values: [ "content", "padding", "border", "margin" ]
+	},
+	"-moz-force-broken-image-icon": {
+		domProp: "MozForceBrokenImageIcon",
+		inherited: false,
+		type: CSS_TYPE_LONGHAND,
+		initial_values: [ "0" ],
+		other_values: [ "1" ],
+		invalid_values: []
+	},
+	"-moz-image-region": {
+		domProp: "MozImageRegion",
+		inherited: true,
+		type: CSS_TYPE_LONGHAND,
+		initial_values: [ "auto" ],
+		other_values: [ "rect(3px 20px 15px 4px)", "rect(17px, 21px, 33px, 2px)" ],
+		invalid_values: [ "rect(17px, 21px, 33, 2px)" ]
+	},
+	"-moz-margin-end": {
+		domProp: "MozMarginEnd",
+		inherited: false,
+		type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
+		get_computed: logical_box_prop_get_computed,
+		/* no subproperties */
+		/* auto may or may not be initial */
+		initial_values: [ "0", "0px", "0%", "0em", "0ex", "calc(0pt)", "calc(0% + 0px)" ],
+		other_values: [ "1px", "3em",
+			"calc(2px)",
+			"calc(-2px)",
+			"calc(50%)",
+			"calc(3*25px)",
+			"calc(25px*3)",
+			"calc(3*25px + 50%)",
+		],
+		invalid_values: [ "5" ]
+	},
+	"-moz-margin-start": {
+		domProp: "MozMarginStart",
+		inherited: false,
+		type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
+		get_computed: logical_box_prop_get_computed,
+		/* no subproperties */
+		/* auto may or may not be initial */
+		initial_values: [ "0", "0px", "0%", "0em", "0ex", "calc(0pt)", "calc(0% + 0px)" ],
+		other_values: [ "1px", "3em",
+			"calc(2px)",
+			"calc(-2px)",
+			"calc(50%)",
+			"calc(3*25px)",
+			"calc(25px*3)",
+			"calc(3*25px + 50%)",
+		],
+		invalid_values: [ "5" ]
+	},
+	"-moz-outline-radius": {
+		domProp: "MozOutlineRadius",
+		inherited: false,
+		type: CSS_TYPE_TRUE_SHORTHAND,
+		prerequisites: { "width": "200px", "height": "100px", "display": "inline-block"},
+		subproperties: [ "-moz-outline-radius-bottomleft", "-moz-outline-radius-bottomright", "-moz-outline-radius-topleft", "-moz-outline-radius-topright" ],
+		initial_values: [ "0", "0px", "0%", "calc(-2px)", "calc(-1%)", "calc(0px) calc(0pt) calc(0%) calc(0em)" ],
+		other_values: [ "3%", "1px", "2em", "3em 2px", "2pt 3% 4em", "2px 2px 2px 2px", // circular
+						"3% / 2%", "1px / 4px", "2em / 1em", "3em 2px / 2px 3em", "2pt 3% 4em / 4pt 1% 5em", "2px 2px 2px 2px / 4px 4px 4px 4px", "1pt / 2pt 3pt", "4pt 5pt / 3pt", // elliptical
+			"calc(2px)",
+			"calc(50%)",
+			"calc(3*25px)",
+			"calc(3*25px) 5px",
+			"5px calc(3*25px)",
+			"calc(20%) calc(3*25px)",
+			"calc(25px*3)",
+			"calc(3*25px + 50%)",
+			"2px 2px calc(2px + 1%) 2px",
+			"1px 2px 2px 2px / 2px 2px calc(2px + 1%) 2px",
+					  ],
+		invalid_values: [ "2px -2px", "inherit 2px", "inherit / 2px", "2px inherit", "2px / inherit", "2px 2px 2px 2px 2px", "1px / 2px 2px 2px 2px 2px", "2", "2 2", "2px 2px 2px 2px / 2px 2px 2 2px" ]
+	},
+	"-moz-outline-radius-bottomleft": {
+		domProp: "MozOutlineRadiusBottomleft",
+		inherited: false,
+		type: CSS_TYPE_LONGHAND,
+		prerequisites: { "width": "200px", "height": "100px", "display": "inline-block"},
+		initial_values: [ "0", "0px", "0%", "calc(-2px)", "calc(-1%)", "calc(0px)" ],
+		other_values: [ "3%", "1px", "2em", // circular
+						"3% 2%", "1px 4px", "2em 2pt", // elliptical
+			"calc(2px)",
+			"calc(50%)",
+			"calc(3*25px)",
+			"calc(3*25px) 5px",
+			"5px calc(3*25px)",
+			"calc(20%) calc(3*25px)",
+			"calc(25px*3)",
+			"calc(3*25px + 50%)",
+					  ],
+		invalid_values: [ "-1px", "4px -2px", "inherit 2px", "2px inherit", "2", "2px 2", "2 2px" ]
+	},
+	"-moz-outline-radius-bottomright": {
+		domProp: "MozOutlineRadiusBottomright",
+		inherited: false,
+		type: CSS_TYPE_LONGHAND,
+		prerequisites: { "width": "200px", "height": "100px", "display": "inline-block"},
+		initial_values: [ "0", "0px", "0%", "calc(-2px)", "calc(-1%)", "calc(0px)" ],
+		other_values: [ "3%", "1px", "2em", // circular
+						"3% 2%", "1px 4px", "2em 2pt", // elliptical
+			"calc(2px)",
+			"calc(50%)",
+			"calc(3*25px)",
+			"calc(3*25px) 5px",
+			"5px calc(3*25px)",
+			"calc(20%) calc(3*25px)",
+			"calc(25px*3)",
+			"calc(3*25px + 50%)",
+					  ],
+		invalid_values: [ "-1px", "4px -2px", "inherit 2px", "2px inherit", "2", "2px 2", "2 2px" ]
+	},
+	"-moz-outline-radius-topleft": {
+		domProp: "MozOutlineRadiusTopleft",
+		inherited: false,
+		type: CSS_TYPE_LONGHAND,
+		prerequisites: { "width": "200px", "height": "100px", "display": "inline-block"},
+		initial_values: [ "0", "0px", "0%", "calc(-2px)", "calc(-1%)", "calc(0px)" ],
+		other_values: [ "3%", "1px", "2em", // circular
+						"3% 2%", "1px 4px", "2em 2pt", // elliptical
+			"calc(2px)",
+			"calc(50%)",
+			"calc(3*25px)",
+			"calc(3*25px) 5px",
+			"5px calc(3*25px)",
+			"calc(20%) calc(3*25px)",
+			"calc(25px*3)",
+			"calc(3*25px + 50%)",
+					  ],
+		invalid_values: [ "-1px", "4px -2px", "inherit 2px", "2px inherit", "2", "2px 2", "2 2px" ]
+	},
+	"-moz-outline-radius-topright": {
+		domProp: "MozOutlineRadiusTopright",
+		inherited: false,
+		type: CSS_TYPE_LONGHAND,
+		prerequisites: { "width": "200px", "height": "100px", "display": "inline-block"},
+		initial_values: [ "0", "0px", "0%", "calc(-2px)", "calc(-1%)", "calc(0px)" ],
+		other_values: [ "3%", "1px", "2em", // circular
+						"3% 2%", "1px 4px", "2em 2pt", // elliptical
+			"calc(2px)",
+			"calc(50%)",
+			"calc(3*25px)",
+			"calc(3*25px) 5px",
+			"5px calc(3*25px)",
+			"calc(20%) calc(3*25px)",
+			"calc(25px*3)",
+			"calc(3*25px + 50%)",
+					  ],
+		invalid_values: [ "-1px", "4px -2px", "inherit 2px", "2px inherit", "2", "2px 2", "2 2px" ]
+	},
+	"-moz-padding-end": {
+		domProp: "MozPaddingEnd",
+		inherited: false,
+		type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
+		get_computed: logical_box_prop_get_computed,
+		/* no subproperties */
+		initial_values: [ "0", "0px", "0%", "0em", "0ex", "calc(0pt)", "calc(0% + 0px)", "calc(-3px)", "calc(-1%)" ],
+		other_values: [ "1px", "3em",
+			"calc(2px)",
+			"calc(50%)",
+			"calc(3*25px)",
+			"calc(25px*3)",
+			"calc(3*25px + 50%)",
+		],
+		invalid_values: [ "5" ]
+	},
+	"-moz-padding-start": {
+		domProp: "MozPaddingStart",
+		inherited: false,
+		type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
+		get_computed: logical_box_prop_get_computed,
+		/* no subproperties */
+		initial_values: [ "0", "0px", "0%", "0em", "0ex", "calc(0pt)", "calc(0% + 0px)", "calc(-3px)", "calc(-1%)" ],
+		other_values: [ "1px", "3em",
+			"calc(2px)",
+			"calc(50%)",
+			"calc(3*25px)",
+			"calc(25px*3)",
+			"calc(3*25px + 50%)",
+		],
+		invalid_values: [ "5" ]
+	},
+	"resize": {
+		domProp: "resize",
+		inherited: false,
+		type: CSS_TYPE_LONGHAND,
+		prerequisites: { "display": "block", "overflow": "auto" },
+		initial_values: [ "none" ],
+		other_values: [ "both", "horizontal", "vertical" ],
+		invalid_values: []
+	},
+	"-moz-stack-sizing": {
+		domProp: "MozStackSizing",
+		inherited: false,
+		type: CSS_TYPE_LONGHAND,
+		initial_values: [ "stretch-to-fit" ],
+		other_values: [ "ignore" ],
+		invalid_values: []
+	},
+	"-moz-tab-size": {
+		domProp: "MozTabSize",
+		inherited: true,
+		type: CSS_TYPE_LONGHAND,
+		initial_values: [ "8" ],
+		other_values: [ "0", "3", "99", "12000" ],
+		invalid_values: [ "-1", "-808", "3.0", "17.5" ]
+	},
+	"-moz-text-size-adjust": {
+		domProp: "MozTextSizeAdjust",
+		inherited: true,
+		type: CSS_TYPE_LONGHAND,
+		initial_values: [ "auto" ],
+		other_values: [ "none" ],
+		invalid_values: [ "-5%", "0", "100", "0%", "50%", "100%", "220.3%" ]
+	},
+	"transform": {
+		domProp: "transform",
+		inherited: false,
+		type: CSS_TYPE_LONGHAND,
+		prerequisites: { "width": "300px", "height": "50px" },
+		initial_values: [ "none" ],
+		other_values: [ "translatex(1px)", "translatex(4em)",
+			"translatex(-4px)", "translatex(3px)",
+			"translatex(0px) translatex(1px) translatex(2px) translatex(3px) translatex(4px)",
+			"translatey(4em)", "translate(3px)", "translate(10px, -3px)",
+			"rotate(45deg)", "rotate(45grad)", "rotate(45rad)",
+			"rotate(0.25turn)", "rotate(0)", "scalex(10)", "scaley(10)",
+			"scale(10)", "scale(10, 20)", "skewx(30deg)", "skewx(0)",
+			"skewy(0)", "skewx(30grad)", "skewx(30rad)", "skewx(0.08turn)",
+			"skewy(30deg)", "skewy(30grad)", "skewy(30rad)", "skewy(0.08turn)",
+			"rotate(45deg) scale(2, 1)", "skewx(45deg) skewx(-50grad)",
+			"translate(0, 0) scale(1, 1) skewx(0) skewy(0) matrix(1, 0, 0, 1, 0, 0)",
+			"translatex(50%)", "translatey(50%)", "translate(50%)",
+			"translate(3%, 5px)", "translate(5px, 3%)",
+			"matrix(1, 2, 3, 4, 5, 6)",
+			/* valid calc() values */
+			"translatex(calc(5px + 10%))",
+			"translatey(calc(0.25 * 5px + 10% / 3))",
+			"translate(calc(5px - 10% * 3))",
+			"translate(calc(5px - 3 * 10%), 50px)",
+			"translate(-50px, calc(5px - 10% * 3))",
+			"translatez(1px)", "translatez(4em)", "translatez(-4px)",
+			"translatez(0px)", "translatez(2px) translatez(5px)",
+			"translate3d(3px, 4px, 5px)", "translate3d(2em, 3px, 1em)",
+			"translatex(2px) translate3d(4px, 5px, 6px) translatey(1px)",
+			"scale3d(4, 4, 4)", "scale3d(-2, 3, -7)", "scalez(4)",
+			"scalez(-6)", "rotate3d(2, 3, 4, 45deg)",
+			"rotate3d(-3, 7, 0, 12rad)", "rotatex(15deg)", "rotatey(-12grad)",
+			"rotatez(72rad)", "rotatex(0.125turn)", "perspective(1000px)",
+			"matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16)",
+		],
+		invalid_values: ["1px", "#0000ff", "red", "auto",
+			"translatex(1)", "translatey(1)", "translate(2)",
+			"translate(-3, -4)",
+			"translatex(1px 1px)", "translatex(translatex(1px))",
+			"translatex(#0000ff)", "translatex(red)", "translatey()",
+			"matrix(1px, 2px, 3px, 4px, 5px, 6px)", "scale(150%)",
+			"skewx(red)", "matrix(1%, 0, 0, 0, 0px, 0px)",
+			"matrix(0, 1%, 2, 3, 4px,5px)", "matrix(0, 1, 2%, 3, 4px, 5px)",
+			"matrix(0, 1, 2, 3%, 4%, 5%)", "matrix(1, 2, 3, 4, 5px, 6%)",
+			"matrix(1, 2, 3, 4, 5%, 6px)", "matrix(1, 2, 3, 4, 5%, 6%)",
+			"matrix(1, 2, 3, 4, 5px, 6em)",
+			/* invalid calc() values */
+			"translatey(-moz-min(5px,10%))",
+			"translatex(-moz-max(5px,10%))",
+			"translate(10px, calc(min(5px,10%)))",
+			"translate(calc(max(5px,10%)), 10%)",
+			"matrix(1, 0, 0, 1, max(5px * 3), calc(10% - 3px))",
+			"perspective(0px)", "perspective(-10px)", "matrix3d(dinosaur)",
+			"matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17)",
+			"matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15)",
+			"matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15%, 16)",
+			"matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16px)",
+			"rotatey(words)", "rotatex(7)", "translate3d(3px, 4px, 1px, 7px)",
+			"matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13px, 14em, 15px, 16)",
+			"matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 20%, 10%, 15, 16)"
+		],
+	},
+	"transform-origin": {
+		domProp: "transformOrigin",
+		inherited: false,
+		type: CSS_TYPE_LONGHAND,
+		/* no subproperties */
+		prerequisites: { "width": "10px", "height": "10px", "display": "block"},
+		initial_values: [ "50% 50%", "center", "center center" ],
+		other_values: [ "25% 25%", "6px 5px", "20% 3em", "0 0", "0in 1in",
+						"top", "bottom","top left", "top right",
+						"top center", "center left", "center right",
+						"bottom left", "bottom right", "bottom center",
+						"20% center", "6px center", "13in bottom",
+						"left 50px", "right 13%", "center 40px",
+			"calc(20px)",
+			"calc(20px) 10px",
+			"10px calc(20px)",
+			"calc(20px) 25%",
+			"25% calc(20px)",
+			"calc(20px) calc(20px)",
+			"calc(20px + 1em) calc(20px / 2)",
+			"calc(20px + 50%) calc(50% - 10px)",
+			"calc(-20px) calc(-50%)",
+			"calc(-20%) calc(-50%)",
+			"6px 5px 5px",
+			"top center 10px"
+		],
+		invalid_values: ["red", "auto", "none", "0.5 0.5", "40px #0000ff",
+						 "border", "center red", "right diagonal",
+						 "#00ffff bottom"]
+	},
+	"perspective-origin": {
+		domProp: "perspectiveOrigin",
+		inherited: false,
+		type: CSS_TYPE_LONGHAND,
+		/* no subproperties */
+		prerequisites: { "width": "10px", "height": "10px", "display": "block"},
+		initial_values: [ "50% 50%", "center", "center center" ],
+		other_values: [ "25% 25%", "6px 5px", "20% 3em", "0 0", "0in 1in",
+		                "top", "bottom","top left", "top right",
+		                "top center", "center left", "center right",
+		                "bottom left", "bottom right", "bottom center",
+		                "20% center", "6px center", "13in bottom",
+		                "left 50px", "right 13%", "center 40px",
+		                "calc(20px)",
+		                "calc(20px) 10px",
+		                "10px calc(20px)",
+		                "calc(20px) 25%",
+		                "25% calc(20px)",
+		                "calc(20px) calc(20px)",
+		                "calc(20px + 1em) calc(20px / 2)",
+		                "calc(20px + 50%) calc(50% - 10px)",
+		                "calc(-20px) calc(-50%)",
+		                "calc(-20%) calc(-50%)" ],
+		invalid_values: [ "red", "auto", "none", "0.5 0.5", "40px #0000ff",
+		                  "border", "center red", "right diagonal",
+		                  "#00ffff bottom"]
+	},
+	"perspective": {
+		domProp: "perspective",
+		inherited: false,
+		type: CSS_TYPE_LONGHAND,
+		initial_values: [ "none" ],
+		other_values: [ "1000px", "500.2px" ],
+		invalid_values: [ "pants", "200", "0", "-100px", "-27.2em", "0px" ]
+	},
+	"backface-visibility": {
+		domProp: "backfaceVisibility",
+		inherited: false,
+		type: CSS_TYPE_LONGHAND,
+		initial_values: [ "visible" ],
+		other_values: [ "hidden" ],
+		invalid_values: [ "collapse" ]
+	},
+	"transform-style": {
+		domProp: "transformStyle",
+		inherited: false,
+		type: CSS_TYPE_LONGHAND,
+		initial_values: [ "flat" ],
+		other_values: [ "preserve-3d" ],
+		invalid_values: []
+	},
+	"-moz-user-focus": {
+		domProp: "MozUserFocus",
+		inherited: true,
+		type: CSS_TYPE_LONGHAND,
+		initial_values: [ "none" ],
+		other_values: [ "normal", "ignore", "select-all", "select-before", "select-after", "select-same", "select-menu" ],
+		invalid_values: []
+	},
+	"-moz-user-input": {
+		domProp: "MozUserInput",
+		inherited: true,
+		type: CSS_TYPE_LONGHAND,
+		initial_values: [ "auto" ],
+		other_values: [ "none", "enabled", "disabled" ],
+		invalid_values: []
+	},
+	"-moz-user-modify": {
+		domProp: "MozUserModify",
+		inherited: true,
+		type: CSS_TYPE_LONGHAND,
+		initial_values: [ "read-only" ],
+		other_values: [ "read-write", "write-only" ],
+		invalid_values: []
+	},
+	"-moz-user-select": {
+		domProp: "MozUserSelect",
+		inherited: false,
+		type: CSS_TYPE_LONGHAND,
+		initial_values: [ "auto" ],
+		other_values: [ "none", "text", "element", "elements", "all", "toggle", "tri-state", "-moz-all", "-moz-none" ],
+		invalid_values: []
+	},
+	"-moz-window-shadow": {
+		domProp: "MozWindowShadow",
+		inherited: false,
+		type: CSS_TYPE_LONGHAND,
+		initial_values: [ "default" ],
+		other_values: [ "none", "menu", "tooltip", "sheet" ],
+		invalid_values: []
+	},
+	"background": {
+		domProp: "background",
+		inherited: false,
+		type: CSS_TYPE_TRUE_SHORTHAND,
+		subproperties: [ "background-attachment", "background-color", "background-image", "background-position", "background-repeat", "background-clip", "background-origin", "background-size" ],
+		initial_values: [ "transparent", "none", "repeat", "scroll", "0% 0%", "top left", "left top", "0% 0% / auto", "top left / auto", "left top / auto", "0% 0% / auto auto",
+			"transparent none", "top left none", "left top none", "none left top", "none top left", "none 0% 0%", "left top / auto none", "left top / auto auto none",
+			"transparent none repeat scroll top left", "left top repeat none scroll transparent", "transparent none repeat scroll top left / auto", "left top / auto repeat none scroll transparent", "none repeat scroll 0% 0% / auto auto transparent" ],
+		other_values: [
+				/* without multiple backgrounds */
+			"green",
+			"none green repeat scroll left top",
+			"url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==)",
+			"repeat url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==') transparent left top scroll",
+			"repeat-x",
+			"repeat-y",
+			"no-repeat",
+			"none repeat-y transparent scroll 0% 0%",
+			"fixed",
+			"0% top transparent fixed repeat none",
+			"top",
+			"left",
+			"50% 50%",
+			"center",
+			"top / 100px",
+			"left / contain",
+			"left / cover",
+			"10px / 10%",
+			"10em / calc(20px)",
+			"top left / 100px 100px",
+			"top left / 100px auto",
+			"top left / 100px 10%",
+			"top left / 100px calc(20px)",
+			"bottom right scroll none transparent repeat",
+			"50% transparent",
+			"transparent 50%",
+			"50%",
+			"-moz-radial-gradient(10% bottom, #ffffff, black) scroll no-repeat",
+			"-moz-linear-gradient(10px 10px -45deg, red, blue) repeat",
+			"-moz-linear-gradient(10px 10px -0.125turn, red, blue) repeat",
+			"-moz-repeating-radial-gradient(10% bottom, #ffffff, black) scroll no-repeat",
+			"-moz-repeating-linear-gradient(10px 10px -45deg, red, blue) repeat",
+			"-moz-element(#test) lime",
+				/* multiple backgrounds */
+				"url(404.png), url(404.png)",
+				"url(404.png), url(404.png) transparent",
+				"url(404.png), url(404.png) red",
+				"repeat-x, fixed, none",
+				"0% top url(404.png), url(404.png) 0% top",
+				"fixed repeat-y top left url(404.png), repeat-x green",
+				"url(404.png), -moz-linear-gradient(20px 20px -45deg, blue, green), -moz-element(#a) black",
+				"top left / contain, bottom right / cover",
+				/* test cases with clip+origin in the shorthand */
+				"url(404.png) green padding-box",
+				"url(404.png) border-box transparent",
+				"content-box url(404.png) blue",
+				"url(404.png) green padding-box padding-box",
+				"url(404.png) green padding-box border-box",
+				"content-box border-box url(404.png) blue",
+		],
+		invalid_values: [
+			/* mixes with keywords have to be in correct order */
+			"50% left", "top 50%",
+			/* no quirks mode colors */
+			"-moz-radial-gradient(10% bottom, ffffff, black) scroll no-repeat",
+			/* no quirks mode lengths */
+			"-moz-linear-gradient(10 10px -45deg, red, blue) repeat",
+			"-moz-linear-gradient(10px 10 -45deg, red, blue) repeat",
+			"linear-gradient(red -99, yellow, green, blue 120%)",
+			/* bug 258080: don't accept background-position separated */
+			"left url(404.png) top", "top url(404.png) left",
+			/* not allowed to have color in non-bottom layer */
+			"url(404.png) transparent, url(404.png)",
+			"url(404.png) red, url(404.png)",
+			"url(404.png) transparent, url(404.png) transparent",
+			"url(404.png) transparent red, url(404.png) transparent red",
+			"url(404.png) red, url(404.png) red",
+			"url(404.png) rgba(0, 0, 0, 0), url(404.png)",
+			"url(404.png) rgb(255, 0, 0), url(404.png)",
+			"url(404.png) rgba(0, 0, 0, 0), url(404.png) rgba(0, 0, 0, 0)",
+			"url(404.png) rgba(0, 0, 0, 0) rgb(255, 0, 0), url(404.png) rgba(0, 0, 0, 0) rgb(255, 0, 0)",
+			"url(404.png) rgb(255, 0, 0), url(404.png) rgb(255, 0, 0)",
+			/* bug 513395: old syntax for gradients */
+			"-moz-radial-gradient(10% bottom, 30px, 20px 20px, 10px, from(#ffffff), to(black)) scroll no-repeat",
+			"-moz-linear-gradient(10px 10px, 20px 20px, from(red), to(blue)) repeat",
+			/* clip and origin separated in the shorthand */
+			"url(404.png) padding-box green border-box",
+			"url(404.png) padding-box green padding-box",
+			"transparent padding-box url(404.png) border-box",
+			"transparent padding-box url(404.png) padding-box",
+		]
+	},
+	"background-attachment": {
+		domProp: "backgroundAttachment",
+		inherited: false,
+		type: CSS_TYPE_LONGHAND,
+		initial_values: [ "scroll" ],
+		other_values: [ "fixed", "local", "scroll,scroll", "fixed, scroll", "scroll, fixed, local, scroll", "fixed, fixed" ],
+		invalid_values: []
+	},
+	"background-clip": {