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 4810ed825f3ea373fa9b49eea1ac1dfe4337c79a..7c6d07f839cf41f53ddd3b456de4d4a548e3e4f4 100644 |
--- a/third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp |
+++ b/third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp |
@@ -916,7 +916,7 @@ int LocalDOMWindow::outerHeight() const { |
return 0; |
ChromeClient& chromeClient = host->chromeClient(); |
- if (host->settings().getReportScreenSizeInPhysicalPixelsQuirk()) |
+ if (host->page().settings().getReportScreenSizeInPhysicalPixelsQuirk()) |
return lroundf(chromeClient.rootWindowRect().height() * |
chromeClient.screenInfo().deviceScaleFactor); |
return chromeClient.rootWindowRect().height(); |
@@ -931,7 +931,7 @@ int LocalDOMWindow::outerWidth() const { |
return 0; |
ChromeClient& chromeClient = host->chromeClient(); |
- if (host->settings().getReportScreenSizeInPhysicalPixelsQuirk()) |
+ if (host->page().settings().getReportScreenSizeInPhysicalPixelsQuirk()) |
return lroundf(chromeClient.rootWindowRect().width() * |
chromeClient.screenInfo().deviceScaleFactor); |
@@ -955,7 +955,7 @@ FloatSize LocalDOMWindow::getViewportSize( |
// initial page scale depends on the content width and is set after a |
// layout, perform one now so queries during page load will use the up to |
// date viewport. |
- if (host->settings().getViewportEnabled() && frame()->isMainFrame()) |
+ if (host->page().settings().getViewportEnabled() && frame()->isMainFrame()) |
document()->updateStyleAndLayoutIgnorePendingStylesheets(); |
// FIXME: This is potentially too much work. We really only need to know the |
@@ -967,7 +967,8 @@ FloatSize LocalDOMWindow::getViewportSize( |
->updateStyleAndLayoutIgnorePendingStylesheets(); |
} |
- return frame()->isMainFrame() && !host->settings().getInertVisualViewport() |
+ return frame()->isMainFrame() && |
+ !host->page().settings().getInertVisualViewport() |
? FloatSize(host->visualViewport().visibleRect().size()) |
: FloatSize(view->visibleContentRect(scrollbarInclusion).size()); |
} |
@@ -999,7 +1000,7 @@ int LocalDOMWindow::screenX() const { |
return 0; |
ChromeClient& chromeClient = host->chromeClient(); |
- if (host->settings().getReportScreenSizeInPhysicalPixelsQuirk()) |
+ if (host->page().settings().getReportScreenSizeInPhysicalPixelsQuirk()) |
return lroundf(chromeClient.rootWindowRect().x() * |
chromeClient.screenInfo().deviceScaleFactor); |
return chromeClient.rootWindowRect().x(); |
@@ -1014,7 +1015,7 @@ int LocalDOMWindow::screenY() const { |
return 0; |
ChromeClient& chromeClient = host->chromeClient(); |
- if (host->settings().getReportScreenSizeInPhysicalPixelsQuirk()) |
+ if (host->page().settings().getReportScreenSizeInPhysicalPixelsQuirk()) |
return lroundf(chromeClient.rootWindowRect().y() * |
chromeClient.screenInfo().deviceScaleFactor); |
return chromeClient.rootWindowRect().y(); |
@@ -1024,7 +1025,7 @@ double LocalDOMWindow::scrollX() const { |
if (!frame() || !frame()->host()) |
return 0; |
- if (!frame()->host()->settings().getInertVisualViewport()) |
+ if (!frame()->host()->page().settings().getInertVisualViewport()) |
return m_visualViewport->pageX(); |
FrameView* view = frame()->view(); |
@@ -1042,7 +1043,7 @@ double LocalDOMWindow::scrollY() const { |
if (!frame() || !frame()->host()) |
return 0; |
- if (!frame()->host()->settings().getInertVisualViewport()) |
+ if (!frame()->host()->page().settings().getInertVisualViewport()) |
return m_visualViewport->pageY(); |
FrameView* view = frame()->view(); |
@@ -1174,7 +1175,7 @@ void LocalDOMWindow::scrollBy(double x, |
x = ScrollableArea::normalizeNonFiniteScroll(x); |
y = ScrollableArea::normalizeNonFiniteScroll(y); |
- ScrollableArea* viewport = host->settings().getInertVisualViewport() |
+ ScrollableArea* viewport = host->page().settings().getInertVisualViewport() |
? view->layoutViewportScrollableArea() |
: view->getScrollableArea(); |
@@ -1221,7 +1222,7 @@ void LocalDOMWindow::scrollTo(double x, double y) const { |
ScrollOffset layoutOffset(x * frame()->pageZoomFactor(), |
y * frame()->pageZoomFactor()); |
- ScrollableArea* viewport = host->settings().getInertVisualViewport() |
+ ScrollableArea* viewport = host->page().settings().getInertVisualViewport() |
? view->layoutViewportScrollableArea() |
: view->getScrollableArea(); |
viewport->setScrollOffset(layoutOffset, ProgrammaticScroll, |
@@ -1250,7 +1251,7 @@ void LocalDOMWindow::scrollTo(const ScrollToOptions& scrollToOptions) const { |
double scaledX = 0.0; |
double scaledY = 0.0; |
- ScrollableArea* viewport = host->settings().getInertVisualViewport() |
+ ScrollableArea* viewport = host->page().settings().getInertVisualViewport() |
? view->layoutViewportScrollableArea() |
: view->getScrollableArea(); |