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

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

Issue 2648703002: Implements CSSPropertyAPI for the margin properties. (Closed)
Patch Set: removed accidental lines in json 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 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/CSSContentDistributionValue.h" 10 #include "core/css/CSSContentDistributionValue.h"
(...skipping 2067 matching lines...) Expand 10 before | Expand all | Expand 10 after
2078 UnitlessQuirk::Allow); 2078 UnitlessQuirk::Allow);
2079 case CSSPropertyInlineSize: 2079 case CSSPropertyInlineSize:
2080 case CSSPropertyBlockSize: 2080 case CSSPropertyBlockSize:
2081 case CSSPropertyMinInlineSize: 2081 case CSSPropertyMinInlineSize:
2082 case CSSPropertyMinBlockSize: 2082 case CSSPropertyMinBlockSize:
2083 case CSSPropertyWebkitMinLogicalWidth: 2083 case CSSPropertyWebkitMinLogicalWidth:
2084 case CSSPropertyWebkitMinLogicalHeight: 2084 case CSSPropertyWebkitMinLogicalHeight:
2085 case CSSPropertyWebkitLogicalWidth: 2085 case CSSPropertyWebkitLogicalWidth:
2086 case CSSPropertyWebkitLogicalHeight: 2086 case CSSPropertyWebkitLogicalHeight:
2087 return CSSPropertyLengthUtils::consumeWidthOrHeight(m_range, m_context); 2087 return CSSPropertyLengthUtils::consumeWidthOrHeight(m_range, m_context);
2088 case CSSPropertyMarginTop:
2089 case CSSPropertyMarginRight:
2090 case CSSPropertyMarginBottom:
2091 case CSSPropertyMarginLeft:
2092 case CSSPropertyBottom:
2093 case CSSPropertyLeft:
2094 case CSSPropertyRight:
2095 case CSSPropertyTop:
2096 return CSSPropertyMarginUtils::consumeMarginOrOffset(
2097 m_range, m_context->mode(), UnitlessQuirk::Allow);
2098 case CSSPropertyWebkitMarginStart:
2099 case CSSPropertyWebkitMarginEnd:
2100 case CSSPropertyWebkitMarginBefore:
2101 case CSSPropertyWebkitMarginAfter:
2102 return CSSPropertyMarginUtils::consumeMarginOrOffset(
2103 m_range, m_context->mode(), UnitlessQuirk::Forbid);
2104 case CSSPropertyScrollSnapDestination: 2088 case CSSPropertyScrollSnapDestination:
2105 case CSSPropertyObjectPosition: 2089 case CSSPropertyObjectPosition:
2106 case CSSPropertyPerspectiveOrigin: 2090 case CSSPropertyPerspectiveOrigin:
2107 return consumePosition(m_range, m_context->mode(), UnitlessQuirk::Forbid); 2091 return consumePosition(m_range, m_context->mode(), UnitlessQuirk::Forbid);
2108 case CSSPropertyWebkitHyphenateCharacter: 2092 case CSSPropertyWebkitHyphenateCharacter:
2109 case CSSPropertyWebkitLocale: 2093 case CSSPropertyWebkitLocale:
2110 return consumeLocale(m_range); 2094 return consumeLocale(m_range);
2111 case CSSPropertyColumnWidth: 2095 case CSSPropertyColumnWidth:
2112 return CSSPropertyColumnUtils::consumeColumnWidth(m_range); 2096 return CSSPropertyColumnUtils::consumeColumnWidth(m_range);
2113 case CSSPropertyColumnCount: 2097 case CSSPropertyColumnCount:
(...skipping 1641 matching lines...) Expand 10 before | Expand all | Expand 10 after
3755 case CSSPropertyGridTemplate: 3739 case CSSPropertyGridTemplate:
3756 return consumeGridTemplateShorthand(CSSPropertyGridTemplate, important); 3740 return consumeGridTemplateShorthand(CSSPropertyGridTemplate, important);
3757 case CSSPropertyGrid: 3741 case CSSPropertyGrid:
3758 return consumeGridShorthand(important); 3742 return consumeGridShorthand(important);
3759 default: 3743 default:
3760 return false; 3744 return false;
3761 } 3745 }
3762 } 3746 }
3763 3747
3764 } // namespace blink 3748 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698