[CSS Regions] Rename objectShouldPaintInFlowRegion to something more clear
authorstavila@adobe.com <stavila@adobe.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 25 Apr 2014 17:58:19 +0000 (17:58 +0000)
committerstavila@adobe.com <stavila@adobe.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 25 Apr 2014 17:58:19 +0000 (17:58 +0000)
https://bugs.webkit.org/show_bug.cgi?id=132050

Reviewed by Andreas Kling.

The objectShouldPaintInFlowRegion is no longer used only by the painting process
but also for hit-testing, so it was renamed to something more generic (objectShouldFragmentInFlowRegion).

No new tests required, it's just a method rename.

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::paint):
(WebCore::RenderBlock::selectionGaps):
(WebCore::RenderBlock::nodeAtPoint):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::positionForPoint):
* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::objectShouldFragmentInFlowRegion):
(WebCore::RenderFlowThread::objectShouldPaintInFlowRegion): Deleted.
* rendering/RenderFlowThread.h:
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::paintLayer):
(WebCore::RenderLayer::hitTestLayer):
* rendering/RenderRegion.cpp:
(WebCore::RenderRegion::ensureOverflowForBox):
* rendering/RenderReplaced.cpp:
(WebCore::RenderReplaced::shouldPaint):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@167810 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderBlock.cpp
Source/WebCore/rendering/RenderBox.cpp
Source/WebCore/rendering/RenderFlowThread.cpp
Source/WebCore/rendering/RenderFlowThread.h
Source/WebCore/rendering/RenderLayer.cpp
Source/WebCore/rendering/RenderRegion.cpp
Source/WebCore/rendering/RenderReplaced.cpp

index 4d5250e..f520beb 100644 (file)
@@ -1,3 +1,33 @@
+2014-04-25  Radu Stavila  <stavila@adobe.com>
+
+        [CSS Regions] Rename objectShouldPaintInFlowRegion to something more clear
+        https://bugs.webkit.org/show_bug.cgi?id=132050
+
+        Reviewed by Andreas Kling.
+
+        The objectShouldPaintInFlowRegion is no longer used only by the painting process
+        but also for hit-testing, so it was renamed to something more generic (objectShouldFragmentInFlowRegion).
+
+        No new tests required, it's just a method rename.
+
+        * rendering/RenderBlock.cpp:
+        (WebCore::RenderBlock::paint):
+        (WebCore::RenderBlock::selectionGaps):
+        (WebCore::RenderBlock::nodeAtPoint):
+        * rendering/RenderBox.cpp:
+        (WebCore::RenderBox::positionForPoint):
+        * rendering/RenderFlowThread.cpp:
+        (WebCore::RenderFlowThread::objectShouldFragmentInFlowRegion):
+        (WebCore::RenderFlowThread::objectShouldPaintInFlowRegion): Deleted.
+        * rendering/RenderFlowThread.h:
+        * rendering/RenderLayer.cpp:
+        (WebCore::RenderLayer::paintLayer):
+        (WebCore::RenderLayer::hitTestLayer):
+        * rendering/RenderRegion.cpp:
+        (WebCore::RenderRegion::ensureOverflowForBox):
+        * rendering/RenderReplaced.cpp:
+        (WebCore::RenderReplaced::shouldPaint):
+
 2014-04-25  Enrica Casucci  <enrica@apple.com>
 
         iOS build fix after http://trac.webkit.org/changeset/167803
index ce3e2e9..1d36e22 100644 (file)
@@ -1792,7 +1792,7 @@ void RenderBlock::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffset)
     PaintPhase phase = paintInfo.phase;
 
     // Check our region range to make sure we need to be painting in this region.
-    if (paintInfo.renderNamedFlowFragment && !paintInfo.renderNamedFlowFragment->flowThread()->objectShouldPaintInFlowRegion(this, paintInfo.renderNamedFlowFragment))
+    if (paintInfo.renderNamedFlowFragment && !paintInfo.renderNamedFlowFragment->flowThread()->objectShouldFragmentInFlowRegion(this, paintInfo.renderNamedFlowFragment))
         return;
 
     // Check if we need to do anything at all.
@@ -2415,7 +2415,7 @@ GapRects RenderBlock::selectionGaps(RenderBlock& rootBlock, const LayoutPoint& r
     
     if (paintInfo && paintInfo->renderNamedFlowFragment && paintInfo->paintContainer->isRenderFlowThread()) {
         // Make sure the current object is actually flowed into the region being painted.
-        if (!toRenderFlowThread(paintInfo->paintContainer)->objectShouldPaintInFlowRegion(this, paintInfo->renderNamedFlowFragment))
+        if (!toRenderFlowThread(paintInfo->paintContainer)->objectShouldFragmentInFlowRegion(this, paintInfo->renderNamedFlowFragment))
             return result;
     }
 
@@ -2958,7 +2958,7 @@ bool RenderBlock::nodeAtPoint(const HitTestRequest& request, HitTestResult& resu
     if (locationInContainer.region()) {
         RenderFlowThread* flowThread = flowThreadContainingBlock();
         ASSERT(flowThread);
-        if (!flowThread->objectShouldPaintInFlowRegion(this, locationInContainer.region()))
+        if (!flowThread->objectShouldFragmentInFlowRegion(this, locationInContainer.region()))
             return false;
     }
 
index 0fcef85..41f791a 100644 (file)
@@ -4159,7 +4159,7 @@ VisiblePosition RenderBox::positionForPoint(const LayoutPoint& point, const Rend
 
         if (isRenderFlowThread()) {
             ASSERT(region);
-            if (!toRenderFlowThread(this)->objectShouldPaintInFlowRegion(renderObject, region))
+            if (!toRenderFlowThread(this)->objectShouldFragmentInFlowRegion(renderObject, region))
                 continue;
         }
 
index 5043eea..159ef11 100644 (file)
@@ -804,7 +804,7 @@ bool RenderFlowThread::regionInRange(const RenderRegion* targetRegion, const Ren
     return false;
 }
 
-bool RenderFlowThread::objectShouldPaintInFlowRegion(const RenderObject* object, const RenderRegion* region) const
+bool RenderFlowThread::objectShouldFragmentInFlowRegion(const RenderObject* object, const RenderRegion* region) const
 {
     ASSERT(object);
     ASSERT(region);
index 7b4cfb3..c2ff06d 100644 (file)
@@ -141,7 +141,7 @@ public:
     bool objectInFlowRegion(const RenderObject*, const RenderRegion*) const;
     
     // Check if the object should be painted in this region and if the region is part of this flow thread.
-    bool objectShouldPaintInFlowRegion(const RenderObject*, const RenderRegion*) const;
+    bool objectShouldFragmentInFlowRegion(const RenderObject*, const RenderRegion*) const;
 
     void markAutoLogicalHeightRegionsForLayout();
     void markRegionsForOverflowLayoutIfNeeded();
index 959020e..55be924 100644 (file)
@@ -3746,7 +3746,7 @@ void RenderLayer::paintLayer(GraphicsContext* context, const LayerPaintingInfo&
             info.renderNamedFlowFragment = nullptr;
         else {
             ASSERT(namedFlowFragment->isValid());
-            if (!namedFlowFragment->flowThread()->objectShouldPaintInFlowRegion(&renderer(), namedFlowFragment))
+            if (!namedFlowFragment->flowThread()->objectShouldFragmentInFlowRegion(&renderer(), namedFlowFragment))
                 return;
         }
     }
@@ -4907,7 +4907,7 @@ RenderLayer* RenderLayer::hitTestLayer(RenderLayer* rootLayer, RenderLayer* cont
     if (hitTestLocation.region()) {
         ASSERT(hitTestLocation.region()->isValid());
         RenderFlowThread* flowThread = hitTestLocation.region()->flowThread();
-        if (!flowThread->objectShouldPaintInFlowRegion(&renderer(), hitTestLocation.region()))
+        if (!flowThread->objectShouldFragmentInFlowRegion(&renderer(), hitTestLocation.region()))
             return 0;
     }
 
index 3a56b81..375e550 100644 (file)
@@ -444,7 +444,7 @@ void RenderRegion::ensureOverflowForBox(const RenderBox* box, RefPtr<RenderOverf
     
     LayoutRect borderBox = box->borderBoxRectInRegion(this);
     LayoutRect clientBox;
-    ASSERT(m_flowThread->objectShouldPaintInFlowRegion(box, this));
+    ASSERT(m_flowThread->objectShouldFragmentInFlowRegion(box, this));
 
     if (!borderBox.isEmpty()) {
         borderBox = rectFlowPortionForBox(box, borderBox);
index af75fe6..f697a3a 100644 (file)
@@ -207,7 +207,7 @@ bool RenderReplaced::shouldPaint(PaintInfo& paintInfo, const LayoutPoint& paintO
         return false;
     
     // Check our region range to make sure we need to be painting in this region.
-    if (paintInfo.renderNamedFlowFragment && !paintInfo.renderNamedFlowFragment->flowThread()->objectShouldPaintInFlowRegion(this, paintInfo.renderNamedFlowFragment))
+    if (paintInfo.renderNamedFlowFragment && !paintInfo.renderNamedFlowFragment->flowThread()->objectShouldFragmentInFlowRegion(this, paintInfo.renderNamedFlowFragment))
         return false;
 
     LayoutPoint adjustedPaintOffset = paintOffset + location();