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

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

Issue 2807113002: [LayoutNG] Use NGLogical[Offset|Size] for NGFragment
Patch Set: Created 3 years, 8 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/geometry/ng_logical_size.h
diff --git a/third_party/WebKit/Source/core/layout/ng/geometry/ng_logical_size.h b/third_party/WebKit/Source/core/layout/ng/geometry/ng_logical_size.h
index 448cd9d0bd9c0eef3ef6b236fcd4f549882fd807..9757dbc288ab4b9299d48d3c884b101d2d15560a 100644
--- a/third_party/WebKit/Source/core/layout/ng/geometry/ng_logical_size.h
+++ b/third_party/WebKit/Source/core/layout/ng/geometry/ng_logical_size.h
@@ -6,6 +6,7 @@
#define NGLogicalSize_h
#include "core/CoreExport.h"
+#include "core/layout/ng/geometry/ng_box_strut.h"
#include "core/layout/ng/ng_writing_mode.h"
#include "platform/LayoutUnit.h"
@@ -25,13 +26,19 @@ struct CORE_EXPORT NGLogicalSize {
LayoutUnit block_size;
NGPhysicalSize ConvertToPhysical(NGWritingMode mode) const;
- bool operator==(const NGLogicalSize& other) const;
bool IsEmpty() const {
return inline_size == LayoutUnit() || block_size == LayoutUnit();
}
+
+ bool operator==(const NGLogicalSize& other) const;
};
+inline NGLogicalSize operator+(const NGLogicalSize& a, const NGBoxStrut& b) {
+ return NGLogicalSize(a.inline_size + b.InlineSum(),
+ a.block_size + b.BlockSum());
+}
+
CORE_EXPORT std::ostream& operator<<(std::ostream&, const NGLogicalSize&);
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698