OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2007 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007 Apple Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * | 7 * |
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 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
272 | 272 |
273 if (name === "margin" && noMarginDisplayType[style.getPropertyValue(
"display")]) | 273 if (name === "margin" && noMarginDisplayType[style.getPropertyValue(
"display")]) |
274 continue; | 274 continue; |
275 if (name === "padding" && noPaddingDisplayType[style.getPropertyValu
e("display")]) | 275 if (name === "padding" && noPaddingDisplayType[style.getPropertyValu
e("display")]) |
276 continue; | 276 continue; |
277 if (name === "position" && noPositionType[style.getPropertyValue("po
sition")]) | 277 if (name === "position" && noPositionType[style.getPropertyValue("po
sition")]) |
278 continue; | 278 continue; |
279 | 279 |
280 var boxElement = createElement("div"); | 280 var boxElement = createElement("div"); |
281 boxElement.className = name; | 281 boxElement.className = name; |
282 boxElement._backgroundColor = boxColors[i].toString(WebInspector.Col
or.Format.RGBA); | 282 boxElement._backgroundColor = boxColors[i].asString(WebInspector.Col
or.Format.RGBA); |
283 boxElement._name = name; | 283 boxElement._name = name; |
284 boxElement.style.backgroundColor = boxElement._backgroundColor; | 284 boxElement.style.backgroundColor = boxElement._backgroundColor; |
285 boxElement.addEventListener("mouseover", this._highlightDOMNode.bind
(this, true, name === "position" ? "all" : name), false); | 285 boxElement.addEventListener("mouseover", this._highlightDOMNode.bind
(this, true, name === "position" ? "all" : name), false); |
286 this._boxElements.push(boxElement); | 286 this._boxElements.push(boxElement); |
287 | 287 |
288 if (name === "content") { | 288 if (name === "content") { |
289 var widthElement = createElement("span"); | 289 var widthElement = createElement("span"); |
290 widthElement.textContent = getContentAreaWidthPx(style); | 290 widthElement.textContent = getContentAreaWidthPx(style); |
291 widthElement.addEventListener("dblclick", this.startEditing.bind
(this, widthElement, "width", "width", style), false); | 291 widthElement.addEventListener("dblclick", this.startEditing.bind
(this, widthElement, "width", "width", style), false); |
292 | 292 |
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
475 }, | 475 }, |
476 | 476 |
477 editingCommitted: function(element, userInput, previousContent, context) | 477 editingCommitted: function(element, userInput, previousContent, context) |
478 { | 478 { |
479 this.editingEnded(element, context); | 479 this.editingEnded(element, context); |
480 this._applyUserInput(element, userInput, previousContent, context, true)
; | 480 this._applyUserInput(element, userInput, previousContent, context, true)
; |
481 }, | 481 }, |
482 | 482 |
483 __proto__: WebInspector.ElementsSidebarPane.prototype | 483 __proto__: WebInspector.ElementsSidebarPane.prototype |
484 } | 484 } |
OLD | NEW |