[css-grid] Refactoring and new namespace with grid related utility functions
authorjfernandez@igalia.com <jfernandez@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 22 Nov 2017 23:46:15 +0000 (23:46 +0000)
committerjfernandez@igalia.com <jfernandez@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 22 Nov 2017 23:46:15 +0000 (23:46 +0000)
commitbb9723b2530e8806f5c7d31d1df9f99b3e41c27f
tree5264741495c79685089f672be577912f111df5ad
parent66023855c33db2876beab3f08ce7e862300f2fb2
[css-grid] Refactoring and new namespace with grid related utility functions
https://bugs.webkit.org/show_bug.cgi?id=179633

Reviewed by Darin Adler.

Added a new namespace with several utility functions to share logic
between RenderGrid and GridTrackSizingAlgorithm.

No new tests, since no new functionality is added.

* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* rendering/GridLayoutUtils.cpp: Added.
(WebCore::GridLayoutUtils::computeMarginLogicalSizeForChild):
(WebCore::GridLayoutUtils::marginLogicalSizeForChild):
(WebCore::GridLayoutUtils::isOrthogonalChild):
(WebCore::GridLayoutUtils::flowAwareDirectionForChild):
* rendering/GridLayoutUtils.h: Added.
* rendering/GridTrackSizingAlgorithm.cpp:
(WebCore::GridTrackSizingAlgorithm::assumedRowsSizeForOrthogonalChild const):
(WebCore::GridTrackSizingAlgorithmStrategy::logicalHeightForChild const):
(WebCore::GridTrackSizingAlgorithmStrategy::minContentForChild const):
(WebCore::GridTrackSizingAlgorithmStrategy::maxContentForChild const):
(WebCore::GridTrackSizingAlgorithmStrategy::minSizeForChild const):
(WebCore::DefiniteSizeStrategy::minLogicalWidthForChild const):
* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::layoutBlock):
(WebCore::RenderGrid::placeItemsOnGrid const):
(WebCore::RenderGrid::layoutPositionedObject):
(WebCore::RenderGrid::availableAlignmentSpaceForChildBeforeStretching const):
(WebCore::RenderGrid::applyStretchAlignmentToChildIfNeeded):
(WebCore::RenderGrid::isInlineBaselineAlignedChild const):
(WebCore::RenderGrid::firstLineBaseline const):
(WebCore::RenderGrid::columnAxisPositionForChild const):
(WebCore::RenderGrid::rowAxisPositionForChild const):
(WebCore::RenderGrid::columnAxisOffsetForChild const):
(WebCore::RenderGrid::rowAxisOffsetForChild const):
(WebCore::RenderGrid::findChildLogicalPosition const):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@225104 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/Sources.txt
Source/WebCore/rendering/GridLayoutFunctions.cpp [new file with mode: 0644]
Source/WebCore/rendering/GridLayoutFunctions.h [new file with mode: 0644]
Source/WebCore/rendering/GridTrackSizingAlgorithm.cpp
Source/WebCore/rendering/RenderBlockLineLayout.cpp
Source/WebCore/rendering/RenderGrid.cpp
Source/WebCore/rendering/RenderGrid.h
Source/WebCore/rendering/RenderMediaControls.cpp
Source/WebCore/rendering/RootInlineBox.cpp