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

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

Issue 1625993004: [css-align] Avoid the style Reattach whenever align-items changes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed the parsing tests and skipping the rest. Created 4 years, 11 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/LayoutGrid.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutGrid.cpp b/third_party/WebKit/Source/core/layout/LayoutGrid.cpp
index 1044f1d2ab5fc9a592c3f325b2daa8e29e35eabc..4be23dc0bf8c952f78192a6b26c7b4535bb9f89a 100644
--- a/third_party/WebKit/Source/core/layout/LayoutGrid.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutGrid.cpp
@@ -1905,7 +1905,8 @@ LayoutUnit LayoutGrid::columnAxisOffsetForChild(const LayoutBox& child) const
LayoutUnit childBreadth = child.logicalHeight() + child.marginLogicalHeight();
if (childEndLine - childStartLine > 1 && childEndLine < m_rowPositions.size() - 1)
endOfRow -= offsetBetweenTracks(styleRef().alignContentDistribution(), m_rowPositions, childBreadth);
- LayoutUnit offsetFromStartPosition = computeOverflowAlignmentOffset(child.styleRef().alignSelfOverflowAlignment(), endOfRow - startOfRow, childBreadth);
+ OverflowAlignment overflow = ComputedStyle::resolvedAlignment(styleRef(), child.styleRef(), ItemPositionStretch).overflow();
esprehn 2016/01/29 04:20:55 this should be an instance method. styleRef().res
+ LayoutUnit offsetFromStartPosition = computeOverflowAlignmentOffset(overflow, endOfRow - startOfRow, childBreadth);
return startPosition + (axisPosition == GridAxisEnd ? offsetFromStartPosition : offsetFromStartPosition / 2);
}
}

Powered by Google App Engine
This is Rietveld 408576698