| 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/MediaValuesDynamic.h" | 6 #include "core/css/MediaValuesDynamic.h" |
| 7 | 7 |
| 8 #include "core/css/CSSHelper.h" | 8 #include "core/css/CSSHelper.h" |
| 9 #include "core/css/CSSPrimitiveValue.h" | 9 #include "core/css/CSSPrimitiveValue.h" |
| 10 #include "core/css/CSSToLengthConversionData.h" | 10 #include "core/css/CSSToLengthConversionData.h" |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 bool MediaValuesDynamic::computeLength(double value, CSSPrimitiveValue::UnitType
s type, int& result) const | 32 bool MediaValuesDynamic::computeLength(double value, CSSPrimitiveValue::UnitType
s type, int& result) const |
| 33 { | 33 { |
| 34 return MediaValues::computeLength(value, | 34 return MediaValues::computeLength(value, |
| 35 type, | 35 type, |
| 36 calculateDefaultFontSize(m_frame), | 36 calculateDefaultFontSize(m_frame), |
| 37 calculateViewportWidth(m_frame), | 37 calculateViewportWidth(m_frame), |
| 38 calculateViewportHeight(m_frame), | 38 calculateViewportHeight(m_frame), |
| 39 result); | 39 result); |
| 40 } | 40 } |
| 41 | 41 |
| 42 bool MediaValuesDynamic::computeLength(double value, CSSPrimitiveValue::UnitType
s type, double& result) const |
| 43 { |
| 44 return MediaValues::computeLength(value, |
| 45 type, |
| 46 calculateDefaultFontSize(m_frame), |
| 47 calculateViewportWidth(m_frame), |
| 48 calculateViewportHeight(m_frame), |
| 49 result); |
| 50 } |
| 51 |
| 42 bool MediaValuesDynamic::isSafeToSendToAnotherThread() const | 52 bool MediaValuesDynamic::isSafeToSendToAnotherThread() const |
| 43 { | 53 { |
| 44 return false; | 54 return false; |
| 45 } | 55 } |
| 46 | 56 |
| 47 int MediaValuesDynamic::viewportWidth() const | 57 int MediaValuesDynamic::viewportWidth() const |
| 48 { | 58 { |
| 49 return calculateViewportWidth(m_frame); | 59 return calculateViewportWidth(m_frame); |
| 50 } | 60 } |
| 51 | 61 |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 { | 123 { |
| 114 return m_frame->document(); | 124 return m_frame->document(); |
| 115 } | 125 } |
| 116 | 126 |
| 117 bool MediaValuesDynamic::hasValues() const | 127 bool MediaValuesDynamic::hasValues() const |
| 118 { | 128 { |
| 119 return m_frame; | 129 return m_frame; |
| 120 } | 130 } |
| 121 | 131 |
| 122 } // namespace | 132 } // namespace |
| OLD | NEW |