Home | History | Annotate | Download | only in html
      1 /*
      2  * Copyright (C) 1999 Lars Knoll (knoll (at) kde.org)
      3  *           (C) 1999 Antti Koivisto (koivisto (at) kde.org)
      4  *           (C) 2000 Simon Hausmann <hausmann (at) 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 #include "Document.h"
     29 
     30 namespace WebCore {
     31 
     32 class HTMLBodyElement : public HTMLElement {
     33 public:
     34     HTMLBodyElement(const QualifiedName&, Document*);
     35     virtual ~HTMLBodyElement();
     36 
     37     String aLink() const;
     38     void setALink(const String&);
     39     String bgColor() const;
     40     void setBgColor(const String&);
     41     String link() const;
     42     void setLink(const String&);
     43     String text() const;
     44     void setText(const String&);
     45     String vLink() const;
     46     void setVLink(const String&);
     47 
     48     // Declared virtual in Element
     49     DEFINE_WINDOW_ATTRIBUTE_EVENT_LISTENER(blur);
     50     DEFINE_WINDOW_ATTRIBUTE_EVENT_LISTENER(error);
     51     DEFINE_WINDOW_ATTRIBUTE_EVENT_LISTENER(focus);
     52     DEFINE_WINDOW_ATTRIBUTE_EVENT_LISTENER(load);
     53 
     54     DEFINE_WINDOW_ATTRIBUTE_EVENT_LISTENER(beforeunload);
     55     DEFINE_WINDOW_ATTRIBUTE_EVENT_LISTENER(hashchange);
     56     DEFINE_WINDOW_ATTRIBUTE_EVENT_LISTENER(message);
     57     DEFINE_WINDOW_ATTRIBUTE_EVENT_LISTENER(offline);
     58     DEFINE_WINDOW_ATTRIBUTE_EVENT_LISTENER(online);
     59     DEFINE_WINDOW_ATTRIBUTE_EVENT_LISTENER(popstate);
     60     DEFINE_WINDOW_ATTRIBUTE_EVENT_LISTENER(resize);
     61     DEFINE_WINDOW_ATTRIBUTE_EVENT_LISTENER(storage);
     62     DEFINE_WINDOW_ATTRIBUTE_EVENT_LISTENER(unload);
     63 
     64 #if ENABLE(ORIENTATION_EVENTS)
     65     DEFINE_WINDOW_ATTRIBUTE_EVENT_LISTENER(orientationchange);
     66 #endif
     67 
     68 private:
     69     virtual HTMLTagStatus endTagRequirement() const { return TagStatusRequired; }
     70     virtual int tagPriority() const { return 10; }
     71 
     72     virtual bool mapToEntry(const QualifiedName&, MappedAttributeEntry&) const;
     73     virtual void parseMappedAttribute(MappedAttribute*);
     74 
     75     virtual void insertedIntoDocument();
     76 
     77     void createLinkDecl();
     78 
     79     virtual bool isURLAttribute(Attribute*) const;
     80 
     81     virtual int scrollLeft() const;
     82     virtual void setScrollLeft(int scrollLeft);
     83 
     84     virtual int scrollTop() const;
     85     virtual void setScrollTop(int scrollTop);
     86 
     87     virtual int scrollHeight() const;
     88     virtual int scrollWidth() const;
     89 
     90     virtual void addSubresourceAttributeURLs(ListHashSet<KURL>&) const;
     91 
     92     virtual void didMoveToNewOwnerDocument();
     93 
     94     RefPtr<CSSMutableStyleDeclaration> m_linkDecl;
     95 };
     96 
     97 } //namespace
     98 
     99 #endif
    100