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

Side by Side Diff: Source/core/css/CSSGradientValue.h

Issue 631753002: Adding support for color interpolation hints to CSS gradients. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: offset1->offsetLeft Created 6 years, 2 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2008 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 CSSGradientColorStop() : m_colorIsDerivedFromElement(false) { }; 58 CSSGradientColorStop() : m_colorIsDerivedFromElement(false) { };
59 RefPtrWillBeMember<CSSPrimitiveValue> m_position; // percentage or length 59 RefPtrWillBeMember<CSSPrimitiveValue> m_position; // percentage or length
60 RefPtrWillBeMember<CSSPrimitiveValue> m_color; 60 RefPtrWillBeMember<CSSPrimitiveValue> m_color;
61 Color m_resolvedColor; 61 Color m_resolvedColor;
62 bool m_colorIsDerivedFromElement; 62 bool m_colorIsDerivedFromElement;
63 bool operator==(const CSSGradientColorStop& other) const 63 bool operator==(const CSSGradientColorStop& other) const
64 { 64 {
65 return compareCSSValuePtr(m_color, other.m_color) 65 return compareCSSValuePtr(m_color, other.m_color)
66 && compareCSSValuePtr(m_position, other.m_position); 66 && compareCSSValuePtr(m_position, other.m_position);
67 } 67 }
68 bool isHint() const
69 {
70 ASSERT(m_color || m_position);
71 return !m_color;
72 }
68 73
69 void trace(Visitor*); 74 void trace(Visitor*);
70 }; 75 };
71 76
72 } // namespace blink 77 } // namespace blink
73 78
74 79
75 // We have to declare the VectorTraits specialization before CSSGradientValue 80 // We have to declare the VectorTraits specialization before CSSGradientValue
76 // declares its inline capacity vector below. 81 // declares its inline capacity vector below.
77 WTF_ALLOW_MOVE_AND_INIT_WITH_MEM_FUNCTIONS(blink::CSSGradientColorStop); 82 WTF_ALLOW_MOVE_AND_INIT_WITH_MEM_FUNCTIONS(blink::CSSGradientColorStop);
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 260
256 RefPtrWillBeMember<CSSPrimitiveValue> m_endHorizontalSize; 261 RefPtrWillBeMember<CSSPrimitiveValue> m_endHorizontalSize;
257 RefPtrWillBeMember<CSSPrimitiveValue> m_endVerticalSize; 262 RefPtrWillBeMember<CSSPrimitiveValue> m_endVerticalSize;
258 }; 263 };
259 264
260 DEFINE_CSS_VALUE_TYPE_CASTS(CSSRadialGradientValue, isRadialGradientValue()); 265 DEFINE_CSS_VALUE_TYPE_CASTS(CSSRadialGradientValue, isRadialGradientValue());
261 266
262 } // namespace blink 267 } // namespace blink
263 268
264 #endif // CSSGradientValue_h 269 #endif // CSSGradientValue_h
OLDNEW
« no previous file with comments | « LayoutTests/fast/gradients/unprefixed-repeating-gradient-color-hint-expected.txt ('k') | Source/core/css/CSSGradientValue.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698