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

Side by Side Diff: Source/core/css/MediaValuesDynamic.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/MediaValuesDynamic.h ('k') | Source/core/css/parser/MediaConditionTest.cpp » ('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/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
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
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
OLDNEW
« no previous file with comments | « Source/core/css/MediaValuesDynamic.h ('k') | Source/core/css/parser/MediaConditionTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698