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

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

Issue 2842983002: [LayoutNG] Paint inlines from the fragment tree
Patch Set: Rebase w/HEAD Created 3 years, 7 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_physical_fragment.h
diff --git a/third_party/WebKit/Source/core/layout/ng/ng_physical_fragment.h b/third_party/WebKit/Source/core/layout/ng/ng_physical_fragment.h
index bce1947420922c527c4e2971d4994c0b94195148..dbdf9d60c19f3811dce131a074c7fa5c027d72a5 100644
--- a/third_party/WebKit/Source/core/layout/ng/ng_physical_fragment.h
+++ b/third_party/WebKit/Source/core/layout/ng/ng_physical_fragment.h
@@ -11,6 +11,7 @@
#include "core/layout/ng/geometry/ng_physical_size.h"
#include "core/layout/ng/ng_break_token.h"
#include "platform/LayoutUnit.h"
+#include "platform/graphics/paint/DisplayItemClient.h"
#include "platform/heap/Handle.h"
#include "platform/wtf/RefPtr.h"
#include "platform/wtf/Vector.h"
@@ -31,7 +32,8 @@ class LayoutObject;
// Layout code should only access geometry information through the
// NGFragment wrapper classes which transforms information into the logical
// coordinate system.
-class CORE_EXPORT NGPhysicalFragment : public RefCounted<NGPhysicalFragment> {
+class CORE_EXPORT NGPhysicalFragment : public RefCounted<NGPhysicalFragment>,
+ public DisplayItemClient {
public:
enum NGFragmentType {
kFragmentBox = 0,
@@ -64,6 +66,7 @@ class CORE_EXPORT NGPhysicalFragment : public RefCounted<NGPhysicalFragment> {
// Bitmask for border edges, see NGPaintBorderEdge.
unsigned BorderEdges() const { return paint_border_edge_; }
+
NGPixelSnappedPhysicalBoxStrut BorderWidths() const;
// Returns the offset relative to the parent fragment's content-box.
@@ -79,6 +82,20 @@ class CORE_EXPORT NGPhysicalFragment : public RefCounted<NGPhysicalFragment> {
// with LegacyLayout.
LayoutObject* GetLayoutObject() const { return layout_object_; }
+ // Legacy LayoutObject methods. Need to be reviewed.
+ bool HasOverflowClip() const { return false; }
+
+ // DisplayItemClient methods
+ String DebugName() const override { return "NGPhysicalFragment"; }
+ LayoutRect VisualRect() const {
+ return LayoutRect(LayoutPoint(), LayoutSize(Size().width, Size().height));
+ }
+
+ LayoutRect VisualOverflowRect() const {
+ // TODO(layout-dev): Implement?
+ return VisualRect();
+ }
+
// Should only be used by the parent fragment's layout.
void SetOffset(NGPhysicalOffset offset) {
DCHECK(!is_placed_);
@@ -87,7 +104,6 @@ class CORE_EXPORT NGPhysicalFragment : public RefCounted<NGPhysicalFragment> {
}
bool IsPlaced() const { return is_placed_; }
-
String ToString() const;
// Override RefCounted's deref() to ensure operator delete is called on the
« no previous file with comments | « third_party/WebKit/Source/core/layout/ng/layout_ng_block_flow.cc ('k') | third_party/WebKit/Source/core/paint/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698