Commit 7a37985a authored by Abhijeet Kandalkar's avatar Abhijeet Kandalkar Committed by Commit Bot

Use new downcast helper for blink::SVGRectElement

This CL has goal to use IsA<SVGRectElement>(element) in place of
IsSVGRectElement(element)

Bug: 891908
Change-Id: I859dd6a2b6255c5ca8644b97c019a6eaf85fb3d9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1936618Reviewed-by: default avatarJeremy Roman <jbroman@chromium.org>
Commit-Queue: Abhijeet | Igalia <abhijeet@igalia.com>
Cr-Commit-Position: refs/heads/master@{#720310}
parent 4376807c
......@@ -1420,7 +1420,7 @@ static bool IsSVGObjectWithWidthAndHeight(const LayoutObject& layout_object) {
DCHECK(layout_object.IsSVGChild());
return layout_object.IsSVGImage() || layout_object.IsSVGForeignObject() ||
(layout_object.IsSVGShape() &&
IsSVGRectElement(layout_object.GetNode()));
IsA<SVGRectElement>(layout_object.GetNode()));
}
FloatSize ComputedStyleUtils::UsedBoxSize(const LayoutObject& layout_object) {
......
......@@ -338,7 +338,7 @@ static WTF::TextStream& operator<<(WTF::TextStream& ts,
const ComputedStyle& style = shape.StyleRef();
const SVGComputedStyle& svg_style = style.SvgStyle();
if (IsSVGRectElement(*svg_element)) {
if (IsA<SVGRectElement>(*svg_element)) {
WriteNameValuePair(ts, "x",
length_context.ValueForLength(svg_style.X(), style,
SVGLengthMode::kWidth));
......
......@@ -47,7 +47,7 @@ bool TargetCanHaveMotionTransform(const SVGElement& target) {
return IsA<SVGGElement>(target) || IsSVGDefsElement(target) ||
IsA<SVGUseElement>(target) || IsSVGImageElement(target) ||
IsSVGSwitchElement(target) || IsSVGPathElement(target) ||
IsSVGRectElement(target) || IsSVGCircleElement(target) ||
IsA<SVGRectElement>(target) || IsSVGCircleElement(target) ||
IsSVGEllipseElement(target) || IsA<SVGLineElement>(target) ||
IsA<SVGPolylineElement>(target) || IsA<SVGPolygonElement>(target) ||
IsSVGTextElement(target) || IsSVGClipPathElement(target) ||
......
......@@ -497,7 +497,7 @@ LayoutObject* SVGUseElement::CreateLayoutObject(const ComputedStyle& style,
}
static bool IsDirectReference(const SVGElement& element) {
return IsSVGPathElement(element) || IsSVGRectElement(element) ||
return IsSVGPathElement(element) || IsA<SVGRectElement>(element) ||
IsSVGCircleElement(element) || IsSVGEllipseElement(element) ||
IsA<SVGPolygonElement>(element) || IsA<SVGPolylineElement>(element) ||
IsSVGTextElement(element);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment