summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@theqtcompany.com>2015-04-24 11:07:20 +0200
committerJani Heikkinen <jani.heikkinen@theqtcompany.com>2015-04-24 09:51:14 +0000
commitd51886bb805fdf3c2e320acd9ba3b9e72b7f8713 (patch)
tree16e368551f10c71654e698cc27ce8c1af5cb1925
parent2ac19ee6bb5732a3a585b8d9378bc65107748a36 (diff)
Fix assertion on qt.io
Our webkit examples all assert on resize due to qt.io trying to do an animation from an undefined value. Change-Id: I95aaee7834b2caba37e55f2cc09160af638a8d39 Reviewed-by: Michael BrĂ¼ning <michael.bruning@theqtcompany.com>
-rw-r--r--Source/WebCore/platform/Length.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/Source/WebCore/platform/Length.h b/Source/WebCore/platform/Length.h
index 2f91550da..72263b045 100644
--- a/Source/WebCore/platform/Length.h
+++ b/Source/WebCore/platform/Length.h
@@ -233,6 +233,11 @@ public:
Length blend(const Length& from, double progress) const
{
// Blend two lengths to produce a new length that is in between them. Used for animation.
+ if (from.isUndefined())
+ return *this;
+ if (isUndefined())
+ return from;
+
if (from.type() == Calculated || type() == Calculated)
return blendMixedTypes(from, progress);