Chromium Code Reviews| 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 c35e2947008f95623fe44b683c5b502d28847eb7..a9248b18b6f7c6097d8a53b92b061dc333cd2f3c 100644 |
| --- a/third_party/WebKit/Source/core/css/MediaValues.cpp |
| +++ b/third_party/WebKit/Source/core/css/MediaValues.cpp |
| @@ -32,16 +32,12 @@ MediaValues* MediaValues::createDynamicIfFrameExists(LocalFrame* frame) { |
| double MediaValues::calculateViewportWidth(LocalFrame* frame) { |
| ASSERT(frame && frame->view() && frame->document()); |
| - int viewportWidth = frame->view()->layoutSize(IncludeScrollbars).width(); |
| - return adjustDoubleForAbsoluteZoom( |
| - viewportWidth, frame->document()->layoutViewItem().styleRef()); |
| + return frame->view()->viewportSizeForViewportUnits().width(); |
| } |
| double MediaValues::calculateViewportHeight(LocalFrame* frame) { |
| ASSERT(frame && frame->view() && frame->document()); |
| - int viewportHeight = frame->view()->layoutSize(IncludeScrollbars).height(); |
| - return adjustDoubleForAbsoluteZoom( |
| - viewportHeight, frame->document()->layoutViewItem().styleRef()); |
| + return frame->view()->viewportSizeForViewportUnits().height(); |
|
bokan
2017/03/09 16:29:56
I think this is slightly wrong. The reason we have
rune
2017/03/09 17:47:36
Why is there a difference between ICB and viewport
rune
2017/03/09 22:04:55
I added a new viewportSizeForMediaQueries() instea
|
| } |
| int MediaValues::calculateDeviceWidth(LocalFrame* frame) { |