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

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

Issue 1306283006: BackgroundImage incorrectly returns empty url() when created on-the-fly (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Ensure getComputedStyle returns absolute URLs 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 * Copyright (C) 2003 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 2003 Lars Knoll (knoll@kde.org)
3 * Copyright (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) 3 * Copyright (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com)
4 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved. 4 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved.
5 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com> 5 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com>
6 * Copyright (C) 2008 Eric Seidel <eric@webkit.org> 6 * Copyright (C) 2008 Eric Seidel <eric@webkit.org>
7 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) 7 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/)
8 * Copyright (C) 2012 Adobe Systems Incorporated. All rights reserved. 8 * Copyright (C) 2012 Adobe Systems Incorporated. All rights reserved.
9 * Copyright (C) 2012 Intel Corporation. All rights reserved. 9 * Copyright (C) 2012 Intel Corporation. All rights reserved.
10 * 10 *
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 appendTo.append('\"'); 256 appendTo.append('\"');
257 } 257 }
258 258
259 String serializeString(const String& string) 259 String serializeString(const String& string)
260 { 260 {
261 StringBuilder builder; 261 StringBuilder builder;
262 serializeString(string, builder); 262 serializeString(string, builder);
263 return builder.toString(); 263 return builder.toString();
264 } 264 }
265 265
266 String serializeStringWithoutQuotations(const String& string)
Timothy Loh 2015/09/15 12:20:47 Is this a separate change?
nainar 2015/09/16 07:16:49 Answered above.
267 {
268 StringBuilder appendTo;
269
270 unsigned index = 0;
271 while (index < string.length()) {
272 UChar32 c = string.characterStartingAt(index);
273 index += U16_LENGTH(c);
274 if (c <= 0x1f)
275 serializeCharacterAsCodePoint(c, appendTo);
276 else if (c == 0x22 || c == 0x5c)
277 serializeCharacter(c, appendTo);
278 else
279 appendTo.append(c);
280 }
281
282 return appendTo.toString();
283 }
284
266 } // namespace blink 285 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698