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

Unified Diff: third_party/WebKit/Source/core/layout/ng/ng_box.h

Issue 2282213002: [LayoutNG] Introduce NGPhysicalFragment and make NGFragment a 'view' (Closed)
Patch Set: address comments. Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/layout/ng/ng_box.h
diff --git a/third_party/WebKit/Source/core/layout/ng/ng_box.h b/third_party/WebKit/Source/core/layout/ng/ng_box.h
index a2cd5647e6d69960ddb3226056f316114a50b3e7..d000b1b2abdb9e5a68a58bfbecbdafa56653ae35 100644
--- a/third_party/WebKit/Source/core/layout/ng/ng_box.h
+++ b/third_party/WebKit/Source/core/layout/ng/ng_box.h
@@ -16,6 +16,7 @@ class LayoutBox;
class NGBlockLayoutAlgorithm;
class NGConstraintSpace;
class NGFragment;
+class NGPhysicalFragment;
// Represents a node to be laid out.
class CORE_EXPORT NGBox final : public GarbageCollected<NGBox> {
@@ -34,18 +35,21 @@ class CORE_EXPORT NGBox final : public GarbageCollected<NGBox> {
NGBox* FirstChild() const;
+ DEFINE_INLINE_VIRTUAL_TRACE() {
+ visitor->trace(algorithm_);
+ visitor->trace(fragment_);
+ }
+
+ private:
// This is necessary for interop between old and new trees -- after our parent
// positions us, it calls this function so we can store the position on the
// underlying LayoutBox.
- void PositionUpdated(const NGFragment&);
-
- DEFINE_INLINE_VIRTUAL_TRACE() { visitor->trace(algorithm_); }
-
- private:
+ void PositionUpdated();
bool CanUseNewLayout();
LayoutBox* layout_box_;
Member<NGBlockLayoutAlgorithm> algorithm_;
+ Member<NGPhysicalFragment> fragment_;
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698