EASTLFixedString16Wrapper::EASTLFixedString16Wrapper(const char16_t* str) { #if STRINGWRAPPER_AVOID_HEAP_ALLOCATION new(mString16) FixedString16_128(str); #else mString16 = EAWEBKIT_NEW("fixedstring16_128") FixedString16_128(str); #endif }
EASTLHeaderMapWrapper::EASTLHeaderMapWrapper(const EASTLHeaderMapWrapper& rhs) { mHeaderMap = EAWEBKIT_NEW("HeaderMap") HeaderMap(); *(reinterpret_cast<HeaderMap*>(mHeaderMap)) = *(reinterpret_cast<HeaderMap*> ((rhs).GetImpl())); mHeaderMapWrapperIterator = 0; //Copying it does not make sense }
EASTLFixedString16Wrapper::EASTLFixedString16Wrapper(const EASTLFixedString16Wrapper& rhs) { #if STRINGWRAPPER_AVOID_HEAP_ALLOCATION new(mString16) FixedString16_128(); #else mString16 = EAWEBKIT_NEW("fixedstring16_128") FixedString16_128(); #endif *(reinterpret_cast<FixedString16_128*>(mString16)) = *(reinterpret_cast<FixedString16_128*> ((rhs).GetImpl())); }
EASTLFixedString8Wrapper& EASTLFixedString8Wrapper::operator =(const EASTLFixedString8Wrapper& rhs) { if(this == &rhs) return *this; EAWEBKIT_DELETE reinterpret_cast<FixedString8_128*>(mString8); mString8 = EAWEBKIT_NEW("fixedstring8_128") FixedString8_128(); *(reinterpret_cast<FixedString8_128*>(mString8)) = *(reinterpret_cast<FixedString8_128*> ((rhs).GetImpl())); return *this; }
EASTLVectorJavaScriptValueWrapper& EASTLVectorJavaScriptValueWrapper::operator =(const EASTLVectorJavaScriptValueWrapper& rhs) { if(this == &rhs) return *this; EAWEBKIT_DELETE reinterpret_cast<VectorJavaScriptValue*>(mVector); mVector = EAWEBKIT_NEW("VectorJavaScriptValue") VectorJavaScriptValue(); *(reinterpret_cast<VectorJavaScriptValue*>(mVector)) = *(reinterpret_cast<VectorJavaScriptValue*> ((rhs).GetImpl())); return *this; }
EASTLHeaderMapWrapper& EASTLHeaderMapWrapper::operator =(const EASTLHeaderMapWrapper& rhs) { if(this == &rhs) return *this; EAWEBKIT_DELETE reinterpret_cast<HeaderMap*>(mHeaderMap); mHeaderMap = EAWEBKIT_NEW("HeaderMap") HeaderMap(); *(reinterpret_cast<HeaderMap*>(mHeaderMap)) = *(reinterpret_cast<HeaderMap*> ((rhs).GetImpl())); return *this; }
EASTLJavascriptValueHashMapWrapper& EASTLJavascriptValueHashMapWrapper::operator =(const EASTLJavascriptValueHashMapWrapper& rhs) { if(this == &rhs) return *this; EAWEBKIT_DELETE reinterpret_cast<HashMapJavaScriptValue*>(mHashMap); mHashMap = EAWEBKIT_NEW("HashMapJavaScriptValue") HashMapJavaScriptValue(); *(reinterpret_cast<HashMapJavaScriptValue*>(mHashMap)) = *(reinterpret_cast<HashMapJavaScriptValue*> ((rhs).GetImpl())); return *this; }
EASTLJavascriptValueHashMapIteratorWrapper& EASTLJavascriptValueHashMapIteratorWrapper::operator =(const EASTLJavascriptValueHashMapIteratorWrapper& rhs) { if(this == &rhs) return *this; EAWEBKIT_DELETE reinterpret_cast<HashMapJavaScriptValue::iterator*>(mIterator); mIterator = EAWEBKIT_NEW("HashMapJavaScriptValue::iterator") HashMapJavaScriptValue::iterator(); *(reinterpret_cast<HashMapJavaScriptValue::iterator*>(mIterator)) = *(reinterpret_cast<HashMapJavaScriptValue::iterator*> ((rhs).GetImpl())); return *this; }
EASTLHeaderMapWrapper& EASTLHeaderMapWrapper::operator =(const EASTLHeaderMapWrapper& rhs) { if(this == &rhs) return *this; EAWEBKIT_DELETE reinterpret_cast<HeaderMap*>(mHeaderMap); mHeaderMap = EAWEBKIT_NEW("HeaderMap") HeaderMap(); *(reinterpret_cast<HeaderMap*>(mHeaderMap)) = *(reinterpret_cast<HeaderMap*> ((rhs).GetImpl())); EAWEBKIT_DELETE reinterpret_cast<EASTLHeaderMapWrapperIterator*>(mHeaderMapWrapperIterator); mHeaderMapWrapperIterator = 0; //Copying it does not make sense return *this; }
EASTLFixedString16Wrapper& EASTLFixedString16Wrapper::operator =(const EASTLFixedString16Wrapper& rhs) { if(this == &rhs) return *this; #if STRINGWRAPPER_AVOID_HEAP_ALLOCATION reinterpret_cast<FixedString16_128*>(mString16)->~FixedString16_128(); new(mString16) FixedString16_128(); #else EAWEBKIT_DELETE reinterpret_cast<FixedString16_128*>(mString16); mString16 = EAWEBKIT_NEW("fixedstring16_128") FixedString16_128(); #endif *(reinterpret_cast<FixedString16_128*>(mString16)) = *(reinterpret_cast<FixedString16_128*> ((rhs).GetImpl())); return *this; }
EASTLHeaderMapWrapper::EASTLHeaderMapWrapperIterator* EASTLHeaderMapWrapper::First() { HeaderMap* headerMapPtr = reinterpret_cast<HeaderMap*>(mHeaderMap); if(headerMapPtr && !headerMapPtr->empty()) { if(!mHeaderMapWrapperIterator) mHeaderMapWrapperIterator = EAWEBKIT_NEW("HeaderMapIteratorWrapper") EASTLHeaderMapWrapperIterator(); *(reinterpret_cast<HeaderMap::iterator*>(mHeaderMapWrapperIterator->mIterator)) = headerMapPtr->begin(); return mHeaderMapWrapperIterator; } return 0; }
EASTLFixedString8Wrapper::EASTLFixedString8Wrapper() : mString8(0) { mString8 = EAWEBKIT_NEW("fixedstring8_128") FixedString8_128(); }
EASTLHeaderMapWrapper::EASTLHeaderMapWrapper(const EASTLHeaderMapWrapper& rhs) { mHeaderMap = EAWEBKIT_NEW("HeaderMap") HeaderMap(); *(reinterpret_cast<HeaderMap*>(mHeaderMap)) = *(reinterpret_cast<HeaderMap*> ((rhs).GetImpl())); }
/******************************************EASTLHeaderMapWrapper******************************/ EASTLHeaderMapWrapper::EASTLHeaderMapWrapper() : mHeaderMap(0) , mHeaderMapWrapperIterator(0) { mHeaderMap = EAWEBKIT_NEW("HeaderMap") HeaderMap(); }
EASTLVectorJavaScriptValueWrapper::EASTLVectorJavaScriptValueWrapper() : mVector(0) { mVector = EAWEBKIT_NEW("VectorJavaScriptValue") VectorJavaScriptValue(); }
EASTLVectorJavaScriptValueWrapper::EASTLVectorJavaScriptValueWrapper(const EASTLVectorJavaScriptValueWrapper& rhs) { mVector = EAWEBKIT_NEW("VectorJavaScriptValue") VectorJavaScriptValue(); *(reinterpret_cast<VectorJavaScriptValue*>(mVector)) = *(reinterpret_cast<VectorJavaScriptValue*> ((rhs).GetImpl())); }
DocumentNavigator::DocumentNavigator(EA::WebKit::View* view, WebCore::Document* document, EA::WebKit::JumpDirection direction, WebCore::IntPoint startingPosition, int previousNodeX, int previousNodeY, int previousNodeWidth, int previousNodeHeight, float theta, bool strictAxesCheck, float maxRadialDistance) : mView(view) , mDirection(direction) , mStartingPosition(startingPosition) , mPreviousNodeRect(previousNodeX,previousNodeY,previousNodeWidth,previousNodeHeight) , mBestNode(0) , mDocument(document) , mMinR(maxRadialDistance) , mStrictAxesCheck(strictAxesCheck) , mNodeListContainer(0) { mNodeListContainer = EAWEBKIT_NEW("NodeListContainer") NodeListContainer();//WTF::fastNew<NodeListContainer> (); int width = previousNodeWidth; int height = previousNodeHeight; switch (direction) { case EA::WebKit::JumpRight: mStartingPosition.setX(mStartingPosition.x() + 3*width/8); break; case EA::WebKit::JumpDown: mStartingPosition.setY(mStartingPosition.y() + 3*height/8); break; case EA::WebKit::JumpLeft: mStartingPosition.setX(mStartingPosition.x() - 3*width/8); break; case EA::WebKit::JumpUp: mStartingPosition.setY(mStartingPosition.y() - 3*height/8); break; default: EAW_FAIL_MSG("Should not have got here\n"); } mAxesX = mStartingPosition.x(); mAxesY = mStartingPosition.y(); const float PI_4 = 3.14159f / 4.0f; switch (direction) { case EA::WebKit::JumpRight: mMinThetaRange = 8*PI_4 - theta; mMaxThetaRange = theta; //printf("JumpingRight : theta=[%f,%f]\n", mMinThetaRange, mMaxThetaRange); break; case EA::WebKit::JumpDown: mMinThetaRange = 2*PI_4-theta; mMaxThetaRange = 2*PI_4+theta; //printf("JumpingDown : theta=[%f,%f]\n", mMinThetaRange, mMaxThetaRange); break; case EA::WebKit::JumpLeft: mMinThetaRange = 4*PI_4 - theta; mMaxThetaRange = 4*PI_4 + theta; //printf("JumpingLeft : theta=[%f,%f]\n", mMinThetaRange, mMaxThetaRange); break; case EA::WebKit::JumpUp: mMinThetaRange = 6*PI_4 - theta; mMaxThetaRange = 6*PI_4 + theta; //printf("JumpingUp : theta=[%f,%f]\n", mMinThetaRange, mMaxThetaRange); break; default: EAW_FAIL_MSG("Should not have got here\n"); } //printf("atan2(1.0f,0.0f)=%f [+XAXIS]\n", CalcAngle(1.0f,0.0f) ); //printf("atan2(0.0f,1.0f)=%f [+YAXIS]\n", CalcAngle(0.0f,1.0f) ); //printf("atan2(-1.0f,0.0f)=%f [-XAXIS]\n", CalcAngle(-1.0f,0.0f) ); //printf("atan2(0.0f,-1.0f)=%f [-YAXIS]\n", CalcAngle(0.0f,-1.0f) ); //printf("atan2(1.0f,1.0f)=%f [DIAGONAL1]\n", CalcAngle(1.0f,1.0f) ); //printf("atan2(-1.0f,1.0f)=%f [DIAGONAL2]\n", CalcAngle(-1.0f,1.0f) ); //printf("atan2(-1.0f,-1.0f)=%f [DIAGONAL3]\n", CalcAngle(-1.0f,-1.0f) ); //printf("atan2(1.0f,-1.0f)=%f [DIAGONAL4]\n", CalcAngle(1.0f,-1.0f) ); }
EASTLJavascriptValueHashMapWrapper::EASTLJavascriptValueHashMapWrapper() : mHashMap(0) { mHashMap = EAWEBKIT_NEW("HashMapJavaScriptValue") HashMapJavaScriptValue(); }
EASTLFixedString8Wrapper::EASTLFixedString8Wrapper(const EASTLFixedString8Wrapper& rhs) { mString8 = EAWEBKIT_NEW("fixedstring8_128") FixedString8_128(); *(reinterpret_cast<FixedString8_128*>(mString8)) = *(reinterpret_cast<FixedString8_128*> ((rhs).GetImpl())); }
EASTLFixedString8Wrapper::EASTLFixedString8Wrapper(const char8_t* str) : mString8(0) { mString8 = EAWEBKIT_NEW("fixedstring8_128") FixedString8_128(str); }
EASTLFixedString16Wrapper::EASTLFixedString16Wrapper(const char16_t* str) : mString16(0) { mString16 = EAWEBKIT_NEW("fixedstring16_128") FixedString16_128(str); }
EASTLJavascriptValueHashMapIteratorWrapper::EASTLJavascriptValueHashMapIteratorWrapper(const EASTLJavascriptValueHashMapIteratorWrapper& rhs) { mIterator = EAWEBKIT_NEW("HashMapJavaScriptValue::iterator") HashMapJavaScriptValue::iterator(); *(reinterpret_cast<HashMapJavaScriptValue::iterator*>(mIterator)) = *(reinterpret_cast<HashMapJavaScriptValue::iterator*> ((rhs).GetImpl())); }
EASTLJavascriptValueHashMapIteratorWrapper::EASTLJavascriptValueHashMapIteratorWrapper() : mIterator(0) { mIterator = EAWEBKIT_NEW("HashMapJavaScriptValue::iterator") HashMapJavaScriptValue::iterator(); }
EASTLJavascriptValueHashMapWrapper::EASTLJavascriptValueHashMapWrapper(const EASTLJavascriptValueHashMapWrapper& rhs) { mHashMap = EAWEBKIT_NEW("HashMapJavaScriptValue") HashMapJavaScriptValue(); *(reinterpret_cast<HashMapJavaScriptValue*>(mHashMap)) = *(reinterpret_cast<HashMapJavaScriptValue*> ((rhs).GetImpl())); }
EASTLHeaderMapWrapper::EASTLHeaderMapWrapperIterator::EASTLHeaderMapWrapperIterator() : mIterator(0) { mIterator = EAWEBKIT_NEW("HeaderMapIterator") HeaderMap::iterator(); }
EASTLFixedString16Wrapper::EASTLFixedString16Wrapper() : mString16(0) { mString16 = EAWEBKIT_NEW("fixedstring16_128") FixedString16_128(); }