зеркало из https://github.com/mozilla/gecko-dev.git
Merge mozilla-central to mozilla-inbound
This commit is contained in:
Коммит
6225eff2b8
1
.hgtags
1
.hgtags
|
@ -70,3 +70,4 @@ a95d426422816513477e5863add1b00ac7041dcb AURORA_BASE_20110412
|
|||
41b84b87c816403e1b74963d8094cff0406c989e AURORA_BASE_20110816
|
||||
c0983049bcaa9551e5f276d5a77ce154c151e0b0 AURORA_BASE_20110927
|
||||
462c726144bc1fb45b61e774f64ac5d61b4e047c UPDATE_PACKAGING_R15
|
||||
54bfd8bf682e295ffd7f22fa921ca343957b6c1c AURORA_BASE_20111108
|
||||
|
|
|
@ -1 +1 @@
|
|||
10.0a1
|
||||
11.0a1
|
||||
|
|
|
@ -10,4 +10,4 @@
|
|||
# hardcoded milestones in the tree from these two files.
|
||||
#--------------------------------------------------------
|
||||
|
||||
10.0a1
|
||||
11.0a1
|
||||
|
|
|
@ -87,14 +87,12 @@ nsDataDocumentContentPolicy::ShouldLoad(PRUint32 aContentType,
|
|||
}
|
||||
|
||||
if (doc->IsBeingUsedAsImage()) {
|
||||
// Only allow SVG-as-an-image to load local resources that inherit security
|
||||
// context (basically just data: URIs), to prevent data leakage.
|
||||
// Allow local resources for SVG-as-an-image documents, but disallow
|
||||
// everything else, to prevent data leakage
|
||||
bool hasFlags;
|
||||
nsresult rv =
|
||||
NS_URIChainHasFlags(aContentLocation,
|
||||
nsIProtocolHandler::URI_IS_LOCAL_RESOURCE |
|
||||
nsIProtocolHandler::URI_INHERITS_SECURITY_CONTEXT,
|
||||
&hasFlags);
|
||||
nsresult rv = NS_URIChainHasFlags(aContentLocation,
|
||||
nsIProtocolHandler::URI_IS_LOCAL_RESOURCE,
|
||||
&hasFlags);
|
||||
if (NS_FAILED(rv) || !hasFlags) {
|
||||
// resource is not local (or we couldn't tell) - reject!
|
||||
*aDecision = nsIContentPolicy::REJECT_TYPE;
|
||||
|
|
|
@ -5875,13 +5875,13 @@ nsDocShell::OnStateChange(nsIWebProgress * aProgress, nsIRequest * aRequest,
|
|||
// If load type is not set, this is not a 'normal' load.
|
||||
// No need to collect timing.
|
||||
if (mLoadType == 0) {
|
||||
mTiming = nsnull;
|
||||
mTiming = nsnull;
|
||||
}
|
||||
else {
|
||||
rv = MaybeInitTiming();
|
||||
}
|
||||
if (mTiming) {
|
||||
mTiming->NotifyFetchStart(uri, ConvertLoadTypeToNavigationType(mLoadType));
|
||||
else if (this == aProgress){
|
||||
rv = MaybeInitTiming();
|
||||
if (mTiming) {
|
||||
mTiming->NotifyFetchStart(uri, ConvertLoadTypeToNavigationType(mLoadType));
|
||||
}
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIWyciwygChannel> wcwgChannel(do_QueryInterface(aRequest));
|
||||
|
|
|
@ -122,6 +122,8 @@ _TEST_FILES = \
|
|||
test_bfcache_plus_hash.html \
|
||||
test_bug680257.html \
|
||||
file_bug680257.html \
|
||||
test_bug691547.html \
|
||||
bug691547_frame.html \
|
||||
$(NULL)
|
||||
|
||||
ifeq ($(MOZ_WIDGET_TOOLKIT),cocoa)
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<!--
|
||||
https://bugzilla.mozilla.org/show_bug.cgi?id=691547
|
||||
-->
|
||||
<head>
|
||||
<title>Test for Bug 691547</title>
|
||||
</head>
|
||||
<body>
|
||||
<iframe style="width:95%"></iframe>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,59 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<!--
|
||||
https://bugzilla.mozilla.org/show_bug.cgi?id=691547
|
||||
-->
|
||||
<head>
|
||||
<title>Test for Bug 691547</title>
|
||||
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
<script type="application/javascript">
|
||||
var navStart = 0;
|
||||
var beforeReload = 0;
|
||||
function onContentLoad() {
|
||||
var frame = frames[0];
|
||||
if (!navStart) {
|
||||
// First time we perform navigation in subframe. The bug is that
|
||||
// load in subframe causes timing.navigationStart to be recorded
|
||||
// as if it was a start of the next navigation.
|
||||
var innerFrame = frame.frames[0];
|
||||
navStart = frame.performance.timing.navigationStart;
|
||||
innerFrame.location = 'bug570341_recordevents.html';
|
||||
// Let's wait a bit so the difference is clear anough.
|
||||
setTimeout(reload, 3000);
|
||||
}
|
||||
else {
|
||||
// Content reloaded, time to check. We are allowing a huge time slack,
|
||||
// in case clock is imprecise. If we have a bug, the difference is
|
||||
// expected to be about the timeout value set above.
|
||||
var diff = frame.performance.timing.navigationStart - beforeReload;
|
||||
ok(diff >= -200,
|
||||
'navigationStart should be set after reload request. ' +
|
||||
'Measured difference: ' + diff + ' (should be positive)');
|
||||
SimpleTest.finish();
|
||||
}
|
||||
}
|
||||
function reload() {
|
||||
var frame = frames[0];
|
||||
ok(navStart == frame.performance.timing.navigationStart,
|
||||
'navigationStart should not change when frame loads.');
|
||||
beforeReload = Date.now();
|
||||
frame.location.reload();
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=570341">Mozilla Bug 570341</a>
|
||||
<div id="frames">
|
||||
<iframe name="frame0" id="frame0" src="bug691547_frame.html" onload="onContentLoad()"></iframe>
|
||||
</div>
|
||||
<div id="content" style="display: none">
|
||||
|
||||
</div>
|
||||
<pre id="test">
|
||||
<script type="application/javascript">
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
</script>
|
||||
</pre>
|
||||
</body>
|
||||
</html>
|
|
@ -535,7 +535,7 @@ public:
|
|||
const nsAString& aName,
|
||||
const nsACString& aASCIIOrigin)
|
||||
: AsyncConnectionHelper(static_cast<IDBDatabase*>(nsnull), aRequest),
|
||||
mOpenRequest(aRequest), mOpenHelper(aHelper),
|
||||
mOpenHelper(aHelper), mOpenRequest(aRequest),
|
||||
mCurrentVersion(aCurrentVersion), mName(aName),
|
||||
mASCIIOrigin(aASCIIOrigin)
|
||||
{ }
|
||||
|
@ -543,6 +543,14 @@ public:
|
|||
nsresult GetSuccessResult(JSContext* aCx,
|
||||
jsval* aVal);
|
||||
|
||||
void ReleaseMainThreadObjects()
|
||||
{
|
||||
mOpenHelper = nsnull;
|
||||
mOpenRequest = nsnull;
|
||||
|
||||
AsyncConnectionHelper::ReleaseMainThreadObjects();
|
||||
}
|
||||
|
||||
protected:
|
||||
nsresult DoDatabaseWork(mozIStorageConnection* aConnection);
|
||||
nsresult Init();
|
||||
|
|
|
@ -2049,60 +2049,35 @@ GLContext::TexImage2D(GLenum target, GLint level, GLint internalformat,
|
|||
GLint pixelsize, GLint border, GLenum format,
|
||||
GLenum type, const GLvoid *pixels)
|
||||
{
|
||||
#ifdef USE_GLES2
|
||||
// Use GLES-specific workarounds for GL_UNPACK_ROW_LENGTH; these are
|
||||
// implemented in TexSubImage2D.
|
||||
fTexImage2D(target,
|
||||
border,
|
||||
internalformat,
|
||||
width,
|
||||
height,
|
||||
border,
|
||||
format,
|
||||
type,
|
||||
NULL);
|
||||
TexSubImage2D(target,
|
||||
level,
|
||||
0,
|
||||
0,
|
||||
width,
|
||||
height,
|
||||
stride,
|
||||
pixelsize,
|
||||
format,
|
||||
type,
|
||||
pixels);
|
||||
#else
|
||||
fPixelStorei(LOCAL_GL_UNPACK_ALIGNMENT,
|
||||
NS_MIN(GetAddressAlignment((ptrdiff_t)pixels),
|
||||
GetAddressAlignment((ptrdiff_t)stride)));
|
||||
|
||||
#ifndef USE_GLES2
|
||||
bool useUnpackRowLength = true;
|
||||
#else
|
||||
// A Khronos extension, GL_EXT_unpack_subimage, that restores support
|
||||
// for GL_UNPACK_ROW_LENGTH, GL_UNPACK_SKIP_ROWS and GL_UNPACK_SKIP_PIXELS
|
||||
// exists on Tegra 2 (and possibly other chipsets)
|
||||
bool useUnpackRowLength = IsExtensionSupported(EXT_unpack_subimage);
|
||||
#endif
|
||||
|
||||
// Don't use UNPACK_ROW_LENGTH if the length would be greater than the
|
||||
// maximum texture size
|
||||
int rowLength = stride/pixelsize;
|
||||
if (rowLength > mMaxTextureSize)
|
||||
useUnpackRowLength = false;
|
||||
|
||||
if (useUnpackRowLength) {
|
||||
fPixelStorei(LOCAL_GL_UNPACK_ROW_LENGTH, rowLength);
|
||||
} else if (stride != width * pixelsize) {
|
||||
// Not using the whole row of texture data and GLES doesn't
|
||||
// support GL_UNPACK_ROW_LENGTH. We need to upload each row
|
||||
// separately.
|
||||
fTexImage2D(target,
|
||||
border,
|
||||
internalformat,
|
||||
width,
|
||||
height,
|
||||
border,
|
||||
format,
|
||||
type,
|
||||
NULL);
|
||||
|
||||
const unsigned char *row = (const unsigned char *)pixels;
|
||||
for (int h = 0; h < height; h++) {
|
||||
fTexSubImage2D(target,
|
||||
level,
|
||||
0,
|
||||
h,
|
||||
width,
|
||||
1,
|
||||
format,
|
||||
type,
|
||||
row);
|
||||
|
||||
row += stride;
|
||||
}
|
||||
|
||||
fPixelStorei(LOCAL_GL_UNPACK_ALIGNMENT, 4);
|
||||
return;
|
||||
}
|
||||
|
||||
fPixelStorei(LOCAL_GL_UNPACK_ROW_LENGTH, rowLength);
|
||||
fTexImage2D(target,
|
||||
level,
|
||||
internalformat,
|
||||
|
@ -2112,10 +2087,9 @@ GLContext::TexImage2D(GLenum target, GLint level, GLint internalformat,
|
|||
format,
|
||||
type,
|
||||
pixels);
|
||||
|
||||
if (useUnpackRowLength)
|
||||
fPixelStorei(LOCAL_GL_UNPACK_ROW_LENGTH, 0);
|
||||
fPixelStorei(LOCAL_GL_UNPACK_ROW_LENGTH, 0);
|
||||
fPixelStorei(LOCAL_GL_UNPACK_ALIGNMENT, 4);
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -2125,45 +2099,22 @@ GLContext::TexSubImage2D(GLenum target, GLint level,
|
|||
GLint pixelsize, GLenum format,
|
||||
GLenum type, const GLvoid* pixels)
|
||||
{
|
||||
fPixelStorei(LOCAL_GL_UNPACK_ALIGNMENT,
|
||||
#ifdef USE_GLES2
|
||||
if (IsExtensionSupported(EXT_unpack_subimage)) {
|
||||
TexSubImage2DWithUnpackSubimageGLES(target, level, xoffset, yoffset,
|
||||
width, height, stride,
|
||||
pixelsize, format, type, pixels);
|
||||
} else {
|
||||
TexSubImage2DWithoutUnpackSubimage(target, level, xoffset, yoffset,
|
||||
width, height, stride,
|
||||
pixelsize, format, type, pixels);
|
||||
}
|
||||
#else
|
||||
fPixelStorei(LOCAL_GL_UNPACK_ALIGNMENT,
|
||||
NS_MIN(GetAddressAlignment((ptrdiff_t)pixels),
|
||||
GetAddressAlignment((ptrdiff_t)stride)));
|
||||
|
||||
#ifndef USE_GLES2
|
||||
bool useUnpackRowLength = true;
|
||||
#else
|
||||
bool useUnpackRowLength = IsExtensionSupported(EXT_unpack_subimage);
|
||||
#endif
|
||||
|
||||
int rowLength = stride/pixelsize;
|
||||
if (rowLength > mMaxTextureSize)
|
||||
useUnpackRowLength = false;
|
||||
|
||||
if (useUnpackRowLength) {
|
||||
fPixelStorei(LOCAL_GL_UNPACK_ROW_LENGTH, rowLength);
|
||||
} else if (stride != width * pixelsize) {
|
||||
// Not using the whole row of texture data and GLES doesn't
|
||||
// support GL_UNPACK_ROW_LENGTH. We need to upload each row
|
||||
// separately.
|
||||
const unsigned char *row = (const unsigned char *)pixels;
|
||||
for (int h = 0; h < height; h++) {
|
||||
fTexSubImage2D(target,
|
||||
level,
|
||||
xoffset,
|
||||
yoffset+h,
|
||||
width,
|
||||
1,
|
||||
format,
|
||||
type,
|
||||
row);
|
||||
|
||||
row += stride;
|
||||
}
|
||||
|
||||
fPixelStorei(LOCAL_GL_UNPACK_ALIGNMENT, 4);
|
||||
return;
|
||||
}
|
||||
|
||||
fPixelStorei(LOCAL_GL_UNPACK_ROW_LENGTH, rowLength);
|
||||
fTexSubImage2D(target,
|
||||
level,
|
||||
xoffset,
|
||||
|
@ -2173,9 +2124,114 @@ GLContext::TexSubImage2D(GLenum target, GLint level,
|
|||
format,
|
||||
type,
|
||||
pixels);
|
||||
fPixelStorei(LOCAL_GL_UNPACK_ROW_LENGTH, 0);
|
||||
fPixelStorei(LOCAL_GL_UNPACK_ALIGNMENT, 4);
|
||||
#endif
|
||||
}
|
||||
|
||||
if (useUnpackRowLength)
|
||||
void
|
||||
GLContext::TexSubImage2DWithUnpackSubimageGLES(GLenum target, GLint level,
|
||||
GLint xoffset, GLint yoffset,
|
||||
GLsizei width, GLsizei height,
|
||||
GLsizei stride, GLint pixelsize,
|
||||
GLenum format, GLenum type,
|
||||
const GLvoid* pixels)
|
||||
{
|
||||
fPixelStorei(LOCAL_GL_UNPACK_ALIGNMENT,
|
||||
NS_MIN(GetAddressAlignment((ptrdiff_t)pixels),
|
||||
GetAddressAlignment((ptrdiff_t)stride)));
|
||||
if (stride == width * pixelsize) {
|
||||
// No need to use GL_UNPACK_ROW_LENGTH.
|
||||
fTexSubImage2D(target,
|
||||
level,
|
||||
xoffset,
|
||||
yoffset,
|
||||
width,
|
||||
height,
|
||||
format,
|
||||
type,
|
||||
pixels);
|
||||
} else {
|
||||
// When using GL_UNPACK_ROW_LENGTH, we need to work around a Tegra
|
||||
// driver crash where the driver apparently tries to read
|
||||
// (stride - width * pixelsize) bytes past the end of the last input
|
||||
// row. We only upload the first height-1 rows using GL_UNPACK_ROW_LENGTH,
|
||||
// and then we upload the final row separately. See bug 697990.
|
||||
int rowLength = stride/pixelsize;
|
||||
fPixelStorei(LOCAL_GL_UNPACK_ROW_LENGTH, rowLength);
|
||||
fTexSubImage2D(target,
|
||||
level,
|
||||
xoffset,
|
||||
yoffset,
|
||||
width,
|
||||
height-1,
|
||||
format,
|
||||
type,
|
||||
pixels);
|
||||
fPixelStorei(LOCAL_GL_UNPACK_ROW_LENGTH, 0);
|
||||
fTexSubImage2D(target,
|
||||
level,
|
||||
xoffset,
|
||||
yoffset+height-1,
|
||||
width,
|
||||
1,
|
||||
format,
|
||||
type,
|
||||
(const unsigned char *)pixels+(height-1)*stride);
|
||||
}
|
||||
fPixelStorei(LOCAL_GL_UNPACK_ALIGNMENT, 4);
|
||||
}
|
||||
|
||||
void
|
||||
GLContext::TexSubImage2DWithoutUnpackSubimage(GLenum target, GLint level,
|
||||
GLint xoffset, GLint yoffset,
|
||||
GLsizei width, GLsizei height,
|
||||
GLsizei stride, GLint pixelsize,
|
||||
GLenum format, GLenum type,
|
||||
const GLvoid* pixels)
|
||||
{
|
||||
if (stride == width * pixelsize) {
|
||||
fPixelStorei(LOCAL_GL_UNPACK_ALIGNMENT,
|
||||
NS_MIN(GetAddressAlignment((ptrdiff_t)pixels),
|
||||
GetAddressAlignment((ptrdiff_t)stride)));
|
||||
fTexSubImage2D(target,
|
||||
level,
|
||||
xoffset,
|
||||
yoffset,
|
||||
width,
|
||||
height,
|
||||
format,
|
||||
type,
|
||||
pixels);
|
||||
} else {
|
||||
// Not using the whole row of texture data and GL_UNPACK_ROW_LENGTH
|
||||
// isn't supported. We make a copy of the texture data we're using,
|
||||
// such that we're using the whole row of data in the copy. This turns
|
||||
// out to be more efficient than uploading row-by-row; see bug 698197.
|
||||
unsigned char *newPixels = new unsigned char[width*height*pixelsize];
|
||||
unsigned char *rowDest = newPixels;
|
||||
const unsigned char *rowSource = (const unsigned char *)pixels;
|
||||
for (int h = 0; h < height; h++) {
|
||||
memcpy(rowDest, rowSource, width*pixelsize);
|
||||
rowDest += width*pixelsize;
|
||||
rowSource += stride;
|
||||
}
|
||||
|
||||
stride = width*pixelsize;
|
||||
fPixelStorei(LOCAL_GL_UNPACK_ALIGNMENT,
|
||||
NS_MIN(GetAddressAlignment((ptrdiff_t)newPixels),
|
||||
GetAddressAlignment((ptrdiff_t)stride)));
|
||||
fTexSubImage2D(target,
|
||||
level,
|
||||
xoffset,
|
||||
yoffset,
|
||||
width,
|
||||
height,
|
||||
format,
|
||||
type,
|
||||
newPixels);
|
||||
delete [] newPixels;
|
||||
}
|
||||
fPixelStorei(LOCAL_GL_UNPACK_ALIGNMENT, 4);
|
||||
}
|
||||
|
||||
|
|
|
@ -1151,13 +1151,30 @@ public:
|
|||
GLint pixelsize, GLint border, GLenum format,
|
||||
GLenum type, const GLvoid *pixels);
|
||||
|
||||
|
||||
void TexSubImage2D(GLenum target, GLint level,
|
||||
GLint xoffset, GLint yoffset,
|
||||
GLsizei width, GLsizei height, GLsizei stride,
|
||||
GLint pixelsize, GLenum format,
|
||||
GLenum type, const GLvoid* pixels);
|
||||
|
||||
/**
|
||||
* Uses the Khronos GL_EXT_unpack_subimage extension, working around
|
||||
* quirks in the Tegra implementation of this extension.
|
||||
*/
|
||||
void TexSubImage2DWithUnpackSubimageGLES(GLenum target, GLint level,
|
||||
GLint xoffset, GLint yoffset,
|
||||
GLsizei width, GLsizei height,
|
||||
GLsizei stride, GLint pixelsize,
|
||||
GLenum format, GLenum type,
|
||||
const GLvoid* pixels);
|
||||
|
||||
void TexSubImage2DWithoutUnpackSubimage(GLenum target, GLint level,
|
||||
GLint xoffset, GLint yoffset,
|
||||
GLsizei width, GLsizei height,
|
||||
GLsizei stride, GLint pixelsize,
|
||||
GLenum format, GLenum type,
|
||||
const GLvoid* pixels);
|
||||
|
||||
/** Helper for DecomposeIntoNoRepeatTriangles
|
||||
*/
|
||||
struct RectTriangles {
|
||||
|
|
|
@ -24,7 +24,6 @@
|
|||
* Stuart Parmenter <stuart@mozilla.com>
|
||||
* Federico Mena-Quintero <federico@novell.com>
|
||||
* Bobby Holley <bobbyholley@gmail.com>
|
||||
* Yury Delendik
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
|
@ -73,7 +72,6 @@ ycc_rgb_convert_argb (j_decompress_ptr cinfo,
|
|||
}
|
||||
|
||||
static void cmyk_convert_rgb(JSAMPROW row, JDIMENSION width);
|
||||
static void cmyk_convert_rgb_inverted(JSAMPROW row, JDIMENSION width);
|
||||
|
||||
namespace mozilla {
|
||||
namespace imagelib {
|
||||
|
@ -101,32 +99,6 @@ GetICCProfile(struct jpeg_decompress_struct &info)
|
|||
return profile;
|
||||
}
|
||||
|
||||
#define JPEG_EMBED_MARKER (JPEG_APP0 + 12)
|
||||
|
||||
/*
|
||||
* Check for the EMBED marker for Adobe's CMYK images. When Adobe products save
|
||||
* an image with YCCK components standalone, the CMYK values are inverted;
|
||||
* however, when an image is embedded within a PDF or EPS, it contains normal
|
||||
* values. This is described in Adobe tech note #5116.
|
||||
*/
|
||||
static bool IsEmbedMarkerPresent(struct jpeg_decompress_struct *info)
|
||||
{
|
||||
jpeg_saved_marker_ptr marker;
|
||||
// Looking for the APP12 marker that has only 'EMBED\0' in its data.
|
||||
for (marker = info->marker_list; marker != NULL; marker = marker->next) {
|
||||
if (marker->marker == JPEG_EMBED_MARKER &&
|
||||
marker->data_length == 6 &&
|
||||
marker->data[0] == 0x45 &&
|
||||
marker->data[1] == 0x4D &&
|
||||
marker->data[2] == 0x42 &&
|
||||
marker->data[3] == 0x45 &&
|
||||
marker->data[4] == 0x44 &&
|
||||
marker->data[5] == 0x00)
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
METHODDEF(void) init_source (j_decompress_ptr jd);
|
||||
METHODDEF(boolean) fill_input_buffer (j_decompress_ptr jd);
|
||||
METHODDEF(void) skip_input_data (j_decompress_ptr jd, long num_bytes);
|
||||
|
@ -222,7 +194,7 @@ nsJPEGDecoder::InitInternal()
|
|||
mSourceMgr.resync_to_restart = jpeg_resync_to_restart;
|
||||
mSourceMgr.term_source = term_source;
|
||||
|
||||
/* Record app markers for ICC data and EMBED marker */
|
||||
/* Record app markers for ICC data */
|
||||
for (PRUint32 m = 0; m < 16; m++)
|
||||
jpeg_save_markers(&mInfo, JPEG_APP0 + m, 0xFFFF);
|
||||
}
|
||||
|
@ -325,14 +297,13 @@ nsJPEGDecoder::WriteInternal(const char *aBuffer, PRUint32 aCount)
|
|||
if (profileSpace == icSigRgbData)
|
||||
mInfo.out_color_space = JCS_RGB;
|
||||
else
|
||||
// qcms doesn't support ycbcr
|
||||
// qcms doesn't support ycbcr
|
||||
mismatch = true;
|
||||
break;
|
||||
case JCS_CMYK:
|
||||
case JCS_YCCK:
|
||||
// qcms doesn't support ycck
|
||||
mInvertedCMYK = !IsEmbedMarkerPresent(&mInfo);
|
||||
mismatch = true;
|
||||
// qcms doesn't support cmyk
|
||||
mismatch = true;
|
||||
break;
|
||||
default:
|
||||
mState = JPEG_ERROR;
|
||||
|
@ -400,7 +371,6 @@ nsJPEGDecoder::WriteInternal(const char *aBuffer, PRUint32 aCount)
|
|||
case JCS_YCCK:
|
||||
/* libjpeg can convert from YCCK to CMYK, but not to RGB */
|
||||
mInfo.out_color_space = JCS_CMYK;
|
||||
mInvertedCMYK = !IsEmbedMarkerPresent(&mInfo);
|
||||
break;
|
||||
default:
|
||||
mState = JPEG_ERROR;
|
||||
|
@ -656,12 +626,7 @@ nsJPEGDecoder::OutputScanlines(bool* suspend)
|
|||
/* Convert from CMYK to RGB */
|
||||
/* We cannot convert directly to Cairo, as the CMSRGBTransform may wants to do a RGB transform... */
|
||||
/* Would be better to have platform CMSenabled transformation from CMYK to (A)RGB... */
|
||||
/* When EMBED marker is present, the conversion produces the normal (not inverted) CMYK values. */
|
||||
if (mInvertedCMYK) {
|
||||
cmyk_convert_rgb_inverted((JSAMPROW)imageRow, mInfo.output_width);
|
||||
} else {
|
||||
cmyk_convert_rgb((JSAMPROW)imageRow, mInfo.output_width);
|
||||
}
|
||||
cmyk_convert_rgb((JSAMPROW)imageRow, mInfo.output_width);
|
||||
sampleRow += mInfo.output_width;
|
||||
}
|
||||
if (mCMSMode == eCMSMode_All) {
|
||||
|
@ -1203,14 +1168,14 @@ ycc_rgb_convert_argb (j_decompress_ptr cinfo,
|
|||
}
|
||||
|
||||
|
||||
/**************** CMYK -> RGB conversions **************/
|
||||
/**************** Inverted CMYK -> RGB conversion **************/
|
||||
/*
|
||||
* Input is inverted CMYK stored as 4 bytes per pixel.
|
||||
* Input is (Inverted) CMYK stored as 4 bytes per pixel.
|
||||
* Output is RGB stored as 3 bytes per pixel.
|
||||
* @param row Points to row buffer containing the CMYK bytes for each pixel in the row.
|
||||
* @param width Number of pixels in the row.
|
||||
*/
|
||||
static void cmyk_convert_rgb_inverted(JSAMPROW row, JDIMENSION width)
|
||||
static void cmyk_convert_rgb(JSAMPROW row, JDIMENSION width)
|
||||
{
|
||||
/* Work from end to front to shrink from 4 bytes per pixel to 3 */
|
||||
JSAMPROW in = row + width*4;
|
||||
|
@ -1248,32 +1213,3 @@ static void cmyk_convert_rgb_inverted(JSAMPROW row, JDIMENSION width)
|
|||
out[2] = iY*iK/255; // Blue
|
||||
}
|
||||
}
|
||||
|
||||
/**************** CMYK -> RGB conversions **************/
|
||||
/*
|
||||
* Input is CMYK stored as 4 bytes per pixel.
|
||||
* Output is RGB stored as 3 bytes per pixel.
|
||||
* @param row Points to row buffer containing the CMYK bytes for each pixel in the row.
|
||||
* @param width Number of pixels in the row.
|
||||
*/
|
||||
static void cmyk_convert_rgb(JSAMPROW row, JDIMENSION width)
|
||||
{
|
||||
/* Work from end to front to shrink from 4 bytes per pixel to 3 */
|
||||
JSAMPROW in = row + width*4;
|
||||
JSAMPROW out = in;
|
||||
|
||||
for (PRUint32 i = width; i > 0; i--) {
|
||||
in -= 4;
|
||||
out -= 3;
|
||||
|
||||
// Convert from Normal CMYK (0..255) to RGB (0..255)
|
||||
// (see also cmyk_convert_rgb_inverted above)
|
||||
const PRUint32 iC = 255 - in[0];
|
||||
const PRUint32 iM = 255 - in[1];
|
||||
const PRUint32 iY = 255 - in[2];
|
||||
const PRUint32 iK = 255 - in[3];
|
||||
out[0] = iC*iK/255; // Red
|
||||
out[1] = iM*iK/255; // Green
|
||||
out[2] = iY*iK/255; // Blue
|
||||
}
|
||||
}
|
||||
|
|
|
@ -124,7 +124,6 @@ public:
|
|||
qcms_transform *mTransform;
|
||||
|
||||
bool mReading;
|
||||
bool mInvertedCMYK;
|
||||
|
||||
PRUint32 mCMSMode;
|
||||
};
|
||||
|
|
Двоичные данные
image/test/reftest/jpeg/jpg-cmyk-embed.jpg
Двоичные данные
image/test/reftest/jpeg/jpg-cmyk-embed.jpg
Двоичный файл не отображается.
До Ширина: | Высота: | Размер: 229 B |
Двоичные данные
image/test/reftest/jpeg/jpg-cmyk-embed.png
Двоичные данные
image/test/reftest/jpeg/jpg-cmyk-embed.png
Двоичный файл не отображается.
До Ширина: | Высота: | Размер: 161 B |
Двоичные данные
image/test/reftest/jpeg/jpg-ycck-embed.jpg
Двоичные данные
image/test/reftest/jpeg/jpg-ycck-embed.jpg
Двоичный файл не отображается.
До Ширина: | Высота: | Размер: 237 B |
Двоичные данные
image/test/reftest/jpeg/jpg-ycck-embed.png
Двоичные данные
image/test/reftest/jpeg/jpg-ycck-embed.png
Двоичный файл не отображается.
До Ширина: | Высота: | Размер: 5.2 KiB |
Двоичные данные
image/test/reftest/jpeg/jpg-ycck.jpg
Двоичные данные
image/test/reftest/jpeg/jpg-ycck.jpg
Двоичный файл не отображается.
До Ширина: | Высота: | Размер: 227 B |
Двоичные данные
image/test/reftest/jpeg/jpg-ycck.png
Двоичные данные
image/test/reftest/jpeg/jpg-ycck.png
Двоичный файл не отображается.
До Ширина: | Высота: | Размер: 4.7 KiB |
|
@ -24,10 +24,6 @@
|
|||
== jpg-cmyk-1.jpg jpg-cmyk-1.png
|
||||
== jpg-cmyk-2.jpg jpg-cmyk-2.png
|
||||
== jpg-srgb-icc.jpg jpg-srgb-icc.png
|
||||
# YCCK images
|
||||
== jpg-ycck.jpg jpg-ycck.png
|
||||
== jpg-ycck-embed.jpg jpg-ycck-embed.png
|
||||
== jpg-cmyk-embed.jpg jpg-cmyk-embed.png
|
||||
|
||||
# webcam-simulacrum.mjpg is a hand-edited file containing red.jpg and blue.jpg,
|
||||
# concatenated together with the relevant headers for
|
||||
|
|
|
@ -10,4 +10,4 @@
|
|||
# hardcoded milestones in the tree from these two files.
|
||||
#--------------------------------------------------------
|
||||
|
||||
10.0a1
|
||||
11.0a1
|
||||
|
|
|
@ -109,11 +109,11 @@ random == img-and-image-1.html img-and-image-1-ref.svg # bug 645267
|
|||
# tests for external resources vs. data URIs in SVG as an image
|
||||
== svg-image-datauri-1.html lime100x100.svg
|
||||
HTTP == svg-image-datauri-1.html lime100x100.svg
|
||||
== svg-image-external-1.html blue100x100.svg
|
||||
fails-if(Android) == svg-image-external-1.html lime100x100.svg
|
||||
HTTP == svg-image-external-1.html blue100x100.svg
|
||||
== svg-stylesheet-datauri-1.html lime100x100.svg
|
||||
HTTP == svg-stylesheet-datauri-1.html lime100x100.svg
|
||||
== svg-stylesheet-external-1.html blue100x100.svg
|
||||
random == svg-stylesheet-external-1.html lime100x100.svg # see bug 629885 comment 9
|
||||
HTTP == svg-stylesheet-external-1.html blue100x100.svg
|
||||
|
||||
# test that :visited status is ignored in image documents
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
MOZ_APP_NAME=fennec
|
||||
MOZ_APP_UA_NAME=Fennec
|
||||
|
||||
MOZ_APP_VERSION=10.0a1
|
||||
MOZ_APP_VERSION=11.0a1
|
||||
|
||||
MOZ_BRANDING_DIRECTORY=mobile/branding/unofficial
|
||||
MOZ_OFFICIAL_BRANDING_DIRECTORY=mobile/branding/official
|
||||
|
|
|
@ -1 +1 @@
|
|||
1.13.0
|
||||
1.14.0
|
||||
|
|
|
@ -53,7 +53,7 @@ namespace mozilla {
|
|||
*/
|
||||
struct Module
|
||||
{
|
||||
static const unsigned int kVersion = 10;
|
||||
static const unsigned int kVersion = 11;
|
||||
|
||||
struct CIDEntry;
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче