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

Unified Diff: third_party/WebKit/Source/core/layout/ng/ng_physical_fragment_base.cc

Issue 2546353002: Move oof-descendants to NGPhysicalFragmentBase (Closed)
Patch Set: fix win build problem Created 4 years 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/layout/ng/ng_physical_fragment_base.cc
diff --git a/third_party/WebKit/Source/core/layout/ng/ng_physical_fragment_base.cc b/third_party/WebKit/Source/core/layout/ng/ng_physical_fragment_base.cc
index eba1dcbf77101f8ca162d4e063dc5d0e1f05a0c7..0afd97af7562bb17095b5d617318a1507195ef7c 100644
--- a/third_party/WebKit/Source/core/layout/ng/ng_physical_fragment_base.cc
+++ b/third_party/WebKit/Source/core/layout/ng/ng_physical_fragment_base.cc
@@ -6,9 +6,26 @@
#include "core/layout/ng/ng_physical_fragment.h"
#include "core/layout/ng/ng_physical_text_fragment.h"
+#include "core/style/ComputedStyle.h"
namespace blink {
+NGPhysicalFragmentBase::NGPhysicalFragmentBase(
+ NGPhysicalSize size,
+ NGPhysicalSize overflow,
+ NGFragmentType type,
+ HeapLinkedHashSet<WeakMember<NGBlockNode>>& out_of_flow_descendants,
+ Vector<NGStaticPosition> out_of_flow_positions,
+ NGBreakToken* break_token)
+ : size_(size),
+ overflow_(overflow),
+ break_token_(break_token),
+ type_(type),
+ has_been_placed_(false) {
+ out_of_flow_descendants_.swap(out_of_flow_descendants);
+ out_of_flow_positions_.swap(out_of_flow_positions);
+}
+
DEFINE_TRACE(NGPhysicalFragmentBase) {
if (Type() == kFragmentText)
static_cast<NGPhysicalTextFragment*>(this)->traceAfterDispatch(visitor);
@@ -23,4 +40,9 @@ void NGPhysicalFragmentBase::finalizeGarbageCollectedObject() {
static_cast<NGPhysicalFragment*>(this)->~NGPhysicalFragment();
}
+DEFINE_TRACE_AFTER_DISPATCH(NGPhysicalFragmentBase) {
+ visitor->trace(out_of_flow_descendants_);
+ visitor->trace(break_token_);
+}
+
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698