| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
| 3 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. | 3 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. |
| 4 * Copyright (C) 2007 Matt Lilek (pewtermoose@gmail.com). | 4 * Copyright (C) 2007 Matt Lilek (pewtermoose@gmail.com). |
| 5 * Copyright (C) 2009 Joseph Pecoraro | 5 * Copyright (C) 2009 Joseph Pecoraro |
| 6 * | 6 * |
| 7 * Redistribution and use in source and binary forms, with or without | 7 * Redistribution and use in source and binary forms, with or without |
| 8 * modification, are permitted provided that the following conditions | 8 * modification, are permitted provided that the following conditions |
| 9 * are met: | 9 * are met: |
| 10 * | 10 * |
| (...skipping 575 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 586 | 586 |
| 587 /** | 587 /** |
| 588 * @return {string} | 588 * @return {string} |
| 589 */ | 589 */ |
| 590 WebInspector.manageBlackboxingButtonLabel = function() | 590 WebInspector.manageBlackboxingButtonLabel = function() |
| 591 { | 591 { |
| 592 return WebInspector.UIString("Manage framework blackboxing..."); | 592 return WebInspector.UIString("Manage framework blackboxing..."); |
| 593 } | 593 } |
| 594 | 594 |
| 595 /** | 595 /** |
| 596 * @param {!Document} document | 596 * @param {!Element} element |
| 597 * @return {boolean} |
| 597 */ | 598 */ |
| 598 WebInspector.installPortStyles = function(document) | 599 WebInspector.installComponentRootStyles = function(element) |
| 599 { | 600 { |
| 600 var platform = WebInspector.platform(); | 601 var wasInstalled = element.classList.contains("component-root"); |
| 601 document.body.classList.add("platform-" + platform); | 602 if (wasInstalled) |
| 602 var flavor = WebInspector.platformFlavor(); | 603 return false; |
| 603 if (flavor) | 604 element.classList.add("component-root", "platform-" + WebInspector.platform(
)); |
| 604 document.body.classList.add("platform-" + flavor); | 605 return true; |
| 605 var port = WebInspector.port(); | |
| 606 document.body.classList.add("port-" + port); | |
| 607 } | 606 } |
| 608 | 607 |
| 609 /** | 608 /** |
| 609 * @param {!Element} element |
| 610 */ |
| 611 WebInspector.uninstallComponentRootStyles = function(element) |
| 612 { |
| 613 var wasInstalled = element.classList.remove("component-root", "platform-" +
WebInspector.platform()); |
| 614 } |
| 615 |
| 616 /** |
| 610 * @param {!Document} document | 617 * @param {!Document} document |
| 611 * @param {!Event} event | 618 * @param {!Event} event |
| 612 */ | 619 */ |
| 613 WebInspector._windowFocused = function(document, event) | 620 WebInspector._windowFocused = function(document, event) |
| 614 { | 621 { |
| 615 if (event.target.document.nodeType === Node.DOCUMENT_NODE) | 622 if (event.target.document.nodeType === Node.DOCUMENT_NODE) |
| 616 document.body.classList.remove("inactive"); | 623 document.body.classList.remove("inactive"); |
| 617 } | 624 } |
| 618 | 625 |
| 619 /** | 626 /** |
| (...skipping 518 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1138 /** | 1145 /** |
| 1139 * @param {!Window} window | 1146 * @param {!Window} window |
| 1140 */ | 1147 */ |
| 1141 WebInspector.initializeUIUtils = function(window) | 1148 WebInspector.initializeUIUtils = function(window) |
| 1142 { | 1149 { |
| 1143 window.addEventListener("focus", WebInspector._windowFocused.bind(WebInspect
or, window.document), false); | 1150 window.addEventListener("focus", WebInspector._windowFocused.bind(WebInspect
or, window.document), false); |
| 1144 window.addEventListener("blur", WebInspector._windowBlurred.bind(WebInspecto
r, window.document), false); | 1151 window.addEventListener("blur", WebInspector._windowBlurred.bind(WebInspecto
r, window.document), false); |
| 1145 window.document.addEventListener("focus", WebInspector._focusChanged.bind(We
bInspector, window.document), true); | 1152 window.document.addEventListener("focus", WebInspector._focusChanged.bind(We
bInspector, window.document), true); |
| 1146 window.document.addEventListener("blur", WebInspector._documentBlurred.bind(
WebInspector, window.document), true); | 1153 window.document.addEventListener("blur", WebInspector._documentBlurred.bind(
WebInspector, window.document), true); |
| 1147 } | 1154 } |
| OLD | NEW |