Changeset 175487 in webkit
- Timestamp:
- Nov 3, 2014 12:48:23 PM (9 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r175485 r175487 1 2014-11-03 Chris Dumez <cdumez@apple.com> 2 3 Support modern range loops over CSSValueList 4 https://bugs.webkit.org/show_bug.cgi?id=138285 5 6 Reviewed by Andreas Kling. 7 8 Add support for modern range loops over CSSValueList objects. 9 Port the code base to using range loops for CSSValueList objects and 10 drop the CSSValueListInspector / CSSValueListIterator classes as they 11 are no longer needed. 12 13 No new tests, no behavior change. 14 1 15 2014-11-03 Andreas Kling <akling@apple.com> 2 16 -
trunk/Source/WebCore/css/CSSToStyleMap.cpp
r174300 r175487 31 31 #include "Animation.h" 32 32 #include "CSSBorderImageSliceValue.h" 33 #include "CSSImageGeneratorValue.h" 34 #include "CSSImageSetValue.h" 35 #include "CSSImageValue.h" 33 36 #include "CSSPrimitiveValue.h" 34 37 #include "CSSPrimitiveValueMappings.h" … … 63 66 } 64 67 65 PassRefPtr<StyleImage> CSSToStyleMap::styleImage(CSSPropertyID propertyId, CSSValue *value)68 PassRefPtr<StyleImage> CSSToStyleMap::styleImage(CSSPropertyID propertyId, CSSValue& value) 66 69 { 67 70 return m_resolver->styleImage(propertyId, value); … … 157 160 } 158 161 159 layer->setImage(styleImage(property, value));162 layer->setImage(styleImage(property, *value)); 160 163 } 161 164 … … 323 326 } 324 327 325 void CSSToStyleMap::mapAnimationDelay(Animation* animation, CSSValue *value)326 { 327 if (value ->isInitialValue()) {328 void CSSToStyleMap::mapAnimationDelay(Animation* animation, CSSValue& value) 329 { 330 if (value.isInitialValue()) { 328 331 animation->setDelay(Animation::initialAnimationDelay()); 329 332 return; 330 333 } 331 334 332 if (!is<CSSPrimitiveValue>(*value)) 333 return; 334 335 CSSPrimitiveValue& primitiveValue = downcast<CSSPrimitiveValue>(*value); 336 animation->setDelay(primitiveValue.computeTime<double, CSSPrimitiveValue::Seconds>()); 337 } 338 339 void CSSToStyleMap::mapAnimationDirection(Animation* layer, CSSValue* value) 340 { 341 if (value->isInitialValue()) { 335 if (!is<CSSPrimitiveValue>(value)) 336 return; 337 338 animation->setDelay(downcast<CSSPrimitiveValue>(value).computeTime<double, CSSPrimitiveValue::Seconds>()); 339 } 340 341 void CSSToStyleMap::mapAnimationDirection(Animation* layer, CSSValue& value) 342 { 343 if (value.isInitialValue()) { 342 344 layer->setDirection(Animation::initialAnimationDirection()); 343 345 return; 344 346 } 345 347 346 if (!is<CSSPrimitiveValue>(*value)) 347 return; 348 349 CSSPrimitiveValue& primitiveValue = downcast<CSSPrimitiveValue>(*value); 350 switch (primitiveValue.getValueID()) { 348 if (!is<CSSPrimitiveValue>(value)) 349 return; 350 351 switch (downcast<CSSPrimitiveValue>(value).getValueID()) { 351 352 case CSSValueNormal: 352 353 layer->setDirection(Animation::AnimationDirectionNormal); … … 366 367 } 367 368 368 void CSSToStyleMap::mapAnimationDuration(Animation* animation, CSSValue *value)369 { 370 if (value ->isInitialValue()) {369 void CSSToStyleMap::mapAnimationDuration(Animation* animation, CSSValue& value) 370 { 371 if (value.isInitialValue()) { 371 372 animation->setDuration(Animation::initialAnimationDuration()); 372 373 return; 373 374 } 374 375 375 if (!is<CSSPrimitiveValue>(*value)) 376 return; 377 378 CSSPrimitiveValue& primitiveValue = downcast<CSSPrimitiveValue>(*value); 379 animation->setDuration(primitiveValue.computeTime<double, CSSPrimitiveValue::Seconds>()); 380 } 381 382 void CSSToStyleMap::mapAnimationFillMode(Animation* layer, CSSValue* value) 383 { 384 if (value->isInitialValue()) { 376 if (!is<CSSPrimitiveValue>(value)) 377 return; 378 379 animation->setDuration(downcast<CSSPrimitiveValue>(value).computeTime<double, CSSPrimitiveValue::Seconds>()); 380 } 381 382 void CSSToStyleMap::mapAnimationFillMode(Animation* layer, CSSValue& value) 383 { 384 if (value.isInitialValue()) { 385 385 layer->setFillMode(Animation::initialAnimationFillMode()); 386 386 return; 387 387 } 388 388 389 if (!is<CSSPrimitiveValue>(*value)) 390 return; 391 392 CSSPrimitiveValue& primitiveValue = downcast<CSSPrimitiveValue>(*value); 393 switch (primitiveValue.getValueID()) { 389 if (!is<CSSPrimitiveValue>(value)) 390 return; 391 392 switch (downcast<CSSPrimitiveValue>(value).getValueID()) { 394 393 case CSSValueNone: 395 394 layer->setFillMode(AnimationFillModeNone); … … 409 408 } 410 409 411 void CSSToStyleMap::mapAnimationIterationCount(Animation* animation, CSSValue *value)412 { 413 if (value ->isInitialValue()) {410 void CSSToStyleMap::mapAnimationIterationCount(Animation* animation, CSSValue& value) 411 { 412 if (value.isInitialValue()) { 414 413 animation->setIterationCount(Animation::initialAnimationIterationCount()); 415 414 return; 416 415 } 417 416 418 if (!is<CSSPrimitiveValue>( *value))419 return; 420 421 CSSPrimitiveValue& primitiveValue = downcast<CSSPrimitiveValue>(*value);417 if (!is<CSSPrimitiveValue>(value)) 418 return; 419 420 auto& primitiveValue = downcast<CSSPrimitiveValue>(value); 422 421 if (primitiveValue.getValueID() == CSSValueInfinite) 423 422 animation->setIterationCount(Animation::IterationCountInfinite); … … 426 425 } 427 426 428 void CSSToStyleMap::mapAnimationName(Animation* layer, CSSValue *value)429 { 430 if (value ->isInitialValue()) {427 void CSSToStyleMap::mapAnimationName(Animation* layer, CSSValue& value) 428 { 429 if (value.isInitialValue()) { 431 430 layer->setName(Animation::initialAnimationName()); 432 431 return; 433 432 } 434 433 435 if (!is<CSSPrimitiveValue>( *value))436 return; 437 438 CSSPrimitiveValue& primitiveValue = downcast<CSSPrimitiveValue>(*value);434 if (!is<CSSPrimitiveValue>(value)) 435 return; 436 437 auto& primitiveValue = downcast<CSSPrimitiveValue>(value); 439 438 if (primitiveValue.getValueID() == CSSValueNone) 440 439 layer->setIsNoneAnimation(true); … … 443 442 } 444 443 445 void CSSToStyleMap::mapAnimationPlayState(Animation* layer, CSSValue *value)446 { 447 if (value ->isInitialValue()) {444 void CSSToStyleMap::mapAnimationPlayState(Animation* layer, CSSValue& value) 445 { 446 if (value.isInitialValue()) { 448 447 layer->setPlayState(Animation::initialAnimationPlayState()); 449 448 return; 450 449 } 451 450 452 if (!is<CSSPrimitiveValue>(*value)) 453 return; 454 455 CSSPrimitiveValue& primitiveValue = downcast<CSSPrimitiveValue>(*value); 456 EAnimPlayState playState = (primitiveValue.getValueID() == CSSValuePaused) ? AnimPlayStatePaused : AnimPlayStatePlaying; 451 if (!is<CSSPrimitiveValue>(value)) 452 return; 453 454 EAnimPlayState playState = (downcast<CSSPrimitiveValue>(value).getValueID() == CSSValuePaused) ? AnimPlayStatePaused : AnimPlayStatePlaying; 457 455 layer->setPlayState(playState); 458 456 } 459 457 460 void CSSToStyleMap::mapAnimationProperty(Animation* animation, CSSValue *value)461 { 462 if (value ->isInitialValue()) {458 void CSSToStyleMap::mapAnimationProperty(Animation* animation, CSSValue& value) 459 { 460 if (value.isInitialValue()) { 463 461 animation->setAnimationMode(Animation::AnimateAll); 464 462 animation->setProperty(CSSPropertyInvalid); … … 466 464 } 467 465 468 if (!is<CSSPrimitiveValue>( *value))469 return; 470 471 CSSPrimitiveValue& primitiveValue = downcast<CSSPrimitiveValue>(*value);466 if (!is<CSSPrimitiveValue>(value)) 467 return; 468 469 auto& primitiveValue = downcast<CSSPrimitiveValue>(value); 472 470 if (primitiveValue.getValueID() == CSSValueAll) { 473 471 animation->setAnimationMode(Animation::AnimateAll); … … 482 480 } 483 481 484 void CSSToStyleMap::mapAnimationTimingFunction(Animation* animation, CSSValue *value)485 { 486 if (value ->isInitialValue()) {482 void CSSToStyleMap::mapAnimationTimingFunction(Animation* animation, CSSValue& value) 483 { 484 if (value.isInitialValue()) { 487 485 animation->setTimingFunction(Animation::initialAnimationTimingFunction()); 488 486 return; 489 487 } 490 488 491 if (is<CSSPrimitiveValue>(*value)) { 492 CSSPrimitiveValue& primitiveValue = downcast<CSSPrimitiveValue>(*value); 493 switch (primitiveValue.getValueID()) { 489 if (is<CSSPrimitiveValue>(value)) { 490 switch (downcast<CSSPrimitiveValue>(value).getValueID()) { 494 491 case CSSValueLinear: 495 492 animation->setTimingFunction(LinearTimingFunction::create()); … … 519 516 } 520 517 521 if (is<CSSCubicBezierTimingFunctionValue>( *value)) {522 CSSCubicBezierTimingFunctionValue& cubicTimingFunction = downcast<CSSCubicBezierTimingFunctionValue>(*value);518 if (is<CSSCubicBezierTimingFunctionValue>(value)) { 519 auto& cubicTimingFunction = downcast<CSSCubicBezierTimingFunctionValue>(value); 523 520 animation->setTimingFunction(CubicBezierTimingFunction::create(cubicTimingFunction.x1(), cubicTimingFunction.y1(), cubicTimingFunction.x2(), cubicTimingFunction.y2())); 524 } else if (is<CSSStepsTimingFunctionValue>( *value)) {525 CSSStepsTimingFunctionValue& stepsTimingFunction = downcast<CSSStepsTimingFunctionValue>(*value);521 } else if (is<CSSStepsTimingFunctionValue>(value)) { 522 auto& stepsTimingFunction = downcast<CSSStepsTimingFunctionValue>(value); 526 523 animation->setTimingFunction(StepsTimingFunction::create(stepsTimingFunction.numberOfSteps(), stepsTimingFunction.stepAtStart())); 527 524 } … … 546 543 imageProperty = property; 547 544 548 for (unsigned i = 0 ; i < borderImage.length(); ++i) { 549 CSSValue* current = borderImage.item(i); 550 551 if (current->isImageValue() || current->isImageGeneratorValue() 545 for (auto& current : borderImage) { 546 if (is<CSSImageValue>(current.get()) || is<CSSImageGeneratorValue>(current.get()) 552 547 #if ENABLE(CSS_IMAGE_SET) 553 || current->isImageSetValue()548 || is<CSSImageSetValue>(current.get()) 554 549 #endif 555 550 ) 556 image.setImage(styleImage(imageProperty, current ));557 else if ( current->isBorderImageSliceValue())558 mapNinePieceImageSlice(current , image);559 else if (is<CSSValueList>( *current)) {560 CSSValueList& slashList = downcast<CSSValueList>( *current);551 image.setImage(styleImage(imageProperty, current.get())); 552 else if (is<CSSBorderImageSliceValue>(current.get())) 553 mapNinePieceImageSlice(current.get(), image); 554 else if (is<CSSValueList>(current.get())) { 555 CSSValueList& slashList = downcast<CSSValueList>(current.get()); 561 556 // Map in the image slices. 562 if ( slashList.item(0) && slashList.item(0)->isBorderImageSliceValue())563 mapNinePieceImageSlice( slashList.item(0), image);557 if (is<CSSBorderImageSliceValue>(slashList.item(0))) 558 mapNinePieceImageSlice(*slashList.item(0), image); 564 559 565 560 // Map in the border slices. 566 561 if (slashList.item(1)) 567 image.setBorderSlices(mapNinePieceImageQuad( slashList.item(1)));562 image.setBorderSlices(mapNinePieceImageQuad(*slashList.item(1))); 568 563 569 564 // Map in the outset. 570 565 if (slashList.item(2)) 571 image.setOutset(mapNinePieceImageQuad( slashList.item(2)));572 } else if ( current->isPrimitiveValue()) {566 image.setOutset(mapNinePieceImageQuad(*slashList.item(2))); 567 } else if (is<CSSPrimitiveValue>(current.get())) { 573 568 // Set the appropriate rules for stretch/round/repeat of the slices. 574 mapNinePieceImageRepeat(current , image);569 mapNinePieceImageRepeat(current.get(), image); 575 570 } 576 571 } … … 591 586 } 592 587 593 void CSSToStyleMap::mapNinePieceImageSlice(CSSValue *value, NinePieceImage& image)588 void CSSToStyleMap::mapNinePieceImageSlice(CSSValue& value, NinePieceImage& image) 594 589 { 595 590 if (!is<CSSBorderImageSliceValue>(value)) … … 597 592 598 593 // Retrieve the border image value. 599 CSSBorderImageSliceValue& borderImageSlice = downcast<CSSBorderImageSliceValue>(*value);594 auto& borderImageSlice = downcast<CSSBorderImageSliceValue>(value); 600 595 601 596 // Set up a length box to represent our image slices. … … 624 619 } 625 620 626 LengthBox CSSToStyleMap::mapNinePieceImageQuad(CSSValue *value)621 LengthBox CSSToStyleMap::mapNinePieceImageQuad(CSSValue& value) 627 622 { 628 623 if (!is<CSSPrimitiveValue>(value)) … … 633 628 634 629 // Retrieve the primitive value. 635 CSSPrimitiveValue& borderWidths = downcast<CSSPrimitiveValue>(*value);630 auto& borderWidths = downcast<CSSPrimitiveValue>(value); 636 631 637 632 // Set up a length box to represent our image slices. … … 669 664 } 670 665 671 void CSSToStyleMap::mapNinePieceImageRepeat(CSSValue *value, NinePieceImage& image)672 { 673 if (!is<CSSPrimitiveValue>(value)) 674 return; 675 676 CSSPrimitiveValue& primitiveValue = downcast<CSSPrimitiveValue>( *value);666 void CSSToStyleMap::mapNinePieceImageRepeat(CSSValue& value, NinePieceImage& image) 667 { 668 if (!is<CSSPrimitiveValue>(value)) 669 return; 670 671 CSSPrimitiveValue& primitiveValue = downcast<CSSPrimitiveValue>(value); 677 672 Pair* pair = primitiveValue.getPairValue(); 678 673 if (!pair || !pair->first() || !pair->second()) -
trunk/Source/WebCore/css/CSSToStyleMap.h
r167937 r175487 59 59 void mapFillMaskSourceType(CSSPropertyID, FillLayer*, CSSValue*); 60 60 61 void mapAnimationDelay(Animation*, CSSValue *);62 void mapAnimationDirection(Animation*, CSSValue *);63 void mapAnimationDuration(Animation*, CSSValue *);64 void mapAnimationFillMode(Animation*, CSSValue *);65 void mapAnimationIterationCount(Animation*, CSSValue *);66 void mapAnimationName(Animation*, CSSValue *);67 void mapAnimationPlayState(Animation*, CSSValue *);68 void mapAnimationProperty(Animation*, CSSValue *);69 void mapAnimationTimingFunction(Animation*, CSSValue *);61 void mapAnimationDelay(Animation*, CSSValue&); 62 void mapAnimationDirection(Animation*, CSSValue&); 63 void mapAnimationDuration(Animation*, CSSValue&); 64 void mapAnimationFillMode(Animation*, CSSValue&); 65 void mapAnimationIterationCount(Animation*, CSSValue&); 66 void mapAnimationName(Animation*, CSSValue&); 67 void mapAnimationPlayState(Animation*, CSSValue&); 68 void mapAnimationProperty(Animation*, CSSValue&); 69 void mapAnimationTimingFunction(Animation*, CSSValue&); 70 70 71 71 void mapNinePieceImage(CSSPropertyID, CSSValue*, NinePieceImage&); 72 void mapNinePieceImageSlice(CSSValue *, NinePieceImage&);73 LengthBox mapNinePieceImageQuad(CSSValue *);74 void mapNinePieceImageRepeat(CSSValue *, NinePieceImage&);72 void mapNinePieceImageSlice(CSSValue&, NinePieceImage&); 73 LengthBox mapNinePieceImageQuad(CSSValue&); 74 void mapNinePieceImageRepeat(CSSValue&, NinePieceImage&); 75 75 76 76 private: … … 85 85 // is held by the StyleResolver, and likely provided to this object 86 86 // during the resolve. 87 PassRefPtr<StyleImage> styleImage(CSSPropertyID, CSSValue *);87 PassRefPtr<StyleImage> styleImage(CSSPropertyID, CSSValue&); 88 88 89 89 StyleResolver* m_resolver; -
trunk/Source/WebCore/css/CSSValueList.h
r174300 r175487 32 32 class CSSValueList : public CSSValue { 33 33 public: 34 typedef Vector<Ref<CSSValue>, 4>::iterator iterator; 35 typedef Vector<Ref<CSSValue>, 4>::const_iterator const_iterator; 36 34 37 static PassRef<CSSValueList> createCommaSeparated() 35 38 { … … 54 57 CSSValue* itemWithoutBoundsCheck(size_t index) { return &m_values[index].get(); } 55 58 const CSSValue* itemWithoutBoundsCheck(size_t index) const { ASSERT(index < m_values.size()); return &m_values[index].get(); } 59 60 const_iterator begin() const { return m_values.begin(); } 61 const_iterator end() const { return m_values.end(); } 62 iterator begin() { return m_values.begin(); } 63 iterator end() { return m_values.end(); } 56 64 57 65 void append(PassRef<CSSValue>); … … 92 100 } 93 101 94 // Objects of this class are intended to be stack-allocated and scoped to a single function.95 // Please take care not to pass these around as they do hold onto a raw pointer.96 class CSSValueListInspector {97 public:98 CSSValueListInspector(CSSValue* value)99 : m_list(is<CSSValueList>(value) ? downcast<CSSValueList>(value) : nullptr)100 {101 }102 103 CSSValue* item(size_t index) const { ASSERT_WITH_SECURITY_IMPLICATION(index < length()); return m_list->itemWithoutBoundsCheck(index); }104 CSSValue* first() const { return item(0); }105 CSSValue* second() const { return item(1); }106 size_t length() const { return m_list ? m_list->length() : 0; }107 private:108 CSSValueList* m_list;109 };110 111 // Wrapper that can be used to iterate over any CSSValue. Non-list values and 0 behave as zero-length lists.112 // Objects of this class are intended to be stack-allocated and scoped to a single function.113 // Please take care not to pass these around as they do hold onto a raw pointer.114 class CSSValueListIterator {115 public:116 CSSValueListIterator(CSSValue* value) : m_inspector(value), m_position(0) { }117 bool hasMore() const { return m_position < m_inspector.length(); }118 CSSValue* value() const { return m_inspector.item(m_position); }119 bool isPrimitiveValue() const { return value()->isPrimitiveValue(); }120 void advance() { m_position++; ASSERT(m_position <= m_inspector.length());}121 size_t index() const { return m_position; }122 private:123 CSSValueListInspector m_inspector;124 size_t m_position;125 };126 102 } // namespace WebCore 127 103 -
trunk/Source/WebCore/css/DeprecatedStyleBuilder.cpp
r175481 r175487 33 33 #include "CSSCalculationValue.h" 34 34 #include "CSSCursorImageValue.h" 35 #include "CSSImageGeneratorValue.h" 35 36 #include "CSSImageSetValue.h" 36 37 #include "CSSPrimitiveValue.h" … … 164 165 class ApplyPropertyStyleImage { 165 166 public: 166 static void applyValue(CSSPropertyID, StyleResolver* styleResolver, CSSValue* value) { (styleResolver->style()->*setterFunction)(styleResolver->styleImage(property, value)); }167 static void applyValue(CSSPropertyID, StyleResolver* styleResolver, CSSValue* value) { (styleResolver->style()->*setterFunction)(styleResolver->styleImage(property, *value)); } 167 168 static PropertyHandler createHandler() 168 169 { … … 851 852 switch (modifier) { 852 853 case Outset: 853 image.setOutset(styleResolver->styleMap()->mapNinePieceImageQuad( value));854 image.setOutset(styleResolver->styleMap()->mapNinePieceImageQuad(*value)); 854 855 break; 855 856 case Repeat: 856 styleResolver->styleMap()->mapNinePieceImageRepeat( value, image);857 styleResolver->styleMap()->mapNinePieceImageRepeat(*value, image); 857 858 break; 858 859 case Slice: 859 styleResolver->styleMap()->mapNinePieceImageSlice( value, image);860 styleResolver->styleMap()->mapNinePieceImageSlice(*value, image); 860 861 break; 861 862 case Width: 862 image.setBorderSlices(styleResolver->styleMap()->mapNinePieceImageQuad( value));863 image.setBorderSlices(styleResolver->styleMap()->mapNinePieceImageQuad(*value)); 863 864 break; 864 865 } … … 962 963 if (image.updateIfSVGCursorIsUsed(styleResolver->element())) // Elements with SVG cursors are not allowed to share style. 963 964 styleResolver->style()->setUnique(); 964 styleResolver->style()->addCursor(styleResolver->styleImage(CSSPropertyCursor, &image), image.hotSpot());965 styleResolver->style()->addCursor(styleResolver->styleImage(CSSPropertyCursor, image), image.hotSpot()); 965 966 } else if (is<CSSPrimitiveValue>(*item)) { 966 967 CSSPrimitiveValue& primitiveValue = downcast<CSSPrimitiveValue>(*item); … … 1044 1045 1045 1046 TextDecorationSkip skip = RenderStyle::initialTextDecorationSkip(); 1046 for (CSSValueListIterator i(value); i.hasMore(); i.advance()) 1047 skip |= valueToDecorationSkip(downcast<CSSPrimitiveValue>(*i.value())); 1047 if (is<CSSValueList>(*value)) { 1048 for (auto& currentValue : downcast<CSSValueList>(*value)) 1049 skip |= valueToDecorationSkip(downcast<CSSPrimitiveValue>(currentValue.get())); 1050 } 1048 1051 styleResolver->style()->setTextDecorationSkip(skip); 1049 1052 } … … 1121 1124 1122 1125 unsigned t = 0; 1123 for (CSSValueListIterator i(value); i.hasMore(); i.advance()) { 1124 CSSValue* item = i.value(); 1125 TextUnderlinePosition t2 = downcast<CSSPrimitiveValue>(*item); 1126 t |= t2; 1126 if (is<CSSValueList>(*value)) { 1127 for (auto& currentValue : downcast<CSSValueList>(*value)) { 1128 TextUnderlinePosition t2 = downcast<CSSPrimitiveValue>(currentValue.get()); 1129 t |= t2; 1130 } 1127 1131 } 1128 1132 styleResolver->style()->setTextUnderlinePosition(static_cast<TextUnderlinePosition>(t)); … … 1341 1345 Length height; 1342 1346 PageSizeType pageSizeType = PAGE_SIZE_AUTO; 1343 CSSValueListInspector inspector(value); 1344 switch (inspector.length()) { 1347 if (!is<CSSValueList>(value)) 1348 return; 1349 1350 auto& valueList = downcast<CSSValueList>(*value); 1351 switch (valueList.length()) { 1345 1352 case 2: { 1353 CSSValue* firstValue = valueList.itemWithoutBoundsCheck(0); 1354 CSSValue* secondValue = valueList.itemWithoutBoundsCheck(1); 1346 1355 // <length>{2} | <page-size> <orientation> 1347 if (!is<CSSPrimitiveValue>(* inspector.first()) || !is<CSSPrimitiveValue>(*inspector.second()))1356 if (!is<CSSPrimitiveValue>(*firstValue) || !is<CSSPrimitiveValue>(*secondValue)) 1348 1357 return; 1349 CSSPrimitiveValue& first = downcast<CSSPrimitiveValue>(*inspector.first());1350 CSSPrimitiveValue& second = downcast<CSSPrimitiveValue>(*inspector.second());1351 if (first .isLength()) {1358 auto& firstPrimitiveValue = downcast<CSSPrimitiveValue>(*firstValue); 1359 auto& secondPrimitiveValue = downcast<CSSPrimitiveValue>(*secondValue); 1360 if (firstPrimitiveValue.isLength()) { 1352 1361 // <length>{2} 1353 if (!second .isLength())1362 if (!secondPrimitiveValue.isLength()) 1354 1363 return; 1355 1364 CSSToLengthConversionData conversionData = styleResolver->state().cssToLengthConversionData().copyWithAdjustedZoom(1.0f); 1356 width = first .computeLength<Length>(conversionData);1357 height = second .computeLength<Length>(conversionData);1365 width = firstPrimitiveValue.computeLength<Length>(conversionData); 1366 height = secondPrimitiveValue.computeLength<Length>(conversionData); 1358 1367 } else { 1359 1368 // <page-size> <orientation> 1360 1369 // The value order is guaranteed. See CSSParser::parseSizeParameter. 1361 if (!getPageSizeFromName(&first , &second, width, height))1370 if (!getPageSizeFromName(&firstPrimitiveValue, &secondPrimitiveValue, width, height)) 1362 1371 return; 1363 1372 } … … 1366 1375 } 1367 1376 case 1: { 1377 CSSValue* value = valueList.itemWithoutBoundsCheck(0); 1368 1378 // <length> | auto | <page-size> | [ portrait | landscape] 1369 if (!is<CSSPrimitiveValue>(* inspector.first()))1379 if (!is<CSSPrimitiveValue>(*value)) 1370 1380 return; 1371 CSSPrimitiveValue& primitiveValue = downcast<CSSPrimitiveValue>(*inspector.first());1381 auto& primitiveValue = downcast<CSSPrimitiveValue>(*value); 1372 1382 if (primitiveValue.isLength()) { 1373 1383 // <length> … … 1499 1509 1500 1510 TextEmphasisPosition position = 0; 1501 for (CSSValueListIterator i(value); i.hasMore(); i.advance()) 1502 position |= valueToEmphasisPosition(downcast<CSSPrimitiveValue>(*i.value())); 1511 if (is<CSSValueList>(*value)) { 1512 for (auto& currentValue : downcast<CSSValueList>(*value)) 1513 position |= valueToEmphasisPosition(downcast<CSSPrimitiveValue>(currentValue.get())); 1514 } 1503 1515 styleResolver->style()->setTextEmphasisPosition(position); 1504 1516 } … … 1516 1528 void (Animation::*clearFunction)(), 1517 1529 T (*initialFunction)(), 1518 void (CSSToStyleMap::*mapFunction)(Animation*, CSSValue *),1530 void (CSSToStyleMap::*mapFunction)(Animation*, CSSValue&), 1519 1531 AnimationList* (RenderStyle::*animationGetterFunction)(), 1520 1532 const AnimationList* (RenderStyle::*immutableAnimationGetterFunction)() const> … … 1526 1538 static void clear(Animation& animation) { (animation.*clearFunction)(); } 1527 1539 static T initial() { return (*initialFunction)(); } 1528 static void map(StyleResolver* styleResolver, Animation& animation, CSSValue *value) { (styleResolver->styleMap()->*mapFunction)(&animation, value); }1540 static void map(StyleResolver* styleResolver, Animation& animation, CSSValue& value) { (styleResolver->styleMap()->*mapFunction)(&animation, value); } 1529 1541 static AnimationList* accessAnimations(RenderStyle* style) { return (style->*animationGetterFunction)(); } 1530 1542 static const AnimationList* animations(RenderStyle* style) { return (style->*immutableAnimationGetterFunction)(); } … … 1563 1575 AnimationList* list = accessAnimations(styleResolver->style()); 1564 1576 size_t childIndex = 0; 1565 if ( value->isValueList()) {1577 if (is<CSSValueList>(*value)) { 1566 1578 /* Walk each value and put it into an animation, creating new animations as needed. */ 1567 for ( CSSValueListIterator i = value; i.hasMore(); i.advance()) {1579 for (auto& currentValue : downcast<CSSValueList>(*value)) { 1568 1580 if (childIndex <= list->size()) 1569 1581 list->append(Animation::create()); 1570 map(styleResolver, list->animation(childIndex), i.value());1582 map(styleResolver, list->animation(childIndex), currentValue.get()); 1571 1583 ++childIndex; 1572 1584 } … … 1574 1586 if (list->isEmpty()) 1575 1587 list->append(Animation::create()); 1576 map(styleResolver, list->animation(childIndex), value);1588 map(styleResolver, list->animation(childIndex), *value); 1577 1589 childIndex = 1; 1578 1590 } -
trunk/Source/WebCore/css/StyleBuilderConverter.h
r175464 r175487 202 202 { 203 203 TextDecoration result = RenderStyle::initialTextDecoration(); 204 for (CSSValueListIterator it(&value); it.hasMore(); it.advance()) 205 result |= downcast<CSSPrimitiveValue>(*it.value()); 204 if (is<CSSValueList>(value)) { 205 for (auto& currentValue : downcast<CSSValueList>(value)) 206 result |= downcast<CSSPrimitiveValue>(currentValue.get()); 207 } 206 208 return result; 207 209 } … … 243 245 inline PassRefPtr<StyleImage> StyleBuilderConverter::convertBorderImageSource(StyleResolver& styleResolver, CSSValue& value) 244 246 { 245 return styleResolver.styleImage(property, &value);247 return styleResolver.styleImage(property, value); 246 248 } 247 249 -
trunk/Source/WebCore/css/StyleBuilderCustom.h
r175481 r175487 123 123 styleResolver.style()->setShapeOutside(nullptr); 124 124 } if (is<CSSImageValue>(value) || is<CSSImageGeneratorValue>(value) || is<CSSImageSetValue>(value)) { 125 RefPtr<ShapeValue> shape = ShapeValue::createImageValue(styleResolver.styleImage(CSSPropertyWebkitShapeOutside, &value));125 RefPtr<ShapeValue> shape = ShapeValue::createImageValue(styleResolver.styleImage(CSSPropertyWebkitShapeOutside, value)); 126 126 styleResolver.style()->setShapeOutside(shape.release()); 127 127 } else if (is<CSSValueList>(value)) { 128 128 RefPtr<BasicShape> shape; 129 129 CSSBoxType referenceBox = BoxMissing; 130 auto& valueList = downcast<CSSValueList>(value); 131 for (unsigned i = 0; i < valueList.length(); ++i) { 132 CSSPrimitiveValue& primitiveValue = downcast<CSSPrimitiveValue>(*valueList.itemWithoutBoundsCheck(i)); 130 for (auto& currentValue : downcast<CSSValueList>(value)) { 131 CSSPrimitiveValue& primitiveValue = downcast<CSSPrimitiveValue>(currentValue.get()); 133 132 if (primitiveValue.isShape()) 134 133 shape = basicShapeForValue(styleResolver.state().cssToLengthConversionData(), primitiveValue.getShapeValue()); -
trunk/Source/WebCore/css/StyleResolver.cpp
r175454 r175487 1930 1930 } 1931 1931 1932 static bool createGridTrackSize(CSSValue *value, GridTrackSize& trackSize, const StyleResolver::State& state)1933 { 1934 if (is<CSSPrimitiveValue>( *value)) {1935 CSSPrimitiveValue& primitiveValue = downcast<CSSPrimitiveValue>( *value);1932 static bool createGridTrackSize(CSSValue& value, GridTrackSize& trackSize, const StyleResolver::State& state) 1933 { 1934 if (is<CSSPrimitiveValue>(value)) { 1935 CSSPrimitiveValue& primitiveValue = downcast<CSSPrimitiveValue>(value); 1936 1936 GridLength workingLength; 1937 1937 if (!createGridTrackBreadth(&primitiveValue, state, workingLength)) … … 1942 1942 } 1943 1943 1944 CSSFunctionValue& minmaxFunction = downcast<CSSFunctionValue>( *value);1944 CSSFunctionValue& minmaxFunction = downcast<CSSFunctionValue>(value); 1945 1945 CSSValueList* arguments = minmaxFunction.arguments(); 1946 1946 ASSERT_WITH_SECURITY_IMPLICATION(arguments->length() == 2); … … 1962 1962 } 1963 1963 1964 if (! value->isValueList())1964 if (!is<CSSValueList>(*value)) 1965 1965 return false; 1966 1966 1967 1967 size_t currentNamedGridLine = 0; 1968 for (CSSValueListIterator i = value; i.hasMore(); i.advance()) { 1969 CSSValue* currValue = i.value(); 1970 if (is<CSSGridLineNamesValue>(*currValue)) { 1971 CSSGridLineNamesValue& lineNamesValue = downcast<CSSGridLineNamesValue>(*currValue); 1972 for (CSSValueListIterator j = &lineNamesValue; j.hasMore(); j.advance()) { 1973 String namedGridLine = downcast<CSSPrimitiveValue>(j.value())->getStringValue(); 1968 for (auto& currentValue : downcast<CSSValueList>(*value)) { 1969 if (is<CSSGridLineNamesValue>(currentValue.get())) { 1970 for (auto& currentGridLineName : downcast<CSSGridLineNamesValue>(currentValue.get())) { 1971 String namedGridLine = downcast<CSSPrimitiveValue>(currentGridLineName.get()).getStringValue(); 1974 1972 NamedGridLinesMap::AddResult result = namedGridLines.add(namedGridLine, Vector<size_t>()); 1975 1973 result.iterator->value.append(currentNamedGridLine); … … 1982 1980 ++currentNamedGridLine; 1983 1981 GridTrackSize trackSize; 1984 if (!createGridTrackSize(curr Value, trackSize, state))1982 if (!createGridTrackSize(currentValue.get(), trackSize, state)) 1985 1983 return false; 1986 1984 … … 2011 2009 } 2012 2010 2013 CSSValueList& values = downcast<CSSValueList>(*value);2011 auto& values = downcast<CSSValueList>(*value); 2014 2012 ASSERT(values.length()); 2015 2013 … … 2018 2016 String gridLineName; 2019 2017 2020 CSSValueListIterator it = &values;2021 CSSPrimitiveValue* currentValue = downcast<CSSPrimitiveValue>(it.value());2018 auto it = values.begin(); 2019 CSSPrimitiveValue* currentValue = &downcast<CSSPrimitiveValue>(it->get()); 2022 2020 if (currentValue->getValueID() == CSSValueSpan) { 2023 2021 isSpanPosition = true; 2024 it.advance();2025 currentValue = it .hasMore() ? downcast<CSSPrimitiveValue>(it.value()) : nullptr;2022 ++it; 2023 currentValue = it != values.end() ? &downcast<CSSPrimitiveValue>(it->get()) : nullptr; 2026 2024 } 2027 2025 2028 2026 if (currentValue && currentValue->isNumber()) { 2029 2027 gridLineNumber = currentValue->getIntValue(); 2030 it.advance();2031 currentValue = it .hasMore() ? downcast<CSSPrimitiveValue>(it.value()) : nullptr;2028 ++it; 2029 currentValue = it != values.end() ? &downcast<CSSPrimitiveValue>(it->get()) : nullptr; 2032 2030 } 2033 2031 2034 2032 if (currentValue && currentValue->isString()) { 2035 2033 gridLineName = currentValue->getStringValue(); 2036 it.advance();2037 } 2038 2039 ASSERT( !it.hasMore());2034 ++it; 2035 } 2036 2037 ASSERT(it != values.end()); 2040 2038 if (isSpanPosition) 2041 2039 position.setSpanPosition(gridLineNumber ? gridLineNumber : 1, gridLineName); … … 2074 2072 2075 2073 points.hasRepeat = false; 2076 for (CSSValueListIterator it(&value); it.hasMore(); it.advance()) { 2077 auto& itemValue = downcast<CSSPrimitiveValue>(*it.value()); 2078 if (auto* lengthRepeat = itemValue.getLengthRepeatValue()) { 2079 if (auto* interval = lengthRepeat->interval()) { 2080 points.repeatOffset = parseSnapCoordinate(*interval); 2081 points.hasRepeat = true; 2082 break; 2074 if (is<CSSValueList>(value)) { 2075 for (auto& currentValue : downcast<CSSValueList>(value)) { 2076 auto& itemValue = downcast<CSSPrimitiveValue>(currentValue.get()); 2077 if (auto* lengthRepeat = itemValue.getLengthRepeatValue()) { 2078 if (auto* interval = lengthRepeat->interval()) { 2079 points.repeatOffset = parseSnapCoordinate(*interval); 2080 points.hasRepeat = true; 2081 break; 2082 } 2083 2083 } 2084 }2085 points.offsets.append(parseSnapCoordinate(itemValue));2084 points.offsets.append(parseSnapCoordinate(itemValue)); 2085 } 2086 2086 } 2087 2087 … … 2149 2149 } 2150 2150 2151 if (! value->isValueList())2151 if (!is<CSSValueList>(*value)) 2152 2152 return; 2153 2153 2154 2154 bool didSet = false; 2155 for (CSSValueListIterator i = value; i.hasMore(); i.advance()) { 2156 CSSValue* item = i.value(); 2157 if (is<CSSImageGeneratorValue>(*item)) { 2158 if (is<CSSGradientValue>(*item)) 2159 state.style()->setContent(StyleGeneratedImage::create(*downcast<CSSGradientValue>(*item).gradientWithStylesResolved(this)), didSet); 2155 for (auto& item : downcast<CSSValueList>(*value)) { 2156 if (is<CSSImageGeneratorValue>(item.get())) { 2157 if (is<CSSGradientValue>(item.get())) 2158 state.style()->setContent(StyleGeneratedImage::create(*downcast<CSSGradientValue>(item.get()).gradientWithStylesResolved(this)), didSet); 2160 2159 else 2161 state.style()->setContent(StyleGeneratedImage::create(downcast<CSSImageGeneratorValue>( *item)), didSet);2160 state.style()->setContent(StyleGeneratedImage::create(downcast<CSSImageGeneratorValue>(item.get())), didSet); 2162 2161 didSet = true; 2163 2162 #if ENABLE(CSS_IMAGE_SET) 2164 } else if (is<CSSImageSetValue>( *item)) {2165 state.style()->setContent(setOrPendingFromValue(CSSPropertyContent, downcast<CSSImageSetValue>(item )), didSet);2163 } else if (is<CSSImageSetValue>(item.get())) { 2164 state.style()->setContent(setOrPendingFromValue(CSSPropertyContent, downcast<CSSImageSetValue>(item.get())), didSet); 2166 2165 didSet = true; 2167 2166 #endif 2168 2167 } 2169 2168 2170 if (is<CSSImageValue>( *item)) {2171 state.style()->setContent(cachedOrPendingFromValue(CSSPropertyContent, downcast<CSSImageValue>(item )), didSet);2169 if (is<CSSImageValue>(item.get())) { 2170 state.style()->setContent(cachedOrPendingFromValue(CSSPropertyContent, downcast<CSSImageValue>(item.get())), didSet); 2172 2171 didSet = true; 2173 2172 continue; 2174 2173 } 2175 2174 2176 if (!is<CSSPrimitiveValue>( *item))2175 if (!is<CSSPrimitiveValue>(item.get())) 2177 2176 continue; 2178 2177 2179 CSSPrimitiveValue& contentValue = downcast<CSSPrimitiveValue>(*item);2178 auto& contentValue = downcast<CSSPrimitiveValue>(item.get()); 2180 2179 2181 2180 if (contentValue.isString()) { … … 2403 2402 return id == CSSPropertyTextShadow ? state.style()->setTextShadow(nullptr) : state.style()->setBoxShadow(nullptr); 2404 2403 2405 if (! value->isValueList())2406 return; 2407 2408 for (CSSValueListIterator i = value; i.hasMore(); i.advance()) {2409 CSSValue* currValue = i.value();2410 if (!is<CSSShadowValue>( *currValue))2404 if (!is<CSSValueList>(*value)) 2405 return; 2406 2407 bool isFirstEntry = true; 2408 for (auto& currentValue : downcast<CSSValueList>(*value)) { 2409 if (!is<CSSShadowValue>(currentValue.get())) 2411 2410 continue; 2412 CSSShadowValue& item = downcast<CSSShadowValue>(*currValue);2411 auto& item = downcast<CSSShadowValue>(currentValue.get()); 2413 2412 int x = item.x->computeLength<int>(state.cssToLengthConversionData()); 2414 2413 int y = item.y->computeLength<int>(state.cssToLengthConversionData()); … … 2424 2423 auto shadowData = std::make_unique<ShadowData>(IntPoint(x, y), blur, spread, shadowStyle, id == CSSPropertyWebkitBoxShadow, color.isValid() ? color : Color::transparent); 2425 2424 if (id == CSSPropertyTextShadow) 2426 state.style()->setTextShadow(WTF::move(shadowData), i.index()); // add to the list if this is not the first entry2425 state.style()->setTextShadow(WTF::move(shadowData), !isFirstEntry); // add to the list if this is not the first entry 2427 2426 else 2428 state.style()->setBoxShadow(WTF::move(shadowData), i.index()); // add to the list if this is not the first entry 2427 state.style()->setBoxShadow(WTF::move(shadowData), !isFirstEntry); // add to the list if this is not the first entry 2428 2429 isFirstEntry = false; 2429 2430 } 2430 2431 return; … … 2706 2707 HANDLE_INHERIT_AND_INITIAL(gridAutoColumns, GridAutoColumns); 2707 2708 GridTrackSize trackSize; 2708 if (!createGridTrackSize( value, trackSize, state))2709 if (!createGridTrackSize(*value, trackSize, state)) 2709 2710 return; 2710 2711 state.style()->setGridAutoColumns(trackSize); … … 2714 2715 HANDLE_INHERIT_AND_INITIAL(gridAutoRows, GridAutoRows); 2715 2716 GridTrackSize trackSize; 2716 if (!createGridTrackSize( value, trackSize, state))2717 if (!createGridTrackSize(*value, trackSize, state)) 2717 2718 return; 2718 2719 state.style()->setGridAutoRows(trackSize); … … 3214 3215 } 3215 3216 3216 PassRefPtr<StyleImage> StyleResolver::styleImage(CSSPropertyID property, CSSValue *value)3217 { 3218 if (is<CSSImageValue>( *value))3217 PassRefPtr<StyleImage> StyleResolver::styleImage(CSSPropertyID property, CSSValue& value) 3218 { 3219 if (is<CSSImageValue>(value)) 3219 3220 return cachedOrPendingFromValue(property, downcast<CSSImageValue>(value)); 3220 3221 3221 if (is<CSSImageGeneratorValue>( *value)) {3222 if (is<CSSGradientValue>( *value))3223 return generatedOrPendingFromValue(property, *downcast<CSSGradientValue>( *value).gradientWithStylesResolved(this));3224 return generatedOrPendingFromValue(property, downcast<CSSImageGeneratorValue>( *value));3222 if (is<CSSImageGeneratorValue>(value)) { 3223 if (is<CSSGradientValue>(value)) 3224 return generatedOrPendingFromValue(property, *downcast<CSSGradientValue>(value).gradientWithStylesResolved(this)); 3225 return generatedOrPendingFromValue(property, downcast<CSSImageGeneratorValue>(value)); 3225 3226 } 3226 3227 3227 3228 #if ENABLE(CSS_IMAGE_SET) 3228 if (is<CSSImageSetValue>( *value))3229 if (is<CSSImageSetValue>(value)) 3229 3230 return setOrPendingFromValue(property, downcast<CSSImageSetValue>(value)); 3230 3231 #endif 3231 3232 3232 if (is<CSSCursorImageValue>( *value))3233 if (is<CSSCursorImageValue>(value)) 3233 3234 return cursorOrPendingFromValue(property, downcast<CSSCursorImageValue>(value)); 3234 3235 … … 3236 3237 } 3237 3238 3238 PassRefPtr<StyleImage> StyleResolver::cachedOrPendingFromValue(CSSPropertyID property, CSSImageValue *value)3239 { 3240 RefPtr<StyleImage> image = value ->cachedOrPendingImage();3239 PassRefPtr<StyleImage> StyleResolver::cachedOrPendingFromValue(CSSPropertyID property, CSSImageValue& value) 3240 { 3241 RefPtr<StyleImage> image = value.cachedOrPendingImage(); 3241 3242 if (image && image->isPendingImage()) 3242 m_state.pendingImageProperties().set(property, value);3243 m_state.pendingImageProperties().set(property, &value); 3243 3244 return image.release(); 3244 3245 } … … 3259 3260 3260 3261 #if ENABLE(CSS_IMAGE_SET) 3261 PassRefPtr<StyleImage> StyleResolver::setOrPendingFromValue(CSSPropertyID property, CSSImageSetValue *value)3262 { 3263 RefPtr<StyleImage> image = value ->cachedOrPendingImageSet(document());3262 PassRefPtr<StyleImage> StyleResolver::setOrPendingFromValue(CSSPropertyID property, CSSImageSetValue& value) 3263 { 3264 RefPtr<StyleImage> image = value.cachedOrPendingImageSet(document()); 3264 3265 if (image && image->isPendingImage()) 3265 m_state.pendingImageProperties().set(property, value);3266 m_state.pendingImageProperties().set(property, &value); 3266 3267 return image.release(); 3267 3268 } 3268 3269 #endif 3269 3270 3270 PassRefPtr<StyleImage> StyleResolver::cursorOrPendingFromValue(CSSPropertyID property, CSSCursorImageValue *value)3271 { 3272 RefPtr<StyleImage> image = value ->cachedOrPendingImage(document());3271 PassRefPtr<StyleImage> StyleResolver::cursorOrPendingFromValue(CSSPropertyID property, CSSCursorImageValue& value) 3272 { 3273 RefPtr<StyleImage> image = value.cachedOrPendingImage(document()); 3273 3274 if (image && image->isPendingImage()) 3274 m_state.pendingImageProperties().set(property, value);3275 m_state.pendingImageProperties().set(property, &value); 3275 3276 return image.release(); 3276 3277 } … … 3519 3520 } 3520 3521 3521 if (!i nValue->isValueList())3522 if (!is<CSSValueList>(*inValue)) 3522 3523 return false; 3523 3524 3524 3525 FilterOperations operations; 3525 for (CSSValueListIterator i = inValue; i.hasMore(); i.advance()) { 3526 CSSValue* currValue = i.value(); 3527 if (!is<WebKitCSSFilterValue>(*currValue)) 3526 for (auto& currentValue : downcast<CSSValueList>(*inValue)) { 3527 if (!is<WebKitCSSFilterValue>(currentValue.get())) 3528 3528 continue; 3529 3529 3530 WebKitCSSFilterValue& filterValue = downcast<WebKitCSSFilterValue>(*i.value());3530 auto& filterValue = downcast<WebKitCSSFilterValue>(currentValue.get()); 3531 3531 FilterOperation::OperationType operationType = filterOperationForType(filterValue.operationType()); 3532 3532 -
trunk/Source/WebCore/css/StyleResolver.h
r174648 r175487 448 448 static RenderStyle* styleNotYetAvailable() { return s_styleNotYetAvailable; } 449 449 450 PassRefPtr<StyleImage> styleImage(CSSPropertyID, CSSValue *);451 PassRefPtr<StyleImage> cachedOrPendingFromValue(CSSPropertyID, CSSImageValue *);450 PassRefPtr<StyleImage> styleImage(CSSPropertyID, CSSValue&); 451 PassRefPtr<StyleImage> cachedOrPendingFromValue(CSSPropertyID, CSSImageValue&); 452 452 PassRefPtr<StyleImage> generatedOrPendingFromValue(CSSPropertyID, CSSImageGeneratorValue&); 453 453 #if ENABLE(CSS_IMAGE_SET) 454 PassRefPtr<StyleImage> setOrPendingFromValue(CSSPropertyID, CSSImageSetValue *);454 PassRefPtr<StyleImage> setOrPendingFromValue(CSSPropertyID, CSSImageSetValue&); 455 455 #endif 456 PassRefPtr<StyleImage> cursorOrPendingFromValue(CSSPropertyID, CSSCursorImageValue *);456 PassRefPtr<StyleImage> cursorOrPendingFromValue(CSSPropertyID, CSSCursorImageValue&); 457 457 458 458 bool applyPropertyToRegularStyle() const { return m_state.applyPropertyToRegularStyle(); } -
trunk/Source/WebCore/css/TransformFunctions.cpp
r175454 r175487 84 84 bool transformsForValue(CSSValue& value, const CSSToLengthConversionData& conversionData, TransformOperations& outOperations) 85 85 { 86 if (! value.isValueList()) {86 if (!is<CSSValueList>(value)) { 87 87 outOperations.clear(); 88 88 return false; … … 90 90 91 91 TransformOperations operations; 92 for (CSSValueListIterator i = &value; i.hasMore(); i.advance()) { 93 CSSValue& currValue = *i.value(); 94 95 if (!is<WebKitCSSTransformValue>(currValue)) 92 for (auto& currentValue : downcast<CSSValueList>(value)) { 93 if (!is<WebKitCSSTransformValue>(currentValue.get())) 96 94 continue; 97 95 98 WebKitCSSTransformValue& transformValue = downcast<WebKitCSSTransformValue>(currValue);96 auto& transformValue = downcast<WebKitCSSTransformValue>(currentValue.get()); 99 97 if (!transformValue.length()) 100 98 continue;
Note: See TracChangeset
for help on using the changeset viewer.