зеркало из https://github.com/mozilla/pjs.git
fix bug 116976 for big endian machine. change the ill GetBidiProperty implementation to make it work under big endian machinese. Should fix the API later. r=Roland.Mainz@informatik.med.uni-giessen.de sr=brendan@mozilla.org
This commit is contained in:
Родитель
7b32780d00
Коммит
6ba2fc077e
|
@ -4103,7 +4103,12 @@ NS_IMETHODIMP nsFrame::GetBidiProperty(nsIPresContext* aPresContext,
|
|||
if (frameManager) {
|
||||
frameManager->GetFrameProperty( (nsIFrame*)this, aPropertyName, 0, &val);
|
||||
if (val) {
|
||||
nsCRT::memcpy(aPropertyValue, &val, aSize);
|
||||
// to fix bidi on big endian. We need to copy the right bytes from the void*, not the first aSize bytes.
|
||||
#if IS_BIG_ENDIAN
|
||||
memcpy(aPropertyValue, ((char*)&val)+sizeof(void*) - aSize, aSize);
|
||||
#else
|
||||
memcpy(aPropertyValue, &val, aSize);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4103,7 +4103,12 @@ NS_IMETHODIMP nsFrame::GetBidiProperty(nsIPresContext* aPresContext,
|
|||
if (frameManager) {
|
||||
frameManager->GetFrameProperty( (nsIFrame*)this, aPropertyName, 0, &val);
|
||||
if (val) {
|
||||
nsCRT::memcpy(aPropertyValue, &val, aSize);
|
||||
// to fix bidi on big endian. We need to copy the right bytes from the void*, not the first aSize bytes.
|
||||
#if IS_BIG_ENDIAN
|
||||
memcpy(aPropertyValue, ((char*)&val)+sizeof(void*) - aSize, aSize);
|
||||
#else
|
||||
memcpy(aPropertyValue, &val, aSize);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче