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

Side by Side Diff: Source/core/css/StylePropertySerializer.cpp

Issue 23011009: Implement computed style for animation shorthand and align parsing with the spec. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Test modified according to Tab's comments Created 7 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/css/CSSShorthands.in ('k') | Source/core/css/StylePropertyShorthandCustom.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 * (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, 2009, 2010, 2012 Apple Inc. All r ights reserved. 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All r ights reserved.
4 * Copyright (C) 2011 Research In Motion Limited. All rights reserved. 4 * Copyright (C) 2011 Research In Motion Limited. All rights reserved.
5 * Copyright (C) 2013 Intel Corporation. All rights reserved. 5 * Copyright (C) 2013 Intel Corporation. All rights reserved.
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 } 305 }
306 306
307 ASSERT(!numDecls ^ !result.isEmpty()); 307 ASSERT(!numDecls ^ !result.isEmpty());
308 return result.toString(); 308 return result.toString();
309 } 309 }
310 310
311 String StylePropertySerializer::getPropertyValue(CSSPropertyID propertyID) const 311 String StylePropertySerializer::getPropertyValue(CSSPropertyID propertyID) const
312 { 312 {
313 // Shorthand and 4-values properties 313 // Shorthand and 4-values properties
314 switch (propertyID) { 314 switch (propertyID) {
315 case CSSPropertyAnimation:
316 return getLayeredShorthandValue(animationShorthand());
315 case CSSPropertyBorderSpacing: 317 case CSSPropertyBorderSpacing:
316 return borderSpacingValue(borderSpacingShorthand()); 318 return borderSpacingValue(borderSpacingShorthand());
317 case CSSPropertyBackgroundPosition: 319 case CSSPropertyBackgroundPosition:
318 return getLayeredShorthandValue(backgroundPositionShorthand()); 320 return getLayeredShorthandValue(backgroundPositionShorthand());
319 case CSSPropertyBackgroundRepeat: 321 case CSSPropertyBackgroundRepeat:
320 return getLayeredShorthandValue(backgroundRepeatShorthand()); 322 return getLayeredShorthandValue(backgroundRepeatShorthand());
321 case CSSPropertyBackground: 323 case CSSPropertyBackground:
322 return getLayeredShorthandValue(backgroundShorthand()); 324 return getLayeredShorthandValue(backgroundShorthand());
323 case CSSPropertyBorder: 325 case CSSPropertyBorder:
324 return borderPropertyValue(OmitUncommonValues); 326 return borderPropertyValue(OmitUncommonValues);
(...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after
758 if (!result.isEmpty()) 760 if (!result.isEmpty())
759 result.append(' '); 761 result.append(' ');
760 result.append(value); 762 result.append(value);
761 } 763 }
762 if (isInitialOrInherit(commonValue)) 764 if (isInitialOrInherit(commonValue))
763 return commonValue; 765 return commonValue;
764 return result.isEmpty() ? String() : result.toString(); 766 return result.isEmpty() ? String() : result.toString();
765 } 767 }
766 768
767 } 769 }
OLDNEW
« no previous file with comments | « Source/core/css/CSSShorthands.in ('k') | Source/core/css/StylePropertyShorthandCustom.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698