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

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

Issue 1033943002: Rename LayoutStyle to papayawhip (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: ensureComputedStyle Created 5 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/css/CSSPrimitiveValue.h ('k') | Source/core/css/CSSPrimitiveValueMappings.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 /* 1 /*
2 * (C) 1999-2003 Lars Knoll (knoll@kde.org) 2 * (C) 1999-2003 Lars Knoll (knoll@kde.org)
3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2012 Apple Inc. All rights reserv ed. 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2012 Apple Inc. All rights reserv ed.
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 13 matching lines...) Expand all
24 #include "core/css/CSSBasicShapes.h" 24 #include "core/css/CSSBasicShapes.h"
25 #include "core/css/CSSCalculationValue.h" 25 #include "core/css/CSSCalculationValue.h"
26 #include "core/css/CSSHelper.h" 26 #include "core/css/CSSHelper.h"
27 #include "core/css/CSSMarkup.h" 27 #include "core/css/CSSMarkup.h"
28 #include "core/css/CSSToLengthConversionData.h" 28 #include "core/css/CSSToLengthConversionData.h"
29 #include "core/css/Counter.h" 29 #include "core/css/Counter.h"
30 #include "core/css/Pair.h" 30 #include "core/css/Pair.h"
31 #include "core/css/Rect.h" 31 #include "core/css/Rect.h"
32 #include "core/css/StyleSheetContents.h" 32 #include "core/css/StyleSheetContents.h"
33 #include "core/dom/Node.h" 33 #include "core/dom/Node.h"
34 #include "core/layout/style/LayoutStyle.h" 34 #include "core/layout/style/ComputedStyle.h"
35 #include "platform/Decimal.h" 35 #include "platform/Decimal.h"
36 #include "platform/LayoutUnit.h" 36 #include "platform/LayoutUnit.h"
37 #include "platform/fonts/FontMetrics.h" 37 #include "platform/fonts/FontMetrics.h"
38 #include "wtf/StdLibExtras.h" 38 #include "wtf/StdLibExtras.h"
39 #include "wtf/ThreadSpecific.h" 39 #include "wtf/ThreadSpecific.h"
40 #include "wtf/Threading.h" 40 #include "wtf/Threading.h"
41 #include "wtf/text/StringBuffer.h" 41 #include "wtf/text/StringBuffer.h"
42 #include "wtf/text/StringBuilder.h" 42 #include "wtf/text/StringBuilder.h"
43 43
44 using namespace WTF; 44 using namespace WTF;
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
307 307
308 CSSPrimitiveValue::CSSPrimitiveValue(const String& str, UnitType type) 308 CSSPrimitiveValue::CSSPrimitiveValue(const String& str, UnitType type)
309 : CSSValue(PrimitiveClass) 309 : CSSValue(PrimitiveClass)
310 { 310 {
311 m_primitiveUnitType = type; 311 m_primitiveUnitType = type;
312 m_value.string = str.impl(); 312 m_value.string = str.impl();
313 if (m_value.string) 313 if (m_value.string)
314 m_value.string->ref(); 314 m_value.string->ref();
315 } 315 }
316 316
317 CSSPrimitiveValue::CSSPrimitiveValue(const LengthSize& lengthSize, const LayoutS tyle& style) 317 CSSPrimitiveValue::CSSPrimitiveValue(const LengthSize& lengthSize, const Compute dStyle& style)
318 : CSSValue(PrimitiveClass) 318 : CSSValue(PrimitiveClass)
319 { 319 {
320 init(lengthSize, style); 320 init(lengthSize, style);
321 } 321 }
322 322
323 CSSPrimitiveValue::CSSPrimitiveValue(RGBA32 color, UnitType type) 323 CSSPrimitiveValue::CSSPrimitiveValue(RGBA32 color, UnitType type)
324 : CSSValue(PrimitiveClass) 324 : CSSValue(PrimitiveClass)
325 { 325 {
326 ASSERT(type == CSS_RGBCOLOR); 326 ASSERT(type == CSS_RGBCOLOR);
327 m_primitiveUnitType = CSS_RGBCOLOR; 327 m_primitiveUnitType = CSS_RGBCOLOR;
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
393 break; 393 break;
394 } 394 }
395 case DeviceWidth: 395 case DeviceWidth:
396 case DeviceHeight: 396 case DeviceHeight:
397 case MaxSizeNone: 397 case MaxSizeNone:
398 ASSERT_NOT_REACHED(); 398 ASSERT_NOT_REACHED();
399 break; 399 break;
400 } 400 }
401 } 401 }
402 402
403 void CSSPrimitiveValue::init(const LengthSize& lengthSize, const LayoutStyle& st yle) 403 void CSSPrimitiveValue::init(const LengthSize& lengthSize, const ComputedStyle& style)
404 { 404 {
405 m_primitiveUnitType = CSS_PAIR; 405 m_primitiveUnitType = CSS_PAIR;
406 m_hasCachedCSSText = false; 406 m_hasCachedCSSText = false;
407 m_value.pair = Pair::create(create(lengthSize.width(), style.effectiveZoom() ), create(lengthSize.height(), style.effectiveZoom()), Pair::KeepIdenticalValues ).leakRef(); 407 m_value.pair = Pair::create(create(lengthSize.width(), style.effectiveZoom() ), create(lengthSize.height(), style.effectiveZoom()), Pair::KeepIdenticalValues ).leakRef();
408 } 408 }
409 409
410 void CSSPrimitiveValue::init(PassRefPtrWillBeRawPtr<Counter> c) 410 void CSSPrimitiveValue::init(PassRefPtrWillBeRawPtr<Counter> c)
411 { 411 {
412 m_primitiveUnitType = CSS_COUNTER; 412 m_primitiveUnitType = CSS_COUNTER;
413 m_hasCachedCSSText = false; 413 m_hasCachedCSSText = false;
(...skipping 810 matching lines...) Expand 10 before | Expand all | Expand 10 after
1224 visitor->trace(m_value.shape); 1224 visitor->trace(m_value.shape);
1225 break; 1225 break;
1226 default: 1226 default:
1227 break; 1227 break;
1228 } 1228 }
1229 #endif 1229 #endif
1230 CSSValue::traceAfterDispatch(visitor); 1230 CSSValue::traceAfterDispatch(visitor);
1231 } 1231 }
1232 1232
1233 } // namespace blink 1233 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/css/CSSPrimitiveValue.h ('k') | Source/core/css/CSSPrimitiveValueMappings.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698