Changeset 181186 in webkit
- Timestamp:
- Mar 6, 2015, 2:41:15 PM (10 years ago)
- Location:
- trunk/Source/WebInspectorUI
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebInspectorUI/ChangeLog
r181185 r181186 1 2015-03-06 Joseph Pecoraro <pecoraro@apple.com> 2 3 Web Inspector: Adopt Object Literal Method Property Syntax 4 https://bugs.webkit.org/show_bug.cgi?id=142409 5 6 Reviewed by Timothy Hatcher. 7 8 Mechanical change touching lots of files. 9 1 10 2015-03-06 Joseph Pecoraro <pecoraro@apple.com> 2 11 -
trunk/Source/WebInspectorUI/UserInterface/Models/ObjectPreview.js
r181061 r181186 111 111 }, 112 112 113 hasSize : function()113 hasSize() 114 114 { 115 115 return this._size !== undefined && (this._subtype === "array" || this._subtype === "set" || this._subtype === "map" || this._subtype === "weakmap"); -
trunk/Source/WebInspectorUI/UserInterface/Models/PropertyDescriptor.js
r180713 r181186 130 130 }, 131 131 132 hasValue : function()132 hasValue() 133 133 { 134 134 return this._hasValue; 135 135 }, 136 136 137 hasGetter : function()137 hasGetter() 138 138 { 139 139 return this._get && this._get.type === "function"; 140 140 }, 141 141 142 hasSetter : function()142 hasSetter() 143 143 { 144 144 return this._set && this._set.type === "function"; 145 145 }, 146 146 147 isIndexProperty : function()147 isIndexProperty() 148 148 { 149 149 return !isNaN(Number(this._name)); -
trunk/Source/WebInspectorUI/UserInterface/Models/PropertyPath.js
r180713 r181186 139 139 }, 140 140 141 displayPath : function(type)141 displayPath(type) 142 142 { 143 143 return type === WebInspector.PropertyPath.Type.Value ? this.reducedPath : this.fullPath; 144 144 }, 145 145 146 isRoot : function()146 isRoot() 147 147 { 148 148 return !this._parent; 149 149 }, 150 150 151 isPathComponentImpossible : function()151 isPathComponentImpossible() 152 152 { 153 153 return this._pathComponent && this._pathComponent.startsWith("@"); 154 154 }, 155 155 156 isFullPathImpossible : function()156 isFullPathImpossible() 157 157 { 158 158 if (this.isPathComponentImpossible()) … … 165 165 }, 166 166 167 appendPropertyName : function(object, propertyName)167 appendPropertyName(object, propertyName) 168 168 { 169 169 var isPrototype = propertyName === "__proto__"; … … 172 172 }, 173 173 174 appendPropertySymbol : function(object, symbolName)174 appendPropertySymbol(object, symbolName) 175 175 { 176 176 var component = WebInspector.PropertyPath.SpecialPathComponent.SymbolPropertyName + (symbolName.length ? "(" + symbolName + ")" : ""); … … 178 178 }, 179 179 180 appendInternalPropertyName : function(object, propertyName)180 appendInternalPropertyName(object, propertyName) 181 181 { 182 182 var component = WebInspector.PropertyPath.SpecialPathComponent.InternalPropertyName + "[" + propertyName + "]"; … … 184 184 }, 185 185 186 appendGetterPropertyName : function(object, propertyName)186 appendGetterPropertyName(object, propertyName) 187 187 { 188 188 var component = ".__lookupGetter__(" + doubleQuotedString(propertyName) + ")"; … … 190 190 }, 191 191 192 appendSetterPropertyName : function(object, propertyName)192 appendSetterPropertyName(object, propertyName) 193 193 { 194 194 var component = ".__lookupSetter__(" + doubleQuotedString(propertyName) + ")"; … … 196 196 }, 197 197 198 appendArrayIndex : function(object, indexString)198 appendArrayIndex(object, indexString) 199 199 { 200 200 var component = "[" + indexString + "]"; … … 202 202 }, 203 203 204 appendMapKey : function(object)204 appendMapKey(object) 205 205 { 206 206 var component = WebInspector.PropertyPath.SpecialPathComponent.MapKey; … … 208 208 }, 209 209 210 appendMapValue : function(object, keyObject)210 appendMapValue(object, keyObject) 211 211 { 212 212 console.assert(!keyObject || keyObject instanceof WebInspector.RemoteObject); … … 226 226 }, 227 227 228 appendSetIndex : function(object)228 appendSetIndex(object) 229 229 { 230 230 var component = WebInspector.PropertyPath.SpecialPathComponent.SetIndex; … … 232 232 }, 233 233 234 appendPropertyDescriptor : function(object, descriptor, type)234 appendPropertyDescriptor(object, descriptor, type) 235 235 { 236 236 if (descriptor.isInternalProperty) … … 254 254 // Private 255 255 256 _canPropertyNameBeDotAccess : function(propertyName)256 _canPropertyNameBeDotAccess(propertyName) 257 257 { 258 258 return /^(?![0-9])\w+$/.test(propertyName); -
trunk/Source/WebInspectorUI/UserInterface/Views/ObjectPreviewView.js
r181066 r181186 86 86 }, 87 87 88 showTitle : function()88 showTitle() 89 89 { 90 90 this._titleElement.hidden = false; … … 92 92 }, 93 93 94 showPreview : function()94 showPreview() 95 95 { 96 96 this._titleElement.hidden = true; … … 100 100 // Private 101 101 102 _initTitleElement : function()102 _initTitleElement() 103 103 { 104 104 // Display null / regexps as simple formatted values even in title. … … 109 109 }, 110 110 111 _numberOfPropertiesToShowInMode : function()111 _numberOfPropertiesToShowInMode() 112 112 { 113 113 return this._mode === WebInspector.ObjectPreviewView.Mode.Brief ? 3 : Infinity; 114 114 }, 115 115 116 _appendPreview : function(element, preview)116 _appendPreview(element, preview) 117 117 { 118 118 var displayObjectAsValue = false; … … 141 141 }, 142 142 143 _appendEntryPreviews : function(element, preview)143 _appendEntryPreviews(element, preview) 144 144 { 145 145 var lossless = preview.lossless && !preview.propertyPreviews.length; … … 172 172 }, 173 173 174 _appendPropertyPreviews : function(element, preview)174 _appendPropertyPreviews(element, preview) 175 175 { 176 176 // Do not show Error properties in previews. They are more useful in full views. … … 221 221 }, 222 222 223 _appendValuePreview : function(element, preview)223 _appendValuePreview(element, preview) 224 224 { 225 225 element.appendChild(WebInspector.FormattedValue.createElementForObjectPreview(preview)); -
trunk/Source/WebInspectorUI/UserInterface/Views/ObjectTreeArrayIndexTreeElement.js
r181089 r181186 44 44 // Protected 45 45 46 invokedGetter : function()46 invokedGetter() 47 47 { 48 48 this.mainTitle = this._titleFragment(); … … 53 53 // Private 54 54 55 _titleFragment : function()55 _titleFragment() 56 56 { 57 57 var container = document.createDocumentFragment(); -
trunk/Source/WebInspectorUI/UserInterface/Views/ObjectTreeBaseTreeElement.js
r181089 r181186 59 59 // Protected 60 60 61 oncontextmenu : function(event)61 oncontextmenu(event) 62 62 { 63 63 this._contextMenuHandler(event); 64 64 }, 65 65 66 resolvedValue : function()66 resolvedValue() 67 67 { 68 68 console.assert(this._property); … … 74 74 }, 75 75 76 resolvedValuePropertyPath : function()76 resolvedValuePropertyPath() 77 77 { 78 78 console.assert(this._property); … … 84 84 }, 85 85 86 thisPropertyPath : function()86 thisPropertyPath() 87 87 { 88 88 console.assert(this._property); … … 90 90 }, 91 91 92 hadError : function()92 hadError() 93 93 { 94 94 console.assert(this._property); … … 96 96 }, 97 97 98 propertyPathType : function()98 propertyPathType() 99 99 { 100 100 console.assert(this._property); … … 108 108 }, 109 109 110 propertyPathString : function(propertyPath)110 propertyPathString(propertyPath) 111 111 { 112 112 if (propertyPath.isFullPathImpossible()) … … 116 116 }, 117 117 118 createInteractiveGetterElement : function()118 createInteractiveGetterElement() 119 119 { 120 120 var getterElement = document.createElement("img"); … … 137 137 }, 138 138 139 createReadOnlyIconElement : function()139 createReadOnlyIconElement() 140 140 { 141 141 var readOnlyElement = document.createElement("img"); … … 147 147 // Private 148 148 149 _logValue : function(value)149 _logValue(value) 150 150 { 151 151 var resolvedValue = value || this.resolvedValue(); … … 163 163 }, 164 164 165 _contextMenuHandler : function(event)165 _contextMenuHandler(event) 166 166 { 167 167 var resolvedValue = this.resolvedValue(); … … 187 187 }, 188 188 189 _appendMenusItemsForObject : function(contextMenu, resolvedValue)189 _appendMenusItemsForObject(contextMenu, resolvedValue) 190 190 { 191 191 if (resolvedValue.type === "function") { -
trunk/Source/WebInspectorUI/UserInterface/Views/ObjectTreeMapEntryTreeElement.js
r181119 r181186 51 51 // Protected 52 52 53 resolvedValue : function()53 resolvedValue() 54 54 { 55 55 return this._object; 56 56 }, 57 57 58 propertyPathType : function()58 propertyPathType() 59 59 { 60 60 return WebInspector.PropertyPath.Type.Value; … … 63 63 // Private 64 64 65 _titleFragment : function()65 _titleFragment() 66 66 { 67 67 var container = document.createDocumentFragment(); … … 97 97 // Protected 98 98 99 displayPropertyName : function()99 displayPropertyName() 100 100 { 101 101 return WebInspector.UIString("key"); 102 102 }, 103 103 104 resolvedValuePropertyPath : function()104 resolvedValuePropertyPath() 105 105 { 106 106 return this._propertyPath.appendMapKey(this._object); … … 122 122 // Protected 123 123 124 displayPropertyName : function()124 displayPropertyName() 125 125 { 126 126 return WebInspector.UIString("value"); 127 127 }, 128 128 129 resolvedValuePropertyPath : function()129 resolvedValuePropertyPath() 130 130 { 131 131 return this._propertyPath.appendMapValue(this._object, this._key); -
trunk/Source/WebInspectorUI/UserInterface/Views/ObjectTreePropertyTreeElement.js
r181089 r181186 56 56 // Protected 57 57 58 onpopulate : function()58 onpopulate() 59 59 { 60 60 this._updateChildren(); 61 61 }, 62 62 63 onexpand : function()63 onexpand() 64 64 { 65 65 if (this._previewView) … … 67 67 }, 68 68 69 oncollapse : function()69 oncollapse() 70 70 { 71 71 if (this._previewView) … … 73 73 }, 74 74 75 invokedGetter : function()75 invokedGetter() 76 76 { 77 77 this.mainTitle = this._titleFragment(); … … 90 90 // Private 91 91 92 _updateHasChildren : function()92 _updateHasChildren() 93 93 { 94 94 var resolvedValue = this.resolvedValue(); … … 102 102 }, 103 103 104 _updateTooltips : function()104 _updateTooltips() 105 105 { 106 106 var attributes = []; … … 116 116 }, 117 117 118 _titleFragment : function()118 _titleFragment() 119 119 { 120 120 if (this.property.name === "__proto__") … … 127 127 }, 128 128 129 _createTitlePrototype : function()129 _createTitlePrototype() 130 130 { 131 131 console.assert(this.property.hasValue()); … … 139 139 }, 140 140 141 _createTitlePropertyStyle : function()141 _createTitlePropertyStyle() 142 142 { 143 143 var container = document.createDocumentFragment(); … … 187 187 }, 188 188 189 _createTitleAPIStyle : function()189 _createTitleAPIStyle() 190 190 { 191 191 // Fixed values and special properties display like a property. … … 223 223 }, 224 224 225 _alwaysDisplayAsProperty : function()225 _alwaysDisplayAsProperty() 226 226 { 227 227 // Constructor, though a function, is often better treated as an expandable object. … … 240 240 }, 241 241 242 _functionPropertyString : function()242 _functionPropertyString() 243 243 { 244 244 return "function" + this._functionParameterString(); 245 245 }, 246 246 247 _functionParameterString : function()247 _functionParameterString() 248 248 { 249 249 var resolvedValue = this.resolvedValue(); … … 277 277 }, 278 278 279 _sanitizedPrototypeString : function(value)279 _sanitizedPrototypeString(value) 280 280 { 281 281 // FIXME: <https://webkit.org/b/141610> For many X, X.prototype is an X when it must be a plain object … … 290 290 }, 291 291 292 _updateChildren : function()292 _updateChildren() 293 293 { 294 294 if (this.children.length && !this.shouldRefreshChildren) … … 304 304 }, 305 305 306 _updateChildrenInternal : function(handler, mode, list)306 _updateChildrenInternal(handler, mode, list) 307 307 { 308 308 this.removeChildren(); … … 317 317 }, 318 318 319 _updateEntries : function(entries, propertyPath, mode)319 _updateEntries(entries, propertyPath, mode) 320 320 { 321 321 for (var entry of entries) { … … 340 340 }, 341 341 342 _updateProperties : function(properties, propertyPath, mode)342 _updateProperties(properties, propertyPath, mode) 343 343 { 344 344 properties.sort(WebInspector.ObjectTreeView.ComparePropertyDescriptors); -
trunk/Source/WebInspectorUI/UserInterface/Views/ObjectTreeSetIndexTreeElement.js
r181119 r181186 50 50 // Protected 51 51 52 resolvedValue : function()52 resolvedValue() 53 53 { 54 54 return this._object; 55 55 }, 56 56 57 resolvedValuePropertyPath : function()57 resolvedValuePropertyPath() 58 58 { 59 59 return this.propertyPath.appendSetIndex(this._object); … … 62 62 // Private 63 63 64 _titleFragment : function()64 _titleFragment() 65 65 { 66 66 var container = document.createDocumentFragment(); -
trunk/Source/WebInspectorUI/UserInterface/Views/ObjectTreeView.js
r180715 r181186 157 157 }, 158 158 159 expand : function()159 expand() 160 160 { 161 161 if (this._expanded) … … 173 173 }, 174 174 175 collapse : function()175 collapse() 176 176 { 177 177 if (!this._expanded) … … 187 187 }, 188 188 189 appendTitleSuffix : function(suffixElement)189 appendTitleSuffix(suffixElement) 190 190 { 191 191 if (this._previewView) … … 197 197 // Protected 198 198 199 update : function()199 update() 200 200 { 201 201 if (this._object.isCollectionType() && this._mode === WebInspector.ObjectTreeView.Mode.Properties) … … 207 207 // Private 208 208 209 _updateChildren : function(handler, list)209 _updateChildren(handler, list) 210 210 { 211 211 this._outline.removeChildren(); … … 220 220 }, 221 221 222 _updateEntries : function(entries, propertyPath)222 _updateEntries(entries, propertyPath) 223 223 { 224 224 for (var entry of entries) { … … 242 242 }, 243 243 244 _updateProperties : function(properties, propertyPath)244 _updateProperties(properties, propertyPath) 245 245 { 246 246 properties.sort(WebInspector.ObjectTreeView.ComparePropertyDescriptors); … … 265 265 }, 266 266 267 _handlePreviewOrTitleElementClick : function(event)267 _handlePreviewOrTitleElementClick(event) 268 268 { 269 269 if (this._hasLosslessPreview) … … 278 278 }, 279 279 280 _trackWeakEntries : function()280 _trackWeakEntries() 281 281 { 282 282 if (this._trackingEntries) … … 295 295 }, 296 296 297 _untrackWeakEntries : function()297 _untrackWeakEntries() 298 298 { 299 299 if (!this._trackingEntries)
Note:
See TracChangeset
for help on using the changeset viewer.