| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "config.h" | 5 #include "config.h" |
| 6 #include "core/css/MediaValuesCached.h" | 6 #include "core/css/MediaValuesCached.h" |
| 7 | 7 |
| 8 #include "core/css/CSSPrimitiveValue.h" | 8 #include "core/css/CSSPrimitiveValue.h" |
| 9 #include "core/dom/Document.h" | 9 #include "core/dom/Document.h" |
| 10 #include "core/frame/LocalFrame.h" | 10 #include "core/frame/LocalFrame.h" |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 // Oilpan objects are safe to send to another thread as long as the thread | 93 // Oilpan objects are safe to send to another thread as long as the thread |
| 94 // does not outlive the thread used for creation. MediaValues are | 94 // does not outlive the thread used for creation. MediaValues are |
| 95 // allocated on the main thread and may be passed to the parser thread, | 95 // allocated on the main thread and may be passed to the parser thread, |
| 96 // so this should be safe. | 96 // so this should be safe. |
| 97 return true; | 97 return true; |
| 98 #else | 98 #else |
| 99 return hasOneRef(); | 99 return hasOneRef(); |
| 100 #endif | 100 #endif |
| 101 } | 101 } |
| 102 | 102 |
| 103 int MediaValuesCached::viewportWidth() const | 103 double MediaValuesCached::viewportWidth() const |
| 104 { | 104 { |
| 105 return m_data.viewportWidth; | 105 return m_data.viewportWidth; |
| 106 } | 106 } |
| 107 | 107 |
| 108 int MediaValuesCached::viewportHeight() const | 108 double MediaValuesCached::viewportHeight() const |
| 109 { | 109 { |
| 110 return m_data.viewportHeight; | 110 return m_data.viewportHeight; |
| 111 } | 111 } |
| 112 | 112 |
| 113 int MediaValuesCached::deviceWidth() const | 113 int MediaValuesCached::deviceWidth() const |
| 114 { | 114 { |
| 115 return m_data.deviceWidth; | 115 return m_data.deviceWidth; |
| 116 } | 116 } |
| 117 | 117 |
| 118 int MediaValuesCached::deviceHeight() const | 118 int MediaValuesCached::deviceHeight() const |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 178 Document* MediaValuesCached::document() const | 178 Document* MediaValuesCached::document() const |
| 179 { | 179 { |
| 180 return nullptr; | 180 return nullptr; |
| 181 } | 181 } |
| 182 | 182 |
| 183 bool MediaValuesCached::hasValues() const | 183 bool MediaValuesCached::hasValues() const |
| 184 { | 184 { |
| 185 return true; | 185 return true; |
| 186 } | 186 } |
| 187 | 187 |
| 188 void MediaValuesCached::setViewportWidth(int width) | 188 void MediaValuesCached::setViewportWidth(double width) |
| 189 { | 189 { |
| 190 m_data.viewportWidth = width; | 190 m_data.viewportWidth = width; |
| 191 } | 191 } |
| 192 | 192 |
| 193 void MediaValuesCached::setViewportHeight(int height) | 193 void MediaValuesCached::setViewportHeight(double height) |
| 194 { | 194 { |
| 195 m_data.viewportHeight = height; | 195 m_data.viewportHeight = height; |
| 196 } | 196 } |
| 197 | 197 |
| 198 } // namespace | 198 } // namespace |
| OLD | NEW |