diff options
author | Steve Block <steveblock@google.com> | 2009-10-08 17:19:54 +0100 |
---|---|---|
committer | Steve Block <steveblock@google.com> | 2009-10-20 00:41:58 +0100 |
commit | 231d4e3152a9c27a73b6ac7badbe6be673aa3ddf (patch) | |
tree | a6c7e2d6cd7bfa7011cc39abbb436142d7a4a7c8 /WebCore/html/HTMLElement.h | |
parent | e196732677050bd463301566a68a643b6d14b907 (diff) | |
download | external_webkit-231d4e3152a9c27a73b6ac7badbe6be673aa3ddf.zip external_webkit-231d4e3152a9c27a73b6ac7badbe6be673aa3ddf.tar.gz external_webkit-231d4e3152a9c27a73b6ac7badbe6be673aa3ddf.tar.bz2 |
Merge webkit.org at R49305 : Automatic merge by git.
Change-Id: I8968561bc1bfd72b8923b7118d3728579c6dbcc7
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 |