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

Side by Side Diff: Source/core/rendering/shapes/ShapeOutsideInfo.cpp

Issue 635533003: Don't delete nodes in the float interval tree while traversing it. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Add correct png! Created 6 years, 2 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/shapes/ShapeOutsideInfo.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) 2012 Adobe Systems Incorporated. All rights reserved. 2 * Copyright (C) 2012 Adobe Systems Incorporated. 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 * 7 *
8 * 1. Redistributions of source code must retain the above 8 * 1. Redistributions of source code must retain the above
9 * copyright notice, this list of conditions and the following 9 * copyright notice, this list of conditions and the following
10 * disclaimer. 10 * disclaimer.
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 RefPtr<Image> image = styleImage->image(const_cast<RenderBox*>(&m_renderer), imageSize); 135 RefPtr<Image> image = styleImage->image(const_cast<RenderBox*>(&m_renderer), imageSize);
136 136
137 return Shape::createRasterShape(image.get(), shapeImageThreshold, imageRect, marginRect, writingMode, margin); 137 return Shape::createRasterShape(image.get(), shapeImageThreshold, imageRect, marginRect, writingMode, margin);
138 } 138 }
139 139
140 const Shape& ShapeOutsideInfo::computedShape() const 140 const Shape& ShapeOutsideInfo::computedShape() const
141 { 141 {
142 if (Shape* shape = m_shape.get()) 142 if (Shape* shape = m_shape.get())
143 return *shape; 143 return *shape;
144 144
145 TemporaryChange<bool> isInComputingShape(m_isComputingShape, true);
146
145 const RenderStyle& style = *m_renderer.style(); 147 const RenderStyle& style = *m_renderer.style();
146 ASSERT(m_renderer.containingBlock()); 148 ASSERT(m_renderer.containingBlock());
147 const RenderStyle& containingBlockStyle = *m_renderer.containingBlock()->sty le(); 149 const RenderStyle& containingBlockStyle = *m_renderer.containingBlock()->sty le();
148 150
149 WritingMode writingMode = containingBlockStyle.writingMode(); 151 WritingMode writingMode = containingBlockStyle.writingMode();
150 LayoutUnit maximumValue = m_renderer.containingBlock() ? m_renderer.containi ngBlock()->contentWidth() : LayoutUnit(); 152 LayoutUnit maximumValue = m_renderer.containingBlock() ? m_renderer.containi ngBlock()->contentWidth() : LayoutUnit();
151 float margin = floatValueForLength(m_renderer.style()->shapeMargin(), maximu mValue.toFloat()); 153 float margin = floatValueForLength(m_renderer.style()->shapeMargin(), maximu mValue.toFloat());
152 154
153 float shapeImageThreshold = style.shapeImageThreshold(); 155 float shapeImageThreshold = style.shapeImageThreshold();
154 ASSERT(style.shapeOutside()); 156 ASSERT(style.shapeOutside());
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
339 } 341 }
340 342
341 FloatSize ShapeOutsideInfo::shapeToRendererSize(FloatSize size) const 343 FloatSize ShapeOutsideInfo::shapeToRendererSize(FloatSize size) const
342 { 344 {
343 if (!m_renderer.style()->isHorizontalWritingMode()) 345 if (!m_renderer.style()->isHorizontalWritingMode())
344 return size.transposedSize(); 346 return size.transposedSize();
345 return size; 347 return size;
346 } 348 }
347 349
348 } // namespace blink 350 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/rendering/shapes/ShapeOutsideInfo.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698