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

Side by Side Diff: third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp

Issue 1777483008: Move the grid-gap shorthand into CSSPropertyParser (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 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 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/css/parser/CSSPropertyParser.h" 5 #include "core/css/parser/CSSPropertyParser.h"
6 6
7 #include "core/StylePropertyShorthand.h" 7 #include "core/StylePropertyShorthand.h"
8 #include "core/css/CSSBasicShapeValues.h" 8 #include "core/css/CSSBasicShapeValues.h"
9 #include "core/css/CSSBorderImage.h" 9 #include "core/css/CSSBorderImage.h"
10 #include "core/css/CSSCalculationValue.h" 10 #include "core/css/CSSCalculationValue.h"
(...skipping 4856 matching lines...) Expand 10 before | Expand all | Expand 10 after
4867 if (!consumeRepeatStyle(m_range, resultX, resultY, implicit) || !m_range .atEnd()) 4867 if (!consumeRepeatStyle(m_range, resultX, resultY, implicit) || !m_range .atEnd())
4868 return false; 4868 return false;
4869 addProperty(property == CSSPropertyBackgroundRepeat ? CSSPropertyBackgro undRepeatX : CSSPropertyWebkitMaskRepeatX, resultX.release(), important, implici t); 4869 addProperty(property == CSSPropertyBackgroundRepeat ? CSSPropertyBackgro undRepeatX : CSSPropertyWebkitMaskRepeatX, resultX.release(), important, implici t);
4870 addProperty(property == CSSPropertyBackgroundRepeat ? CSSPropertyBackgro undRepeatY : CSSPropertyWebkitMaskRepeatY, resultY.release(), important, implici t); 4870 addProperty(property == CSSPropertyBackgroundRepeat ? CSSPropertyBackgro undRepeatY : CSSPropertyWebkitMaskRepeatY, resultY.release(), important, implici t);
4871 return true; 4871 return true;
4872 } 4872 }
4873 case CSSPropertyBackground: 4873 case CSSPropertyBackground:
4874 return consumeBackgroundShorthand(backgroundShorthand(), important); 4874 return consumeBackgroundShorthand(backgroundShorthand(), important);
4875 case CSSPropertyWebkitMask: 4875 case CSSPropertyWebkitMask:
4876 return consumeBackgroundShorthand(webkitMaskShorthand(), important); 4876 return consumeBackgroundShorthand(webkitMaskShorthand(), important);
4877 case CSSPropertyGridGap: {
4878 ASSERT(RuntimeEnabledFeatures::cssGridLayoutEnabled() && shorthandForPro perty(CSSPropertyGridGap).length() == 2);
4879 RefPtrWillBeRawPtr<CSSValue> rowGap = consumeLength(m_range, m_context.m ode(), ValueRangeNonNegative);
4880 RefPtrWillBeRawPtr<CSSValue> columnGap = consumeLength(m_range, m_contex t.mode(), ValueRangeNonNegative);
4881 if (!rowGap || !m_range.atEnd())
4882 return false;
4883 if (!columnGap)
4884 columnGap = rowGap;
4885 addProperty(CSSPropertyGridRowGap, rowGap.release(), important);
4886 addProperty(CSSPropertyGridColumnGap, columnGap.release(), important);
4887 return true;
4888 }
4877 default: 4889 default:
4878 m_currentShorthand = oldShorthand; 4890 m_currentShorthand = oldShorthand;
4879 CSSParserValueList valueList(m_range); 4891 CSSParserValueList valueList(m_range);
4880 if (!valueList.size()) 4892 if (!valueList.size())
4881 return false; 4893 return false;
4882 m_valueList = &valueList; 4894 m_valueList = &valueList;
4883 return legacyParseShorthand(unresolvedProperty, important); 4895 return legacyParseShorthand(unresolvedProperty, important);
4884 } 4896 }
4885 } 4897 }
4886 4898
4887 } // namespace blink 4899 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698