| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010 University of Szeged | 2 * Copyright (C) 2010 University of Szeged |
| 3 * Copyright (C) 2010 Zoltan Herczeg | 3 * Copyright (C) 2010 Zoltan Herczeg |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 #define RenderSVGResourceFilterPrimitive_h | 28 #define RenderSVGResourceFilterPrimitive_h |
| 29 | 29 |
| 30 #include "core/rendering/svg/RenderSVGResourceFilter.h" | 30 #include "core/rendering/svg/RenderSVGResourceFilter.h" |
| 31 | 31 |
| 32 namespace WebCore { | 32 namespace WebCore { |
| 33 | 33 |
| 34 class FilterEffect; | 34 class FilterEffect; |
| 35 | 35 |
| 36 class RenderSVGResourceFilterPrimitive FINAL : public RenderSVGHiddenContainer { | 36 class RenderSVGResourceFilterPrimitive FINAL : public RenderSVGHiddenContainer { |
| 37 public: | 37 public: |
| 38 explicit RenderSVGResourceFilterPrimitive(SVGStyledElement* filterPrimitiveE
lement) | 38 explicit RenderSVGResourceFilterPrimitive(SVGElement* filterPrimitiveElement
) |
| 39 : RenderSVGHiddenContainer(filterPrimitiveElement) | 39 : RenderSVGHiddenContainer(filterPrimitiveElement) |
| 40 { | 40 { |
| 41 } | 41 } |
| 42 | 42 |
| 43 virtual void styleDidChange(StyleDifference, const RenderStyle*); | 43 virtual void styleDidChange(StyleDifference, const RenderStyle*); |
| 44 | 44 |
| 45 virtual const char* renderName() const { return "RenderSVGResourceFilterPrim
itive"; } | 45 virtual const char* renderName() const { return "RenderSVGResourceFilterPrim
itive"; } |
| 46 virtual bool isSVGResourceFilterPrimitive() const { return true; } | 46 virtual bool isSVGResourceFilterPrimitive() const { return true; } |
| 47 | 47 |
| 48 // They depend on the RenderObject argument of RenderSVGResourceFilter::appl
yResource. | 48 // They depend on the RenderObject argument of RenderSVGResourceFilter::appl
yResource. |
| 49 static FloatRect determineFilterPrimitiveSubregion(FilterEffect*); | 49 static FloatRect determineFilterPrimitiveSubregion(FilterEffect*); |
| 50 | 50 |
| 51 inline void primitiveAttributeChanged(const QualifiedName& attribute) | 51 inline void primitiveAttributeChanged(const QualifiedName& attribute) |
| 52 { | 52 { |
| 53 RenderObject* filter = parent(); | 53 RenderObject* filter = parent(); |
| 54 if (!filter || !filter->isSVGResourceFilter()) | 54 if (!filter || !filter->isSVGResourceFilter()) |
| 55 return; | 55 return; |
| 56 static_cast<RenderSVGResourceFilter*>(filter)->primitiveAttributeChanged
(this, attribute); | 56 static_cast<RenderSVGResourceFilter*>(filter)->primitiveAttributeChanged
(this, attribute); |
| 57 } | 57 } |
| 58 }; | 58 }; |
| 59 | 59 |
| 60 } // namespace WebCore | 60 } // namespace WebCore |
| 61 | 61 |
| 62 #endif // RenderSVGResourceFilterPrimitive_h | 62 #endif // RenderSVGResourceFilterPrimitive_h |
| OLD | NEW |