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

Unified Diff: chrome/browser/resources/tracing/measuring_stick.js

Issue 10543144: Remove old tracing code now that it has moved to third_party. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/tracing/measuring_stick.js
diff --git a/chrome/browser/resources/tracing/measuring_stick.js b/chrome/browser/resources/tracing/measuring_stick.js
deleted file mode 100644
index acd6091b64840684178112943c8c92cc714835c6..0000000000000000000000000000000000000000
--- a/chrome/browser/resources/tracing/measuring_stick.js
+++ /dev/null
@@ -1,50 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-cr.define('tracing', function() {
- /**
- * Uses an embedded iframe to measure provided elements without forcing layout
- * on the main document.
- * @constructor
- * @extends {Object}
- */
- function MeasuringStick() {
- var iframe = document.createElement('iframe');
- iframe.style.cssText = 'width:100%;height:0;border:0;visibility:hidden';
- document.body.appendChild(iframe);
- this._doc = iframe.contentDocument;
- this._window = iframe.contentWindow;
- this._doc.body.style.cssText = 'padding:0;margin:0;overflow:hidden';
-
- var stylesheets = document.querySelectorAll('link[rel=stylesheet]');
- for (var i = 0; i < stylesheets.length; i++) {
- var stylesheet = stylesheets[i];
- var link = this._doc.createElement('link');
- link.rel = 'stylesheet';
- link.href = stylesheet.href;
- this._doc.head.appendChild(link);
- }
- }
-
- MeasuringStick.prototype = {
- __proto__: Object.prototype,
-
- /**
- * Measures the provided element without forcing layout on the main
- * document.
- */
- measure: function(element) {
- this._doc.body.appendChild(element);
- var style = this._window.getComputedStyle(element);
- var width = parseInt(style.width, 10);
- var height = parseInt(style.height, 10);
- this._doc.body.removeChild(element);
- return { width: width, height: height };
- }
- };
-
- return {
- MeasuringStick: MeasuringStick
- };
-});
« no previous file with comments | « chrome/browser/resources/tracing/linux_perf_importer_test.html ('k') | chrome/browser/resources/tracing/overlay.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698