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

Unified Diff: Source/core/rendering/RenderTextControl.cpp

Issue 23035007: Replace HTMLTextFormControlElement::fixPlaceholderRenderer with an override of RenderTextControl::a… (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Just delete the test Created 7 years, 4 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 | « Source/core/rendering/RenderTextControl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderTextControl.cpp
diff --git a/Source/core/rendering/RenderTextControl.cpp b/Source/core/rendering/RenderTextControl.cpp
index a14e09923828b8c06a3d4900d2ca41fb5895dfb0..cd19e159038ea8cb37ebae4eff385e38fe312a33 100644
--- a/Source/core/rendering/RenderTextControl.cpp
+++ b/Source/core/rendering/RenderTextControl.cpp
@@ -52,6 +52,17 @@ HTMLElement* RenderTextControl::innerTextElement() const
return textFormControlElement()->innerTextElement();
}
+void RenderTextControl::addChild(RenderObject* newChild, RenderObject* beforeChild)
+{
+ // FIXME: This is a terrible hack to get the caret over the placeholder text since it'll
+ // make us paint the placeholder first. (See https://trac.webkit.org/changeset/118733)
+ Node* node = newChild->node();
+ if (node && node->isElementNode() && toElement(node)->part() == "-webkit-input-placeholder")
+ RenderBlock::addChild(newChild, firstChild());
+ else
+ RenderBlock::addChild(newChild, beforeChild);
+}
+
void RenderTextControl::styleDidChange(StyleDifference diff, const RenderStyle* oldStyle)
{
RenderBlock::styleDidChange(diff, oldStyle);
« no previous file with comments | « Source/core/rendering/RenderTextControl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698