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

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutGrid.h

Issue 2722613003: [css-grid] "normal" alignment is "start" for replaced elements (Closed)
Patch Set: New version Created 3 years, 9 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2011 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 // TODO(svillar): We need these for the GridTrackSizingAlgorithm. Let's figure 89 // TODO(svillar): We need these for the GridTrackSizingAlgorithm. Let's figure
90 // it out how to remove this dependency. 90 // it out how to remove this dependency.
91 LayoutUnit guttersSize(const Grid&, 91 LayoutUnit guttersSize(const Grid&,
92 GridTrackSizingDirection, 92 GridTrackSizingDirection,
93 size_t startLine, 93 size_t startLine,
94 size_t span, 94 size_t span,
95 SizingOperation) const; 95 SizingOperation) const;
96 bool cachedHasDefiniteLogicalHeight() const; 96 bool cachedHasDefiniteLogicalHeight() const;
97 bool isOrthogonalChild(const LayoutBox&) const; 97 bool isOrthogonalChild(const LayoutBox&) const;
98 98
99 protected:
100 ItemPosition selfAlignmentNormalBehavior(
101 const LayoutBox* child = nullptr) const override {
102 DCHECK(child);
103 if (child->isLayoutReplaced())
jfernandez 2017/03/01 22:58:53 Just a suggestion; wouldn't be these lines the bes
Manuel Rego 2017/03/01 23:23:30 Indeed.
104 return ItemPositionStart;
105 return ItemPositionStretch;
106 }
107
99 private: 108 private:
100 bool isOfType(LayoutObjectType type) const override { 109 bool isOfType(LayoutObjectType type) const override {
101 return type == LayoutObjectLayoutGrid || LayoutBlock::isOfType(type); 110 return type == LayoutObjectLayoutGrid || LayoutBlock::isOfType(type);
102 } 111 }
103 void computeIntrinsicLogicalWidths( 112 void computeIntrinsicLogicalWidths(
104 LayoutUnit& minLogicalWidth, 113 LayoutUnit& minLogicalWidth,
105 LayoutUnit& maxLogicalWidth) const override; 114 LayoutUnit& maxLogicalWidth) const override;
106 115
107 LayoutUnit computeIntrinsicLogicalContentHeightUsing( 116 LayoutUnit computeIntrinsicLogicalContentHeightUsing(
108 const Length& logicalHeightLength, 117 const Length& logicalHeightLength,
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 LayoutUnit m_maxContentHeight{-1}; 258 LayoutUnit m_maxContentHeight{-1};
250 259
251 Optional<bool> m_hasDefiniteLogicalHeight; 260 Optional<bool> m_hasDefiniteLogicalHeight;
252 }; 261 };
253 262
254 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutGrid, isLayoutGrid()); 263 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutGrid, isLayoutGrid());
255 264
256 } // namespace blink 265 } // namespace blink
257 266
258 #endif // LayoutGrid_h 267 #endif // LayoutGrid_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698