Upstream version 10.39.225.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / Source / core / rendering / RenderFlowThread.cpp
index 71e7e3c..a2c0218 100644 (file)
@@ -66,7 +66,6 @@ void RenderFlowThread::invalidateRegions()
         return;
     }
 
-    m_multiColumnSetRangeMap.clear();
     setNeedsLayoutAndFullPaintInvalidation();
 
     m_regionsInvalidated = true;
@@ -151,7 +150,7 @@ bool RenderFlowThread::nodeAtPoint(const HitTestRequest& request, HitTestResult&
     return RenderBlockFlow::nodeAtPoint(request, result, locationInContainer, accumulatedOffset, hitTestAction);
 }
 
-bool RenderFlowThread::shouldRepaint(const LayoutRect& r) const
+bool RenderFlowThread::shouldIssuePaintInvalidations(const LayoutRect& r) const
 {
     if (view()->document().printing() || r.isEmpty())
         return false;
@@ -159,9 +158,9 @@ bool RenderFlowThread::shouldRepaint(const LayoutRect& r) const
     return true;
 }
 
-void RenderFlowThread::repaintRectangleInRegions(const LayoutRect& repaintRect) const
+void RenderFlowThread::paintInvalidationRectangleInRegions(const LayoutRect& paintInvalidationRect) const
 {
-    if (!shouldRepaint(repaintRect) || !hasValidRegionInfo())
+    if (!shouldIssuePaintInvalidations(paintInvalidationRect) || !hasValidRegionInfo())
         return;
 
     // We can't use currentFlowThread as it is possible to have interleaved flow threads and the wrong one could be used.
@@ -171,7 +170,7 @@ void RenderFlowThread::repaintRectangleInRegions(const LayoutRect& repaintRect)
     for (RenderMultiColumnSetList::const_iterator iter = m_multiColumnSetList.begin(); iter != m_multiColumnSetList.end(); ++iter) {
         RenderMultiColumnSet* columnSet = *iter;
 
-        columnSet->repaintFlowThreadContent(repaintRect);
+        columnSet->paintInvalidationForFlowThreadContent(paintInvalidationRect);
     }
 }
 
@@ -216,42 +215,6 @@ RenderRegion* RenderFlowThread::lastRegion() const
     return m_multiColumnSetList.last();
 }
 
-void RenderFlowThread::setRegionRangeForBox(const RenderBox* box, LayoutUnit offsetFromLogicalTopOfFirstPage)
-{
-    if (!hasRegions())
-        return;
-
-    // FIXME: Not right for differing writing-modes.
-    RenderMultiColumnSet* startColumnSet = columnSetAtBlockOffset(offsetFromLogicalTopOfFirstPage);
-    RenderMultiColumnSet* endColumnSet = columnSetAtBlockOffset(offsetFromLogicalTopOfFirstPage + box->logicalHeight());
-    RenderMultiColumnSetRangeMap::iterator it = m_multiColumnSetRangeMap.find(box);
-    if (it == m_multiColumnSetRangeMap.end()) {
-        m_multiColumnSetRangeMap.set(box, RenderMultiColumnSetRange(startColumnSet, endColumnSet));
-        return;
-    }
-
-    // If nothing changed, just bail.
-    RenderMultiColumnSetRange& range = it->value;
-    if (range.startColumnSet() == startColumnSet && range.endColumnSet() == endColumnSet)
-        return;
-
-    range.setRange(startColumnSet, endColumnSet);
-}
-
-void RenderFlowThread::getRegionRangeForBox(const RenderBox* box, RenderMultiColumnSet*& startColumnSet, RenderMultiColumnSet*& endColumnSet) const
-{
-    startColumnSet = 0;
-    endColumnSet = 0;
-    RenderMultiColumnSetRangeMap::const_iterator it = m_multiColumnSetRangeMap.find(box);
-    if (it == m_multiColumnSetRangeMap.end())
-        return;
-
-    const RenderMultiColumnSetRange& range = it->value;
-    startColumnSet = range.startColumnSet();
-    endColumnSet = range.endColumnSet();
-    ASSERT(m_multiColumnSetList.contains(startColumnSet) && m_multiColumnSetList.contains(endColumnSet));
-}
-
 void RenderFlowThread::updateRegionsFlowThreadPortionRect()
 {
     LayoutUnit logicalHeight = 0;