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, 2010 Apple Inc. All rights reserved.
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.
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.
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.
24
#ifndef HTMLBodyElement_h
25
#define HTMLBodyElement_h
27
#include "HTMLElement.h"
33
class HTMLBodyElement : public HTMLElement {
35
static PassRefPtr<HTMLBodyElement> create(Document*);
36
static PassRefPtr<HTMLBodyElement> create(const QualifiedName&, Document*);
37
virtual ~HTMLBodyElement();
40
void setALink(const String&);
41
String bgColor() const;
42
void setBgColor(const String&);
44
void setLink(const String&);
46
void setText(const String&);
48
void setVLink(const String&);
50
// Declared virtual in Element
51
DEFINE_WINDOW_ATTRIBUTE_EVENT_LISTENER(blur);
52
DEFINE_WINDOW_ATTRIBUTE_EVENT_LISTENER(error);
53
DEFINE_WINDOW_ATTRIBUTE_EVENT_LISTENER(focus);
54
DEFINE_WINDOW_ATTRIBUTE_EVENT_LISTENER(load);
56
DEFINE_WINDOW_ATTRIBUTE_EVENT_LISTENER(beforeunload);
57
DEFINE_WINDOW_ATTRIBUTE_EVENT_LISTENER(hashchange);
58
DEFINE_WINDOW_ATTRIBUTE_EVENT_LISTENER(message);
59
DEFINE_WINDOW_ATTRIBUTE_EVENT_LISTENER(offline);
60
DEFINE_WINDOW_ATTRIBUTE_EVENT_LISTENER(online);
61
DEFINE_WINDOW_ATTRIBUTE_EVENT_LISTENER(popstate);
62
DEFINE_WINDOW_ATTRIBUTE_EVENT_LISTENER(resize);
63
DEFINE_WINDOW_ATTRIBUTE_EVENT_LISTENER(storage);
64
DEFINE_WINDOW_ATTRIBUTE_EVENT_LISTENER(unload);
66
#if ENABLE(ORIENTATION_EVENTS)
67
DEFINE_WINDOW_ATTRIBUTE_EVENT_LISTENER(orientationchange);
71
HTMLBodyElement(const QualifiedName&, Document*);
73
virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE;
74
virtual bool isPresentationAttribute(const QualifiedName&) const OVERRIDE;
75
virtual void collectStyleForPresentationAttribute(const Attribute&, StylePropertySet*) OVERRIDE;
77
virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE;
78
virtual void didNotifySubtreeInsertions(ContainerNode*) OVERRIDE;
80
virtual bool isURLAttribute(const Attribute&) const OVERRIDE;
82
virtual bool supportsFocus() const;
84
virtual int scrollLeft();
85
virtual void setScrollLeft(int scrollLeft);
87
virtual int scrollTop();
88
virtual void setScrollTop(int scrollTop);
90
virtual int scrollHeight();
91
virtual int scrollWidth();
93
virtual void addSubresourceAttributeURLs(ListHashSet<KURL>&) const;