Title: [139646] branches/chromium/1364/Source/WebCore/dom/Document.cpp
- Revision
- 139646
- Author
- [email protected]
- Date
- 2013-01-14 13:04:32 -0800 (Mon, 14 Jan 2013)
Log Message
Merge 139470
BUG=146145
Review URL: https://codereview.chromium.org/11891002
Modified Paths
Diff
Modified: branches/chromium/1364/Source/WebCore/dom/Document.cpp (139645 => 139646)
--- branches/chromium/1364/Source/WebCore/dom/Document.cpp 2013-01-14 21:03:26 UTC (rev 139645)
+++ branches/chromium/1364/Source/WebCore/dom/Document.cpp 2013-01-14 21:04:32 UTC (rev 139646)
@@ -1912,16 +1912,24 @@
void Document::updateLayout()
{
ASSERT(isMainThread());
+
+ FrameView* frameView = view();
+ if (frameView && frameView->isInLayout()) {
+ // View layout should not be re-entrant.
+ ASSERT_NOT_REACHED();
+ return;
+ }
+
if (Element* oe = ownerElement())
oe->document()->updateLayout();
updateStyleIfNeeded();
StackStats::LayoutCheckPoint layoutCheckPoint;
+
// Only do a layout if changes have occurred that make it necessary.
- FrameView* v = view();
- if (v && renderer() && (v->layoutPending() || renderer()->needsLayout()))
- v->layout();
+ if (frameView && renderer() && (frameView->layoutPending() || renderer()->needsLayout()))
+ frameView->layout();
}
// FIXME: This is a bad idea and needs to be removed eventually.
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes