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

Side by Side Diff: Source/WebCore/Resources/pagepopups/pickerCommon.js

Issue 11488003: Merge 136671 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1312/
Patch Set: Created 8 years 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 | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 if (window.frameElement) { 157 if (window.frameElement) {
158 window.frameElement.style.width = rect.width + "px"; 158 window.frameElement.style.width = rect.width + "px";
159 window.frameElement.style.height = rect.height + "px"; 159 window.frameElement.style.height = rect.height + "px";
160 } else { 160 } else {
161 window.moveTo(rect.x - window.screen.availLeft, rect.y - window.screen.a vailTop); 161 window.moveTo(rect.x - window.screen.availLeft, rect.y - window.screen.a vailTop);
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 resizeWindow(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 window.dispatchEvent(new CustomEvent("didHide")); 172 window.dispatchEvent(new CustomEvent("didHide"));
173 else 173 else
174 window.dispatchEvent(new CustomEvent("didOpenPicker")); 174 window.dispatchEvent(new CustomEvent("didOpenPicker"));
175 }, false); 175 }, false);
176 176
177 /** 177 /**
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 232
233 Picker.prototype.handleCancel = function() { 233 Picker.prototype.handleCancel = function() {
234 window.pagePopupController.setValueAndClosePopup(Picker.Actions.Cancel, ""); 234 window.pagePopupController.setValueAndClosePopup(Picker.Actions.Cancel, "");
235 } 235 }
236 236
237 Picker.prototype.chooseOtherColor = function() { 237 Picker.prototype.chooseOtherColor = function() {
238 window.pagePopupController.setValueAndClosePopup(Picker.Actions.ChooseOtherC olor, ""); 238 window.pagePopupController.setValueAndClosePopup(Picker.Actions.ChooseOtherC olor, "");
239 } 239 }
240 240
241 Picker.prototype.cleanup = function() {}; 241 Picker.prototype.cleanup = function() {};
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698