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

Side by Side Diff: third_party/WebKit/Source/core/paint/SVGContainerPainter.cpp

Issue 1610063002: Revert of Remove PaintInfo's paintingRoot (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/paint/SVGContainerPainter.h" 5 #include "core/paint/SVGContainerPainter.h"
6 6
7 #include "core/layout/svg/LayoutSVGContainer.h" 7 #include "core/layout/svg/LayoutSVGContainer.h"
8 #include "core/layout/svg/LayoutSVGViewportContainer.h" 8 #include "core/layout/svg/LayoutSVGViewportContainer.h"
9 #include "core/layout/svg/SVGLayoutSupport.h" 9 #include "core/layout/svg/SVGLayoutSupport.h"
10 #include "core/paint/FloatClipRecorder.h" 10 #include "core/paint/FloatClipRecorder.h"
(...skipping 30 matching lines...) Expand all
41 FloatRect viewport = m_layoutSVGContainer.localToParentTransform().i nverse().mapRect(toLayoutSVGViewportContainer(m_layoutSVGContainer).viewport()); 41 FloatRect viewport = m_layoutSVGContainer.localToParentTransform().i nverse().mapRect(toLayoutSVGViewportContainer(m_layoutSVGContainer).viewport());
42 clipRecorder.emplace(paintInfoBeforeFiltering.context, m_layoutSVGCo ntainer, paintInfoBeforeFiltering.phase, viewport); 42 clipRecorder.emplace(paintInfoBeforeFiltering.context, m_layoutSVGCo ntainer, paintInfoBeforeFiltering.phase, viewport);
43 } 43 }
44 44
45 SVGPaintContext paintContext(m_layoutSVGContainer, paintInfoBeforeFilter ing); 45 SVGPaintContext paintContext(m_layoutSVGContainer, paintInfoBeforeFilter ing);
46 bool continueRendering = true; 46 bool continueRendering = true;
47 if (paintContext.paintInfo().phase == PaintPhaseForeground) 47 if (paintContext.paintInfo().phase == PaintPhaseForeground)
48 continueRendering = paintContext.applyClipMaskAndFilterIfNecessary() ; 48 continueRendering = paintContext.applyClipMaskAndFilterIfNecessary() ;
49 49
50 if (continueRendering) { 50 if (continueRendering) {
51 paintContext.paintInfo().updatePaintingRootForChildren(&m_layoutSVGC ontainer);
51 for (LayoutObject* child = m_layoutSVGContainer.firstChild(); child; child = child->nextSibling()) 52 for (LayoutObject* child = m_layoutSVGContainer.firstChild(); child; child = child->nextSibling())
52 child->paint(paintContext.paintInfo(), IntPoint()); 53 child->paint(paintContext.paintInfo(), IntPoint());
53 } 54 }
54 } 55 }
55 56
56 if (paintInfoBeforeFiltering.phase != PaintPhaseForeground) 57 if (paintInfoBeforeFiltering.phase != PaintPhaseForeground)
57 return; 58 return;
58 59
59 if (m_layoutSVGContainer.style()->outlineWidth() && m_layoutSVGContainer.sty le()->visibility() == VISIBLE) { 60 if (m_layoutSVGContainer.style()->outlineWidth() && m_layoutSVGContainer.sty le()->visibility() == VISIBLE) {
60 PaintInfo outlinePaintInfo(paintInfoBeforeFiltering); 61 PaintInfo outlinePaintInfo(paintInfoBeforeFiltering);
61 outlinePaintInfo.phase = PaintPhaseSelfOutlineOnly; 62 outlinePaintInfo.phase = PaintPhaseSelfOutlineOnly;
62 ObjectPainter(m_layoutSVGContainer).paintOutline(outlinePaintInfo, Layou tPoint(boundingBox.location())); 63 ObjectPainter(m_layoutSVGContainer).paintOutline(outlinePaintInfo, Layou tPoint(boundingBox.location()));
63 } 64 }
64 65
65 if (paintInfoBeforeFiltering.isPrinting()) 66 if (paintInfoBeforeFiltering.isPrinting())
66 ObjectPainter(m_layoutSVGContainer).addPDFURLRectIfNeeded(paintInfoBefor eFiltering, LayoutPoint()); 67 ObjectPainter(m_layoutSVGContainer).addPDFURLRectIfNeeded(paintInfoBefor eFiltering, LayoutPoint());
67 } 68 }
68 69
69 } // namespace blink 70 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698