Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion javascript/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ cmake_minimum_required(VERSION 3.13...3.26)
set(CMAKE_VERBOSE_MAKEFILE on)
project(yoga C CXX)

file(GLOB YOGA_SOURCES CONFIGURE_DEPENDS
file(GLOB_RECURSE YOGA_SOURCES CONFIGURE_DEPENDS
${CMAKE_CURRENT_SOURCE_DIR}/../yoga/*.cpp
${CMAKE_CURRENT_SOURCE_DIR}/../yoga/**/*.cpp)

Expand Down
3 changes: 2 additions & 1 deletion yoga/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ include(${YOGA_ROOT}/cmake/project-defaults.cmake)

file(GLOB SOURCES CONFIGURE_DEPENDS
${CMAKE_CURRENT_SOURCE_DIR}/*.cpp
${CMAKE_CURRENT_SOURCE_DIR}/**/*.cpp)
${CMAKE_CURRENT_SOURCE_DIR}/**/*.cpp
${CMAKE_CURRENT_SOURCE_DIR}/algorithm/grid/*.cpp)

add_library(yogacore STATIC ${SOURCES})

Expand Down
4 changes: 4 additions & 0 deletions yoga/YGNodeStyle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -622,6 +622,8 @@ GridTrackSize gridTrackSizeFromTypeAndValue(YGGridTrackType type, float value) {
case YGGridTrackTypeMinmax:
return GridTrackSize::auto_();
}
// Unreachable, but needed to silence GCC -Wreturn-type
return GridTrackSize::auto_();
}

StyleSizeLength styleSizeLengthFromTypeAndValue(
Expand All @@ -639,6 +641,8 @@ StyleSizeLength styleSizeLengthFromTypeAndValue(
case YGGridTrackTypeMinmax:
return StyleSizeLength::ofAuto();
}
// Unreachable, but needed to silence GCC -Wreturn-type
return StyleSizeLength::ofAuto();
}

} // namespace
Expand Down
19 changes: 19 additions & 0 deletions yoga/algorithm/CalculateLayout.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#include <yoga/algorithm/PixelGrid.h>
#include <yoga/algorithm/SizingMode.h>
#include <yoga/algorithm/TrailingPosition.h>
#include <yoga/algorithm/grid/GridLayout.h>
#include <yoga/debug/AssertFatal.h>
#include <yoga/debug/Log.h>
#include <yoga/event/event.h>
Expand Down Expand Up @@ -1418,6 +1419,24 @@ static void calculateLayoutImpl(
// current node as they will not be traversed
cleanupContentsNodesRecursively(node);

if (node->style().display() == Display::Grid) {
calculateGridLayoutInternal(
node,
availableWidth,
availableHeight,
ownerDirection,
widthSizingMode,
heightSizingMode,
ownerWidth,
ownerHeight,
performLayout,
reason,
layoutMarkerData,
depth,
generationCount);
return;
}

// STEP 1: CALCULATE VALUES FOR REMAINDER OF ALGORITHM
const FlexDirection mainAxis =
resolveDirection(node->style().flexDirection(), direction);
Expand Down
Loading
Loading