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

Unified Diff: third_party/WebKit/Source/core/editing/InputMethodController.cpp

Issue 2370393002: Extracting placeholder information from Webkit to Blimp (Closed)
Patch Set: dtrainor comments Created 4 years, 2 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
Index: third_party/WebKit/Source/core/editing/InputMethodController.cpp
diff --git a/third_party/WebKit/Source/core/editing/InputMethodController.cpp b/third_party/WebKit/Source/core/editing/InputMethodController.cpp
index 3681b8a9ffae6dd4813029d118f21824d72bd981..b3a7a3b177aac1a6203fad34b59a295962ac0e6c 100644
--- a/third_party/WebKit/Source/core/editing/InputMethodController.cpp
+++ b/third_party/WebKit/Source/core/editing/InputMethodController.cpp
@@ -967,6 +967,9 @@ WebTextInputInfo InputMethodController::textInputInfo() const {
info.value = plainText(EphemeralRange::rangeOfContents(*element),
TextIteratorEmitsObjectReplacementCharacter);
+ element = frame().document()->focusedElement();
+ info.placeholder = element->fastGetAttribute(HTMLNames::placeholderAttr);
+
if (info.value.isEmpty())
return info;

Powered by Google App Engine
This is Rietveld 408576698