[cef][wam] Make the recipe work with official chromium release tarballs
[AGL/meta-agl-demo.git] / recipes-wam / cef / files / chromium / 0029-M118-fix-Fix-issue-with-structured-bindinds-captured.patch
1 From f7581fa1a0c25d2b76407bb04fd77031f5108411 Mon Sep 17 00:00:00 2001
2 From: Roger Zanoni <rzanoni@igalia.com>
3 Date: Fri, 3 Nov 2023 21:08:22 -0300
4 Subject: [PATCH 29/33] [M118-fix] Fix issue with structured bindinds captured
5  by nested lambdas
6
7 In clang <=14  the build fails doesn't when lambdas capture
8 aliases created in structured bindinds, so we do a few init-captures to
9 fix that.
10
11 Upstream-Status: Inappropriate
12 Signed-off-by: Roger Zanoni <rzanoni@igalia.com>
13 ---
14  .../core/layout/ng/grid/ng_grid_layout_algorithm.cc    | 10 +++++-----
15  1 file changed, 5 insertions(+), 5 deletions(-)
16
17 diff --git a/third_party/blink/renderer/core/layout/ng/grid/ng_grid_layout_algorithm.cc b/third_party/blink/renderer/core/layout/ng/grid/ng_grid_layout_algorithm.cc
18 index 64c7a7481dd15..71eb55954e253 100644
19 --- a/third_party/blink/renderer/core/layout/ng/grid/ng_grid_layout_algorithm.cc
20 +++ b/third_party/blink/renderer/core/layout/ng/grid/ng_grid_layout_algorithm.cc
21 @@ -3494,7 +3494,7 @@ void NGGridLayoutAlgorithm::PlaceGridItems(
22          To<NGPhysicalBoxFragment>(result->PhysicalFragment());
23      NGBoxFragment fragment(container_writing_direction, physical_fragment);
24  
25 -    auto BaselineOffset = [&](GridTrackSizingDirection track_direction,
26 +    auto BaselineOffset = [&, &layout_data = layout_data](GridTrackSizingDirection track_direction,
27                                LayoutUnit size) -> LayoutUnit {
28        if (!grid_item.IsBaselineAligned(track_direction)) {
29          return LayoutUnit();
30 @@ -3700,7 +3700,7 @@ void NGGridLayoutAlgorithm::PlaceGridItemsForFragmentation(
31    if (BreakToken())
32      child_break_tokens = BreakToken()->ChildBreakTokens();
33  
34 -  auto PlaceItems = [&]() {
35 +  auto PlaceItems = [&, &grid_items = grid_items, &layout_data = layout_data]() {
36      // Reset our state.
37      result_and_offsets.clear();
38      out_of_fragmentainer_space_item_placement.clear();
39 @@ -3933,7 +3933,7 @@ void NGGridLayoutAlgorithm::PlaceGridItemsForFragmentation(
40  
41    // Adjust by |delta| the pre-computed item-offset for all grid items with a
42    // row begin index greater or equal than |row_index|.
43 -  auto AdjustItemOffsets = [&](wtf_size_t row_index, LayoutUnit delta) {
44 +  auto AdjustItemOffsets = [&, &grid_items = grid_items](wtf_size_t row_index, LayoutUnit delta) {
45      auto current_item = grid_items.begin();
46  
47      for (auto& item_placement_data : *grid_items_placement_data) {
48 @@ -3944,7 +3944,7 @@ void NGGridLayoutAlgorithm::PlaceGridItemsForFragmentation(
49  
50    // Adjust our grid break-token data to accommodate the larger item in the row.
51    // Returns true if this function adjusted the break-token data in any way.
52 -  auto ExpandRow = [&]() -> bool {
53 +  auto ExpandRow = [&, &layout_data = layout_data]() -> bool {
54      if (max_row_expansion == 0)
55        return false;
56  
57 @@ -3963,7 +3963,7 @@ void NGGridLayoutAlgorithm::PlaceGridItemsForFragmentation(
58    // Shifts the row where we wish to take a breakpoint (indicated by
59    // |breakpoint_row_set_index|) into the next fragmentainer.
60    // Returns true if this function adjusted the break-token data in any way.
61 -  auto ShiftBreakpointIntoNextFragmentainer = [&]() -> bool {
62 +  auto ShiftBreakpointIntoNextFragmentainer = [&, &layout_data = layout_data]() -> bool {
63      if (breakpoint_row_set_index == kNotFound)
64        return false;
65  
66 -- 
67 2.42.1
68