OLD | NEW |
---|---|
1 /** | 1 /** |
2 * Copyright (C) 2006, 2007, 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2010 Apple Inc. All rights reserved. |
3 * (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) | 3 * (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) |
4 * Copyright (C) 2010 Google Inc. All rights reserved. | 4 * Copyright (C) 2010 Google Inc. All rights reserved. |
5 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). | 5 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). |
6 * | 6 * |
7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
102 // intrinsic heights of the inner elements. | 102 // intrinsic heights of the inner elements. |
103 | 103 |
104 // We don't honor paddings and borders for textfields without decorations | 104 // We don't honor paddings and borders for textfields without decorations |
105 // and type=search if the text height is taller than the contentHeight() | 105 // and type=search if the text height is taller than the contentHeight() |
106 // because of compability. | 106 // because of compability. |
107 | 107 |
108 RenderBox* innerEditorRenderer = innerEditorElement()->renderBox(); | 108 RenderBox* innerEditorRenderer = innerEditorElement()->renderBox(); |
109 RenderBox* viewPortRenderer = editingViewPortElement() ? editingViewPortElem ent()->renderBox() : 0; | 109 RenderBox* viewPortRenderer = editingViewPortElement() ? editingViewPortElem ent()->renderBox() : 0; |
110 | 110 |
111 // To ensure consistency between layouts, we need to reset any conditionally overriden height. | 111 // To ensure consistency between layouts, we need to reset any conditionally overriden height. |
112 if (innerEditorRenderer && !innerEditorRenderer->style()->logicalHeight().is Auto()) { | 112 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
| |
113 innerEditorRenderer->style()->setLogicalHeight(Length(Auto)); | 113 if (!innerEditorRenderer->style()->logicalHeight().isAuto()) |
114 innerEditorRenderer->style()->setLogicalHeight(Length(Auto)); | |
114 layoutScope.setNeedsLayout(innerEditorRenderer); | 115 layoutScope.setNeedsLayout(innerEditorRenderer); |
115 HTMLElement* placeholderElement = inputElement()->placeholderElement(); | 116 HTMLElement* placeholderElement = inputElement()->placeholderElement(); |
116 if (RenderBox* placeholderBox = placeholderElement ? placeholderElement- >renderBox() : 0) | 117 if (RenderBox* placeholderBox = placeholderElement ? placeholderElement- >renderBox() : 0) |
117 layoutScope.setNeedsLayout(placeholderBox); | 118 layoutScope.setNeedsLayout(placeholderBox); |
118 } | 119 } |
119 if (viewPortRenderer && !viewPortRenderer->style()->logicalHeight().isAuto() ) { | 120 if (viewPortRenderer && !viewPortRenderer->style()->logicalHeight().isAuto() ) { |
120 viewPortRenderer->style()->setLogicalHeight(Length(Auto)); | 121 viewPortRenderer->style()->setLogicalHeight(Length(Auto)); |
121 layoutScope.setNeedsLayout(viewPortRenderer); | 122 layoutScope.setNeedsLayout(viewPortRenderer); |
122 } | 123 } |
123 | 124 |
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
412 if (innerEditorElement()) | 413 if (innerEditorElement()) |
413 innerEditorElement()->setScrollTop(newTop); | 414 innerEditorElement()->setScrollTop(newTop); |
414 } | 415 } |
415 | 416 |
416 HTMLInputElement* RenderTextControlSingleLine::inputElement() const | 417 HTMLInputElement* RenderTextControlSingleLine::inputElement() const |
417 { | 418 { |
418 return toHTMLInputElement(node()); | 419 return toHTMLInputElement(node()); |
419 } | 420 } |
420 | 421 |
421 } | 422 } |
OLD | NEW |