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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 PassRefPtr<MediaValues> MediaValuesCached::copy() const | 74 PassRefPtr<MediaValues> MediaValuesCached::copy() const |
75 { | 75 { |
76 return adoptRef(new MediaValuesCached(m_data)); | 76 return adoptRef(new MediaValuesCached(m_data)); |
77 } | 77 } |
78 | 78 |
79 bool MediaValuesCached::computeLength(double value, CSSPrimitiveValue::UnitType
type, int& result) const | 79 bool MediaValuesCached::computeLength(double value, CSSPrimitiveValue::UnitType
type, int& result) const |
80 { | 80 { |
81 return MediaValues::computeLength(value, type, m_data.defaultFontSize, m_dat
a.viewportWidth, m_data.viewportHeight, result); | 81 return MediaValues::computeLength(value, type, m_data.defaultFontSize, m_dat
a.viewportWidth, m_data.viewportHeight, result); |
82 } | 82 } |
83 | 83 |
84 bool MediaValuesCached::computeLength(double value, CSSPrimitiveValue::UnitType
type, double& result) const | 84 bool MediaValuesCached::computeLength(double value, CSSPrimitiveValue::UnitType
type, float& result) const |
85 { | 85 { |
86 return MediaValues::computeLength(value, type, m_data.defaultFontSize, m_dat
a.viewportWidth, m_data.viewportHeight, result); | 86 return MediaValues::computeLength(value, type, m_data.defaultFontSize, m_dat
a.viewportWidth, m_data.viewportHeight, result); |
87 } | 87 } |
88 | 88 |
89 bool MediaValuesCached::isSafeToSendToAnotherThread() const | 89 bool MediaValuesCached::isSafeToSendToAnotherThread() const |
90 { | 90 { |
91 return hasOneRef(); | 91 return hasOneRef(); |
92 } | 92 } |
93 | 93 |
94 int MediaValuesCached::viewportWidth() const | 94 int MediaValuesCached::viewportWidth() const |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 { | 164 { |
165 return 0; | 165 return 0; |
166 } | 166 } |
167 | 167 |
168 bool MediaValuesCached::hasValues() const | 168 bool MediaValuesCached::hasValues() const |
169 { | 169 { |
170 return true; | 170 return true; |
171 } | 171 } |
172 | 172 |
173 } // namespace | 173 } // namespace |
OLD | NEW |