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

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

Issue 2975663002: [LayoutNG] Set InlineBoxWrapper when copying fragments to LayoutBox (Closed)
Patch Set: TestExpectations 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"
11 #include "core/layout/line/LineInfo.h" 12 #include "core/layout/line/LineInfo.h"
12 #include "core/layout/line/RootInlineBox.h" 13 #include "core/layout/line/RootInlineBox.h"
13 #include "core/layout/ng/inline/ng_bidi_paragraph.h" 14 #include "core/layout/ng/inline/ng_bidi_paragraph.h"
14 #include "core/layout/ng/inline/ng_inline_break_token.h" 15 #include "core/layout/ng/inline/ng_inline_break_token.h"
15 #include "core/layout/ng/inline/ng_inline_item.h" 16 #include "core/layout/ng/inline/ng_inline_item.h"
16 #include "core/layout/ng/inline/ng_inline_items_builder.h" 17 #include "core/layout/ng/inline/ng_inline_items_builder.h"
17 #include "core/layout/ng/inline/ng_inline_layout_algorithm.h" 18 #include "core/layout/ng/inline/ng_inline_layout_algorithm.h"
18 #include "core/layout/ng/inline/ng_line_box_fragment.h" 19 #include "core/layout/ng/inline/ng_line_box_fragment.h"
19 #include "core/layout/ng/inline/ng_line_breaker.h" 20 #include "core/layout/ng/inline/ng_line_breaker.h"
20 #include "core/layout/ng/inline/ng_physical_line_box_fragment.h" 21 #include "core/layout/ng/inline/ng_physical_line_box_fragment.h"
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 PlaceInlineBoxChildren(flow_box, positions_for_bidi_runs, positions, 142 PlaceInlineBoxChildren(flow_box, positions_for_bidi_runs, positions,
142 text_index, iter == positions.end()); 143 text_index, iter == positions.end());
143 } else { 144 } else {
144 const FragmentPosition& position = positions_for_bidi_runs[text_index++]; 145 const FragmentPosition& position = positions_for_bidi_runs[text_index++];
145 inline_box->SetLogicalLeft(position.offset.inline_offset); 146 inline_box->SetLogicalLeft(position.offset.inline_offset);
146 inline_box->SetLogicalTop(position.offset.block_offset); 147 inline_box->SetLogicalTop(position.offset.block_offset);
147 inline_box->SetLogicalWidth(position.inline_size); 148 inline_box->SetLogicalWidth(position.inline_size);
148 if (inline_box->GetLineLayoutItem().IsBox()) { 149 if (inline_box->GetLineLayoutItem().IsBox()) {
149 LineLayoutBox box(inline_box->GetLineLayoutItem()); 150 LineLayoutBox box(inline_box->GetLineLayoutItem());
150 box.SetLocation(inline_box->Location()); 151 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);
151 } 156 }
152 } 157 }
153 158
154 if (set_parent_position_from_children) { 159 if (set_parent_position_from_children) {
155 logical_left = std::min(inline_box->LogicalLeft(), logical_left); 160 logical_left = std::min(inline_box->LogicalLeft(), logical_left);
156 logical_right = std::max(inline_box->LogicalRight(), logical_right); 161 logical_right = std::max(inline_box->LogicalRight(), logical_right);
157 logical_top = std::min(inline_box->LogicalTop(), logical_top); 162 logical_top = std::min(inline_box->LogicalTop(), logical_top);
158 } 163 }
159 } 164 }
160 165
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after
541 item.Style() == item.GetLayoutObject()->Style()); 546 item.Style() == item.GetLayoutObject()->Style());
542 } 547 }
543 #endif 548 #endif
544 } 549 }
545 550
546 String NGInlineNode::ToString() const { 551 String NGInlineNode::ToString() const {
547 return String::Format("NGInlineNode"); 552 return String::Format("NGInlineNode");
548 } 553 }
549 554
550 } // namespace blink 555 } // 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