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

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutBox.cpp

Issue 2268383002: [css-grid] Avoid negative values as override containing block sizes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/LayoutGrid.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) 4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com)
5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) 5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com)
6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv ed. 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv ed.
7 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. 7 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved.
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 1143 matching lines...) Expand 10 before | Expand all | Expand 10 after
1154 1154
1155 // TODO (lajava) Shouldn't we implement these functions based on physical direct ion ?. 1155 // TODO (lajava) Shouldn't we implement these functions based on physical direct ion ?.
1156 bool LayoutBox::hasOverrideContainingBlockLogicalHeight() const 1156 bool LayoutBox::hasOverrideContainingBlockLogicalHeight() const
1157 { 1157 {
1158 return m_rareData && m_rareData->m_hasOverrideContainingBlockContentLogicalH eight; 1158 return m_rareData && m_rareData->m_hasOverrideContainingBlockContentLogicalH eight;
1159 } 1159 }
1160 1160
1161 // TODO (lajava) Shouldn't we implement these functions based on physical direct ion ?. 1161 // TODO (lajava) Shouldn't we implement these functions based on physical direct ion ?.
1162 void LayoutBox::setOverrideContainingBlockContentLogicalWidth(LayoutUnit logical Width) 1162 void LayoutBox::setOverrideContainingBlockContentLogicalWidth(LayoutUnit logical Width)
1163 { 1163 {
1164 DCHECK_GE(logicalWidth, LayoutUnit(-1));
1164 ensureRareData().m_overrideContainingBlockContentLogicalWidth = logicalWidth ; 1165 ensureRareData().m_overrideContainingBlockContentLogicalWidth = logicalWidth ;
1165 ensureRareData().m_hasOverrideContainingBlockContentLogicalWidth = true; 1166 ensureRareData().m_hasOverrideContainingBlockContentLogicalWidth = true;
1166 } 1167 }
1167 1168
1168 // TODO (lajava) Shouldn't we implement these functions based on physical direct ion ?. 1169 // TODO (lajava) Shouldn't we implement these functions based on physical direct ion ?.
1169 void LayoutBox::setOverrideContainingBlockContentLogicalHeight(LayoutUnit logica lHeight) 1170 void LayoutBox::setOverrideContainingBlockContentLogicalHeight(LayoutUnit logica lHeight)
1170 { 1171 {
1172 DCHECK_GE(logicalHeight, LayoutUnit(-1));
1171 ensureRareData().m_overrideContainingBlockContentLogicalHeight = logicalHeig ht; 1173 ensureRareData().m_overrideContainingBlockContentLogicalHeight = logicalHeig ht;
1172 ensureRareData().m_hasOverrideContainingBlockContentLogicalHeight = true; 1174 ensureRareData().m_hasOverrideContainingBlockContentLogicalHeight = true;
1173 } 1175 }
1174 1176
1175 // TODO (lajava) Shouldn't we implement these functions based on physical direct ion ?. 1177 // TODO (lajava) Shouldn't we implement these functions based on physical direct ion ?.
1176 void LayoutBox::clearContainingBlockOverrideSize() 1178 void LayoutBox::clearContainingBlockOverrideSize()
1177 { 1179 {
1178 if (!m_rareData) 1180 if (!m_rareData)
1179 return; 1181 return;
1180 ensureRareData().m_hasOverrideContainingBlockContentLogicalWidth = false; 1182 ensureRareData().m_hasOverrideContainingBlockContentLogicalWidth = false;
(...skipping 3642 matching lines...) Expand 10 before | Expand all | Expand 10 after
4823 m_rareData->m_snapAreas->remove(&snapArea); 4825 m_rareData->m_snapAreas->remove(&snapArea);
4824 } 4826 }
4825 } 4827 }
4826 4828
4827 SnapAreaSet* LayoutBox::snapAreas() const 4829 SnapAreaSet* LayoutBox::snapAreas() const
4828 { 4830 {
4829 return m_rareData ? m_rareData->m_snapAreas.get() : nullptr; 4831 return m_rareData ? m_rareData->m_snapAreas.get() : nullptr;
4830 } 4832 }
4831 4833
4832 } // namespace blink 4834 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/LayoutGrid.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698