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

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

Issue 2143483002: Use the single char overload of append() when possible. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 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 835 matching lines...) Expand 10 before | Expand all | Expand 10 after
846 CSSValueID repeatXValueId = repeatX.getValueID(); 846 CSSValueID repeatXValueId = repeatX.getValueID();
847 CSSValueID repeatYValueId = repeatY.getValueID(); 847 CSSValueID repeatYValueId = repeatY.getValueID();
848 if (repeatXValueId == repeatYValueId) { 848 if (repeatXValueId == repeatYValueId) {
849 builder.append(repeatX.cssText()); 849 builder.append(repeatX.cssText());
850 } else if (repeatXValueId == CSSValueNoRepeat && repeatYValueId == CSSValueR epeat) { 850 } else if (repeatXValueId == CSSValueNoRepeat && repeatYValueId == CSSValueR epeat) {
851 builder.append("repeat-y"); 851 builder.append("repeat-y");
852 } else if (repeatXValueId == CSSValueRepeat && repeatYValueId == CSSValueNoR epeat) { 852 } else if (repeatXValueId == CSSValueRepeat && repeatYValueId == CSSValueNoR epeat) {
853 builder.append("repeat-x"); 853 builder.append("repeat-x");
854 } else { 854 } else {
855 builder.append(repeatX.cssText()); 855 builder.append(repeatX.cssText());
856 builder.append(" "); 856 builder.append(' ');
857 builder.append(repeatY.cssText()); 857 builder.append(repeatY.cssText());
858 } 858 }
859 } 859 }
860 860
861 String StylePropertySerializer::backgroundRepeatPropertyValue() const 861 String StylePropertySerializer::backgroundRepeatPropertyValue() const
862 { 862 {
863 const CSSValue& repeatX = *m_propertySet.getPropertyCSSValue(CSSPropertyBack groundRepeatX); 863 const CSSValue& repeatX = *m_propertySet.getPropertyCSSValue(CSSPropertyBack groundRepeatX);
864 const CSSValue& repeatY = *m_propertySet.getPropertyCSSValue(CSSPropertyBack groundRepeatY); 864 const CSSValue& repeatY = *m_propertySet.getPropertyCSSValue(CSSPropertyBack groundRepeatY);
865 865
866 const CSSValueList* repeatXList = 0; 866 const CSSValueList* repeatXList = 0;
(...skipping 21 matching lines...) Expand all
888 builder.append(", "); 888 builder.append(", ");
889 889
890 const CSSValue& xValue = repeatXList ? repeatXList->item(i % repeatXList ->length()) : repeatX; 890 const CSSValue& xValue = repeatXList ? repeatXList->item(i % repeatXList ->length()) : repeatX;
891 const CSSValue& yValue = repeatYList ? repeatYList->item(i % repeatYList ->length()) : repeatY; 891 const CSSValue& yValue = repeatYList ? repeatYList->item(i % repeatYList ->length()) : repeatY;
892 appendBackgroundRepeatValue(builder, xValue, yValue); 892 appendBackgroundRepeatValue(builder, xValue, yValue);
893 } 893 }
894 return builder.toString(); 894 return builder.toString();
895 } 895 }
896 896
897 } // namespace blink 897 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/CSSPageRule.cpp ('k') | third_party/WebKit/Source/core/css/parser/CSSParserToken.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698