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

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

Issue 2885053003: [LayoutNG] Replace use of NGPhysicalFragment top/left/width/height (Closed)
Patch Set: 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 4d9fe4ea473542cc1092fe09f823ea7b5c5ceaa7..ef56f49e61b578168c301f6912e204d34aa5c7ca 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
@@ -58,40 +58,27 @@ class CORE_EXPORT NGPhysicalFragment : public RefCounted<NGPhysicalFragment> {
// Returns the border-box size.
NGPhysicalSize Size() const { return size_; }
- LayoutUnit Width() const { return size_.width; }
- LayoutUnit Height() const { return size_.height; }
// Returns the offset relative to the parent fragment's content-box.
- LayoutUnit LeftOffset() const {
- DCHECK(is_placed_);
- return offset_.left;
- }
-
- LayoutUnit TopOffset() const {
- DCHECK(is_placed_);
- return offset_.top;
- }
-
NGPhysicalOffset Offset() const {
DCHECK(is_placed_);
return offset_;
}
- // Should only be used by the parent fragment's layout.
- void SetOffset(NGPhysicalOffset offset) {
- DCHECK(!is_placed_);
- offset_ = offset;
- is_placed_ = true;
- }
-
NGBreakToken* BreakToken() const { return break_token_.Get(); }
-
const ComputedStyle& Style() const;
// GetLayoutObject should only be used when necessary for compatibility
// with LegacyLayout.
LayoutObject* GetLayoutObject() const { return layout_object_; }
+ // Should only be used by the parent fragment's layout.
+ void SetOffset(NGPhysicalOffset offset) {
+ DCHECK(!is_placed_);
+ offset_ = offset;
+ is_placed_ = true;
+ }
+
bool IsPlaced() const { return is_placed_; }
String ToString() const;

Powered by Google App Engine
This is Rietveld 408576698