<https://webkit.org/b/120041> Remove superfluous min calls in RenderBlock::computeOve...
authorrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 20 Aug 2013 04:49:37 +0000 (04:49 +0000)
committerrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 20 Aug 2013 04:49:37 +0000 (04:49 +0000)
Reviewed by Simon Fraser.

Merge https://chromium.googlesource.com/chromium/blink/+/29cad35d6b4642804e6b7c1a30f0b4435dd7a71d

They are contained in an "if" statement that ensures that textIndent < 0 and so the min will never be 0.

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::computeOverflow):

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

Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderBlock.cpp

index b5b8f0f..ec05a5a 100644 (file)
@@ -1,5 +1,18 @@
 2013-08-19  Ryosuke Niwa  <rniwa@webkit.org>
 
+        <https://webkit.org/b/120041> Remove superfluous min calls in RenderBlock::computeOverflow
+
+        Reviewed by Simon Fraser.
+
+        Merge https://chromium.googlesource.com/chromium/blink/+/29cad35d6b4642804e6b7c1a30f0b4435dd7a71d
+
+        They are contained in an "if" statement that ensures that textIndent < 0 and so the min will never be 0.
+
+        * rendering/RenderBlock.cpp:
+        (WebCore::RenderBlock::computeOverflow):
+
+2013-08-19  Ryosuke Niwa  <rniwa@webkit.org>
+
         <https://webkit.org/b/119930> input[type=range]: Fix a crash by changing input type in 'input' event handler
 
         Reviewed by Kent Tamura.
index feac67f..362146a 100644 (file)
@@ -1819,7 +1819,7 @@ void RenderBlock::computeOverflow(LayoutUnit oldClientAfterEdge, bool recomputeF
     LayoutUnit textIndent = textIndentOffset();
     if (textIndent < 0) {
         LayoutRect clientRect(clientBoxRect());
-        LayoutRect rectToApply = LayoutRect(clientRect.x() + min<LayoutUnit>(0, textIndent), clientRect.y(), clientRect.width() - min<LayoutUnit>(0, textIndent), clientRect.height());
+        LayoutRect rectToApply = LayoutRect(clientRect.x() + textIndent, clientRect.y(), clientRect.width() - min<LayoutUnit>(0, textIndent), clientRect.height());
         addVisualOverflow(rectToApply);
     }