本文整理汇总了C++中ConversionCheckers::append方法的典型用法代码示例。如果您正苦于以下问题:C++ ConversionCheckers::append方法的具体用法?C++ ConversionCheckers::append怎么用?C++ ConversionCheckers::append使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ConversionCheckers
的用法示例。
在下文中一共展示了ConversionCheckers::append方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
PassOwnPtr<InterpolationValue> CSSImageListInterpolationType::maybeConvertNeutral(const UnderlyingValue& underlyingValue, ConversionCheckers& conversionCheckers) const
{
if (!underlyingValue) {
conversionCheckers.append(UnderlyingImageListChecker::create(*this, nullptr));
return nullptr;
}
conversionCheckers.append(UnderlyingImageListChecker::create(*this, underlyingValue->clone()));
return underlyingValue->clone();
}
示例2: maybeConvertInherit
InterpolationValue CSSPaintInterpolationType::maybeConvertInherit(const StyleResolverState& state, ConversionCheckers& conversionCheckers) const
{
if (!state.parentStyle())
return nullptr;
StyleColor parentColor;
if (!PaintPropertyFunctions::getColor(cssProperty(), *state.parentStyle(), parentColor)) {
conversionCheckers.append(ParentPaintChecker::create(cssProperty()));
return nullptr;
}
conversionCheckers.append(ParentPaintChecker::create(cssProperty(), parentColor));
return InterpolationValue(CSSColorInterpolationType::createInterpolableColor(parentColor));
}
示例3: maybeConvertInherit
InterpolationValue CSSBasicShapeInterpolationType::maybeConvertInherit(const StyleResolverState& state, ConversionCheckers& conversionCheckers) const
{
const BasicShape* shape = BasicShapePropertyFunctions::getBasicShape(cssProperty(), *state.parentStyle());
// const_cast to take a ref.
conversionCheckers.append(InheritedShapeChecker::create(cssProperty(), const_cast<BasicShape*>(shape)));
return BasicShapeInterpolationFunctions::maybeConvertBasicShape(shape, state.parentStyle()->effectiveZoom());
}
示例4: maybeConvertNeutral
InterpolationValue CSSBasicShapeInterpolationType::maybeConvertNeutral(const InterpolationValue& underlying, ConversionCheckers& conversionCheckers) const
{
// const_cast is for taking refs.
NonInterpolableValue* nonInterpolableValue = const_cast<NonInterpolableValue*>(underlying.nonInterpolableValue.get());
conversionCheckers.append(UnderlyingCompatibilityChecker::create(nonInterpolableValue));
return InterpolationValue(BasicShapeInterpolationFunctions::createNeutralValue(*underlying.nonInterpolableValue), nonInterpolableValue);
}
示例5: maybeConvertInherit
InterpolationValue CSSScaleInterpolationType::maybeConvertInherit(
const StyleResolverState& state,
ConversionCheckers& conversionCheckers) const {
Scale parentScale(state.parentStyle()->scale());
conversionCheckers.append(ParentScaleChecker::create(parentScale));
return InterpolationValue(parentScale.createInterpolableValue());
}
示例6: maybeConvertValue
InterpolationValue CSSTransformInterpolationType::maybeConvertValue(
const CSSValue& value,
const StyleResolverState& state,
ConversionCheckers& conversionCheckers) const {
if (value.isValueList()) {
CSSLengthArray lengthArray;
for (const CSSValue* item : toCSSValueList(value)) {
const CSSFunctionValue& transformFunction = toCSSFunctionValue(*item);
if (transformFunction.functionType() == CSSValueMatrix ||
transformFunction.functionType() == CSSValueMatrix3d) {
lengthArray.typeFlags.set(CSSPrimitiveValue::UnitTypePixels);
continue;
}
for (const CSSValue* argument : transformFunction) {
const CSSPrimitiveValue& primitiveValue =
toCSSPrimitiveValue(*argument);
if (!primitiveValue.isLength())
continue;
primitiveValue.accumulateLengthArray(lengthArray);
}
}
std::unique_ptr<InterpolationType::ConversionChecker> lengthUnitsChecker =
LengthUnitsChecker::maybeCreate(std::move(lengthArray), state);
if (lengthUnitsChecker)
conversionCheckers.append(std::move(lengthUnitsChecker));
}
TransformOperations transform;
TransformBuilder::createTransformOperations(
value, state.cssToLengthConversionData(), transform);
return convertTransform(std::move(transform));
}
示例7: convertShadowList
PassOwnPtr<InterpolationValue> CSSShadowListInterpolationType::maybeConvertInherit(const StyleResolverState& state, ConversionCheckers& conversionCheckers) const
{
if (!state.parentStyle())
return nullptr;
const ShadowList* parentShadowList = ShadowListPropertyFunctions::getShadowList(cssProperty(), *state.parentStyle());
conversionCheckers.append(ParentShadowListChecker::create(*this, cssProperty(), const_cast<ShadowList*>(parentShadowList))); // Take ref.
return convertShadowList(parentShadowList, state.parentStyle()->effectiveZoom());
}
示例8: maybeConvertInherit
InterpolationValue CSSClipInterpolationType::maybeConvertInherit(const StyleResolverState& state, ConversionCheckers& conversionCheckers) const
{
ClipAutos parentAutos = getClipAutos(*state.parentStyle());
conversionCheckers.append(ParentAutosChecker::create(parentAutos));
if (parentAutos.isAuto)
return nullptr;
return createClipValue(state.parentStyle()->clip(), state.parentStyle()->effectiveZoom());
}