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

Side by Side Diff: third_party/WebKit/Source/core/inspector/InspectorLayerTreeAgent.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 * Copyright (C) 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2012 Apple Inc. All rights reserved.
3 * Copyright (C) 2013 Google Inc. All rights reserved. 3 * Copyright (C) 2013 Google Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after
397 { 397 {
398 const PictureSnapshot* snapshot = snapshotById(errorString, snapshotId); 398 const PictureSnapshot* snapshot = snapshotById(errorString, snapshotId);
399 if (!snapshot) 399 if (!snapshot)
400 return; 400 return;
401 OwnPtr<Vector<char>> base64Data = snapshot->replay(fromStep.fromMaybe(0), to Step.fromMaybe(0), scale.fromMaybe(1.0)); 401 OwnPtr<Vector<char>> base64Data = snapshot->replay(fromStep.fromMaybe(0), to Step.fromMaybe(0), scale.fromMaybe(1.0));
402 if (!base64Data) { 402 if (!base64Data) {
403 *errorString = "Image encoding failed"; 403 *errorString = "Image encoding failed";
404 return; 404 return;
405 } 405 }
406 StringBuilder url; 406 StringBuilder url;
407 url.appendLiteral("data:image/png;base64,"); 407 url.append("data:image/png;base64,");
408 url.reserveCapacity(url.length() + base64Data->size()); 408 url.reserveCapacity(url.length() + base64Data->size());
409 url.append(base64Data->begin(), base64Data->size()); 409 url.append(base64Data->begin(), base64Data->size());
410 *dataURL = url.toString(); 410 *dataURL = url.toString();
411 } 411 }
412 412
413 static void parseRect(protocol::DOM::Rect* object, FloatRect* rect) 413 static void parseRect(protocol::DOM::Rect* object, FloatRect* rect)
414 { 414 {
415 *rect = FloatRect(object->getX(), object->getY(), object->getWidth(), object ->getHeight()); 415 *rect = FloatRect(object->getX(), object->getY(), object->getWidth(), object ->getHeight());
416 } 416 }
417 417
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
452 void InspectorLayerTreeAgent::didRemovePageOverlay(const GraphicsLayer* layer) 452 void InspectorLayerTreeAgent::didRemovePageOverlay(const GraphicsLayer* layer)
453 { 453 {
454 size_t index = m_pageOverlayLayerIds.find(layer->platformLayer()->id()); 454 size_t index = m_pageOverlayLayerIds.find(layer->platformLayer()->id());
455 if (index == WTF::kNotFound) 455 if (index == WTF::kNotFound)
456 return; 456 return;
457 m_pageOverlayLayerIds.remove(index); 457 m_pageOverlayLayerIds.remove(index);
458 } 458 }
459 459
460 460
461 } // namespace blink 461 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698