RenderBox::hasRenderOverflow should return bool instead of RenderOverflow*
authorrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 26 Jun 2013 18:13:27 +0000 (18:13 +0000)
committerrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 26 Jun 2013 18:13:27 +0000 (18:13 +0000)
https://bugs.webkit.org/show_bug.cgi?id=118041

Reviewed by Christophe Dumez.

Merge https://chromium.googlesource.com/chromium/blink/+/1683b58c855b745463acbf18086e32279db5000f.

* rendering/RenderBox.h:
(WebCore::RenderBox::hasRenderOverflow):
(WebCore::RenderBox::hasHorizontalLayoutOverflow):
(WebCore::RenderBox::hasVerticalLayoutOverflow):

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

Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderBox.h

index 5d5eda567af14b10c0c671bae101d6fe00d1796d..a58a8c0ab11436418c17b46667eceb5408506fe7 100644 (file)
@@ -1,3 +1,17 @@
+2013-06-26  Ryosuke Niwa  <rniwa@webkit.org>
+
+        RenderBox::hasRenderOverflow should return bool instead of RenderOverflow*
+        https://bugs.webkit.org/show_bug.cgi?id=118041
+
+        Reviewed by Christophe Dumez.
+
+        Merge https://chromium.googlesource.com/chromium/blink/+/1683b58c855b745463acbf18086e32279db5000f.
+
+        * rendering/RenderBox.h:
+        (WebCore::RenderBox::hasRenderOverflow):
+        (WebCore::RenderBox::hasHorizontalLayoutOverflow):
+        (WebCore::RenderBox::hasVerticalLayoutOverflow):
+
 2013-06-26  Ryosuke Niwa  <rniwa@webkit.org>
 
         Remove unneeded static_casts from SelectorChecker
index b3a0881ceec4cf10fe96fbc77143fedf5084e0f2..202b1e222e57d86514c9e9267cc1c40d97299308 100644 (file)
@@ -531,7 +531,7 @@ public:
     LayoutRect logicalLayoutOverflowRectForPropagation(RenderStyle*) const;
     LayoutRect layoutOverflowRectForPropagation(RenderStyle*) const;
 
-    RenderOverflow* hasRenderOverflow() const { return m_overflow.get(); }    
+    bool hasRenderOverflow() const { return m_overflow; }    
     bool hasVisualOverflow() const { return m_overflow && !borderBoxRect().contains(m_overflow->visualOverflowRect()); }
 
     virtual bool needsPreferredWidthsRecalculation() const;
@@ -547,24 +547,22 @@ public:
 
     bool hasHorizontalLayoutOverflow() const
     {
-        if (RenderOverflow* overflow = hasRenderOverflow()) {
-            LayoutRect layoutOverflowRect = overflow->layoutOverflowRect();
-            flipForWritingMode(layoutOverflowRect);
-            return layoutOverflowRect.x() < x() || layoutOverflowRect.maxX() > x() + logicalWidth();
-        }
+        if (!m_overflow)
+            return false;
 
-        return false;
+        LayoutRect layoutOverflowRect = m_overflow->layoutOverflowRect();
+        flipForWritingMode(layoutOverflowRect);
+        return layoutOverflowRect.x() < x() || layoutOverflowRect.maxX() > x() + logicalWidth();
     }
 
     bool hasVerticalLayoutOverflow() const
     {
-        if (RenderOverflow* overflow = hasRenderOverflow()) {
-            LayoutRect layoutOverflowRect = overflow->layoutOverflowRect();
-            flipForWritingMode(layoutOverflowRect);
-            return layoutOverflowRect.y() < y() || layoutOverflowRect.maxY() > y() + logicalHeight();
-        }
+        if (!m_overflow)
+            return false;
 
-        return false;
+        LayoutRect layoutOverflowRect = m_overflow->layoutOverflowRect();
+        flipForWritingMode(layoutOverflowRect);
+        return layoutOverflowRect.y() < y() || layoutOverflowRect.maxY() > y() + logicalHeight();
     }
 
     virtual RenderBox* createAnonymousBoxWithSameTypeAs(const RenderObject*) const