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

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

Issue 2760043004: Move NGConstraintSpace utility methods to a separate file (Closed)
Patch Set: Created 3 years, 9 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_space_utils.h
diff --git a/third_party/WebKit/Source/core/layout/ng/ng_space_utils.h b/third_party/WebKit/Source/core/layout/ng/ng_space_utils.h
new file mode 100644
index 0000000000000000000000000000000000000000..d583b17a828bd789e7c63d5898d18c740135374a
--- /dev/null
+++ b/third_party/WebKit/Source/core/layout/ng/ng_space_utils.h
@@ -0,0 +1,33 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef NGSpaceUtils_h
+#define NGSpaceUtils_h
+
+#include "core/layout/ng/ng_constraint_space.h"
+#include "core/style/ComputedStyle.h"
+#include "wtf/Optional.h"
+
+namespace blink {
+
+// Whether an in-flow block-level child creates a new formatting context.
+//
+// This will *NOT* check the following cases:
+// - The child is out-of-flow, e.g. floating or abs-pos.
+// - The child is a inline-level, e.g. "display: inline-block".
+// - The child establishes a new formatting context, but should be a child of
+// another layout algorithm, e.g. "display: table-caption" or flex-item.
+CORE_EXPORT bool IsNewFormattingContextForInFlowBlockLevelChild(
ikilpatrick 2017/03/21 01:37:55 missing? :P
Gleb Lanbin 2017/03/21 02:01:10 what is missing?
+ const NGConstraintSpace& space,
+ const ComputedStyle& style);
+
+// Gets the clearance offset based on the provided {@code style} and list of
+// exclusions that represent left/right float.
+CORE_EXPORT WTF::Optional<LayoutUnit> GetClearanceOffset(
+ const std::shared_ptr<NGExclusions>& exclusions,
+ const ComputedStyle& style);
+
+} // namespace blink
+
+#endif // NGSpaceUtils_h

Powered by Google App Engine
This is Rietveld 408576698