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

Side by Side Diff: Source/WebCore/page/DOMWindow.cpp

Issue 12320020: Merge 142755 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1410/
Patch Set: Created 7 years, 10 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
« no previous file with comments | « no previous file | Source/WebKit/efl/WebCoreSupport/ChromeClientEfl.cpp » ('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) 2006, 2007, 2008, 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008, 2010 Apple Inc. All rights reserved.
3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) 3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
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 322 matching lines...) Expand 10 before | Expand all | Expand 10 after
333 if (!isnan(pendingChanges.x())) 333 if (!isnan(pendingChanges.x()))
334 window.setX(pendingChanges.x()); 334 window.setX(pendingChanges.x());
335 if (!isnan(pendingChanges.y())) 335 if (!isnan(pendingChanges.y()))
336 window.setY(pendingChanges.y()); 336 window.setY(pendingChanges.y());
337 if (!isnan(pendingChanges.width())) 337 if (!isnan(pendingChanges.width()))
338 window.setWidth(pendingChanges.width()); 338 window.setWidth(pendingChanges.width());
339 if (!isnan(pendingChanges.height())) 339 if (!isnan(pendingChanges.height()))
340 window.setHeight(pendingChanges.height()); 340 window.setHeight(pendingChanges.height());
341 341
342 FloatSize minimumSize = page->chrome()->client()->minimumWindowSize(); 342 FloatSize minimumSize = page->chrome()->client()->minimumWindowSize();
343 window.setWidth(min(max(minimumSize.width(), window.width()), screen.width() )); 343 // Let size 0 pass through, since that indicates default size, not minimum s ize.
344 window.setHeight(min(max(minimumSize.height(), window.height()), screen.heig ht())); 344 if (window.width())
345 window.setWidth(min(max(minimumSize.width(), window.width()), screen.wid th()));
346 if (window.height())
347 window.setHeight(min(max(minimumSize.height(), window.height()), screen. height()));
345 348
346 // Constrain the window position within the valid screen area. 349 // Constrain the window position within the valid screen area.
347 window.setX(max(screen.x(), min(window.x(), screen.maxX() - window.width())) ); 350 window.setX(max(screen.x(), min(window.x(), screen.maxX() - window.width())) );
348 window.setY(max(screen.y(), min(window.y(), screen.maxY() - window.height()) )); 351 window.setY(max(screen.y(), min(window.y(), screen.maxY() - window.height()) ));
349 352
350 return window; 353 return window;
351 } 354 }
352 355
353 bool DOMWindow::allowPopUp(Frame* firstFrame) 356 bool DOMWindow::allowPopUp(Frame* firstFrame)
354 { 357 {
(...skipping 1612 matching lines...) Expand 10 before | Expand all | Expand 10 after
1967 WindowFeatures windowFeatures(dialogFeaturesString, screenAvailableRect(m_fr ame->view())); 1970 WindowFeatures windowFeatures(dialogFeaturesString, screenAvailableRect(m_fr ame->view()));
1968 Frame* dialogFrame = createWindow(urlString, emptyAtom, windowFeatures, 1971 Frame* dialogFrame = createWindow(urlString, emptyAtom, windowFeatures,
1969 activeWindow, firstFrame, m_frame, function, functionContext); 1972 activeWindow, firstFrame, m_frame, function, functionContext);
1970 if (!dialogFrame) 1973 if (!dialogFrame)
1971 return; 1974 return;
1972 1975
1973 dialogFrame->page()->chrome()->runModal(); 1976 dialogFrame->page()->chrome()->runModal();
1974 } 1977 }
1975 1978
1976 } // namespace WebCore 1979 } // namespace WebCore
OLDNEW
« no previous file with comments | « no previous file | Source/WebKit/efl/WebCoreSupport/ChromeClientEfl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698