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

Side by Side Diff: Source/core/rendering/svg/RenderSVGViewportContainer.cpp

Issue 21430003: Implement interfaces in PaintInfo and make it a class. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@getterPaintInfo01
Patch Set: Second try Created 7 years, 4 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 /* 1 /*
2 * Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org> 2 * Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org>
3 * Copyright (C) 2004, 2005, 2007 Rob Buis <buis@kde.org> 3 * Copyright (C) 2004, 2005, 2007 Rob Buis <buis@kde.org>
4 * Copyright (C) 2007 Eric Seidel <eric@webkit.org> 4 * Copyright (C) 2007 Eric Seidel <eric@webkit.org>
5 * Copyright (C) 2009 Google, Inc. 5 * Copyright (C) 2009 Google, Inc.
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 { 44 {
45 if (!node()->hasTagName(SVGNames::svgTag)) 45 if (!node()->hasTagName(SVGNames::svgTag))
46 return; 46 return;
47 47
48 m_isLayoutSizeChanged = toSVGSVGElement(node())->hasRelativeLengths() && sel fNeedsLayout(); 48 m_isLayoutSizeChanged = toSVGSVGElement(node())->hasRelativeLengths() && sel fNeedsLayout();
49 } 49 }
50 50
51 void RenderSVGViewportContainer::applyViewportClip(PaintInfo& paintInfo) 51 void RenderSVGViewportContainer::applyViewportClip(PaintInfo& paintInfo)
52 { 52 {
53 if (SVGRenderSupport::isOverflowHidden(this)) 53 if (SVGRenderSupport::isOverflowHidden(this))
54 paintInfo.context->clip(m_viewport); 54 paintInfo.getContext()->clip(m_viewport);
55 } 55 }
56 56
57 void RenderSVGViewportContainer::calcViewport() 57 void RenderSVGViewportContainer::calcViewport()
58 { 58 {
59 SVGElement* element = toSVGElement(node()); 59 SVGElement* element = toSVGElement(node());
60 if (!element->hasTagName(SVGNames::svgTag)) 60 if (!element->hasTagName(SVGNames::svgTag))
61 return; 61 return;
62 SVGSVGElement* svg = toSVGSVGElement(element); 62 SVGSVGElement* svg = toSVGSVGElement(element);
63 FloatRect oldViewport = m_viewport; 63 FloatRect oldViewport = m_viewport;
64 64
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 // An empty viewBox disables rendering. 152 // An empty viewBox disables rendering.
153 if (node()->hasTagName(SVGNames::svgTag)) { 153 if (node()->hasTagName(SVGNames::svgTag)) {
154 if (toSVGSVGElement(node())->hasEmptyViewBox()) 154 if (toSVGSVGElement(node())->hasEmptyViewBox())
155 return; 155 return;
156 } 156 }
157 157
158 RenderSVGContainer::paint(paintInfo, paintOffset); 158 RenderSVGContainer::paint(paintInfo, paintOffset);
159 } 159 }
160 160
161 } 161 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698