当前位置: 首页>>代码示例>>C++>>正文


C++ ConversionCheckers类代码示例

本文整理汇总了C++中ConversionCheckers的典型用法代码示例。如果您正苦于以下问题:C++ ConversionCheckers类的具体用法?C++ ConversionCheckers怎么用?C++ ConversionCheckers使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了ConversionCheckers类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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();
}
开发者ID:howardroark2018,项目名称:chromium,代码行数:9,代码来源:CSSImageListInterpolationType.cpp

示例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));
}
开发者ID:endlessm,项目名称:chromium-browser,代码行数:12,代码来源:CSSPaintInterpolationType.cpp

示例3: maybeConvertSingle

InterpolationValue CSSInterpolationType::maybeConvertSingle(
    const PropertySpecificKeyframe& keyframe,
    const InterpolationEnvironment& environment,
    const InterpolationValue& underlying,
    ConversionCheckers& conversionCheckers) const {
  const CSSValue* value = toCSSPropertySpecificKeyframe(keyframe).value();

  if (!value)
    return maybeConvertNeutral(underlying, conversionCheckers);

  if (value->isVariableReferenceValue() ||
      value->isPendingSubstitutionValue()) {
    bool omitAnimationTainted = false;
    const CSSValue* resolvedValue =
        CSSVariableResolver::resolveVariableReferences(
            environment.state(), cssProperty(), *value, omitAnimationTainted);
    conversionCheckers.push_back(
        ResolvedVariableChecker::create(cssProperty(), value, resolvedValue));
    value = resolvedValue;
  }

  if (value->isInitialValue() ||
      (value->isUnsetValue() &&
       !CSSPropertyMetadata::isInheritedProperty(cssProperty())))
    return maybeConvertInitial(environment.state(), conversionCheckers);

  if (value->isInheritedValue() ||
      (value->isUnsetValue() &&
       CSSPropertyMetadata::isInheritedProperty(cssProperty())))
    return maybeConvertInherit(environment.state(), conversionCheckers);

  return maybeConvertValue(*value, environment.state(), conversionCheckers);
}
开发者ID:,项目名称:,代码行数:33,代码来源:

示例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);
}
开发者ID:aobzhirov,项目名称:ChromiumGStreamerBackend,代码行数:7,代码来源:CSSBasicShapeInterpolationType.cpp

示例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());
}
开发者ID:ollie314,项目名称:chromium,代码行数:7,代码来源:CSSScaleInterpolationType.cpp

示例6: 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());
}
开发者ID:aobzhirov,项目名称:ChromiumGStreamerBackend,代码行数:7,代码来源:CSSBasicShapeInterpolationType.cpp

示例7: 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));
}
开发者ID:ollie314,项目名称:chromium,代码行数:33,代码来源:CSSTransformInterpolationType.cpp

示例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());
}
开发者ID:aobzhirov,项目名称:ChromiumGStreamerBackend,代码行数:8,代码来源:CSSClipInterpolationType.cpp

示例9: 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());
}
开发者ID:shaoboyan,项目名称:chromium-crosswalk,代码行数:8,代码来源:CSSShadowListInterpolationType.cpp

示例10: addConversionCheckers

void InvalidatableInterpolation::addConversionCheckers(
    const InterpolationType& type,
    ConversionCheckers& conversionCheckers) const {
  for (size_t i = 0; i < conversionCheckers.size(); i++) {
    conversionCheckers[i]->setType(type);
    m_conversionCheckers.append(std::move(conversionCheckers[i]));
  }
}
开发者ID:mirror,项目名称:chromium,代码行数:8,代码来源:InvalidatableInterpolation.cpp

示例11: maybeConvertInherit

InterpolationValue CSSRotateInterpolationType::maybeConvertInherit(
    const StyleResolverState& state,
    ConversionCheckers& conversionCheckers) const {
  Rotation inheritedRotation = getRotation(*state.parentStyle());
  conversionCheckers.push_back(
      InheritedRotationChecker::create(inheritedRotation));
  return convertRotation(inheritedRotation);
}
开发者ID:,项目名称:,代码行数:8,代码来源:

示例12: maybeConvertInherit

InterpolationValue CSSTransformInterpolationType::maybeConvertInherit(
    const StyleResolverState& state,
    ConversionCheckers& conversionCheckers) const {
  const TransformOperations& inheritedTransform =
      state.parentStyle()->transform();
  conversionCheckers.append(
      InheritedTransformChecker::create(inheritedTransform));
  return convertTransform(inheritedTransform);
}
开发者ID:ollie314,项目名称:chromium,代码行数:9,代码来源:CSSTransformInterpolationType.cpp

示例13: create

PassOwnPtr<InterpolationValue> SVGPathInterpolationType::maybeConvertNeutral(const UnderlyingValue& underlyingValue, ConversionCheckers& conversionCheckers) const
{
    conversionCheckers.append(UnderlyingPathSegTypesChecker::create(*this, underlyingValue));
    OwnPtr<InterpolableList> result = InterpolableList::create(PathComponentIndexCount);
    result->set(PathArgsIndex, toInterpolableList(underlyingValue->interpolableValue()).get(PathArgsIndex)->cloneAndZero());
    result->set(PathNeutralIndex, InterpolableNumber::create(1));
    return InterpolationValue::create(*this, result.release(),
        const_cast<NonInterpolableValue*>(underlyingValue->nonInterpolableValue())); // Take ref.
}
开发者ID:howardroark2018,项目名称:chromium,代码行数:9,代码来源:SVGPathInterpolationType.cpp

示例14: maybeConvertInherit

InterpolationValue CSSColorInterpolationType::maybeConvertInherit(const StyleResolverState& state, ConversionCheckers& conversionCheckers) const
{
    if (!state.parentStyle())
        return nullptr;
    // Visited color can never explicitly inherit from parent visited color so only use the unvisited color.
    const StyleColor inheritedColor = ColorPropertyFunctions::getUnvisitedColor(cssProperty(), *state.parentStyle());
    conversionCheckers.append(ParentColorChecker::create(cssProperty(), inheritedColor));
    return convertStyleColorPair(inheritedColor, inheritedColor);
}
开发者ID:endlessm,项目名称:chromium-browser,代码行数:9,代码来源:CSSColorInterpolationType.cpp

示例15: maybeConvertInherit

InterpolationValue CSSLengthListInterpolationType::maybeConvertInherit(const StyleResolverState& state, ConversionCheckers& conversionCheckers) const
{
    Vector<Length> inheritedLengthList;
    bool success = LengthListPropertyFunctions::getLengthList(cssProperty(), *state.parentStyle(), inheritedLengthList);
    conversionCheckers.append(ParentLengthListChecker::create(cssProperty(), inheritedLengthList));
    if (!success)
        return nullptr;
    return maybeConvertLengthList(inheritedLengthList, state.parentStyle()->effectiveZoom());
}
开发者ID:aobzhirov,项目名称:ChromiumGStreamerBackend,代码行数:9,代码来源:CSSLengthListInterpolationType.cpp


注:本文中的ConversionCheckers类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。