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

Unified 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, 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.h
diff --git a/third_party/WebKit/Source/core/layout/LayoutGrid.h b/third_party/WebKit/Source/core/layout/LayoutGrid.h
index ed2b80926039a6c6ba765fe64a7d8a47251c575e..cad177cb299041a52759af3e71a54845efc2b828 100644
--- a/third_party/WebKit/Source/core/layout/LayoutGrid.h
+++ b/third_party/WebKit/Source/core/layout/LayoutGrid.h
@@ -96,6 +96,15 @@ class LayoutGrid final : public LayoutBlock {
bool cachedHasDefiniteLogicalHeight() const;
bool isOrthogonalChild(const LayoutBox&) const;
+ protected:
+ ItemPosition selfAlignmentNormalBehavior(
+ const LayoutBox* child = nullptr) const override {
+ DCHECK(child);
+ 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.
+ return ItemPositionStart;
+ return ItemPositionStretch;
+ }
+
private:
bool isOfType(LayoutObjectType type) const override {
return type == LayoutObjectLayoutGrid || LayoutBlock::isOfType(type);

Powered by Google App Engine
This is Rietveld 408576698