Commit cda851ed authored by Abhijeet Kandalkar's avatar Abhijeet Kandalkar Committed by Commit Bot

Use new downcast helper for blink::SVGTSpanElement

This CL has goal to use IsA<SVGTSpanElement>(element) in place of
IsSVGTSpanElement(element)

Bug: 891908
Change-Id: Idae91831dfddadf9fe83ff26ce4689a336dac05d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1936624
Commit-Queue: Abhijeet | Igalia <abhijeet@igalia.com>
Reviewed-by: default avatarJeremy Roman <jbroman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#720344}
parent 64252e63
...@@ -696,7 +696,7 @@ void StyleAdjuster::AdjustComputedStyle(StyleResolverState& state, ...@@ -696,7 +696,7 @@ void StyleAdjuster::AdjustComputedStyle(StyleResolverState& state,
if (style.Display() == EDisplay::kContents && if (style.Display() == EDisplay::kContents &&
(is_svg_root || (is_svg_root ||
(!IsA<SVGSVGElement>(element) && !IsSVGGElement(element) && (!IsA<SVGSVGElement>(element) && !IsSVGGElement(element) &&
!IsA<SVGUseElement>(element) && !IsSVGTSpanElement(element)))) { !IsA<SVGUseElement>(element) && !IsA<SVGTSpanElement>(element)))) {
// According to the CSS Display spec[1], nested <svg> elements, <g>, // According to the CSS Display spec[1], nested <svg> elements, <g>,
// <use>, and <tspan> elements are not rendered and their children are // <use>, and <tspan> elements are not rendered and their children are
// "hoisted". For other elements display:contents behaves as display:none. // "hoisted". For other elements display:contents behaves as display:none.
......
...@@ -37,7 +37,7 @@ bool SVGTSpanElement::LayoutObjectIsNeeded(const ComputedStyle& style) const { ...@@ -37,7 +37,7 @@ bool SVGTSpanElement::LayoutObjectIsNeeded(const ComputedStyle& style) const {
if (parentNode() && if (parentNode() &&
(IsSVGAElement(*parentNode()) || IsA<SVGTextElement>(*parentNode()) || (IsSVGAElement(*parentNode()) || IsA<SVGTextElement>(*parentNode()) ||
IsA<SVGTextPathElement>(*parentNode()) || IsA<SVGTextPathElement>(*parentNode()) ||
IsSVGTSpanElement(*parentNode()))) IsA<SVGTSpanElement>(*parentNode())))
return SVGElement::LayoutObjectIsNeeded(style); return SVGElement::LayoutObjectIsNeeded(style);
return false; return false;
......
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