Back out bug 613659 for build failure on B2G Windows.
This commit is contained in:
@@ -831,12 +831,14 @@ public:
|
|||||||
mContext->Save();
|
mContext->Save();
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnsureSaved(gfxContext *aContext) {
|
void Reset(gfxContext *aContext) {
|
||||||
MOZ_ASSERT(!mContext || mContext == aContext, "wrong context");
|
// Do the equivalent of destroying and re-creating this object.
|
||||||
if (!mContext) {
|
NS_PRECONDITION(aContext, "must provide a context");
|
||||||
mContext = aContext;
|
if (mContext) {
|
||||||
mContext->Save();
|
mContext->Restore();
|
||||||
}
|
}
|
||||||
|
mContext = aContext;
|
||||||
|
mContext->Save();
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|||||||
@@ -61,19 +61,6 @@ using mozilla::CSSSizeOrRatio;
|
|||||||
|
|
||||||
static int gFrameTreeLockCount = 0;
|
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
|
// To avoid storing this data on nsInlineFrame (bloat) and to avoid
|
||||||
// recalculating this for each frame in a continuation (perf), hold
|
// recalculating this for each frame in a continuation (perf), hold
|
||||||
// a cache of various coordinate information that we need in order
|
// a cache of various coordinate information that we need in order
|
||||||
@@ -94,18 +81,10 @@ struct InlineBackgroundData
|
|||||||
mBoundingBox.SetRect(0,0,0,0);
|
mBoundingBox.SetRect(0,0,0,0);
|
||||||
mContinuationPoint = mLineContinuationPoint = mUnbrokenWidth = 0;
|
mContinuationPoint = mLineContinuationPoint = mUnbrokenWidth = 0;
|
||||||
mFrame = mBlockFrame = nullptr;
|
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)
|
nsRect GetContinuousRect(nsIFrame* aFrame)
|
||||||
{
|
{
|
||||||
MOZ_ASSERT(aFrame->GetType() == nsGkAtoms::inlineFrame);
|
|
||||||
|
|
||||||
SetFrame(aFrame);
|
SetFrame(aFrame);
|
||||||
|
|
||||||
nscoord x;
|
nscoord x;
|
||||||
@@ -119,9 +98,12 @@ struct InlineBackgroundData
|
|||||||
NS_STYLE_DIRECTION_RTL);
|
NS_STYLE_DIRECTION_RTL);
|
||||||
nscoord curOffset = aFrame->GetOffsetTo(mBlockFrame).x;
|
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 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.
|
// If it's not fluid, we need to test further to be sure.
|
||||||
nsIFrame* inlineFrame = aFrame->GetPrevContinuation();
|
|
||||||
while (inlineFrame && !inlineFrame->GetNextInFlow() &&
|
while (inlineFrame && !inlineFrame->GetNextInFlow() &&
|
||||||
AreOnSameLine(aFrame, inlineFrame)) {
|
AreOnSameLine(aFrame, inlineFrame)) {
|
||||||
nscoord frameXOffset = inlineFrame->GetOffsetTo(mBlockFrame).x;
|
nscoord frameXOffset = inlineFrame->GetOffsetTo(mBlockFrame).x;
|
||||||
@@ -158,39 +140,6 @@ struct InlineBackgroundData
|
|||||||
return nsRect(-x, 0, mUnbrokenWidth, mFrame->GetSize().height);
|
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)
|
nsRect GetBoundingRect(nsIFrame* aFrame)
|
||||||
{
|
{
|
||||||
SetFrame(aFrame);
|
SetFrame(aFrame);
|
||||||
@@ -208,22 +157,13 @@ struct InlineBackgroundData
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
struct LeftBorderData {
|
nsIFrame* mFrame;
|
||||||
nsIFrame* mFrame; // the continuation that may have a left-border
|
nsBlockFrame* mBlockFrame;
|
||||||
nscoord mX; // cached GetContinuousRect(mFrame).x
|
nsRect mBoundingBox;
|
||||||
bool mIsValid; // true if mX is valid
|
nscoord mContinuationPoint;
|
||||||
void Reset() { mFrame = nullptr; mIsValid = false; }
|
nscoord mUnbrokenWidth;
|
||||||
void SetX(nscoord aX) { mX = aX; mIsValid = true; }
|
nscoord mLineContinuationPoint;
|
||||||
};
|
bool mBidiEnabled;
|
||||||
|
|
||||||
nsIFrame* mFrame;
|
|
||||||
nsBlockFrame* mBlockFrame;
|
|
||||||
nsRect mBoundingBox;
|
|
||||||
nscoord mContinuationPoint;
|
|
||||||
nscoord mUnbrokenWidth;
|
|
||||||
nscoord mLineContinuationPoint;
|
|
||||||
LeftBorderData mLeftBorderData;
|
|
||||||
bool mBidiEnabled;
|
|
||||||
|
|
||||||
void SetFrame(nsIFrame* aFrame)
|
void SetFrame(nsIFrame* aFrame)
|
||||||
{
|
{
|
||||||
@@ -296,7 +236,6 @@ protected:
|
|||||||
|
|
||||||
void Init(nsIFrame* aFrame)
|
void Init(nsIFrame* aFrame)
|
||||||
{
|
{
|
||||||
mLeftBorderData.Reset();
|
|
||||||
mBidiEnabled = aFrame->PresContext()->BidiEnabled();
|
mBidiEnabled = aFrame->PresContext()->BidiEnabled();
|
||||||
if (mBidiEnabled) {
|
if (mBidiEnabled) {
|
||||||
// Find the containing block frame
|
// Find the containing block frame
|
||||||
@@ -313,11 +252,8 @@ protected:
|
|||||||
// Start with the previous flow frame as our continuation point
|
// Start with the previous flow frame as our continuation point
|
||||||
// is the total of the widths of the previous frames.
|
// is the total of the widths of the previous frames.
|
||||||
nsIFrame* inlineFrame = GetPrevContinuation(aFrame);
|
nsIFrame* inlineFrame = GetPrevContinuation(aFrame);
|
||||||
|
|
||||||
while (inlineFrame) {
|
while (inlineFrame) {
|
||||||
if (!mLeftBorderData.mFrame &&
|
|
||||||
!(inlineFrame->GetSkipSides() & SIDE_BIT_LEFT)) {
|
|
||||||
mLeftBorderData.mFrame = inlineFrame;
|
|
||||||
}
|
|
||||||
nsRect rect = inlineFrame->GetRect();
|
nsRect rect = inlineFrame->GetRect();
|
||||||
mContinuationPoint += rect.width;
|
mContinuationPoint += rect.width;
|
||||||
if (mBidiEnabled && !AreOnSameLine(aFrame, inlineFrame)) {
|
if (mBidiEnabled && !AreOnSameLine(aFrame, inlineFrame)) {
|
||||||
@@ -332,10 +268,6 @@ protected:
|
|||||||
// unbroken width.
|
// unbroken width.
|
||||||
inlineFrame = aFrame;
|
inlineFrame = aFrame;
|
||||||
while (inlineFrame) {
|
while (inlineFrame) {
|
||||||
if (!mLeftBorderData.mFrame &&
|
|
||||||
!(inlineFrame->GetSkipSides() & SIDE_BIT_LEFT)) {
|
|
||||||
mLeftBorderData.mFrame = inlineFrame;
|
|
||||||
}
|
|
||||||
nsRect rect = inlineFrame->GetRect();
|
nsRect rect = inlineFrame->GetRect();
|
||||||
mUnbrokenWidth += rect.width;
|
mUnbrokenWidth += rect.width;
|
||||||
mBoundingBox.UnionRect(mBoundingBox, rect);
|
mBoundingBox.UnionRect(mBoundingBox, rect);
|
||||||
@@ -439,106 +371,6 @@ MakeBevelColor(mozilla::css::Side whichSide, uint8_t style,
|
|||||||
return theColor;
|
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
|
// Thebes Border Rendering Code Start
|
||||||
|
|
||||||
@@ -617,6 +449,10 @@ nsCSSRendering::PaintBorderWithStyleBorder(nsPresContext* aPresContext,
|
|||||||
nsStyleContext* aStyleContext,
|
nsStyleContext* aStyleContext,
|
||||||
int aSkipSides)
|
int aSkipSides)
|
||||||
{
|
{
|
||||||
|
nsMargin border;
|
||||||
|
nscoord twipsRadii[8];
|
||||||
|
nsCompatibility compatMode = aPresContext->CompatibilityMode();
|
||||||
|
|
||||||
SN("++ PaintBorder");
|
SN("++ PaintBorder");
|
||||||
|
|
||||||
// Check to see if we have an appearance defined. If so, we let the theme
|
// 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.
|
// Get our style context's color struct.
|
||||||
const nsStyleColor* ourColor = aStyleContext->StyleColor();
|
const nsStyleColor* ourColor = aStyleContext->StyleColor();
|
||||||
|
|
||||||
// In NavQuirks mode we want to use the parent's context as a starting point
|
// in NavQuirks mode we want to use the parent's context as a starting point
|
||||||
// for determining the background color.
|
// for determining the background color
|
||||||
bool quirks = aPresContext->CompatibilityMode() == eCompatibility_NavQuirks;
|
nsIFrame* bgFrame = nsCSSRendering::FindNonTransparentBackgroundFrame
|
||||||
nsIFrame* bgFrame = FindNonTransparentBackgroundFrame(aForFrame, quirks);
|
(aForFrame, compatMode == eCompatibility_NavQuirks ? true : false);
|
||||||
nsStyleContext* bgContext = bgFrame->StyleContext();
|
nsStyleContext* bgContext = bgFrame->StyleContext();
|
||||||
nscolor bgColor =
|
nscolor bgColor =
|
||||||
bgContext->GetVisitedDependentColor(eCSSProperty_background_color);
|
bgContext->GetVisitedDependentColor(eCSSProperty_background_color);
|
||||||
|
|
||||||
nsMargin border = aStyleBorder.GetComputedBorder();
|
border = aStyleBorder.GetComputedBorder();
|
||||||
if ((0 == border.left) && (0 == border.right) &&
|
if ((0 == border.left) && (0 == border.right) &&
|
||||||
(0 == border.top) && (0 == border.bottom)) {
|
(0 == border.top) && (0 == border.bottom)) {
|
||||||
// Empty border area
|
// Empty border area
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Compute the outermost boundary of the area that might be painted.
|
nsSize frameSize = aForFrame->GetSize();
|
||||||
// Same coordinate space as aBorderArea & aBGClipRect.
|
if (&aStyleBorder == aForFrame->StyleBorder() &&
|
||||||
nsRect joinedBorderArea =
|
frameSize == aBorderArea.Size()) {
|
||||||
::BoxDecorationRectForBorder(aForFrame, aBorderArea, &aStyleBorder);
|
aForFrame->GetBorderRadii(twipsRadii);
|
||||||
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);
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
MOZ_ASSERT(joinedBorderArea.IsEqualEdges(aBorderArea),
|
nsIFrame::ComputeBorderRadii(aStyleBorder.mBorderRadius, frameSize,
|
||||||
"Should use aBorderArea for box-decoration-break:clone");
|
aBorderArea.Size(), aSkipSides, twipsRadii);
|
||||||
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.");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 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);
|
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 borderWidths[4] = { gfxFloat(border.top / twipsPerPixel),
|
||||||
gfxFloat(border.right / twipsPerPixel),
|
gfxFloat(border.right / twipsPerPixel),
|
||||||
gfxFloat(border.bottom / twipsPerPixel),
|
gfxFloat(border.bottom / twipsPerPixel),
|
||||||
gfxFloat(border.left / twipsPerPixel) };
|
gfxFloat(border.left / twipsPerPixel) };
|
||||||
|
|
||||||
|
// convert the radii
|
||||||
|
gfxCornerSizes borderRadii;
|
||||||
|
ComputePixelRadii(twipsRadii, twipsPerPixel, &borderRadii);
|
||||||
|
|
||||||
uint8_t borderStyles[4];
|
uint8_t borderStyles[4];
|
||||||
nscolor borderColors[4];
|
nscolor borderColors[4];
|
||||||
nsBorderColors *compositeColors[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(" 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
|
#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->Save();
|
||||||
ctx->Rectangle(joinedBorderAreaPx);
|
ctx->Rectangle(oRect);
|
||||||
ctx->SetColor(gfxRGBA(1.0, 0.0, 0.0, 0.5));
|
ctx->SetColor(gfxRGBA(1.0, 0.0, 0.0, 0.5));
|
||||||
ctx->Fill();
|
ctx->Fill();
|
||||||
ctx->Restore();
|
ctx->Restore();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
//SF ("borderRadii: %f %f %f %f\n", borderRadii[0], borderRadii[1], borderRadii[2], borderRadii[3]);
|
||||||
|
|
||||||
nsCSSBorderRenderer br(twipsPerPixel,
|
nsCSSBorderRenderer br(twipsPerPixel,
|
||||||
ctx,
|
ctx,
|
||||||
joinedBorderAreaPx,
|
oRect,
|
||||||
borderStyles,
|
borderStyles,
|
||||||
borderWidths,
|
borderWidths,
|
||||||
bgRadii,
|
borderRadii,
|
||||||
borderColors,
|
borderColors,
|
||||||
compositeColors,
|
compositeColors,
|
||||||
|
aSkipSides,
|
||||||
bgColor);
|
bgColor);
|
||||||
br.DrawBorders();
|
br.DrawBorders();
|
||||||
|
|
||||||
@@ -853,7 +688,7 @@ nsCSSRendering::PaintOutline(nsPresContext* aPresContext,
|
|||||||
outlineWidths,
|
outlineWidths,
|
||||||
outlineRadii,
|
outlineRadii,
|
||||||
outlineColors,
|
outlineColors,
|
||||||
nullptr,
|
nullptr, 0,
|
||||||
bgColor);
|
bgColor);
|
||||||
br.DrawBorders();
|
br.DrawBorders();
|
||||||
|
|
||||||
@@ -906,7 +741,7 @@ nsCSSRendering::PaintFocus(nsPresContext* aPresContext,
|
|||||||
focusWidths,
|
focusWidths,
|
||||||
focusRadii,
|
focusRadii,
|
||||||
focusColors,
|
focusColors,
|
||||||
nullptr,
|
nullptr, 0,
|
||||||
NS_RGB(255, 0, 0));
|
NS_RGB(255, 0, 0));
|
||||||
br.DrawBorders();
|
br.DrawBorders();
|
||||||
|
|
||||||
@@ -1161,10 +996,13 @@ nsCSSRendering::PaintBoxShadowOuter(nsPresContext* aPresContext,
|
|||||||
nsCSSShadowArray* shadows = styleBorder->mBoxShadow;
|
nsCSSShadowArray* shadows = styleBorder->mBoxShadow;
|
||||||
if (!shadows)
|
if (!shadows)
|
||||||
return;
|
return;
|
||||||
|
nscoord twipsPerPixel = aPresContext->DevPixelsToAppUnits(1);
|
||||||
|
|
||||||
gfxContextAutoSaveRestore gfxStateRestorer;
|
|
||||||
bool hasBorderRadius;
|
bool hasBorderRadius;
|
||||||
bool nativeTheme; // mutually exclusive with 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();
|
const nsStyleDisplay* styleDisplay = aForFrame->StyleDisplay();
|
||||||
nsITheme::Transparency transparency;
|
nsITheme::Transparency transparency;
|
||||||
if (aForFrame->IsThemed(styleDisplay, &transparency)) {
|
if (aForFrame->IsThemed(styleDisplay, &transparency)) {
|
||||||
@@ -1175,29 +1013,17 @@ nsCSSRendering::PaintBoxShadowOuter(nsPresContext* aPresContext,
|
|||||||
nativeTheme = transparency != nsITheme::eOpaque;
|
nativeTheme = transparency != nsITheme::eOpaque;
|
||||||
} else {
|
} else {
|
||||||
nativeTheme = false;
|
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];
|
nscoord twipsRadii[8];
|
||||||
NS_ASSERTION(aFrameArea.Size() == aForFrame->VisualBorderRectRelativeToSelf().Size(),
|
NS_ASSERTION(aFrameArea.Size() == aForFrame->VisualBorderRectRelativeToSelf().Size(),
|
||||||
"unexpected size");
|
"unexpected size");
|
||||||
nsSize sz = frameRect.Size();
|
hasBorderRadius = aForFrame->GetBorderRadii(twipsRadii);
|
||||||
hasBorderRadius = aForFrame->GetBorderRadii(sz, sz, 0, twipsRadii);
|
|
||||||
if (hasBorderRadius) {
|
if (hasBorderRadius) {
|
||||||
ComputePixelRadii(twipsRadii, twipsPerPixel, &borderRadii);
|
ComputePixelRadii(twipsRadii, twipsPerPixel, &borderRadii);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
nsRect frameRect =
|
||||||
|
nativeTheme ? aForFrame->GetVisualOverflowRectRelativeToSelf() + aFrameArea.TopLeft() : aFrameArea;
|
||||||
gfxRect frameGfxRect(nsLayoutUtils::RectToGfxRect(frameRect, twipsPerPixel));
|
gfxRect frameGfxRect(nsLayoutUtils::RectToGfxRect(frameRect, twipsPerPixel));
|
||||||
frameGfxRect.Round();
|
frameGfxRect.Round();
|
||||||
|
|
||||||
@@ -1221,7 +1047,6 @@ nsCSSRendering::PaintBoxShadowOuter(nsPresContext* aPresContext,
|
|||||||
std::max(borderRadii[C_BL].height, borderRadii[C_BR].height), 0));
|
std::max(borderRadii[C_BL].height, borderRadii[C_BR].height), 0));
|
||||||
}
|
}
|
||||||
|
|
||||||
int skipSides = aForFrame->GetSkipSides();
|
|
||||||
for (uint32_t i = shadows->Length(); i > 0; --i) {
|
for (uint32_t i = shadows->Length(); i > 0; --i) {
|
||||||
nsCSSShadowItem* shadowItem = shadows->ShadowAt(i - 1);
|
nsCSSShadowItem* shadowItem = shadows->ShadowAt(i - 1);
|
||||||
if (shadowItem->mInset)
|
if (shadowItem->mInset)
|
||||||
@@ -1302,7 +1127,7 @@ nsCSSRendering::PaintBoxShadowOuter(nsPresContext* aPresContext,
|
|||||||
} else {
|
} else {
|
||||||
renderContext->Save();
|
renderContext->Save();
|
||||||
// Clip out the area of the actual frame so the shadow is not shown within
|
// Clip out the area of the actual frame so the shadow is not shown within
|
||||||
// the frame.
|
// the frame
|
||||||
renderContext->NewPath();
|
renderContext->NewPath();
|
||||||
renderContext->Rectangle(shadowGfxRectPlusBlur);
|
renderContext->Rectangle(shadowGfxRectPlusBlur);
|
||||||
if (hasBorderRadius) {
|
if (hasBorderRadius) {
|
||||||
@@ -1314,36 +1139,6 @@ nsCSSRendering::PaintBoxShadowOuter(nsPresContext* aPresContext,
|
|||||||
renderContext->SetFillRule(gfxContext::FILL_RULE_EVEN_ODD);
|
renderContext->SetFillRule(gfxContext::FILL_RULE_EVEN_ODD);
|
||||||
renderContext->Clip();
|
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;
|
gfxCornerSizes clipRectRadii;
|
||||||
if (hasBorderRadius) {
|
if (hasBorderRadius) {
|
||||||
gfxFloat spreadDistance = shadowItem->mSpread / twipsPerPixel;
|
gfxFloat spreadDistance = shadowItem->mSpread / twipsPerPixel;
|
||||||
@@ -1393,20 +1188,18 @@ nsCSSRendering::PaintBoxShadowInner(nsPresContext* aPresContext,
|
|||||||
return;
|
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
|
// Get any border radius, since box-shadow must also have rounded corners
|
||||||
// if the frame does.
|
// if the frame does.
|
||||||
nscoord twipsRadii[8];
|
nscoord twipsRadii[8];
|
||||||
nsSize sz = frameRect.Size();
|
NS_ASSERTION(aForFrame->GetType() == nsGkAtoms::fieldSetFrame ||
|
||||||
bool hasBorderRadius = aForFrame->GetBorderRadii(sz, sz, 0, twipsRadii);
|
aFrameArea.Size() == aForFrame->GetSize(), "unexpected size");
|
||||||
const nscoord twipsPerPixel = aPresContext->DevPixelsToAppUnits(1);
|
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;
|
gfxCornerSizes innerRadii;
|
||||||
if (hasBorderRadius) {
|
if (hasBorderRadius) {
|
||||||
@@ -1428,9 +1221,13 @@ nsCSSRendering::PaintBoxShadowInner(nsPresContext* aPresContext,
|
|||||||
if (!shadowItem->mInset)
|
if (!shadowItem->mInset)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
// shadowPaintRect: the area to paint on the temp surface
|
/*
|
||||||
// shadowClipRect: the area on the temporary surface within shadowPaintRect
|
* shadowRect: the frame's padding rect
|
||||||
// that we will NOT paint in
|
* 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;
|
nscoord blurRadius = shadowItem->mRadius;
|
||||||
nsMargin blurMargin =
|
nsMargin blurMargin =
|
||||||
nsContextBoxBlur::GetBlurRadiusMargin(blurRadius, twipsPerPixel);
|
nsContextBoxBlur::GetBlurRadiusMargin(blurRadius, twipsPerPixel);
|
||||||
@@ -1709,7 +1506,6 @@ GetBackgroundClip(gfxContext *aCtx, uint8_t aBackgroundClip,
|
|||||||
aClipState->mCustomClip = false;
|
aClipState->mCustomClip = false;
|
||||||
aClipState->mRadiiAreOuter = true;
|
aClipState->mRadiiAreOuter = true;
|
||||||
aClipState->mClippedRadii = aBGRadii;
|
aClipState->mClippedRadii = aBGRadii;
|
||||||
|
|
||||||
if (aForFrame->GetType() == nsGkAtoms::scrollFrame &&
|
if (aForFrame->GetType() == nsGkAtoms::scrollFrame &&
|
||||||
NS_STYLE_BG_ATTACHMENT_LOCAL == aBackgroundAttachment) {
|
NS_STYLE_BG_ATTACHMENT_LOCAL == aBackgroundAttachment) {
|
||||||
// As of this writing, this is still in discussion in the CSS Working Group
|
// 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
|
// as above with bgArea, arguably a bug, but table painting seems
|
||||||
// to depend on it.
|
// to depend on it.
|
||||||
|
|
||||||
|
if (aHaveRoundedCorners || aClipState.mHasAdditionalBGClipArea) {
|
||||||
|
aAutoSR->Reset(aCtx);
|
||||||
|
}
|
||||||
|
|
||||||
if (aClipState.mHasAdditionalBGClipArea) {
|
if (aClipState.mHasAdditionalBGClipArea) {
|
||||||
gfxRect bgAreaGfx = nsLayoutUtils::RectToGfxRect(
|
gfxRect bgAreaGfx = nsLayoutUtils::RectToGfxRect(
|
||||||
aClipState.mAdditionalBGClipArea, aAppUnitsPerPixel);
|
aClipState.mAdditionalBGClipArea, aAppUnitsPerPixel);
|
||||||
bgAreaGfx.Round();
|
bgAreaGfx.Round();
|
||||||
bgAreaGfx.Condition();
|
bgAreaGfx.Condition();
|
||||||
|
|
||||||
aAutoSR->EnsureSaved(aCtx);
|
|
||||||
aCtx->NewPath();
|
aCtx->NewPath();
|
||||||
aCtx->Rectangle(bgAreaGfx, true);
|
aCtx->Rectangle(bgAreaGfx, true);
|
||||||
aCtx->Clip();
|
aCtx->Clip();
|
||||||
@@ -1835,7 +1633,6 @@ SetupBackgroundClip(BackgroundClipState& aClipState, gfxContext *aCtx,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
aAutoSR->EnsureSaved(aCtx);
|
|
||||||
aCtx->NewPath();
|
aCtx->NewPath();
|
||||||
aCtx->RoundedRectangle(bgAreaGfx, aClipState.mClippedRadii, aClipState.mRadiiAreOuter);
|
aCtx->RoundedRectangle(bgAreaGfx, aClipState.mClippedRadii, aClipState.mRadiiAreOuter);
|
||||||
aCtx->Clip();
|
aCtx->Clip();
|
||||||
@@ -2610,14 +2407,26 @@ nsCSSRendering::PaintBackgroundWithSC(nsPresContext* aPresContext,
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
// Compute the outermost boundary of the area that might be painted.
|
// Compute the outermost boundary of the area that might be painted.
|
||||||
// Same coordinate space as aBorderArea & aBGClipRect.
|
gfxContext *ctx = aRenderingContext.ThebesContext();
|
||||||
nsRect paintBorderArea =
|
nscoord appUnitsPerPixel = aPresContext->AppUnitsPerDevPixel();
|
||||||
::BoxDecorationRectForBackground(aForFrame, aBorderArea, &aBorder);
|
|
||||||
nsRect clipBorderArea =
|
// Same coordinate space as aBorderArea & aBGClipRect
|
||||||
::BoxDecorationRectForBorder(aForFrame, aBorderArea, &aBorder);
|
|
||||||
gfxCornerSizes bgRadii;
|
gfxCornerSizes bgRadii;
|
||||||
bool haveRoundedCorners =
|
bool haveRoundedCorners;
|
||||||
::GetRadii(aForFrame, aBorder, aBorderArea, clipBorderArea, &bgRadii);
|
{
|
||||||
|
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)
|
// The 'bgClipArea' (used only by the image tiling logic, far below)
|
||||||
// is the caller-provided aBGClipRect if any, or else the area
|
// 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
|
// SetupCurrentBackgroundClip. (Arguably it should be the
|
||||||
// intersection, but that breaks the table painter -- in particular,
|
// intersection, but that breaks the table painter -- in particular,
|
||||||
// taking the intersection breaks reftests/bugs/403249-1[ab].)
|
// taking the intersection breaks reftests/bugs/403249-1[ab].)
|
||||||
gfxContext* ctx = aRenderingContext.ThebesContext();
|
|
||||||
nscoord appUnitsPerPixel = aPresContext->AppUnitsPerDevPixel();
|
|
||||||
BackgroundClipState clipState;
|
BackgroundClipState clipState;
|
||||||
uint8_t currentBackgroundClip;
|
uint8_t currentBackgroundClip;
|
||||||
bool isSolidBorder;
|
bool isSolidBorder;
|
||||||
@@ -2656,7 +2463,7 @@ nsCSSRendering::PaintBackgroundWithSC(nsPresContext* aPresContext,
|
|||||||
}
|
}
|
||||||
|
|
||||||
GetBackgroundClip(ctx, currentBackgroundClip, bg->BottomLayer().mAttachment,
|
GetBackgroundClip(ctx, currentBackgroundClip, bg->BottomLayer().mAttachment,
|
||||||
aForFrame, clipBorderArea,
|
aForFrame, aBorderArea,
|
||||||
aDirtyRect, haveRoundedCorners, bgRadii, appUnitsPerPixel,
|
aDirtyRect, haveRoundedCorners, bgRadii, appUnitsPerPixel,
|
||||||
&clipState);
|
&clipState);
|
||||||
}
|
}
|
||||||
@@ -2665,8 +2472,6 @@ nsCSSRendering::PaintBackgroundWithSC(nsPresContext* aPresContext,
|
|||||||
if (drawBackgroundColor && !isCanvasFrame)
|
if (drawBackgroundColor && !isCanvasFrame)
|
||||||
ctx->SetColor(gfxRGBA(bgColor));
|
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;
|
gfxContextAutoSaveRestore autoSR;
|
||||||
|
|
||||||
// If there is no background image, draw a color. (If there is
|
// 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
|
// already called GetBackgroundClip above and it stored its results
|
||||||
// in clipState.
|
// in clipState.
|
||||||
if (clipSet) {
|
if (clipSet) {
|
||||||
autoSR = gfxContextAutoSaveRestore(); // reset the previous one
|
|
||||||
GetBackgroundClip(ctx, currentBackgroundClip, layer.mAttachment, aForFrame,
|
GetBackgroundClip(ctx, currentBackgroundClip, layer.mAttachment, aForFrame,
|
||||||
clipBorderArea, aDirtyRect, haveRoundedCorners,
|
aBorderArea, aDirtyRect, haveRoundedCorners,
|
||||||
bgRadii, appUnitsPerPixel, &clipState);
|
bgRadii, appUnitsPerPixel, &clipState);
|
||||||
}
|
}
|
||||||
SetupBackgroundClip(clipState, ctx, haveRoundedCorners,
|
SetupBackgroundClip(clipState, ctx, haveRoundedCorners,
|
||||||
appUnitsPerPixel, &autoSR);
|
appUnitsPerPixel, &autoSR);
|
||||||
clipSet = true;
|
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) &&
|
if ((aLayer < 0 || i == (uint32_t)startLayer) &&
|
||||||
!clipState.mDirtyRectGfx.IsEmpty()) {
|
!clipState.mDirtyRectGfx.IsEmpty()) {
|
||||||
nsBackgroundLayerState state = PrepareBackgroundLayer(aPresContext, aForFrame,
|
nsBackgroundLayerState state = PrepareBackgroundLayer(aPresContext, aForFrame,
|
||||||
aFlags, paintBorderArea, clipState.mBGClipArea, layer);
|
aFlags, aBorderArea, clipState.mBGClipArea, *bg, layer);
|
||||||
if (!state.mFillArea.IsEmpty()) {
|
if (!state.mFillArea.IsEmpty()) {
|
||||||
if (state.mCompositingOp != gfxContext::OPERATOR_OVER) {
|
if (state.mCompositingOp != gfxContext::OPERATOR_OVER) {
|
||||||
NS_ASSERTION(ctx->CurrentOperator() == gfxContext::OPERATOR_OVER,
|
NS_ASSERTION(ctx->CurrentOperator() == gfxContext::OPERATOR_OVER,
|
||||||
@@ -2758,7 +2552,7 @@ nsCSSRendering::PaintBackgroundWithSC(nsPresContext* aPresContext,
|
|||||||
}
|
}
|
||||||
state.mImageRenderer.DrawBackground(aPresContext, aRenderingContext,
|
state.mImageRenderer.DrawBackground(aPresContext, aRenderingContext,
|
||||||
state.mDestArea, state.mFillArea,
|
state.mDestArea, state.mFillArea,
|
||||||
state.mAnchor + paintBorderArea.TopLeft(),
|
state.mAnchor + aBorderArea.TopLeft(),
|
||||||
clipState.mDirtyRect);
|
clipState.mDirtyRect);
|
||||||
if (state.mCompositingOp != gfxContext::OPERATOR_OVER) {
|
if (state.mCompositingOp != gfxContext::OPERATOR_OVER) {
|
||||||
ctx->SetOperator(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.
|
// Compute the outermost boundary of the area that might be painted.
|
||||||
// Same coordinate space as aBorderArea.
|
gfxContext *ctx = aRenderingContext.ThebesContext();
|
||||||
nsRect clipBorderArea =
|
nscoord appUnitsPerPixel = aPresContext->AppUnitsPerDevPixel();
|
||||||
::BoxDecorationRectForBorder(aForFrame, aBorderArea, &aBorder);
|
|
||||||
|
// Same coordinate space as aBorderArea
|
||||||
gfxCornerSizes bgRadii;
|
gfxCornerSizes bgRadii;
|
||||||
bool haveRoundedCorners =
|
bool haveRoundedCorners;
|
||||||
::GetRadii(aForFrame, aBorder, aBorderArea, clipBorderArea, &bgRadii);
|
{
|
||||||
|
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,
|
// The background is rendered over the 'background-clip' area,
|
||||||
// which is normally equal to the border area but may be reduced
|
// 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.
|
// radii as the border code will.
|
||||||
// The background-color is drawn based on the bottom
|
// The background-color is drawn based on the bottom
|
||||||
// background-clip.
|
// background-clip.
|
||||||
gfxContext* ctx = aRenderingContext.ThebesContext();
|
|
||||||
nscoord appUnitsPerPixel = aPresContext->AppUnitsPerDevPixel();
|
|
||||||
const nsStyleBackground *bg = aBackgroundSC->StyleBackground();
|
const nsStyleBackground *bg = aBackgroundSC->StyleBackground();
|
||||||
uint8_t currentBackgroundClip = bg->BottomLayer().mClip;
|
uint8_t currentBackgroundClip = bg->BottomLayer().mClip;
|
||||||
bool isSolidBorder =
|
bool isSolidBorder =
|
||||||
@@ -2844,7 +2650,7 @@ nsCSSRendering::PaintBackgroundColorWithSC(nsPresContext* aPresContext,
|
|||||||
|
|
||||||
BackgroundClipState clipState;
|
BackgroundClipState clipState;
|
||||||
GetBackgroundClip(ctx, currentBackgroundClip, bg->BottomLayer().mAttachment,
|
GetBackgroundClip(ctx, currentBackgroundClip, bg->BottomLayer().mAttachment,
|
||||||
aForFrame, clipBorderArea,
|
aForFrame, aBorderArea,
|
||||||
aDirtyRect, haveRoundedCorners, bgRadii, appUnitsPerPixel,
|
aDirtyRect, haveRoundedCorners, bgRadii, appUnitsPerPixel,
|
||||||
&clipState);
|
&clipState);
|
||||||
|
|
||||||
@@ -2869,17 +2675,47 @@ nsRect
|
|||||||
nsCSSRendering::ComputeBackgroundPositioningArea(nsPresContext* aPresContext,
|
nsCSSRendering::ComputeBackgroundPositioningArea(nsPresContext* aPresContext,
|
||||||
nsIFrame* aForFrame,
|
nsIFrame* aForFrame,
|
||||||
const nsRect& aBorderArea,
|
const nsRect& aBorderArea,
|
||||||
|
const nsStyleBackground& aBackground,
|
||||||
const nsStyleBackground::Layer& aLayer,
|
const nsStyleBackground::Layer& aLayer,
|
||||||
nsIFrame** aAttachedToFrame)
|
nsIFrame** aAttachedToFrame)
|
||||||
{
|
{
|
||||||
// Compute background origin area relative to aBorderArea now as we may need
|
// Compute background origin area relative to aBorderArea now as we may need
|
||||||
// it to compute the effective image size for a CSS gradient.
|
// it to compute the effective image size for a CSS gradient.
|
||||||
nsRect bgPositioningArea;
|
nsRect bgPositioningArea(0, 0, 0, 0);
|
||||||
|
|
||||||
nsIAtom* frameType = aForFrame->GetType();
|
nsIAtom* frameType = aForFrame->GetType();
|
||||||
nsIFrame* geometryFrame = aForFrame;
|
nsIFrame* geometryFrame = aForFrame;
|
||||||
if (MOZ_UNLIKELY(frameType == nsGkAtoms::scrollFrame &&
|
if (frameType == nsGkAtoms::inlineFrame) {
|
||||||
NS_STYLE_BG_ATTACHMENT_LOCAL == aLayer.mAttachment)) {
|
// 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);
|
nsIScrollableFrame* scrollableFrame = do_QueryFrame(aForFrame);
|
||||||
bgPositioningArea = nsRect(
|
bgPositioningArea = nsRect(
|
||||||
scrollableFrame->GetScrolledFrame()->GetPosition()
|
scrollableFrame->GetScrolledFrame()->GetPosition()
|
||||||
@@ -2903,17 +2739,6 @@ nsCSSRendering::ComputeBackgroundPositioningArea(nsPresContext* aPresContext,
|
|||||||
}
|
}
|
||||||
*aAttachedToFrame = aForFrame;
|
*aAttachedToFrame = aForFrame;
|
||||||
return bgPositioningArea;
|
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 {
|
} else {
|
||||||
bgPositioningArea = nsRect(nsPoint(0,0), aBorderArea.Size());
|
bgPositioningArea = nsRect(nsPoint(0,0), aBorderArea.Size());
|
||||||
}
|
}
|
||||||
@@ -2927,6 +2752,7 @@ nsCSSRendering::ComputeBackgroundPositioningArea(nsPresContext* aPresContext,
|
|||||||
NS_ASSERTION(aLayer.mOrigin == NS_STYLE_BG_ORIGIN_CONTENT,
|
NS_ASSERTION(aLayer.mOrigin == NS_STYLE_BG_ORIGIN_CONTENT,
|
||||||
"unknown background-origin value");
|
"unknown background-origin value");
|
||||||
}
|
}
|
||||||
|
geometryFrame->ApplySkipSides(border);
|
||||||
bgPositioningArea.Deflate(border);
|
bgPositioningArea.Deflate(border);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3010,10 +2836,11 @@ nsCSSRendering::PrepareBackgroundLayer(nsPresContext* aPresContext,
|
|||||||
uint32_t aFlags,
|
uint32_t aFlags,
|
||||||
const nsRect& aBorderArea,
|
const nsRect& aBorderArea,
|
||||||
const nsRect& aBGClipRect,
|
const nsRect& aBGClipRect,
|
||||||
|
const nsStyleBackground& aBackground,
|
||||||
const nsStyleBackground::Layer& aLayer)
|
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:
|
* layers are:
|
||||||
*
|
*
|
||||||
* background-image
|
* background-image
|
||||||
@@ -3023,8 +2850,8 @@ nsCSSRendering::PrepareBackgroundLayer(nsPresContext* aPresContext,
|
|||||||
* background-clip
|
* background-clip
|
||||||
* background-origin
|
* background-origin
|
||||||
* background-size
|
* background-size
|
||||||
|
* background-break (-moz-background-inline-policy)
|
||||||
* background-blend-mode
|
* background-blend-mode
|
||||||
* box-decoration-break
|
|
||||||
*
|
*
|
||||||
* (background-color applies to the entire element and not to individual
|
* (background-color applies to the entire element and not to individual
|
||||||
* layers, so it is irrelevant to this method.)
|
* 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
|
* depends upon background-attachment (only in the case where that value
|
||||||
* is 'fixed')
|
* is 'fixed')
|
||||||
* background-size
|
* background-size
|
||||||
* depends upon box-decoration-break (for the background positioning area
|
* depends upon background-break (for the background positioning area for
|
||||||
* for resolving percentages), background-image (for the image's intrinsic
|
* resolving percentages), background-image (for the image's intrinsic
|
||||||
* size), background-repeat (if that value is 'round'), and
|
* size), background-repeat (if that value is 'round'), and
|
||||||
* background-origin (for the background painting area, when
|
* background-origin (for the background painting area, when
|
||||||
* background-repeat is 'round')
|
* background-repeat is 'round')
|
||||||
* box-decoration-break
|
* background-break
|
||||||
* no dependencies
|
* 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
|
* 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:
|
* sort of the above properties when processing, but it's pretty close to one:
|
||||||
*
|
*
|
||||||
* background-clip (by caller)
|
* background-clip (by caller)
|
||||||
* background-image
|
* background-image
|
||||||
* box-decoration-break, background-origin
|
* background-break, background-origin
|
||||||
* background-attachment (postfix for background-origin if 'fixed')
|
* background-attachment (postfix for background-{origin,break} if 'fixed')
|
||||||
* background-size
|
* background-size
|
||||||
* background-position
|
* background-position
|
||||||
* background-repeat
|
* background-repeat
|
||||||
@@ -3087,7 +2915,7 @@ nsCSSRendering::PrepareBackgroundLayer(nsPresContext* aPresContext,
|
|||||||
// it to compute the effective image size for a CSS gradient.
|
// it to compute the effective image size for a CSS gradient.
|
||||||
nsRect bgPositioningArea =
|
nsRect bgPositioningArea =
|
||||||
ComputeBackgroundPositioningArea(aPresContext, aForFrame, aBorderArea,
|
ComputeBackgroundPositioningArea(aPresContext, aForFrame, aBorderArea,
|
||||||
aLayer, &attachedToFrame);
|
aBackground, aLayer, &attachedToFrame);
|
||||||
|
|
||||||
// For background-attachment:fixed backgrounds, we'll limit the area
|
// For background-attachment:fixed backgrounds, we'll limit the area
|
||||||
// where the background can be drawn to the viewport.
|
// where the background can be drawn to the viewport.
|
||||||
@@ -3157,13 +2985,13 @@ nsCSSRendering::GetBackgroundLayerRect(nsPresContext* aPresContext,
|
|||||||
nsIFrame* aForFrame,
|
nsIFrame* aForFrame,
|
||||||
const nsRect& aBorderArea,
|
const nsRect& aBorderArea,
|
||||||
const nsRect& aClipRect,
|
const nsRect& aClipRect,
|
||||||
|
const nsStyleBackground& aBackground,
|
||||||
const nsStyleBackground::Layer& aLayer,
|
const nsStyleBackground::Layer& aLayer,
|
||||||
uint32_t aFlags)
|
uint32_t aFlags)
|
||||||
{
|
{
|
||||||
nsRect borderArea = ::BoxDecorationRectForBackground(aForFrame, aBorderArea);
|
|
||||||
nsBackgroundLayerState state =
|
nsBackgroundLayerState state =
|
||||||
PrepareBackgroundLayer(aPresContext, aForFrame, aFlags, borderArea,
|
PrepareBackgroundLayer(aPresContext, aForFrame, aFlags, aBorderArea,
|
||||||
aClipRect, aLayer);
|
aClipRect, aBackground, aLayer);
|
||||||
return state.mFillArea;
|
return state.mFillArea;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -5107,8 +4935,10 @@ nsContextBoxBlur::GetBlurRadiusMargin(nscoord aBlurRadius,
|
|||||||
gfxIntSize blurRadius = ComputeBlurRadius(aBlurRadius, aAppUnitsPerDevPixel);
|
gfxIntSize blurRadius = ComputeBlurRadius(aBlurRadius, aAppUnitsPerDevPixel);
|
||||||
|
|
||||||
nsMargin result;
|
nsMargin result;
|
||||||
result.top = result.bottom = blurRadius.height * aAppUnitsPerDevPixel;
|
result.top = blurRadius.height * aAppUnitsPerDevPixel;
|
||||||
result.left = result.right = blurRadius.width * aAppUnitsPerDevPixel;
|
result.right = blurRadius.width * aAppUnitsPerDevPixel;
|
||||||
|
result.bottom = blurRadius.height * aAppUnitsPerDevPixel;
|
||||||
|
result.left = blurRadius.width * aAppUnitsPerDevPixel;
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -456,6 +456,7 @@ struct nsCSSRendering {
|
|||||||
ComputeBackgroundPositioningArea(nsPresContext* aPresContext,
|
ComputeBackgroundPositioningArea(nsPresContext* aPresContext,
|
||||||
nsIFrame* aForFrame,
|
nsIFrame* aForFrame,
|
||||||
const nsRect& aBorderArea,
|
const nsRect& aBorderArea,
|
||||||
|
const nsStyleBackground& aBackground,
|
||||||
const nsStyleBackground::Layer& aLayer,
|
const nsStyleBackground::Layer& aLayer,
|
||||||
nsIFrame** aAttachedToFrame);
|
nsIFrame** aAttachedToFrame);
|
||||||
|
|
||||||
@@ -465,6 +466,7 @@ struct nsCSSRendering {
|
|||||||
uint32_t aFlags,
|
uint32_t aFlags,
|
||||||
const nsRect& aBorderArea,
|
const nsRect& aBorderArea,
|
||||||
const nsRect& aBGClipRect,
|
const nsRect& aBGClipRect,
|
||||||
|
const nsStyleBackground& aBackground,
|
||||||
const nsStyleBackground::Layer& aLayer);
|
const nsStyleBackground::Layer& aLayer);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -540,6 +542,7 @@ struct nsCSSRendering {
|
|||||||
nsIFrame* aForFrame,
|
nsIFrame* aForFrame,
|
||||||
const nsRect& aBorderArea,
|
const nsRect& aBorderArea,
|
||||||
const nsRect& aClipRect,
|
const nsRect& aClipRect,
|
||||||
|
const nsStyleBackground& aBackground,
|
||||||
const nsStyleBackground::Layer& aLayer,
|
const nsStyleBackground::Layer& aLayer,
|
||||||
uint32_t aFlags);
|
uint32_t aFlags);
|
||||||
|
|
||||||
|
|||||||
@@ -120,6 +120,7 @@ nsCSSBorderRenderer::nsCSSBorderRenderer(int32_t aAppUnitsPerPixel,
|
|||||||
gfxCornerSizes& aBorderRadii,
|
gfxCornerSizes& aBorderRadii,
|
||||||
const nscolor* aBorderColors,
|
const nscolor* aBorderColors,
|
||||||
nsBorderColors* const* aCompositeColors,
|
nsBorderColors* const* aCompositeColors,
|
||||||
|
int aSkipSides,
|
||||||
nscolor aBackgroundColor)
|
nscolor aBackgroundColor)
|
||||||
: mContext(aDestContext),
|
: mContext(aDestContext),
|
||||||
mOuterRect(aOuterRect),
|
mOuterRect(aOuterRect),
|
||||||
@@ -129,6 +130,7 @@ nsCSSBorderRenderer::nsCSSBorderRenderer(int32_t aAppUnitsPerPixel,
|
|||||||
mBorderColors(aBorderColors),
|
mBorderColors(aBorderColors),
|
||||||
mCompositeColors(aCompositeColors),
|
mCompositeColors(aCompositeColors),
|
||||||
mAUPP(aAppUnitsPerPixel),
|
mAUPP(aAppUnitsPerPixel),
|
||||||
|
mSkipSides(aSkipSides),
|
||||||
mBackgroundColor(aBackgroundColor)
|
mBackgroundColor(aBackgroundColor)
|
||||||
{
|
{
|
||||||
if (!mCompositeColors) {
|
if (!mCompositeColors) {
|
||||||
|
|||||||
@@ -79,6 +79,7 @@ struct nsCSSBorderRenderer {
|
|||||||
gfxCornerSizes& aBorderRadii,
|
gfxCornerSizes& aBorderRadii,
|
||||||
const nscolor* aBorderColors,
|
const nscolor* aBorderColors,
|
||||||
nsBorderColors* const* aCompositeColors,
|
nsBorderColors* const* aCompositeColors,
|
||||||
|
int aSkipSides,
|
||||||
nscolor aBackgroundColor);
|
nscolor aBackgroundColor);
|
||||||
|
|
||||||
gfxCornerSizes mBorderCornerDimensions;
|
gfxCornerSizes mBorderCornerDimensions;
|
||||||
@@ -104,7 +105,8 @@ struct nsCSSBorderRenderer {
|
|||||||
// core app units per pixel
|
// core app units per pixel
|
||||||
int32_t mAUPP;
|
int32_t mAUPP;
|
||||||
|
|
||||||
// the background color
|
// misc -- which sides to skip, the background color
|
||||||
|
int mSkipSides;
|
||||||
nscolor mBackgroundColor;
|
nscolor mBackgroundColor;
|
||||||
|
|
||||||
// calculated values
|
// calculated values
|
||||||
|
|||||||
@@ -1934,8 +1934,14 @@ nsDisplayBackgroundImage::IsSingleFixedPositionImage(nsDisplayListBuilder* aBuil
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
nsBackgroundLayerState state =
|
nsBackgroundLayerState state =
|
||||||
nsCSSRendering::PrepareBackgroundLayer(presContext, mFrame, flags,
|
nsCSSRendering::PrepareBackgroundLayer(presContext,
|
||||||
borderArea, aClipRect, layer);
|
mFrame,
|
||||||
|
flags,
|
||||||
|
borderArea,
|
||||||
|
aClipRect,
|
||||||
|
*mBackgroundStyle,
|
||||||
|
layer);
|
||||||
|
|
||||||
nsImageRenderer* imageRenderer = &state.mImageRenderer;
|
nsImageRenderer* imageRenderer = &state.mImageRenderer;
|
||||||
// We only care about images here, not gradients.
|
// We only care about images here, not gradients.
|
||||||
if (!imageRenderer->IsRasterImage())
|
if (!imageRenderer->IsRasterImage())
|
||||||
@@ -1968,8 +1974,14 @@ nsDisplayBackgroundImage::TryOptimizeToImageLayer(LayerManager* aManager,
|
|||||||
}
|
}
|
||||||
|
|
||||||
nsBackgroundLayerState state =
|
nsBackgroundLayerState state =
|
||||||
nsCSSRendering::PrepareBackgroundLayer(presContext, mFrame, flags,
|
nsCSSRendering::PrepareBackgroundLayer(presContext,
|
||||||
borderArea, borderArea, layer);
|
mFrame,
|
||||||
|
flags,
|
||||||
|
borderArea,
|
||||||
|
borderArea,
|
||||||
|
*mBackgroundStyle,
|
||||||
|
layer);
|
||||||
|
|
||||||
nsImageRenderer* imageRenderer = &state.mImageRenderer;
|
nsImageRenderer* imageRenderer = &state.mImageRenderer;
|
||||||
// We only care about images here, not gradients.
|
// We only care about images here, not gradients.
|
||||||
if (!imageRenderer->IsRasterImage())
|
if (!imageRenderer->IsRasterImage())
|
||||||
@@ -2182,13 +2194,12 @@ nsDisplayBackgroundImage::GetOpaqueRegion(nsDisplayListBuilder* aBuilder,
|
|||||||
|
|
||||||
*aSnap = true;
|
*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,
|
// this could easily lead to O(N^2) behavior inside InlineBackgroundData,
|
||||||
// which expects frames to be sent to it in content order, not reverse
|
// which expects frames to be sent to it in content order, not reverse
|
||||||
// content order which we'll produce here.
|
// content order which we'll produce here.
|
||||||
// Of course, if there's only one frame in the flow, it doesn't matter.
|
// Of course, if there's only one frame in the flow, it doesn't matter.
|
||||||
if (mFrame->StyleBorder()->mBoxDecorationBreak ==
|
if (mBackgroundStyle->mBackgroundInlinePolicy == NS_STYLE_BG_INLINE_POLICY_EACH_BOX ||
|
||||||
NS_STYLE_BOX_DECORATION_BREAK_CLONE ||
|
|
||||||
(!mFrame->GetPrevContinuation() && !mFrame->GetNextContinuation())) {
|
(!mFrame->GetPrevContinuation() && !mFrame->GetNextContinuation())) {
|
||||||
const nsStyleBackground::Layer& layer = mBackgroundStyle->mLayers[mLayer];
|
const nsStyleBackground::Layer& layer = mBackgroundStyle->mLayers[mLayer];
|
||||||
if (layer.mImage.IsOpaque() && layer.mBlendMode == NS_STYLE_BLEND_NORMAL) {
|
if (layer.mImage.IsOpaque() && layer.mBlendMode == NS_STYLE_BLEND_NORMAL) {
|
||||||
@@ -2236,7 +2247,7 @@ nsDisplayBackgroundImage::GetPositioningArea()
|
|||||||
return nsCSSRendering::ComputeBackgroundPositioningArea(
|
return nsCSSRendering::ComputeBackgroundPositioningArea(
|
||||||
mFrame->PresContext(), mFrame,
|
mFrame->PresContext(), mFrame,
|
||||||
nsRect(ToReferenceFrame(), mFrame->GetSize()),
|
nsRect(ToReferenceFrame(), mFrame->GetSize()),
|
||||||
mBackgroundStyle->mLayers[mLayer],
|
*mBackgroundStyle, mBackgroundStyle->mLayers[mLayer],
|
||||||
&attachedToFrame) + ToReferenceFrame();
|
&attachedToFrame) + ToReferenceFrame();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2350,7 +2361,8 @@ nsDisplayBackgroundImage::GetBoundsInternal(nsDisplayListBuilder* aBuilder) {
|
|||||||
}
|
}
|
||||||
const nsStyleBackground::Layer& layer = mBackgroundStyle->mLayers[mLayer];
|
const nsStyleBackground::Layer& layer = mBackgroundStyle->mLayers[mLayer];
|
||||||
return nsCSSRendering::GetBackgroundLayerRect(presContext, mFrame,
|
return nsCSSRendering::GetBackgroundLayerRect(presContext, mFrame,
|
||||||
borderBox, clipRect, layer,
|
borderBox, clipRect,
|
||||||
|
*mBackgroundStyle, layer,
|
||||||
aBuilder->GetBackgroundPaintFlags());
|
aBuilder->GetBackgroundPaintFlags());
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2827,8 +2839,11 @@ nsDisplayBoxShadowOuter::Paint(nsDisplayListBuilder* aBuilder,
|
|||||||
|
|
||||||
PROFILER_LABEL("nsDisplayBoxShadowOuter", "Paint");
|
PROFILER_LABEL("nsDisplayBoxShadowOuter", "Paint");
|
||||||
for (uint32_t i = 0; i < rects.Length(); ++i) {
|
for (uint32_t i = 0; i < rects.Length(); ++i) {
|
||||||
|
aCtx->PushState();
|
||||||
|
aCtx->IntersectClip(rects[i]);
|
||||||
nsCSSRendering::PaintBoxShadowOuter(presContext, *aCtx, mFrame,
|
nsCSSRendering::PaintBoxShadowOuter(presContext, *aCtx, mFrame,
|
||||||
borderRect, rects[i], mOpacity);
|
borderRect, rects[i], mOpacity);
|
||||||
|
aCtx->PopState();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -78,7 +78,7 @@ function foo()
|
|||||||
<br style="clear: none;" id="br2">
|
<br style="clear: none;" id="br2">
|
||||||
<br style="height: auto; clear: both; width: auto;" id="br3">
|
<br style="height: auto; clear: both; width: auto;" id="br3">
|
||||||
<br style="position: static;" id="br4">
|
<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="width: 1px; visibility: visible;" id="br6">
|
||||||
<br style="color: black; width: 2px; display: table-cell;" id="br7">
|
<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>
|
<table border="1"><tbody><tr style="display: list-item;" id="tableRow"><td>x</td></tr></tbody></table>
|
||||||
|
|||||||
@@ -849,31 +849,12 @@ nsContainerFrame::DoInlineIntrinsicWidth(nsRenderingContext *aRenderingContext,
|
|||||||
// This frame is a first-in-flow, but it might have a previous bidi
|
// This frame is a first-in-flow, but it might have a previous bidi
|
||||||
// continuation, in which case that continuation should handle the startSide
|
// continuation, in which case that continuation should handle the startSide
|
||||||
// border.
|
// 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()) {
|
if (!GetPrevContinuation()) {
|
||||||
nscoord startPBM =
|
aData->currentLine +=
|
||||||
// clamp negative calc() to 0
|
// clamp negative calc() to 0
|
||||||
std::max(GetCoord(stylePadding->mPadding.Get(startSide), 0), 0) +
|
std::max(GetCoord(stylePadding->mPadding.Get(startSide), 0), 0) +
|
||||||
styleBorder->GetComputedBorderWidth(startSide) +
|
styleBorder->GetComputedBorderWidth(startSide) +
|
||||||
GetCoord(styleMargin->mMargin.Get(startSide), 0);
|
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;
|
const nsLineList_iterator* savedLine = aData->line;
|
||||||
@@ -882,9 +863,6 @@ nsContainerFrame::DoInlineIntrinsicWidth(nsRenderingContext *aRenderingContext,
|
|||||||
nsContainerFrame *lastInFlow;
|
nsContainerFrame *lastInFlow;
|
||||||
for (nsContainerFrame *nif = this; nif;
|
for (nsContainerFrame *nif = this; nif;
|
||||||
nif = static_cast<nsContainerFrame*>(nif->GetNextInFlow())) {
|
nif = static_cast<nsContainerFrame*>(nif->GetNextInFlow())) {
|
||||||
if (aData->currentLine == 0) {
|
|
||||||
aData->currentLine = clonePBM;
|
|
||||||
}
|
|
||||||
for (nsIFrame *kid = nif->mFrames.FirstChild(); kid;
|
for (nsIFrame *kid = nif->mFrames.FirstChild(); kid;
|
||||||
kid = kid->GetNextSibling()) {
|
kid = kid->GetNextSibling()) {
|
||||||
if (aType == nsLayoutUtils::MIN_WIDTH)
|
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
|
// We reached the last-in-flow, but it might have a next bidi
|
||||||
// continuation, in which case that continuation should handle
|
// continuation, in which case that continuation should handle
|
||||||
// the endSide border.
|
// the endSide border.
|
||||||
if (MOZ_LIKELY(!lastInFlow->GetNextContinuation() && sliceBreak)) {
|
if (!lastInFlow->GetNextContinuation()) {
|
||||||
aData->currentLine += endPBM;
|
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -953,11 +953,6 @@ nsIFrame::GetUsedPadding() const
|
|||||||
int
|
int
|
||||||
nsIFrame::GetSkipSides(const nsHTMLReflowState* aReflowState) const
|
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
|
// Convert the logical skip sides to physical sides using the frame's
|
||||||
// writing mode
|
// writing mode
|
||||||
WritingMode writingMode = GetWritingMode();
|
WritingMode writingMode = GetWritingMode();
|
||||||
@@ -1282,8 +1277,7 @@ nsIFrame::OutsetBorderRadii(nscoord aRadii[8], const nsMargin &aOffsets)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* virtual */ bool
|
/* virtual */ bool
|
||||||
nsIFrame::GetBorderRadii(const nsSize& aFrameSize, const nsSize& aBorderArea,
|
nsIFrame::GetBorderRadii(nscoord aRadii[8]) const
|
||||||
int aSkipSides, nscoord aRadii[8]) const
|
|
||||||
{
|
{
|
||||||
if (IsThemed()) {
|
if (IsThemed()) {
|
||||||
// When we're themed, the native theme code draws the border and
|
// When we're themed, the native theme code draws the border and
|
||||||
@@ -1298,9 +1292,9 @@ nsIFrame::GetBorderRadii(const nsSize& aFrameSize, const nsSize& aBorderArea,
|
|||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return ComputeBorderRadii(StyleBorder()->mBorderRadius,
|
nsSize size = GetSize();
|
||||||
aFrameSize, aBorderArea,
|
return ComputeBorderRadii(StyleBorder()->mBorderRadius, size, size,
|
||||||
aSkipSides, aRadii);
|
GetSkipSides(), aRadii);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
|
|||||||
@@ -4366,15 +4366,10 @@ ReduceRadii(nscoord aXBorder, nscoord aYBorder,
|
|||||||
* have scrollbars.
|
* have scrollbars.
|
||||||
*/
|
*/
|
||||||
bool
|
bool
|
||||||
ScrollFrameHelper::GetBorderRadii(const nsSize& aFrameSize,
|
ScrollFrameHelper::GetBorderRadii(nscoord aRadii[8]) const
|
||||||
const nsSize& aBorderArea,
|
|
||||||
int aSkipSides,
|
|
||||||
nscoord aRadii[8]) const
|
|
||||||
{
|
{
|
||||||
if (!mOuter->nsContainerFrame::GetBorderRadii(aFrameSize, aBorderArea,
|
if (!mOuter->nsContainerFrame::GetBorderRadii(aRadii))
|
||||||
aSkipSides, aRadii)) {
|
|
||||||
return false;
|
return false;
|
||||||
}
|
|
||||||
|
|
||||||
// Since we can use GetActualScrollbarSizes (rather than
|
// Since we can use GetActualScrollbarSizes (rather than
|
||||||
// GetDesiredScrollbarSizes) since this doesn't affect reflow, we
|
// GetDesiredScrollbarSizes) since this doesn't affect reflow, we
|
||||||
|
|||||||
@@ -71,8 +71,7 @@ public:
|
|||||||
bool& aCreateLayer,
|
bool& aCreateLayer,
|
||||||
bool aPositioned);
|
bool aPositioned);
|
||||||
|
|
||||||
bool GetBorderRadii(const nsSize& aFrameSize, const nsSize& aBorderArea,
|
bool GetBorderRadii(nscoord aRadii[8]) const;
|
||||||
int aSkipSides, nscoord aRadii[8]) const;
|
|
||||||
|
|
||||||
// nsIReflowCallback
|
// nsIReflowCallback
|
||||||
virtual bool ReflowFinished() MOZ_OVERRIDE;
|
virtual bool ReflowFinished() MOZ_OVERRIDE;
|
||||||
@@ -472,9 +471,8 @@ public:
|
|||||||
const nsPoint& aScrollPosition);
|
const nsPoint& aScrollPosition);
|
||||||
nscoord GetIntrinsicVScrollbarWidth(nsRenderingContext *aRenderingContext);
|
nscoord GetIntrinsicVScrollbarWidth(nsRenderingContext *aRenderingContext);
|
||||||
|
|
||||||
virtual bool GetBorderRadii(const nsSize& aFrameSize, const nsSize& aBorderArea,
|
virtual bool GetBorderRadii(nscoord aRadii[8]) const MOZ_OVERRIDE {
|
||||||
int aSkipSides, nscoord aRadii[8]) const MOZ_OVERRIDE {
|
return mHelper.GetBorderRadii(aRadii);
|
||||||
return mHelper.GetBorderRadii(aFrameSize, aBorderArea, aSkipSides, aRadii);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual nscoord GetMinWidth(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
|
virtual nscoord GetMinWidth(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
|
||||||
@@ -810,9 +808,8 @@ public:
|
|||||||
NS_IMETHOD DoLayout(nsBoxLayoutState& aBoxLayoutState) MOZ_OVERRIDE;
|
NS_IMETHOD DoLayout(nsBoxLayoutState& aBoxLayoutState) MOZ_OVERRIDE;
|
||||||
virtual nsresult GetPadding(nsMargin& aPadding) MOZ_OVERRIDE;
|
virtual nsresult GetPadding(nsMargin& aPadding) MOZ_OVERRIDE;
|
||||||
|
|
||||||
virtual bool GetBorderRadii(const nsSize& aFrameSize, const nsSize& aBorderArea,
|
virtual bool GetBorderRadii(nscoord aRadii[8]) const MOZ_OVERRIDE {
|
||||||
int aSkipSides, nscoord aRadii[8]) const MOZ_OVERRIDE {
|
return mHelper.GetBorderRadii(aRadii);
|
||||||
return mHelper.GetBorderRadii(aFrameSize, aBorderArea, aSkipSides, aRadii);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
nsresult Layout(nsBoxLayoutState& aState);
|
nsresult Layout(nsBoxLayoutState& aState);
|
||||||
|
|||||||
@@ -1042,19 +1042,12 @@ public:
|
|||||||
static void OutsetBorderRadii(nscoord aRadii[8], const nsMargin &aOffsets);
|
static void OutsetBorderRadii(nscoord aRadii[8], const nsMargin &aOffsets);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Fill in border radii for this frame. Return whether any are nonzero.
|
* Fill in border radii for this frame. Return whether any are
|
||||||
|
* nonzero.
|
||||||
|
*
|
||||||
* Indices into aRadii are the NS_CORNER_* constants in nsStyleConsts.h
|
* 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,
|
virtual bool GetBorderRadii(nscoord aRadii[8]) const;
|
||||||
const nsSize& aBorderArea,
|
|
||||||
int aSkipSides,
|
|
||||||
nscoord aRadii[8]) const;
|
|
||||||
bool GetBorderRadii(nscoord aRadii[8]) const {
|
|
||||||
nsSize sz = GetSize();
|
|
||||||
return GetBorderRadii(sz, sz, GetSkipSides(), aRadii);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool GetPaddingBoxBorderRadii(nscoord aRadii[8]) const;
|
bool GetPaddingBoxBorderRadii(nscoord aRadii[8]) const;
|
||||||
bool GetContentBoxBorderRadii(nscoord aRadii[8]) const;
|
bool GetContentBoxBorderRadii(nscoord aRadii[8]) const;
|
||||||
|
|||||||
@@ -1782,10 +1782,6 @@ nsImageFrame::List(FILE* out, const char* aPrefix, uint32_t aFlags) const
|
|||||||
int
|
int
|
||||||
nsImageFrame::GetLogicalSkipSides(const nsHTMLReflowState* aReflowState) const
|
nsImageFrame::GetLogicalSkipSides(const nsHTMLReflowState* aReflowState) const
|
||||||
{
|
{
|
||||||
if (MOZ_UNLIKELY(StyleBorder()->mBoxDecorationBreak ==
|
|
||||||
NS_STYLE_BOX_DECORATION_BREAK_CLONE)) {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
int skip = 0;
|
int skip = 0;
|
||||||
if (nullptr != GetPrevInFlow()) {
|
if (nullptr != GetPrevInFlow()) {
|
||||||
skip |= LOGICAL_SIDE_B_START;
|
skip |= LOGICAL_SIDE_B_START;
|
||||||
|
|||||||
@@ -115,11 +115,7 @@ nsInlineFrame::IsSelfEmpty()
|
|||||||
!nsLayoutUtils::IsPaddingZero(padding->mPadding.GetLeft()) ||
|
!nsLayoutUtils::IsPaddingZero(padding->mPadding.GetLeft()) ||
|
||||||
!IsMarginZero(margin->mMargin.GetLeft());
|
!IsMarginZero(margin->mMargin.GetLeft());
|
||||||
if (haveLeft || haveRight) {
|
if (haveLeft || haveRight) {
|
||||||
// We skip this block and return false for box-decoration-break:clone since
|
if (GetStateBits() & NS_FRAME_PART_OF_IBSPLIT) {
|
||||||
// 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) {
|
|
||||||
bool haveStart, haveEnd;
|
bool haveStart, haveEnd;
|
||||||
if (NS_STYLE_DIRECTION_LTR == StyleVisibility()->mDirection) {
|
if (NS_STYLE_DIRECTION_LTR == StyleVisibility()->mDirection) {
|
||||||
haveStart = haveLeft;
|
haveStart = haveLeft;
|
||||||
@@ -495,15 +491,9 @@ nsInlineFrame::ReflowFrames(nsPresContext* aPresContext,
|
|||||||
RestyleManager* restyleManager = aPresContext->RestyleManager();
|
RestyleManager* restyleManager = aPresContext->RestyleManager();
|
||||||
WritingMode wm = aReflowState.GetWritingMode();
|
WritingMode wm = aReflowState.GetWritingMode();
|
||||||
nscoord startEdge = 0;
|
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
|
// 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
|
// if we're in a part of an {ib} split other than the first one.
|
||||||
// box-decoration-break:clone we always offset our start since all
|
if (!GetPrevContinuation() && !FrameIsNonFirstInIBSplit()) {
|
||||||
// continuations have border/padding.
|
|
||||||
if ((!GetPrevContinuation() && !FrameIsNonFirstInIBSplit()) ||
|
|
||||||
boxDecorationBreakClone) {
|
|
||||||
startEdge = aReflowState.ComputedLogicalBorderPadding().IStart(wm);
|
startEdge = aReflowState.ComputedLogicalBorderPadding().IStart(wm);
|
||||||
}
|
}
|
||||||
nscoord availableISize = aReflowState.AvailableISize();
|
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
|
// 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
|
// 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
|
// one.
|
||||||
// and padding since all continuations have them.
|
if (!GetPrevContinuation() && !FrameIsNonFirstInIBSplit()) {
|
||||||
if ((!GetPrevContinuation() && !FrameIsNonFirstInIBSplit()) ||
|
|
||||||
boxDecorationBreakClone) {
|
|
||||||
aMetrics.ISize() += aReflowState.ComputedLogicalBorderPadding().IStart(wm);
|
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
|
* 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
|
* 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
|
* 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
|
* chain.
|
||||||
* padding since all continuations have them.
|
|
||||||
*/
|
*/
|
||||||
if ((NS_FRAME_IS_COMPLETE(aStatus) &&
|
if (NS_FRAME_IS_COMPLETE(aStatus) &&
|
||||||
!LastInFlow()->GetNextContinuation() &&
|
!LastInFlow()->GetNextContinuation() &&
|
||||||
!FrameIsNonLastInIBSplit()) ||
|
!FrameIsNonLastInIBSplit()) {
|
||||||
boxDecorationBreakClone) {
|
|
||||||
aMetrics.Width() += aReflowState.ComputedLogicalBorderPadding().IEnd(wm);
|
aMetrics.Width() += aReflowState.ComputedLogicalBorderPadding().IEnd(wm);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -886,11 +872,6 @@ nsInlineFrame::PushFrames(nsPresContext* aPresContext,
|
|||||||
int
|
int
|
||||||
nsInlineFrame::GetLogicalSkipSides(const nsHTMLReflowState* aReflowState) const
|
nsInlineFrame::GetLogicalSkipSides(const nsHTMLReflowState* aReflowState) const
|
||||||
{
|
{
|
||||||
if (MOZ_UNLIKELY(StyleBorder()->mBoxDecorationBreak ==
|
|
||||||
NS_STYLE_BOX_DECORATION_BREAK_CLONE)) {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
int skip = 0;
|
int skip = 0;
|
||||||
if (!IsFirst()) {
|
if (!IsFirst()) {
|
||||||
nsInlineFrame* prev = (nsInlineFrame*) GetPrevContinuation();
|
nsInlineFrame* prev = (nsInlineFrame*) GetPrevContinuation();
|
||||||
|
|||||||
@@ -1076,12 +1076,9 @@ nsLineLayout::ApplyStartMargin(PerFrameData* pfd,
|
|||||||
// in an ib split. Note that the ib sibling (block-in-inline
|
// in an ib split. Note that the ib sibling (block-in-inline
|
||||||
// sibling) annotations only live on the first continuation, but we
|
// sibling) annotations only live on the first continuation, but we
|
||||||
// don't want to apply the start margin for later continuations
|
// don't want to apply the start margin for later continuations
|
||||||
// anyway. For box-decoration-break:clone we apply the start-margin
|
// anyway.
|
||||||
// on all continuations.
|
if (pfd->mFrame->GetPrevContinuation() ||
|
||||||
if ((pfd->mFrame->GetPrevContinuation() ||
|
pfd->mFrame->FrameIsNonFirstInIBSplit()) {
|
||||||
pfd->mFrame->FrameIsNonFirstInIBSplit()) &&
|
|
||||||
aReflowState.mStyleBorder->mBoxDecorationBreak ==
|
|
||||||
NS_STYLE_BOX_DECORATION_BREAK_SLICE) {
|
|
||||||
// Zero this out so that when we compute the max-element-width of
|
// Zero this out so that when we compute the max-element-width of
|
||||||
// the frame we will properly avoid adding in the starting margin.
|
// the frame we will properly avoid adding in the starting margin.
|
||||||
pfd->mMargin.IStart(frameWM) = 0;
|
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.
|
* 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?)
|
* 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() ||
|
if (pfd->mFrame->GetPrevContinuation() ||
|
||||||
pfd->mFrame->FrameIsNonFirstInIBSplit()) {
|
pfd->mFrame->FrameIsNonFirstInIBSplit()) {
|
||||||
@@ -1173,10 +1167,8 @@ nsLineLayout::CanPlaceFrame(PerFrameData* pfd,
|
|||||||
}
|
}
|
||||||
if ((NS_FRAME_IS_NOT_COMPLETE(aStatus) ||
|
if ((NS_FRAME_IS_NOT_COMPLETE(aStatus) ||
|
||||||
pfd->mFrame->LastInFlow()->GetNextContinuation() ||
|
pfd->mFrame->LastInFlow()->GetNextContinuation() ||
|
||||||
pfd->mFrame->FrameIsNonLastInIBSplit()) &&
|
pfd->mFrame->FrameIsNonLastInIBSplit())
|
||||||
!pfd->GetFlag(PFD_ISLETTERFRAME) &&
|
&& !pfd->GetFlag(PFD_ISLETTERFRAME)) {
|
||||||
pfd->mFrame->StyleBorder()->mBoxDecorationBreak ==
|
|
||||||
NS_STYLE_BOX_DECORATION_BREAK_SLICE) {
|
|
||||||
pfd->mMargin.IEnd(frameWM) = 0;
|
pfd->mMargin.IEnd(frameWM) = 0;
|
||||||
}
|
}
|
||||||
LogicalMargin usedMargins = pfd->mMargin.ConvertTo(lineWM, frameWM);
|
LogicalMargin usedMargins = pfd->mMargin.ConvertTo(lineWM, frameWM);
|
||||||
|
|||||||
@@ -253,12 +253,8 @@ nsSplittableFrame::GetLogicalSkipSides(const nsHTMLReflowState* aReflowState) co
|
|||||||
return LOGICAL_SIDES_B_BOTH;
|
return LOGICAL_SIDES_B_BOTH;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (MOZ_UNLIKELY(StyleBorder()->mBoxDecorationBreak ==
|
|
||||||
NS_STYLE_BOX_DECORATION_BREAK_CLONE)) {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
int skip = 0;
|
int skip = 0;
|
||||||
|
|
||||||
if (GetPrevInFlow()) {
|
if (GetPrevInFlow()) {
|
||||||
skip |= LOGICAL_SIDE_B_START;
|
skip |= LOGICAL_SIDE_B_START;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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>
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>box-decoration-break: slice</title>
|
<title>background-break: continuous</title>
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
@font-face
|
@font-face
|
||||||
{
|
{
|
||||||
@@ -21,14 +21,14 @@
|
|||||||
white-space: pre;
|
white-space: pre;
|
||||||
background-image: url(blue-8x20-green-8x20.png);
|
background-image: url(blue-8x20-green-8x20.png);
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
box-decoration-break: slice;
|
-moz-background-inline-policy: continuous;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="outer">
|
<div id="outer">
|
||||||
<span id="ahem-lines"> <!-- EOL -->
|
<span id="ahem-lines"> <!-- EOL -->
|
||||||
<!-- mix it up for slice --><!-- EOL -->
|
<!-- mix it up for each-box and bounding-box --><!-- EOL -->
|
||||||
<!-- EOL -->
|
<!-- EOL -->
|
||||||
<!-- EOL -->
|
<!-- EOL -->
|
||||||
</span></div>
|
</span></div>
|
||||||
@@ -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>
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>background-size: cover; box-decoration-break: slice</title>
|
<title>background-size: cover; background-break: continuous</title>
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
@font-face
|
@font-face
|
||||||
{
|
{
|
||||||
@@ -22,14 +22,14 @@
|
|||||||
background-image: url(blue-8x20-green-8x20.png);
|
background-image: url(blue-8x20-green-8x20.png);
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
background-size: cover;
|
background-size: cover;
|
||||||
box-decoration-break: slice;
|
-moz-background-inline-policy: continuous;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="outer">
|
<div id="outer">
|
||||||
<span id="ahem-lines"> <!-- EOL -->
|
<span id="ahem-lines"> <!-- EOL -->
|
||||||
<!-- mix it up for slice --><!-- EOL -->
|
<!-- mix it up for each-box and bounding-box --><!-- EOL -->
|
||||||
<!-- EOL -->
|
<!-- EOL -->
|
||||||
<!-- EOL -->
|
<!-- EOL -->
|
||||||
</span></div>
|
</span></div>
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>background-size: cover; box-decoration-break: clone</title>
|
<title>background-size: cover; background-break: each-box</title>
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
@font-face
|
@font-face
|
||||||
{
|
{
|
||||||
@@ -22,14 +22,14 @@
|
|||||||
background-image: url(blue-8x20-green-8x20.png);
|
background-image: url(blue-8x20-green-8x20.png);
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
background-size: cover;
|
background-size: cover;
|
||||||
box-decoration-break: clone;
|
-moz-background-inline-policy: each-box;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="outer">
|
<div id="outer">
|
||||||
<span id="ahem-lines"> <!-- EOL -->
|
<span id="ahem-lines"> <!-- EOL -->
|
||||||
<!-- mix it up for clone --><!-- EOL -->
|
<!-- mix it up for each-box and bounding-box --><!-- EOL -->
|
||||||
<!-- EOL -->
|
<!-- EOL -->
|
||||||
<!-- EOL -->
|
<!-- EOL -->
|
||||||
</span></div>
|
</span></div>
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>box-decoration-break: clone</title>
|
<title>background-break: each-box</title>
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
@font-face
|
@font-face
|
||||||
{
|
{
|
||||||
@@ -21,14 +21,14 @@
|
|||||||
white-space: pre;
|
white-space: pre;
|
||||||
background-image: url(blue-8x20-green-8x20.png);
|
background-image: url(blue-8x20-green-8x20.png);
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
box-decoration-break: clone;
|
-moz-background-inline-policy: each-box;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="outer">
|
<div id="outer">
|
||||||
<span id="ahem-lines"> <!-- EOL -->
|
<span id="ahem-lines"> <!-- EOL -->
|
||||||
<!-- mix it up for clone --><!-- EOL -->
|
<!-- mix it up for each-box and bounding-box --><!-- EOL -->
|
||||||
<!-- EOL -->
|
<!-- EOL -->
|
||||||
<!-- EOL -->
|
<!-- EOL -->
|
||||||
</span></div>
|
</span></div>
|
||||||
@@ -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
|
skip-if(B2G) == background-layers-1a.html background-layers-1-ref.html # bug 773482
|
||||||
== background-layers-1b.html background-layers-1-ref.html
|
== 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
|
# -moz-background-inline-policy is touchy and hard to test due to stretching
|
||||||
# artifacts and the difficulty of covering exact lines, so just make sure
|
# artifacts and the difficulty of covering exact lines, and its CSS3 analog is
|
||||||
# background-size results in a different rendering when present.
|
# on the chopping block at the moment, so just make sure background-size results
|
||||||
pref(layout.css.box-decoration-break.enabled,true) != background-size-cover-slice.html background-size-slice.html
|
# in a different rendering when present.
|
||||||
pref(layout.css.box-decoration-break.enabled,true) != background-size-cover-clone.html background-size-clone.html
|
!= 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
|
# ...and make sure each rendering with background-size is different from the
|
||||||
# other
|
# others
|
||||||
pref(layout.css.box-decoration-break.enabled,true) != background-size-cover-slice.html background-size-cover-clone.html
|
!= 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-ch.html background-size-monster-ref.html
|
||||||
== background-size-monster-cm.html background-size-monster-ref.html
|
== background-size-monster-cm.html background-size-monster-ref.html
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
</head>
|
</head>
|
||||||
<body style="line-height: 3; width: 500px; height: 250px;">
|
<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<br>
|
blah<br>
|
||||||
blah
|
blah
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
</head>
|
</head>
|
||||||
<body style="line-height: 3; width: 500px; height: 250px;">
|
<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<br>
|
blah<br>
|
||||||
blah
|
blah
|
||||||
|
|||||||
15
layout/reftests/bugs/368020-4-ref.html
Normal file
15
layout/reftests/bugs/368020-4-ref.html
Normal 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>
|
||||||
15
layout/reftests/bugs/368020-4.html
Normal file
15
layout/reftests/bugs/368020-4.html
Normal 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>
|
||||||
@@ -5,7 +5,7 @@
|
|||||||
</head>
|
</head>
|
||||||
<body style="line-height: 3; width: 500px; height: 250px;">
|
<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<br>
|
blah<br>
|
||||||
blah
|
blah
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
</head>
|
</head>
|
||||||
<body style="line-height: 3; width: 500px; height: 250px;">
|
<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<br>
|
blah<br>
|
||||||
blah
|
blah
|
||||||
|
|||||||
@@ -595,8 +595,9 @@ skip-if(B2G) == 367247-l-scroll.html 367247-l-auto.html
|
|||||||
!= 367612-1g.html 367612-1-ref.html
|
!= 367612-1g.html 367612-1-ref.html
|
||||||
skip-if(B2G) random-if(/^Windows\x20NT\x205\.1/.test(http.oscpu)) == 368020-1.html 368020-1-ref.html
|
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-2.html 368020-2-ref.html
|
||||||
== 368020-3.html 368020-3-ref.html
|
fails == 368020-3.html 368020-3-ref.html # bug 368085
|
||||||
pref(layout.css.box-decoration-break.enabled,true) == 368020-5.html 368020-5-ref.html
|
fails == 368020-4.html 368020-4-ref.html # bug 368085
|
||||||
|
== 368020-5.html 368020-5-ref.html
|
||||||
== 368155-1.xhtml 368155-1-ref.xhtml
|
== 368155-1.xhtml 368155-1-ref.xhtml
|
||||||
asserts(4) == 368155-negative-margins-1.html 368155-negative-margins-1-ref.html # bug 387205 / bug 457397
|
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
|
# we can't test this because there's antialiasing involved, and our comparison
|
||||||
|
|||||||
@@ -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> a </b></span><br><span class="o0"><b> b </b></span><br><span class="o0"><b> c </b></span></td>
|
|
||||||
<td><span class="o10"><b> a </b></span><br><span class="o10"><b> b </b></span><br><span class="o10"><b> c </b></span></td>
|
|
||||||
<td><span class="o10x"><b> a </b></span><br><span class="o10x"><b> b </b></span><br><span class="o10x"><b> c </b></span></td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
<br>
|
|
||||||
|
|
||||||
<table border=1 cellpadding=10><tr>
|
|
||||||
<td><span class="so0"><b> a </b></span><br><span class="so0"><b> b </b></span><br><span class="so0"><b> c </b></span></td>
|
|
||||||
<td><span class="so10"><b> a </b></span><br><span class="so10"><b> b </b></span><br><span class="so10"><b> c </b></span></td>
|
|
||||||
<td><span class="so10x"><b> a </b></span><br><span class="so10x"><b> b </b></span><br><span class="so10x"><b> c </b></span></td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
@@ -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> a <br> b <br> c </b></span></td>
|
|
||||||
<td><span class="o10"><b> a <br> b <br> c </b></span></td>
|
|
||||||
<td><span class="o10x"><b> a <br> b <br> c </b></span></td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
<br>
|
|
||||||
|
|
||||||
<table border=1 cellpadding=10><tr>
|
|
||||||
<td><span class="so0"><b> a <br> b <br> c </b></span><br></td>
|
|
||||||
<td><span class="so10"><b> a <br> b <br> c </b></span><br></td>
|
|
||||||
<td><span class="so10x"><b> a <br> b <br> c </b></span><br></td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
@@ -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> a </b></span><br><span class="o0"><b> b </b></span><br><span class="o0"><b> c </b></span><br>
|
|
||||||
<span class="o10"><b> a </b></span><br><span class="o10"><b> b </b></span><br><span class="o10"><b> c </b></span><br>
|
|
||||||
<span class="o10x"><b> a </b></span><br><span class="o10x"><b> b </b></span><br><span class="o10x"><b> c </b></span><br>
|
|
||||||
</td><td>
|
|
||||||
<span class="p0"><b> a </b></span><br><span class="p0"><b> b </b></span><br></span><span class="p0"><b> c </b></span><br>
|
|
||||||
<span class="p10"><b> a </b></span><br><span class="p10"><b> b </b></span><br><span class="p10"><b> c </b></span><br>
|
|
||||||
<span class="p10x"><b> a </b></span><br><span class="p10x"><b> b </b></span><br><span class="p10x"><b> c </b></span><br>
|
|
||||||
</td><td>
|
|
||||||
<span class="so0"><b> a </b></span><br><span class="so0"><b> b </b></span><br><span class="so0"><b> c </b></span><br>
|
|
||||||
<span class="so10"><b> a </b></span><br><span class="so10"><b> b </b></span><br><span class="so10"><b> c </b></span><br>
|
|
||||||
<span class="so10x"><b> a </b></span><br><span class="so10x"><b> b </b></span><br><span class="so10x"><b> c </b></span><br>
|
|
||||||
</td><td>
|
|
||||||
<span class="sp0"><b> a </b></span><br><span class="sp0"><b> b </b></span><br><span class="sp0"><b> c </b></span><br>
|
|
||||||
<span class="sp10"><b> a </b></span><br><span class="sp10"><b> b </b></span><br><span class="sp10"><b> c </b></span><br>
|
|
||||||
<span class="sp10x"><b> a </b></span><br><span class="sp10x"><b> b </b></span><br><span class="sp10x"><b> c </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> a </b></span><br><span class="m o0"><b> b </b></span><br><span class="m o0"><b> c </b></span><br>
|
|
||||||
<span class="m o10"><b> a </b></span><br><span class="m o10"><b> b </b></span><br><span class="m o10"><b> c </b></span><br>
|
|
||||||
<span class="m o10x"><b> a </b></span><br><span class="m o10x"><b> b </b></span><br><span class="m o10x"><b> c </b></span><br>
|
|
||||||
</td><td>
|
|
||||||
<span class="m p0"><b> a </b></span><br><span class="m p0"><b> b </b></span><br></span><span class="m p0"><b> c </b></span><br>
|
|
||||||
<span class="m p10"><b> a </b></span><br><span class="m p10"><b> b </b></span><br><span class="m p10"><b> c </b></span><br>
|
|
||||||
<span class="m p10x"><b> a </b></span><br><span class="m p10x"><b> b </b></span><br><span class="m p10x"><b> c </b></span><br>
|
|
||||||
</td><td>
|
|
||||||
<span class="m so0"><b> a </b></span><br><span class="m so0"><b> b </b></span><br><span class="m so0"><b> c </b></span><br>
|
|
||||||
<span class="m so10"><b> a </b></span><br><span class="m so10"><b> b </b></span><br><span class="m so10"><b> c </b></span><br>
|
|
||||||
<span class="m so10x"><b> a </b></span><br><span class="m so10x"><b> b </b></span><br><span class="m so10x"><b> c </b></span><br>
|
|
||||||
</td><td>
|
|
||||||
<span class="m sp0"><b> a </b></span><br><span class="m sp0"><b> b </b></span><br><span class="m sp0"><b> c </b></span><br>
|
|
||||||
<span class="m sp10"><b> a </b></span><br><span class="m sp10"><b> b </b></span><br><span class="m sp10"><b> c </b></span><br>
|
|
||||||
<span class="m sp10x"><b> a </b></span><br><span class="m sp10x"><b> b </b></span><br><span class="m sp10x"><b> c </b></span><br>
|
|
||||||
</td></tr>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</body>
|
|
||||||
|
|
||||||
@@ -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> a <br> b <br> c </b></span><br>
|
|
||||||
<span class="o10"><b> a <br> b <br> c </b></span><br>
|
|
||||||
<span class="o10x"><b> a <br> b <br> c </b></span><br>
|
|
||||||
</td><td>
|
|
||||||
<span class="p0"><b> a <br> b <br> c </b></span><br>
|
|
||||||
<span class="p10"><b> a <br> b <br> c </b></span><br>
|
|
||||||
<span class="p10x"><b> a <br> b <br> c </b></span><br>
|
|
||||||
</td><td>
|
|
||||||
<span class="so0"><b> a <br> b <br> c </b></span><br>
|
|
||||||
<span class="so10"><b> a <br> b <br> c </b></span><br>
|
|
||||||
<span class="so10x"><b> a <br> b <br> c </b></span><br>
|
|
||||||
</td><td>
|
|
||||||
<span class="sp0"><b> a <br> b <br> c </b></span><br>
|
|
||||||
<span class="sp10"><b> a <br> b <br> c </b></span><br>
|
|
||||||
<span class="sp10x"><b> a <br> b <br> c </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> a <br> b <br> c </b></span><br>
|
|
||||||
<span class="m o10"><b> a <br> b <br> c </b></span><br>
|
|
||||||
<span class="m o10x"><b> a <br> b <br> c </b></span><br>
|
|
||||||
</td><td>
|
|
||||||
<span class="m p0"><b> a <br> b <br> c </b></span><br>
|
|
||||||
<span class="m p10"><b> a <br> b <br> c </b></span><br>
|
|
||||||
<span class="m p10x"><b> a <br> b <br> c </b></span><br>
|
|
||||||
</td><td>
|
|
||||||
<span class="m so0"><b> a <br> b <br> c </b></span><br>
|
|
||||||
<span class="m so10"><b> a <br> b <br> c </b></span><br>
|
|
||||||
<span class="m so10x"><b> a <br> b <br> c </b></span><br>
|
|
||||||
</td><td>
|
|
||||||
<span class="m sp0"><b> a <br> b <br> c </b></span><br>
|
|
||||||
<span class="m sp10"><b> a <br> b <br> c </b></span><br>
|
|
||||||
<span class="m sp10x"><b> a <br> b <br> c </b></span><br>
|
|
||||||
</td></tr>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
@@ -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> a </b></span><br><span class="o0"><b> b </b></span><br><span class="o0"><b> c </b></span><br>
|
|
||||||
<span class="o10"><b> a </b></span><br><span class="o10"><b> b </b></span><br><span class="o10"><b> c </b></span><br>
|
|
||||||
<span class="o10x"><b> a </b></span><br><span class="o10x"><b> b </b></span><br><span class="o10x"><b> c </b></span><br>
|
|
||||||
</td><td>
|
|
||||||
<span class="p0"><b> a </b></span><br><span class="p0"><b> b </b></span><br><span class="p0"><b> c </b></span><br>
|
|
||||||
<span class="p10"><b> a </b></span><br><span class="p10"><b> b </b></span><br><span class="p10"><b> c </b></span><br>
|
|
||||||
<span class="p10x"><b> a </b></span><br><span class="p10x"><b> b </b></span><br><span class="p10x"><b> c </b></span><br>
|
|
||||||
</td><td>
|
|
||||||
<span class="so0"><b> a </b></span><br><span class="so0"><b> b </b></span><br><span class="so0"><b> c </b></span><br>
|
|
||||||
<span class="so10"><b> a </b></span><br><span class="so10"><b> b </b></span><br><span class="so10"><b> c </b></span><br>
|
|
||||||
<span class="so10x"><b> a </b></span><br><span class="so10x"><b> b </b></span><br><span class="so10x"><b> c </b></span><br>
|
|
||||||
</td><td>
|
|
||||||
<span class="sp0"><b> a </b></span><br><span class="sp0"><b> b </b></span><br><span class="sp0"><b> c </b></span><br>
|
|
||||||
<span class="sp10"><b> a </b></span><br><span class="sp10"><b> b </b></span><br><span class="sp10"><b> c </b></span><br>
|
|
||||||
<span class="sp10x"><b> a </b></span><br><span class="sp10x"><b> b </b></span><br><span class="sp10x"><b> c </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> a </b></span><br><span class="m o0"><b> b </b></span><br><span class="m o0"><b> c </b></span><br>
|
|
||||||
<span class="m o10"><b> a </b></span><br><span class="m o10"><b> b </b></span><br><span class="m o10"><b> c </b></span><br>
|
|
||||||
<span class="m o10x"><b> a </b></span><br><span class="m o10x"><b> b </b></span><br><span class="m o10x"><b> c </b></span><br>
|
|
||||||
</td><td>
|
|
||||||
<span class="m p0"><b> a </b></span><br><span class="m p0"><b> b </b></span><br><span class="m p0"><b> c </b></span><br>
|
|
||||||
<span class="m p10"><b> a </b></span><br><span class="m p10"><b> b </b></span><br><span class="m p10"><b> c </b></span><br>
|
|
||||||
<span class="m p10x"><b> a </b></span><br><span class="m p10x"><b> b </b></span><br><span class="m p10x"><b> c </b></span><br>
|
|
||||||
</td><td>
|
|
||||||
<span class="m so0"><b> a </b></span><br><span class="m so0"><b> b </b></span><br><span class="m so0"><b> c </b></span><br>
|
|
||||||
<span class="m so10"><b> a </b></span><br><span class="m so10"><b> b </b></span><br><span class="m so10"><b> c </b></span><br>
|
|
||||||
<span class="m so10x"><b> a </b></span><br><span class="m so10x"><b> b </b></span><br><span class="m so10x"><b> c </b></span><br>
|
|
||||||
</td><td>
|
|
||||||
<span class="m sp0"><b> a </b></span><br><span class="m sp0"><b> b </b></span><br><span class="m sp0"><b> c </b></span><br>
|
|
||||||
<span class="m sp10"><b> a </b></span><br><span class="m sp10"><b> b </b></span><br><span class="m sp10"><b> c </b></span><br>
|
|
||||||
<span class="m sp10x"><b> a </b></span><br><span class="m sp10x"><b> b </b></span><br><span class="m sp10x"><b> c </b></span><br>
|
|
||||||
</td></tr>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
|
|
||||||
@@ -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> a <br> b <br> c </b></span><br>
|
|
||||||
<span class="o10"><b> a <br> b <br> c </b></span><br>
|
|
||||||
<span class="o10x"><b> a <br> b <br> c </b></span><br>
|
|
||||||
</td><td>
|
|
||||||
<span class="p0"><b> a <br> b <br> c </b></span><br>
|
|
||||||
<span class="p10"><b> a <br> b <br> c </b></span><br>
|
|
||||||
<span class="p10x"><b> a <br> b <br> c </b></span><br>
|
|
||||||
</td><td>
|
|
||||||
<span class="so0"><b> a <br> b <br> c </b></span><br>
|
|
||||||
<span class="so10"><b> a <br> b <br> c </b></span><br>
|
|
||||||
<span class="so10x"><b> a <br> b <br> c </b></span><br>
|
|
||||||
</td><td>
|
|
||||||
<span class="sp0"><b> a <br> b <br> c </b></span><br>
|
|
||||||
<span class="sp10"><b> a <br> b <br> c </b></span><br>
|
|
||||||
<span class="sp10x"><b> a <br> b <br> c </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> a <br> b <br> c </b></span><br>
|
|
||||||
<span class="m o10"><b> a <br> b <br> c </b></span><br>
|
|
||||||
<span class="m o10x"><b> a <br> b <br> c </b></span><br>
|
|
||||||
</td><td>
|
|
||||||
<span class="m p0"><b> a <br> b <br> c </b></span><br>
|
|
||||||
<span class="m p10"><b> a <br> b <br> c </b></span><br>
|
|
||||||
<span class="m p10x"><b> a <br> b <br> c </b></span><br>
|
|
||||||
</td><td>
|
|
||||||
<span class="m so0"><b> a <br> b <br> c </b></span><br>
|
|
||||||
<span class="m so10"><b> a <br> b <br> c </b></span><br>
|
|
||||||
<span class="m so10x"><b> a <br> b <br> c </b></span><br>
|
|
||||||
</td><td>
|
|
||||||
<span class="m sp0"><b> a <br> b <br> c </b></span><br>
|
|
||||||
<span class="m sp10"><b> a <br> b <br> c </b></span><br>
|
|
||||||
<span class="m sp10x"><b> a <br> b <br> c </b></span><br>
|
|
||||||
</td></tr>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
|
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 396 B |
@@ -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
|
|
||||||
@@ -56,9 +56,6 @@ include css-animations/reftest.list
|
|||||||
# blending/
|
# blending/
|
||||||
include css-blending/reftest.list
|
include css-blending/reftest.list
|
||||||
|
|
||||||
# Tests for the css-break spec
|
|
||||||
include css-break/reftest.list
|
|
||||||
|
|
||||||
# css calc() tests
|
# css calc() tests
|
||||||
include css-calc/reftest.list
|
include css-calc/reftest.list
|
||||||
|
|
||||||
|
|||||||
@@ -188,6 +188,7 @@ CSS_KEY(border-box, border_box)
|
|||||||
CSS_KEY(both, both)
|
CSS_KEY(both, both)
|
||||||
CSS_KEY(bottom, bottom)
|
CSS_KEY(bottom, bottom)
|
||||||
CSS_KEY(bottom-outside, bottom_outside)
|
CSS_KEY(bottom-outside, bottom_outside)
|
||||||
|
CSS_KEY(bounding-box, bounding_box)
|
||||||
CSS_KEY(break-all, break_all)
|
CSS_KEY(break-all, break_all)
|
||||||
CSS_KEY(break-word, break_word)
|
CSS_KEY(break-word, break_word)
|
||||||
CSS_KEY(brightness, brightness)
|
CSS_KEY(brightness, brightness)
|
||||||
@@ -207,7 +208,6 @@ CSS_KEY(circle, circle)
|
|||||||
CSS_KEY(cjk-decimal, cjk_decimal)
|
CSS_KEY(cjk-decimal, cjk_decimal)
|
||||||
CSS_KEY(cjk-ideographic, cjk_ideographic)
|
CSS_KEY(cjk-ideographic, cjk_ideographic)
|
||||||
CSS_KEY(clip, clip)
|
CSS_KEY(clip, clip)
|
||||||
CSS_KEY(clone, clone)
|
|
||||||
CSS_KEY(close-quote, close_quote)
|
CSS_KEY(close-quote, close_quote)
|
||||||
CSS_KEY(closest-corner, closest_corner)
|
CSS_KEY(closest-corner, closest_corner)
|
||||||
CSS_KEY(closest-side, closest_side)
|
CSS_KEY(closest-side, closest_side)
|
||||||
@@ -257,6 +257,7 @@ CSS_KEY(double, double)
|
|||||||
CSS_KEY(double-struck, double_struck)
|
CSS_KEY(double-struck, double_struck)
|
||||||
CSS_KEY(drop-shadow, drop_shadow)
|
CSS_KEY(drop-shadow, drop_shadow)
|
||||||
CSS_KEY(e-resize, e_resize)
|
CSS_KEY(e-resize, e_resize)
|
||||||
|
CSS_KEY(each-box, each_box)
|
||||||
CSS_KEY(ease, ease)
|
CSS_KEY(ease, ease)
|
||||||
CSS_KEY(ease-in, ease_in)
|
CSS_KEY(ease-in, ease_in)
|
||||||
CSS_KEY(ease-in-out, ease_in_out)
|
CSS_KEY(ease-in-out, ease_in_out)
|
||||||
@@ -495,7 +496,6 @@ CSS_KEY(skew, skew)
|
|||||||
CSS_KEY(skewx, skewx)
|
CSS_KEY(skewx, skewx)
|
||||||
CSS_KEY(skewy, skewy)
|
CSS_KEY(skewy, skewy)
|
||||||
CSS_KEY(slashed-zero, slashed_zero)
|
CSS_KEY(slashed-zero, slashed_zero)
|
||||||
CSS_KEY(slice, slice)
|
|
||||||
CSS_KEY(small, small)
|
CSS_KEY(small, small)
|
||||||
CSS_KEY(small-caps, small_caps)
|
CSS_KEY(small-caps, small_caps)
|
||||||
CSS_KEY(small-caption, small_caption)
|
CSS_KEY(small-caption, small_caption)
|
||||||
|
|||||||
@@ -274,6 +274,10 @@
|
|||||||
// 'text-shadow' (see above) and 'box-shadow' (which is like the
|
// 'text-shadow' (see above) and 'box-shadow' (which is like the
|
||||||
// border properties).
|
// 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(
|
CSS_PROP_DISPLAY(
|
||||||
-moz-appearance,
|
-moz-appearance,
|
||||||
appearance,
|
appearance,
|
||||||
@@ -533,6 +537,18 @@ CSS_PROP_BACKGROUND(
|
|||||||
nullptr,
|
nullptr,
|
||||||
CSS_PROP_NO_OFFSET,
|
CSS_PROP_NO_OFFSET,
|
||||||
eStyleAnimType_None)
|
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(
|
CSS_PROP_BACKGROUND(
|
||||||
background-blend-mode,
|
background-blend-mode,
|
||||||
background_blend_mode,
|
background_blend_mode,
|
||||||
@@ -1349,16 +1365,6 @@ CSS_PROP_POSITION(
|
|||||||
nullptr,
|
nullptr,
|
||||||
offsetof(nsStylePosition, mOffset),
|
offsetof(nsStylePosition, mOffset),
|
||||||
eStyleAnimType_Sides_Bottom)
|
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(
|
CSS_PROP_BORDER(
|
||||||
box-shadow,
|
box-shadow,
|
||||||
box_shadow,
|
box_shadow,
|
||||||
|
|||||||
@@ -676,6 +676,13 @@ const KTableValue nsCSSProps::kBackgroundAttachmentKTable[] = {
|
|||||||
eCSSKeyword_UNKNOWN,-1
|
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 &&
|
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_PADDING == NS_STYLE_BG_ORIGIN_PADDING &&
|
||||||
NS_STYLE_BG_CLIP_CONTENT == NS_STYLE_BG_ORIGIN_CONTENT,
|
NS_STYLE_BG_CLIP_CONTENT == NS_STYLE_BG_ORIGIN_CONTENT,
|
||||||
@@ -789,12 +796,6 @@ const KTableValue nsCSSProps::kBoxPropSourceKTable[] = {
|
|||||||
eCSSKeyword_UNKNOWN,-1
|
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[] = {
|
const KTableValue nsCSSProps::kBoxShadowTypeKTable[] = {
|
||||||
eCSSKeyword_inset, NS_STYLE_BOX_SHADOW_INSET,
|
eCSSKeyword_inset, NS_STYLE_BOX_SHADOW_INSET,
|
||||||
eCSSKeyword_UNKNOWN,-1
|
eCSSKeyword_UNKNOWN,-1
|
||||||
|
|||||||
@@ -506,6 +506,7 @@ public:
|
|||||||
static const KTableValue kBackfaceVisibilityKTable[];
|
static const KTableValue kBackfaceVisibilityKTable[];
|
||||||
static const KTableValue kTransformStyleKTable[];
|
static const KTableValue kTransformStyleKTable[];
|
||||||
static const KTableValue kBackgroundAttachmentKTable[];
|
static const KTableValue kBackgroundAttachmentKTable[];
|
||||||
|
static const KTableValue kBackgroundInlinePolicyKTable[];
|
||||||
static const KTableValue kBackgroundOriginKTable[];
|
static const KTableValue kBackgroundOriginKTable[];
|
||||||
static const KTableValue kBackgroundPositionKTable[];
|
static const KTableValue kBackgroundPositionKTable[];
|
||||||
static const KTableValue kBackgroundRepeatKTable[];
|
static const KTableValue kBackgroundRepeatKTable[];
|
||||||
@@ -519,7 +520,6 @@ public:
|
|||||||
static const KTableValue kBorderStyleKTable[];
|
static const KTableValue kBorderStyleKTable[];
|
||||||
static const KTableValue kBorderWidthKTable[];
|
static const KTableValue kBorderWidthKTable[];
|
||||||
static const KTableValue kBoxAlignKTable[];
|
static const KTableValue kBoxAlignKTable[];
|
||||||
static const KTableValue kBoxDecorationBreakKTable[];
|
|
||||||
static const KTableValue kBoxDirectionKTable[];
|
static const KTableValue kBoxDirectionKTable[];
|
||||||
static const KTableValue kBoxOrientKTable[];
|
static const KTableValue kBoxOrientKTable[];
|
||||||
static const KTableValue kBoxPackKTable[];
|
static const KTableValue kBoxPackKTable[];
|
||||||
|
|||||||
@@ -2073,6 +2073,16 @@ nsComputedDOMStyle::DoGetBackgroundImage()
|
|||||||
return valueList;
|
return valueList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CSSValue*
|
||||||
|
nsComputedDOMStyle::DoGetBackgroundInlinePolicy()
|
||||||
|
{
|
||||||
|
nsROCSSPrimitiveValue *val = new nsROCSSPrimitiveValue;
|
||||||
|
val->SetIdent(nsCSSProps::ValueToKeywordEnum(
|
||||||
|
StyleBackground()->mBackgroundInlinePolicy,
|
||||||
|
nsCSSProps::kBackgroundInlinePolicyKTable));
|
||||||
|
return val;
|
||||||
|
}
|
||||||
|
|
||||||
CSSValue*
|
CSSValue*
|
||||||
nsComputedDOMStyle::DoGetBackgroundBlendMode()
|
nsComputedDOMStyle::DoGetBackgroundBlendMode()
|
||||||
{
|
{
|
||||||
@@ -2970,16 +2980,6 @@ nsComputedDOMStyle::GetCSSShadowArray(nsCSSShadowArray* aArray,
|
|||||||
return valueList;
|
return valueList;
|
||||||
}
|
}
|
||||||
|
|
||||||
CSSValue*
|
|
||||||
nsComputedDOMStyle::DoGetBoxDecorationBreak()
|
|
||||||
{
|
|
||||||
nsROCSSPrimitiveValue* val = new nsROCSSPrimitiveValue;
|
|
||||||
val->SetIdent(
|
|
||||||
nsCSSProps::ValueToKeywordEnum(StyleBorder()->mBoxDecorationBreak,
|
|
||||||
nsCSSProps::kBoxDecorationBreakKTable));
|
|
||||||
return val;
|
|
||||||
}
|
|
||||||
|
|
||||||
CSSValue*
|
CSSValue*
|
||||||
nsComputedDOMStyle::DoGetBoxShadow()
|
nsComputedDOMStyle::DoGetBoxShadow()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -222,7 +222,6 @@ private:
|
|||||||
|
|
||||||
/* Box properties */
|
/* Box properties */
|
||||||
mozilla::dom::CSSValue* DoGetBoxAlign();
|
mozilla::dom::CSSValue* DoGetBoxAlign();
|
||||||
mozilla::dom::CSSValue* DoGetBoxDecorationBreak();
|
|
||||||
mozilla::dom::CSSValue* DoGetBoxDirection();
|
mozilla::dom::CSSValue* DoGetBoxDirection();
|
||||||
mozilla::dom::CSSValue* DoGetBoxFlex();
|
mozilla::dom::CSSValue* DoGetBoxFlex();
|
||||||
mozilla::dom::CSSValue* DoGetBoxOrdinalGroup();
|
mozilla::dom::CSSValue* DoGetBoxOrdinalGroup();
|
||||||
@@ -284,6 +283,7 @@ private:
|
|||||||
mozilla::dom::CSSValue* DoGetBackgroundPosition();
|
mozilla::dom::CSSValue* DoGetBackgroundPosition();
|
||||||
mozilla::dom::CSSValue* DoGetBackgroundRepeat();
|
mozilla::dom::CSSValue* DoGetBackgroundRepeat();
|
||||||
mozilla::dom::CSSValue* DoGetBackgroundClip();
|
mozilla::dom::CSSValue* DoGetBackgroundClip();
|
||||||
|
mozilla::dom::CSSValue* DoGetBackgroundInlinePolicy();
|
||||||
mozilla::dom::CSSValue* DoGetBackgroundBlendMode();
|
mozilla::dom::CSSValue* DoGetBackgroundBlendMode();
|
||||||
mozilla::dom::CSSValue* DoGetBackgroundOrigin();
|
mozilla::dom::CSSValue* DoGetBackgroundOrigin();
|
||||||
mozilla::dom::CSSValue* DoGetBackgroundSize();
|
mozilla::dom::CSSValue* DoGetBackgroundSize();
|
||||||
|
|||||||
@@ -230,6 +230,7 @@ COMPUTED_STYLE_PROP(z_index, ZIndex)
|
|||||||
\* ******************************* */
|
\* ******************************* */
|
||||||
|
|
||||||
COMPUTED_STYLE_PROP(appearance, Appearance)
|
COMPUTED_STYLE_PROP(appearance, Appearance)
|
||||||
|
COMPUTED_STYLE_PROP(_moz_background_inline_policy, BackgroundInlinePolicy)
|
||||||
COMPUTED_STYLE_PROP(binding, Binding)
|
COMPUTED_STYLE_PROP(binding, Binding)
|
||||||
COMPUTED_STYLE_PROP(border_bottom_colors, BorderBottomColors)
|
COMPUTED_STYLE_PROP(border_bottom_colors, BorderBottomColors)
|
||||||
COMPUTED_STYLE_PROP(border_left_colors, BorderLeftColors)
|
COMPUTED_STYLE_PROP(border_left_colors, BorderLeftColors)
|
||||||
|
|||||||
@@ -6239,6 +6239,14 @@ nsRuleNode::ComputeBackgroundData(void* aStartStruct,
|
|||||||
uint8_t(NS_STYLE_BG_CLIP_BORDER), parentBG->mClipCount,
|
uint8_t(NS_STYLE_BG_CLIP_BORDER), parentBG->mClipCount,
|
||||||
bg->mClipCount, maxItemCount, rebuild, canStoreInRuleTree);
|
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]
|
// background-blend-mode: enum, inherit, initial [list]
|
||||||
SetBackgroundList(aContext, *aRuleData->ValueForBackgroundBlendMode(),
|
SetBackgroundList(aContext, *aRuleData->ValueForBackgroundBlendMode(),
|
||||||
bg->mLayers,
|
bg->mLayers,
|
||||||
@@ -6437,13 +6445,6 @@ nsRuleNode::ComputeBorderData(void* aStartStruct,
|
|||||||
{
|
{
|
||||||
COMPUTE_START_RESET(Border, (mPresContext), border, parentBorder)
|
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
|
// box-shadow: none, list, inherit, initial
|
||||||
const nsCSSValue* boxShadowValue = aRuleData->ValueForBoxShadow();
|
const nsCSSValue* boxShadowValue = aRuleData->ValueForBoxShadow();
|
||||||
switch (boxShadowValue->GetUnit()) {
|
switch (boxShadowValue->GetUnit()) {
|
||||||
|
|||||||
@@ -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_END 2
|
||||||
#define NS_STYLE_BOX_PACK_JUSTIFY 3
|
#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
|
// box-direction
|
||||||
#define NS_STYLE_BOX_DIRECTION_NORMAL 0
|
#define NS_STYLE_BOX_DIRECTION_NORMAL 0
|
||||||
#define NS_STYLE_BOX_DIRECTION_REVERSE 1
|
#define NS_STYLE_BOX_DIRECTION_REVERSE 1
|
||||||
|
|||||||
@@ -388,7 +388,6 @@ nsStyleBorder::nsStyleBorder(nsPresContext* aPresContext)
|
|||||||
mBorderImageRepeatH(NS_STYLE_BORDER_IMAGE_REPEAT_STRETCH),
|
mBorderImageRepeatH(NS_STYLE_BORDER_IMAGE_REPEAT_STRETCH),
|
||||||
mBorderImageRepeatV(NS_STYLE_BORDER_IMAGE_REPEAT_STRETCH),
|
mBorderImageRepeatV(NS_STYLE_BORDER_IMAGE_REPEAT_STRETCH),
|
||||||
mFloatEdge(NS_STYLE_FLOAT_EDGE_CONTENT),
|
mFloatEdge(NS_STYLE_FLOAT_EDGE_CONTENT),
|
||||||
mBoxDecorationBreak(NS_STYLE_BOX_DECORATION_BREAK_SLICE),
|
|
||||||
mComputedBorder(0, 0, 0, 0)
|
mComputedBorder(0, 0, 0, 0)
|
||||||
{
|
{
|
||||||
MOZ_COUNT_CTOR(nsStyleBorder);
|
MOZ_COUNT_CTOR(nsStyleBorder);
|
||||||
@@ -440,7 +439,6 @@ nsStyleBorder::nsStyleBorder(const nsStyleBorder& aSrc)
|
|||||||
mBorderImageRepeatH(aSrc.mBorderImageRepeatH),
|
mBorderImageRepeatH(aSrc.mBorderImageRepeatH),
|
||||||
mBorderImageRepeatV(aSrc.mBorderImageRepeatV),
|
mBorderImageRepeatV(aSrc.mBorderImageRepeatV),
|
||||||
mFloatEdge(aSrc.mFloatEdge),
|
mFloatEdge(aSrc.mFloatEdge),
|
||||||
mBoxDecorationBreak(aSrc.mBoxDecorationBreak),
|
|
||||||
mComputedBorder(aSrc.mComputedBorder),
|
mComputedBorder(aSrc.mComputedBorder),
|
||||||
mBorder(aSrc.mBorder),
|
mBorder(aSrc.mBorder),
|
||||||
mTwipsPerPixel(aSrc.mTwipsPerPixel)
|
mTwipsPerPixel(aSrc.mTwipsPerPixel)
|
||||||
@@ -530,8 +528,7 @@ nsChangeHint nsStyleBorder::CalcDifference(const nsStyleBorder& aOther) const
|
|||||||
GetComputedBorder() != aOther.GetComputedBorder() ||
|
GetComputedBorder() != aOther.GetComputedBorder() ||
|
||||||
mFloatEdge != aOther.mFloatEdge ||
|
mFloatEdge != aOther.mFloatEdge ||
|
||||||
mBorderImageOutset != aOther.mBorderImageOutset ||
|
mBorderImageOutset != aOther.mBorderImageOutset ||
|
||||||
(shadowDifference & nsChangeHint_NeedReflow) ||
|
(shadowDifference & nsChangeHint_NeedReflow))
|
||||||
mBoxDecorationBreak != aOther.mBoxDecorationBreak)
|
|
||||||
return NS_STYLE_HINT_REFLOW;
|
return NS_STYLE_HINT_REFLOW;
|
||||||
|
|
||||||
NS_FOR_CSS_SIDES(ix) {
|
NS_FOR_CSS_SIDES(ix) {
|
||||||
@@ -1971,6 +1968,7 @@ nsStyleBackground::nsStyleBackground()
|
|||||||
, mSizeCount(1)
|
, mSizeCount(1)
|
||||||
, mBlendModeCount(1)
|
, mBlendModeCount(1)
|
||||||
, mBackgroundColor(NS_RGBA(0, 0, 0, 0))
|
, mBackgroundColor(NS_RGBA(0, 0, 0, 0))
|
||||||
|
, mBackgroundInlinePolicy(NS_STYLE_BG_INLINE_POLICY_CONTINUOUS)
|
||||||
{
|
{
|
||||||
MOZ_COUNT_CTOR(nsStyleBackground);
|
MOZ_COUNT_CTOR(nsStyleBackground);
|
||||||
Layer *onlyLayer = mLayers.AppendElement();
|
Layer *onlyLayer = mLayers.AppendElement();
|
||||||
@@ -1989,6 +1987,7 @@ nsStyleBackground::nsStyleBackground(const nsStyleBackground& aSource)
|
|||||||
, mBlendModeCount(aSource.mBlendModeCount)
|
, mBlendModeCount(aSource.mBlendModeCount)
|
||||||
, mLayers(aSource.mLayers) // deep copy
|
, mLayers(aSource.mLayers) // deep copy
|
||||||
, mBackgroundColor(aSource.mBackgroundColor)
|
, mBackgroundColor(aSource.mBackgroundColor)
|
||||||
|
, mBackgroundInlinePolicy(aSource.mBackgroundInlinePolicy)
|
||||||
{
|
{
|
||||||
MOZ_COUNT_CTOR(nsStyleBackground);
|
MOZ_COUNT_CTOR(nsStyleBackground);
|
||||||
// If the deep copy of mLayers failed, truncate the counts.
|
// 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_VISUAL;
|
||||||
|
|
||||||
return NS_STYLE_HINT_NONE;
|
return NS_STYLE_HINT_NONE;
|
||||||
|
|||||||
@@ -539,6 +539,11 @@ struct nsStyleBackground {
|
|||||||
|
|
||||||
nscolor mBackgroundColor; // [reset]
|
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.
|
// True if this background is completely transparent.
|
||||||
bool IsTransparent() const;
|
bool IsTransparent() const;
|
||||||
|
|
||||||
@@ -981,7 +986,6 @@ public:
|
|||||||
uint8_t mBorderImageRepeatH; // [reset] see nsStyleConsts.h
|
uint8_t mBorderImageRepeatH; // [reset] see nsStyleConsts.h
|
||||||
uint8_t mBorderImageRepeatV; // [reset]
|
uint8_t mBorderImageRepeatV; // [reset]
|
||||||
uint8_t mFloatEdge; // [reset]
|
uint8_t mFloatEdge; // [reset]
|
||||||
uint8_t mBoxDecorationBreak; // [reset] see nsStyleConsts.h
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// mComputedBorder holds the CSS2.1 computed border-width values.
|
// mComputedBorder holds the CSS2.1 computed border-width values.
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -139,6 +139,10 @@ isnot(e.style.background, "", "should have background shorthand (size:100% auto)
|
|||||||
e.setAttribute("style", "background: red; background-size: auto 100%");
|
e.setAttribute("style", "background: red; background-size: auto 100%");
|
||||||
isnot(e.style.background, "", "should have background shorthand (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
|
// Check that we only serialize background when the lists (of layers) for
|
||||||
// the subproperties are the same length.
|
// 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");
|
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");
|
||||||
|
|||||||
@@ -550,11 +550,6 @@ nsTableCellFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||||||
int
|
int
|
||||||
nsTableCellFrame::GetLogicalSkipSides(const nsHTMLReflowState* aReflowState) const
|
nsTableCellFrame::GetLogicalSkipSides(const nsHTMLReflowState* aReflowState) const
|
||||||
{
|
{
|
||||||
if (MOZ_UNLIKELY(StyleBorder()->mBoxDecorationBreak ==
|
|
||||||
NS_STYLE_BOX_DECORATION_BREAK_CLONE)) {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
int skip = 0;
|
int skip = 0;
|
||||||
if (nullptr != GetPrevInFlow()) {
|
if (nullptr != GetPrevInFlow()) {
|
||||||
skip |= LOGICAL_SIDE_B_START;
|
skip |= LOGICAL_SIDE_B_START;
|
||||||
@@ -1108,10 +1103,7 @@ nsBCTableCellFrame::GetUsedBorder() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* virtual */ bool
|
/* virtual */ bool
|
||||||
nsBCTableCellFrame::GetBorderRadii(const nsSize& aFrameSize,
|
nsBCTableCellFrame::GetBorderRadii(nscoord aRadii[8]) const
|
||||||
const nsSize& aBorderArea,
|
|
||||||
int aSkipSides,
|
|
||||||
nscoord aRadii[8]) const
|
|
||||||
{
|
{
|
||||||
NS_FOR_CSS_HALF_CORNERS(corner) {
|
NS_FOR_CSS_HALF_CORNERS(corner) {
|
||||||
aRadii[corner] = 0;
|
aRadii[corner] = 0;
|
||||||
|
|||||||
@@ -298,10 +298,7 @@ public:
|
|||||||
virtual nsIAtom* GetType() const MOZ_OVERRIDE;
|
virtual nsIAtom* GetType() const MOZ_OVERRIDE;
|
||||||
|
|
||||||
virtual nsMargin GetUsedBorder() const MOZ_OVERRIDE;
|
virtual nsMargin GetUsedBorder() const MOZ_OVERRIDE;
|
||||||
virtual bool GetBorderRadii(const nsSize& aFrameSize,
|
virtual bool GetBorderRadii(nscoord aRadii[8]) const MOZ_OVERRIDE;
|
||||||
const nsSize& aBorderArea,
|
|
||||||
int aSkipSides,
|
|
||||||
nscoord aRadii[8]) const MOZ_OVERRIDE;
|
|
||||||
|
|
||||||
// Get the *inner half of the border only*, in twips.
|
// Get the *inner half of the border only*, in twips.
|
||||||
virtual nsMargin* GetBorderWidth(nsMargin& aBorder) const MOZ_OVERRIDE;
|
virtual nsMargin* GetBorderWidth(nsMargin& aBorder) const MOZ_OVERRIDE;
|
||||||
|
|||||||
@@ -343,11 +343,6 @@ nsTableColGroupFrame::RemoveFrame(ChildListID aListID,
|
|||||||
int
|
int
|
||||||
nsTableColGroupFrame::GetLogicalSkipSides(const nsHTMLReflowState* aReflowState) const
|
nsTableColGroupFrame::GetLogicalSkipSides(const nsHTMLReflowState* aReflowState) const
|
||||||
{
|
{
|
||||||
if (MOZ_UNLIKELY(StyleBorder()->mBoxDecorationBreak ==
|
|
||||||
NS_STYLE_BOX_DECORATION_BREAK_CLONE)) {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
int skip = 0;
|
int skip = 0;
|
||||||
if (nullptr != GetPrevInFlow()) {
|
if (nullptr != GetPrevInFlow()) {
|
||||||
skip |= 1 << LOGICAL_SIDE_B_START;
|
skip |= 1 << LOGICAL_SIDE_B_START;
|
||||||
|
|||||||
@@ -1409,11 +1409,6 @@ nsTableFrame::PaintTableBorderBackground(nsRenderingContext& aRenderingContext,
|
|||||||
int
|
int
|
||||||
nsTableFrame::GetLogicalSkipSides(const nsHTMLReflowState* aReflowState) const
|
nsTableFrame::GetLogicalSkipSides(const nsHTMLReflowState* aReflowState) const
|
||||||
{
|
{
|
||||||
if (MOZ_UNLIKELY(StyleBorder()->mBoxDecorationBreak ==
|
|
||||||
NS_STYLE_BOX_DECORATION_BREAK_CLONE)) {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
int skip = 0;
|
int skip = 0;
|
||||||
// frame attribute was accounted for in nsHTMLTableElement::MapTableBorderInto
|
// frame attribute was accounted for in nsHTMLTableElement::MapTableBorderInto
|
||||||
// account for pagination
|
// account for pagination
|
||||||
|
|||||||
@@ -605,11 +605,6 @@ nsTableRowFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||||||
int
|
int
|
||||||
nsTableRowFrame::GetLogicalSkipSides(const nsHTMLReflowState* aReflowState) const
|
nsTableRowFrame::GetLogicalSkipSides(const nsHTMLReflowState* aReflowState) const
|
||||||
{
|
{
|
||||||
if (MOZ_UNLIKELY(StyleBorder()->mBoxDecorationBreak ==
|
|
||||||
NS_STYLE_BOX_DECORATION_BREAK_CLONE)) {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
int skip = 0;
|
int skip = 0;
|
||||||
if (nullptr != GetPrevInFlow()) {
|
if (nullptr != GetPrevInFlow()) {
|
||||||
skip |= LOGICAL_SIDE_B_START;
|
skip |= LOGICAL_SIDE_B_START;
|
||||||
|
|||||||
@@ -256,11 +256,6 @@ nsTableRowGroupFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||||||
int
|
int
|
||||||
nsTableRowGroupFrame::GetLogicalSkipSides(const nsHTMLReflowState* aReflowState) const
|
nsTableRowGroupFrame::GetLogicalSkipSides(const nsHTMLReflowState* aReflowState) const
|
||||||
{
|
{
|
||||||
if (MOZ_UNLIKELY(StyleBorder()->mBoxDecorationBreak ==
|
|
||||||
NS_STYLE_BOX_DECORATION_BREAK_CLONE)) {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
int skip = 0;
|
int skip = 0;
|
||||||
if (nullptr != GetPrevInFlow()) {
|
if (nullptr != GetPrevInFlow()) {
|
||||||
skip |= LOGICAL_SIDE_B_START;
|
skip |= LOGICAL_SIDE_B_START;
|
||||||
|
|||||||
@@ -1900,9 +1900,6 @@ pref("layout.css.variables.enabled", true);
|
|||||||
// Is support for CSS overflow-clip-box enabled for non-UA sheets?
|
// Is support for CSS overflow-clip-box enabled for non-UA sheets?
|
||||||
pref("layout.css.overflow-clip-box.enabled", false);
|
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
|
// pref for which side vertical scrollbars should be on
|
||||||
// 0 = end-side in UI direction
|
// 0 = end-side in UI direction
|
||||||
// 1 = end-side in document/content direction
|
// 1 = end-side in document/content direction
|
||||||
|
|||||||
Reference in New Issue
Block a user