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

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

Issue 2083703005: Shorthand serialization should check for var in longhands. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added test case Created 4 years, 6 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
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/css/cssText-shorthand.html ('k') | 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 382 matching lines...) Expand 10 before | Expand all | Expand 10 after
393 if (value.isImplicitInitialValue()) { 393 if (value.isImplicitInitialValue()) {
394 if (allowImplicitInitial) 394 if (allowImplicitInitial)
395 continue; 395 continue;
396 return emptyString(); 396 return emptyString();
397 } 397 }
398 if (!allowInitial && value.isInitialValue()) 398 if (!allowInitial && value.isInitialValue())
399 return emptyString(); 399 return emptyString();
400 // TODO(timloh): This should also check unset 400 // TODO(timloh): This should also check unset
401 if (value.isInheritedValue()) 401 if (value.isInheritedValue())
402 return emptyString(); 402 return emptyString();
403 if (value.isVariableReferenceValue())
404 return emptyString();
403 } 405 }
404 406
405 return String(); 407 return String();
406 } 408 }
407 409
408 String StylePropertySerializer::getPropertyValue(CSSPropertyID propertyID) const 410 String StylePropertySerializer::getPropertyValue(CSSPropertyID propertyID) const
409 { 411 {
410 const StylePropertyShorthand& shorthand = shorthandForProperty(propertyID); 412 const StylePropertyShorthand& shorthand = shorthandForProperty(propertyID);
411 // TODO(timloh): This is weird, why do we call this with non-shorthands at a ll? 413 // TODO(timloh): This is weird, why do we call this with non-shorthands at a ll?
412 if (!shorthand.length()) 414 if (!shorthand.length())
(...skipping 468 matching lines...) Expand 10 before | Expand all | Expand 10 after
881 builder.append(", "); 883 builder.append(", ");
882 884
883 const CSSValue& xValue = repeatXList ? repeatXList->item(i % repeatXList ->length()) : repeatX; 885 const CSSValue& xValue = repeatXList ? repeatXList->item(i % repeatXList ->length()) : repeatX;
884 const CSSValue& yValue = repeatYList ? repeatYList->item(i % repeatYList ->length()) : repeatY; 886 const CSSValue& yValue = repeatYList ? repeatYList->item(i % repeatYList ->length()) : repeatY;
885 appendBackgroundRepeatValue(builder, xValue, yValue); 887 appendBackgroundRepeatValue(builder, xValue, yValue);
886 } 888 }
887 return builder.toString(); 889 return builder.toString();
888 } 890 }
889 891
890 } // namespace blink 892 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/css/cssText-shorthand.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698