Merge last green changeset on m-i to m-c

This commit is contained in:
Ed Morley 2011-08-26 02:17:14 +01:00
Родитель 02b448cbcd c6dbea4d8c
Коммит 051e2a7c7e
66 изменённых файлов: 85589 добавлений и 113 удалений

Просмотреть файл

@ -629,7 +629,6 @@ MSMANIFEST_TOOL = @MSMANIFEST_TOOL@
WIN32_REDIST_DIR = @WIN32_REDIST_DIR@
MOZ_MEMORY_LDFLAGS = @MOZ_MEMORY_LDFLAGS@
WIN32_CRT_LIBS = @WIN32_CRT_LIBS@
MOZ_CRT_CPU_ARCH = @MOZ_CRT_CPU_ARCH@
# This is for custom CRT building
ifdef MOZ_MEMORY

Просмотреть файл

@ -681,6 +681,12 @@ else
OUTOPTION = -o # eol
endif # WINNT && !GNU_CC
ifneq (,$(filter ml%,$(AS)))
ASOUTOPTION = -Fo# eol
else
ASOUTOPTION = -o # eol
endif
ifeq (,$(CROSS_COMPILE))
HOST_OUTOPTION = $(OUTOPTION)
else
@ -1286,7 +1292,7 @@ ifdef ASFILES
# The AS_DASH_C_FLAG is needed cause not all assemblers (Solaris) accept
# a '-c' flag.
%.$(OBJ_SUFFIX): %.$(ASM_SUFFIX) $(GLOBAL_DEPS)
$(AS) -o $@ $(ASFLAGS) $(AS_DASH_C_FLAG) $(_VPATH_SRCS)
$(AS) $(ASOUTOPTION)$@ $(ASFLAGS) $(AS_DASH_C_FLAG) $(_VPATH_SRCS)
endif
%.$(OBJ_SUFFIX): %.S $(GLOBAL_DEPS)

Просмотреть файл

@ -492,7 +492,9 @@ protected:
PRBool ValidateAttribIndex(WebGLuint index, const char *info);
PRBool ValidateStencilParamsForDrawCall();
bool ValidateGLSLIdentifier(const nsAString& name, const char *info);
bool ValidateGLSLVariableName(const nsAString& name, const char *info);
bool ValidateGLSLCharacter(PRUnichar c);
bool ValidateGLSLString(const nsAString& string, const char *info);
static PRUint32 GetTexelSize(WebGLenum format, WebGLenum type);

Просмотреть файл

@ -62,6 +62,7 @@
#endif
#include "WebGLTexelConversions.h"
#include "WebGLValidateStrings.h"
using namespace mozilla;
@ -182,8 +183,8 @@ WebGLContext::BindAttribLocation(nsIWebGLProgram *pobj, WebGLuint location, cons
if (!GetGLName<WebGLProgram>("bindAttribLocation: program", pobj, &progname))
return NS_OK;
if (name.IsEmpty())
return ErrorInvalidValue("BindAttribLocation: name can't be null or empty");
if (!ValidateGLSLVariableName(name, "bindAttribLocation"))
return NS_OK;
if (!ValidateAttribIndex(location, "bindAttribLocation"))
return NS_OK;
@ -1839,7 +1840,7 @@ WebGLContext::GetAttribLocation(nsIWebGLProgram *pobj,
if (!GetGLName<WebGLProgram>("getAttribLocation: program", pobj, &progname))
return NS_OK;
if (!ValidateGLSLIdentifier(name, "getAttribLocation"))
if (!ValidateGLSLVariableName(name, "getAttribLocation"))
return NS_OK;
MakeContextCurrent();
@ -2664,7 +2665,7 @@ WebGLContext::GetUniformLocation(nsIWebGLProgram *pobj, const nsAString& name, n
if (!GetConcreteObjectAndGLName("getUniformLocation: program", pobj, &prog, &progname))
return NS_OK;
if (!ValidateGLSLIdentifier(name, "getUniformLocation"))
if (!ValidateGLSLVariableName(name, "getUniformLocation"))
return NS_OK;
MakeContextCurrent();
@ -3166,8 +3167,8 @@ WebGLContext::RenderbufferStorage(WebGLenum target, WebGLenum internalformat, We
if (target != LOCAL_GL_RENDERBUFFER)
return ErrorInvalidEnumInfo("renderbufferStorage: target", target);
if (width <= 0 || height <= 0)
return ErrorInvalidValue("renderbufferStorage: width and height must be > 0");
if (width < 0 || height < 0)
return ErrorInvalidValue("renderbufferStorage: width and height must be >= 0");
if (!mBoundRenderbuffer || !mBoundRenderbuffer->GLName())
return ErrorInvalidOperation("renderbufferStorage called on renderbuffer 0");
@ -4131,7 +4132,10 @@ WebGLContext::ShaderSource(nsIWebGLShader *sobj, const nsAString& source)
WebGLuint shadername;
if (!GetConcreteObjectAndGLName("shaderSource: shader", sobj, &shader, &shadername))
return NS_OK;
if (!ValidateGLSLString(source, "shaderSource"))
return NS_OK;
const nsPromiseFlatString& flatSource = PromiseFlatString(source);
if (!NS_IsAscii(flatSource.get()))

Просмотреть файл

@ -328,14 +328,31 @@ PRBool WebGLContext::ValidateDrawModeEnum(WebGLenum mode, const char *info)
}
}
bool WebGLContext::ValidateGLSLIdentifier(const nsAString& name, const char *info)
bool WebGLContext::ValidateGLSLVariableName(const nsAString& name, const char *info)
{
const PRUint32 maxSize = 4095;
const PRUint32 maxSize = 255;
if (name.Length() > maxSize) {
ErrorInvalidValue("%s: identifier is %d characters long, exceeds the maximum allowed length of %d characters",
info, name.Length(), maxSize);
return false;
}
if (!ValidateGLSLString(name, info)) {
return false;
}
return true;
}
bool WebGLContext::ValidateGLSLString(const nsAString& string, const char *info)
{
for (PRUint32 i = 0; i < string.Length(); ++i) {
if (!ValidateGLSLCharacter(string.CharAt(i))) {
ErrorInvalidValue("%s: string contains the illegal character '%d'", info, string.CharAt(i));
return false;
}
}
return true;
}

Просмотреть файл

@ -0,0 +1,58 @@
/*
* Copyright (C) 2011 Apple Inc. All rights reserved.
* Copyright (C) 2011 Mozilla Corporation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef WEBGLVALIDATESTRINGS_H_
#define WEBGLVALIDATESTRINGS_H_
#include "WebGLContext.h"
namespace mozilla {
// The following function was taken from the WebKit WebGL implementation,
// which can be found here:
// http://trac.webkit.org/browser/trunk/Source/WebCore/html/canvas/WebGLRenderingContext.cpp#L123
/****** BEGIN CODE TAKEN FROM WEBKIT ******/
bool WebGLContext::ValidateGLSLCharacter(PRUnichar c)
{
// Printing characters are valid except " $ ` @ \ ' DEL.
if (c >= 32 && c <= 126 &&
c != '"' && c != '$' && c != '`' && c != '@' && c != '\\' && c != '\'')
{
return true;
}
// Horizontal tab, line feed, vertical tab, form feed, carriage return are also valid.
if (c >= 9 && c <= 13) {
return true;
}
return false;
}
/****** END CODE TAKEN FROM WEBKIT ******/
} // end namespace mozilla
#endif // WEBGLVALIDATESTRINGS_H_

Просмотреть файл

@ -13,7 +13,6 @@ conformance/gl-getshadersource.html
conformance/gl-uniform-bool.html
conformance/glsl-conformance.html
conformance/glsl-long-variable-names.html
conformance/invalid-passed-params.html
conformance/object-deletion-behaviour.html
conformance/premultiplyalpha-test.html
conformance/read-pixels-test.html

Просмотреть файл

@ -7,7 +7,6 @@ conformance/gl-getshadersource.html
conformance/gl-object-get-calls.html
conformance/glsl-conformance.html
conformance/glsl-long-variable-names.html
conformance/invalid-passed-params.html
conformance/object-deletion-behaviour.html
conformance/premultiplyalpha-test.html
conformance/program-test.html

Просмотреть файл

@ -5,7 +5,6 @@ conformance/framebuffer-object-attachment.html
conformance/gl-getshadersource.html
conformance/glsl-conformance.html
conformance/glsl-long-variable-names.html
conformance/invalid-passed-params.html
conformance/object-deletion-behaviour.html
conformance/premultiplyalpha-test.html
conformance/read-pixels-test.html

Просмотреть файл

@ -0,0 +1,44 @@
License information for hyph_hu.dic:
Derived from hyph_hu.tex in the "huhyphn" package <https://github.com/nagybence/huhyphn>,
by processing the TeX hyphenation patterns with substrings.pl.
% Huhyphn - hungarian hyphenation patterns v20110815
%
% ***** BEGIN LICENSE BLOCK *****
% Version: MPL 1.1/GPL 2.0/LGPL 2.1
%
% The contents of this file are subject to the Mozilla Public License Version
% 1.1 (the "License"); you may not use this file except in compliance with
% the License. You may obtain a copy of the License at
% http://www.mozilla.org/MPL/
%
% Software distributed under the License is distributed on an "AS IS" basis,
% WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
% for the specific language governing rights and limitations under the
% License.
%
% The Original Code is the Huhyphn - hungarian hyphenation patterns.
%
% The Initial Developer of the Original Code is
% Bence Nagy.
% Portions created by the Initial Developer are Copyright (C) 2003
% the Initial Developer. All Rights Reserved.
%
% Contributor(s):
% Bence Nagy <bence.nagy@gmail.com>
%
% 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
% the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
% in which case the provisions of the GPL or the LGPL are applicable instead
% of those above. If you wish to allow use of your version of this file only
% under the terms of either the GPL or the LGPL, and not to allow others to
% use your version of this file under the terms of the MPL, indicate your
% decision by deleting the provisions above and replace them with the notice
% and other provisions required by the GPL or the LGPL. If you do not delete
% the provisions above, a recipient may use your version of this file under
% the terms of any one of the MPL, the GPL or the LGPL.
%
% ***** END LICENSE BLOCK *****
%

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -0,0 +1,99 @@
License information for hyph_it.dic:
This file is based on the TeX hyphenation patterns distributed under the
LaTeX Project Public License (LPPL) as part of the hyph-utf8 package.
***** BEGIN LICENSE BLOCK *****
Version: MPL 1.1/GPL 2.0/LGPL 2.1
The contents of this file are subject to the Mozilla Public License Version
1.1 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.mozilla.org/MPL/
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
for the specific language governing rights and limitations under the
License.
The Original Code is Mozilla hyphenation service.
The Initial Developer of the Original Code is
Mozilla Foundation.
Portions created by the Initial Developer are Copyright (C) 2011
the Initial Developer. All Rights Reserved.
Contributor(s):
Jonathan Kew <jfkthame@gmail.com>
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
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
in which case the provisions of the GPL or the LGPL are applicable instead
of those above. If you wish to allow use of your version of this file only
under the terms of either the GPL or the LGPL, and not to allow others to
use your version of this file under the terms of the MPL, indicate your
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.
***** END LICENSE BLOCK *****
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
At the time this file was first modified, a complete, unmodified copy of
the LPPL Work was available from:
http://tug.org/svn/texhyphen/trunk/hyph-utf8/tex/generic/hyph-utf8/patterns/?pathrev=580
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Portions of this file were originally made available under the following license
(copied verbatim from hyph-it.lic.txt in the original work):
Italian hyphenation patterns
(more info about the licence to be added later)
% hyph-it.tex
%
% Italian hyphenation patterns
%
% This file is part of the hyph-utf8 package.
% For more unformation see
%
% http://tug.org/tex-hyphen
%
%------------------------------------------------------------------------------
%
%% Copyright 2008-2011 Claudio Beccari
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either
% version 1.3 of this license or (at your option) any later
% version. The latest version of this license is in
% http://www.latex-project.org/lppl.txt
% and version 1.3 or later is part of all distributions
% of LaTeX version 2003/12/01 or later.
%
% This work has the LPPL maintenance status "maintained".
%
% This Current Maintainer of this work is Claudio Beccari
% e-mail: claudio dot beccari at gmail dot com
%
% This work consists of the single file hyph-it.tex.
%
% \versionnumber{4.8i} \versiondate{2011/08/16}
%
% These hyphenation patterns for the Italian language are supposed to comply
% with the Recommendation UNI 6461 on hyphenation issued by the Italian
% Standards Institution (Ente Nazionale di Unificazione UNI). No guarantee
% or declaration of fitness to any particular purpose is given and any
% liability is disclaimed.
%
% ChangeLog:
% - 2011-08-16 - Change the licence from GNU LGPL into LPPL v1.3.
% - 2010-05-24 - Fix for Italian patterns for proper hyphenation of -ich and Ljubljana.
% - 2008-06-09 - Import of original ithyph.tex into hyph-utf8 package.
% - 2008-03-08 - (last change in ithyph.tex)
%

Просмотреть файл

@ -0,0 +1,441 @@
UTF-8
LEFTHYPHENMIN 2
RIGHTHYPHENMIN 2
.a3p2n
.a1p
.anti1
.a1n
.a2n1t
.a1nti3m2n
.anti1m
.bio1
.c2
.ca4p3s2
.ca1p
.circu2m1
.ci1r
.ci2r1c
.contro1
.co1n
.co2n1t
.cont2r
.d2
.di2s3cine
.di1s2
.dis1c
.disci1n
.e2x1eu
.e1x
.fra2n2k3
.f2r
.fra1n
.free3
.li3p2sa
.li1p
.li2p1s2
.narco1
.na1r
.na2r1c
.opto1
.o1p
.o2p1t
.orto3p2
.o1r
.o2r1t
.para1
.pa1r
.poli3p2
.po1l
.pre1
.p2r
.p2s2
.re1i2sc2r
.rei1s2
.reis1c
.sha2re3
.s2
.s1h
.sha1r
.tran2s3c
.t2r
.tra1n
.tra2n1s2
.tran2s3d
.tran2s3l
.tra1n2s3n
.tran2s3p
.t1ran2s3r
.tran2s3t
.su2b3lu
.su1b
.sub2l
.su2b3r
.wa2g3n
.wa1g
.we2l2t1
.we1l
2'2
22
a1ia
a1ie
a1io
a1iu
a1uo
a1ya
2a2t.
a1t
e1iu
e2w
o1ia
o1ie
o1io
o1iu
1b
2b1b
2b1c
2b1d
2b1f
2b1m
2b1n
2b1p
2b1s2
2b1t
2b1v
b2l
b2r
2b.
2b2'2
2b22
1c
2c1b
2c1c
2c1d
2c1f
2c1k
2c1m
2c1n
2c1q
2c1s2
2c1t
2c1z
c2h
2c2h1h
2c2h.
2ch'.
c2h2'2
2ch.
c2h22
2ch''.
ch'2'2
2ch.
ch22
2c2h1b
c2h2r
2c2h1n
c2l
c2r
2c.
2c2'2
2c22
1d
2d1b
2d1d
2d1g
2d1l
2d1m
2d1n
2d1p
d2r
2d1s2
2d1t
2d1v
2d1w
2d.
2d2'2
2d22
1f
2f1b
2f1g
2f1f
2f1n
f2l
f2r
2f1s2
2f1t
2f.
2f2'2
2f22
1g
2g1b
2g1d
2g1f
2g1g
g2h
g2l
2g1m
g2n
2g1p
g2r
2g1s2
2g1t
2g1v
2g1w
2g1z
2gh2t
2g.
2g2'2
2g22
1h
2h1b
2h1d
2h1h
hi3p2n
hi1p
h2l
2h1m
2h1n
2h1r
2h1v
2h.
2h2'2
2h22
1j
2j.
2j2'2
2j22
1k
2k1g
2k1f
k2h
2k1k
k2l
2k1m
k2r
2k1s2
2k1t
2k.
2k2'2
2k22
1l
2l1b
2l1c
2l1d
2l3f2
2l1g
l2h
l2j
2l1k
2l1l
2l1m
2l1n
2l1p
2l1q
2l1r
2l1s2
2l1t
2l1v
2l1w
2l1z
2l.
2l'.
l2'2
2l.
l22
2l2'2'2
2l222
1m
2m1b
2m1c
2m1f
2m1l
2m1m
2m1n
2m1p
2m1q
2m1r
2m1s2
2m1t
2m1v
2m1w
2m.
2m2'2
2m22
1n
2n1b
2n1c
2n1d
2n1f
2n1g
2n1k
2n1l
2n1m
2n1n
2n1p
2n1q
2n1r
2n1s2
n2s3fe1r
ns1f
2n1t
2n1v
2n1z
1n2g3n
2nhei1t
n1h
2n.
2n2'2
2n22
1p
2p1d
p2h
p2l
2p1n
3p2ne
2p1p
p2r
2p1s2
3p2si1c
2p1t
2p1z
2p.
2p2'2
2p22
1q
2q1q
2q.
2q2'2
2q22
1r
2r1b
2r1c
2r1d
2r1f
r2h
2r1g
2r1k
2r1l
2r1m
2r1n
2r1p
2r1q
2r1r
2r1s2
2r1t
r2t2s3
2r1v
2r1x
2r1w
2r1z
2r.
2r2'2
2r22
1s2
2s2h1m
s1h
2s2h.
2s2h2'2
2s2h22
2s3s2
s4s3m
2s3p2n
s1p
2s2t1b
s1t
2s2t1c
2s2t1d
2s2t1f
2s2t1g
2s2t1m
2s2t1n
2s2t1p
2s2t2s2
2s2t1t
2s2t1v
2s1z
4s.
4s'.
s2'2
4s.
s22
4s2'2'2
4s222
1t
2t1b
2t1c
2t1d
2t1f
2t1g
t2h
t2l
2t1m
2t1n
2t1p
t2r
t2s2
3t2sc2h
ts1c
2t1t
t2t3s2
2t1v
2t1w
t2z
2tz1k
t2z2s2
2t.
2t'.
t2'2
2t.
t22
2t2'2'2
2t222
1v
2v1c
v2l
v2r
2v1v
2v.
2v'.
v2'2
2v.
v22
2v2'2'2
2v222
1w
w2h
wa2r
2w1y
2w.
2w2'2
2w22
1x
2x1b
2x1c
2x1f
2x1h
2x1m
2x1p
2x1t
2x1w
2x.
2x2'2
2x22
y1ou
y1i
1z
2z1b
2z1d
2z1l
2z1n
2z1p
2z1t
2z1s2
2z1v
2z1z
2z.
2z'.
z2'2
2z.
z22
2z2'2'2
2z222
.z2

Просмотреть файл

@ -0,0 +1,91 @@
License information for hyph_tr.dic:
This file is based on the TeX hyphenation patterns distributed under the
LaTeX Project Public License (LPPL) as part of the hyph-utf8 package.
***** BEGIN LICENSE BLOCK *****
Version: MPL 1.1/GPL 2.0/LGPL 2.1
The contents of this file are subject to the Mozilla Public License Version
1.1 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.mozilla.org/MPL/
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
for the specific language governing rights and limitations under the
License.
The Original Code is Mozilla hyphenation service.
The Initial Developer of the Original Code is
Mozilla Foundation.
Portions created by the Initial Developer are Copyright (C) 2011
the Initial Developer. All Rights Reserved.
Contributor(s):
Jonathan Kew <jfkthame@gmail.com>
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
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
in which case the provisions of the GPL or the LGPL are applicable instead
of those above. If you wish to allow use of your version of this file only
under the terms of either the GPL or the LGPL, and not to allow others to
use your version of this file under the terms of the MPL, indicate your
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.
***** END LICENSE BLOCK *****
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
At the time this file was first modified, a complete, unmodified copy of
the LPPL Work was available from:
http://tug.org/svn/texhyphen/trunk/hyph-utf8/tex/generic/hyph-utf8/patterns/?pathrev=580
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Portions of this file were originally made available under the following license
(copied verbatim from hyph-tr.lic.txt in the original work):
Turkish hyphenation patterns
(more info about the licence to be added later)
% hyph-tr.tex
%
% Turkish hyphenation patterns
%
% This file is auto-generated from source/generic/hyph-utf8/languages/tr/generate_patterns_tr.rb that is part of hyph-utf8.
% Please don't modify this file; modify the generating script instead.
%
% Copyright (C) 1987 Pierre A. MacKay
% 2008, 2011 TUG
%
% This program can redistributed and/or modified under the terms
% of the LaTeX Project Public License Distributed from CTAN
% archives in directory macros/latex/base/lppl.txt; either
% version 1 of the License, or (at your option) any later version.
%
% Credits:
% - algorithm developed by P. A. MacKay for the Ottoman Texts Project in 1987
% - rules adapted for modern Turkish by H. Turgut Uyar <uyar at itu.edu.tr>
% - initiative to improve Turkish patterns by S. Ekin Kocabas <kocabas at stanford.edu>
% - script written by Mojca Miklavec <mojca.miklavec.lists at gmail.com> in June 2008
%
% See also:
% - http://www.ctan.org/tex-archive/language/turkish/hyphen/turk_hyf.c
% - http://www.tug.org/TUGboat/Articles/tb09-1/tb20mackay.pdf
%
% Differences with Ottoman patterns:
% - adapted for the use on modern TeX engines, using UTF-8 charactes
% - only letters for Modern Turkish + âîû (the first one often needed, the other two don't hurt)
% - (if needed, support for Ottoman Turkish might be provided separately under language code 'ota')
%
% Changes:
% - 2008-06-25/27/28 - create this file by adapting Ottoman rules for modern Turkish
% - 2011-08-10 - add LPPL licence with permission of Pierre A. MacKay
%

Просмотреть файл

@ -0,0 +1,607 @@
UTF-8
LEFTHYPHENMIN 2
RIGHTHYPHENMIN 2
2a1
2â1
2e1
2ı1
2i1
2î1
2o1
2ö1
2u1
2ü1
2û1
1b1
1c1
1ç1
1d1
1f1
1g1
1ğ1
1h1
1j1
1k1
1l1
1m1
1n1
1p1
1r1
1s1
1ş1
1t1
1v1
1y1
1z1
2e2cek.
e1c1
ec2e1
ece1k1
2b1b1
2b1c1
2b1ç1
2b1d1
2b1f1
2b1g1
2b1ğ1
2b1h1
2b1j1
2b1k1
2b1l1
2b1m1
2b1n1
2b1p1
2b1r1
2b1s1
2b1ş1
2b1t1
2b1v1
2b1y1
2b1z1
2c1b1
2c1c1
2c1ç1
2c1d1
2c1f1
2c1g1
2c1ğ1
2c1h1
2c1j1
2c1k1
2c1l1
2c1m1
2c1n1
2c1p1
2c1r1
2c1s1
2c1ş1
2c1t1
2c1v1
2c1y1
2c1z1
2ç1b1
2ç1c1
2ç1ç1
2ç1d1
2ç1f1
2ç1g1
2ç1ğ1
2ç1h1
2ç1j1
2ç1k1
2ç1l1
2ç1m1
2ç1n1
2ç1p1
2ç1r1
2ç1s1
2ç1ş1
2ç1t1
2ç1v1
2ç1y1
2ç1z1
2d1b1
2d1c1
2d1ç1
2d1d1
2d1f1
2d1g1
2d1ğ1
2d1h1
2d1j1
2d1k1
2d1l1
2d1m1
2d1n1
2d1p1
2d1r1
2d1s1
2d1ş1
2d1t1
2d1v1
2d1y1
2d1z1
2f1b1
2f1c1
2f1ç1
2f1d1
2f1f1
2f1g1
2f1ğ1
2f1h1
2f1j1
2f1k1
2f1l1
2f1m1
2f1n1
2f1p1
2f1r1
2f1s1
2f1ş1
2f1t1
2f1v1
2f1y1
2f1z1
2g1b1
2g1c1
2g1ç1
2g1d1
2g1f1
2g1g1
2g1ğ1
2g1h1
2g1j1
2g1k1
2g1l1
2g1m1
2g1n1
2g1p1
2g1r1
2g1s1
2g1ş1
2g1t1
2g1v1
2g1y1
2g1z1
2ğ1b1
2ğ1c1
2ğ1ç1
2ğ1d1
2ğ1f1
2ğ1g1
2ğ1ğ1
2ğ1h1
2ğ1j1
2ğ1k1
2ğ1l1
2ğ1m1
2ğ1n1
2ğ1p1
2ğ1r1
2ğ1s1
2ğ1ş1
2ğ1t1
2ğ1v1
2ğ1y1
2ğ1z1
2h1b1
2h1c1
2h1ç1
2h1d1
2h1f1
2h1g1
2h1ğ1
2h1h1
2h1j1
2h1k1
2h1l1
2h1m1
2h1n1
2h1p1
2h1r1
2h1s1
2h1ş1
2h1t1
2h1v1
2h1y1
2h1z1
2j1b1
2j1c1
2j1ç1
2j1d1
2j1f1
2j1g1
2j1ğ1
2j1h1
2j1j1
2j1k1
2j1l1
2j1m1
2j1n1
2j1p1
2j1r1
2j1s1
2j1ş1
2j1t1
2j1v1
2j1y1
2j1z1
2k1b1
2k1c1
2k1ç1
2k1d1
2k1f1
2k1g1
2k1ğ1
2k1h1
2k1j1
2k1k1
2k1l1
2k1m1
2k1n1
2k1p1
2k1r1
2k1s1
2k1ş1
2k1t1
2k1v1
2k1y1
2k1z1
2l1b1
2l1c1
2l1ç1
2l1d1
2l1f1
2l1g1
2l1ğ1
2l1h1
2l1j1
2l1k1
2l1l1
2l1m1
2l1n1
2l1p1
2l1r1
2l1s1
2l1ş1
2l1t1
2l1v1
2l1y1
2l1z1
2m1b1
2m1c1
2m1ç1
2m1d1
2m1f1
2m1g1
2m1ğ1
2m1h1
2m1j1
2m1k1
2m1l1
2m1m1
2m1n1
2m1p1
2m1r1
2m1s1
2m1ş1
2m1t1
2m1v1
2m1y1
2m1z1
2n1b1
2n1c1
2n1ç1
2n1d1
2n1f1
2n1g1
2n1ğ1
2n1h1
2n1j1
2n1k1
2n1l1
2n1m1
2n1n1
2n1p1
2n1r1
2n1s1
2n1ş1
2n1t1
2n1v1
2n1y1
2n1z1
2p1b1
2p1c1
2p1ç1
2p1d1
2p1f1
2p1g1
2p1ğ1
2p1h1
2p1j1
2p1k1
2p1l1
2p1m1
2p1n1
2p1p1
2p1r1
2p1s1
2p1ş1
2p1t1
2p1v1
2p1y1
2p1z1
2r1b1
2r1c1
2r1ç1
2r1d1
2r1f1
2r1g1
2r1ğ1
2r1h1
2r1j1
2r1k1
2r1l1
2r1m1
2r1n1
2r1p1
2r1r1
2r1s1
2r1ş1
2r1t1
2r1v1
2r1y1
2r1z1
2s1b1
2s1c1
2s1ç1
2s1d1
2s1f1
2s1g1
2s1ğ1
2s1h1
2s1j1
2s1k1
2s1l1
2s1m1
2s1n1
2s1p1
2s1r1
2s1s1
2s1ş1
2s1t1
2s1v1
2s1y1
2s1z1
2ş1b1
2ş1c1
2ş1ç1
2ş1d1
2ş1f1
2ş1g1
2ş1ğ1
2ş1h1
2ş1j1
2ş1k1
2ş1l1
2ş1m1
2ş1n1
2ş1p1
2ş1r1
2ş1s1
2ş1ş1
2ş1t1
2ş1v1
2ş1y1
2ş1z1
2t1b1
2t1c1
2t1ç1
2t1d1
2t1f1
2t1g1
2t1ğ1
2t1h1
2t1j1
2t1k1
2t1l1
2t1m1
2t1n1
2t1p1
2t1r1
2t1s1
2t1ş1
2t1t1
2t1v1
2t1y1
2t1z1
2v1b1
2v1c1
2v1ç1
2v1d1
2v1f1
2v1g1
2v1ğ1
2v1h1
2v1j1
2v1k1
2v1l1
2v1m1
2v1n1
2v1p1
2v1r1
2v1s1
2v1ş1
2v1t1
2v1v1
2v1y1
2v1z1
2y1b1
2y1c1
2y1ç1
2y1d1
2y1f1
2y1g1
2y1ğ1
2y1h1
2y1j1
2y1k1
2y1l1
2y1m1
2y1n1
2y1p1
2y1r1
2y1s1
2y1ş1
2y1t1
2y1v1
2y1y1
2y1z1
2z1b1
2z1c1
2z1ç1
2z1d1
2z1f1
2z1g1
2z1ğ1
2z1h1
2z1j1
2z1k1
2z1l1
2z1m1
2z1n1
2z1p1
2z1r1
2z1s1
2z1ş1
2z1t1
2z1v1
2z1y1
2z1z1
2a3a2
a3â2
a3e2
a3ı2
a3i2
a3î2
a3o2
a3ö2
a3u2
a3ü2
a3û2
â3a2
2â3â2
â3e2
â3ı2
â3i2
â3î2
â3o2
â3ö2
â3u2
â3ü2
â3û2
e3a2
e3â2
2e3e2
e3ı2
e3i2
e3î2
e3o2
e3ö2
e3u2
e3ü2
e3û2
ı3a2
ı3â2
ı3e2
2ı3ı2
ı3i2
ı3î2
ı3o2
ı3ö2
ı3u2
ı3ü2
ı3û2
i3a2
i3â2
i3e2
i3ı2
2i3i2
i3î2
i3o2
i3ö2
i3u2
i3ü2
i3û2
î3a2
î3â2
î3e2
î3ı2
î3i2
2î3î2
î3o2
î3ö2
î3u2
î3ü2
î3û2
o3a2
o3â2
o3e2
o3ı2
o3i2
o3î2
2o3o2
o3ö2
o3u2
o3ü2
o3û2
ö3a2
ö3â2
ö3e2
ö3ı2
ö3i2
ö3î2
ö3o2
2ö3ö2
ö3u2
ö3ü2
ö3û2
u3a2
u3â2
u3e2
u3ı2
u3i2
u3î2
u3o2
u3ö2
2u3u2
u3ü2
u3û2
ü3a2
ü3â2
ü3e2
ü3ı2
ü3i2
ü3î2
ü3o2
ü3ö2
ü3u2
2ü3ü2
ü3û2
û3a2
û3â2
û3e2
û3ı2
û3i2
û3î2
û3o2
û3ö2
û3u2
û3ü2
2û3û2
tu4r4k1
t2u1
tu1r1
m1t4ra1k1
m2t1r1
mtr2a1

Просмотреть файл

@ -681,6 +681,12 @@ else
OUTOPTION = -o # eol
endif # WINNT && !GNU_CC
ifneq (,$(filter ml%,$(AS)))
ASOUTOPTION = -Fo# eol
else
ASOUTOPTION = -o # eol
endif
ifeq (,$(CROSS_COMPILE))
HOST_OUTOPTION = $(OUTOPTION)
else
@ -1286,7 +1292,7 @@ ifdef ASFILES
# The AS_DASH_C_FLAG is needed cause not all assemblers (Solaris) accept
# a '-c' flag.
%.$(OBJ_SUFFIX): %.$(ASM_SUFFIX) $(GLOBAL_DEPS)
$(AS) -o $@ $(ASFLAGS) $(AS_DASH_C_FLAG) $(_VPATH_SRCS)
$(AS) $(ASOUTOPTION)$@ $(ASFLAGS) $(AS_DASH_C_FLAG) $(_VPATH_SRCS)
endif
%.$(OBJ_SUFFIX): %.S $(GLOBAL_DEPS)

Просмотреть файл

@ -52,6 +52,7 @@
inline bool
JSAtom::isUnitString(const void *ptr)
{
#ifdef JS_HAS_STATIC_STRINGS
jsuword delta = reinterpret_cast<jsuword>(ptr) -
reinterpret_cast<jsuword>(unitStaticTable);
if (delta >= UNIT_STATIC_LIMIT * sizeof(JSString))
@ -60,11 +61,15 @@ JSAtom::isUnitString(const void *ptr)
/* If ptr points inside the static array, it must be well-aligned. */
JS_ASSERT(delta % sizeof(JSString) == 0);
return true;
#else
return false;
#endif
}
inline bool
JSAtom::isLength2String(const void *ptr)
{
#ifdef JS_HAS_STATIC_STRINGS
jsuword delta = reinterpret_cast<jsuword>(ptr) -
reinterpret_cast<jsuword>(length2StaticTable);
if (delta >= NUM_SMALL_CHARS * NUM_SMALL_CHARS * sizeof(JSString))
@ -73,11 +78,15 @@ JSAtom::isLength2String(const void *ptr)
/* If ptr points inside the static array, it must be well-aligned. */
JS_ASSERT(delta % sizeof(JSString) == 0);
return true;
#else
return false;
#endif
}
inline bool
JSAtom::isHundredString(const void *ptr)
{
#ifdef JS_HAS_STATIC_STRINGS
jsuword delta = reinterpret_cast<jsuword>(ptr) -
reinterpret_cast<jsuword>(hundredStaticTable);
if (delta >= NUM_HUNDRED_STATICS * sizeof(JSString))
@ -86,6 +95,9 @@ JSAtom::isHundredString(const void *ptr)
/* If ptr points inside the static array, it must be well-aligned. */
JS_ASSERT(delta % sizeof(JSString) == 0);
return true;
#else
return false;
#endif
}
inline bool

Просмотреть файл

@ -205,8 +205,8 @@ MarkXML(JSTracer *trc, JSXML *xml, const char *name)
void
PushMarkStack(GCMarker *gcmarker, JSXML *thing)
{
JS_ASSERT_IF(gcmarker->context->runtime->gcCurrentCompartment,
thing->compartment() == gcmarker->context->runtime->gcCurrentCompartment);
JS_OPT_ASSERT_IF(gcmarker->context->runtime->gcCurrentCompartment,
thing->compartment() == gcmarker->context->runtime->gcCurrentCompartment);
if (thing->markIfUnmarked(gcmarker->getMarkColor()))
gcmarker->pushXML(thing);
@ -215,8 +215,8 @@ PushMarkStack(GCMarker *gcmarker, JSXML *thing)
void
PushMarkStack(GCMarker *gcmarker, JSObject *thing)
{
JS_ASSERT_IF(gcmarker->context->runtime->gcCurrentCompartment,
thing->compartment() == gcmarker->context->runtime->gcCurrentCompartment);
JS_OPT_ASSERT_IF(gcmarker->context->runtime->gcCurrentCompartment,
thing->compartment() == gcmarker->context->runtime->gcCurrentCompartment);
if (thing->markIfUnmarked(gcmarker->getMarkColor()))
gcmarker->pushObject(thing);
@ -225,8 +225,8 @@ PushMarkStack(GCMarker *gcmarker, JSObject *thing)
void
PushMarkStack(GCMarker *gcmarker, JSFunction *thing)
{
JS_ASSERT_IF(gcmarker->context->runtime->gcCurrentCompartment,
thing->compartment() == gcmarker->context->runtime->gcCurrentCompartment);
JS_OPT_ASSERT_IF(gcmarker->context->runtime->gcCurrentCompartment,
thing->compartment() == gcmarker->context->runtime->gcCurrentCompartment);
if (thing->markIfUnmarked(gcmarker->getMarkColor()))
gcmarker->pushObject(thing);
@ -235,8 +235,8 @@ PushMarkStack(GCMarker *gcmarker, JSFunction *thing)
void
PushMarkStack(GCMarker *gcmarker, JSShortString *thing)
{
JS_ASSERT_IF(gcmarker->context->runtime->gcCurrentCompartment,
thing->compartment() == gcmarker->context->runtime->gcCurrentCompartment);
JS_OPT_ASSERT_IF(gcmarker->context->runtime->gcCurrentCompartment,
thing->compartment() == gcmarker->context->runtime->gcCurrentCompartment);
(void) thing->markIfUnmarked(gcmarker->getMarkColor());
}
@ -247,8 +247,8 @@ ScanShape(GCMarker *gcmarker, const Shape *shape);
void
PushMarkStack(GCMarker *gcmarker, const Shape *thing)
{
JS_ASSERT_IF(gcmarker->context->runtime->gcCurrentCompartment,
thing->compartment() == gcmarker->context->runtime->gcCurrentCompartment);
JS_OPT_ASSERT_IF(gcmarker->context->runtime->gcCurrentCompartment,
thing->compartment() == gcmarker->context->runtime->gcCurrentCompartment);
/* We mark shapes directly rather than pushing on the stack. */
if (thing->markIfUnmarked(gcmarker->getMarkColor()))
@ -562,9 +562,9 @@ restart:
static inline void
ScanRope(GCMarker *gcmarker, JSRope *rope)
{
JS_ASSERT_IF(gcmarker->context->runtime->gcCurrentCompartment,
rope->compartment() == gcmarker->context->runtime->gcCurrentCompartment
|| rope->compartment() == gcmarker->context->runtime->atomsCompartment);
JS_OPT_ASSERT_IF(gcmarker->context->runtime->gcCurrentCompartment,
rope->compartment() == gcmarker->context->runtime->gcCurrentCompartment
|| rope->compartment() == gcmarker->context->runtime->atomsCompartment);
JS_ASSERT(rope->isMarked());
JSString *leftChild = NULL;
@ -590,9 +590,9 @@ ScanRope(GCMarker *gcmarker, JSRope *rope)
static inline void
PushMarkStack(GCMarker *gcmarker, JSString *str)
{
JS_ASSERT_IF(gcmarker->context->runtime->gcCurrentCompartment,
str->compartment() == gcmarker->context->runtime->gcCurrentCompartment
|| str->compartment() == gcmarker->context->runtime->atomsCompartment);
JS_OPT_ASSERT_IF(gcmarker->context->runtime->gcCurrentCompartment,
str->compartment() == gcmarker->context->runtime->gcCurrentCompartment
|| str->compartment() == gcmarker->context->runtime->atomsCompartment);
if (str->isLinear()) {
str->asLinear().mark(gcmarker);

Просмотреть файл

@ -1203,6 +1203,7 @@ js_NumberToStringWithBase(JSContext *cx, jsdouble d, jsint base)
if (JSDOUBLE_IS_INT32(d, &i)) {
if (base == 10 && JSAtom::hasIntStatic(i))
return &JSAtom::intStatic(i);
#ifdef JS_HAS_STATIC_STRINGS
if (jsuint(i) < jsuint(base)) {
if (i < 10)
return &JSAtom::intStatic(i);
@ -1210,6 +1211,7 @@ js_NumberToStringWithBase(JSContext *cx, jsdouble d, jsint base)
JS_ASSERT(JSAtom::hasUnitStatic(c));
return &JSAtom::unitStatic(c);
}
#endif
if (JSFlatString *str = c->dtoaCache.lookup(base, d))
return str;

Просмотреть файл

@ -2884,6 +2884,8 @@ static JSFunctionSpec string_methods[] = {
JS_FS_END
};
#ifdef JS_HAS_STATIC_STRINGS
/*
* Set up some tools to make it easier to generate large tables. After constant
* folding, for each n, Rn(0) is the comma-separated list R(0), R(1), ..., R(2^n-1).
@ -3078,6 +3080,8 @@ const JSString::Data *const JSAtom::intStaticTable[] = { R8(0) };
#undef R3
#undef R7
#endif /* defined(JS_HAS_STATIC_STRINGS) */
JSBool
js_String(JSContext *cx, uintN argc, Value *vp)
{

Просмотреть файл

@ -11475,6 +11475,7 @@ TraceRecorder::callNative(uintN argc, JSOp mode)
}
if (vp[1].isString()) {
JSString *str = vp[1].toString();
#ifdef JS_HAS_STATIC_STRINGS
if (native == js_str_charAt) {
jsdouble i = vp[2].toNumber();
if (JSDOUBLE_IS_NaN(i))
@ -11488,7 +11489,9 @@ TraceRecorder::callNative(uintN argc, JSOp mode)
set(&vp[0], char_ins);
pendingSpecializedNative = IGNORE_NATIVE_CALL_COMPLETE_CALLBACK;
return RECORD_CONTINUE;
} else if (native == js_str_charCodeAt) {
} else
#endif
if (native == js_str_charCodeAt) {
jsdouble i = vp[2].toNumber();
if (JSDOUBLE_IS_NaN(i))
i = 0;
@ -12843,6 +12846,7 @@ TraceRecorder::getCharCodeAt(JSString *str, LIns* str_ins, LIns* idx_ins, LIns**
JS_STATIC_ASSERT(sizeof(JSString) == 16 || sizeof(JSString) == 32);
#ifdef JS_HAS_STATIC_STRINGS
JS_REQUIRES_STACK LIns*
TraceRecorder::getUnitString(LIns* str_ins, LIns* idx_ins)
{
@ -12887,6 +12891,7 @@ TraceRecorder::getCharAt(JSString *str, LIns* str_ins, LIns* idx_ins, JSOp mode,
}
return RECORD_CONTINUE;
}
#endif
// Typed array tracing depends on EXPANDED_LOADSTORE and F2I
#if NJ_EXPANDED_LOADSTORE_SUPPORTED && NJ_F2I_SUPPORTED
@ -12921,6 +12926,7 @@ TraceRecorder::record_JSOP_GETELEM()
LIns* obj_ins = get(&lval);
LIns* idx_ins = get(&idx);
#ifdef JS_HAS_STATIC_STRINGS
// Special case for array-like access of strings.
if (lval.isString() && hasInt32Repr(idx)) {
if (call)
@ -12933,6 +12939,7 @@ TraceRecorder::record_JSOP_GETELEM()
set(&lval, char_ins);
return ARECORD_CONTINUE;
}
#endif
if (lval.isPrimitive())
RETURN_STOP_A("JSOP_GETLEM on a primitive");

Просмотреть файл

@ -1398,10 +1398,12 @@ class TraceRecorder
JS_REQUIRES_STACK RecordingStatus getCharCodeAt(JSString *str,
nanojit::LIns* str_ins, nanojit::LIns* idx_ins,
nanojit::LIns** out_ins);
#ifdef JS_HAS_STATIC_STRINGS
JS_REQUIRES_STACK nanojit::LIns* getUnitString(nanojit::LIns* str_ins, nanojit::LIns* idx_ins);
JS_REQUIRES_STACK RecordingStatus getCharAt(JSString *str,
nanojit::LIns* str_ins, nanojit::LIns* idx_ins,
JSOp mode, nanojit::LIns** out_ins);
#endif
JS_REQUIRES_STACK RecordingStatus initOrSetPropertyByName(nanojit::LIns* obj_ins,
Value* idvalp, Value* rvalp,

Просмотреть файл

@ -61,6 +61,10 @@ JS_BEGIN_EXTERN_C
#define JS_FREE_PATTERN 0xDA
#ifdef DEBUG
#define JS_CRASH_DIAGNOSTICS 1
#endif
#ifdef JS_CRASH_DIAGNOSTICS
#define JS_POISON(p, val, size) memset((p), (val), (size))

Просмотреть файл

@ -250,7 +250,9 @@ couldBeObjectOrString(LIns *ins)
// ins = andq ins_oprnd1, ins_oprnd2
ret = true;
#endif
} else if (ins->isop(LIR_addp) &&
}
#ifdef JS_HAS_STATIC_STRINGS
else if (ins->isop(LIR_addp) &&
((ins->oprnd1()->isImmP() &&
(void *)ins->oprnd1()->immP() == JSAtom::unitStaticTable) ||
(ins->oprnd2()->isImmP() &&
@ -262,6 +264,7 @@ couldBeObjectOrString(LIns *ins)
// ins = addp JSString::unitStringTable, ...
ret = true;
}
#endif
return ret;
}

Просмотреть файл

@ -193,6 +193,7 @@ JSExternalString::new_(JSContext *cx, const jschar *chars, size_t length, intN t
return str;
}
#ifdef JS_HAS_STATIC_STRINGS
inline bool
JSAtom::fitsInSmallChar(jschar c)
{
@ -304,6 +305,82 @@ JSAtom::lookupStatic(const jschar *chars, size_t length)
return NULL;
}
#else /* defined(JS_HAS_STATIC_STRINGS) */
inline bool
JSAtom::fitsInSmallChar(jschar c)
{
return false;
}
inline bool
JSAtom::hasUnitStatic(jschar c)
{
return false;
}
inline JSStaticAtom &
JSAtom::unitStatic(jschar c)
{
JS_NOT_REACHED("no static strings");
return *(JSStaticAtom *)NULL;
}
inline bool
JSAtom::hasUintStatic(uint32 u)
{
return false;
}
inline JSStaticAtom &
JSAtom::uintStatic(uint32 u)
{
JS_NOT_REACHED("no static strings");
return *(JSStaticAtom *)NULL;
}
inline bool
JSAtom::hasIntStatic(int32 i)
{
return false;
}
inline JSStaticAtom &
JSAtom::intStatic(jsint i)
{
JS_NOT_REACHED("no static strings");
return *(JSStaticAtom *)NULL;
}
inline JSLinearString *
JSAtom::getUnitStringForElement(JSContext *cx, JSString *str, size_t index)
{
JS_ASSERT(index < str->length());
return js_NewDependentString(cx, str, index, 1);
}
inline JSStaticAtom &
JSAtom::length2Static(jschar c1, jschar c2)
{
JS_NOT_REACHED("no static strings");
return *(JSStaticAtom *)NULL;
}
inline JSStaticAtom &
JSAtom::length2Static(uint32 i)
{
JS_NOT_REACHED("no static strings");
return *(JSStaticAtom *)NULL;
}
/* Get a static atomized string for chars if possible. */
inline JSStaticAtom *
JSAtom::lookupStatic(const jschar *chars, size_t length)
{
return NULL;
}
#endif /* defined(JS_HAS_STATIC_STRINGS) */
JS_ALWAYS_INLINE void
JSString::finalize(JSContext *cx)
{

Просмотреть файл

@ -655,24 +655,35 @@ class JSExternalString : public JSFixedString
JS_STATIC_ASSERT(sizeof(JSExternalString) == sizeof(JSString));
#if !defined(__ia64__)
/*
* Don't use static strings on ia64 since the compiler may put the static
* memory out of the acceptable 47-bit jsval pointer range.
*/
# define JS_HAS_STATIC_STRINGS
#endif
class JSAtom : public JSFixedString
{
public:
/* Exposed only for jits. */
#ifdef JS_HAS_STATIC_STRINGS
static const size_t UNIT_STATIC_LIMIT = 256U;
static const size_t SMALL_CHAR_LIMIT = 128U; /* Bigger chars cannot be in a length-2 string. */
static const size_t NUM_SMALL_CHARS = 64U;
static const size_t INT_STATIC_LIMIT = 256U;
static const size_t NUM_HUNDRED_STATICS = 156U;
#ifdef __SUNPRO_CC
# pragma align 8 (__1cGJSAtomPunitStaticTable_, __1cGJSAtomSlength2StaticTable_, __1cGJSAtomShundredStaticTable_)
#endif
# ifdef __SUNPRO_CC
# pragma align 8 (__1cGJSAtomPunitStaticTable_, __1cGJSAtomSlength2StaticTable_, __1cGJSAtomShundredStaticTable_)
# endif
static const JSString::Data unitStaticTable[];
static const JSString::Data length2StaticTable[];
static const JSString::Data hundredStaticTable[];
static const JSString::Data *const intStaticTable[];
#endif
private:
/* Defined in jsgcinlines.h */

Просмотреть файл

@ -0,0 +1,13 @@
<html class="reftest-wait">
<head>
<script>
function tweak() {
document.body.removeAttribute('style');
document.documentElement.removeAttribute("class");
}
</script>
</head>
<body style="display: inline; mask: url(#a);" onload="setTimeout(tweak, 50)">
<input id="g" style="display: block; mask: url(#g);">
</body>
</html>

Просмотреть файл

@ -369,3 +369,4 @@ asserts(2) load text-overflow-bug670564.xhtml # asserts(2) for bug 436470
load text-overflow-bug671796.xhtml
load 667025.html
asserts(14) load 673770.html # bug 569193 and bug 459597
load 679933-1.html

Просмотреть файл

@ -441,6 +441,20 @@ nsFrame::DestroyFrom(nsIFrame* aDestructRoot)
}
}
// If we have an IB split special sibling, clear its reference to us.
// (Note: This has to happen before we call shell->NotifyDestroyingFrame,
// because that clears our Properties() table.)
if (mState & NS_FRAME_IS_SPECIAL) {
nsIFrame* nextSib = static_cast<nsIFrame*>
(Properties().Get(nsIFrame::IBSplitSpecialSibling()));
if (nextSib) {
NS_WARN_IF_FALSE(this ==
nextSib->Properties().Get(nsIFrame::IBSplitSpecialPrevSibling()),
"Next-sibling / prev-sibling chain is inconsistent");
nextSib->Properties().Delete(nsIFrame::IBSplitSpecialPrevSibling());
}
}
shell->NotifyDestroyingFrame(this);
if ((mState & NS_FRAME_EXTERNAL_REFERENCE) ||

Просмотреть файл

@ -0,0 +1,11 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body>
<div style="width:1em; -moz-hyphens:manual;" lang="hu">
Min&shy;den em&shy;be&shy;ri lény sza&shy;ba&shy;don szü&shy;le&shy;tik és egyen&shy;lő mél&shy;&shy;&shy;ga és jo&shy;ga van.
</div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,11 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body>
<div style="width:1em; -moz-hyphens:auto;" lang="hu">
Minden emberi lény szabadon születik és egyenlő méltósága és joga van.
</div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,11 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body>
<div style="width:1em; -moz-hyphens:manual;" lang="it">
Tut&shy;ti gli es&shy;se&shy;ri uma&shy;ni na&shy;sco&shy;no li&shy;be&shy;ri ed egua&shy;li in di&shy;gni&shy;tà e di&shy;rit&shy;ti.
</div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,11 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body>
<div style="width:1em; -moz-hyphens:auto;" lang="it">
Tutti gli esseri umani nascono liberi ed eguali in dignità e diritti.
</div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,11 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body>
<div style="width:1em; -moz-hyphens:manual;" lang="tr">
&shy;tün in&shy;san&shy;lar hür, hay&shy;si&shy;yet ve hak&shy;lar ba&shy;kı&shy;mın&shy;dan eşit do&shy;ğar&shy;lar.
</div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,11 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body>
<div style="width:1em; -moz-hyphens:auto;" lang="tr">
Bütün insanlar hür, haysiyet ve haklar bakımından eşit doğarlar.
</div>
</body>
</html>

Просмотреть файл

@ -115,8 +115,10 @@ random-if(!winWidget) == arial-bold-lam-alef-1.html arial-bold-lam-alef-1-ref.ht
== auto-hyphenation-gl-1.html auto-hyphenation-gl-1-ref.html
== auto-hyphenation-hr-1.html auto-hyphenation-hr-1-ref.html
== auto-hyphenation-hsb-1.html auto-hyphenation-hsb-1-ref.html
== auto-hyphenation-hu-1.html auto-hyphenation-hu-1-ref.html
== auto-hyphenation-ia-1.html auto-hyphenation-ia-1-ref.html
== auto-hyphenation-is-1.html auto-hyphenation-is-1-ref.html
== auto-hyphenation-it-1.html auto-hyphenation-it-1-ref.html
== auto-hyphenation-kmr-1.html auto-hyphenation-kmr-1-ref.html
== auto-hyphenation-la-1.html auto-hyphenation-la-1-ref.html
== auto-hyphenation-lt-1.html auto-hyphenation-lt-1-ref.html
@ -131,4 +133,5 @@ random-if(!winWidget) == arial-bold-lam-alef-1.html arial-bold-lam-alef-1-ref.ht
== auto-hyphenation-sr-1.html auto-hyphenation-sr-1-ref.html
== auto-hyphenation-sv-1.html auto-hyphenation-sv-1-ref.html # test swedish patterns
!= auto-hyphenation-sv-1.html auto-hyphenation-sv-1-notref.html # verify swedish != english
== auto-hyphenation-tr-1.html auto-hyphenation-tr-1-ref.html
== auto-hyphenation-uk-1.html auto-hyphenation-uk-1-ref.html

Просмотреть файл

@ -724,6 +724,9 @@ var Browser = {
newTab.chromeTab.dispatchEvent(event);
newTab.browser.messageManager.sendAsyncMessage("Browser:TabOpen");
let cmd = document.getElementById("cmd_showTabs");
cmd.setAttribute("label", this._tabs.length - 1);
return newTab;
},
@ -738,6 +741,9 @@ var Browser = {
}
tab.browser.messageManager.sendAsyncMessage("Browser:CanUnload", {});
let cmd = document.getElementById("cmd_showTabs");
cmd.setAttribute("label", this._tabs.length - 1);
},
_doCloseTab: function _doCloseTab(aTab) {
@ -834,7 +840,10 @@ var Browser = {
if (tab)
tab.active = true;
if (!isFirstTab) {
if (isFirstTab) {
// Don't waste time at startup updating the whole UI; just display the URL.
BrowserUI._titleChanged(browser);
} else {
// Update all of our UI to reflect the new tab's location
BrowserUI.updateURI();
getIdentityHandler().checkIdentity();
@ -2801,8 +2810,9 @@ Tab.prototype = {
// Make sure the viewport height is not shorter than the window when
// the page is zoomed out to show its full width.
if (viewportH * this.clampZoomLevel(this.getPageZoomLevel()) < screenH)
viewportH = Math.max(viewportH, screenH * (browser.contentDocumentWidth / screenW));
let pageZoomLevel = this.getPageZoomLevel(screenW);
let minScale = this.clampZoomLevel(pageZoomLevel, pageZoomLevel);
viewportH = Math.max(viewportH, screenH / minScale);
if (browser.contentWindowWidth != viewportW || browser.contentWindowHeight != viewportH)
browser.setWindowSize(viewportW, viewportH);
@ -2934,11 +2944,23 @@ Tab.prototype = {
}
},
clampZoomLevel: function clampZoomLevel(aScale) {
/**
* Takes a scale and restricts it based on this tab's zoom limits.
* @param aScale The original scale.
* @param aPageZoomLevel (optional) The zoom-to-fit scale, if known.
* This is a performance optimization to avoid extra calls.
*/
clampZoomLevel: function clampZoomLevel(aScale, aPageZoomLevel) {
let md = this.metadata;
if (!this.allowZoom) {
return (md && md.defaultZoom)
? md.defaultZoom
: (aPageZoomLevel || this.getPageZoomLevel());
}
let browser = this._browser;
let bounded = Util.clamp(aScale, ZoomManager.MIN, ZoomManager.MAX);
let md = this.metadata;
if (md && md.minZoom)
bounded = Math.max(bounded, md.minZoom);
if (md && md.maxZoom)
@ -3017,12 +3039,18 @@ Tab.prototype = {
return this.clampZoomLevel(pageZoom);
},
getPageZoomLevel: function getPageZoomLevel() {
/**
* @param aScreenWidth (optional) The width of the browser widget, if known.
* This is a performance optimization to save extra calls to getBoundingClientRect.
* @return The scale at which the browser will be zoomed out to fit the document width.
*/
getPageZoomLevel: function getPageZoomLevel(aScreenWidth) {
let browserW = this._browser.contentDocumentWidth;
if (browserW == 0)
return 1.0;
return this._browser.getBoundingClientRect().width / browserW;
let screenW = aScreenWidth || this._browser.getBoundingClientRect().width;
return screenW / browserW;
},
get allowZoom() {

Просмотреть файл

@ -102,7 +102,7 @@
<command id="cmd_openLocation" oncommand="CommandUpdater.doCommand(this.id);"/>
<!-- tabs -->
<command id="cmd_showTabs" label="&showTabs.label;" oncommand="CommandUpdater.doCommand(this.id);"/>
<command id="cmd_showTabs" oncommand="CommandUpdater.doCommand(this.id);"/>
<command id="cmd_newTab" label="&newtab.label;" oncommand="CommandUpdater.doCommand(this.id);"/>
<command id="cmd_closeTab" label="&closetab.label;" oncommand="CommandUpdater.doCommand(this.id);"/>
#ifdef MOZ_SERVICES_SYNC
@ -222,6 +222,7 @@
<toolbar id="toolbar-main" class="panel-dark window-width" observes="bcast_urlbarState">
<toolbarbutton id="tool-back2" class="tool-back button-actionbar" command="cmd_back"/>
<toolbarbutton id="tool-forward2" class="tool-forward button-actionbar" command="cmd_forward"/>
<toolbarbutton id="tool-tabs" class="button-actionbar" command="cmd_showTabs"/>
#ifdef MOZ_PLATFORM_MAEMO
#if MOZ_PLATFORM_MAEMO != 6
<toolbarbutton id="tool-app-switch" oncommand="BrowserUI.switchTask();"/>
@ -261,8 +262,8 @@
</hbox>
</hbox>
<toolbarbutton id="tool-star2" class="tool-star button-actionbar" command="cmd_star"/>
<spacer class="spacer-actionbar" flex="1"/>
<toolbarbutton id="tool-menu" class="button-actionbar" command="cmd_menu"/>
<toolbarbutton id="tool-tabs" class="button-actionbar" command="cmd_showTabs"/>
#ifndef ANDROID
<toolbarbutton id="tool-app-close" class="urlbar-button" command="cmd_close"/>
#endif

Просмотреть файл

@ -1578,6 +1578,7 @@ setting {
/* Tablet mode */
.spacer-actionbar,
.button-actionbar {
visibility: collapse;
}
@ -1590,6 +1591,7 @@ setting {
background-color: #8db8d8;
}
#toolbar-main[tablet="true"] > .spacer-actionbar,
#toolbar-main[tablet="true"] > .button-actionbar {
visibility: visible;
}

Просмотреть файл

@ -1544,6 +1544,7 @@ setting {
/* Tablet mode */
.spacer-actionbar,
.button-actionbar {
visibility: collapse;
}
@ -1556,6 +1557,7 @@ setting {
background-color: #8db8d8;
}
#toolbar-main[tablet="true"] > .spacer-actionbar,
#toolbar-main[tablet="true"] > .button-actionbar {
visibility: visible;
}

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -0,0 +1,223 @@
%filter substitution
%define color_background_active #fff
%define color_text_active #222222
%define color_background_default_window #fff
%define color_background_default rgba(255,255,255,0.95)
%define color_text_default #222222
%define color_divider_border #333333
%define color_button_border #5a5a5a
%define color_background_dialog #fff
%define color_text_dialog #000
%define color_dialog_border #5a5a5a
%define color_background_dlgbuttons #9a9a9a
%define color_background_panel #d6d6d6
%define color_text_panel #000
%define color_background_header #292929
%define color_text_header #999999
%define color_background_scroller #9a9a9a
%define color_background_textbox #fff
%define color_text_textbox #000
%define color_text_button #000
%define color_text_disabled #808080
%define color_text_placeholder #808080
%define color_text_as_link #febc2b
%define color_background_highlight #a7c5f4
%define color_background_highlight_overlay rgba(167, 197, 244, 0.8)
%define color_text_highlight #000
%define color_selection #c0e49a
%define color_subtext_default #aaaaaa
%ifdef ANDROID
%define font_xlarge 6.08mozmm
%define font_xnormal 3.75mozmm
%define font_normal 3.54mozmm
%define font_snormal 3mozmm
%define font_small 2.91mozmm
%define font_xsmall 2.69mozmm
%define font_tiny 2.48mozmm
%define font_xtiny 2.27mozmm
%define touch_row 10.41mozmm
%define touch_button_xlarge 10.62mozmm
%define touch_button_large 9.77mozmm
%define touch_button_small 8.93mozmm
%define touch_button_minwidth 11.86mozmm
%define touch_action_minwidth 21.17mozmm
%define touch_normal 6.77mozmm
%define margin_context_popup 3.39mozmm
%define margin_large 2.54mozmm
%define margin_xxxnormal 1.69mozmm
%define margin_xnormal 1.06mozmm
%define margin_normal 0.85mozmm
%define margin_snormal 0.64mozmm
%define margin_small 0.42mozmm
%define margin_tiny 0.21mozmm
%define margin_xtiny 0.11mozmm
%define padding_xlarge 3.39mozmm
%define padding_large 2.54mozmm
%define padding_xxxnormal 1.69mozmm
%define padding_xxnormal 1.27mozmm
%define padding_xnormal 1.06mozmm
%define padding_normal 0.85mozmm
%define padding_snormal 0.64mozmm
%define padding_small 0.42mozmm
%define padding_xsmall 0.21mozmm
%define padding_tiny 0.11mozmm
%define border_width_xxlarge 0.64mozmm
%define border_width_xlarge 0.42mozmm
%define border_width_large 0.32mozmm
%define border_width_small 0.21mozmm
%define border_width_tiny 0.11mozmm
%define border_radius_normal 0.85mozmm
%define border_radius_small 0.64mozmm
%define border_radius_tiny 0.21mozmm
%define shadow_width_xlarge 1.06mozmm
%define shadow_width_large 0.64mozmm
%define shadow_width_small 0.21mozmm
%define textbox_height 5.08mozmm
%define dropmarker_padding 0.53mozmm
%define progressmeter_height 3.39mozmm
%define urlbar_edit_height 6.35mozmm
%define urlbar_edit_indent 0.85mozmm
%define urlbar_max_width 96mozmm
%define scroller_thickness 0.64mozmm
%define scroller_minimum 1.27mozmm
%define sidebar_width_minimum 8.47mozmm
%define sidebar_button_height 7.41mozmm
%define documenttab_margin_bottom 0.85mozmm
%define placelabel_padding 8.47mozmm
%define placeitem_padding 4.23mozmm
%define autocomplete_item_container_image_padding 0.53mozmm
%define autocomplete_item_container_position 0.21mozmm
%define autocomplete_item_container_size 2.75mozmm
%define autocomplete_item_container_padding 5.08mozmm
%define autocomplete_item_subtitle_margin 2.75mozmm
%define autocomplete_item_label_margin 3.18mozmm
%define autocomplete_item_tags_margin 3.39mozmm
%define autocompleteresult_padding 0.53mozmm
%define dialog_width 76.2mozmm
%define appmenu_portrait_height 21.17mozmm
%define appmenu_button_height 10.48mozmm
%define tablet_panel_controls 40mozmm
%define tablet_panel_minwidth 124mozmm
%else
%define font_xlarge 48px
%define font_xnormal 26px
%define font_normal 24px
%define font_snormal 20px
%define font_small 18px
%define font_xsmall 16px
%define font_tiny 14px
%define font_xtiny 12px
%define touch_row 70px
%define touch_button_xlarge 72px
%define touch_button_large 64px
%define touch_button_small 56px
%define touch_button_minwidth 112px
%define touch_action_minwidth 200px
%define touch_normal 64px
%define margin_context_popup 32px
%define margin_large 24px
%define margin_xxxnormal 16px
%define margin_xnormal 10px
%define margin_normal 8px
%define margin_snormal 6px
%define margin_small 4px
%define margin_tiny 2px
%define margin_xtiny 1px
%define padding_xlarge 32px
%define padding_large 24px
%define padding_xxxnormal 16px
%define padding_xxnormal 12px
%define padding_xnormal 10px
%define padding_normal 8px
%define padding_snormal 6px
%define padding_small 4px
%define padding_xsmall 2px
%define padding_tiny 1px
%define border_width_xxlarge 6px
%define border_width_xlarge 4px
%define border_width_large 3px
%define border_width_small 2px
%define border_width_tiny 1px
%define border_radius_normal 8px
%define border_radius_small 6px
%define border_radius_tiny 2px
%define shadow_width_xlarge 10px
%define shadow_width_large 6px
%define shadow_width_small 2px
%define textbox_height 48px
%define dropmarker_margin 5px
%define progressmeter_height 32px
%define urlbar_edit_height 60px
%define urlbar_edit_indent 8px
%define urlbar_max_width 596px
%define scroller_thickness 6px
%define scroller_minimum 12px
%define sidebar_width_minimum 80px
%define sidebar_button_height 70px
%define documenttab_margin_bottom 8px
%define placelabel_padding 80px
%define placeitem_padding 40px
%define autocomplete_item_container_image_padding 5px
%define autocomplete_item_container_position 2px
%define autocomplete_item_container_size 26px
%define autocomplete_item_container_padding 48px
%define autocomplete_item_subtitle_margin 26px
%define autocomplete_item_label_margin 30px
%define autocomplete_item_tags_margin 32px
%define autocompleteresult_padding 5px
%define dialog_width 500px
%define appmenu_portrait_height 200px
%define appmenu_button_height 99px
%define tablet_panel_controls 270px
%define tablet_panel_minwidth 801px
%endif
%ifdef MOZ_PLATFORM_MAEMO
%define orientation -moz-device-orientation
%elifdef ANDROID
%define orientation -moz-device-orientation
%else
%define orientation orientation
%endif

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 1.2 KiB

После

Ширина:  |  Высота:  |  Размер: 649 B

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 1.8 KiB

После

Ширина:  |  Высота:  |  Размер: 1.2 KiB

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 2.6 KiB

После

Ширина:  |  Высота:  |  Размер: 1.2 KiB

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 1.1 KiB

После

Ширина:  |  Высота:  |  Размер: 594 B

Двоичные данные
mobile/themes/core/honeycomb/images/menu-hdpi.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 419 B

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 1.6 KiB

После

Ширина:  |  Высота:  |  Размер: 483 B

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 1.5 KiB

После

Ширина:  |  Высота:  |  Размер: 1.1 KiB

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 737 B

После

Ширина:  |  Высота:  |  Размер: 773 B

Двоичные данные
mobile/themes/core/honeycomb/images/tabs-hdpi.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 802 B

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 182 B

Двоичные данные
mobile/themes/core/honeycomb/images/urlbar-border-bottom.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 182 B

Двоичные данные
mobile/themes/core/honeycomb/images/urlbar-border-side-active.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 185 B

Двоичные данные
mobile/themes/core/honeycomb/images/urlbar-border-side.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 185 B

Просмотреть файл

@ -0,0 +1,772 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is Mozilla Mobile Browser.
*
* The Initial Developer of the Original Code is
* Mozilla Corporation.
* Portions created by the Initial Developer are Copyright (C) 2008
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Mark Finkle <mfinkle@mozilla.com>
*
* 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
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
/* global skin ------------------------------------------------------------- */
@import url(chrome://global/skin/);
%filter substitution
%include defines.inc
/* general stuff ------------------------------------------------------------ */
:root {
font-family: "Nokia Sans", Tahoma, sans-serif !important;
font-size: @font_normal@ !important;
background-color: @color_background_default_window@; /* force */
color: @color_text_default@; /* force */
}
::-moz-selection {
background-color: @color_selection@;
color: @color_text_highlight@;
}
menu,
menuitem {
padding: 0 !important;
margin: 0 !important;
}
description,
label {
/* force mac to use the same margins as windows and linux */
-moz-margin-start: @margin_snormal@;
-moz-margin-end: @margin_snormal@;
}
/* Override any OS inverse themes */
textbox {
color: @color_text_textbox@;
background-color: @color_background_textbox@;
}
/* textboxes --------------------------------------------------------------- */
textbox:not([type="number"]) {
min-height: @textbox_height@;
border: @border_width_small@ solid @color_button_border@;
-moz-border-top-colors: -moz-initial;
-moz-border-right-colors: -moz-initial;
-moz-border-bottom-colors: -moz-initial;
-moz-border-left-colors: -moz-initial;
}
textbox[isempty="true"] {
color: @color_text_placeholder@;
}
textbox.search-bar {
border: @border_width_small@ solid rgba(0,0,0,0.4);
background-color: #f9f9f9;
background: url("chrome://browser/skin/images/textbox-bg.png") top left repeat-x;
background-size: 100% 100%;
}
textbox[disabled="true"] {
background-color: lightgray;
}
.link {
color: @color_text_as_link@;
text-decoration: underline;
}
/* sidebars spacer --------------------------------------------------------- */
.sidebar-spacer {
background-color: #767973;
}
/* prompt dialogs ---------------------------------------------------------- */
.context-block,
.modal-block,
.perm-modal-block {
-moz-box-align: center;
-moz-box-pack: center;
background-color: rgba(0,0,0,.6);
}
.context-block {
padding: @margin_context_popup@;
}
.dialog-dark,
.panel-arrowcontent {
background-color: @color_background_dialog@;
box-shadow: black 0 @border_radius_tiny@ @border_radius_tiny@, black 0 -@border_radius_tiny@ @border_radius_tiny@;
padding: 0;
}
@media (max-width: 499px) {
.context-block {
padding: @padding_xlarge@;
}
}
dialog > .prompt-header > .prompt-message {
white-space: pre-wrap;
}
dialog > .prompt-header > .button-checkbox {
margin-left: @margin_large@;
}
/* buttons ----------------------------------------------------------------- */
.button-text,
.toolbarbutton-text {
font-weight: normal;
font-size: @font_snormal@ !important;
}
button {
-moz-appearance: none;
min-width: @touch_button_minwidth@ !important;
min-height: @touch_button_small@ !important; /* button size */
color: @color_text_button@;
margin: @margin_normal@;
padding: @padding_xnormal@;
background-image: url("chrome://browser/skin/images/button-bg.png");
background-size: auto 100%;
border: @border_width_tiny@ solid @color_button_border@;
}
button[disabled="true"] {
color: @color_text_disabled@ !important;
border: @border_width_tiny@ solid @color_button_border@ !important;
}
button:focus > .button-box {
border: @border_width_tiny@ solid transparent;
}
button:not([disabled]):hover:active,
button:not([disabled])[checked="true"] {
background-image: url("chrome://browser/skin/images/toggle-off.png");
}
/* Override GTK2 system setting */
.button-icon {
display: -moz-initial !important;
}
/* spinbuttons ------------------------------------------------------------- */
spinbuttons {
border: none !important;
}
.numberbox-input-box {
border: @border_width_small@ solid @color_button_border@;
border-right: 0 solid transparent;
-moz-border-top-colors: -moz-initial;
-moz-border-bottom-colors: -moz-initial;
-moz-border-left-colors: -moz-initial;
}
.numberbox-input-box:-moz-locale-dir(rtl) {
border-right: @border_width_small@ solid @color_button_border@;
border-left: 0 solid transparent;
}
.spinbuttons-box {
border: none !important;
-moz-box-orient: horizontal !important;
-moz-box-direction: reverse !important;
}
.spinbuttons-up .button-icon,
.spinbuttons-down .button-icon {
display: block;
}
.spinbuttons-up,
.spinbuttons-down {
-moz-appearance: none !important;
min-width: @touch_button_small@ !important; /* button size */
min-height: @touch_button_small@ !important; /* button size */
color: @color_text_button@;
margin: @margin_normal@;
padding: @padding_xnormal@;
background-image: url("chrome://browser/skin/images/button-bg.png");
background-size: auto 100%;
border: @border_width_tiny@ solid @color_button_border@;
list-style-image: url("chrome://browser/skin/images/arrowdown-16.png");
}
.spinbuttons-up:hover:active:not([disabled=true]),
.spinbuttons-down:hover:active:not([disabled=true]) {
background-image: url("chrome://browser/skin/images/toggle-on.png");
}
.spinbuttons-up {
list-style-image: url("chrome://browser/skin/images/arrowup-16.png");
}
/* toolbar buttons --------------------------------------------------------- */
toolbar {
-moz-appearance: none;
background-color: @color_background_default@;
max-height: @touch_button_large@;
}
toolbarbutton {
min-width: @touch_button_xlarge@ !important; /* primary button size */
min-height: @touch_button_xlarge@ !important; /* primary button size */
-moz-appearance: none !important;
padding: @padding_xsmall@;
-moz-margin-end: @margin_xxxnormal@;
}
toolbarbutton:not(.show-text) .toolbarbutton-text {
display: none;
}
.toolbarbutton-icon[label]:not([label=""]),
.toolbarbutton-icon[type="menu"] {
-moz-margin-end: @margin_tiny@;
}
toolbarbutton:not(.show-text) .toolbarbutton-icon,
toolbarbutton:not([image]) .toolbarbutton-icon,
toolbarbutton[image=''] .toolbarbutton-icon {
-moz-margin-end: 0;
}
toolbarbutton:hover,
toolbarbutton:hover:active,
toolbarbutton[open="true"] {
border-color: transparent;
}
toolbarbutton:not([disabled="true"]):active,
toolbarbutton:not([disabled="true"])[open="true"] {
background-color: @color_background_highlight@;
}
/* checkbox buttons ----------------------------------------------------------- */
.button-checkbox {
padding: 0 !important;
background: none !important;
border: none !important;
-moz-border-image: none !important;
color: @color_text_default@;
-moz-box-align: center;
font-size: @font_small@;
-moz-box-align: center;
}
.prompt-checkbox-label {
text-align: left;
}
.button-checkbox > .button-image-icon {
-moz-margin-end: @margin_normal@;
list-style-image: url("chrome://browser/skin/images/check-unselected-hdpi.png");
}
.button-checkbox[checked="true"] > .button-image-icon {
list-style-image: url("chrome://browser/skin/images/check-selected-hdpi.png");
}
.button-checkbox > .button-box,
.button-checkbox:hover:active > .button-box,
.button-checkbox[checked="true"] > .button-box {
padding-top: @padding_tiny@;
padding-bottom: @padding_xsmall@;
-moz-padding-start: @padding_small@;
-moz-padding-end: @padding_small@;
}
/* radio buttons ----------------------------------------------------------- */
radiogroup {
-moz-box-orient: horizontal;
}
.radio-label {
font-weight: normal;
font-size: @font_snormal@ !important;
}
radio {
-moz-appearance: none;
min-width: @touch_button_small@ !important; /* button size */
min-height: @touch_button_small@ !important; /* button size */
color: @color_text_button@;
padding: @padding_xnormal@;
margin: 0;
background-image: url("chrome://browser/skin/images/button-bg.png");
background-size: auto 100%;
border-top: @border_width_tiny@ solid @color_button_border@;
border-bottom: @border_width_tiny@ solid @color_button_border@;
}
radio .radio-icon, radio .radio-check {
display: none;
}
radio:not([disabled=true]):hover:active,
radio[selected] {
color: white;
background-image: url("chrome://browser/skin/images/toggle-on.png");
}
radio:first-child {
border-left: @border_width_tiny@ solid @color_button_border@;
}
radio:first-child:-moz-locale-dir(rtl) {
border-left: none;
border-right: @border_width_tiny@ solid @color_button_border@;
}
radio:last-child {
border-right: @border_width_tiny@ solid @color_button_border@;
}
radio:last-child:-moz-locale-dir(rtl) {
border-right: none;
border-left: @border_width_tiny@ solid @color_button_border@;
}
radio[focused="true"] > .radio-label-box {
border: @border_width_tiny@ solid transparent;
}
/* checkbox --------------------------------------------------------------- */
checkbox {
margin: @margin_tiny@ @margin_small@ @margin_tiny@ @margin_small@; /* match platform style for buttons */
-moz-binding: url("chrome://global/content/bindings/checkbox.xml#checkbox-with-spacing") !important;
}
/* stop the focus from moving/showing the border around the label, which we don't use */
checkbox:focus > .checkbox-label-center-box > .checkbox-label-box {
border: 1px solid transparent;
}
.checkbox-check {
border: 2px transparent;
-moz-border-top-colors: -moz-initial;
-moz-border-right-colors: -moz-initial;
-moz-border-bottom-colors: -moz-initial;
-moz-border-left-colors: -moz-initial;
width: 46px;
height: 46px;
background: url("chrome://browser/skin/images/check-unselected-hdpi.png") no-repeat 50% 50%;
}
checkbox[checked="true"] > .checkbox-spacer-box > .checkbox-check {
background-image: url("chrome://browser/skin/images/check-selected-hdpi.png");
}
checkbox[checked="true"][disabled="true"] > .checkbox-spacer-box > .checkbox-check {
background-image: url("chrome://browser/skin/images/check-selected-hdpi.png");
}
/* richlistbox ------------------------------------------------------------- */
richlistbox {
color: @color_text_default@;
background-color: @color_background_default@;
-moz-user-focus: ignore;
margin: 0;
}
richlistitem {
-moz-user-focus: ignore;
min-height: @touch_row@; /* row size */
padding: @padding_small@;
border-bottom: @border_width_tiny@ solid @color_divider_border@;
}
richlistitem label.title,
richlistitem description.title {
font-size: @font_normal@ !important;
}
richlistitem label.normal,
richlistitem description.normal {
color: @color_subtext_default@;
font-size: @font_small@ !important;
white-space: pre-wrap;
word-wrap: break-word;
}
richlistitem label.normal-black,
richlistitem description.normal-black {
font-size: @font_small@ !important;
white-space: pre-wrap;
word-wrap: break-word;
}
richlistitem label.normal-bold,
richlistitem description.normal-bold {
font-weight: bold;
font-size: @font_small@ !important;
white-space: pre-wrap;
word-wrap: break-word;
}
richlistitem[selected="true"] {
color: @color_text_default@;
background-color: @color_background_default@;
}
richlistitem:hover:active:not([selected="true"]):not([nohighlight="true"]),
richlistitem:hover:active:not([selected="true"]):not([nohighlight="true"]) label.normal,
richlistitem:hover:active:not([selected="true"]):not([nohighlight="true"]) description.normal {
background-color: @color_background_highlight@;
color: @color_text_highlight@;
}
richlistitem.section-header,
richlistitem[selected="true"].section-header {
font-weight: bold;
color: @color_text_header@;
background-color: @color_background_header@;
}
richlistitem .show-on-select {
visibility: collapse;
}
richlistitem[selected="true"] .show-on-select {
visibility: visible;
}
richlistitem .hide-on-select {
visibility: visible;
}
richlistitem[selected="true"] .hide-on-select {
visibility: collapse;
}
richlistitem[typeName="message"] {
border-bottom: 0;
}
/* colorpicker ------------------------------------------------------------- */
colorpicker > panel {
background-color: #767973;
}
colorpicker > vbox {
background-color: #767973;
}
/* textbox ----------------------------------------------------------------- */
.textbox-search-icon {
list-style-image: url("chrome://browser/skin/images/search-glass-30.png");
-moz-image-region: auto;
}
.textbox-search-clear {
list-style-image: url("chrome://browser/skin/images/search-clear-30.png");
-moz-image-region: auto;
}
/* menulist ---------------------------------------------------------------- */
.menulist-label {
font-family: "Nokia Sans", Tahoma, sans-serif !important;
font-weight: normal;
font-size: @font_snormal@ !important;
background-color: transparent !important;
}
menulist {
-moz-appearance: none !important;
-moz-user-focus: ignore;
min-width: @touch_button_minwidth@ !important;
min-height: @touch_button_small@ !important; /* button size */
color: @color_text_button@ !important;
margin: @margin_normal@;
padding: @padding_small@ @padding_xnormal@;
background-image: url("chrome://browser/skin/images/button-bg.png");
background-size: auto 100%;
border: @border_width_tiny@ solid @color_button_border@;
}
menulist[disabled="true"] {
color: @color_text_disabled@ !important;
border: @border_width_tiny@ solid @color_button_border@ !important;
}
menulist:not([disabled="true"]):hover:active {
background-image: url("chrome://browser/skin/images/toggle-off.png");
}
menulist > dropmarker {
height: 32px;
width: 32px;
margin-left: @margin_snormal@;
background-color: transparent; /* for windows */
border: none; /* for windows */
-moz-box-align: center;
-moz-box-pack: center;
list-style-image: url("chrome://browser/skin/images/dropmarker-hdpi.png");
-moz-image-region: auto;
display: block;
}
menulist[disabled="true"] > dropmarker {
opacity: 0.5;
}
/* progressmeter ----------------------------------------------------------- */
progressmeter {
background-color: #fff;
padding: @padding_small@;
height: @textbox_height@;
border: @border_width_large@ solid #aaa;
-moz-border-top-colors: -moz-initial;
-moz-border-right-colors: -moz-initial;
-moz-border-bottom-colors: -moz-initial;
-moz-border-left-colors: -moz-initial;
}
.progress-bar {
background-color: @color_background_highlight@;
}
/* panels / arrowboxes------------------------------------------------------ */
arrowbox {
-moz-appearance: none;
background: transparent !important;
border: none;
}
.arrowbox-dark .panel-arrowcontent {
padding: @padding_normal@; /* core spacing */
}
dialog,
.arrowbox-dark .panel-arrowcontent,
.panel-dark {
color: @color_text_default@;
background: @color_background_default@;
}
dialog,
.arrowbox-dark .panel-arrowcontent {
border: @border_width_small@ solid @color_dialog_border@;
box-shadow: black 0 @shadow_width_small@ @shadow_width_small@;
}
dialog {
margin: @margin_xxxnormal@ !important;
max-width: @dialog_width@;
}
.prompt-message {
-moz-box-pack: center;
font-size: @font_snormal@;
margin: @padding_normal@;
}
.prompt-title {
font-size: @font_xnormal@;
padding-top: @padding_xnormal@;
padding-left: @padding_normal@;
}
/* Authentication dialogs do not have a title */
.prompt-title:empty,
.prompt-title:empty + .prompt-line {
display: none;
}
.prompt-line {
border-bottom: @border_width_tiny@ solid @color_divider_border@;
margin: @margin_small@ 0 0 0;
height: @padding_normal@ !important;
}
.prompt-buttons {
font-size: @font_snormal@;
background-color: @color_background_dlgbuttons@;
display: inline-block;
text-align: center;
}
.prompt-edit {
margin: @margin_xnormal@;
font-size: @font_normal@;
text-align: start;
}
.panel-arrow[side="top"] {
list-style-image: url("chrome://browser/skin/images/arrowbox-up.png");
margin-bottom: -@margin_snormal@;
}
.panel-arrow[side="bottom"] {
list-style-image: url("chrome://browser/skin/images/arrowbox-down.png");
margin-top: -@margin_snormal@;
}
.panel-arrow[side="left"] {
list-style-image: url("chrome://browser/skin/images/arrowbox-horiz.png");
margin-right: -@margin_snormal@;
-moz-transform: scaleX(-1);
}
.panel-arrow[side="right"] {
list-style-image: url("chrome://browser/skin/images/arrowbox-horiz.png");
margin-left: -@margin_snormal@;
}
/*.panel-row-header ------------------------------------------------------------ */
.panel-row-header {
border-bottom: @border_width_xxlarge@ solid @color_background_active@;
background-color: @color_background_header@ !important;
color: @color_text_header@;
padding: 0 !important;
}
.panel-row-button {
color: @color_text_header@;
-moz-appearance: none;
background-size: 100% 100%;
border: 0 solid transparent !important;
-moz-border-start: @border_width_tiny@ solid rgba(255,255,255,0.2) !important;
-moz-border-end: @border_width_tiny@ solid rgba(0,0,0,0.2) !important;
padding-top: @padding_xsmall@ !important;
padding-bottom: @padding_xsmall@ !important;
-moz-padding-start: @padding_xsmall@ !important;
-moz-padding-end: @padding_xsmall@ !important;
-moz-box-flex: 1;
-moz-user-focus: ignore;
-moz-user-select: none;
}
.panel-row-button:hover:active {
background: @color_background_active@;
color: @color_text_active@;
background-size: 100% 100%;
}
.panel-row-button:first-child {
-moz-border-start-width: 0 !important;
}
.panel-row-button:last-child {
-moz-border-end-width: 0 !important;
}
@media (@orientation@: portrait) {
.panel-row-button {
-moz-box-orient: vertical;
}
.panel-row-button .toolbarbutton-text {
font-size: @font_xsmall@ !important;
}
}
.panel-row-button .toolbarbutton-text {
text-align: left;
}
.panel-row-button .toolbarbutton-text:-moz-locale-dir(rtl) {
text-align: right;
}
.panel-row-button[disabled="true"] {
pointer-events: none;
}
.panel-row-button[disabled="true"] .toolbarbutton-icon {
opacity: 0.5;
}
.panel-row-button[disabled="true"] .toolbarbutton-text {
color: @color_text_disabled@;
}
.panel-row-button[checked="true"] {
background: @color_background_active@;
color: @color_text_active@;
background-size: 100% 100% !important;
}
.panel-row-button[checked="true"],
.panel-row-button[disabled="true"] {
pointer-events: none;
}
#panel-container-inner {
-moz-box-orient: vertical;
}
#panel-controls {
-moz-box-orient: horizontal;
}
@media (min-width: @tablet_panel_minwidth@) {
#panel-container-inner {
-moz-box-orient: horizontal;
-moz-box-pack: center;
}
#panel-items {
max-width: @tablet_panel_minwidth@;
min-width: 0px !important;
}
/* This will affect the prefs screen, but not the awesome screen */
#panel-controls {
-moz-box-orient: vertical !important;
-moz-box-align: start;
}
#panel-controls > .panel-row-button {
-moz-box-orient: horizontal;
-moz-box-flex: 0;
min-width: @tablet_panel_controls@ !important;
}
#panel-controls .toolbarbutton-text {
display: -moz-box !important;
-moz-box-flex: 1;
}
#panel-container {
-moz-box-pack: center;
padding: @padding_xlarge@ 0px;
}
}
/* because the buttons can wrap, we need to use the margin to create inter-button
spacing and a bottom margin for the notification */
notification > button {
margin-bottom: @margin_normal@;
}

Просмотреть файл

@ -268,13 +268,13 @@ chrome.jar:
skin/honeycomb/aboutPage.css (aboutPage.css)
skin/honeycomb/about.css (about.css)
skin/honeycomb/aboutHome.css (aboutHome.css)
* skin/honeycomb/browser.css (browser.css)
* skin/honeycomb/browser.css (honeycomb/browser.css)
* skin/honeycomb/content.css (content.css)
skin/honeycomb/config.css (config.css)
* skin/honeycomb/forms.css (forms.css)
skin/honeycomb/header.css (header.css)
* skin/honeycomb/notification.css (notification.css)
* skin/honeycomb/platform.css (platform.css)
* skin/honeycomb/platform.css (honeycomb/platform.css)
skin/honeycomb/touchcontrols.css (touchcontrols.css)
* skin/honeycomb/localePicker.css (localePicker.css)
skin/honeycomb/netError.css (netError.css)
@ -384,10 +384,14 @@ chrome.jar:
skin/honeycomb/images/scrubber-hdpi.png (honeycomb/images/scrubber-hdpi.png)
skin/honeycomb/images/handle-start.png (images/handle-start.png)
skin/honeycomb/images/handle-end.png (images/handle-end.png)
skin/honeycomb/images/tabs-hdpi.png (images/tabs-hdpi.png)
skin/honeycomb/images/menu-hdpi.png (images/menu-hdpi.png)
skin/honeycomb/images/tabs-hdpi.png (honeycomb/images/tabs-hdpi.png)
skin/honeycomb/images/menu-hdpi.png (honeycomb/images/menu-hdpi.png)
skin/honeycomb/images/errorpage-warning.png (images/errorpage-warning.png)
skin/honeycomb/images/errorpage-larry-white.png (images/errorpage-larry-white.png)
skin/honeycomb/images/errorpage-larry-black.png (images/errorpage-larry-black.png)
skin/honeycomb/images/homescreen-blank-hdpi.png (images/homescreen-blank-hdpi.png)
skin/honeycomb/images/homescreen-default-hdpi.png (images/homescreen-default-hdpi.png)
skin/honeycomb/images/urlbar-border-side.png (honeycomb/images/urlbar-border-side.png)
skin/honeycomb/images/urlbar-border-bottom.png (honeycomb/images/urlbar-border-bottom.png)
skin/honeycomb/images/urlbar-border-side-active.png (honeycomb/images/urlbar-border-side-active.png)
skin/honeycomb/images/urlbar-border-bottom-active.png (honeycomb/images/urlbar-border-bottom-active.png)

Просмотреть файл

@ -1124,8 +1124,10 @@ pref("intl.hyphenation-alias.fr-*", "fr");
pref("intl.hyphenation-alias.gl-*", "gl");
pref("intl.hyphenation-alias.hr-*", "hr");
pref("intl.hyphenation-alias.hsb-*", "hsb");
pref("intl.hyphenation-alias.hu-*", "hu");
pref("intl.hyphenation-alias.ia-*", "ia");
pref("intl.hyphenation-alias.is-*", "is");
pref("intl.hyphenation-alias.it-*", "it");
pref("intl.hyphenation-alias.kmr-*", "kmr");
pref("intl.hyphenation-alias.la-*", "la");
pref("intl.hyphenation-alias.lt-*", "lt");
@ -1135,6 +1137,7 @@ pref("intl.hyphenation-alias.pt-*", "pt");
pref("intl.hyphenation-alias.ru-*", "ru");
pref("intl.hyphenation-alias.sl-*", "sl");
pref("intl.hyphenation-alias.sv-*", "sv");
pref("intl.hyphenation-alias.tr-*", "tr");
pref("intl.hyphenation-alias.uk-*", "uk");
// use reformed (1996) German patterns by default unless specifically tagged as de-1901
@ -2107,15 +2110,15 @@ pref("font.name-list.monospace.x-central-euro", "Courier");
pref("font.name-list.cursive.x-central-euro", "Apple Chancery");
pref("font.name-list.fantasy.x-central-euro", "Papyrus");
pref("font.name.serif.x-cyrillic", "Times CY");
pref("font.name.sans-serif.x-cyrillic", "Helvetica CY");
pref("font.name.monospace.x-cyrillic", "Monaco CY");
pref("font.name.cursive.x-cyrillic", "Geneva CY");
pref("font.name.serif.x-cyrillic", "Times");
pref("font.name.sans-serif.x-cyrillic", "Helvetica");
pref("font.name.monospace.x-cyrillic", "Monaco");
pref("font.name.cursive.x-cyrillic", "Geneva");
pref("font.name.fantasy.x-cyrillic", "Charcoal CY");
pref("font.name-list.serif.x-cyrillic", "Times CY");
pref("font.name-list.sans-serif.x-cyrillic", "Helvetica CY");
pref("font.name-list.monospace.x-cyrillic", "Monaco CY");
pref("font.name-list.cursive.x-cyrillic", "Geneva CY");
pref("font.name-list.serif.x-cyrillic", "Times");
pref("font.name-list.sans-serif.x-cyrillic", "Helvetica");
pref("font.name-list.monospace.x-cyrillic", "Monaco");
pref("font.name-list.cursive.x-cyrillic", "Geneva");
pref("font.name-list.fantasy.x-cyrillic", "Charcoal CY");
pref("font.name.serif.x-devanagari", "Devanagari MT");

Просмотреть файл

@ -4,6 +4,7 @@
<script type="text/javascript" src="/tests/SimpleTest/LogController.js"></script>
<script type="text/javascript" src="/tests/SimpleTest/TestRunner.js"></script>
<script type="text/javascript" src="/tests/SimpleTest/MozillaFileLogger.js"></script>
<script type="text/javascript" src="/tests/SimpleTest/quit.js"></script>
<script type="text/javascript" src="/tests/SimpleTest/setup.js"></script>
</head>
<script type="text/javascript">

Просмотреть файл

@ -410,9 +410,9 @@ class WebSocketServer(object):
class Mochitest(object):
# Path to the test script on the server
TEST_PATH = "/tests/"
CHROME_PATH = "/redirect.html";
PLAIN_LOOP_PATH = "/plain-loop.html";
TEST_PATH = "tests"
CHROME_PATH = "redirect.html"
PLAIN_LOOP_PATH = "plain-loop.html"
urlOpts = []
runSSLTunnel = True
vmwareHelper = None
@ -440,15 +440,15 @@ class Mochitest(object):
def buildTestPath(self, options):
""" Build the url path to the specific test harness and test file or directory """
testHost = "http://mochi.test:8888"
testURL = testHost + self.TEST_PATH + options.testPath
if os.path.isfile(self.oldcwd + self.TEST_PATH + options.testPath) and options.loops > 0:
testURL = testHost + self.PLAIN_LOOP_PATH
testURL = ("/").join([testHost, self.TEST_PATH, options.testPath])
if os.path.isfile(os.path.join(self.oldcwd, os.path.dirname(__file__), self.TEST_PATH, options.testPath)) and options.loops > 0:
testURL = ("/").join([testHost, self.PLAIN_LOOP_PATH])
if options.chrome or options.a11y:
testURL = testHost + self.CHROME_PATH
testURL = ("/").join([testHost, self.CHROME_PATH])
elif options.browserChrome:
testURL = "about:blank"
elif options.ipcplugins:
testURL = testHost + self.TEST_PATH + "dom/plugins/test"
testURL = ("/").join([testHost, self.TEST_PATH, "dom/plugins/test"])
return testURL
def startWebSocketServer(self, options, debuggerInfo):
@ -579,8 +579,8 @@ class Mochitest(object):
self.urlOpts.append("hideResultsTable=1")
if options.loops:
self.urlOpts.append("loops=%d" % options.loops)
if os.path.isfile(self.oldcwd + self.TEST_PATH + options.testPath) and options.loops > 0:
self.urlOpts.append("testname=%s" % (self.TEST_PATH + options.testPath))
if os.path.isfile(os.path.join(self.oldcwd, os.path.dirname(__file__), self.TEST_PATH, options.testPath)) and options.loops > 0:
self.urlOpts.append("testname=%s" % ("/").join([self.TEST_PATH, options.testPath]))
def cleanup(self, manifest, options):
""" remove temporary files and profile """

Просмотреть файл

@ -243,27 +243,36 @@ TestRunner.resetTests = function(listURLs) {
/*
* Used to run a single test in a loop and update the UI with the results
*/
TestRunner.loopTest = function(testPath){
var numLoops = TestRunner.loops;
while(numLoops >= 0){
//must set the following line so that TestHarness.updateUI finds the right div to update
$("current-test-path").innerHTML = testPath;
function checkComplete() {
var testWindow = window.open(testPath, 'test window');
if (testWindow.document.readyState == "complete") {
TestRunner.currentTestURL = testPath;
TestRunner.updateUI(testWindow.SimpleTest._tests);
testWindow.close();
} else {
setTimeout(checkComplete, 1000);
TestRunner.loopTest = function(testPath) {
//must set the following line so that TestHarness.updateUI finds the right div to update
document.getElementById("current-test-path").innerHTML = testPath;
var numLoops = TestRunner.loops;
var completed = 0; // keep track of how many tests have finished
// function to kick off the test and to check when the test is complete
function checkComplete() {
var testWindow = window.open(testPath, 'test window'); // kick off the test or find the active window
if (testWindow.document.readyState == "complete") {
// the test is complete -> mark as complete
TestRunner.currentTestURL = testPath;
TestRunner.updateUI(testWindow.SimpleTest._tests);
testWindow.close();
if (TestRunner.loops == completed && TestRunner.onComplete) {
TestRunner.onComplete();
}
completed++;
}
else {
// wait and check later
setTimeout(checkComplete, 1000);
}
}
while (numLoops >= 0) {
checkComplete();
numLoops--;
}
}
/**
/**
* Run the next test. If no test remains, calls onComplete().
**/

Просмотреть файл

@ -69,6 +69,9 @@ public:
mItemType(type)
{}
virtual ~JumpListItem()
{}
NS_DECL_ISUPPORTS
NS_DECL_NSIJUMPLISTITEM

Просмотреть файл

@ -663,8 +663,8 @@ nsWindow::Create(nsIWidget *aParent,
// Close this nsWindow
NS_METHOD nsWindow::Destroy()
{
// WM_DESTROY has already fired, we're done.
if (nsnull == mWnd)
// WM_DESTROY has already fired, avoid calling it twice
if (mOnDestroyCalled)
return NS_OK;
// During the destruction of all of our children, make sure we don't get deleted.

Просмотреть файл

@ -42,6 +42,7 @@
#include "prinrval.h"
#include "nsDebug.h"
#include "prlong.h"
#include "mozilla/Util.h"
namespace mozilla {
@ -66,7 +67,7 @@ public:
// but no other numbers (so we don't have any implicit unit conversions).
struct _SomethingVeryRandomHere;
TimeDuration(_SomethingVeryRandomHere* aZero) : mValue(0) {
NS_ASSERTION(!aZero, "Who's playing funny games here?");
MOZ_ASSERT(!aZero && "Who's playing funny games here?");
}
// Default copy-constructor and assignment are OK
@ -209,8 +210,8 @@ public:
* Compute the difference between two timestamps. Both must be non-null.
*/
TimeDuration operator-(const TimeStamp& aOther) const {
NS_ASSERTION(!IsNull(), "Cannot compute with a null value");
NS_ASSERTION(!aOther.IsNull(), "Cannot compute with aOther null value");
MOZ_ASSERT(!IsNull() && "Cannot compute with a null value");
MOZ_ASSERT(!aOther.IsNull() && "Cannot compute with aOther null value");
PR_STATIC_ASSERT(-LL_MAXINT > LL_MININT);
PRInt64 ticks = PRInt64(mValue - aOther.mValue);
// Check for overflow.
@ -227,54 +228,54 @@ public:
}
TimeStamp operator+(const TimeDuration& aOther) const {
NS_ASSERTION(!IsNull(), "Cannot compute with a null value");
MOZ_ASSERT(!IsNull() && "Cannot compute with a null value");
return TimeStamp(mValue + aOther.mValue);
}
TimeStamp operator-(const TimeDuration& aOther) const {
NS_ASSERTION(!IsNull(), "Cannot compute with a null value");
MOZ_ASSERT(!IsNull() && "Cannot compute with a null value");
return TimeStamp(mValue - aOther.mValue);
}
TimeStamp& operator+=(const TimeDuration& aOther) {
NS_ASSERTION(!IsNull(), "Cannot compute with a null value");
MOZ_ASSERT(!IsNull() && "Cannot compute with a null value");
mValue += aOther.mValue;
return *this;
}
TimeStamp& operator-=(const TimeDuration& aOther) {
NS_ASSERTION(!IsNull(), "Cannot compute with a null value");
MOZ_ASSERT(!IsNull() && "Cannot compute with a null value");
mValue -= aOther.mValue;
return *this;
}
PRBool operator<(const TimeStamp& aOther) const {
NS_ASSERTION(!IsNull(), "Cannot compute with a null value");
NS_ASSERTION(!aOther.IsNull(), "Cannot compute with aOther null value");
MOZ_ASSERT(!IsNull() && "Cannot compute with a null value");
MOZ_ASSERT(!aOther.IsNull() && "Cannot compute with aOther null value");
return mValue < aOther.mValue;
}
PRBool operator<=(const TimeStamp& aOther) const {
NS_ASSERTION(!IsNull(), "Cannot compute with a null value");
NS_ASSERTION(!aOther.IsNull(), "Cannot compute with aOther null value");
MOZ_ASSERT(!IsNull() && "Cannot compute with a null value");
MOZ_ASSERT(!aOther.IsNull() && "Cannot compute with aOther null value");
return mValue <= aOther.mValue;
}
PRBool operator>=(const TimeStamp& aOther) const {
NS_ASSERTION(!IsNull(), "Cannot compute with a null value");
NS_ASSERTION(!aOther.IsNull(), "Cannot compute with aOther null value");
MOZ_ASSERT(!IsNull() && "Cannot compute with a null value");
MOZ_ASSERT(!aOther.IsNull() && "Cannot compute with aOther null value");
return mValue >= aOther.mValue;
}
PRBool operator>(const TimeStamp& aOther) const {
NS_ASSERTION(!IsNull(), "Cannot compute with a null value");
NS_ASSERTION(!aOther.IsNull(), "Cannot compute with aOther null value");
MOZ_ASSERT(!IsNull() && "Cannot compute with a null value");
MOZ_ASSERT(!aOther.IsNull() && "Cannot compute with aOther null value");
return mValue > aOther.mValue;
}
PRBool operator==(const TimeStamp& aOther) const {
// Maybe it's ok to check == with null timestamps?
NS_ASSERTION(!IsNull(), "Cannot compute with a null value");
NS_ASSERTION(!aOther.IsNull(), "Cannot compute with aOther null value");
MOZ_ASSERT(!IsNull() && "Cannot compute with a null value");
MOZ_ASSERT(!aOther.IsNull() && "Cannot compute with aOther null value");
return mValue == aOther.mValue;
}
PRBool operator!=(const TimeStamp& aOther) const {
// Maybe it's ok to check != with null timestamps?
NS_ASSERTION(!IsNull(), "Cannot compute with a null value");
NS_ASSERTION(!aOther.IsNull(), "Cannot compute with aOther null value");
MOZ_ASSERT(!IsNull() && "Cannot compute with a null value");
MOZ_ASSERT(!aOther.IsNull() && "Cannot compute with aOther null value");
return mValue != aOther.mValue;
}

Просмотреть файл

@ -387,35 +387,34 @@ class nsTSubstring_CharT
void AppendASCII( const char* data, size_type length = size_type(-1) ) { ReplaceASCII(mLength, 0, data, length); }
// AppendPrintf truncates output to 31 ASCII characters
void AppendPrintf( const char* format, ... );
void AppendInt( PRInt32 aInteger )
{ AppendPrintf( "%d", aInteger ); }
{ AppendPrintf31( "%d", aInteger ); }
void AppendInt( PRInt32 aInteger, int aRadix )
{
const char *fmt = aRadix == 10 ? "%d" : aRadix == 8 ? "%o" : "%x";
AppendPrintf( fmt, aInteger );
AppendPrintf31( fmt, aInteger );
}
void AppendInt( PRUint32 aInteger )
{ AppendPrintf( "%u", aInteger ); }
{ AppendPrintf31( "%u", aInteger ); }
void AppendInt( PRUint32 aInteger, int aRadix )
{
const char *fmt = aRadix == 10 ? "%u" : aRadix == 8 ? "%o" : "%x";
AppendPrintf( fmt, aInteger );
AppendPrintf31( fmt, aInteger );
}
void AppendInt( PRInt64 aInteger )
{ AppendPrintf( "%lld", aInteger ); }
{ AppendPrintf31( "%lld", aInteger ); }
void AppendInt( PRInt64 aInteger, int aRadix )
{
const char *fmt = aRadix == 10 ? "%lld" : aRadix == 8 ? "%llo" : "%llx";
AppendPrintf( fmt, aInteger );
AppendPrintf31( fmt, aInteger );
}
void AppendInt( PRUint64 aInteger )
{ AppendPrintf( "%llu", aInteger ); }
{ AppendPrintf31( "%llu", aInteger ); }
void AppendInt( PRUint64 aInteger, int aRadix )
{
const char *fmt = aRadix == 10 ? "%llu" : aRadix == 8 ? "%llo" : "%llx";
AppendPrintf( fmt, aInteger );
AppendPrintf31( fmt, aInteger );
}
/**
@ -427,6 +426,8 @@ class nsTSubstring_CharT
{ DoAppendFloat(aFloat, 15); }
private:
void NS_FASTCALL DoAppendFloat( double aFloat, int digits );
// AppendPrintf31 truncates output to 31 ASCII characters
void AppendPrintf31( const char* format, ... );
public:
// AppendLiteral must ONLY be applied to an actual literal string.

Просмотреть файл

@ -735,7 +735,7 @@ nsTSubstring_CharT::StripChars( const char_type* aChars, PRUint32 aOffset )
mLength = to - mData;
}
void nsTSubstring_CharT::AppendPrintf( const char* format, ...)
void nsTSubstring_CharT::AppendPrintf31( const char* format, ...)
{
char buf[32];
va_list ap;
@ -745,6 +745,17 @@ void nsTSubstring_CharT::AppendPrintf( const char* format, ...)
va_end(ap);
}
void nsTSubstring_CharT::AppendPrintf( const char* format, ...)
{
char *buf;
va_list ap;
va_start(ap, format);
buf = PR_vsmprintf(format, ap);
AppendASCII(buf);
PR_smprintf_free(buf);
va_end(ap);
}
/* hack to make sure we define Modified_cnvtf only once */
#ifdef CharT_is_PRUnichar