mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-08 10:44:56 +00:00
Bug 909078 - Pretend the inner table frame is top-of-page if the outer table frame is. r=roc
This commit is contained in:
parent
356542a41c
commit
c5e387c60c
@ -0,0 +1,15 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en-US" class="reftest-print">
|
||||
<head>
|
||||
<title>CSS Test: CSS 2.1 page-break-inside:avoid</title>
|
||||
<link rel="author" title="Mats Palmgren" href="https://bugzilla.mozilla.org/show_bug.cgi?id=685012">
|
||||
<meta name="flags" content="paged">
|
||||
<style type="text/css">
|
||||
@page { size:5in 3in; margin:0.5in; }
|
||||
p { height: 1in; width: 1in; margin:0; background-color:blue; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<table cellspacing="0" cellpadding="0"><caption><p>1</p></caption><tr><td><p>1</p><p>2</p></td></tr></table>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,17 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en-US" class="reftest-print">
|
||||
<head>
|
||||
<title>CSS Test: CSS 2.1 page-break-inside:avoid</title>
|
||||
<link rel="author" title="Mats Palmgren" href="https://bugzilla.mozilla.org/show_bug.cgi?id=685012">
|
||||
<link rel="help" href="http://www.w3.org/TR/CSS21/page.html#propdef-page-break-inside">
|
||||
<meta name="flags" content="paged">
|
||||
<style type="text/css">
|
||||
@page { size:5in 3in; margin:0.5in; }
|
||||
p { height: 1in; width: 1in; margin:0; background-color:blue; }
|
||||
.test { page-break-inside:avoid; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<table cellspacing="0" cellpadding="0" class="test"><caption><p>1</p></caption><tr><td><p>1</p><p>2</p></td></tr></table>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,17 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en-US" class="reftest-print">
|
||||
<head>
|
||||
<title>CSS Test: CSS 2.1 page-break-inside:avoid</title>
|
||||
<link rel="author" title="Mats Palmgren" href="https://bugzilla.mozilla.org/show_bug.cgi?id=685012">
|
||||
<meta name="flags" content="paged">
|
||||
<style type="text/css">
|
||||
@page { size:5in 3in; margin:0.5in; }
|
||||
p { height: 1in; width: 1in; margin:0; background-color:blue; }
|
||||
div { page-break-after: always; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div>Text</div>
|
||||
<table cellspacing="0" cellpadding="0"><caption><p>1</p></caption><tr><td><p>1</p><p>2</p></td></tr></table>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,18 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en-US" class="reftest-print">
|
||||
<head>
|
||||
<title>CSS Test: CSS 2.1 page-break-inside:avoid</title>
|
||||
<link rel="author" title="Mats Palmgren" href="https://bugzilla.mozilla.org/show_bug.cgi?id=685012">
|
||||
<link rel="help" href="http://www.w3.org/TR/CSS21/page.html#propdef-page-break-inside">
|
||||
<meta name="flags" content="paged">
|
||||
<style type="text/css">
|
||||
@page { size:5in 3in; margin:0.5in; }
|
||||
p { height: 1in; width: 1in; margin:0; background-color:blue; }
|
||||
.test { page-break-inside:avoid; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div>Text</div>
|
||||
<table cellspacing="0" cellpadding="0" class="test"><caption><p>1</p></caption><tr><td><p>1</p><p>2</p></td></tr></table>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,17 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en-US" class="reftest-print">
|
||||
<head>
|
||||
<title>CSS Test: CSS 2.1 page-break-inside:avoid</title>
|
||||
<link rel="author" title="Mats Palmgren" href="https://bugzilla.mozilla.org/show_bug.cgi?id=685012">
|
||||
<link rel="help" href="http://www.w3.org/TR/CSS21/page.html#propdef-page-break-inside">
|
||||
<meta name="flags" content="paged">
|
||||
<style type="text/css">
|
||||
@page { size:5in 3in; margin:0.5in; }
|
||||
p { height: 1in; width: 1in; margin:0; background-color:blue; }
|
||||
.test { page-break-inside:avoid; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<table cellspacing="0" cellpadding="0"><caption><p>1</p></caption><tbody class="test"><tr><td><p>1</p><p>2</p></td></tr></tbody></table>
|
||||
</body>
|
||||
</html>
|
@ -18,6 +18,9 @@
|
||||
== moz-css21-table-page-break-inside-avoid-3.html moz-css21-table-page-break-inside-avoid-3-ref.html
|
||||
== moz-css21-table-page-break-inside-avoid-4.html moz-css21-table-page-break-inside-avoid-4-ref.html
|
||||
== moz-css21-table-page-break-inside-avoid-5.html moz-css21-table-page-break-inside-avoid-5-ref.html
|
||||
== moz-css21-table-page-break-inside-avoid-6.html moz-css21-table-page-break-inside-avoid-6-ref.html
|
||||
== moz-css21-table-page-break-inside-avoid-7.html moz-css21-table-page-break-inside-avoid-7-ref.html
|
||||
== moz-css21-table-page-break-inside-avoid-8.html moz-css21-table-page-break-inside-avoid-6-ref.html
|
||||
== moz-css21-float-page-break-inside-avoid-1.html moz-css21-table-page-break-inside-avoid-ref.html
|
||||
== moz-css21-float-page-break-inside-avoid-2.html moz-css21-float-page-break-inside-avoid-2-ref.html
|
||||
== moz-css21-float-page-break-inside-avoid-3.html moz-css21-block-page-break-inside-avoid-ref.html
|
||||
|
@ -827,15 +827,12 @@ nsTableOuterFrame::OuterBeginReflowChild(nsPresContext* aPresContext,
|
||||
-1, -1, false);
|
||||
InitChildReflowState(*aPresContext, childRS);
|
||||
|
||||
// see if we need to reset top of page due to a caption
|
||||
if (mCaptionFrames.NotEmpty()) {
|
||||
// see if we need to reset top-of-page due to a caption
|
||||
if (childRS.mFlags.mIsTopOfPage &&
|
||||
mCaptionFrames.FirstChild() == aChildFrame) {
|
||||
uint8_t captionSide = GetCaptionSide();
|
||||
if (((captionSide == NS_STYLE_CAPTION_SIDE_BOTTOM ||
|
||||
captionSide == NS_STYLE_CAPTION_SIDE_BOTTOM_OUTSIDE) &&
|
||||
mCaptionFrames.FirstChild() == aChildFrame) ||
|
||||
((captionSide == NS_STYLE_CAPTION_SIDE_TOP ||
|
||||
captionSide == NS_STYLE_CAPTION_SIDE_TOP_OUTSIDE) &&
|
||||
InnerTableFrame() == aChildFrame)) {
|
||||
if (captionSide == NS_STYLE_CAPTION_SIDE_BOTTOM ||
|
||||
captionSide == NS_STYLE_CAPTION_SIDE_BOTTOM_OUTSIDE) {
|
||||
childRS.mFlags.mIsTopOfPage = false;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user