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

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

Issue 2722613003: [css-grid] "normal" alignment is "start" for replaced elements (Closed)
Patch Set: Applied suggested changes Created 3 years, 10 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 a9a34506718a057c877a0e28a7aa909dffe48fdb..bf6bd6c7d3566b0d43daa8aa67d55e652fc6e950 100644
--- a/third_party/WebKit/Source/core/layout/LayoutGrid.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutGrid.cpp
@@ -1418,24 +1418,28 @@ LayoutUnit LayoutGrid::availableAlignmentSpaceForChildBeforeStretching(
StyleSelfAlignmentData LayoutGrid::alignSelfForChild(
const LayoutBox& child) const {
- if (!child.isAnonymous())
- return child.styleRef().resolvedAlignSelf(selfAlignmentNormalBehavior());
+ if (!child.isAnonymous()) {
+ return child.styleRef().resolvedAlignSelf(
+ selfAlignmentNormalBehavior(&child));
+ }
// All the 'auto' values has been solved by the StyleAdjuster, but it's
// possible that some grid items generate Anonymous boxes, which need to be
// solved during layout.
- return child.styleRef().resolvedAlignSelf(selfAlignmentNormalBehavior(),
+ return child.styleRef().resolvedAlignSelf(selfAlignmentNormalBehavior(&child),
style());
}
StyleSelfAlignmentData LayoutGrid::justifySelfForChild(
const LayoutBox& child) const {
- if (!child.isAnonymous())
- return child.styleRef().resolvedJustifySelf(ItemPositionStretch);
+ if (!child.isAnonymous()) {
+ return child.styleRef().resolvedJustifySelf(
+ selfAlignmentNormalBehavior(&child));
+ }
// All the 'auto' values has been solved by the StyleAdjuster, but it's
// possible that some grid items generate Anonymous boxes, which need to be
// solved during layout.
- return child.styleRef().resolvedJustifySelf(selfAlignmentNormalBehavior(),
- style());
+ return child.styleRef().resolvedJustifySelf(
+ selfAlignmentNormalBehavior(&child), style());
}
GridTrackSizingDirection LayoutGrid::flowAwareDirectionForChild(
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutGrid.h ('k') | third_party/WebKit/Source/core/layout/LayoutObject.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698