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

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

Issue 264963004: Mark when we may have been invalidated to early out on repaintTreeAfterLayout. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 8 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: Source/core/rendering/RenderTextControlSingleLine.cpp
diff --git a/Source/core/rendering/RenderTextControlSingleLine.cpp b/Source/core/rendering/RenderTextControlSingleLine.cpp
index 00bba448973eb41d9a2b2e7e7d29e8fa2049e404..de177432e64286a4ceafe556eee7cf594d3604c7 100644
--- a/Source/core/rendering/RenderTextControlSingleLine.cpp
+++ b/Source/core/rendering/RenderTextControlSingleLine.cpp
@@ -95,6 +95,8 @@ void RenderTextControlSingleLine::layout()
{
SubtreeLayoutScope layoutScope(*this);
+ setMayNeedInvalidation(true);
+
// FIXME: We should remove the height-related hacks in layout() and
// styleDidChange(). We need them because
// - Center the inner elements vertically if the input height is taller than
@@ -172,6 +174,8 @@ void RenderTextControlSingleLine::layout()
if (RenderBox* placeholderBox = placeholderElement ? placeholderElement->renderBox() : 0) {
LayoutSize innerTextSize;
+ placeholderBox->setMayNeedInvalidation(true);
+
if (innerTextRenderer)
innerTextSize = innerTextRenderer->size();
placeholderBox->style()->setWidth(Length(innerTextSize.width() - placeholderBox->borderAndPaddingWidth(), Fixed));

Powered by Google App Engine
This is Rietveld 408576698