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

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') | no next file with comments »
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..b10c8e7be58a1b4f2078d819cd302bb917bc2450 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 (!webElement || !isHTMLTextAreaElement(*webElement->unwrap<Element>()))
+ return 0;
+
+ return static_cast<WebTextAreaElement*>(webElement);
+}
+
} // namespace blink
« no previous file with comments | « no previous file | public/web/WebTextAreaElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698