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

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

Issue 1363233003: Make sure <url>s are being serialized according to spec (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: CSSPrimitiveValue and CSSSVGDocumentValue customCSSText changes Created 5 years, 3 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, 2012 Apple Inc. All rights reserv ed. 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2012 Apple Inc. All rights reserv ed.
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 894 matching lines...) Expand 10 before | Expand all | Expand 10 after
905 text = formatNumber(m_value.num, unitTypeToString(type())); 905 text = formatNumber(m_value.num, unitTypeToString(type()));
906 break; 906 break;
907 case UnitType::CustomIdentifier: 907 case UnitType::CustomIdentifier:
908 text = quoteCSSStringIfNeeded(m_value.string); 908 text = quoteCSSStringIfNeeded(m_value.string);
909 break; 909 break;
910 case UnitType::String: { 910 case UnitType::String: {
911 text = serializeString(m_value.string); 911 text = serializeString(m_value.string);
912 break; 912 break;
913 } 913 }
914 case UnitType::URI: 914 case UnitType::URI:
915 text = "url(" + quoteCSSURLIfNeeded(m_value.string) + ")"; 915 text = serializeURI(m_value.string);
916 break; 916 break;
917 case UnitType::ValueID: 917 case UnitType::ValueID:
918 text = valueName(m_value.valueID); 918 text = valueName(m_value.valueID);
919 break; 919 break;
920 case UnitType::PropertyID: 920 case UnitType::PropertyID:
921 text = propertyName(m_value.propertyID); 921 text = propertyName(m_value.propertyID);
922 break; 922 break;
923 case UnitType::RGBColor: { 923 case UnitType::RGBColor: {
924 text = Color(m_value.rgbcolor).serializedAsCSSComponentValue(); 924 text = Color(m_value.rgbcolor).serializedAsCSSComponentValue();
925 break; 925 break;
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
1013 visitor->trace(m_value.shape); 1013 visitor->trace(m_value.shape);
1014 break; 1014 break;
1015 default: 1015 default:
1016 break; 1016 break;
1017 } 1017 }
1018 #endif 1018 #endif
1019 CSSValue::traceAfterDispatch(visitor); 1019 CSSValue::traceAfterDispatch(visitor);
1020 } 1020 }
1021 1021
1022 } // namespace blink 1022 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698