<!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>[164482] trunk/Source/WebCore</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/164482">164482</a></dd>
<dt>Author</dt> <dd>stavila@adobe.com</dd>
<dt>Date</dt> <dd>2014-02-21 07:29:49 -0800 (Fri, 21 Feb 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>[CSS Regions] Use the named-flow-specific object RenderNamedFlowFragment instead of the generic RenderRegion whenever possible
https://bugs.webkit.org/show_bug.cgi?id=128599

Reviewed by Andrei Bucur.

Use the named flow specific RenderNamedFlowFragment instead of the generic RenderRegion, whenever possible.
Move named flow specific methods from RenderRegion to RenderNamedFlowFragment.

No new tests required.

* dom/Element.cpp:
(WebCore::Element::renderNamedFlowFragment):
(WebCore::Element::webkitRegionOverset):
(WebCore::Element::webkitGetRegionFlowRanges):
* dom/Element.h:
* inspector/InspectorCSSAgent.cpp:
(WebCore::InspectorCSSAgent::buildArrayForRegions):
* rendering/PaintInfo.h:
(WebCore::PaintInfo::PaintInfo):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::paint):
(WebCore::RenderBlock::paintObject):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::paintBoxDecorations):
(WebCore::RenderBox::pushContentsClip):
(WebCore::RenderBox::layoutOverflowRectForPropagation):
* rendering/RenderBox.h:
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::paintMaskForTextFillBox):
(WebCore::RenderBoxModelObject::paintFillLayerExtended):
* rendering/RenderBoxModelObject.h:
* rendering/RenderInline.h:
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::paint):
(WebCore::RenderLayer::paintLayer):
(WebCore::RenderLayer::paintLayerContents):
(WebCore::RenderLayer::paintLayerByApplyingTransform):
(WebCore::RenderLayer::updatePaintingInfoForFragments):
(WebCore::RenderLayer::paintTransformedLayerIntoFragments):
(WebCore::RenderLayer::paintBackgroundForFragments):
(WebCore::RenderLayer::paintForegroundForFragmentsWithPhase):
(WebCore::RenderLayer::paintOutlineForFragments):
(WebCore::RenderLayer::paintMaskForFragments):
(WebCore::RenderLayer::mapLayerClipRectsToFragmentationLayer):
(WebCore::RenderLayer::calculateClipRects):
* rendering/RenderLayer.h:
* rendering/RenderNamedFlowFragment.cpp:
(WebCore::RenderNamedFlowFragment::getRanges):
* rendering/RenderNamedFlowFragment.h:
* rendering/RenderNamedFlowThread.cpp:
(WebCore::RenderNamedFlowThread::updateWritingMode):
(WebCore::compareRenderNamedFlowFragments):
(WebCore::addFragmentToList):
(WebCore::RenderNamedFlowThread::addFragmentToNamedFlowThread):
(WebCore::RenderNamedFlowThread::addRegionToThread):
(WebCore::RenderNamedFlowThread::removeRegionFromThread):
(WebCore::RenderNamedFlowThread::computeOversetStateForRegions):
(WebCore::RenderNamedFlowThread::checkInvalidRegions):
(WebCore::RenderNamedFlowThread::getRanges):
(WebCore::RenderNamedFlowThread::checkRegionsWithStyling):
(WebCore::RenderNamedFlowThread::clearRenderObjectCustomStyle):
* rendering/RenderNamedFlowThread.h:
* rendering/RenderRegion.cpp:
* rendering/RenderRegion.h:
* rendering/RenderReplaced.cpp:
(WebCore::RenderReplaced::shouldPaint):
* rendering/RenderReplica.cpp:
(WebCore::RenderReplica::paint):
* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::paint):
* rendering/svg/RenderSVGRoot.cpp:
(WebCore::RenderSVGRoot::paintReplaced):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoredomElementcpp">trunk/Source/WebCore/dom/Element.cpp</a></li>
<li><a href="#trunkSourceWebCoredomElementh">trunk/Source/WebCore/dom/Element.h</a></li>
<li><a href="#trunkSourceWebCoreinspectorInspectorCSSAgentcpp">trunk/Source/WebCore/inspector/InspectorCSSAgent.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingPaintInfoh">trunk/Source/WebCore/rendering/PaintInfo.h</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderBlockcpp">trunk/Source/WebCore/rendering/RenderBlock.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderBoxcpp">trunk/Source/WebCore/rendering/RenderBox.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderBoxh">trunk/Source/WebCore/rendering/RenderBox.h</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderBoxModelObjectcpp">trunk/Source/WebCore/rendering/RenderBoxModelObject.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderBoxModelObjecth">trunk/Source/WebCore/rendering/RenderBoxModelObject.h</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderInlineh">trunk/Source/WebCore/rendering/RenderInline.h</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderLayercpp">trunk/Source/WebCore/rendering/RenderLayer.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderLayerh">trunk/Source/WebCore/rendering/RenderLayer.h</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderNamedFlowFragmentcpp">trunk/Source/WebCore/rendering/RenderNamedFlowFragment.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderNamedFlowFragmenth">trunk/Source/WebCore/rendering/RenderNamedFlowFragment.h</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderNamedFlowThreadcpp">trunk/Source/WebCore/rendering/RenderNamedFlowThread.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderNamedFlowThreadh">trunk/Source/WebCore/rendering/RenderNamedFlowThread.h</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderRegioncpp">trunk/Source/WebCore/rendering/RenderRegion.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderRegionh">trunk/Source/WebCore/rendering/RenderRegion.h</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderReplacedcpp">trunk/Source/WebCore/rendering/RenderReplaced.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderReplicacpp">trunk/Source/WebCore/rendering/RenderReplica.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRootInlineBoxcpp">trunk/Source/WebCore/rendering/RootInlineBox.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingsvgRenderSVGRootcpp">trunk/Source/WebCore/rendering/svg/RenderSVGRoot.cpp</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (164481 => 164482)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-02-21 11:26:44 UTC (rev 164481)
+++ trunk/Source/WebCore/ChangeLog        2014-02-21 15:29:49 UTC (rev 164482)
</span><span class="lines">@@ -1,3 +1,78 @@
</span><ins>+2014-02-21  Radu Stavila  &lt;stavila@adobe.com&gt;
+
+        [CSS Regions] Use the named-flow-specific object RenderNamedFlowFragment instead of the generic RenderRegion whenever possible
+        https://bugs.webkit.org/show_bug.cgi?id=128599
+
+        Reviewed by Andrei Bucur.
+
+        Use the named flow specific RenderNamedFlowFragment instead of the generic RenderRegion, whenever possible.
+        Move named flow specific methods from RenderRegion to RenderNamedFlowFragment.
+
+        No new tests required.
+
+        * dom/Element.cpp:
+        (WebCore::Element::renderNamedFlowFragment):
+        (WebCore::Element::webkitRegionOverset):
+        (WebCore::Element::webkitGetRegionFlowRanges):
+        * dom/Element.h:
+        * inspector/InspectorCSSAgent.cpp:
+        (WebCore::InspectorCSSAgent::buildArrayForRegions):
+        * rendering/PaintInfo.h:
+        (WebCore::PaintInfo::PaintInfo):
+        * rendering/RenderBlock.cpp:
+        (WebCore::RenderBlock::paint):
+        (WebCore::RenderBlock::paintObject):
+        * rendering/RenderBox.cpp:
+        (WebCore::RenderBox::paintBoxDecorations):
+        (WebCore::RenderBox::pushContentsClip):
+        (WebCore::RenderBox::layoutOverflowRectForPropagation):
+        * rendering/RenderBox.h:
+        * rendering/RenderBoxModelObject.cpp:
+        (WebCore::RenderBoxModelObject::paintMaskForTextFillBox):
+        (WebCore::RenderBoxModelObject::paintFillLayerExtended):
+        * rendering/RenderBoxModelObject.h:
+        * rendering/RenderInline.h:
+        * rendering/RenderLayer.cpp:
+        (WebCore::RenderLayer::paint):
+        (WebCore::RenderLayer::paintLayer):
+        (WebCore::RenderLayer::paintLayerContents):
+        (WebCore::RenderLayer::paintLayerByApplyingTransform):
+        (WebCore::RenderLayer::updatePaintingInfoForFragments):
+        (WebCore::RenderLayer::paintTransformedLayerIntoFragments):
+        (WebCore::RenderLayer::paintBackgroundForFragments):
+        (WebCore::RenderLayer::paintForegroundForFragmentsWithPhase):
+        (WebCore::RenderLayer::paintOutlineForFragments):
+        (WebCore::RenderLayer::paintMaskForFragments):
+        (WebCore::RenderLayer::mapLayerClipRectsToFragmentationLayer):
+        (WebCore::RenderLayer::calculateClipRects):
+        * rendering/RenderLayer.h:
+        * rendering/RenderNamedFlowFragment.cpp:
+        (WebCore::RenderNamedFlowFragment::getRanges):
+        * rendering/RenderNamedFlowFragment.h:
+        * rendering/RenderNamedFlowThread.cpp:
+        (WebCore::RenderNamedFlowThread::updateWritingMode):
+        (WebCore::compareRenderNamedFlowFragments):
+        (WebCore::addFragmentToList):
+        (WebCore::RenderNamedFlowThread::addFragmentToNamedFlowThread):
+        (WebCore::RenderNamedFlowThread::addRegionToThread):
+        (WebCore::RenderNamedFlowThread::removeRegionFromThread):
+        (WebCore::RenderNamedFlowThread::computeOversetStateForRegions):
+        (WebCore::RenderNamedFlowThread::checkInvalidRegions):
+        (WebCore::RenderNamedFlowThread::getRanges):
+        (WebCore::RenderNamedFlowThread::checkRegionsWithStyling):
+        (WebCore::RenderNamedFlowThread::clearRenderObjectCustomStyle):
+        * rendering/RenderNamedFlowThread.h:
+        * rendering/RenderRegion.cpp:
+        * rendering/RenderRegion.h:
+        * rendering/RenderReplaced.cpp:
+        (WebCore::RenderReplaced::shouldPaint):
+        * rendering/RenderReplica.cpp:
+        (WebCore::RenderReplica::paint):
+        * rendering/RootInlineBox.cpp:
+        (WebCore::RootInlineBox::paint):
+        * rendering/svg/RenderSVGRoot.cpp:
+        (WebCore::RenderSVGRoot::paintReplaced):
+
</ins><span class="cx"> 2014-02-21  Andrei Bucur  &lt;abucur@adobe.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [CSS Regions] Regions don't paint correctly in new-multicol elements
</span></span></pre></div>
<a id="trunkSourceWebCoredomElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Element.cpp (164481 => 164482)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Element.cpp        2014-02-21 11:26:44 UTC (rev 164481)
+++ trunk/Source/WebCore/dom/Element.cpp        2014-02-21 15:29:49 UTC (rev 164482)
</span><span class="lines">@@ -2549,12 +2549,12 @@
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-RenderRegion* Element::renderRegion() const
</del><ins>+RenderNamedFlowFragment* Element::renderNamedFlowFragment() const
</ins><span class="cx"> {
</span><span class="cx">     if (renderer() &amp;&amp; renderer()-&gt;isRenderNamedFlowFragmentContainer())
</span><span class="cx">         return toRenderBlockFlow(renderer())-&gt;renderNamedFlowFragment();
</span><span class="cx"> 
</span><del>-    return 0;
</del><ins>+    return nullptr;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(CSS_REGIONS)
</span><span class="lines">@@ -2580,10 +2580,10 @@
</span><span class="cx">     document().updateLayoutIgnorePendingStylesheets();
</span><span class="cx"> 
</span><span class="cx">     DEFINE_STATIC_LOCAL(AtomicString, undefinedState, (&quot;undefined&quot;, AtomicString::ConstructFromLiteral));
</span><del>-    if (!document().cssRegionsEnabled() || !renderRegion())
</del><ins>+    if (!document().cssRegionsEnabled() || !renderNamedFlowFragment())
</ins><span class="cx">         return undefinedState;
</span><span class="cx"> 
</span><del>-    switch (renderRegion()-&gt;regionOversetState()) {
</del><ins>+    switch (renderNamedFlowFragment()-&gt;regionOversetState()) {
</ins><span class="cx">     case RegionFit: {
</span><span class="cx">         DEFINE_STATIC_LOCAL(AtomicString, fitState, (&quot;fit&quot;, AtomicString::ConstructFromLiteral));
</span><span class="cx">         return fitState;
</span><span class="lines">@@ -2612,9 +2612,9 @@
</span><span class="cx"> 
</span><span class="cx">     document().updateLayoutIgnorePendingStylesheets();
</span><span class="cx">     if (renderer() &amp;&amp; renderer()-&gt;isRenderNamedFlowFragmentContainer()) {
</span><del>-        RenderNamedFlowFragment* region = toRenderBlockFlow(renderer())-&gt;renderNamedFlowFragment();
-        if (region-&gt;isValid())
-            region-&gt;getRanges(rangeObjects);
</del><ins>+        RenderNamedFlowFragment* namedFlowFragment = toRenderBlockFlow(renderer())-&gt;renderNamedFlowFragment();
+        if (namedFlowFragment-&gt;isValid())
+            namedFlowFragment-&gt;getRanges(rangeObjects);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     return rangeObjects;
</span></span></pre></div>
<a id="trunkSourceWebCoredomElementh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Element.h (164481 => 164482)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Element.h        2014-02-21 11:26:44 UTC (rev 164481)
+++ trunk/Source/WebCore/dom/Element.h        2014-02-21 15:29:49 UTC (rev 164482)
</span><span class="lines">@@ -47,7 +47,7 @@
</span><span class="cx"> class PlatformMouseEvent;
</span><span class="cx"> class PlatformWheelEvent;
</span><span class="cx"> class PseudoElement;
</span><del>-class RenderRegion;
</del><ins>+class RenderNamedFlowFragment;
</ins><span class="cx"> class ShadowRoot;
</span><span class="cx"> 
</span><span class="cx"> enum AffectedSelectorType {
</span><span class="lines">@@ -526,7 +526,7 @@
</span><span class="cx"> 
</span><span class="cx">     PassRef&lt;RenderStyle&gt; styleForRenderer();
</span><span class="cx"> 
</span><del>-    RenderRegion* renderRegion() const;
</del><ins>+    RenderNamedFlowFragment* renderNamedFlowFragment() const;
</ins><span class="cx"> 
</span><span class="cx"> #if ENABLE(CSS_REGIONS)
</span><span class="cx">     virtual bool shouldMoveToFlowThread(const RenderStyle&amp;) const;
</span></span></pre></div>
<a id="trunkSourceWebCoreinspectorInspectorCSSAgentcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/inspector/InspectorCSSAgent.cpp (164481 => 164482)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/inspector/InspectorCSSAgent.cpp        2014-02-21 11:26:44 UTC (rev 164481)
+++ trunk/Source/WebCore/inspector/InspectorCSSAgent.cpp        2014-02-21 15:29:49 UTC (rev 164482)
</span><span class="lines">@@ -48,7 +48,7 @@
</span><span class="cx"> #include &quot;NamedFlowCollection.h&quot;
</span><span class="cx"> #include &quot;Node.h&quot;
</span><span class="cx"> #include &quot;NodeList.h&quot;
</span><del>-#include &quot;RenderRegion.h&quot;
</del><ins>+#include &quot;RenderNamedFlowFragment.h&quot;
</ins><span class="cx"> #include &quot;SVGStyleElement.h&quot;
</span><span class="cx"> #include &quot;StyleProperties.h&quot;
</span><span class="cx"> #include &quot;StylePropertyShorthand.h&quot;
</span><span class="lines">@@ -1196,7 +1196,7 @@
</span><span class="cx">     for (unsigned i = 0; i &lt; regionList-&gt;length(); ++i) {
</span><span class="cx">         Inspector::TypeBuilder::CSS::Region::RegionOverset::Enum regionOverset;
</span><span class="cx"> 
</span><del>-        switch (toElement(regionList-&gt;item(i))-&gt;renderRegion()-&gt;regionOversetState()) {
</del><ins>+        switch (toElement(regionList-&gt;item(i))-&gt;renderNamedFlowFragment()-&gt;regionOversetState()) {
</ins><span class="cx">         case RegionFit:
</span><span class="cx">             regionOverset = Inspector::TypeBuilder::CSS::Region::RegionOverset::Fit;
</span><span class="cx">             break;
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingPaintInfoh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/PaintInfo.h (164481 => 164482)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/PaintInfo.h        2014-02-21 11:26:44 UTC (rev 164481)
+++ trunk/Source/WebCore/rendering/PaintInfo.h        2014-02-21 15:29:49 UTC (rev 164482)
</span><span class="lines">@@ -40,8 +40,8 @@
</span><span class="cx"> class OverlapTestRequestClient;
</span><span class="cx"> class RenderInline;
</span><span class="cx"> class RenderLayerModelObject;
</span><ins>+class RenderNamedFlowFragment;
</ins><span class="cx"> class RenderObject;
</span><del>-class RenderRegion;
</del><span class="cx"> 
</span><span class="cx"> typedef HashMap&lt;OverlapTestRequestClient*, IntRect&gt; OverlapTestRequestMap;
</span><span class="cx"> 
</span><span class="lines">@@ -51,17 +51,17 @@
</span><span class="cx">  */
</span><span class="cx"> struct PaintInfo {
</span><span class="cx">     PaintInfo(GraphicsContext* newContext, const LayoutRect&amp; newRect, PaintPhase newPhase, PaintBehavior newPaintBehavior,
</span><del>-        RenderObject* newSubtreePaintRoot = nullptr, RenderRegion* region = nullptr, ListHashSet&lt;RenderInline*&gt;* newOutlineObjects = nullptr,
</del><ins>+        RenderObject* newSubtreePaintRoot = nullptr, RenderNamedFlowFragment* namedFlowFragment = nullptr, ListHashSet&lt;RenderInline*&gt;* newOutlineObjects = nullptr,
</ins><span class="cx">         OverlapTestRequestMap* overlapTestRequests = nullptr, const RenderLayerModelObject* newPaintContainer = nullptr)
</span><del>-        : context(newContext)
-        , rect(newRect)
-        , phase(newPhase)
-        , paintBehavior(newPaintBehavior)
-        , subtreePaintRoot(newSubtreePaintRoot)
-        , renderRegion(region)
-        , outlineObjects(newOutlineObjects)
-        , overlapTestRequests(overlapTestRequests)
-        , paintContainer(newPaintContainer)
</del><ins>+            : context(newContext)
+            , rect(newRect)
+            , phase(newPhase)
+            , paintBehavior(newPaintBehavior)
+            , subtreePaintRoot(newSubtreePaintRoot)
+            , renderNamedFlowFragment(namedFlowFragment)
+            , outlineObjects(newOutlineObjects)
+            , overlapTestRequests(overlapTestRequests)
+            , paintContainer(newPaintContainer)
</ins><span class="cx">     {
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -107,7 +107,7 @@
</span><span class="cx">     PaintPhase phase;
</span><span class="cx">     PaintBehavior paintBehavior;
</span><span class="cx">     RenderObject* subtreePaintRoot; // used to draw just one element and its visual children
</span><del>-    RenderRegion* renderRegion;
</del><ins>+    RenderNamedFlowFragment* renderNamedFlowFragment;
</ins><span class="cx">     ListHashSet&lt;RenderInline*&gt;* outlineObjects; // used to list outlines that should be painted by a block with inline children
</span><span class="cx">     OverlapTestRequestMap* overlapTestRequests;
</span><span class="cx">     const RenderLayerModelObject* paintContainer; // the layer object that originates the current painting
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderBlockcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderBlock.cpp (164481 => 164482)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderBlock.cpp        2014-02-21 11:26:44 UTC (rev 164481)
+++ trunk/Source/WebCore/rendering/RenderBlock.cpp        2014-02-21 15:29:49 UTC (rev 164482)
</span><span class="lines">@@ -1997,14 +1997,14 @@
</span><span class="cx">     PaintPhase phase = paintInfo.phase;
</span><span class="cx"> 
</span><span class="cx">     // Check our region range to make sure we need to be painting in this region.
</span><del>-    if (paintInfo.renderRegion &amp;&amp; !paintInfo.renderRegion-&gt;flowThread()-&gt;objectShouldPaintInFlowRegion(this, paintInfo.renderRegion))
</del><ins>+    if (paintInfo.renderNamedFlowFragment &amp;&amp; !paintInfo.renderNamedFlowFragment-&gt;flowThread()-&gt;objectShouldPaintInFlowRegion(this, paintInfo.renderNamedFlowFragment))
</ins><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     // Check if we need to do anything at all.
</span><span class="cx">     // FIXME: Could eliminate the isRoot() check if we fix background painting so that the RenderView
</span><span class="cx">     // paints the root's background.
</span><span class="cx">     if (!isRoot()) {
</span><del>-        LayoutRect overflowBox = overflowRectForPaintRejection(paintInfo.renderRegion);
</del><ins>+        LayoutRect overflowBox = overflowRectForPaintRejection(paintInfo.renderNamedFlowFragment);
</ins><span class="cx">         flipForWritingMode(overflowBox);
</span><span class="cx">         overflowBox.inflate(maximalOutlineSize(paintInfo.phase));
</span><span class="cx">         overflowBox.moveBy(adjustedPaintOffset);
</span><span class="lines">@@ -2301,7 +2301,7 @@
</span><span class="cx">         if (hasBoxDecorations()) {
</span><span class="cx">             bool didClipToRegion = false;
</span><span class="cx">             
</span><del>-            if (paintInfo.paintContainer &amp;&amp; paintInfo.renderRegion &amp;&amp; paintInfo.paintContainer-&gt;isRenderFlowThread()) {
</del><ins>+            if (paintInfo.paintContainer &amp;&amp; paintInfo.renderNamedFlowFragment &amp;&amp; paintInfo.paintContainer-&gt;isRenderFlowThread()) {
</ins><span class="cx">                 // If this box goes beyond the current region, then make sure not to overflow the region.
</span><span class="cx">                 // This (overflowing region X altough also fragmented to region X+1) could happen when one of this box's children
</span><span class="cx">                 // overflows region X and is an unsplittable element (like an image).
</span><span class="lines">@@ -2310,7 +2310,7 @@
</span><span class="cx">                 paintInfo.context-&gt;save();
</span><span class="cx">                 didClipToRegion = true;
</span><span class="cx"> 
</span><del>-                paintInfo.context-&gt;clip(toRenderFlowThread(paintInfo.paintContainer)-&gt;decorationsClipRectForBoxInRegion(*this, *paintInfo.renderRegion));
</del><ins>+                paintInfo.context-&gt;clip(toRenderFlowThread(paintInfo.paintContainer)-&gt;decorationsClipRectForBoxInRegion(*this, *paintInfo.renderNamedFlowFragment));
</ins><span class="cx">             }
</span><span class="cx"> 
</span><span class="cx">             paintBoxDecorations(paintInfo, paintOffset);
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderBoxcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderBox.cpp (164481 => 164482)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderBox.cpp        2014-02-21 11:26:44 UTC (rev 164481)
+++ trunk/Source/WebCore/rendering/RenderBox.cpp        2014-02-21 15:29:49 UTC (rev 164482)
</span><span class="lines">@@ -50,7 +50,7 @@
</span><span class="cx"> #include &quot;RenderIterator.h&quot;
</span><span class="cx"> #include &quot;RenderLayer.h&quot;
</span><span class="cx"> #include &quot;RenderLayerCompositor.h&quot;
</span><del>-#include &quot;RenderRegion.h&quot;
</del><ins>+#include &quot;RenderNamedFlowFragment.h&quot;
</ins><span class="cx"> #include &quot;RenderTableCell.h&quot;
</span><span class="cx"> #include &quot;RenderTheme.h&quot;
</span><span class="cx"> #include &quot;RenderView.h&quot;
</span><span class="lines">@@ -1186,7 +1186,7 @@
</span><span class="cx">     if (!paintInfo.shouldPaintWithinRoot(*this))
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    LayoutRect paintRect = borderBoxRectInRegion(paintInfo.renderRegion);
</del><ins>+    LayoutRect paintRect = borderBoxRectInRegion(paintInfo.renderNamedFlowFragment);
</ins><span class="cx">     paintRect.moveBy(paintOffset);
</span><span class="cx"> 
</span><span class="cx"> #if PLATFORM(IOS)
</span><span class="lines">@@ -1645,7 +1645,7 @@
</span><span class="cx">         paintObject(paintInfo, accumulatedOffset);
</span><span class="cx">         paintInfo.phase = PaintPhaseChildBlockBackgrounds;
</span><span class="cx">     }
</span><del>-    IntRect clipRect = pixelSnappedIntRect(isControlClip ? controlClipRect(accumulatedOffset) : overflowClipRect(accumulatedOffset, paintInfo.renderRegion, IgnoreOverlayScrollbarSize, paintInfo.phase));
</del><ins>+    IntRect clipRect = pixelSnappedIntRect(isControlClip ? controlClipRect(accumulatedOffset) : overflowClipRect(accumulatedOffset, paintInfo.renderNamedFlowFragment, IgnoreOverlayScrollbarSize, paintInfo.phase));
</ins><span class="cx">     paintInfo.context-&gt;save();
</span><span class="cx">     if (style().hasBorderRadius())
</span><span class="cx">         paintInfo.context-&gt;clipRoundedRect(style().getRoundedInnerBorderFor(LayoutRect(accumulatedOffset, size())));
</span><span class="lines">@@ -4521,7 +4521,7 @@
</span><span class="cx">     return rect;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-LayoutRect RenderBox::overflowRectForPaintRejection(RenderRegion* region) const
</del><ins>+LayoutRect RenderBox::overflowRectForPaintRejection(RenderNamedFlowFragment* namedFlowFragment) const
</ins><span class="cx"> {
</span><span class="cx">     LayoutRect overflowRect = visualOverflowRect();
</span><span class="cx">     
</span><span class="lines">@@ -4529,14 +4529,14 @@
</span><span class="cx">     // cause the paint rejection algorithm to prevent them from painting when using different width regions.
</span><span class="cx">     // e.g. an absolutely positioned box with bottom:0px and right:0px would have it's frameRect.x relative
</span><span class="cx">     // to the flow thread, not the last region (in which it will end up because of bottom:0px)
</span><del>-    if (region) {
-        if (RenderFlowThread* flowThread = region-&gt;flowThread()) {
</del><ins>+    if (namedFlowFragment) {
+        if (RenderFlowThread* flowThread = namedFlowFragment-&gt;flowThread()) {
</ins><span class="cx">             RenderRegion* startRegion = 0;
</span><span class="cx">             RenderRegion* endRegion = 0;
</span><span class="cx">             flowThread-&gt;getRegionRangeForBox(this, startRegion, endRegion);
</span><span class="cx"> 
</span><span class="cx">             if (startRegion &amp;&amp; endRegion)
</span><del>-                overflowRect.unite(region-&gt;visualOverflowRectForBox(this));
</del><ins>+                overflowRect.unite(namedFlowFragment-&gt;visualOverflowRectForBox(this));
</ins><span class="cx">         }
</span><span class="cx">     }
</span><span class="cx">     
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderBoxh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderBox.h (164481 => 164482)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderBox.h        2014-02-21 11:26:44 UTC (rev 164481)
+++ trunk/Source/WebCore/rendering/RenderBox.h        2014-02-21 15:29:49 UTC (rev 164482)
</span><span class="lines">@@ -191,7 +191,7 @@
</span><span class="cx">     LayoutUnit logicalLeftVisualOverflow() const { return style().isHorizontalWritingMode() ? visualOverflowRect().x() : visualOverflowRect().y(); }
</span><span class="cx">     LayoutUnit logicalRightVisualOverflow() const { return style().isHorizontalWritingMode() ? visualOverflowRect().maxX() : visualOverflowRect().maxY(); }
</span><span class="cx"> 
</span><del>-    LayoutRect overflowRectForPaintRejection(RenderRegion*) const;
</del><ins>+    LayoutRect overflowRectForPaintRejection(RenderNamedFlowFragment*) const;
</ins><span class="cx">     
</span><span class="cx">     void addLayoutOverflow(const LayoutRect&amp;);
</span><span class="cx">     void addVisualOverflow(const LayoutRect&amp;);
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderBoxModelObjectcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderBoxModelObject.cpp (164481 => 164482)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderBoxModelObject.cpp        2014-02-21 11:26:44 UTC (rev 164481)
+++ trunk/Source/WebCore/rendering/RenderBoxModelObject.cpp        2014-02-21 15:29:49 UTC (rev 164482)
</span><span class="lines">@@ -570,14 +570,14 @@
</span><span class="cx">         context-&gt;setLegacyShadow(shadowOffset, boxShadow-&gt;radius(), boxShadow-&gt;color(), style-&gt;colorSpace());
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void RenderBoxModelObject::paintMaskForTextFillBox(ImageBuffer* maskImage, const IntRect&amp; maskRect, InlineFlowBox* box, const LayoutRect&amp; scrolledPaintRect, RenderRegion* region)
</del><ins>+void RenderBoxModelObject::paintMaskForTextFillBox(ImageBuffer* maskImage, const IntRect&amp; maskRect, InlineFlowBox* box, const LayoutRect&amp; scrolledPaintRect, RenderNamedFlowFragment* namedFlowFragment)
</ins><span class="cx"> {
</span><span class="cx">     GraphicsContext* maskImageContext = maskImage-&gt;context();
</span><span class="cx">     maskImageContext-&gt;translate(-maskRect.x(), -maskRect.y());
</span><span class="cx"> 
</span><span class="cx">     // Now add the text to the clip. We do this by painting using a special paint phase that signals to
</span><span class="cx">     // InlineTextBoxes that they should just add their contents to the clip.
</span><del>-    PaintInfo info(maskImageContext, maskRect, PaintPhaseTextClip, PaintBehaviorForceBlackText, 0, region);
</del><ins>+    PaintInfo info(maskImageContext, maskRect, PaintPhaseTextClip, PaintBehaviorForceBlackText, 0, namedFlowFragment);
</ins><span class="cx">     if (box) {
</span><span class="cx">         const RootInlineBox&amp; rootBox = box-&gt;root();
</span><span class="cx">         box-&gt;paint(info, LayoutPoint(scrolledPaintRect.x() - box-&gt;x(), scrolledPaintRect.y() - box-&gt;y()), rootBox.lineTop(), rootBox.lineBottom());
</span><span class="lines">@@ -689,7 +689,7 @@
</span><span class="cx">     if (clippedWithLocalScrolling) {
</span><span class="cx">         // Clip to the overflow area.
</span><span class="cx">         RenderBox* thisBox = toRenderBox(this);
</span><del>-        context-&gt;clip(thisBox-&gt;overflowClipRect(rect.location(), paintInfo.renderRegion));
</del><ins>+        context-&gt;clip(thisBox-&gt;overflowClipRect(rect.location(), paintInfo.renderNamedFlowFragment));
</ins><span class="cx">         
</span><span class="cx">         // Adjust the paint rect to reflect a scrolled content box with borders at the ends.
</span><span class="cx">         IntSize offset = thisBox-&gt;scrolledContentOffset();
</span><span class="lines">@@ -724,7 +724,7 @@
</span><span class="cx">         maskImage = context-&gt;createCompatibleBuffer(maskRect.size());
</span><span class="cx">         if (!maskImage)
</span><span class="cx">             return;
</span><del>-        paintMaskForTextFillBox(maskImage.get(), maskRect, box, scrolledPaintRect, paintInfo.renderRegion);
</del><ins>+        paintMaskForTextFillBox(maskImage.get(), maskRect, box, scrolledPaintRect, paintInfo.renderNamedFlowFragment);
</ins><span class="cx"> 
</span><span class="cx">         // The mask has been created.  Now we just need to clip to it.
</span><span class="cx">         backgroundClipStateSaver.save();
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderBoxModelObjecth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderBoxModelObject.h (164481 => 164482)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderBoxModelObject.h        2014-02-21 11:26:44 UTC (rev 164481)
+++ trunk/Source/WebCore/rendering/RenderBoxModelObject.h        2014-02-21 15:29:49 UTC (rev 164482)
</span><span class="lines">@@ -54,6 +54,7 @@
</span><span class="cx"> class ImageBuffer;
</span><span class="cx"> class InlineFlowBox;
</span><span class="cx"> class KeyframeList;
</span><ins>+class RenderNamedFlowFragment;
</ins><span class="cx"> class RenderTextFragment;
</span><span class="cx"> class StickyPositionViewportConstraints;
</span><span class="cx"> 
</span><span class="lines">@@ -340,7 +341,7 @@
</span><span class="cx">     void drawBoxSideFromPath(GraphicsContext*, const LayoutRect&amp;, const Path&amp;, const class BorderEdge[],
</span><span class="cx">                             float thickness, float drawThickness, BoxSide, const RenderStyle*, 
</span><span class="cx">                             Color, EBorderStyle, BackgroundBleedAvoidance, bool includeLogicalLeftEdge, bool includeLogicalRightEdge);
</span><del>-    void paintMaskForTextFillBox(ImageBuffer*, const IntRect&amp;, InlineFlowBox*, const LayoutRect&amp;, RenderRegion*);
</del><ins>+    void paintMaskForTextFillBox(ImageBuffer*, const IntRect&amp;, InlineFlowBox*, const LayoutRect&amp;, RenderNamedFlowFragment*);
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> RENDER_OBJECT_TYPE_CASTS(RenderBoxModelObject, isBoxModelObject())
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderInlineh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderInline.h (164481 => 164482)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderInline.h        2014-02-21 11:26:44 UTC (rev 164481)
+++ trunk/Source/WebCore/rendering/RenderInline.h        2014-02-21 15:29:49 UTC (rev 164482)
</span><span class="lines">@@ -30,6 +30,7 @@
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><span class="cx"> class Position;
</span><ins>+class RenderRegion;
</ins><span class="cx"> 
</span><span class="cx"> class RenderInline : public RenderBoxModelObject {
</span><span class="cx"> public:
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderLayercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderLayer.cpp (164481 => 164482)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderLayer.cpp        2014-02-21 11:26:44 UTC (rev 164481)
+++ trunk/Source/WebCore/rendering/RenderLayer.cpp        2014-02-21 15:29:49 UTC (rev 164482)
</span><span class="lines">@@ -3528,11 +3528,11 @@
</span><span class="cx">     return ScrollableArea::scroll(direction, granularity, multiplier);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void RenderLayer::paint(GraphicsContext* context, const LayoutRect&amp; damageRect, PaintBehavior paintBehavior, RenderObject* subtreePaintRoot, RenderRegion* region, PaintLayerFlags paintFlags)
</del><ins>+void RenderLayer::paint(GraphicsContext* context, const LayoutRect&amp; damageRect, PaintBehavior paintBehavior, RenderObject* subtreePaintRoot, RenderNamedFlowFragment* namedFlowFragment, PaintLayerFlags paintFlags)
</ins><span class="cx"> {
</span><span class="cx">     OverlapTestRequestMap overlapTestRequests;
</span><span class="cx"> 
</span><del>-    LayerPaintingInfo paintingInfo(this, enclosingIntRect(damageRect), paintBehavior, LayoutSize(), subtreePaintRoot, region, &amp;overlapTestRequests);
</del><ins>+    LayerPaintingInfo paintingInfo(this, enclosingIntRect(damageRect), paintBehavior, LayoutSize(), subtreePaintRoot, namedFlowFragment, &amp;overlapTestRequests);
</ins><span class="cx">     paintLayer(context, paintingInfo, paintFlags);
</span><span class="cx"> 
</span><span class="cx">     OverlapTestRequestMap::iterator end = overlapTestRequests.end();
</span><span class="lines">@@ -3677,15 +3677,15 @@
</span><span class="cx"> 
</span><span class="cx">     // FIXME: Hack to disable region information for in flow threads. Implement this logic in a different way.
</span><span class="cx">     LayerPaintingInfo&amp; info = const_cast&lt;LayerPaintingInfo&amp;&gt;(paintingInfo);
</span><del>-    RenderRegion* region = info.region;
-    if (region) {
</del><ins>+    RenderNamedFlowFragment* namedFlowFragment = info.renderNamedFlowFragment;
+    if (namedFlowFragment) {
</ins><span class="cx">         if (enclosingPaginationLayer())
</span><del>-            info.region = 0;
</del><ins>+            info.renderNamedFlowFragment = nullptr;
</ins><span class="cx">         else {
</span><del>-            RenderFlowThread* flowThread = region-&gt;flowThread();
</del><ins>+            RenderFlowThread* flowThread = namedFlowFragment-&gt;flowThread();
</ins><span class="cx">             ASSERT(flowThread);
</span><span class="cx"> 
</span><del>-            if (!flowThread-&gt;objectShouldPaintInFlowRegion(&amp;renderer(), region))
</del><ins>+            if (!flowThread-&gt;objectShouldPaintInFlowRegion(&amp;renderer(), namedFlowFragment))
</ins><span class="cx">                 return;
</span><span class="cx">         }
</span><span class="cx">     }
</span><span class="lines">@@ -3698,7 +3698,7 @@
</span><span class="cx">         TransformationMatrix layerTransform = renderableTransform(paintingInfo.paintBehavior);
</span><span class="cx">         // If the transform can't be inverted, then don't paint anything.
</span><span class="cx">         if (!layerTransform.isInvertible()) {
</span><del>-            info.region = region;
</del><ins>+            info.renderNamedFlowFragment = namedFlowFragment;
</ins><span class="cx">             return;
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="lines">@@ -3713,14 +3713,14 @@
</span><span class="cx"> 
</span><span class="cx">         if (enclosingPaginationLayer()) {
</span><span class="cx">             paintTransformedLayerIntoFragments(context, paintingInfo, paintFlags);
</span><del>-            info.region = region;
</del><ins>+            info.renderNamedFlowFragment = namedFlowFragment;
</ins><span class="cx">             return;
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         // Make sure the parent's clip rects have been calculated.
</span><span class="cx">         ClipRect clipRect = paintingInfo.paintDirtyRect;
</span><span class="cx">         if (parent()) {
</span><del>-            ClipRectsContext clipRectsContext(paintingInfo.rootLayer, paintingInfo.region, (paintFlags &amp; PaintLayerTemporaryClipRects) ? TemporaryClipRects : PaintingClipRects,
</del><ins>+            ClipRectsContext clipRectsContext(paintingInfo.rootLayer, paintingInfo.renderNamedFlowFragment, (paintFlags &amp; PaintLayerTemporaryClipRects) ? TemporaryClipRects : PaintingClipRects,
</ins><span class="cx">                 IgnoreOverlayScrollbarSize, (paintFlags &amp; PaintLayerPaintingOverflowContents) ? IgnoreOverflowClip : RespectOverflowClip);
</span><span class="cx">             clipRect = backgroundClipRect(clipRectsContext);
</span><span class="cx">             clipRect.intersect(paintingInfo.paintDirtyRect);
</span><span class="lines">@@ -3735,12 +3735,12 @@
</span><span class="cx">         if (parent())
</span><span class="cx">             parent()-&gt;restoreClip(context, paintingInfo.paintDirtyRect, clipRect);
</span><span class="cx"> 
</span><del>-        info.region = region;
</del><ins>+        info.renderNamedFlowFragment = namedFlowFragment;
</ins><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx">     
</span><span class="cx">     paintLayerContentsAndReflection(context, paintingInfo, paintFlags);
</span><del>-    info.region = region;
</del><ins>+    info.renderNamedFlowFragment = namedFlowFragment;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void RenderLayer::paintLayerContentsAndReflection(GraphicsContext* context, const LayerPaintingInfo&amp; paintingInfo, PaintLayerFlags paintFlags)
</span><span class="lines">@@ -4056,7 +4056,7 @@
</span><span class="cx">             localPaintingInfo.clipToDirtyRect = true;
</span><span class="cx">             paintDirtyRect = selfClipRect();
</span><span class="cx">         }
</span><del>-        collectFragments(layerFragments, localPaintingInfo.rootLayer, localPaintingInfo.region, paintDirtyRect,
</del><ins>+        collectFragments(layerFragments, localPaintingInfo.rootLayer, localPaintingInfo.renderNamedFlowFragment, paintDirtyRect,
</ins><span class="cx">             (localPaintFlags &amp; PaintLayerTemporaryClipRects) ? TemporaryClipRects : PaintingClipRects, IgnoreOverlayScrollbarSize,
</span><span class="cx">             (isPaintingOverflowContents) ? IgnoreOverflowClip : RespectOverflowClip, &amp;offsetFromRoot);
</span><span class="cx">         updatePaintingInfoForFragments(layerFragments, localPaintingInfo, localPaintFlags, shouldPaintContent, &amp;offsetFromRoot);
</span><span class="lines">@@ -4148,7 +4148,7 @@
</span><span class="cx"> 
</span><span class="cx">     // Now do a paint with the root layer shifted to be us.
</span><span class="cx">     LayerPaintingInfo transformedPaintingInfo(this, enclosingIntRect(transform.inverse().mapRect(paintingInfo.paintDirtyRect)), paintingInfo.paintBehavior,
</span><del>-        adjustedSubPixelAccumulation, paintingInfo.subtreePaintRoot, paintingInfo.region, paintingInfo.overlapTestRequests);
</del><ins>+        adjustedSubPixelAccumulation, paintingInfo.subtreePaintRoot, paintingInfo.renderNamedFlowFragment, paintingInfo.overlapTestRequests);
</ins><span class="cx">     paintLayerContentsAndReflection(context, transformedPaintingInfo, paintFlags);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -4257,7 +4257,7 @@
</span><span class="cx">         fragment.shouldPaintContent = shouldPaintContent;
</span><span class="cx">         if (this != localPaintingInfo.rootLayer || !(localPaintFlags &amp; PaintLayerPaintingOverflowContents)) {
</span><span class="cx">             LayoutPoint newOffsetFromRoot = *offsetFromRoot + fragment.paginationOffset;
</span><del>-            fragment.shouldPaintContent &amp;= intersectsDamageRect(fragment.layerBounds, fragment.backgroundRect.rect(), localPaintingInfo.rootLayer, &amp;newOffsetFromRoot, localPaintingInfo.region);
</del><ins>+            fragment.shouldPaintContent &amp;= intersectsDamageRect(fragment.layerBounds, fragment.backgroundRect.rect(), localPaintingInfo.rootLayer, &amp;newOffsetFromRoot, localPaintingInfo.renderNamedFlowFragment);
</ins><span class="cx">         }
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="lines">@@ -4267,7 +4267,7 @@
</span><span class="cx">     LayerFragments enclosingPaginationFragments;
</span><span class="cx">     LayoutPoint offsetOfPaginationLayerFromRoot;
</span><span class="cx">     LayoutRect transformedExtent = transparencyClipBox(this, enclosingPaginationLayer(), PaintingTransparencyClipBox, RootOfTransparencyClipBox, paintingInfo.paintBehavior);
</span><del>-    enclosingPaginationLayer()-&gt;collectFragments(enclosingPaginationFragments, paintingInfo.rootLayer, paintingInfo.region, paintingInfo.paintDirtyRect,
</del><ins>+    enclosingPaginationLayer()-&gt;collectFragments(enclosingPaginationFragments, paintingInfo.rootLayer, paintingInfo.renderNamedFlowFragment, paintingInfo.paintDirtyRect,
</ins><span class="cx">         (paintFlags &amp; PaintLayerTemporaryClipRects) ? TemporaryClipRects : PaintingClipRects, IgnoreOverlayScrollbarSize,
</span><span class="cx">         (paintFlags &amp; PaintLayerPaintingOverflowContents) ? IgnoreOverflowClip : RespectOverflowClip, &amp;offsetOfPaginationLayerFromRoot, &amp;transformedExtent);
</span><span class="cx">     
</span><span class="lines">@@ -4282,7 +4282,7 @@
</span><span class="cx">         if (parent() != enclosingPaginationLayer()) {
</span><span class="cx">             enclosingPaginationLayer()-&gt;convertToLayerCoords(paintingInfo.rootLayer, offsetOfPaginationLayerFromRoot);
</span><span class="cx">     
</span><del>-            ClipRectsContext clipRectsContext(enclosingPaginationLayer(), paintingInfo.region, (paintFlags &amp; PaintLayerTemporaryClipRects) ? TemporaryClipRects : PaintingClipRects,
</del><ins>+            ClipRectsContext clipRectsContext(enclosingPaginationLayer(), paintingInfo.renderNamedFlowFragment, (paintFlags &amp; PaintLayerTemporaryClipRects) ? TemporaryClipRects : PaintingClipRects,
</ins><span class="cx">                 IgnoreOverlayScrollbarSize, (paintFlags &amp; PaintLayerPaintingOverflowContents) ? IgnoreOverflowClip : RespectOverflowClip);
</span><span class="cx">             LayoutRect parentClipRect = backgroundClipRect(clipRectsContext).rect();
</span><span class="cx">             parentClipRect.moveBy(fragment.paginationOffset + offsetOfPaginationLayerFromRoot);
</span><span class="lines">@@ -4316,7 +4316,7 @@
</span><span class="cx">         
</span><span class="cx">         // Paint the background.
</span><span class="cx">         // FIXME: Eventually we will collect the region from the fragment itself instead of just from the paint info.
</span><del>-        PaintInfo paintInfo(context, fragment.backgroundRect.rect(), PaintPhaseBlockBackground, paintBehavior, subtreePaintRootForRenderer, localPaintingInfo.region, 0, 0, &amp;localPaintingInfo.rootLayer-&gt;renderer());
</del><ins>+        PaintInfo paintInfo(context, fragment.backgroundRect.rect(), PaintPhaseBlockBackground, paintBehavior, subtreePaintRootForRenderer, localPaintingInfo.renderNamedFlowFragment, 0, 0, &amp;localPaintingInfo.rootLayer-&gt;renderer());
</ins><span class="cx">         renderer().paint(paintInfo, toLayoutPoint(fragment.layerBounds.location() - renderBoxLocation() + localPaintingInfo.subPixelAccumulation));
</span><span class="cx"> 
</span><span class="cx">         if (localPaintingInfo.clipToDirtyRect)
</span><span class="lines">@@ -4389,7 +4389,7 @@
</span><span class="cx">         if (shouldClip)
</span><span class="cx">             clipToRect(localPaintingInfo.rootLayer, context, localPaintingInfo.paintDirtyRect, fragment.foregroundRect);
</span><span class="cx">     
</span><del>-        PaintInfo paintInfo(context, fragment.foregroundRect.rect(), phase, paintBehavior, subtreePaintRootForRenderer, localPaintingInfo.region, 0, 0, &amp;localPaintingInfo.rootLayer-&gt;renderer());
</del><ins>+        PaintInfo paintInfo(context, fragment.foregroundRect.rect(), phase, paintBehavior, subtreePaintRootForRenderer, localPaintingInfo.renderNamedFlowFragment, 0, 0, &amp;localPaintingInfo.rootLayer-&gt;renderer());
</ins><span class="cx">         if (phase == PaintPhaseForeground)
</span><span class="cx">             paintInfo.overlapTestRequests = localPaintingInfo.overlapTestRequests;
</span><span class="cx">         renderer().paint(paintInfo, toLayoutPoint(fragment.layerBounds.location() - renderBoxLocation() + localPaintingInfo.subPixelAccumulation));
</span><span class="lines">@@ -4408,7 +4408,7 @@
</span><span class="cx">             continue;
</span><span class="cx">     
</span><span class="cx">         // Paint our own outline
</span><del>-        PaintInfo paintInfo(context, fragment.outlineRect.rect(), PaintPhaseSelfOutline, paintBehavior, subtreePaintRootForRenderer, localPaintingInfo.region, 0, 0, &amp;localPaintingInfo.rootLayer-&gt;renderer());
</del><ins>+        PaintInfo paintInfo(context, fragment.outlineRect.rect(), PaintPhaseSelfOutline, paintBehavior, subtreePaintRootForRenderer, localPaintingInfo.renderNamedFlowFragment, 0, 0, &amp;localPaintingInfo.rootLayer-&gt;renderer());
</ins><span class="cx">         clipToRect(localPaintingInfo.rootLayer, context, localPaintingInfo.paintDirtyRect, fragment.outlineRect, DoNotIncludeSelfForBorderRadius);
</span><span class="cx">         renderer().paint(paintInfo, toLayoutPoint(fragment.layerBounds.location() - renderBoxLocation() + localPaintingInfo.subPixelAccumulation));
</span><span class="cx">         restoreClip(context, localPaintingInfo.paintDirtyRect, fragment.outlineRect);
</span><span class="lines">@@ -4428,7 +4428,7 @@
</span><span class="cx">         
</span><span class="cx">         // Paint the mask.
</span><span class="cx">         // FIXME: Eventually we will collect the region from the fragment itself instead of just from the paint info.
</span><del>-        PaintInfo paintInfo(context, fragment.backgroundRect.rect(), PaintPhaseMask, PaintBehaviorNormal, subtreePaintRootForRenderer, localPaintingInfo.region, 0, 0, &amp;localPaintingInfo.rootLayer-&gt;renderer());
</del><ins>+        PaintInfo paintInfo(context, fragment.backgroundRect.rect(), PaintPhaseMask, PaintBehaviorNormal, subtreePaintRootForRenderer, localPaintingInfo.renderNamedFlowFragment, 0, 0, &amp;localPaintingInfo.rootLayer-&gt;renderer());
</ins><span class="cx">         renderer().paint(paintInfo, toLayoutPoint(fragment.layerBounds.location() - renderBoxLocation() + localPaintingInfo.subPixelAccumulation));
</span><span class="cx">         
</span><span class="cx">         if (localPaintingInfo.clipToDirtyRect)
</span><span class="lines">@@ -5245,19 +5245,17 @@
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void RenderLayer::mapLayerClipRectsToFragmentationLayer(RenderRegion* region, ClipRects&amp; clipRects) const
</del><ins>+void RenderLayer::mapLayerClipRectsToFragmentationLayer(RenderNamedFlowFragment* namedFlowFragment, ClipRects&amp; clipRects) const
</ins><span class="cx"> {
</span><del>-    ASSERT(region &amp;&amp; region-&gt;isRenderNamedFlowFragment() &amp;&amp; region-&gt;parent() &amp;&amp; region-&gt;parent()-&gt;isRenderNamedFlowFragmentContainer());
</del><ins>+    ASSERT(namedFlowFragment &amp;&amp; namedFlowFragment-&gt;parent() &amp;&amp; namedFlowFragment-&gt;parent()-&gt;isRenderNamedFlowFragmentContainer());
</ins><span class="cx">     
</span><del>-    RenderNamedFlowFragment* flowFragment = toRenderNamedFlowFragment(region);
</del><ins>+    ClipRectsContext targetClipRectsContext(&amp;namedFlowFragment-&gt;fragmentContainerLayer(), 0, TemporaryClipRects);
+    namedFlowFragment-&gt;fragmentContainerLayer().calculateClipRects(targetClipRectsContext, clipRects);
</ins><span class="cx"> 
</span><del>-    ClipRectsContext targetClipRectsContext(&amp;flowFragment-&gt;fragmentContainerLayer(), 0, TemporaryClipRects);
-    flowFragment-&gt;fragmentContainerLayer().calculateClipRects(targetClipRectsContext, clipRects);
</del><ins>+    LayoutRect flowThreadPortionRect = namedFlowFragment-&gt;flowThreadPortionRect();
</ins><span class="cx"> 
</span><del>-    LayoutRect flowThreadPortionRect = region-&gt;flowThreadPortionRect();
-
</del><span class="cx">     LayoutPoint portionLocation = flowThreadPortionRect.location();
</span><del>-    LayoutRect regionContentBox = flowFragment-&gt;fragmentContainer().contentBoxRect();
</del><ins>+    LayoutRect regionContentBox = namedFlowFragment-&gt;fragmentContainer().contentBoxRect();
</ins><span class="cx">     LayoutSize moveOffset = portionLocation - regionContentBox.location();
</span><span class="cx"> 
</span><span class="cx">     ClipRect newOverflowClipRect = clipRects.overflowClipRect();
</span><span class="lines">@@ -5284,8 +5282,8 @@
</span><span class="cx">     ClipRectsType clipRectsType = clipRectsContext.clipRectsType;
</span><span class="cx">     bool useCached = clipRectsType != TemporaryClipRects;
</span><span class="cx"> 
</span><del>-    if (renderer().isRenderFlowThread() &amp;&amp; clipRectsContext.region) {
-        mapLayerClipRectsToFragmentationLayer(clipRectsContext.region, clipRects);
</del><ins>+    if (renderer().isRenderNamedFlowThread() &amp;&amp; clipRectsContext.region) {
+        mapLayerClipRectsToFragmentationLayer(toRenderNamedFlowFragment(clipRectsContext.region), clipRects);
</ins><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -5352,8 +5350,8 @@
</span><span class="cx"> void RenderLayer::parentClipRects(const ClipRectsContext&amp; clipRectsContext, ClipRects&amp; clipRects) const
</span><span class="cx"> {
</span><span class="cx">     ASSERT(parent());
</span><del>-    if (renderer().isRenderFlowThread() &amp;&amp; clipRectsContext.region) {
-        mapLayerClipRectsToFragmentationLayer(clipRectsContext.region, clipRects);
</del><ins>+    if (renderer().isRenderNamedFlowThread() &amp;&amp; clipRectsContext.region) {
+        mapLayerClipRectsToFragmentationLayer(toRenderNamedFlowFragment(clipRectsContext.region), clipRects);
</ins><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderLayerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderLayer.h (164481 => 164482)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderLayer.h        2014-02-21 11:26:44 UTC (rev 164481)
+++ trunk/Source/WebCore/rendering/RenderLayer.h        2014-02-21 15:29:49 UTC (rev 164482)
</span><span class="lines">@@ -650,7 +650,7 @@
</span><span class="cx">     // front.  The hitTest method looks for mouse events by walking
</span><span class="cx">     // layers that intersect the point from front to back.
</span><span class="cx">     void paint(GraphicsContext*, const LayoutRect&amp; damageRect, PaintBehavior = PaintBehaviorNormal, RenderObject* subtreePaintRoot = 0,
</span><del>-        RenderRegion* = 0, PaintLayerFlags = 0);
</del><ins>+        RenderNamedFlowFragment* = 0, PaintLayerFlags = 0);
</ins><span class="cx">     bool hitTest(const HitTestRequest&amp;, HitTestResult&amp;);
</span><span class="cx">     bool hitTest(const HitTestRequest&amp;, const HitTestLocation&amp;, HitTestResult&amp;);
</span><span class="cx">     void paintOverlayScrollbars(GraphicsContext*, const LayoutRect&amp; damageRect, PaintBehavior, RenderObject* subtreePaintRoot = 0);
</span><span class="lines">@@ -925,12 +925,12 @@
</span><span class="cx">     void updateCompositingAndLayerListsIfNeeded();
</span><span class="cx"> 
</span><span class="cx">     struct LayerPaintingInfo {
</span><del>-        LayerPaintingInfo(RenderLayer* inRootLayer, const LayoutRect&amp; inDirtyRect, PaintBehavior inPaintBehavior, const LayoutSize&amp; inSubPixelAccumulation, RenderObject* inSubtreePaintRoot = 0, RenderRegion*inRegion = 0, OverlapTestRequestMap* inOverlapTestRequests = 0)
</del><ins>+        LayerPaintingInfo(RenderLayer* inRootLayer, const LayoutRect&amp; inDirtyRect, PaintBehavior inPaintBehavior, const LayoutSize&amp; inSubPixelAccumulation, RenderObject* inSubtreePaintRoot = 0, RenderNamedFlowFragment* namedFlowFragment = 0, OverlapTestRequestMap* inOverlapTestRequests = 0)
</ins><span class="cx">             : rootLayer(inRootLayer)
</span><span class="cx">             , subtreePaintRoot(inSubtreePaintRoot)
</span><span class="cx">             , paintDirtyRect(inDirtyRect)
</span><span class="cx">             , subPixelAccumulation(inSubPixelAccumulation)
</span><del>-            , region(inRegion)
</del><ins>+            , renderNamedFlowFragment(namedFlowFragment)
</ins><span class="cx">             , overlapTestRequests(inOverlapTestRequests)
</span><span class="cx">             , paintBehavior(inPaintBehavior)
</span><span class="cx">             , clipToDirtyRect(true)
</span><span class="lines">@@ -939,7 +939,7 @@
</span><span class="cx">         RenderObject* subtreePaintRoot; // only paint descendants of this object
</span><span class="cx">         LayoutRect paintDirtyRect; // relative to rootLayer;
</span><span class="cx">         LayoutSize subPixelAccumulation;
</span><del>-        RenderRegion* region; // May be null.
</del><ins>+        RenderNamedFlowFragment* renderNamedFlowFragment; // May be null.
</ins><span class="cx">         OverlapTestRequestMap* overlapTestRequests; // May be null.
</span><span class="cx">         PaintBehavior paintBehavior;
</span><span class="cx">         bool clipToDirtyRect;
</span><span class="lines">@@ -1155,7 +1155,7 @@
</span><span class="cx">         const LayoutRect&amp;, const HitTestLocation&amp;,
</span><span class="cx">         const HitTestingTransformState*, double*);
</span><span class="cx">     void paintFlowThreadIfRegionForFragments(const LayerFragments&amp;, GraphicsContext*, const LayerPaintingInfo&amp;, PaintLayerFlags);
</span><del>-    void mapLayerClipRectsToFragmentationLayer(RenderRegion*, ClipRects&amp;) const;
</del><ins>+    void mapLayerClipRectsToFragmentationLayer(RenderNamedFlowFragment*, ClipRects&amp;) const;
</ins><span class="cx"> 
</span><span class="cx"> private:
</span><span class="cx">     // The bitfields are up here so they will fall into the padding from ScrollableArea on 64-bit.
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderNamedFlowFragmentcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderNamedFlowFragment.cpp (164481 => 164482)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderNamedFlowFragment.cpp        2014-02-21 11:26:44 UTC (rev 164481)
+++ trunk/Source/WebCore/rendering/RenderNamedFlowFragment.cpp        2014-02-21 15:29:49 UTC (rev 164482)
</span><span class="lines">@@ -91,6 +91,12 @@
</span><span class="cx">         setNeedsLayout(MarkOnlyThis);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void RenderNamedFlowFragment::getRanges(Vector&lt;RefPtr&lt;Range&gt;&gt;&amp; rangeObjects) const
+{
+    const RenderNamedFlowThread&amp; namedFlow = view().flowThreadController().ensureRenderFlowThreadWithName(style().regionThread());
+    namedFlow.getRanges(rangeObjects, this);
+}
+
</ins><span class="cx"> bool RenderNamedFlowFragment::shouldHaveAutoLogicalHeight() const
</span><span class="cx"> {
</span><span class="cx">     ASSERT(parent());
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderNamedFlowFragmenth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderNamedFlowFragment.h (164481 => 164482)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderNamedFlowFragment.h        2014-02-21 11:26:44 UTC (rev 164481)
+++ trunk/Source/WebCore/rendering/RenderNamedFlowFragment.h        2014-02-21 15:29:49 UTC (rev 164482)
</span><span class="lines">@@ -57,6 +57,8 @@
</span><span class="cx">     virtual bool isRenderNamedFlowFragment() const override final { return true; }
</span><span class="cx">     virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle) override;
</span><span class="cx"> 
</span><ins>+    void getRanges(Vector&lt;RefPtr&lt;Range&gt;&gt;&amp;) const;
+
</ins><span class="cx">     virtual LayoutUnit pageLogicalHeight() const;
</span><span class="cx">     LayoutUnit maxPageLogicalHeight() const;
</span><span class="cx">     
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderNamedFlowThreadcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderNamedFlowThread.cpp (164481 => 164482)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderNamedFlowThread.cpp        2014-02-21 11:26:44 UTC (rev 164481)
+++ trunk/Source/WebCore/rendering/RenderNamedFlowThread.cpp        2014-02-21 15:29:49 UTC (rev 164482)
</span><span class="lines">@@ -36,7 +36,6 @@
</span><span class="cx"> #include &quot;Range.h&quot;
</span><span class="cx"> #include &quot;RenderInline.h&quot;
</span><span class="cx"> #include &quot;RenderNamedFlowFragment.h&quot;
</span><del>-#include &quot;RenderRegion.h&quot;
</del><span class="cx"> #include &quot;RenderText.h&quot;
</span><span class="cx"> #include &quot;RenderView.h&quot;
</span><span class="cx"> #include &quot;ShadowRoot.h&quot;
</span><span class="lines">@@ -85,15 +84,15 @@
</span><span class="cx"> 
</span><span class="cx"> void RenderNamedFlowThread::updateWritingMode()
</span><span class="cx"> {
</span><del>-    RenderRegion* firstRegion = m_regionList.first();
-    if (!firstRegion)
</del><ins>+    RenderNamedFlowFragment* firstFragment = toRenderNamedFlowFragment(m_regionList.first());
+    if (!firstFragment)
</ins><span class="cx">         return;
</span><del>-    if (style().writingMode() == firstRegion-&gt;style().writingMode())
</del><ins>+    if (style().writingMode() == firstFragment-&gt;style().writingMode())
</ins><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     // The first region defines the principal writing mode for the entire flow.
</span><span class="cx">     auto newStyle = RenderStyle::clone(&amp;style());
</span><del>-    newStyle.get().setWritingMode(firstRegion-&gt;style().writingMode());
</del><ins>+    newStyle.get().setWritingMode(firstFragment-&gt;style().writingMode());
</ins><span class="cx">     setStyle(std::move(newStyle));
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -149,35 +148,35 @@
</span><span class="cx"> // If the first region appears before second region in DOM,
</span><span class="cx"> // the first region is &quot;less&quot; than the second region.
</span><span class="cx"> // If the first region is &quot;less&quot; than the second region, the first region receives content before second region.
</span><del>-static bool compareRenderRegions(const RenderRegion* firstRegion, const RenderRegion* secondRegion)
</del><ins>+static bool compareRenderNamedFlowFragments(const RenderNamedFlowFragment* firstFragment, const RenderNamedFlowFragment* secondFragment)
</ins><span class="cx"> {
</span><del>-    ASSERT(firstRegion);
-    ASSERT(secondRegion);
</del><ins>+    ASSERT(firstFragment);
+    ASSERT(secondFragment);
</ins><span class="cx"> 
</span><del>-    ASSERT(firstRegion-&gt;generatingElement());
-    ASSERT(secondRegion-&gt;generatingElement());
</del><ins>+    ASSERT(firstFragment-&gt;generatingElement());
+    ASSERT(secondFragment-&gt;generatingElement());
</ins><span class="cx"> 
</span><span class="cx">     // If the regions belong to different nodes, compare their position in the DOM.
</span><del>-    if (firstRegion-&gt;generatingElement() != secondRegion-&gt;generatingElement()) {
-        unsigned short position = firstRegion-&gt;generatingElement()-&gt;compareDocumentPosition(secondRegion-&gt;generatingElement());
</del><ins>+    if (firstFragment-&gt;generatingElement() != secondFragment-&gt;generatingElement()) {
+        unsigned short position = firstFragment-&gt;generatingElement()-&gt;compareDocumentPosition(secondFragment-&gt;generatingElement());
</ins><span class="cx"> 
</span><span class="cx">         // If the second region is contained in the first one, the first region is &quot;less&quot; if it's :before.
</span><span class="cx">         if (position &amp; Node::DOCUMENT_POSITION_CONTAINED_BY) {
</span><del>-            ASSERT(secondRegion-&gt;style().styleType() == NOPSEUDO);
-            return firstRegion-&gt;style().styleType() == BEFORE;
</del><ins>+            ASSERT(secondFragment-&gt;style().styleType() == NOPSEUDO);
+            return firstFragment-&gt;style().styleType() == BEFORE;
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         // If the second region contains the first region, the first region is &quot;less&quot; if the second is :after.
</span><span class="cx">         if (position &amp; Node::DOCUMENT_POSITION_CONTAINS) {
</span><del>-            ASSERT(firstRegion-&gt;style().styleType() == NOPSEUDO);
-            return secondRegion-&gt;style().styleType() == AFTER;
</del><ins>+            ASSERT(firstFragment-&gt;style().styleType() == NOPSEUDO);
+            return secondFragment-&gt;style().styleType() == AFTER;
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         return (position &amp; Node::DOCUMENT_POSITION_FOLLOWING);
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     // FIXME: Currently it's not possible for an element to be both a region and have pseudo-children. The case is covered anyway.
</span><del>-    switch (firstRegion-&gt;style().styleType()) {
</del><ins>+    switch (firstFragment-&gt;style().styleType()) {
</ins><span class="cx">     case BEFORE:
</span><span class="cx">         // The second region can be the node or the after pseudo-element (before is smaller than any of those).
</span><span class="cx">         return true;
</span><span class="lines">@@ -186,7 +185,7 @@
</span><span class="cx">         return false;
</span><span class="cx">     case NOPSEUDO:
</span><span class="cx">         // The second region can either be the before or the after pseudo-element (the node is only smaller than the after pseudo-element).
</span><del>-        return firstRegion-&gt;style().styleType() == AFTER;
</del><ins>+        return firstFragment-&gt;style().styleType() == AFTER;
</ins><span class="cx">     default:
</span><span class="cx">         break;
</span><span class="cx">     }
</span><span class="lines">@@ -196,31 +195,31 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> // This helper function adds a region to a list preserving the order property of the list.
</span><del>-static void addRegionToList(RenderRegionList&amp; regionList, RenderRegion* renderRegion)
</del><ins>+static void addFragmentToList(RenderRegionList&amp; regionList, RenderNamedFlowFragment* renderNamedFlowFragment)
</ins><span class="cx"> {
</span><span class="cx">     if (regionList.isEmpty())
</span><del>-        regionList.add(renderRegion);
</del><ins>+        regionList.add(renderNamedFlowFragment);
</ins><span class="cx">     else {
</span><del>-        // Find the first region &quot;greater&quot; than renderRegion.
</del><ins>+        // Find the first region &quot;greater&quot; than renderNamedFlowFragment.
</ins><span class="cx">         auto it = regionList.begin();
</span><del>-        while (it != regionList.end() &amp;&amp; !compareRenderRegions(renderRegion, *it))
</del><ins>+        while (it != regionList.end() &amp;&amp; !compareRenderNamedFlowFragments(renderNamedFlowFragment, toRenderNamedFlowFragment(*it)))
</ins><span class="cx">             ++it;
</span><del>-        regionList.insertBefore(it, renderRegion);
</del><ins>+        regionList.insertBefore(it, renderNamedFlowFragment);
</ins><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void RenderNamedFlowThread::addRegionToNamedFlowThread(RenderRegion* renderRegion)
</del><ins>+void RenderNamedFlowThread::addFragmentToNamedFlowThread(RenderNamedFlowFragment* renderNamedFlowFragment)
</ins><span class="cx"> {
</span><del>-    ASSERT(renderRegion);
-    ASSERT(!renderRegion-&gt;isValid());
</del><ins>+    ASSERT(renderNamedFlowFragment);
+    ASSERT(!renderNamedFlowFragment-&gt;isValid());
</ins><span class="cx"> 
</span><del>-    if (renderRegion-&gt;parentNamedFlowThread())
-        addDependencyOnFlowThread(renderRegion-&gt;parentNamedFlowThread());
</del><ins>+    if (renderNamedFlowFragment-&gt;parentNamedFlowThread())
+        addDependencyOnFlowThread(renderNamedFlowFragment-&gt;parentNamedFlowThread());
</ins><span class="cx"> 
</span><del>-    renderRegion-&gt;setIsValid(true);
-    addRegionToList(m_regionList, renderRegion);
</del><ins>+    renderNamedFlowFragment-&gt;setIsValid(true);
+    addFragmentToList(m_regionList, renderNamedFlowFragment);
</ins><span class="cx"> 
</span><del>-    if (m_regionList.first() == renderRegion)
</del><ins>+    if (m_regionList.first() == renderNamedFlowFragment)
</ins><span class="cx">         updateWritingMode();
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -229,17 +228,18 @@
</span><span class="cx">     ASSERT(renderRegion);
</span><span class="cx">     ASSERT(!renderRegion-&gt;isValid());
</span><span class="cx"> 
</span><ins>+    RenderNamedFlowFragment* renderNamedFlowFragment = toRenderNamedFlowFragment(renderRegion);
</ins><span class="cx">     resetMarkForDestruction();
</span><span class="cx"> 
</span><del>-    if (renderRegion-&gt;parentNamedFlowThread() &amp;&amp; renderRegion-&gt;parentNamedFlowThread()-&gt;dependsOn(this)) {
</del><ins>+    if (renderNamedFlowFragment-&gt;parentNamedFlowThread() &amp;&amp; renderNamedFlowFragment-&gt;parentNamedFlowThread()-&gt;dependsOn(this)) {
</ins><span class="cx">         // The order of invalid regions is irrelevant.
</span><del>-        m_invalidRegionList.add(renderRegion);
</del><ins>+        m_invalidRegionList.add(renderNamedFlowFragment);
</ins><span class="cx">         // Register ourself to get a notification when the state changes.
</span><del>-        renderRegion-&gt;parentNamedFlowThread()-&gt;m_observerThreadsSet.add(this);
</del><ins>+        renderNamedFlowFragment-&gt;parentNamedFlowThread()-&gt;m_observerThreadsSet.add(this);
</ins><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    addRegionToNamedFlowThread(renderRegion);
</del><ins>+    addFragmentToNamedFlowThread(renderNamedFlowFragment);
</ins><span class="cx"> 
</span><span class="cx">     invalidateRegions();
</span><span class="cx"> }
</span><span class="lines">@@ -248,21 +248,22 @@
</span><span class="cx"> {
</span><span class="cx">     ASSERT(renderRegion);
</span><span class="cx"> 
</span><del>-    if (renderRegion-&gt;parentNamedFlowThread()) {
-        if (!renderRegion-&gt;isValid()) {
-            ASSERT(m_invalidRegionList.contains(renderRegion));
-            m_invalidRegionList.remove(renderRegion);
-            renderRegion-&gt;parentNamedFlowThread()-&gt;m_observerThreadsSet.remove(this);
</del><ins>+    RenderNamedFlowFragment* renderNamedFlowFragment = toRenderNamedFlowFragment(renderRegion);
+    if (renderNamedFlowFragment-&gt;parentNamedFlowThread()) {
+        if (!renderNamedFlowFragment-&gt;isValid()) {
+            ASSERT(m_invalidRegionList.contains(renderNamedFlowFragment));
+            m_invalidRegionList.remove(renderNamedFlowFragment);
+            renderNamedFlowFragment-&gt;parentNamedFlowThread()-&gt;m_observerThreadsSet.remove(this);
</ins><span class="cx">             // No need to invalidate the regions rectangles. The removed region
</span><span class="cx">             // was not taken into account. Just return here.
</span><span class="cx">             return;
</span><span class="cx">         }
</span><del>-        removeDependencyOnFlowThread(renderRegion-&gt;parentNamedFlowThread());
</del><ins>+        removeDependencyOnFlowThread(renderNamedFlowFragment-&gt;parentNamedFlowThread());
</ins><span class="cx">     }
</span><span class="cx"> 
</span><del>-    ASSERT(m_regionList.contains(renderRegion));
-    bool wasFirst = m_regionList.first() == renderRegion;
-    m_regionList.remove(renderRegion);
</del><ins>+    ASSERT(m_regionList.contains(renderNamedFlowFragment));
+    bool wasFirst = m_regionList.first() == renderNamedFlowFragment;
+    m_regionList.remove(renderNamedFlowFragment);
</ins><span class="cx"> 
</span><span class="cx">     if (canBeDestroyed())
</span><span class="cx">         setMarkForDestruction();
</span><span class="lines">@@ -295,17 +296,17 @@
</span><span class="cx">             || (!isHorizontalWritingMode() &amp;&amp; visualOverflowRect().maxX() &gt; clientBoxRect().maxX())))
</span><span class="cx">         height = isHorizontalWritingMode() ? visualOverflowRect().maxY() : visualOverflowRect().maxX();
</span><span class="cx"> 
</span><del>-    RenderRegion* lastReg = lastRegion();
-    for (auto&amp; region : m_regionList) {
-        LayoutUnit flowMin = height - (isHorizontalWritingMode() ? region-&gt;flowThreadPortionRect().y() : region-&gt;flowThreadPortionRect().x());
-        LayoutUnit flowMax = height - (isHorizontalWritingMode() ? region-&gt;flowThreadPortionRect().maxY() : region-&gt;flowThreadPortionRect().maxX());
-        RegionOversetState previousState = region-&gt;regionOversetState();
</del><ins>+    RenderNamedFlowFragment* lastFragment = toRenderNamedFlowFragment(lastRegion());
+    for (auto&amp; namedFlowFragment : m_regionList) {
+        LayoutUnit flowMin = height - (isHorizontalWritingMode() ? namedFlowFragment-&gt;flowThreadPortionRect().y() : namedFlowFragment-&gt;flowThreadPortionRect().x());
+        LayoutUnit flowMax = height - (isHorizontalWritingMode() ? namedFlowFragment-&gt;flowThreadPortionRect().maxY() : namedFlowFragment-&gt;flowThreadPortionRect().maxX());
+        RegionOversetState previousState = namedFlowFragment-&gt;regionOversetState();
</ins><span class="cx">         RegionOversetState state = RegionFit;
</span><span class="cx">         if (flowMin &lt;= 0)
</span><span class="cx">             state = RegionEmpty;
</span><del>-        if (flowMax &gt; 0 &amp;&amp; region == lastReg)
</del><ins>+        if (flowMax &gt; 0 &amp;&amp; namedFlowFragment == lastFragment)
</ins><span class="cx">             state = RegionOverset;
</span><del>-        region-&gt;setRegionOversetState(state);
</del><ins>+        namedFlowFragment-&gt;setRegionOversetState(state);
</ins><span class="cx">         // determine whether the NamedFlow object should dispatch a regionLayoutUpdate event
</span><span class="cx">         // FIXME: currently it cannot determine whether a region whose regionOverset state remained either &quot;fit&quot; or &quot;overset&quot; has actually
</span><span class="cx">         // changed, so it just assumes that the NamedFlow should dispatch the event
</span><span class="lines">@@ -326,28 +327,29 @@
</span><span class="cx"> 
</span><span class="cx">     // With the regions overflow state computed we can also set the overset flag for the named flow.
</span><span class="cx">     // If there are no valid regions in the chain, overset is true.
</span><del>-    m_overset = lastReg ? lastReg-&gt;regionOversetState() == RegionOverset : true;
</del><ins>+    m_overset = lastFragment ? lastFragment-&gt;regionOversetState() == RegionOverset : true;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void RenderNamedFlowThread::checkInvalidRegions()
</span><span class="cx"> {
</span><del>-    Vector&lt;RenderRegion*&gt; newValidRegions;
</del><ins>+    Vector&lt;RenderNamedFlowFragment*&gt; newValidFragments;
</ins><span class="cx">     for (auto&amp; region : m_invalidRegionList) {
</span><ins>+        RenderNamedFlowFragment* namedFlowFragment = toRenderNamedFlowFragment(region);
</ins><span class="cx">         // The only reason a region would be invalid is because it has a parent flow thread.
</span><del>-        ASSERT(!region-&gt;isValid() &amp;&amp; region-&gt;parentNamedFlowThread());
-        if (region-&gt;parentNamedFlowThread()-&gt;dependsOn(this))
</del><ins>+        ASSERT(!namedFlowFragment-&gt;isValid() &amp;&amp; namedFlowFragment-&gt;parentNamedFlowThread());
+        if (namedFlowFragment-&gt;parentNamedFlowThread()-&gt;dependsOn(this))
</ins><span class="cx">             continue;
</span><span class="cx"> 
</span><del>-        newValidRegions.append(region);
</del><ins>+        newValidFragments.append(namedFlowFragment);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><del>-    for (auto&amp; region : newValidRegions) {
-        m_invalidRegionList.remove(region);
-        region-&gt;parentNamedFlowThread()-&gt;m_observerThreadsSet.remove(this);
-        addRegionToNamedFlowThread(region);
</del><ins>+    for (auto&amp; namedFlowFragment : newValidFragments) {
+        m_invalidRegionList.remove(namedFlowFragment);
+        namedFlowFragment-&gt;parentNamedFlowThread()-&gt;m_observerThreadsSet.remove(this);
+        addFragmentToNamedFlowThread(namedFlowFragment);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><del>-    if (!newValidRegions.isEmpty())
</del><ins>+    if (!newValidFragments.isEmpty())
</ins><span class="cx">         invalidateRegions();
</span><span class="cx"> 
</span><span class="cx">     if (m_observerThreadsSet.isEmpty())
</span><span class="lines">@@ -538,22 +540,22 @@
</span><span class="cx">     return NodeTraversal::next(currNode, contentElement);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void RenderNamedFlowThread::getRanges(Vector&lt;RefPtr&lt;Range&gt;&gt;&amp; rangeObjects, const RenderRegion* region) const
</del><ins>+void RenderNamedFlowThread::getRanges(Vector&lt;RefPtr&lt;Range&gt;&gt;&amp; rangeObjects, const RenderNamedFlowFragment* namedFlowFragment) const
</ins><span class="cx"> {
</span><span class="cx">     LayoutUnit logicalTopForRegion;
</span><span class="cx">     LayoutUnit logicalBottomForRegion;
</span><span class="cx"> 
</span><span class="cx">     // extend the first region top to contain everything up to its logical height
</span><del>-    if (region-&gt;isFirstRegion())
</del><ins>+    if (namedFlowFragment-&gt;isFirstRegion())
</ins><span class="cx">         logicalTopForRegion = LayoutUnit::min();
</span><span class="cx">     else
</span><del>-        logicalTopForRegion =  region-&gt;logicalTopForFlowThreadContent();
</del><ins>+        logicalTopForRegion =  namedFlowFragment-&gt;logicalTopForFlowThreadContent();
</ins><span class="cx"> 
</span><span class="cx">     // extend the last region to contain everything above its y()
</span><del>-    if (region-&gt;isLastRegion())
</del><ins>+    if (namedFlowFragment-&gt;isLastRegion())
</ins><span class="cx">         logicalBottomForRegion = LayoutUnit::max();
</span><span class="cx">     else
</span><del>-        logicalBottomForRegion = region-&gt;logicalBottomForFlowThreadContent();
</del><ins>+        logicalBottomForRegion = namedFlowFragment-&gt;logicalBottomForFlowThreadContent();
</ins><span class="cx"> 
</span><span class="cx">     Vector&lt;Element*&gt; elements;
</span><span class="cx">     // eliminate the contentElements that are descendants of other contentElements
</span><span class="lines">@@ -595,8 +597,8 @@
</span><span class="cx"> 
</span><span class="cx">             boundingBox.moveBy(logicalOffsetFromTop);
</span><span class="cx"> 
</span><del>-            LayoutUnit logicalTopForRenderer = region-&gt;logicalTopOfFlowThreadContentRect(boundingBox);
-            LayoutUnit logicalBottomForRenderer = region-&gt;logicalBottomOfFlowThreadContentRect(boundingBox);
</del><ins>+            LayoutUnit logicalTopForRenderer = namedFlowFragment-&gt;logicalTopOfFlowThreadContentRect(boundingBox);
+            LayoutUnit logicalBottomForRenderer = namedFlowFragment-&gt;logicalBottomOfFlowThreadContentRect(boundingBox);
</ins><span class="cx"> 
</span><span class="cx">             // if the bounding box of the current element doesn't intersect the region box
</span><span class="cx">             // close the current range only if the start element began inside the region,
</span><span class="lines">@@ -699,8 +701,7 @@
</span><span class="cx"> {
</span><span class="cx">     bool hasRegionsWithStyling = false;
</span><span class="cx">     for (const auto&amp; region : m_regionList) {
</span><del>-        const RenderNamedFlowFragment* namedFlowFragment = toRenderNamedFlowFragment(region);
-        if (namedFlowFragment-&gt;hasCustomRegionStyle()) {
</del><ins>+        if (toRenderNamedFlowFragment(region)-&gt;hasCustomRegionStyle()) {
</ins><span class="cx">             hasRegionsWithStyling = true;
</span><span class="cx">             break;
</span><span class="cx">         }
</span><span class="lines">@@ -713,8 +714,7 @@
</span><span class="cx">     // Clear the styles for the object in the regions.
</span><span class="cx">     // FIXME: Region styling is not computed only for the region range of the object so this is why we need to walk the whole chain.
</span><span class="cx">     for (auto&amp; region : m_regionList) {
</span><del>-        RenderNamedFlowFragment* namedFlowFragment = toRenderNamedFlowFragment(region);
-        namedFlowFragment-&gt;clearObjectStyleInRegion(object);
</del><ins>+        toRenderNamedFlowFragment(region)-&gt;clearObjectStyleInRegion(object);
</ins><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderNamedFlowThreadh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderNamedFlowThread.h (164481 => 164482)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderNamedFlowThread.h        2014-02-21 11:26:44 UTC (rev 164481)
+++ trunk/Source/WebCore/rendering/RenderNamedFlowThread.h        2014-02-21 15:29:49 UTC (rev 164482)
</span><span class="lines">@@ -77,7 +77,7 @@
</span><span class="cx">     bool hasContentElement(Element&amp;) const;
</span><span class="cx"> 
</span><span class="cx">     bool isMarkedForDestruction() const;
</span><del>-    void getRanges(Vector&lt;RefPtr&lt;Range&gt;&gt;&amp;, const RenderRegion*) const;
</del><ins>+    void getRanges(Vector&lt;RefPtr&lt;Range&gt;&gt;&amp;, const RenderNamedFlowFragment*) const;
</ins><span class="cx"> 
</span><span class="cx">     virtual bool collectsGraphicsLayersUnderRegions() const override;
</span><span class="cx"> 
</span><span class="lines">@@ -105,7 +105,7 @@
</span><span class="cx">     void addDependencyOnFlowThread(RenderNamedFlowThread*);
</span><span class="cx">     void removeDependencyOnFlowThread(RenderNamedFlowThread*);
</span><span class="cx"> 
</span><del>-    void addRegionToNamedFlowThread(RenderRegion*);
</del><ins>+    void addFragmentToNamedFlowThread(RenderNamedFlowFragment*);
</ins><span class="cx"> 
</span><span class="cx">     void checkInvalidRegions();
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderRegioncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderRegion.cpp (164481 => 164482)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderRegion.cpp        2014-02-21 11:26:44 UTC (rev 164481)
+++ trunk/Source/WebCore/rendering/RenderRegion.cpp        2014-02-21 15:29:49 UTC (rev 164482)
</span><span class="lines">@@ -446,12 +446,6 @@
</span><span class="cx">     setPreferredLogicalWidthsDirty(false);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void RenderRegion::getRanges(Vector&lt;RefPtr&lt;Range&gt;&gt;&amp; rangeObjects) const
-{
-    const RenderNamedFlowThread&amp; namedFlow = view().flowThreadController().ensureRenderFlowThreadWithName(style().regionThread());
-    namedFlow.getRanges(rangeObjects, this);
-}
-
</del><span class="cx"> void RenderRegion::adjustRegionBoundsFromFlowThreadPortionRect(const LayoutPoint&amp; layerOffset, LayoutRect&amp; regionBounds)
</span><span class="cx"> {
</span><span class="cx">     LayoutRect flippedFlowThreadPortionRect = flowThreadPortionRect();
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderRegionh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderRegion.h (164481 => 164482)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderRegion.h        2014-02-21 11:26:44 UTC (rev 164481)
+++ trunk/Source/WebCore/rendering/RenderRegion.h        2014-02-21 15:29:49 UTC (rev 164482)
</span><span class="lines">@@ -93,8 +93,6 @@
</span><span class="cx">     LayoutUnit logicalTopForFlowThreadContent() const { return logicalTopOfFlowThreadContentRect(flowThreadPortionRect()); };
</span><span class="cx">     LayoutUnit logicalBottomForFlowThreadContent() const { return logicalBottomOfFlowThreadContentRect(flowThreadPortionRect()); };
</span><span class="cx"> 
</span><del>-    void getRanges(Vector&lt;RefPtr&lt;Range&gt;&gt;&amp;) const;
-
</del><span class="cx">     // This method represents the logical height of the entire flow thread portion used by the region or set.
</span><span class="cx">     // For RenderRegions it matches logicalPaginationHeight(), but for sets it is the height of all the pages
</span><span class="cx">     // or columns added together.
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderReplacedcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderReplaced.cpp (164481 => 164482)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderReplaced.cpp        2014-02-21 11:26:44 UTC (rev 164481)
+++ trunk/Source/WebCore/rendering/RenderReplaced.cpp        2014-02-21 15:29:49 UTC (rev 164482)
</span><span class="lines">@@ -33,7 +33,7 @@
</span><span class="cx"> #include &quot;RenderFlowThread.h&quot;
</span><span class="cx"> #include &quot;RenderImage.h&quot;
</span><span class="cx"> #include &quot;RenderLayer.h&quot;
</span><del>-#include &quot;RenderRegion.h&quot;
</del><ins>+#include &quot;RenderNamedFlowFragment.h&quot;
</ins><span class="cx"> #include &quot;RenderTheme.h&quot;
</span><span class="cx"> #include &quot;RenderView.h&quot;
</span><span class="cx"> #include &quot;VisiblePosition.h&quot;
</span><span class="lines">@@ -205,7 +205,7 @@
</span><span class="cx">         return false;
</span><span class="cx">     
</span><span class="cx">     // Check our region range to make sure we need to be painting in this region.
</span><del>-    if (paintInfo.renderRegion &amp;&amp; !paintInfo.renderRegion-&gt;flowThread()-&gt;objectShouldPaintInFlowRegion(this, paintInfo.renderRegion))
</del><ins>+    if (paintInfo.renderNamedFlowFragment &amp;&amp; !paintInfo.renderNamedFlowFragment-&gt;flowThread()-&gt;objectShouldPaintInFlowRegion(this, paintInfo.renderNamedFlowFragment))
</ins><span class="cx">         return false;
</span><span class="cx"> 
</span><span class="cx">     LayoutPoint adjustedPaintOffset = paintOffset + location();
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderReplicacpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderReplica.cpp (164481 => 164482)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderReplica.cpp        2014-02-21 11:26:44 UTC (rev 164481)
+++ trunk/Source/WebCore/rendering/RenderReplica.cpp        2014-02-21 15:29:49 UTC (rev 164482)
</span><span class="lines">@@ -74,7 +74,7 @@
</span><span class="cx">         // Turn around and paint the parent layer. Use temporary clipRects, so that the layer doesn't end up caching clip rects
</span><span class="cx">         // computing using the wrong rootLayer
</span><span class="cx">         RenderLayer* rootPaintingLayer = layer()-&gt;transform() ? layer()-&gt;parent() : layer()-&gt;enclosingTransformedAncestor();
</span><del>-        RenderLayer::LayerPaintingInfo paintingInfo(rootPaintingLayer, paintInfo.rect, PaintBehaviorNormal, LayoutSize(), 0, paintInfo.renderRegion);
</del><ins>+        RenderLayer::LayerPaintingInfo paintingInfo(rootPaintingLayer, paintInfo.rect, PaintBehaviorNormal, LayoutSize(), 0, paintInfo.renderNamedFlowFragment);
</ins><span class="cx">         RenderLayer::PaintLayerFlags flags = RenderLayer::PaintLayerHaveTransparency | RenderLayer::PaintLayerAppliedTransform | RenderLayer::PaintLayerTemporaryClipRects | RenderLayer::PaintLayerPaintingReflection;
</span><span class="cx">         layer()-&gt;parent()-&gt;paintLayer(paintInfo.context, paintingInfo, flags);
</span><span class="cx">     } else if (paintInfo.phase == PaintPhaseMask)
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRootInlineBoxcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RootInlineBox.cpp (164481 => 164482)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RootInlineBox.cpp        2014-02-21 11:26:44 UTC (rev 164481)
+++ trunk/Source/WebCore/rendering/RootInlineBox.cpp        2014-02-21 15:29:49 UTC (rev 164482)
</span><span class="lines">@@ -171,7 +171,7 @@
</span><span class="cx"> void RootInlineBox::paint(PaintInfo&amp; paintInfo, const LayoutPoint&amp; paintOffset, LayoutUnit lineTop, LayoutUnit lineBottom)
</span><span class="cx"> {
</span><span class="cx">     // Check if we are in the correct region.
</span><del>-    if (paintInfo.renderRegion &amp;&amp; m_hasContainingRegion &amp;&amp; containingRegion() != paintInfo.renderRegion)
</del><ins>+    if (paintInfo.renderNamedFlowFragment &amp;&amp; m_hasContainingRegion &amp;&amp; containingRegion() != reinterpret_cast&lt;RenderRegion*&gt;(paintInfo.renderNamedFlowFragment))
</ins><span class="cx">         return;
</span><span class="cx">     
</span><span class="cx">     InlineFlowBox::paint(paintInfo, paintOffset, lineTop, lineBottom);
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingsvgRenderSVGRootcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/svg/RenderSVGRoot.cpp (164481 => 164482)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/svg/RenderSVGRoot.cpp        2014-02-21 11:26:44 UTC (rev 164481)
+++ trunk/Source/WebCore/rendering/svg/RenderSVGRoot.cpp        2014-02-21 15:29:49 UTC (rev 164482)
</span><span class="lines">@@ -32,6 +32,7 @@
</span><span class="cx"> #include &quot;LayoutRepainter.h&quot;
</span><span class="cx"> #include &quot;Page.h&quot;
</span><span class="cx"> #include &quot;RenderIterator.h&quot;
</span><ins>+#include &quot;RenderNamedFlowFragment.h&quot;
</ins><span class="cx"> #include &quot;RenderView.h&quot;
</span><span class="cx"> #include &quot;SVGImage.h&quot;
</span><span class="cx"> #include &quot;SVGLength.h&quot;
</span><span class="lines">@@ -267,7 +268,7 @@
</span><span class="cx">     childPaintInfo.context-&gt;save();
</span><span class="cx"> 
</span><span class="cx">     // Apply initial viewport clip - not affected by overflow handling
</span><del>-    childPaintInfo.context-&gt;clip(pixelSnappedIntRect(overflowClipRect(paintOffset, paintInfo.renderRegion)));
</del><ins>+    childPaintInfo.context-&gt;clip(pixelSnappedIntRect(overflowClipRect(paintOffset, paintInfo.renderNamedFlowFragment)));
</ins><span class="cx"> 
</span><span class="cx">     // Convert from container offsets (html renderers) to a relative transform (svg renderers).
</span><span class="cx">     // Transform from our paint container's coordinate system to our local coords.
</span></span></pre>
</div>
</div>

</body>
</html>