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

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: Applied suggested changes 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 return child->isLayoutReplaced() ? ItemPositionStart : ItemPositionStretch;
104 }
105
99 private: 106 private:
100 bool isOfType(LayoutObjectType type) const override { 107 bool isOfType(LayoutObjectType type) const override {
101 return type == LayoutObjectLayoutGrid || LayoutBlock::isOfType(type); 108 return type == LayoutObjectLayoutGrid || LayoutBlock::isOfType(type);
102 } 109 }
103 void computeIntrinsicLogicalWidths( 110 void computeIntrinsicLogicalWidths(
104 LayoutUnit& minLogicalWidth, 111 LayoutUnit& minLogicalWidth,
105 LayoutUnit& maxLogicalWidth) const override; 112 LayoutUnit& maxLogicalWidth) const override;
106 113
107 LayoutUnit computeIntrinsicLogicalContentHeightUsing( 114 LayoutUnit computeIntrinsicLogicalContentHeightUsing(
108 const Length& logicalHeightLength, 115 const Length& logicalHeightLength,
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 LayoutUnit m_maxContentHeight{-1}; 256 LayoutUnit m_maxContentHeight{-1};
250 257
251 Optional<bool> m_hasDefiniteLogicalHeight; 258 Optional<bool> m_hasDefiniteLogicalHeight;
252 }; 259 };
253 260
254 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutGrid, isLayoutGrid()); 261 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutGrid, isLayoutGrid());
255 262
256 } // namespace blink 263 } // namespace blink
257 264
258 #endif // LayoutGrid_h 265 #endif // LayoutGrid_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutFullScreen.h ('k') | third_party/WebKit/Source/core/layout/LayoutGrid.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698