[css-grid] Refactor cachedGridCoordinate() to cachedGridSpan()
authorrego@igalia.com <rego@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 9 Nov 2015 14:46:49 +0000 (14:46 +0000)
committerrego@igalia.com <rego@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 9 Nov 2015 14:46:49 +0000 (14:46 +0000)
commit82340249229fe0629334770647ddd7f1b9cffedb
treeac5b6f832197d95b6fddd95b510d0836cdaa4914
parent41bbf8e81ad10567bc0a9a0db2deb410bc90c6bf
[css-grid] Refactor cachedGridCoordinate() to cachedGridSpan()
https://bugs.webkit.org/show_bug.cgi?id=151017

Reviewed by Sergio Villar Senin.

We were using cachedGridCoordinate() in lots of places and checking the
direction just in the next line. Creating a generic function to do this.

No new tests, no behavior change.

* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::computeUsedBreadthOfGridTracks):
(WebCore::GridItemWithSpan::GridItemWithSpan):
(WebCore::GridItemWithSpan::span):
(WebCore::GridItemWithSpan::operator<):
(WebCore::RenderGrid::spanningItemCrossesFlexibleSizedTracks):
(WebCore::RenderGrid::resolveContentBasedTrackSizingFunctions):
(WebCore::RenderGrid::resolveContentBasedTrackSizingFunctionsForNonSpanningItems):
(WebCore::RenderGrid::resolveContentBasedTrackSizingFunctionsForItems):
(WebCore::RenderGrid::cachedGridSpan):
(WebCore::RenderGrid::gridAreaBreadthForChild):
(WebCore::RenderGrid::gridAreaBreadthForChildIncludingAlignmentOffsets):
(WebCore::RenderGrid::columnAxisOffsetForChild):
(WebCore::RenderGrid::rowAxisOffsetForChild):
(WebCore::GridItemWithSpan::gridItem): Deleted.
(WebCore::RenderGrid::populateGridPositions): Deleted.
* rendering/RenderGrid.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@192156 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderGrid.cpp
Source/WebCore/rendering/RenderGrid.h