Backed out 5 changesets (bug 966992, bug 965237) because of a PGO only build failure on Linux, landed on a CLOSED TREE

Backed out changeset f11cad93ceee (bug 966992)
Backed out changeset c84d530c9a51 (bug 965237)
Backed out changeset 740b13866bac (bug 966992)
Backed out changeset 8c3420cc77d8 (bug 966992)
Backed out changeset 7ddfc587edda (bug 966992)
This commit is contained in:
Ehsan Akhgari 2014-02-19 13:28:33 -05:00
parent a32ac98c0e
commit 0c756d118f
31 changed files with 31 additions and 601 deletions

View File

@ -3471,13 +3471,7 @@ PresShell::ScrollFrameRectIntoView(nsIFrame* aFrame,
nsIScrollableFrame* sf = do_QueryFrame(container);
if (sf) {
nsPoint oldPosition = sf->GetScrollPosition();
nsRect targetRect = rect;
if (container->StyleDisplay()->mOverflowClipBox ==
NS_STYLE_OVERFLOW_CLIP_BOX_CONTENT_BOX) {
nsMargin padding = container->GetUsedPadding();
targetRect.Inflate(padding);
}
ScrollToShowRect(container, sf, targetRect - sf->GetScrolledFrame()->GetPosition(),
ScrollToShowRect(container, sf, rect - sf->GetScrolledFrame()->GetPosition(),
aVertical, aHorizontal, aFlags);
nsPoint newPosition = sf->GetScrollPosition();
// If the scroll position increased, that means our content moved up,

View File

@ -1,40 +0,0 @@
<!DOCTYPE HTML>
<html><head>
<meta charset="utf-8">
<title>Testcases for overflow-clip-box:content-box</title>
<style type="text/css">
html,body {
color:black; background-color:white; font:16px monospace; padding:0; margin:7px;
}
.block {
border:1px solid grey; height:50px; width:200px; padding:20px;
overflow:auto; overflow-clip-box:padding-box;
}
.rel { position:relative; }
.mask1 { position:absolute; width:20px; background:white; top:0; bottom:0; right:0; }
mask {
display:block;
position:absolute;
left: -1px;
bottom: -1px;
height: 25px;
width: 80%;
background:black;
}
</style>
</head>
<body>
<div style="position:relative;">
<div contenteditable=true spellcheck=false tabindex=0 id=x class="rel block">XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX<span style="padding-right:20px">X</span><div class=mask1></div></div>
<mask></mask>
</div>
<script>
var x = document.getElementById('x');
x.focus();
window.getSelection().collapse(x,0);
</script>
</body>
</html>

View File

@ -1,36 +0,0 @@
<!DOCTYPE HTML>
<html><head>
<meta charset="utf-8">
<title>Testcases for overflow-clip-box:content-box</title>
<style type="text/css">
html,body {
color:black; background-color:white; font:16px monospace; padding:0; margin:7px;
}
.block {
border:1px solid grey; height:50px; width:200px; padding:20px;
overflow:auto; overflow-clip-box:content-box;
}
mask {
display:block;
position:absolute;
left: -1px;
bottom: -1px;
height: 25px;
width: 80%;
background:black;
}
</style>
</head>
<body>
<div style="position:relative;">
<div contenteditable=true spellcheck=false tabindex=0 id=x class="block">XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</div>
<mask></mask>
</div>
<script>
var x = document.getElementById('x');
x.focus();
window.getSelection().collapse(x,0);
</script>
</body>
</html>

View File

@ -1,42 +0,0 @@
<!DOCTYPE HTML>
<html><head>
<meta charset="utf-8">
<title>Testcases for overflow-clip-box:content-box</title>
<style type="text/css">
html,body {
color:black; background-color:white; font:16px monospace; padding:0; margin:7px;
}
.block {
border:1px solid grey; height:50px; width:200px; padding:20px;
overflow:auto; overflow-clip-box:padding-box;
line-height:1px;
}
.rel { position:relative; }
.mask1 { position:absolute; width:20px; background:white; top:0; bottom:0; right:0; }
.mask2 { position:absolute; height:20px; background:white; top:0; left:40px; right:0; }
mask {
display:block;
position:absolute;
left: -1px;
bottom: -1px;
height: 25px;
width: 80%;
background:black;
}
</style>
</head>
<body>
<div style="position:relative;">
<div contenteditable=true spellcheck=false tabindex=0 id=x class="rel block">&nbsp;&nbsp;&nbsp;&nbsp;XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX<span style="padding-right:20px">X</span><div class=mask2></div><div class=mask1></div></div>
<mask></mask>
</div>
<script>
var x = document.getElementById('x');
x.focus();
window.getSelection().collapse(x,0);
</script>
</body>
</html>

View File

@ -1,38 +0,0 @@
<!DOCTYPE HTML>
<html><head>
<meta charset="utf-8">
<title>Testcases for overflow-clip-box:content-box</title>
<style type="text/css">
html,body {
color:black; background-color:white; font:16px monospace; padding:0; margin:7px;
}
.block {
border:1px solid grey; height:50px; width:200px; padding:20px;
overflow:auto; overflow-clip-box:content-box;
line-height:1px;
}
.rel { position:relative; }
mask {
display:block;
position:absolute;
left: -1px;
bottom: -1px;
height: 25px;
width: 80%;
background:black;
}
</style>
</head>
<body>
<div style="position:relative;">
<div contenteditable=true spellcheck=false tabindex=0 id=x class="block">&nbsp;&nbsp;&nbsp;&nbsp;XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</div>
<mask></mask>
</div>
<script>
var x = document.getElementById('x');
x.focus();
window.getSelection().collapse(x,0);
</script>
</body>
</html>

View File

@ -1,28 +0,0 @@
<!DOCTYPE HTML>
<html><head>
<meta charset="utf-8">
<title>Testcases for overflow-clip-box:content-box</title>
<style type="text/css">
html,body {
color:black; background-color:white; font:16px monospace; padding:0; margin:7px;
}
div {
width: 100px; padding-right:50px; overflow-clip-box:padding-box;
overflow:hidden;
}
.rel { position:relative; }
.mask5 { position:absolute; height:40px; background:white; top:3px; left:0px; width:50px; }
</style>
</head>
<body>
<div contenteditable=true spellcheck=false tabindex=0 id=x class="block"><span style="padding-right:50px">XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</span></div>
<script>
var x = document.getElementById('x');
x.focus();
x.scrollLeft=100000
window.getSelection().collapse(x,1);
</script>
</body>
</html>

View File

@ -1,26 +0,0 @@
<!DOCTYPE HTML>
<html><head>
<meta charset="utf-8">
<title>Testcases for overflow-clip-box:content-box</title>
<style type="text/css">
html,body {
color:black; background-color:white; font:16px monospace; padding:0; margin:7px;
}
div {
width: 100px; padding-right:50px; overflow-clip-box:content-box;
overflow:hidden;
}
</style>
</head>
<body>
<div contenteditable=true spellcheck=false tabindex=0 id=x class="block">XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</div>
<script>
var x = document.getElementById('x');
x.focus();
x.scrollLeft=100000
window.getSelection().collapse(x,1);
</script>
</body>
</html>

View File

@ -144,12 +144,6 @@ support-files =
bug682712-1-ref.html
bug746993-1.html
bug746993-1-ref.html
bug966992-1.html
bug966992-1-ref.html
bug966992-2.html
bug966992-2-ref.html
bug966992-3.html
bug966992-3-ref.html
[test_bug514127.html]
[test_bug518777.html]
[test_bug548545.xhtml]

View File

@ -142,11 +142,6 @@ if (navigator.appVersion.indexOf("Android") == -1 &&
SpecialPowers.Services.appinfo.name != "B2G") {
tests.push([ 'bug512295-1.html' , 'bug512295-1-ref.html' ]);
tests.push([ 'bug512295-2.html' , 'bug512295-2-ref.html' ]);
tests.push(function() {SpecialPowers.setBoolPref("layout.css.overflow-clip-box.enabled", true);});
tests.push([ 'bug966992-1.html' , 'bug966992-1-ref.html' ]);
tests.push([ 'bug966992-2.html' , 'bug966992-2-ref.html' ]);
tests.push([ 'bug966992-3.html' , 'bug966992-3-ref.html' ]);
tests.push(function() {SpecialPowers.setBoolPref("layout.css.overflow-clip-box.enabled", false);});
} else {
is(SpecialPowers.getIntPref("layout.spellcheckDefault"), 0, "Spellcheck should be turned off for this platrom or this if..else check removed");
}

View File

@ -1609,20 +1609,11 @@ ApplyOverflowClipping(nsDisplayListBuilder* aBuilder,
if (!nsFrame::ShouldApplyOverflowClipping(aFrame, aDisp)) {
return;
}
nsRect clipRect;
bool haveRadii = false;
nsRect rect = aFrame->GetPaddingRectRelativeToSelf() +
aBuilder->ToReferenceFrame(aFrame);
nscoord radii[8];
if (aFrame->StyleDisplay()->mOverflowClipBox ==
NS_STYLE_OVERFLOW_CLIP_BOX_PADDING_BOX) {
clipRect = aFrame->GetPaddingRectRelativeToSelf() +
aBuilder->ToReferenceFrame(aFrame);
haveRadii = aFrame->GetPaddingBoxBorderRadii(radii);
} else {
clipRect = aFrame->GetContentRectRelativeToSelf() +
aBuilder->ToReferenceFrame(aFrame);
// XXX border-radius
}
aClipState.ClipContainingBlockDescendantsExtra(clipRect, haveRadii ? radii : nullptr);
bool haveRadii = aFrame->GetPaddingBoxBorderRadii(radii);
aClipState.ClipContainingBlockDescendantsExtra(rect, haveRadii ? radii : nullptr);
}
#ifdef DEBUG

View File

@ -8,7 +8,6 @@
#include "nsGfxScrollFrame.h"
#include "base/compiler_specific.h"
#include "DisplayItemClip.h"
#include "nsCOMPtr.h"
#include "nsPresContext.h"
#include "nsView.h"
@ -402,8 +401,9 @@ nsHTMLScrollFrame::ReflowScrolledFrame(ScrollReflowState* aState,
{
// these could be NS_UNCONSTRAINEDSIZE ... std::min arithmetic should
// be OK
const nsMargin& padding = aState->mReflowState.ComputedPhysicalPadding();
nscoord availWidth = aState->mReflowState.ComputedWidth() + padding.LeftRight();
nscoord paddingLR = aState->mReflowState.ComputedPhysicalPadding().LeftRight();
nscoord availWidth = aState->mReflowState.ComputedWidth() + paddingLR;
nscoord computedHeight = aState->mReflowState.ComputedHeight();
nscoord computedMinHeight = aState->mReflowState.ComputedMinHeight();
@ -417,14 +417,12 @@ nsHTMLScrollFrame::ReflowScrolledFrame(ScrollReflowState* aState,
nsSize hScrollbarPrefSize;
GetScrollbarMetrics(aState->mBoxState, mHelper.mHScrollbarBox,
nullptr, &hScrollbarPrefSize, false);
if (computedHeight != NS_UNCONSTRAINEDSIZE) {
if (computedHeight != NS_UNCONSTRAINEDSIZE)
computedHeight = std::max(0, computedHeight - hScrollbarPrefSize.height);
}
computedMinHeight = std::max(0, computedMinHeight - hScrollbarPrefSize.height);
if (computedMaxHeight != NS_UNCONSTRAINEDSIZE) {
if (computedMaxHeight != NS_UNCONSTRAINEDSIZE)
computedMaxHeight = std::max(0, computedMaxHeight - hScrollbarPrefSize.height);
}
}
if (aAssumeVScroll) {
nsSize vScrollbarPrefSize;
@ -441,7 +439,7 @@ nsHTMLScrollFrame::ReflowScrolledFrame(ScrollReflowState* aState,
nsSize(availWidth, NS_UNCONSTRAINEDSIZE),
-1, -1, nsHTMLReflowState::CALLER_WILL_INIT);
kidReflowState.Init(presContext, -1, -1, nullptr,
&padding);
&aState->mReflowState.ComputedPhysicalPadding());
kidReflowState.mFlags.mAssumingHScrollbar = aAssumeHScroll;
kidReflowState.mFlags.mAssumingVScrollbar = aAssumeVScroll;
kidReflowState.SetComputedHeight(computedHeight);
@ -481,18 +479,6 @@ nsHTMLScrollFrame::ReflowScrolledFrame(ScrollReflowState* aState,
// overflow area doesn't include the frame bounds.
aMetrics->UnionOverflowAreasWithDesiredBounds();
if (MOZ_UNLIKELY(StyleDisplay()->mOverflowClipBox ==
NS_STYLE_OVERFLOW_CLIP_BOX_CONTENT_BOX)) {
nsOverflowAreas childOverflow;
nsLayoutUtils::UnionChildOverflow(mHelper.mScrolledFrame, childOverflow);
nsRect childScrollableOverflow = childOverflow.ScrollableOverflow();
childScrollableOverflow.Inflate(padding);
nsRect contentArea = nsRect(0, 0, availWidth, computedHeight);
if (!contentArea.Contains(childScrollableOverflow)) {
aMetrics->mOverflowAreas.ScrollableOverflow() = childScrollableOverflow;
}
}
aState->mContentsOverflowAreas = aMetrics->mOverflowAreas;
aState->mReflowedContentsWithHScrollbar = aAssumeHScroll;
aState->mReflowedContentsWithVScrollbar = aAssumeVScroll;
@ -2286,70 +2272,6 @@ static bool IsFocused(nsIContent* aContent)
return aContent ? nsContentUtils::IsFocusedContent(aContent) : false;
}
static bool
ShouldBeClippedByFrame(nsIFrame* aClipFrame, nsIFrame* aClippedFrame)
{
return nsLayoutUtils::IsProperAncestorFrame(aClipFrame, aClippedFrame);
}
static void
ClipItemsExceptCaret(nsDisplayList* aList, nsDisplayListBuilder* aBuilder,
nsIFrame* aClipFrame, const DisplayItemClip& aClip)
{
nsDisplayItem* i = aList->GetBottom();
for (; i; i = i->GetAbove()) {
if (!::ShouldBeClippedByFrame(aClipFrame, i->Frame())) {
continue;
}
bool unused;
nsRect bounds = i->GetBounds(aBuilder, &unused);
bool isAffectedByClip = aClip.IsRectAffectedByClip(bounds);
if (isAffectedByClip && nsDisplayItem::TYPE_CARET == i->GetType()) {
// Don't clip the caret if it overflows vertically only, and by half
// its height at most. This is to avoid clipping it when the line-height
// is small.
auto half = bounds.height / 2;
bounds.y += half;
bounds.height -= half;
isAffectedByClip = aClip.IsRectAffectedByClip(bounds);
if (isAffectedByClip) {
// Don't clip the caret if it's just outside on the right side.
nsRect rightSide(bounds.x - 1, bounds.y, 1, bounds.height);
isAffectedByClip = aClip.IsRectAffectedByClip(rightSide);
// Also, avoid clipping it in a zero-height line box (heuristic only).
if (isAffectedByClip) {
isAffectedByClip = i->Frame()->GetRect().height != 0;
}
}
}
if (isAffectedByClip) {
DisplayItemClip newClip;
newClip.IntersectWith(i->GetClip());
newClip.IntersectWith(aClip);
i->SetClip(aBuilder, newClip);
}
nsDisplayList* children = i->GetSameCoordinateSystemChildren();
if (children) {
ClipItemsExceptCaret(children, aBuilder, aClipFrame, aClip);
}
}
}
static void
ClipListsExceptCaret(nsDisplayListCollection* aLists,
nsDisplayListBuilder* aBuilder,
nsIFrame* aClipFrame,
const DisplayItemClip& aClip)
{
::ClipItemsExceptCaret(aLists->BorderBackground(), aBuilder, aClipFrame, aClip);
::ClipItemsExceptCaret(aLists->BlockBorderBackgrounds(), aBuilder, aClipFrame, aClip);
::ClipItemsExceptCaret(aLists->Floats(), aBuilder, aClipFrame, aClip);
::ClipItemsExceptCaret(aLists->PositionedDescendants(), aBuilder, aClipFrame, aClip);
::ClipItemsExceptCaret(aLists->Outlines(), aBuilder, aClipFrame, aClip);
::ClipItemsExceptCaret(aLists->Content(), aBuilder, aClipFrame, aClip);
}
void
ScrollFrameHelper::BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
@ -2408,12 +2330,13 @@ ScrollFrameHelper::BuildDisplayList(nsDisplayListBuilder* aBuilder,
// Overflow clipping can never clip frames outside our subtree, so there
// is no need to worry about whether we are a moving frame that might clip
// non-moving frames.
nsRect dirtyRect;
// Not all our descendants will be clipped by overflow clipping, but all
// the ones that aren't clipped will be out of flow frames that have already
// had dirty rects saved for them by their parent frames calling
// MarkOutOfFlowChildrenForDisplayList, so it's safe to restrict our
// dirty rect here.
nsRect dirtyRect = aDirtyRect.Intersect(mScrollPort);
dirtyRect.IntersectRect(aDirtyRect, mScrollPort);
// Override the dirty rectangle if the displayport has been set.
nsRect displayPort;
@ -2475,25 +2398,6 @@ ScrollFrameHelper::BuildDisplayList(nsDisplayListBuilder* aBuilder,
mOuter->BuildDisplayListForChild(aBuilder, mScrolledFrame, dirtyRect, scrolledContent);
}
if (MOZ_UNLIKELY(mOuter->StyleDisplay()->mOverflowClipBox ==
NS_STYLE_OVERFLOW_CLIP_BOX_CONTENT_BOX)) {
// We only clip if there is *scrollable* overflow, to avoid clipping
// *visual* overflow unnecessarily.
nsRect clipRect = mScrollPort + aBuilder->ToReferenceFrame(mOuter);
nsRect so = mScrolledFrame->GetScrollableOverflowRect();
if (clipRect.width != so.width || clipRect.height != so.height ||
so.x < 0 || so.y < 0) {
// The 'scrolledContent' items are clipped to the padding-box at this point.
// Now clip them again to the content-box, except the nsDisplayCaret item
// which we allow to overflow the content-box in various situations --
// see ::ClipItemsExceptCaret.
clipRect.Deflate(mOuter->GetUsedPadding());
DisplayItemClip clip;
clip.SetTo(clipRect);
::ClipListsExceptCaret(&scrolledContent, aBuilder, mScrolledFrame, clip);
}
}
// Since making new layers is expensive, only use nsDisplayScrollLayer
// if the area is scrollable and we're the content process (unless we're on
// B2G, where we support async scrolling for scrollable elements in the

View File

@ -1,73 +0,0 @@
<!DOCTYPE HTML>
<html class="reftest-wait"><head>
<meta charset="utf-8">
<title>Testcases for overflow-clip-box:content-box</title>
<style type="text/css">
font-face {
font-family: DejaVuSansMono;
src: url(../fonts/DejaVuSansMono.woff),url(DejaVuSansMono.woff);
}
html,body {
color:black; background-color:white; font:16px DejaVuSansMono!important; padding:0; margin:7px;
}
input {
width: 100px; padding:50px; -moz-appearance:none; overflow-clip-box:padding-box;
border: 3px solid black;
}
textarea, #textarea {
width: 160px; height:110px; padding:40px; overflow:scroll; -moz-appearance:none; overflow-clip-box:padding-box;
border: 3px solid black;
}
#textarea { word-break: break-all; font:14px DejaVuSansMono!important; }
p {
position:absolute;
margin:0;
width:70%;
height: 1px;
background:magenta;
}
.rel p { width:200%; }
.block {
border:1px solid grey; height:50px; width:200px; padding:20px;
overflow:auto; overflow-clip-box:padding-box;
}
.rel { position:relative; }
.mask1 { position:absolute; width:20px; background:white; top:0; bottom:0; right:0; }
.mask2 { position:absolute; width:20px; background:white; top:0px; bottom:-15px; right:220px; z-index:99; }
.mask3 { position:absolute; width:20px; background:white; top:0; bottom:0; left:200px; }
.mask4 { position:absolute; height:40px; background:white; top:4px; left:3px; width:210px; z-index:99; }
.mask5 { position:absolute; height:40px; background:white; top:3px; right:3px; width:50px; }
</style>
<script>
function runTest() {
// the timeout is for avoiding differences in scrollbar fading
document.documentElement.removeAttribute("class");
}
</script>
</head>
<body onload="setTimeout(runTest,5000)">
<div class="rel block">XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX<p style="padding-right:20px"></p><div class=mask1></div></div>
<div style="float:right">
<div class="rel block" style="box-sizing:border-box;height:90px"><span style="padding-right:20px">XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</span><div class=mask1></div></div>
</div>
<div class="rel block"><span style="padding-right:20px">XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</span><p></p><div class=mask1></div></div>
<div id="d1" class="rel block"><span style="padding-right:20px">XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</span><span style="position:relative;"><div class=mask2></div><div class=mask1></div></span><p></p></div>
<script>
document.getElementById("d1").scrollLeft = "100000";
</script>
<div class="block"><span style="padding-right:20px"><span style="position:relative;"><div class=mask3></div>XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</span></span><p></p></div>
<span style="position:relative"><input spellcheck=false type="text" placeholder="someveryveryveryveryverylongvalue"><div class=mask5></div></span>
<span style="position:relative"><input spellcheck=false type="text" value="someveryveryveryveryverylongvalue"><div class=mask5></div></span><br>
<span style="position:relative"><input spellcheck=false type="password" value="someveryveryveryveryverylongpassword"><div class=mask5></div></span>
</body>
</html>

View File

@ -1,65 +0,0 @@
<!DOCTYPE HTML>
<html class="reftest-wait"><head>
<meta charset="utf-8">
<title>Testcases for overflow-clip-box:content-box</title>
<style type="text/css">
font-face {
font-family: DejaVuSansMono;
src: url(../fonts/DejaVuSansMono.woff),url(DejaVuSansMono.woff);
}
html,body {
color:black; background-color:white; font:16px DejaVuSansMono!important; padding:0; margin:7px;
}
input {
width: 100px; padding:50px; -moz-appearance:none; overflow-clip-box:content-box;
border: 3px solid black;
}
textarea {
width: 160px; height:110px; padding:40px; overflow:scroll; -moz-appearance:none; overflow-clip-box:content-box;
border: 3px solid black;font:14px DejaVuSansMono!important;
}
p {
position:absolute;
margin:0;
width:70%;
height: 1px;
background:magenta;
}
.rel p { width:200%; }
.block {
border:1px solid grey; height:50px; width:200px; padding:20px;
overflow:auto; overflow-clip-box:content-box;
}
.rel { position:relative; }
</style>
<script>
function runTest() {
// the timeout is for avoiding differences in scrollbar fading
document.documentElement.removeAttribute("class");
}
</script>
</head>
<body onload="setTimeout(runTest,5000)">
<div class="rel block">XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX<p></p></div>
<div style="float:right">
<div class="block" style="-moz-box-sizing:border-box;height:90px">XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</div>
</div>
<div class="rel block">XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX<p></p></div>
<div id="d1" class="rel block">XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX<p></p></div>
<script>
document.getElementById("d1").scrollLeft = "100000";
</script>
<div class="block">XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX<p></p></div>
<input spellcheck=false type="text" placeholder="someveryveryveryveryverylongvalue">
<input spellcheck=false type="text" value="someveryveryveryveryverylongvalue"><br>
<input spellcheck=false type="password" value="someveryveryveryveryverylongpassword">
</body>
</html>

View File

@ -239,7 +239,7 @@ skip-if(B2G) == 234964-1.html 234964-1-ref.html
== 240029-1.html 240029-1-ref.html
== 240470-1.html 240470-1-ref.html
skip-if(B2G) == 240933-1.html 240933-1-ref.html
skip-if(Android||B2G) == 240933-2.html 240933-2-ref.html
skip-if(B2G) == 240933-2.html 240933-2-ref.html
== 243266-1.html 243266-1-ref.html
== 243302-1.html 243302-1-ref.html
skip-if(B2G) == 243519-1.html 243519-1-ref.html
@ -1796,6 +1796,5 @@ fuzzy-if(OSX==10.6,2,30) == 933264-1.html 933264-1-ref.html
== 944291-1.html 944291-1-ref.html
== 957770-1.svg 957770-1-ref.svg
== 960277-1.html 960277-1-ref.html
pref(layout.css.overflow-clip-box.enabled,true) fuzzy(50,10) == 966992-1.html 966992-1-ref.html
skip-if(Android) == 966510-1.html 966510-1-ref.html # scrollable elements other than the root probably won't work well on android until bug 776030 is fixed
skip-if(Android) == 966510-2.html 966510-2-ref.html # same as above

View File

@ -16,7 +16,7 @@
== placeholder-3.html placeholder-overridden-ref.html
== placeholder-4.html placeholder-overridden-ref.html
== placeholder-5.html placeholder-visible-ref.html
fuzzy-if(winWidget,160,6) == placeholder-6.html placeholder-overflow-ref.html
== placeholder-6.html placeholder-overflow-ref.html
skip-if(B2G) == placeholder-6-textarea.html placeholder-overflow-textarea-ref.html
# needs-focus == placeholder-7.html placeholder-focus-ref.html
# needs-focus == placeholder-8.html placeholder-focus-ref.html

View File

@ -28,14 +28,6 @@
height: 300px;
background: black;
}
#cover2 { /* corresponds to the bottom padding inside the textarea */
position: absolute;
left: 0px;
bottom: 0px;
width: 100%;
height: 50px;
background: white;
}
</style>
</head>
<body>
@ -44,7 +36,7 @@
for (var i = 0; i < 1000; ++i) {
ss.push(i);
}
document.write("<div id='t'><div id=cover2></div>" + ss.join(" ") + "</div>");
document.write("<div id='t'>" + ss.join(" ") + "</div>");
</script>
<div id="cover"></div>
</body>

View File

@ -115,7 +115,6 @@ textarea {
-moz-user-select: text;
text-shadow: none;
word-wrap: break-word;
overflow-clip-box: content-box;
}
textarea > scrollbar {
@ -138,7 +137,6 @@ textarea::-moz-placeholder {
ime-mode: inherit;
resize: inherit;
-moz-control-character-visibility: visible;
overflow-clip-box: inherit;
}
textarea > .anonymous-div.wrap,
@ -380,11 +378,6 @@ optgroup:disabled {
background-color: transparent;
}
input[type="text"],
input[type="password"] {
overflow-clip-box: content-box;
}
/* hidden inputs */
input[type="hidden"] {
-moz-appearance: none;
@ -906,7 +899,6 @@ input[type="number"] {
/* Has to revert some properties applied by the generic input rule. */
-moz-binding: none;
width: 149px; /* to match type=text */
overflow-clip-box: content-box;
}
input[type=number]::-moz-number-wrapper {

View File

@ -247,12 +247,6 @@ public:
uint32_t aLineNumber,
uint32_t aLineOffset);
nsCSSProperty LookupEnabledProperty(const nsAString& aProperty) {
return nsCSSProps::LookupProperty(aProperty, mUnsafeRulesEnabled ?
nsCSSProps::eEnabledInUASheets :
nsCSSProps::eEnabled);
}
protected:
class nsAutoParseCompoundProperty;
friend class nsAutoParseCompoundProperty;
@ -1311,11 +1305,7 @@ CSSParserImpl::ParseProperty(const nsCSSProperty aPropID,
*aChanged = false;
// Check for unknown or preffed off properties
if (eCSSProperty_UNKNOWN == aPropID ||
!(nsCSSProps::IsEnabled(aPropID) ||
(mUnsafeRulesEnabled &&
nsCSSProps::PropHasFlags(aPropID,
CSS_PROPERTY_ALWAYS_ENABLED_IN_UA_SHEETS)))) {
if (eCSSProperty_UNKNOWN == aPropID || !nsCSSProps::IsEnabled(aPropID)) {
NS_ConvertASCIItoUTF16 propName(nsCSSProps::GetStringValue(aPropID));
REPORT_UNEXPECTED_P(PEUnknownProperty, propName);
REPORT_UNEXPECTED(PEDeclDropped);
@ -1570,7 +1560,8 @@ CSSParserImpl::EvaluateSupportsDeclaration(const nsAString& aProperty,
nsIURI* aBaseURL,
nsIPrincipal* aDocPrincipal)
{
nsCSSProperty propID = LookupEnabledProperty(aProperty);
nsCSSProperty propID = nsCSSProps::LookupProperty(aProperty,
nsCSSProps::eEnabled);
if (propID == eCSSProperty_UNKNOWN) {
return false;
}
@ -3710,7 +3701,8 @@ CSSParserImpl::ParseSupportsConditionInParensInsideParens(bool& aConditionMet)
return false;
}
nsCSSProperty propID = LookupEnabledProperty(propertyName);
nsCSSProperty propID = nsCSSProps::LookupProperty(propertyName,
nsCSSProps::eEnabled);
if (propID == eCSSProperty_UNKNOWN) {
if (ExpectSymbol(')', true)) {
UngetToken();
@ -5751,7 +5743,7 @@ CSSParserImpl::ParseDeclaration(css::Declaration* aDeclaration,
}
} else {
// Map property name to its ID.
propID = LookupEnabledProperty(propertyName);
propID = nsCSSProps::LookupProperty(propertyName, nsCSSProps::eEnabled);
if (eCSSProperty_UNKNOWN == propID ||
(aContext == eCSSContext_Page &&
!nsCSSProps::PropHasFlags(propID,

View File

@ -2479,18 +2479,6 @@ CSS_PROP_SHORTHAND(
Overflow,
CSS_PROPERTY_PARSE_FUNCTION,
"")
CSS_PROP_DISPLAY(
overflow-clip-box,
overflow_clip_box,
OverflowClipBox,
CSS_PROPERTY_PARSE_VALUE |
CSS_PROPERTY_ALWAYS_ENABLED_IN_UA_SHEETS |
CSS_PROPERTY_APPLIES_TO_PLACEHOLDER,
"layout.css.overflow-clip-box.enabled",
VARIANT_HK,
kOverflowClipBoxKTable,
CSS_PROP_NO_OFFSET,
eStyleAnimType_None)
CSS_PROP_DISPLAY(
overflow-x,
overflow_x,

View File

@ -392,7 +392,7 @@ nsCSSProps::LookupProperty(const nsACString& aProperty,
if (eCSSAliasCount != 0 && res >= eCSSProperty_COUNT) {
static_assert(eCSSProperty_UNKNOWN < eCSSProperty_COUNT,
"assuming eCSSProperty_UNKNOWN doesn't hit this code");
if (IsEnabled(res, aEnabled)) {
if (IsEnabled(res) || aEnabled == eAny) {
res = gAliases[res - eCSSProperty_COUNT];
NS_ABORT_IF_FALSE(0 <= res && res < eCSSProperty_COUNT,
"aliases must not point to other aliases");
@ -400,7 +400,7 @@ nsCSSProps::LookupProperty(const nsACString& aProperty,
res = eCSSProperty_UNKNOWN;
}
}
if (res != eCSSProperty_UNKNOWN && !IsEnabled(res, aEnabled)) {
if (res != eCSSProperty_UNKNOWN && aEnabled == eEnabled && !IsEnabled(res)) {
res = eCSSProperty_UNKNOWN;
}
return res;
@ -424,7 +424,7 @@ nsCSSProps::LookupProperty(const nsAString& aProperty, EnabledState aEnabled)
if (eCSSAliasCount != 0 && res >= eCSSProperty_COUNT) {
static_assert(eCSSProperty_UNKNOWN < eCSSProperty_COUNT,
"assuming eCSSProperty_UNKNOWN doesn't hit this code");
if (IsEnabled(res, aEnabled)) {
if (IsEnabled(res) || aEnabled == eAny) {
res = gAliases[res - eCSSProperty_COUNT];
NS_ABORT_IF_FALSE(0 <= res && res < eCSSProperty_COUNT,
"aliases must not point to other aliases");
@ -432,7 +432,7 @@ nsCSSProps::LookupProperty(const nsAString& aProperty, EnabledState aEnabled)
res = eCSSProperty_UNKNOWN;
}
}
if (res != eCSSProperty_UNKNOWN && !IsEnabled(res, aEnabled)) {
if (res != eCSSProperty_UNKNOWN && aEnabled == eEnabled && !IsEnabled(res)) {
res = eCSSProperty_UNKNOWN;
}
return res;
@ -1422,12 +1422,6 @@ const KTableValue nsCSSProps::kOverflowKTable[] = {
eCSSKeyword_UNKNOWN,-1
};
const KTableValue nsCSSProps::kOverflowClipBoxKTable[] = {
eCSSKeyword_padding_box, NS_STYLE_OVERFLOW_CLIP_BOX_PADDING_BOX,
eCSSKeyword_content_box, NS_STYLE_OVERFLOW_CLIP_BOX_CONTENT_BOX,
eCSSKeyword_UNKNOWN,-1
};
const KTableValue nsCSSProps::kOverflowSubKTable[] = {
eCSSKeyword_auto, NS_STYLE_OVERFLOW_AUTO,
eCSSKeyword_visible, NS_STYLE_OVERFLOW_VISIBLE,

View File

@ -191,10 +191,6 @@ static_assert((CSS_PROPERTY_PARSE_PROPERTY_MASK &
// flushed.
#define CSS_PROPERTY_GETCS_NEEDS_LAYOUT_FLUSH (1<<20)
// This property is always enabled in UA sheets. This is meant to be used
// together with a pref that enables the property for non-UA sheets.
#define CSS_PROPERTY_ALWAYS_ENABLED_IN_UA_SHEETS (1<<21)
/**
* Types of animatable values.
*/
@ -255,7 +251,6 @@ public:
// Given a property string, return the enum value
enum EnabledState {
eEnabled,
eEnabledInUASheets,
eAny
};
// Looks up the property with name aProperty and returns its corresponding
@ -441,13 +436,6 @@ public:
return gPropertyEnabled[aProperty];
}
static bool IsEnabled(nsCSSProperty aProperty, EnabledState aEnabled) {
return IsEnabled(aProperty) ||
(aEnabled == eEnabledInUASheets &&
PropHasFlags(aProperty, CSS_PROPERTY_ALWAYS_ENABLED_IN_UA_SHEETS)) ||
aEnabled == eAny;
}
public:
#define CSSPROPS_FOR_SHORTHAND_SUBPROPERTIES(iter_, prop_) \
@ -549,7 +537,6 @@ public:
static const KTableValue kOutlineColorKTable[];
static const KTableValue kOverflowKTable[];
static const KTableValue kOverflowSubKTable[];
static const KTableValue kOverflowClipBoxKTable[];
static const KTableValue kPageBreakKTable[];
static const KTableValue kPageBreakInsideKTable[];
static const KTableValue kPageMarksKTable[];

View File

@ -3752,16 +3752,6 @@ nsComputedDOMStyle::DoGetOverflowY()
return val;
}
CSSValue*
nsComputedDOMStyle::DoGetOverflowClipBox()
{
nsROCSSPrimitiveValue* val = new nsROCSSPrimitiveValue;
val->SetIdent(
nsCSSProps::ValueToKeywordEnum(StyleDisplay()->mOverflowClipBox,
nsCSSProps::kOverflowClipBoxKTable));
return val;
}
CSSValue*
nsComputedDOMStyle::DoGetResize()
{

View File

@ -398,7 +398,6 @@ private:
mozilla::dom::CSSValue* DoGetOverflow();
mozilla::dom::CSSValue* DoGetOverflowX();
mozilla::dom::CSSValue* DoGetOverflowY();
mozilla::dom::CSSValue* DoGetOverflowClipBox();
mozilla::dom::CSSValue* DoGetResize();
mozilla::dom::CSSValue* DoGetPageBreakAfter();
mozilla::dom::CSSValue* DoGetPageBreakBefore();

View File

@ -162,7 +162,6 @@ COMPUTED_STYLE_PROP(outline_offset, OutlineOffset)
COMPUTED_STYLE_PROP(outline_style, OutlineStyle)
COMPUTED_STYLE_PROP(outline_width, OutlineWidth)
COMPUTED_STYLE_PROP(overflow, Overflow)
COMPUTED_STYLE_PROP(overflow_clip_box, OverflowClipBox)
COMPUTED_STYLE_PROP(overflow_x, OverflowX)
COMPUTED_STYLE_PROP(overflow_y, OverflowY)
//// COMPUTED_STYLE_PROP(padding, Padding)

View File

@ -5304,12 +5304,6 @@ nsRuleNode::ComputeDisplayData(void* aStartStruct,
display->mOverflowY = NS_STYLE_OVERFLOW_AUTO;
}
SetDiscrete(*aRuleData->ValueForOverflowClipBox(), display->mOverflowClipBox,
canStoreInRuleTree,
SETDSC_ENUMERATED | SETDSC_UNSET_INITIAL,
parentDisplay->mOverflowClipBox,
NS_STYLE_OVERFLOW_CLIP_BOX_PADDING_BOX, 0, 0, 0, 0);
SetDiscrete(*aRuleData->ValueForResize(), display->mResize, canStoreInRuleTree,
SETDSC_ENUMERATED | SETDSC_UNSET_INITIAL,
parentDisplay->mResize,

View File

@ -569,14 +569,14 @@ static inline mozilla::css::Side operator++(mozilla::css::Side& side, int) {
#define NS_STYLE_WIDTH_FIT_CONTENT 2
#define NS_STYLE_WIDTH_AVAILABLE 3
// See nsStyleDisplay.mPosition
// See nsStylePosition.mPosition
#define NS_STYLE_POSITION_STATIC 0
#define NS_STYLE_POSITION_RELATIVE 1
#define NS_STYLE_POSITION_ABSOLUTE 2
#define NS_STYLE_POSITION_FIXED 3
#define NS_STYLE_POSITION_STICKY 4
// See nsStyleDisplay.mClip
// See nsStylePosition.mClip
#define NS_STYLE_CLIP_AUTO 0x00
#define NS_STYLE_CLIP_RECT 0x01
#define NS_STYLE_CLIP_TYPE_MASK 0x0F
@ -597,7 +597,7 @@ static inline mozilla::css::Side operator++(mozilla::css::Side& side, int) {
#define NS_STYLE_FRAME_SCROLL 7
#define NS_STYLE_FRAME_NOSCROLL 8
// See nsStyleDisplay.mOverflow
// See nsStylePosition.mOverflow
#define NS_STYLE_OVERFLOW_VISIBLE 0
#define NS_STYLE_OVERFLOW_HIDDEN 1
#define NS_STYLE_OVERFLOW_SCROLL 2
@ -606,10 +606,6 @@ static inline mozilla::css::Side operator++(mozilla::css::Side& side, int) {
#define NS_STYLE_OVERFLOW_SCROLLBARS_HORIZONTAL 5
#define NS_STYLE_OVERFLOW_SCROLLBARS_VERTICAL 6
// See nsStyleDisplay.mOverflowClipBox
#define NS_STYLE_OVERFLOW_CLIP_BOX_PADDING_BOX 0
#define NS_STYLE_OVERFLOW_CLIP_BOX_CONTENT_BOX 1
// See nsStyleList
#define NS_STYLE_LIST_STYLE_NONE 0
#define NS_STYLE_LIST_STYLE_DISC 1

View File

@ -2278,7 +2278,6 @@ nsStyleDisplay::nsStyleDisplay()
mBreakAfter = false;
mOverflowX = NS_STYLE_OVERFLOW_VISIBLE;
mOverflowY = NS_STYLE_OVERFLOW_VISIBLE;
mOverflowClipBox = NS_STYLE_OVERFLOW_CLIP_BOX_PADDING_BOX;
mResize = NS_STYLE_RESIZE_NONE;
mClipFlags = NS_STYLE_CLIP_AUTO;
mClip.SetRect(0,0,0,0);
@ -2335,7 +2334,6 @@ nsStyleDisplay::nsStyleDisplay(const nsStyleDisplay& aSource)
, mBreakAfter(aSource.mBreakAfter)
, mOverflowX(aSource.mOverflowX)
, mOverflowY(aSource.mOverflowY)
, mOverflowClipBox(aSource.mOverflowClipBox)
, mResize(aSource.mResize)
, mClipFlags(aSource.mClipFlags)
, mOrient(aSource.mOrient)
@ -2414,7 +2412,6 @@ nsChangeHint nsStyleDisplay::CalcDifference(const nsStyleDisplay& aOther) const
|| mBreakAfter != aOther.mBreakAfter
|| mAppearance != aOther.mAppearance
|| mOrient != aOther.mOrient
|| mOverflowClipBox != aOther.mOverflowClipBox
|| mClipFlags != aOther.mClipFlags || !mClip.IsEqualInterior(aOther.mClip))
NS_UpdateHint(hint, NS_CombineHint(nsChangeHint_AllReflowHints,
nsChangeHint_RepaintFrame));

View File

@ -1797,7 +1797,6 @@ struct nsStyleDisplay {
bool mBreakAfter; // [reset]
uint8_t mOverflowX; // [reset] see nsStyleConsts.h
uint8_t mOverflowY; // [reset] see nsStyleConsts.h
uint8_t mOverflowClipBox; // [reset] see nsStyleConsts.h
uint8_t mResize; // [reset] see nsStyleConsts.h
uint8_t mClipFlags; // [reset] see nsStyleConsts.h
uint8_t mOrient; // [reset] see nsStyleConsts.h

View File

@ -4915,17 +4915,6 @@ if (SpecialPowers.getBoolPref("layout.css.will-change.enabled")) {
};
}
if (SpecialPowers.getBoolPref("layout.css.overflow-clip-box.enabled")) {
gCSSProperties["overflow-clip-box"] = {
domProp: "overflowClipBox",
inherited: false,
type: CSS_TYPE_LONGHAND,
initial_values: [ "padding-box" ],
other_values: [ "content-box" ],
invalid_values: [ "none", "auto", "border-box", "0" ]
};
}
if (SpecialPowers.getBoolPref("layout.css.unset-value.enabled")) {
gCSSProperties["animation-direction"].invalid_values.push("normal, unset");
gCSSProperties["animation-name"].invalid_values.push("bounce, unset", "unset, bounce");

View File

@ -103,7 +103,6 @@
position: static !important;
unicode-bidi: inherit;
text-overflow: inherit;
overflow-clip-box: inherit;
}
*|*::-moz-anonymous-block, *|*::-moz-anonymous-positioned-block {
@ -116,7 +115,6 @@
opacity: inherit;
text-decoration: inherit;
-moz-box-ordinal-group: inherit !important;
overflow-clip-box: inherit;
}
*|*::-moz-xul-anonymous-block {
@ -125,7 +123,6 @@
float: none ! important;
-moz-box-ordinal-group: inherit !important;
text-overflow: inherit;
overflow-clip-box: inherit;
}
*|*::-moz-scrolled-content, *|*::-moz-scrolled-canvas,
@ -154,7 +151,6 @@
frame tree. */
position: static !important;
float: none !important;
overflow-clip-box: inherit;
}
*|*::-moz-viewport, *|*::-moz-viewport-scroll, *|*::-moz-canvas, *|*::-moz-scrolled-canvas {

View File

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