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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/sdk/DOMModel.js

Issue 2571713002: DevTools: [SSP] do not autocomplete SVG properties for non-svg nodes (Closed)
Patch Set: addres comments Created 4 years 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) 2009, 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2009, 2010 Google Inc. All rights reserved.
3 * Copyright (C) 2009 Joseph Pecoraro 3 * Copyright (C) 2009 Joseph Pecoraro
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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 this._backendNodeId = payload.backendNodeId; 68 this._backendNodeId = payload.backendNodeId;
69 this._domModel._idToDOMNode[this.id] = this; 69 this._domModel._idToDOMNode[this.id] = this;
70 this._nodeType = payload.nodeType; 70 this._nodeType = payload.nodeType;
71 this._nodeName = payload.nodeName; 71 this._nodeName = payload.nodeName;
72 this._localName = payload.localName; 72 this._localName = payload.localName;
73 this._nodeValue = payload.nodeValue; 73 this._nodeValue = payload.nodeValue;
74 this._pseudoType = payload.pseudoType; 74 this._pseudoType = payload.pseudoType;
75 this._shadowRootType = payload.shadowRootType; 75 this._shadowRootType = payload.shadowRootType;
76 this._frameOwnerFrameId = payload.frameId || null; 76 this._frameOwnerFrameId = payload.frameId || null;
77 this._xmlVersion = payload.xmlVersion; 77 this._xmlVersion = payload.xmlVersion;
78 this._isSVGNode = !!payload.isSVG;
78 79
79 this._shadowRoots = []; 80 this._shadowRoots = [];
80 81
81 this._attributes = []; 82 this._attributes = [];
82 this._attributesMap = {}; 83 this._attributesMap = {};
83 if (payload.attributes) 84 if (payload.attributes)
84 this._setAttributesPayload(payload.attributes); 85 this._setAttributesPayload(payload.attributes);
85 86
86 /** @type {!Map<string, ?>} */ 87 /** @type {!Map<string, ?>} */
87 this._markers = new Map(); 88 this._markers = new Map();
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 this.publicId = payload.publicId; 140 this.publicId = payload.publicId;
140 this.systemId = payload.systemId; 141 this.systemId = payload.systemId;
141 this.internalSubset = payload.internalSubset; 142 this.internalSubset = payload.internalSubset;
142 } else if (this._nodeType === Node.ATTRIBUTE_NODE) { 143 } else if (this._nodeType === Node.ATTRIBUTE_NODE) {
143 this.name = payload.name; 144 this.name = payload.name;
144 this.value = payload.value; 145 this.value = payload.value;
145 } 146 }
146 } 147 }
147 148
148 /** 149 /**
150 * @return {boolean}
151 */
152 isSVGNode() {
153 return this._isSVGNode;
154 }
155
156 /**
149 * @return {!SDK.DOMModel} 157 * @return {!SDK.DOMModel}
150 */ 158 */
151 domModel() { 159 domModel() {
152 return this._domModel; 160 return this._domModel;
153 } 161 }
154 162
155 /** 163 /**
156 * @return {number} 164 * @return {number}
157 */ 165 */
158 backendNodeId() { 166 backendNodeId() {
(...skipping 2003 matching lines...) Expand 10 before | Expand all | Expand 10 after
2162 /** 2170 /**
2163 * @override 2171 * @override
2164 * @param {!Protocol.Page.FrameId} frameId 2172 * @param {!Protocol.Page.FrameId} frameId
2165 */ 2173 */
2166 highlightFrame(frameId) { 2174 highlightFrame(frameId) {
2167 this._agent.highlightFrame( 2175 this._agent.highlightFrame(
2168 frameId, Common.Color.PageHighlight.Content.toProtocolRGBA(), 2176 frameId, Common.Color.PageHighlight.Content.toProtocolRGBA(),
2169 Common.Color.PageHighlight.ContentOutline.toProtocolRGBA()); 2177 Common.Color.PageHighlight.ContentOutline.toProtocolRGBA());
2170 } 2178 }
2171 }; 2179 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698