2015-05-03 22:32:37 +03:00
|
|
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
2012-05-21 15:12:37 +04:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
2009-02-03 17:42:24 +03:00
|
|
|
|
2019-04-04 20:40:56 +03:00
|
|
|
#include "SVGAnimatedViewBox.h"
|
2015-05-29 23:10:41 +03:00
|
|
|
|
2020-01-17 13:00:28 +03:00
|
|
|
#include "mozAutoDocUpdate.h"
|
|
|
|
#include "mozilla/Maybe.h"
|
2020-01-20 19:18:20 +03:00
|
|
|
#include <utility>
|
Bug 1609996 - Reorder some includes affected by the previous patches. r=froydnj
This was done by:
This was done by applying:
```
diff --git a/python/mozbuild/mozbuild/code-analysis/mach_commands.py b/python/mozbuild/mozbuild/code-analysis/mach_commands.py
index 789affde7bbf..fe33c4c7d4d1 100644
--- a/python/mozbuild/mozbuild/code-analysis/mach_commands.py
+++ b/python/mozbuild/mozbuild/code-analysis/mach_commands.py
@@ -2007,7 +2007,7 @@ class StaticAnalysis(MachCommandBase):
from subprocess import Popen, PIPE, check_output, CalledProcessError
diff_process = Popen(self._get_clang_format_diff_command(commit), stdout=PIPE)
- args = [sys.executable, clang_format_diff, "-p1", "-binary=%s" % clang_format]
+ args = [sys.executable, clang_format_diff, "-p1", "-binary=%s" % clang_format, '-sort-includes']
if not output_file:
args.append("-i")
```
Then running `./mach clang-format -c <commit-hash>`
Then undoing that patch.
Then running check_spidermonkey_style.py --fixup
Then running `./mach clang-format`
I had to fix four things:
* I needed to move <utility> back down in GuardObjects.h because I was hitting
obscure problems with our system include wrappers like this:
0:03.94 /usr/include/stdlib.h:550:14: error: exception specification in declaration does not match previous declaration
0:03.94 extern void *realloc (void *__ptr, size_t __size)
0:03.94 ^
0:03.94 /home/emilio/src/moz/gecko-2/obj-debug/dist/include/malloc_decls.h:53:1: note: previous declaration is here
0:03.94 MALLOC_DECL(realloc, void*, void*, size_t)
0:03.94 ^
0:03.94 /home/emilio/src/moz/gecko-2/obj-debug/dist/include/mozilla/mozalloc.h:22:32: note: expanded from macro 'MALLOC_DECL'
0:03.94 MOZ_MEMORY_API return_type name##_impl(__VA_ARGS__);
0:03.94 ^
0:03.94 <scratch space>:178:1: note: expanded from here
0:03.94 realloc_impl
0:03.94 ^
0:03.94 /home/emilio/src/moz/gecko-2/obj-debug/dist/include/mozmemory_wrap.h:142:41: note: expanded from macro 'realloc_impl'
0:03.94 #define realloc_impl mozmem_malloc_impl(realloc)
Which I really didn't feel like digging into.
* I had to restore the order of TrustOverrideUtils.h and related files in nss
because the .inc files depend on TrustOverrideUtils.h being included earlier.
* I had to add a missing include to RollingNumber.h
* Also had to partially restore include order in JsepSessionImpl.cpp to avoid
some -WError issues due to some static inline functions being defined in a
header but not used in the rest of the compilation unit.
Differential Revision: https://phabricator.services.mozilla.com/D60327
--HG--
extra : moz-landing-system : lando
2020-01-20 19:19:48 +03:00
|
|
|
|
|
|
|
#include "SVGViewBoxSMILType.h"
|
2019-01-23 16:48:08 +03:00
|
|
|
#include "mozilla/SMILValue.h"
|
|
|
|
#include "mozilla/SVGContentUtils.h"
|
2019-06-20 17:03:54 +03:00
|
|
|
#include "mozilla/dom/SVGRect.h"
|
2010-05-04 18:43:48 +04:00
|
|
|
#include "nsCharSeparatedTokenizer.h"
|
2019-01-23 16:48:08 +03:00
|
|
|
#include "nsTextFormatter.h"
|
2010-02-19 00:51:00 +03:00
|
|
|
|
2019-03-19 03:01:03 +03:00
|
|
|
using namespace mozilla::dom;
|
|
|
|
|
2019-01-06 20:52:55 +03:00
|
|
|
namespace mozilla {
|
|
|
|
|
2010-05-04 18:43:48 +04:00
|
|
|
#define NUM_VIEWBOX_COMPONENTS 4
|
2009-02-03 17:42:24 +03:00
|
|
|
|
2019-04-10 07:08:14 +03:00
|
|
|
/* Implementation of SVGViewBox methods */
|
2010-02-21 00:13:11 +03:00
|
|
|
|
2019-04-10 07:08:14 +03:00
|
|
|
bool SVGViewBox::operator==(const SVGViewBox& aOther) const {
|
2010-02-21 00:13:11 +03:00
|
|
|
if (&aOther == this) return true;
|
|
|
|
|
2013-02-26 20:58:06 +04:00
|
|
|
return (none && aOther.none) ||
|
|
|
|
(!none && !aOther.none && x == aOther.x && y == aOther.y &&
|
|
|
|
width == aOther.width && height == aOther.height);
|
2010-02-21 00:13:11 +03:00
|
|
|
}
|
|
|
|
|
2019-02-26 01:05:29 +03:00
|
|
|
/* static */
|
2019-04-10 07:08:14 +03:00
|
|
|
nsresult SVGViewBox::FromString(const nsAString& aStr, SVGViewBox* aViewBox) {
|
2017-04-10 19:02:34 +03:00
|
|
|
if (aStr.EqualsLiteral("none")) {
|
|
|
|
aViewBox->none = true;
|
|
|
|
return NS_OK;
|
|
|
|
}
|
|
|
|
|
2020-12-16 22:10:21 +03:00
|
|
|
nsCharSeparatedTokenizerTemplate<nsContentUtils::IsHTMLWhitespace,
|
|
|
|
nsTokenizerFlags::SeparatorOptional>
|
|
|
|
tokenizer(aStr, ',');
|
2017-04-10 19:02:34 +03:00
|
|
|
float vals[NUM_VIEWBOX_COMPONENTS];
|
|
|
|
uint32_t i;
|
|
|
|
for (i = 0; i < NUM_VIEWBOX_COMPONENTS && tokenizer.hasMoreTokens(); ++i) {
|
|
|
|
if (!SVGContentUtils::ParseNumber(tokenizer.nextToken(), vals[i])) {
|
|
|
|
return NS_ERROR_DOM_SYNTAX_ERR;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (i != NUM_VIEWBOX_COMPONENTS || // Too few values.
|
|
|
|
tokenizer.hasMoreTokens() || // Too many values.
|
|
|
|
tokenizer.separatorAfterCurrentToken()) { // Trailing comma.
|
|
|
|
return NS_ERROR_DOM_SYNTAX_ERR;
|
|
|
|
}
|
|
|
|
|
|
|
|
aViewBox->x = vals[0];
|
|
|
|
aViewBox->y = vals[1];
|
|
|
|
aViewBox->width = vals[2];
|
|
|
|
aViewBox->height = vals[3];
|
|
|
|
aViewBox->none = false;
|
|
|
|
|
|
|
|
return NS_OK;
|
|
|
|
}
|
|
|
|
|
2019-06-20 17:03:54 +03:00
|
|
|
static SVGAttrTearoffTable<SVGAnimatedViewBox, SVGRect>
|
2012-12-21 13:18:58 +04:00
|
|
|
sBaseSVGViewBoxTearoffTable;
|
2019-06-20 17:03:54 +03:00
|
|
|
static SVGAttrTearoffTable<SVGAnimatedViewBox, SVGRect>
|
2012-12-21 13:18:58 +04:00
|
|
|
sAnimSVGViewBoxTearoffTable;
|
2019-04-04 20:40:56 +03:00
|
|
|
SVGAttrTearoffTable<SVGAnimatedViewBox, SVGAnimatedRect>
|
|
|
|
SVGAnimatedViewBox::sSVGAnimatedRectTearoffTable;
|
2012-12-21 13:18:58 +04:00
|
|
|
|
2020-08-03 12:32:36 +03:00
|
|
|
//----------------------------------------------------------------------
|
|
|
|
// Helper class: AutoChangeViewBoxNotifier
|
|
|
|
// Stack-based helper class to pair calls to WillChangeViewBox and
|
|
|
|
// DidChangeViewBox.
|
|
|
|
class MOZ_RAII AutoChangeViewBoxNotifier {
|
|
|
|
public:
|
|
|
|
AutoChangeViewBoxNotifier(SVGAnimatedViewBox* aViewBox,
|
|
|
|
SVGElement* aSVGElement, bool aDoSetAttr = true)
|
|
|
|
: mViewBox(aViewBox), mSVGElement(aSVGElement), mDoSetAttr(aDoSetAttr) {
|
|
|
|
MOZ_ASSERT(mViewBox, "Expecting non-null viewBox");
|
|
|
|
MOZ_ASSERT(mSVGElement, "Expecting non-null element");
|
|
|
|
|
|
|
|
if (mDoSetAttr) {
|
|
|
|
mUpdateBatch.emplace(aSVGElement->GetComposedDoc(), true);
|
|
|
|
mEmptyOrOldValue = mSVGElement->WillChangeViewBox(mUpdateBatch.ref());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
~AutoChangeViewBoxNotifier() {
|
|
|
|
if (mDoSetAttr) {
|
|
|
|
mSVGElement->DidChangeViewBox(mEmptyOrOldValue, mUpdateBatch.ref());
|
|
|
|
}
|
|
|
|
if (mViewBox->mAnimVal) {
|
|
|
|
mSVGElement->AnimationNeedsResample();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
private:
|
|
|
|
SVGAnimatedViewBox* const mViewBox;
|
|
|
|
SVGElement* const mSVGElement;
|
|
|
|
Maybe<mozAutoDocUpdate> mUpdateBatch;
|
|
|
|
nsAttrValue mEmptyOrOldValue;
|
|
|
|
bool mDoSetAttr;
|
|
|
|
};
|
|
|
|
|
2019-04-04 20:40:56 +03:00
|
|
|
/* Implementation of SVGAnimatedViewBox methods */
|
2009-02-03 17:42:24 +03:00
|
|
|
|
2019-04-04 20:40:56 +03:00
|
|
|
void SVGAnimatedViewBox::Init() {
|
2011-10-17 18:59:28 +04:00
|
|
|
mHasBaseVal = false;
|
2016-06-01 19:21:03 +03:00
|
|
|
// We shouldn't use mBaseVal for rendering (its usages should be guarded with
|
|
|
|
// "mHasBaseVal" checks), but just in case we do by accident, this will
|
|
|
|
// ensure that we treat it as "none" and ignore its numeric values:
|
|
|
|
mBaseVal.none = true;
|
|
|
|
|
2013-02-26 20:58:06 +04:00
|
|
|
mAnimVal = nullptr;
|
2009-02-03 17:42:24 +03:00
|
|
|
}
|
|
|
|
|
2019-04-04 20:40:56 +03:00
|
|
|
bool SVGAnimatedViewBox::HasRect() const {
|
2016-05-03 17:40:26 +03:00
|
|
|
// Check mAnimVal if we have one; otherwise, check mBaseVal if we have one;
|
|
|
|
// otherwise, just return false (we clearly do not have a rect).
|
2020-02-25 23:03:26 +03:00
|
|
|
const SVGViewBox* rect = mAnimVal.get();
|
2016-05-03 17:40:26 +03:00
|
|
|
if (!rect) {
|
|
|
|
if (!mHasBaseVal) {
|
|
|
|
// no anim val, no base val --> no viewbox rect
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
rect = &mBaseVal;
|
|
|
|
}
|
|
|
|
|
|
|
|
return !rect->none && rect->width >= 0 && rect->height >= 0;
|
|
|
|
}
|
|
|
|
|
2019-04-10 07:08:14 +03:00
|
|
|
void SVGAnimatedViewBox::SetAnimValue(const SVGViewBox& aRect,
|
2019-04-04 20:40:56 +03:00
|
|
|
SVGElement* aSVGElement) {
|
2010-02-19 00:51:00 +03:00
|
|
|
if (!mAnimVal) {
|
|
|
|
// it's okay if allocation fails - and no point in reporting that
|
2020-02-25 23:03:26 +03:00
|
|
|
mAnimVal = MakeUnique<SVGViewBox>(aRect);
|
2010-02-19 00:51:00 +03:00
|
|
|
} else {
|
2013-02-26 20:58:06 +04:00
|
|
|
if (aRect == *mAnimVal) {
|
2012-06-02 03:53:06 +04:00
|
|
|
return;
|
|
|
|
}
|
2013-02-26 20:58:06 +04:00
|
|
|
*mAnimVal = aRect;
|
2010-02-19 00:51:00 +03:00
|
|
|
}
|
|
|
|
aSVGElement->DidAnimateViewBox();
|
2009-02-03 17:42:24 +03:00
|
|
|
}
|
|
|
|
|
2019-04-10 07:08:14 +03:00
|
|
|
void SVGAnimatedViewBox::SetBaseValue(const SVGViewBox& aRect,
|
2019-04-04 20:40:56 +03:00
|
|
|
SVGElement* aSVGElement) {
|
2013-02-26 20:58:06 +04:00
|
|
|
if (!mHasBaseVal || mBaseVal == aRect) {
|
|
|
|
// This method is used to set a single x, y, width
|
|
|
|
// or height value. It can't create a base value
|
|
|
|
// as the other components may be undefined. We record
|
|
|
|
// the new value though, so as not to lose data.
|
|
|
|
mBaseVal = aRect;
|
2012-02-16 03:40:46 +04:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2020-08-03 12:32:36 +03:00
|
|
|
AutoChangeViewBoxNotifier notifier(this, aSVGElement);
|
2012-02-16 03:40:46 +04:00
|
|
|
|
2012-05-17 14:02:41 +04:00
|
|
|
mBaseVal = aRect;
|
2011-10-17 18:59:28 +04:00
|
|
|
mHasBaseVal = true;
|
2009-02-03 17:42:24 +03:00
|
|
|
}
|
|
|
|
|
2019-04-04 20:40:56 +03:00
|
|
|
nsresult SVGAnimatedViewBox::SetBaseValueString(const nsAString& aValue,
|
|
|
|
SVGElement* aSVGElement,
|
|
|
|
bool aDoSetAttr) {
|
2019-04-10 07:08:14 +03:00
|
|
|
SVGViewBox viewBox;
|
2011-10-09 19:25:07 +04:00
|
|
|
|
2019-04-10 07:08:14 +03:00
|
|
|
nsresult rv = SVGViewBox::FromString(aValue, &viewBox);
|
2013-02-26 20:58:06 +04:00
|
|
|
if (NS_FAILED(rv)) {
|
|
|
|
return rv;
|
|
|
|
}
|
2013-07-24 08:48:12 +04:00
|
|
|
// Comparison against mBaseVal is only valid if we currently have a base val.
|
|
|
|
if (mHasBaseVal && viewBox == mBaseVal) {
|
2013-02-26 20:58:06 +04:00
|
|
|
return NS_OK;
|
2010-02-19 00:51:00 +03:00
|
|
|
}
|
2013-02-26 20:58:06 +04:00
|
|
|
|
2020-08-03 12:32:36 +03:00
|
|
|
AutoChangeViewBoxNotifier notifier(this, aSVGElement, aDoSetAttr);
|
2013-02-26 20:58:06 +04:00
|
|
|
mHasBaseVal = true;
|
|
|
|
mBaseVal = viewBox;
|
|
|
|
|
|
|
|
return NS_OK;
|
2010-02-19 00:51:00 +03:00
|
|
|
}
|
|
|
|
|
2019-04-04 20:40:56 +03:00
|
|
|
void SVGAnimatedViewBox::GetBaseValueString(nsAString& aValue) const {
|
2013-02-26 20:58:06 +04:00
|
|
|
if (mBaseVal.none) {
|
|
|
|
aValue.AssignLiteral("none");
|
|
|
|
return;
|
|
|
|
}
|
2017-09-06 17:19:05 +03:00
|
|
|
nsTextFormatter::ssprintf(aValue, u"%g %g %g %g", (double)mBaseVal.x,
|
2009-02-03 17:42:24 +03:00
|
|
|
(double)mBaseVal.y, (double)mBaseVal.width,
|
|
|
|
(double)mBaseVal.height);
|
|
|
|
}
|
|
|
|
|
2019-04-04 20:40:56 +03:00
|
|
|
already_AddRefed<SVGAnimatedRect> SVGAnimatedViewBox::ToSVGAnimatedRect(
|
2018-12-21 11:58:14 +03:00
|
|
|
SVGElement* aSVGElement) {
|
2019-03-19 03:01:03 +03:00
|
|
|
RefPtr<SVGAnimatedRect> domAnimatedRect =
|
2012-12-21 13:18:58 +04:00
|
|
|
sSVGAnimatedRectTearoffTable.GetTearoff(this);
|
|
|
|
if (!domAnimatedRect) {
|
2019-03-19 03:01:03 +03:00
|
|
|
domAnimatedRect = new SVGAnimatedRect(this, aSVGElement);
|
2012-12-21 13:18:58 +04:00
|
|
|
sSVGAnimatedRectTearoffTable.AddTearoff(this, domAnimatedRect);
|
|
|
|
}
|
2009-02-03 17:42:24 +03:00
|
|
|
|
2013-05-20 15:46:12 +04:00
|
|
|
return domAnimatedRect.forget();
|
2009-02-03 17:42:24 +03:00
|
|
|
}
|
|
|
|
|
2019-06-20 17:03:54 +03:00
|
|
|
already_AddRefed<SVGRect> SVGAnimatedViewBox::ToDOMBaseVal(
|
2019-04-04 20:40:56 +03:00
|
|
|
SVGElement* aSVGElement) {
|
2013-02-26 20:58:06 +04:00
|
|
|
if (!mHasBaseVal || mBaseVal.none) {
|
2013-05-20 15:46:12 +04:00
|
|
|
return nullptr;
|
2013-02-26 20:58:06 +04:00
|
|
|
}
|
2013-05-20 15:46:12 +04:00
|
|
|
|
2019-06-20 17:03:54 +03:00
|
|
|
RefPtr<SVGRect> domBaseVal = sBaseSVGViewBoxTearoffTable.GetTearoff(this);
|
2012-12-21 13:18:58 +04:00
|
|
|
if (!domBaseVal) {
|
2020-08-13 02:54:29 +03:00
|
|
|
domBaseVal = new SVGRect(this, aSVGElement, SVGRect::RectType::BaseValue);
|
2012-12-21 13:18:58 +04:00
|
|
|
sBaseSVGViewBoxTearoffTable.AddTearoff(this, domBaseVal);
|
|
|
|
}
|
2009-02-03 17:42:24 +03:00
|
|
|
|
2013-05-20 15:46:12 +04:00
|
|
|
return domBaseVal.forget();
|
2009-02-03 17:42:24 +03:00
|
|
|
}
|
|
|
|
|
2019-06-20 17:03:54 +03:00
|
|
|
SVGRect::~SVGRect() {
|
2020-08-13 02:54:29 +03:00
|
|
|
switch (mType) {
|
|
|
|
case RectType::BaseValue:
|
|
|
|
sBaseSVGViewBoxTearoffTable.RemoveTearoff(mVal);
|
|
|
|
break;
|
|
|
|
case RectType::AnimValue:
|
|
|
|
sAnimSVGViewBoxTearoffTable.RemoveTearoff(mVal);
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
break;
|
2019-06-20 17:03:54 +03:00
|
|
|
}
|
2012-12-21 13:18:58 +04:00
|
|
|
}
|
2009-02-03 17:42:24 +03:00
|
|
|
|
2019-06-20 17:03:54 +03:00
|
|
|
already_AddRefed<SVGRect> SVGAnimatedViewBox::ToDOMAnimVal(
|
2019-04-04 20:40:56 +03:00
|
|
|
SVGElement* aSVGElement) {
|
2013-02-26 20:58:06 +04:00
|
|
|
if ((mAnimVal && mAnimVal->none) ||
|
|
|
|
(!mAnimVal && (!mHasBaseVal || mBaseVal.none))) {
|
2013-05-20 15:46:12 +04:00
|
|
|
return nullptr;
|
2013-02-26 20:58:06 +04:00
|
|
|
}
|
2013-05-20 15:46:12 +04:00
|
|
|
|
2019-06-20 17:03:54 +03:00
|
|
|
RefPtr<SVGRect> domAnimVal = sAnimSVGViewBoxTearoffTable.GetTearoff(this);
|
2012-12-21 13:18:58 +04:00
|
|
|
if (!domAnimVal) {
|
2020-08-13 02:54:29 +03:00
|
|
|
domAnimVal = new SVGRect(this, aSVGElement, SVGRect::RectType::AnimValue);
|
2012-12-21 13:18:58 +04:00
|
|
|
sAnimSVGViewBoxTearoffTable.AddTearoff(this, domAnimVal);
|
|
|
|
}
|
|
|
|
|
2013-05-20 15:46:12 +04:00
|
|
|
return domAnimVal.forget();
|
2009-02-03 17:42:24 +03:00
|
|
|
}
|
|
|
|
|
2019-04-04 20:40:56 +03:00
|
|
|
UniquePtr<SMILAttr> SVGAnimatedViewBox::ToSMILAttr(SVGElement* aSVGElement) {
|
2017-03-30 07:10:07 +03:00
|
|
|
return MakeUnique<SMILViewBox>(this, aSVGElement);
|
2010-02-19 00:51:00 +03:00
|
|
|
}
|
|
|
|
|
2019-04-04 20:40:56 +03:00
|
|
|
nsresult SVGAnimatedViewBox::SMILViewBox ::ValueFromString(
|
2019-03-19 03:01:03 +03:00
|
|
|
const nsAString& aStr, const SVGAnimationElement* /*aSrcElement*/,
|
2019-01-23 16:48:08 +03:00
|
|
|
SMILValue& aValue, bool& aPreventCachingOfSandwich) const {
|
2019-04-10 07:08:14 +03:00
|
|
|
SVGViewBox viewBox;
|
|
|
|
nsresult res = SVGViewBox::FromString(aStr, &viewBox);
|
2010-02-19 00:51:00 +03:00
|
|
|
if (NS_FAILED(res)) {
|
|
|
|
return res;
|
|
|
|
}
|
2019-01-23 16:48:08 +03:00
|
|
|
SMILValue val(&SVGViewBoxSMILType::sSingleton);
|
2019-04-10 07:08:14 +03:00
|
|
|
*static_cast<SVGViewBox*>(val.mU.mPtr) = viewBox;
|
2018-05-30 22:15:35 +03:00
|
|
|
aValue = std::move(val);
|
2011-10-17 18:59:28 +04:00
|
|
|
aPreventCachingOfSandwich = false;
|
2017-07-06 15:00:35 +03:00
|
|
|
|
2010-02-19 00:51:00 +03:00
|
|
|
return NS_OK;
|
|
|
|
}
|
|
|
|
|
2019-04-04 20:40:56 +03:00
|
|
|
SMILValue SVGAnimatedViewBox::SMILViewBox::GetBaseValue() const {
|
2019-01-23 16:48:08 +03:00
|
|
|
SMILValue val(&SVGViewBoxSMILType::sSingleton);
|
2019-04-10 07:08:14 +03:00
|
|
|
*static_cast<SVGViewBox*>(val.mU.mPtr) = mVal->mBaseVal;
|
2010-02-19 00:51:00 +03:00
|
|
|
return val;
|
|
|
|
}
|
|
|
|
|
2019-04-04 20:40:56 +03:00
|
|
|
void SVGAnimatedViewBox::SMILViewBox::ClearAnimValue() {
|
2010-02-19 00:51:00 +03:00
|
|
|
if (mVal->mAnimVal) {
|
2012-07-30 18:20:58 +04:00
|
|
|
mVal->mAnimVal = nullptr;
|
2010-02-19 00:51:00 +03:00
|
|
|
mSVGElement->DidAnimateViewBox();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-04-04 20:40:56 +03:00
|
|
|
nsresult SVGAnimatedViewBox::SMILViewBox::SetAnimValue(
|
|
|
|
const SMILValue& aValue) {
|
2010-02-19 00:51:00 +03:00
|
|
|
NS_ASSERTION(aValue.mType == &SVGViewBoxSMILType::sSingleton,
|
|
|
|
"Unexpected type to assign animated value");
|
|
|
|
if (aValue.mType == &SVGViewBoxSMILType::sSingleton) {
|
2019-04-10 07:08:14 +03:00
|
|
|
SVGViewBox& vb = *static_cast<SVGViewBox*>(aValue.mU.mPtr);
|
2013-02-26 20:58:06 +04:00
|
|
|
mVal->SetAnimValue(vb, mSVGElement);
|
2010-02-19 00:51:00 +03:00
|
|
|
}
|
|
|
|
return NS_OK;
|
|
|
|
}
|
2019-01-06 20:52:55 +03:00
|
|
|
|
|
|
|
} // namespace mozilla
|