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

Side by Side Diff: Source/build/scripts/templates/StylePropertyShorthand.cpp.tmpl

Issue 339713008: Treat marker like a real shorthand for initial and inherit (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Shorthand change Created 6 years, 1 month 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * (C) 1999-2003 Lars Knoll (knoll@kde.org) 2 * (C) 1999-2003 Lars Knoll (knoll@kde.org)
3 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
4 * Copyright (C) 2013 Intel Corporation. All rights reserved. 4 * Copyright (C) 2013 Intel Corporation. All rights reserved.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 30 matching lines...) Expand all
41 } 41 }
42 {% endfor %} 42 {% endfor %}
43 43
44 // Returns an empty list if the property is not a shorthand 44 // Returns an empty list if the property is not a shorthand
45 const StylePropertyShorthand& shorthandForProperty(CSSPropertyID propertyID) 45 const StylePropertyShorthand& shorthandForProperty(CSSPropertyID propertyID)
46 { 46 {
47 DEFINE_STATIC_LOCAL(StylePropertyShorthand, emptyShorthand, ()); 47 DEFINE_STATIC_LOCAL(StylePropertyShorthand, emptyShorthand, ());
48 if (propertyID == CSSPropertyTextDecoration && !RuntimeEnabledFeatures::css3 TextDecorationsEnabled()) 48 if (propertyID == CSSPropertyTextDecoration && !RuntimeEnabledFeatures::css3 TextDecorationsEnabled())
49 return emptyShorthand; 49 return emptyShorthand;
50 switch (propertyID) { 50 switch (propertyID) {
51 {% for property_id, property in properties.items() if property.camel_cas e_name != "marker" %} 51 {% for property_id, property in properties.items() %}
52 case {{property_id}}: 52 case {{property_id}}:
53 return {{property.lower_camel_name}}Shorthand(); 53 return {{property.lower_camel_name}}Shorthand();
54 {% endfor %} 54 {% endfor %}
55 default: { 55 default: {
56 return emptyShorthand; 56 return emptyShorthand;
57 } 57 }
58 } 58 }
59 } 59 }
60 60
61 void getMatchingShorthandsForLonghand(CSSPropertyID propertyID, Vector<StyleProp ertyShorthand, 4>* result) 61 void getMatchingShorthandsForLonghand(CSSPropertyID propertyID, Vector<StyleProp ertyShorthand, 4>* result)
62 { 62 {
63 ASSERT(!result->size()); 63 ASSERT(!result->size());
64 switch (propertyID) { 64 switch (propertyID) {
65 {% for longhand_id, shorthands in longhands_dictionary.items() %} 65 {% for longhand_id, shorthands in longhands_dictionary.items() %}
66 case {{longhand_id}}: { 66 case {{longhand_id}}: {
67 {% for shorthand in shorthands %} 67 {% for shorthand in shorthands %}
68 result->uncheckedAppend({{shorthand.lower_camel_name}}Shorthand()); 68 result->uncheckedAppend({{shorthand.lower_camel_name}}Shorthand());
69 {% endfor %} 69 {% endfor %}
70 break; 70 break;
71 } 71 }
72 {% endfor %} 72 {% endfor %}
73 default: 73 default:
74 break; 74 break;
75 } 75 }
76 } 76 }
77 77
78 } // namespace blink 78 } // namespace blink
OLDNEW
« no previous file with comments | « LayoutTests/svg/css/marker-crash-expected.txt ('k') | Source/core/css/StylePropertyShorthandCustom.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698