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

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

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
« no previous file with comments | « Source/core/css/BasicShapeFunctions.cpp ('k') | Source/core/css/CSSPrimitiveValue.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 /* 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, 2008 Apple Inc. All rights reserved. 3 * Copyright (C) 2004, 2005, 2006, 2008 Apple Inc. All rights reserved.
4 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> 4 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org>
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 return adoptRefWillBeNoop(new CSSPrimitiveValue(value, type)); 246 return adoptRefWillBeNoop(new CSSPrimitiveValue(value, type));
247 } 247 }
248 static PassRefPtrWillBeRawPtr<CSSPrimitiveValue> create(const Length& value, float zoom) 248 static PassRefPtrWillBeRawPtr<CSSPrimitiveValue> create(const Length& value, float zoom)
249 { 249 {
250 return adoptRefWillBeNoop(new CSSPrimitiveValue(value, zoom)); 250 return adoptRefWillBeNoop(new CSSPrimitiveValue(value, zoom));
251 } 251 }
252 static PassRefPtrWillBeRawPtr<CSSPrimitiveValue> create(const LengthSize& va lue) 252 static PassRefPtrWillBeRawPtr<CSSPrimitiveValue> create(const LengthSize& va lue)
253 { 253 {
254 return adoptRefWillBeNoop(new CSSPrimitiveValue(value)); 254 return adoptRefWillBeNoop(new CSSPrimitiveValue(value));
255 } 255 }
256 static PassRefPtrWillBeRawPtr<CSSPrimitiveValue> create(const LengthSize& va lue, const RenderStyle& style)
257 {
258 return adoptRefWillBeNoop(new CSSPrimitiveValue(value, style));
259 }
256 template<typename T> static PassRefPtrWillBeRawPtr<CSSPrimitiveValue> create (T value) 260 template<typename T> static PassRefPtrWillBeRawPtr<CSSPrimitiveValue> create (T value)
257 { 261 {
258 return adoptRefWillBeNoop(new CSSPrimitiveValue(value)); 262 return adoptRefWillBeNoop(new CSSPrimitiveValue(value));
259 } 263 }
260 264
261 // This value is used to handle quirky margins in reflow roots (body, td, an d th) like WinIE. 265 // This value is used to handle quirky margins in reflow roots (body, td, an d th) like WinIE.
262 // The basic idea is that a stylesheet can use the value __qem (for quirky e m) instead of em. 266 // The basic idea is that a stylesheet can use the value __qem (for quirky e m) instead of em.
263 // When the quirky value is used, if you're in quirks mode, the margin will collapse away 267 // When the quirky value is used, if you're in quirks mode, the margin will collapse away
264 // inside a table cell. 268 // inside a table cell.
265 static PassRefPtrWillBeRawPtr<CSSPrimitiveValue> createAllowingMarginQuirk(d ouble value, UnitTypes type) 269 static PassRefPtrWillBeRawPtr<CSSPrimitiveValue> createAllowingMarginQuirk(d ouble value, UnitTypes type)
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
376 // int vs. unsigned is too subtle to distinguish types, so require a UnitTyp e. 380 // int vs. unsigned is too subtle to distinguish types, so require a UnitTyp e.
377 CSSPrimitiveValue(int parserOperator, UnitTypes); 381 CSSPrimitiveValue(int parserOperator, UnitTypes);
378 CSSPrimitiveValue(unsigned color, UnitTypes); // RGB value 382 CSSPrimitiveValue(unsigned color, UnitTypes); // RGB value
379 CSSPrimitiveValue(const Length& length) 383 CSSPrimitiveValue(const Length& length)
380 : CSSValue(PrimitiveClass) 384 : CSSValue(PrimitiveClass)
381 { 385 {
382 init(length); 386 init(length);
383 } 387 }
384 CSSPrimitiveValue(const Length&, float zoom); 388 CSSPrimitiveValue(const Length&, float zoom);
385 CSSPrimitiveValue(const LengthSize&); 389 CSSPrimitiveValue(const LengthSize&);
390 CSSPrimitiveValue(const LengthSize&, const RenderStyle&);
Zoltan 2014/04/29 21:43:24 Is the one parameter LengthSize version is used so
386 CSSPrimitiveValue(const String&, UnitTypes); 391 CSSPrimitiveValue(const String&, UnitTypes);
387 CSSPrimitiveValue(double, UnitTypes); 392 CSSPrimitiveValue(double, UnitTypes);
388 393
389 template<typename T> CSSPrimitiveValue(T); // Defined in CSSPrimitiveValueMa ppings.h 394 template<typename T> CSSPrimitiveValue(T); // Defined in CSSPrimitiveValueMa ppings.h
390 template<typename T> CSSPrimitiveValue(T* val) 395 template<typename T> CSSPrimitiveValue(T* val)
391 : CSSValue(PrimitiveClass) 396 : CSSValue(PrimitiveClass)
392 { 397 {
393 init(PassRefPtrWillBeRawPtr<T>(val)); 398 init(PassRefPtrWillBeRawPtr<T>(val));
394 } 399 }
395 400
396 template<typename T> CSSPrimitiveValue(PassRefPtrWillBeRawPtr<T> val) 401 template<typename T> CSSPrimitiveValue(PassRefPtrWillBeRawPtr<T> val)
397 : CSSValue(PrimitiveClass) 402 : CSSValue(PrimitiveClass)
398 { 403 {
399 init(val); 404 init(val);
400 } 405 }
401 406
402 static void create(int); // compile-time guard 407 static void create(int); // compile-time guard
403 static void create(unsigned); // compile-time guard 408 static void create(unsigned); // compile-time guard
404 template<typename T> operator T*(); // compile-time guard 409 template<typename T> operator T*(); // compile-time guard
405 410
406 void init(const Length&); 411 void init(const Length&);
407 void init(const LengthSize&); 412 void init(const LengthSize&);
413 void init(const LengthSize&, const RenderStyle&);
408 void init(PassRefPtrWillBeRawPtr<Counter>); 414 void init(PassRefPtrWillBeRawPtr<Counter>);
409 void init(PassRefPtrWillBeRawPtr<Rect>); 415 void init(PassRefPtrWillBeRawPtr<Rect>);
410 void init(PassRefPtrWillBeRawPtr<Pair>); 416 void init(PassRefPtrWillBeRawPtr<Pair>);
411 void init(PassRefPtrWillBeRawPtr<Quad>); 417 void init(PassRefPtrWillBeRawPtr<Quad>);
412 void init(PassRefPtrWillBeRawPtr<CSSBasicShape>); 418 void init(PassRefPtrWillBeRawPtr<CSSBasicShape>);
413 void init(PassRefPtrWillBeRawPtr<CSSCalcValue>); 419 void init(PassRefPtrWillBeRawPtr<CSSCalcValue>);
414 bool getDoubleValueInternal(UnitTypes targetUnitType, double* result) const; 420 bool getDoubleValueInternal(UnitTypes targetUnitType, double* result) const;
415 421
416 double computeLengthDouble(const CSSToLengthConversionData&); 422 double computeLengthDouble(const CSSToLengthConversionData&);
417 423
(...skipping 14 matching lines...) Expand all
432 } m_value; 438 } m_value;
433 }; 439 };
434 440
435 typedef CSSPrimitiveValue::CSSLengthArray CSSLengthArray; 441 typedef CSSPrimitiveValue::CSSLengthArray CSSLengthArray;
436 442
437 DEFINE_CSS_VALUE_TYPE_CASTS(CSSPrimitiveValue, isPrimitiveValue()); 443 DEFINE_CSS_VALUE_TYPE_CASTS(CSSPrimitiveValue, isPrimitiveValue());
438 444
439 } // namespace WebCore 445 } // namespace WebCore
440 446
441 #endif // CSSPrimitiveValue_h 447 #endif // CSSPrimitiveValue_h
OLDNEW
« no previous file with comments | « Source/core/css/BasicShapeFunctions.cpp ('k') | Source/core/css/CSSPrimitiveValue.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698