<!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>[167444] 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/167444">167444</a></dd>
<dt>Author</dt> <dd>hyatt@apple.com</dd>
<dt>Date</dt> <dd>2014-04-17 11:48:15 -0700 (Thu, 17 Apr 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>[New Multicolumn] columnNumberForOffset is not patched for new multicolumn code yet.
https://bugs.webkit.org/show_bug.cgi?id=131740

Reviewed by Enrica Casucci.
        
I took the opportunity to clean this code up while adding support for the new columns.
columnNumberForOffset only applied for paginated RenderViews and was really about
pages and not columns. It also only returns an actual page number if the columns are
block progressed (e.g., right-to-left vertical Japanese books).
        
Therefore I renamed columnNumberForOffset to pageNumberForBlockProgressionOffset and
moved it to RenderView.
        
I also renamed the member variable of SelectionRect to be pageNumber instead of
columnNumber in order to make it more obvious that this isn't about columns per se
(since the fact that we implemented RenderView's pagination mode using columns is an
implementation detail).

* dom/Range.cpp:
(WebCore::coalesceSelectionRects):
(WebCore::Range::collectSelectionRects):
* platform/ios/SelectionRect.h:
(WebCore::SelectionRect::pageNumber):
(WebCore::SelectionRect::columnNumber): Deleted.
* rendering/RenderImage.cpp:
(WebCore::RenderImage::collectSelectionRects):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::collectSelectionRects):
(WebCore::RenderObject::columnNumberForOffset): Deleted.
* rendering/RenderObject.h:
* rendering/RenderText.cpp:
(WebCore::RenderText::collectSelectionRects):
* rendering/RenderView.cpp:
(WebCore::RenderView::pageNumberForBlockProgressionOffset):
* rendering/RenderView.h:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoredomRangecpp">trunk/Source/WebCore/dom/Range.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformiosSelectionRecth">trunk/Source/WebCore/platform/ios/SelectionRect.h</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderImagecpp">trunk/Source/WebCore/rendering/RenderImage.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderObjectcpp">trunk/Source/WebCore/rendering/RenderObject.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderObjecth">trunk/Source/WebCore/rendering/RenderObject.h</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderTextcpp">trunk/Source/WebCore/rendering/RenderText.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderViewcpp">trunk/Source/WebCore/rendering/RenderView.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderViewh">trunk/Source/WebCore/rendering/RenderView.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (167443 => 167444)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-04-17 18:26:58 UTC (rev 167443)
+++ trunk/Source/WebCore/ChangeLog        2014-04-17 18:48:15 UTC (rev 167444)
</span><span class="lines">@@ -1,3 +1,41 @@
</span><ins>+2014-04-17  David Hyatt  &lt;hyatt@apple.com&gt;
+
+        [New Multicolumn] columnNumberForOffset is not patched for new multicolumn code yet.
+        https://bugs.webkit.org/show_bug.cgi?id=131740
+
+        Reviewed by Enrica Casucci.
+        
+        I took the opportunity to clean this code up while adding support for the new columns.
+        columnNumberForOffset only applied for paginated RenderViews and was really about
+        pages and not columns. It also only returns an actual page number if the columns are
+        block progressed (e.g., right-to-left vertical Japanese books).
+        
+        Therefore I renamed columnNumberForOffset to pageNumberForBlockProgressionOffset and
+        moved it to RenderView.
+        
+        I also renamed the member variable of SelectionRect to be pageNumber instead of
+        columnNumber in order to make it more obvious that this isn't about columns per se
+        (since the fact that we implemented RenderView's pagination mode using columns is an
+        implementation detail).
+
+        * dom/Range.cpp:
+        (WebCore::coalesceSelectionRects):
+        (WebCore::Range::collectSelectionRects):
+        * platform/ios/SelectionRect.h:
+        (WebCore::SelectionRect::pageNumber):
+        (WebCore::SelectionRect::columnNumber): Deleted.
+        * rendering/RenderImage.cpp:
+        (WebCore::RenderImage::collectSelectionRects):
+        * rendering/RenderObject.cpp:
+        (WebCore::RenderObject::collectSelectionRects):
+        (WebCore::RenderObject::columnNumberForOffset): Deleted.
+        * rendering/RenderObject.h:
+        * rendering/RenderText.cpp:
+        (WebCore::RenderText::collectSelectionRects):
+        * rendering/RenderView.cpp:
+        (WebCore::RenderView::pageNumberForBlockProgressionOffset):
+        * rendering/RenderView.h:
+
</ins><span class="cx"> 2014-04-16  Brent Fulgham  &lt;bfulgham@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [Win] A few final cleanups to the DataObject classes.
</span></span></pre></div>
<a id="trunkSourceWebCoredomRangecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Range.cpp (167443 => 167444)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Range.cpp        2014-04-17 18:26:58 UTC (rev 167443)
+++ trunk/Source/WebCore/dom/Range.cpp        2014-04-17 18:48:15 UTC (rev 167444)
</span><span class="lines">@@ -1711,7 +1711,7 @@
</span><span class="cx"> 
</span><span class="cx"> static SelectionRect coalesceSelectionRects(const SelectionRect&amp; original, const SelectionRect&amp; previous)
</span><span class="cx"> {
</span><del>-    SelectionRect result(unionRect(previous.rect(), original.rect()), original.isHorizontal(), original.columnNumber());
</del><ins>+    SelectionRect result(unionRect(previous.rect(), original.rect()), original.isHorizontal(), original.pageNumber());
</ins><span class="cx">     result.setDirection(original.containsStart() || original.containsEnd() ? original.direction() : previous.direction());
</span><span class="cx">     result.setContainsStart(previous.containsStart() || original.containsStart());
</span><span class="cx">     result.setContainsEnd(previous.containsEnd() || original.containsEnd());
</span><span class="lines">@@ -1823,7 +1823,7 @@
</span><span class="cx">                 lineBottom = currentRectBottom;
</span><span class="cx">             } else {
</span><span class="cx">                 lastLineBottom = lineBottom;
</span><del>-                if (currentRectTop &lt;= lastLineBottom &amp;&amp; i &amp;&amp; rects[i].columnNumber() == rects[i - 1].columnNumber()) {
</del><ins>+                if (currentRectTop &lt;= lastLineBottom &amp;&amp; i &amp;&amp; rects[i].pageNumber() == rects[i - 1].pageNumber()) {
</ins><span class="cx">                     lastLineTop = lineTop;
</span><span class="cx">                     lineBottom = lastLineTop;
</span><span class="cx">                 } else {
</span><span class="lines">@@ -1914,13 +1914,13 @@
</span><span class="cx">                 // For iBooks, the interior lines may cross multiple horizontal pages.
</span><span class="cx">                 interiorUnionRect.unite(currentRect.rect());
</span><span class="cx">             } else {
</span><del>-                unionedRects.append(SelectionRect(interiorUnionRect, currentRect.isHorizontal(), currentRect.columnNumber()));
</del><ins>+                unionedRects.append(SelectionRect(interiorUnionRect, currentRect.isHorizontal(), currentRect.pageNumber()));
</ins><span class="cx">                 interiorUnionRect = currentRect.rect();
</span><span class="cx">             }
</span><span class="cx">         } else {
</span><span class="cx">             // Processing last line.
</span><span class="cx">             if (!interiorUnionRect.isEmpty()) {
</span><del>-                unionedRects.append(SelectionRect(interiorUnionRect, currentRect.isHorizontal(), currentRect.columnNumber()));
</del><ins>+                unionedRects.append(SelectionRect(interiorUnionRect, currentRect.isHorizontal(), currentRect.pageNumber()));
</ins><span class="cx">                 interiorUnionRect = IntRect();
</span><span class="cx">             }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformiosSelectionRecth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/ios/SelectionRect.h (167443 => 167444)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/ios/SelectionRect.h        2014-04-17 18:26:58 UTC (rev 167443)
+++ trunk/Source/WebCore/platform/ios/SelectionRect.h        2014-04-17 18:48:15 UTC (rev 167444)
</span><span class="lines">@@ -62,7 +62,7 @@
</span><span class="cx">     bool isHorizontal() const { return m_isHorizontal; }
</span><span class="cx">     bool isInFixedPosition() const { return m_isInFixedPosition; }
</span><span class="cx">     bool isRubyText() const { return m_isRubyText; }
</span><del>-    int columnNumber() const { return m_columnNumber; }
</del><ins>+    int pageNumber() const { return m_pageNumber; }
</ins><span class="cx"> 
</span><span class="cx">     void setRect(const IntRect&amp; rect) { m_rect = rect; }
</span><span class="cx"> 
</span><span class="lines">@@ -125,7 +125,7 @@
</span><span class="cx">     bool m_isHorizontal;
</span><span class="cx">     bool m_isInFixedPosition;
</span><span class="cx">     bool m_isRubyText;
</span><del>-    int m_columnNumber;
</del><ins>+    int m_pageNumber;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderImagecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderImage.cpp (167443 => 167444)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderImage.cpp        2014-04-17 18:26:58 UTC (rev 167443)
+++ trunk/Source/WebCore/rendering/RenderImage.cpp        2014-04-17 18:48:15 UTC (rev 167444)
</span><span class="lines">@@ -112,7 +112,7 @@
</span><span class="cx"> 
</span><span class="cx">     // FIXME: We should consider either making SelectionRect a struct or better organize its optional fields into
</span><span class="cx">     // an auxiliary struct to simplify its initialization.
</span><del>-    rects.append(SelectionRect(absoluteBounds, containingBlock-&gt;style().direction(), lineExtentBounds.x(), lineExtentBounds.maxX(), lineExtentBounds.maxY(), 0, false /* line break */, isFirstOnLine, isLastOnLine, false /* contains start */, false /* contains end */, containingBlock-&gt;style().isHorizontalWritingMode(), isFixed, false /* ruby text */, columnNumberForOffset(absoluteBounds.x())));
</del><ins>+    rects.append(SelectionRect(absoluteBounds, containingBlock-&gt;style().direction(), lineExtentBounds.x(), lineExtentBounds.maxX(), lineExtentBounds.maxY(), 0, false /* line break */, isFirstOnLine, isLastOnLine, false /* contains start */, false /* contains end */, containingBlock-&gt;style().isHorizontalWritingMode(), isFixed, false /* ruby text */, view().pageNumberForBlockProgressionOffset(absoluteBounds.x())));
</ins><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderObjectcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderObject.cpp (167443 => 167444)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderObject.cpp        2014-04-17 18:26:58 UTC (rev 167443)
+++ trunk/Source/WebCore/rendering/RenderObject.cpp        2014-04-17 18:48:15 UTC (rev 167444)
</span><span class="lines">@@ -1086,26 +1086,6 @@
</span><span class="cx">         graphicsContext-&gt;endTransparencyLayer();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-// FIXME: Make this return an unsigned integer?
-int RenderObject::columnNumberForOffset(int offset)
-{
-    int columnNumber = 0;
-    RenderBlock* containingBlock = this-&gt;containingBlock();
-    RenderView&amp; view = containingBlock-&gt;view();
-    const Pagination&amp; pagination = view.frameView().frame().page()-&gt;pagination();
-    if (pagination.mode == Pagination::Unpaginated)
-        return columnNumber;
-
-    ColumnInfo* columnInfo = view.columnInfo();
-    if (columnInfo &amp;&amp; !columnInfo-&gt;progressionIsInline()) {
-        if (!columnInfo-&gt;progressionIsReversed())
-            columnNumber = (pagination.pageLength + pagination.gap - offset) / (pagination.pageLength + pagination.gap);
-        else
-            columnNumber = offset / (pagination.pageLength + pagination.gap);
-    }
-    return columnNumber;
-}
-
</del><span class="cx"> #if PLATFORM(IOS)
</span><span class="cx"> // This function is similar in spirit to RenderText::absoluteRectsForRange, but returns rectangles
</span><span class="cx"> // which are annotated with additional state which helps iOS draw selections in its unique way.
</span><span class="lines">@@ -1133,7 +1113,7 @@
</span><span class="cx"> 
</span><span class="cx">     unsigned numberOfQuads = quads.size();
</span><span class="cx">     for (unsigned i = 0; i &lt; numberOfQuads; ++i)
</span><del>-        rects.append(SelectionRect(quads[i].enclosingBoundingBox(), isHorizontalWritingMode(), columnNumberForOffset(quads[i].enclosingBoundingBox().x())));
</del><ins>+        rects.append(SelectionRect(quads[i].enclosingBoundingBox(), isHorizontalWritingMode(), view().pageNumberForBlockProgressionOffset(quads[i].enclosingBoundingBox().x())));
</ins><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderObjecth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderObject.h (167443 => 167444)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderObject.h        2014-04-17 18:26:58 UTC (rev 167443)
+++ trunk/Source/WebCore/rendering/RenderObject.h        2014-04-17 18:48:15 UTC (rev 167444)
</span><span class="lines">@@ -879,8 +879,6 @@
</span><span class="cx"> 
</span><span class="cx">     void drawLineForBoxSide(GraphicsContext*, float x1, float y1, float x2, float y2, BoxSide, Color, EBorderStyle, float adjbw1, float adjbw2, bool antialias = false);
</span><span class="cx"> protected:
</span><del>-    int columnNumberForOffset(int offset);
-
</del><span class="cx">     void paintFocusRing(PaintInfo&amp;, const LayoutPoint&amp;, RenderStyle*);
</span><span class="cx">     void paintOutline(PaintInfo&amp;, const LayoutRect&amp;);
</span><span class="cx">     void addPDFURLRect(GraphicsContext*, const LayoutRect&amp;);
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderTextcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderText.cpp (167443 => 167444)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderText.cpp        2014-04-17 18:26:58 UTC (rev 167443)
+++ trunk/Source/WebCore/rendering/RenderText.cpp        2014-04-17 18:48:15 UTC (rev 167444)
</span><span class="lines">@@ -391,7 +391,7 @@
</span><span class="cx">             }
</span><span class="cx">         }
</span><span class="cx"> 
</span><del>-        rects.append(SelectionRect(absRect, box-&gt;direction(), extentsRect.x(), extentsRect.maxX(), extentsRect.maxY(), 0, box-&gt;isLineBreak(), isFirstOnLine, isLastOnLine, containsStart, containsEnd, boxIsHorizontal, isFixed, containingBlock-&gt;isRubyText(), columnNumberForOffset(absRect.x())));
</del><ins>+        rects.append(SelectionRect(absRect, box-&gt;direction(), extentsRect.x(), extentsRect.maxX(), extentsRect.maxY(), 0, box-&gt;isLineBreak(), isFirstOnLine, isLastOnLine, containsStart, containsEnd, boxIsHorizontal, isFixed, containingBlock-&gt;isRubyText(), view().pageNumberForBlockProgressionOffset(absRect.x())));
</ins><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderViewcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderView.cpp (167443 => 167444)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderView.cpp        2014-04-17 18:26:58 UTC (rev 167443)
+++ trunk/Source/WebCore/rendering/RenderView.cpp        2014-04-17 18:48:15 UTC (rev 167444)
</span><span class="lines">@@ -41,6 +41,7 @@
</span><span class="cx"> #include &quot;RenderLayer.h&quot;
</span><span class="cx"> #include &quot;RenderLayerBacking.h&quot;
</span><span class="cx"> #include &quot;RenderLayerCompositor.h&quot;
</span><ins>+#include &quot;RenderMultiColumnFlowThread.h&quot;
</ins><span class="cx"> #include &quot;RenderNamedFlowThread.h&quot;
</span><span class="cx"> #include &quot;RenderSelectionInfo.h&quot;
</span><span class="cx"> #include &quot;RenderWidget.h&quot;
</span><span class="lines">@@ -1224,4 +1225,36 @@
</span><span class="cx">     m_rootView-&gt;flushAccumulatedRepaintRegion();
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+unsigned RenderView::pageNumberForBlockProgressionOffset(int offset) const
+{
+    int columnNumber = 0;
+    const Pagination&amp; pagination = frameView().frame().page()-&gt;pagination();
+    if (pagination.mode == Pagination::Unpaginated)
+        return columnNumber;
+    
+    bool progressionIsInline = false;
+    bool progressionIsReversed = false;
+    
+    if (hasColumns()) {
+        ColumnInfo* colInfo = columnInfo();
+        if (!colInfo)
+            return columnNumber;
+        progressionIsInline = colInfo-&gt;progressionIsInline();
+        progressionIsReversed = colInfo-&gt;progressionIsReversed();
+    } else if (multiColumnFlowThread()) {
+        progressionIsInline = multiColumnFlowThread()-&gt;progressionIsInline();
+        progressionIsReversed = multiColumnFlowThread()-&gt;progressionIsReversed();
+    } else
+        return columnNumber;
+    
+    if (!progressionIsInline) {
+        if (!progressionIsReversed)
+            columnNumber = (pagination.pageLength + pagination.gap - offset) / (pagination.pageLength + pagination.gap);
+        else
+            columnNumber = offset / (pagination.pageLength + pagination.gap);
+    }
+
+    return columnNumber;
+}
+
</ins><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderViewh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderView.h (167443 => 167444)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderView.h        2014-04-17 18:26:58 UTC (rev 167443)
+++ trunk/Source/WebCore/rendering/RenderView.h        2014-04-17 18:48:15 UTC (rev 167444)
</span><span class="lines">@@ -154,6 +154,12 @@
</span><span class="cx">     }
</span><span class="cx">     LayoutUnit pageOrViewLogicalHeight() const;
</span><span class="cx"> 
</span><ins>+    // This method is used to assign a page number only when pagination modes have
+    // a block progression. This happens with vertical-rl books for example, but it
+    // doesn't happen for normal horizontal-tb books. This is a very specialized
+    // function and should not be mistaken for a general page number API.
+    unsigned pageNumberForBlockProgressionOffset(int offset) const;
+
</ins><span class="cx">     // FIXME: These functions are deprecated. No code should be added that uses these.
</span><span class="cx">     int bestTruncatedAt() const { return m_legacyPrinting.m_bestTruncatedAt; }
</span><span class="cx">     void setBestTruncatedAt(int y, RenderBoxModelObject* forRenderer, bool forcedBreak = false);
</span><span class="lines">@@ -238,7 +244,7 @@
</span><span class="cx">     virtual const RenderObject* pushMappingToContainer(const RenderLayerModelObject* ancestorToStopAt, RenderGeometryMap&amp;) const override;
</span><span class="cx">     virtual void mapAbsoluteToLocalPoint(MapCoordinatesFlags, TransformState&amp;) const override;
</span><span class="cx">     virtual bool requiresColumns(int desiredColumnCount) const override;
</span><del>-    
</del><ins>+
</ins><span class="cx"> private:
</span><span class="cx">     void initializeLayoutState(LayoutState&amp;);
</span><span class="cx"> 
</span></span></pre>
</div>
</div>

</body>
</html>