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

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

Issue 709613003: To ensure consistency between layouts, we need to reset any overriden top for centering the textfie… (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 1 month 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 8d2c0453ee84921291a6775c16ee1eaa2e030c39..42cf41ab4825afef65cd29a3e7a18965fed1c8ac 100644
--- a/Source/core/rendering/RenderTextControlSingleLine.cpp
+++ b/Source/core/rendering/RenderTextControlSingleLine.cpp
@@ -109,8 +109,9 @@ void RenderTextControlSingleLine::layout()
RenderBox* viewPortRenderer = editingViewPortElement() ? editingViewPortElement()->renderBox() : 0;
// To ensure consistency between layouts, we need to reset any conditionally overriden height.
- if (innerEditorRenderer && !innerEditorRenderer->style()->logicalHeight().isAuto()) {
- innerEditorRenderer->style()->setLogicalHeight(Length(Auto));
+ if (innerEditorRenderer) {
Julien - ping for review 2014/11/11 16:57:58 This will be forcing a relayout of the innerEditor
pals 2014/11/12 13:29:08 I have moved to a flag which is set when center th
+ if (!innerEditorRenderer->style()->logicalHeight().isAuto())
+ innerEditorRenderer->style()->setLogicalHeight(Length(Auto));
layoutScope.setNeedsLayout(innerEditorRenderer);
HTMLElement* placeholderElement = inputElement()->placeholderElement();
if (RenderBox* placeholderBox = placeholderElement ? placeholderElement->renderBox() : 0)

Powered by Google App Engine
This is Rietveld 408576698