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

Unified Diff: third_party/WebKit/Source/core/css/MediaValues.cpp

Issue 2716153003: Removed FrameHost::chromeClient() (Closed)
Patch Set: Small feedback Created 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/dom/Document.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/css/MediaValues.cpp
diff --git a/third_party/WebKit/Source/core/css/MediaValues.cpp b/third_party/WebKit/Source/core/css/MediaValues.cpp
index 4b00df2f27a5cd6227b87a87ee0f21288e974d02..c35e2947008f95623fe44b683c5b502d28847eb7 100644
--- a/third_party/WebKit/Source/core/css/MediaValues.cpp
+++ b/third_party/WebKit/Source/core/css/MediaValues.cpp
@@ -9,7 +9,6 @@
#include "core/css/MediaValuesDynamic.h"
#include "core/dom/Document.h"
#include "core/dom/Element.h"
-#include "core/frame/FrameHost.h"
#include "core/frame/FrameView.h"
#include "core/frame/LocalFrame.h"
#include "core/frame/Settings.h"
@@ -46,8 +45,8 @@ double MediaValues::calculateViewportHeight(LocalFrame* frame) {
}
int MediaValues::calculateDeviceWidth(LocalFrame* frame) {
- ASSERT(frame && frame->view() && frame->settings() && frame->host());
- blink::WebScreenInfo screenInfo = frame->host()->chromeClient().screenInfo();
+ DCHECK(frame && frame->view() && frame->settings() && frame->page());
+ blink::WebScreenInfo screenInfo = frame->page()->chromeClient().screenInfo();
int deviceWidth = screenInfo.rect.width;
if (frame->settings()->getReportScreenSizeInPhysicalPixelsQuirk())
deviceWidth = lroundf(deviceWidth * screenInfo.deviceScaleFactor);
@@ -55,8 +54,8 @@ int MediaValues::calculateDeviceWidth(LocalFrame* frame) {
}
int MediaValues::calculateDeviceHeight(LocalFrame* frame) {
- ASSERT(frame && frame->view() && frame->settings() && frame->host());
- blink::WebScreenInfo screenInfo = frame->host()->chromeClient().screenInfo();
+ DCHECK(frame && frame->view() && frame->settings() && frame->page());
+ blink::WebScreenInfo screenInfo = frame->page()->chromeClient().screenInfo();
int deviceHeight = screenInfo.rect.height;
if (frame->settings()->getReportScreenSizeInPhysicalPixelsQuirk())
deviceHeight = lroundf(deviceHeight * screenInfo.deviceScaleFactor);
@@ -75,17 +74,17 @@ float MediaValues::calculateDevicePixelRatio(LocalFrame* frame) {
int MediaValues::calculateColorBitsPerComponent(LocalFrame* frame) {
ASSERT(frame && frame->page() && frame->page()->mainFrame());
if (!frame->page()->mainFrame()->isLocalFrame() ||
- frame->host()->chromeClient().screenInfo().isMonochrome)
+ frame->page()->chromeClient().screenInfo().isMonochrome)
return 0;
- return frame->host()->chromeClient().screenInfo().depthPerComponent;
+ return frame->page()->chromeClient().screenInfo().depthPerComponent;
}
int MediaValues::calculateMonochromeBitsPerComponent(LocalFrame* frame) {
ASSERT(frame && frame->page() && frame->page()->mainFrame());
if (!frame->page()->mainFrame()->isLocalFrame() ||
- !frame->host()->chromeClient().screenInfo().isMonochrome)
+ !frame->page()->chromeClient().screenInfo().isMonochrome)
return 0;
- return frame->host()->chromeClient().screenInfo().depthPerComponent;
+ return frame->page()->chromeClient().screenInfo().depthPerComponent;
}
int MediaValues::calculateDefaultFontSize(LocalFrame* frame) {
@@ -142,14 +141,14 @@ int MediaValues::calculateAvailableHoverTypes(LocalFrame* frame) {
}
DisplayShape MediaValues::calculateDisplayShape(LocalFrame* frame) {
- DCHECK(frame && frame->host());
- return frame->host()->chromeClient().screenInfo().displayShape;
+ DCHECK(frame && frame->page());
+ return frame->page()->chromeClient().screenInfo().displayShape;
}
ColorSpaceGamut MediaValues::calculateColorGamut(LocalFrame* frame) {
- DCHECK(frame && frame->host());
+ DCHECK(frame && frame->page());
return ColorSpaceUtilities::getColorSpaceGamut(
- frame->host()->chromeClient().screenInfo());
+ frame->page()->chromeClient().screenInfo());
}
bool MediaValues::computeLengthImpl(double value,
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/dom/Document.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698