Bug 1565384 part 0: Remove some single-use helper-variables that don't add value. r=emilio
authorDaniel Holbert <dholbert@cs.stanford.edu>
Wed, 17 Jul 2019 00:49:53 +0000
changeset 483036 b290783122001a9299a6578c11d5ea501a8fd0f4
parent 483035 cb0d5b7f293379662d8144ad14b67cca59f15f4a
child 483037 0c49c78a3216187dc2836768311f5c5039caae32
push id36303
push userdvarga@mozilla.com
push dateWed, 17 Jul 2019 09:36:40 +0000
treeherdermozilla-central@29e9dde37bd2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersemilio
bugs1565384
milestone70.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1565384 part 0: Remove some single-use helper-variables that don't add value. r=emilio This patch doesn't affect behavior; it's just minor code cleanup. Differential Revision: https://phabricator.services.mozilla.com/D38117
layout/svg/nsSVGOuterSVGFrame.cpp
--- a/layout/svg/nsSVGOuterSVGFrame.cpp
+++ b/layout/svg/nsSVGOuterSVGFrame.cpp
@@ -75,23 +75,21 @@ nsSVGOuterSVGFrame::nsSVGOuterSVGFrame(C
       mIsRootContent(false) {
   // Outer-<svg> has CSS layout, so remove this bit:
   RemoveStateBits(NS_FRAME_SVG_LAYOUT);
 }
 
 // helper
 static inline bool DependsOnIntrinsicSize(const nsIFrame* aEmbeddingFrame) {
   const nsStylePosition* pos = aEmbeddingFrame->StylePosition();
-  const auto& width = pos->mWidth;
-  const auto& height = pos->mHeight;
 
   // XXX it would be nice to know if the size of aEmbeddingFrame's containing
   // block depends on aEmbeddingFrame, then we'd know if we can return false
   // for eStyleUnit_Percent too.
-  return !width.ConvertsToLength() || !height.ConvertsToLength();
+  return !pos->mWidth.ConvertsToLength() || !pos->mHeight.ConvertsToLength();
 }
 
 // The CSS Containment spec says that size-contained replaced elements must be
 // treated as having an intrinsic width and height of 0.  That's applicable to
 // outer SVG frames, unless they're the outermost element (in which case
 // they're not really "replaced", and there's no outer context to contain sizes
 // from leaking into). Hence, we check for a parent element before we bother
 // testing for 'contain:size'.