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

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

Issue 14772013: Fix a broken ASSERT in StylePropertySerializer. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 7 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 | « no previous file | no next file » | 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 291 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 result.append(m_propertySet.propertyAt(repeatYPropertyIndex).cssText ()); 302 result.append(m_propertySet.propertyAt(repeatYPropertyIndex).cssText ());
303 } 303 }
304 } 304 }
305 305
306 ASSERT(!numDecls ^ !result.isEmpty()); 306 ASSERT(!numDecls ^ !result.isEmpty());
307 return result.toString(); 307 return result.toString();
308 } 308 }
309 309
310 String StylePropertySerializer::getPropertyValue(CSSPropertyID propertyID) const 310 String StylePropertySerializer::getPropertyValue(CSSPropertyID propertyID) const
311 { 311 {
312 // Only enabled properties should be part of the style.
313 ASSERT(RuntimeCSSEnabled::isCSSPropertyEnabled(propertyID));
314 // Shorthand and 4-values properties 312 // Shorthand and 4-values properties
315 switch (propertyID) { 313 switch (propertyID) {
316 case CSSPropertyBorderSpacing: 314 case CSSPropertyBorderSpacing:
317 return borderSpacingValue(borderSpacingShorthand()); 315 return borderSpacingValue(borderSpacingShorthand());
318 case CSSPropertyBackgroundPosition: 316 case CSSPropertyBackgroundPosition:
319 return getLayeredShorthandValue(backgroundPositionShorthand()); 317 return getLayeredShorthandValue(backgroundPositionShorthand());
320 case CSSPropertyBackgroundRepeat: 318 case CSSPropertyBackgroundRepeat:
321 return getLayeredShorthandValue(backgroundRepeatShorthand()); 319 return getLayeredShorthandValue(backgroundRepeatShorthand());
322 case CSSPropertyBackground: 320 case CSSPropertyBackground:
323 return getLayeredShorthandValue(backgroundShorthand()); 321 return getLayeredShorthandValue(backgroundShorthand());
(...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after
751 if (!result.isEmpty()) 749 if (!result.isEmpty())
752 result.append(' '); 750 result.append(' ');
753 result.append(value); 751 result.append(value);
754 } 752 }
755 if (isInitialOrInherit(commonValue)) 753 if (isInitialOrInherit(commonValue))
756 return commonValue; 754 return commonValue;
757 return result.isEmpty() ? String() : result.toString(); 755 return result.isEmpty() ? String() : result.toString();
758 } 756 }
759 757
760 } 758 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698