Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Side by Side Diff: third_party/WebKit/Source/core/layout/ng/inline/ng_inline_node.cc

Issue 2977483002: Revert of [LayoutNG] Set InlineBoxWrapper when copying fragments to LayoutBox (Closed)
Patch Set: Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/WebKit/LayoutTests/TestExpectations ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/layout/ng/inline/ng_inline_node.h" 5 #include "core/layout/ng/inline/ng_inline_node.h"
6 6
7 #include "core/layout/BidiRun.h" 7 #include "core/layout/BidiRun.h"
8 #include "core/layout/LayoutBlockFlow.h" 8 #include "core/layout/LayoutBlockFlow.h"
9 #include "core/layout/LayoutObject.h" 9 #include "core/layout/LayoutObject.h"
10 #include "core/layout/LayoutText.h" 10 #include "core/layout/LayoutText.h"
11 #include "core/layout/api/LineLayoutAPIShim.h"
12 #include "core/layout/line/LineInfo.h" 11 #include "core/layout/line/LineInfo.h"
13 #include "core/layout/line/RootInlineBox.h" 12 #include "core/layout/line/RootInlineBox.h"
14 #include "core/layout/ng/inline/ng_bidi_paragraph.h" 13 #include "core/layout/ng/inline/ng_bidi_paragraph.h"
15 #include "core/layout/ng/inline/ng_inline_break_token.h" 14 #include "core/layout/ng/inline/ng_inline_break_token.h"
16 #include "core/layout/ng/inline/ng_inline_item.h" 15 #include "core/layout/ng/inline/ng_inline_item.h"
17 #include "core/layout/ng/inline/ng_inline_items_builder.h" 16 #include "core/layout/ng/inline/ng_inline_items_builder.h"
18 #include "core/layout/ng/inline/ng_inline_layout_algorithm.h" 17 #include "core/layout/ng/inline/ng_inline_layout_algorithm.h"
19 #include "core/layout/ng/inline/ng_line_box_fragment.h" 18 #include "core/layout/ng/inline/ng_line_box_fragment.h"
20 #include "core/layout/ng/inline/ng_line_breaker.h" 19 #include "core/layout/ng/inline/ng_line_breaker.h"
21 #include "core/layout/ng/inline/ng_physical_line_box_fragment.h" 20 #include "core/layout/ng/inline/ng_physical_line_box_fragment.h"
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 PlaceInlineBoxChildren(flow_box, positions_for_bidi_runs, positions, 141 PlaceInlineBoxChildren(flow_box, positions_for_bidi_runs, positions,
143 text_index, iter == positions.end()); 142 text_index, iter == positions.end());
144 } else { 143 } else {
145 const FragmentPosition& position = positions_for_bidi_runs[text_index++]; 144 const FragmentPosition& position = positions_for_bidi_runs[text_index++];
146 inline_box->SetLogicalLeft(position.offset.inline_offset); 145 inline_box->SetLogicalLeft(position.offset.inline_offset);
147 inline_box->SetLogicalTop(position.offset.block_offset); 146 inline_box->SetLogicalTop(position.offset.block_offset);
148 inline_box->SetLogicalWidth(position.inline_size); 147 inline_box->SetLogicalWidth(position.inline_size);
149 if (inline_box->GetLineLayoutItem().IsBox()) { 148 if (inline_box->GetLineLayoutItem().IsBox()) {
150 LineLayoutBox box(inline_box->GetLineLayoutItem()); 149 LineLayoutBox box(inline_box->GetLineLayoutItem());
151 box.SetLocation(inline_box->Location()); 150 box.SetLocation(inline_box->Location());
152
153 LayoutObject* layout_object = LineLayoutAPIShim::LayoutObjectFrom(box);
154 if (layout_object->IsAtomicInlineLevel())
155 ToLayoutBox(layout_object)->SetInlineBoxWrapper(inline_box);
156 } 151 }
157 } 152 }
158 153
159 if (set_parent_position_from_children) { 154 if (set_parent_position_from_children) {
160 logical_left = std::min(inline_box->LogicalLeft(), logical_left); 155 logical_left = std::min(inline_box->LogicalLeft(), logical_left);
161 logical_right = std::max(inline_box->LogicalRight(), logical_right); 156 logical_right = std::max(inline_box->LogicalRight(), logical_right);
162 logical_top = std::min(inline_box->LogicalTop(), logical_top); 157 logical_top = std::min(inline_box->LogicalTop(), logical_top);
163 } 158 }
164 } 159 }
165 160
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after
546 item.Style() == item.GetLayoutObject()->Style()); 541 item.Style() == item.GetLayoutObject()->Style());
547 } 542 }
548 #endif 543 #endif
549 } 544 }
550 545
551 String NGInlineNode::ToString() const { 546 String NGInlineNode::ToString() const {
552 return String::Format("NGInlineNode"); 547 return String::Format("NGInlineNode");
553 } 548 }
554 549
555 } // namespace blink 550 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/TestExpectations ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698