1/* 2 * Copyright (C) 2006 Apple Inc. All rights reserved. 3 * 4 * This library is free software; you can redistribute it and/or 5 * modify it under the terms of the GNU Library General Public 6 * License as published by the Free Software Foundation; either 7 * version 2 of the License, or (at your option) any later version. 8 * 9 * This library is distributed in the hope that it will be useful, 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 * Library General Public License for more details. 13 * 14 * You should have received a copy of the GNU Library General Public License 15 * along with this library; see the file COPYING.LIB. If not, write to 16 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 17 * Boston, MA 02110-1301, USA. 18 */ 19 20#ifndef SVGForeignObjectElement_h 21#define SVGForeignObjectElement_h 22 23#if ENABLE(SVG) 24#include "SVGAnimatedBoolean.h" 25#include "SVGAnimatedLength.h" 26#include "SVGExternalResourcesRequired.h" 27#include "SVGLangSpace.h" 28#include "SVGStyledTransformableElement.h" 29#include "SVGTests.h" 30#include "SVGURIReference.h" 31 32namespace WebCore { 33 34class SVGForeignObjectElement FINAL : public SVGStyledTransformableElement, 35 public SVGTests, 36 public SVGLangSpace, 37 public SVGExternalResourcesRequired { 38public: 39 static PassRefPtr<SVGForeignObjectElement> create(const QualifiedName&, Document*); 40 41private: 42 SVGForeignObjectElement(const QualifiedName&, Document*); 43 44 virtual bool isValid() const { return SVGTests::isValid(); } 45 bool isSupportedAttribute(const QualifiedName&); 46 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE; 47 virtual void svgAttributeChanged(const QualifiedName&); 48 49 virtual bool rendererIsNeeded(const NodeRenderingContext&) OVERRIDE; 50 virtual bool childShouldCreateRenderer(const NodeRenderingContext&) const; 51 virtual RenderObject* createRenderer(RenderArena* arena, RenderStyle* style); 52 53 virtual bool selfHasRelativeLengths() const; 54 55 BEGIN_DECLARE_ANIMATED_PROPERTIES(SVGForeignObjectElement) 56 DECLARE_ANIMATED_LENGTH(X, x) 57 DECLARE_ANIMATED_LENGTH(Y, y) 58 DECLARE_ANIMATED_LENGTH(Width, width) 59 DECLARE_ANIMATED_LENGTH(Height, height) 60 DECLARE_ANIMATED_STRING(Href, href) 61 DECLARE_ANIMATED_BOOLEAN(ExternalResourcesRequired, externalResourcesRequired) 62 END_DECLARE_ANIMATED_PROPERTIES 63 64 // SVGTests 65 virtual void synchronizeRequiredFeatures() { SVGTests::synchronizeRequiredFeatures(this); } 66 virtual void synchronizeRequiredExtensions() { SVGTests::synchronizeRequiredExtensions(this); } 67 virtual void synchronizeSystemLanguage() { SVGTests::synchronizeSystemLanguage(this); } 68}; 69 70} // namespace WebCore 71 72#endif // ENABLE(SVG) 73#endif 74