Title: [139645] branches/chromium/1312/Source/WebCore/dom/Document.cpp
- Revision
- 139645
- Author
- [email protected]
- Date
- 2013-01-14 13:03:26 -0800 (Mon, 14 Jan 2013)
Log Message
Merge 139470
BUG=146145
Review URL: https://codereview.chromium.org/11889015
Modified Paths
Diff
Modified: branches/chromium/1312/Source/WebCore/dom/Document.cpp (139644 => 139645)
--- branches/chromium/1312/Source/WebCore/dom/Document.cpp 2013-01-14 20:49:44 UTC (rev 139644)
+++ branches/chromium/1312/Source/WebCore/dom/Document.cpp 2013-01-14 21:03:26 UTC (rev 139645)
@@ -1917,16 +1917,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