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

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

Issue 842193004: [css-grid] Handle alignment with orthogonal flows (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@orthogonal-flows
Patch Set: Patch rebased. Created 4 years, 5 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) 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 1129 matching lines...) Expand 10 before | Expand all | Expand 10 after
1140 gOverrideContainingBlockLogicalWidthMap->remove(this); 1140 gOverrideContainingBlockLogicalWidthMap->remove(this);
1141 clearOverrideContainingBlockContentLogicalHeight(); 1141 clearOverrideContainingBlockContentLogicalHeight();
1142 } 1142 }
1143 1143
1144 void LayoutBox::clearOverrideContainingBlockContentLogicalHeight() 1144 void LayoutBox::clearOverrideContainingBlockContentLogicalHeight()
1145 { 1145 {
1146 if (gOverrideContainingBlockLogicalHeightMap) 1146 if (gOverrideContainingBlockLogicalHeightMap)
1147 gOverrideContainingBlockLogicalHeightMap->remove(this); 1147 gOverrideContainingBlockLogicalHeightMap->remove(this);
1148 } 1148 }
1149 1149
1150 LayoutUnit LayoutBox::overrideContainingBlockContentWidth() const
1151 {
1152 return containingBlock()->isHorizontalWritingMode() ? overrideContainingBloc kContentLogicalWidth() : overrideContainingBlockContentLogicalHeight();
1153 }
1154
1155 LayoutUnit LayoutBox::overrideContainingBlockContentHeight() const
1156 {
1157 return containingBlock()->isHorizontalWritingMode() ? overrideContainingBloc kContentLogicalHeight() : overrideContainingBlockContentLogicalWidth();
1158 }
1159
1160 bool LayoutBox::hasOverrideContainingBlockWidth() const
1161 {
1162 return containingBlock()->isHorizontalWritingMode() ? hasOverrideContainingB lockLogicalHeight() : hasOverrideContainingBlockLogicalWidth();
svillar 2016/07/13 09:00:40 Aren't logical height and width flipped here? If
jfernandez 2016/07/14 09:29:15 Yes, they are. Good catch !!!
1163 }
1164
1165 bool LayoutBox::hasOverrideContainingBlockHeight() const
1166 {
1167 return containingBlock()->isHorizontalWritingMode() ? hasOverrideContainingB lockLogicalHeight() : hasOverrideContainingBlockLogicalWidth();
1168 }
1169
1150 LayoutUnit LayoutBox::extraInlineOffset() const 1170 LayoutUnit LayoutBox::extraInlineOffset() const
1151 { 1171 {
1152 return gExtraInlineOffsetMap ? gExtraInlineOffsetMap->get(this) : LayoutUnit (); 1172 return gExtraInlineOffsetMap ? gExtraInlineOffsetMap->get(this) : LayoutUnit ();
1153 } 1173 }
1154 1174
1155 LayoutUnit LayoutBox::extraBlockOffset() const 1175 LayoutUnit LayoutBox::extraBlockOffset() const
1156 { 1176 {
1157 return gExtraBlockOffsetMap ? gExtraBlockOffsetMap->get(this) : LayoutUnit() ; 1177 return gExtraBlockOffsetMap ? gExtraBlockOffsetMap->get(this) : LayoutUnit() ;
1158 } 1178 }
1159 1179
(...skipping 3718 matching lines...) Expand 10 before | Expand all | Expand 10 after
4878 m_rareData->m_snapAreas->remove(&snapArea); 4898 m_rareData->m_snapAreas->remove(&snapArea);
4879 } 4899 }
4880 } 4900 }
4881 4901
4882 SnapAreaSet* LayoutBox::snapAreas() const 4902 SnapAreaSet* LayoutBox::snapAreas() const
4883 { 4903 {
4884 return m_rareData ? m_rareData->m_snapAreas.get() : nullptr; 4904 return m_rareData ? m_rareData->m_snapAreas.get() : nullptr;
4885 } 4905 }
4886 4906
4887 } // namespace blink 4907 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698