ENABLE(ASSERT) used in grid code when !ASSERT_DISABLED is desired
authormcatanzaro@igalia.com <mcatanzaro@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 4 Oct 2018 16:56:11 +0000 (16:56 +0000)
committermcatanzaro@igalia.com <mcatanzaro@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 4 Oct 2018 16:56:11 +0000 (16:56 +0000)
https://bugs.webkit.org/show_bug.cgi?id=190145

Reviewed by Javier Fernandez.

Replace ENABLE(ASSERT), which doesn't exist, with !ASSERT_DISABLED.

* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::placeItemsOnGrid const):
(WebCore::RenderGrid::baselinePosition const):
* rendering/style/GridArea.h:
(WebCore::GridSpan::GridSpan):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@236834 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderGrid.cpp
Source/WebCore/rendering/style/GridArea.h

index 50fecc7..5e78162 100644 (file)
@@ -1,3 +1,18 @@
+2018-10-04  Michael Catanzaro  <mcatanzaro@igalia.com>
+
+        ENABLE(ASSERT) used in grid code when !ASSERT_DISABLED is desired
+        https://bugs.webkit.org/show_bug.cgi?id=190145
+
+        Reviewed by Javier Fernandez.
+
+        Replace ENABLE(ASSERT), which doesn't exist, with !ASSERT_DISABLED.
+
+        * rendering/RenderGrid.cpp:
+        (WebCore::RenderGrid::placeItemsOnGrid const):
+        (WebCore::RenderGrid::baselinePosition const):
+        * rendering/style/GridArea.h:
+        (WebCore::GridSpan::GridSpan):
+
 2018-10-04  Dan Bernstein  <mitz@apple.com>
 
         WebCore part of [Xcode] Update some build settings as recommended by Xcode 10
index e0ca1c2..8975de4 100644 (file)
@@ -606,7 +606,7 @@ void RenderGrid::placeItemsOnGrid(Grid& grid, std::optional<LayoutUnit> availabl
     }
     grid.setHasAnyOrthogonalGridItem(hasAnyOrthogonalGridItem);
 
-#if ENABLE(ASSERT)
+#if !ASSERT_DISABLED
     if (grid.hasGridItems()) {
         ASSERT(grid.numTracks(ForRows) >= GridPositionsResolver::explicitGridRowCount(style(), grid.autoRepeatTracks(ForRows)));
         ASSERT(grid.numTracks(ForColumns) >= GridPositionsResolver::explicitGridColumnCount(style(), grid.autoRepeatTracks(ForColumns)));
@@ -622,7 +622,7 @@ void RenderGrid::placeItemsOnGrid(Grid& grid, std::optional<LayoutUnit> availabl
 
     grid.setNeedsItemsPlacement(false);
 
-#if ENABLE(ASSERT)
+#if !ASSERT_DISABLED
     for (auto* child = grid.orderIterator().first(); child; child = grid.orderIterator().next()) {
         if (grid.orderIterator().shouldSkipChild(*child))
             continue;
@@ -1144,7 +1144,7 @@ bool RenderGrid::isInlineBaselineAlignedChild(const RenderBox& child) const
 // FIXME: This logic is shared by RenderFlexibleBox, so it might be refactored somehow.
 int RenderGrid::baselinePosition(FontBaseline, bool, LineDirectionMode direction, LinePositionMode mode) const
 {
-#if ENABLE(ASSERT)
+#if !ASSERT_DISABLED
     ASSERT(mode == PositionOnContainingLine);
 #else
     UNUSED_PARAM(mode);
index a5890be..81e66b2 100644 (file)
@@ -148,7 +148,7 @@ private:
     GridSpan(int startLine, int endLine, GridSpanType type)
         : m_type(type)
     {
-#if ENABLE(ASSERT)
+#if !ASSERT_DISABLED
         ASSERT(startLine < endLine);
         if (type == TranslatedDefinite) {
             ASSERT(startLine >= 0);