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

Unified Diff: third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp

Issue 2177333002: Move setWindowRect and windowRect calls from WebViewClient to WebWidgetClient. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: change CHECK to a DCHECK Created 4 years, 5 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
Index: third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp
diff --git a/third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp b/third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp
index 22291aa3c05690538af0ccf754f876fbfc602d74..abcab8daa09ac9b72b0caff583be127f18aa03bf 100644
--- a/third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp
+++ b/third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp
@@ -882,8 +882,8 @@ int LocalDOMWindow::outerHeight() const
ChromeClient& chromeClient = host->chromeClient();
if (host->settings().reportScreenSizeInPhysicalPixelsQuirk())
- return lroundf(chromeClient.windowRect().height() * chromeClient.screenInfo().deviceScaleFactor);
- return chromeClient.windowRect().height();
+ return lroundf(chromeClient.rootWindowRect().height() * chromeClient.screenInfo().deviceScaleFactor);
+ return chromeClient.rootWindowRect().height();
}
int LocalDOMWindow::outerWidth() const
@@ -897,9 +897,9 @@ int LocalDOMWindow::outerWidth() const
ChromeClient& chromeClient = host->chromeClient();
if (host->settings().reportScreenSizeInPhysicalPixelsQuirk())
- return lroundf(chromeClient.windowRect().width() * chromeClient.screenInfo().deviceScaleFactor);
+ return lroundf(chromeClient.rootWindowRect().width() * chromeClient.screenInfo().deviceScaleFactor);
- return chromeClient.windowRect().width();
+ return chromeClient.rootWindowRect().width();
}
FloatSize LocalDOMWindow::getViewportSize(IncludeScrollbarsInRect scrollbarInclusion) const
@@ -962,8 +962,8 @@ int LocalDOMWindow::screenX() const
ChromeClient& chromeClient = host->chromeClient();
if (host->settings().reportScreenSizeInPhysicalPixelsQuirk())
- return lroundf(chromeClient.windowRect().x() * chromeClient.screenInfo().deviceScaleFactor);
- return chromeClient.windowRect().x();
+ return lroundf(chromeClient.rootWindowRect().x() * chromeClient.screenInfo().deviceScaleFactor);
+ return chromeClient.rootWindowRect().x();
}
int LocalDOMWindow::screenY() const
@@ -977,8 +977,8 @@ int LocalDOMWindow::screenY() const
ChromeClient& chromeClient = host->chromeClient();
if (host->settings().reportScreenSizeInPhysicalPixelsQuirk())
- return lroundf(chromeClient.windowRect().y() * chromeClient.screenInfo().deviceScaleFactor);
- return chromeClient.windowRect().y();
+ return lroundf(chromeClient.rootWindowRect().y() * chromeClient.screenInfo().deviceScaleFactor);
+ return chromeClient.rootWindowRect().y();
}
double LocalDOMWindow::scrollX() const
@@ -1238,10 +1238,10 @@ void LocalDOMWindow::moveBy(int x, int y) const
if (!host)
return;
- IntRect windowRect = host->chromeClient().windowRect();
+ IntRect windowRect = host->chromeClient().rootWindowRect();
windowRect.move(x, y);
// Security check (the spec talks about UniversalBrowserWrite to disable this check...)
- host->chromeClient().setWindowRectWithAdjustment(windowRect);
+ host->chromeClient().setWindowRectWithAdjustment(windowRect, frame());
}
void LocalDOMWindow::moveTo(int x, int y) const
@@ -1253,10 +1253,10 @@ void LocalDOMWindow::moveTo(int x, int y) const
if (!host)
return;
- IntRect windowRect = host->chromeClient().windowRect();
+ IntRect windowRect = host->chromeClient().rootWindowRect();
windowRect.setLocation(IntPoint(x, y));
// Security check (the spec talks about UniversalBrowserWrite to disable this check...)
- host->chromeClient().setWindowRectWithAdjustment(windowRect);
+ host->chromeClient().setWindowRectWithAdjustment(windowRect, frame());
}
void LocalDOMWindow::resizeBy(int x, int y) const
@@ -1268,10 +1268,10 @@ void LocalDOMWindow::resizeBy(int x, int y) const
if (!host)
return;
- IntRect fr = host->chromeClient().windowRect();
+ IntRect fr = host->chromeClient().rootWindowRect();
IntSize dest = fr.size() + IntSize(x, y);
IntRect update(fr.location(), dest);
- host->chromeClient().setWindowRectWithAdjustment(update);
+ host->chromeClient().setWindowRectWithAdjustment(update, frame());
}
void LocalDOMWindow::resizeTo(int width, int height) const
@@ -1283,10 +1283,10 @@ void LocalDOMWindow::resizeTo(int width, int height) const
if (!host)
return;
- IntRect fr = host->chromeClient().windowRect();
+ IntRect fr = host->chromeClient().rootWindowRect();
IntSize dest = IntSize(width, height);
IntRect update(fr.location(), dest);
- host->chromeClient().setWindowRectWithAdjustment(update);
+ host->chromeClient().setWindowRectWithAdjustment(update, frame());
}
int LocalDOMWindow::requestAnimationFrame(FrameRequestCallback* callback)

Powered by Google App Engine
This is Rietveld 408576698