OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 2007 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007 Apple 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 | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * | 8 * |
9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. 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 493 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
504 } | 504 } |
505 | 505 |
506 /** | 506 /** |
507 * @param {?WebInspector.CSSStyleDeclaration} computedStyle | 507 * @param {?WebInspector.CSSStyleDeclaration} computedStyle |
508 */ | 508 */ |
509 function computedCallback(computedStyle) | 509 function computedCallback(computedStyle) |
510 { | 510 { |
511 resultStyles.computedStyle = computedStyle; | 511 resultStyles.computedStyle = computedStyle; |
512 } | 512 } |
513 | 513 |
514 /** | |
515 * @param {?Array.<!WebInspector.DOMModel.AnimationPlayer>} animationPla yers | |
516 * @this {WebInspector.StylesSidebarPane} | |
517 */ | |
518 function animationPlayersCallback(animationPlayers) | |
519 { | |
520 for (var i = 0; i < animationPlayers.length; ++i) { | |
521 var player = animationPlayers[i]; | |
522 var section = new WebInspector.AnimationSection(player); | |
523 var separatorElement = document.createElement("div"); | |
524 separatorElement.className = "sidebar-separator"; | |
525 separatorElement.createTextChild(WebInspector.UIString("Animatio n") + " " + player.id()); | |
caseq
2014/10/03 12:43:55
Should we use name when available?
samli
2014/10/07 05:25:44
Done.
| |
526 this._sectionsContainer.appendChild(separatorElement); | |
caseq
2014/10/03 12:43:55
nit: var separatorElement = this._sectionsContaine
samli
2014/10/07 05:25:44
Done.
| |
527 this._sectionsContainer.appendChild(section.element); | |
528 this._target.cssModel.getKeyframeStylesForNodeAsync(player.id(), keyframeStylesCallback.bind(this, section.element)); | |
529 } | |
530 } | |
531 | |
532 /** | |
533 * @param {?Element} anchorElement | |
534 * @param {?Array.<!WebInspector.CSSRule>} keyframeStyles | |
535 * @this {WebInspector.StylesSidebarPane} | |
536 */ | |
537 function keyframeStylesCallback(anchorElement, keyframeStyles) { | |
caseq
2014/10/03 12:43:55
style: { => next line
samli
2014/10/07 05:25:44
Done.
| |
538 // Maintain order of keyframes | |
539 for (var i = keyframeStyles.length - 1; i >= 0; i--) { | |
540 // FIXME: Styles should be editable | |
541 var section = new WebInspector.StylePropertiesSection(this, keyf rameStyles[i], false, false); | |
542 section.expand(); | |
543 this._sectionsContainer.insertBefore(section.element, anchorElem ent.nextSibling); | |
544 } | |
545 } | |
546 | |
514 if (this._computedStylePane.isShowing()) | 547 if (this._computedStylePane.isShowing()) |
515 this._target.cssModel.getComputedStyleAsync(node.id, computedCallbac k); | 548 this._target.cssModel.getComputedStyleAsync(node.id, computedCallbac k); |
516 this._target.cssModel.getInlineStylesAsync(node.id, inlineCallback); | 549 this._target.cssModel.getInlineStylesAsync(node.id, inlineCallback); |
517 this._target.cssModel.getMatchedStylesAsync(node.id, false, false, style sCallback.bind(this)); | 550 this._target.cssModel.getMatchedStylesAsync(node.id, false, false, style sCallback.bind(this)); |
551 if (Runtime.experiments.isEnabled("animationInspection")) | |
552 node.animationPlayers(animationPlayersCallback.bind(this)); | |
518 }, | 553 }, |
519 | 554 |
520 /** | 555 /** |
521 * @param {function()=} userCallback | 556 * @param {function()=} userCallback |
522 */ | 557 */ |
523 _validateNode: function(userCallback) | 558 _validateNode: function(userCallback) |
524 { | 559 { |
525 if (!this._node) { | 560 if (!this._node) { |
526 this._sectionsContainer.removeChildren(); | 561 this._sectionsContainer.removeChildren(); |
527 this._computedStylePane.bodyElement.removeChildren(); | 562 this._computedStylePane.bodyElement.removeChildren(); |
(...skipping 3015 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3543 if (userEnteredText && (userEnteredText === userEnteredText.toUpperCase( ))) { | 3578 if (userEnteredText && (userEnteredText === userEnteredText.toUpperCase( ))) { |
3544 for (var i = 0; i < results.length; ++i) | 3579 for (var i = 0; i < results.length; ++i) |
3545 results[i] = results[i].toUpperCase(); | 3580 results[i] = results[i].toUpperCase(); |
3546 } | 3581 } |
3547 var selectedIndex = this._cssCompletions.mostUsedOf(results); | 3582 var selectedIndex = this._cssCompletions.mostUsedOf(results); |
3548 completionsReadyCallback(results, selectedIndex); | 3583 completionsReadyCallback(results, selectedIndex); |
3549 }, | 3584 }, |
3550 | 3585 |
3551 __proto__: WebInspector.TextPrompt.prototype | 3586 __proto__: WebInspector.TextPrompt.prototype |
3552 } | 3587 } |
OLD | NEW |