Changeset 143475 in webkit
- Timestamp:
- Feb 20, 2013, 10:27:03 AM (12 years ago)
- Location:
- trunk
- Files:
-
- 4 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r143470 r143475 1 2013-02-20 Robert Hogan <robert@webkit.org> 2 3 input element with placeholder text and width set to 100% on focus causes overflow even after losing focus 4 https://bugs.webkit.org/show_bug.cgi?id=109020 5 6 Reviewed by David Hyatt. 7 8 * fast/forms/input-placeholder-layout-view-expected.html: Added. 9 * fast/forms/input-placeholder-layout-view.html: Added. 10 * fast/forms/textarea-placeholder-layout-view-expected.html: Added. 11 * fast/forms/textarea-placeholder-layout-view.html: Added. 12 1 13 2013-02-20 Rouslan Solomakhin <rouslan@chromium.org> 2 14 -
trunk/Source/WebCore/ChangeLog
r143471 r143475 1 2013-02-20 Robert Hogan <robert@webkit.org> 2 3 input element with placeholder text and width set to 100% on focus causes overflow even after losing focus 4 https://bugs.webkit.org/show_bug.cgi?id=109020 5 6 Reviewed by David Hyatt. 7 8 Tests: fast/forms/input-placeholder-layout-view.html 9 fast/forms/textarea-placeholder-layout-view.html 10 11 Placeholder elements don't affect layout so shouldn't contribute overflow either. 12 13 * rendering/RenderTextControlSingleLine.cpp: 14 (WebCore::RenderTextControlSingleLine::layout): 15 1 16 2013-02-20 Mark Lam <mark.lam@apple.com> 2 17 -
trunk/Source/WebCore/rendering/RenderTextControlSingleLine.cpp
r140286 r143475 178 178 placeholderBox->style()->setWidth(Length(innerTextRenderer->width() - placeholderBox->borderAndPaddingWidth(), Fixed)); 179 179 placeholderBox->style()->setHeight(Length(innerTextRenderer->height() - placeholderBox->borderAndPaddingHeight(), Fixed)); 180 bool neededLayout = placeholderBox->needsLayout(); 180 181 bool placeholderBoxHadLayout = placeholderBox->everHadLayout(); 181 182 placeholderBox->layoutIfNeeded(); … … 191 192 // logic should be shared with RenderBlock::layoutBlockChild. 192 193 placeholderBox->repaint(); 194 } 195 // The placeholder gets layout last, after the parent text control and its other children, 196 // so in order to get the correct overflow from the placeholder we need to recompute it now. 197 if (neededLayout) { 198 m_overflow.clear(); 199 computeOverflow(clientLogicalBottom()); 193 200 } 194 201 }
Note:
See TracChangeset
for help on using the changeset viewer.