summaryrefslogtreecommitdiffstats
path: root/WebCore/platform/graphics/Gradient.cpp
diff options
context:
space:
mode:
authorJohn Reck <jreck@google.com>2010-11-04 12:00:17 -0700
committerJohn Reck <jreck@google.com>2010-11-09 11:35:04 -0800
commite14391e94c850b8bd03680c23b38978db68687a8 (patch)
tree3fed87e6620fecaf3edc7259ae58a11662bedcb2 /WebCore/platform/graphics/Gradient.cpp
parent1bd705833a68f07850cf7e204b26f8d328d16951 (diff)
downloadexternal_webkit-e14391e94c850b8bd03680c23b38978db68687a8.zip
external_webkit-e14391e94c850b8bd03680c23b38978db68687a8.tar.gz
external_webkit-e14391e94c850b8bd03680c23b38978db68687a8.tar.bz2
Merge Webkit at r70949: Initial merge by git.
Change-Id: I77b8645c083b5d0da8dba73ed01d4014aab9848e
Diffstat (limited to 'WebCore/platform/graphics/Gradient.cpp')
-rw-r--r--WebCore/platform/graphics/Gradient.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/WebCore/platform/graphics/Gradient.cpp b/WebCore/platform/graphics/Gradient.cpp
index f9427fb..6cb0ef1 100644
--- a/WebCore/platform/graphics/Gradient.cpp
+++ b/WebCore/platform/graphics/Gradient.cpp
@@ -196,6 +196,16 @@ int Gradient::findStop(float value) const
return m_lastStop;
}
+bool Gradient::hasAlpha() const
+{
+ for (size_t i = 0; i < m_stops.size(); i++) {
+ if (m_stops[i].alpha < 1)
+ return true;
+ }
+
+ return false;
+}
+
void Gradient::setSpreadMethod(GradientSpreadMethod spreadMethod)
{
// FIXME: Should it become necessary, allow calls to this method after m_gradient has been set.