Changeset 156379 in webkit
- Timestamp:
- Sep 24, 2013 6:17:53 PM (11 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r156377 r156379 1 2013-09-24 Gyuyoung Kim <gyuyoung.kim@samsung.com> 2 3 Add toWebKitCSS*Value functions to cast from CSSValue 4 https://bugs.webkit.org/show_bug.cgi?id=121776 5 6 Reviewed by Darin Adler. 7 8 CSS_VALUE_TYPE_CASTS can't cover WebKitCSS*Value classes. So, this patch adds toWebKitCSS*Value manually. 9 10 No new tests, no behavior change. 11 12 * css/CSSValue.cpp: 13 (WebCore::CSSValue::destroy): 14 * css/StyleResolver.cpp: 15 (WebCore::StyleResolver::createCustomFilterOperationWithInlineSyntax): 16 (WebCore::StyleResolver::createFilterOperations): 17 * css/TransformFunctions.cpp: 18 (WebCore::transformsForValue): 19 * css/WebKitCSSArrayFunctionValue.h: 20 (WebCore::toWebKitCSSArrayFunctionValue): 21 * css/WebKitCSSFilterValue.h: 22 (WebCore::toWebKitCSSFilterValue): 23 * css/WebKitCSSMatFunctionValue.h: 24 (WebCore::toWebKitCSSMatFunctionValue): 25 * css/WebKitCSSMixFunctionValue.h: 26 (WebCore::toWebKitCSSMixFunctionValue): 27 * css/WebKitCSSSVGDocumentValue.h: 28 (WebCore::toWebKitCSSSVGDocumentValue): 29 * css/WebKitCSSShaderValue.h: 30 (WebCore::toWebKitCSSShaderValue): 31 * css/WebKitCSSTransformValue.h: 32 (WebCore::toWebKitCSSTransformValue): 33 1 34 2013-09-24 Antti Koivisto <antti@apple.com> 2 35 -
trunk/Source/WebCore/css/CSSValue.cpp
r156313 r156379 447 447 return; 448 448 case WebKitCSSTransformClass: 449 delete static_cast<WebKitCSSTransformValue*>(this);449 delete toWebKitCSSTransformValue(this); 450 450 return; 451 451 case LineBoxContainClass: … … 465 465 return; 466 466 case WebKitCSSFilterClass: 467 delete static_cast<WebKitCSSFilterValue*>(this);467 delete toWebKitCSSFilterValue(this); 468 468 return; 469 469 #if ENABLE(CSS_SHADERS) 470 470 case WebKitCSSArrayFunctionValueClass: 471 delete static_cast<WebKitCSSArrayFunctionValue*>(this);471 delete toWebKitCSSArrayFunctionValue(this); 472 472 return; 473 473 case WebKitCSSMatFunctionValueClass: 474 delete static_cast<WebKitCSSMatFunctionValue*>(this);474 delete toWebKitCSSMatFunctionValue(this); 475 475 return; 476 476 case WebKitCSSMixFunctionValueClass: 477 delete static_cast<WebKitCSSMixFunctionValue*>(this);477 delete toWebKitCSSMixFunctionValue(this); 478 478 return; 479 479 case WebKitCSSShaderClass: … … 495 495 return; 496 496 case WebKitCSSSVGDocumentClass: 497 delete static_cast<WebKitCSSSVGDocumentValue*>(this);497 delete toWebKitCSSSVGDocumentValue(this); 498 498 return; 499 499 #endif -
trunk/Source/WebCore/css/StyleResolver.cpp
r156347 r156379 3632 3632 CSSValue* fragmentShaderOrMixFunction = shadersList->itemWithoutBoundsCheck(1); 3633 3633 if (fragmentShaderOrMixFunction->isWebKitCSSMixFunctionValue()) { 3634 WebKitCSSMixFunctionValue* mixFunction = static_cast<WebKitCSSMixFunctionValue*>(fragmentShaderOrMixFunction);3634 WebKitCSSMixFunctionValue* mixFunction = toWebKitCSSMixFunctionValue(fragmentShaderOrMixFunction); 3635 3635 CSSValueListIterator iterator(mixFunction); 3636 3636 … … 3753 3753 continue; 3754 3754 3755 WebKitCSSFilterValue* filterValue = static_cast<WebKitCSSFilterValue*>(i.value());3755 WebKitCSSFilterValue* filterValue = toWebKitCSSFilterValue(i.value()); 3756 3756 FilterOperation::OperationType operationType = filterOperationForType(filterValue->operationType()); 3757 3757 … … 3780 3780 continue; 3781 3781 3782 WebKitCSSSVGDocumentValue* svgDocumentValue = static_cast<WebKitCSSSVGDocumentValue*>(argument);3782 WebKitCSSSVGDocumentValue* svgDocumentValue = toWebKitCSSSVGDocumentValue(argument); 3783 3783 KURL url = m_state.document().completeURL(svgDocumentValue->url()); 3784 3784 -
trunk/Source/WebCore/css/TransformFunctions.cpp
r156260 r156379 97 97 continue; 98 98 99 WebKitCSSTransformValue* transformValue = static_cast<WebKitCSSTransformValue*>(i.value());99 WebKitCSSTransformValue* transformValue = toWebKitCSSTransformValue(i.value()); 100 100 if (!transformValue->length()) 101 101 continue; -
trunk/Source/WebCore/css/WebKitCSSArrayFunctionValue.h
r155060 r156379 56 56 }; 57 57 58 inline WebKitCSSArrayFunctionValue* toWebKitCSSArrayFunctionValue(CSSValue* value) 59 { 60 ASSERT_WITH_SECURITY_IMPLICATION(!value || value->isWebKitCSSArrayFunctionValue()); 61 return static_cast<WebKitCSSArrayFunctionValue*>(value); 62 } 63 58 64 } // namespace WebCore 59 65 -
trunk/Source/WebCore/css/WebKitCSSFilterValue.h
r155060 r156379 78 78 }; 79 79 80 inline WebKitCSSFilterValue* toWebKitCSSFilterValue(CSSValue* value) 81 { 82 ASSERT_WITH_SECURITY_IMPLICATION(!value || value->isWebKitCSSFilterValue()); 83 return static_cast<WebKitCSSFilterValue*>(value); 84 } 85 80 86 } 81 87 -
trunk/Source/WebCore/css/WebKitCSSMatFunctionValue.h
r155060 r156379 56 56 }; 57 57 58 inline WebKitCSSMatFunctionValue* toWebKitCSSMatFunctionValue(CSSValue* value) 59 { 60 ASSERT_WITH_SECURITY_IMPLICATION(!value || value->isWebKitCSSMatFunctionValue()); 61 return static_cast<WebKitCSSMatFunctionValue*>(value); 62 } 63 58 64 } // namespace WebCore 59 65 -
trunk/Source/WebCore/css/WebKitCSSMixFunctionValue.h
r155060 r156379 55 55 WebKitCSSMixFunctionValue(const WebKitCSSMixFunctionValue& cloneFrom); 56 56 }; 57 58 inline WebKitCSSMixFunctionValue* toWebKitCSSMixFunctionValue(CSSValue* value) 59 { 60 ASSERT_WITH_SECURITY_IMPLICATION(!value || value->isWebKitCSSMixFunctionValue()); 61 return static_cast<WebKitCSSMixFunctionValue*>(value); 62 } 57 63 58 64 } // namespace WebCore -
trunk/Source/WebCore/css/WebKitCSSSVGDocumentValue.h
r155060 r156379 55 55 }; 56 56 57 inline WebKitCSSSVGDocumentValue* toWebKitCSSSVGDocumentValue(CSSValue* value) 58 { 59 ASSERT_WITH_SECURITY_IMPLICATION(!value || value->isWebKitCSSSVGDocumentValue()); 60 return static_cast<WebKitCSSSVGDocumentValue*>(value); 61 } 62 57 63 } // namespace WebCore 58 64 -
trunk/Source/WebCore/css/WebKitCSSShaderValue.h
r155060 r156379 72 72 inline WebKitCSSShaderValue* toWebKitCSSShaderValue(CSSValue* value) 73 73 { 74 ASSERT_WITH_SECURITY_IMPLICATION(!value || value->isWebKitCSSShaderValue()); 74 75 return value->isWebKitCSSShaderValue() ? static_cast<WebKitCSSShaderValue*>(value) : 0; 75 76 } -
trunk/Source/WebCore/css/WebKitCSSTransformValue.h
r155060 r156379 83 83 }; 84 84 85 inline WebKitCSSTransformValue* toWebKitCSSTransformValue(CSSValue* value) 86 { 87 ASSERT_WITH_SECURITY_IMPLICATION(!value || value->isWebKitCSSTransformValue()); 88 return static_cast<WebKitCSSTransformValue*>(value); 89 } 90 85 91 } 86 92
Note: See TracChangeset
for help on using the changeset viewer.