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

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

Issue 2912273002: [LayoutNG] Logicalize NGPaintBorderEdge (Closed)
Patch Set: Rebase, Edge -> Edges 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..81ec470f2e14b08e0c6847b60fc5fa1dc4d00742 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
@@ -6,6 +6,7 @@
#define NGPhysicalFragment_h
#include "core/CoreExport.h"
+#include "core/layout/ng/geometry/ng_border_edges.h"
#include "core/layout/ng/geometry/ng_box_strut.h"
#include "core/layout/ng/geometry/ng_physical_offset.h"
#include "core/layout/ng/geometry/ng_physical_size.h"
@@ -41,15 +42,6 @@ class CORE_EXPORT NGPhysicalFragment : public RefCounted<NGPhysicalFragment> {
// enough to store.
};
- // Which border edges should be painted. Due to fragmentation one or more may
- // be skipped.
- enum NGPaintBorderEdge {
- kTopBorder = 1,
- kRightBorder = 2,
- kBottomBorder = 4,
- kLeftBorder = 8
- };
-
NGFragmentType Type() const { return static_cast<NGFragmentType>(type_); }
bool IsBox() const { return Type() == NGFragmentType::kFragmentBox; }
bool IsText() const { return Type() == NGFragmentType::kFragmentText; }
@@ -63,7 +55,9 @@ class CORE_EXPORT NGPhysicalFragment : public RefCounted<NGPhysicalFragment> {
NGPhysicalSize Size() const { return size_; }
// Bitmask for border edges, see NGPaintBorderEdge.
- unsigned BorderEdges() const { return paint_border_edge_; }
+ NGBorderEdges::Physical BorderEdges() const {
+ return static_cast<NGBorderEdges::Physical>(border_edge_);
+ }
NGPixelSnappedPhysicalBoxStrut BorderWidths() const;
// Returns the offset relative to the parent fragment's content-box.
@@ -110,7 +104,7 @@ class CORE_EXPORT NGPhysicalFragment : public RefCounted<NGPhysicalFragment> {
unsigned type_ : 2; // NGFragmentType
unsigned is_placed_ : 1;
- unsigned paint_border_edge_ : 4; // NGPaintBorderEdge
+ unsigned border_edge_ : 4; // NGPhysicalBorderEdges
private:
void Destroy() const;

Powered by Google App Engine
This is Rietveld 408576698