mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 13:57:36 +00:00
AK: Rename GenericTraits to DefaultTraits
This feels like a more fitting name for something that provides the default values for Traits.
This commit is contained in:
parent
ac23ab42b3
commit
a2f60911fe
101 changed files with 154 additions and 154 deletions
|
@ -69,7 +69,7 @@ namespace AK {
|
|||
|
||||
// traits for FontFaceKey
|
||||
template<>
|
||||
struct Traits<Web::CSS::FontFaceKey> : public GenericTraits<Web::CSS::FontFaceKey> {
|
||||
struct Traits<Web::CSS::FontFaceKey> : public DefaultTraits<Web::CSS::FontFaceKey> {
|
||||
static unsigned hash(Web::CSS::FontFaceKey const& key) { return pair_int_hash(key.family_name.hash(), pair_int_hash(key.weight, key.slope)); }
|
||||
};
|
||||
|
||||
|
|
|
@ -250,7 +250,7 @@ private:
|
|||
}
|
||||
|
||||
template<>
|
||||
struct AK::Traits<Web::CSS::StyleComputer::AnimationKey> : public AK::GenericTraits<Web::CSS::StyleComputer::AnimationKey> {
|
||||
struct AK::Traits<Web::CSS::StyleComputer::AnimationKey> : public AK::DefaultTraits<Web::CSS::StyleComputer::AnimationKey> {
|
||||
static unsigned hash(Web::CSS::StyleComputer::AnimationKey const& k) { return pair_int_hash(ptr_hash(k.source_declaration), ptr_hash(k.element)); }
|
||||
static bool equals(Web::CSS::StyleComputer::AnimationKey const& a, Web::CSS::StyleComputer::AnimationKey const& b)
|
||||
{
|
||||
|
|
|
@ -45,7 +45,7 @@ private:
|
|||
|
||||
namespace AK {
|
||||
template<>
|
||||
struct Traits<Web::FontSelector> : public GenericTraits<Web::FontSelector> {
|
||||
struct Traits<Web::FontSelector> : public DefaultTraits<Web::FontSelector> {
|
||||
static unsigned hash(Web::FontSelector const& key) { return pair_int_hash(pair_int_hash(key.family.hash(), key.weight), key.point_size); }
|
||||
};
|
||||
}
|
||||
|
|
|
@ -34,7 +34,7 @@ using CrossOriginPropertyDescriptorMap = HashMap<CrossOriginKey, JS::PropertyDes
|
|||
namespace AK {
|
||||
|
||||
template<>
|
||||
struct Traits<Web::HTML::CrossOriginKey> : public GenericTraits<Web::HTML::CrossOriginKey> {
|
||||
struct Traits<Web::HTML::CrossOriginKey> : public DefaultTraits<Web::HTML::CrossOriginKey> {
|
||||
static unsigned hash(Web::HTML::CrossOriginKey const& key)
|
||||
{
|
||||
return pair_int_hash(
|
||||
|
|
|
@ -57,7 +57,7 @@ private:
|
|||
namespace AK {
|
||||
|
||||
template<>
|
||||
struct Traits<Web::HTML::ListOfAvailableImages::Key> : public GenericTraits<Web::HTML::ListOfAvailableImages::Key> {
|
||||
struct Traits<Web::HTML::ListOfAvailableImages::Key> : public DefaultTraits<Web::HTML::ListOfAvailableImages::Key> {
|
||||
static unsigned hash(Web::HTML::ListOfAvailableImages::Key const& key)
|
||||
{
|
||||
return key.hash();
|
||||
|
|
|
@ -122,7 +122,7 @@ private:
|
|||
|
||||
namespace AK {
|
||||
template<>
|
||||
struct Traits<Web::HTML::Origin> : public GenericTraits<Web::HTML::Origin> {
|
||||
struct Traits<Web::HTML::Origin> : public DefaultTraits<Web::HTML::Origin> {
|
||||
static unsigned hash(Web::HTML::Origin const& origin)
|
||||
{
|
||||
auto hash_without_host = pair_int_hash(origin.scheme().hash(), origin.port());
|
||||
|
|
|
@ -78,7 +78,7 @@ private:
|
|||
namespace AK {
|
||||
|
||||
template<>
|
||||
struct Traits<Web::HTML::ModuleLocationTuple> : public GenericTraits<Web::HTML::ModuleLocationTuple> {
|
||||
struct Traits<Web::HTML::ModuleLocationTuple> : public DefaultTraits<Web::HTML::ModuleLocationTuple> {
|
||||
static unsigned hash(Web::HTML::ModuleLocationTuple const& tuple)
|
||||
{
|
||||
return pair_int_hash(tuple.url().to_deprecated_string().hash(), tuple.type().hash());
|
||||
|
|
|
@ -2470,7 +2470,7 @@ CSSPixels GridFormattingContext::calculate_minimum_contribution(GridItem const&
|
|||
|
||||
namespace AK {
|
||||
template<>
|
||||
struct Traits<Web::Layout::GridPosition> : public GenericTraits<Web::Layout::GridPosition> {
|
||||
struct Traits<Web::Layout::GridPosition> : public DefaultTraits<Web::Layout::GridPosition> {
|
||||
static unsigned hash(Web::Layout::GridPosition const& key) { return pair_int_hash(key.row, key.column); }
|
||||
};
|
||||
}
|
||||
|
|
|
@ -89,7 +89,7 @@ private:
|
|||
namespace AK {
|
||||
|
||||
template<>
|
||||
struct Traits<Web::Layout::TableGrid::GridPosition> : public GenericTraits<Web::Layout::TableGrid::GridPosition> {
|
||||
struct Traits<Web::Layout::TableGrid::GridPosition> : public DefaultTraits<Web::Layout::TableGrid::GridPosition> {
|
||||
static unsigned hash(Web::Layout::TableGrid::GridPosition const& key)
|
||||
{
|
||||
return pair_int_hash(key.x, key.y);
|
||||
|
|
|
@ -88,7 +88,7 @@ private:
|
|||
namespace AK {
|
||||
|
||||
template<>
|
||||
struct Traits<Web::LoadRequest> : public GenericTraits<Web::LoadRequest> {
|
||||
struct Traits<Web::LoadRequest> : public DefaultTraits<Web::LoadRequest> {
|
||||
static unsigned hash(Web::LoadRequest const& request) { return request.hash(); }
|
||||
};
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ struct CellCoordinates {
|
|||
|
||||
namespace AK {
|
||||
template<>
|
||||
struct Traits<CellCoordinates> : public GenericTraits<CellCoordinates> {
|
||||
struct Traits<CellCoordinates> : public DefaultTraits<CellCoordinates> {
|
||||
static unsigned hash(CellCoordinates const& key) { return pair_int_hash(key.row_index, key.column_index); }
|
||||
};
|
||||
}
|
||||
|
|
|
@ -462,7 +462,7 @@ template<>
|
|||
namespace AK {
|
||||
|
||||
template<>
|
||||
struct Traits<Web::CSSPixels> : public GenericTraits<Web::CSSPixels> {
|
||||
struct Traits<Web::CSSPixels> : public DefaultTraits<Web::CSSPixels> {
|
||||
static unsigned hash(Web::CSSPixels const& key)
|
||||
{
|
||||
return Traits<int>::hash(key.raw_value());
|
||||
|
@ -475,7 +475,7 @@ struct Traits<Web::CSSPixels> : public GenericTraits<Web::CSSPixels> {
|
|||
};
|
||||
|
||||
template<>
|
||||
struct Traits<Web::DevicePixels> : public GenericTraits<Web::DevicePixels> {
|
||||
struct Traits<Web::DevicePixels> : public DefaultTraits<Web::DevicePixels> {
|
||||
static unsigned hash(Web::DevicePixels const& key)
|
||||
{
|
||||
return Traits<Web::DevicePixels::Type>::hash(key.value());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue