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

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

Issue 19558006: Heap-use-after-free in WebCore::RenderFlexibleBox::firstLineBoxBaseline (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Updated change after the review's comments Created 7 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/rendering/RenderGrid.h ('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) 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2011 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 245
246 computeIntrinsicLogicalWidths(m_minPreferredLogicalWidth, m_maxPreferredLogi calWidth); 246 computeIntrinsicLogicalWidths(m_minPreferredLogicalWidth, m_maxPreferredLogi calWidth);
247 247
248 LayoutUnit borderAndPaddingInInlineDirection = borderAndPaddingLogicalWidth( ); 248 LayoutUnit borderAndPaddingInInlineDirection = borderAndPaddingLogicalWidth( );
249 m_minPreferredLogicalWidth += borderAndPaddingInInlineDirection; 249 m_minPreferredLogicalWidth += borderAndPaddingInInlineDirection;
250 m_maxPreferredLogicalWidth += borderAndPaddingInInlineDirection; 250 m_maxPreferredLogicalWidth += borderAndPaddingInInlineDirection;
251 251
252 setPreferredLogicalWidthsDirty(false); 252 setPreferredLogicalWidthsDirty(false);
253 } 253 }
254 254
255 void RenderGrid::removeChild(RenderObject* child)
256 {
257 m_orderIterator.invalidate();
258
259 RenderBlock::removeChild(child);
260 }
261
255 LayoutUnit RenderGrid::computePreferredTrackWidth(const GridLength& gridLength, size_t trackIndex) const 262 LayoutUnit RenderGrid::computePreferredTrackWidth(const GridLength& gridLength, size_t trackIndex) const
256 { 263 {
257 if (gridLength.isFlex()) 264 if (gridLength.isFlex())
258 return 0; 265 return 0;
259 266
260 const Length& length = gridLength.length(); 267 const Length& length = gridLength.length();
261 268
262 if (length.isFixed()) { 269 if (length.isFixed()) {
263 // Grid areas don't have borders, margins or paddings so we don't need t o account for them. 270 // Grid areas don't have borders, margins or paddings so we don't need t o account for them.
264 return length.intValue(); 271 return length.intValue();
(...skipping 786 matching lines...) Expand 10 before | Expand all | Expand 10 after
1051 if (isOutOfFlowPositioned()) 1058 if (isOutOfFlowPositioned())
1052 return "RenderGrid (positioned)"; 1059 return "RenderGrid (positioned)";
1053 if (isAnonymous()) 1060 if (isAnonymous())
1054 return "RenderGrid (generated)"; 1061 return "RenderGrid (generated)";
1055 if (isRelPositioned()) 1062 if (isRelPositioned())
1056 return "RenderGrid (relative positioned)"; 1063 return "RenderGrid (relative positioned)";
1057 return "RenderGrid"; 1064 return "RenderGrid";
1058 } 1065 }
1059 1066
1060 } // namespace WebCore 1067 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderGrid.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698