diff options
author | yaar@chromium.org <yaar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-20 00:35:14 +0000 |
---|---|---|
committer | yaar@chromium.org <yaar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-20 00:35:14 +0000 |
commit | 8515b41c8881a6d80460903818bc1491e340fa25 (patch) | |
tree | d30c9df327ebe3d8bf5aeed085c4ac8e3c82067e /webkit/glue/dom_operations.cc | |
parent | 6d08f6de08f05ea927ada97c757b6d01b180712e (diff) | |
download | chromium_src-8515b41c8881a6d80460903818bc1491e340fa25.zip chromium_src-8515b41c8881a6d80460903818bc1491e340fa25.tar.gz chromium_src-8515b41c8881a6d80460903818bc1491e340fa25.tar.bz2 |
Moved Node/ElementToHTMLInputElement from glue/dom_utilities into src/DOMUtilities
Review URL: http://codereview.chromium.org/287010
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29483 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/dom_operations.cc')
-rw-r--r-- | webkit/glue/dom_operations.cc | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/webkit/glue/dom_operations.cc b/webkit/glue/dom_operations.cc index f391452..9e99d0d 100644 --- a/webkit/glue/dom_operations.cc +++ b/webkit/glue/dom_operations.cc @@ -29,6 +29,8 @@ MSVC_POP_WARNING(); #undef LOG #include "base/string_util.h" +// TODO(yaar) Eventually should not depend on api/src. +#include "webkit/api/src/DOMUtilitiesPrivate.h" #include "webkit/glue/dom_operations.h" #include "webkit/glue/dom_operations_private.h" #include "webkit/glue/form_data.h" @@ -252,7 +254,7 @@ static bool FindFormInputElements(WebCore::HTMLFormElement* fe, // matching elements it can get at them through the FormElement*. // Note: This assignment adds a reference to the InputElement. result->input_elements[data.elements[j]] = - NodeToHTMLInputElement(temp_elements[0].get()); + WebKit::nodeToHTMLInputElement(temp_elements[0].get()); DCHECK(result->input_elements[data.elements[j]].get()); } return true; @@ -783,17 +785,5 @@ int NumberOfActiveAnimations(WebView* view) { return controller->numberOfActiveAnimations(); } -WebCore::HTMLInputElement* ElementToHTMLInputElement( - WebCore::Element* element) { - if (!element->hasLocalName(WebCore::HTMLNames::inputTag)) - return NULL; - return static_cast<WebCore::HTMLInputElement*>(element); -} - -WebCore::HTMLInputElement* NodeToHTMLInputElement(WebCore::Node* node) { - if (node->nodeType() != WebCore::Node::ELEMENT_NODE) - return NULL; - return ElementToHTMLInputElement(static_cast<WebCore::Element*>(node)); -} } // webkit_glue |