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, 2009 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 HTMLBodyElement_h 25 #define HTMLBodyElement_h 26 27 #include "HTMLElement.h" 28 29 namespace WebCore { 30 31 class HTMLBodyElement : public HTMLElement { 32 public: 33 HTMLBodyElement(const QualifiedName&, Document*); 34 virtual ~HTMLBodyElement(); 35 36 String aLink() const; 37 void setALink(const String&); 38 String bgColor() const; 39 void setBgColor(const String&); 40 String link() const; 41 void setLink(const String&); 42 String text() const; 43 void setText(const String&); 44 String vLink() const; 45 void setVLink(const String&); 46 47 virtual EventListener* onblur() const; 48 virtual void setOnblur(PassRefPtr<EventListener>); 49 virtual EventListener* onerror() const; 50 virtual void setOnerror(PassRefPtr<EventListener>); 51 virtual EventListener* onfocus() const; 52 virtual void setOnfocus(PassRefPtr<EventListener>); 53 virtual EventListener* onload() const; 54 virtual void setOnload(PassRefPtr<EventListener>); 55 56 EventListener* onbeforeunload() const; 57 void setOnbeforeunload(PassRefPtr<EventListener>); 58 EventListener* onmessage() const; 59 void setOnmessage(PassRefPtr<EventListener>); 60 EventListener* onoffline() const; 61 void setOnoffline(PassRefPtr<EventListener>); 62 EventListener* ononline() const; 63 void setOnonline(PassRefPtr<EventListener>); 64 EventListener* onresize() const; 65 void setOnresize(PassRefPtr<EventListener>); 66 EventListener* onstorage() const; 67 void setOnstorage(PassRefPtr<EventListener>); 68 EventListener* onunload() const; 69 void setOnunload(PassRefPtr<EventListener>); 70 71 private: endTagRequirement()72 virtual HTMLTagStatus endTagRequirement() const { return TagStatusRequired; } tagPriority()73 virtual int tagPriority() const { return 10; } 74 75 virtual bool mapToEntry(const QualifiedName&, MappedAttributeEntry&) const; 76 virtual void parseMappedAttribute(MappedAttribute*); 77 78 virtual void insertedIntoDocument(); 79 80 void createLinkDecl(); 81 82 virtual bool isURLAttribute(Attribute*) const; 83 84 virtual int scrollLeft() const; 85 virtual void setScrollLeft(int scrollLeft); 86 87 virtual int scrollTop() const; 88 virtual void setScrollTop(int scrollTop); 89 90 virtual int scrollHeight() const; 91 virtual int scrollWidth() const; 92 93 virtual void addSubresourceAttributeURLs(ListHashSet<KURL>&) const; 94 95 virtual void didMoveToNewOwnerDocument(); 96 97 RefPtr<CSSMutableStyleDeclaration> m_linkDecl; 98 }; 99 100 } //namespace 101 102 #endif 103