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

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

Issue 178473024: Convert some Shape code to use references (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebased patch Created 6 years, 9 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 | « Source/core/rendering/RenderBox.h ('k') | Source/core/rendering/RenderView.h » ('j') | 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) 2005 Allan Sandfeld Jensen (kde@carewolf.com) 4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com)
5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) 5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com)
6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv ed. 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv ed.
7 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. 7 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved.
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 setIsBox(); 98 setIsBox();
99 } 99 }
100 100
101 void RenderBox::willBeDestroyed() 101 void RenderBox::willBeDestroyed()
102 { 102 {
103 clearOverrideSize(); 103 clearOverrideSize();
104 clearContainingBlockOverrideSize(); 104 clearContainingBlockOverrideSize();
105 105
106 RenderBlock::removePercentHeightDescendantIfNeeded(this); 106 RenderBlock::removePercentHeightDescendantIfNeeded(this);
107 107
108 ShapeOutsideInfo::removeInfo(this); 108 ShapeOutsideInfo::removeInfo(*this);
109 109
110 RenderBoxModelObject::willBeDestroyed(); 110 RenderBoxModelObject::willBeDestroyed();
111 } 111 }
112 112
113 void RenderBox::removeFloatingOrPositionedChildFromBlockLists() 113 void RenderBox::removeFloatingOrPositionedChildFromBlockLists()
114 { 114 {
115 ASSERT(isFloatingOrOutOfFlowPositioned()); 115 ASSERT(isFloatingOrOutOfFlowPositioned());
116 116
117 if (documentBeingDestroyed()) 117 if (documentBeingDestroyed())
118 return; 118 return;
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 Length oldShapeMargin = oldStyle ? oldStyle->shapeMargin() : RenderStyle::in itialShapeMargin(); 231 Length oldShapeMargin = oldStyle ? oldStyle->shapeMargin() : RenderStyle::in itialShapeMargin();
232 232
233 float shapeImageThreshold = style.shapeImageThreshold(); 233 float shapeImageThreshold = style.shapeImageThreshold();
234 float oldShapeImageThreshold = oldStyle ? oldStyle->shapeImageThreshold() : RenderStyle::initialShapeImageThreshold(); 234 float oldShapeImageThreshold = oldStyle ? oldStyle->shapeImageThreshold() : RenderStyle::initialShapeImageThreshold();
235 235
236 // FIXME: A future optimization would do a deep comparison for equality. (bu g 100811) 236 // FIXME: A future optimization would do a deep comparison for equality. (bu g 100811)
237 if (shapeOutside == oldShapeOutside && shapeMargin == oldShapeMargin && shap eImageThreshold == oldShapeImageThreshold) 237 if (shapeOutside == oldShapeOutside && shapeMargin == oldShapeMargin && shap eImageThreshold == oldShapeImageThreshold)
238 return; 238 return;
239 239
240 if (!shapeOutside) 240 if (!shapeOutside)
241 ShapeOutsideInfo::removeInfo(this); 241 ShapeOutsideInfo::removeInfo(*this);
242 else 242 else
243 ShapeOutsideInfo::ensureInfo(this)->markShapeAsDirty(); 243 ShapeOutsideInfo::ensureInfo(*this).markShapeAsDirty();
244 244
245 if (shapeOutside || shapeOutside != oldShapeOutside) 245 if (shapeOutside || shapeOutside != oldShapeOutside)
246 markShapeOutsideDependentsForLayout(); 246 markShapeOutsideDependentsForLayout();
247 } 247 }
248 248
249 void RenderBox::updateGridPositionAfterStyleChange(const RenderStyle* oldStyle) 249 void RenderBox::updateGridPositionAfterStyleChange(const RenderStyle* oldStyle)
250 { 250 {
251 if (!oldStyle || !parent() || !parent()->isRenderGrid()) 251 if (!oldStyle || !parent() || !parent()->isRenderGrid())
252 return; 252 return;
253 253
(...skipping 1311 matching lines...) Expand 10 before | Expand all | Expand 10 after
1565 return; 1565 return;
1566 1566
1567 if ((style()->borderImage().image() && style()->borderImage().image()->data( ) == image) || 1567 if ((style()->borderImage().image() && style()->borderImage().image()->data( ) == image) ||
1568 (style()->maskBoxImage().image() && style()->maskBoxImage().image()->dat a() == image)) { 1568 (style()->maskBoxImage().image() && style()->maskBoxImage().image()->dat a() == image)) {
1569 repaint(); 1569 repaint();
1570 return; 1570 return;
1571 } 1571 }
1572 1572
1573 ShapeValue* shapeOutsideValue = style()->shapeOutside(); 1573 ShapeValue* shapeOutsideValue = style()->shapeOutside();
1574 if (!frameView()->isInPerformLayout() && isFloating() && shapeOutsideValue & & shapeOutsideValue->image() && shapeOutsideValue->image()->data() == image) { 1574 if (!frameView()->isInPerformLayout() && isFloating() && shapeOutsideValue & & shapeOutsideValue->image() && shapeOutsideValue->image()->data() == image) {
1575 ShapeOutsideInfo::ensureInfo(this)->markShapeAsDirty(); 1575 ShapeOutsideInfo::ensureInfo(*this).markShapeAsDirty();
1576 markShapeOutsideDependentsForLayout(); 1576 markShapeOutsideDependentsForLayout();
1577 } 1577 }
1578 1578
1579 bool didFullRepaint = repaintLayerRectsForImage(image, style()->backgroundLa yers(), true); 1579 bool didFullRepaint = repaintLayerRectsForImage(image, style()->backgroundLa yers(), true);
1580 if (!didFullRepaint) 1580 if (!didFullRepaint)
1581 repaintLayerRectsForImage(image, style()->maskLayers(), false); 1581 repaintLayerRectsForImage(image, style()->maskLayers(), false);
1582 1582
1583 if (hasLayer() && layer()->hasCompositedMask() && layersUseImage(image, styl e()->maskLayers())) 1583 if (hasLayer() && layer()->hasCompositedMask() && layersUseImage(image, styl e()->maskLayers()))
1584 layer()->contentChanged(MaskImageChanged); 1584 layer()->contentChanged(MaskImageChanged);
1585 } 1585 }
(...skipping 3106 matching lines...) Expand 10 before | Expand all | Expand 10 after
4692 return 0; 4692 return 0;
4693 4693
4694 if (!layoutState && !flowThreadContainingBlock()) 4694 if (!layoutState && !flowThreadContainingBlock())
4695 return 0; 4695 return 0;
4696 4696
4697 RenderBlock* containerBlock = containingBlock(); 4697 RenderBlock* containerBlock = containingBlock();
4698 return containerBlock->offsetFromLogicalTopOfFirstPage() + logicalTop(); 4698 return containerBlock->offsetFromLogicalTopOfFirstPage() + logicalTop();
4699 } 4699 }
4700 4700
4701 } // namespace WebCore 4701 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderBox.h ('k') | Source/core/rendering/RenderView.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698