<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[195892] trunk</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/195892">195892</a></dd>
<dt>Author</dt> <dd>hyatt@apple.com</dd>
<dt>Date</dt> <dd>2016-01-30 07:28:48 -0800 (Sat, 30 Jan 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>Support break-after, break-before and break-inside.
https://bugs.webkit.org/show_bug.cgi?id=148814

Reviewed by Dean Jackson.

Source/WebCore:

New tests added in printing/, fast/multicol/, and fast/regions.

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::convertToPageBreak):
(WebCore::convertToColumnBreak):
(WebCore::convertToRegionBreak):
For backwards compatibility, keep support for all the old properties in
computed style. This means we have to convert the break-* property values
into keywords that make sense for the legacy properties. This mainly
involves mapping &quot;page&quot;, &quot;column&quot;, &quot;region&quot; to &quot;always&quot; (similar rule for
the avoid-* versions as well).

(WebCore::ComputedStyleExtractor::propertyValue):
Add support for the three new break-* properties.

* css/CSSParser.cpp:
(WebCore::isValidKeywordPropertyAndValue):
(WebCore::isKeywordPropertyID):
(WebCore::CSSParser::parseValue):
Add support for the new break properties.

* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::operator BreakBetween):
(WebCore::CSSPrimitiveValue::operator BreakInside):
Add converters for the new BreakBetween and BreakInside enums. Remove
the EPageBreak enum, since it is no longer used.

* css/CSSPropertyNames.in:
* css/CSSValueKeywords.in:
Add the new properties and the new values supported by the properties
to the keywords lists.

* css/StyleBuilderConverter.h:
(WebCore::StyleBuilderConverter::convertFontSynthesis):
(WebCore::StyleBuilderConverter::convertPageBreakBetween):
(WebCore::StyleBuilderConverter::convertPageBreakInside):
(WebCore::StyleBuilderConverter::convertColumnBreakBetween):
(WebCore::StyleBuilderConverter::convertColumnBreakInside):
(WebCore::StyleBuilderConverter::convertRegionBreakBetween):
(WebCore::StyleBuilderConverter::convertRegionBreakInside):
In order to map the legacy properties into the new break-* values
we have custom converter functions.

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::paintChild):
(WebCore::RenderBlock::childBoxIsUnsplittableForFragmentation):
(WebCore::RenderBlock::computeRegionRangeForBoxChild):
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::applyBeforeBreak):
(WebCore::RenderBlockFlow::applyAfterBreak):
Patch the block code to check the correct new break-* constants. For
avoidance, this means checking both the general avoid value and the
specific value (e.g., avoid-page). In place of &quot;always&quot;, we check
the specific value (e.g., column) and then for page specifically, we
also treat &quot;left&quot;, &quot;right&quot;, &quot;recto&quot; and &quot;verso&quot; as &quot;always break&quot; for now.

* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::changeRequiresLayout):
Make sure changes to the break properties trigger relayout.

* rendering/style/RenderStyle.h:
Add getters and setters for the break-* properties and remove all
occurrences of the legacy page, column and region values from the RenderStyle.

* rendering/style/RenderStyleConstants.cpp:
(WebCore::alwaysPageBreak):
We have a helper function here for mapping several constant values to &quot;page&quot;.

* rendering/style/RenderStyleConstants.h:
Definitions of the new BreakBetween and BreakInside enums.

* rendering/style/StyleMultiColData.cpp:
(WebCore::StyleMultiColData::StyleMultiColData):
(WebCore::StyleMultiColData::operator==):
* rendering/style/StyleMultiColData.h:
Remove the column-specific break data.

* rendering/style/StyleRareNonInheritedData.cpp:
(WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
(WebCore::StyleRareNonInheritedData::operator==):
* rendering/style/StyleRareNonInheritedData.h:
Remove the region-specific break data and replace it with generic break
data that is now used by all three pagination models.

LayoutTests:

* TestExpectations:
* fast/multicol/standardized-break-properties-expected.txt: Added.
* fast/multicol/standardized-break-properties.html: Added.
* fast/multicol/vertical-lr/standardized-break-properties-expected.txt: Added.
* fast/multicol/vertical-lr/standardized-break-properties.html: Added.
* fast/multicol/vertical-rl/standardized-break-properties-expected.txt: Added.
* fast/multicol/vertical-rl/standardized-break-properties.html: Added.
* fast/regions/text-break-properties-expected.txt: Added.
* fast/regions/text-break-properties.html: Added.
* printing/allowed-breaks-expected.txt: Added.
* printing/allowed-breaks.html: Added.
* printing/break-after-avoid-expected.txt: Added.
* printing/break-after-avoid-page-expected.txt: Added.
* printing/break-after-avoid-page.html: Added.
* printing/break-after-avoid.html: Added.
* printing/break-always-expected.txt: Added.
* printing/break-always.html: Added.
* printing/break-avoid-expected.txt: Added.
* printing/break-avoid-page-expected.txt: Added.
* printing/break-avoid-page.html: Added.
* printing/break-avoid.html: Added.
* printing/break-display-none-expected.txt: Added.
* printing/break-display-none.html: Added.
* printing/break-inside-avoid-expected.txt: Added.
* printing/break-inside-avoid-page-expected.txt: Added.
* printing/break-inside-avoid-page.html: Added.
* printing/break-inside-avoid.html: Added.
* printing/script-tests/allowed-breaks.js: Added.
(test):
* printing/script-tests/break-after-avoid-page.js: Added.
(test):
* printing/script-tests/break-after-avoid.js: Added.
(test):
* printing/script-tests/break-always.js: Added.
(test):
* printing/script-tests/break-avoid-page.js: Added.
(test):
* printing/script-tests/break-avoid.js: Added.
(test):
* printing/script-tests/break-display-none.js: Added.
(test):
* printing/script-tests/break-inside-avoid-page.js: Added.
(test):
* printing/script-tests/break-inside-avoid.js: Added.
(test):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsTestExpectations">trunk/LayoutTests/TestExpectations</a></li>
<li><a href="#trunkLayoutTestsfastcssstyleenumeratepropertieshtml">trunk/LayoutTests/fast/css/style-enumerate-properties.html</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorecssCSSComputedStyleDeclarationcpp">trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSParsercpp">trunk/Source/WebCore/css/CSSParser.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSPrimitiveValueMappingsh">trunk/Source/WebCore/css/CSSPrimitiveValueMappings.h</a></li>
<li><a href="#trunkSourceWebCorecssCSSPropertyNamesin">trunk/Source/WebCore/css/CSSPropertyNames.in</a></li>
<li><a href="#trunkSourceWebCorecssCSSValueKeywordsin">trunk/Source/WebCore/css/CSSValueKeywords.in</a></li>
<li><a href="#trunkSourceWebCorecssStyleBuilderConverterh">trunk/Source/WebCore/css/StyleBuilderConverter.h</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderBlockcpp">trunk/Source/WebCore/rendering/RenderBlock.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderBlockFlowcpp">trunk/Source/WebCore/rendering/RenderBlockFlow.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingstyleRenderStylecpp">trunk/Source/WebCore/rendering/style/RenderStyle.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingstyleRenderStyleh">trunk/Source/WebCore/rendering/style/RenderStyle.h</a></li>
<li><a href="#trunkSourceWebCorerenderingstyleRenderStyleConstantscpp">trunk/Source/WebCore/rendering/style/RenderStyleConstants.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingstyleRenderStyleConstantsh">trunk/Source/WebCore/rendering/style/RenderStyleConstants.h</a></li>
<li><a href="#trunkSourceWebCorerenderingstyleStyleMultiColDatacpp">trunk/Source/WebCore/rendering/style/StyleMultiColData.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingstyleStyleMultiColDatah">trunk/Source/WebCore/rendering/style/StyleMultiColData.h</a></li>
<li><a href="#trunkSourceWebCorerenderingstyleStyleRareNonInheritedDatacpp">trunk/Source/WebCore/rendering/style/StyleRareNonInheritedData.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingstyleStyleRareNonInheritedDatah">trunk/Source/WebCore/rendering/style/StyleRareNonInheritedData.h</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsfastmulticolstandardizedbreakpropertiesexpectedtxt">trunk/LayoutTests/fast/multicol/standardized-break-properties-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastmulticolstandardizedbreakpropertieshtml">trunk/LayoutTests/fast/multicol/standardized-break-properties.html</a></li>
<li><a href="#trunkLayoutTestsfastmulticolverticallrstandardizedbreakpropertiesexpectedtxt">trunk/LayoutTests/fast/multicol/vertical-lr/standardized-break-properties-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastmulticolverticallrstandardizedbreakpropertieshtml">trunk/LayoutTests/fast/multicol/vertical-lr/standardized-break-properties.html</a></li>
<li><a href="#trunkLayoutTestsfastmulticolverticalrlstandardizedbreakpropertiesexpectedtxt">trunk/LayoutTests/fast/multicol/vertical-rl/standardized-break-properties-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastmulticolverticalrlstandardizedbreakpropertieshtml">trunk/LayoutTests/fast/multicol/vertical-rl/standardized-break-properties.html</a></li>
<li><a href="#trunkLayoutTestsfastregionstextbreakpropertiesexpectedtxt">trunk/LayoutTests/fast/regions/text-break-properties-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastregionstextbreakpropertieshtml">trunk/LayoutTests/fast/regions/text-break-properties.html</a></li>
<li><a href="#trunkLayoutTestsprintingallowedbreaksexpectedtxt">trunk/LayoutTests/printing/allowed-breaks-expected.txt</a></li>
<li><a href="#trunkLayoutTestsprintingallowedbreakshtml">trunk/LayoutTests/printing/allowed-breaks.html</a></li>
<li><a href="#trunkLayoutTestsprintingbreakafteravoidexpectedtxt">trunk/LayoutTests/printing/break-after-avoid-expected.txt</a></li>
<li><a href="#trunkLayoutTestsprintingbreakafteravoidpageexpectedtxt">trunk/LayoutTests/printing/break-after-avoid-page-expected.txt</a></li>
<li><a href="#trunkLayoutTestsprintingbreakafteravoidpagehtml">trunk/LayoutTests/printing/break-after-avoid-page.html</a></li>
<li><a href="#trunkLayoutTestsprintingbreakafteravoidhtml">trunk/LayoutTests/printing/break-after-avoid.html</a></li>
<li><a href="#trunkLayoutTestsprintingbreakalwaysexpectedtxt">trunk/LayoutTests/printing/break-always-expected.txt</a></li>
<li><a href="#trunkLayoutTestsprintingbreakalwayshtml">trunk/LayoutTests/printing/break-always.html</a></li>
<li><a href="#trunkLayoutTestsprintingbreakavoidexpectedtxt">trunk/LayoutTests/printing/break-avoid-expected.txt</a></li>
<li><a href="#trunkLayoutTestsprintingbreakavoidpageexpectedtxt">trunk/LayoutTests/printing/break-avoid-page-expected.txt</a></li>
<li><a href="#trunkLayoutTestsprintingbreakavoidpagehtml">trunk/LayoutTests/printing/break-avoid-page.html</a></li>
<li><a href="#trunkLayoutTestsprintingbreakavoidhtml">trunk/LayoutTests/printing/break-avoid.html</a></li>
<li><a href="#trunkLayoutTestsprintingbreakdisplaynoneexpectedtxt">trunk/LayoutTests/printing/break-display-none-expected.txt</a></li>
<li><a href="#trunkLayoutTestsprintingbreakdisplaynonehtml">trunk/LayoutTests/printing/break-display-none.html</a></li>
<li><a href="#trunkLayoutTestsprintingbreakinsideavoidexpectedtxt">trunk/LayoutTests/printing/break-inside-avoid-expected.txt</a></li>
<li><a href="#trunkLayoutTestsprintingbreakinsideavoidpageexpectedtxt">trunk/LayoutTests/printing/break-inside-avoid-page-expected.txt</a></li>
<li><a href="#trunkLayoutTestsprintingbreakinsideavoidpagehtml">trunk/LayoutTests/printing/break-inside-avoid-page.html</a></li>
<li><a href="#trunkLayoutTestsprintingbreakinsideavoidhtml">trunk/LayoutTests/printing/break-inside-avoid.html</a></li>
<li><a href="#trunkLayoutTestsprintingscripttestsallowedbreaksjs">trunk/LayoutTests/printing/script-tests/allowed-breaks.js</a></li>
<li><a href="#trunkLayoutTestsprintingscripttestsbreakafteravoidpagejs">trunk/LayoutTests/printing/script-tests/break-after-avoid-page.js</a></li>
<li><a href="#trunkLayoutTestsprintingscripttestsbreakafteravoidjs">trunk/LayoutTests/printing/script-tests/break-after-avoid.js</a></li>
<li><a href="#trunkLayoutTestsprintingscripttestsbreakalwaysjs">trunk/LayoutTests/printing/script-tests/break-always.js</a></li>
<li><a href="#trunkLayoutTestsprintingscripttestsbreakavoidpagejs">trunk/LayoutTests/printing/script-tests/break-avoid-page.js</a></li>
<li><a href="#trunkLayoutTestsprintingscripttestsbreakavoidjs">trunk/LayoutTests/printing/script-tests/break-avoid.js</a></li>
<li><a href="#trunkLayoutTestsprintingscripttestsbreakdisplaynonejs">trunk/LayoutTests/printing/script-tests/break-display-none.js</a></li>
<li><a href="#trunkLayoutTestsprintingscripttestsbreakinsideavoidpagejs">trunk/LayoutTests/printing/script-tests/break-inside-avoid-page.js</a></li>
<li><a href="#trunkLayoutTestsprintingscripttestsbreakinsideavoidjs">trunk/LayoutTests/printing/script-tests/break-inside-avoid.js</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (195891 => 195892)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2016-01-30 12:53:59 UTC (rev 195891)
+++ trunk/LayoutTests/ChangeLog        2016-01-30 15:28:48 UTC (rev 195892)
</span><span class="lines">@@ -1,3 +1,56 @@
</span><ins>+2016-01-30  Dave Hyatt  &lt;hyatt@apple.com&gt;
+
+        Support break-after, break-before and break-inside.
+        https://bugs.webkit.org/show_bug.cgi?id=148814
+
+        Reviewed by Dean Jackson.
+
+        * TestExpectations:
+        * fast/multicol/standardized-break-properties-expected.txt: Added.
+        * fast/multicol/standardized-break-properties.html: Added.
+        * fast/multicol/vertical-lr/standardized-break-properties-expected.txt: Added.
+        * fast/multicol/vertical-lr/standardized-break-properties.html: Added.
+        * fast/multicol/vertical-rl/standardized-break-properties-expected.txt: Added.
+        * fast/multicol/vertical-rl/standardized-break-properties.html: Added.
+        * fast/regions/text-break-properties-expected.txt: Added.
+        * fast/regions/text-break-properties.html: Added.
+        * printing/allowed-breaks-expected.txt: Added.
+        * printing/allowed-breaks.html: Added.
+        * printing/break-after-avoid-expected.txt: Added.
+        * printing/break-after-avoid-page-expected.txt: Added.
+        * printing/break-after-avoid-page.html: Added.
+        * printing/break-after-avoid.html: Added.
+        * printing/break-always-expected.txt: Added.
+        * printing/break-always.html: Added.
+        * printing/break-avoid-expected.txt: Added.
+        * printing/break-avoid-page-expected.txt: Added.
+        * printing/break-avoid-page.html: Added.
+        * printing/break-avoid.html: Added.
+        * printing/break-display-none-expected.txt: Added.
+        * printing/break-display-none.html: Added.
+        * printing/break-inside-avoid-expected.txt: Added.
+        * printing/break-inside-avoid-page-expected.txt: Added.
+        * printing/break-inside-avoid-page.html: Added.
+        * printing/break-inside-avoid.html: Added.
+        * printing/script-tests/allowed-breaks.js: Added.
+        (test):
+        * printing/script-tests/break-after-avoid-page.js: Added.
+        (test):
+        * printing/script-tests/break-after-avoid.js: Added.
+        (test):
+        * printing/script-tests/break-always.js: Added.
+        (test):
+        * printing/script-tests/break-avoid-page.js: Added.
+        (test):
+        * printing/script-tests/break-avoid.js: Added.
+        (test):
+        * printing/script-tests/break-display-none.js: Added.
+        (test):
+        * printing/script-tests/break-inside-avoid-page.js: Added.
+        (test):
+        * printing/script-tests/break-inside-avoid.js: Added.
+        (test):
+
</ins><span class="cx"> 2016-01-29  Michael Catanzaro  &lt;mcatanzaro@igalia.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [GTK] Mark two CSS multicolumn tests as failing
</span></span></pre></div>
<a id="trunkLayoutTestsTestExpectations"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/TestExpectations (195891 => 195892)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/TestExpectations        2016-01-30 12:53:59 UTC (rev 195891)
+++ trunk/LayoutTests/TestExpectations        2016-01-30 15:28:48 UTC (rev 195892)
</span><span class="lines">@@ -712,7 +712,6 @@
</span><span class="cx"> webkit.org/b/148818 imported/w3c/css/css-multicol-1/multicol-nested-column-rule-001.xht [ ImageOnlyFailure ] # only scrollbar
</span><span class="cx"> 
</span><span class="cx"> webkit.org/b/148812 imported/w3c/css/css-multicol-1/multicol-width-small-001.xht [ ImageOnlyFailure ]
</span><del>-webkit.org/b/148814 imported/w3c/css/css-multicol-1/multicol-break-000.xht [ ImageOnlyFailure ]
</del><span class="cx"> webkit.org/b/148814 imported/w3c/css/css-multicol-1/multicol-break-001.xht [ ImageOnlyFailure ]
</span><span class="cx"> webkit.org/b/148816 imported/w3c/css/css-multicol-1/multicol-rule-004.xht [ ImageOnlyFailure ]
</span><span class="cx"> webkit.org/b/148823 imported/w3c/css/css-multicol-1/multicol-span-all-margin-nested-003.xht [ ImageOnlyFailure ]
</span></span></pre></div>
<a id="trunkLayoutTestsfastcssstyleenumeratepropertieshtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/css/style-enumerate-properties.html (195891 => 195892)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css/style-enumerate-properties.html        2016-01-30 12:53:59 UTC (rev 195891)
+++ trunk/LayoutTests/fast/css/style-enumerate-properties.html        2016-01-30 15:28:48 UTC (rev 195892)
</span><span class="lines">@@ -40,7 +40,7 @@
</span><span class="cx">                 testFailed(&quot;Invalid CSS-mapped property order: '&quot; + p + &quot;' after '&quot; + previous + &quot;'&quot;);
</span><span class="cx">                 break;
</span><span class="cx">             }
</span><del>-            if (++cssPropertyCount &lt;= 100)
</del><ins>+            if (++cssPropertyCount &lt;= 103)
</ins><span class="cx">                 previous = p;
</span><span class="cx">             else {
</span><span class="cx">                 if (seenFilter)
</span></span></pre></div>
<a id="trunkLayoutTestsfastmulticolstandardizedbreakpropertiesexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/multicol/standardized-break-properties-expected.txt (0 => 195892)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/multicol/standardized-break-properties-expected.txt                                (rev 0)
+++ trunk/LayoutTests/fast/multicol/standardized-break-properties-expected.txt        2016-01-30 15:28:48 UTC (rev 195892)
</span><span class="lines">@@ -0,0 +1,4 @@
</span><ins>+PASS: 'break-before' is at (220, 8)
+PASS: 'after-break' is at (431, 8)
+PASS: 'no-break' is at (537, 8)
+
</ins></span></pre></div>
<a id="trunkLayoutTestsfastmulticolstandardizedbreakpropertieshtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/multicol/standardized-break-properties.html (0 => 195892)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/multicol/standardized-break-properties.html                                (rev 0)
+++ trunk/LayoutTests/fast/multicol/standardized-break-properties.html        2016-01-30 15:28:48 UTC (rev 195892)
</span><span class="lines">@@ -0,0 +1,40 @@
</span><ins>+&lt;style&gt;
+    div.box { -webkit-box-sizing: border; border: solid blue; }
+    div.shorter { height: 54px; }
+    div.taller { height: 72px; }
+&lt;/style&gt;
+&lt;div style=&quot;height: 100px; width: 630; -webkit-columns:6; -webkit-column-gap:5px; columns:6; column-gap:5px;&quot;&gt;
+    &lt;div class=&quot;taller box&quot;&gt;&lt;/div&gt;
+    &lt;div class=&quot;taller box&quot;&gt;&lt;/div&gt;
+    &lt;div id=&quot;break-before&quot; class=&quot;shorter box&quot; style=&quot;break-before: column;&quot;&gt;&lt;/div&gt;
+    &lt;div class=&quot;shorter box&quot; style=&quot;break-after: column;&quot;&gt;&lt;/div&gt;
+    &lt;div id=&quot;after-break&quot; class=&quot;shorter box&quot;&gt;&lt;/div&gt;
+    &lt;div id=&quot;no-break&quot; class=&quot;shorter box&quot; style=&quot;break-inside: avoid-column;&quot;&gt;&lt;/div&gt;
+    &lt;div id=&quot;subPixelTest&quot; style=&quot;width:10.5px&quot;&gt;&lt;/div&gt;
+&lt;/div&gt;
+&lt;pre id=&quot;console&quot;&gt;&lt;/pre&gt;
+&lt;script&gt;
+    if (window.testRunner)
+        testRunner.dumpAsText();
+
+    function log(message)
+    {
+        document.getElementById(&quot;console&quot;).appendChild(document.createTextNode(message + &quot;\n&quot;));
+    }
+
+    function testBoxPosition(id, expectedLeft, expectedTop)
+    {
+        var rect = document.getElementById(id).getBoundingClientRect();
+        if (Math.round(rect.left) === expectedLeft &amp;&amp; Math.round(rect.top) === expectedTop)
+            log(&quot;PASS: '&quot; + id + &quot;' is at (&quot; + expectedLeft + &quot;, &quot; + expectedTop + &quot;)&quot;);
+        else
+            log(&quot;FAIL: '&quot; + id + &quot;' is at (&quot; + Math.round(rect.left) + &quot;, &quot; + Math.round(rect.top) + &quot;) instead of (&quot; + expectedLeft + &quot; ,&quot; + expectedTop + &quot;)&quot;);
+    }
+
+    var rect = document.getElementById('subPixelTest').getBoundingClientRect();
+    var hasSubpixelSupport = Math.round(rect.right) != rect.right;
+
+    testBoxPosition(&quot;break-before&quot;, hasSubpixelSupport ? 220 : 218, 8);
+    testBoxPosition(&quot;after-break&quot;, hasSubpixelSupport ? 431 : 428, 8);
+    testBoxPosition(&quot;no-break&quot;, hasSubpixelSupport ? 537 : 533, 8);
+&lt;/script&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsfastmulticolverticallrstandardizedbreakpropertiesexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/multicol/vertical-lr/standardized-break-properties-expected.txt (0 => 195892)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/multicol/vertical-lr/standardized-break-properties-expected.txt                                (rev 0)
+++ trunk/LayoutTests/fast/multicol/vertical-lr/standardized-break-properties-expected.txt        2016-01-30 15:28:48 UTC (rev 195892)
</span><span class="lines">@@ -0,0 +1,3 @@
</span><ins>+PASS: 'break-before' is at (8, 220)
+PASS: 'after-break' is at (8, 431)
+
</ins></span></pre></div>
<a id="trunkLayoutTestsfastmulticolverticallrstandardizedbreakpropertieshtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/multicol/vertical-lr/standardized-break-properties.html (0 => 195892)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/multicol/vertical-lr/standardized-break-properties.html                                (rev 0)
+++ trunk/LayoutTests/fast/multicol/vertical-lr/standardized-break-properties.html        2016-01-30 15:28:48 UTC (rev 195892)
</span><span class="lines">@@ -0,0 +1,40 @@
</span><ins>+&lt;style&gt;
+    div.box { -webkit-box-sizing: border; border: solid blue; }
+    div.shorter { width: 54px; }
+    div.taller { width: 72px; }
+&lt;/style&gt;
+&lt;body style=&quot;-webkit-writing-mode:vertical-lr&quot;&gt;
+&lt;div style=&quot;width:100px; height:630px; -webkit-columns:6; -webkit-column-gap:5px; -webkit-column-fill:auto; columns:6; column-gap:5px; column-fill:auto;&quot;&gt;
+    &lt;div class=&quot;taller box&quot;&gt;&lt;/div&gt;
+    &lt;div class=&quot;taller box&quot;&gt;&lt;/div&gt;
+    &lt;div id=&quot;break-before&quot; class=&quot;shorter box&quot; style=&quot;break-before: column;&quot;&gt;&lt;/div&gt;
+    &lt;div class=&quot;shorter box&quot; style=&quot;break-after: column;&quot;&gt;&lt;/div&gt;
+    &lt;div id=&quot;after-break&quot; class=&quot;shorter box&quot;&gt;&lt;/div&gt;
+    &lt;div id=&quot;no-break&quot; class=&quot;shorter box&quot; style=&quot;break-inside: avoid;&quot;&gt;&lt;/div&gt;
+    &lt;div id=&quot;subPixelTest&quot; style=&quot;width:10.5px&quot;&gt;&lt;/div&gt;
+&lt;/div&gt;
+&lt;pre id=&quot;console&quot;&gt;&lt;/pre&gt;
+&lt;script&gt;
+    if (window.testRunner)
+        testRunner.dumpAsText();
+
+    function log(message)
+    {
+        document.getElementById(&quot;console&quot;).appendChild(document.createTextNode(message + &quot;\n&quot;));
+    }
+
+    function testBoxPosition(id, expectedLeft, expectedTop)
+    {
+        var rect = document.getElementById(id).getBoundingClientRect();
+        if (Math.round(rect.left) === expectedLeft &amp;&amp; Math.round(rect.top) === expectedTop)
+            log(&quot;PASS: '&quot; + id + &quot;' is at (&quot; + expectedLeft + &quot;, &quot; + expectedTop + &quot;)&quot;);
+        else
+            log(&quot;FAIL: '&quot; + id + &quot;' is at (&quot; + Math.round(rect.left) + &quot;, &quot; + Math.round(rect.top) + &quot;) instead of (&quot; + expectedLeft + &quot; ,&quot; + expectedTop + &quot;)&quot;);
+    }
+
+    var rect = document.getElementById('subPixelTest').getBoundingClientRect();
+    var hasSubpixelSupport = Math.round(rect.bottom) != rect.bottom;
+
+    testBoxPosition(&quot;break-before&quot;, 8, hasSubpixelSupport ? 220 : 218);
+    testBoxPosition(&quot;after-break&quot;, 8, hasSubpixelSupport ? 431 : 428);
+&lt;/script&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsfastmulticolverticalrlstandardizedbreakpropertiesexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/multicol/vertical-rl/standardized-break-properties-expected.txt (0 => 195892)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/multicol/vertical-rl/standardized-break-properties-expected.txt                                (rev 0)
+++ trunk/LayoutTests/fast/multicol/vertical-rl/standardized-break-properties-expected.txt        2016-01-30 15:28:48 UTC (rev 195892)
</span><span class="lines">@@ -0,0 +1,3 @@
</span><ins>+PASS: 'break-before' is at (748, 220)
+PASS: 'after-break' is at (748, 431)
+
</ins></span></pre></div>
<a id="trunkLayoutTestsfastmulticolverticalrlstandardizedbreakpropertieshtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/multicol/vertical-rl/standardized-break-properties.html (0 => 195892)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/multicol/vertical-rl/standardized-break-properties.html                                (rev 0)
+++ trunk/LayoutTests/fast/multicol/vertical-rl/standardized-break-properties.html        2016-01-30 15:28:48 UTC (rev 195892)
</span><span class="lines">@@ -0,0 +1,43 @@
</span><ins>+&lt;html style=&quot;-webkit-writing-mode:horizontal-tb&quot;&gt;
+&lt;head&gt;
+&lt;style&gt;
+    div.box { -webkit-box-sizing: border; border: solid blue; }
+    div.shorter { width: 54px; }
+    div.taller { width: 72px; }
+&lt;/style&gt;
+&lt;/head&gt;
+&lt;body style=&quot;-webkit-writing-mode:vertical-rl; width:800px;&quot;&gt;
+&lt;div style=&quot;width: 100px; height: 630px; -webkit-columns:6; -webkit-column-gap:5px; -webkit-column-fill:auto; columns:6; column-gap:5px; column-fill:auto;&quot;&gt;
+    &lt;div class=&quot;taller box&quot;&gt;&lt;/div&gt;
+    &lt;div class=&quot;taller box&quot;&gt;&lt;/div&gt;
+    &lt;div id=&quot;break-before&quot; class=&quot;shorter box&quot; style=&quot;break-before: column;&quot;&gt;&lt;/div&gt;
+    &lt;div class=&quot;shorter box&quot; style=&quot;break-after: column;&quot;&gt;&lt;/div&gt;
+    &lt;div id=&quot;after-break&quot; class=&quot;shorter box&quot;&gt;&lt;/div&gt;
+    &lt;div id=&quot;no-break&quot; class=&quot;shorter box&quot; style=&quot;break-inside: avoid;&quot;&gt;&lt;/div&gt;
+    &lt;div id=&quot;subPixelTest&quot; style=&quot;width:10.5px&quot;&gt;&lt;/div&gt;
+&lt;/div&gt;
+&lt;pre id=&quot;console&quot;&gt;&lt;/pre&gt;
+&lt;script&gt;
+    if (window.testRunner)
+        testRunner.dumpAsText();
+
+    function log(message)
+    {
+        document.getElementById(&quot;console&quot;).appendChild(document.createTextNode(message + &quot;\n&quot;));
+    }
+
+    function testBoxPosition(id, expectedLeft, expectedTop)
+    {
+        var rect = document.getElementById(id).getBoundingClientRect();
+        if (Math.round(rect.left) === expectedLeft &amp;&amp; Math.round(rect.top) === expectedTop)
+            log(&quot;PASS: '&quot; + id + &quot;' is at (&quot; + expectedLeft + &quot;, &quot; + expectedTop + &quot;)&quot;);
+        else
+            log(&quot;FAIL: '&quot; + id + &quot;' is at (&quot; + Math.round(rect.left) + &quot;, &quot; + Math.round(rect.top) + &quot;) instead of (&quot; + expectedLeft + &quot; ,&quot; + expectedTop + &quot;)&quot;);
+    }
+
+    var rect = document.getElementById('subPixelTest').getBoundingClientRect();
+    var hasSubpixelSupport = Math.round(rect.bottom) != rect.bottom;
+
+    testBoxPosition(&quot;break-before&quot;, 748, hasSubpixelSupport ? 220 : 218);
+    testBoxPosition(&quot;after-break&quot;, 748, hasSubpixelSupport ? 431 : 428);
+&lt;/script&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsfastregionstextbreakpropertiesexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/regions/text-break-properties-expected.txt (0 => 195892)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/regions/text-break-properties-expected.txt                                (rev 0)
+++ trunk/LayoutTests/fast/regions/text-break-properties-expected.txt        2016-01-30 15:28:48 UTC (rev 195892)
</span><span class="lines">@@ -0,0 +1 @@
</span><ins>+PASS
</ins></span></pre></div>
<a id="trunkLayoutTestsfastregionstextbreakpropertieshtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/regions/text-break-properties.html (0 => 195892)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/regions/text-break-properties.html                                (rev 0)
+++ trunk/LayoutTests/fast/regions/text-break-properties.html        2016-01-30 15:28:48 UTC (rev 195892)
</span><span class="lines">@@ -0,0 +1,50 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+
+&lt;style&gt;
+    #content { -webkit-flow-into: flow; }
+    .region { -webkit-flow-from: flow; }
+    .finished #content, .finished .region { display: none; }
+
+    #region1 { width: 70px; height: 60px; }
+    #region2 { width: 200px; height: 100px; }
+    #region3 { width: 110px; height: 120px; }
+    #region4 { width: 220px; height: 100px; }
+    #region5 { width: 200px; height: 140px; }
+&lt;/style&gt;
+
+&lt;div id=&quot;content&quot;&gt;
+    &lt;div style=&quot;break-after: region&quot;&gt;&lt;b class=&quot;check region1&quot;&gt;Region 1&lt;/b&gt;&lt;/div&gt;
+    
+    &lt;div&gt;
+        &lt;div&gt;
+            &lt;div style=&quot;break-after: region&quot;&gt;
+                &lt;div&gt;
+                    &lt;b class=&quot;check region2&quot;&gt;Region 2&lt;/b&gt;
+                    &lt;div style=&quot;break-before: region; margin-top:35px;&quot;&gt;&lt;b class=&quot;check region3&quot;&gt;Region 3&lt;/b&gt;&lt;/div&gt;
+                &lt;/div&gt;
+            &lt;/div&gt;
+        &lt;/div&gt;
+    &lt;/div&gt;
+    
+    &lt;div&gt;&lt;b class=&quot;check region4&quot;&gt;Region 4&lt;/b&gt;&lt;/div&gt;
+    
+    
+    &lt;div style=&quot;break-inside: avoid-region;&quot;&gt;
+        &lt;b class=&quot;check region5 start&quot;&gt;Start of region 5.&lt;/b&gt; Do not split these lines. Do not split these lines. Do not split these lines. Do not split these lines. Do not split these lines. Do not split these lines. Do not split these lines. &lt;b class=&quot;check region5 end&quot;&gt;End of region 5.&lt;/b&gt;
+    &lt;/div&gt;
+    
+&lt;/div&gt;
+
+&lt;div id=&quot;region1&quot; class=&quot;region&quot;&gt;&lt;/div&gt;
+&lt;div id=&quot;region2&quot; class=&quot;region&quot;&gt;&lt;/div&gt;
+&lt;div id=&quot;region3&quot; class=&quot;region&quot;&gt;&lt;/div&gt;
+&lt;div id=&quot;region4&quot; class=&quot;region&quot;&gt;&lt;/div&gt;
+&lt;div id=&quot;region5&quot; class=&quot;region&quot;&gt;&lt;/div&gt;
+
+&lt;script src=&quot;resources/helper.js&quot;&gt;&lt;/script&gt;
+&lt;script&gt;
+    if (window.testRunner)
+        testRunner.dumpAsText();
+    if (testContentToRegionsMapping())
+        document.body.className = &quot;finished&quot;;
+&lt;/script&gt;
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkLayoutTestsprintingallowedbreaksexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/printing/allowed-breaks-expected.txt (0 => 195892)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/printing/allowed-breaks-expected.txt                                (rev 0)
+++ trunk/LayoutTests/printing/allowed-breaks-expected.txt        2016-01-30 15:28:48 UTC (rev 195892)
</span><span class="lines">@@ -0,0 +1,15 @@
</span><ins>+Test for allowed page breaks
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+
+PASS: page number of &quot;page1&quot; is 1
+FAIL: expected page number of &quot;page2&quot; is 2. Was 1
+PASS: page number of &quot;page3-1&quot; is 3
+PASS: page number of &quot;page3-2&quot; is 3
+
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsprintingallowedbreakshtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/printing/allowed-breaks.html (0 => 195892)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/printing/allowed-breaks.html                                (rev 0)
+++ trunk/LayoutTests/printing/allowed-breaks.html        2016-01-30 15:28:48 UTC (rev 195892)
</span><span class="lines">@@ -0,0 +1,15 @@
</span><ins>+&lt;!DOCTYPE HTML PUBLIC &quot;-//IETF//DTD HTML//EN&quot;&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;resources/paged-media-test-utils.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;p id=&quot;description&quot;&gt;&lt;/p&gt;
+&lt;div id=&quot;console&quot;&gt;&lt;/div&gt;
+&lt;div id=&quot;sandbox&quot;&gt;&lt;/div&gt;
+&lt;script src=&quot;script-tests/allowed-breaks.js&quot;&gt;&lt;/script&gt;
+&lt;script&gt;runPrintingTest(test);&lt;/script&gt;
+&lt;script src=&quot;../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsprintingbreakafteravoidexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/printing/break-after-avoid-expected.txt (0 => 195892)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/printing/break-after-avoid-expected.txt                                (rev 0)
+++ trunk/LayoutTests/printing/break-after-avoid-expected.txt        2016-01-30 15:28:48 UTC (rev 195892)
</span><span class="lines">@@ -0,0 +1,20 @@
</span><ins>+Test for page-break-after:avoid
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+
+PASS: page number of &quot;page1&quot; is 1
+FAIL: expected page number of &quot;page2-1&quot; is 2. Was 1
+FAIL: expected page number of &quot;page2-2&quot; is 2. Was 1
+PASS: page number of &quot;page3-1&quot; is 3
+PASS: page number of &quot;page3-2&quot; is 3
+PASS: page number of &quot;page3-3&quot; is 3
+PASS: page number of &quot;page5&quot; is 5
+FAIL: expected page number of &quot;page6-1&quot; is 6. Was 5
+PASS: page number of &quot;page6-7&quot; is 6
+
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsprintingbreakafteravoidpageexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/printing/break-after-avoid-page-expected.txt (0 => 195892)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/printing/break-after-avoid-page-expected.txt                                (rev 0)
+++ trunk/LayoutTests/printing/break-after-avoid-page-expected.txt        2016-01-30 15:28:48 UTC (rev 195892)
</span><span class="lines">@@ -0,0 +1,20 @@
</span><ins>+Test for page-break-after:avoid
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+
+PASS: page number of &quot;page1&quot; is 1
+FAIL: expected page number of &quot;page2-1&quot; is 2. Was 1
+FAIL: expected page number of &quot;page2-2&quot; is 2. Was 1
+PASS: page number of &quot;page3-1&quot; is 3
+PASS: page number of &quot;page3-2&quot; is 3
+PASS: page number of &quot;page3-3&quot; is 3
+PASS: page number of &quot;page5&quot; is 5
+FAIL: expected page number of &quot;page6-1&quot; is 6. Was 5
+PASS: page number of &quot;page6-7&quot; is 6
+
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsprintingbreakafteravoidpagehtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/printing/break-after-avoid-page.html (0 => 195892)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/printing/break-after-avoid-page.html                                (rev 0)
+++ trunk/LayoutTests/printing/break-after-avoid-page.html        2016-01-30 15:28:48 UTC (rev 195892)
</span><span class="lines">@@ -0,0 +1,15 @@
</span><ins>+&lt;!DOCTYPE HTML PUBLIC &quot;-//IETF//DTD HTML//EN&quot;&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;resources/paged-media-test-utils.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;p id=&quot;description&quot;&gt;&lt;/p&gt;
+&lt;div id=&quot;console&quot;&gt;&lt;/div&gt;
+&lt;div id=&quot;sandbox&quot;&gt;&lt;/div&gt;
+&lt;script src=&quot;script-tests/break-after-avoid.js&quot;&gt;&lt;/script&gt;
+&lt;script&gt;runPrintingTest(test);&lt;/script&gt;
+&lt;script src=&quot;../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsprintingbreakafteravoidhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/printing/break-after-avoid.html (0 => 195892)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/printing/break-after-avoid.html                                (rev 0)
+++ trunk/LayoutTests/printing/break-after-avoid.html        2016-01-30 15:28:48 UTC (rev 195892)
</span><span class="lines">@@ -0,0 +1,15 @@
</span><ins>+&lt;!DOCTYPE HTML PUBLIC &quot;-//IETF//DTD HTML//EN&quot;&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;resources/paged-media-test-utils.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;p id=&quot;description&quot;&gt;&lt;/p&gt;
+&lt;div id=&quot;console&quot;&gt;&lt;/div&gt;
+&lt;div id=&quot;sandbox&quot;&gt;&lt;/div&gt;
+&lt;script src=&quot;script-tests/page-break-after-avoid.js&quot;&gt;&lt;/script&gt;
+&lt;script&gt;runPrintingTest(test);&lt;/script&gt;
+&lt;script src=&quot;../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsprintingbreakalwaysexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/printing/break-always-expected.txt (0 => 195892)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/printing/break-always-expected.txt                                (rev 0)
+++ trunk/LayoutTests/printing/break-always-expected.txt        2016-01-30 15:28:48 UTC (rev 195892)
</span><span class="lines">@@ -0,0 +1,16 @@
</span><ins>+Test for page-break-before:always and page-break-after:always
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+
+PASS: page number of &quot;firstPage&quot; is 0
+PASS: page number of &quot;secondPage1&quot; is 1
+PASS: page number of &quot;secondPage2&quot; is 1
+PASS: page number of &quot;thirdPage&quot; is 2
+All tests passed
+
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsprintingbreakalwayshtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/printing/break-always.html (0 => 195892)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/printing/break-always.html                                (rev 0)
+++ trunk/LayoutTests/printing/break-always.html        2016-01-30 15:28:48 UTC (rev 195892)
</span><span class="lines">@@ -0,0 +1,15 @@
</span><ins>+&lt;!DOCTYPE HTML PUBLIC &quot;-//IETF//DTD HTML//EN&quot;&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;resources/paged-media-test-utils.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;p id=&quot;description&quot;&gt;&lt;/p&gt;
+&lt;div id=&quot;console&quot;&gt;&lt;/div&gt;
+&lt;div id=&quot;sandbox&quot;&gt;&lt;/div&gt;
+&lt;script src=&quot;script-tests/break-always.js&quot;&gt;&lt;/script&gt;
+&lt;script&gt;runPrintingTest(test);&lt;/script&gt;
+&lt;script src=&quot;../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsprintingbreakavoidexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/printing/break-avoid-expected.txt (0 => 195892)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/printing/break-avoid-expected.txt                                (rev 0)
+++ trunk/LayoutTests/printing/break-avoid-expected.txt        2016-01-30 15:28:48 UTC (rev 195892)
</span><span class="lines">@@ -0,0 +1,14 @@
</span><ins>+Test for combined page-break-{before,after,inside}:avoid
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+
+PASS: page number of &quot;page1-1&quot; is 1
+FAIL: expected page number of &quot;page2-1&quot; is 2. Was 1
+PASS: page number of &quot;page2-8&quot; is 2
+
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsprintingbreakavoidpageexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/printing/break-avoid-page-expected.txt (0 => 195892)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/printing/break-avoid-page-expected.txt                                (rev 0)
+++ trunk/LayoutTests/printing/break-avoid-page-expected.txt        2016-01-30 15:28:48 UTC (rev 195892)
</span><span class="lines">@@ -0,0 +1,14 @@
</span><ins>+Test for combined page-break-{before,after,inside}:avoid
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+
+PASS: page number of &quot;page1-1&quot; is 1
+FAIL: expected page number of &quot;page2-1&quot; is 2. Was 1
+PASS: page number of &quot;page2-8&quot; is 2
+
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsprintingbreakavoidpagehtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/printing/break-avoid-page.html (0 => 195892)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/printing/break-avoid-page.html                                (rev 0)
+++ trunk/LayoutTests/printing/break-avoid-page.html        2016-01-30 15:28:48 UTC (rev 195892)
</span><span class="lines">@@ -0,0 +1,15 @@
</span><ins>+&lt;!DOCTYPE HTML PUBLIC &quot;-//IETF//DTD HTML//EN&quot;&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;resources/paged-media-test-utils.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;p id=&quot;description&quot;&gt;&lt;/p&gt;
+&lt;div id=&quot;console&quot;&gt;&lt;/div&gt;
+&lt;div id=&quot;sandbox&quot;&gt;&lt;/div&gt;
+&lt;script src=&quot;script-tests/break-avoid-page.js&quot;&gt;&lt;/script&gt;
+&lt;script&gt;runPrintingTest(test);&lt;/script&gt;
+&lt;script src=&quot;../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsprintingbreakavoidhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/printing/break-avoid.html (0 => 195892)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/printing/break-avoid.html                                (rev 0)
+++ trunk/LayoutTests/printing/break-avoid.html        2016-01-30 15:28:48 UTC (rev 195892)
</span><span class="lines">@@ -0,0 +1,15 @@
</span><ins>+&lt;!DOCTYPE HTML PUBLIC &quot;-//IETF//DTD HTML//EN&quot;&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;resources/paged-media-test-utils.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;p id=&quot;description&quot;&gt;&lt;/p&gt;
+&lt;div id=&quot;console&quot;&gt;&lt;/div&gt;
+&lt;div id=&quot;sandbox&quot;&gt;&lt;/div&gt;
+&lt;script src=&quot;script-tests/break-avoid.js&quot;&gt;&lt;/script&gt;
+&lt;script&gt;runPrintingTest(test);&lt;/script&gt;
+&lt;script src=&quot;../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsprintingbreakdisplaynoneexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/printing/break-display-none-expected.txt (0 => 195892)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/printing/break-display-none-expected.txt                                (rev 0)
+++ trunk/LayoutTests/printing/break-display-none-expected.txt        2016-01-30 15:28:48 UTC (rev 195892)
</span><span class="lines">@@ -0,0 +1,15 @@
</span><ins>+Test for page-break with 'display:none'
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+
+PASS: page number of &quot;page1-1&quot; is 1
+PASS: page number of &quot;displaynone&quot; is -1
+PASS: page number of &quot;page1-2&quot; is 1
+All tests passed
+
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsprintingbreakdisplaynonehtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/printing/break-display-none.html (0 => 195892)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/printing/break-display-none.html                                (rev 0)
+++ trunk/LayoutTests/printing/break-display-none.html        2016-01-30 15:28:48 UTC (rev 195892)
</span><span class="lines">@@ -0,0 +1,15 @@
</span><ins>+&lt;!DOCTYPE HTML PUBLIC &quot;-//IETF//DTD HTML//EN&quot;&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;resources/paged-media-test-utils.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;p id=&quot;description&quot;&gt;&lt;/p&gt;
+&lt;div id=&quot;console&quot;&gt;&lt;/div&gt;
+&lt;div id=&quot;sandbox&quot;&gt;&lt;/div&gt;
+&lt;script src=&quot;script-tests/break-display-none.js&quot;&gt;&lt;/script&gt;
+&lt;script&gt;runPrintingTest(test);&lt;/script&gt;
+&lt;script src=&quot;../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsprintingbreakinsideavoidexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/printing/break-inside-avoid-expected.txt (0 => 195892)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/printing/break-inside-avoid-expected.txt                                (rev 0)
+++ trunk/LayoutTests/printing/break-inside-avoid-expected.txt        2016-01-30 15:28:48 UTC (rev 195892)
</span><span class="lines">@@ -0,0 +1,22 @@
</span><ins>+Test for page-break-inside:avoid
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+
+PASS: page number of &quot;page1-1&quot; is 1
+PASS: page number of &quot;page1-2&quot; is 1
+PASS: page number of &quot;page2&quot; is 2
+PASS: page number of &quot;page3&quot; is 3
+PASS: page number of &quot;page4&quot; is 4
+PASS: page number of &quot;page5&quot; is 5
+PASS: page number of &quot;page8&quot; is 8
+PASS: page number of &quot;page9-1&quot; is 9
+PASS: page number of &quot;page9-2&quot; is 9
+PASS: page number of &quot;page10&quot; is 10
+All tests passed
+
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsprintingbreakinsideavoidpageexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/printing/break-inside-avoid-page-expected.txt (0 => 195892)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/printing/break-inside-avoid-page-expected.txt                                (rev 0)
+++ trunk/LayoutTests/printing/break-inside-avoid-page-expected.txt        2016-01-30 15:28:48 UTC (rev 195892)
</span><span class="lines">@@ -0,0 +1,22 @@
</span><ins>+Test for page-break-inside:avoid
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+
+PASS: page number of &quot;page1-1&quot; is 1
+PASS: page number of &quot;page1-2&quot; is 1
+PASS: page number of &quot;page2&quot; is 2
+PASS: page number of &quot;page3&quot; is 3
+PASS: page number of &quot;page4&quot; is 4
+PASS: page number of &quot;page5&quot; is 5
+PASS: page number of &quot;page8&quot; is 8
+PASS: page number of &quot;page9-1&quot; is 9
+PASS: page number of &quot;page9-2&quot; is 9
+PASS: page number of &quot;page10&quot; is 10
+All tests passed
+
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsprintingbreakinsideavoidpagehtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/printing/break-inside-avoid-page.html (0 => 195892)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/printing/break-inside-avoid-page.html                                (rev 0)
+++ trunk/LayoutTests/printing/break-inside-avoid-page.html        2016-01-30 15:28:48 UTC (rev 195892)
</span><span class="lines">@@ -0,0 +1,15 @@
</span><ins>+&lt;!DOCTYPE HTML PUBLIC &quot;-//IETF//DTD HTML//EN&quot;&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;resources/paged-media-test-utils.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;p id=&quot;description&quot;&gt;&lt;/p&gt;
+&lt;div id=&quot;console&quot;&gt;&lt;/div&gt;
+&lt;div id=&quot;sandbox&quot;&gt;&lt;/div&gt;
+&lt;script src=&quot;script-tests/break-inside-avoid-page.js&quot;&gt;&lt;/script&gt;
+&lt;script&gt;runPrintingTest(test);&lt;/script&gt;
+&lt;script src=&quot;../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsprintingbreakinsideavoidhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/printing/break-inside-avoid.html (0 => 195892)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/printing/break-inside-avoid.html                                (rev 0)
+++ trunk/LayoutTests/printing/break-inside-avoid.html        2016-01-30 15:28:48 UTC (rev 195892)
</span><span class="lines">@@ -0,0 +1,15 @@
</span><ins>+&lt;!DOCTYPE HTML PUBLIC &quot;-//IETF//DTD HTML//EN&quot;&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;resources/paged-media-test-utils.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;p id=&quot;description&quot;&gt;&lt;/p&gt;
+&lt;div id=&quot;console&quot;&gt;&lt;/div&gt;
+&lt;div id=&quot;sandbox&quot;&gt;&lt;/div&gt;
+&lt;script src=&quot;script-tests/break-inside-avoid.js&quot;&gt;&lt;/script&gt;
+&lt;script&gt;runPrintingTest(test);&lt;/script&gt;
+&lt;script src=&quot;../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsprintingscripttestsallowedbreaksjs"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/printing/script-tests/allowed-breaks.js (0 => 195892)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/printing/script-tests/allowed-breaks.js                                (rev 0)
+++ trunk/LayoutTests/printing/script-tests/allowed-breaks.js        2016-01-30 15:28:48 UTC (rev 195892)
</span><span class="lines">@@ -0,0 +1,26 @@
</span><ins>+description(&quot;Test for allowed page breaks&quot;);
+
+function test()
+{
+    // See CSS3: Paged Media 9.4. Allowed page breaks.
+    // http://dev.w3.org/csswg/css3-page/#allowed-pg-brk
+    createBlockWithRatioToPageHeight(&quot;page1&quot;, 0.8).style.breakBefore = &quot;page&quot;;
+    // We shoud break a page between block 'page1' and block 'page2' instead of
+    // breaking inside block 'page2' because there is no allowed page break points
+    // inside block 'page2'. Breaking at non-allowed position should be a last resort.
+    createBlockWithRatioToPageHeight(&quot;page2&quot;, 0.8);
+
+    createBlockWithRatioToPageHeight(&quot;page3-1&quot;, 0.6).style.breakBefore = &quot;page&quot;;
+    // We can break inside block 'page3-2' because page breaks may occur between
+    // line boxes inside a block box.
+    createBlockWithNumberOfLines(&quot;page3-2&quot;, 20);
+
+    pageNumberForElementShouldBe(&quot;page1&quot;, 1);
+    pageNumberForElementShouldBe(&quot;page2&quot;, 2);
+    pageNumberForElementShouldBe(&quot;page3-1&quot;, 3);
+    pageNumberForElementShouldBe(&quot;page3-2&quot;, 3);
+
+    document.body.removeChild(document.getElementById(&quot;sandbox&quot;));
+}
+
+var successfullyParsed = true;
</ins></span></pre></div>
<a id="trunkLayoutTestsprintingscripttestsbreakafteravoidpagejs"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/printing/script-tests/break-after-avoid-page.js (0 => 195892)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/printing/script-tests/break-after-avoid-page.js                                (rev 0)
+++ trunk/LayoutTests/printing/script-tests/break-after-avoid-page.js        2016-01-30 15:28:48 UTC (rev 195892)
</span><span class="lines">@@ -0,0 +1,43 @@
</span><ins>+description(&quot;Test for page-break-after:avoid&quot;);
+
+function test()
+{
+    createBlockWithRatioToPageHeight(&quot;page1&quot;, 0.5).style.breakBefore = &quot;page&quot;;
+    // A block 'page2-1' must move to the next page because it has 'page-break-after:avoid'
+    // and both 'page2-1' and 'page2-2' cannot be placed in the current page at the same time.
+    createBlockWithRatioToPageHeight(&quot;page2-1&quot;, 0.3).style.breakAfter = &quot;avoid-page&quot;;
+    createBlockWithRatioToPageHeight(&quot;page2-2&quot;, 0.3);
+
+    createBlockWithRatioToPageHeight(&quot;page3-1&quot;, 0.5).style.breakBefore = &quot;page&quot;;
+    // A page break can occur inside of 'page3-3' block because it has child elements.
+    createBlockWithRatioToPageHeight(&quot;page3-2&quot;, 0.3).style.breakAfter = &quot;avoid-page&quot;;
+    createBlockWithNumberOfLines(&quot;page3-3&quot;, 10);
+
+    createBlockWithRatioToPageHeight(&quot;page5&quot;, 0.5).style.breakBefore = &quot;page&quot;;
+    // It seems unrealistic, but block 'page6-1' must move to the next page.
+    createBlockWithRatioToPageHeight(&quot;page6-1&quot;, 0.1).style.breakAfter = &quot;avoid-page&quot;;
+    createBlockWithRatioToPageHeight(&quot;page6-2&quot;, 0.1).style.breakAfter = &quot;avoid-page&quot;;
+    createBlockWithRatioToPageHeight(&quot;page6-3&quot;, 0.1).style.breakAfter = &quot;avoid-page&quot;;
+    createBlockWithRatioToPageHeight(&quot;page6-4&quot;, 0.1).style.breakAfter = &quot;avoid-page&quot;;
+    createBlockWithRatioToPageHeight(&quot;page6-5&quot;, 0.1).style.breakAfter = &quot;avoid-page&quot;;
+    createBlockWithRatioToPageHeight(&quot;page6-6&quot;, 0.1).style.breakAfter = &quot;avoid-page&quot;;
+    createBlockWithRatioToPageHeight(&quot;page6-7&quot;, 0.1);
+
+
+    pageNumberForElementShouldBe(&quot;page1&quot;, 1);
+    pageNumberForElementShouldBe(&quot;page2-1&quot;, 2);
+    pageNumberForElementShouldBe(&quot;page2-2&quot;, 2);
+
+    pageNumberForElementShouldBe(&quot;page3-1&quot;, 3);
+    pageNumberForElementShouldBe(&quot;page3-2&quot;, 3);
+    pageNumberForElementShouldBe(&quot;page3-3&quot;, 3);
+
+    pageNumberForElementShouldBe(&quot;page5&quot;, 5);
+    pageNumberForElementShouldBe(&quot;page6-1&quot;, 6);
+    // Omit tests for intermediate blocks.
+    pageNumberForElementShouldBe(&quot;page6-7&quot;, 6);
+
+    document.body.removeChild(document.getElementById(&quot;sandbox&quot;));
+}
+
+var successfullyParsed = true;
</ins></span></pre></div>
<a id="trunkLayoutTestsprintingscripttestsbreakafteravoidjs"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/printing/script-tests/break-after-avoid.js (0 => 195892)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/printing/script-tests/break-after-avoid.js                                (rev 0)
+++ trunk/LayoutTests/printing/script-tests/break-after-avoid.js        2016-01-30 15:28:48 UTC (rev 195892)
</span><span class="lines">@@ -0,0 +1,43 @@
</span><ins>+description(&quot;Test for page-break-after:avoid&quot;);
+
+function test()
+{
+    createBlockWithRatioToPageHeight(&quot;page1&quot;, 0.5).style.breakBefore = &quot;page&quot;;
+    // A block 'page2-1' must move to the next page because it has 'page-break-after:avoid'
+    // and both 'page2-1' and 'page2-2' cannot be placed in the current page at the same time.
+    createBlockWithRatioToPageHeight(&quot;page2-1&quot;, 0.3).style.breakAfter = &quot;avoid&quot;;
+    createBlockWithRatioToPageHeight(&quot;page2-2&quot;, 0.3);
+
+    createBlockWithRatioToPageHeight(&quot;page3-1&quot;, 0.5).style.breakBefore = &quot;page&quot;;
+    // A page break can occur inside of 'page3-3' block because it has child elements.
+    createBlockWithRatioToPageHeight(&quot;page3-2&quot;, 0.3).style.breakAfter = &quot;avoid&quot;;
+    createBlockWithNumberOfLines(&quot;page3-3&quot;, 10);
+
+    createBlockWithRatioToPageHeight(&quot;page5&quot;, 0.5).style.breakBefore = &quot;page&quot;;
+    // It seems unrealistic, but block 'page6-1' must move to the next page.
+    createBlockWithRatioToPageHeight(&quot;page6-1&quot;, 0.1).style.breakAfter = &quot;avoid&quot;;
+    createBlockWithRatioToPageHeight(&quot;page6-2&quot;, 0.1).style.breakAfter = &quot;avoid&quot;;
+    createBlockWithRatioToPageHeight(&quot;page6-3&quot;, 0.1).style.breakAfter = &quot;avoid&quot;;
+    createBlockWithRatioToPageHeight(&quot;page6-4&quot;, 0.1).style.breakAfter = &quot;avoid&quot;;
+    createBlockWithRatioToPageHeight(&quot;page6-5&quot;, 0.1).style.breakAfter = &quot;avoid&quot;;
+    createBlockWithRatioToPageHeight(&quot;page6-6&quot;, 0.1).style.breakAfter = &quot;avoid&quot;;
+    createBlockWithRatioToPageHeight(&quot;page6-7&quot;, 0.1);
+
+
+    pageNumberForElementShouldBe(&quot;page1&quot;, 1);
+    pageNumberForElementShouldBe(&quot;page2-1&quot;, 2);
+    pageNumberForElementShouldBe(&quot;page2-2&quot;, 2);
+
+    pageNumberForElementShouldBe(&quot;page3-1&quot;, 3);
+    pageNumberForElementShouldBe(&quot;page3-2&quot;, 3);
+    pageNumberForElementShouldBe(&quot;page3-3&quot;, 3);
+
+    pageNumberForElementShouldBe(&quot;page5&quot;, 5);
+    pageNumberForElementShouldBe(&quot;page6-1&quot;, 6);
+    // Omit tests for intermediate blocks.
+    pageNumberForElementShouldBe(&quot;page6-7&quot;, 6);
+
+    document.body.removeChild(document.getElementById(&quot;sandbox&quot;));
+}
+
+var successfullyParsed = true;
</ins></span></pre></div>
<a id="trunkLayoutTestsprintingscripttestsbreakalwaysjs"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/printing/script-tests/break-always.js (0 => 195892)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/printing/script-tests/break-always.js                                (rev 0)
+++ trunk/LayoutTests/printing/script-tests/break-always.js        2016-01-30 15:28:48 UTC (rev 195892)
</span><span class="lines">@@ -0,0 +1,19 @@
</span><ins>+description(&quot;Test for page-break-before:always and page-break-after:always&quot;);
+
+function test()
+{
+    createBlockWithRatioToPageHeight(&quot;firstPage&quot;, 0.1);
+    createBlockWithRatioToPageHeight(&quot;secondPage1&quot;, 0.1).style.breakBefore = &quot;page&quot;;
+    createBlockWithRatioToPageHeight(&quot;secondPage2&quot;, 0.1).style.breakAfter = &quot;page&quot;;
+    createBlockWithRatioToPageHeight(&quot;thirdPage&quot;, 0.1).style.breakBefore = &quot;page&quot;;
+
+    pageNumberForElementShouldBe('firstPage', 0);
+    pageNumberForElementShouldBe('secondPage1', 1);
+    pageNumberForElementShouldBe('secondPage2', 1);
+    // There must be only one page break between 'page-break-after: always' and 'page-break-before: always'
+    pageNumberForElementShouldBe('thirdPage', 2);
+
+    document.body.removeChild(document.getElementById(&quot;sandbox&quot;));
+}
+
+var successfullyParsed = true;
</ins></span></pre></div>
<a id="trunkLayoutTestsprintingscripttestsbreakavoidpagejs"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/printing/script-tests/break-avoid-page.js (0 => 195892)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/printing/script-tests/break-avoid-page.js                                (rev 0)
+++ trunk/LayoutTests/printing/script-tests/break-avoid-page.js        2016-01-30 15:28:48 UTC (rev 195892)
</span><span class="lines">@@ -0,0 +1,35 @@
</span><ins>+description(&quot;Test for combined page-break-{before,after,inside}:avoid&quot;);
+
+function test()
+{
+    var block;
+    createBlockWithRatioToPageHeight(&quot;page1-1&quot;, 0.4).style.breakBefore = &quot;page&quot;;
+    // A block 'page2-1' must move to the next page because we cannot find any
+    // allowed page breaks till the end of block page2-8.
+    createBlockWithRatioToPageHeight(&quot;page2-1&quot;, 0.1).style.breakAfter = &quot;avoid-page&quot;;
+    createBlockWithRatioToPageHeight(&quot;page2-2&quot;, 0.1);
+    createBlockWithRatioToPageHeight(&quot;page2-3&quot;, 0.1).style.breakBefore = &quot;avoid-page&quot;;
+    createBlockWithRatioToPageHeight(&quot;page2-4&quot;, 0.1).style.breakBefore = &quot;avoid-page&quot;;
+
+    block = createBlockWithRatioToPageHeight(&quot;page2-5&quot;, 0.1);
+    block.style.breakBefore = &quot;avoid-page&quot;;
+    block.style.breakAfter = &quot;avoid-page&quot;;
+
+    createBlockWithRatioToPageHeight(&quot;page2-6&quot;, 0.1);
+
+    block = createBlockWithNumberOfLines(&quot;page2-7&quot;, 4);
+    block.style.breakBefore = &quot;avoid-page&quot;;
+    block.style.breakAfter = &quot;avoid-page&quot;;
+    block.style.breakInside = &quot;avoid-page&quot;;
+
+    createBlockWithRatioToPageHeight(&quot;page2-8&quot;, 0.1).style.breakBefore = &quot;avoid-page&quot;;
+
+    pageNumberForElementShouldBe(&quot;page1-1&quot;, 1);
+    pageNumberForElementShouldBe(&quot;page2-1&quot;, 2);
+    // Omit tests for intermediate blocks.
+    pageNumberForElementShouldBe(&quot;page2-8&quot;, 2);
+
+    document.body.removeChild(document.getElementById(&quot;sandbox&quot;));
+}
+
+var successfullyParsed = true;
</ins></span></pre></div>
<a id="trunkLayoutTestsprintingscripttestsbreakavoidjs"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/printing/script-tests/break-avoid.js (0 => 195892)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/printing/script-tests/break-avoid.js                                (rev 0)
+++ trunk/LayoutTests/printing/script-tests/break-avoid.js        2016-01-30 15:28:48 UTC (rev 195892)
</span><span class="lines">@@ -0,0 +1,35 @@
</span><ins>+description(&quot;Test for combined page-break-{before,after,inside}:avoid&quot;);
+
+function test()
+{
+    var block;
+    createBlockWithRatioToPageHeight(&quot;page1-1&quot;, 0.4).style.breakBefore = &quot;page&quot;;
+    // A block 'page2-1' must move to the next page because we cannot find any
+    // allowed page breaks till the end of block page2-8.
+    createBlockWithRatioToPageHeight(&quot;page2-1&quot;, 0.1).style.breakAfter = &quot;avoid&quot;;
+    createBlockWithRatioToPageHeight(&quot;page2-2&quot;, 0.1);
+    createBlockWithRatioToPageHeight(&quot;page2-3&quot;, 0.1).style.breakBefore = &quot;avoid&quot;;
+    createBlockWithRatioToPageHeight(&quot;page2-4&quot;, 0.1).style.breakBefore = &quot;avoid&quot;;
+
+    block = createBlockWithRatioToPageHeight(&quot;page2-5&quot;, 0.1);
+    block.style.breakBefore = &quot;avoid&quot;;
+    block.style.breakAfter = &quot;avoid&quot;;
+
+    createBlockWithRatioToPageHeight(&quot;page2-6&quot;, 0.1);
+
+    block = createBlockWithNumberOfLines(&quot;page2-7&quot;, 4);
+    block.style.breakBefore = &quot;avoid&quot;;
+    block.style.breakAfter = &quot;avoid&quot;;
+    block.style.breakInside = &quot;avoid&quot;;
+
+    createBlockWithRatioToPageHeight(&quot;page2-8&quot;, 0.1).style.breakBefore = &quot;avoid&quot;;
+
+    pageNumberForElementShouldBe(&quot;page1-1&quot;, 1);
+    pageNumberForElementShouldBe(&quot;page2-1&quot;, 2);
+    // Omit tests for intermediate blocks.
+    pageNumberForElementShouldBe(&quot;page2-8&quot;, 2);
+
+    document.body.removeChild(document.getElementById(&quot;sandbox&quot;));
+}
+
+var successfullyParsed = true;
</ins></span></pre></div>
<a id="trunkLayoutTestsprintingscripttestsbreakdisplaynonejs"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/printing/script-tests/break-display-none.js (0 => 195892)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/printing/script-tests/break-display-none.js                                (rev 0)
+++ trunk/LayoutTests/printing/script-tests/break-display-none.js        2016-01-30 15:28:48 UTC (rev 195892)
</span><span class="lines">@@ -0,0 +1,21 @@
</span><ins>+description(&quot;Test for page-break with 'display:none'&quot;);
+
+function test()
+{
+    createBlockWithRatioToPageHeight(&quot;page1-1&quot;, 0.1).style.breakBefore = &quot;page&quot;;
+
+    // if 'display' is 'none', page break property should not have any effect.
+    var block = createBlockWithRatioToPageHeight(&quot;displaynone&quot;, 0.1);
+    block.style.breakBefore = &quot;page&quot;;
+    block.style.display = &quot;none&quot;;
+
+    createBlockWithRatioToPageHeight(&quot;page1-2&quot;, 0.1);
+
+    pageNumberForElementShouldBe(&quot;page1-1&quot;, 1);
+    pageNumberForElementShouldBe(&quot;displaynone&quot;, -1);
+    pageNumberForElementShouldBe(&quot;page1-2&quot;, 1);
+
+    document.body.removeChild(document.getElementById(&quot;sandbox&quot;));
+}
+
+var successfullyParsed = true;
</ins></span></pre></div>
<a id="trunkLayoutTestsprintingscripttestsbreakinsideavoidpagejs"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/printing/script-tests/break-inside-avoid-page.js (0 => 195892)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/printing/script-tests/break-inside-avoid-page.js                                (rev 0)
+++ trunk/LayoutTests/printing/script-tests/break-inside-avoid-page.js        2016-01-30 15:28:48 UTC (rev 195892)
</span><span class="lines">@@ -0,0 +1,42 @@
</span><ins>+description(&quot;Test for page-break-inside:avoid&quot;);
+
+function test()
+{
+    createBlockWithRatioToPageHeight(&quot;page1-1&quot;, 0.5).style.breakBefore = &quot;page&quot;;
+    // block 'page1-2' should be splitted.
+    createBlockWithNumberOfLines(&quot;page1-2&quot;, 20);
+    createBlockWithRatioToPageHeight(&quot;page2&quot;, 0.1);
+
+    createBlockWithRatioToPageHeight(&quot;page3&quot;, 0.5).style.breakBefore = &quot;page&quot;;
+    // We should place block 'page4' in the next page because of 'page-break-inside: avoid'.
+    createBlockWithNumberOfLines(&quot;page4&quot;, 20).style.breakInside = &quot;avoid-page&quot;;
+
+    createBlockWithRatioToPageHeight(&quot;page5&quot;, 0.8).style.breakBefore = &quot;page&quot;;
+    // block 'page5-2' is a very large block, occupying more than 2 pages.
+    // We don't define from where this large block starts. Maybe from the next page.
+    createBlockWithNumberOfLines(&quot;page5or6&quot;, 20 * 2 + 10).style.breakInside = &quot;avoid-page&quot;;
+    createBlockWithRatioToPageHeight(&quot;page8&quot;, 0.1);
+
+    createBlockWithRatioToPageHeight(&quot;page9-1&quot;, 0.1).style.breakBefore = &quot;page&quot;;
+    createBlockWithRatioToPageHeight(&quot;page9-2&quot;, 0.1).style.breakAfter = &quot;page&quot;;
+    // Make sure page-break only happens once, not twice.
+    createBlockWithNumberOfLines(&quot;page10&quot;, 20).style.breakInside = &quot;avoid-page&quot;;
+
+    pageNumberForElementShouldBe('page1-1', 1);
+    pageNumberForElementShouldBe('page1-2', 1);
+    pageNumberForElementShouldBe('page2', 2);
+
+    pageNumberForElementShouldBe('page3', 3);
+    pageNumberForElementShouldBe('page4', 4);
+
+    pageNumberForElementShouldBe('page5', 5);
+    pageNumberForElementShouldBe('page8', 8);
+
+    pageNumberForElementShouldBe('page9-1', 9);
+    pageNumberForElementShouldBe('page9-2', 9);
+    pageNumberForElementShouldBe('page10', 10);
+
+    document.body.removeChild(document.getElementById(&quot;sandbox&quot;));
+}
+
+var successfullyParsed = true;
</ins></span></pre></div>
<a id="trunkLayoutTestsprintingscripttestsbreakinsideavoidjs"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/printing/script-tests/break-inside-avoid.js (0 => 195892)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/printing/script-tests/break-inside-avoid.js                                (rev 0)
+++ trunk/LayoutTests/printing/script-tests/break-inside-avoid.js        2016-01-30 15:28:48 UTC (rev 195892)
</span><span class="lines">@@ -0,0 +1,42 @@
</span><ins>+description(&quot;Test for page-break-inside:avoid&quot;);
+
+function test()
+{
+    createBlockWithRatioToPageHeight(&quot;page1-1&quot;, 0.5).style.breakBefore = &quot;page&quot;;
+    // block 'page1-2' should be splitted.
+    createBlockWithNumberOfLines(&quot;page1-2&quot;, 20);
+    createBlockWithRatioToPageHeight(&quot;page2&quot;, 0.1);
+
+    createBlockWithRatioToPageHeight(&quot;page3&quot;, 0.5).style.breakBefore = &quot;page&quot;;
+    // We should place block 'page4' in the next page because of 'page-break-inside: avoid'.
+    createBlockWithNumberOfLines(&quot;page4&quot;, 20).style.breakInside = &quot;avoid&quot;;
+
+    createBlockWithRatioToPageHeight(&quot;page5&quot;, 0.8).style.breakBefore = &quot;page&quot;;
+    // block 'page5-2' is a very large block, occupying more than 2 pages.
+    // We don't define from where this large block starts. Maybe from the next page.
+    createBlockWithNumberOfLines(&quot;page5or6&quot;, 20 * 2 + 10).style.breakInside = &quot;avoid&quot;;
+    createBlockWithRatioToPageHeight(&quot;page8&quot;, 0.1);
+
+    createBlockWithRatioToPageHeight(&quot;page9-1&quot;, 0.1).style.breakBefore = &quot;page&quot;;
+    createBlockWithRatioToPageHeight(&quot;page9-2&quot;, 0.1).style.breakAfter = &quot;page&quot;;
+    // Make sure page-break only happens once, not twice.
+    createBlockWithNumberOfLines(&quot;page10&quot;, 20).style.breakInside = &quot;avoid&quot;;
+
+    pageNumberForElementShouldBe('page1-1', 1);
+    pageNumberForElementShouldBe('page1-2', 1);
+    pageNumberForElementShouldBe('page2', 2);
+
+    pageNumberForElementShouldBe('page3', 3);
+    pageNumberForElementShouldBe('page4', 4);
+
+    pageNumberForElementShouldBe('page5', 5);
+    pageNumberForElementShouldBe('page8', 8);
+
+    pageNumberForElementShouldBe('page9-1', 9);
+    pageNumberForElementShouldBe('page9-2', 9);
+    pageNumberForElementShouldBe('page10', 10);
+
+    document.body.removeChild(document.getElementById(&quot;sandbox&quot;));
+}
+
+var successfullyParsed = true;
</ins></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (195891 => 195892)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-01-30 12:53:59 UTC (rev 195891)
+++ trunk/Source/WebCore/ChangeLog        2016-01-30 15:28:48 UTC (rev 195892)
</span><span class="lines">@@ -1,3 +1,94 @@
</span><ins>+2016-01-30 Dave Hyatt  &lt;hyatt@apple.com&gt;
+
+        Support break-after, break-before and break-inside.
+        https://bugs.webkit.org/show_bug.cgi?id=148814
+
+        Reviewed by Dean Jackson.
+
+        New tests added in printing/, fast/multicol/, and fast/regions.
+
+        * css/CSSComputedStyleDeclaration.cpp:
+        (WebCore::convertToPageBreak):
+        (WebCore::convertToColumnBreak):
+        (WebCore::convertToRegionBreak):
+        For backwards compatibility, keep support for all the old properties in
+        computed style. This means we have to convert the break-* property values
+        into keywords that make sense for the legacy properties. This mainly
+        involves mapping &quot;page&quot;, &quot;column&quot;, &quot;region&quot; to &quot;always&quot; (similar rule for
+        the avoid-* versions as well).
+
+        (WebCore::ComputedStyleExtractor::propertyValue):
+        Add support for the three new break-* properties.
+
+        * css/CSSParser.cpp:
+        (WebCore::isValidKeywordPropertyAndValue):
+        (WebCore::isKeywordPropertyID):
+        (WebCore::CSSParser::parseValue):
+        Add support for the new break properties.
+
+        * css/CSSPrimitiveValueMappings.h:
+        (WebCore::CSSPrimitiveValue::operator BreakBetween):
+        (WebCore::CSSPrimitiveValue::operator BreakInside):
+        Add converters for the new BreakBetween and BreakInside enums. Remove
+        the EPageBreak enum, since it is no longer used.
+
+        * css/CSSPropertyNames.in:
+        * css/CSSValueKeywords.in:
+        Add the new properties and the new values supported by the properties
+        to the keywords lists.
+
+        * css/StyleBuilderConverter.h:
+        (WebCore::StyleBuilderConverter::convertFontSynthesis):
+        (WebCore::StyleBuilderConverter::convertPageBreakBetween):
+        (WebCore::StyleBuilderConverter::convertPageBreakInside):
+        (WebCore::StyleBuilderConverter::convertColumnBreakBetween):
+        (WebCore::StyleBuilderConverter::convertColumnBreakInside):
+        (WebCore::StyleBuilderConverter::convertRegionBreakBetween):
+        (WebCore::StyleBuilderConverter::convertRegionBreakInside):
+        In order to map the legacy properties into the new break-* values
+        we have custom converter functions.
+
+        * rendering/RenderBlock.cpp:
+        (WebCore::RenderBlock::paintChild):
+        (WebCore::RenderBlock::childBoxIsUnsplittableForFragmentation):
+        (WebCore::RenderBlock::computeRegionRangeForBoxChild):
+        * rendering/RenderBlockFlow.cpp:
+        (WebCore::RenderBlockFlow::applyBeforeBreak):
+        (WebCore::RenderBlockFlow::applyAfterBreak):
+        Patch the block code to check the correct new break-* constants. For
+        avoidance, this means checking both the general avoid value and the
+        specific value (e.g., avoid-page). In place of &quot;always&quot;, we check
+        the specific value (e.g., column) and then for page specifically, we
+        also treat &quot;left&quot;, &quot;right&quot;, &quot;recto&quot; and &quot;verso&quot; as &quot;always break&quot; for now.
+
+        * rendering/style/RenderStyle.cpp:
+        (WebCore::RenderStyle::changeRequiresLayout):
+        Make sure changes to the break properties trigger relayout.
+
+        * rendering/style/RenderStyle.h:
+        Add getters and setters for the break-* properties and remove all
+        occurrences of the legacy page, column and region values from the RenderStyle.
+
+        * rendering/style/RenderStyleConstants.cpp:
+        (WebCore::alwaysPageBreak):
+        We have a helper function here for mapping several constant values to &quot;page&quot;.
+
+        * rendering/style/RenderStyleConstants.h:
+        Definitions of the new BreakBetween and BreakInside enums.
+
+        * rendering/style/StyleMultiColData.cpp:
+        (WebCore::StyleMultiColData::StyleMultiColData):
+        (WebCore::StyleMultiColData::operator==):
+        * rendering/style/StyleMultiColData.h:
+        Remove the column-specific break data.
+
+        * rendering/style/StyleRareNonInheritedData.cpp:
+        (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
+        (WebCore::StyleRareNonInheritedData::operator==):
+        * rendering/style/StyleRareNonInheritedData.h:
+        Remove the region-specific break data and replace it with generic break
+        data that is now used by all three pagination models.
+
</ins><span class="cx"> 2016-01-29  Per Arne Vollan  &lt;peavo@outlook.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [Win] Fix compile error.
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSComputedStyleDeclarationcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp (195891 => 195892)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp        2016-01-30 12:53:59 UTC (rev 195891)
+++ trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp        2016-01-30 15:28:48 UTC (rev 195892)
</span><span class="lines">@@ -2069,6 +2069,57 @@
</span><span class="cx">     return !(style &amp;&amp; (style-&gt;*lengthGetter)().isFixed());
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+static CSSValueID convertToPageBreak(BreakBetween value)
+{
+    if (value == PageBreakBetween || value == LeftPageBreakBetween || value == RightPageBreakBetween
+        || value == RectoPageBreakBetween || value == VersoPageBreakBetween)
+        return CSSValueAlways; // CSS 2.1 allows us to map these to always.
+    if (value == AvoidBreakBetween || value == AvoidPageBreakBetween)
+        return CSSValueAvoid;
+    return CSSValueAuto;
+}
+
+static CSSValueID convertToColumnBreak(BreakBetween value)
+{
+    if (value == ColumnBreakBetween)
+        return CSSValueAlways;
+    if (value == AvoidBreakBetween || value == AvoidColumnBreakBetween)
+        return CSSValueAvoid;
+    return CSSValueAuto;
+}
+
+static CSSValueID convertToPageBreak(BreakInside value)
+{
+    if (value == AvoidBreakInside || value == AvoidPageBreakInside)
+        return CSSValueAvoid;
+    return CSSValueAuto;
+}
+
+static CSSValueID convertToColumnBreak(BreakInside value)
+{
+    if (value == AvoidBreakInside || value == AvoidColumnBreakInside)
+        return CSSValueAvoid;
+    return CSSValueAuto;
+}
+
+#if ENABLE(CSS_REGIONS)
+static CSSValueID convertToRegionBreak(BreakBetween value)
+{
+    if (value == RegionBreakBetween)
+        return CSSValueAlways;
+    if (value == AvoidBreakBetween || value == AvoidRegionBreakBetween)
+        return CSSValueAvoid;
+    return CSSValueAuto;
+}
+    
+static CSSValueID convertToRegionBreak(BreakInside value)
+{
+    if (value == AvoidBreakInside || value == AvoidRegionBreakInside)
+        return CSSValueAvoid;
+    return CSSValueAuto;
+}
+#endif
+    
</ins><span class="cx"> static bool isLayoutDependent(CSSPropertyID propertyID, RenderStyle* style, RenderObject* renderer)
</span><span class="cx"> {
</span><span class="cx">     switch (propertyID) {
</span><span class="lines">@@ -2604,11 +2655,11 @@
</span><span class="cx">         case CSSPropertyColumnSpan:
</span><span class="cx">             return cssValuePool.createIdentifierValue(style-&gt;columnSpan() ? CSSValueAll : CSSValueNone);
</span><span class="cx">         case CSSPropertyWebkitColumnBreakAfter:
</span><del>-            return cssValuePool.createValue(style-&gt;columnBreakAfter());
</del><ins>+            return cssValuePool.createValue(convertToColumnBreak(style-&gt;breakAfter()));
</ins><span class="cx">         case CSSPropertyWebkitColumnBreakBefore:
</span><del>-            return cssValuePool.createValue(style-&gt;columnBreakBefore());
</del><ins>+            return cssValuePool.createValue(convertToColumnBreak(style-&gt;breakBefore()));
</ins><span class="cx">         case CSSPropertyWebkitColumnBreakInside:
</span><del>-            return cssValuePool.createValue(style-&gt;columnBreakInside());
</del><ins>+            return cssValuePool.createValue(convertToColumnBreak(style-&gt;breakInside()));
</ins><span class="cx">         case CSSPropertyColumnWidth:
</span><span class="cx">             if (style-&gt;hasAutoColumnWidth())
</span><span class="cx">                 return cssValuePool.createIdentifierValue(CSSValueAuto);
</span><span class="lines">@@ -2617,11 +2668,11 @@
</span><span class="cx">             return cssValuePool.createValue(style-&gt;tabSize(), CSSPrimitiveValue::CSS_NUMBER);
</span><span class="cx"> #if ENABLE(CSS_REGIONS)
</span><span class="cx">         case CSSPropertyWebkitRegionBreakAfter:
</span><del>-            return cssValuePool.createValue(style-&gt;regionBreakAfter());
</del><ins>+            return cssValuePool.createValue(convertToRegionBreak(style-&gt;breakAfter()));
</ins><span class="cx">         case CSSPropertyWebkitRegionBreakBefore:
</span><del>-            return cssValuePool.createValue(style-&gt;regionBreakBefore());
</del><ins>+            return cssValuePool.createValue(convertToRegionBreak(style-&gt;breakBefore()));
</ins><span class="cx">         case CSSPropertyWebkitRegionBreakInside:
</span><del>-            return cssValuePool.createValue(style-&gt;regionBreakInside());
</del><ins>+            return cssValuePool.createValue(convertToRegionBreak(style-&gt;breakInside()));
</ins><span class="cx"> #endif
</span><span class="cx">         case CSSPropertyCursor: {
</span><span class="cx">             RefPtr&lt;CSSValueList&gt; list;
</span><span class="lines">@@ -2956,16 +3007,17 @@
</span><span class="cx">         case CSSPropertyPaddingLeft:
</span><span class="cx">             return zoomAdjustedPaddingOrMarginPixelValue&lt;&amp;RenderStyle::paddingLeft, &amp;RenderBoxModelObject::computedCSSPaddingLeft&gt;(*style, renderer);
</span><span class="cx">         case CSSPropertyPageBreakAfter:
</span><del>-            return cssValuePool.createValue(style-&gt;pageBreakAfter());
</del><ins>+            return cssValuePool.createValue(convertToPageBreak(style-&gt;breakAfter()));
</ins><span class="cx">         case CSSPropertyPageBreakBefore:
</span><del>-            return cssValuePool.createValue(style-&gt;pageBreakBefore());
-        case CSSPropertyPageBreakInside: {
-            EPageBreak pageBreak = style-&gt;pageBreakInside();
-            ASSERT(pageBreak != PBALWAYS);
-            if (pageBreak == PBALWAYS)
-                return nullptr;
-            return cssValuePool.createValue(style-&gt;pageBreakInside());
-        }
</del><ins>+            return cssValuePool.createValue(convertToPageBreak(style-&gt;breakBefore()));
+        case CSSPropertyPageBreakInside:
+            return cssValuePool.createValue(convertToPageBreak(style-&gt;breakInside()));
+        case CSSPropertyBreakAfter:
+            return cssValuePool.createValue(style-&gt;breakAfter());
+        case CSSPropertyBreakBefore:
+            return cssValuePool.createValue(style-&gt;breakBefore());
+        case CSSPropertyBreakInside:
+            return cssValuePool.createValue(style-&gt;breakInside());
</ins><span class="cx">         case CSSPropertyPosition:
</span><span class="cx">             return cssValuePool.createValue(style-&gt;position());
</span><span class="cx">         case CSSPropertyRight:
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSParsercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSParser.cpp (195891 => 195892)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSParser.cpp        2016-01-30 12:53:59 UTC (rev 195891)
+++ trunk/Source/WebCore/css/CSSParser.cpp        2016-01-30 15:28:48 UTC (rev 195892)
</span><span class="lines">@@ -1043,6 +1043,20 @@
</span><span class="cx">         if (valueID == CSSValueNormal || valueID == CSSValueHistoricalForms)
</span><span class="cx">             return true;
</span><span class="cx">         break;
</span><ins>+            
+    case CSSPropertyBreakAfter:
+    case CSSPropertyBreakBefore:
+        // auto | avoid | left | right | recto | verso | column | page | region | avoid-page | avoid-column | avoid-region
+        if (valueID == CSSValueAuto || valueID == CSSValueAvoid || valueID == CSSValueLeft || valueID == CSSValueRight
+            || valueID == CSSValueRecto || valueID == CSSValueVerso || valueID == CSSValueColumn || valueID == CSSValuePage
+            || valueID == CSSValueRegion || valueID == CSSValueAvoidColumn || valueID == CSSValueAvoidPage || valueID == CSSValueAvoidRegion)
+            return true;
+        break;
+    case CSSPropertyBreakInside:
+        // auto | avoid | avoid-page | avoid-column | avoid-region
+        if (valueID == CSSValueAuto || valueID == CSSValueAvoid || valueID == CSSValueAvoidColumn || valueID == CSSValueAvoidPage || valueID == CSSValueAvoidRegion)
+            return true;
+        break;
</ins><span class="cx">     default:
</span><span class="cx">         ASSERT_NOT_REACHED();
</span><span class="cx">         return false;
</span><span class="lines">@@ -1062,6 +1076,9 @@
</span><span class="cx">     case CSSPropertyBorderRightStyle:
</span><span class="cx">     case CSSPropertyBorderTopStyle:
</span><span class="cx">     case CSSPropertyBoxSizing:
</span><ins>+    case CSSPropertyBreakAfter:
+    case CSSPropertyBreakBefore:
+    case CSSPropertyBreakInside:
</ins><span class="cx">     case CSSPropertyCaptionSide:
</span><span class="cx">     case CSSPropertyClear:
</span><span class="cx">     case CSSPropertyDirection:
</span><span class="lines">@@ -3165,6 +3182,9 @@
</span><span class="cx">     case CSSPropertyBorderRightStyle:
</span><span class="cx">     case CSSPropertyBorderTopStyle:
</span><span class="cx">     case CSSPropertyBoxSizing:
</span><ins>+    case CSSPropertyBreakAfter:
+    case CSSPropertyBreakBefore:
+    case CSSPropertyBreakInside:
</ins><span class="cx">     case CSSPropertyCaptionSide:
</span><span class="cx">     case CSSPropertyClear:
</span><span class="cx">     case CSSPropertyDirection:
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSPrimitiveValueMappingsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSPrimitiveValueMappings.h (195891 => 195892)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSPrimitiveValueMappings.h        2016-01-30 12:53:59 UTC (rev 195891)
+++ trunk/Source/WebCore/css/CSSPrimitiveValueMappings.h        2016-01-30 15:28:48 UTC (rev 195892)
</span><span class="lines">@@ -2201,42 +2201,131 @@
</span><span class="cx">     return OVISIBLE;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-template&lt;&gt; inline CSSPrimitiveValue::CSSPrimitiveValue(EPageBreak e)
</del><ins>+template&lt;&gt; inline CSSPrimitiveValue::CSSPrimitiveValue(BreakBetween e)
</ins><span class="cx">     : CSSValue(PrimitiveClass)
</span><span class="cx"> {
</span><span class="cx">     m_primitiveUnitType = CSS_VALUE_ID;
</span><span class="cx">     switch (e) {
</span><del>-    case PBAUTO:
</del><ins>+    case AutoBreakBetween:
</ins><span class="cx">         m_value.valueID = CSSValueAuto;
</span><span class="cx">         break;
</span><del>-    case PBALWAYS:
-        m_value.valueID = CSSValueAlways;
-        break;
-    case PBAVOID:
</del><ins>+    case AvoidBreakBetween:
</ins><span class="cx">         m_value.valueID = CSSValueAvoid;
</span><span class="cx">         break;
</span><ins>+    case AvoidColumnBreakBetween:
+        m_value.valueID = CSSValueAvoidColumn;
+        break;
+    case AvoidPageBreakBetween:
+        m_value.valueID = CSSValueAvoidPage;
+        break;
+    case AvoidRegionBreakBetween:
+        m_value.valueID = CSSValueAvoidRegion;
+        break;
+    case ColumnBreakBetween:
+        m_value.valueID = CSSValueColumn;
+        break;
+    case PageBreakBetween:
+        m_value.valueID = CSSValuePage;
+        break;
+    case RegionBreakBetween:
+        m_value.valueID = CSSValueRegion;
+        break;
+    case LeftPageBreakBetween:
+        m_value.valueID = CSSValueLeft;
+        break;
+    case RightPageBreakBetween:
+        m_value.valueID = CSSValueRight;
+        break;
+    case RectoPageBreakBetween:
+        m_value.valueID = CSSValueRecto;
+        break;
+    case VersoPageBreakBetween:
+        m_value.valueID = CSSValueVerso;
+        break;
</ins><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-template&lt;&gt; inline CSSPrimitiveValue::operator EPageBreak() const
</del><ins>+template&lt;&gt; inline CSSPrimitiveValue::operator BreakBetween() const
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(isValueID());
</span><span class="cx"> 
</span><span class="cx">     switch (m_value.valueID) {
</span><span class="cx">     case CSSValueAuto:
</span><del>-        return PBAUTO;
</del><ins>+        return AutoBreakBetween;
+    case CSSValueAvoid:
+        return AvoidBreakBetween;
+    case CSSValueAvoidColumn:
+        return AvoidColumnBreakBetween;
+    case CSSValueAvoidPage:
+        return AvoidPageBreakBetween;
+    case CSSValueAvoidRegion:
+        return AvoidRegionBreakBetween;
+    case CSSValueColumn:
+        return ColumnBreakBetween;
+    case CSSValuePage:
+        return PageBreakBetween;
+    case CSSValueRegion:
+        return RegionBreakBetween;
</ins><span class="cx">     case CSSValueLeft:
</span><ins>+        return LeftPageBreakBetween;
</ins><span class="cx">     case CSSValueRight:
</span><del>-    case CSSValueAlways:
-        return PBALWAYS; // CSS2.1: &quot;Conforming user agents may map left/right to always.&quot;
</del><ins>+        return RightPageBreakBetween;
+    case CSSValueRecto:
+        return RectoPageBreakBetween;
+    case CSSValueVerso:
+        return VersoPageBreakBetween;
+    default:
+        break;
+    }
+
+    ASSERT_NOT_REACHED();
+    return AutoBreakBetween;
+}
+
+template&lt;&gt; inline CSSPrimitiveValue::CSSPrimitiveValue(BreakInside e)
+    : CSSValue(PrimitiveClass)
+{
+    m_primitiveUnitType = CSS_VALUE_ID;
+    switch (e) {
+    case AutoBreakInside:
+        m_value.valueID = CSSValueAuto;
+        break;
+    case AvoidBreakInside:
+        m_value.valueID = CSSValueAvoid;
+        break;
+    case AvoidColumnBreakInside:
+        m_value.valueID = CSSValueAvoidColumn;
+        break;
+    case AvoidPageBreakInside:
+        m_value.valueID = CSSValueAvoidPage;
+        break;
+    case AvoidRegionBreakInside:
+        m_value.valueID = CSSValueAvoidRegion;
+        break;
+    }
+}
+
+template&lt;&gt; inline CSSPrimitiveValue::operator BreakInside() const
+{
+    ASSERT(isValueID());
+    
+    switch (m_value.valueID) {
+    case CSSValueAuto:
+        return AutoBreakInside;
</ins><span class="cx">     case CSSValueAvoid:
</span><del>-        return PBAVOID;
</del><ins>+        return AvoidBreakInside;
+    case CSSValueAvoidColumn:
+        return AvoidColumnBreakInside;
+    case CSSValueAvoidPage:
+        return AvoidPageBreakInside;
+    case CSSValueAvoidRegion:
+        return AvoidRegionBreakInside;
</ins><span class="cx">     default:
</span><span class="cx">         break;
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     ASSERT_NOT_REACHED();
</span><del>-    return PBAUTO;
</del><ins>+    return AutoBreakInside;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> template&lt;&gt; inline CSSPrimitiveValue::CSSPrimitiveValue(EPosition e)
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSPropertyNamesin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSPropertyNames.in (195891 => 195892)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSPropertyNames.in        2016-01-30 12:53:59 UTC (rev 195891)
+++ trunk/Source/WebCore/css/CSSPropertyNames.in        2016-01-30 15:28:48 UTC (rev 195892)
</span><span class="lines">@@ -196,6 +196,9 @@
</span><span class="cx"> bottom [Initial=initialOffset, Converter=LengthOrAuto]
</span><span class="cx"> box-shadow [Custom=All]
</span><span class="cx"> box-sizing
</span><ins>+break-after [Initial=initialBreakBetween]
+break-before [Initial=initialBreakBetween]
+break-inside [Initial=initialBreakInside]
</ins><span class="cx"> buffered-rendering [SVG]
</span><span class="cx"> // -webkit-box-sizing worked in Safari 4 and earlier.
</span><span class="cx"> -webkit-box-sizing = box-sizing
</span><span class="lines">@@ -290,9 +293,9 @@
</span><span class="cx"> padding-right [Initial=initialPadding, Converter=Length]
</span><span class="cx"> padding-top [Initial=initialPadding, Converter=Length]
</span><span class="cx"> page [SkipBuilder]
</span><del>-page-break-after [Initial=initialPageBreak]
-page-break-before [Initial=initialPageBreak]
-page-break-inside [Initial=initialPageBreak]
</del><ins>+page-break-after [Initial=initialBreakBetween, NameForMethods=BreakAfter, Converter=PageBreakBetween]
+page-break-before [Initial=initialBreakBetween, NameForMethods=BreakBefore, Converter=PageBreakBetween]
+page-break-inside [Initial=initialBreakInside, NameForMethods=BreakInside, Converter=PageBreakInside]
</ins><span class="cx"> paint-order [SVG, Converter=PaintOrder]
</span><span class="cx"> pointer-events [Inherited]
</span><span class="cx"> position
</span><span class="lines">@@ -427,9 +430,9 @@
</span><span class="cx"> // w_r &gt; 8px, b_r = 8 + 4 * sqrt((w_r - 8) / 2).
</span><span class="cx"> -webkit-box-shadow [Custom=All]
</span><span class="cx"> -webkit-column-axis
</span><del>--webkit-column-break-after [Initial=initialPageBreak]
--webkit-column-break-before [Initial=initialPageBreak]
--webkit-column-break-inside [Initial=initialPageBreak]
</del><ins>+-webkit-column-break-after [Initial=initialBreakBetween, NameForMethods=BreakAfter, Converter=ColumnBreakBetween]
+-webkit-column-break-before [Initial=initialBreakBetween, NameForMethods=BreakBefore, Converter=ColumnBreakBetween]
+-webkit-column-break-inside [Initial=initialBreakInside, NameForMethods=BreakInside, Converter=ColumnBreakInside]
</ins><span class="cx"> column-count [AutoFunctions]
</span><span class="cx"> -webkit-column-count = column-count
</span><span class="cx"> column-fill
</span><span class="lines">@@ -642,9 +645,9 @@
</span><span class="cx"> -webkit-flow-into [NameForMethods=FlowThread, Converter=StringOrNone]
</span><span class="cx"> -webkit-flow-from [NameForMethods=RegionThread, Converter=StringOrNone]
</span><span class="cx"> -webkit-region-fragment
</span><del>--webkit-region-break-after [Initial=initialPageBreak]
--webkit-region-break-before [Initial=initialPageBreak]
--webkit-region-break-inside [Initial=initialPageBreak]
</del><ins>+-webkit-region-break-after [Initial=initialBreakBetween, NameForMethods=BreakAfter, Converter=RegionBreakBetween]
+-webkit-region-break-before [Initial=initialBreakBetween, NameForMethods=BreakBefore, Converter=RegionBreakBetween]
+-webkit-region-break-inside [Initial=initialBreakInside, NameForMethods=BreakInside, Converter=RegionBreakInside]
</ins><span class="cx"> #endif
</span><span class="cx"> #if defined(ENABLE_CSS_SHAPES) &amp;&amp; ENABLE_CSS_SHAPES
</span><span class="cx"> -webkit-shape-outside [Converter=ShapeValue]
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSValueKeywordsin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSValueKeywords.in (195891 => 195892)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSValueKeywords.in        2016-01-30 12:53:59 UTC (rev 195891)
+++ trunk/Source/WebCore/css/CSSValueKeywords.in        2016-01-30 15:28:48 UTC (rev 195892)
</span><span class="lines">@@ -832,6 +832,17 @@
</span><span class="cx"> padding
</span><span class="cx"> padding-box
</span><span class="cx"> 
</span><ins>+//
+// CSS_PROP_BREAK_BEFORE/AFTER/INSIDE
+//
+avoid-column
+avoid-page
+avoid-region
+page
+recto
+region
+verso
+
</ins><span class="cx"> // CSS_SHAPES
</span><span class="cx"> margin-box
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorecssStyleBuilderConverterh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/StyleBuilderConverter.h (195891 => 195892)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/StyleBuilderConverter.h        2016-01-30 12:53:59 UTC (rev 195891)
+++ trunk/Source/WebCore/css/StyleBuilderConverter.h        2016-01-30 15:28:48 UTC (rev 195892)
</span><span class="lines">@@ -126,6 +126,15 @@
</span><span class="cx">     static EGlyphOrientation convertGlyphOrientationOrAuto(StyleResolver&amp;, CSSValue&amp;);
</span><span class="cx">     static Optional&lt;Length&gt; convertLineHeight(StyleResolver&amp;, CSSValue&amp;, float multiplier = 1.f);
</span><span class="cx">     static FontSynthesis convertFontSynthesis(StyleResolver&amp;, CSSValue&amp;);
</span><ins>+    
+    static BreakBetween convertPageBreakBetween(StyleResolver&amp;, CSSValue&amp;);
+    static BreakInside convertPageBreakInside(StyleResolver&amp;, CSSValue&amp;);
+    static BreakBetween convertColumnBreakBetween(StyleResolver&amp;, CSSValue&amp;);
+    static BreakInside convertColumnBreakInside(StyleResolver&amp;, CSSValue&amp;);
+#if ENABLE(CSS_REGIONS)
+    static BreakBetween convertRegionBreakBetween(StyleResolver&amp;, CSSValue&amp;);
+    static BreakInside convertRegionBreakInside(StyleResolver&amp;, CSSValue&amp;);
+#endif
</ins><span class="cx"> 
</span><span class="cx"> private:
</span><span class="cx">     friend class StyleBuilderCustom;
</span><span class="lines">@@ -1214,6 +1223,62 @@
</span><span class="cx">     return result;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+inline BreakBetween StyleBuilderConverter::convertPageBreakBetween(StyleResolver&amp;, CSSValue&amp; value)
+{
+    auto&amp; primitiveValue = downcast&lt;CSSPrimitiveValue&gt;(value);
+    if (primitiveValue.getValueID() == CSSValueAlways)
+        return PageBreakBetween;
+    if (primitiveValue.getValueID() == CSSValueAvoid)
+        return AvoidPageBreakBetween;
+    return primitiveValue;
+}
+
+inline BreakInside StyleBuilderConverter::convertPageBreakInside(StyleResolver&amp;, CSSValue&amp; value)
+{
+    auto&amp; primitiveValue = downcast&lt;CSSPrimitiveValue&gt;(value);
+    if (primitiveValue.getValueID() == CSSValueAvoid)
+        return AvoidPageBreakInside;
+    return primitiveValue;
+}
+
+inline BreakBetween StyleBuilderConverter::convertColumnBreakBetween(StyleResolver&amp;, CSSValue&amp; value)
+{
+    auto&amp; primitiveValue = downcast&lt;CSSPrimitiveValue&gt;(value);
+    if (primitiveValue.getValueID() == CSSValueAlways)
+        return ColumnBreakBetween;
+    if (primitiveValue.getValueID() == CSSValueAvoid)
+        return AvoidColumnBreakBetween;
+    return primitiveValue;
+}
+
+inline BreakInside StyleBuilderConverter::convertColumnBreakInside(StyleResolver&amp;, CSSValue&amp; value)
+{
+    auto&amp; primitiveValue = downcast&lt;CSSPrimitiveValue&gt;(value);
+    if (primitiveValue.getValueID() == CSSValueAvoid)
+        return AvoidColumnBreakInside;
+    return primitiveValue;
+}
+
+#if ENABLE(CSS_REGIONS)
+inline BreakBetween StyleBuilderConverter::convertRegionBreakBetween(StyleResolver&amp;, CSSValue&amp; value)
+{
+    auto&amp; primitiveValue = downcast&lt;CSSPrimitiveValue&gt;(value);
+    if (primitiveValue.getValueID() == CSSValueAlways)
+        return RegionBreakBetween;
+    if (primitiveValue.getValueID() == CSSValueAvoid)
+        return AvoidRegionBreakBetween;
+    return primitiveValue;
+}
+
+inline BreakInside StyleBuilderConverter::convertRegionBreakInside(StyleResolver&amp;, CSSValue&amp; value)
+{
+    auto&amp; primitiveValue = downcast&lt;CSSPrimitiveValue&gt;(value);
+    if (primitiveValue.getValueID() == CSSValueAvoid)
+        return AvoidRegionBreakInside;
+    return primitiveValue;
+}
+#endif
+
</ins><span class="cx"> } // namespace WebCore
</span><span class="cx"> 
</span><span class="cx"> #endif // StyleBuilderConverter_h
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderBlockcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderBlock.cpp (195891 => 195892)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderBlock.cpp        2016-01-30 12:53:59 UTC (rev 195891)
+++ trunk/Source/WebCore/rendering/RenderBlock.cpp        2016-01-30 15:28:48 UTC (rev 195892)
</span><span class="lines">@@ -1470,7 +1470,7 @@
</span><span class="cx"> bool RenderBlock::paintChild(RenderBox&amp; child, PaintInfo&amp; paintInfo, const LayoutPoint&amp; paintOffset, PaintInfo&amp; paintInfoForChild, bool usePrintRect, PaintBlockType paintType)
</span><span class="cx"> {
</span><span class="cx">     // Check for page-break-before: always, and if it's set, break and bail.
</span><del>-    bool checkBeforeAlways = !childrenInline() &amp;&amp; (usePrintRect &amp;&amp; child.style().pageBreakBefore() == PBALWAYS);
</del><ins>+    bool checkBeforeAlways = !childrenInline() &amp;&amp; (usePrintRect &amp;&amp; alwaysPageBreak(child.style().breakBefore()));
</ins><span class="cx">     LayoutUnit absoluteChildY = paintOffset.y() + child.y();
</span><span class="cx">     if (checkBeforeAlways
</span><span class="cx">         &amp;&amp; absoluteChildY &gt; paintInfo.rect.y()
</span><span class="lines">@@ -1499,7 +1499,7 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     // Check for page-break-after: always, and if it's set, break and bail.
</span><del>-    bool checkAfterAlways = !childrenInline() &amp;&amp; (usePrintRect &amp;&amp; child.style().pageBreakAfter() == PBALWAYS);
</del><ins>+    bool checkAfterAlways = !childrenInline() &amp;&amp; (usePrintRect &amp;&amp; alwaysPageBreak(child.style().breakAfter()));
</ins><span class="cx">     if (checkAfterAlways
</span><span class="cx">         &amp;&amp; (absoluteChildY + child.height()) &gt; paintInfo.rect.y()
</span><span class="cx">         &amp;&amp; (absoluteChildY + child.height()) &lt; paintInfo.rect.maxY()) {
</span><span class="lines">@@ -3533,9 +3533,10 @@
</span><span class="cx">     bool checkColumnBreaks = flowThread &amp;&amp; flowThread-&gt;shouldCheckColumnBreaks();
</span><span class="cx">     bool checkPageBreaks = !checkColumnBreaks &amp;&amp; view().layoutState()-&gt;m_pageLogicalHeight;
</span><span class="cx">     bool checkRegionBreaks = flowThread &amp;&amp; flowThread-&gt;isRenderNamedFlowThread();
</span><del>-    return child.isUnsplittableForPagination() || (checkColumnBreaks &amp;&amp; child.style().columnBreakInside() == PBAVOID)
-        || (checkPageBreaks &amp;&amp; child.style().pageBreakInside() == PBAVOID)
-        || (checkRegionBreaks &amp;&amp; child.style().regionBreakInside() == PBAVOID);
</del><ins>+    return child.isUnsplittableForPagination() || child.style().breakInside() == AvoidBreakInside
+        || (checkColumnBreaks &amp;&amp; child.style().breakInside() == AvoidColumnBreakInside)
+        || (checkPageBreaks &amp;&amp; child.style().breakInside() == AvoidPageBreakInside)
+        || (checkRegionBreaks &amp;&amp; child.style().breakInside() == AvoidRegionBreakInside);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void RenderBlock::computeRegionRangeForBoxChild(const RenderBox&amp; box) const
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderBlockFlowcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderBlockFlow.cpp (195891 => 195892)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderBlockFlow.cpp        2016-01-30 12:53:59 UTC (rev 195891)
+++ trunk/Source/WebCore/rendering/RenderBlockFlow.cpp        2016-01-30 15:28:48 UTC (rev 195892)
</span><span class="lines">@@ -1490,9 +1490,9 @@
</span><span class="cx">     bool checkColumnBreaks = flowThread &amp;&amp; flowThread-&gt;shouldCheckColumnBreaks();
</span><span class="cx">     bool checkPageBreaks = !checkColumnBreaks &amp;&amp; view().layoutState()-&gt;m_pageLogicalHeight; // FIXME: Once columns can print we have to check this.
</span><span class="cx">     bool checkRegionBreaks = flowThread &amp;&amp; flowThread-&gt;isRenderNamedFlowThread();
</span><del>-    bool checkBeforeAlways = (checkColumnBreaks &amp;&amp; child.style().columnBreakBefore() == PBALWAYS)
-        || (checkPageBreaks &amp;&amp; child.style().pageBreakBefore() == PBALWAYS)
-        || (checkRegionBreaks &amp;&amp; child.style().regionBreakBefore() == PBALWAYS);
</del><ins>+    bool checkBeforeAlways = (checkColumnBreaks &amp;&amp; child.style().breakBefore() == ColumnBreakBetween)
+        || (checkPageBreaks &amp;&amp; alwaysPageBreak(child.style().breakBefore()))
+        || (checkRegionBreaks &amp;&amp; child.style().breakBefore() == RegionBreakBetween);
</ins><span class="cx">     if (checkBeforeAlways &amp;&amp; inNormalFlow(child) &amp;&amp; hasNextPage(logicalOffset, IncludePageBoundary)) {
</span><span class="cx">         if (checkColumnBreaks) {
</span><span class="cx">             if (isInsideMulticolFlowThread)
</span><span class="lines">@@ -1516,9 +1516,9 @@
</span><span class="cx">     bool checkColumnBreaks = flowThread &amp;&amp; flowThread-&gt;shouldCheckColumnBreaks();
</span><span class="cx">     bool checkPageBreaks = !checkColumnBreaks &amp;&amp; view().layoutState()-&gt;m_pageLogicalHeight; // FIXME: Once columns can print we have to check this.
</span><span class="cx">     bool checkRegionBreaks = flowThread &amp;&amp; flowThread-&gt;isRenderNamedFlowThread();
</span><del>-    bool checkAfterAlways = (checkColumnBreaks &amp;&amp; child.style().columnBreakAfter() == PBALWAYS)
-        || (checkPageBreaks &amp;&amp; child.style().pageBreakAfter() == PBALWAYS)
-        || (checkRegionBreaks &amp;&amp; child.style().regionBreakAfter() == PBALWAYS);
</del><ins>+    bool checkAfterAlways = (checkColumnBreaks &amp;&amp; child.style().breakAfter() == ColumnBreakBetween)
+        || (checkPageBreaks &amp;&amp; alwaysPageBreak(child.style().breakAfter()))
+        || (checkRegionBreaks &amp;&amp; child.style().breakAfter() == RegionBreakBetween);
</ins><span class="cx">     if (checkAfterAlways &amp;&amp; inNormalFlow(child) &amp;&amp; hasNextPage(logicalOffset, IncludePageBoundary)) {
</span><span class="cx">         LayoutUnit marginOffset = marginInfo.canCollapseWithMarginBefore() ? LayoutUnit() : marginInfo.margin();
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingstyleRenderStylecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/style/RenderStyle.cpp (195891 => 195892)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/style/RenderStyle.cpp        2016-01-30 12:53:59 UTC (rev 195891)
+++ trunk/Source/WebCore/rendering/style/RenderStyle.cpp        2016-01-30 15:28:48 UTC (rev 195892)
</span><span class="lines">@@ -686,6 +686,12 @@
</span><span class="cx">     if (rareNonInheritedData-&gt;m_textCombine != other.rareNonInheritedData-&gt;m_textCombine)
</span><span class="cx">         return true;
</span><span class="cx"> 
</span><ins>+    // Check breaks.
+    if (rareNonInheritedData-&gt;m_breakBefore != other.rareNonInheritedData-&gt;m_breakBefore
+        || rareNonInheritedData-&gt;m_breakAfter != other.rareNonInheritedData-&gt;m_breakAfter
+        || rareNonInheritedData-&gt;m_breakInside != other.rareNonInheritedData-&gt;m_breakInside)
+        return true;
+
</ins><span class="cx">     // Overflow returns a layout hint.
</span><span class="cx">     if (noninherited_flags.overflowX() != other.noninherited_flags.overflowX()
</span><span class="cx">         || noninherited_flags.overflowY() != other.noninherited_flags.overflowY())
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingstyleRenderStyleh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/style/RenderStyle.h (195891 => 195892)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/style/RenderStyle.h        2016-01-30 12:53:59 UTC (rev 195891)
+++ trunk/Source/WebCore/rendering/style/RenderStyle.h        2016-01-30 15:28:48 UTC (rev 195892)
</span><span class="lines">@@ -169,9 +169,6 @@
</span><span class="cx">                 | unicodeBidiMask &lt;&lt; unicodeBidiOffset
</span><span class="cx">                 | verticalAlignMask &lt;&lt; verticalAlignOffset
</span><span class="cx">                 | floatingMask &lt;&lt; floatingOffset
</span><del>-                | pageBreakMask &lt;&lt; pageBreakInsideOffset
-                | pageBreakMask &lt;&lt; pageBreakBeforeOffset
-                | pageBreakMask &lt;&lt; pageBreakAfterOffset
</del><span class="cx">                 | oneBitMask &lt;&lt; explicitInheritanceOffset
</span><span class="cx">                 | tableLayoutBitMask &lt;&lt; tableLayoutOffset
</span><span class="cx">                 | hasViewportUnitsBitMask &lt;&lt; hasViewportUnitsOffset;
</span><span class="lines">@@ -213,16 +210,6 @@
</span><span class="cx">         EFloat floating() const { return static_cast&lt;EFloat&gt;(getValue(floatingMask, floatingOffset)); }
</span><span class="cx">         void setFloating(EFloat floating) { updateValue(floating, floatingMask, floatingOffset); }
</span><span class="cx"> 
</span><del>-        // For valid values of page-break-inside see http://www.w3.org/TR/CSS21/page.html#page-break-props
-        EPageBreak pageBreakInside() const { return static_cast&lt;EPageBreak&gt;(getValue(pageBreakMask, pageBreakInsideOffset)); }
-        void setPageBreakInside(EPageBreak pageBreakInside) { ASSERT(pageBreakInside == PBAUTO || pageBreakInside == PBAVOID); updateValue(pageBreakInside, pageBreakMask, pageBreakInsideOffset); }
-
-        EPageBreak pageBreakBefore() const { return static_cast&lt;EPageBreak&gt;(getValue(pageBreakMask, pageBreakBeforeOffset)); }
-        void setPageBreakBefore(EPageBreak pageBreakBefore) { updateValue(pageBreakBefore, pageBreakMask, pageBreakBeforeOffset); }
-
-        EPageBreak pageBreakAfter() const { return static_cast&lt;EPageBreak&gt;(getValue(pageBreakMask, pageBreakAfterOffset)); }
-        void setPageBreakAfter(EPageBreak pageBreakAfter) { updateValue(pageBreakAfter, pageBreakMask, pageBreakAfterOffset); }
-
</del><span class="cx">         bool hasAnyPublicPseudoStyles() const { return PUBLIC_PSEUDOID_MASK &amp; getValue(pseudoBitsMask, pseudoBitsOffset); }
</span><span class="cx">         bool hasPseudoStyle(PseudoId pseudo) const
</span><span class="cx">         {
</span><span class="lines">@@ -347,30 +334,27 @@
</span><span class="cx">         static const unsigned floatingBitCount = 2;
</span><span class="cx">         static const uint64_t floatingMask = (oneBitMask &lt;&lt; floatingBitCount) - 1;
</span><span class="cx">         static const unsigned floatingOffset = unicodeBidiOffset + unicodeBidiBitCount;
</span><del>-        static const unsigned pageBreakBitCount = 2;
-        static const uint64_t pageBreakMask = (oneBitMask &lt;&lt; pageBreakBitCount) - 1;
-        static const unsigned pageBreakInsideOffset = floatingOffset + floatingBitCount;
-        static const unsigned pageBreakBeforeOffset = pageBreakInsideOffset + pageBreakBitCount;
-        static const unsigned pageBreakAfterOffset = pageBreakBeforeOffset + pageBreakBitCount;
</del><ins>+        static const unsigned hasExplicitlySetDirectionBitcount = 1;
+        static const unsigned hasExplicitlySetDirectionOffset = floatingOffset + floatingBitCount;
+        static const unsigned hasExplicitlySetWritingModeBitcount = 1;
+        static const unsigned hasExplicitlySetWritingModeOffset = hasExplicitlySetDirectionOffset + hasExplicitlySetDirectionBitcount;
</ins><span class="cx"> 
</span><span class="cx">         // Byte 5.
</span><span class="cx">         static const unsigned explicitInheritanceBitCount = 1;
</span><del>-        static const unsigned explicitInheritanceOffset = pageBreakAfterOffset + pageBreakBitCount;
</del><ins>+        static const unsigned explicitInheritanceOffset = hasExplicitlySetWritingModeOffset + hasExplicitlySetWritingModeBitcount;
</ins><span class="cx">         static const unsigned tableLayoutBitCount = 1;
</span><span class="cx">         static const uint64_t tableLayoutBitMask = oneBitMask;
</span><span class="cx">         static const unsigned tableLayoutOffset = explicitInheritanceOffset + explicitInheritanceBitCount;
</span><span class="cx">         static const unsigned verticalAlignBitCount = 4;
</span><ins>+        static const unsigned verticalAlignPadding = 2;
+        static const unsigned verticalAlignAndPaddingBitCount = verticalAlignBitCount + verticalAlignPadding;
</ins><span class="cx">         static const uint64_t verticalAlignMask = (oneBitMask &lt;&lt; verticalAlignBitCount) - 1;
</span><span class="cx">         static const unsigned verticalAlignOffset = tableLayoutOffset + tableLayoutBitCount;
</span><del>-        static const unsigned hasExplicitlySetDirectionBitcount = 1;
-        static const unsigned hasExplicitlySetDirectionOffset = verticalAlignOffset + verticalAlignBitCount;
-        static const unsigned hasExplicitlySetWritingModeBitcount = 1;
-        static const unsigned hasExplicitlySetWritingModeOffset = hasExplicitlySetDirectionOffset + hasExplicitlySetDirectionBitcount;
</del><span class="cx"> 
</span><span class="cx">         // Byte 6.
</span><span class="cx">         static const unsigned pseudoBitsBitCount = 7;
</span><span class="cx">         static const uint64_t pseudoBitsMask = (oneBitMask &lt;&lt; pseudoBitsBitCount) - 1;
</span><del>-        static const unsigned pseudoBitsOffset = hasExplicitlySetWritingModeOffset + hasExplicitlySetWritingModeBitcount;
</del><ins>+        static const unsigned pseudoBitsOffset = verticalAlignOffset + verticalAlignBitCount;
</ins><span class="cx"> 
</span><span class="cx">         static const unsigned hasViewportUnitsBitCount = 1;
</span><span class="cx">         static const uint64_t hasViewportUnitsBitMask = (oneBitMask &lt;&lt; hasViewportUnitsBitCount) - 1;
</span><span class="lines">@@ -393,8 +377,7 @@
</span><span class="cx">         static const unsigned affectedByDragOffset = affectedByActiveOffset + 1;
</span><span class="cx">         static const unsigned isLinkOffset = affectedByDragOffset + 1;
</span><span class="cx"> 
</span><del>-
-        // 62 bits are assigned. There are 2 bits available currently used as padding to improve code generation.
</del><ins>+        // 60 bits are assigned. There are 4 bits available currently used as padding to improve code generation.
</ins><span class="cx">         // If you add more style bits here, you will also need to update RenderStyle::copyNonInheritedFrom().
</span><span class="cx">         uint64_t m_flags;
</span><span class="cx">     };
</span><span class="lines">@@ -891,11 +874,11 @@
</span><span class="cx">     short orphans() const { return rareInheritedData-&gt;orphans; }
</span><span class="cx">     bool hasAutoWidows() const { return rareInheritedData-&gt;m_hasAutoWidows; }
</span><span class="cx">     bool hasAutoOrphans() const { return rareInheritedData-&gt;m_hasAutoOrphans; }
</span><del>-    EPageBreak pageBreakInside() const { return noninherited_flags.pageBreakInside(); }
-    EPageBreak pageBreakBefore() const { return noninherited_flags.pageBreakBefore(); }
-    EPageBreak pageBreakAfter() const { return noninherited_flags.pageBreakAfter(); }
</del><span class="cx"> 
</span><span class="cx">     // CSS3 Getter Methods
</span><ins>+    BreakInside breakInside() const { return static_cast&lt;BreakInside&gt;(rareNonInheritedData-&gt;m_breakInside); }
+    BreakBetween breakBefore() const { return static_cast&lt;BreakBetween&gt;(rareNonInheritedData-&gt;m_breakBefore); }
+    BreakBetween breakAfter() const { return static_cast&lt;BreakBetween&gt;(rareNonInheritedData-&gt;m_breakAfter); }
</ins><span class="cx"> 
</span><span class="cx">     float outlineOffset() const
</span><span class="cx">     {
</span><span class="lines">@@ -1038,12 +1021,7 @@
</span><span class="cx">     unsigned short columnRuleWidth() const { return rareNonInheritedData-&gt;m_multiCol-&gt;ruleWidth(); }
</span><span class="cx">     bool columnRuleIsTransparent() const { return rareNonInheritedData-&gt;m_multiCol-&gt;m_rule.isTransparent(); }
</span><span class="cx">     ColumnSpan columnSpan() const { return static_cast&lt;ColumnSpan&gt;(rareNonInheritedData-&gt;m_multiCol-&gt;m_columnSpan); }
</span><del>-    EPageBreak columnBreakBefore() const { return static_cast&lt;EPageBreak&gt;(rareNonInheritedData-&gt;m_multiCol-&gt;m_breakBefore); }
-    EPageBreak columnBreakInside() const { return static_cast&lt;EPageBreak&gt;(rareNonInheritedData-&gt;m_multiCol-&gt;m_breakInside); }
-    EPageBreak columnBreakAfter() const { return static_cast&lt;EPageBreak&gt;(rareNonInheritedData-&gt;m_multiCol-&gt;m_breakAfter); }
-    EPageBreak regionBreakBefore() const { return static_cast&lt;EPageBreak&gt;(rareNonInheritedData-&gt;m_regionBreakBefore); }
-    EPageBreak regionBreakInside() const { return static_cast&lt;EPageBreak&gt;(rareNonInheritedData-&gt;m_regionBreakInside); }
-    EPageBreak regionBreakAfter() const { return static_cast&lt;EPageBreak&gt;(rareNonInheritedData-&gt;m_regionBreakAfter); }
</del><ins>+
</ins><span class="cx">     const TransformOperations&amp; transform() const { return rareNonInheritedData-&gt;m_transform-&gt;m_operations; }
</span><span class="cx">     const Length&amp; transformOriginX() const { return rareNonInheritedData-&gt;m_transform-&gt;m_x; }
</span><span class="cx">     const Length&amp; transformOriginY() const { return rareNonInheritedData-&gt;m_transform-&gt;m_y; }
</span><span class="lines">@@ -1509,11 +1487,6 @@
</span><span class="cx">     void setHasAutoOrphans() { SET_VAR(rareInheritedData, m_hasAutoOrphans, true); SET_VAR(rareInheritedData, orphans, initialOrphans()); }
</span><span class="cx">     void setOrphans(short o) { SET_VAR(rareInheritedData, m_hasAutoOrphans, false); SET_VAR(rareInheritedData, orphans, o); }
</span><span class="cx"> 
</span><del>-    // For valid values of page-break-inside see http://www.w3.org/TR/CSS21/page.html#page-break-props
-    void setPageBreakInside(EPageBreak b) { noninherited_flags.setPageBreakInside(b); }
-    void setPageBreakBefore(EPageBreak b) { noninherited_flags.setPageBreakBefore(b); }
-    void setPageBreakAfter(EPageBreak b) { noninherited_flags.setPageBreakAfter(b); }
-
</del><span class="cx">     // CSS3 Setters
</span><span class="cx">     void setOutlineOffset(float v) { SET_VAR(m_background, m_outline.m_offset, v); }
</span><span class="cx">     void setTextShadow(std::unique_ptr&lt;ShadowData&gt;, bool add = false);
</span><span class="lines">@@ -1620,13 +1593,6 @@
</span><span class="cx">     void setColumnRuleWidth(unsigned short w) { SET_VAR(rareNonInheritedData.access()-&gt;m_multiCol, m_rule.m_width, w); }
</span><span class="cx">     void resetColumnRule() { SET_VAR(rareNonInheritedData.access()-&gt;m_multiCol, m_rule, BorderValue()); }
</span><span class="cx">     void setColumnSpan(ColumnSpan columnSpan) { SET_VAR(rareNonInheritedData.access()-&gt;m_multiCol, m_columnSpan, columnSpan); }
</span><del>-    void setColumnBreakBefore(EPageBreak p) { SET_VAR(rareNonInheritedData.access()-&gt;m_multiCol, m_breakBefore, p); }
-    // For valid values of column-break-inside see http://www.w3.org/TR/css3-multicol/#break-before-break-after-break-inside
-    void setColumnBreakInside(EPageBreak p) { ASSERT(p == PBAUTO || p == PBAVOID); SET_VAR(rareNonInheritedData.access()-&gt;m_multiCol, m_breakInside, p); }
-    void setColumnBreakAfter(EPageBreak p) { SET_VAR(rareNonInheritedData.access()-&gt;m_multiCol, m_breakAfter, p); }
-    void setRegionBreakBefore(EPageBreak p) { SET_VAR(rareNonInheritedData, m_regionBreakBefore, p); }
-    void setRegionBreakInside(EPageBreak p) { ASSERT(p == PBAUTO || p == PBAVOID); SET_VAR(rareNonInheritedData, m_regionBreakInside, p); }
-    void setRegionBreakAfter(EPageBreak p) { SET_VAR(rareNonInheritedData, m_regionBreakAfter, p); }
</del><span class="cx">     void inheritColumnPropertiesFrom(RenderStyle* parent) { rareNonInheritedData.access()-&gt;m_multiCol = parent-&gt;rareNonInheritedData-&gt;m_multiCol; }
</span><span class="cx">     void setTransform(const TransformOperations&amp; ops) { SET_VAR(rareNonInheritedData.access()-&gt;m_transform, m_operations, ops); }
</span><span class="cx">     void setTransformOriginX(Length length) { SET_VAR(rareNonInheritedData.access()-&gt;m_transform, m_x, WTFMove(length)); }
</span><span class="lines">@@ -1653,6 +1619,10 @@
</span><span class="cx"> 
</span><span class="cx">     void setTabSize(unsigned size) { SET_VAR(rareInheritedData, m_tabSize, size); }
</span><span class="cx"> 
</span><ins>+    void setBreakBefore(BreakBetween breakBehavior) { SET_VAR(rareNonInheritedData, m_breakBefore, breakBehavior); }
+    void setBreakAfter(BreakBetween breakBehavior) { SET_VAR(rareNonInheritedData, m_breakAfter, breakBehavior); }
+    void setBreakInside(BreakInside breakBehavior) { SET_VAR(rareNonInheritedData, m_breakInside, breakBehavior); }
+
</ins><span class="cx">     // End CSS3 Setters
</span><span class="cx"> 
</span><span class="cx">     void setLineGrid(const AtomicString&amp; lineGrid) { SET_VAR(rareInheritedData, m_lineGrid, lineGrid); }
</span><span class="lines">@@ -1909,7 +1879,8 @@
</span><span class="cx">     static EPosition initialPosition() { return StaticPosition; }
</span><span class="cx">     static EVerticalAlign initialVerticalAlign() { return BASELINE; }
</span><span class="cx">     static EFloat initialFloating() { return NoFloat; }
</span><del>-    static EPageBreak initialPageBreak() { return PBAUTO; }
</del><ins>+    static BreakBetween initialBreakBetween() { return AutoBreakBetween; }
+    static BreakInside initialBreakInside() { return AutoBreakInside; }
</ins><span class="cx">     static ETableLayout initialTableLayout() { return TAUTO; }
</span><span class="cx">     static EBorderCollapse initialBorderCollapse() { return BSEPARATE; }
</span><span class="cx">     static EBorderStyle initialBorderStyle() { return BNONE; }
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingstyleRenderStyleConstantscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/style/RenderStyleConstants.cpp (195891 => 195892)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/style/RenderStyleConstants.cpp        2016-01-30 12:53:59 UTC (rev 195891)
+++ trunk/Source/WebCore/rendering/style/RenderStyleConstants.cpp        2016-01-30 15:28:48 UTC (rev 195892)
</span><span class="lines">@@ -96,4 +96,9 @@
</span><span class="cx">     return ts;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+bool alwaysPageBreak(BreakBetween between)
+{
+    return between &gt;= PageBreakBetween;
+}
+
</ins><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingstyleRenderStyleConstantsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/style/RenderStyleConstants.h (195891 => 195892)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/style/RenderStyleConstants.h        2016-01-30 12:53:59 UTC (rev 195891)
+++ trunk/Source/WebCore/rendering/style/RenderStyleConstants.h        2016-01-30 15:28:48 UTC (rev 195892)
</span><span class="lines">@@ -475,10 +475,15 @@
</span><span class="cx">     TextZoomNormal, TextZoomReset
</span><span class="cx"> };
</span><span class="cx"> 
</span><del>-enum EPageBreak {
-    PBAUTO, PBALWAYS, PBAVOID
</del><ins>+enum BreakBetween {
+    AutoBreakBetween, AvoidBreakBetween, AvoidColumnBreakBetween, AvoidPageBreakBetween, AvoidRegionBreakBetween, ColumnBreakBetween, RegionBreakBetween, PageBreakBetween, LeftPageBreakBetween, RightPageBreakBetween, RectoPageBreakBetween, VersoPageBreakBetween
</ins><span class="cx"> };
</span><del>-
</del><ins>+bool alwaysPageBreak(BreakBetween);
+    
+enum BreakInside {
+    AutoBreakInside, AvoidBreakInside, AvoidColumnBreakInside, AvoidPageBreakInside, AvoidRegionBreakInside
+};
+    
</ins><span class="cx"> enum EEmptyCell {
</span><span class="cx">     SHOW, HIDE
</span><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingstyleStyleMultiColDatacpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/style/StyleMultiColData.cpp (195891 => 195892)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/style/StyleMultiColData.cpp        2016-01-30 12:53:59 UTC (rev 195891)
+++ trunk/Source/WebCore/rendering/style/StyleMultiColData.cpp        2016-01-30 15:28:48 UTC (rev 195892)
</span><span class="lines">@@ -35,9 +35,6 @@
</span><span class="cx">     , m_normalGap(true)
</span><span class="cx">     , m_fill(RenderStyle::initialColumnFill())
</span><span class="cx">     , m_columnSpan(false)
</span><del>-    , m_breakBefore(RenderStyle::initialPageBreak())
-    , m_breakAfter(RenderStyle::initialPageBreak())
-    , m_breakInside(RenderStyle::initialPageBreak())
</del><span class="cx">     , m_axis(RenderStyle::initialColumnAxis())
</span><span class="cx">     , m_progression(RenderStyle::initialColumnProgression())
</span><span class="cx"> {
</span><span class="lines">@@ -55,9 +52,6 @@
</span><span class="cx">     , m_normalGap(o.m_normalGap)
</span><span class="cx">     , m_fill(o.m_fill)
</span><span class="cx">     , m_columnSpan(o.m_columnSpan)
</span><del>-    , m_breakBefore(o.m_breakBefore)
-    , m_breakAfter(o.m_breakAfter)
-    , m_breakInside(o.m_breakInside)
</del><span class="cx">     , m_axis(o.m_axis)
</span><span class="cx">     , m_progression(o.m_progression)
</span><span class="cx"> {
</span><span class="lines">@@ -71,10 +65,9 @@
</span><span class="cx"> bool StyleMultiColData::operator==(const StyleMultiColData&amp; o) const
</span><span class="cx"> {
</span><span class="cx">     return m_width == o.m_width &amp;&amp; m_count == o.m_count &amp;&amp; m_gap == o.m_gap
</span><del>-        &amp;&amp; m_rule == o.m_rule &amp;&amp; m_visitedLinkColumnRuleColor == o.m_visitedLinkColumnRuleColor &amp;&amp; m_breakBefore == o.m_breakBefore
</del><ins>+        &amp;&amp; m_rule == o.m_rule &amp;&amp; m_visitedLinkColumnRuleColor == o.m_visitedLinkColumnRuleColor
</ins><span class="cx">         &amp;&amp; m_autoWidth == o.m_autoWidth &amp;&amp; m_autoCount == o.m_autoCount &amp;&amp; m_normalGap == o.m_normalGap
</span><span class="cx">         &amp;&amp; m_fill == o.m_fill &amp;&amp; m_columnSpan == o.m_columnSpan
</span><del>-        &amp;&amp; m_breakAfter == o.m_breakAfter &amp;&amp; m_breakInside == o.m_breakInside
</del><span class="cx">         &amp;&amp; m_axis == o.m_axis &amp;&amp; m_progression == o.m_progression;
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingstyleStyleMultiColDatah"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/style/StyleMultiColData.h (195891 => 195892)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/style/StyleMultiColData.h        2016-01-30 12:53:59 UTC (rev 195891)
+++ trunk/Source/WebCore/rendering/style/StyleMultiColData.h        2016-01-30 15:28:48 UTC (rev 195892)
</span><span class="lines">@@ -64,9 +64,6 @@
</span><span class="cx">     bool m_normalGap : 1;
</span><span class="cx">     unsigned m_fill : 1; // ColumnFill
</span><span class="cx">     unsigned m_columnSpan : 1;
</span><del>-    unsigned m_breakBefore : 2; // EPageBreak
-    unsigned m_breakAfter : 2; // EPageBreak
-    unsigned m_breakInside : 2; // EPageBreak
</del><span class="cx">     unsigned m_axis : 2; // ColumnAxis
</span><span class="cx">     unsigned m_progression : 2; // ColumnProgression
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingstyleStyleRareNonInheritedDatacpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/style/StyleRareNonInheritedData.cpp (195891 => 195892)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/style/StyleRareNonInheritedData.cpp        2016-01-30 12:53:59 UTC (rev 195891)
+++ trunk/Source/WebCore/rendering/style/StyleRareNonInheritedData.cpp        2016-01-30 15:28:48 UTC (rev 195892)
</span><span class="lines">@@ -86,9 +86,6 @@
</span><span class="cx">     , m_scrollSnapType(static_cast&lt;unsigned&gt;(RenderStyle::initialScrollSnapType()))
</span><span class="cx"> #endif
</span><span class="cx">     , m_regionFragment(RenderStyle::initialRegionFragment())
</span><del>-    , m_regionBreakAfter(RenderStyle::initialPageBreak())
-    , m_regionBreakBefore(RenderStyle::initialPageBreak())
-    , m_regionBreakInside(RenderStyle::initialPageBreak())
</del><span class="cx">     , m_pageSizeType(PAGE_SIZE_AUTO)
</span><span class="cx">     , m_transformStyle3D(RenderStyle::initialTransformStyle3D())
</span><span class="cx">     , m_backfaceVisibility(RenderStyle::initialBackfaceVisibility())
</span><span class="lines">@@ -107,6 +104,9 @@
</span><span class="cx">     , m_isolation(RenderStyle::initialIsolation())
</span><span class="cx"> #endif
</span><span class="cx">     , m_objectFit(RenderStyle::initialObjectFit())
</span><ins>+    , m_breakBefore(RenderStyle::initialBreakBetween())
+    , m_breakAfter(RenderStyle::initialBreakBetween())
+    , m_breakInside(RenderStyle::initialBreakInside())
</ins><span class="cx"> {
</span><span class="cx">     m_maskBoxImage.setMaskDefaults();
</span><span class="cx"> }
</span><span class="lines">@@ -178,9 +178,6 @@
</span><span class="cx">     , m_scrollSnapType(o.m_scrollSnapType)
</span><span class="cx"> #endif
</span><span class="cx">     , m_regionFragment(o.m_regionFragment)
</span><del>-    , m_regionBreakAfter(o.m_regionBreakAfter)
-    , m_regionBreakBefore(o.m_regionBreakBefore)
-    , m_regionBreakInside(o.m_regionBreakInside)
</del><span class="cx">     , m_pageSizeType(o.m_pageSizeType)
</span><span class="cx">     , m_transformStyle3D(o.m_transformStyle3D)
</span><span class="cx">     , m_backfaceVisibility(o.m_backfaceVisibility)
</span><span class="lines">@@ -199,6 +196,9 @@
</span><span class="cx">     , m_isolation(o.m_isolation)
</span><span class="cx"> #endif
</span><span class="cx">     , m_objectFit(o.m_objectFit)
</span><ins>+    , m_breakBefore(o.m_breakBefore)
+    , m_breakAfter(o.m_breakAfter)
+    , m_breakInside(o.m_breakInside)
</ins><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -274,9 +274,6 @@
</span><span class="cx">         &amp;&amp; m_justifySelf == o.m_justifySelf
</span><span class="cx">         &amp;&amp; m_regionThread == o.m_regionThread
</span><span class="cx">         &amp;&amp; m_regionFragment == o.m_regionFragment
</span><del>-        &amp;&amp; m_regionBreakAfter == o.m_regionBreakAfter
-        &amp;&amp; m_regionBreakBefore == o.m_regionBreakBefore
-        &amp;&amp; m_regionBreakInside == o.m_regionBreakInside
</del><span class="cx">         &amp;&amp; m_pageSizeType == o.m_pageSizeType
</span><span class="cx">         &amp;&amp; m_transformStyle3D == o.m_transformStyle3D
</span><span class="cx">         &amp;&amp; m_backfaceVisibility == o.m_backfaceVisibility
</span><span class="lines">@@ -300,7 +297,10 @@
</span><span class="cx">         &amp;&amp; m_isolation == o.m_isolation
</span><span class="cx"> #endif
</span><span class="cx">         &amp;&amp; m_aspectRatioType == o.m_aspectRatioType
</span><del>-        &amp;&amp; m_objectFit == o.m_objectFit;
</del><ins>+        &amp;&amp; m_objectFit == o.m_objectFit
+        &amp;&amp; m_breakAfter == o.m_breakAfter
+        &amp;&amp; m_breakBefore == o.m_breakBefore
+        &amp;&amp; m_breakInside == o.m_breakInside;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool StyleRareNonInheritedData::contentDataEquivalent(const StyleRareNonInheritedData&amp; o) const
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingstyleStyleRareNonInheritedDatah"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/style/StyleRareNonInheritedData.h (195891 => 195892)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/style/StyleRareNonInheritedData.h        2016-01-30 12:53:59 UTC (rev 195891)
+++ trunk/Source/WebCore/rendering/style/StyleRareNonInheritedData.h        2016-01-30 15:28:48 UTC (rev 195892)
</span><span class="lines">@@ -194,10 +194,6 @@
</span><span class="cx"> 
</span><span class="cx">     unsigned m_regionFragment : 1; // RegionFragment
</span><span class="cx"> 
</span><del>-    unsigned m_regionBreakAfter : 2; // EPageBreak
-    unsigned m_regionBreakBefore : 2; // EPageBreak
-    unsigned m_regionBreakInside : 2; // EPageBreak
-
</del><span class="cx">     unsigned m_pageSizeType : 2; // PageSizeType
</span><span class="cx">     unsigned m_transformStyle3D : 1; // ETransformStyle3D
</span><span class="cx">     unsigned m_backfaceVisibility : 1; // EBackfaceVisibility
</span><span class="lines">@@ -223,6 +219,10 @@
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx">     unsigned m_objectFit : 3; // ObjectFit
</span><ins>+    
+    unsigned m_breakBefore : 4; // BreakBetween
+    unsigned m_breakAfter : 4;
+    unsigned m_breakInside : 3; // BreakInside
</ins><span class="cx"> 
</span><span class="cx"> private:
</span><span class="cx">     StyleRareNonInheritedData();
</span></span></pre>
</div>
</div>

</body>
</html>