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

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

Issue 2061793003: Remove redundant isLayoutSizeChanged check in LayoutSVGText::layout (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006 Apple Computer, Inc. 2 * Copyright (C) 2006 Apple Computer, Inc.
3 * Copyright (C) 2006 Alexander Kellett <lypanov@kde.org> 3 * Copyright (C) 2006 Alexander Kellett <lypanov@kde.org>
4 * Copyright (C) 2006 Oliver Hunt <ojh16@student.canterbury.ac.nz> 4 * Copyright (C) 2006 Oliver Hunt <ojh16@student.canterbury.ac.nz>
5 * Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org> 5 * Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org>
6 * Copyright (C) 2008 Rob Buis <buis@kde.org> 6 * Copyright (C) 2008 Rob Buis <buis@kde.org>
7 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org> 7 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org>
8 * Copyright (C) Research In Motion Limited 2010-2012. All rights reserved. 8 * Copyright (C) Research In Motion Limited 2010-2012. All rights reserved.
9 * Copyright (C) 2012 Google Inc. 9 * Copyright (C) 2012 Google Inc.
10 * 10 *
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 // subtree. 196 // subtree.
197 if (!everHadLayout()) { 197 if (!everHadLayout()) {
198 m_needsPositioningValuesUpdate = true; 198 m_needsPositioningValuesUpdate = true;
199 m_needsTextMetricsUpdate = true; 199 m_needsTextMetricsUpdate = true;
200 } 200 }
201 201
202 // If the root layout size changed (eg. window size changes), or the screen 202 // If the root layout size changed (eg. window size changes), or the screen
203 // scale factor has changed, then recompute the on-screen font size. Since 203 // scale factor has changed, then recompute the on-screen font size. Since
204 // the computation of layout attributes uses the text metrics, we need to 204 // the computation of layout attributes uses the text metrics, we need to
205 // update them before updating the layout attributes. 205 // update them before updating the layout attributes.
206 if (m_needsTextMetricsUpdate || SVGLayoutSupport::findTreeRootObject(this)-> isLayoutSizeChanged()) { 206 if (m_needsTextMetricsUpdate) {
207 updateFontAndMetrics(*this); 207 updateFontAndMetrics(*this);
208 m_needsTextMetricsUpdate = false; 208 m_needsTextMetricsUpdate = false;
209 updateParentBoundaries = true; 209 updateParentBoundaries = true;
210 } 210 }
211 211
212 // When the x/y/dx/dy/rotate lists change, we need to recompute the layout 212 // When the x/y/dx/dy/rotate lists change, we need to recompute the layout
213 // attributes. 213 // attributes.
214 if (m_needsPositioningValuesUpdate) { 214 if (m_needsPositioningValuesUpdate) {
215 m_descendantTextNodes.clear(); 215 m_descendantTextNodes.clear();
216 collectDescendantTextNodes(*this, m_descendantTextNodes); 216 collectDescendantTextNodes(*this, m_descendantTextNodes);
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
395 } 395 }
396 396
397 void LayoutSVGText::invalidateTreeIfNeeded(const PaintInvalidationState& paintIn validationState) 397 void LayoutSVGText::invalidateTreeIfNeeded(const PaintInvalidationState& paintIn validationState)
398 { 398 {
399 // TODO(wangxianzhu): Verify if the inherited LayoutBoxModelObject::invalida teTreeIfNeeded() 399 // TODO(wangxianzhu): Verify if the inherited LayoutBoxModelObject::invalida teTreeIfNeeded()
400 // is applicable here. If yes, remove this overriding method. 400 // is applicable here. If yes, remove this overriding method.
401 LayoutObject::invalidateTreeIfNeeded(paintInvalidationState); 401 LayoutObject::invalidateTreeIfNeeded(paintInvalidationState);
402 } 402 }
403 403
404 } // namespace blink 404 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698