Esempio n. 1
0
RefPtr<CSSValue> CSSValue::cloneForCSSOM() const
{
    switch (classType()) {
    case PrimitiveClass:
        return downcast<CSSPrimitiveValue>(*this).cloneForCSSOM();
    case ValueListClass:
        return downcast<CSSValueList>(*this).cloneForCSSOM();
    case ImageClass:
    case CursorImageClass:
        return downcast<CSSImageValue>(*this).cloneForCSSOM();
    case WebKitCSSFilterClass:
        return downcast<WebKitCSSFilterValue>(*this).cloneForCSSOM();
    case WebKitCSSTransformClass:
        return downcast<WebKitCSSTransformValue>(*this).cloneForCSSOM();
    case ImageSetClass:
        return downcast<CSSImageSetValue>(*this).cloneForCSSOM();
    case SVGColorClass:
        return downcast<SVGColor>(*this).cloneForCSSOM();
    case SVGPaintClass:
        return downcast<SVGPaint>(*this).cloneForCSSOM();
    default:
        ASSERT(!isSubtypeExposedToCSSOM());
        return TextCloneCSSValue::create(classType(), cssText());
    }
}
Esempio n. 2
0
PassRefPtr<CSSValue> CSSValue::cloneForCSSOM() const
{
    switch (classType()) {
    case PrimitiveClass:
        return toCSSPrimitiveValue(this)->cloneForCSSOM();
    case ValueListClass:
        return toCSSValueList(this)->cloneForCSSOM();
    case ImageClass:
    case CursorImageClass:
        return toCSSImageValue(this)->cloneForCSSOM();
#if ENABLE(CSS_FILTERS)
    case WebKitCSSFilterClass:
        return toWebKitCSSFilterValue(this)->cloneForCSSOM();
#endif
    case WebKitCSSTransformClass:
        return toWebKitCSSTransformValue(this)->cloneForCSSOM();
#if ENABLE(CSS_IMAGE_SET)
    case ImageSetClass:
        return toCSSImageSetValue(this)->cloneForCSSOM();
#endif
    case SVGColorClass:
        return toSVGColor(this)->cloneForCSSOM();
    case SVGPaintClass:
        return toSVGPaint(this)->cloneForCSSOM();
    default:
        ASSERT(!isSubtypeExposedToCSSOM());
        return TextCloneCSSValue::create(classType(), cssText());
    }
}
Esempio n. 3
0
PassRefPtr<CSSValue> CSSValue::cloneForCSSOM() const
{
    switch (classType()) {
    case PrimitiveClass:
        return static_cast<const CSSPrimitiveValue*>(this)->cloneForCSSOM();
    case ValueListClass:
        return static_cast<const CSSValueList*>(this)->cloneForCSSOM();
    case ImageClass:
    case CursorImageClass:
        return static_cast<const CSSImageValue*>(this)->cloneForCSSOM();
#if ENABLE(CSS_FILTERS)
    case WebKitCSSFilterClass:
        return static_cast<const WebKitCSSFilterValue*>(this)->cloneForCSSOM();
#if ENABLE(CSS_SHADERS)
    case WebKitCSSMixFunctionValueClass:
        return static_cast<const WebKitCSSMixFunctionValue*>(this)->cloneForCSSOM();
#endif
#endif
    case WebKitCSSTransformClass:
        return static_cast<const WebKitCSSTransformValue*>(this)->cloneForCSSOM();
#if ENABLE(CSS_IMAGE_SET)
    case ImageSetClass:
        return static_cast<const CSSImageSetValue*>(this)->cloneForCSSOM();
#endif
#if ENABLE(SVG)
    case SVGColorClass:
        return static_cast<const SVGColor*>(this)->cloneForCSSOM();
    case SVGPaintClass:
        return static_cast<const SVGPaint*>(this)->cloneForCSSOM();
#endif
    default:
        ASSERT(!isSubtypeExposedToCSSOM());
        return TextCloneCSSValue::create(classType(), cssText());
    }
}
Esempio n. 4
0
void CSSValue::addSubresourceStyleURLs(ListHashSet<KURL>& urls, const CSSStyleSheet* styleSheet)
{
    if (isPrimitiveValue())
        static_cast<CSSPrimitiveValue*>(this)->addSubresourceStyleURLs(urls, styleSheet);
    else if (isValueList())
        static_cast<CSSValueList*>(this)->addSubresourceStyleURLs(urls, styleSheet);
    else if (classType() == FontFaceSrcClass)
        static_cast<CSSFontFaceSrcValue*>(this)->addSubresourceStyleURLs(urls, styleSheet);
    else if (classType() == ReflectClass)
        static_cast<CSSReflectValue*>(this)->addSubresourceStyleURLs(urls, styleSheet);
}
Esempio n. 5
0
void CSSValue::addSubresourceStyleURLs(ListHashSet<KURL>& urls, const StyleSheetContents* styleSheet) const
{
    // This should get called for internal instances only.
    ASSERT(!isCSSOMSafe());

    if (isPrimitiveValue())
        static_cast<const CSSPrimitiveValue*>(this)->addSubresourceStyleURLs(urls, styleSheet);
    else if (isValueList())
        static_cast<const CSSValueList*>(this)->addSubresourceStyleURLs(urls, styleSheet);
    else if (classType() == FontFaceSrcClass)
        static_cast<const CSSFontFaceSrcValue*>(this)->addSubresourceStyleURLs(urls, styleSheet);
    else if (classType() == ReflectClass)
        static_cast<const CSSReflectValue*>(this)->addSubresourceStyleURLs(urls, styleSheet);
}
Esempio n. 6
0
bool CSSValue::hasFailedOrCanceledSubresources() const
{
    if (isValueList())
        return toCSSValueList(this)->hasFailedOrCanceledSubresources();
    if (classType() == FontFaceSrcClass)
        return toCSSFontFaceSrcValue(this)->hasFailedOrCanceledSubresources();
    if (classType() == ImageClass)
        return toCSSImageValue(this)->hasFailedOrCanceledSubresources();
    if (classType() == CrossfadeClass)
        return toCSSCrossfadeValue(this)->hasFailedOrCanceledSubresources();
    if (classType() == ImageSetClass)
        return toCSSImageSetValue(this)->hasFailedOrCanceledSubresources();

    return false;
}
SVGTransform::SVGTransform(const AffineTransform& matrix)
    : SVGPropertyBase(classType())
    , m_transformType(SVG_TRANSFORM_MATRIX)
    , m_angle(0)
    , m_matrix(matrix)
{
}
Esempio n. 8
0
SVGLength::SVGLength(SVGLengthMode mode)
    : SVGPropertyBase(classType())
    , m_value(cssValuePool().createValue(0, CSSPrimitiveValue::UnitType::UserUnits))
    , m_unitMode(static_cast<unsigned>(mode))
{
    ASSERT(unitMode() == mode);
}
Esempio n. 9
0
String CSSValue::cssText() const
{
    if (m_isTextClone) {
         ASSERT(isCSSOMSafe());
        return toTextCloneCSSValue(this)->cssText();
    }
    ASSERT(!isCSSOMSafe() || isSubtypeExposedToCSSOM());

    switch (classType()) {
    case AspectRatioClass:
        return toCSSAspectRatioValue(this)->customCSSText();
    case BorderImageSliceClass:
        return toCSSBorderImageSliceValue(this)->customCSSText();
    case FontClass:
        return toCSSFontValue(this)->customCSSText();
    case FontFaceSrcClass:
        return toCSSFontFaceSrcValue(this)->customCSSText();
    case FontFeatureClass:
        return toCSSFontFeatureValue(this)->customCSSText();
    case FunctionClass:
        return toCSSFunctionValue(this)->customCSSText();
    case LinearGradientClass:
        return toCSSLinearGradientValue(this)->customCSSText();
    case RadialGradientClass:
        return toCSSRadialGradientValue(this)->customCSSText();
    case CrossfadeClass:
        return toCSSCrossfadeValue(this)->customCSSText();
    case ImageClass:
        return toCSSImageValue(this)->customCSSText();
    case InheritedClass:
        return toCSSInheritedValue(this)->customCSSText();
    case InitialClass:
        return toCSSInitialValue(this)->customCSSText();
    case PrimitiveClass:
        return toCSSPrimitiveValue(this)->customCSSText();
    case ShadowClass:
        return toCSSShadowValue(this)->customCSSText();
    case CubicBezierTimingFunctionClass:
        return toCSSCubicBezierTimingFunctionValue(this)->customCSSText();
    case StepsTimingFunctionClass:
        return toCSSStepsTimingFunctionValue(this)->customCSSText();
    case UnicodeRangeClass:
        return toCSSUnicodeRangeValue(this)->customCSSText();
    case ValueListClass:
        return toCSSValueList(this)->customCSSText();
    case CSSTransformClass:
        return toCSSTransformValue(this)->customCSSText();
    case LineBoxContainClass:
        return toCSSLineBoxContainValue(this)->customCSSText();
    case CalculationClass:
        return toCSSCalcValue(this)->customCSSText();
    case ImageSetClass:
        return toCSSImageSetValue(this)->customCSSText();
    case CSSFilterClass:
        return toCSSFilterValue(this)->customCSSText();
    }
    ASSERT_NOT_REACHED();
    return String();
}
Esempio n. 10
0
SVGTransform::SVGTransform(SVGTransformType transformType, ConstructionMode mode)
    : SVGPropertyBase(classType())
    , m_transformType(transformType)
    , m_angle(0)
{
    if (mode == ConstructZeroTransform)
        m_matrix = AffineTransform(0, 0, 0, 0, 0, 0);
}
Esempio n. 11
0
void NewClassWidget::slotBaseClassEdited(const QString &baseClass)
{
    // Set type information with some smartness.
    const ClassType currentClassType = classType();
    const ClassType recommendedClassType = classTypeForBaseClass(baseClass);
    if (recommendedClassType != NoClassType && currentClassType != recommendedClassType)
        setClassType(recommendedClassType);
}
Esempio n. 12
0
SVGTransform::SVGTransform(SVGTransformType transformType, float angle, const FloatPoint& center, const AffineTransform& matrix)
    : SVGPropertyBase(classType())
    , m_transformType(transformType)
    , m_angle(angle)
    , m_center(center)
    , m_matrix(matrix)
{
}
Esempio n. 13
0
bool CSSValue::hasFailedOrCanceledSubresources() const
{
    // This should get called for internal instances only.
    ASSERT(!isCSSOMSafe());

    if (isValueList())
        return toCSSValueList(this)->hasFailedOrCanceledSubresources();
    if (classType() == FontFaceSrcClass)
        return toCSSFontFaceSrcValue(this)->hasFailedOrCanceledSubresources();
    if (classType() == ImageClass)
        return toCSSImageValue(this)->hasFailedOrCanceledSubresources();
    if (classType() == CrossfadeClass)
        return toCSSCrossfadeValue(this)->hasFailedOrCanceledSubresources();
    if (classType() == ImageSetClass)
        return toCSSImageSetValue(this)->hasFailedOrCanceledSubresources();

    return false;
}
Esempio n. 14
0
bool CSSValue::hasFailedOrCanceledSubresources() const
{
    // This should get called for internal instances only.
    ASSERT(!isCSSOMSafe());

    if (isValueList())
        return static_cast<const CSSValueList*>(this)->hasFailedOrCanceledSubresources();
    if (classType() == FontFaceSrcClass)
        return static_cast<const CSSFontFaceSrcValue*>(this)->hasFailedOrCanceledSubresources();
    if (classType() == ImageClass)
        return static_cast<const CSSImageValue*>(this)->hasFailedOrCanceledSubresources();
    if (classType() == CrossfadeClass)
        return static_cast<const CSSCrossfadeValue*>(this)->hasFailedOrCanceledSubresources();
#if ENABLE(CSS_IMAGE_SET)
    if (classType() == ImageSetClass)
        return static_cast<const CSSImageSetValue*>(this)->hasFailedOrCanceledSubresources();
#endif
    return false;
}
Esempio n. 15
0
PassRefPtr<CSSValue> CSSValue::cloneForCSSOM() const
{
    switch (classType()) {
    case PrimitiveClass:
        return toCSSPrimitiveValue(this)->cloneForCSSOM();
    case ValueListClass:
        return toCSSValueList(this)->cloneForCSSOM();
    case ImageClass:
        return toCSSImageValue(this)->cloneForCSSOM();
    case CSSFilterClass:
        return toCSSFilterValue(this)->cloneForCSSOM();
    case CSSTransformClass:
        return toCSSTransformValue(this)->cloneForCSSOM();
    case ImageSetClass:
        return toCSSImageSetValue(this)->cloneForCSSOM();
    default:
        ASSERT(!isSubtypeExposedToCSSOM());
        return TextCloneCSSValue::create(classType(), cssText());
    }
}
void MsgStoreHandler::RunL()
{
    TSsmState ssmState = iStateAwareSession.State();
    if (ssmState.MainState() != ESsmNormal) 
    {        
        iStateAwareSession.RequestStateNotification(iStatus);
        SetActive();
    }
    else 
    {
        //Create  the query/operation object
        CMsvSearchSortOperation *operation = CMsvSearchSortOperation::NewL(*iMsvSession);
        CleanupStack::PushL(operation);
        CMsvSearchSortQuery *query = CMsvSearchSortQuery::NewL();
        CleanupStack::PushL(query);

        //set the query options
        query->SetParentId(KMsvGlobalInBoxIndexEntryId);
        query->SetResultType(EMsvResultAsTMsvId);
        query->AddSearchOptionL(EMsvMtmTypeUID, KSenduiMtmSmsUidValue, EMsvEqual);
        query->AddSearchOptionL(EMsvUnreadMessages, ETrue);
        CleanupStack::Pop(query);

        CMsvOperationActiveSchedulerWait* wait = CMsvOperationActiveSchedulerWait::NewLC();
        //ownership of Query transferred to Operation  
        operation->RequestL(query, EFalse, wait->iStatus);
        wait->Start();

        //Get No of entries
        RArray<TMsvId> messageArray;
        operation->GetResultsL(messageArray);

        CMsvEntry* entry = NULL;
        for (TInt i = 0; i < messageArray.Count(); ++i) 
        {
            entry = iMsvSession->GetEntryL(messageArray[i]);
            TMsvSmsEntry smsEntry = entry->Entry();
            TSmsDataCodingScheme::TSmsClass classType(TSmsDataCodingScheme::ESmsClass0);
            if (smsEntry.Class(classType)) 
            {
                HandleClass0SmsL(entry, smsEntry.Id());
            }
            else
            {
                delete entry;
                entry = NULL;
            }
        }
        messageArray.Close();
        CleanupStack::PopAndDestroy(2, operation);
    }

}
Esempio n. 17
0
FVAnimation::FVAnimation(FVBoxMgr * manager, int x, int y)
    : FVObject(manager,x,y)
{
    sName = "Animation";
    sType = "Animation";
    cColor = fvsettings.value( classType() + "_DefaultColor", FV_DEFAULT_BOX_COLOR_ANIMATION ).value<QColor>();

    tmr = 0;

    setupAttributes();
    setupMenu();
    lastPlaySpeed = tr("Turtle");
}
Esempio n. 18
0
String CSSValue::serializeResolvingVariables(const HashMap<AtomicString, String>& variables) const
{
    switch (classType()) {
    case PrimitiveClass:
        return static_cast<const CSSPrimitiveValue*>(this)->customSerializeResolvingVariables(variables);
    case ValueListClass:
        return static_cast<const CSSValueList*>(this)->customSerializeResolvingVariables(variables);
    case WebKitCSSTransformClass:
        return static_cast<const WebKitCSSTransformValue*>(this)->customSerializeResolvingVariables(variables);
    default:
        return cssText();
    }
}
Esempio n. 19
0
FVBoxField::FVBoxField(FVBoxMgr * manager, Field * f, int x, int y)
 : FVObject(manager, x ,y )
{
    fvOpener = 0;
    fvFieldInterface = new FVFieldInterface( &field );
    field = f;

    cColor = fvsettings.value( classType() + "_DefaultColor", FV_DEFAULT_BOX_COLOR_FIELD ).value<QColor>();

    setupAttributes();
    setupMenu();

    rRect.setWidth( 150 );
}
Esempio n. 20
0
bool CSSImageGeneratorValue::knownToBeOpaque(const RenderObject* renderer) const
{
    switch (classType()) {
    case CrossfadeClass:
        return toCSSCrossfadeValue(this)->knownToBeOpaque(renderer);
    case LinearGradientClass:
        return toCSSLinearGradientValue(this)->knownToBeOpaque(renderer);
    case RadialGradientClass:
        return toCSSRadialGradientValue(this)->knownToBeOpaque(renderer);
    default:
        ASSERT_NOT_REACHED();
    }
    return false;
}
Esempio n. 21
0
bool CSSImageGeneratorValue::isPending() const
{
    switch (classType()) {
    case CrossfadeClass:
        return toCSSCrossfadeValue(this)->isPending();
    case LinearGradientClass:
        return toCSSLinearGradientValue(this)->isPending();
    case RadialGradientClass:
        return toCSSRadialGradientValue(this)->isPending();
    default:
        ASSERT_NOT_REACHED();
    }
    return false;
}
Esempio n. 22
0
IntSize CSSImageGeneratorValue::fixedSize(const RenderObject* renderer)
{
    switch (classType()) {
    case CrossfadeClass:
        return toCSSCrossfadeValue(this)->fixedSize(renderer);
    case LinearGradientClass:
        return toCSSLinearGradientValue(this)->fixedSize(renderer);
    case RadialGradientClass:
        return toCSSRadialGradientValue(this)->fixedSize(renderer);
    default:
        ASSERT_NOT_REACHED();
    }
    return IntSize();
}
Esempio n. 23
0
PassRefPtr<Image> CSSImageGeneratorValue::image(RenderObject* renderer, const IntSize& size)
{
    switch (classType()) {
    case CrossfadeClass:
        return toCSSCrossfadeValue(this)->image(renderer, size);
    case LinearGradientClass:
        return toCSSLinearGradientValue(this)->image(renderer, size);
    case RadialGradientClass:
        return toCSSRadialGradientValue(this)->image(renderer, size);
    default:
        ASSERT_NOT_REACHED();
    }
    return nullptr;
}
Esempio n. 24
0
bool CSSImageGeneratorValue::hasAlpha(const RenderObject* renderer) const
{
    switch (classType()) {
    case CrossfadeClass:
        return static_cast<const CSSCrossfadeValue*>(this)->hasAlpha(renderer);
    case CanvasClass:
        return true;
    case LinearGradientClass:
        return static_cast<const CSSLinearGradientValue*>(this)->hasAlpha(renderer);
    case RadialGradientClass:
        return static_cast<const CSSRadialGradientValue*>(this)->hasAlpha(renderer);
    default:
        ASSERT_NOT_REACHED();
    }
    return true;
}
Esempio n. 25
0
void CSSImageGeneratorValue::loadSubimages(ResourceFetcher* fetcher)
{
    switch (classType()) {
    case CrossfadeClass:
        toCSSCrossfadeValue(this)->loadSubimages(fetcher);
        break;
    case LinearGradientClass:
        toCSSLinearGradientValue(this)->loadSubimages(fetcher);
        break;
    case RadialGradientClass:
        toCSSRadialGradientValue(this)->loadSubimages(fetcher);
        break;
    default:
        ASSERT_NOT_REACHED();
    }
}
bool CSSImageGeneratorValue::isFixedSize() const
{
    switch (classType()) {
    case CanvasClass:
        return static_cast<const CSSCanvasValue*>(this)->isFixedSize();
    case CrossfadeClass:
        return static_cast<const CSSCrossfadeValue*>(this)->isFixedSize();
    case LinearGradientClass:
        return static_cast<const CSSLinearGradientValue*>(this)->isFixedSize();
    case RadialGradientClass:
        return static_cast<const CSSRadialGradientValue*>(this)->isFixedSize();
    default:
        ASSERT_NOT_REACHED();
    }
    return false;
}
Esempio n. 27
0
FloatSize CSSImageGeneratorValue::fixedSize(const RenderElement* renderer)
{
    switch (classType()) {
    case CanvasClass:
        return downcast<CSSCanvasValue>(*this).fixedSize(renderer);
    case CrossfadeClass:
        return downcast<CSSCrossfadeValue>(*this).fixedSize(renderer);
    case FilterImageClass:
        return downcast<CSSFilterImageValue>(*this).fixedSize(renderer);
    case LinearGradientClass:
        return downcast<CSSLinearGradientValue>(*this).fixedSize(renderer);
    case RadialGradientClass:
        return downcast<CSSRadialGradientValue>(*this).fixedSize(renderer);
    default:
        ASSERT_NOT_REACHED();
    }
    return FloatSize();
}
Esempio n. 28
0
void DeprecatedCSSOMValue::destroy()
{
    switch (classType()) {
    case DeprecatedComplexValueClass: {
        delete downcast<DeprecatedCSSOMComplexValue>(this);
        return;
    }
    case DeprecatedPrimitiveValueClass: {
        delete downcast<DeprecatedCSSOMPrimitiveValue>(this);
        return;
    }
    case DeprecatedValueListClass: {
        delete downcast<DeprecatedCSSOMValueList>(this);
        return;
    }
    }
    ASSERT_NOT_REACHED();
    delete this;
}
void CSSImageGeneratorValue::loadSubimages(CachedResourceLoader* cachedResourceLoader)
{
    switch (classType()) {
    case CrossfadeClass:
        static_cast<CSSCrossfadeValue*>(this)->loadSubimages(cachedResourceLoader);
        break;
    case CanvasClass:
        static_cast<CSSCanvasValue*>(this)->loadSubimages(cachedResourceLoader);
        break;
    case LinearGradientClass:
        static_cast<CSSLinearGradientValue*>(this)->loadSubimages(cachedResourceLoader);
        break;
    case RadialGradientClass:
        static_cast<CSSRadialGradientValue*>(this)->loadSubimages(cachedResourceLoader);
        break;
    default:
        ASSERT_NOT_REACHED();
    }
}
Esempio n. 30
0
bool CSSImageGeneratorValue::knownToBeOpaque(const RenderElement* renderer) const
{
    switch (classType()) {
    case CrossfadeClass:
        return downcast<CSSCrossfadeValue>(*this).knownToBeOpaque(renderer);
    case CanvasClass:
        return false;
    case NamedImageClass:
        return false;
    case FilterImageClass:
        return downcast<CSSFilterImageValue>(*this).knownToBeOpaque(renderer);
    case LinearGradientClass:
        return downcast<CSSLinearGradientValue>(*this).knownToBeOpaque(renderer);
    case RadialGradientClass:
        return downcast<CSSRadialGradientValue>(*this).knownToBeOpaque(renderer);
    default:
        ASSERT_NOT_REACHED();
    }
    return false;
}