Back out bug 613659 (for regression bug 998792)

--HG--
rename : layout/reftests/backgrounds/background-size-slice.html => layout/reftests/backgrounds/background-size-continuous.html
rename : layout/reftests/backgrounds/background-size-cover-slice.html => layout/reftests/backgrounds/background-size-cover-continuous.html
rename : layout/reftests/backgrounds/background-size-cover-clone.html => layout/reftests/backgrounds/background-size-cover-each-box.html
rename : layout/reftests/backgrounds/background-size-clone.html => layout/reftests/backgrounds/background-size-each-box.html
This commit is contained in:
Mats Palmgren 2014-04-20 19:39:24 +00:00
parent 2cc113e58b
commit 6301b21c9f
59 changed files with 5615 additions and 6429 deletions

View File

@ -831,12 +831,14 @@ public:
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:

View File

@ -61,19 +61,6 @@ 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
@ -94,18 +81,10 @@ struct InlineBackgroundData
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;
@ -119,9 +98,12 @@ struct InlineBackgroundData
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;
@ -158,39 +140,6 @@ struct InlineBackgroundData
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);
@ -208,22 +157,13 @@ struct InlineBackgroundData
}
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)
{
@ -296,7 +236,6 @@ protected:
void Init(nsIFrame* aFrame)
{
mLeftBorderData.Reset();
mBidiEnabled = aFrame->PresContext()->BidiEnabled();
if (mBidiEnabled) {
// Find the containing block frame
@ -313,11 +252,8 @@ protected:
// 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)) {
@ -332,10 +268,6 @@ protected:
// 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);
@ -439,106 +371,6 @@ MakeBevelColor(mozilla::css::Side whichSide, uint8_t style,
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
@ -617,6 +449,10 @@ nsCSSRendering::PaintBorderWithStyleBorder(nsPresContext* aPresContext,
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
@ -638,67 +474,59 @@ nsCSSRendering::PaintBorderWithStyleBorder(nsPresContext* aPresContext,
// 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];
@ -715,25 +543,32 @@ nsCSSRendering::PaintBorderWithStyleBorder(nsPresContext* aPresContext,
}
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();
@ -853,7 +688,7 @@ nsCSSRendering::PaintOutline(nsPresContext* aPresContext,
outlineWidths,
outlineRadii,
outlineColors,
nullptr,
nullptr, 0,
bgColor);
br.DrawBorders();
@ -906,7 +741,7 @@ nsCSSRendering::PaintFocus(nsPresContext* aPresContext,
focusWidths,
focusRadii,
focusColors,
nullptr,
nullptr, 0,
NS_RGB(255, 0, 0));
br.DrawBorders();
@ -1161,10 +996,13 @@ nsCSSRendering::PaintBoxShadowOuter(nsPresContext* aPresContext,
nsCSSShadowArray* shadows = styleBorder->mBoxShadow;
if (!shadows)
return;
nscoord twipsPerPixel = aPresContext->DevPixelsToAppUnits(1);
gfxContextAutoSaveRestore gfxStateRestorer;
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)) {
@ -1175,29 +1013,17 @@ nsCSSRendering::PaintBoxShadowOuter(nsPresContext* aPresContext,
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();
@ -1221,7 +1047,6 @@ nsCSSRendering::PaintBoxShadowOuter(nsPresContext* aPresContext,
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)
@ -1302,7 +1127,7 @@ nsCSSRendering::PaintBoxShadowOuter(nsPresContext* aPresContext,
} 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) {
@ -1314,36 +1139,6 @@ nsCSSRendering::PaintBoxShadowOuter(nsPresContext* aPresContext,
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;
@ -1393,20 +1188,18 @@ nsCSSRendering::PaintBoxShadowInner(nsPresContext* aPresContext,
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) {
@ -1428,9 +1221,13 @@ nsCSSRendering::PaintBoxShadowInner(nsPresContext* aPresContext,
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);
@ -1709,7 +1506,6 @@ GetBackgroundClip(gfxContext *aCtx, uint8_t aBackgroundClip,
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
@ -1808,13 +1604,15 @@ SetupBackgroundClip(BackgroundClipState& aClipState, gfxContext *aCtx,
// 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();
@ -1835,7 +1633,6 @@ SetupBackgroundClip(BackgroundClipState& aClipState, gfxContext *aCtx,
return;
}
aAutoSR->EnsureSaved(aCtx);
aCtx->NewPath();
aCtx->RoundedRectangle(bgAreaGfx, aClipState.mClippedRadii, aClipState.mRadiiAreOuter);
aCtx->Clip();
@ -2610,14 +2407,26 @@ nsCSSRendering::PaintBackgroundWithSC(nsPresContext* aPresContext,
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
@ -2625,8 +2434,6 @@ nsCSSRendering::PaintBackgroundWithSC(nsPresContext* aPresContext,
// 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;
@ -2656,7 +2463,7 @@ nsCSSRendering::PaintBackgroundWithSC(nsPresContext* aPresContext,
}
GetBackgroundClip(ctx, currentBackgroundClip, bg->BottomLayer().mAttachment,
aForFrame, clipBorderArea,
aForFrame, aBorderArea,
aDirtyRect, haveRoundedCorners, bgRadii, appUnitsPerPixel,
&clipState);
}
@ -2665,8 +2472,6 @@ nsCSSRendering::PaintBackgroundWithSC(nsPresContext* aPresContext,
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
@ -2726,30 +2531,19 @@ nsCSSRendering::PaintBackgroundWithSC(nsPresContext* aPresContext,
// 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,
@ -2758,7 +2552,7 @@ nsCSSRendering::PaintBackgroundWithSC(nsPresContext* aPresContext,
}
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);
@ -2813,12 +2607,26 @@ nsCSSRendering::PaintBackgroundColorWithSC(nsPresContext* aPresContext,
}
// 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
@ -2828,8 +2636,6 @@ nsCSSRendering::PaintBackgroundColorWithSC(nsPresContext* aPresContext,
// 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 =
@ -2844,7 +2650,7 @@ nsCSSRendering::PaintBackgroundColorWithSC(nsPresContext* aPresContext,
BackgroundClipState clipState;
GetBackgroundClip(ctx, currentBackgroundClip, bg->BottomLayer().mAttachment,
aForFrame, clipBorderArea,
aForFrame, aBorderArea,
aDirtyRect, haveRoundedCorners, bgRadii, appUnitsPerPixel,
&clipState);
@ -2869,17 +2675,47 @@ 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()
@ -2903,17 +2739,6 @@ nsCSSRendering::ComputeBackgroundPositioningArea(nsPresContext* aPresContext,
}
*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());
}
@ -2927,6 +2752,7 @@ nsCSSRendering::ComputeBackgroundPositioningArea(nsPresContext* aPresContext,
NS_ASSERTION(aLayer.mOrigin == NS_STYLE_BG_ORIGIN_CONTENT,
"unknown background-origin value");
}
geometryFrame->ApplySkipSides(border);
bgPositioningArea.Deflate(border);
}
@ -3010,10 +2836,11 @@ nsCSSRendering::PrepareBackgroundLayer(nsPresContext* aPresContext,
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
@ -3023,8 +2850,8 @@ nsCSSRendering::PrepareBackgroundLayer(nsPresContext* aPresContext,
* 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.)
@ -3047,21 +2874,22 @@ nsCSSRendering::PrepareBackgroundLayer(nsPresContext* aPresContext,
* 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
@ -3087,7 +2915,7 @@ nsCSSRendering::PrepareBackgroundLayer(nsPresContext* aPresContext,
// 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.
@ -3157,13 +2985,13 @@ 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;
}
@ -5107,8 +4935,10 @@ nsContextBoxBlur::GetBlurRadiusMargin(nscoord aBlurRadius,
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;
}

View File

@ -456,6 +456,7 @@ struct nsCSSRendering {
ComputeBackgroundPositioningArea(nsPresContext* aPresContext,
nsIFrame* aForFrame,
const nsRect& aBorderArea,
const nsStyleBackground& aBackground,
const nsStyleBackground::Layer& aLayer,
nsIFrame** aAttachedToFrame);
@ -465,6 +466,7 @@ struct nsCSSRendering {
uint32_t aFlags,
const nsRect& aBorderArea,
const nsRect& aBGClipRect,
const nsStyleBackground& aBackground,
const nsStyleBackground::Layer& aLayer);
/**
@ -540,6 +542,7 @@ struct nsCSSRendering {
nsIFrame* aForFrame,
const nsRect& aBorderArea,
const nsRect& aClipRect,
const nsStyleBackground& aBackground,
const nsStyleBackground::Layer& aLayer,
uint32_t aFlags);

View File

@ -120,6 +120,7 @@ nsCSSBorderRenderer::nsCSSBorderRenderer(int32_t aAppUnitsPerPixel,
gfxCornerSizes& aBorderRadii,
const nscolor* aBorderColors,
nsBorderColors* const* aCompositeColors,
int aSkipSides,
nscolor aBackgroundColor)
: mContext(aDestContext),
mOuterRect(aOuterRect),
@ -129,6 +130,7 @@ nsCSSBorderRenderer::nsCSSBorderRenderer(int32_t aAppUnitsPerPixel,
mBorderColors(aBorderColors),
mCompositeColors(aCompositeColors),
mAUPP(aAppUnitsPerPixel),
mSkipSides(aSkipSides),
mBackgroundColor(aBackgroundColor)
{
if (!mCompositeColors) {

View File

@ -79,6 +79,7 @@ struct nsCSSBorderRenderer {
gfxCornerSizes& aBorderRadii,
const nscolor* aBorderColors,
nsBorderColors* const* aCompositeColors,
int aSkipSides,
nscolor aBackgroundColor);
gfxCornerSizes mBorderCornerDimensions;
@ -104,7 +105,8 @@ struct nsCSSBorderRenderer {
// 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

View File

@ -1934,8 +1934,14 @@ nsDisplayBackgroundImage::IsSingleFixedPositionImage(nsDisplayListBuilder* aBuil
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())
@ -1968,8 +1974,14 @@ nsDisplayBackgroundImage::TryOptimizeToImageLayer(LayerManager* aManager,
}
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())
@ -2182,13 +2194,12 @@ nsDisplayBackgroundImage::GetOpaqueRegion(nsDisplayListBuilder* aBuilder,
*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) {
@ -2236,7 +2247,7 @@ nsDisplayBackgroundImage::GetPositioningArea()
return nsCSSRendering::ComputeBackgroundPositioningArea(
mFrame->PresContext(), mFrame,
nsRect(ToReferenceFrame(), mFrame->GetSize()),
mBackgroundStyle->mLayers[mLayer],
*mBackgroundStyle, mBackgroundStyle->mLayers[mLayer],
&attachedToFrame) + ToReferenceFrame();
}
@ -2350,7 +2361,8 @@ nsDisplayBackgroundImage::GetBoundsInternal(nsDisplayListBuilder* aBuilder) {
}
const nsStyleBackground::Layer& layer = mBackgroundStyle->mLayers[mLayer];
return nsCSSRendering::GetBackgroundLayerRect(presContext, mFrame,
borderBox, clipRect, layer,
borderBox, clipRect,
*mBackgroundStyle, layer,
aBuilder->GetBackgroundPaintFlags());
}
@ -2827,8 +2839,11 @@ nsDisplayBoxShadowOuter::Paint(nsDisplayListBuilder* aBuilder,
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();
}
}

View File

@ -78,7 +78,7 @@ function foo()
<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>

View File

@ -849,31 +849,12 @@ nsContainerFrame::DoInlineIntrinsicWidth(nsRenderingContext *aRenderingContext,
// 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;
@ -882,9 +863,6 @@ nsContainerFrame::DoInlineIntrinsicWidth(nsRenderingContext *aRenderingContext,
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)
@ -913,8 +891,12 @@ nsContainerFrame::DoInlineIntrinsicWidth(nsRenderingContext *aRenderingContext,
// 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);
}
}

View File

@ -953,11 +953,6 @@ nsIFrame::GetUsedPadding() const
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();
@ -1282,8 +1277,7 @@ nsIFrame::OutsetBorderRadii(nscoord aRadii[8], const nsMargin &aOffsets)
}
/* 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
@ -1298,16 +1292,9 @@ nsIFrame::GetBorderRadii(const nsSize& aFrameSize, const nsSize& aBorderArea,
}
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

View File

@ -4366,15 +4366,10 @@ ReduceRadii(nscoord aXBorder, nscoord aYBorder,
* 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

View File

@ -71,8 +71,7 @@ public:
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;
@ -472,9 +471,8 @@ public:
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;
@ -810,9 +808,8 @@ public:
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);

View File

@ -1042,16 +1042,12 @@ public:
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;

View File

@ -1782,10 +1782,6 @@ nsImageFrame::List(FILE* out, const char* aPrefix, uint32_t aFlags) const
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;

View File

@ -115,11 +115,7 @@ nsInlineFrame::IsSelfEmpty()
!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;
@ -495,15 +491,9 @@ nsInlineFrame::ReflowFrames(nsPresContext* aPresContext,
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();
@ -664,10 +654,8 @@ nsInlineFrame::ReflowFrames(nsPresContext* aPresContext,
// 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);
}
@ -676,13 +664,11 @@ nsInlineFrame::ReflowFrames(nsPresContext* aPresContext,
* 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);
}
@ -886,11 +872,6 @@ nsInlineFrame::PushFrames(nsPresContext* aPresContext,
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();

View File

@ -1076,12 +1076,9 @@ nsLineLayout::ApplyStartMargin(PerFrameData* pfd,
// 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;
@ -1163,9 +1160,6 @@ nsLineLayout::CanPlaceFrame(PerFrameData* pfd,
* 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()) {
@ -1173,10 +1167,8 @@ nsLineLayout::CanPlaceFrame(PerFrameData* pfd,
}
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);

View File

@ -253,12 +253,8 @@ nsSplittableFrame::GetLogicalSkipSides(const nsHTMLReflowState* aReflowState) co
return LOGICAL_SIDES_B_BOTH;
}
if (MOZ_UNLIKELY(StyleBorder()->mBoxDecorationBreak ==
NS_STYLE_BOX_DECORATION_BREAK_CLONE)) {
return 0;
}
int skip = 0;
if (GetPrevInFlow()) {
skip |= LOGICAL_SIDE_B_START;
}

View File

@ -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>

View File

@ -1,7 +1,7 @@
<!DOCTYPE html>
<html>
<head>
<title>box-decoration-break: slice</title>
<title>background-break: continuous</title>
<style type="text/css">
@font-face
{
@ -21,14 +21,14 @@
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>

View File

@ -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>

View File

@ -1,7 +1,7 @@
<!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
{
@ -22,14 +22,14 @@
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>

View File

@ -1,7 +1,7 @@
<!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
{
@ -22,14 +22,14 @@
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>

View File

@ -1,7 +1,7 @@
<!DOCTYPE html>
<html>
<head>
<title>box-decoration-break: clone</title>
<title>background-break: each-box</title>
<style type="text/css">
@font-face
{
@ -21,14 +21,14 @@
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>

View File

@ -90,15 +90,19 @@ fails-if(smallScreen&&Android) != background-size-body-contain-no-repeat.html ba
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

View File

@ -5,7 +5,7 @@
</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

View File

@ -5,7 +5,7 @@
</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

View File

@ -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>

View File

@ -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>

View File

@ -5,7 +5,7 @@
</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

View File

@ -5,7 +5,7 @@
</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

View File

@ -595,8 +595,9 @@ skip-if(B2G) == 367247-l-scroll.html 367247-l-auto.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

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 396 B

View File

@ -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

View File

@ -56,9 +56,6 @@ 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

View File

@ -188,6 +188,7 @@ 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)
@ -207,7 +208,6 @@ 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)
@ -257,6 +257,7 @@ 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)
@ -495,7 +496,6 @@ 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)

View File

@ -274,6 +274,10 @@
// '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,
@ -533,6 +537,18 @@ CSS_PROP_BACKGROUND(
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,
@ -1349,16 +1365,6 @@ CSS_PROP_POSITION(
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,

View File

@ -676,6 +676,13 @@ const KTableValue nsCSSProps::kBackgroundAttachmentKTable[] = {
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,
@ -789,12 +796,6 @@ const KTableValue nsCSSProps::kBoxPropSourceKTable[] = {
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

View File

@ -506,6 +506,7 @@ public:
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[];
@ -519,7 +520,6 @@ public:
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[];

View File

@ -2073,6 +2073,16 @@ nsComputedDOMStyle::DoGetBackgroundImage()
return valueList;
}
CSSValue*
nsComputedDOMStyle::DoGetBackgroundInlinePolicy()
{
nsROCSSPrimitiveValue *val = new nsROCSSPrimitiveValue;
val->SetIdent(nsCSSProps::ValueToKeywordEnum(
StyleBackground()->mBackgroundInlinePolicy,
nsCSSProps::kBackgroundInlinePolicyKTable));
return val;
}
CSSValue*
nsComputedDOMStyle::DoGetBackgroundBlendMode()
{
@ -2970,16 +2980,6 @@ nsComputedDOMStyle::GetCSSShadowArray(nsCSSShadowArray* aArray,
return valueList;
}
CSSValue*
nsComputedDOMStyle::DoGetBoxDecorationBreak()
{
nsROCSSPrimitiveValue* val = new nsROCSSPrimitiveValue;
val->SetIdent(
nsCSSProps::ValueToKeywordEnum(StyleBorder()->mBoxDecorationBreak,
nsCSSProps::kBoxDecorationBreakKTable));
return val;
}
CSSValue*
nsComputedDOMStyle::DoGetBoxShadow()
{

View File

@ -222,7 +222,6 @@ private:
/* Box properties */
mozilla::dom::CSSValue* DoGetBoxAlign();
mozilla::dom::CSSValue* DoGetBoxDecorationBreak();
mozilla::dom::CSSValue* DoGetBoxDirection();
mozilla::dom::CSSValue* DoGetBoxFlex();
mozilla::dom::CSSValue* DoGetBoxOrdinalGroup();
@ -284,6 +283,7 @@ private:
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();

View File

@ -230,6 +230,7 @@ COMPUTED_STYLE_PROP(z_index, ZIndex)
\* ******************************* */
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)

View File

@ -6239,6 +6239,14 @@ nsRuleNode::ComputeBackgroundData(void* aStartStruct,
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,
@ -6437,13 +6445,6 @@ nsRuleNode::ComputeBorderData(void* aStartStruct,
{
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()) {

View File

@ -117,10 +117,6 @@ static inline mozilla::css::Side operator++(mozilla::css::Side& side, int) {
#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

View File

@ -388,7 +388,6 @@ nsStyleBorder::nsStyleBorder(nsPresContext* aPresContext)
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);
@ -440,7 +439,6 @@ nsStyleBorder::nsStyleBorder(const nsStyleBorder& aSrc)
mBorderImageRepeatH(aSrc.mBorderImageRepeatH),
mBorderImageRepeatV(aSrc.mBorderImageRepeatV),
mFloatEdge(aSrc.mFloatEdge),
mBoxDecorationBreak(aSrc.mBoxDecorationBreak),
mComputedBorder(aSrc.mComputedBorder),
mBorder(aSrc.mBorder),
mTwipsPerPixel(aSrc.mTwipsPerPixel)
@ -530,8 +528,7 @@ nsChangeHint nsStyleBorder::CalcDifference(const nsStyleBorder& aOther) const
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) {
@ -1971,6 +1968,7 @@ nsStyleBackground::nsStyleBackground()
, 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();
@ -1989,6 +1987,7 @@ nsStyleBackground::nsStyleBackground(const nsStyleBackground& aSource)
, 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.
@ -2046,7 +2045,9 @@ nsChangeHint nsStyleBackground::CalcDifference(const nsStyleBackground& aOther)
}
}
if (hasVisualDifference || mBackgroundColor != aOther.mBackgroundColor)
if (hasVisualDifference ||
mBackgroundColor != aOther.mBackgroundColor ||
mBackgroundInlinePolicy != aOther.mBackgroundInlinePolicy)
return NS_STYLE_HINT_VISUAL;
return NS_STYLE_HINT_NONE;

View File

@ -539,6 +539,11 @@ struct nsStyleBackground {
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;
@ -981,7 +986,6 @@ public:
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.

File diff suppressed because it is too large Load Diff

View File

@ -139,6 +139,10 @@ isnot(e.style.background, "", "should have background shorthand (size:100% auto)
e.setAttribute("style", "background: red; background-size: auto 100%");
isnot(e.style.background, "", "should have background shorthand (size:auto 100%)");
// Test background-inline-policy not interacting with the background shorthand.
e.setAttribute("style", "background: red; -moz-background-inline-policy: each-box");
isnot(e.style.background, "", "should have background shorthand (-moz-background-inline-policy not relevant)");
// Check that we only serialize background when the lists (of layers) for
// the subproperties are the same length.
e.setAttribute("style", "background-clip: border-box, padding-box, border-box; background-origin: border-box, padding-box, padding-box; background-size: cover, auto, contain; background-color: blue; background-image: url(404.png), none, url(404-2.png); background-attachment: fixed, scroll, scroll; background-position: top left, center, 30px 50px; background-repeat: repeat-x, repeat, no-repeat");

View File

@ -550,11 +550,6 @@ nsTableCellFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
int
nsTableCellFrame::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;
@ -1108,10 +1103,7 @@ nsBCTableCellFrame::GetUsedBorder() const
}
/* virtual */ bool
nsBCTableCellFrame::GetBorderRadii(const nsSize& aFrameSize,
const nsSize& aBorderArea,
int aSkipSides,
nscoord aRadii[8]) const
nsBCTableCellFrame::GetBorderRadii(nscoord aRadii[8]) const
{
NS_FOR_CSS_HALF_CORNERS(corner) {
aRadii[corner] = 0;

View File

@ -298,10 +298,7 @@ public:
virtual nsIAtom* GetType() const MOZ_OVERRIDE;
virtual nsMargin GetUsedBorder() const MOZ_OVERRIDE;
virtual bool GetBorderRadii(const nsSize& aFrameSize,
const nsSize& aBorderArea,
int aSkipSides,
nscoord aRadii[8]) const MOZ_OVERRIDE;
virtual bool GetBorderRadii(nscoord aRadii[8]) const MOZ_OVERRIDE;
// Get the *inner half of the border only*, in twips.
virtual nsMargin* GetBorderWidth(nsMargin& aBorder) const MOZ_OVERRIDE;

View File

@ -343,11 +343,6 @@ nsTableColGroupFrame::RemoveFrame(ChildListID aListID,
int
nsTableColGroupFrame::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 |= 1 << LOGICAL_SIDE_B_START;

View File

@ -1409,11 +1409,6 @@ nsTableFrame::PaintTableBorderBackground(nsRenderingContext& aRenderingContext,
int
nsTableFrame::GetLogicalSkipSides(const nsHTMLReflowState* aReflowState) const
{
if (MOZ_UNLIKELY(StyleBorder()->mBoxDecorationBreak ==
NS_STYLE_BOX_DECORATION_BREAK_CLONE)) {
return 0;
}
int skip = 0;
// frame attribute was accounted for in nsHTMLTableElement::MapTableBorderInto
// account for pagination

View File

@ -605,11 +605,6 @@ nsTableRowFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
int
nsTableRowFrame::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;

View File

@ -256,11 +256,6 @@ nsTableRowGroupFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
int
nsTableRowGroupFrame::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;

View File

@ -1900,9 +1900,6 @@ pref("layout.css.variables.enabled", true);
// Is support for CSS overflow-clip-box enabled for non-UA sheets?
pref("layout.css.overflow-clip-box.enabled", false);
// Is support for CSS box-decoration-break enabled?
pref("layout.css.box-decoration-break.enabled", false);
// pref for which side vertical scrollbars should be on
// 0 = end-side in UI direction
// 1 = end-side in document/content direction