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

Unified Diff: Source/core/page/Chrome.cpp

Issue 1135633004: Revert of Make createWindow (mostly) work with OOPIF (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/frame/Screen.cpp ('k') | Source/core/page/CreateWindow.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/page/Chrome.cpp
diff --git a/Source/core/page/Chrome.cpp b/Source/core/page/Chrome.cpp
index 6de53ed3692ce411581bfe28662dc384baa22fbd..a6f9cb7bae589cec26f3fc30fdbbacef8d153205 100644
--- a/Source/core/page/Chrome.cpp
+++ b/Source/core/page/Chrome.cpp
@@ -38,13 +38,11 @@
#include "core/page/WindowFeatures.h"
#include "platform/FileChooser.h"
#include "platform/Logging.h"
-#include "platform/PlatformScreen.h"
#include "platform/geometry/IntRect.h"
#include "platform/network/NetworkHints.h"
#include "public/platform/WebScreenInfo.h"
#include "wtf/PassRefPtr.h"
#include "wtf/Vector.h"
-#include <algorithm>
namespace blink {
@@ -86,23 +84,9 @@
m_client->contentsSizeChanged(frame, size);
}
-void Chrome::setWindowRect(const IntRect& pendingRect) const
-{
- IntRect screen = screenAvailableRect(*this);
- IntRect window = pendingRect;
-
- IntSize minimumSize = m_client->minimumWindowSize();
- // Let size 0 pass through, since that indicates default size, not minimum size.
- if (window.width())
- window.setWidth(std::min(std::max(minimumSize.width(), window.width()), screen.width()));
- if (window.height())
- window.setHeight(std::min(std::max(minimumSize.height(), window.height()), screen.height()));
-
- // Constrain the window position within the valid screen area.
- window.setX(std::max(screen.x(), std::min(window.x(), screen.maxX() - window.width())));
- window.setY(std::max(screen.y(), std::min(window.y(), screen.maxY() - window.height())));
-
- m_client->setWindowRect(window);
+void Chrome::setWindowRect(const IntRect& rect) const
+{
+ m_client->setWindowRect(rect);
}
IntRect Chrome::windowRect() const
« no previous file with comments | « Source/core/frame/Screen.cpp ('k') | Source/core/page/CreateWindow.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698