OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google 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 are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 G* * Redistributions in binary form must reproduce the above | 10 G* * Redistributions in binary form must reproduce the above |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 DEFINE_INLINE_VIRTUAL_TRACE() {} | 82 DEFINE_INLINE_VIRTUAL_TRACE() {} |
83 | 83 |
84 protected: | 84 protected: |
85 SVGAnimatedPropertyBase(AnimatedPropertyType, | 85 SVGAnimatedPropertyBase(AnimatedPropertyType, |
86 SVGElement*, | 86 SVGElement*, |
87 const QualifiedName& attribute_name, | 87 const QualifiedName& attribute_name, |
88 CSSPropertyID = CSSPropertyInvalid); | 88 CSSPropertyID = CSSPropertyInvalid); |
89 | 89 |
90 private: | 90 private: |
91 static_assert(kNumberOfAnimatedPropertyTypes <= (1u << 5), | 91 static_assert(kNumberOfAnimatedPropertyTypes <= (1u << 5), |
92 "enough bits for AnimatedPropertyType (m_type)"); | 92 "enough bits for AnimatedPropertyType (type_)"); |
93 static constexpr int kCssPropertyBits = 9; | 93 static constexpr int kCssPropertyBits = 9; |
94 static_assert((1u << kCssPropertyBits) - 1 >= lastCSSProperty, | 94 static_assert((1u << kCssPropertyBits) - 1 >= lastCSSProperty, |
95 "enough bits for CSS property ids"); | 95 "enough bits for CSS property ids"); |
96 | 96 |
97 const unsigned type_ : 5; | 97 const unsigned type_ : 5; |
98 const unsigned css_property_id_ : kCssPropertyBits; | 98 const unsigned css_property_id_ : kCssPropertyBits; |
99 | 99 |
100 // This raw pointer is safe since the SVG element is guaranteed to be kept | 100 // This raw pointer is safe since the SVG element is guaranteed to be kept |
101 // alive by a V8 wrapper. | 101 // alive by a V8 wrapper. |
102 // See http://crbug.com/528275 for the detail. | 102 // See http://crbug.com/528275 for the detail. |
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
335 CSSPropertyID css_property_id = CSSPropertyInvalid) | 335 CSSPropertyID css_property_id = CSSPropertyInvalid) |
336 : SVGAnimatedPropertyCommon<Property>(context_element, | 336 : SVGAnimatedPropertyCommon<Property>(context_element, |
337 attribute_name, | 337 attribute_name, |
338 initial_value, | 338 initial_value, |
339 css_property_id) {} | 339 css_property_id) {} |
340 }; | 340 }; |
341 | 341 |
342 } // namespace blink | 342 } // namespace blink |
343 | 343 |
344 #endif // SVGAnimatedProperty_h | 344 #endif // SVGAnimatedProperty_h |
OLD | NEW |