Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(452)

Unified Diff: third_party/WebKit/Source/core/style/ShadowData.h

Issue 2609803002: Use ShadowData in DropShadowFilterOperation (Closed)
Patch Set: Fix blend(...) order Created 3 years, 12 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/style/ShadowData.h
diff --git a/third_party/WebKit/Source/core/style/ShadowData.h b/third_party/WebKit/Source/core/style/ShadowData.h
index 390fdf33f591c4e04c5f481735fb85db8282f842..eb83deb0764d2d6dad0aab57da8c8b351d4c6c55 100644
--- a/third_party/WebKit/Source/core/style/ShadowData.h
+++ b/third_party/WebKit/Source/core/style/ShadowData.h
@@ -36,7 +36,7 @@ namespace blink {
enum ShadowStyle { Normal, Inset };
// This class holds information about shadows for the text-shadow and box-shadow
-// properties.
+// properties, as well as the drop-shadow(...) filter operation.
class ShadowData {
USING_FAST_MALLOC(ShadowData);
@@ -58,6 +58,7 @@ class ShadowData {
ShadowData blend(const ShadowData& from,
double progress,
const Color& currentColor) const;
+ static ShadowData neutralValue();
float x() const { return m_location.x(); }
float y() const { return m_location.y(); }
@@ -67,6 +68,8 @@ class ShadowData {
ShadowStyle style() const { return m_style; }
StyleColor color() const { return m_color; }
+ void overrideColor(Color color) { m_color = StyleColor(color); }
+
// Outsets needed to adjust a source rectangle to the one cast by this
// shadow.
FloatRectOutsets rectOutsets() const {
« no previous file with comments | « third_party/WebKit/Source/core/style/FilterOperationsTest.cpp ('k') | third_party/WebKit/Source/core/style/ShadowData.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698