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

Unified Diff: Source/web/WebTextAreaElement.cpp

Issue 287313003: Add toWebTextAreaElement (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | public/web/WebTextAreaElement.h » ('j') | public/web/WebTextAreaElement.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/WebTextAreaElement.cpp
diff --git a/Source/web/WebTextAreaElement.cpp b/Source/web/WebTextAreaElement.cpp
index 334f4f0b1f7ce970bf9a099312d1044c4e9176db..863c5b90dac971e72dc13ffd7f6bbc573b91d2bf 100644
--- a/Source/web/WebTextAreaElement.cpp
+++ b/Source/web/WebTextAreaElement.cpp
@@ -56,4 +56,12 @@ WebTextAreaElement::operator PassRefPtrWillBeRawPtr<HTMLTextAreaElement>() const
return toHTMLTextAreaElement(m_private.get());
}
+WebTextAreaElement* toWebTextAreaElement(WebElement* webElement)
+{
+ if (!isHTMLTextAreaElement(*webElement->unwrap<Element>()))
tkent 2014/05/19 05:29:51 This will crash if webElement is nullptr. Is it e
keishi 2014/05/19 08:24:00 toWebInputElement was written like this. We are re
+ return 0;
+
+ return static_cast<WebTextAreaElement*>(webElement);
+}
+
} // namespace blink
« no previous file with comments | « no previous file | public/web/WebTextAreaElement.h » ('j') | public/web/WebTextAreaElement.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698