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

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

Issue 2803323002: Avoiding name collisions between flexbox and grid (Closed)
Patch Set: Moved functions around. 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/GridTrackSizingAlgorithm.cpp
diff --git a/third_party/WebKit/Source/core/layout/GridTrackSizingAlgorithm.cpp b/third_party/WebKit/Source/core/layout/GridTrackSizingAlgorithm.cpp
index 2d251c65ac86e7df961147e8e5ea2d8be06dce44..eb26cb9cd714212034e0c55fb810b4c82c091125 100644
--- a/third_party/WebKit/Source/core/layout/GridTrackSizingAlgorithm.cpp
+++ b/third_party/WebKit/Source/core/layout/GridTrackSizingAlgorithm.cpp
@@ -125,9 +125,10 @@ class DefiniteSizeStrategy final : public GridTrackSizingAlgorithmStrategy {
};
// TODO(svillar): Repeated in LayoutGrid.
-static LayoutUnit computeMarginLogicalSizeForChild(MarginDirection forDirection,
- const LayoutGrid* grid,
- const LayoutBox& child) {
+LayoutUnit GridTrackSizingAlgorithmStrategy::computeMarginLogicalSizeForChild(
+ MarginDirection forDirection,
+ const LayoutGrid* grid,
+ const LayoutBox& child) {
if (!child.styleRef().hasMargin())
return LayoutUnit();
@@ -147,15 +148,17 @@ static LayoutUnit computeMarginLogicalSizeForChild(MarginDirection forDirection,
return marginStart + marginEnd;
}
-static bool hasOverrideContainingBlockContentSizeForChild(
- const LayoutBox& child,
- GridTrackSizingDirection direction) {
+bool GridTrackSizingAlgorithmStrategy::
+ hasOverrideContainingBlockContentSizeForChild(
+ const LayoutBox& child,
+ GridTrackSizingDirection direction) {
return direction == ForColumns
? child.hasOverrideContainingBlockLogicalWidth()
: child.hasOverrideContainingBlockLogicalHeight();
}
-static LayoutUnit overrideContainingBlockContentSizeForChild(
+LayoutUnit
+GridTrackSizingAlgorithmStrategy::overrideContainingBlockContentSizeForChild(
const LayoutBox& child,
GridTrackSizingDirection direction) {
return direction == ForColumns
@@ -163,9 +166,10 @@ static LayoutUnit overrideContainingBlockContentSizeForChild(
: child.overrideContainingBlockContentLogicalHeight();
}
-static bool shouldClearOverrideContainingBlockContentSizeForChild(
- const LayoutBox& child,
- GridTrackSizingDirection direction) {
+bool GridTrackSizingAlgorithmStrategy::
+ shouldClearOverrideContainingBlockContentSizeForChild(
+ const LayoutBox& child,
+ GridTrackSizingDirection direction) {
if (direction == ForColumns) {
return child.hasRelativeLogicalWidth() ||
child.styleRef().logicalWidth().isIntrinsicOrAuto();
@@ -174,17 +178,19 @@ static bool shouldClearOverrideContainingBlockContentSizeForChild(
child.styleRef().logicalHeight().isIntrinsicOrAuto();
}
-static void setOverrideContainingBlockContentSizeForChild(
- LayoutBox& child,
- GridTrackSizingDirection direction,
- LayoutUnit size) {
+void GridTrackSizingAlgorithmStrategy::
+ setOverrideContainingBlockContentSizeForChild(
+ LayoutBox& child,
+ GridTrackSizingDirection direction,
+ LayoutUnit size) {
if (direction == ForColumns)
child.setOverrideContainingBlockContentLogicalWidth(size);
else
child.setOverrideContainingBlockContentLogicalHeight(size);
}
-static GridTrackSizingDirection flowAwareDirectionForChild(
+GridTrackSizingDirection
+GridTrackSizingAlgorithmStrategy::flowAwareDirectionForChild(
const LayoutGrid* layoutGrid,
const LayoutBox& child,
GridTrackSizingDirection direction) {

Powered by Google App Engine
This is Rietveld 408576698