This commit is contained in:
Marco Bonardo 2012-01-17 16:24:46 +01:00
Родитель 0c3008780d 1d0335e9ff
Коммит cf7bdf1de9
42 изменённых файлов: 220 добавлений и 200 удалений

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

@ -237,7 +237,7 @@ pref("keyword.URL", "");
pref("general.useragent.locale", "@AB_CD@");
pref("general.skins.selectedSkin", "classic/1.0");
pref("general.smoothScroll", false);
pref("general.smoothScroll", true);
#ifdef UNIX_BUT_NOT_MAC
pref("general.autoScroll", false);
#else
@ -1033,9 +1033,6 @@ pref("devtools.styleinspector.enabled", true);
// Enable the Tilt inspector
pref("devtools.tilt.enabled", true);
// Enable the Tilt inspector even if WebGL capabilities are not detected
pref("devtools.tilt.force-enabled", false);
// Enable the rules view
pref("devtools.ruleview.enabled", true);

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

@ -1014,8 +1014,8 @@
<toolbarbutton id="inspector-3D-button"
class="devtools-toolbarbutton"
hidden="true"
label="&inspect3DButton.label;"
accesskey="&inspect3DButton.accesskey;"
label="&inspect3DViewButton.label;"
accesskey="&inspect3DViewButton.accesskey;"
command="Inspector:Tilt"/>
<toolbarbutton id="inspector-style-button"
class="devtools-toolbarbutton"

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

@ -8,6 +8,7 @@
}
.view {
color: black; /* Default text color */
background: #f0f0ff; /* Background of the editor */
padding-left: 0;
}

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

@ -751,70 +751,28 @@ StyleEditor.prototype = {
*/
_loadSourceFromCache: function SE__loadSourceFromCache(aHref)
{
try {
let cacheService = Cc["@mozilla.org/network/cache-service;1"]
.getService(Ci.nsICacheService);
let session = cacheService.createSession("HTTP", Ci.nsICache.STORE_ANYWHERE, true);
session.doomEntriesIfExpired = false;
session.asyncOpenCacheEntry(aHref, Ci.nsICache.ACCESS_READ, {
onCacheEntryAvailable: this._onCacheEntryAvailable.bind(this)
});
} catch (ex) {
this._signalError(LOAD_ERROR);
}
},
/**
* The nsICacheListener.onCacheEntryAvailable method implementation used when
* the style sheet source is loaded from the browser cache.
*
* @param nsICacheEntryDescriptor aEntry
* @param nsCacheAccessMode aMode
* @param integer aStatus
*/
_onCacheEntryAvailable: function SE__onCacheEntryAvailable(aEntry, aMode, aStatus)
{
if (!Components.isSuccessCode(aStatus)) {
return this._signalError(LOAD_ERROR);
}
let stream = aEntry.openInputStream(0);
let channel = Services.io.newChannel(aHref, null, null);
let chunks = [];
let streamListener = { // nsIStreamListener inherits nsIRequestObserver
onStartRequest: function (aRequest, aContext, aStatusCode) {
},
if (!Components.isSuccessCode(aStatusCode)) {
return this._signalError(LOAD_ERROR);
}
}.bind(this),
onDataAvailable: function (aRequest, aContext, aStream, aOffset, aCount) {
chunks.push(NetUtil.readInputStreamToString(aStream, aCount));
},
onStopRequest: function (aRequest, aContext, aStatusCode) {
if (!Components.isSuccessCode(aStatusCode)) {
return this._signalError(LOAD_ERROR);
}
this._onSourceLoad(chunks.join(""));
}.bind(this),
}.bind(this)
};
let head = aEntry.getMetaDataElement("response-head");
if (/^Content-Encoding:\s*gzip/mi.test(head)) {
let converter = Cc["@mozilla.org/streamconv;1?from=gzip&to=uncompressed"]
.createInstance(Ci.nsIStreamConverter);
converter.asyncConvertData("gzip", "uncompressed", streamListener, null);
streamListener = converter; // proxy original listener via converter
}
try {
streamListener.onStartRequest(null, null);
while (stream.available()) {
streamListener.onDataAvailable(null, null, stream, 0, stream.available());
}
streamListener.onStopRequest(null, null, 0);
} catch (ex) {
this._signalError(LOAD_ERROR);
} finally {
try {
stream.close();
} catch (ex) {
// swallow (some stream implementations can auto-close at eos)
}
aEntry.close();
}
channel.loadFlags = channel.LOAD_FROM_CACHE;
channel.asyncOpen(streamListener, null);
},
/**

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

@ -1142,7 +1142,8 @@ TextPropertyEditor.prototype = {
* {function} done:
* Called when input is committed or blurred. Called with
* current value and a boolean telling the caller whether to
* commit the change.
* commit the change. This function is called after the editor
* has been torn down.
* {string} advanceChars:
* If any characters in advanceChars are typed, focus will advance
* to the next element.
@ -1286,11 +1287,11 @@ InplaceEditor.prototype = {
*/
_onBlur: function InplaceEditor_onBlur(aEvent)
{
if (this.done) {
this.done(this.cancelled ? this.initial : this.input.value.trim(),
!this.cancelled);
}
let val = this.input.value.trim();
this._clear();
if (this.done) {
this.done(this.cancelled ? this.initial : val, !this.cancelled);
}
},
_onKeyPress: function InplaceEditor_onKeyPress(aEvent)

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

@ -81,9 +81,9 @@ StyleInspector.prototype = {
this.registrationObject = {
id: "styleinspector",
label: this.l10n("style.highlighter.button.label1"),
label: this.l10n("style.highlighter.button.label2"),
tooltiptext: this.l10n("style.highlighter.button.tooltip"),
accesskey: this.l10n("style.highlighter.accesskey1"),
accesskey: this.l10n("style.highlighter.accesskey2"),
context: this,
get isOpen() isOpen(),
onSelect: this.selectNode,

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

@ -42,3 +42,7 @@
.ruleview-computedlist:not(.styleinspector-open) {
display: none;
}
.ruleview-code {
direction: ltr;
}

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

@ -271,7 +271,7 @@ Tilt.prototype = {
get enabled()
{
return (TiltVisualizer.Prefs.enabled &&
(TiltVisualizer.Prefs.forceEnabled || TiltGL.isWebGLSupported()));
(TiltGL.isWebGLForceEnabled() || TiltGL.isWebGLSupported()));
},
/**

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

@ -37,7 +37,7 @@
*
***** END LICENSE BLOCK *****/
/*global Components, TiltMath, TiltUtils, mat4 */
/*global Components, Services, TiltMath, TiltUtils, mat4 */
"use strict";
const Cc = Components.classes;
@ -46,6 +46,7 @@ const Cu = Components.utils;
const WEBGL_CONTEXT_NAME = "experimental-webgl";
Cu.import("resource://gre/modules/Services.jsm");
Cu.import("resource:///modules/devtools/TiltMath.jsm");
Cu.import("resource:///modules/devtools/TiltUtils.jsm");
@ -1554,6 +1555,11 @@ TiltGL.ColorShader = {
].join("\n")
};
TiltGL.isWebGLForceEnabled = function TGL_isWebGLForceEnabled()
{
return Services.prefs.getBoolPref("webgl.force-enabled");
};
/**
* Tests if the WebGL OpenGL or Angle renderer is available using the
* GfxInfo service.

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

@ -1548,20 +1548,6 @@ TiltVisualizer.Prefs = {
this._enabled = value;
},
/**
* Specifies if Tilt should be enabled even if WebGL may not be available.
*/
get forceEnabled()
{
return this._forceEnabled;
},
set forceEnabled(value)
{
TiltUtils.Preferences.set("force-enabled", "boolean", value);
this._forceEnabled = value;
},
/**
* Loads the preferences.
*/
@ -1570,7 +1556,6 @@ TiltVisualizer.Prefs = {
let prefs = TiltUtils.Preferences;
TiltVisualizer.Prefs._enabled = prefs.get("enabled", "boolean");
TiltVisualizer.Prefs._forceEnabled = prefs.get("force-enabled", "boolean");
}
};

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

@ -51,6 +51,7 @@ _BROWSER_TEST_FILES = \
browser_tilt_03_tab_switch.js \
browser_tilt_04_initialization.js \
browser_tilt_05_destruction-esc.js \
browser_tilt_05_destruction-url.js \
browser_tilt_05_destruction.js \
browser_tilt_arcball.js \
browser_tilt_controller.js \

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

@ -31,11 +31,6 @@ function test() {
is(Tilt.visualizers[id], null,
"A instance of the visualizer shouldn't be initialized yet.");
is(typeof TiltVisualizer.Prefs.enabled, "boolean",
"The 'enabled' pref should have been loaded by now.");
is(typeof TiltVisualizer.Prefs.forceEnabled, "boolean",
"The 'force-enabled' pref should have been loaded by now.");
},
onTiltOpen: function(instance)
{

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

@ -0,0 +1,41 @@
/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
/*global ok, is, info, waitForExplicitFinish, finish, gBrowser */
/*global isTiltEnabled, isWebGLSupported, createTab, createTilt */
/*global Services, EventUtils, Tilt, TiltUtils, InspectorUI, TILT_DESTROYED */
"use strict";
function test() {
if (!isTiltEnabled()) {
info("Skipping destruction test because Tilt isn't enabled.");
return;
}
if (!isWebGLSupported()) {
info("Skipping destruction test because WebGL isn't supported.");
return;
}
waitForExplicitFinish();
createTab(function() {
createTilt({
onTiltOpen: function()
{
Services.obs.addObserver(cleanup, TILT_DESTROYED, false);
window.content.location = "about:mozilla";
}
});
});
}
function cleanup() {
let id = TiltUtils.getWindowId(gBrowser.selectedBrowser.contentWindow);
is(Tilt.visualizers[id], null,
"The current instance of the visualizer wasn't destroyed properly.");
Services.obs.removeObserver(cleanup, TILT_DESTROYED);
gBrowser.removeCurrentTab();
finish();
}

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

@ -217,8 +217,13 @@ can reach it easily. -->
<!ENTITY inspectButton.label "Inspect">
<!ENTITY inspectButton.accesskey "I">
<!ENTITY inspectCloseButton.tooltiptext "Close Inspector">
<!ENTITY inspect3DButton.label "3D">
<!ENTITY inspect3DButton.accesskey "M">
<!-- LOCALIZATION NOTE (inspect3DViewButton.label): This button shows an
- alternate view for the Inspector, creating a 3D visualization of the
- webpage. -->
<!ENTITY inspect3DViewButton.label "3D View">
<!ENTITY inspect3DViewButton.accesskey "W">
<!ENTITY inspectStyleButton.label "Style">
<!ENTITY inspectStyleButton.accesskey "S">

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

@ -33,10 +33,11 @@ rule.sourceElement=element
rule.inheritedSource=Inherited from %S (%S)
# LOCALIZATION NOTE (style.highlighter.button): These strings are used inside
# sidebar of the Highlighter for the style inspector button
style.highlighter.button.label1=Properties
style.highlighter.accesskey1=P
style.highlighter.button.tooltip=Inspect element styles
# sidebar of the Highlighter for the style inspector button.
# "Computed" refers to the Computed Style of the element.
style.highlighter.button.label2=Computed
style.highlighter.accesskey2=C
style.highlighter.button.tooltip=Inspect element computed styles
# LOCALIZATION NOTE (helpLinkTitle): For each style property
# the user can hover it and get a help link button which allows one to

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

@ -2003,6 +2003,10 @@ panel[dimmed="true"] {
position: relative;
}
#devtools-sidebar-box {
background-color: -moz-Field;
}
/* Highlighter - toolbar resizers */
.inspector-resizer {

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

@ -234,10 +234,6 @@
-moz-margin-end: 5px;
}
.ruleview-expander:-moz-locale-dir(rtl) {
background-position: 16px 0;
}
.ruleview-expander.styleinspector-open {
background-position: 8px 0;
}

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

@ -2738,6 +2738,10 @@ panel[dimmed="true"] {
position: relative;
}
#devtools-sidebar-box {
background-color: -moz-Field;
}
/* Highlighter - toolbar resizers */
.inspector-resizer {

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

@ -236,10 +236,6 @@
-moz-margin-end: 5px;
}
.ruleview-expander:-moz-locale-dir(rtl) {
background-position: 16px 0;
}
.ruleview-expander.styleinspector-open {
background-position: 8px 0;
}

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

@ -2683,6 +2683,10 @@ panel[dimmed="true"] {
position: relative;
}
#devtools-sidebar-box {
background-color: -moz-Field;
}
/* Highlighter - toolbar resizers */
.inspector-resizer {

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

@ -74,7 +74,7 @@
color: hsl(200,100%,60%) !important;
}
.devtools-toolbarbutton:[checked]:hover:active {
.devtools-toolbarbutton[checked]:hover:active {
background-color: hsla(211,68%,6%,.2);
}

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

@ -234,10 +234,6 @@
-moz-margin-end: 5px;
}
.ruleview-expander:-moz-locale-dir(rtl) {
background-position: 16px 0;
}
.ruleview-expander.styleinspector-open {
background-position: 8px 0;
}

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

@ -36,6 +36,8 @@
#
# ***** END LICENSE BLOCK *****
from __future__ import with_statement
from optparse import OptionParser
import logging
import os
@ -57,14 +59,13 @@ def digest_file(filename, digest, chunk_size=1024):
if hashlib is not None:
logger.debug('Creating new %s object' % digest)
h = hashlib.new(digest)
f = open(filename, "rb")
with open(filename, 'rb') as f:
while True:
data = f.read(chunk_size)
if not data:
logger.debug('Finished reading in file')
break
h.update(data)
f.close()
hash = h.hexdigest()
logger.debug('Hash for %s is %s' % (filename, hash))
return hash
@ -75,15 +76,15 @@ def digest_file(filename, digest, chunk_size=1024):
return None
def process_files(files, output_filename, digest, strip):
def process_files(files, output_filename, digests, strip):
'''This function takes a list of file names, 'files'. It will then
compute the checksum for each of the files by opening the files.
Once each file is read and its checksum is computed, this function
will write the information to the file specified by 'output_filename'.
The path written in the output file will have anything specified by 'strip'
removed from the path. The output file is closed before returning nothing
The algorithm to compute checksums with can be specified by 'digest'
and needs to be a valid OpenSSL algorithm.
The algorithm to compute checksums with can be specified by 'digests'
and needs to be a list of valid OpenSSL algorithms.
The output file is written in the format:
<hash> <algorithm> <filesize> <filepath>
@ -97,16 +98,17 @@ def process_files(files, output_filename, digest, strip):
output_filename)
else:
logger.debug('Creating a new checksums file "%s"' % output_filename)
output = open(output_filename, 'w+')
with open(output_filename, 'w+') as output:
for file in files:
if os.path.isdir(file):
logger.warn('%s is a directory, skipping' % file)
else:
for digest in digests:
hash = digest_file(file, digest)
if hash is None:
logger.warn('Unable to generate a hash for %s. ' +
'Using NOHASH as fallback' % file)
hash = 'NOHASH'
'Skipping.' % file)
continue
if file.startswith(strip):
short_file = file[len(strip):]
short_file = short_file.lstrip('/')
@ -115,7 +117,6 @@ def process_files(files, output_filename, digest, strip):
print >>output, '%s %s %s %s' % (hash, digest,
os.path.getsize(file),
short_file)
output.close()
def setup_logging(level=logging.DEBUG):
'''This function sets up the logging module using a speficiable logging
@ -141,7 +142,7 @@ def main():
# Parse command line arguments
parser = OptionParser()
parser.add_option('-d', '--digest', help='checksum algorithm to use',
action='store', dest='digest', default='sha1')
action='append', dest='digests')
parser.add_option('-o', '--output', help='output file to use',
action='store', dest='outfile', default='checksums')
parser.add_option('-v', '--verbose',
@ -167,11 +168,14 @@ def main():
logger = logging.getLogger('checksums.py')
# Validate the digest type to use
if not options.digests:
options.digests = ['sha1']
try:
hashlib.new(options.digest)
for digest in options.digests:
hashlib.new(digest)
except ValueError, ve:
logger.error('Could not create a "%s" hash object (%s)' %
(options.digest, ve.args[0]))
(digest, ve.args[0]))
exit(1)
# Validate the files to checksum
@ -181,7 +185,7 @@ def main():
files.append(i)
else:
logger.info('File "%s" was not found on the filesystem' % i)
process_files(files, options.outfile, options.digest, options.strip)
process_files(files, options.outfile, options.digests, options.strip)
if __name__ == '__main__':
main()

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

@ -4273,15 +4273,21 @@ static const char* kNSURIs[] = {
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INTERNAL(nsGenericElement)
if (NS_UNLIKELY(cb.WantDebugInfo())) {
char name[72];
char name[512];
PRUint32 nsid = tmp->GetNameSpaceID();
nsAtomCString localName(tmp->NodeInfo()->NameAtom());
nsCAutoString uri;
if (tmp->OwnerDoc()->GetDocumentURI()) {
tmp->OwnerDoc()->GetDocumentURI()->GetSpec(uri);
}
if (nsid < ArrayLength(kNSURIs)) {
PR_snprintf(name, sizeof(name), "nsGenericElement%s %s", kNSURIs[nsid],
localName.get());
PR_snprintf(name, sizeof(name), "nsGenericElement%s %s %s", kNSURIs[nsid],
localName.get(), uri.get());
}
else {
PR_snprintf(name, sizeof(name), "nsGenericElement %s", localName.get());
PR_snprintf(name, sizeof(name), "nsGenericElement %s %s",
localName.get(), uri.get());
}
cb.DescribeRefCountedNode(tmp->mRefCnt.get(), sizeof(nsGenericElement),
name);

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

@ -22,8 +22,6 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=350471
/** Test for Bug 350471 **/
// This test depends on general.smoothScroll being off.
const minLineHeight = 10, maxLineHeight = 20;
function between(x, min, max) (min <= max) ? (min <= x && x <= max) : (max <= x && x <= min);
@ -228,6 +226,7 @@ function initPrefs()
// Disables the app level scroll acceleration
prefSvc.setIntPref("mousewheel.acceleration.start", -1);
prefSvc.setBoolPref("mousewheel.system_scroll_override_on_root_content.enabled", false);
prefSvc.setBoolPref("general.smoothScroll", false);
}
function clearPrefs()
@ -236,10 +235,9 @@ function clearPrefs()
var prefSvc = Components.classes["@mozilla.org/preferences-service;1"].
getService(Components.interfaces.nsIPrefBranch2);
if (prefSvc.prefHasUserValue("mousewheel.acceleration.start"))
prefSvc.clearUserPref("mousewheel.acceleration.start");
if (prefSvc.prefHasUserValue("mousewheel.system_scroll_override_on_root_content.enabled"))
prefSvc.clearUserPref("mousewheel.system_scroll_override_on_root_content.enabled");
prefSvc.clearUserPref("general.smoothScroll");
}
window.onload = function () {

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

@ -20,8 +20,6 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=574663
/** Test for Bug 574663 **/
// This test depends on general.smoothScroll being off.
function sendTouchpadScrollMotion(scrollbox, direction, ctrl, momentum) {
var win = scrollbox.ownerDocument.defaultView;
let event = {
@ -107,6 +105,7 @@ function initPrefs()
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var prefSvc = Components.classes["@mozilla.org/preferences-service;1"].
getService(Components.interfaces.nsIPrefBranch2);
prefSvc.setBoolPref("general.smoothScroll", false);
// Disables the app level scroll acceleration
prefSvc.setIntPref("mousewheel.acceleration.start", -1);
prefSvc.setBoolPref("mousewheel.system_scroll_override_on_root_content.enabled", false);
@ -120,11 +119,9 @@ function clearPrefs()
var prefSvc = Components.classes["@mozilla.org/preferences-service;1"].
getService(Components.interfaces.nsIPrefBranch2);
if (prefSvc.prefHasUserValue("mousewheel.acceleration.start"))
prefSvc.clearUserPref("general.smoothScroll");
prefSvc.clearUserPref("mousewheel.acceleration.start");
if (prefSvc.prefHasUserValue("mousewheel.system_scroll_override_on_root_content.enabled"))
prefSvc.clearUserPref("mousewheel.system_scroll_override_on_root_content.enabled");
if (prefSvc.prefHasUserValue("mousewheel.withcontrolkey.action"))
prefSvc.clearUserPref("mousewheel.withcontrolkey.action");
}

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

@ -613,31 +613,6 @@ ImageDocument::HandleEvent(nsIDOMEvent* aEvent)
ShrinkToFit();
}
}
else if (eventType.EqualsLiteral("keypress")) {
nsCOMPtr<nsIDOMKeyEvent> keyEvent = do_QueryInterface(aEvent);
PRUint32 charCode;
bool ctrlKey, metaKey, altKey;
keyEvent->GetCharCode(&charCode);
keyEvent->GetCtrlKey(&ctrlKey);
keyEvent->GetMetaKey(&metaKey);
keyEvent->GetAltKey(&altKey);
// plus key
if (charCode == 0x2B && !ctrlKey && !metaKey && !altKey) {
mShouldResize = false;
if (mImageIsResized) {
ResetZoomLevel();
RestoreImage();
}
}
// minus key
else if (charCode == 0x2D && !ctrlKey && !metaKey && !altKey) {
mShouldResize = true;
if (mImageIsOverflowing) {
ResetZoomLevel();
ShrinkToFit();
}
}
}
return NS_OK;
}

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

@ -43,7 +43,9 @@ window.onload = runTest;
var testWindow;
var testNum = 0;
var smoothScrollPref = "general.smoothScroll";
function runTest() {
SpecialPowers.setBoolPref(smoothScrollPref, false);
testWindow = window.open(gTallRedBoxURI, "testWindow", "width=300,height=300,location=yes,scrollbars=yes");
}
@ -122,6 +124,7 @@ var step3 =function() {
"Page2Again: Ensure we can still scroll.");
testWindow.close();
SpecialPowers.clearUserPref(smoothScrollPref);
window.SimpleTest.finish();
}, true);
sendKey('DOWN', testWindow);

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

@ -1404,8 +1404,9 @@ NS_IMPL_CYCLE_COLLECTING_RELEASE(nsGlobalWindow)
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN(nsGlobalWindow)
if (tmp->mDoc && nsCCUncollectableMarker::InGeneration(
cb, tmp->mDoc->GetMarkedCCGeneration())) {
if ((tmp->mDoc && nsCCUncollectableMarker::InGeneration(
cb, tmp->mDoc->GetMarkedCCGeneration())) ||
(nsCCUncollectableMarker::sGeneration && tmp->IsBlack())) {
return NS_SUCCESS_INTERRUPTED_TRAVERSE;
}

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

@ -9,6 +9,10 @@
<script class="testbody" type="application/javascript">
<![CDATA[
var prefs = Components.classes["@mozilla.org/preferences-service;1"]
.getService(Components.interfaces.nsIPrefBranch);
prefs.setBoolPref("general.smoothScroll", false);
function runTest() {
var tests = execTests();
function execNext() {
@ -186,16 +190,14 @@ function execTests() {
is(testPageSelectCommand("cmd_selectPageUp", 0), 22 - lineNum, "cmd_selectPageUp");
}
var prefs = Components.classes["@mozilla.org/preferences-service;1"]
.getService(Components.interfaces.nsIPrefBranch);
var origPrefValue = prefs.getBoolPref("layout.word_select.eat_space_to_next_word");
try {
prefs.setBoolPref("layout.word_select.eat_space_to_next_word", false);
runSelectionTests(body, 1);
prefs.setBoolPref("layout.word_select.eat_space_to_next_word", true);
runSelectionTests(node(2), 0);
} finally {
prefs.setBoolPref("layout.word_select.eat_space_to_next_word", origPrefValue);
prefs.clearUserPref("general.smoothScroll");
prefs.clearUserPref("layout.word_select.eat_space_to_next_word");
}
SimpleTest.finish();

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

@ -19,6 +19,8 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=549262
/** Test for Bug 549262 **/
var smoothScrollPref = "general.smoothScroll";
SpecialPowers.setBoolPref(smoothScrollPref, false);
SimpleTest.waitForExplicitFinish();
var win = window.open("file_bug549262.html", "_blank",
"width=600,height=600,scrollbars=yes");
@ -90,6 +92,7 @@ SimpleTest.waitForFocus(function() {
is(win.getSelection().focusOffset, ed.textContent.length, "Selection should be moved to the end");
win.close();
SpecialPowers.clearUserPref(smoothScrollPref);
SimpleTest.finish();
}, 0);
}, 0);

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

@ -34,11 +34,13 @@ addLoadEvent(function() {
is(iframe.contentWindow.scrollY, 0, "Sanity check");
var rect = iframe.getBoundingClientRect();
setTimeout(function() {
synthesizeMouse(iframe, rect.width - 5, rect.height / 2, {});
setTimeout(function() {
var onscroll = function () {
iframe.contentWindow.removeEventListener("scroll", onscroll, false);
isnot(iframe.contentWindow.scrollY, 0, "The scrollbar should work");
SimpleTest.finish();
}, 0);
}
iframe.contentWindow.addEventListener("scroll", onscroll, false);
synthesizeMouse(iframe, rect.width - 5, rect.height / 2, {});
}, 0);
});

0
gfx/2d/ScaledFontSkia.cpp Executable file → Normal file
Просмотреть файл

0
gfx/2d/ScaledFontSkia.h Executable file → Normal file
Просмотреть файл

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

@ -43,21 +43,39 @@ while (windows.hasMoreElements()) {
var osName = sysInfo.getProperty("name");
switch(osName)
{
case "Darwin":
case "Darwin": // Mac OS X.
// We only enable OpenGL layers on machines that don't support QuickDraw
// plugins. x86-64 architecture is a good proxy for this plugin support.
if (sysInfo.getProperty("arch") != "x86-64") {
is(acceleratedWindows, 0, "Acceleration not supported on x86 OS X");
} else {
// Workaround for SeaMonkey tinderboxes which don't support acceleration.
if (navigator.userAgent.match(/ SeaMonkey\//)) {
if (acceleratedWindows == 0) {
todo(false, "Acceleration not supported on x86-64 OS X" +
" (This is expected on SeaMonkey (tinderboxes).)");
break;
}
}
isnot(acceleratedWindows, 0, "Acceleration enabled on x86-64 OS X");
}
break;
case "Windows_NT":
case "Windows_NT": // Windows.
var version = parseFloat(sysInfo.getProperty("version"));
if (version == 5.0) {
is(acceleratedWindows, 0, "Acceleration not supported on Windows 2000");
} else {
// Workaround for SeaMonkey tinderboxes which don't support acceleration.
if (navigator.userAgent.match(/ SeaMonkey\//)) {
if (acceleratedWindows == 0) {
todo(false, "Acceleration not supported on Windows XP or newer" +
" (This is expected on SeaMonkey (tinderboxes).)");
break;
}
}
isnot(acceleratedWindows, 0, "Acceleration enabled on Windows XP or newer");
}
@ -71,7 +89,7 @@ switch(osName)
}
break;
default:
default: // Linux and others.
is(acceleratedWindows, 0, "Acceleration not supported on '" + osName + "'");
}

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

@ -12,7 +12,7 @@
area.focus();
sendKey("W"); // enter a character
sendKey("VK_BACK_SPACE");
sendKey("BACK_SPACE");
</script>
</body>
</html>

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

@ -42,9 +42,12 @@ function runTests() {
function finish() {
// assert that scroll top is now less than before
ok(scrollTopBefore > doc.body.scrollTop, "pressing up arrow should scroll up");
SpecialPowers.clearUserPref(smoothScrollPref);
SimpleTest.finish();
}
var smoothScrollPref = "general.smoothScroll";
SpecialPowers.setBoolPref(smoothScrollPref, false);
SimpleTest.waitForExplicitFinish();
SimpleTest.waitForFocus(runTests);
</script>

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

@ -49,6 +49,8 @@ This is bad during printing, it means tall image frames won't know
the size of the paper and cannot break into continuations along
multiple pages. */
img {
color: #eee;
text-align: center;
display: block;
position: absolute;
margin: auto;

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

@ -73,6 +73,8 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=378028
/** Test for Bug 378028 **/
/* and for Bug 350471 **/
var smoothScrollPref = "general.smoothScroll";
SpecialPowers.setBoolPref(smoothScrollPref, false);
SimpleTest.waitForExplicitFinish();
/* There are three kinds of scroll events:
@ -230,6 +232,7 @@ function runTests()
testListbox("listbox");
testArrowScrollbox("hscrollbox");
testArrowScrollbox("vscrollbox");
SpecialPowers.clearUserPref(smoothScrollPref);
SimpleTest.finish();
});
}

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

@ -904,7 +904,7 @@ ESCAPE_SPACE = $(subst $(space),\$(space),$(1))
# This variable defines which OpenSSL algorithm to use to
# generate checksums for files that we upload
CHECKSUM_ALGORITHM = 'sha512'
CHECKSUM_ALGORITHM_PARAM = -d sha512 -d md5 -d sha1
# This variable defines where the checksum file will be located
CHECKSUM_FILE = "$(DIST)/$(PKG_PATH)/$(CHECKSUMS_FILE_BASENAME).checksums"
@ -941,7 +941,7 @@ checksum:
mkdir -p `dirname $(CHECKSUM_FILE)`
@$(PYTHON) $(MOZILLA_DIR)/build/checksums.py \
-o $(CHECKSUM_FILE) \
-d $(CHECKSUM_ALGORITHM) \
$(CHECKSUM_ALGORITHM_PARAM) \
-s $(call QUOTED_WILDCARD,$(DIST)) \
$(UPLOAD_FILES)
@echo "CHECKSUM FILE START"

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

@ -78,9 +78,12 @@ var gIgnoreScrollEvent = true;
var gPrefSvc = Components.classes["@mozilla.org/preferences-service;1"].
getService(Components.interfaces.nsIPrefBranch2);
const kPrefSmoothScroll = "general.smoothScroll";
const kPrefNameTimeout = "mousewheel.transaction.timeout";
const kDefaultTimeout = gPrefSvc.getIntPref(kPrefNameTimeout);
gPrefSvc.setBoolPref(kPrefSmoothScroll, false);
var gTimeout = kDefaultTimeout;
gBody.addEventListener("MozMouseScrollFailed", onMouseScrollFailed, false);
@ -117,6 +120,7 @@ function onunload()
{
resetTimeoutPrefs();
disableNonTestMouseEvents(false);
gPrefSvc.clearUserPref(kPrefSmoothScroll);
window.opener.wrappedJSObject.SimpleTest.finish();
}

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

@ -110,11 +110,14 @@ var gTimer;
var gPrefSvc = Components.classes["@mozilla.org/preferences-service;1"].
getService(Components.interfaces.nsIPrefBranch2);
const kPrefSmoothScroll = "general.smoothScroll";
const kPrefNameTimeout = "mousewheel.transaction.timeout";
const kPrefNameIgnoreMoveDelay = "mousewheel.transaction.ignoremovedelay";
const kDefaultTimeout = gPrefSvc.getIntPref(kPrefNameTimeout);
const kDefaultIgnoreMoveDelay = gPrefSvc.getIntPref(kPrefNameIgnoreMoveDelay)
const kDefaultIgnoreMoveDelay = gPrefSvc.getIntPref(kPrefNameIgnoreMoveDelay);
gPrefSvc.setBoolPref(kPrefSmoothScroll, false);
var gTimeout, gIgnoreMoveDelay;
var gEnoughForTimeout, gEnoughForIgnoreMoveDelay;
@ -171,6 +174,7 @@ function onload()
function onunload()
{
resetTimeoutPrefs();
gPrefSvc.clearUserPref(kPrefSmoothScroll);
disableNonTestMouseEvents(false);
window.opener.wrappedJSObject.SimpleTest.finish();
}