diff options
author | KJ Liew | 2020-07-15 11:24:52 -0700 |
---|---|---|
committer | KJ Liew | 2020-07-15 11:24:52 -0700 |
commit | 1c574814c227b0afc1722759e0d2c30e0675592d (patch) | |
tree | dad9f816b4abf43da3618f78efb071bdc6c429e7 /make-some-of-blink-custom-iterators-STL-compatible.patch | |
parent | f4d657aed67ee28740f932d77097c7e0cd88a790 (diff) | |
download | aur-1c574814c227b0afc1722759e0d2c30e0675592d.tar.gz |
chromium-vaapi-84.0.4147.89-1
Diffstat (limited to 'make-some-of-blink-custom-iterators-STL-compatible.patch')
-rw-r--r-- | make-some-of-blink-custom-iterators-STL-compatible.patch | 95 |
1 files changed, 0 insertions, 95 deletions
diff --git a/make-some-of-blink-custom-iterators-STL-compatible.patch b/make-some-of-blink-custom-iterators-STL-compatible.patch deleted file mode 100644 index 30cbdefcc65f..000000000000 --- a/make-some-of-blink-custom-iterators-STL-compatible.patch +++ /dev/null @@ -1,95 +0,0 @@ -From d3cabbc7321d349a9bffda482df5afc0d4df1ac2 Mon Sep 17 00:00:00 2001 -From: Piotr Tworek <ptworek@vewd.com> -Date: Thu, 30 Apr 2020 21:33:47 +0000 -Subject: [PATCH] Make some of blink custom iterators STL compatible. - -Blink has recently started using functions like std::any_of with some of -the custom iterators it provides. On Linux this works in the default -setup using libcxx, but fails with even the most recent versions of -libstdc++. In all cases the error message (text in bug report) complains -about lack of matching std::__iterator_category definition. - -From what I understand the error message is basically saying those -iterators are not STL compatible due to missing traits as described -in https://en.cppreference.com/w/cpp/iterator/iterator_traits. Such -traits are provided by custom iterators defined in //base, or //cc. - -This patch adds the necessary traits to iterators that are currently -affected by this problem. - -Bug: 1076869 -Change-Id: I9950a7100c32499ba96647317fa70b87dc22eaf9 -Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2174199 -Reviewed-by: Kentaro Hara <haraken@chromium.org> -Commit-Queue: Piotr Tworek <ptworek@vewd.com> -Cr-Commit-Position: refs/heads/master@{#764426} ---- - .../core/layout/ng/ng_physical_container_fragment.h | 6 ++++++ - .../blink/renderer/platform/wtf/hash_iterators.h | 12 ++++++++++++ - third_party/blink/renderer/platform/wtf/hash_table.h | 6 ++++++ - 3 files changed, 24 insertions(+) - -diff --git a/third_party/blink/renderer/core/layout/ng/ng_physical_container_fragment.h b/third_party/blink/renderer/core/layout/ng/ng_physical_container_fragment.h -index 1256e77c146..8b93107f2fc 100644 ---- a/third_party/blink/renderer/core/layout/ng/ng_physical_container_fragment.h -+++ b/third_party/blink/renderer/core/layout/ng/ng_physical_container_fragment.h -@@ -38,6 +38,12 @@ class CORE_EXPORT NGPhysicalContainerFragment : public NGPhysicalFragment { - STACK_ALLOCATED(); - - public: -+ using iterator_category = std::bidirectional_iterator_tag; -+ using value_type = NGLink; -+ using difference_type = ptrdiff_t; -+ using pointer = value_type*; -+ using reference = value_type&; -+ - ConstIterator(const NGLink* current) : current_(current) {} - - const NGLink& operator*() const { return *PostLayoutOrCurrent(); } -diff --git a/third_party/blink/renderer/platform/wtf/hash_iterators.h b/third_party/blink/renderer/platform/wtf/hash_iterators.h -index f8e66e6be85..6003d02c509 100644 ---- a/third_party/blink/renderer/platform/wtf/hash_iterators.h -+++ b/third_party/blink/renderer/platform/wtf/hash_iterators.h -@@ -53,6 +53,12 @@ struct HashTableConstIteratorAdapter<HashTableType, - typedef HashTableConstValuesIterator<HashTableType, KeyType, MappedType> - ValuesIterator; - -+ using iterator_category = std::bidirectional_iterator_tag; -+ using value_type = HashTableType; -+ using difference_type = ptrdiff_t; -+ using pointer = value_type*; -+ using reference = value_type&; -+ - HashTableConstIteratorAdapter() = default; - HashTableConstIteratorAdapter( - const typename HashTableType::const_iterator& impl) -@@ -94,6 +100,12 @@ struct HashTableIteratorAdapter<HashTableType, - typedef HashTableValuesIterator<HashTableType, KeyType, MappedType> - ValuesIterator; - -+ using iterator_category = std::bidirectional_iterator_tag; -+ using value_type = HashTableType; -+ using difference_type = ptrdiff_t; -+ using pointer = value_type*; -+ using reference = value_type&; -+ - HashTableIteratorAdapter() = default; - HashTableIteratorAdapter(const typename HashTableType::iterator& impl) - : impl_(impl) {} -diff --git a/third_party/blink/renderer/platform/wtf/hash_table.h b/third_party/blink/renderer/platform/wtf/hash_table.h -index f596fb5d41e..5a4468d6bd1 100644 ---- a/third_party/blink/renderer/platform/wtf/hash_table.h -+++ b/third_party/blink/renderer/platform/wtf/hash_table.h -@@ -2204,6 +2204,12 @@ struct HashTableConstIteratorAdapter { - STACK_ALLOCATED(); - - public: -+ using iterator_category = std::bidirectional_iterator_tag; -+ using value_type = HashTableType; -+ using difference_type = ptrdiff_t; -+ using pointer = value_type*; -+ using reference = value_type&; -+ - HashTableConstIteratorAdapter() = default; - HashTableConstIteratorAdapter( - const typename HashTableType::const_iterator& impl) |