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

Side by Side Diff: Source/devtools/front_end/View.js

Issue 15832007: DevTools: Add support for //# sourceURL (sourceMappingURL) comments and deprecate //@ ones (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebaselined Created 7 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 | Annotate | Revision Log
« no previous file with comments | « Source/devtools/front_end/TestController.js ('k') | Source/devtools/front_end/utilities.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved.
3 * Copyright (C) 2011 Google Inc. All Rights Reserved. 3 * Copyright (C) 2011 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 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after
351 styleElement.type = "text/css"; 351 styleElement.type = "text/css";
352 styleElement.textContent = xhr.responseText + this._buildSourceURL(c ssFile); 352 styleElement.textContent = xhr.responseText + this._buildSourceURL(c ssFile);
353 } 353 }
354 document.head.insertBefore(styleElement, document.head.firstChild); 354 document.head.insertBefore(styleElement, document.head.firstChild);
355 355
356 WebInspector.View._cssFileToStyleElement[cssFile] = styleElement; 356 WebInspector.View._cssFileToStyleElement[cssFile] = styleElement;
357 }, 357 },
358 358
359 _buildSourceURL: function(cssFile) 359 _buildSourceURL: function(cssFile)
360 { 360 {
361 return "\n/*@ sourceURL=" + WebInspector.ParsedURL.completeURL(window.lo cation.href, cssFile) + " */"; 361 return "\n/*# sourceURL=" + WebInspector.ParsedURL.completeURL(window.lo cation.href, cssFile) + " */";
362 }, 362 },
363 363
364 _disableCSSIfNeeded: function() 364 _disableCSSIfNeeded: function()
365 { 365 {
366 var scheduleUnload = !!WebInspector.View._cssUnloadTimer; 366 var scheduleUnload = !!WebInspector.View._cssUnloadTimer;
367 367
368 for (var i = 0; i < this._cssFiles.length; ++i) { 368 for (var i = 0; i < this._cssFiles.length; ++i) {
369 var cssFile = this._cssFiles[i]; 369 var cssFile = this._cssFiles[i];
370 370
371 if (!--WebInspector.View._cssFileToVisibleViewCount[cssFile]) 371 if (!--WebInspector.View._cssFileToVisibleViewCount[cssFile])
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
506 { 506 {
507 WebInspector.View._assert(!child.__viewCounter && !child.__view, "Attempt to remove element containing view via regular DOM operation"); 507 WebInspector.View._assert(!child.__viewCounter && !child.__view, "Attempt to remove element containing view via regular DOM operation");
508 return WebInspector.View._originalRemoveChild.call(this, child); 508 return WebInspector.View._originalRemoveChild.call(this, child);
509 } 509 }
510 510
511 Element.prototype.removeChildren = function() 511 Element.prototype.removeChildren = function()
512 { 512 {
513 WebInspector.View._assert(!this.__viewCounter, "Attempt to remove element co ntaining view via regular DOM operation"); 513 WebInspector.View._assert(!this.__viewCounter, "Attempt to remove element co ntaining view via regular DOM operation");
514 WebInspector.View._originalRemoveChildren.call(this); 514 WebInspector.View._originalRemoveChildren.call(this);
515 } 515 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/TestController.js ('k') | Source/devtools/front_end/utilities.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698