Chromium Code Reviews| 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 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 109 if (typeof minHeight !== "number") | 109 if (typeof minHeight !== "number") |
| 110 minHeight = 0; | 110 minHeight = 0; |
| 111 | 111 |
| 112 var windowRect = new Rectangle(0, 0, width, height); | 112 var windowRect = new Rectangle(0, 0, width, height); |
| 113 | 113 |
| 114 if (!global.params.anchorRectInScreen) | 114 if (!global.params.anchorRectInScreen) |
| 115 return windowRect; | 115 return windowRect; |
| 116 | 116 |
| 117 var anchorRect = new Rectangle(global.params.anchorRectInScreen); | 117 var anchorRect = new Rectangle(global.params.anchorRectInScreen); |
| 118 var availRect = new Rectangle(window.screen.availLeft, window.screen.availTo p, window.screen.availWidth, window.screen.availHeight); | 118 var availRect = new Rectangle(window.screen.availLeft, window.screen.availTo p, window.screen.availWidth, window.screen.availHeight); |
| 119 | |
|
tkent
2014/12/17 01:06:21
unnecessary change
keishi
2014/12/22 05:03:54
Done.
| |
| 120 _adjustWindowRectVertically(windowRect, availRect, anchorRect, minHeight); | 119 _adjustWindowRectVertically(windowRect, availRect, anchorRect, minHeight); |
| 121 _adjustWindowRectHorizontally(windowRect, availRect, anchorRect, minWidth); | 120 _adjustWindowRectHorizontally(windowRect, availRect, anchorRect, minWidth); |
| 122 | 121 |
| 123 return windowRect; | 122 return windowRect; |
| 124 } | 123 } |
| 125 | 124 |
| 126 function _adjustWindowRectVertically(windowRect, availRect, anchorRect, minHeigh t) { | 125 function _adjustWindowRectVertically(windowRect, availRect, anchorRect, minHeigh t) { |
| 127 var availableSpaceAbove = anchorRect.y - availRect.y; | 126 var availableSpaceAbove = anchorRect.y - availRect.y; |
| 128 availableSpaceAbove = Math.max(0, Math.min(availRect.height, availableSpaceA bove)); | 127 availableSpaceAbove = Math.max(0, Math.min(availRect.height, availableSpaceA bove)); |
| 129 | 128 |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 248 | 247 |
| 249 Picker.prototype.handleCancel = function() { | 248 Picker.prototype.handleCancel = function() { |
| 250 window.pagePopupController.closePopup(); | 249 window.pagePopupController.closePopup(); |
| 251 }; | 250 }; |
| 252 | 251 |
| 253 Picker.prototype.chooseOtherColor = function() { | 252 Picker.prototype.chooseOtherColor = function() { |
| 254 window.pagePopupController.setValueAndClosePopup(Picker.Actions.ChooseOtherC olor, ""); | 253 window.pagePopupController.setValueAndClosePopup(Picker.Actions.ChooseOtherC olor, ""); |
| 255 }; | 254 }; |
| 256 | 255 |
| 257 Picker.prototype.cleanup = function() {}; | 256 Picker.prototype.cleanup = function() {}; |
| OLD | NEW |