Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(15)

Side by Side Diff: Source/core/html/HTMLElement.h

Issue 16959002: Spatial navigation enhancements (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Added null checks for document()->settings() Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/core/dom/KeyboardEvent.h ('k') | Source/core/html/HTMLElement.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 void handleKeypressEvent(KeyboardEvent*);
134 bool supportsSpatialNavigationFocus() const;
130 }; 135 };
131 136
132 inline HTMLElement* toHTMLElement(Node* node) 137 inline HTMLElement* toHTMLElement(Node* node)
133 { 138 {
134 ASSERT_WITH_SECURITY_IMPLICATION(!node || node->isHTMLElement()); 139 ASSERT_WITH_SECURITY_IMPLICATION(!node || node->isHTMLElement());
135 return static_cast<HTMLElement*>(node); 140 return static_cast<HTMLElement*>(node);
136 } 141 }
137 142
138 inline const HTMLElement* toHTMLElement(const Node* node) 143 inline const HTMLElement* toHTMLElement(const Node* node)
139 { 144 {
140 ASSERT_WITH_SECURITY_IMPLICATION(!node || node->isHTMLElement()); 145 ASSERT_WITH_SECURITY_IMPLICATION(!node || node->isHTMLElement());
141 return static_cast<const HTMLElement*>(node); 146 return static_cast<const HTMLElement*>(node);
142 } 147 }
143 148
144 // This will catch anyone doing an unnecessary cast. 149 // This will catch anyone doing an unnecessary cast.
145 void toHTMLElement(const HTMLElement*); 150 void toHTMLElement(const HTMLElement*);
146 151
147 inline HTMLElement::HTMLElement(const QualifiedName& tagName, Document* document , ConstructionType type = CreateHTMLElement) 152 inline HTMLElement::HTMLElement(const QualifiedName& tagName, Document* document , ConstructionType type = CreateHTMLElement)
148 : StyledElement(tagName, document, type) 153 : StyledElement(tagName, document, type)
149 { 154 {
150 ASSERT(tagName.localName().impl()); 155 ASSERT(tagName.localName().impl());
151 ScriptWrappable::init(this); 156 ScriptWrappable::init(this);
152 } 157 }
153 158
154 } // namespace WebCore 159 } // namespace WebCore
155 160
156 #endif // HTMLElement_h 161 #endif // HTMLElement_h
OLDNEW
« no previous file with comments | « Source/core/dom/KeyboardEvent.h ('k') | Source/core/html/HTMLElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698