Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006 Alexander Kellett <lypanov@kde.org> | 2 * Copyright (C) 2006 Alexander Kellett <lypanov@kde.org> |
| 3 * Copyright (C) 2006 Apple Computer, Inc. | 3 * Copyright (C) 2006 Apple Computer, Inc. |
| 4 * Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org> | 4 * Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org> |
| 5 * Copyright (C) 2007, 2008, 2009 Rob Buis <buis@kde.org> | 5 * Copyright (C) 2007, 2008, 2009 Rob Buis <buis@kde.org> |
| 6 * Copyright (C) 2009 Google, Inc. | 6 * Copyright (C) 2009 Google, Inc. |
| 7 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org> | 7 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org> |
| 8 * Copyright (C) 2010 Patrick Gansterer <paroga@paroga.com> | 8 * Copyright (C) 2010 Patrick Gansterer <paroga@paroga.com> |
| 9 * | 9 * |
| 10 * This library is free software; you can redistribute it and/or | 10 * This library is free software; you can redistribute it and/or |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 101 lengthContext.valueForLength(styleRef().height(), styleRef(), | 101 lengthContext.valueForLength(styleRef().height(), styleRef(), |
| 102 SVGLengthMode::Height)); | 102 SVGLengthMode::Height)); |
| 103 | 103 |
| 104 if (styleRef().width().isAuto() || styleRef().height().isAuto()) | 104 if (styleRef().width().isAuto() || styleRef().height().isAuto()) |
| 105 m_objectBoundingBox.setSize(calculateObjectSize()); | 105 m_objectBoundingBox.setSize(calculateObjectSize()); |
| 106 | 106 |
| 107 m_needsBoundariesUpdate |= oldBoundaries != m_objectBoundingBox; | 107 m_needsBoundariesUpdate |= oldBoundaries != m_objectBoundingBox; |
| 108 if (element()) | 108 if (element()) |
| 109 element()->setNeedsResizeObserverUpdate(); | 109 element()->setNeedsResizeObserverUpdate(); |
| 110 | 110 |
| 111 if (oldBoundaries != m_objectBoundingBox) | |
|
pdr.
2016/10/31 20:49:05
Can we use m_needsBoundariesUpdate here?
Xianzhu
2016/10/31 22:10:30
It may be true before this check.
Combined the tw
| |
| 112 setShouldDoFullPaintInvalidation(); | |
| 113 | |
| 111 return oldBoundaries.size() != m_objectBoundingBox.size(); | 114 return oldBoundaries.size() != m_objectBoundingBox.size(); |
| 112 } | 115 } |
| 113 | 116 |
| 114 void LayoutSVGImage::layout() { | 117 void LayoutSVGImage::layout() { |
| 115 ASSERT(needsLayout()); | 118 ASSERT(needsLayout()); |
| 116 LayoutAnalyzer::Scope analyzer(*this); | 119 LayoutAnalyzer::Scope analyzer(*this); |
| 117 | 120 |
| 118 // Invalidate all resources of this client if our layout changed. | 121 // Invalidate all resources of this client if our layout changed. |
| 119 if (everHadLayout() && selfNeedsLayout()) | 122 if (everHadLayout() && selfNeedsLayout()) |
| 120 SVGResourcesCache::clientLayoutChanged(this); | 123 SVGResourcesCache::clientLayoutChanged(this); |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 199 | 202 |
| 200 void LayoutSVGImage::addOutlineRects(Vector<LayoutRect>& rects, | 203 void LayoutSVGImage::addOutlineRects(Vector<LayoutRect>& rects, |
| 201 const LayoutPoint&, | 204 const LayoutPoint&, |
| 202 IncludeBlockVisualOverflowOrNot) const { | 205 IncludeBlockVisualOverflowOrNot) const { |
| 203 // this is called from paint() after the localTransform has already been | 206 // this is called from paint() after the localTransform has already been |
| 204 // applied | 207 // applied |
| 205 rects.append(LayoutRect(paintInvalidationRectInLocalSVGCoordinates())); | 208 rects.append(LayoutRect(paintInvalidationRectInLocalSVGCoordinates())); |
| 206 } | 209 } |
| 207 | 210 |
| 208 } // namespace blink | 211 } // namespace blink |
| OLD | NEW |