Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(25)

Side by Side Diff: Source/core/rendering/RenderBlock.cpp

Issue 302083005: Don't leave stale pointers into m_grid (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2007 David Smith (catfish.man@gmail.com) 4 * (C) 2007 David Smith (catfish.man@gmail.com)
5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved. 5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved.
6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. 6 * Copyright (C) Research In Motion Limited 2010. All rights reserved.
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 #include "core/rendering/HitTestLocation.h" 42 #include "core/rendering/HitTestLocation.h"
43 #include "core/rendering/HitTestResult.h" 43 #include "core/rendering/HitTestResult.h"
44 #include "core/rendering/InlineIterator.h" 44 #include "core/rendering/InlineIterator.h"
45 #include "core/rendering/InlineTextBox.h" 45 #include "core/rendering/InlineTextBox.h"
46 #include "core/rendering/LayoutRepainter.h" 46 #include "core/rendering/LayoutRepainter.h"
47 #include "core/rendering/PaintInfo.h" 47 #include "core/rendering/PaintInfo.h"
48 #include "core/rendering/RenderCombineText.h" 48 #include "core/rendering/RenderCombineText.h"
49 #include "core/rendering/RenderDeprecatedFlexibleBox.h" 49 #include "core/rendering/RenderDeprecatedFlexibleBox.h"
50 #include "core/rendering/RenderFlexibleBox.h" 50 #include "core/rendering/RenderFlexibleBox.h"
51 #include "core/rendering/RenderFlowThread.h" 51 #include "core/rendering/RenderFlowThread.h"
52 #include "core/rendering/RenderGrid.h"
52 #include "core/rendering/RenderInline.h" 53 #include "core/rendering/RenderInline.h"
53 #include "core/rendering/RenderLayer.h" 54 #include "core/rendering/RenderLayer.h"
54 #include "core/rendering/RenderMarquee.h" 55 #include "core/rendering/RenderMarquee.h"
55 #include "core/rendering/RenderRegion.h" 56 #include "core/rendering/RenderRegion.h"
56 #include "core/rendering/RenderTableCell.h" 57 #include "core/rendering/RenderTableCell.h"
57 #include "core/rendering/RenderTextControl.h" 58 #include "core/rendering/RenderTextControl.h"
58 #include "core/rendering/RenderTextFragment.h" 59 #include "core/rendering/RenderTextFragment.h"
59 #include "core/rendering/RenderTheme.h" 60 #include "core/rendering/RenderTheme.h"
60 #include "core/rendering/RenderView.h" 61 #include "core/rendering/RenderView.h"
61 #include "core/rendering/shapes/ShapeOutsideInfo.h" 62 #include "core/rendering/shapes/ShapeOutsideInfo.h"
(...skipping 983 matching lines...) Expand 10 before | Expand all | Expand 10 after
1045 if (child->nextSibling()) 1046 if (child->nextSibling())
1046 child->nextSibling()->setPreviousSibling(child->previousSibling()); 1047 child->nextSibling()->setPreviousSibling(child->previousSibling());
1047 } 1048 }
1048 1049
1049 child->children()->setFirstChild(0); 1050 child->children()->setFirstChild(0);
1050 child->m_next = 0; 1051 child->m_next = 0;
1051 1052
1052 // Remove all the information in the flow thread associated with the leftove r anonymous block. 1053 // Remove all the information in the flow thread associated with the leftove r anonymous block.
1053 child->removeFromRenderFlowThread(); 1054 child->removeFromRenderFlowThread();
1054 1055
1056 // RenderGrid keeps track of its children, we must notify it about changes i n the tree.
1057 if (child->parent()->isRenderGrid())
1058 toRenderGrid(child->parent())->dirtyGrid();
1059
1055 child->setParent(0); 1060 child->setParent(0);
1056 child->setPreviousSibling(0); 1061 child->setPreviousSibling(0);
1057 child->setNextSibling(0); 1062 child->setNextSibling(0);
1058 1063
1059 child->destroy(); 1064 child->destroy();
1060 } 1065 }
1061 1066
1062 static bool canMergeContiguousAnonymousBlocks(RenderObject* oldChild, RenderObje ct* prev, RenderObject* next) 1067 static bool canMergeContiguousAnonymousBlocks(RenderObject* oldChild, RenderObje ct* prev, RenderObject* next)
1063 { 1068 {
1064 if (oldChild->documentBeingDestroyed() || oldChild->isInline() || oldChild-> virtualContinuation()) 1069 if (oldChild->documentBeingDestroyed() || oldChild->isInline() || oldChild-> virtualContinuation())
(...skipping 3945 matching lines...) Expand 10 before | Expand all | Expand 10 after
5010 void RenderBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Render Object* obj) const 5015 void RenderBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Render Object* obj) const
5011 { 5016 {
5012 showRenderObject(); 5017 showRenderObject();
5013 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot Box()) 5018 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot Box())
5014 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa bel2, obj, 1); 5019 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa bel2, obj, 1);
5015 } 5020 }
5016 5021
5017 #endif 5022 #endif
5018 5023
5019 } // namespace WebCore 5024 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698