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

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

Issue 1224933002: Combine outline and focus ring code paths (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 5 years, 3 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
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 "config.h" 5 #include "config.h"
6 #include "core/paint/SVGContainerPainter.h" 6 #include "core/paint/SVGContainerPainter.h"
7 7
8 #include "core/layout/svg/LayoutSVGContainer.h" 8 #include "core/layout/svg/LayoutSVGContainer.h"
9 #include "core/layout/svg/LayoutSVGViewportContainer.h" 9 #include "core/layout/svg/LayoutSVGViewportContainer.h"
10 #include "core/layout/svg/SVGLayoutSupport.h" 10 #include "core/layout/svg/SVGLayoutSupport.h"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 if (continueRendering) { 51 if (continueRendering) {
52 paintContext.paintInfo().updatePaintingRootForChildren(&m_layoutSVGC ontainer); 52 paintContext.paintInfo().updatePaintingRootForChildren(&m_layoutSVGC ontainer);
53 for (LayoutObject* child = m_layoutSVGContainer.firstChild(); child; child = child->nextSibling()) 53 for (LayoutObject* child = m_layoutSVGContainer.firstChild(); child; child = child->nextSibling())
54 child->paint(paintContext.paintInfo(), IntPoint()); 54 child->paint(paintContext.paintInfo(), IntPoint());
55 } 55 }
56 } 56 }
57 57
58 if (paintInfoBeforeFiltering.phase != PaintPhaseForeground) 58 if (paintInfoBeforeFiltering.phase != PaintPhaseForeground)
59 return; 59 return;
60 60
61 if (m_layoutSVGContainer.style()->outlineWidth() && m_layoutSVGContainer.sty le()->visibility() == VISIBLE) { 61 if (m_layoutSVGContainer.style()->outlineWidth() && m_layoutSVGContainer.sty le()->visibility() == VISIBLE)
62 PaintInfo outlinePaintInfo(paintInfoBeforeFiltering); 62 ObjectPainter(m_layoutSVGContainer).paintOutline(paintInfoBeforeFilterin g, LayoutPoint(boundingBox.location()));
63 outlinePaintInfo.phase = PaintPhaseSelfOutline;
64 LayoutRect layoutBoundingBox(boundingBox);
65 ObjectPainter(m_layoutSVGContainer).paintOutline(outlinePaintInfo, m_lay outSVGContainer.outlineVisualOverflowRect(), layoutBoundingBox.size(), layoutBou ndingBox.location());
pdr. 2015/08/27 22:59:33 We can remove LayoutSVGModelObject::outlineVisualO
Xianzhu 2015/08/28 00:26:04 Done.
66 }
67 63
68 if (paintInfoBeforeFiltering.isPrinting()) 64 if (paintInfoBeforeFiltering.isPrinting())
69 ObjectPainter(m_layoutSVGContainer).addPDFURLRectIfNeeded(paintInfoBefor eFiltering, LayoutPoint()); 65 ObjectPainter(m_layoutSVGContainer).addPDFURLRectIfNeeded(paintInfoBefor eFiltering, LayoutPoint());
70 } 66 }
71 67
72 } // namespace blink 68 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698