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

Side by Side Diff: Source/devtools/front_end/console/CustomPreviewSection.js

Issue 899163003: Move rendering/RenderObject to layout/LayoutObject. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 10 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/core/testing/Internals.cpp ('k') | Source/modules/accessibility/AXARIAGrid.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * @constructor 6 * @constructor
7 * @param {!WebInspector.RemoteObject} object 7 * @param {!WebInspector.RemoteObject} object
8 * @param {!Array.<*>=} prefixML 8 * @param {!Array.<*>=} prefixML
9 */ 9 */
10 WebInspector.CustomPreviewSection = function(object, prefixML) 10 WebInspector.CustomPreviewSection = function(object, prefixML)
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 * @param {*} jsonML 91 * @param {*} jsonML
92 * @return {!Node} 92 * @return {!Node}
93 */ 93 */
94 _renderJSONMLTag: function(jsonML) 94 _renderJSONMLTag: function(jsonML)
95 { 95 {
96 if (!Array.isArray(jsonML)) 96 if (!Array.isArray(jsonML))
97 return createTextNode(jsonML + ""); 97 return createTextNode(jsonML + "");
98 98
99 var array = /** @type {!Array.<*>} */(jsonML); 99 var array = /** @type {!Array.<*>} */(jsonML);
100 if (array[0] === "object") 100 if (array[0] === "object")
101 return this._renderObjectTag(array); 101 return this._layoutObjectTag(array);
102 else 102 else
103 return this._renderElement(array); 103 return this._renderElement(array);
104 }, 104 },
105 105
106 /** 106 /**
107 * 107 *
108 * @param {!Array.<*>} object 108 * @param {!Array.<*>} object
109 * @return {!Node} 109 * @return {!Node}
110 */ 110 */
111 _renderElement: function(object) 111 _renderElement: function(object)
(...skipping 16 matching lines...) Expand all
128 } 128 }
129 129
130 this._appendJsonMLTags(element, object); 130 this._appendJsonMLTags(element, object);
131 return element; 131 return element;
132 }, 132 },
133 133
134 /** 134 /**
135 * @param {!Array.<*>} objectTag 135 * @param {!Array.<*>} objectTag
136 * @return {!Node} 136 * @return {!Node}
137 */ 137 */
138 _renderObjectTag: function(objectTag) 138 _layoutObjectTag: function(objectTag)
139 { 139 {
140 objectTag.shift(); 140 objectTag.shift();
141 var attributes = objectTag.shift(); 141 var attributes = objectTag.shift();
142 var remoteObject = this._object.target().runtimeModel.createRemoteObject (/** @type {!RuntimeAgent.RemoteObject} */ (attributes)); 142 var remoteObject = this._object.target().runtimeModel.createRemoteObject (/** @type {!RuntimeAgent.RemoteObject} */ (attributes));
143 if (!remoteObject.customPreview()) { 143 if (!remoteObject.customPreview()) {
144 var header = createElement("span"); 144 var header = createElement("span");
145 this._appendJsonMLTags(header, objectTag); 145 this._appendJsonMLTags(header, objectTag);
146 var objectPropertiesSection = new WebInspector.ObjectPropertiesSecti on(remoteObject, header); 146 var objectPropertiesSection = new WebInspector.ObjectPropertiesSecti on(remoteObject, header);
147 return objectPropertiesSection.element; 147 return objectPropertiesSection.element;
148 } 148 }
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 function onBodyLoaded(bodyJsonML) 241 function onBodyLoaded(bodyJsonML)
242 { 242 {
243 if (!bodyJsonML) 243 if (!bodyJsonML)
244 return; 244 return;
245 245
246 this._cachedContent = this._renderJSONMLTag(bodyJsonML); 246 this._cachedContent = this._renderJSONMLTag(bodyJsonML);
247 this._toggleExpand(); 247 this._toggleExpand();
248 } 248 }
249 } 249 }
250 } 250 }
OLDNEW
« no previous file with comments | « Source/core/testing/Internals.cpp ('k') | Source/modules/accessibility/AXARIAGrid.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698