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

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

Issue 2701993002: DO NOT COMMIT: Results of running new (proposed) clang-format on Blink (Closed)
Patch Set: 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 /* 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 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All
4 * rights reserved. 4 * rights reserved.
5 * Copyright (C) 2011 Research In Motion Limited. All rights reserved. 5 * Copyright (C) 2011 Research In Motion Limited. All rights reserved.
6 * Copyright (C) 2013 Intel Corporation. All rights reserved. 6 * Copyright (C) 2013 Intel Corporation. All rights reserved.
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 707 matching lines...) Expand 10 before | Expand all | Expand 10 after
718 const CSSValue* value = nullptr; 718 const CSSValue* value = nullptr;
719 CSSPropertyID property = shorthand.properties()[propertyIndex]; 719 CSSPropertyID property = shorthand.properties()[propertyIndex];
720 720
721 // Get a CSSValue for this property and layer. 721 // Get a CSSValue for this property and layer.
722 if (values[propertyIndex]->isBaseValueList()) { 722 if (values[propertyIndex]->isBaseValueList()) {
723 const CSSValueList* propertyValues = 723 const CSSValueList* propertyValues =
724 toCSSValueList(values[propertyIndex]); 724 toCSSValueList(values[propertyIndex]);
725 // There might not be an item for this layer for this property. 725 // There might not be an item for this layer for this property.
726 if (layer < propertyValues->length()) 726 if (layer < propertyValues->length())
727 value = &propertyValues->item(layer); 727 value = &propertyValues->item(layer);
728 } else if (layer == 0 || (layer != numLayers - 1 && 728 } else if (layer == 0 ||
729 property == CSSPropertyBackgroundColor)) { 729 (layer != numLayers - 1 &&
730 property == CSSPropertyBackgroundColor)) {
730 // Singletons except background color belong in the 0th layer. 731 // Singletons except background color belong in the 0th layer.
731 // Background color belongs in the last layer. 732 // Background color belongs in the last layer.
732 value = values[propertyIndex]; 733 value = values[propertyIndex];
733 } 734 }
734 // No point proceeding if there's not a value to look at. 735 // No point proceeding if there's not a value to look at.
735 if (!value) 736 if (!value)
736 continue; 737 continue;
737 738
738 // Special case for background-repeat. 739 // Special case for background-repeat.
739 if (property == CSSPropertyBackgroundRepeatX || 740 if (property == CSSPropertyBackgroundRepeatX ||
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
927 const CSSValue& xValue = 928 const CSSValue& xValue =
928 repeatXList ? repeatXList->item(i % repeatXList->length()) : repeatX; 929 repeatXList ? repeatXList->item(i % repeatXList->length()) : repeatX;
929 const CSSValue& yValue = 930 const CSSValue& yValue =
930 repeatYList ? repeatYList->item(i % repeatYList->length()) : repeatY; 931 repeatYList ? repeatYList->item(i % repeatYList->length()) : repeatY;
931 appendBackgroundRepeatValue(builder, xValue, yValue); 932 appendBackgroundRepeatValue(builder, xValue, yValue);
932 } 933 }
933 return builder.toString(); 934 return builder.toString();
934 } 935 }
935 936
936 } // namespace blink 937 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/SelectorChecker.cpp ('k') | third_party/WebKit/Source/core/css/cssom/CSSCalcLength.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698