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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutGeometryMapStep.h

Issue 1698143002: Combine 4 bools into GeometryInfoFlags. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Bitshift. Created 4 years, 10 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/LayoutGeometryMapStep.h
diff --git a/third_party/WebKit/Source/core/layout/LayoutGeometryMapStep.h b/third_party/WebKit/Source/core/layout/LayoutGeometryMapStep.h
index ad70e683ada09bdbd50bb3f5aa45542aa102cbdd..85a7efb43e22d7f1ee60c61d86e7a808948f87a7 100644
--- a/third_party/WebKit/Source/core/layout/LayoutGeometryMapStep.h
+++ b/third_party/WebKit/Source/core/layout/LayoutGeometryMapStep.h
@@ -36,6 +36,14 @@ namespace blink {
class LayoutObject;
+enum GeometryInfoFlag {
+ AccumulatingTransform = 1 << 0,
+ IsNonUniform = 1 << 1, // Mapping depends on the input point, e.g. because of CSS columns.
+ IsFixedPosition = 1 << 2,
+ HasTransform = 1 << 3,
+};
+typedef unsigned GeometryInfoFlags;
+
// Stores data about how to map from one layoutObject to its container.
struct LayoutGeometryMapStep {
DISALLOW_NEW_EXCEPT_PLACEMENT_NEW();
@@ -43,29 +51,20 @@ struct LayoutGeometryMapStep {
: m_layoutObject(o.m_layoutObject)
, m_offset(o.m_offset)
, m_offsetForFixedPosition(o.m_offsetForFixedPosition)
- , m_accumulatingTransform(o.m_accumulatingTransform)
- , m_isNonUniform(o.m_isNonUniform)
- , m_isFixedPosition(o.m_isFixedPosition)
- , m_hasTransform(o.m_hasTransform)
+ , m_flags(o.m_flags)
{
ASSERT(!o.m_transform);
}
- LayoutGeometryMapStep(const LayoutObject* layoutObject, bool accumulatingTransform, bool isNonUniform, bool isFixedPosition, bool hasTransform)
+ LayoutGeometryMapStep(const LayoutObject* layoutObject, GeometryInfoFlags flags)
: m_layoutObject(layoutObject)
- , m_accumulatingTransform(accumulatingTransform)
- , m_isNonUniform(isNonUniform)
- , m_isFixedPosition(isFixedPosition)
- , m_hasTransform(hasTransform)
+ , m_flags(flags)
{
}
const LayoutObject* m_layoutObject;
LayoutSize m_offset;
OwnPtr<TransformationMatrix> m_transform; // Includes offset if non-null.
LayoutSize m_offsetForFixedPosition;
- bool m_accumulatingTransform;
- bool m_isNonUniform; // Mapping depends on the input point, e.g. because of CSS columns.
- bool m_isFixedPosition;
- bool m_hasTransform;
+ GeometryInfoFlags m_flags;
};
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutGeometryMap.cpp ('k') | third_party/WebKit/Source/core/layout/LayoutView.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698