Remove variable shadowing in blink/svg
In an effort to reduce or even ban symbol shadowing, this renames
a variable to avoid such shadowing. I'm interested in prohibiting
shadowing because I think it might prevent potential jumbo problems.
The exact error this avoids is:
third_party/blink/renderer/core/svg/svg_svg_element.cc:456:28: error: declaration shadows a local variable [-Werror,-Wshadow]
TransformationMatrix transform;
^
third_party/blink/renderer/core/svg/svg_svg_element.cc:449:19: note: previous declaration is here
AffineTransform transform;
^
Bug: 923510
Change-Id: I99c001d0eb513d73bfc33d540601479a6fd7280d
Reviewed-on: https://chromium-review.googlesource.com/c/1482975
Auto-Submit: Daniel Bratell <bratell@opera.com>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Reviewed-by: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#634676}
diff --git a/third_party/blink/renderer/core/svg/svg_svg_element.cc b/third_party/blink/renderer/core/svg/svg_svg_element.cc
index ee1c8b0..1c84ccb 100644
--- a/third_party/blink/renderer/core/svg/svg_svg_element.cc
+++ b/third_party/blink/renderer/core/svg/svg_svg_element.cc
@@ -453,24 +453,24 @@
y_->CurrentValue()->Value(length_context));
} else if (mode == kScreenScope) {
if (LayoutObject* layout_object = this->GetLayoutObject()) {
- TransformationMatrix transform;
+ TransformationMatrix matrix;
// Adjust for the zoom level factored into CSS coordinates (WK bug
// #96361).
- transform.Scale(1.0 / layout_object->StyleRef().EffectiveZoom());
+ matrix.Scale(1.0 / layout_object->StyleRef().EffectiveZoom());
// Apply transforms from our ancestor coordinate space, including any
// non-SVG ancestor transforms.
- transform.Multiply(layout_object->LocalToAbsoluteTransform());
+ matrix.Multiply(layout_object->LocalToAbsoluteTransform());
// At the SVG/HTML boundary (aka LayoutSVGRoot), we need to apply the
// localToBorderBoxTransform to map an element from SVG viewport
// coordinates to CSS box coordinates.
- transform.Multiply(
+ matrix.Multiply(
ToLayoutSVGRoot(layout_object)->LocalToBorderBoxTransform());
// Drop any potential non-affine parts, because we're not able to convey
// that information further anyway until getScreenCTM returns a DOMMatrix
// (4x4 matrix.)
- return transform.ToAffineTransform();
+ return matrix.ToAffineTransform();
}
}
if (!HasEmptyViewBox()) {