mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-28 19:59:17 +00:00
Everywhere: Run clang-format
The following command was used to clang-format these files: clang-format-19 -i $(find . \ -not \( -path "./\.*" -prune \) \ -not \( -path "./Build/*" -prune \) \ -not \( -path "./Toolchain/*" -prune \) \ -type f -name "*.cpp" -o -name "*.mm" -o -name "*.h")
This commit is contained in:
parent
66732d2203
commit
27478ec7d4
Notes:
github-actions[bot]
2024-12-28 13:40:37 +00:00
Author: https://github.com/trflynn89
Commit: 27478ec7d4
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3067
57 changed files with 160 additions and 140 deletions
|
@ -46,13 +46,13 @@ namespace AK {
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace DistinctNumericFeature {
|
namespace DistinctNumericFeature {
|
||||||
enum Arithmetic {};
|
enum Arithmetic { };
|
||||||
enum CastToBool {};
|
enum CastToBool { };
|
||||||
enum CastToUnderlying {};
|
enum CastToUnderlying { };
|
||||||
enum Comparison {};
|
enum Comparison { };
|
||||||
enum Flags {};
|
enum Flags { };
|
||||||
enum Increment {};
|
enum Increment { };
|
||||||
enum Shift {};
|
enum Shift { };
|
||||||
};
|
};
|
||||||
|
|
||||||
template<typename T, typename X, typename... Opts>
|
template<typename T, typename X, typename... Opts>
|
||||||
|
|
|
@ -20,9 +20,9 @@ class IntrusiveListNode;
|
||||||
|
|
||||||
struct ExtractIntrusiveListTypes {
|
struct ExtractIntrusiveListTypes {
|
||||||
template<typename V, typename Container, typename T>
|
template<typename V, typename Container, typename T>
|
||||||
static V value(IntrusiveListNode<V, Container> T::*x);
|
static V value(IntrusiveListNode<V, Container> T::* x);
|
||||||
template<typename V, typename Container, typename T>
|
template<typename V, typename Container, typename T>
|
||||||
static Container container(IntrusiveListNode<V, Container> T::*x);
|
static Container container(IntrusiveListNode<V, Container> T::* x);
|
||||||
};
|
};
|
||||||
|
|
||||||
template<typename T, typename Container = RawPtr<T>>
|
template<typename T, typename Container = RawPtr<T>>
|
||||||
|
@ -33,14 +33,14 @@ class IntrusiveListStorage {
|
||||||
private:
|
private:
|
||||||
friend class IntrusiveListNode<T, Container>;
|
friend class IntrusiveListNode<T, Container>;
|
||||||
|
|
||||||
template<class T_, typename Container_, SubstitutedIntrusiveListNode<T_, Container_> T_::*member>
|
template<class T_, typename Container_, SubstitutedIntrusiveListNode<T_, Container_> T_::* member>
|
||||||
friend class IntrusiveList;
|
friend class IntrusiveList;
|
||||||
|
|
||||||
SubstitutedIntrusiveListNode<T, Container>* m_first { nullptr };
|
SubstitutedIntrusiveListNode<T, Container>* m_first { nullptr };
|
||||||
SubstitutedIntrusiveListNode<T, Container>* m_last { nullptr };
|
SubstitutedIntrusiveListNode<T, Container>* m_last { nullptr };
|
||||||
};
|
};
|
||||||
|
|
||||||
template<class T, typename Container, SubstitutedIntrusiveListNode<T, Container> T::*member>
|
template<class T, typename Container, SubstitutedIntrusiveListNode<T, Container> T::* member>
|
||||||
class IntrusiveList {
|
class IntrusiveList {
|
||||||
AK_MAKE_NONCOPYABLE(IntrusiveList);
|
AK_MAKE_NONCOPYABLE(IntrusiveList);
|
||||||
AK_MAKE_NONMOVABLE(IntrusiveList);
|
AK_MAKE_NONMOVABLE(IntrusiveList);
|
||||||
|
@ -162,7 +162,7 @@ public:
|
||||||
// to be of equal types. so for now, just make the members public on clang.
|
// to be of equal types. so for now, just make the members public on clang.
|
||||||
#if !defined(AK_COMPILER_CLANG)
|
#if !defined(AK_COMPILER_CLANG)
|
||||||
private:
|
private:
|
||||||
template<class T_, typename Container_, SubstitutedIntrusiveListNode<T_, Container_> T_::*member>
|
template<class T_, typename Container_, SubstitutedIntrusiveListNode<T_, Container_> T_::* member>
|
||||||
friend class ::AK::Detail::IntrusiveList;
|
friend class ::AK::Detail::IntrusiveList;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -172,7 +172,7 @@ private:
|
||||||
[[no_unique_address]] SelfReferenceIfNeeded<Container, IsRaw> m_self;
|
[[no_unique_address]] SelfReferenceIfNeeded<Container, IsRaw> m_self;
|
||||||
};
|
};
|
||||||
|
|
||||||
template<class T, typename Container, SubstitutedIntrusiveListNode<T, Container> T::*member>
|
template<class T, typename Container, SubstitutedIntrusiveListNode<T, Container> T::* member>
|
||||||
inline typename IntrusiveList<T, Container, member>::Iterator& IntrusiveList<T, Container, member>::Iterator::erase()
|
inline typename IntrusiveList<T, Container, member>::Iterator& IntrusiveList<T, Container, member>::Iterator::erase()
|
||||||
{
|
{
|
||||||
auto old = m_value;
|
auto old = m_value;
|
||||||
|
@ -181,26 +181,26 @@ inline typename IntrusiveList<T, Container, member>::Iterator& IntrusiveList<T,
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
template<class T, typename Container, SubstitutedIntrusiveListNode<T, Container> T::*member>
|
template<class T, typename Container, SubstitutedIntrusiveListNode<T, Container> T::* member>
|
||||||
inline IntrusiveList<T, Container, member>::~IntrusiveList()
|
inline IntrusiveList<T, Container, member>::~IntrusiveList()
|
||||||
{
|
{
|
||||||
clear();
|
clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
template<class T, typename Container, SubstitutedIntrusiveListNode<T, Container> T::*member>
|
template<class T, typename Container, SubstitutedIntrusiveListNode<T, Container> T::* member>
|
||||||
inline void IntrusiveList<T, Container, member>::clear()
|
inline void IntrusiveList<T, Container, member>::clear()
|
||||||
{
|
{
|
||||||
while (m_storage.m_first)
|
while (m_storage.m_first)
|
||||||
m_storage.m_first->remove();
|
m_storage.m_first->remove();
|
||||||
}
|
}
|
||||||
|
|
||||||
template<class T, typename Container, SubstitutedIntrusiveListNode<T, Container> T::*member>
|
template<class T, typename Container, SubstitutedIntrusiveListNode<T, Container> T::* member>
|
||||||
inline bool IntrusiveList<T, Container, member>::is_empty() const
|
inline bool IntrusiveList<T, Container, member>::is_empty() const
|
||||||
{
|
{
|
||||||
return m_storage.m_first == nullptr;
|
return m_storage.m_first == nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
template<class T, typename Container, SubstitutedIntrusiveListNode<T, Container> T::*member>
|
template<class T, typename Container, SubstitutedIntrusiveListNode<T, Container> T::* member>
|
||||||
inline size_t IntrusiveList<T, Container, member>::size_slow() const
|
inline size_t IntrusiveList<T, Container, member>::size_slow() const
|
||||||
{
|
{
|
||||||
size_t size = 0;
|
size_t size = 0;
|
||||||
|
@ -211,7 +211,7 @@ inline size_t IntrusiveList<T, Container, member>::size_slow() const
|
||||||
return size;
|
return size;
|
||||||
}
|
}
|
||||||
|
|
||||||
template<class T, typename Container, SubstitutedIntrusiveListNode<T, Container> T::*member>
|
template<class T, typename Container, SubstitutedIntrusiveListNode<T, Container> T::* member>
|
||||||
inline void IntrusiveList<T, Container, member>::append(T& n)
|
inline void IntrusiveList<T, Container, member>::append(T& n)
|
||||||
{
|
{
|
||||||
remove(n);
|
remove(n);
|
||||||
|
@ -230,7 +230,7 @@ inline void IntrusiveList<T, Container, member>::append(T& n)
|
||||||
m_storage.m_first = &nnode;
|
m_storage.m_first = &nnode;
|
||||||
}
|
}
|
||||||
|
|
||||||
template<class T, typename Container, SubstitutedIntrusiveListNode<T, Container> T::*member>
|
template<class T, typename Container, SubstitutedIntrusiveListNode<T, Container> T::* member>
|
||||||
inline void IntrusiveList<T, Container, member>::prepend(T& n)
|
inline void IntrusiveList<T, Container, member>::prepend(T& n)
|
||||||
{
|
{
|
||||||
remove(n);
|
remove(n);
|
||||||
|
@ -249,7 +249,7 @@ inline void IntrusiveList<T, Container, member>::prepend(T& n)
|
||||||
m_storage.m_last = &nnode;
|
m_storage.m_last = &nnode;
|
||||||
}
|
}
|
||||||
|
|
||||||
template<class T, typename Container, SubstitutedIntrusiveListNode<T, Container> T::*member>
|
template<class T, typename Container, SubstitutedIntrusiveListNode<T, Container> T::* member>
|
||||||
inline void IntrusiveList<T, Container, member>::insert_before(T& bn, T& n)
|
inline void IntrusiveList<T, Container, member>::insert_before(T& bn, T& n)
|
||||||
{
|
{
|
||||||
remove(n);
|
remove(n);
|
||||||
|
@ -271,7 +271,7 @@ inline void IntrusiveList<T, Container, member>::insert_before(T& bn, T& n)
|
||||||
new_node.m_self.reference = &n;
|
new_node.m_self.reference = &n;
|
||||||
}
|
}
|
||||||
|
|
||||||
template<class T, typename Container, SubstitutedIntrusiveListNode<T, Container> T::*member>
|
template<class T, typename Container, SubstitutedIntrusiveListNode<T, Container> T::* member>
|
||||||
inline void IntrusiveList<T, Container, member>::remove(T& n)
|
inline void IntrusiveList<T, Container, member>::remove(T& n)
|
||||||
{
|
{
|
||||||
auto& nnode = n.*member;
|
auto& nnode = n.*member;
|
||||||
|
@ -279,20 +279,20 @@ inline void IntrusiveList<T, Container, member>::remove(T& n)
|
||||||
nnode.remove();
|
nnode.remove();
|
||||||
}
|
}
|
||||||
|
|
||||||
template<class T, typename Container, SubstitutedIntrusiveListNode<T, Container> T::*member>
|
template<class T, typename Container, SubstitutedIntrusiveListNode<T, Container> T::* member>
|
||||||
inline bool IntrusiveList<T, Container, member>::contains(T const& n) const
|
inline bool IntrusiveList<T, Container, member>::contains(T const& n) const
|
||||||
{
|
{
|
||||||
auto& nnode = n.*member;
|
auto& nnode = n.*member;
|
||||||
return nnode.m_storage == &m_storage;
|
return nnode.m_storage == &m_storage;
|
||||||
}
|
}
|
||||||
|
|
||||||
template<class T, typename Container, SubstitutedIntrusiveListNode<T, Container> T::*member>
|
template<class T, typename Container, SubstitutedIntrusiveListNode<T, Container> T::* member>
|
||||||
inline Container IntrusiveList<T, Container, member>::first() const
|
inline Container IntrusiveList<T, Container, member>::first() const
|
||||||
{
|
{
|
||||||
return m_storage.m_first ? node_to_value(*m_storage.m_first) : nullptr;
|
return m_storage.m_first ? node_to_value(*m_storage.m_first) : nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
template<class T, typename Container, SubstitutedIntrusiveListNode<T, Container> T::*member>
|
template<class T, typename Container, SubstitutedIntrusiveListNode<T, Container> T::* member>
|
||||||
inline Container IntrusiveList<T, Container, member>::take_first()
|
inline Container IntrusiveList<T, Container, member>::take_first()
|
||||||
{
|
{
|
||||||
if (Container ptr = first()) {
|
if (Container ptr = first()) {
|
||||||
|
@ -302,7 +302,7 @@ inline Container IntrusiveList<T, Container, member>::take_first()
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
template<class T, typename Container, SubstitutedIntrusiveListNode<T, Container> T::*member>
|
template<class T, typename Container, SubstitutedIntrusiveListNode<T, Container> T::* member>
|
||||||
inline Container IntrusiveList<T, Container, member>::take_last()
|
inline Container IntrusiveList<T, Container, member>::take_last()
|
||||||
{
|
{
|
||||||
if (Container ptr = last()) {
|
if (Container ptr = last()) {
|
||||||
|
@ -312,13 +312,13 @@ inline Container IntrusiveList<T, Container, member>::take_last()
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
template<class T, typename Container, SubstitutedIntrusiveListNode<T, Container> T::*member>
|
template<class T, typename Container, SubstitutedIntrusiveListNode<T, Container> T::* member>
|
||||||
inline Container IntrusiveList<T, Container, member>::last() const
|
inline Container IntrusiveList<T, Container, member>::last() const
|
||||||
{
|
{
|
||||||
return m_storage.m_last ? node_to_value(*m_storage.m_last) : nullptr;
|
return m_storage.m_last ? node_to_value(*m_storage.m_last) : nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
template<class T, typename Container, SubstitutedIntrusiveListNode<T, Container> T::*member>
|
template<class T, typename Container, SubstitutedIntrusiveListNode<T, Container> T::* member>
|
||||||
inline T const* IntrusiveList<T, Container, member>::next(T const* current)
|
inline T const* IntrusiveList<T, Container, member>::next(T const* current)
|
||||||
{
|
{
|
||||||
auto& nextnode = (current->*member).m_next;
|
auto& nextnode = (current->*member).m_next;
|
||||||
|
@ -326,7 +326,7 @@ inline T const* IntrusiveList<T, Container, member>::next(T const* current)
|
||||||
return nextstruct;
|
return nextstruct;
|
||||||
}
|
}
|
||||||
|
|
||||||
template<class T, typename Container, SubstitutedIntrusiveListNode<T, Container> T::*member>
|
template<class T, typename Container, SubstitutedIntrusiveListNode<T, Container> T::* member>
|
||||||
inline T const* IntrusiveList<T, Container, member>::prev(T const* current)
|
inline T const* IntrusiveList<T, Container, member>::prev(T const* current)
|
||||||
{
|
{
|
||||||
auto& prevnode = (current->*member).m_prev;
|
auto& prevnode = (current->*member).m_prev;
|
||||||
|
@ -334,7 +334,7 @@ inline T const* IntrusiveList<T, Container, member>::prev(T const* current)
|
||||||
return prevstruct;
|
return prevstruct;
|
||||||
}
|
}
|
||||||
|
|
||||||
template<class T, typename Container, SubstitutedIntrusiveListNode<T, Container> T::*member>
|
template<class T, typename Container, SubstitutedIntrusiveListNode<T, Container> T::* member>
|
||||||
inline T* IntrusiveList<T, Container, member>::next(T* current)
|
inline T* IntrusiveList<T, Container, member>::next(T* current)
|
||||||
{
|
{
|
||||||
auto& nextnode = (current->*member).m_next;
|
auto& nextnode = (current->*member).m_next;
|
||||||
|
@ -342,7 +342,7 @@ inline T* IntrusiveList<T, Container, member>::next(T* current)
|
||||||
return nextstruct;
|
return nextstruct;
|
||||||
}
|
}
|
||||||
|
|
||||||
template<class T, typename Container, SubstitutedIntrusiveListNode<T, Container> T::*member>
|
template<class T, typename Container, SubstitutedIntrusiveListNode<T, Container> T::* member>
|
||||||
inline T* IntrusiveList<T, Container, member>::prev(T* current)
|
inline T* IntrusiveList<T, Container, member>::prev(T* current)
|
||||||
{
|
{
|
||||||
auto& prevnode = (current->*member).m_prev;
|
auto& prevnode = (current->*member).m_prev;
|
||||||
|
@ -350,25 +350,25 @@ inline T* IntrusiveList<T, Container, member>::prev(T* current)
|
||||||
return prevstruct;
|
return prevstruct;
|
||||||
}
|
}
|
||||||
|
|
||||||
template<class T, typename Container, SubstitutedIntrusiveListNode<T, Container> T::*member>
|
template<class T, typename Container, SubstitutedIntrusiveListNode<T, Container> T::* member>
|
||||||
inline typename IntrusiveList<T, Container, member>::Iterator IntrusiveList<T, Container, member>::begin()
|
inline typename IntrusiveList<T, Container, member>::Iterator IntrusiveList<T, Container, member>::begin()
|
||||||
{
|
{
|
||||||
return m_storage.m_first ? Iterator(node_to_value(*m_storage.m_first)) : Iterator();
|
return m_storage.m_first ? Iterator(node_to_value(*m_storage.m_first)) : Iterator();
|
||||||
}
|
}
|
||||||
|
|
||||||
template<class T, typename Container, SubstitutedIntrusiveListNode<T, Container> T::*member>
|
template<class T, typename Container, SubstitutedIntrusiveListNode<T, Container> T::* member>
|
||||||
inline typename IntrusiveList<T, Container, member>::ReverseIterator IntrusiveList<T, Container, member>::rbegin()
|
inline typename IntrusiveList<T, Container, member>::ReverseIterator IntrusiveList<T, Container, member>::rbegin()
|
||||||
{
|
{
|
||||||
return m_storage.m_last ? ReverseIterator(node_to_value(*m_storage.m_last)) : ReverseIterator();
|
return m_storage.m_last ? ReverseIterator(node_to_value(*m_storage.m_last)) : ReverseIterator();
|
||||||
}
|
}
|
||||||
|
|
||||||
template<class T, typename Container, SubstitutedIntrusiveListNode<T, Container> T::*member>
|
template<class T, typename Container, SubstitutedIntrusiveListNode<T, Container> T::* member>
|
||||||
inline typename IntrusiveList<T, Container, member>::ConstIterator IntrusiveList<T, Container, member>::begin() const
|
inline typename IntrusiveList<T, Container, member>::ConstIterator IntrusiveList<T, Container, member>::begin() const
|
||||||
{
|
{
|
||||||
return m_storage.m_first ? ConstIterator(node_to_value(*m_storage.m_first)) : ConstIterator();
|
return m_storage.m_first ? ConstIterator(node_to_value(*m_storage.m_first)) : ConstIterator();
|
||||||
}
|
}
|
||||||
|
|
||||||
template<class T, typename Container, SubstitutedIntrusiveListNode<T, Container> T::*member>
|
template<class T, typename Container, SubstitutedIntrusiveListNode<T, Container> T::* member>
|
||||||
inline T* IntrusiveList<T, Container, member>::node_to_value(SubstitutedIntrusiveListNode<T, Container>& node)
|
inline T* IntrusiveList<T, Container, member>::node_to_value(SubstitutedIntrusiveListNode<T, Container>& node)
|
||||||
{
|
{
|
||||||
// Note: A data member pointer is a 32-bit offset in the Windows ABI (both x86 and x86_64),
|
// Note: A data member pointer is a 32-bit offset in the Windows ABI (both x86 and x86_64),
|
||||||
|
@ -422,7 +422,7 @@ inline bool IntrusiveListNode<T, Container>::is_in_list() const
|
||||||
// By default, intrusive lists cannot contain null entries anyway, so switch to RefPtr
|
// By default, intrusive lists cannot contain null entries anyway, so switch to RefPtr
|
||||||
// and just make the user-facing functions deref the pointers.
|
// and just make the user-facing functions deref the pointers.
|
||||||
|
|
||||||
template<class T, SubstitutedIntrusiveListNode<T, NonnullRefPtr<T>> T::*member>
|
template<class T, SubstitutedIntrusiveListNode<T, NonnullRefPtr<T>> T::* member>
|
||||||
class IntrusiveList<T, NonnullRefPtr<T>, member> : public IntrusiveList<T, RefPtr<T>, member> {
|
class IntrusiveList<T, NonnullRefPtr<T>, member> : public IntrusiveList<T, RefPtr<T>, member> {
|
||||||
public:
|
public:
|
||||||
[[nodiscard]] NonnullRefPtr<T> first() const { return *IntrusiveList<T, RefPtr<T>, member>::first(); }
|
[[nodiscard]] NonnullRefPtr<T> first() const { return *IntrusiveList<T, RefPtr<T>, member>::first(); }
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
namespace AK {
|
namespace AK {
|
||||||
namespace Detail {
|
namespace Detail {
|
||||||
|
|
||||||
template<class T, typename Container, IntrusiveListNode<T, Container> T::*member>
|
template<class T, typename Container, IntrusiveListNode<T, Container> T::* member>
|
||||||
class IntrusiveListRelaxedConst : public IntrusiveList<T, Container, member> {
|
class IntrusiveListRelaxedConst : public IntrusiveList<T, Container, member> {
|
||||||
AK_MAKE_NONCOPYABLE(IntrusiveListRelaxedConst);
|
AK_MAKE_NONCOPYABLE(IntrusiveListRelaxedConst);
|
||||||
AK_MAKE_NONMOVABLE(IntrusiveListRelaxedConst);
|
AK_MAKE_NONMOVABLE(IntrusiveListRelaxedConst);
|
||||||
|
|
|
@ -16,17 +16,17 @@ class IntrusiveRedBlackTreeNode;
|
||||||
|
|
||||||
struct ExtractIntrusiveRedBlackTreeTypes {
|
struct ExtractIntrusiveRedBlackTreeTypes {
|
||||||
template<typename K, typename V, typename Container, typename T>
|
template<typename K, typename V, typename Container, typename T>
|
||||||
static K key(IntrusiveRedBlackTreeNode<K, V, Container> T::*x);
|
static K key(IntrusiveRedBlackTreeNode<K, V, Container> T::* x);
|
||||||
template<typename K, typename V, typename Container, typename T>
|
template<typename K, typename V, typename Container, typename T>
|
||||||
static V value(IntrusiveRedBlackTreeNode<K, V, Container> T::*x);
|
static V value(IntrusiveRedBlackTreeNode<K, V, Container> T::* x);
|
||||||
template<typename K, typename V, typename Container, typename T>
|
template<typename K, typename V, typename Container, typename T>
|
||||||
static Container container(IntrusiveRedBlackTreeNode<K, V, Container> T::*x);
|
static Container container(IntrusiveRedBlackTreeNode<K, V, Container> T::* x);
|
||||||
};
|
};
|
||||||
|
|
||||||
template<Integral K, typename V, typename Container = RawPtr<V>>
|
template<Integral K, typename V, typename Container = RawPtr<V>>
|
||||||
using SubstitutedIntrusiveRedBlackTreeNode = IntrusiveRedBlackTreeNode<K, V, typename SubstituteIntrusiveContainerType<V, Container>::Type>;
|
using SubstitutedIntrusiveRedBlackTreeNode = IntrusiveRedBlackTreeNode<K, V, typename SubstituteIntrusiveContainerType<V, Container>::Type>;
|
||||||
|
|
||||||
template<Integral K, typename V, typename Container, SubstitutedIntrusiveRedBlackTreeNode<K, V, Container> V::*member>
|
template<Integral K, typename V, typename Container, SubstitutedIntrusiveRedBlackTreeNode<K, V, Container> V::* member>
|
||||||
class IntrusiveRedBlackTree : public BaseRedBlackTree<K> {
|
class IntrusiveRedBlackTree : public BaseRedBlackTree<K> {
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
@ -200,7 +200,7 @@ public:
|
||||||
|
|
||||||
#if !defined(AK_COMPILER_CLANG)
|
#if !defined(AK_COMPILER_CLANG)
|
||||||
private:
|
private:
|
||||||
template<Integral TK, typename TV, typename TContainer, SubstitutedIntrusiveRedBlackTreeNode<TK, TV, TContainer> TV::*member>
|
template<Integral TK, typename TV, typename TContainer, SubstitutedIntrusiveRedBlackTreeNode<TK, TV, TContainer> TV::* member>
|
||||||
friend class ::AK::Detail::IntrusiveRedBlackTree;
|
friend class ::AK::Detail::IntrusiveRedBlackTree;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -211,7 +211,7 @@ private:
|
||||||
// Specialise IntrusiveRedBlackTree for NonnullRefPtr
|
// Specialise IntrusiveRedBlackTree for NonnullRefPtr
|
||||||
// By default, red black trees cannot contain null entries anyway, so switch to RefPtr
|
// By default, red black trees cannot contain null entries anyway, so switch to RefPtr
|
||||||
// and just make the user-facing functions deref the pointers.
|
// and just make the user-facing functions deref the pointers.
|
||||||
template<Integral K, typename V, SubstitutedIntrusiveRedBlackTreeNode<K, V, NonnullRefPtr<V>> V::*member>
|
template<Integral K, typename V, SubstitutedIntrusiveRedBlackTreeNode<K, V, NonnullRefPtr<V>> V::* member>
|
||||||
class IntrusiveRedBlackTree<K, V, NonnullRefPtr<V>, member> : public IntrusiveRedBlackTree<K, V, RefPtr<V>, member> {
|
class IntrusiveRedBlackTree<K, V, NonnullRefPtr<V>, member> : public IntrusiveRedBlackTree<K, V, RefPtr<V>, member> {
|
||||||
public:
|
public:
|
||||||
[[nodiscard]] NonnullRefPtr<V> find(K key) const { return IntrusiveRedBlackTree<K, V, RefPtr<V>, member>::find(key).release_nonnull(); }
|
[[nodiscard]] NonnullRefPtr<V> find(K key) const { return IntrusiveRedBlackTree<K, V, RefPtr<V>, member>::find(key).release_nonnull(); }
|
||||||
|
|
|
@ -42,7 +42,7 @@ public:
|
||||||
Node()
|
Node()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
virtual ~Node() {};
|
virtual ~Node() { }
|
||||||
};
|
};
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
|
@ -94,8 +94,8 @@ public:
|
||||||
~Result() = default;
|
~Result() = default;
|
||||||
|
|
||||||
// For compatibility with TRY().
|
// For compatibility with TRY().
|
||||||
void value() {};
|
void value() { }
|
||||||
void release_value() {};
|
void release_value() { }
|
||||||
|
|
||||||
ErrorType& error()
|
ErrorType& error()
|
||||||
{
|
{
|
||||||
|
|
|
@ -20,7 +20,9 @@ public:
|
||||||
CanonicalCode() = default;
|
CanonicalCode() = default;
|
||||||
CanonicalCode(Vector<size_t> codes, Vector<size_t> values)
|
CanonicalCode(Vector<size_t> codes, Vector<size_t> values)
|
||||||
: m_symbol_codes(move(codes))
|
: m_symbol_codes(move(codes))
|
||||||
, m_symbol_values(move(values)) {};
|
, m_symbol_values(move(values))
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
static ErrorOr<CanonicalCode> read_prefix_code(LittleEndianInputBitStream&, size_t alphabet_size);
|
static ErrorOr<CanonicalCode> read_prefix_code(LittleEndianInputBitStream&, size_t alphabet_size);
|
||||||
static ErrorOr<CanonicalCode> read_simple_prefix_code(LittleEndianInputBitStream&, size_t alphabet_size);
|
static ErrorOr<CanonicalCode> read_simple_prefix_code(LittleEndianInputBitStream&, size_t alphabet_size);
|
||||||
|
|
|
@ -69,7 +69,7 @@ ErrorOr<void> Command::write_lines(Span<ByteString> lines)
|
||||||
// It's possible the process dies before we can write everything to the
|
// It's possible the process dies before we can write everything to the
|
||||||
// stdin. So make sure that we don't crash but just stop writing.
|
// stdin. So make sure that we don't crash but just stop writing.
|
||||||
|
|
||||||
struct sigaction action_handler { };
|
struct sigaction action_handler {};
|
||||||
action_handler.sa_handler = SIG_IGN;
|
action_handler.sa_handler = SIG_IGN;
|
||||||
|
|
||||||
struct sigaction old_action_handler;
|
struct sigaction old_action_handler;
|
||||||
|
|
|
@ -111,7 +111,7 @@ public:
|
||||||
// Set the callback to be called when the promise is rejected. Setting this callback
|
// Set the callback to be called when the promise is rejected. Setting this callback
|
||||||
// will cause the promise fulfillment to be ready to be handled.
|
// will cause the promise fulfillment to be ready to be handled.
|
||||||
template<CallableAs<void, ErrorType&&> RejectedHandler>
|
template<CallableAs<void, ErrorType&&> RejectedHandler>
|
||||||
ThreadedPromise& when_rejected(RejectedHandler when_rejected = [](ErrorType&) {})
|
ThreadedPromise& when_rejected(RejectedHandler when_rejected = [](ErrorType&) { })
|
||||||
{
|
{
|
||||||
Threading::MutexLocker locker { m_mutex };
|
Threading::MutexLocker locker { m_mutex };
|
||||||
VERIFY(!m_rejection_handler);
|
VERIFY(!m_rejection_handler);
|
||||||
|
|
|
@ -316,7 +316,7 @@ bool can_delete_or_move(StringView path)
|
||||||
auto stat_or_empty = [](StringView path) {
|
auto stat_or_empty = [](StringView path) {
|
||||||
auto stat_or_error = Core::System::stat(path);
|
auto stat_or_error = Core::System::stat(path);
|
||||||
if (stat_or_error.is_error()) {
|
if (stat_or_error.is_error()) {
|
||||||
struct stat stat { };
|
struct stat stat {};
|
||||||
return stat;
|
return stat;
|
||||||
}
|
}
|
||||||
return stat_or_error.release_value();
|
return stat_or_error.release_value();
|
||||||
|
|
|
@ -60,7 +60,7 @@ NonnullRefPtr<ScaledFont> Typeface::scaled_font(float point_size) const
|
||||||
hb_face_t* Typeface::harfbuzz_typeface() const
|
hb_face_t* Typeface::harfbuzz_typeface() const
|
||||||
{
|
{
|
||||||
if (!m_harfbuzz_blob)
|
if (!m_harfbuzz_blob)
|
||||||
m_harfbuzz_blob = hb_blob_create(reinterpret_cast<char const*>(buffer().data()), buffer().size(), HB_MEMORY_MODE_READONLY, nullptr, [](void*) {});
|
m_harfbuzz_blob = hb_blob_create(reinterpret_cast<char const*>(buffer().data()), buffer().size(), HB_MEMORY_MODE_READONLY, nullptr, [](void*) { });
|
||||||
if (!m_harfbuzz_face)
|
if (!m_harfbuzz_face)
|
||||||
m_harfbuzz_face = hb_face_create(m_harfbuzz_blob, ttc_index());
|
m_harfbuzz_face = hb_face_create(m_harfbuzz_blob, ttc_index());
|
||||||
return m_harfbuzz_face;
|
return m_harfbuzz_face;
|
||||||
|
|
|
@ -64,9 +64,9 @@ SkTypeface const* TypefaceSkia::sk_typeface() const
|
||||||
TypefaceSkia::TypefaceSkia(NonnullOwnPtr<Impl> impl, ReadonlyBytes buffer, int ttc_index)
|
TypefaceSkia::TypefaceSkia(NonnullOwnPtr<Impl> impl, ReadonlyBytes buffer, int ttc_index)
|
||||||
: m_impl(move(impl))
|
: m_impl(move(impl))
|
||||||
, m_buffer(buffer)
|
, m_buffer(buffer)
|
||||||
, m_ttc_index(ttc_index) {
|
, m_ttc_index(ttc_index)
|
||||||
|
{
|
||||||
};
|
}
|
||||||
|
|
||||||
u32 TypefaceSkia::glyph_count() const
|
u32 TypefaceSkia::glyph_count() const
|
||||||
{
|
{
|
||||||
|
|
|
@ -48,7 +48,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void fill_main_tags() const {};
|
virtual void fill_main_tags() const { }
|
||||||
|
|
||||||
mutable HashMap<StringView, String> m_main_tags;
|
mutable HashMap<StringView, String> m_main_tags;
|
||||||
};
|
};
|
||||||
|
|
|
@ -62,7 +62,7 @@ ErrorOr<void> JPEGLoadingContext::decode()
|
||||||
|
|
||||||
source_manager.next_input_byte = data.data();
|
source_manager.next_input_byte = data.data();
|
||||||
source_manager.bytes_in_buffer = data.size();
|
source_manager.bytes_in_buffer = data.size();
|
||||||
source_manager.init_source = [](j_decompress_ptr) {};
|
source_manager.init_source = [](j_decompress_ptr) { };
|
||||||
source_manager.fill_input_buffer = [](j_decompress_ptr) -> boolean { return false; };
|
source_manager.fill_input_buffer = [](j_decompress_ptr) -> boolean { return false; };
|
||||||
source_manager.skip_input_data = [](j_decompress_ptr context, long num_bytes) {
|
source_manager.skip_input_data = [](j_decompress_ptr context, long num_bytes) {
|
||||||
if (num_bytes > static_cast<long>(context->src->bytes_in_buffer)) {
|
if (num_bytes > static_cast<long>(context->src->bytes_in_buffer)) {
|
||||||
|
@ -73,7 +73,7 @@ ErrorOr<void> JPEGLoadingContext::decode()
|
||||||
context->src->bytes_in_buffer -= num_bytes;
|
context->src->bytes_in_buffer -= num_bytes;
|
||||||
};
|
};
|
||||||
source_manager.resync_to_restart = jpeg_resync_to_restart;
|
source_manager.resync_to_restart = jpeg_resync_to_restart;
|
||||||
source_manager.term_source = [](j_decompress_ptr) {};
|
source_manager.term_source = [](j_decompress_ptr) { };
|
||||||
|
|
||||||
cinfo.src = &source_manager;
|
cinfo.src = &source_manager;
|
||||||
|
|
||||||
|
|
|
@ -48,8 +48,8 @@ struct MemoryDestinationManager : public jpeg_destination_mgr {
|
||||||
|
|
||||||
ErrorOr<void> JPEGWriter::encode_impl(Stream& stream, auto const& bitmap, Options const& options, ColorSpace color_space)
|
ErrorOr<void> JPEGWriter::encode_impl(Stream& stream, auto const& bitmap, Options const& options, ColorSpace color_space)
|
||||||
{
|
{
|
||||||
struct jpeg_compress_struct cinfo { };
|
struct jpeg_compress_struct cinfo {};
|
||||||
struct jpeg_error_mgr jerr { };
|
struct jpeg_error_mgr jerr {};
|
||||||
|
|
||||||
cinfo.err = jpeg_std_error(&jerr);
|
cinfo.err = jpeg_std_error(&jerr);
|
||||||
|
|
||||||
|
|
|
@ -41,7 +41,7 @@ private:
|
||||||
ALWAYS_INLINE ErrorOr<void> CanonicalCode::write_symbol(LittleEndianOutputBitStream& bit_stream, u32 symbol) const
|
ALWAYS_INLINE ErrorOr<void> CanonicalCode::write_symbol(LittleEndianOutputBitStream& bit_stream, u32 symbol) const
|
||||||
{
|
{
|
||||||
TRY(m_code.visit(
|
TRY(m_code.visit(
|
||||||
[&](u32 single_code) __attribute__((always_inline))->ErrorOr<void> { VERIFY(symbol == single_code); return {}; },
|
[&](u32 single_code) __attribute__((always_inline)) -> ErrorOr<void> { VERIFY(symbol == single_code); return {}; },
|
||||||
[&](Compress::CanonicalCode const& code) __attribute__((always_inline)) { return code.write_symbol(bit_stream, symbol); }));
|
[&](Compress::CanonicalCode const& code) __attribute__((always_inline)) { return code.write_symbol(bit_stream, symbol); }));
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,7 +23,7 @@ public:
|
||||||
virtual size_t width() const = 0;
|
virtual size_t width() const = 0;
|
||||||
virtual size_t height() const = 0;
|
virtual size_t height() const = 0;
|
||||||
|
|
||||||
virtual ~MetalTexture() {};
|
virtual ~MetalTexture() { }
|
||||||
};
|
};
|
||||||
|
|
||||||
class MetalContext : public RefCounted<MetalContext> {
|
class MetalContext : public RefCounted<MetalContext> {
|
||||||
|
@ -33,7 +33,7 @@ public:
|
||||||
|
|
||||||
virtual OwnPtr<MetalTexture> create_texture_from_iosurface(Core::IOSurfaceHandle const&) = 0;
|
virtual OwnPtr<MetalTexture> create_texture_from_iosurface(Core::IOSurfaceHandle const&) = 0;
|
||||||
|
|
||||||
virtual ~MetalContext() {};
|
virtual ~MetalContext() { }
|
||||||
};
|
};
|
||||||
|
|
||||||
RefPtr<MetalContext> get_metal_context();
|
RefPtr<MetalContext> get_metal_context();
|
||||||
|
|
|
@ -37,10 +37,10 @@ public:
|
||||||
static RefPtr<Gfx::SkiaBackendContext> create_metal_context(MetalContext&);
|
static RefPtr<Gfx::SkiaBackendContext> create_metal_context(MetalContext&);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
SkiaBackendContext() {};
|
SkiaBackendContext() { }
|
||||||
virtual ~SkiaBackendContext() {};
|
virtual ~SkiaBackendContext() { }
|
||||||
|
|
||||||
virtual void flush_and_submit(SkSurface*) {};
|
virtual void flush_and_submit(SkSurface*) { }
|
||||||
virtual GrDirectContext* sk_context() const = 0;
|
virtual GrDirectContext* sk_context() const = 0;
|
||||||
|
|
||||||
virtual MetalContext& metal_context() = 0;
|
virtual MetalContext& metal_context() = 0;
|
||||||
|
|
|
@ -719,7 +719,7 @@ public:
|
||||||
virtual bool has_name() const = 0;
|
virtual bool has_name() const = 0;
|
||||||
virtual Value instantiate_ordinary_function_expression(VM&, DeprecatedFlyString given_name) const = 0;
|
virtual Value instantiate_ordinary_function_expression(VM&, DeprecatedFlyString given_name) const = 0;
|
||||||
|
|
||||||
virtual ~FunctionNode() {};
|
virtual ~FunctionNode() { }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
FunctionNode(RefPtr<Identifier const> name, ByteString source_text, NonnullRefPtr<Statement const> body, Vector<FunctionParameter> parameters, i32 function_length, FunctionKind kind, bool is_strict_mode, FunctionParsingInsights parsing_insights, bool is_arrow_function, Vector<DeprecatedFlyString> local_variables_names)
|
FunctionNode(RefPtr<Identifier const> name, ByteString source_text, NonnullRefPtr<Statement const> body, Vector<FunctionParameter> parameters, i32 function_length, FunctionKind kind, bool is_strict_mode, FunctionParsingInsights parsing_insights, bool is_arrow_function, Vector<DeprecatedFlyString> local_variables_names)
|
||||||
|
@ -779,7 +779,7 @@ public:
|
||||||
bool has_name() const override { return true; }
|
bool has_name() const override { return true; }
|
||||||
Value instantiate_ordinary_function_expression(VM&, DeprecatedFlyString) const override { VERIFY_NOT_REACHED(); }
|
Value instantiate_ordinary_function_expression(VM&, DeprecatedFlyString) const override { VERIFY_NOT_REACHED(); }
|
||||||
|
|
||||||
virtual ~FunctionDeclaration() {};
|
virtual ~FunctionDeclaration() { }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool m_is_hoisted { false };
|
bool m_is_hoisted { false };
|
||||||
|
@ -806,7 +806,7 @@ public:
|
||||||
|
|
||||||
Value instantiate_ordinary_function_expression(VM&, DeprecatedFlyString given_name) const override;
|
Value instantiate_ordinary_function_expression(VM&, DeprecatedFlyString given_name) const override;
|
||||||
|
|
||||||
virtual ~FunctionExpression() {};
|
virtual ~FunctionExpression() { }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
virtual bool is_function_expression() const override { return true; }
|
virtual bool is_function_expression() const override { return true; }
|
||||||
|
|
|
@ -48,7 +48,9 @@ public:
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
explicit IndexedPropertyStorage(IsSimpleStorage is_simple_storage)
|
explicit IndexedPropertyStorage(IsSimpleStorage is_simple_storage)
|
||||||
: m_is_simple_storage(is_simple_storage == IsSimpleStorage::Yes) {};
|
: m_is_simple_storage(is_simple_storage == IsSimpleStorage::Yes)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool m_is_simple_storage { false };
|
bool m_is_simple_storage { false };
|
||||||
|
@ -57,7 +59,9 @@ private:
|
||||||
class SimpleIndexedPropertyStorage final : public IndexedPropertyStorage {
|
class SimpleIndexedPropertyStorage final : public IndexedPropertyStorage {
|
||||||
public:
|
public:
|
||||||
SimpleIndexedPropertyStorage()
|
SimpleIndexedPropertyStorage()
|
||||||
: IndexedPropertyStorage(IsSimpleStorage::Yes) {};
|
: IndexedPropertyStorage(IsSimpleStorage::Yes)
|
||||||
|
{
|
||||||
|
}
|
||||||
explicit SimpleIndexedPropertyStorage(Vector<Value>&& initial_values);
|
explicit SimpleIndexedPropertyStorage(Vector<Value>&& initial_values);
|
||||||
|
|
||||||
virtual bool has_index(u32 index) const override;
|
virtual bool has_index(u32 index) const override;
|
||||||
|
@ -99,7 +103,9 @@ class GenericIndexedPropertyStorage final : public IndexedPropertyStorage {
|
||||||
public:
|
public:
|
||||||
explicit GenericIndexedPropertyStorage(SimpleIndexedPropertyStorage&&);
|
explicit GenericIndexedPropertyStorage(SimpleIndexedPropertyStorage&&);
|
||||||
explicit GenericIndexedPropertyStorage()
|
explicit GenericIndexedPropertyStorage()
|
||||||
: IndexedPropertyStorage(IsSimpleStorage::No) {};
|
: IndexedPropertyStorage(IsSimpleStorage::No)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
virtual bool has_index(u32 index) const override;
|
virtual bool has_index(u32 index) const override;
|
||||||
virtual Optional<ValueAndAttributes> get(u32 index) const override;
|
virtual Optional<ValueAndAttributes> get(u32 index) const override;
|
||||||
|
|
|
@ -221,7 +221,7 @@ struct DurationRecord {
|
||||||
};
|
};
|
||||||
|
|
||||||
struct DurationInstanceComponent {
|
struct DurationInstanceComponent {
|
||||||
double DurationRecord::*value_slot;
|
double DurationRecord::* value_slot;
|
||||||
DurationFormat::ValueStyle (DurationFormat::*get_style_slot)() const;
|
DurationFormat::ValueStyle (DurationFormat::*get_style_slot)() const;
|
||||||
void (DurationFormat::*set_style_slot)(DurationFormat::ValueStyle);
|
void (DurationFormat::*set_style_slot)(DurationFormat::ValueStyle);
|
||||||
DurationFormat::Display (DurationFormat::*get_display_slot)() const;
|
DurationFormat::Display (DurationFormat::*get_display_slot)() const;
|
||||||
|
|
|
@ -468,10 +468,8 @@ private:
|
||||||
|
|
||||||
KeyCallbackMachine m_callback_machine;
|
KeyCallbackMachine m_callback_machine;
|
||||||
|
|
||||||
struct termios m_termios {
|
struct termios m_termios {};
|
||||||
};
|
struct termios m_default_termios {};
|
||||||
struct termios m_default_termios {
|
|
||||||
};
|
|
||||||
bool m_was_interrupted { false };
|
bool m_was_interrupted { false };
|
||||||
bool m_previous_interrupt_was_handled_as_interrupt { true };
|
bool m_previous_interrupt_was_handled_as_interrupt { true };
|
||||||
bool m_was_resized { false };
|
bool m_was_resized { false };
|
||||||
|
|
|
@ -25,7 +25,9 @@ struct Key {
|
||||||
|
|
||||||
Key(unsigned c)
|
Key(unsigned c)
|
||||||
: modifiers(None)
|
: modifiers(None)
|
||||||
, key(c) {};
|
, key(c)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
Key(unsigned c, int modifiers)
|
Key(unsigned c, int modifiers)
|
||||||
: modifiers(modifiers)
|
: modifiers(modifiers)
|
||||||
|
|
|
@ -16,7 +16,7 @@ namespace Media {
|
||||||
|
|
||||||
class VideoDecoder {
|
class VideoDecoder {
|
||||||
public:
|
public:
|
||||||
virtual ~VideoDecoder() {};
|
virtual ~VideoDecoder() { }
|
||||||
|
|
||||||
virtual DecoderErrorOr<void> receive_sample(AK::Duration timestamp, ReadonlyBytes sample) = 0;
|
virtual DecoderErrorOr<void> receive_sample(AK::Duration timestamp, ReadonlyBytes sample) = 0;
|
||||||
DecoderErrorOr<void> receive_sample(AK::Duration timestamp, ByteBuffer const& sample) { return receive_sample(timestamp, sample.span()); }
|
DecoderErrorOr<void> receive_sample(AK::Duration timestamp, ByteBuffer const& sample) { return receive_sample(timestamp, sample.span()); }
|
||||||
|
|
|
@ -194,8 +194,8 @@ struct Options {
|
||||||
OPTION_WITH_DEFAULTS(bool, validate_certificates, true)
|
OPTION_WITH_DEFAULTS(bool, validate_certificates, true)
|
||||||
OPTION_WITH_DEFAULTS(bool, allow_self_signed_certificates, false)
|
OPTION_WITH_DEFAULTS(bool, allow_self_signed_certificates, false)
|
||||||
OPTION_WITH_DEFAULTS(Optional<Vector<Certificate>>, root_certificates, )
|
OPTION_WITH_DEFAULTS(Optional<Vector<Certificate>>, root_certificates, )
|
||||||
OPTION_WITH_DEFAULTS(Function<void(AlertDescription)>, alert_handler, [](auto) {})
|
OPTION_WITH_DEFAULTS(Function<void(AlertDescription)>, alert_handler, [](auto) { })
|
||||||
OPTION_WITH_DEFAULTS(Function<void()>, finish_callback, [] {})
|
OPTION_WITH_DEFAULTS(Function<void()>, finish_callback, [] { })
|
||||||
OPTION_WITH_DEFAULTS(Function<Vector<Certificate>()>, certificate_provider, [] { return Vector<Certificate> {}; })
|
OPTION_WITH_DEFAULTS(Function<Vector<Certificate>()>, certificate_provider, [] { return Vector<Certificate> {}; })
|
||||||
OPTION_WITH_DEFAULTS(bool, enable_extended_master_secret, true)
|
OPTION_WITH_DEFAULTS(bool, enable_extended_master_secret, true)
|
||||||
|
|
||||||
|
|
|
@ -34,7 +34,7 @@ private:
|
||||||
, m_value(value)
|
, m_value(value)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
ColumnCount() {};
|
ColumnCount() { }
|
||||||
|
|
||||||
Type m_type { Type::Auto };
|
Type m_type { Type::Auto };
|
||||||
Optional<int> m_value;
|
Optional<int> m_value;
|
||||||
|
|
|
@ -16,7 +16,9 @@ class Filter {
|
||||||
public:
|
public:
|
||||||
Filter() = default;
|
Filter() = default;
|
||||||
Filter(FilterValueListStyleValue const& filter_value_list)
|
Filter(FilterValueListStyleValue const& filter_value_list)
|
||||||
: m_filter_value_list { filter_value_list } {};
|
: m_filter_value_list { filter_value_list }
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
static Filter make_none()
|
static Filter make_none()
|
||||||
{
|
{
|
||||||
|
|
|
@ -71,11 +71,17 @@ private:
|
||||||
};
|
};
|
||||||
|
|
||||||
GridTrackPlacement()
|
GridTrackPlacement()
|
||||||
: m_value(Auto {}) {};
|
: m_value(Auto {})
|
||||||
|
{
|
||||||
|
}
|
||||||
GridTrackPlacement(AreaOrLine value)
|
GridTrackPlacement(AreaOrLine value)
|
||||||
: m_value(value) {};
|
: m_value(value)
|
||||||
|
{
|
||||||
|
}
|
||||||
GridTrackPlacement(Span value)
|
GridTrackPlacement(Span value)
|
||||||
: m_value(value) {};
|
: m_value(value)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
Variant<Auto, AreaOrLine, Span> m_value;
|
Variant<Auto, AreaOrLine, Span> m_value;
|
||||||
};
|
};
|
||||||
|
|
|
@ -1042,7 +1042,7 @@ WebIDL::ExceptionOr<void> HTMLMediaElement::fetch_resource(URL::URL const& url_r
|
||||||
// 5. Otherwise, incrementally read response's body given updateMedia, processEndOfMedia, an empty algorithm, and global.
|
// 5. Otherwise, incrementally read response's body given updateMedia, processEndOfMedia, an empty algorithm, and global.
|
||||||
|
|
||||||
VERIFY(response->body());
|
VERIFY(response->body());
|
||||||
auto empty_algorithm = GC::create_function(heap(), [](JS::Value) {});
|
auto empty_algorithm = GC::create_function(heap(), [](JS::Value) { });
|
||||||
|
|
||||||
// FIXME: We are "fully" reading the response here, rather than "incrementally". Memory concerns aside, this should be okay for now as we are
|
// FIXME: We are "fully" reading the response here, rather than "incrementally". Memory concerns aside, this should be okay for now as we are
|
||||||
// always setting byteRange to "entire resource". However, we should switch to incremental reads when that is implemented, and then
|
// always setting byteRange to "entire resource". However, we should switch to incremental reads when that is implemented, and then
|
||||||
|
|
|
@ -211,7 +211,7 @@ WebIDL::ExceptionOr<void> HTMLVideoElement::determine_element_poster_frame(Optio
|
||||||
});
|
});
|
||||||
|
|
||||||
VERIFY(response->body());
|
VERIFY(response->body());
|
||||||
auto empty_algorithm = GC::create_function(heap(), [](JS::Value) {});
|
auto empty_algorithm = GC::create_function(heap(), [](JS::Value) { });
|
||||||
|
|
||||||
response->body()->fully_read(realm, on_image_data_read, empty_algorithm, GC::Ref { global });
|
response->body()->fully_read(realm, on_image_data_read, empty_algorithm, GC::Ref { global });
|
||||||
};
|
};
|
||||||
|
|
|
@ -23,8 +23,8 @@ public:
|
||||||
virtual Gfx::IntSize size() const = 0;
|
virtual Gfx::IntSize size() const = 0;
|
||||||
virtual Gfx::Bitmap& bitmap() const = 0;
|
virtual Gfx::Bitmap& bitmap() const = 0;
|
||||||
|
|
||||||
BackingStore() {};
|
BackingStore() { }
|
||||||
virtual ~BackingStore() {};
|
virtual ~BackingStore() { }
|
||||||
};
|
};
|
||||||
|
|
||||||
class BitmapBackingStore final : public BackingStore {
|
class BitmapBackingStore final : public BackingStore {
|
||||||
|
|
|
@ -47,7 +47,7 @@ public:
|
||||||
ReadonlySpan<ColorStop> color_stops() const { return m_color_stops; }
|
ReadonlySpan<ColorStop> color_stops() const { return m_color_stops; }
|
||||||
Optional<float> repeat_length() const { return m_repeat_length; }
|
Optional<float> repeat_length() const { return m_repeat_length; }
|
||||||
|
|
||||||
virtual ~SVGGradientPaintStyle() {};
|
virtual ~SVGGradientPaintStyle() { }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
Vector<ColorStop, 4> m_color_stops;
|
Vector<ColorStop, 4> m_color_stops;
|
||||||
|
|
|
@ -20,7 +20,9 @@ GC::Ref<SVGAnimatedTransformList> SVGAnimatedTransformList::create(JS::Realm& re
|
||||||
SVGAnimatedTransformList::SVGAnimatedTransformList(JS::Realm& realm, GC::Ref<SVGTransformList> base_val, GC::Ref<SVGTransformList> anim_val)
|
SVGAnimatedTransformList::SVGAnimatedTransformList(JS::Realm& realm, GC::Ref<SVGTransformList> base_val, GC::Ref<SVGTransformList> anim_val)
|
||||||
: PlatformObject(realm)
|
: PlatformObject(realm)
|
||||||
, m_base_val(base_val)
|
, m_base_val(base_val)
|
||||||
, m_anim_val(anim_val) {};
|
, m_anim_val(anim_val)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
SVGAnimatedTransformList::~SVGAnimatedTransformList() = default;
|
SVGAnimatedTransformList::~SVGAnimatedTransformList() = default;
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,9 @@ GC::Ref<SVGTransform> SVGTransform::create(JS::Realm& realm)
|
||||||
}
|
}
|
||||||
|
|
||||||
SVGTransform::SVGTransform(JS::Realm& realm)
|
SVGTransform::SVGTransform(JS::Realm& realm)
|
||||||
: PlatformObject(realm) {};
|
: PlatformObject(realm)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
SVGTransform::~SVGTransform() = default;
|
SVGTransform::~SVGTransform() = default;
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,7 @@ class XMLHttpRequestEventTarget : public DOM::EventTarget {
|
||||||
WEB_PLATFORM_OBJECT(XMLHttpRequestEventTarget, DOM::EventTarget);
|
WEB_PLATFORM_OBJECT(XMLHttpRequestEventTarget, DOM::EventTarget);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
virtual ~XMLHttpRequestEventTarget() override {};
|
virtual ~XMLHttpRequestEventTarget() override { }
|
||||||
|
|
||||||
#undef __ENUMERATE
|
#undef __ENUMERATE
|
||||||
#define __ENUMERATE(attribute_name, event_name) \
|
#define __ENUMERATE(attribute_name, event_name) \
|
||||||
|
|
|
@ -92,7 +92,7 @@ public:
|
||||||
|
|
||||||
SignalHandlers::SignalHandlers(int signal_number, CFFileDescriptorCallBack handle_signal)
|
SignalHandlers::SignalHandlers(int signal_number, CFFileDescriptorCallBack handle_signal)
|
||||||
: m_signal_number(signal_number)
|
: m_signal_number(signal_number)
|
||||||
, m_original_handler(signal(signal_number, [](int) {}))
|
, m_original_handler(signal(signal_number, [](int) { }))
|
||||||
{
|
{
|
||||||
m_kevent_fd = kqueue();
|
m_kevent_fd = kqueue();
|
||||||
if (m_kevent_fd < 0) {
|
if (m_kevent_fd < 0) {
|
||||||
|
@ -320,7 +320,7 @@ static void handle_signal(CFFileDescriptorRef f, CFOptionFlags callback_types, v
|
||||||
VERIFY(callback_types & kCFFileDescriptorReadCallBack);
|
VERIFY(callback_types & kCFFileDescriptorReadCallBack);
|
||||||
auto* signal_handlers = static_cast<SignalHandlers*>(info);
|
auto* signal_handlers = static_cast<SignalHandlers*>(info);
|
||||||
|
|
||||||
struct kevent event { };
|
struct kevent event {};
|
||||||
|
|
||||||
// returns number of events that have occurred since last call
|
// returns number of events that have occurred since last call
|
||||||
(void)::kevent(CFFileDescriptorGetNativeDescriptor(f), nullptr, 0, &event, 1, nullptr);
|
(void)::kevent(CFFileDescriptorGetNativeDescriptor(f), nullptr, 0, &event, 1, nullptr);
|
||||||
|
|
|
@ -47,7 +47,7 @@ StringView process_name_from_type(ProcessType type)
|
||||||
}
|
}
|
||||||
|
|
||||||
ProcessManager::ProcessManager()
|
ProcessManager::ProcessManager()
|
||||||
: on_process_exited([](Process&&) {})
|
: on_process_exited([](Process&&) { })
|
||||||
{
|
{
|
||||||
m_signal_handle = Core::EventLoop::register_signal(SIGCHLD, [this](int) {
|
m_signal_handle = Core::EventLoop::register_signal(SIGCHLD, [this](int) {
|
||||||
auto result = Core::System::waitpid(-1, WNOHANG);
|
auto result = Core::System::waitpid(-1, WNOHANG);
|
||||||
|
|
|
@ -488,8 +488,8 @@ void ViewImplementation::did_allocate_iosurface_backing_stores(i32 front_id, Cor
|
||||||
|
|
||||||
auto bytes_per_row = front_iosurface.bytes_per_row();
|
auto bytes_per_row = front_iosurface.bytes_per_row();
|
||||||
|
|
||||||
auto front_bitmap = Gfx::Bitmap::create_wrapper(Gfx::BitmapFormat::BGRA8888, Gfx::AlphaType::Premultiplied, front_size, bytes_per_row, front_iosurface.data(), [handle = move(front_iosurface)] {});
|
auto front_bitmap = Gfx::Bitmap::create_wrapper(Gfx::BitmapFormat::BGRA8888, Gfx::AlphaType::Premultiplied, front_size, bytes_per_row, front_iosurface.data(), [handle = move(front_iosurface)] { });
|
||||||
auto back_bitmap = Gfx::Bitmap::create_wrapper(Gfx::BitmapFormat::BGRA8888, Gfx::AlphaType::Premultiplied, back_size, bytes_per_row, back_iosurface.data(), [handle = move(back_iosurface)] {});
|
auto back_bitmap = Gfx::Bitmap::create_wrapper(Gfx::BitmapFormat::BGRA8888, Gfx::AlphaType::Premultiplied, back_size, bytes_per_row, back_iosurface.data(), [handle = move(back_iosurface)] { });
|
||||||
|
|
||||||
m_client_state.front_bitmap.bitmap = front_bitmap.release_value_but_fixme_should_propagate_errors();
|
m_client_state.front_bitmap.bitmap = front_bitmap.release_value_but_fixme_should_propagate_errors();
|
||||||
m_client_state.front_bitmap.id = front_id;
|
m_client_state.front_bitmap.id = front_id;
|
||||||
|
|
|
@ -31,8 +31,8 @@ public:
|
||||||
virtual Web::CSS::PreferredColorScheme preferred_color_scheme() const override;
|
virtual Web::CSS::PreferredColorScheme preferred_color_scheme() const override;
|
||||||
virtual Web::CSS::PreferredContrast preferred_contrast() const override;
|
virtual Web::CSS::PreferredContrast preferred_contrast() const override;
|
||||||
virtual Web::CSS::PreferredMotion preferred_motion() const override;
|
virtual Web::CSS::PreferredMotion preferred_motion() const override;
|
||||||
virtual void paint_next_frame() override {};
|
virtual void paint_next_frame() override { }
|
||||||
virtual void process_screenshot_requests() override {};
|
virtual void process_screenshot_requests() override { }
|
||||||
virtual void paint(Web::DevicePixelRect const&, Web::Painting::BackingStore&, Web::PaintOptions = {}) override;
|
virtual void paint(Web::DevicePixelRect const&, Web::Painting::BackingStore&, Web::PaintOptions = {}) override;
|
||||||
virtual void request_file(Web::FileRequest) override;
|
virtual void request_file(Web::FileRequest) override;
|
||||||
virtual bool is_ready_to_paint() const override { return true; }
|
virtual bool is_ready_to_paint() const override { return true; }
|
||||||
|
|
|
@ -10,6 +10,6 @@
|
||||||
GC::Heap& test_gc_heap()
|
GC::Heap& test_gc_heap()
|
||||||
{
|
{
|
||||||
// FIXME: The GC heap should become thread aware!
|
// FIXME: The GC heap should become thread aware!
|
||||||
thread_local GC::Heap heap(nullptr, [](auto&) {});
|
thread_local GC::Heap heap(nullptr, [](auto&) { });
|
||||||
return heap;
|
return heap;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue