Bug 423823. Clip overflowing background when tbody is scrollable. r=fantasai,sr=dbaron,a=ss
git-svn-id: svn://10.0.0.236/trunk@253802 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
ce96395fa3
commit
008a922699
10
mozilla/layout/reftests/bugs/423823-1-ref.html
Normal file
10
mozilla/layout/reftests/bugs/423823-1-ref.html
Normal file
@ -0,0 +1,10 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<body>
|
||||
<div style="width:200px; height:100px; background:yellow;"></div>
|
||||
<br>
|
||||
<div style="width:200px; height:100px; background:yellow; overflow:scroll;">
|
||||
<div style="height:200px; width:200px;"></div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
16
mozilla/layout/reftests/bugs/423823-1.html
Normal file
16
mozilla/layout/reftests/bugs/423823-1.html
Normal file
@ -0,0 +1,16 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<body>
|
||||
<table cellspacing="0" cellpadding="0" style="width:200px;">
|
||||
<tbody style="height:100px; overflow:hidden;">
|
||||
<tr style="background:yellow;"><td><div style="height:200px;"></div>
|
||||
</tbody>
|
||||
</table>
|
||||
<br>
|
||||
<table cellspacing="0" cellpadding="0" style="width:200px;">
|
||||
<tbody style="height:100px; overflow:scroll;">
|
||||
<tr style="background:yellow;"><td><div style="height:200px;"></div>
|
||||
</tbody>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
@ -793,6 +793,7 @@ skip-if(MOZ_WIDGET_TOOLKIT=="cocoa") == 413292-1.html 413292-1-ref.html # disabl
|
||||
== 423385-1.html 423385-1-ref.html
|
||||
== 423599-1.html 423599-1-ref.html
|
||||
== 423676-1.html 423676-1-ref.html
|
||||
== 423823-1.html 423823-1-ref.html
|
||||
== 424074-1.xul 424074-1-ref.xul
|
||||
!= 424074-1.xul 424074-1-ref2.xul
|
||||
fails-if(MOZ_WIDGET_TOOLKIT=="gtk2") == 424074-1-ref2.xul 424074-1-ref3.xul
|
||||
|
||||
@ -443,7 +443,8 @@ TableBackgroundPainter::PaintTable(nsTableFrame* aTableFrame,
|
||||
// group may not be a child of the table.
|
||||
mRowGroup.mRect.MoveTo(rg->GetOffsetTo(aTableFrame));
|
||||
if (mRowGroup.mRect.Intersects(mDirtyRect - mRenderPt)) {
|
||||
nsresult rv = PaintRowGroup(rg, rg->IsPseudoStackingContextFromStyle());
|
||||
nsresult rv = PaintRowGroup(rg,
|
||||
rg->IsPseudoStackingContextFromStyle() || rg->IsScrolled());
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
}
|
||||
}
|
||||
|
||||
@ -287,7 +287,7 @@ nsTableRowGroupFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||
if (!IsVisibleInSelection(aBuilder))
|
||||
return NS_OK;
|
||||
|
||||
PRBool isRoot = aBuilder->IsAtRootOfPseudoStackingContext();
|
||||
PRBool isRoot = aBuilder->IsAtRootOfPseudoStackingContext() || IsScrolled();
|
||||
nsDisplayTableItem* item = nsnull;
|
||||
if (isRoot) {
|
||||
// This background is created regardless of whether this frame is
|
||||
|
||||
@ -43,6 +43,7 @@
|
||||
#include "nsILineIterator.h"
|
||||
#include "nsTablePainter.h"
|
||||
#include "nsTArray.h"
|
||||
#include "nsCSSAnonBoxes.h"
|
||||
|
||||
class nsTableFrame;
|
||||
class nsTableRowFrame;
|
||||
@ -360,6 +361,11 @@ public:
|
||||
* decided not to use a cursor or we already have one set up.
|
||||
*/
|
||||
FrameCursorData* SetupRowCursor();
|
||||
|
||||
PRBool IsScrolled() {
|
||||
return GetStyleContext()->GetPseudoType() == nsCSSAnonBoxes::scrolledContent ||
|
||||
GetStyleDisplay()->mOverflowX == NS_STYLE_OVERFLOW_CLIP;
|
||||
}
|
||||
|
||||
protected:
|
||||
nsTableRowGroupFrame(nsStyleContext* aContext);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user