| Index: third_party/WebKit/Source/core/dom/Element.h
|
| diff --git a/third_party/WebKit/Source/core/dom/Element.h b/third_party/WebKit/Source/core/dom/Element.h
|
| index aa41e1dba60254cceaefc0a5dfb2ba5b30c429da..750f24249cce3a8f99f382c4896e140eb54f9ebd 100644
|
| --- a/third_party/WebKit/Source/core/dom/Element.h
|
| +++ b/third_party/WebKit/Source/core/dom/Element.h
|
| @@ -961,6 +961,27 @@ inline const T* toElement(const Node* node) {
|
| return static_cast<const T*>(node);
|
| }
|
|
|
| +template <typename T>
|
| +inline T& toElementOrDie(Node& node) {
|
| + CHECK(isElementOfType<const T>(node));
|
| + return static_cast<T&>(node);
|
| +}
|
| +template <typename T>
|
| +inline T* toElementOrDie(Node* node) {
|
| + CHECK(!node || isElementOfType<const T>(*node));
|
| + return static_cast<T*>(node);
|
| +}
|
| +template <typename T>
|
| +inline const T& toElementOrDie(const Node& node) {
|
| + CHECK(isElementOfType<const T>(node));
|
| + return static_cast<const T&>(node);
|
| +}
|
| +template <typename T>
|
| +inline const T* toElementOrDie(const Node* node) {
|
| + CHECK(!node || isElementOfType<const T>(*node));
|
| + return static_cast<const T*>(node);
|
| +}
|
| +
|
| inline bool isDisabledFormControl(const Node* node) {
|
| return node->isElementNode() && toElement(node)->isDisabledFormControl();
|
| }
|
|
|