Commit 4f50b5b0 authored by Koji Ishii's avatar Koji Ishii Committed by Commit Bot

[LayoutNG] Follow up on CL:1607719

This patch addresses review comment on crrev.com/c/1607719
by adding more comments.

No behavior changes.

Change-Id: I1362fd4dd18467eeb0e30aecb0e80c7cf9bd43cf
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1609718Reviewed-by: default avatarChristian Biesinger <cbiesinger@chromium.org>
Commit-Queue: Christian Biesinger <cbiesinger@chromium.org>
Commit-Queue: Koji Ishii <kojii@chromium.org>
Cr-Commit-Position: refs/heads/master@{#659133}
parent 74c81f02
...@@ -435,7 +435,8 @@ unsigned NGInlineLayoutStateStack::UpdateBoxDataFragmentRange( ...@@ -435,7 +435,8 @@ unsigned NGInlineLayoutStateStack::UpdateBoxDataFragmentRange(
box_data_list_[box_data_index - 1].fragmented_box_data_index = box_data_list_[box_data_index - 1].fragmented_box_data_index =
box_data_list_.size(); box_data_list_.size();
// Do not use `emplace_back()` here because adding to |box_data_list_| may // Do not use `emplace_back()` here because adding to |box_data_list_| may
// reallocate the buffer. Create a new instance and |push_back()| instead. // reallocate the buffer, but the `BoxData` ctor must run before the
// reallocation. Create a new instance and |push_back()| instead.
BoxData fragmented_box_data(box_data_list_[box_data_index - 1], BoxData fragmented_box_data(box_data_list_[box_data_index - 1],
start_index, index); start_index, index);
box_data_list_.push_back(fragmented_box_data); box_data_list_.push_back(fragmented_box_data);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment