diff options
Diffstat (limited to 'WebCore/html/HTMLElement.h')
-rw-r--r-- | WebCore/html/HTMLElement.h | 67 |
1 files changed, 36 insertions, 31 deletions
diff --git a/WebCore/html/HTMLElement.h b/WebCore/html/HTMLElement.h index 21b3bb5..c6a384b 100644 --- a/WebCore/html/HTMLElement.h +++ b/WebCore/html/HTMLElement.h @@ -1,7 +1,7 @@ /* * Copyright (C) 1999 Lars Knoll (knoll@kde.org) * (C) 1999 Antti Koivisto (koivisto@kde.org) - * Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved. + * Copyright (C) 2004, 2005, 2006, 2007, 2009 Apple Inc. All rights reserved. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public @@ -35,28 +35,12 @@ enum HTMLTagStatus { TagStatusOptional, TagStatusRequired, TagStatusForbidden }; class HTMLElement : public StyledElement { public: - HTMLElement(const QualifiedName& tagName, Document*); - virtual ~HTMLElement(); - - virtual bool isHTMLElement() const { return true; } - - virtual String nodeName() const; - - virtual bool mapToEntry(const QualifiedName& attrName, MappedAttributeEntry& result) const; - virtual void parseMappedAttribute(MappedAttribute*); + static PassRefPtr<HTMLElement> create(const QualifiedName& tagName, Document*); PassRefPtr<HTMLCollection> children(); - String id() const; - void setId(const String&); virtual String title() const; - void setTitle(const String&); - String lang() const; - void setLang(const String&); - String dir() const; - void setDir(const String&); - String className() const; - void setClassName(const String&); + virtual short tabIndex() const; void setTabIndex(int); @@ -72,12 +56,13 @@ public: void insertAdjacentHTML(const String& where, const String& html, ExceptionCode&); void insertAdjacentText(const String& where, const String& text, ExceptionCode&); - virtual bool isFocusable() const; + virtual bool supportsFocus() const; + virtual bool isContentEditable() const; virtual bool isContentRichlyEditable() const; - virtual String contentEditable() const; - virtual void setContentEditable(MappedAttribute*); - virtual void setContentEditable(const String&); + + String contentEditable() const; + void setContentEditable(const String&); virtual bool draggable() const; void setDraggable(bool); @@ -88,31 +73,51 @@ public: virtual HTMLTagStatus endTagRequirement() const; virtual int tagPriority() const; + + virtual bool rendererIsNeeded(RenderStyle*); + virtual RenderObject* createRenderer(RenderArena*, RenderStyle*); + + HTMLFormElement* form() const { return virtualForm(); } + + static void addHTMLAlignmentToStyledElement(StyledElement*, MappedAttribute*); + +protected: + HTMLElement(const QualifiedName& tagName, Document*, ConstructionType = CreateElementZeroRefCount); + + void addHTMLAlignment(MappedAttribute*); + + virtual bool mapToEntry(const QualifiedName& attrName, MappedAttributeEntry& result) const; + virtual void parseMappedAttribute(MappedAttribute*); + virtual bool childAllowed(Node* newChild); // Error-checking during parsing that checks the DTD // Helper function to check the DTD for a given child node. virtual bool checkDTD(const Node*); + static bool inEitherTagList(const Node*); static bool inInlineTagList(const Node*); static bool inBlockTagList(const Node*); static bool isRecognizedTagName(const QualifiedName&); - virtual bool rendererIsNeeded(RenderStyle*); - virtual RenderObject* createRenderer(RenderArena*, RenderStyle*); - - HTMLFormElement* form() const { return virtualForm(); } HTMLFormElement* findFormAncestor() const; - static void addHTMLAlignmentToStyledElement(StyledElement*, MappedAttribute*); +private: + virtual bool isHTMLElement() const { return true; } -protected: - void addHTMLAlignment(MappedAttribute*); + virtual String nodeName() const; + + void setContentEditable(MappedAttribute*); -private: virtual HTMLFormElement* virtualForm() const; + Node* insertAdjacent(const String& where, Node* newChild, ExceptionCode&); }; +inline HTMLElement::HTMLElement(const QualifiedName& tagName, Document* document, ConstructionType type) + : StyledElement(tagName, document, type) +{ +} + } // namespace WebCore #endif // HTMLElement_h |