StackingContext.cpp 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492
  1. /*
  2. * Copyright (c) 2020-2022, Andreas Kling <andreas@ladybird.org>
  3. * Copyright (c) 2022, Sam Atkins <atkinssj@serenityos.org>
  4. *
  5. * SPDX-License-Identifier: BSD-2-Clause
  6. */
  7. #include <AK/QuickSort.h>
  8. #include <LibGfx/AffineTransform.h>
  9. #include <LibGfx/Matrix4x4.h>
  10. #include <LibGfx/Rect.h>
  11. #include <LibWeb/CSS/StyleValues/TransformationStyleValue.h>
  12. #include <LibWeb/Layout/Box.h>
  13. #include <LibWeb/Layout/ReplacedBox.h>
  14. #include <LibWeb/Layout/Viewport.h>
  15. #include <LibWeb/Painting/PaintableBox.h>
  16. #include <LibWeb/Painting/SVGSVGPaintable.h>
  17. #include <LibWeb/Painting/StackingContext.h>
  18. #include <LibWeb/SVG/SVGMaskElement.h>
  19. namespace Web::Painting {
  20. static void paint_node(Paintable const& paintable, PaintContext& context, PaintPhase phase)
  21. {
  22. paintable.before_paint(context, phase);
  23. paintable.paint(context, phase);
  24. paintable.after_paint(context, phase);
  25. }
  26. StackingContext::StackingContext(Paintable& paintable, StackingContext* parent, size_t index_in_tree_order)
  27. : m_paintable(paintable)
  28. , m_parent(parent)
  29. , m_index_in_tree_order(index_in_tree_order)
  30. {
  31. VERIFY(m_parent != this);
  32. if (m_parent)
  33. m_parent->m_children.append(this);
  34. }
  35. void StackingContext::sort()
  36. {
  37. quick_sort(m_children, [](auto& a, auto& b) {
  38. auto a_z_index = a->paintable().computed_values().z_index().value_or(0);
  39. auto b_z_index = b->paintable().computed_values().z_index().value_or(0);
  40. if (a_z_index == b_z_index)
  41. return a->m_index_in_tree_order < b->m_index_in_tree_order;
  42. return a_z_index < b_z_index;
  43. });
  44. for (auto* child : m_children)
  45. child->sort();
  46. }
  47. void StackingContext::set_last_paint_generation_id(u64 generation_id)
  48. {
  49. if (m_last_paint_generation_id.has_value() && m_last_paint_generation_id.value() >= generation_id) {
  50. dbgln("FIXME: Painting commands are recorded twice for stacking context: {}", m_paintable->layout_node().debug_description());
  51. }
  52. m_last_paint_generation_id = generation_id;
  53. }
  54. static PaintPhase to_paint_phase(StackingContext::StackingContextPaintPhase phase)
  55. {
  56. // There are not a fully correct mapping since some stacking context phases are combined.
  57. switch (phase) {
  58. case StackingContext::StackingContextPaintPhase::Floats:
  59. case StackingContext::StackingContextPaintPhase::BackgroundAndBordersForInlineLevelAndReplaced:
  60. case StackingContext::StackingContextPaintPhase::BackgroundAndBorders:
  61. return PaintPhase::Background;
  62. case StackingContext::StackingContextPaintPhase::Foreground:
  63. return PaintPhase::Foreground;
  64. case StackingContext::StackingContextPaintPhase::FocusAndOverlay:
  65. return PaintPhase::Overlay;
  66. default:
  67. VERIFY_NOT_REACHED();
  68. }
  69. }
  70. void StackingContext::paint_node_as_stacking_context(Paintable const& paintable, PaintContext& context)
  71. {
  72. if (paintable.layout_node().is_svg_svg_box()) {
  73. paint_svg(context, static_cast<PaintableBox const&>(paintable), PaintPhase::Foreground);
  74. return;
  75. }
  76. VERIFY(!paintable.layout_node().is_svg_svg_box());
  77. paint_node(paintable, context, PaintPhase::Background);
  78. paint_node(paintable, context, PaintPhase::Border);
  79. paint_descendants(context, paintable, StackingContextPaintPhase::BackgroundAndBorders);
  80. paint_descendants(context, paintable, StackingContextPaintPhase::Floats);
  81. paint_descendants(context, paintable, StackingContextPaintPhase::BackgroundAndBordersForInlineLevelAndReplaced);
  82. paint_node(paintable, context, PaintPhase::Foreground);
  83. paint_descendants(context, paintable, StackingContextPaintPhase::Foreground);
  84. paint_node(paintable, context, PaintPhase::Outline);
  85. paint_node(paintable, context, PaintPhase::Overlay);
  86. paint_descendants(context, paintable, StackingContextPaintPhase::FocusAndOverlay);
  87. }
  88. void StackingContext::paint_svg(PaintContext& context, PaintableBox const& paintable, PaintPhase phase)
  89. {
  90. if (phase != PaintPhase::Foreground)
  91. return;
  92. paintable.apply_clip_overflow_rect(context, PaintPhase::Foreground);
  93. paint_node(paintable, context, PaintPhase::Background);
  94. paint_node(paintable, context, PaintPhase::Border);
  95. SVGSVGPaintable::paint_descendants(context, paintable, phase);
  96. paintable.clear_clip_overflow_rect(context, PaintPhase::Foreground);
  97. }
  98. void StackingContext::paint_descendants(PaintContext& context, Paintable const& paintable, StackingContextPaintPhase phase)
  99. {
  100. paintable.before_children_paint(context, to_paint_phase(phase));
  101. paintable.for_each_child([&context, phase](auto& child) {
  102. auto* stacking_context = child.stacking_context();
  103. auto const& z_index = child.computed_values().z_index();
  104. if (child.layout_node().is_svg_svg_box()) {
  105. paint_svg(context, static_cast<PaintableBox const&>(child), to_paint_phase(phase));
  106. return IterationDecision::Continue;
  107. }
  108. // NOTE: Grid specification https://www.w3.org/TR/css-grid-2/#z-order says that grid items should be treated
  109. // the same way as CSS2 defines for inline-blocks:
  110. // "For each one of these, treat the element as if it created a new stacking context, but any positioned
  111. // descendants and descendants which actually create a new stacking context should be considered part of
  112. // the parent stacking context, not this new one."
  113. auto should_be_treated_as_stacking_context = child.layout_node().is_grid_item() && !z_index.has_value();
  114. if (should_be_treated_as_stacking_context) {
  115. // FIXME: This may not be fully correct with respect to the paint phases.
  116. if (phase == StackingContextPaintPhase::Foreground)
  117. paint_node_as_stacking_context(child, context);
  118. return IterationDecision::Continue;
  119. }
  120. if (stacking_context)
  121. return IterationDecision::Continue;
  122. if (child.is_positioned() && z_index.value_or(0) == 0)
  123. return IterationDecision::Continue;
  124. bool child_is_inline_or_replaced = child.is_inline() || is<Layout::ReplacedBox>(child.layout_node());
  125. switch (phase) {
  126. case StackingContextPaintPhase::BackgroundAndBorders:
  127. if (!child_is_inline_or_replaced && !child.is_floating()) {
  128. paint_node(child, context, PaintPhase::Background);
  129. paint_node(child, context, PaintPhase::Border);
  130. paint_descendants(context, child, phase);
  131. paint_node(child, context, PaintPhase::TableCollapsedBorder);
  132. }
  133. break;
  134. case StackingContextPaintPhase::Floats:
  135. if (child.is_floating()) {
  136. paint_node(child, context, PaintPhase::Background);
  137. paint_node(child, context, PaintPhase::Border);
  138. paint_descendants(context, child, StackingContextPaintPhase::BackgroundAndBorders);
  139. }
  140. paint_descendants(context, child, phase);
  141. break;
  142. case StackingContextPaintPhase::BackgroundAndBordersForInlineLevelAndReplaced:
  143. if (child_is_inline_or_replaced) {
  144. paint_node(child, context, PaintPhase::Background);
  145. paint_node(child, context, PaintPhase::Border);
  146. paint_node(child, context, PaintPhase::TableCollapsedBorder);
  147. paint_descendants(context, child, StackingContextPaintPhase::BackgroundAndBorders);
  148. }
  149. paint_descendants(context, child, phase);
  150. break;
  151. case StackingContextPaintPhase::Foreground:
  152. paint_node(child, context, PaintPhase::Foreground);
  153. paint_descendants(context, child, phase);
  154. break;
  155. case StackingContextPaintPhase::FocusAndOverlay:
  156. paint_node(child, context, PaintPhase::Outline);
  157. paint_node(child, context, PaintPhase::Overlay);
  158. paint_descendants(context, child, phase);
  159. break;
  160. }
  161. return IterationDecision::Continue;
  162. });
  163. paintable.after_children_paint(context, to_paint_phase(phase));
  164. }
  165. void StackingContext::paint_child(PaintContext& context, StackingContext const& child)
  166. {
  167. VERIFY(!child.paintable().layout_node().is_svg_box());
  168. VERIFY(!child.paintable().layout_node().is_svg_svg_box());
  169. const_cast<StackingContext&>(child).set_last_paint_generation_id(context.paint_generation_id());
  170. auto parent_paintable = child.paintable().parent();
  171. if (parent_paintable)
  172. parent_paintable->before_children_paint(context, PaintPhase::Foreground);
  173. child.paint(context);
  174. if (parent_paintable)
  175. parent_paintable->after_children_paint(context, PaintPhase::Foreground);
  176. }
  177. void StackingContext::paint_internal(PaintContext& context) const
  178. {
  179. VERIFY(!paintable().layout_node().is_svg_box());
  180. if (paintable().layout_node().is_svg_svg_box()) {
  181. paint_svg(context, paintable_box(), PaintPhase::Foreground);
  182. return;
  183. }
  184. // For a more elaborate description of the algorithm, see CSS 2.1 Appendix E
  185. // Draw the background and borders for the context root (steps 1, 2)
  186. paint_node(paintable(), context, PaintPhase::Background);
  187. paint_node(paintable(), context, PaintPhase::Border);
  188. // Stacking contexts formed by positioned descendants with negative z-indices (excluding 0) in z-index order
  189. // (most negative first) then tree order. (step 3)
  190. // Here, we treat non-positioned stacking contexts as if they were positioned, because CSS 2.0 spec does not
  191. // account for new properties like `transform` and `opacity` that can create stacking contexts.
  192. // https://github.com/w3c/csswg-drafts/issues/2717
  193. for (auto* child : m_children) {
  194. if (child->paintable().computed_values().z_index().has_value() && child->paintable().computed_values().z_index().value() < 0)
  195. paint_child(context, *child);
  196. }
  197. // Draw the background and borders for block-level children (step 4)
  198. paint_descendants(context, paintable(), StackingContextPaintPhase::BackgroundAndBorders);
  199. // Draw the non-positioned floats (step 5)
  200. paint_descendants(context, paintable(), StackingContextPaintPhase::Floats);
  201. // Draw inline content, replaced content, etc. (steps 6, 7)
  202. paint_descendants(context, paintable(), StackingContextPaintPhase::BackgroundAndBordersForInlineLevelAndReplaced);
  203. paint_node(paintable(), context, PaintPhase::Foreground);
  204. paint_descendants(context, paintable(), StackingContextPaintPhase::Foreground);
  205. // Draw positioned descendants with z-index `0` or `auto` in tree order. (step 8)
  206. // Here, we treat non-positioned stacking contexts as if they were positioned, because CSS 2.0 spec does not
  207. // account for new properties like `transform` and `opacity` that can create stacking contexts.
  208. // https://github.com/w3c/csswg-drafts/issues/2717
  209. for (auto const& paintable : m_positioned_descendants_and_stacking_contexts_with_stack_level_0) {
  210. // At this point, `paintable_box` is a positioned descendant with z-index: auto.
  211. // FIXME: This is basically duplicating logic found elsewhere in this same function. Find a way to make this more elegant.
  212. auto* parent_paintable = paintable->parent();
  213. if (parent_paintable)
  214. parent_paintable->before_children_paint(context, PaintPhase::Foreground);
  215. if (auto* child = paintable->stacking_context()) {
  216. paint_child(context, *child);
  217. } else {
  218. paint_node_as_stacking_context(paintable, context);
  219. }
  220. if (parent_paintable)
  221. parent_paintable->after_children_paint(context, PaintPhase::Foreground);
  222. };
  223. // Stacking contexts formed by positioned descendants with z-indices greater than or equal to 1 in z-index order
  224. // (smallest first) then tree order. (Step 9)
  225. // Here, we treat non-positioned stacking contexts as if they were positioned, because CSS 2.0 spec does not
  226. // account for new properties like `transform` and `opacity` that can create stacking contexts.
  227. // https://github.com/w3c/csswg-drafts/issues/2717
  228. for (auto* child : m_children) {
  229. if (child->paintable().computed_values().z_index().has_value() && child->paintable().computed_values().z_index().value() >= 1)
  230. paint_child(context, *child);
  231. }
  232. paint_node(paintable(), context, PaintPhase::Outline);
  233. if (context.should_paint_overlay()) {
  234. paint_node(paintable(), context, PaintPhase::Overlay);
  235. paint_descendants(context, paintable(), StackingContextPaintPhase::FocusAndOverlay);
  236. }
  237. }
  238. // FIXME: This extracts the affine 2D part of the full transformation matrix.
  239. // Use the whole matrix when we get better transformation support in LibGfx or use LibGL for drawing the bitmap
  240. Gfx::AffineTransform StackingContext::affine_transform_matrix() const
  241. {
  242. if (paintable().is_paintable_box())
  243. return Gfx::extract_2d_affine_transform(paintable_box().transform());
  244. return Gfx::AffineTransform {};
  245. }
  246. static Gfx::FloatMatrix4x4 matrix_with_scaled_translation(Gfx::FloatMatrix4x4 matrix, float scale)
  247. {
  248. auto* m = matrix.elements();
  249. m[0][3] *= scale;
  250. m[1][3] *= scale;
  251. m[2][3] *= scale;
  252. return matrix;
  253. }
  254. void StackingContext::paint(PaintContext& context) const
  255. {
  256. auto opacity = paintable().computed_values().opacity();
  257. if (opacity == 0.0f)
  258. return;
  259. DisplayListRecorderStateSaver saver(context.display_list_recorder());
  260. auto to_device_pixels_scale = float(context.device_pixels_per_css_pixel());
  261. Gfx::IntRect source_paintable_rect;
  262. if (paintable().is_paintable_box()) {
  263. source_paintable_rect = context.enclosing_device_rect(paintable_box().absolute_paint_rect()).to_type<int>();
  264. } else {
  265. VERIFY_NOT_REACHED();
  266. }
  267. auto transform_matrix = Gfx::FloatMatrix4x4::identity();
  268. Gfx::FloatPoint transform_origin;
  269. if (paintable().is_paintable_box()) {
  270. transform_matrix = paintable_box().transform();
  271. transform_origin = paintable_box().transform_origin().to_type<float>();
  272. }
  273. DisplayListRecorder::PushStackingContextParams push_stacking_context_params {
  274. .opacity = opacity,
  275. .filter = paintable().computed_values().filter(),
  276. .is_fixed_position = paintable().is_fixed_position(),
  277. .source_paintable_rect = source_paintable_rect,
  278. .transform = {
  279. .origin = transform_origin.scaled(to_device_pixels_scale),
  280. .matrix = matrix_with_scaled_translation(transform_matrix, to_device_pixels_scale),
  281. },
  282. };
  283. auto const& computed_values = paintable().computed_values();
  284. if (auto clip_path = computed_values.clip_path(); clip_path.has_value() && clip_path->is_basic_shape()) {
  285. auto const& masking_area = paintable_box().get_masking_area();
  286. auto const& basic_shape = computed_values.clip_path()->basic_shape();
  287. auto path = basic_shape.to_path(*masking_area, paintable().layout_node());
  288. auto device_pixel_scale = context.device_pixels_per_css_pixel();
  289. push_stacking_context_params.clip_path = path.copy_transformed(Gfx::AffineTransform {}.set_scale(device_pixel_scale, device_pixel_scale).set_translation(source_paintable_rect.location().to_type<float>()));
  290. }
  291. auto has_css_transform = paintable().is_paintable_box() && paintable_box().has_css_transform();
  292. context.display_list_recorder().save();
  293. if (has_css_transform) {
  294. paintable_box().apply_clip_overflow_rect(context, PaintPhase::Foreground);
  295. }
  296. if (paintable().is_paintable_box() && paintable_box().scroll_frame_id().has_value()) {
  297. context.display_list_recorder().push_scroll_frame_id(*paintable_box().scroll_frame_id());
  298. }
  299. context.display_list_recorder().push_stacking_context(push_stacking_context_params);
  300. if (paintable().is_paintable_box()) {
  301. if (auto masking_area = paintable_box().get_masking_area(); masking_area.has_value()) {
  302. if (masking_area->is_empty())
  303. return;
  304. auto mask_bitmap = paintable_box().calculate_mask(context, *masking_area);
  305. if (mask_bitmap) {
  306. auto masking_area_rect = context.enclosing_device_rect(*masking_area).to_type<int>();
  307. context.display_list_recorder().apply_mask_bitmap(masking_area_rect.location(), mask_bitmap.release_nonnull(), *paintable_box().get_mask_type());
  308. }
  309. }
  310. }
  311. paint_internal(context);
  312. context.display_list_recorder().pop_stacking_context();
  313. if (paintable().is_paintable_box() && paintable_box().scroll_frame_id().has_value()) {
  314. context.display_list_recorder().pop_scroll_frame_id();
  315. }
  316. if (has_css_transform)
  317. paintable_box().clear_clip_overflow_rect(context, PaintPhase::Foreground);
  318. context.display_list_recorder().restore();
  319. }
  320. TraversalDecision StackingContext::hit_test(CSSPixelPoint position, HitTestType type, Function<TraversalDecision(HitTestResult)> const& callback) const
  321. {
  322. if (!paintable().is_visible())
  323. return TraversalDecision::Continue;
  324. CSSPixelPoint transform_origin { 0, 0 };
  325. if (paintable().is_paintable_box())
  326. transform_origin = paintable_box().transform_origin();
  327. // NOTE: This CSSPixels -> Float -> CSSPixels conversion is because we can't AffineTransform::map() a CSSPixelPoint.
  328. Gfx::FloatPoint offset_position {
  329. (position.x() - transform_origin.x()).to_float(),
  330. (position.y() - transform_origin.y()).to_float()
  331. };
  332. auto transformed_position = affine_transform_matrix().inverse().value_or({}).map(offset_position).to_type<CSSPixels>() + transform_origin;
  333. // NOTE: Hit testing basically happens in reverse painting order.
  334. // https://www.w3.org/TR/CSS22/visuren.html#z-index
  335. // 7. the child stacking contexts with positive stack levels (least positive first).
  336. // NOTE: Hit testing follows reverse painting order, that's why the conditions here are reversed.
  337. for (ssize_t i = m_children.size() - 1; i >= 0; --i) {
  338. auto const& child = *m_children[i];
  339. if (child.paintable().computed_values().z_index().value_or(0) <= 0)
  340. break;
  341. if (child.hit_test(transformed_position, type, callback) == TraversalDecision::Break)
  342. return TraversalDecision::Break;
  343. }
  344. // 6. the child stacking contexts with stack level 0 and the positioned descendants with stack level 0.
  345. for (auto const& paintable : m_positioned_descendants_and_stacking_contexts_with_stack_level_0.in_reverse()) {
  346. if (paintable->stacking_context()) {
  347. if (paintable->stacking_context()->hit_test(transformed_position, type, callback) == TraversalDecision::Break)
  348. return TraversalDecision::Break;
  349. } else {
  350. if (paintable->hit_test(transformed_position, type, callback) == TraversalDecision::Break)
  351. return TraversalDecision::Break;
  352. }
  353. }
  354. // 5. the in-flow, inline-level, non-positioned descendants, including inline tables and inline blocks.
  355. if (paintable().layout_node().children_are_inline() && is<Layout::BlockContainer>(paintable().layout_node())) {
  356. for (auto const* child = paintable().last_child(); child; child = child->previous_sibling()) {
  357. if (child->is_inline() && !child->is_absolutely_positioned() && !child->stacking_context()) {
  358. if (child->hit_test(transformed_position, type, callback) == TraversalDecision::Break)
  359. return TraversalDecision::Break;
  360. }
  361. }
  362. }
  363. // 4. the non-positioned floats.
  364. for (auto const& paintable : m_non_positioned_floating_descendants.in_reverse()) {
  365. if (paintable->hit_test(transformed_position, type, callback) == TraversalDecision::Break)
  366. return TraversalDecision::Break;
  367. }
  368. // 3. the in-flow, non-inline-level, non-positioned descendants.
  369. if (!paintable().layout_node().children_are_inline()) {
  370. for (auto const* child = paintable().last_child(); child; child = child->previous_sibling()) {
  371. if (!child->is_paintable_box())
  372. continue;
  373. auto const& paintable_box = verify_cast<PaintableBox>(*child);
  374. if (!paintable_box.is_absolutely_positioned() && !paintable_box.is_floating() && !paintable_box.stacking_context()) {
  375. if (paintable_box.hit_test(transformed_position, type, callback) == TraversalDecision::Break)
  376. return TraversalDecision::Break;
  377. }
  378. }
  379. }
  380. // 2. the child stacking contexts with negative stack levels (most negative first).
  381. // NOTE: Hit testing follows reverse painting order, that's why the conditions here are reversed.
  382. for (ssize_t i = m_children.size() - 1; i >= 0; --i) {
  383. auto const& child = *m_children[i];
  384. if (child.paintable().computed_values().z_index().value_or(0) >= 0)
  385. break;
  386. if (child.hit_test(transformed_position, type, callback) == TraversalDecision::Break)
  387. return TraversalDecision::Break;
  388. }
  389. CSSPixelPoint enclosing_scroll_offset;
  390. if (is<PaintableBox>(paintable())) {
  391. auto const& paintable_box = static_cast<PaintableBox const&>(paintable());
  392. enclosing_scroll_offset = paintable_box.cumulative_offset_of_enclosing_scroll_frame();
  393. }
  394. auto position_adjusted_by_scroll_offset = transformed_position;
  395. position_adjusted_by_scroll_offset.translate_by(-enclosing_scroll_offset);
  396. // 1. the background and borders of the element forming the stacking context.
  397. if (paintable().is_paintable_box()) {
  398. if (paintable_box().absolute_border_box_rect().contains(position_adjusted_by_scroll_offset.x(), position_adjusted_by_scroll_offset.y())) {
  399. auto hit_test_result = HitTestResult { .paintable = const_cast<PaintableBox&>(paintable_box()) };
  400. if (callback(hit_test_result) == TraversalDecision::Break)
  401. return TraversalDecision::Break;
  402. }
  403. }
  404. return TraversalDecision::Continue;
  405. }
  406. void StackingContext::dump(int indent) const
  407. {
  408. StringBuilder builder;
  409. for (int i = 0; i < indent; ++i)
  410. builder.append(' ');
  411. CSSPixelRect rect;
  412. if (paintable().is_paintable_box()) {
  413. rect = paintable_box().absolute_rect();
  414. } else {
  415. VERIFY_NOT_REACHED();
  416. }
  417. builder.appendff("SC for {} {} [children: {}] (z-index: ", paintable().layout_node().debug_description(), rect, m_children.size());
  418. if (paintable().computed_values().z_index().has_value())
  419. builder.appendff("{}", paintable().computed_values().z_index().value());
  420. else
  421. builder.append("auto"sv);
  422. builder.append(')');
  423. auto affine_transform = affine_transform_matrix();
  424. if (!affine_transform.is_identity()) {
  425. builder.appendff(", transform: {}", affine_transform);
  426. }
  427. dbgln("{}", builder.string_view());
  428. for (auto& child : m_children)
  429. child->dump(indent + 1);
  430. }
  431. }