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

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

Issue 879913003: Use IntRect instead of FloatRect for window positions and sizes (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: added FIXME comments Created 5 years, 11 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/page/ChromeClient.h ('k') | Source/core/page/DragController.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/page/CreateWindow.cpp
diff --git a/Source/core/page/CreateWindow.cpp b/Source/core/page/CreateWindow.cpp
index 2f0d7df60d35cd15954a226502465952e39899f0..4a3d75559a11f06f9544614d7d39fd78f4df6fbd 100644
--- a/Source/core/page/CreateWindow.cpp
+++ b/Source/core/page/CreateWindow.cpp
@@ -100,8 +100,8 @@ static LocalFrame* createWindow(LocalFrame& openerFrame, LocalFrame& lookupFrame
// specify the size of the viewport. We can only resize the window, so adjust
// for the difference between the window size and the viewport size.
- FloatRect windowRect = host->chrome().windowRect();
- FloatSize viewportSize = host->chrome().pageRect().size();
+ IntRect windowRect = host->chrome().windowRect();
+ IntSize viewportSize = host->chrome().pageRect().size();
if (features.xSet)
windowRect.setX(features.x);
@@ -112,8 +112,8 @@ static LocalFrame* createWindow(LocalFrame& openerFrame, LocalFrame& lookupFrame
if (features.heightSet)
windowRect.setHeight(features.height + (windowRect.height() - viewportSize.height()));
- // Ensure non-NaN values, minimum size as well as being within valid screen area.
- FloatRect newWindowRect = LocalDOMWindow::adjustWindowRect(frame, windowRect);
+ // Ensure minimum size as well as being within valid screen area.
+ IntRect newWindowRect = LocalDOMWindow::adjustWindowRect(frame, windowRect);
host->chrome().setWindowRect(newWindowRect);
host->chrome().show(policy);
« no previous file with comments | « Source/core/page/ChromeClient.h ('k') | Source/core/page/DragController.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698