Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
| 4 * Copyright (C) 2004, 2005, 2006, 2007, 2009 Apple Inc. All rights reserved. | 4 * Copyright (C) 2004, 2005, 2006, 2007, 2009 Apple Inc. All rights reserved. |
| 5 * | 5 * |
| 6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
| 7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
| 8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
| 9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
| 10 * | 10 * |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 85 | 85 |
| 86 HTMLFormElement* findFormAncestor() const; | 86 HTMLFormElement* findFormAncestor() const; |
| 87 | 87 |
| 88 bool hasDirectionAuto() const; | 88 bool hasDirectionAuto() const; |
| 89 TextDirection directionalityIfhasDirAutoAttribute(bool& isAuto) const; | 89 TextDirection directionalityIfhasDirAutoAttribute(bool& isAuto) const; |
| 90 | 90 |
| 91 virtual bool isHTMLUnknownElement() const { return false; } | 91 virtual bool isHTMLUnknownElement() const { return false; } |
| 92 | 92 |
| 93 virtual bool isLabelable() const { return false; } | 93 virtual bool isLabelable() const { return false; } |
| 94 | 94 |
| 95 virtual void defaultEventHandler(Event*) OVERRIDE; | |
| 96 | |
| 95 protected: | 97 protected: |
| 96 HTMLElement(const QualifiedName& tagName, Document*, ConstructionType); | 98 HTMLElement(const QualifiedName& tagName, Document*, ConstructionType); |
| 97 | 99 |
| 98 void addHTMLLengthToStyle(MutableStylePropertySet*, CSSPropertyID, const Str ing& value); | 100 void addHTMLLengthToStyle(MutableStylePropertySet*, CSSPropertyID, const Str ing& value); |
| 99 void addHTMLColorToStyle(MutableStylePropertySet*, CSSPropertyID, const Stri ng& color); | 101 void addHTMLColorToStyle(MutableStylePropertySet*, CSSPropertyID, const Stri ng& color); |
| 100 | 102 |
| 101 void applyAlignmentAttributeToStyle(const AtomicString&, MutableStylePropert ySet*); | 103 void applyAlignmentAttributeToStyle(const AtomicString&, MutableStylePropert ySet*); |
| 102 void applyBorderAttributeToStyle(const AtomicString&, MutableStylePropertySe t*); | 104 void applyBorderAttributeToStyle(const AtomicString&, MutableStylePropertySe t*); |
| 103 | 105 |
| 104 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERR IDE; | 106 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERR IDE; |
| (...skipping 15 matching lines...) Expand all Loading... | |
| 120 PassRefPtr<DocumentFragment> textToFragment(const String&, ExceptionCode&); | 122 PassRefPtr<DocumentFragment> textToFragment(const String&, ExceptionCode&); |
| 121 | 123 |
| 122 void dirAttributeChanged(const AtomicString&); | 124 void dirAttributeChanged(const AtomicString&); |
| 123 void adjustDirectionalityIfNeededAfterChildAttributeChanged(Element* child); | 125 void adjustDirectionalityIfNeededAfterChildAttributeChanged(Element* child); |
| 124 void adjustDirectionalityIfNeededAfterChildrenChanged(Node* beforeChange, in t childCountDelta); | 126 void adjustDirectionalityIfNeededAfterChildrenChanged(Node* beforeChange, in t childCountDelta); |
| 125 TextDirection directionality(Node** strongDirectionalityTextNode= 0) const; | 127 TextDirection directionality(Node** strongDirectionalityTextNode= 0) const; |
| 126 | 128 |
| 127 TranslateAttributeMode translateAttributeMode() const; | 129 TranslateAttributeMode translateAttributeMode() const; |
| 128 | 130 |
| 129 AtomicString eventNameForAttributeName(const QualifiedName& attrName) const; | 131 AtomicString eventNameForAttributeName(const QualifiedName& attrName) const; |
| 132 | |
| 133 virtual void handleKeypressEvent(KeyboardEvent*); | |
|
esprehn
2013/06/14 08:01:24
This shouldn't be virtual.
| |
| 130 }; | 134 }; |
| 131 | 135 |
| 132 inline HTMLElement* toHTMLElement(Node* node) | 136 inline HTMLElement* toHTMLElement(Node* node) |
| 133 { | 137 { |
| 134 ASSERT_WITH_SECURITY_IMPLICATION(!node || node->isHTMLElement()); | 138 ASSERT_WITH_SECURITY_IMPLICATION(!node || node->isHTMLElement()); |
| 135 return static_cast<HTMLElement*>(node); | 139 return static_cast<HTMLElement*>(node); |
| 136 } | 140 } |
| 137 | 141 |
| 138 inline const HTMLElement* toHTMLElement(const Node* node) | 142 inline const HTMLElement* toHTMLElement(const Node* node) |
| 139 { | 143 { |
| 140 ASSERT_WITH_SECURITY_IMPLICATION(!node || node->isHTMLElement()); | 144 ASSERT_WITH_SECURITY_IMPLICATION(!node || node->isHTMLElement()); |
| 141 return static_cast<const HTMLElement*>(node); | 145 return static_cast<const HTMLElement*>(node); |
| 142 } | 146 } |
| 143 | 147 |
| 144 // This will catch anyone doing an unnecessary cast. | 148 // This will catch anyone doing an unnecessary cast. |
| 145 void toHTMLElement(const HTMLElement*); | 149 void toHTMLElement(const HTMLElement*); |
| 146 | 150 |
| 147 inline HTMLElement::HTMLElement(const QualifiedName& tagName, Document* document , ConstructionType type = CreateHTMLElement) | 151 inline HTMLElement::HTMLElement(const QualifiedName& tagName, Document* document , ConstructionType type = CreateHTMLElement) |
| 148 : StyledElement(tagName, document, type) | 152 : StyledElement(tagName, document, type) |
| 149 { | 153 { |
| 150 ASSERT(tagName.localName().impl()); | 154 ASSERT(tagName.localName().impl()); |
| 151 ScriptWrappable::init(this); | 155 ScriptWrappable::init(this); |
| 152 } | 156 } |
| 153 | 157 |
| 154 } // namespace WebCore | 158 } // namespace WebCore |
| 155 | 159 |
| 156 #endif // HTMLElement_h | 160 #endif // HTMLElement_h |
| OLD | NEW |