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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp

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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/LayoutGeometryMap.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp b/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp
index 3cf9c29073131c37b32e3e797e6b6b4b05d36186..e595ef03b990b9278112bd838c9a1d6f5a2c759e 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp
@@ -976,14 +976,23 @@ const LayoutObject* LayoutBoxModelObject::pushMappingToContainer(const LayoutBox
LayoutSize containerOffset = offsetFromContainer(container, LayoutPoint(), &offsetDependsOnPoint);
bool preserve3D = container->style()->preserves3D() || style()->preserves3D();
+ GeometryInfoFlags flags = 0;
+ if (preserve3D)
+ flags |= AccumulatingTransform;
+ if (offsetDependsOnPoint)
+ flags |= IsNonUniform;
+ if (isFixedPos)
+ flags |= IsFixedPosition;
+ if (hasTransform)
+ flags |= HasTransform;
if (shouldUseTransformFromContainer(container)) {
TransformationMatrix t;
getTransformFromContainer(container, containerOffset, t);
t.translateRight(adjustmentForSkippedAncestor.width().toFloat(), adjustmentForSkippedAncestor.height().toFloat());
- geometryMap.push(this, t, preserve3D, offsetDependsOnPoint, isFixedPos, hasTransform);
+ geometryMap.push(this, t, flags);
} else {
containerOffset += adjustmentForSkippedAncestor;
- geometryMap.push(this, containerOffset, preserve3D, offsetDependsOnPoint, isFixedPos, hasTransform);
+ geometryMap.push(this, containerOffset, flags);
}
return ancestorSkipped ? ancestorToStopAt : container;
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/LayoutGeometryMap.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698