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

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: Patch for landing 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
« no previous file with comments | « LayoutTests/fast/css-grid-layout/stale-grid-layout-expected.txt ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 988 matching lines...) Expand 10 before | Expand all | Expand 10 after
1050 if (child->nextSibling()) 1051 if (child->nextSibling())
1051 child->nextSibling()->setPreviousSibling(child->previousSibling()); 1052 child->nextSibling()->setPreviousSibling(child->previousSibling());
1052 } 1053 }
1053 1054
1054 child->children()->setFirstChild(0); 1055 child->children()->setFirstChild(0);
1055 child->m_next = 0; 1056 child->m_next = 0;
1056 1057
1057 // Remove all the information in the flow thread associated with the leftove r anonymous block. 1058 // Remove all the information in the flow thread associated with the leftove r anonymous block.
1058 child->removeFromRenderFlowThread(); 1059 child->removeFromRenderFlowThread();
1059 1060
1061 // RenderGrid keeps track of its children, we must notify it about changes i n the tree.
1062 if (child->parent()->isRenderGrid())
1063 toRenderGrid(child->parent())->dirtyGrid();
1064
1060 child->setParent(0); 1065 child->setParent(0);
1061 child->setPreviousSibling(0); 1066 child->setPreviousSibling(0);
1062 child->setNextSibling(0); 1067 child->setNextSibling(0);
1063 1068
1064 child->destroy(); 1069 child->destroy();
1065 } 1070 }
1066 1071
1067 static bool canMergeContiguousAnonymousBlocks(RenderObject* oldChild, RenderObje ct* prev, RenderObject* next) 1072 static bool canMergeContiguousAnonymousBlocks(RenderObject* oldChild, RenderObje ct* prev, RenderObject* next)
1068 { 1073 {
1069 if (oldChild->documentBeingDestroyed() || oldChild->isInline() || oldChild-> virtualContinuation()) 1074 if (oldChild->documentBeingDestroyed() || oldChild->isInline() || oldChild-> virtualContinuation())
(...skipping 3972 matching lines...) Expand 10 before | Expand all | Expand 10 after
5042 void RenderBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Render Object* obj) const 5047 void RenderBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Render Object* obj) const
5043 { 5048 {
5044 showRenderObject(); 5049 showRenderObject();
5045 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot Box()) 5050 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot Box())
5046 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa bel2, obj, 1); 5051 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa bel2, obj, 1);
5047 } 5052 }
5048 5053
5049 #endif 5054 #endif
5050 5055
5051 } // namespace WebCore 5056 } // namespace WebCore
OLDNEW
« no previous file with comments | « LayoutTests/fast/css-grid-layout/stale-grid-layout-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698