summaryrefslogtreecommitdiff
path: root/Source/WebCore/platform/graphics/IntRect.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebCore/platform/graphics/IntRect.cpp')
-rw-r--r--Source/WebCore/platform/graphics/IntRect.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/Source/WebCore/platform/graphics/IntRect.cpp b/Source/WebCore/platform/graphics/IntRect.cpp
index 9507406d8..03c35e83b 100644
--- a/Source/WebCore/platform/graphics/IntRect.cpp
+++ b/Source/WebCore/platform/graphics/IntRect.cpp
@@ -26,6 +26,7 @@
#include "config.h"
#include "IntRect.h"
+#include "FractionalLayoutRect.h"
#include "FloatRect.h"
#include <algorithm>
@@ -40,6 +41,12 @@ IntRect::IntRect(const FloatRect& r)
{
}
+IntRect::IntRect(const FractionalLayoutRect& r)
+ : m_location(flooredIntPoint(r.location()))
+ , m_size(flooredIntSize(r.size()))
+{
+}
+
bool IntRect::intersects(const IntRect& other) const
{
// Checking emptiness handles negative widths as well as zero.