| 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/html/imports/HTMLImportsController.h" | 10 #include "core/html/imports/HTMLImportsController.h" |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 PassRefPtr<MediaValues> MediaValuesCached::copy() const | 70 PassRefPtr<MediaValues> MediaValuesCached::copy() const |
| 71 { | 71 { |
| 72 return adoptRef(new MediaValuesCached(m_data)); | 72 return adoptRef(new MediaValuesCached(m_data)); |
| 73 } | 73 } |
| 74 | 74 |
| 75 bool MediaValuesCached::computeLength(double value, CSSPrimitiveValue::UnitTypes
type, int& result) const | 75 bool MediaValuesCached::computeLength(double value, CSSPrimitiveValue::UnitTypes
type, int& result) const |
| 76 { | 76 { |
| 77 return MediaValues::computeLength(value, type, m_data.defaultFontSize, m_dat
a.viewportWidth, m_data.viewportHeight, result); | 77 return MediaValues::computeLength(value, type, m_data.defaultFontSize, m_dat
a.viewportWidth, m_data.viewportHeight, result); |
| 78 } | 78 } |
| 79 | 79 |
| 80 bool MediaValuesCached::computeLength(double value, CSSPrimitiveValue::UnitTypes
type, double& result) const |
| 81 { |
| 82 return MediaValues::computeLength(value, type, m_data.defaultFontSize, m_dat
a.viewportWidth, m_data.viewportHeight, result); |
| 83 } |
| 84 |
| 80 bool MediaValuesCached::isSafeToSendToAnotherThread() const | 85 bool MediaValuesCached::isSafeToSendToAnotherThread() const |
| 81 { | 86 { |
| 82 return hasOneRef(); | 87 return hasOneRef(); |
| 83 } | 88 } |
| 84 | 89 |
| 85 int MediaValuesCached::viewportWidth() const | 90 int MediaValuesCached::viewportWidth() const |
| 86 { | 91 { |
| 87 return m_data.viewportWidth; | 92 return m_data.viewportWidth; |
| 88 } | 93 } |
| 89 | 94 |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 { | 156 { |
| 152 return 0; | 157 return 0; |
| 153 } | 158 } |
| 154 | 159 |
| 155 bool MediaValuesCached::hasValues() const | 160 bool MediaValuesCached::hasValues() const |
| 156 { | 161 { |
| 157 return true; | 162 return true; |
| 158 } | 163 } |
| 159 | 164 |
| 160 } // namespace | 165 } // namespace |
| OLD | NEW |