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

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

Issue 1653213002: Devtools: Use Event.deepPath as a function if available. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 months 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/ui/Tooltip.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 (function(window) { 5 (function(window) {
6 6
7 // DevToolsAPI ---------------------------------------------------------------- 7 // DevToolsAPI ----------------------------------------------------------------
8 8
9 /** 9 /**
10 * @constructor 10 * @constructor
(...skipping 890 matching lines...) Expand 10 before | Expand all | Expand 10 after
901 { 901 {
902 } 902 }
903 CSSPrimitiveValue.CSS_PX = 5; 903 CSSPrimitiveValue.CSS_PX = 5;
904 window.CSSPrimitiveValue = CSSPrimitiveValue; 904 window.CSSPrimitiveValue = CSSPrimitiveValue;
905 905
906 // Support for legacy (<M44) frontends. Remove in M48. 906 // Support for legacy (<M44) frontends. Remove in M48.
907 var styleElement = window.document.createElement("style"); 907 var styleElement = window.document.createElement("style");
908 styleElement.type = "text/css"; 908 styleElement.type = "text/css";
909 styleElement.textContent = "html /deep/ * { min-width: 0; min-height: 0; }"; 909 styleElement.textContent = "html /deep/ * { min-width: 0; min-height: 0; }";
910 window.document.head.appendChild(styleElement); 910 window.document.head.appendChild(styleElement);
911
912 // Support for legacy (<M49) frontends. Remove in M52.
913 Event.prototype.deepPath = undefined;
911 } 914 }
912 915
913 function windowLoaded() 916 function windowLoaded()
914 { 917 {
915 window.removeEventListener("DOMContentLoaded", windowLoaded, false); 918 window.removeEventListener("DOMContentLoaded", windowLoaded, false);
916 installBackwardsCompatibility(); 919 installBackwardsCompatibility();
917 } 920 }
918 921
919 if (window.document.head && (window.document.readyState === "complete" || window .document.readyState === "interactive")) 922 if (window.document.head && (window.document.readyState === "complete" || window .document.readyState === "interactive"))
920 installBackwardsCompatibility(); 923 installBackwardsCompatibility();
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
954 957
955 if (!DOMTokenList.prototype.__originalDOMTokenListToggle) { 958 if (!DOMTokenList.prototype.__originalDOMTokenListToggle) {
956 DOMTokenList.prototype.__originalDOMTokenListToggle = DOMTokenList.prototype .toggle; 959 DOMTokenList.prototype.__originalDOMTokenListToggle = DOMTokenList.prototype .toggle;
957 DOMTokenList.prototype.toggle = function(token, force) 960 DOMTokenList.prototype.toggle = function(token, force)
958 { 961 {
959 if (arguments.length === 1) 962 if (arguments.length === 1)
960 force = !this.contains(token); 963 force = !this.contains(token);
961 return this.__originalDOMTokenListToggle(token, !!force); 964 return this.__originalDOMTokenListToggle(token, !!force);
962 } 965 }
963 } 966 }
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/ui/Tooltip.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698