File indexing completed on 2024-04-28 11:39:14

0001 /*
0002     Copyright (C) 2006 Apple Computer, Inc.
0003 
0004     This file is part of the WebKit project
0005 
0006     This library is free software; you can redistribute it and/or
0007     modify it under the terms of the GNU Library General Public
0008     License as published by the Free Software Foundation; either
0009     version 2 of the License, or (at your option) any later version.
0010 
0011     This library is distributed in the hope that it will be useful,
0012     but WITHOUT ANY WARRANTY; without even the implied warranty of
0013     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
0014     Library General Public License for more details.
0015 
0016     You should have received a copy of the GNU Library General Public License
0017     along with this library; see the file COPYING.LIB.  If not, write to
0018     the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
0019     Boston, MA 02110-1301, USA.
0020 */
0021 
0022 #ifndef SVGForeignObjectElement_h
0023 #define SVGForeignObjectElement_h
0024 
0025 #if ENABLE(SVG) && ENABLE(SVG_FOREIGN_OBJECT)
0026 #include "SVGTests.h"
0027 #include "SVGLangSpace.h"
0028 #include "SVGURIReference.h"
0029 #include "SVGStyledTransformableElement.h"
0030 #include "SVGExternalResourcesRequired.h"
0031 
0032 namespace WebCore
0033 {
0034 class SVGLength;
0035 
0036 class SVGForeignObjectElement : public SVGStyledTransformableElement,
0037     public SVGTests,
0038     public SVGLangSpace,
0039     public SVGExternalResourcesRequired,
0040     public SVGURIReference
0041 {
0042 public:
0043     SVGForeignObjectElement(const QualifiedName &, Document *);
0044     virtual ~SVGForeignObjectElement();
0045 
0046     virtual bool isValid() const
0047     {
0048         return SVGTests::isValid();
0049     }
0050     virtual void parseMappedAttribute(MappedAttribute *);
0051     virtual void svgAttributeChanged(const QualifiedName &);
0052 
0053     bool childShouldCreateRenderer(Node *) const;
0054     virtual RenderObject *createRenderer(RenderArena *arena, RenderStyle *style);
0055 
0056 protected:
0057     virtual const SVGElement *contextElement() const
0058     {
0059         return this;
0060     }
0061 
0062 private:
0063     ANIMATED_PROPERTY_FORWARD_DECLARATIONS(SVGExternalResourcesRequired, bool, ExternalResourcesRequired, externalResourcesRequired)
0064     ANIMATED_PROPERTY_FORWARD_DECLARATIONS(SVGURIReference, String, Href, href)
0065 
0066     ANIMATED_PROPERTY_DECLARATIONS(SVGForeignObjectElement, SVGLength, SVGLength, X, x)
0067     ANIMATED_PROPERTY_DECLARATIONS(SVGForeignObjectElement, SVGLength, SVGLength, Y, y)
0068     ANIMATED_PROPERTY_DECLARATIONS(SVGForeignObjectElement, SVGLength, SVGLength, Width, width)
0069     ANIMATED_PROPERTY_DECLARATIONS(SVGForeignObjectElement, SVGLength, SVGLength, Height, height)
0070 };
0071 
0072 } // namespace WebCore
0073 
0074 #endif // ENABLE(SVG) && ENABLE(SVG_FOREIGN_OBJECT)
0075 #endif