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

Unified Diff: Source/core/layout/LayoutTextControlSingleLine.cpp

Issue 952663002: Text inside input field gets misaligned when relaying out (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 10 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 | « LayoutTests/fast/forms/relayout-shifts-inner-editor-expected.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/layout/LayoutTextControlSingleLine.cpp
diff --git a/Source/core/layout/LayoutTextControlSingleLine.cpp b/Source/core/layout/LayoutTextControlSingleLine.cpp
index d3dbf3ca121cc03bd9f1c982de55cbc3710a8045..ec689092268b78851343cbafda214320622df24f 100644
--- a/Source/core/layout/LayoutTextControlSingleLine.cpp
+++ b/Source/core/layout/LayoutTextControlSingleLine.cpp
@@ -157,6 +157,11 @@ void LayoutTextControlSingleLine::layout()
}
}
+ // Make sure the inner editor renderer is relaid out here. This prevents any possibility
+ // of bad placement below as we read stale values.
+ if (!container && innerEditorRenderer && innerEditorRenderer->size().height() != contentLogicalHeight())
dsinclair 2015/02/23 21:00:43 We don't care about width() != contentLogicalWidth
leviw_travelin_and_unemployed 2015/02/23 21:02:00 The conditions of this "if" are a little weird, an
Julien - ping for review 2015/02/24 01:15:35 Spot on. I was trying to be smart about when to re
+ layoutScope.setNeedsLayout(innerEditorRenderer);
+
// If we need another layout pass, we have changed one of children's height so we need to relayout them.
if (needsLayout())
RenderBlockFlow::layoutBlock(true);
« no previous file with comments | « LayoutTests/fast/forms/relayout-shifts-inner-editor-expected.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698