Title: [109457] branches/chromium/963/Source/WebCore
- Revision
- 109457
- Author
- [email protected]
- Date
- 2012-03-01 15:52:43 -0800 (Thu, 01 Mar 2012)
Log Message
Merge 109406
BUG=116405
Review URL: https://chromiumcodereview.appspot.com/9569043
Modified Paths
Diff
Modified: branches/chromium/963/Source/WebCore/page/FrameView.h (109456 => 109457)
--- branches/chromium/963/Source/WebCore/page/FrameView.h 2012-03-01 23:46:47 UTC (rev 109456)
+++ branches/chromium/963/Source/WebCore/page/FrameView.h 2012-03-01 23:52:43 UTC (rev 109457)
@@ -101,6 +101,7 @@
bool isInLayout() const { return m_inLayout; }
RenderObject* layoutRoot(bool _onlyDuringLayout_ = false) const;
+ void clearLayoutRoot() { m_layoutRoot = 0; }
int layoutCount() const { return m_layoutCount; }
bool needsLayout() const;
Modified: branches/chromium/963/Source/WebCore/rendering/RenderObject.cpp (109456 => 109457)
--- branches/chromium/963/Source/WebCore/rendering/RenderObject.cpp 2012-03-01 23:46:47 UTC (rev 109456)
+++ branches/chromium/963/Source/WebCore/rendering/RenderObject.cpp 2012-03-01 23:52:43 UTC (rev 109457)
@@ -2217,6 +2217,21 @@
return st == SelectionStart || st == SelectionEnd || st == SelectionBoth;
}
+inline void RenderObject::clearLayoutRootIfNeeded() const
+{
+ if (node() && !documentBeingDestroyed() && frame()) {
+ if (FrameView* view = frame()->view()) {
+ if (view->layoutRoot() == this) {
+ ASSERT_NOT_REACHED();
+ // This indicates a failure to layout the child, which is why
+ // the layout root is still set to |this|. Make sure to clear it
+ // since we are getting destroyed.
+ view->clearLayoutRoot();
+ }
+ }
+ }
+}
+
void RenderObject::willBeDestroyed()
{
// Destroy any leftover anonymous children.
@@ -2255,6 +2270,8 @@
setHasLayer(false);
toRenderBoxModelObject(this)->destroyLayer();
}
+
+ clearLayoutRootIfNeeded();
}
void RenderObject::destroy()
Modified: branches/chromium/963/Source/WebCore/rendering/RenderObject.h (109456 => 109457)
--- branches/chromium/963/Source/WebCore/rendering/RenderObject.h 2012-03-01 23:46:47 UTC (rev 109456)
+++ branches/chromium/963/Source/WebCore/rendering/RenderObject.h 2012-03-01 23:52:43 UTC (rev 109457)
@@ -853,6 +853,7 @@
void adjustRectForOutlineAndShadow(LayoutRect&) const;
+ void clearLayoutRootIfNeeded() const;
virtual void willBeDestroyed();
void arenaDelete(RenderArena*, void* objectBase);
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes