Commit 0b64dd59 authored by Abhijeet Kandalkar's avatar Abhijeet Kandalkar Committed by Commit Bot

Use new downcast helper for blink::SVGFESpecularLightingElement

This CL has two goals,
  1. Use DynamicTo<SVGFESpecularLightingElement> as new downcast helper
  2. Use IsA<SVGFESpecularLightingElement>(element) in place of
     IsSVGFESpecularLightingElement(element)

Bug: 891908
Change-Id: I757fcb7e93004f35d71a3b570fed670fa3245db2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1936583
Commit-Queue: Abhijeet | Igalia <abhijeet@igalia.com>
Reviewed-by: default avatarKentaro Hara <haraken@chromium.org>
Cr-Commit-Position: refs/heads/master@{#720270}
parent f5b6bc1c
...@@ -68,7 +68,7 @@ void LayoutSVGResourceFilterPrimitive::StyleDidChange( ...@@ -68,7 +68,7 @@ void LayoutSVGResourceFilterPrimitive::StyleDidChange(
if (new_style.FloodOpacity() != old_style->SvgStyle().FloodOpacity()) if (new_style.FloodOpacity() != old_style->SvgStyle().FloodOpacity())
element.PrimitiveAttributeChanged(svg_names::kFloodOpacityAttr); element.PrimitiveAttributeChanged(svg_names::kFloodOpacityAttr);
} else if (IsSVGFEDiffuseLightingElement(element) || } else if (IsSVGFEDiffuseLightingElement(element) ||
IsSVGFESpecularLightingElement(element)) { IsA<SVGFESpecularLightingElement>(element)) {
CheckForColorChange(element, svg_names::kLightingColorAttr, diff, CheckForColorChange(element, svg_names::kLightingColorAttr, diff,
old_style->SvgStyle().LightingColor(), old_style->SvgStyle().LightingColor(),
new_style.LightingColor()); new_style.LightingColor());
......
...@@ -133,7 +133,7 @@ void SVGFELightElement::SvgAttributeChanged(const QualifiedName& attr_name) { ...@@ -133,7 +133,7 @@ void SVGFELightElement::SvgAttributeChanged(const QualifiedName& attr_name) {
SVGElement::InvalidationGuard invalidation_guard(this); SVGElement::InvalidationGuard invalidation_guard(this);
if (auto* diffuse = ToSVGFEDiffuseLightingElementOrNull(*parent)) if (auto* diffuse = ToSVGFEDiffuseLightingElementOrNull(*parent))
diffuse->LightElementAttributeChanged(this, attr_name); diffuse->LightElementAttributeChanged(this, attr_name);
else if (auto* specular = ToSVGFESpecularLightingElementOrNull(*parent)) else if (auto* specular = DynamicTo<SVGFESpecularLightingElement>(*parent))
specular->LightElementAttributeChanged(this, attr_name); specular->LightElementAttributeChanged(this, attr_name);
return; return;
......
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