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

Unified Diff: sky/engine/core/dom/Element.h

Issue 772133003: Mostly merge HTMLElement into Element. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | sky/engine/core/dom/Element.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/dom/Element.h
diff --git a/sky/engine/core/dom/Element.h b/sky/engine/core/dom/Element.h
index f84ae7d5432cbe51e9658de25d94e3a629568609..0a54917cab973aff0ef97ee2603a58ec46aac015 100644
--- a/sky/engine/core/dom/Element.h
+++ b/sky/engine/core/dom/Element.h
@@ -147,7 +147,7 @@ public:
String tagName() const { return nodeName(); }
bool hasTagName(const QualifiedName& tagName) const { return m_tagName == tagName; }
- bool hasTagName(const HTMLQualifiedName& tagName) const { return ContainerNode::hasTagName(tagName); }
+ bool hasTagName(const HTMLQualifiedName& name) const { return hasLocalName(name.localName()); }
// A fast function for checking the local name against another atomic string.
bool hasLocalName(const AtomicString& other) const { return m_tagName.localName() == other; }
@@ -226,7 +226,6 @@ public:
KURL getNonEmptyURLAttribute(const QualifiedName&) const;
virtual const AtomicString imageSourceURL() const;
- virtual Image* imageContents() { return 0; }
void focus(bool restorePreviousSelection = true, FocusType = FocusTypeNone);
void updateFocusAppearance(bool restorePreviousSelection);
@@ -239,14 +238,14 @@ public:
// Whether the node can actually be focused.
bool isFocusable() const;
bool isKeyboardFocusable() const;
- virtual bool isMouseFocusable() const;
+ bool isMouseFocusable() const;
virtual void willCallDefaultEventHandler(const Event&) override final;
void dispatchFocusEvent(Element* oldFocusedElement, FocusType);
void dispatchBlurEvent(Element* newFocusedElement);
void dispatchFocusInEvent(const AtomicString& eventType, Element* oldFocusedElement);
void dispatchFocusOutEvent(const AtomicString& eventType, Element* newFocusedElement);
- virtual String title() const { return String(); }
+ String title() const;
// Called by the parser when this element's close tag is reached,
// signaling that all child tags have been parsed and added.
@@ -292,6 +291,17 @@ public:
void setTabIndex(int);
virtual short tabIndex() const override;
+ String contentEditable() const;
+ void setContentEditable(const String&, ExceptionState&);
+
+ bool spellcheck() const;
+ void setSpellcheck(bool);
+
+ const AtomicString& dir();
+ void setDir(const AtomicString&);
+
+ void click();
+
String textFromChildren();
protected:
@@ -549,6 +559,11 @@ inline ShadowRoot* Node::shadowRoot() const
return toElement(this)->shadowRoot();
}
+inline bool Node::hasTagName(const HTMLQualifiedName& name) const
+{
+ return isHTMLElement() && toElement(*this).hasTagName(name);
+}
+
inline void Element::invalidateStyleAttribute()
{
ASSERT(elementData());
« no previous file with comments | « no previous file | sky/engine/core/dom/Element.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698