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 858 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
869 if (!WebInspector._isTextEditingElement(x) && selection.isCollapsed && ! x.isInsertionCaretInside()) { | 869 if (!WebInspector._isTextEditingElement(x) && selection.isCollapsed && ! x.isInsertionCaretInside()) { |
870 var selectionRange = x.ownerDocument.createRange(); | 870 var selectionRange = x.ownerDocument.createRange(); |
871 selectionRange.setStart(x, 0); | 871 selectionRange.setStart(x, 0); |
872 selectionRange.setEnd(x, 0); | 872 selectionRange.setEnd(x, 0); |
873 | 873 |
874 selection.removeAllRanges(); | 874 selection.removeAllRanges(); |
875 selection.addRange(selectionRange); | 875 selection.addRange(selectionRange); |
876 } | 876 } |
877 } else if (WebInspector._previousFocusElement) | 877 } else if (WebInspector._previousFocusElement) |
878 WebInspector._previousFocusElement.blur(); | 878 WebInspector._previousFocusElement.blur(); |
879 | |
880 if (!x) | |
881 WebInspector.Dialog.focus(); | |
dgozman
2016/06/29 22:19:15
I wonder how the dialog is different from document
luoe
2016/06/30 00:03:16
When the document is blurred (e.g. clicking on a n
| |
879 } | 882 } |
880 | 883 |
881 WebInspector.restoreFocusFromElement = function(element) | 884 WebInspector.restoreFocusFromElement = function(element) |
882 { | 885 { |
883 if (element && element.isSelfOrAncestor(WebInspector.currentFocusElement())) | 886 if (element && element.isSelfOrAncestor(WebInspector.currentFocusElement())) |
884 WebInspector.setCurrentFocusElement(WebInspector.previousFocusElement()) ; | 887 WebInspector.setCurrentFocusElement(WebInspector.previousFocusElement()) ; |
885 } | 888 } |
886 | 889 |
887 /** | 890 /** |
888 * @param {!Element} element | 891 * @param {!Element} element |
(...skipping 1089 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1978 * @param {string} title | 1981 * @param {string} title |
1979 * @return {!Element} | 1982 * @return {!Element} |
1980 */ | 1983 */ |
1981 WebInspector.linkifyDocumentationURLAsNode = function(article, title) | 1984 WebInspector.linkifyDocumentationURLAsNode = function(article, title) |
1982 { | 1985 { |
1983 return WebInspector.linkifyURLAsNode("https://developers.google.com/web/tool s/chrome-devtools/" + article, title, undefined, true); | 1986 return WebInspector.linkifyURLAsNode("https://developers.google.com/web/tool s/chrome-devtools/" + article, title, undefined, true); |
1984 } | 1987 } |
1985 | 1988 |
1986 /** @type {!WebInspector.ThemeSupport} */ | 1989 /** @type {!WebInspector.ThemeSupport} */ |
1987 WebInspector.themeSupport; | 1990 WebInspector.themeSupport; |
OLD | NEW |