Commit 45ad2e51 authored by rniwa@webkit.org's avatar rniwa@webkit.org

Fix orphan needsLayout state in RenderTextControlSingleLine

https://bugs.webkit.org/show_bug.cgi?id=119726

Reviewed by Kent Tamura.

Merge https://chromium.googlesource.com/chromium/blink/+/c0aec52ef348b2be0c882f8646fe3cf537831f59

We should mark the renderer for containerElement, which wraps innerTextElement and innerBlockElement
in cases of input[type=search] and input[type=number], dirty.

* rendering/RenderTextControlSingleLine.cpp:
(WebCore::setNeedsLayoutOnAncestors):
(WebCore::RenderTextControlSingleLine::layout):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154036 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent f571f791
2013-08-12 Ryosuke Niwa <rniwa@webkit.org>
Fix orphan needsLayout state in RenderTextControlSingleLine
https://bugs.webkit.org/show_bug.cgi?id=119726
Reviewed by Kent Tamura.
Merge https://chromium.googlesource.com/chromium/blink/+/c0aec52ef348b2be0c882f8646fe3cf537831f59
We should mark the renderer for containerElement, which wraps innerTextElement and innerBlockElement
in cases of input[type=search] and input[type=number], dirty.
* rendering/RenderTextControlSingleLine.cpp:
(WebCore::setNeedsLayoutOnAncestors):
(WebCore::RenderTextControlSingleLine::layout):
2013-08-13 Sam Weinig <sam@webkit.org>
[Re-land] Cleanup MediaQueryListListener
......@@ -98,6 +98,15 @@ LayoutUnit RenderTextControlSingleLine::computeLogicalHeightLimit() const
return containerElement() ? contentLogicalHeight() : logicalHeight();
}
static void setNeedsLayoutOnAncestors(RenderObject* start, RenderObject* ancestor)
{
ASSERT(start != ancestor);
for (RenderObject* renderer = start; renderer != ancestor; renderer = renderer->parent()) {
ASSERT(renderer);
renderer->setNeedsLayout(true, MarkOnlyThis);
}
}
void RenderTextControlSingleLine::layout()
{
StackStats::LayoutCheckPoint layoutCheckPoint;
......@@ -119,11 +128,11 @@ void RenderTextControlSingleLine::layout()
// To ensure consistency between layouts, we need to reset any conditionally overriden height.
if (innerTextRenderer && !innerTextRenderer->style()->logicalHeight().isAuto()) {
innerTextRenderer->style()->setLogicalHeight(Length(Auto));
innerTextRenderer->setNeedsLayout(true, MarkOnlyThis);
setNeedsLayoutOnAncestors(innerTextRenderer, this);
}
if (innerBlockRenderer && !innerBlockRenderer->style()->logicalHeight().isAuto()) {
innerBlockRenderer->style()->setLogicalHeight(Length(Auto));
innerBlockRenderer->setNeedsLayout(true, MarkOnlyThis);
setNeedsLayoutOnAncestors(innerBlockRenderer, this);
}
RenderBlock::layoutBlock(false);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment