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

Side by Side Diff: third_party/WebKit/Source/core/css/CSSValue.cpp

Issue 2089593002: Add expansion of shorthands with custom properties to longhands using a pending substition value. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Renames, signature update and master merge Created 4 years, 5 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 * Copyright (C) 2011 Andreas Kling (kling@webkit.org) 2 * Copyright (C) 2011 Andreas Kling (kling@webkit.org)
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 #include "core/css/CSSGradientValue.h" 42 #include "core/css/CSSGradientValue.h"
43 #include "core/css/CSSGridAutoRepeatValue.h" 43 #include "core/css/CSSGridAutoRepeatValue.h"
44 #include "core/css/CSSGridLineNamesValue.h" 44 #include "core/css/CSSGridLineNamesValue.h"
45 #include "core/css/CSSGridTemplateAreasValue.h" 45 #include "core/css/CSSGridTemplateAreasValue.h"
46 #include "core/css/CSSImageSetValue.h" 46 #include "core/css/CSSImageSetValue.h"
47 #include "core/css/CSSImageValue.h" 47 #include "core/css/CSSImageValue.h"
48 #include "core/css/CSSInheritedValue.h" 48 #include "core/css/CSSInheritedValue.h"
49 #include "core/css/CSSInitialValue.h" 49 #include "core/css/CSSInitialValue.h"
50 #include "core/css/CSSPaintValue.h" 50 #include "core/css/CSSPaintValue.h"
51 #include "core/css/CSSPathValue.h" 51 #include "core/css/CSSPathValue.h"
52 #include "core/css/CSSPendingSubstitutionValue.h"
52 #include "core/css/CSSPrimitiveValue.h" 53 #include "core/css/CSSPrimitiveValue.h"
53 #include "core/css/CSSQuadValue.h" 54 #include "core/css/CSSQuadValue.h"
54 #include "core/css/CSSReflectValue.h" 55 #include "core/css/CSSReflectValue.h"
55 #include "core/css/CSSSVGDocumentValue.h" 56 #include "core/css/CSSSVGDocumentValue.h"
56 #include "core/css/CSSShadowValue.h" 57 #include "core/css/CSSShadowValue.h"
57 #include "core/css/CSSStringValue.h" 58 #include "core/css/CSSStringValue.h"
58 #include "core/css/CSSTimingFunctionValue.h" 59 #include "core/css/CSSTimingFunctionValue.h"
59 #include "core/css/CSSURIValue.h" 60 #include "core/css/CSSURIValue.h"
60 #include "core/css/CSSUnicodeRangeValue.h" 61 #include "core/css/CSSUnicodeRangeValue.h"
61 #include "core/css/CSSUnsetValue.h" 62 #include "core/css/CSSUnsetValue.h"
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 case ImageSetClass: 178 case ImageSetClass:
178 return compareCSSValues<CSSImageSetValue>(*this, other); 179 return compareCSSValues<CSSImageSetValue>(*this, other);
179 case CSSSVGDocumentClass: 180 case CSSSVGDocumentClass:
180 return compareCSSValues<CSSSVGDocumentValue>(*this, other); 181 return compareCSSValues<CSSSVGDocumentValue>(*this, other);
181 case CSSContentDistributionClass: 182 case CSSContentDistributionClass:
182 return compareCSSValues<CSSContentDistributionValue>(*this, other); 183 return compareCSSValues<CSSContentDistributionValue>(*this, other);
183 case CustomPropertyDeclarationClass: 184 case CustomPropertyDeclarationClass:
184 return compareCSSValues<CSSCustomPropertyDeclaration>(*this, other); 185 return compareCSSValues<CSSCustomPropertyDeclaration>(*this, other);
185 case VariableReferenceClass: 186 case VariableReferenceClass:
186 return compareCSSValues<CSSVariableReferenceValue>(*this, other); 187 return compareCSSValues<CSSVariableReferenceValue>(*this, other);
188 case PendingSubstitutionValueClass:
189 return compareCSSValues<CSSPendingSubstitutionValue>(*this, other);
187 } 190 }
188 ASSERT_NOT_REACHED(); 191 ASSERT_NOT_REACHED();
189 return false; 192 return false;
190 } 193 }
191 return false; 194 return false;
192 } 195 }
193 196
194 String CSSValue::cssText() const 197 String CSSValue::cssText() const
195 { 198 {
196 switch (getClassType()) { 199 switch (getClassType()) {
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 case ImageSetClass: 272 case ImageSetClass:
270 return toCSSImageSetValue(this)->customCSSText(); 273 return toCSSImageSetValue(this)->customCSSText();
271 case CSSSVGDocumentClass: 274 case CSSSVGDocumentClass:
272 return toCSSSVGDocumentValue(this)->customCSSText(); 275 return toCSSSVGDocumentValue(this)->customCSSText();
273 case CSSContentDistributionClass: 276 case CSSContentDistributionClass:
274 return toCSSContentDistributionValue(this)->customCSSText(); 277 return toCSSContentDistributionValue(this)->customCSSText();
275 case VariableReferenceClass: 278 case VariableReferenceClass:
276 return toCSSVariableReferenceValue(this)->customCSSText(); 279 return toCSSVariableReferenceValue(this)->customCSSText();
277 case CustomPropertyDeclarationClass: 280 case CustomPropertyDeclarationClass:
278 return toCSSCustomPropertyDeclaration(this)->customCSSText(); 281 return toCSSCustomPropertyDeclaration(this)->customCSSText();
282 case PendingSubstitutionValueClass:
283 return toCSSPendingSubstitutionValue(this)->customCSSText();
279 } 284 }
280 ASSERT_NOT_REACHED(); 285 ASSERT_NOT_REACHED();
281 return String(); 286 return String();
282 } 287 }
283 288
284 void CSSValue::destroy() 289 void CSSValue::destroy()
285 { 290 {
286 switch (getClassType()) { 291 switch (getClassType()) {
287 case BasicShapeCircleClass: 292 case BasicShapeCircleClass:
288 delete toCSSBasicShapeCircleValue(this); 293 delete toCSSBasicShapeCircleValue(this);
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
400 return; 405 return;
401 case CSSContentDistributionClass: 406 case CSSContentDistributionClass:
402 delete toCSSContentDistributionValue(this); 407 delete toCSSContentDistributionValue(this);
403 return; 408 return;
404 case VariableReferenceClass: 409 case VariableReferenceClass:
405 delete toCSSVariableReferenceValue(this); 410 delete toCSSVariableReferenceValue(this);
406 return; 411 return;
407 case CustomPropertyDeclarationClass: 412 case CustomPropertyDeclarationClass:
408 delete toCSSCustomPropertyDeclaration(this); 413 delete toCSSCustomPropertyDeclaration(this);
409 return; 414 return;
415 case PendingSubstitutionValueClass:
416 delete toCSSPendingSubstitutionValue(this);
417 return;
410 } 418 }
411 ASSERT_NOT_REACHED(); 419 ASSERT_NOT_REACHED();
412 } 420 }
413 421
414 void CSSValue::finalizeGarbageCollectedObject() 422 void CSSValue::finalizeGarbageCollectedObject()
415 { 423 {
416 switch (getClassType()) { 424 switch (getClassType()) {
417 case BasicShapeCircleClass: 425 case BasicShapeCircleClass:
418 toCSSBasicShapeCircleValue(this)->~CSSBasicShapeCircleValue(); 426 toCSSBasicShapeCircleValue(this)->~CSSBasicShapeCircleValue();
419 return; 427 return;
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
530 return; 538 return;
531 case CSSContentDistributionClass: 539 case CSSContentDistributionClass:
532 toCSSContentDistributionValue(this)->~CSSContentDistributionValue(); 540 toCSSContentDistributionValue(this)->~CSSContentDistributionValue();
533 return; 541 return;
534 case VariableReferenceClass: 542 case VariableReferenceClass:
535 toCSSVariableReferenceValue(this)->~CSSVariableReferenceValue(); 543 toCSSVariableReferenceValue(this)->~CSSVariableReferenceValue();
536 return; 544 return;
537 case CustomPropertyDeclarationClass: 545 case CustomPropertyDeclarationClass:
538 toCSSCustomPropertyDeclaration(this)->~CSSCustomPropertyDeclaration(); 546 toCSSCustomPropertyDeclaration(this)->~CSSCustomPropertyDeclaration();
539 return; 547 return;
548 case PendingSubstitutionValueClass:
549 toCSSPendingSubstitutionValue(this)->~CSSPendingSubstitutionValue();
550 return;
540 } 551 }
541 ASSERT_NOT_REACHED(); 552 ASSERT_NOT_REACHED();
542 } 553 }
543 554
544 DEFINE_TRACE(CSSValue) 555 DEFINE_TRACE(CSSValue)
545 { 556 {
546 switch (getClassType()) { 557 switch (getClassType()) {
547 case BasicShapeCircleClass: 558 case BasicShapeCircleClass:
548 toCSSBasicShapeCircleValue(this)->traceAfterDispatch(visitor); 559 toCSSBasicShapeCircleValue(this)->traceAfterDispatch(visitor);
549 return; 560 return;
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
660 return; 671 return;
661 case CSSContentDistributionClass: 672 case CSSContentDistributionClass:
662 toCSSContentDistributionValue(this)->traceAfterDispatch(visitor); 673 toCSSContentDistributionValue(this)->traceAfterDispatch(visitor);
663 return; 674 return;
664 case VariableReferenceClass: 675 case VariableReferenceClass:
665 toCSSVariableReferenceValue(this)->traceAfterDispatch(visitor); 676 toCSSVariableReferenceValue(this)->traceAfterDispatch(visitor);
666 return; 677 return;
667 case CustomPropertyDeclarationClass: 678 case CustomPropertyDeclarationClass:
668 toCSSCustomPropertyDeclaration(this)->traceAfterDispatch(visitor); 679 toCSSCustomPropertyDeclaration(this)->traceAfterDispatch(visitor);
669 return; 680 return;
681 case PendingSubstitutionValueClass:
682 toCSSPendingSubstitutionValue(this)->traceAfterDispatch(visitor);
683 return;
670 } 684 }
671 ASSERT_NOT_REACHED(); 685 ASSERT_NOT_REACHED();
672 } 686 }
673 687
674 } // namespace blink 688 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/CSSValue.h ('k') | third_party/WebKit/Source/core/css/StylePropertySerializer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698