OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 #include "core/layout/LayoutInline.h" | 42 #include "core/layout/LayoutInline.h" |
43 #include "core/layout/LayoutMultiColumnFlowThread.h" | 43 #include "core/layout/LayoutMultiColumnFlowThread.h" |
44 #include "core/layout/LayoutMultiColumnSpannerPlaceholder.h" | 44 #include "core/layout/LayoutMultiColumnSpannerPlaceholder.h" |
45 #include "core/layout/LayoutPagedFlowThread.h" | 45 #include "core/layout/LayoutPagedFlowThread.h" |
46 #include "core/layout/LayoutView.h" | 46 #include "core/layout/LayoutView.h" |
47 #include "core/layout/TextAutosizer.h" | 47 #include "core/layout/TextAutosizer.h" |
48 #include "core/layout/line/GlyphOverflow.h" | 48 #include "core/layout/line/GlyphOverflow.h" |
49 #include "core/layout/line/InlineIterator.h" | 49 #include "core/layout/line/InlineIterator.h" |
50 #include "core/layout/line/InlineTextBox.h" | 50 #include "core/layout/line/InlineTextBox.h" |
51 #include "core/layout/line/LineWidth.h" | 51 #include "core/layout/line/LineWidth.h" |
| 52 #include "core/layout/ng/layout_ng_block_flow.h" |
52 #include "core/layout/shapes/ShapeOutsideInfo.h" | 53 #include "core/layout/shapes/ShapeOutsideInfo.h" |
53 #include "core/paint/BlockFlowPaintInvalidator.h" | 54 #include "core/paint/BlockFlowPaintInvalidator.h" |
54 #include "core/paint/PaintLayer.h" | 55 #include "core/paint/PaintLayer.h" |
55 #include "platform/RuntimeEnabledFeatures.h" | 56 #include "platform/RuntimeEnabledFeatures.h" |
56 #include "platform/wtf/PtrUtil.h" | 57 #include "platform/wtf/PtrUtil.h" |
57 | 58 |
58 namespace blink { | 59 namespace blink { |
59 | 60 |
60 bool LayoutBlockFlow::can_propagate_float_into_sibling_ = false; | 61 bool LayoutBlockFlow::can_propagate_float_into_sibling_ = false; |
61 | 62 |
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
249 | 250 |
250 LayoutBlockFlow::LayoutBlockFlow(ContainerNode* node) : LayoutBlock(node) { | 251 LayoutBlockFlow::LayoutBlockFlow(ContainerNode* node) : LayoutBlock(node) { |
251 static_assert(sizeof(MarginInfo) == sizeof(SameSizeAsMarginInfo), | 252 static_assert(sizeof(MarginInfo) == sizeof(SameSizeAsMarginInfo), |
252 "MarginInfo should stay small"); | 253 "MarginInfo should stay small"); |
253 SetChildrenInline(true); | 254 SetChildrenInline(true); |
254 } | 255 } |
255 | 256 |
256 LayoutBlockFlow::~LayoutBlockFlow() {} | 257 LayoutBlockFlow::~LayoutBlockFlow() {} |
257 | 258 |
258 LayoutBlockFlow* LayoutBlockFlow::CreateAnonymous(Document* document) { | 259 LayoutBlockFlow* LayoutBlockFlow::CreateAnonymous(Document* document) { |
259 LayoutBlockFlow* layout_block_flow = new LayoutBlockFlow(nullptr); | 260 LayoutBlockFlow* layout_block_flow = RuntimeEnabledFeatures::layoutNGEnabled() |
| 261 ? new LayoutNGBlockFlow(nullptr) |
| 262 : new LayoutBlockFlow(nullptr); |
260 layout_block_flow->SetDocumentForAnonymous(document); | 263 layout_block_flow->SetDocumentForAnonymous(document); |
261 return layout_block_flow; | 264 return layout_block_flow; |
262 } | 265 } |
263 | 266 |
264 LayoutObject* LayoutBlockFlow::LayoutSpecialExcludedChild( | 267 LayoutObject* LayoutBlockFlow::LayoutSpecialExcludedChild( |
265 bool relayout_children, | 268 bool relayout_children, |
266 SubtreeLayoutScope& layout_scope) { | 269 SubtreeLayoutScope& layout_scope) { |
267 LayoutMultiColumnFlowThread* flow_thread = MultiColumnFlowThread(); | 270 LayoutMultiColumnFlowThread* flow_thread = MultiColumnFlowThread(); |
268 if (!flow_thread) | 271 if (!flow_thread) |
269 return nullptr; | 272 return nullptr; |
(...skipping 4385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4655 return LayoutBlock::InvalidatePaint(paint_invalidation_state); | 4658 return LayoutBlock::InvalidatePaint(paint_invalidation_state); |
4656 } | 4659 } |
4657 | 4660 |
4658 void LayoutBlockFlow::InvalidateDisplayItemClients( | 4661 void LayoutBlockFlow::InvalidateDisplayItemClients( |
4659 PaintInvalidationReason invalidation_reason) const { | 4662 PaintInvalidationReason invalidation_reason) const { |
4660 BlockFlowPaintInvalidator(*this).InvalidateDisplayItemClients( | 4663 BlockFlowPaintInvalidator(*this).InvalidateDisplayItemClients( |
4661 invalidation_reason); | 4664 invalidation_reason); |
4662 } | 4665 } |
4663 | 4666 |
4664 } // namespace blink | 4667 } // namespace blink |
OLD | NEW |