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

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

Issue 660463002: DevTools: follow up to r183724, mark all floating components as roots. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 2 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/ui/RootView.js ('k') | no next file » | 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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 } 61 }
62 var styleElement = document.createElement("style"); 62 var styleElement = document.createElement("style");
63 styleElement.type = "text/css"; 63 styleElement.type = "text/css";
64 styleElement.textContent = content; 64 styleElement.textContent = content;
65 return styleElement; 65 return styleElement;
66 } 66 }
67 67
68 WebInspector.View.prototype = { 68 WebInspector.View.prototype = {
69 markAsRoot: function() 69 markAsRoot: function()
70 { 70 {
71 this.element.classList.add("component-root");
71 WebInspector.View.__assert(!this.element.parentElement, "Attempt to mark as root attached node"); 72 WebInspector.View.__assert(!this.element.parentElement, "Attempt to mark as root attached node");
72 this._isRoot = true; 73 this._isRoot = true;
73 }, 74 },
74 75
75 /** 76 /**
76 * @return {?WebInspector.View} 77 * @return {?WebInspector.View}
77 */ 78 */
78 parentView: function() 79 parentView: function()
79 { 80 {
80 return this._parentView; 81 return this._parentView;
(...skipping 562 matching lines...) Expand 10 before | Expand all | Expand 10 after
643 { 644 {
644 WebInspector.View.__assert(!child.__viewCounter && !child.__view, "Attempt t o remove element containing view via regular DOM operation"); 645 WebInspector.View.__assert(!child.__viewCounter && !child.__view, "Attempt t o remove element containing view via regular DOM operation");
645 return WebInspector.View._originalRemoveChild.call(this, child); 646 return WebInspector.View._originalRemoveChild.call(this, child);
646 } 647 }
647 648
648 Element.prototype.removeChildren = function() 649 Element.prototype.removeChildren = function()
649 { 650 {
650 WebInspector.View.__assert(!this.__viewCounter, "Attempt to remove element c ontaining view via regular DOM operation"); 651 WebInspector.View.__assert(!this.__viewCounter, "Attempt to remove element c ontaining view via regular DOM operation");
651 WebInspector.View._originalRemoveChildren.call(this); 652 WebInspector.View._originalRemoveChildren.call(this);
652 } 653 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/ui/RootView.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698