Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(292)

Side by Side Diff: Source/core/css/MediaValuesCached.cpp

Issue 252743004: A thread safe CSS calc parser for sizes (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Removed CSSCalc tests that assert Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/core/css/MediaValuesCached.h ('k') | Source/core/css/MediaValuesDynamic.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « Source/core/css/MediaValuesCached.h ('k') | Source/core/css/MediaValuesDynamic.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698