| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2014 Google Inc. All rights reserved. | 2 * Copyright (C) 2014 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 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 #include "core/svg/properties/SVGPropertyTearOff.h" | 35 #include "core/svg/properties/SVGPropertyTearOff.h" |
| 36 #include "platform/bindings/ScriptWrappable.h" | 36 #include "platform/bindings/ScriptWrappable.h" |
| 37 | 37 |
| 38 namespace blink { | 38 namespace blink { |
| 39 | 39 |
| 40 class SVGRectTearOff : public SVGPropertyTearOff<SVGRect>, | 40 class SVGRectTearOff : public SVGPropertyTearOff<SVGRect>, |
| 41 public ScriptWrappable { | 41 public ScriptWrappable { |
| 42 DEFINE_WRAPPERTYPEINFO(); | 42 DEFINE_WRAPPERTYPEINFO(); |
| 43 | 43 |
| 44 public: | 44 public: |
| 45 static SVGRectTearOff* Create( | 45 static SVGRectTearOff* Create(SVGRect* target, |
| 46 SVGRect* target, | 46 SVGElement* context_element, |
| 47 SVGElement* context_element, | 47 PropertyIsAnimValType property_is_anim_val, |
| 48 PropertyIsAnimValType property_is_anim_val, | 48 const QualifiedName& attribute_name) { |
| 49 const QualifiedName& attribute_name = QualifiedName::Null()) { | |
| 50 return new SVGRectTearOff(target, context_element, property_is_anim_val, | 49 return new SVGRectTearOff(target, context_element, property_is_anim_val, |
| 51 attribute_name); | 50 attribute_name); |
| 52 } | 51 } |
| 52 static SVGRectTearOff* CreateDetached(const FloatRect&); |
| 53 | 53 |
| 54 void setX(float, ExceptionState&); | 54 void setX(float, ExceptionState&); |
| 55 void setY(float, ExceptionState&); | 55 void setY(float, ExceptionState&); |
| 56 void setWidth(float, ExceptionState&); | 56 void setWidth(float, ExceptionState&); |
| 57 void setHeight(float, ExceptionState&); | 57 void setHeight(float, ExceptionState&); |
| 58 float x() { return Target()->X(); } | 58 float x() { return Target()->X(); } |
| 59 float y() { return Target()->Y(); } | 59 float y() { return Target()->Y(); } |
| 60 float width() { return Target()->Width(); } | 60 float width() { return Target()->Width(); } |
| 61 float height() { return Target()->Height(); } | 61 float height() { return Target()->Height(); } |
| 62 | 62 |
| 63 DECLARE_VIRTUAL_TRACE_WRAPPERS(); | 63 DECLARE_VIRTUAL_TRACE_WRAPPERS(); |
| 64 | 64 |
| 65 private: | 65 private: |
| 66 SVGRectTearOff(SVGRect*, | 66 SVGRectTearOff(SVGRect*, |
| 67 SVGElement* context_element, | 67 SVGElement* context_element, |
| 68 PropertyIsAnimValType, | 68 PropertyIsAnimValType, |
| 69 const QualifiedName& attribute_name = QualifiedName::Null()); | 69 const QualifiedName& attribute_name); |
| 70 }; | 70 }; |
| 71 | 71 |
| 72 } // namespace blink | 72 } // namespace blink |
| 73 | 73 |
| 74 #endif // SVGRectTearOff_h | 74 #endif // SVGRectTearOff_h |
| OLD | NEW |