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

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

Issue 2017053003: Remove StringBuilder::appendLiteral. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase. 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
OLDNEW
1 /* 1 /*
2 * CSS Media Query 2 * CSS Media Query
3 * 3 *
4 * Copyright (C) 2006 Kimmo Kinnunen <kimmo.t.kinnunen@nokia.com>. 4 * Copyright (C) 2006 Kimmo Kinnunen <kimmo.t.kinnunen@nokia.com>.
5 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). 5 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
6 * Copyright (C) 2013 Apple Inc. All rights reserved. 6 * Copyright (C) 2013 Apple Inc. All rights reserved.
7 * 7 *
8 * Redistribution and use in source and binary forms, with or without 8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions 9 * modification, are permitted provided that the following conditions
10 * are met: 10 * are met:
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 && ((!other.m_expValue.isValid() && !m_expValue.isValid()) 280 && ((!other.m_expValue.isValid() && !m_expValue.isValid())
281 || (other.m_expValue.isValid() && m_expValue.isValid() && other.m_ex pValue.equals(m_expValue))); 281 || (other.m_expValue.isValid() && m_expValue.isValid() && other.m_ex pValue.equals(m_expValue)));
282 } 282 }
283 283
284 String MediaQueryExp::serialize() const 284 String MediaQueryExp::serialize() const
285 { 285 {
286 StringBuilder result; 286 StringBuilder result;
287 result.append('('); 287 result.append('(');
288 result.append(m_mediaFeature.lower()); 288 result.append(m_mediaFeature.lower());
289 if (m_expValue.isValid()) { 289 if (m_expValue.isValid()) {
290 result.appendLiteral(": "); 290 result.append(": ");
291 result.append(m_expValue.cssText()); 291 result.append(m_expValue.cssText());
292 } 292 }
293 result.append(')'); 293 result.append(')');
294 294
295 return result.toString(); 295 return result.toString();
296 } 296 }
297 297
298 static inline String printNumber(double number) 298 static inline String printNumber(double number)
299 { 299 {
300 return Decimal::fromDouble(number).toString(); 300 return Decimal::fromDouble(number).toString();
(...skipping 10 matching lines...) Expand all
311 output.append('/'); 311 output.append('/');
312 output.append(printNumber(denominator)); 312 output.append(printNumber(denominator));
313 } else if (isID) { 313 } else if (isID) {
314 output.append(getValueName(id)); 314 output.append(getValueName(id));
315 } 315 }
316 316
317 return output.toString(); 317 return output.toString();
318 } 318 }
319 319
320 } // namespace blink 320 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/MediaQuery.cpp ('k') | third_party/WebKit/Source/core/css/MediaQuerySetTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698