зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset 9022f5fdcf98 (bug 483446) for mochitest-5 orange.
This commit is contained in:
Родитель
f4815f2203
Коммит
503e54554a
|
@ -1676,14 +1676,12 @@ SetupDirtyRects(const nsRect& aBGClipArea, const nsRect& aCallerDirtyRect,
|
|||
}
|
||||
|
||||
struct BackgroundClipState {
|
||||
nsRect mBGClipArea; // Affected by mClippedRadii
|
||||
nsRect mAdditionalBGClipArea; // Not affected by mClippedRadii
|
||||
nsRect mBGClipArea;
|
||||
nsRect mDirtyRect;
|
||||
gfxRect mDirtyRectGfx;
|
||||
|
||||
gfxCornerSizes mClippedRadii;
|
||||
bool mRadiiAreOuter;
|
||||
bool mHasAdditionalBGClipArea;
|
||||
|
||||
// Whether we are being asked to draw with a caller provided background
|
||||
// clipping area. If this is true we also disable rounded corners.
|
||||
|
@ -1692,49 +1690,15 @@ struct BackgroundClipState {
|
|||
|
||||
static void
|
||||
GetBackgroundClip(gfxContext *aCtx, uint8_t aBackgroundClip,
|
||||
uint8_t aBackgroundAttachment,
|
||||
nsIFrame* aForFrame, const nsRect& aBorderArea,
|
||||
const nsRect& aCallerDirtyRect, bool aHaveRoundedCorners,
|
||||
const gfxCornerSizes& aBGRadii, nscoord aAppUnitsPerPixel,
|
||||
/* out */ BackgroundClipState* aClipState)
|
||||
{
|
||||
aClipState->mBGClipArea = aBorderArea;
|
||||
aClipState->mHasAdditionalBGClipArea = false;
|
||||
aClipState->mCustomClip = false;
|
||||
aClipState->mRadiiAreOuter = true;
|
||||
aClipState->mClippedRadii = aBGRadii;
|
||||
if (aForFrame->GetType() == nsGkAtoms::scrollFrame &&
|
||||
NS_STYLE_BG_ATTACHMENT_LOCAL == aBackgroundAttachment) {
|
||||
// As of this writing, this is still in discussion in the CSS Working Group
|
||||
// http://lists.w3.org/Archives/Public/www-style/2013Jul/0250.html
|
||||
|
||||
// The rectangle for 'background-clip' scrolls with the content,
|
||||
// but the background is also clipped at a non-scrolling 'padding-box'
|
||||
// like the content. (See below.)
|
||||
// Therefore, only 'content-box' makes a difference here.
|
||||
if (aBackgroundClip == NS_STYLE_BG_CLIP_CONTENT) {
|
||||
nsIScrollableFrame* scrollableFrame = do_QueryFrame(aForFrame);
|
||||
// Clip at a rectangle attached to the scrolled content.
|
||||
aClipState->mHasAdditionalBGClipArea = true;
|
||||
aClipState->mAdditionalBGClipArea = nsRect(
|
||||
aClipState->mBGClipArea.TopLeft()
|
||||
+ scrollableFrame->GetScrolledFrame()->GetPosition()
|
||||
// For the dir=rtl case:
|
||||
+ scrollableFrame->GetScrollRange().TopLeft(),
|
||||
scrollableFrame->GetScrolledRect().Size());
|
||||
nsMargin padding = aForFrame->GetUsedPadding();
|
||||
// padding-bottom is ignored on scrollable frames:
|
||||
// https://bugzilla.mozilla.org/show_bug.cgi?id=748518
|
||||
padding.bottom = 0;
|
||||
aForFrame->ApplySkipSides(padding);
|
||||
aClipState->mAdditionalBGClipArea.Deflate(padding);
|
||||
}
|
||||
|
||||
// Also clip at a non-scrolling, rounded-corner 'padding-box',
|
||||
// same as the scrolled content because of the 'overflow' property.
|
||||
aBackgroundClip = NS_STYLE_BG_CLIP_PADDING;
|
||||
}
|
||||
|
||||
if (aBackgroundClip != NS_STYLE_BG_CLIP_BORDER) {
|
||||
nsMargin border = aForFrame->GetUsedBorder();
|
||||
if (aBackgroundClip == NS_STYLE_BG_CLIP_MOZ_ALMOST_PADDING) {
|
||||
|
@ -1766,13 +1730,6 @@ GetBackgroundClip(gfxContext *aCtx, uint8_t aBackgroundClip,
|
|||
}
|
||||
}
|
||||
|
||||
if (!aHaveRoundedCorners && aClipState->mHasAdditionalBGClipArea) {
|
||||
// Do the intersection here to account for the fast path(?) below.
|
||||
aClipState->mBGClipArea =
|
||||
aClipState->mBGClipArea.Intersect(aClipState->mAdditionalBGClipArea);
|
||||
aClipState->mHasAdditionalBGClipArea = false;
|
||||
}
|
||||
|
||||
SetupDirtyRects(aClipState->mBGClipArea, aCallerDirtyRect, aAppUnitsPerPixel,
|
||||
&aClipState->mDirtyRect, &aClipState->mDirtyRectGfx);
|
||||
}
|
||||
|
@ -1801,20 +1758,6 @@ SetupBackgroundClip(BackgroundClipState& aClipState, gfxContext *aCtx,
|
|||
// as above with bgArea, arguably a bug, but table painting seems
|
||||
// to depend on it.
|
||||
|
||||
if (aHaveRoundedCorners || aClipState.mHasAdditionalBGClipArea) {
|
||||
aAutoSR->Reset(aCtx);
|
||||
}
|
||||
|
||||
if (aClipState.mHasAdditionalBGClipArea) {
|
||||
gfxRect bgAreaGfx = nsLayoutUtils::RectToGfxRect(
|
||||
aClipState.mAdditionalBGClipArea, aAppUnitsPerPixel);
|
||||
bgAreaGfx.Round();
|
||||
bgAreaGfx.Condition();
|
||||
aCtx->NewPath();
|
||||
aCtx->Rectangle(bgAreaGfx, true);
|
||||
aCtx->Clip();
|
||||
}
|
||||
|
||||
if (aHaveRoundedCorners) {
|
||||
gfxRect bgAreaGfx =
|
||||
nsLayoutUtils::RectToGfxRect(aClipState.mBGClipArea, aAppUnitsPerPixel);
|
||||
|
@ -1830,6 +1773,7 @@ SetupBackgroundClip(BackgroundClipState& aClipState, gfxContext *aCtx,
|
|||
return;
|
||||
}
|
||||
|
||||
aAutoSR->Reset(aCtx);
|
||||
aCtx->NewPath();
|
||||
aCtx->RoundedRectangle(bgAreaGfx, aClipState.mClippedRadii, aClipState.mRadiiAreOuter);
|
||||
aCtx->Clip();
|
||||
|
@ -1876,20 +1820,9 @@ DrawBackgroundColor(BackgroundClipState& aClipState, gfxContext *aCtx,
|
|||
aCtx->Rectangle(dirty, true);
|
||||
aCtx->Clip();
|
||||
|
||||
if (aClipState.mHasAdditionalBGClipArea) {
|
||||
gfxRect bgAdditionalAreaGfx = nsLayoutUtils::RectToGfxRect(
|
||||
aClipState.mAdditionalBGClipArea, aAppUnitsPerPixel);
|
||||
bgAdditionalAreaGfx.Round();
|
||||
bgAdditionalAreaGfx.Condition();
|
||||
aCtx->NewPath();
|
||||
aCtx->Rectangle(bgAdditionalAreaGfx, true);
|
||||
aCtx->Clip();
|
||||
}
|
||||
|
||||
aCtx->NewPath();
|
||||
aCtx->RoundedRectangle(bgAreaGfx, aClipState.mClippedRadii,
|
||||
aClipState.mRadiiAreOuter);
|
||||
|
||||
aCtx->Fill();
|
||||
aCtx->Restore();
|
||||
}
|
||||
|
@ -2650,8 +2583,7 @@ nsCSSRendering::PaintBackgroundWithSC(nsPresContext* aPresContext,
|
|||
NS_STYLE_BG_CLIP_MOZ_ALMOST_PADDING : NS_STYLE_BG_CLIP_PADDING;
|
||||
}
|
||||
|
||||
GetBackgroundClip(ctx, currentBackgroundClip, bg->BottomLayer().mAttachment,
|
||||
aForFrame, aBorderArea,
|
||||
GetBackgroundClip(ctx, currentBackgroundClip, aForFrame, aBorderArea,
|
||||
aDirtyRect, haveRoundedCorners, bgRadii, appUnitsPerPixel,
|
||||
&clipState);
|
||||
}
|
||||
|
@ -2725,7 +2657,7 @@ nsCSSRendering::PaintBackgroundWithSC(nsPresContext* aPresContext,
|
|||
// already called GetBackgroundClip above and it stored its results
|
||||
// in clipState.
|
||||
if (clipSet) {
|
||||
GetBackgroundClip(ctx, currentBackgroundClip, layer.mAttachment, aForFrame,
|
||||
GetBackgroundClip(ctx, currentBackgroundClip, aForFrame,
|
||||
aBorderArea, aDirtyRect, haveRoundedCorners,
|
||||
bgRadii, appUnitsPerPixel, &clipState);
|
||||
}
|
||||
|
@ -2832,8 +2764,7 @@ nsCSSRendering::PaintBackgroundColorWithSC(nsPresContext* aPresContext,
|
|||
}
|
||||
|
||||
BackgroundClipState clipState;
|
||||
GetBackgroundClip(ctx, currentBackgroundClip, bg->BottomLayer().mAttachment,
|
||||
aForFrame, aBorderArea,
|
||||
GetBackgroundClip(ctx, currentBackgroundClip, aForFrame, aBorderArea,
|
||||
aDirtyRect, haveRoundedCorners, bgRadii, appUnitsPerPixel,
|
||||
&clipState);
|
||||
|
||||
|
@ -2897,31 +2828,6 @@ nsCSSRendering::ComputeBackgroundPositioningArea(nsPresContext* aPresContext,
|
|||
if (geometryFrame) {
|
||||
bgPositioningArea = geometryFrame->GetRect();
|
||||
}
|
||||
} else if (frameType == nsGkAtoms::scrollFrame &&
|
||||
NS_STYLE_BG_ATTACHMENT_LOCAL == aLayer.mAttachment) {
|
||||
nsIScrollableFrame* scrollableFrame = do_QueryFrame(aForFrame);
|
||||
bgPositioningArea = nsRect(
|
||||
scrollableFrame->GetScrolledFrame()->GetPosition()
|
||||
// For the dir=rtl case:
|
||||
+ scrollableFrame->GetScrollRange().TopLeft(),
|
||||
scrollableFrame->GetScrolledRect().Size());
|
||||
// The ScrolledRect’s size does not include the borders or scrollbars,
|
||||
// reverse the handling of background-origin
|
||||
// compared to the common case below.
|
||||
if (aLayer.mOrigin == NS_STYLE_BG_ORIGIN_BORDER) {
|
||||
nsMargin border = geometryFrame->GetUsedBorder();
|
||||
geometryFrame->ApplySkipSides(border);
|
||||
bgPositioningArea.Inflate(border);
|
||||
bgPositioningArea.Inflate(scrollableFrame->GetActualScrollbarSizes());
|
||||
} else if (aLayer.mOrigin != NS_STYLE_BG_ORIGIN_PADDING) {
|
||||
nsMargin padding = geometryFrame->GetUsedPadding();
|
||||
geometryFrame->ApplySkipSides(padding);
|
||||
bgPositioningArea.Deflate(padding);
|
||||
NS_ASSERTION(aLayer.mOrigin == NS_STYLE_BG_ORIGIN_CONTENT,
|
||||
"unknown background-origin value");
|
||||
}
|
||||
*aAttachedToFrame = aForFrame;
|
||||
return bgPositioningArea;
|
||||
} else {
|
||||
bgPositioningArea = nsRect(nsPoint(0,0), aBorderArea.Size());
|
||||
}
|
||||
|
|
|
@ -233,7 +233,6 @@ static inline mozilla::css::Side operator++(mozilla::css::Side& side, int) {
|
|||
// See nsStyleBackground
|
||||
#define NS_STYLE_BG_ATTACHMENT_SCROLL 0
|
||||
#define NS_STYLE_BG_ATTACHMENT_FIXED 1
|
||||
#define NS_STYLE_BG_ATTACHMENT_LOCAL 2
|
||||
|
||||
// See nsStyleBackground
|
||||
// Code depends on these constants having the same values as BG_ORIGIN_*
|
||||
|
|
|
@ -498,9 +498,6 @@ public:
|
|||
nsBoxLayoutState bls(aPresContext, aRC, 0);
|
||||
return mInner.GetNondisappearingScrollbarWidth(&bls);
|
||||
}
|
||||
virtual nsRect GetScrolledRect() const MOZ_OVERRIDE {
|
||||
return mInner.GetScrolledRect();
|
||||
}
|
||||
virtual nsRect GetScrollPortRect() const MOZ_OVERRIDE {
|
||||
return mInner.GetScrollPortRect();
|
||||
}
|
||||
|
@ -767,9 +764,6 @@ public:
|
|||
nsBoxLayoutState bls(aPresContext, aRC, 0);
|
||||
return mInner.GetNondisappearingScrollbarWidth(&bls);
|
||||
}
|
||||
virtual nsRect GetScrolledRect() const MOZ_OVERRIDE {
|
||||
return mInner.GetScrolledRect();
|
||||
}
|
||||
virtual nsRect GetScrollPortRect() const MOZ_OVERRIDE {
|
||||
return mInner.GetScrollPortRect();
|
||||
}
|
||||
|
|
|
@ -87,21 +87,6 @@ public:
|
|||
*/
|
||||
virtual nscoord GetNondisappearingScrollbarWidth(nsPresContext* aPresContext,
|
||||
nsRenderingContext* aRC) = 0;
|
||||
/**
|
||||
* GetScrolledRect is designed to encapsulate deciding which
|
||||
* directions of overflow should be reachable by scrolling and which
|
||||
* should not. Callers should NOT depend on it having any particular
|
||||
* behavior (although nsXULScrollFrame currently does).
|
||||
*
|
||||
* This should only be called when the scrolled frame has been
|
||||
* reflowed with the scroll port size given in mScrollPort.
|
||||
*
|
||||
* Currently it allows scrolling down and to the right for
|
||||
* nsHTMLScrollFrames with LTR directionality and for all
|
||||
* nsXULScrollFrames, and allows scrolling down and to the left for
|
||||
* nsHTMLScrollFrames with RTL directionality.
|
||||
*/
|
||||
virtual nsRect GetScrolledRect() const = 0;
|
||||
/**
|
||||
* Get the area of the scrollport relative to the origin of this frame's
|
||||
* border-box.
|
||||
|
|
|
@ -1,17 +0,0 @@
|
|||
<!doctype html>
|
||||
<title>background-attachment: local</title>
|
||||
<style>
|
||||
#outer {
|
||||
width: 200px;
|
||||
height: 200px;
|
||||
padding: 40px;
|
||||
border: 10px dashed;
|
||||
background: green padding-box;
|
||||
}
|
||||
p {
|
||||
margin-top: 5px;
|
||||
}
|
||||
</style>
|
||||
<div id=outer>
|
||||
<p>Test</p>
|
||||
</div>
|
|
@ -1,26 +0,0 @@
|
|||
<!doctype html>
|
||||
<title>background-attachment: local</title>
|
||||
<style>
|
||||
#outer {
|
||||
width: 200px;
|
||||
height: 200px;
|
||||
padding: 40px;
|
||||
border: 10px dashed;
|
||||
overflow: hidden;
|
||||
background: green local border-box;
|
||||
}
|
||||
#outer div {
|
||||
height: 500px;
|
||||
}
|
||||
p {
|
||||
margin-top: 20px;
|
||||
}
|
||||
</style>
|
||||
<div id=outer>
|
||||
<div>
|
||||
<p>Test</p>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
document.getElementById('outer').scrollTop = 15;
|
||||
</script>
|
|
@ -1,26 +0,0 @@
|
|||
<!doctype html>
|
||||
<title>background-attachment: local</title>
|
||||
<style>
|
||||
#outer {
|
||||
width: 200px;
|
||||
height: 200px;
|
||||
padding: 40px;
|
||||
border: 10px dashed;
|
||||
overflow: hidden;
|
||||
background: green local padding-box;
|
||||
}
|
||||
#outer div {
|
||||
height: 500px;
|
||||
}
|
||||
p {
|
||||
margin-top: 20px;
|
||||
}
|
||||
</style>
|
||||
<div id=outer>
|
||||
<div>
|
||||
<p>Test</p>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
document.getElementById('outer').scrollTop = 15;
|
||||
</script>
|
|
@ -1,17 +0,0 @@
|
|||
<!doctype html>
|
||||
<title>background-attachment: local</title>
|
||||
<style>
|
||||
#outer {
|
||||
width: 200px;
|
||||
height: 255px;
|
||||
padding: 25px 40px 0;
|
||||
border: 10px dashed;
|
||||
background: green content-box;
|
||||
}
|
||||
p {
|
||||
margin-top: 20px;
|
||||
}
|
||||
</style>
|
||||
<div id=outer>
|
||||
<p>Test</p>
|
||||
</div>
|
|
@ -1,26 +0,0 @@
|
|||
<!doctype html>
|
||||
<title>background-attachment: local</title>
|
||||
<style>
|
||||
#outer {
|
||||
width: 200px;
|
||||
height: 200px;
|
||||
padding: 40px;
|
||||
border: 10px dashed;
|
||||
overflow: hidden;
|
||||
background: green local content-box;
|
||||
}
|
||||
#outer div {
|
||||
height: 500px;
|
||||
}
|
||||
p {
|
||||
margin-top: 20px;
|
||||
}
|
||||
</style>
|
||||
<div id=outer>
|
||||
<div>
|
||||
<p>Test</p>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
document.getElementById('outer').scrollTop = 15;
|
||||
</script>
|
|
@ -1,18 +0,0 @@
|
|||
<!doctype html>
|
||||
<title>background-attachment: local</title>
|
||||
<style>
|
||||
#outer {
|
||||
width: 200px;
|
||||
height: 200px;
|
||||
padding: 40px;
|
||||
border: 10px double;
|
||||
border-radius: 50%;
|
||||
background: green padding-box;
|
||||
}
|
||||
p {
|
||||
margin-top: 5px;
|
||||
}
|
||||
</style>
|
||||
<div id=outer>
|
||||
<p>Test</p>
|
||||
</div>
|
|
@ -1,27 +0,0 @@
|
|||
<!doctype html>
|
||||
<title>background-attachment: local</title>
|
||||
<style>
|
||||
#outer {
|
||||
width: 200px;
|
||||
height: 200px;
|
||||
padding: 40px;
|
||||
border: 10px double;
|
||||
overflow: hidden;
|
||||
border-radius: 50%;
|
||||
background: green local border-box;
|
||||
}
|
||||
#outer div {
|
||||
height: 500px;
|
||||
}
|
||||
p {
|
||||
margin-top: 20px;
|
||||
}
|
||||
</style>
|
||||
<div id=outer>
|
||||
<div>
|
||||
<p>Test</p>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
document.getElementById('outer').scrollTop = 15;
|
||||
</script>
|
|
@ -1,27 +0,0 @@
|
|||
<!doctype html>
|
||||
<title>background-attachment: local</title>
|
||||
<style>
|
||||
#outer {
|
||||
width: 200px;
|
||||
height: 200px;
|
||||
padding: 40px;
|
||||
border: 10px double;
|
||||
overflow: hidden;
|
||||
border-radius: 50%;
|
||||
background: green local padding-box;
|
||||
}
|
||||
#outer div {
|
||||
height: 500px;
|
||||
}
|
||||
p {
|
||||
margin-top: 20px;
|
||||
}
|
||||
</style>
|
||||
<div id=outer>
|
||||
<div>
|
||||
<p>Test</p>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
document.getElementById('outer').scrollTop = 15;
|
||||
</script>
|
|
@ -1,26 +0,0 @@
|
|||
<!doctype html>
|
||||
<title>background-attachment: local</title>
|
||||
<style>
|
||||
#outer {
|
||||
width: 200px;
|
||||
height: 200px;
|
||||
padding: 40px;
|
||||
border: 10px double;
|
||||
overflow: hidden;
|
||||
border-radius: 50%;
|
||||
}
|
||||
#outer div {
|
||||
background: green;
|
||||
height: 500px;
|
||||
margin-top: -15px;
|
||||
}
|
||||
p {
|
||||
margin-top: 0;
|
||||
padding-top: 20px;
|
||||
}
|
||||
</style>
|
||||
<div id=outer>
|
||||
<div>
|
||||
<p>Test</p>
|
||||
</div>
|
||||
</div>
|
|
@ -1,27 +0,0 @@
|
|||
<!doctype html>
|
||||
<title>background-attachment: local</title>
|
||||
<style>
|
||||
#outer {
|
||||
width: 200px;
|
||||
height: 200px;
|
||||
padding: 40px;
|
||||
border: 10px double;
|
||||
overflow: hidden;
|
||||
border-radius: 50%;
|
||||
background: green local content-box;
|
||||
}
|
||||
#outer div {
|
||||
height: 500px;
|
||||
}
|
||||
p {
|
||||
margin-top: 20px;
|
||||
}
|
||||
</style>
|
||||
<div id=outer>
|
||||
<div>
|
||||
<p>Test</p>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
document.getElementById('outer').scrollTop = 15;
|
||||
</script>
|
|
@ -1,17 +0,0 @@
|
|||
<!doctype html>
|
||||
<title>background-attachment: local</title>
|
||||
<style>
|
||||
#outer {
|
||||
width: 200px;
|
||||
height: 200px;
|
||||
padding: 40px;
|
||||
border: 10px dashed;
|
||||
background: url(aqua-yellow-32x32.png) padding-box top -15px left 0;
|
||||
}
|
||||
p {
|
||||
margin-top: 5px;
|
||||
}
|
||||
</style>
|
||||
<div id=outer>
|
||||
<p>Test</p>
|
||||
</div>
|
|
@ -1,28 +0,0 @@
|
|||
<!doctype html>
|
||||
<title>background-attachment: local</title>
|
||||
<style>
|
||||
#outer {
|
||||
width: 200px;
|
||||
height: 200px;
|
||||
padding: 40px;
|
||||
border: 10px dashed;
|
||||
overflow: hidden;
|
||||
background: url(aqua-yellow-32x32.png) local;
|
||||
background-clip: border-box;
|
||||
background-origin: padding-box; /* Match the reference. */
|
||||
}
|
||||
#outer div {
|
||||
height: 500px;
|
||||
}
|
||||
p {
|
||||
margin-top: 20px;
|
||||
}
|
||||
</style>
|
||||
<div id=outer>
|
||||
<div>
|
||||
<p>Test</p>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
document.getElementById('outer').scrollTop = 15;
|
||||
</script>
|
|
@ -1,26 +0,0 @@
|
|||
<!doctype html>
|
||||
<title>background-attachment: local</title>
|
||||
<style>
|
||||
#outer {
|
||||
width: 200px;
|
||||
height: 200px;
|
||||
padding: 40px;
|
||||
border: 10px dashed;
|
||||
overflow: hidden;
|
||||
background: url(aqua-yellow-32x32.png) local padding-box;
|
||||
}
|
||||
#outer div {
|
||||
height: 500px;
|
||||
}
|
||||
p {
|
||||
margin-top: 20px;
|
||||
}
|
||||
</style>
|
||||
<div id=outer>
|
||||
<div>
|
||||
<p>Test</p>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
document.getElementById('outer').scrollTop = 15;
|
||||
</script>
|
|
@ -1,17 +0,0 @@
|
|||
<!doctype html>
|
||||
<title>background-attachment: local</title>
|
||||
<style>
|
||||
#outer {
|
||||
width: 200px;
|
||||
height: 255px;
|
||||
padding: 25px 40px 0;
|
||||
border: 10px dashed;
|
||||
background: url(aqua-yellow-32x32.png) content-box;
|
||||
}
|
||||
p {
|
||||
margin-top: 20px;
|
||||
}
|
||||
</style>
|
||||
<div id=outer>
|
||||
<p>Test</p>
|
||||
</div>
|
|
@ -1,26 +0,0 @@
|
|||
<!doctype html>
|
||||
<title>background-attachment: local</title>
|
||||
<style>
|
||||
#outer {
|
||||
width: 200px;
|
||||
height: 200px;
|
||||
padding: 40px;
|
||||
border: 10px dashed;
|
||||
overflow: hidden;
|
||||
background: url(aqua-yellow-32x32.png) local content-box;
|
||||
}
|
||||
#outer div {
|
||||
height: 500px;
|
||||
}
|
||||
p {
|
||||
margin-top: 20px;
|
||||
}
|
||||
</style>
|
||||
<div id=outer>
|
||||
<div>
|
||||
<p>Test</p>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
document.getElementById('outer').scrollTop = 15;
|
||||
</script>
|
|
@ -1,18 +0,0 @@
|
|||
<!doctype html>
|
||||
<title>background-attachment: local</title>
|
||||
<style>
|
||||
#outer {
|
||||
width: 200px;
|
||||
height: 200px;
|
||||
padding: 40px;
|
||||
border: 10px double;
|
||||
border-radius: 50%;
|
||||
background: url(aqua-yellow-32x32.png) padding-box top -15px left 0;
|
||||
}
|
||||
p {
|
||||
margin-top: 5px;
|
||||
}
|
||||
</style>
|
||||
<div id=outer>
|
||||
<p>Test</p>
|
||||
</div>
|
|
@ -1,29 +0,0 @@
|
|||
<!doctype html>
|
||||
<title>background-attachment: local</title>
|
||||
<style>
|
||||
#outer {
|
||||
width: 200px;
|
||||
height: 200px;
|
||||
padding: 40px;
|
||||
border: 10px double;
|
||||
overflow: hidden;
|
||||
border-radius: 50%;
|
||||
background: url(aqua-yellow-32x32.png) local;
|
||||
background-clip: border-box;
|
||||
background-origin: padding-box;
|
||||
}
|
||||
#outer div {
|
||||
height: 500px;
|
||||
}
|
||||
p {
|
||||
margin-top: 20px;
|
||||
}
|
||||
</style>
|
||||
<div id=outer>
|
||||
<div>
|
||||
<p>Test</p>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
document.getElementById('outer').scrollTop = 15;
|
||||
</script>
|
|
@ -1,27 +0,0 @@
|
|||
<!doctype html>
|
||||
<title>background-attachment: local</title>
|
||||
<style>
|
||||
#outer {
|
||||
width: 200px;
|
||||
height: 200px;
|
||||
padding: 40px;
|
||||
border: 10px double;
|
||||
overflow: hidden;
|
||||
border-radius: 50%;
|
||||
background: url(aqua-yellow-32x32.png) local padding-box;
|
||||
}
|
||||
#outer div {
|
||||
height: 500px;
|
||||
}
|
||||
p {
|
||||
margin-top: 20px;
|
||||
}
|
||||
</style>
|
||||
<div id=outer>
|
||||
<div>
|
||||
<p>Test</p>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
document.getElementById('outer').scrollTop = 15;
|
||||
</script>
|
|
@ -1,26 +0,0 @@
|
|||
<!doctype html>
|
||||
<title>background-attachment: local</title>
|
||||
<style>
|
||||
#outer {
|
||||
width: 200px;
|
||||
height: 200px;
|
||||
padding: 40px;
|
||||
border: 10px double;
|
||||
overflow: hidden;
|
||||
border-radius: 50%;
|
||||
}
|
||||
#outer div {
|
||||
background: url(aqua-yellow-32x32.png);
|
||||
height: 500px;
|
||||
margin-top: -15px;
|
||||
}
|
||||
p {
|
||||
margin-top: 0;
|
||||
padding-top: 20px;
|
||||
}
|
||||
</style>
|
||||
<div id=outer>
|
||||
<div>
|
||||
<p>Test</p>
|
||||
</div>
|
||||
</div>
|
|
@ -1,27 +0,0 @@
|
|||
<!doctype html>
|
||||
<title>background-attachment: local</title>
|
||||
<style>
|
||||
#outer {
|
||||
width: 200px;
|
||||
height: 200px;
|
||||
padding: 40px;
|
||||
border: 10px double;
|
||||
overflow: hidden;
|
||||
border-radius: 50%;
|
||||
background: url(aqua-yellow-32x32.png) local content-box;
|
||||
}
|
||||
#outer div {
|
||||
height: 500px;
|
||||
}
|
||||
p {
|
||||
margin-top: 20px;
|
||||
}
|
||||
</style>
|
||||
<div id=outer>
|
||||
<div>
|
||||
<p>Test</p>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
document.getElementById('outer').scrollTop = 15;
|
||||
</script>
|
|
@ -1,16 +0,0 @@
|
|||
<!doctype html>
|
||||
<title>background-attachment: scroll</title>
|
||||
<style>
|
||||
div {
|
||||
background: url(aqua-yellow-32x32.png) no-repeat 100px 100px;
|
||||
overflow: hidden;
|
||||
height: 200px;
|
||||
}
|
||||
p {
|
||||
padding-top: 40px;
|
||||
height: 500px;
|
||||
}
|
||||
</style>
|
||||
<div>
|
||||
<p>Test</p>
|
||||
</div>
|
|
@ -1,19 +0,0 @@
|
|||
<!doctype html>
|
||||
<title>background-attachment: scroll</title>
|
||||
<style>
|
||||
div {
|
||||
background: url(aqua-yellow-32x32.png) no-repeat 100px 100px;
|
||||
overflow: hidden;
|
||||
height: 200px;
|
||||
}
|
||||
p {
|
||||
padding-top: 100px;
|
||||
height: 500px;
|
||||
}
|
||||
</style>
|
||||
<div>
|
||||
<p>Test</p>
|
||||
</div>
|
||||
<script>
|
||||
document.getElementsByTagName('div')[0].scrollTop = 60;
|
||||
</script>
|
|
@ -1,24 +0,0 @@
|
|||
<!doctype html>
|
||||
<title>background-attachment: local, positioning area</title>
|
||||
<style>
|
||||
#outer {
|
||||
border: solid;
|
||||
background: url(aqua-yellow-32x32.png) local no-repeat 178px 278px;
|
||||
overflow: hidden;
|
||||
width: 200px;
|
||||
height: 300px;
|
||||
}
|
||||
div div {
|
||||
width: 250px;
|
||||
height: 370px;
|
||||
}
|
||||
p {
|
||||
margin: 0 0 0 -40px;
|
||||
padding-top: 40px;
|
||||
}
|
||||
</style>
|
||||
<div id=outer>
|
||||
<div>
|
||||
<p>Lorem ipsum dolor sit amet</p>
|
||||
</div>
|
||||
</div>
|
|
@ -1,31 +0,0 @@
|
|||
<!doctype html>
|
||||
<title>background-attachment: local, positioning area</title>
|
||||
<style>
|
||||
#outer {
|
||||
border: solid;
|
||||
/* 100% 100% == (250px - 32px) (370px - 32px) == 218px 338px */
|
||||
/* With scrolling, effective position is 178px 278px */
|
||||
background: url(aqua-yellow-32x32.png) local no-repeat 100% 100%;
|
||||
overflow: hidden;
|
||||
width: 200px;
|
||||
height: 300px;
|
||||
}
|
||||
div div {
|
||||
width: 250px;
|
||||
height: 370px;
|
||||
}
|
||||
p {
|
||||
margin: 0;
|
||||
padding-top: 100px;
|
||||
}
|
||||
</style>
|
||||
<div id=outer>
|
||||
<div>
|
||||
<p>Lorem ipsum dolor sit amet</p>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
var outer = document.getElementById('outer');
|
||||
outer.scrollLeft = 40;
|
||||
outer.scrollTop = 60;
|
||||
</script>
|
|
@ -1,28 +0,0 @@
|
|||
<!doctype html>
|
||||
<title>background-attachment: local, positioning area with dir=rtl</title>
|
||||
<style>
|
||||
#outer {
|
||||
border: solid;
|
||||
background: url(aqua-yellow-32x32.png) local no-repeat 178px 278px;
|
||||
overflow: hidden;
|
||||
width: 200px;
|
||||
height: 300px;
|
||||
}
|
||||
div div {
|
||||
width: 250px;
|
||||
height: 370px;
|
||||
}
|
||||
p {
|
||||
margin: 0;
|
||||
padding-top: 100px;
|
||||
text-align: right;
|
||||
position: relative;
|
||||
top: -60px;
|
||||
left: -40px;
|
||||
}
|
||||
</style>
|
||||
<div id=outer>
|
||||
<div>
|
||||
<p>Lorem ipsum dolor sit amet</p>
|
||||
</div>
|
||||
</div>
|
|
@ -1,32 +0,0 @@
|
|||
<!doctype html>
|
||||
<title>background-attachment: local, positioning area with dir=rtl</title>
|
||||
<style>
|
||||
#outer {
|
||||
border: solid;
|
||||
/* 100% 100% == (250px - 32px) (370px - 32px) == 218px 338px */
|
||||
/* With scrolling, effective position is 178px 278px */
|
||||
background: url(aqua-yellow-32x32.png) local no-repeat 100% 100%;
|
||||
overflow: hidden;
|
||||
width: 200px;
|
||||
height: 300px;
|
||||
}
|
||||
div div {
|
||||
width: 250px;
|
||||
height: 370px;
|
||||
}
|
||||
p {
|
||||
margin: 0;
|
||||
padding-top: 100px;
|
||||
}
|
||||
</style>
|
||||
<div id=outer dir=rtl>
|
||||
<div>
|
||||
<p>Lorem ipsum dolor sit amet</p>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
var outer = document.getElementById('outer');
|
||||
// See https://bugzilla.mozilla.org/show_bug.cgi?id=383026 for negative values.
|
||||
outer.scrollLeft = -10;
|
||||
outer.scrollTop = 60;
|
||||
</script>
|
|
@ -1,28 +0,0 @@
|
|||
<!doctype html>
|
||||
<title>background-attachment: local, positioning area with dir=rtl</title>
|
||||
<style>
|
||||
#outer {
|
||||
border: solid;
|
||||
background: url(aqua-yellow-32x32.png) local no-repeat -10px -10px;
|
||||
overflow: hidden;
|
||||
width: 200px;
|
||||
height: 300px;
|
||||
}
|
||||
div div {
|
||||
width: 250px;
|
||||
height: 370px;
|
||||
}
|
||||
p {
|
||||
margin: 0;
|
||||
padding-top: 100px;
|
||||
text-align: right;
|
||||
position: relative;
|
||||
top: -10px;
|
||||
left: -10px;
|
||||
}
|
||||
</style>
|
||||
<div id=outer>
|
||||
<div>
|
||||
<p>Lorem ipsum dolor sit amet</p>
|
||||
</div>
|
||||
</div>
|
|
@ -1,31 +0,0 @@
|
|||
<!doctype html>
|
||||
<title>background-attachment: local, positioning area with dir=rtl</title>
|
||||
<style>
|
||||
#outer {
|
||||
border: solid;
|
||||
/* With scrolling, effective position is -10px -10px */
|
||||
background: url(aqua-yellow-32x32.png) local no-repeat 0 0;
|
||||
overflow: hidden;
|
||||
width: 200px;
|
||||
height: 300px;
|
||||
}
|
||||
div div {
|
||||
width: 250px;
|
||||
height: 370px;
|
||||
}
|
||||
p {
|
||||
margin: 0;
|
||||
padding-top: 100px;
|
||||
}
|
||||
</style>
|
||||
<div id=outer dir=rtl>
|
||||
<div>
|
||||
<p>Lorem ipsum dolor sit amet</p>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
var outer = document.getElementById('outer');
|
||||
// See https://bugzilla.mozilla.org/show_bug.cgi?id=383026 for negative values.
|
||||
outer.scrollLeft = -40;
|
||||
outer.scrollTop = 10;
|
||||
</script>
|
|
@ -1,17 +0,0 @@
|
|||
<!doctype html>
|
||||
<title>background-attachment: local</title>
|
||||
<style>
|
||||
div {
|
||||
background: url(aqua-yellow-32x32.png) no-repeat 30px 25px;
|
||||
overflow: hidden;
|
||||
height: 200px;
|
||||
}
|
||||
p {
|
||||
padding-left: 30px;
|
||||
padding-top: 125px;
|
||||
height: 500px;
|
||||
}
|
||||
</style>
|
||||
<div>
|
||||
<p>Test</p>
|
||||
</div>
|
|
@ -1,20 +0,0 @@
|
|||
<!doctype html>
|
||||
<title>background-attachment: local</title>
|
||||
<style>
|
||||
div {
|
||||
background: url(aqua-yellow-32x32.png) local no-repeat content-box;
|
||||
overflow: hidden;
|
||||
height: 200px;
|
||||
padding: 40px 30px;
|
||||
}
|
||||
p {
|
||||
padding-top: 100px;
|
||||
height: 500px;
|
||||
}
|
||||
</style>
|
||||
<div>
|
||||
<p>Test</p>
|
||||
</div>
|
||||
<script>
|
||||
document.getElementsByTagName('div')[0].scrollTop = 15;
|
||||
</script>
|
|
@ -1,16 +0,0 @@
|
|||
<!doctype html>
|
||||
<title>background-attachment: scroll</title>
|
||||
<style>
|
||||
div {
|
||||
background: url(aqua-yellow-32x32.png) no-repeat 100px 100px;
|
||||
overflow: hidden;
|
||||
height: 200px;
|
||||
}
|
||||
p {
|
||||
padding-top: 40px;
|
||||
height: 500px;
|
||||
}
|
||||
</style>
|
||||
<div>
|
||||
<p>Test</p>
|
||||
</div>
|
|
@ -1,19 +0,0 @@
|
|||
<!doctype html>
|
||||
<title>background-attachment: scroll</title>
|
||||
<style>
|
||||
div {
|
||||
background: url(aqua-yellow-32x32.png) no-repeat 100px 100px;
|
||||
overflow: hidden;
|
||||
height: 200px;
|
||||
}
|
||||
p {
|
||||
padding-top: 100px;
|
||||
height: 500px;
|
||||
}
|
||||
</style>
|
||||
<div>
|
||||
<p>Test</p>
|
||||
</div>
|
||||
<script>
|
||||
document.getElementsByTagName('div')[0].scrollTop = 60;
|
||||
</script>
|
|
@ -141,24 +141,3 @@ random-if(B2G) == really-big-background.html really-big-background-ref.html
|
|||
== multi-background-clip-content-border.html multi-background-clip-content-border-ref.html
|
||||
|
||||
HTTP == background-referrer.html background-referrer-ref.html
|
||||
|
||||
== attachment-scroll-positioning-1.html attachment-scroll-positioning-1-ref.html
|
||||
== attachment-local-positioning-1.html attachment-local-positioning-1-ref.html
|
||||
== attachment-local-positioning-2.html attachment-local-positioning-2-ref.html
|
||||
== attachment-local-positioning-3.html attachment-local-positioning-3-ref.html
|
||||
== attachment-local-positioning-4.html attachment-local-positioning-4-ref.html
|
||||
== attachment-local-positioning-5.html attachment-local-positioning-5-ref.html
|
||||
|
||||
== attachment-local-clipping-color-1.html attachment-local-clipping-color-1-ref.html
|
||||
== attachment-local-clipping-color-2.html attachment-local-clipping-color-1-ref.html # Same ref as the previous test.
|
||||
== attachment-local-clipping-color-3.html attachment-local-clipping-color-3-ref.html
|
||||
== attachment-local-clipping-color-4.html attachment-local-clipping-color-4-ref.html
|
||||
== attachment-local-clipping-color-5.html attachment-local-clipping-color-4-ref.html # Same ref as the previous test.
|
||||
fuzzy(40,330) == attachment-local-clipping-color-6.html attachment-local-clipping-color-6-ref.html
|
||||
|
||||
== attachment-local-clipping-image-1.html attachment-local-clipping-image-1-ref.html
|
||||
== attachment-local-clipping-image-2.html attachment-local-clipping-image-1-ref.html # Same ref as the previous test.
|
||||
== attachment-local-clipping-image-3.html attachment-local-clipping-image-3-ref.html
|
||||
== attachment-local-clipping-image-4.html attachment-local-clipping-image-4-ref.html
|
||||
== attachment-local-clipping-image-5.html attachment-local-clipping-image-4-ref.html # Same ref as the previous test.
|
||||
fuzzy(70,330) == attachment-local-clipping-image-6.html attachment-local-clipping-image-6-ref.html
|
||||
|
|
|
@ -325,7 +325,6 @@ CSS_KEY(line-through, line_through)
|
|||
CSS_KEY(linear, linear)
|
||||
CSS_KEY(lining-nums, lining_nums)
|
||||
CSS_KEY(list-item, list_item)
|
||||
CSS_KEY(local, local)
|
||||
CSS_KEY(logical, logical)
|
||||
CSS_KEY(lower-alpha, lower_alpha)
|
||||
CSS_KEY(lower-greek, lower_greek)
|
||||
|
|
|
@ -636,7 +636,6 @@ const int32_t nsCSSProps::kTransformStyleKTable[] = {
|
|||
const int32_t nsCSSProps::kBackgroundAttachmentKTable[] = {
|
||||
eCSSKeyword_fixed, NS_STYLE_BG_ATTACHMENT_FIXED,
|
||||
eCSSKeyword_scroll, NS_STYLE_BG_ATTACHMENT_SCROLL,
|
||||
eCSSKeyword_local, NS_STYLE_BG_ATTACHMENT_LOCAL,
|
||||
eCSSKeyword_UNKNOWN,-1
|
||||
};
|
||||
|
||||
|
|
|
@ -1363,7 +1363,7 @@ var gCSSProperties = {
|
|||
inherited: false,
|
||||
type: CSS_TYPE_LONGHAND,
|
||||
initial_values: [ "scroll" ],
|
||||
other_values: [ "fixed", "local", "scroll,scroll", "fixed, scroll", "scroll, fixed, local, scroll", "fixed, fixed" ],
|
||||
other_values: [ "fixed", "scroll,scroll", "fixed, scroll", "scroll, fixed, scroll", "fixed, fixed" ],
|
||||
invalid_values: []
|
||||
},
|
||||
"background-clip": {
|
||||
|
|
Загрузка…
Ссылка в новой задаче