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

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

Issue 255193002: [CSS Shapes] complex calc args for inset round vanish (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Remove unneeded one parameter LengthSize version 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/CSSPrimitiveValue.h ('k') | no next file » | 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 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 } 288 }
289 289
290 CSSPrimitiveValue::CSSPrimitiveValue(const String& str, UnitTypes type) 290 CSSPrimitiveValue::CSSPrimitiveValue(const String& str, UnitTypes type)
291 : CSSValue(PrimitiveClass) 291 : CSSValue(PrimitiveClass)
292 { 292 {
293 m_primitiveUnitType = type; 293 m_primitiveUnitType = type;
294 if ((m_value.string = str.impl())) 294 if ((m_value.string = str.impl()))
295 m_value.string->ref(); 295 m_value.string->ref();
296 } 296 }
297 297
298 CSSPrimitiveValue::CSSPrimitiveValue(const LengthSize& lengthSize) 298 CSSPrimitiveValue::CSSPrimitiveValue(const LengthSize& lengthSize, const RenderS tyle& style)
299 : CSSValue(PrimitiveClass) 299 : CSSValue(PrimitiveClass)
300 { 300 {
301 init(lengthSize); 301 init(lengthSize, style);
302 } 302 }
303 303
304 CSSPrimitiveValue::CSSPrimitiveValue(RGBA32 color, UnitTypes type) 304 CSSPrimitiveValue::CSSPrimitiveValue(RGBA32 color, UnitTypes type)
305 : CSSValue(PrimitiveClass) 305 : CSSValue(PrimitiveClass)
306 { 306 {
307 ASSERT(type == CSS_RGBCOLOR); 307 ASSERT(type == CSS_RGBCOLOR);
308 m_primitiveUnitType = CSS_RGBCOLOR; 308 m_primitiveUnitType = CSS_RGBCOLOR;
309 m_value.rgbcolor = color; 309 m_value.rgbcolor = color;
310 } 310 }
311 311
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
401 break; 401 break;
402 case DeviceWidth: 402 case DeviceWidth:
403 case DeviceHeight: 403 case DeviceHeight:
404 case Calculated: 404 case Calculated:
405 case Undefined: 405 case Undefined:
406 ASSERT_NOT_REACHED(); 406 ASSERT_NOT_REACHED();
407 break; 407 break;
408 } 408 }
409 } 409 }
410 410
411 void CSSPrimitiveValue::init(const LengthSize& lengthSize) 411 void CSSPrimitiveValue::init(const LengthSize& lengthSize, const RenderStyle& st yle)
412 { 412 {
413 m_primitiveUnitType = CSS_PAIR; 413 m_primitiveUnitType = CSS_PAIR;
414 m_hasCachedCSSText = false; 414 m_hasCachedCSSText = false;
415 m_value.pair = Pair::create(create(lengthSize.width()), create(lengthSize.he ight()), Pair::KeepIdenticalValues).leakRef(); 415 m_value.pair = Pair::create(create(lengthSize.width(), style.effectiveZoom() ), create(lengthSize.height(), style.effectiveZoom()), Pair::KeepIdenticalValues ).leakRef();
416 } 416 }
417 417
418 void CSSPrimitiveValue::init(PassRefPtrWillBeRawPtr<Counter> c) 418 void CSSPrimitiveValue::init(PassRefPtrWillBeRawPtr<Counter> c)
419 { 419 {
420 m_primitiveUnitType = CSS_COUNTER; 420 m_primitiveUnitType = CSS_COUNTER;
421 m_hasCachedCSSText = false; 421 m_hasCachedCSSText = false;
422 m_value.counter = c.leakRef(); 422 m_value.counter = c.leakRef();
423 } 423 }
424 424
425 void CSSPrimitiveValue::init(PassRefPtrWillBeRawPtr<Rect> r) 425 void CSSPrimitiveValue::init(PassRefPtrWillBeRawPtr<Rect> r)
(...skipping 1039 matching lines...) Expand 10 before | Expand all | Expand 10 after
1465 case CSS_SHAPE: 1465 case CSS_SHAPE:
1466 visitor->trace(m_value.shape); 1466 visitor->trace(m_value.shape);
1467 break; 1467 break;
1468 default: 1468 default:
1469 break; 1469 break;
1470 } 1470 }
1471 CSSValue::traceAfterDispatch(visitor); 1471 CSSValue::traceAfterDispatch(visitor);
1472 } 1472 }
1473 1473
1474 } // namespace WebCore 1474 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/css/CSSPrimitiveValue.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698