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

Side by Side Diff: Source/devtools/front_end/ui/UIUtils.js

Issue 675753002: [DevTools] Drop "ui" module from toolbox. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebased Created 6 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « Source/devtools/front_end/ui/RootView.js ('k') | Source/devtools/front_end/ui/module.json » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 910 matching lines...) Expand 10 before | Expand all | Expand 10 after
921 entry.node.remove(); 921 entry.node.remove();
922 break; 922 break;
923 case "changed": 923 case "changed":
924 entry.node.textContent = entry.oldText; 924 entry.node.textContent = entry.oldText;
925 break; 925 break;
926 } 926 }
927 } 927 }
928 } 928 }
929 929
930 /** 930 /**
931 * @param {!Element} element
932 * @param {?Element=} containerElement
933 * @return {!Size}
934 */
935 WebInspector.measurePreferredSize = function(element, containerElement)
936 {
937 containerElement = containerElement || element.ownerDocument.body;
938 containerElement.appendChild(element);
939 var fakingComponentRoot = WebInspector.installComponentRootStyles(element);
940 element.positionAt(0, 0);
941 var result = new Size(element.offsetWidth, element.offsetHeight);
942 element.positionAt(undefined, undefined);
943 element.remove();
944 if (fakingComponentRoot)
945 WebInspector.uninstallComponentRootStyles(element);
946 return result;
947 }
948
949 /**
931 * @constructor 950 * @constructor
932 * @param {boolean} autoInvoke 951 * @param {boolean} autoInvoke
933 */ 952 */
934 WebInspector.InvokeOnceHandlers = function(autoInvoke) 953 WebInspector.InvokeOnceHandlers = function(autoInvoke)
935 { 954 {
936 this._handlers = null; 955 this._handlers = null;
937 this._autoInvoke = autoInvoke; 956 this._autoInvoke = autoInvoke;
938 } 957 }
939 958
940 WebInspector.InvokeOnceHandlers.prototype = { 959 WebInspector.InvokeOnceHandlers.prototype = {
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
1145 /** 1164 /**
1146 * @param {!Window} window 1165 * @param {!Window} window
1147 */ 1166 */
1148 WebInspector.initializeUIUtils = function(window) 1167 WebInspector.initializeUIUtils = function(window)
1149 { 1168 {
1150 window.addEventListener("focus", WebInspector._windowFocused.bind(WebInspect or, window.document), false); 1169 window.addEventListener("focus", WebInspector._windowFocused.bind(WebInspect or, window.document), false);
1151 window.addEventListener("blur", WebInspector._windowBlurred.bind(WebInspecto r, window.document), false); 1170 window.addEventListener("blur", WebInspector._windowBlurred.bind(WebInspecto r, window.document), false);
1152 window.document.addEventListener("focus", WebInspector._focusChanged.bind(We bInspector, window.document), true); 1171 window.document.addEventListener("focus", WebInspector._focusChanged.bind(We bInspector, window.document), true);
1153 window.document.addEventListener("blur", WebInspector._documentBlurred.bind( WebInspector, window.document), true); 1172 window.document.addEventListener("blur", WebInspector._documentBlurred.bind( WebInspector, window.document), true);
1154 } 1173 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/ui/RootView.js ('k') | Source/devtools/front_end/ui/module.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698