Changeset 176524 in webkit
- Timestamp:
- Nov 24, 2014, 2:12:53 PM (12 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 4 edited
-
ChangeLog (modified) (1 diff)
-
css/CSSPropertyNames.in (modified) (1 diff)
-
css/StyleBuilderConverter.h (modified) (3 diffs)
-
css/StyleResolver.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r176521 r176524 1 2014-11-22 Sam Weinig <sam@webkit.org> 2 3 Move the '-webkit-box-reflext' CSS property to the new StyleBuilder 4 https://bugs.webkit.org/show_bug.cgi?id=139008 5 6 Reviewed by Anders Carlsson. 7 8 * css/CSSPropertyNames.in: 9 * css/StyleBuilderConverter.h: 10 (WebCore::StyleBuilderConverter::convertReflection): 11 * css/StyleResolver.cpp: 12 (WebCore::StyleResolver::applyProperty): 13 1 14 2014-11-24 Antti Koivisto <antti@apple.com> 2 15 -
trunk/Source/WebCore/css/CSSPropertyNames.in
r176491 r176524 323 323 -webkit-box-orient 324 324 -webkit-box-pack 325 -webkit-box-reflect [ LegacyStyleBuilder]325 -webkit-box-reflect [Converter=Reflection] 326 326 // -webkit-box-shadow differs from box-shadow in its treatement of blur radii > 8px. 327 327 // Let -webkit-box-shadow blur radius be w_r and box-shadow blur radius be b_r. For -
trunk/Source/WebCore/css/StyleBuilderConverter.h
r176455 r176524 31 31 #include "CSSCalculationValue.h" 32 32 #include "CSSPrimitiveValue.h" 33 #include "CSSReflectValue.h" 33 34 #include "Length.h" 34 35 #include "Pair.h" … … 69 70 static PassRefPtr<QuotesData> convertQuotes(StyleResolver&, CSSValue&); 70 71 static TextUnderlinePosition convertTextUnderlinePosition(StyleResolver&, CSSValue&); 72 static PassRefPtr<StyleReflection> convertReflection(StyleResolver&, CSSValue&); 71 73 72 74 private: … … 470 472 } 471 473 474 inline PassRefPtr<StyleReflection> StyleBuilderConverter::convertReflection(StyleResolver& styleResolver, CSSValue& value) 475 { 476 if (is<CSSPrimitiveValue>(value)) { 477 ASSERT(downcast<CSSPrimitiveValue>(value).getValueID() == CSSValueNone); 478 return nullptr; 479 } 480 481 CSSReflectValue& reflectValue = downcast<CSSReflectValue>(value); 482 483 RefPtr<StyleReflection> reflection = StyleReflection::create(); 484 reflection->setDirection(*reflectValue.direction()); 485 486 if (reflectValue.offset()) 487 reflection->setOffset(reflectValue.offset()->convertToLength<FixedIntegerConversion | PercentConversion | CalculatedConversion>(styleResolver.state().cssToLengthConversionData())); 488 489 NinePieceImage mask; 490 mask.setMaskDefaults(); 491 styleResolver.styleMap()->mapNinePieceImage(CSSPropertyWebkitBoxReflect, reflectValue.mask(), mask); 492 reflection->setMask(mask); 493 494 return reflection.release(); 495 } 496 472 497 } // namespace WebCore 473 498 -
trunk/Source/WebCore/css/StyleResolver.cpp
r176459 r176524 2412 2412 return; 2413 2413 } 2414 case CSSPropertyWebkitBoxReflect: {2415 HANDLE_INHERIT_AND_INITIAL(boxReflect, BoxReflect)2416 if (primitiveValue) {2417 state.style()->setBoxReflect(RenderStyle::initialBoxReflect());2418 return;2419 }2420 2421 if (!is<CSSReflectValue>(*value))2422 return;2423 2424 CSSReflectValue& reflectValue = downcast<CSSReflectValue>(*value);2425 RefPtr<StyleReflection> reflection = StyleReflection::create();2426 reflection->setDirection(*reflectValue.direction());2427 if (reflectValue.offset())2428 reflection->setOffset(reflectValue.offset()->convertToLength<FixedIntegerConversion | PercentConversion | CalculatedConversion>(state.cssToLengthConversionData()));2429 NinePieceImage mask;2430 mask.setMaskDefaults();2431 m_styleMap.mapNinePieceImage(id, reflectValue.mask(), mask);2432 reflection->setMask(mask);2433 2434 state.style()->setBoxReflect(reflection.release());2435 return;2436 }2437 2414 case CSSPropertySrc: // Only used in @font-face rules. 2438 2415 return; … … 3082 3059 case CSSPropertyWebkitBoxOrient: 3083 3060 case CSSPropertyWebkitBoxPack: 3061 case CSSPropertyWebkitBoxReflect: 3084 3062 case CSSPropertyWebkitColorCorrection: 3085 3063 case CSSPropertyWebkitColumnAxis:
Note:
See TracChangeset
for help on using the changeset viewer.