Index: third_party/WebKit/Source/core/dom/Node.cpp |
diff --git a/third_party/WebKit/Source/core/dom/Node.cpp b/third_party/WebKit/Source/core/dom/Node.cpp |
index 12c26b7752626f68c6410eb4e0898526e9251e62..e1a3cf78f9db54cde0ce41e2961a83e55ad76341 100644 |
--- a/third_party/WebKit/Source/core/dom/Node.cpp |
+++ b/third_party/WebKit/Source/core/dom/Node.cpp |
@@ -995,6 +995,26 @@ bool Node::isSlotOrActiveInsertionPoint() const |
return isHTMLSlotElement(*this) || isActiveInsertionPoint(*this); |
} |
+bool Node::slottable() const |
+{ |
+ return isElementNode() || isTextNode(); |
kochi
2016/04/11 10:57:54
How about making this inline (defining in .h file)
hayato
2016/04/12 04:06:52
Done
|
+} |
+ |
+AtomicString Node::slotName() const |
+{ |
+ DCHECK(slottable()); |
+ if (isElementNode()) |
+ return normalizeSlotName(toElement(*this).fastGetAttribute(HTMLNames::slotAttr)); |
+ DCHECK(isTextNode()); |
+ return emptyAtom; |
+} |
+ |
+// static |
+AtomicString Node::normalizeSlotName(const AtomicString& name) |
+{ |
+ return (name.isNull() || name.isEmpty()) ? emptyAtom : name; |
+} |
+ |
bool Node::isInV1ShadowTree() const |
{ |
ShadowRoot* shadowRoot = containingShadowRoot(); |