Skip to content

Commit

Permalink
MSVC reports "SVGPropertyAnimator.h(94): error C2839: invalid return …
Browse files Browse the repository at this point in the history
…type 'T *' for overloaded 'operator ->'" with /std:c++20

https://bugs.webkit.org/show_bug.cgi?id=234546

Reviewed by Alex Christensen.

* svg/properties/SVGPropertyAnimator.h:
(WebCore::SVGPropertyAnimator::computeInheritedCSSPropertyValue const):
computeCSSPropertyValue protects the first arguemnt SVGElement.
computeInheritedCSSPropertyValue doesn't need to protect "parent".
Use Element* instead of RefPtr for "parent".



Canonical link: https://commits.webkit.org/245452@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@287300 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
fujii committed Dec 21, 2021
1 parent 68b96f3 commit cb2d3ba
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
13 changes: 13 additions & 0 deletions Source/WebCore/ChangeLog
@@ -1,3 +1,16 @@
2021-12-21 Fujii Hironori <Hironori.Fujii@sony.com>

MSVC reports "SVGPropertyAnimator.h(94): error C2839: invalid return type 'T *' for overloaded 'operator ->'" with /std:c++20
https://bugs.webkit.org/show_bug.cgi?id=234546

Reviewed by Alex Christensen.

* svg/properties/SVGPropertyAnimator.h:
(WebCore::SVGPropertyAnimator::computeInheritedCSSPropertyValue const):
computeCSSPropertyValue protects the first arguemnt SVGElement.
computeInheritedCSSPropertyValue doesn't need to protect "parent".
Use Element* instead of RefPtr for "parent".

2021-12-20 Fujii Hironori <Hironori.Fujii@sony.com>

[Win] MSVC reports "DownloadBundleWin.cpp(87): error C2362: initialization of 'magic' is skipped by 'goto exit'" with /std:c++20
Expand Down
2 changes: 1 addition & 1 deletion Source/WebCore/svg/properties/SVGPropertyAnimator.h
Expand Up @@ -89,7 +89,7 @@ class SVGPropertyAnimator : public SVGAttributeAnimator {

String computeInheritedCSSPropertyValue(SVGElement& targetElement) const
{
RefPtr parent = targetElement.parentElement();
auto* parent = targetElement.parentElement();
if (!parent || !parent->isSVGElement())
return emptyString();

Expand Down

0 comments on commit cb2d3ba

Please sign in to comment.