mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-08 05:27:14 +09: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(); }
|
||||||
|
|
|
@ -44,7 +44,7 @@ inline void secure_zero(void* ptr, size_t size)
|
||||||
// The memory barrier is here to avoid the compiler optimizing
|
// The memory barrier is here to avoid the compiler optimizing
|
||||||
// away the memset when we rely on it for wiping secrets.
|
// away the memset when we rely on it for wiping secrets.
|
||||||
asm volatile("" ::
|
asm volatile("" ::
|
||||||
: "memory");
|
: "memory");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Naive implementation of a constant time buffer comparison function.
|
// Naive implementation of a constant time buffer comparison function.
|
||||||
|
|
|
@ -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()
|
||||||
{
|
{
|
||||||
|
|
|
@ -132,7 +132,7 @@ requires(IsIntegral<T>)
|
||||||
{
|
{
|
||||||
if (!is_constant_evaluated()) {
|
if (!is_constant_evaluated()) {
|
||||||
asm volatile(""
|
asm volatile(""
|
||||||
: "+r"(value));
|
: "+r"(value));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -142,9 +142,9 @@ requires(!IsIntegral<T>)
|
||||||
{
|
{
|
||||||
if (!is_constant_evaluated()) {
|
if (!is_constant_evaluated()) {
|
||||||
asm volatile(""
|
asm volatile(""
|
||||||
:
|
:
|
||||||
: "m"(value)
|
: "m"(value)
|
||||||
: "memory");
|
: "memory");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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;
|
||||||
|
|
|
@ -286,7 +286,7 @@ ErrorOr<bool> Process::is_being_debugged()
|
||||||
if (sysctl(mib, sizeof(mib) / sizeof(*mib), &info, &size, NULL, 0) < 0)
|
if (sysctl(mib, sizeof(mib) / sizeof(*mib), &info, &size, NULL, 0) < 0)
|
||||||
return Error::from_syscall("sysctl"sv, -errno);
|
return Error::from_syscall("sysctl"sv, -errno);
|
||||||
|
|
||||||
// We're being debugged if the P_TRACED flag is set.
|
// We're being debugged if the P_TRACED flag is set.
|
||||||
# if defined(AK_OS_MACOS)
|
# if defined(AK_OS_MACOS)
|
||||||
return ((info.kp_proc.p_flag & P_TRACED) != 0);
|
return ((info.kp_proc.p_flag & P_TRACED) != 0);
|
||||||
# elif defined(AK_OS_FREEBSD)
|
# elif defined(AK_OS_FREEBSD)
|
||||||
|
|
|
@ -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);
|
||||||
|
|
|
@ -199,8 +199,8 @@ String BigFraction::to_string(unsigned rounding_threshold) const
|
||||||
auto const number_of_digits = [](auto integer) {
|
auto const number_of_digits = [](auto integer) {
|
||||||
unsigned size = 1;
|
unsigned size = 1;
|
||||||
for (auto division_result = integer.divided_by(UnsignedBigInteger { 10 });
|
for (auto division_result = integer.divided_by(UnsignedBigInteger { 10 });
|
||||||
division_result.remainder == UnsignedBigInteger { 0 } && division_result.quotient != UnsignedBigInteger { 0 };
|
division_result.remainder == UnsignedBigInteger { 0 } && division_result.quotient != UnsignedBigInteger { 0 };
|
||||||
division_result = division_result.quotient.divided_by(UnsignedBigInteger { 10 })) {
|
division_result = division_result.quotient.divided_by(UnsignedBigInteger { 10 })) {
|
||||||
++size;
|
++size;
|
||||||
}
|
}
|
||||||
return size;
|
return size;
|
||||||
|
|
|
@ -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; }
|
||||||
|
|
|
@ -101,7 +101,7 @@ ThrowCompletionOr<GC::Ref<Object>> ErrorConstructor::construct(FunctionObject& n
|
||||||
auto message = vm.argument(0); \
|
auto message = vm.argument(0); \
|
||||||
auto options = vm.argument(1); \
|
auto options = vm.argument(1); \
|
||||||
\
|
\
|
||||||
/* 2. Let O be ? OrdinaryCreateFromConstructor(newTarget, "%NativeError.prototype%", « [[ErrorData]] »). */ \
|
/* 2. Let O be ? OrdinaryCreateFromConstructor(newTarget, "%NativeError.prototype%", « [[ErrorData]] »). */ \
|
||||||
auto error = TRY(ordinary_create_from_constructor<ClassName>(vm, new_target, &Intrinsics::snake_name##_prototype)); \
|
auto error = TRY(ordinary_create_from_constructor<ClassName>(vm, new_target, &Intrinsics::snake_name##_prototype)); \
|
||||||
\
|
\
|
||||||
/* 3. If message is not undefined, then */ \
|
/* 3. If message is not undefined, then */ \
|
||||||
|
|
|
@ -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;
|
||||||
|
|
|
@ -44,7 +44,7 @@ private:
|
||||||
auto&& _temporary_try_or_reject_result = (expression); \
|
auto&& _temporary_try_or_reject_result = (expression); \
|
||||||
/* 1. If value is an abrupt completion, then */ \
|
/* 1. If value is an abrupt completion, then */ \
|
||||||
if (_temporary_try_or_reject_result.is_error()) { \
|
if (_temporary_try_or_reject_result.is_error()) { \
|
||||||
/* a. Perform ? Call(capability.[[Reject]], undefined, « value.[[Value]] »). */ \
|
/* a. Perform ? Call(capability.[[Reject]], undefined, « value.[[Value]] »). */ \
|
||||||
CALL_CHECK(JS::call(vm, *(capability)->reject(), js_undefined(), *_temporary_try_or_reject_result.release_error().value())); \
|
CALL_CHECK(JS::call(vm, *(capability)->reject(), js_undefined(), *_temporary_try_or_reject_result.release_error().value())); \
|
||||||
\
|
\
|
||||||
/* b. Return capability.[[Promise]]. */ \
|
/* b. Return capability.[[Promise]]. */ \
|
||||||
|
@ -70,7 +70,7 @@ private:
|
||||||
auto&& _temporary_try_or_reject_result = (expression); \
|
auto&& _temporary_try_or_reject_result = (expression); \
|
||||||
/* 1. If value is an abrupt completion, then */ \
|
/* 1. If value is an abrupt completion, then */ \
|
||||||
if (_temporary_try_or_reject_result.is_error()) { \
|
if (_temporary_try_or_reject_result.is_error()) { \
|
||||||
/* a. Perform ? Call(capability.[[Reject]], undefined, « value.[[Value]] »). */ \
|
/* a. Perform ? Call(capability.[[Reject]], undefined, « value.[[Value]] »). */ \
|
||||||
TRY(JS::call(vm, *(capability)->reject(), js_undefined(), *_temporary_try_or_reject_result.release_error().value())); \
|
TRY(JS::call(vm, *(capability)->reject(), js_undefined(), *_temporary_try_or_reject_result.release_error().value())); \
|
||||||
\
|
\
|
||||||
/* b. Return capability.[[Promise]]. */ \
|
/* b. Return capability.[[Promise]]. */ \
|
||||||
|
|
|
@ -71,7 +71,7 @@ void DurationPrototype::initialize(Realm& realm)
|
||||||
/* 2. Perform ? RequireInternalSlot(duration, [[InitializedTemporalDuration]]). */ \
|
/* 2. Perform ? RequireInternalSlot(duration, [[InitializedTemporalDuration]]). */ \
|
||||||
auto duration = TRY(typed_this_object(vm)); \
|
auto duration = TRY(typed_this_object(vm)); \
|
||||||
\
|
\
|
||||||
/* 3. Return 𝔽(duration.[[<unit>]]). */ \
|
/* 3. Return 𝔽(duration.[[<unit>]]). */ \
|
||||||
return duration->unit(); \
|
return duration->unit(); \
|
||||||
}
|
}
|
||||||
JS_ENUMERATE_DURATION_UNITS
|
JS_ENUMERATE_DURATION_UNITS
|
||||||
|
|
|
@ -145,15 +145,15 @@ JS_DEFINE_NATIVE_FUNCTION(PlainDateTimePrototype::era_year_getter)
|
||||||
__JS_ENUMERATE(months_in_year) \
|
__JS_ENUMERATE(months_in_year) \
|
||||||
__JS_ENUMERATE(in_leap_year)
|
__JS_ENUMERATE(in_leap_year)
|
||||||
|
|
||||||
#define __JS_ENUMERATE(field) \
|
#define __JS_ENUMERATE(field) \
|
||||||
JS_DEFINE_NATIVE_FUNCTION(PlainDateTimePrototype::field##_getter) \
|
JS_DEFINE_NATIVE_FUNCTION(PlainDateTimePrototype::field##_getter) \
|
||||||
{ \
|
{ \
|
||||||
/* 1. Let dateTime be the this value. */ \
|
/* 1. Let dateTime be the this value. */ \
|
||||||
/* 2. Perform ? RequireInternalSlot(dateTime, [[InitializedTemporalDateTime]]). */ \
|
/* 2. Perform ? RequireInternalSlot(dateTime, [[InitializedTemporalDateTime]]). */ \
|
||||||
auto date_time = TRY(typed_this_object(vm)); \
|
auto date_time = TRY(typed_this_object(vm)); \
|
||||||
\
|
\
|
||||||
/* 3. Return 𝔽(CalendarISOToDate(dateTime.[[Calendar]], dateTime.[[ISODateTime]].[[ISODate]]).[[<field>]]). */ \
|
/* 3. Return 𝔽(CalendarISOToDate(dateTime.[[Calendar]], dateTime.[[ISODateTime]].[[ISODate]]).[[<field>]]). */ \
|
||||||
return calendar_iso_to_date(date_time->calendar(), date_time->iso_date_time().iso_date).field; \
|
return calendar_iso_to_date(date_time->calendar(), date_time->iso_date_time().iso_date).field; \
|
||||||
}
|
}
|
||||||
JS_ENUMERATE_PLAIN_DATE_TIME_SIMPLE_DATE_FIELDS
|
JS_ENUMERATE_PLAIN_DATE_TIME_SIMPLE_DATE_FIELDS
|
||||||
#undef __JS_ENUMERATE
|
#undef __JS_ENUMERATE
|
||||||
|
@ -191,7 +191,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainDateTimePrototype::month_code_getter)
|
||||||
/* 2. Perform ? RequireInternalSlot(dateTime, [[InitializedTemporalDateTime]]). */ \
|
/* 2. Perform ? RequireInternalSlot(dateTime, [[InitializedTemporalDateTime]]). */ \
|
||||||
auto date_time = TRY(typed_this_object(vm)); \
|
auto date_time = TRY(typed_this_object(vm)); \
|
||||||
\
|
\
|
||||||
/* 3. Return 𝔽(dateTime.[[ISODateTime]].[[Time]].[[<field>]]). */ \
|
/* 3. Return 𝔽(dateTime.[[ISODateTime]].[[Time]].[[<field>]]). */ \
|
||||||
return date_time->iso_date_time().time.field; \
|
return date_time->iso_date_time().time.field; \
|
||||||
}
|
}
|
||||||
JS_ENUMERATE_PLAIN_DATE_TIME_TIME_FIELDS
|
JS_ENUMERATE_PLAIN_DATE_TIME_TIME_FIELDS
|
||||||
|
|
|
@ -72,7 +72,7 @@ void PlainTimePrototype::initialize(Realm& realm)
|
||||||
/* 2. Perform ? RequireInternalSlot(temporalTime, [[InitializedTemporalTime]]). */ \
|
/* 2. Perform ? RequireInternalSlot(temporalTime, [[InitializedTemporalTime]]). */ \
|
||||||
auto temporal_time = TRY(typed_this_object(vm)); \
|
auto temporal_time = TRY(typed_this_object(vm)); \
|
||||||
\
|
\
|
||||||
/* 3. Return 𝔽(temporalTime.[[Time]].[[<field>]]). */ \
|
/* 3. Return 𝔽(temporalTime.[[Time]].[[<field>]]). */ \
|
||||||
return temporal_time->time().field; \
|
return temporal_time->time().field; \
|
||||||
}
|
}
|
||||||
JS_ENUMERATE_PLAIN_TIME_FIELDS
|
JS_ENUMERATE_PLAIN_TIME_FIELDS
|
||||||
|
|
|
@ -186,7 +186,7 @@ JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::era_year_getter)
|
||||||
/* Let isoDateTime be GetISODateTimeFor(zonedDateTime.[[TimeZone]], zonedDateTime.[[EpochNanoseconds]]). */ \
|
/* Let isoDateTime be GetISODateTimeFor(zonedDateTime.[[TimeZone]], zonedDateTime.[[EpochNanoseconds]]). */ \
|
||||||
auto iso_date_time = get_iso_date_time_for(zoned_date_time->time_zone(), zoned_date_time->epoch_nanoseconds()->big_integer()); \
|
auto iso_date_time = get_iso_date_time_for(zoned_date_time->time_zone(), zoned_date_time->epoch_nanoseconds()->big_integer()); \
|
||||||
\
|
\
|
||||||
/* 3. Return 𝔽(CalendarISOToDate(zonedDateTime.[[Calendar]], isoDateTime.[[ISODate]]).[[<field>]]). */ \
|
/* 3. Return 𝔽(CalendarISOToDate(zonedDateTime.[[Calendar]], isoDateTime.[[ISODate]]).[[<field>]]). */ \
|
||||||
return calendar_iso_to_date(zoned_date_time->calendar(), iso_date_time.iso_date).field; \
|
return calendar_iso_to_date(zoned_date_time->calendar(), iso_date_time.iso_date).field; \
|
||||||
}
|
}
|
||||||
JS_ENUMERATE_ZONED_DATE_TIME_SIMPLE_DATE_FIELDS
|
JS_ENUMERATE_ZONED_DATE_TIME_SIMPLE_DATE_FIELDS
|
||||||
|
@ -231,7 +231,7 @@ JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::month_code_getter)
|
||||||
/* Let isoDateTime be GetISODateTimeFor(zonedDateTime.[[TimeZone]], zonedDateTime.[[EpochNanoseconds]]). */ \
|
/* Let isoDateTime be GetISODateTimeFor(zonedDateTime.[[TimeZone]], zonedDateTime.[[EpochNanoseconds]]). */ \
|
||||||
auto iso_date_time = get_iso_date_time_for(zoned_date_time->time_zone(), zoned_date_time->epoch_nanoseconds()->big_integer()); \
|
auto iso_date_time = get_iso_date_time_for(zoned_date_time->time_zone(), zoned_date_time->epoch_nanoseconds()->big_integer()); \
|
||||||
\
|
\
|
||||||
/* 3. Return 𝔽(isoDateTime.[[Time]].[[<field>]]). */ \
|
/* 3. Return 𝔽(isoDateTime.[[Time]].[[<field>]]). */ \
|
||||||
return iso_date_time.time.field; \
|
return iso_date_time.time.field; \
|
||||||
}
|
}
|
||||||
JS_ENUMERATE_PLAIN_DATE_TIME_TIME_FIELDS
|
JS_ENUMERATE_PLAIN_DATE_TIME_TIME_FIELDS
|
||||||
|
|
|
@ -2380,8 +2380,8 @@ ThrowCompletionOr<TriState> is_less_than(VM& vm, Value lhs, Value rhs, bool left
|
||||||
// b. Let ly be the length of py.
|
// b. Let ly be the length of py.
|
||||||
// c. For each integer i such that 0 ≤ i < min(lx, ly), in ascending order, do
|
// c. For each integer i such that 0 ≤ i < min(lx, ly), in ascending order, do
|
||||||
for (auto k = x_code_points.begin(), l = y_code_points.begin();
|
for (auto k = x_code_points.begin(), l = y_code_points.begin();
|
||||||
k != x_code_points.end() && l != y_code_points.end();
|
k != x_code_points.end() && l != y_code_points.end();
|
||||||
++k, ++l) {
|
++k, ++l) {
|
||||||
// i. Let cx be the integer that is the numeric value of the code unit at index i within px.
|
// i. Let cx be the integer that is the numeric value of the code unit at index i within px.
|
||||||
// ii. Let cy be the integer that is the numeric value of the code unit at index i within py.
|
// ii. Let cy be the integer that is the numeric value of the code unit at index i within py.
|
||||||
if (*k != *l) {
|
if (*k != *l) {
|
||||||
|
|
|
@ -176,7 +176,7 @@ Result<GC::Ref<SourceTextModule>, Vector<ParserError>> SourceTextModule::parse(S
|
||||||
[&](ImportEntry const& import_entry) {
|
[&](ImportEntry const& import_entry) {
|
||||||
return import_entry.local_name == entry.local_or_import_name;
|
return import_entry.local_name == entry.local_or_import_name;
|
||||||
})
|
})
|
||||||
.is_end());
|
.is_end());
|
||||||
default_export = export_statement;
|
default_export = export_statement;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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;
|
||||||
};
|
};
|
||||||
|
|
|
@ -263,10 +263,10 @@ bool is_unknown_html_element(FlyString const& tag_name)
|
||||||
if (tag_name.is_one_of(HTML::TagNames::applet, HTML::TagNames::bgsound, HTML::TagNames::blink, HTML::TagNames::isindex, HTML::TagNames::keygen, HTML::TagNames::multicol, HTML::TagNames::nextid, HTML::TagNames::spacer))
|
if (tag_name.is_one_of(HTML::TagNames::applet, HTML::TagNames::bgsound, HTML::TagNames::blink, HTML::TagNames::isindex, HTML::TagNames::keygen, HTML::TagNames::multicol, HTML::TagNames::nextid, HTML::TagNames::spacer))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
// 2. If name is acronym, basefont, big, center, nobr, noembed, noframes, plaintext, rb, rtc, strike, or tt, then return HTMLElement.
|
// 2. If name is acronym, basefont, big, center, nobr, noembed, noframes, plaintext, rb, rtc, strike, or tt, then return HTMLElement.
|
||||||
// 3. If name is listing or xmp, then return HTMLPreElement.
|
// 3. If name is listing or xmp, then return HTMLPreElement.
|
||||||
// 4. Otherwise, if this specification defines an interface appropriate for the element type corresponding to the local name name, then return that interface.
|
// 4. Otherwise, if this specification defines an interface appropriate for the element type corresponding to the local name name, then return that interface.
|
||||||
// 5. If other applicable specifications define an appropriate interface for name, then return the interface they define.
|
// 5. If other applicable specifications define an appropriate interface for name, then return the interface they define.
|
||||||
#define __ENUMERATE_HTML_TAG(name) \
|
#define __ENUMERATE_HTML_TAG(name) \
|
||||||
if (tag_name == HTML::TagNames::name) \
|
if (tag_name == HTML::TagNames::name) \
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -286,7 +286,7 @@ bool URLSearchParams::has(String const& name, Optional<String> const& value)
|
||||||
if (!m_list.find_if([&name, &value](auto& entry) {
|
if (!m_list.find_if([&name, &value](auto& entry) {
|
||||||
return entry.name == name && entry.value == value.value();
|
return entry.name == name && entry.value == value.value();
|
||||||
})
|
})
|
||||||
.is_end()) {
|
.is_end()) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -295,7 +295,7 @@ bool URLSearchParams::has(String const& name, Optional<String> const& value)
|
||||||
if (!m_list.find_if([&name](auto& entry) {
|
if (!m_list.find_if([&name](auto& entry) {
|
||||||
return entry.name == name;
|
return entry.name == name;
|
||||||
})
|
})
|
||||||
.is_end()) {
|
.is_end()) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -600,8 +600,8 @@ bool command_insert_paragraph_action(DOM::Document& document, String const&)
|
||||||
// 12. If container's local name is "address", "listing", or "pre":
|
// 12. If container's local name is "address", "listing", or "pre":
|
||||||
if (is<DOM::Element>(*container)
|
if (is<DOM::Element>(*container)
|
||||||
&& static_cast<DOM::Element&>(*container)
|
&& static_cast<DOM::Element&>(*container)
|
||||||
.local_name()
|
.local_name()
|
||||||
.is_one_of(HTML::TagNames::address, HTML::TagNames::listing, HTML::TagNames::pre)) {
|
.is_one_of(HTML::TagNames::address, HTML::TagNames::listing, HTML::TagNames::pre)) {
|
||||||
// 1. Let br be the result of calling createElement("br") on the context object.
|
// 1. Let br be the result of calling createElement("br") on the context object.
|
||||||
auto br = MUST(DOM::create_element(document, HTML::TagNames::br, Namespace::HTML));
|
auto br = MUST(DOM::create_element(document, HTML::TagNames::br, Namespace::HTML));
|
||||||
|
|
||||||
|
|
|
@ -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 });
|
||||||
};
|
};
|
||||||
|
|
|
@ -688,8 +688,8 @@ TraversableNavigable::HistoryStepResult TraversableNavigable::apply_the_history_
|
||||||
// that is synchronous navigation steps with a target navigable not contained in navigablesThatMustWaitBeforeHandlingSyncNavigation.
|
// that is synchronous navigation steps with a target navigable not contained in navigablesThatMustWaitBeforeHandlingSyncNavigation.
|
||||||
// 2. Remove steps from traversable's session history traversal queue's algorithm set.
|
// 2. Remove steps from traversable's session history traversal queue's algorithm set.
|
||||||
for (auto entry = m_session_history_traversal_queue->first_synchronous_navigation_steps_with_target_navigable_not_contained_in(navigables_that_must_wait_before_handling_sync_navigation);
|
for (auto entry = m_session_history_traversal_queue->first_synchronous_navigation_steps_with_target_navigable_not_contained_in(navigables_that_must_wait_before_handling_sync_navigation);
|
||||||
entry;
|
entry;
|
||||||
entry = m_session_history_traversal_queue->first_synchronous_navigation_steps_with_target_navigable_not_contained_in(navigables_that_must_wait_before_handling_sync_navigation)) {
|
entry = m_session_history_traversal_queue->first_synchronous_navigation_steps_with_target_navigable_not_contained_in(navigables_that_must_wait_before_handling_sync_navigation)) {
|
||||||
|
|
||||||
// 3. Set traversable's running nested apply history step to true.
|
// 3. Set traversable's running nested apply history step to true.
|
||||||
m_running_nested_apply_history_step = true;
|
m_running_nested_apply_history_step = true;
|
||||||
|
|
|
@ -226,9 +226,9 @@ void SVGFormattingContext::run(AvailableSpace const& available_space)
|
||||||
|
|
||||||
CSSPixelPoint offset = viewbox_offset_and_scale.offset;
|
CSSPixelPoint offset = viewbox_offset_and_scale.offset;
|
||||||
m_current_viewbox_transform = Gfx::AffineTransform { m_current_viewbox_transform }.multiply(Gfx::AffineTransform {}
|
m_current_viewbox_transform = Gfx::AffineTransform { m_current_viewbox_transform }.multiply(Gfx::AffineTransform {}
|
||||||
.translate(offset.to_type<float>())
|
.translate(offset.to_type<float>())
|
||||||
.scale(viewbox_offset_and_scale.scale_factor_x, viewbox_offset_and_scale.scale_factor_y)
|
.scale(viewbox_offset_and_scale.scale_factor_x, viewbox_offset_and_scale.scale_factor_y)
|
||||||
.translate({ -viewbox->min_x, -viewbox->min_y }));
|
.translate({ -viewbox->min_x, -viewbox->min_y }));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (svg_box_state.has_definite_width() && svg_box_state.has_definite_height()) {
|
if (svg_box_state.has_definite_width() && svg_box_state.has_definite_height()) {
|
||||||
|
|
|
@ -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