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

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: 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
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 283 matching lines...) Expand 10 before | Expand all | Expand 10 after
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)
299 : CSSValue(PrimitiveClass) 299 : CSSValue(PrimitiveClass)
300 { 300 {
301 init(lengthSize); 301 init(lengthSize);
302 } 302 }
303 303
304 CSSPrimitiveValue::CSSPrimitiveValue(const LengthSize& lengthSize, const RenderS tyle& style)
305 : CSSValue(PrimitiveClass)
306 {
307 init(lengthSize, style);
308 }
309
304 CSSPrimitiveValue::CSSPrimitiveValue(RGBA32 color, UnitTypes type) 310 CSSPrimitiveValue::CSSPrimitiveValue(RGBA32 color, UnitTypes type)
305 : CSSValue(PrimitiveClass) 311 : CSSValue(PrimitiveClass)
306 { 312 {
307 ASSERT(type == CSS_RGBCOLOR); 313 ASSERT(type == CSS_RGBCOLOR);
308 m_primitiveUnitType = CSS_RGBCOLOR; 314 m_primitiveUnitType = CSS_RGBCOLOR;
309 m_value.rgbcolor = color; 315 m_value.rgbcolor = color;
310 } 316 }
311 317
312 CSSPrimitiveValue::CSSPrimitiveValue(const Length& length, float zoom) 318 CSSPrimitiveValue::CSSPrimitiveValue(const Length& length, float zoom)
313 : CSSValue(PrimitiveClass) 319 : CSSValue(PrimitiveClass)
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
408 } 414 }
409 } 415 }
410 416
411 void CSSPrimitiveValue::init(const LengthSize& lengthSize) 417 void CSSPrimitiveValue::init(const LengthSize& lengthSize)
412 { 418 {
413 m_primitiveUnitType = CSS_PAIR; 419 m_primitiveUnitType = CSS_PAIR;
414 m_hasCachedCSSText = false; 420 m_hasCachedCSSText = false;
415 m_value.pair = Pair::create(create(lengthSize.width()), create(lengthSize.he ight()), Pair::KeepIdenticalValues).leakRef(); 421 m_value.pair = Pair::create(create(lengthSize.width()), create(lengthSize.he ight()), Pair::KeepIdenticalValues).leakRef();
416 } 422 }
417 423
424 void CSSPrimitiveValue::init(const LengthSize& lengthSize, const RenderStyle& st yle)
425 {
426 m_primitiveUnitType = CSS_PAIR;
427 m_hasCachedCSSText = false;
428 m_value.pair = Pair::create(create(lengthSize.width(), style.effectiveZoom() ), create(lengthSize.height(), style.effectiveZoom()), Pair::KeepIdenticalValues ).leakRef();
429 }
430
418 void CSSPrimitiveValue::init(PassRefPtrWillBeRawPtr<Counter> c) 431 void CSSPrimitiveValue::init(PassRefPtrWillBeRawPtr<Counter> c)
419 { 432 {
420 m_primitiveUnitType = CSS_COUNTER; 433 m_primitiveUnitType = CSS_COUNTER;
421 m_hasCachedCSSText = false; 434 m_hasCachedCSSText = false;
422 m_value.counter = c.leakRef(); 435 m_value.counter = c.leakRef();
423 } 436 }
424 437
425 void CSSPrimitiveValue::init(PassRefPtrWillBeRawPtr<Rect> r) 438 void CSSPrimitiveValue::init(PassRefPtrWillBeRawPtr<Rect> r)
426 { 439 {
427 m_primitiveUnitType = CSS_RECT; 440 m_primitiveUnitType = CSS_RECT;
(...skipping 1037 matching lines...) Expand 10 before | Expand all | Expand 10 after
1465 case CSS_SHAPE: 1478 case CSS_SHAPE:
1466 visitor->trace(m_value.shape); 1479 visitor->trace(m_value.shape);
1467 break; 1480 break;
1468 default: 1481 default:
1469 break; 1482 break;
1470 } 1483 }
1471 CSSValue::traceAfterDispatch(visitor); 1484 CSSValue::traceAfterDispatch(visitor);
1472 } 1485 }
1473 1486
1474 } // namespace WebCore 1487 } // namespace WebCore
OLDNEW
« Source/core/css/CSSPrimitiveValue.h ('K') | « Source/core/css/CSSPrimitiveValue.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698