mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 764299 (Part 1) - Add hashing to SVGImageContext. r=dholbert
This commit is contained in:
parent
f63772c59f
commit
69e91a47b3
@ -3,8 +3,10 @@
|
|||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* 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/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
#pragma once
|
#ifndef MOZILLA_CONTENT_SVGPRESERVEASPECTRATIO_H_
|
||||||
|
#define MOZILLA_CONTENT_SVGPRESERVEASPECTRATIO_H_
|
||||||
|
|
||||||
|
#include "mozilla/HashFunctions.h" // for HashGeneric
|
||||||
#include "mozilla/TypedEnum.h"
|
#include "mozilla/TypedEnum.h"
|
||||||
|
|
||||||
#include "nsWrapperCache.h"
|
#include "nsWrapperCache.h"
|
||||||
@ -98,6 +100,10 @@ public:
|
|||||||
return mDefer;
|
return mDefer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uint32_t Hash() const {
|
||||||
|
return HashGeneric(mAlign, mMeetOrSlice, mDefer);
|
||||||
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// We can't use enum types here because some compilers fail to pack them.
|
// We can't use enum types here because some compilers fail to pack them.
|
||||||
uint8_t mAlign;
|
uint8_t mAlign;
|
||||||
@ -141,3 +147,5 @@ protected:
|
|||||||
|
|
||||||
} //namespace dom
|
} //namespace dom
|
||||||
} //namespace mozilla
|
} //namespace mozilla
|
||||||
|
|
||||||
|
#endif // MOZILLA_CONTENT_SVGPRESERVEASPECTRATIO_H_
|
||||||
|
@ -16,6 +16,8 @@ namespace mozilla {
|
|||||||
class SVGImageContext
|
class SVGImageContext
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
SVGImageContext() { }
|
||||||
|
|
||||||
SVGImageContext(SVGPreserveAspectRatio aPreserveAspectRatio)
|
SVGImageContext(SVGPreserveAspectRatio aPreserveAspectRatio)
|
||||||
: mPreserveAspectRatio(aPreserveAspectRatio)
|
: mPreserveAspectRatio(aPreserveAspectRatio)
|
||||||
{ }
|
{ }
|
||||||
@ -32,8 +34,12 @@ public:
|
|||||||
return !(*this == aOther);
|
return !(*this == aOther);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uint32_t Hash() const {
|
||||||
|
return mPreserveAspectRatio.Hash();
|
||||||
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
const SVGPreserveAspectRatio mPreserveAspectRatio;
|
SVGPreserveAspectRatio mPreserveAspectRatio;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace mozilla
|
} // namespace mozilla
|
||||||
|
Loading…
Reference in New Issue
Block a user