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

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

Issue 408273003: Reset m_didTransformToRootUpdate flag during invalidationTreeIfNeeded (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Reset the flag only after invalidation Created 6 years, 5 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 /* 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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 m_viewport = FloatRect(svg->x()->currentValue()->value(lengthContext), svg-> y()->currentValue()->value(lengthContext), svg->width()->currentValue()->value(l engthContext), svg->height()->currentValue()->value(lengthContext)); 67 m_viewport = FloatRect(svg->x()->currentValue()->value(lengthContext), svg-> y()->currentValue()->value(lengthContext), svg->width()->currentValue()->value(l engthContext), svg->height()->currentValue()->value(lengthContext));
68 68
69 if (oldViewport != m_viewport) { 69 if (oldViewport != m_viewport) {
70 setNeedsBoundariesUpdate(); 70 setNeedsBoundariesUpdate();
71 setNeedsTransformUpdate(); 71 setNeedsTransformUpdate();
72 } 72 }
73 } 73 }
74 74
75 bool RenderSVGViewportContainer::calculateLocalTransform() 75 bool RenderSVGViewportContainer::calculateLocalTransform()
76 { 76 {
77 m_didTransformToRootUpdate = m_needsTransformUpdate || SVGRenderSupport::tra nsformToRootChanged(parent()); 77 if (m_needsTransformUpdate || SVGRenderSupport::transformToRootChanged(paren t()))
78 m_didTransformToRootUpdate = true;
79
78 if (!m_needsTransformUpdate) 80 if (!m_needsTransformUpdate)
79 return false; 81 return false;
80 82
81 m_localToParentTransform = AffineTransform::translation(m_viewport.x(), m_vi ewport.y()) * viewportTransform(); 83 m_localToParentTransform = AffineTransform::translation(m_viewport.x(), m_vi ewport.y()) * viewportTransform();
82 m_needsTransformUpdate = false; 84 m_needsTransformUpdate = false;
83 return true; 85 return true;
84 } 86 }
85 87
86 AffineTransform RenderSVGViewportContainer::viewportTransform() const 88 AffineTransform RenderSVGViewportContainer::viewportTransform() const
87 { 89 {
(...skipping 18 matching lines...) Expand all
106 void RenderSVGViewportContainer::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffset) 108 void RenderSVGViewportContainer::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffset)
107 { 109 {
108 ASSERT(element()); 110 ASSERT(element());
109 // An empty viewBox disables rendering. 111 // An empty viewBox disables rendering.
110 if (isSVGSVGElement(*element()) && toSVGSVGElement(*element()).hasEmptyViewB ox()) 112 if (isSVGSVGElement(*element()) && toSVGSVGElement(*element()).hasEmptyViewB ox())
111 return; 113 return;
112 114
113 RenderSVGContainer::paint(paintInfo, paintOffset); 115 RenderSVGContainer::paint(paintInfo, paintOffset);
114 } 116 }
115 117
118 void RenderSVGViewportContainer::clearPaintInvalidationState()
119 {
120 RenderSVGContainer::clearPaintInvalidationState();
121
122 ASSERT(!m_needsTransformUpdate);
123 m_didTransformToRootUpdate = false;
116 } 124 }
125
126 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698