| OLD | NEW |
| 1 "use strict"; | 1 "use strict"; |
| 2 /* | 2 /* |
| 3 * Copyright (C) 2012 Google Inc. All rights reserved. | 3 * Copyright (C) 2012 Google Inc. All rights reserved. |
| 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 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 162 window.resizeTo(rect.width, rect.height); | 162 window.resizeTo(rect.width, rect.height); |
| 163 } | 163 } |
| 164 } | 164 } |
| 165 | 165 |
| 166 function hideWindow() { | 166 function hideWindow() { |
| 167 setWindowRect(new Rect(0, 0, 1, 1)); | 167 setWindowRect(new Rect(0, 0, 1, 1)); |
| 168 } | 168 } |
| 169 | 169 |
| 170 window.addEventListener("resize", function() { | 170 window.addEventListener("resize", function() { |
| 171 if (window.innerWidth === 1 && window.innerHeight === 1) | 171 if (window.innerWidth === 1 && window.innerHeight === 1) |
| 172 return; | 172 window.dispatchEvent(new CustomEvent("didHide")); |
| 173 window.dispatchEvent(new CustomEvent("didOpenPicker")); | 173 else |
| 174 window.dispatchEvent(new CustomEvent("didOpenPicker")); |
| 174 }, false); | 175 }, false); |
| 175 | 176 |
| 176 /** | 177 /** |
| 177 * @return {!number} | 178 * @return {!number} |
| 178 */ | 179 */ |
| 179 function getScrollbarWidth() { | 180 function getScrollbarWidth() { |
| 180 if (typeof window.scrollbarWidth === "undefined") { | 181 if (typeof window.scrollbarWidth === "undefined") { |
| 181 var scrollDiv = document.createElement("div"); | 182 var scrollDiv = document.createElement("div"); |
| 182 scrollDiv.style.opacity = "0"; | 183 scrollDiv.style.opacity = "0"; |
| 183 scrollDiv.style.overflow = "scroll"; | 184 scrollDiv.style.overflow = "scroll"; |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 231 | 232 |
| 232 Picker.prototype.handleCancel = function() { | 233 Picker.prototype.handleCancel = function() { |
| 233 window.pagePopupController.setValueAndClosePopup(Picker.Actions.Cancel, ""); | 234 window.pagePopupController.setValueAndClosePopup(Picker.Actions.Cancel, ""); |
| 234 } | 235 } |
| 235 | 236 |
| 236 Picker.prototype.chooseOtherColor = function() { | 237 Picker.prototype.chooseOtherColor = function() { |
| 237 window.pagePopupController.setValueAndClosePopup(Picker.Actions.ChooseOtherC
olor, ""); | 238 window.pagePopupController.setValueAndClosePopup(Picker.Actions.ChooseOtherC
olor, ""); |
| 238 } | 239 } |
| 239 | 240 |
| 240 Picker.prototype.cleanup = function() {}; | 241 Picker.prototype.cleanup = function() {}; |
| OLD | NEW |