1 /* 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 4 * (C) 2000 Simon Hausmann <hausmann@kde.org> 5 * Copyright (C) 2004, 2006, 2008 Apple Inc. All rights reserved. 6 * 7 * This library is free software; you can redistribute it and/or 8 * modify it under the terms of the GNU Library General Public 9 * License as published by the Free Software Foundation; either 10 * version 2 of the License, or (at your option) any later version. 11 * 12 * This library is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 * Library General Public License for more details. 16 * 17 * You should have received a copy of the GNU Library General Public License 18 * along with this library; see the file COPYING.LIB. If not, write to 19 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 20 * Boston, MA 02110-1301, USA. 21 * 22 */ 23 24 #ifndef HTMLFrameElementBase_h 25 #define HTMLFrameElementBase_h 26 27 #include "HTMLFrameOwnerElement.h" 28 #include "ScrollTypes.h" 29 30 namespace WebCore { 31 32 class HTMLFrameElementBase : public HTMLFrameOwnerElement { 33 public: 34 virtual void parseMappedAttribute(MappedAttribute*); 35 36 virtual void insertedIntoDocument(); 37 virtual void removedFromDocument(); 38 39 virtual void attach(); canLazyAttach()40 virtual bool canLazyAttach() { return false; } 41 42 KURL location() const; 43 void setLocation(const String&); 44 45 virtual bool isFocusable() const; 46 virtual void setFocus(bool); 47 48 virtual bool isURLAttribute(Attribute*) const; 49 scrollingMode()50 virtual ScrollbarMode scrollingMode() const { return m_scrolling; } 51 getMarginWidth()52 int getMarginWidth() const { return m_marginWidth; } getMarginHeight()53 int getMarginHeight() const { return m_marginHeight; } 54 55 String frameBorder() const; 56 void setFrameBorder(const String&); 57 58 String longDesc() const; 59 void setLongDesc(const String&); 60 61 String marginHeight() const; 62 void setMarginHeight(const String&); 63 64 String marginWidth() const; 65 void setMarginWidth(const String&); 66 67 String name() const; 68 void setName(const String&); 69 noResize()70 bool noResize() const { return m_noResize; } 71 void setNoResize(bool); 72 73 String scrolling() const; 74 void setScrolling(const String&); 75 76 KURL src() const; 77 void setSrc(const String&); 78 79 int width() const; 80 int height() const; 81 viewSourceMode()82 bool viewSourceMode() const { return m_viewSource; } 83 84 protected: 85 HTMLFrameElementBase(const QualifiedName&, Document*, bool createdByParser); 86 87 bool isURLAllowed(const AtomicString&) const; 88 void setNameAndOpenURL(); 89 void openURL(); 90 91 static void setNameAndOpenURLCallback(Node*); 92 93 AtomicString m_URL; 94 AtomicString m_frameName; 95 96 ScrollbarMode m_scrolling; 97 98 int m_marginWidth; 99 int m_marginHeight; 100 101 bool m_noResize; 102 bool m_viewSource; 103 104 bool m_shouldOpenURLAfterAttach; 105 }; 106 107 } // namespace WebCore 108 109 #endif // HTMLFrameElementBase_h 110