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

Side by Side Diff: third_party/WebKit/Source/core/layout/svg/LayoutSVGContainer.cpp

Issue 2587623002: Make LayoutSVGViewportContainer's viewport updates an internal detail (Closed)
Patch Set: Fix mistake in setting m_isLayoutSizeChanged Created 4 years 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, 2008 Rob Buis <buis@kde.org> 3 * Copyright (C) 2004, 2005, 2007, 2008 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. All rights reserved. 5 * Copyright (C) 2009 Google, Inc. All rights reserved.
6 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org> 6 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org>
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 void LayoutSVGContainer::layout() { 45 void LayoutSVGContainer::layout() {
46 ASSERT(needsLayout()); 46 ASSERT(needsLayout());
47 LayoutAnalyzer::Scope analyzer(*this); 47 LayoutAnalyzer::Scope analyzer(*this);
48 48
49 // Update the local transform in subclasses. 49 // Update the local transform in subclasses.
50 SVGTransformChange transformChange = calculateLocalTransform(); 50 SVGTransformChange transformChange = calculateLocalTransform();
51 m_didScreenScaleFactorChange = 51 m_didScreenScaleFactorChange =
52 transformChange == SVGTransformChange::Full || 52 transformChange == SVGTransformChange::Full ||
53 SVGLayoutSupport::screenScaleFactorChanged(parent()); 53 SVGLayoutSupport::screenScaleFactorChanged(parent());
54 54
55 // LayoutSVGViewportContainer needs to set the 'layout size changed' flag.
56 determineIfLayoutSizeChanged();
57
58 // When hasRelativeLengths() is false, no descendants have relative lengths 55 // When hasRelativeLengths() is false, no descendants have relative lengths
59 // (hence no one is interested in viewport size changes). 56 // (hence no one is interested in viewport size changes).
60 bool layoutSizeChanged = 57 bool layoutSizeChanged =
61 element()->hasRelativeLengths() && 58 element()->hasRelativeLengths() &&
62 SVGLayoutSupport::layoutSizeOfNearestViewportChanged(this); 59 SVGLayoutSupport::layoutSizeOfNearestViewportChanged(this);
63 60
64 SVGLayoutSupport::layoutChildren( 61 SVGLayoutSupport::layoutChildren(
65 firstChild(), false, m_didScreenScaleFactorChange, layoutSizeChanged); 62 firstChild(), false, m_didScreenScaleFactorChange, layoutSizeChanged);
66 63
67 // Invalidate all resources of this client if our layout changed. 64 // Invalidate all resources of this client if our layout changed.
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 // under the pointer (i.e., there is no target element), the event is not 213 // under the pointer (i.e., there is no target element), the event is not
217 // dispatched." 214 // dispatched."
218 return false; 215 return false;
219 } 216 }
220 217
221 SVGTransformChange LayoutSVGContainer::calculateLocalTransform() { 218 SVGTransformChange LayoutSVGContainer::calculateLocalTransform() {
222 return SVGTransformChange::None; 219 return SVGTransformChange::None;
223 } 220 }
224 221
225 } // namespace blink 222 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698