Title: [218543] releases/WebKitGTK/webkit-2.16
Revision
218543
Author
[email protected]
Date
2017-06-19 23:45:32 -0700 (Mon, 19 Jun 2017)

Log Message

Merge r217521 - enclosingIntRect returns a rect with -1 width/height when the input FloatRect overflows integer.
https://bugs.webkit.org/show_bug.cgi?id=172676

Reviewed by Simon Fraser.

Source/WebCore:

Clamp integer values soon after the enclosing rectangle is resolved.

* platform/graphics/FloatRect.cpp:
(WebCore::enclosingIntRect):

Tools:

* TestWebKitAPI/Tests/WebCore/FloatRect.cpp:
(TestWebKitAPI::TEST):

Modified Paths

Diff

Modified: releases/WebKitGTK/webkit-2.16/Source/WebCore/ChangeLog (218542 => 218543)


--- releases/WebKitGTK/webkit-2.16/Source/WebCore/ChangeLog	2017-06-20 06:41:48 UTC (rev 218542)
+++ releases/WebKitGTK/webkit-2.16/Source/WebCore/ChangeLog	2017-06-20 06:45:32 UTC (rev 218543)
@@ -1,3 +1,15 @@
+2017-05-27  Zalan Bujtas  <[email protected]>
+
+        enclosingIntRect returns a rect with -1 width/height when the input FloatRect overflows integer.
+        https://bugs.webkit.org/show_bug.cgi?id=172676
+
+        Reviewed by Simon Fraser.
+
+        Clamp integer values soon after the enclosing rectangle is resolved.
+
+        * platform/graphics/FloatRect.cpp:
+        (WebCore::enclosingIntRect):
+
 2017-05-26  Youenn Fablet  <[email protected]>
 
         Minor clean-up related to DocumentThreadableLoader redirections

Modified: releases/WebKitGTK/webkit-2.16/Source/WebCore/platform/graphics/FloatRect.cpp (218542 => 218543)


--- releases/WebKitGTK/webkit-2.16/Source/WebCore/platform/graphics/FloatRect.cpp	2017-06-20 06:41:48 UTC (rev 218542)
+++ releases/WebKitGTK/webkit-2.16/Source/WebCore/platform/graphics/FloatRect.cpp	2017-06-20 06:45:32 UTC (rev 218543)
@@ -215,10 +215,9 @@
 
 IntRect enclosingIntRect(const FloatRect& rect)
 {
-    IntPoint location = flooredIntPoint(rect.minXMinYCorner());
-    IntPoint maxPoint = ceiledIntPoint(rect.maxXMaxYCorner());
-
-    return IntRect(location, maxPoint - location);
+    FloatPoint location = flooredIntPoint(rect.minXMinYCorner());
+    FloatPoint maxPoint = ceiledIntPoint(rect.maxXMaxYCorner());
+    return IntRect(IntPoint(location), IntSize(maxPoint - location));
 }
 
 IntRect roundedIntRect(const FloatRect& rect)

Modified: releases/WebKitGTK/webkit-2.16/Tools/ChangeLog (218542 => 218543)


--- releases/WebKitGTK/webkit-2.16/Tools/ChangeLog	2017-06-20 06:41:48 UTC (rev 218542)
+++ releases/WebKitGTK/webkit-2.16/Tools/ChangeLog	2017-06-20 06:45:32 UTC (rev 218543)
@@ -1,3 +1,13 @@
+2017-05-27  Zalan Bujtas  <[email protected]>
+
+        enclosingIntRect returns a rect with -1 width/height when the input FloatRect overflows integer.
+        https://bugs.webkit.org/show_bug.cgi?id=172676
+
+        Reviewed by Simon Fraser.
+
+        * TestWebKitAPI/Tests/WebCore/FloatRect.cpp:
+        (TestWebKitAPI::TEST):
+
 2017-05-20  Ting-Wei Lan  <[email protected]>
 
         [GTK] gtkdoc-fixxref needs --module argument to work
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to