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 "core/css/MediaValuesCached.h" | 5 #include "core/css/MediaValuesCached.h" |
6 | 6 |
7 #include "core/css/CSSPrimitiveValue.h" | 7 #include "core/css/CSSPrimitiveValue.h" |
8 #include "core/dom/Document.h" | 8 #include "core/dom/Document.h" |
9 #include "core/frame/LocalFrame.h" | 9 #include "core/frame/LocalFrame.h" |
10 #include "core/layout/LayoutObject.h" | 10 #include "core/layout/LayoutObject.h" |
(...skipping 24 matching lines...) Expand all Loading... |
35 primaryHoverType = MediaValues::calculatePrimaryHoverType(frame); | 35 primaryHoverType = MediaValues::calculatePrimaryHoverType(frame); |
36 availableHoverTypes = MediaValues::calculateAvailableHoverTypes(frame); | 36 availableHoverTypes = MediaValues::calculateAvailableHoverTypes(frame); |
37 defaultFontSize = MediaValues::calculateDefaultFontSize(frame); | 37 defaultFontSize = MediaValues::calculateDefaultFontSize(frame); |
38 threeDEnabled = MediaValues::calculateThreeDEnabled(frame); | 38 threeDEnabled = MediaValues::calculateThreeDEnabled(frame); |
39 strictMode = MediaValues::calculateStrictMode(frame); | 39 strictMode = MediaValues::calculateStrictMode(frame); |
40 displayMode = MediaValues::calculateDisplayMode(frame); | 40 displayMode = MediaValues::calculateDisplayMode(frame); |
41 mediaType = MediaValues::calculateMediaType(frame); | 41 mediaType = MediaValues::calculateMediaType(frame); |
42 } | 42 } |
43 } | 43 } |
44 | 44 |
45 RawPtr<MediaValuesCached> MediaValuesCached::create() | 45 MediaValuesCached* MediaValuesCached::create() |
46 { | 46 { |
47 return new MediaValuesCached(); | 47 return new MediaValuesCached(); |
48 } | 48 } |
49 | 49 |
50 RawPtr<MediaValuesCached> MediaValuesCached::create(const MediaValuesCachedData&
data) | 50 MediaValuesCached* MediaValuesCached::create(const MediaValuesCachedData& data) |
51 { | 51 { |
52 return new MediaValuesCached(data); | 52 return new MediaValuesCached(data); |
53 } | 53 } |
54 | 54 |
55 MediaValuesCached::MediaValuesCached() | 55 MediaValuesCached::MediaValuesCached() |
56 { | 56 { |
57 } | 57 } |
58 | 58 |
59 MediaValuesCached::MediaValuesCached(const MediaValuesCachedData& data) | 59 MediaValuesCached::MediaValuesCached(const MediaValuesCachedData& data) |
60 : m_data(data) | 60 : m_data(data) |
61 { | 61 { |
62 } | 62 } |
63 | 63 |
64 RawPtr<MediaValues> MediaValuesCached::copy() const | 64 MediaValues* MediaValuesCached::copy() const |
65 { | 65 { |
66 return new MediaValuesCached(m_data); | 66 return new MediaValuesCached(m_data); |
67 } | 67 } |
68 | 68 |
69 bool MediaValuesCached::computeLength(double value, CSSPrimitiveValue::UnitType
type, int& result) const | 69 bool MediaValuesCached::computeLength(double value, CSSPrimitiveValue::UnitType
type, int& result) const |
70 { | 70 { |
71 return MediaValues::computeLength(value, type, m_data.defaultFontSize, m_dat
a.viewportWidth, m_data.viewportHeight, result); | 71 return MediaValues::computeLength(value, type, m_data.defaultFontSize, m_dat
a.viewportWidth, m_data.viewportHeight, result); |
72 } | 72 } |
73 | 73 |
74 bool MediaValuesCached::computeLength(double value, CSSPrimitiveValue::UnitType
type, double& result) const | 74 bool MediaValuesCached::computeLength(double value, CSSPrimitiveValue::UnitType
type, double& result) const |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 return true; | 161 return true; |
162 } | 162 } |
163 | 163 |
164 void MediaValuesCached::overrideViewportDimensions(double width, double height) | 164 void MediaValuesCached::overrideViewportDimensions(double width, double height) |
165 { | 165 { |
166 m_data.viewportWidth = width; | 166 m_data.viewportWidth = width; |
167 m_data.viewportHeight = height; | 167 m_data.viewportHeight = height; |
168 } | 168 } |
169 | 169 |
170 } // namespace blink | 170 } // namespace blink |
OLD | NEW |