Example #1
0
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
}
Example #2
0
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

}
Example #3
0
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;
		}
Example #9
0
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;
}
Example #10
0
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;
}
Example #11
0
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;
}
Example #12
0
		EASTLFixedString8Wrapper::EASTLFixedString8Wrapper()
			: mString8(0)
		{
			mString8 = EAWEBKIT_NEW("fixedstring8_128") FixedString8_128();
		}
Example #13
0
		EASTLHeaderMapWrapper::EASTLHeaderMapWrapper(const EASTLHeaderMapWrapper& rhs)
		{
			mHeaderMap = EAWEBKIT_NEW("HeaderMap") HeaderMap();
			*(reinterpret_cast<HeaderMap*>(mHeaderMap)) = *(reinterpret_cast<HeaderMap*> ((rhs).GetImpl()));
		}
Example #14
0
/******************************************EASTLHeaderMapWrapper******************************/
EASTLHeaderMapWrapper::EASTLHeaderMapWrapper()
	: mHeaderMap(0)
	, mHeaderMapWrapperIterator(0)
{
	mHeaderMap = EAWEBKIT_NEW("HeaderMap") HeaderMap();
}
Example #15
0
		EASTLVectorJavaScriptValueWrapper::EASTLVectorJavaScriptValueWrapper()
			: mVector(0)
		{
			mVector = EAWEBKIT_NEW("VectorJavaScriptValue") VectorJavaScriptValue();
		}
Example #16
0
		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) );
		}
Example #18
0
		EASTLJavascriptValueHashMapWrapper::EASTLJavascriptValueHashMapWrapper()
			: mHashMap(0)
		{
			mHashMap = EAWEBKIT_NEW("HashMapJavaScriptValue") HashMapJavaScriptValue();
		}
Example #19
0
		EASTLFixedString8Wrapper::EASTLFixedString8Wrapper(const EASTLFixedString8Wrapper& rhs)
		{
			mString8 = EAWEBKIT_NEW("fixedstring8_128") FixedString8_128();
			*(reinterpret_cast<FixedString8_128*>(mString8)) = *(reinterpret_cast<FixedString8_128*> ((rhs).GetImpl()));
		}
Example #20
0
		EASTLFixedString8Wrapper::EASTLFixedString8Wrapper(const char8_t* str)
			: mString8(0)
		{
			mString8 = EAWEBKIT_NEW("fixedstring8_128") FixedString8_128(str);
		}
Example #21
0
		EASTLFixedString16Wrapper::EASTLFixedString16Wrapper(const char16_t* str)
			: mString16(0)
		{
			mString16 = EAWEBKIT_NEW("fixedstring16_128") FixedString16_128(str);
		}
Example #22
0
		EASTLJavascriptValueHashMapIteratorWrapper::EASTLJavascriptValueHashMapIteratorWrapper(const EASTLJavascriptValueHashMapIteratorWrapper& rhs)
		{
			mIterator = EAWEBKIT_NEW("HashMapJavaScriptValue::iterator") HashMapJavaScriptValue::iterator();
			*(reinterpret_cast<HashMapJavaScriptValue::iterator*>(mIterator)) = *(reinterpret_cast<HashMapJavaScriptValue::iterator*> ((rhs).GetImpl()));
		}
Example #23
0
		EASTLJavascriptValueHashMapIteratorWrapper::EASTLJavascriptValueHashMapIteratorWrapper()
			: mIterator(0)
		{
			mIterator = EAWEBKIT_NEW("HashMapJavaScriptValue::iterator") HashMapJavaScriptValue::iterator();
		}
Example #24
0
		EASTLJavascriptValueHashMapWrapper::EASTLJavascriptValueHashMapWrapper(const EASTLJavascriptValueHashMapWrapper& rhs)
		{
			mHashMap = EAWEBKIT_NEW("HashMapJavaScriptValue") HashMapJavaScriptValue();
			*(reinterpret_cast<HashMapJavaScriptValue*>(mHashMap)) = *(reinterpret_cast<HashMapJavaScriptValue*> ((rhs).GetImpl()));
		}
Example #25
0
EASTLHeaderMapWrapper::EASTLHeaderMapWrapperIterator::EASTLHeaderMapWrapperIterator()
	: mIterator(0)
{
	mIterator = EAWEBKIT_NEW("HeaderMapIterator") HeaderMap::iterator();
}
Example #26
0
		EASTLFixedString16Wrapper::EASTLFixedString16Wrapper()
			: mString16(0)
		{
			mString16 = EAWEBKIT_NEW("fixedstring16_128") FixedString16_128();
		}