Merge last PGO-green changeset of mozilla-inbound to mozilla-central
|
@ -45,9 +45,7 @@ include $(DEPTH)/config/autoconf.mk
|
|||
MODULE = accessibility
|
||||
DIRS = public src build
|
||||
|
||||
ifdef ENABLE_TESTS
|
||||
DIRS += tests
|
||||
endif
|
||||
TEST_DIRS += tests
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
|
|
|
@ -56,7 +56,13 @@ namespace statistics {
|
|||
* Report that ISimpleDOM* has been used.
|
||||
*/
|
||||
inline void ISimpleDOMUsed()
|
||||
{ Telemetry::Accumulate(Telemetry::ISIMPLE_DOM_USAGE, 1); }
|
||||
{
|
||||
static bool firstTime = true;
|
||||
if (firstTime) {
|
||||
Telemetry::Accumulate(Telemetry::ISIMPLE_DOM_USAGE, 1);
|
||||
firstTime = false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Report that IAccessibleTable has been used.
|
||||
|
|
|
@ -49,9 +49,7 @@ abs_srcdir = $(call core_abspath,$(srcdir))
|
|||
|
||||
CHROME_DEPS += $(abs_srcdir)/content/overrides/app-license.html
|
||||
|
||||
ifdef ENABLE_TESTS
|
||||
DIRS += content/test
|
||||
endif
|
||||
TEST_DIRS += content/test
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
|
|
|
@ -43,8 +43,6 @@ VPATH = @srcdir@
|
|||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
ifdef ENABLE_TESTS
|
||||
DIRS += test
|
||||
endif
|
||||
TEST_DIRS += test
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
|
|
@ -45,9 +45,7 @@ include $(DEPTH)/config/autoconf.mk
|
|||
MODULE = browserdir
|
||||
LIBRARY_NAME = browserdir_s
|
||||
|
||||
ifdef ENABLE_TESTS
|
||||
DIRS = tests
|
||||
endif
|
||||
TEST_DIRS += tests
|
||||
|
||||
FORCE_STATIC_LIB = 1
|
||||
|
||||
|
|
|
@ -43,8 +43,6 @@ include $(DEPTH)/config/autoconf.mk
|
|||
|
||||
DIRS = public src
|
||||
|
||||
ifdef ENABLE_TESTS
|
||||
DIRS += test
|
||||
endif
|
||||
TEST_DIRS += test
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
|
|
@ -45,9 +45,7 @@ include $(DEPTH)/config/autoconf.mk
|
|||
|
||||
DIRS = src
|
||||
|
||||
ifdef ENABLE_TESTS
|
||||
DIRS += tests
|
||||
endif
|
||||
TEST_DIRS += tests
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
|
|
|
@ -43,9 +43,7 @@ VPATH = @srcdir@
|
|||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
ifdef ENABLE_TESTS
|
||||
DIRS += tests
|
||||
endif
|
||||
TEST_DIRS += tests
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
|
|
|
@ -46,8 +46,6 @@ MODULE = privatebrowsing
|
|||
|
||||
DIRS = src
|
||||
|
||||
ifdef ENABLE_TESTS
|
||||
DIRS += test
|
||||
endif
|
||||
TEST_DIRS += test
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
|
|
@ -43,9 +43,7 @@ VPATH = @srcdir@
|
|||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
ifdef ENABLE_TESTS
|
||||
DIRS += content/test
|
||||
endif
|
||||
TEST_DIRS += content/test
|
||||
|
||||
ifdef MOZILLA_OFFICIAL
|
||||
DEFINES += -DOFFICIAL_BUILD=1
|
||||
|
|
|
@ -43,8 +43,6 @@ VPATH = @srcdir@
|
|||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
ifdef ENABLE_TESTS
|
||||
DIRS = test
|
||||
endif
|
||||
TEST_DIRS += test
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
|
|
@ -44,8 +44,6 @@ include $(DEPTH)/config/autoconf.mk
|
|||
|
||||
DIRS = public src
|
||||
|
||||
ifdef ENABLE_TESTS
|
||||
DIRS += test
|
||||
endif
|
||||
TEST_DIRS += test
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
|
|
@ -43,9 +43,7 @@ VPATH = @srcdir@
|
|||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
ifdef ENABLE_TESTS
|
||||
DIRS += test
|
||||
endif
|
||||
TEST_DIRS += test
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
|
|
|
@ -52,8 +52,6 @@ EXTRA_JS_MODULES = \
|
|||
highlighter.jsm \
|
||||
$(NULL)
|
||||
|
||||
ifdef ENABLE_TESTS
|
||||
DIRS += test
|
||||
endif
|
||||
TEST_DIRS += test
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
|
|
@ -43,9 +43,7 @@ VPATH = @srcdir@
|
|||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
ifdef ENABLE_TESTS
|
||||
DIRS += test
|
||||
endif
|
||||
TEST_DIRS += test
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
|
|
|
@ -45,9 +45,7 @@ VPATH = @srcdir@
|
|||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
ifdef ENABLE_TESTS
|
||||
DIRS += test
|
||||
endif
|
||||
TEST_DIRS += test
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
|
|
|
@ -44,9 +44,7 @@ VPATH = @srcdir@
|
|||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
ifdef ENABLE_TESTS
|
||||
DIRS += test
|
||||
endif
|
||||
TEST_DIRS += test
|
||||
|
||||
EXTRA_JS_MODULES = \
|
||||
source-editor.jsm \
|
||||
|
|
|
@ -42,9 +42,7 @@ VPATH = @srcdir@
|
|||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
ifdef ENABLE_TESTS
|
||||
DIRS += test
|
||||
endif
|
||||
TEST_DIRS += test
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
|
|
|
@ -42,9 +42,7 @@ VPATH = @srcdir@
|
|||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
ifdef ENABLE_TESTS
|
||||
DIRS += test
|
||||
endif
|
||||
TEST_DIRS += test
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
|
|
|
@ -44,9 +44,7 @@ include $(DEPTH)/config/autoconf.mk
|
|||
|
||||
DIRS = public src
|
||||
|
||||
ifdef ENABLE_TESTS
|
||||
DIRS += test
|
||||
endif
|
||||
TEST_DIRS += test
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
|
|
|
@ -44,9 +44,7 @@ include $(DEPTH)/config/autoconf.mk
|
|||
|
||||
include $(topsrcdir)/config/config.mk
|
||||
|
||||
ifdef ENABLE_TESTS
|
||||
DIRS += test
|
||||
endif
|
||||
TEST_DIRS += test
|
||||
|
||||
EXTRA_JS_MODULES = \
|
||||
openLocationLastURL.jsm \
|
||||
|
|
|
@ -55,17 +55,15 @@ endif
|
|||
|
||||
DIRS += pgo
|
||||
|
||||
ifdef ENABLE_TESTS
|
||||
DIRS += autoconf/test
|
||||
TEST_DIRS += autoconf/test
|
||||
ifeq (android,$(MOZ_WIDGET_TOOLKIT))
|
||||
DIRS += mobile/sutagent/android \
|
||||
TEST_DIRS += mobile/sutagent/android \
|
||||
mobile/sutagent/android/watcher \
|
||||
mobile/sutagent/android/ffxcp \
|
||||
mobile/sutagent/android/fencp \
|
||||
mobile/robocop \
|
||||
$(NULL)
|
||||
endif
|
||||
endif
|
||||
|
||||
ifdef MOZ_APP_BASENAME
|
||||
DIST_FILES = application.ini
|
||||
|
|
|
@ -45,9 +45,7 @@ include $(DEPTH)/config/autoconf.mk
|
|||
MODULE = caps
|
||||
DIRS = idl include src
|
||||
|
||||
ifdef ENABLE_TESTS
|
||||
DIRS += tests/mochitest
|
||||
endif
|
||||
TEST_DIRS += tests/mochitest
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
|
|
|
@ -44,9 +44,7 @@ include $(DEPTH)/config/autoconf.mk
|
|||
|
||||
DIRS = public src
|
||||
|
||||
ifdef ENABLE_TESTS
|
||||
DIRS += test
|
||||
endif
|
||||
TEST_DIRS += test
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
|
|
|
@ -2,16 +2,17 @@
|
|||
<html>
|
||||
<head>
|
||||
<title>Test for XMLHttpRequest</title>
|
||||
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
|
||||
</head>
|
||||
<body onload="gen.next();">
|
||||
<p id="display"></p>
|
||||
<div id="content" style="display: none">
|
||||
|
||||
|
||||
</div>
|
||||
<pre id="test">
|
||||
<script class="testbody" type="application/javascript;version=1.7">
|
||||
"use strict";
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
|
||||
var gen = runTests();
|
||||
|
@ -53,7 +54,7 @@ for (i = 0; i < passFiles.length; ++i) {
|
|||
|
||||
for (i = 0; i < failFiles.length; ++i) {
|
||||
xhr = new XMLHttpRequest();
|
||||
didthrow = false;
|
||||
var didthrow = false;
|
||||
try {
|
||||
xhr.open(failFiles[i][1], failFiles[i][0], false);
|
||||
xhr.send(null);
|
||||
|
@ -136,7 +137,7 @@ is(xhr.response, "hello pass\n", "wrong response");
|
|||
function arraybuffer_equals_to(ab, s) {
|
||||
is(ab.byteLength, s.length, "wrong arraybuffer byteLength");
|
||||
|
||||
u8v = new Uint8Array(ab);
|
||||
var u8v = new Uint8Array(ab);
|
||||
is(String.fromCharCode.apply(String, u8v), s, "wrong values");
|
||||
}
|
||||
|
||||
|
@ -150,7 +151,7 @@ yield;
|
|||
is(xhr.status, 200, "wrong status");
|
||||
checkResponseTextAccessThrows(xhr);
|
||||
checkResponseXMLAccessThrows(xhr);
|
||||
ab = xhr.response;
|
||||
var ab = xhr.response;
|
||||
ok(ab != null, "should have a non-null arraybuffer");
|
||||
arraybuffer_equals_to(ab, "hello pass\n");
|
||||
|
||||
|
@ -161,7 +162,7 @@ xhr.onloadend = continueTest;
|
|||
xhr.send(null);
|
||||
yield;
|
||||
is(xhr.status, 200, "wrong status");
|
||||
ab2 = xhr.response;
|
||||
var ab2 = xhr.response;
|
||||
ok(ab2 != null, "should have a non-null arraybuffer");
|
||||
ok(ab2 != ab, "arraybuffer on XHR reuse should be distinct");
|
||||
arraybuffer_equals_to(ab, "hello pass\n");
|
||||
|
@ -186,7 +187,7 @@ is(xhr.response, xhr.response, "returns the same ArrayBuffer");
|
|||
var xhr = new XMLHttpRequest();
|
||||
xhr.open("POST", 'responseIdentical.sjs');
|
||||
xhr.responseType = 'json';
|
||||
jsonObjStr = JSON.stringify({title: "aBook", author: "john"});
|
||||
var jsonObjStr = JSON.stringify({title: "aBook", author: "john"});
|
||||
xhr.onloadend = continueTest;
|
||||
xhr.send(jsonObjStr);
|
||||
yield;
|
||||
|
@ -217,106 +218,108 @@ function checkOnloadCount() {
|
|||
|
||||
var responseTypes = ['blob', 'moz-blob'];
|
||||
for (var i = 0; i < responseTypes.length; i++) {
|
||||
var t = responseTypes[i];
|
||||
// with a simple text file
|
||||
xhr = new XMLHttpRequest();
|
||||
xhr.open("GET", 'file_XHR_pass2.txt');
|
||||
xhr.responseType = t;
|
||||
xhr.onloadend = continueTest;
|
||||
xhr.send(null);
|
||||
yield;
|
||||
is(xhr.status, 200, "wrong status");
|
||||
checkResponseTextAccessThrows(xhr);
|
||||
checkResponseXMLAccessThrows(xhr);
|
||||
b = xhr.response;
|
||||
ok(b, "should have a non-null blob");
|
||||
ok(b instanceof Blob, "should be a Blob");
|
||||
ok(!(b instanceof File), "should not be a File");
|
||||
is(b.size, "hello pass\n".length, "wrong blob size");
|
||||
|
||||
var fr = new FileReader();
|
||||
fr.onload = function() {
|
||||
ok(fr.result, "hello pass\n", "wrong values");
|
||||
checkOnloadCount();
|
||||
};
|
||||
fr.readAsBinaryString(b);
|
||||
|
||||
// with a binary file
|
||||
(function(){
|
||||
var xhr = new XMLHttpRequest();
|
||||
xhr.onreadystatechange = function() {
|
||||
switch (xhr.readyState) {
|
||||
case 2:
|
||||
is(xhr.status, 200, "wrong status");
|
||||
xhr.responseType = t;
|
||||
break;
|
||||
case 4:
|
||||
b = xhr.response;
|
||||
ok(b != null, "should have a non-null blob");
|
||||
is(b.size, 12, "wrong blob size");
|
||||
var t = responseTypes[i];
|
||||
// with a simple text file
|
||||
xhr = new XMLHttpRequest();
|
||||
xhr.open("GET", 'file_XHR_pass2.txt');
|
||||
xhr.responseType = t;
|
||||
xhr.onloadend = continueTest;
|
||||
xhr.send(null);
|
||||
yield;
|
||||
is(xhr.status, 200, "wrong status");
|
||||
checkResponseTextAccessThrows(xhr);
|
||||
checkResponseXMLAccessThrows(xhr);
|
||||
var b = xhr.response;
|
||||
ok(b, "should have a non-null blob");
|
||||
ok(b instanceof Blob, "should be a Blob");
|
||||
ok(!(b instanceof File), "should not be a File");
|
||||
is(b.size, "hello pass\n".length, "wrong blob size");
|
||||
|
||||
(function(){
|
||||
var fr = new FileReader();
|
||||
fr.onload = function() {
|
||||
is(fr.result, "\xaa\xee\0\x03\xff\xff\xff\xff\xbb\xbb\xbb\xbb", "wrong values");
|
||||
ok(fr.result, "hello pass\n", "wrong values");
|
||||
checkOnloadCount();
|
||||
};
|
||||
xhr = null; // kill the XHR object
|
||||
SpecialPowers.gc();
|
||||
fr.readAsBinaryString(b);
|
||||
break;
|
||||
}
|
||||
};
|
||||
xhr.open("GET", 'file_XHR_binary1.bin', true);
|
||||
xhr.send(null);
|
||||
})();
|
||||
})();
|
||||
|
||||
(function(){
|
||||
// with a larger binary file
|
||||
var xhr = new XMLHttpRequest();
|
||||
xhr.onreadystatechange = function() {
|
||||
if (xhr.readyState == 4) {
|
||||
b = xhr.response;
|
||||
ok(b != null, "should have a non-null blob");
|
||||
is(b.size, 65536, "wrong blob size");
|
||||
// with a binary file
|
||||
(function(){
|
||||
var xhr = new XMLHttpRequest();
|
||||
xhr.onreadystatechange = function() {
|
||||
switch (xhr.readyState) {
|
||||
case 2:
|
||||
is(xhr.status, 200, "wrong status");
|
||||
xhr.responseType = t;
|
||||
break;
|
||||
case 4:
|
||||
b = xhr.response;
|
||||
ok(b != null, "should have a non-null blob");
|
||||
is(b.size, 12, "wrong blob size");
|
||||
|
||||
var fr = new FileReader();
|
||||
fr.onload = function() {
|
||||
var u8 = new Uint8Array(fr.result);
|
||||
for (var i = 0; i < 65536; i++) {
|
||||
if (u8[i] !== (i & 255)) {
|
||||
break;
|
||||
}
|
||||
var fr = new FileReader();
|
||||
fr.onload = function() {
|
||||
is(fr.result, "\xaa\xee\0\x03\xff\xff\xff\xff\xbb\xbb\xbb\xbb", "wrong values");
|
||||
checkOnloadCount();
|
||||
};
|
||||
xhr = null; // kill the XHR object
|
||||
SpecialPowers.gc();
|
||||
fr.readAsBinaryString(b);
|
||||
break;
|
||||
}
|
||||
is(i, 65536, "wrong value at offset " + i);
|
||||
checkOnloadCount();
|
||||
};
|
||||
xhr = null; // kill the XHR object
|
||||
SpecialPowers.gc();
|
||||
fr.readAsArrayBuffer(b);
|
||||
}
|
||||
};
|
||||
xhr.open("GET", 'file_XHR_binary2.bin', true);
|
||||
xhr.responseType = t;
|
||||
xhr.send(null);
|
||||
})();
|
||||
xhr.open("GET", 'file_XHR_binary1.bin', true);
|
||||
xhr.send(null);
|
||||
})();
|
||||
|
||||
(function(){
|
||||
// with a larger binary file
|
||||
var xhr = new XMLHttpRequest();
|
||||
xhr.onreadystatechange = function() {
|
||||
if (xhr.readyState == 4) {
|
||||
b = xhr.response;
|
||||
ok(b != null, "should have a non-null blob");
|
||||
is(b.size, 65536, "wrong blob size");
|
||||
|
||||
var fr = new FileReader();
|
||||
fr.onload = function() {
|
||||
var u8 = new Uint8Array(fr.result);
|
||||
for (var i = 0; i < 65536; i++) {
|
||||
if (u8[i] !== (i & 255)) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
is(i, 65536, "wrong value at offset " + i);
|
||||
checkOnloadCount();
|
||||
};
|
||||
xhr = null; // kill the XHR object
|
||||
SpecialPowers.gc();
|
||||
fr.readAsArrayBuffer(b);
|
||||
}
|
||||
};
|
||||
xhr.open("GET", 'file_XHR_binary2.bin', true);
|
||||
xhr.responseType = t;
|
||||
xhr.send(null);
|
||||
})();
|
||||
}
|
||||
|
||||
var client = new XMLHttpRequest();
|
||||
client.onreadystatechange = function() {
|
||||
if(client.readyState == 4) {
|
||||
try {
|
||||
is(client.responseXML, null, "responseXML should be null.");
|
||||
is(client.responseText, "", "responseText should be empty string.");
|
||||
is(client.response, "", "response should be empty string.");
|
||||
is(client.status, 0, "status should be 0.");
|
||||
is(client.statusText, "", "statusText should be empty string.");
|
||||
is(client.getAllResponseHeaders(), "",
|
||||
"getAllResponseHeaders() should return empty string.");
|
||||
} catch(ex) {
|
||||
ok(false, "Shouldn't throw! [" + ex + "]");
|
||||
}
|
||||
if(client.readyState == 4) {
|
||||
try {
|
||||
is(client.responseXML, null, "responseXML should be null.");
|
||||
is(client.responseText, "", "responseText should be empty string.");
|
||||
is(client.response, "", "response should be empty string.");
|
||||
is(client.status, 0, "status should be 0.");
|
||||
is(client.statusText, "", "statusText should be empty string.");
|
||||
is(client.getAllResponseHeaders(), "",
|
||||
"getAllResponseHeaders() should return empty string.");
|
||||
} catch(ex) {
|
||||
ok(false, "Shouldn't throw! [" + ex + "]");
|
||||
}
|
||||
}
|
||||
}
|
||||
client.open("GET", "file_XHR_pass1.xml", true);
|
||||
client.send();
|
||||
client.abort();
|
||||
|
|
|
@ -45,9 +45,7 @@ include $(DEPTH)/config/autoconf.mk
|
|||
|
||||
PARALLEL_DIRS = public src
|
||||
|
||||
ifdef ENABLE_TESTS
|
||||
DIRS += test
|
||||
endif
|
||||
TEST_DIRS += test
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
|
|
|
@ -2794,6 +2794,7 @@ struct NS_STACK_CLASS nsCanvasBidiProcessor : public nsBidiPresUtils::BidiProces
|
|||
0,
|
||||
mTextRun->GetLength(),
|
||||
nsnull,
|
||||
nsnull,
|
||||
nsnull);
|
||||
}
|
||||
|
||||
|
|
|
@ -44,9 +44,7 @@ include $(DEPTH)/config/autoconf.mk
|
|||
|
||||
PARALLEL_DIRS = public src
|
||||
|
||||
ifdef ENABLE_TESTS
|
||||
DIRS += test
|
||||
endif
|
||||
TEST_DIRS += test
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
|
|
|
@ -44,9 +44,7 @@ include $(DEPTH)/config/autoconf.mk
|
|||
|
||||
PARALLEL_DIRS = public src
|
||||
|
||||
ifdef ENABLE_TESTS
|
||||
DIRS += test
|
||||
endif
|
||||
TEST_DIRS += test
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
|
|
|
@ -43,18 +43,16 @@ relativesrcdir = content/html/content/test
|
|||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
ifdef ENABLE_TESTS
|
||||
# This extra subdirectory is needed due to the nature of this test.
|
||||
# With the bug, the test loads the base URL of the bug649134/file_*.sjs
|
||||
# files, and the mochitest server responds with the contents of index.html if
|
||||
# it exists in that case, which we use to detect failure.
|
||||
# We can't have index.html in this directory because it would prevent
|
||||
# running the tests here.
|
||||
DIRS += bug649134
|
||||
TEST_DIRS += bug649134
|
||||
|
||||
# For form-related test suite.
|
||||
DIRS += forms
|
||||
endif
|
||||
TEST_DIRS += forms
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
|
|
|
@ -44,9 +44,7 @@ include $(DEPTH)/config/autoconf.mk
|
|||
|
||||
PARALLEL_DIRS = public src
|
||||
|
||||
ifdef ENABLE_TESTS
|
||||
DIRS += test
|
||||
endif
|
||||
TEST_DIRS += test
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
|
|
|
@ -45,9 +45,7 @@ include $(DEPTH)/config/autoconf.mk
|
|||
|
||||
PARALLEL_DIRS = src
|
||||
|
||||
ifdef ENABLE_TESTS
|
||||
DIRS += test
|
||||
endif
|
||||
TEST_DIRS += test
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
|
|
|
@ -39,7 +39,6 @@
|
|||
#include "nsSVGSwitchElement.h"
|
||||
#include "DOMSVGTests.h"
|
||||
#include "nsIFrame.h"
|
||||
#include "nsISVGChildFrame.h"
|
||||
#include "nsSVGUtils.h"
|
||||
#include "mozilla/Preferences.h"
|
||||
|
||||
|
@ -89,7 +88,7 @@ void
|
|||
nsSVGSwitchElement::MaybeInvalidate()
|
||||
{
|
||||
// We don't reuse UpdateActiveChild() and check if mActiveChild has changed
|
||||
// to determine if we should call nsSVGUtils::UpdateGraphic. If we did that,
|
||||
// to determine if we should invalidate. If we did that,
|
||||
// nsSVGUtils::UpdateGraphic would not invalidate the old mActiveChild area!
|
||||
|
||||
if (FindActiveChild() == mActiveChild) {
|
||||
|
@ -98,10 +97,7 @@ nsSVGSwitchElement::MaybeInvalidate()
|
|||
|
||||
nsIFrame *frame = GetPrimaryFrame();
|
||||
if (frame) {
|
||||
nsISVGChildFrame* svgFrame = do_QueryFrame(frame);
|
||||
if (svgFrame) {
|
||||
nsSVGUtils::UpdateGraphic(svgFrame);
|
||||
}
|
||||
nsSVGUtils::UpdateGraphic(frame);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -44,8 +44,6 @@ include $(DEPTH)/config/autoconf.mk
|
|||
|
||||
PARALLEL_DIRS = public src builtin
|
||||
|
||||
ifdef ENABLE_TESTS
|
||||
DIRS += test
|
||||
endif
|
||||
TEST_DIRS += test
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
|
|
@ -44,9 +44,7 @@ include $(DEPTH)/config/autoconf.mk
|
|||
|
||||
PARALLEL_DIRS = public resources src
|
||||
|
||||
ifdef ENABLE_TESTS
|
||||
DIRS += test
|
||||
endif
|
||||
TEST_DIRS += test
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
|
|
|
@ -44,9 +44,7 @@ include $(DEPTH)/config/autoconf.mk
|
|||
|
||||
PARALLEL_DIRS = public src
|
||||
|
||||
ifdef ENABLE_TESTS
|
||||
DIRS += tests/buster \
|
||||
tests/mochitest
|
||||
endif
|
||||
TEST_DIRS += tests/buster \
|
||||
tests/mochitest
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
|
|
@ -119,14 +119,6 @@ txNamespaceMap::lookupNamespace(nsIAtom* aPrefix)
|
|||
return kNameSpaceID_Unknown;
|
||||
}
|
||||
|
||||
PRInt32
|
||||
txNamespaceMap::lookupNamespace(const nsAString& aPrefix)
|
||||
{
|
||||
nsCOMPtr<nsIAtom> prefix = do_GetAtom(aPrefix);
|
||||
|
||||
return lookupNamespace(prefix);
|
||||
}
|
||||
|
||||
PRInt32
|
||||
txNamespaceMap::lookupNamespaceWithDefault(const nsAString& aPrefix)
|
||||
{
|
||||
|
|
|
@ -65,7 +65,6 @@ public:
|
|||
|
||||
nsresult mapNamespace(nsIAtom* aPrefix, const nsAString& aNamespaceURI);
|
||||
PRInt32 lookupNamespace(nsIAtom* aPrefix);
|
||||
PRInt32 lookupNamespace(const nsAString& aPrefix);
|
||||
PRInt32 lookupNamespaceWithDefault(const nsAString& aPrefix);
|
||||
|
||||
private:
|
||||
|
|
|
@ -562,14 +562,6 @@ txXPathNodeUtils::isWhitespace(const txXPathNode& aNode)
|
|||
return aNode.Content()->TextIsOnlyWhitespace();
|
||||
}
|
||||
|
||||
/* static */
|
||||
txXPathNode*
|
||||
txXPathNodeUtils::getDocument(const txXPathNode& aNode)
|
||||
{
|
||||
nsIDocument* document = aNode.mNode->GetCurrentDoc();
|
||||
return document ? new txXPathNode(document) : nsnull;
|
||||
}
|
||||
|
||||
/* static */
|
||||
txXPathNode*
|
||||
txXPathNodeUtils::getOwnerDocument(const txXPathNode& aNode)
|
||||
|
|
|
@ -121,7 +121,6 @@ public:
|
|||
static PRUint16 getNodeType(const txXPathNode& aNode);
|
||||
static void appendNodeValue(const txXPathNode& aNode, nsAString& aResult);
|
||||
static bool isWhitespace(const txXPathNode& aNode);
|
||||
static txXPathNode* getDocument(const txXPathNode& aNode);
|
||||
static txXPathNode* getOwnerDocument(const txXPathNode& aNode);
|
||||
static PRInt32 getUniqueIdentifier(const txXPathNode& aNode);
|
||||
static nsresult getXSLTId(const txXPathNode& aNode,
|
||||
|
|
|
@ -44,8 +44,6 @@ include $(DEPTH)/config/autoconf.mk
|
|||
|
||||
PARALLEL_DIRS = public src
|
||||
|
||||
ifdef ENABLE_TESTS
|
||||
DIRS += test
|
||||
endif
|
||||
TEST_DIRS += test
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
|
|
@ -45,9 +45,7 @@ include $(DEPTH)/config/autoconf.mk
|
|||
MODULE = xuldoc
|
||||
PARALLEL_DIRS = public src
|
||||
|
||||
ifdef ENABLE_TESTS
|
||||
DIRS += test
|
||||
endif
|
||||
TEST_DIRS += test
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
|
|
|
@ -51,8 +51,6 @@ DIRS = \
|
|||
resources/content \
|
||||
$(NULL)
|
||||
|
||||
ifdef ENABLE_TESTS
|
||||
DIRS += test
|
||||
endif
|
||||
TEST_DIRS += test
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
|
|
@ -749,6 +749,7 @@ nsDocShell::nsDocShell():
|
|||
mIsActive(true),
|
||||
mIsAppTab(false),
|
||||
mUseGlobalHistory(false),
|
||||
mInPrivateBrowsing(false),
|
||||
mFiredUnloadEvent(false),
|
||||
mEODForCurrentDocument(false),
|
||||
mURIResultedInDocument(false),
|
||||
|
@ -1984,6 +1985,30 @@ nsDocShell::SetAllowJavascript(bool aAllowJavascript)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDocShell::GetUsePrivateBrowsing(bool* aUsePrivateBrowsing)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aUsePrivateBrowsing);
|
||||
|
||||
*aUsePrivateBrowsing = mInPrivateBrowsing;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDocShell::SetUsePrivateBrowsing(bool aUsePrivateBrowsing)
|
||||
{
|
||||
mInPrivateBrowsing = aUsePrivateBrowsing;
|
||||
|
||||
PRInt32 count = mChildList.Count();
|
||||
for (PRInt32 i = 0; i < count; ++i) {
|
||||
nsCOMPtr<nsILoadContext> shell = do_QueryInterface(ChildAt(i));
|
||||
if (shell) {
|
||||
shell->SetUsePrivateBrowsing(aUsePrivateBrowsing);
|
||||
}
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsDocShell::GetAllowMetaRedirects(bool * aReturn)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aReturn);
|
||||
|
@ -2608,10 +2633,10 @@ nsDocShell::SetDocLoaderParent(nsDocLoader * aParent)
|
|||
|
||||
// If parent is another docshell, we inherit all their flags for
|
||||
// allowing plugins, scripting etc.
|
||||
bool value;
|
||||
nsCOMPtr<nsIDocShell> parentAsDocShell(do_QueryInterface(parent));
|
||||
if (parentAsDocShell)
|
||||
{
|
||||
bool value;
|
||||
if (NS_SUCCEEDED(parentAsDocShell->GetAllowPlugins(&value)))
|
||||
{
|
||||
SetAllowPlugins(value);
|
||||
|
@ -2645,6 +2670,12 @@ nsDocShell::SetDocLoaderParent(nsDocLoader * aParent)
|
|||
}
|
||||
SetAllowDNSPrefetch(value);
|
||||
}
|
||||
nsCOMPtr<nsILoadContext> parentAsLoadContext(do_QueryInterface(parent));
|
||||
if (parentAsLoadContext &&
|
||||
NS_SUCCEEDED(parentAsLoadContext->GetUsePrivateBrowsing(&value)))
|
||||
{
|
||||
SetUsePrivateBrowsing(value);
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIURIContentListener> parentURIListener(do_GetInterface(parent));
|
||||
if (parentURIListener)
|
||||
|
@ -7217,7 +7248,8 @@ nsDocShell::RestoreFromHistory()
|
|||
|
||||
// this.AddChild(child) calls child.SetDocLoaderParent(this), meaning
|
||||
// that the child inherits our state. Among other things, this means
|
||||
// that the child inherits our mIsActive, which is what we want.
|
||||
// that the child inherits our mIsActive and mInPrivateBrowsing, which
|
||||
// is what we want.
|
||||
AddChild(childItem);
|
||||
|
||||
childShell->SetAllowPlugins(allowPlugins);
|
||||
|
|
|
@ -803,6 +803,7 @@ protected:
|
|||
bool mIsActive;
|
||||
bool mIsAppTab;
|
||||
bool mUseGlobalHistory;
|
||||
bool mInPrivateBrowsing;
|
||||
|
||||
// This boolean is set to true right before we fire pagehide and generally
|
||||
// unset when we embed a new content viewer. While it's true no navigation
|
||||
|
|
|
@ -46,7 +46,7 @@ interface nsIDOMWindow;
|
|||
* can be queried for various information about where the load is
|
||||
* happening.
|
||||
*/
|
||||
[scriptable, uuid(314d8a54-1caf-4721-94d7-f6c82d9b82ed)]
|
||||
[scriptable, uuid(386806c3-c4cb-4b3d-b05d-c08ea10f5585)]
|
||||
interface nsILoadContext : nsISupports
|
||||
{
|
||||
/**
|
||||
|
@ -83,4 +83,9 @@ interface nsILoadContext : nsISupports
|
|||
* on any URIs that might be around.
|
||||
*/
|
||||
readonly attribute boolean isContent;
|
||||
|
||||
/*
|
||||
* Attribute that determines if private browsing should be used.
|
||||
*/
|
||||
attribute boolean usePrivateBrowsing;
|
||||
};
|
||||
|
|
|
@ -97,11 +97,9 @@ DIRS += \
|
|||
$(NULL)
|
||||
endif
|
||||
|
||||
ifdef ENABLE_TESTS
|
||||
DIRS += tests
|
||||
TEST_DIRS += tests
|
||||
ifneq (,$(filter gtk2 cocoa windows android qt os2,$(MOZ_WIDGET_TOOLKIT)))
|
||||
DIRS += plugins/test
|
||||
endif
|
||||
TEST_DIRS += plugins/test
|
||||
endif
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
|
|
@ -68,9 +68,7 @@ XPIDLSRCS = \
|
|||
nsIDOMNavigatorBattery.idl \
|
||||
$(NULL)
|
||||
|
||||
ifdef ENABLE_TESTS
|
||||
DIRS += test
|
||||
endif
|
||||
TEST_DIRS += test
|
||||
|
||||
include $(topsrcdir)/config/config.mk
|
||||
include $(topsrcdir)/ipc/chromium/chromium-config.mk
|
||||
|
|
|
@ -121,9 +121,7 @@ XPIDLSRCS = \
|
|||
nsIIndexedDatabaseManager.idl \
|
||||
$(NULL)
|
||||
|
||||
ifdef ENABLE_TESTS
|
||||
DIRS += test
|
||||
endif
|
||||
TEST_DIRS += test
|
||||
|
||||
include $(topsrcdir)/config/config.mk
|
||||
include $(topsrcdir)/ipc/chromium/chromium-config.mk
|
||||
|
|
|
@ -47,10 +47,8 @@ LIBXUL_LIBRARY = 1
|
|||
FORCE_STATIC_LIB = 1
|
||||
EXPORT_LIBRARY = 1
|
||||
|
||||
ifdef ENABLE_TESTS
|
||||
ifneq (cocoa,$(MOZ_WIDGET_TOOLKIT))
|
||||
DIRS += tests
|
||||
endif
|
||||
TEST_DIRS += tests
|
||||
endif
|
||||
|
||||
EXPORTS = TabMessageUtils.h PCOMContentPermissionRequestChild.h
|
||||
|
|
|
@ -43,8 +43,6 @@ include $(DEPTH)/config/autoconf.mk
|
|||
|
||||
PARALLEL_DIRS = interfaces src
|
||||
|
||||
ifdef ENABLE_TESTS
|
||||
DIRS += tests
|
||||
endif
|
||||
TEST_DIRS += tests
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
|
|
@ -53,9 +53,7 @@ XPCSHELL_TESTS = \
|
|||
$(NULL)
|
||||
|
||||
ifneq (,$(filter gtk2 cocoa windows,$(MOZ_WIDGET_TOOLKIT)))
|
||||
ifdef ENABLE_TESTS
|
||||
DIRS += mochitest
|
||||
endif
|
||||
TEST_DIRS += mochitest
|
||||
endif
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
|
|
@ -44,8 +44,6 @@ include $(DEPTH)/config/autoconf.mk
|
|||
|
||||
DIRS = jsurl events storage offline json geolocation notification
|
||||
|
||||
ifdef ENABLE_TESTS
|
||||
DIRS += foo
|
||||
endif
|
||||
TEST_DIRS += foo
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
|
|
@ -62,8 +62,6 @@ LOCAL_INCLUDES = \
|
|||
|
||||
DEFINES += -D_IMPL_NS_LAYOUT
|
||||
|
||||
ifdef ENABLE_TESTS
|
||||
DIRS += test
|
||||
endif
|
||||
TEST_DIRS += test
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
|
|
@ -68,9 +68,7 @@ DEFINES += -DDEBUG_GC
|
|||
endif
|
||||
|
||||
DIRS = $(NULL)
|
||||
ifdef ENABLE_TESTS
|
||||
DIRS += test
|
||||
endif
|
||||
TEST_DIRS += test
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
|
|
|
@ -80,8 +80,6 @@ LOCAL_INCLUDES = \
|
|||
-I$(topsrcdir)/xpcom/build \
|
||||
$(NULL)
|
||||
|
||||
ifdef ENABLE_TESTS
|
||||
DIRS += test
|
||||
endif
|
||||
TEST_DIRS += test
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
|
|
@ -44,9 +44,7 @@ include $(DEPTH)/config/autoconf.mk
|
|||
|
||||
DIRS = public src
|
||||
|
||||
ifdef ENABLE_TESTS
|
||||
DIRS += test
|
||||
endif
|
||||
TEST_DIRS += test
|
||||
|
||||
# Enable Editor API Logging!
|
||||
ENABLE_EDITOR_API_LOG=1
|
||||
|
|
|
@ -43,9 +43,7 @@ FAIL_ON_WARNINGS = 1
|
|||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
ifdef ENABLE_TESTS
|
||||
DIRS += tests
|
||||
endif
|
||||
TEST_DIRS += tests
|
||||
|
||||
MODULE = editor
|
||||
LIBRARY_NAME = editorbase_s
|
||||
|
|
|
@ -43,9 +43,7 @@ FAIL_ON_WARNINGS = 1
|
|||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
ifdef ENABLE_TESTS
|
||||
DIRS += tests
|
||||
endif
|
||||
TEST_DIRS += tests
|
||||
|
||||
MODULE = editor
|
||||
LIBRARY_NAME = htmleditor_s
|
||||
|
|
|
@ -43,9 +43,7 @@ FAIL_ON_WARNINGS = 1
|
|||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
ifdef ENABLE_TESTS
|
||||
DIRS += tests
|
||||
endif
|
||||
TEST_DIRS += tests
|
||||
|
||||
MODULE = editor
|
||||
LIBRARY_NAME = texteditor_s
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
#ifdef MOZ_TABLETS_ONLY
|
||||
<supports-screens android:smallScreens="false"
|
||||
android:normalScreens="false"
|
||||
android:largeScreens="false"
|
||||
android:largeScreens="true"
|
||||
android:xlargeScreens="true" />
|
||||
#endif
|
||||
|
||||
|
|
|
@ -77,7 +77,7 @@ public class GeckoEvent {
|
|||
public static final int SAVE_STATE = 18;
|
||||
public static final int BROADCAST = 19;
|
||||
public static final int VIEWPORT = 20;
|
||||
public static final int VISTITED = 21;
|
||||
public static final int VISITED = 21;
|
||||
public static final int NETWORK_CHANGED = 22;
|
||||
|
||||
public static final int IME_COMPOSITION_END = 0;
|
||||
|
|
|
@ -44,8 +44,6 @@ include $(DEPTH)/config/autoconf.mk
|
|||
MODULE = spellchecker
|
||||
DIRS = idl locales hunspell src
|
||||
|
||||
ifdef ENABLE_TESTS
|
||||
DIRS += tests/chrome
|
||||
endif
|
||||
TEST_DIRS += tests/chrome
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
|
|
@ -45,9 +45,7 @@ include $(DEPTH)/config/autoconf.mk
|
|||
MODULE = universalchardet
|
||||
DIRS = src
|
||||
|
||||
ifdef ENABLE_TESTS
|
||||
DIRS += tests
|
||||
endif
|
||||
TEST_DIRS += tests
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
|
|
|
@ -333,7 +333,8 @@ nsFontMetrics::DrawString(const char *aString, PRUint32 aLength,
|
|||
if (mTextRunRTL) {
|
||||
pt.x += textRun->GetAdvanceWidth(0, aLength, &provider);
|
||||
}
|
||||
textRun->Draw(aContext->ThebesContext(), pt, gfxFont::GLYPH_FILL, 0, aLength, &provider, nsnull);
|
||||
textRun->Draw(aContext->ThebesContext(), pt, gfxFont::GLYPH_FILL, 0, aLength,
|
||||
&provider, nsnull, nsnull);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -351,7 +352,8 @@ nsFontMetrics::DrawString(const PRUnichar* aString, PRUint32 aLength,
|
|||
if (mTextRunRTL) {
|
||||
pt.x += textRun->GetAdvanceWidth(0, aLength, &provider);
|
||||
}
|
||||
textRun->Draw(aContext->ThebesContext(), pt, gfxFont::GLYPH_FILL, 0, aLength, &provider, nsnull);
|
||||
textRun->Draw(aContext->ThebesContext(), pt, gfxFont::GLYPH_FILL, 0, aLength,
|
||||
&provider, nsnull, nsnull);
|
||||
}
|
||||
|
||||
nsBoundingMetrics
|
||||
|
|
|
@ -1238,7 +1238,8 @@ struct GlyphBuffer {
|
|||
return &mGlyphBuffer[mNumGlyphs++];
|
||||
}
|
||||
|
||||
void Flush(cairo_t *aCR, gfxFont::DrawMode aDrawMode, bool aReverse,
|
||||
void Flush(cairo_t *aCR, cairo_pattern_t *aStrokePattern,
|
||||
gfxFont::DrawMode aDrawMode, bool aReverse,
|
||||
bool aFinish = false) {
|
||||
// Ensure there's enough room for a glyph to be added to the buffer
|
||||
if (!aFinish && mNumGlyphs < GLYPH_BUFFER_SIZE) {
|
||||
|
@ -1261,9 +1262,18 @@ struct GlyphBuffer {
|
|||
}
|
||||
|
||||
if (aDrawMode & gfxFont::GLYPH_STROKE) {
|
||||
if (aStrokePattern) {
|
||||
cairo_save(aCR);
|
||||
cairo_set_source(aCR, aStrokePattern);
|
||||
}
|
||||
|
||||
cairo_new_path(aCR);
|
||||
cairo_glyph_path(aCR, mGlyphBuffer, mNumGlyphs);
|
||||
cairo_stroke(aCR);
|
||||
|
||||
if (aStrokePattern) {
|
||||
cairo_restore(aCR);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1341,10 +1351,18 @@ gfxFont::CalcXScale(gfxContext *aContext)
|
|||
void
|
||||
gfxFont::Draw(gfxTextRun *aTextRun, PRUint32 aStart, PRUint32 aEnd,
|
||||
gfxContext *aContext, DrawMode aDrawMode, gfxPoint *aPt,
|
||||
Spacing *aSpacing)
|
||||
Spacing *aSpacing, gfxPattern *aStrokePattern)
|
||||
{
|
||||
NS_ASSERTION(aDrawMode <= gfxFont::GLYPH_PATH, "GLYPH_PATH cannot be used with GLYPH_FILL or GLYPH_STROKE");
|
||||
|
||||
// We have to multiply the stroke matrix by the context matrix as cairo
|
||||
// multiplies by the inverse of the context matrix when the pattern is set
|
||||
gfxMatrix strokeMatrix;
|
||||
if (aStrokePattern) {
|
||||
strokeMatrix = aStrokePattern->GetMatrix();
|
||||
aStrokePattern->SetMatrix(aContext->CurrentMatrix().Multiply(strokeMatrix));
|
||||
}
|
||||
|
||||
if (aStart >= aEnd)
|
||||
return;
|
||||
|
||||
|
@ -1372,6 +1390,10 @@ gfxFont::Draw(gfxTextRun *aTextRun, PRUint32 aStart, PRUint32 aEnd,
|
|||
|
||||
cairo_t *cr = aContext->GetCairo();
|
||||
RefPtr<DrawTarget> dt = aContext->GetDrawTarget();
|
||||
cairo_pattern_t *strokePattern = nsnull;
|
||||
if (aStrokePattern) {
|
||||
strokePattern = aStrokePattern->CairoPattern();
|
||||
}
|
||||
|
||||
RefPtr<ScaledFont> scaledFont;
|
||||
|
||||
|
@ -1410,7 +1432,7 @@ gfxFont::Draw(gfxTextRun *aTextRun, PRUint32 aStart, PRUint32 aEnd,
|
|||
}
|
||||
glyph->x = ToDeviceUnits(glyphX, devUnitsPerAppUnit);
|
||||
glyph->y = ToDeviceUnits(y, devUnitsPerAppUnit);
|
||||
glyphs.Flush(cr, aDrawMode, isRTL);
|
||||
glyphs.Flush(cr, strokePattern, aDrawMode, isRTL);
|
||||
|
||||
// synthetic bolding by multi-striking with 1-pixel offsets
|
||||
// at least once, more if there's room (large font sizes)
|
||||
|
@ -1426,7 +1448,7 @@ gfxFont::Draw(gfxTextRun *aTextRun, PRUint32 aStart, PRUint32 aEnd,
|
|||
devUnitsPerAppUnit);
|
||||
doubleglyph->y = glyph->y;
|
||||
strikeOffset += synBoldOnePixelOffset;
|
||||
glyphs.Flush(cr, aDrawMode, isRTL);
|
||||
glyphs.Flush(cr, strokePattern, aDrawMode, isRTL);
|
||||
} while (--strikeCount > 0);
|
||||
}
|
||||
} else {
|
||||
|
@ -1463,7 +1485,7 @@ gfxFont::Draw(gfxTextRun *aTextRun, PRUint32 aStart, PRUint32 aEnd,
|
|||
}
|
||||
glyph->x = ToDeviceUnits(glyphX, devUnitsPerAppUnit);
|
||||
glyph->y = ToDeviceUnits(y + details->mYOffset, devUnitsPerAppUnit);
|
||||
glyphs.Flush(cr, aDrawMode, isRTL);
|
||||
glyphs.Flush(cr, strokePattern, aDrawMode, isRTL);
|
||||
|
||||
if (IsSyntheticBold()) {
|
||||
double strikeOffset = synBoldOnePixelOffset;
|
||||
|
@ -1478,7 +1500,7 @@ gfxFont::Draw(gfxTextRun *aTextRun, PRUint32 aStart, PRUint32 aEnd,
|
|||
devUnitsPerAppUnit);
|
||||
doubleglyph->y = glyph->y;
|
||||
strikeOffset += synBoldOnePixelOffset;
|
||||
glyphs.Flush(cr, aDrawMode, isRTL);
|
||||
glyphs.Flush(cr, strokePattern, aDrawMode, isRTL);
|
||||
} while (--strikeCount > 0);
|
||||
}
|
||||
}
|
||||
|
@ -1507,7 +1529,7 @@ gfxFont::Draw(gfxTextRun *aTextRun, PRUint32 aStart, PRUint32 aEnd,
|
|||
}
|
||||
|
||||
// draw any remaining glyphs
|
||||
glyphs.Flush(cr, aDrawMode, isRTL, true);
|
||||
glyphs.Flush(cr, strokePattern, aDrawMode, isRTL, true);
|
||||
|
||||
} else {
|
||||
if (aDrawMode == gfxFont::GLYPH_PATH) {
|
||||
|
@ -1672,6 +1694,11 @@ gfxFont::Draw(gfxTextRun *aTextRun, PRUint32 aStart, PRUint32 aEnd,
|
|||
dt->SetTransform(oldMat);
|
||||
}
|
||||
|
||||
// Restore matrix for stroke pattern
|
||||
if (aStrokePattern) {
|
||||
aStrokePattern->SetMatrix(strokeMatrix);
|
||||
}
|
||||
|
||||
*aPt = gfxPoint(x, y);
|
||||
}
|
||||
|
||||
|
@ -4265,6 +4292,7 @@ gfxTextRun::ShrinkToLigatureBoundaries(PRUint32 *aStart, PRUint32 *aEnd)
|
|||
void
|
||||
gfxTextRun::DrawGlyphs(gfxFont *aFont, gfxContext *aContext,
|
||||
gfxFont::DrawMode aDrawMode, gfxPoint *aPt,
|
||||
gfxPattern *aStrokePattern,
|
||||
PRUint32 aStart, PRUint32 aEnd,
|
||||
PropertyProvider *aProvider,
|
||||
PRUint32 aSpacingStart, PRUint32 aSpacingEnd)
|
||||
|
@ -4273,7 +4301,7 @@ gfxTextRun::DrawGlyphs(gfxFont *aFont, gfxContext *aContext,
|
|||
bool haveSpacing = GetAdjustedSpacingArray(aStart, aEnd, aProvider,
|
||||
aSpacingStart, aSpacingEnd, &spacingBuffer);
|
||||
aFont->Draw(this, aStart, aEnd, aContext, aDrawMode, aPt,
|
||||
haveSpacing ? spacingBuffer.Elements() : nsnull);
|
||||
haveSpacing ? spacingBuffer.Elements() : nsnull, aStrokePattern);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -4330,7 +4358,7 @@ gfxTextRun::DrawPartialLigature(gfxFont *aFont, gfxContext *aCtx,
|
|||
aCtx->Clip();
|
||||
gfxFloat direction = GetDirection();
|
||||
gfxPoint pt(aPt->x - direction*data.mPartAdvance, aPt->y);
|
||||
DrawGlyphs(aFont, aCtx, gfxFont::GLYPH_FILL, &pt, data.mLigatureStart,
|
||||
DrawGlyphs(aFont, aCtx, gfxFont::GLYPH_FILL, &pt, nsnull, data.mLigatureStart,
|
||||
data.mLigatureEnd, aProvider, aStart, aEnd);
|
||||
aCtx->Restore();
|
||||
|
||||
|
@ -4406,7 +4434,8 @@ struct BufferAlphaColor {
|
|||
void
|
||||
gfxTextRun::Draw(gfxContext *aContext, gfxPoint aPt, gfxFont::DrawMode aDrawMode,
|
||||
PRUint32 aStart, PRUint32 aLength,
|
||||
PropertyProvider *aProvider, gfxFloat *aAdvanceWidth)
|
||||
PropertyProvider *aProvider, gfxFloat *aAdvanceWidth,
|
||||
gfxPattern *aStrokePattern)
|
||||
{
|
||||
NS_ASSERTION(aStart + aLength <= mCharacterCount, "Substring out of range");
|
||||
NS_ASSERTION(aDrawMode <= gfxFont::GLYPH_PATH, "GLYPH_PATH cannot be used with GLYPH_FILL or GLYPH_STROKE");
|
||||
|
@ -4457,7 +4486,7 @@ gfxTextRun::Draw(gfxContext *aContext, gfxPoint aPt, gfxFont::DrawMode aDrawMode
|
|||
DrawPartialLigature(font, aContext, start, ligatureRunStart, &pt, aProvider);
|
||||
}
|
||||
|
||||
DrawGlyphs(font, aContext, aDrawMode, &pt, ligatureRunStart,
|
||||
DrawGlyphs(font, aContext, aDrawMode, &pt, aStrokePattern, ligatureRunStart,
|
||||
ligatureRunEnd, aProvider, ligatureRunStart, ligatureRunEnd);
|
||||
|
||||
if (aDrawMode == gfxFont::GLYPH_FILL) {
|
||||
|
|
|
@ -57,6 +57,7 @@
|
|||
#include "gfxPlatform.h"
|
||||
#include "nsIAtom.h"
|
||||
#include "nsISupportsImpl.h"
|
||||
#include "gfxPattern.h"
|
||||
|
||||
typedef struct _cairo_scaled_font cairo_scaled_font_t;
|
||||
|
||||
|
@ -1323,7 +1324,8 @@ public:
|
|||
*/
|
||||
virtual void Draw(gfxTextRun *aTextRun, PRUint32 aStart, PRUint32 aEnd,
|
||||
gfxContext *aContext, DrawMode aDrawMode, gfxPoint *aBaselineOrigin,
|
||||
Spacing *aSpacing);
|
||||
Spacing *aSpacing, gfxPattern *aStrokePattern);
|
||||
|
||||
/**
|
||||
* Measure a run of characters. See gfxTextRun::Metrics.
|
||||
* @param aTight if false, then return the union of the glyph extents
|
||||
|
@ -2369,7 +2371,7 @@ public:
|
|||
gfxFont::DrawMode aDrawMode,
|
||||
PRUint32 aStart, PRUint32 aLength,
|
||||
PropertyProvider *aProvider,
|
||||
gfxFloat *aAdvanceWidth);
|
||||
gfxFloat *aAdvanceWidth, gfxPattern *aStrokePattern);
|
||||
|
||||
/**
|
||||
* Computes the ReflowMetrics for a substring.
|
||||
|
@ -2814,7 +2816,7 @@ private:
|
|||
// **** drawing helper ****
|
||||
void DrawGlyphs(gfxFont *aFont, gfxContext *aContext,
|
||||
gfxFont::DrawMode aDrawMode, gfxPoint *aPt,
|
||||
PRUint32 aStart, PRUint32 aEnd,
|
||||
gfxPattern *aStrokePattern, PRUint32 aStart, PRUint32 aEnd,
|
||||
PropertyProvider *aProvider,
|
||||
PRUint32 aSpacingStart, PRUint32 aSpacingEnd);
|
||||
|
||||
|
|
|
@ -46,9 +46,7 @@ MODULE = imglib2
|
|||
|
||||
PARALLEL_DIRS = public src decoders encoders
|
||||
|
||||
ifdef ENABLE_TESTS
|
||||
DIRS += test
|
||||
endif
|
||||
TEST_DIRS += test
|
||||
|
||||
DIRS += build
|
||||
|
||||
|
|
|
@ -47,9 +47,7 @@ include $(DEPTH)/config/autoconf.mk
|
|||
MODULE = locale
|
||||
DIRS = public idl src
|
||||
|
||||
ifdef ENABLE_TESTS
|
||||
DIRS += tests
|
||||
endif
|
||||
TEST_DIRS += tests
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
|
|
|
@ -61,14 +61,10 @@ endif
|
|||
|
||||
# FIXME: bug 530688 covers getting these working on Android
|
||||
ifneq ($(OS_ARCH),ANDROID)
|
||||
ifdef ENABLE_TESTS
|
||||
DIRS += jsapi-tests
|
||||
endif
|
||||
TEST_DIRS += jsapi-tests
|
||||
endif
|
||||
|
||||
ifdef ENABLE_TESTS
|
||||
DIRS += tests
|
||||
endif
|
||||
TEST_DIRS += tests
|
||||
|
||||
MODULE = js
|
||||
LIBRARY_NAME = mozjs
|
||||
|
|
|
@ -42,9 +42,7 @@ VPATH = @srcdir@
|
|||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
ifdef ENABLE_TESTS
|
||||
DIRS += tests
|
||||
endif
|
||||
TEST_DIRS += tests
|
||||
|
||||
MODULE = layout
|
||||
XPIDL_MODULE = layout_base
|
||||
|
|
|
@ -145,7 +145,6 @@
|
|||
#include "DOMSVGTests.h"
|
||||
#include "nsSVGEffects.h"
|
||||
#include "nsSVGUtils.h"
|
||||
#include "nsSVGOuterSVGFrame.h"
|
||||
|
||||
#include "nsRefreshDriver.h"
|
||||
#include "nsRuleProcessorData.h"
|
||||
|
@ -7686,23 +7685,7 @@ DoApplyRenderingChangeToTree(nsIFrame* aFrame,
|
|||
// if frame has view, will already be invalidated
|
||||
if (aChange & nsChangeHint_RepaintFrame) {
|
||||
if (aFrame->IsFrameOfType(nsIFrame::eSVG)) {
|
||||
if (!(aFrame->GetStateBits() & NS_STATE_SVG_NONDISPLAY_CHILD)) {
|
||||
nsSVGOuterSVGFrame *outerSVGFrame = nsSVGUtils::GetOuterSVGFrame(aFrame);
|
||||
if (outerSVGFrame) {
|
||||
// We need this to invalidate frames when their 'filter' or 'marker'
|
||||
// property changes. XXX in theory changes to 'marker' should be
|
||||
// handled in nsSVGPathGeometryFrame::DidSetStyleContext, but for
|
||||
// some reason that's broken.
|
||||
//
|
||||
// This call is also currently the only mechanism for invalidating
|
||||
// the area covered by a <foreignObject> when 'opacity' changes on
|
||||
// it or one of its ancestors. (For 'opacity' changes on <image> or
|
||||
// a graphical element such as <path>, or on one of their
|
||||
// ancestors, this is redundant since
|
||||
// nsSVGPathGeometryFrame::DidSetStyleContext also invalidates.)
|
||||
outerSVGFrame->UpdateAndInvalidateCoveredRegion(aFrame);
|
||||
}
|
||||
}
|
||||
nsSVGUtils::UpdateGraphic(aFrame);
|
||||
} else {
|
||||
aFrame->InvalidateOverflowRect();
|
||||
}
|
||||
|
|
|
@ -44,9 +44,7 @@ include $(DEPTH)/config/autoconf.mk
|
|||
|
||||
DIRS = $(NULL)
|
||||
|
||||
ifdef ENABLE_TESTS
|
||||
DIRS += test
|
||||
endif
|
||||
TEST_DIRS += test
|
||||
|
||||
MODULE = layout
|
||||
XPIDL_MODULE = layout_forms
|
||||
|
|
|
@ -41,9 +41,7 @@ VPATH = @srcdir@
|
|||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
ifdef ENABLE_TESTS
|
||||
DIRS += test
|
||||
endif
|
||||
TEST_DIRS += test
|
||||
|
||||
MODULE = layout
|
||||
LIBRARY_NAME = gkgeneric_s
|
||||
|
|
|
@ -5563,7 +5563,7 @@ nsTextFrame::DrawTextRun(gfxContext* const aCtx,
|
|||
bool aDrawSoftHyphen)
|
||||
{
|
||||
mTextRun->Draw(aCtx, aTextBaselinePt, gfxFont::GLYPH_FILL, aOffset, aLength,
|
||||
&aProvider, &aAdvanceWidth);
|
||||
&aProvider, &aAdvanceWidth, nsnull);
|
||||
|
||||
if (aDrawSoftHyphen) {
|
||||
// Don't use ctx as the context, because we need a reference context here,
|
||||
|
@ -5575,7 +5575,8 @@ nsTextFrame::DrawTextRun(gfxContext* const aCtx,
|
|||
gfxFloat hyphenBaselineX = aTextBaselinePt.x + mTextRun->GetDirection() * aAdvanceWidth -
|
||||
(mTextRun->IsRightToLeft() ? hyphenTextRun->GetAdvanceWidth(0, hyphenTextRun->GetLength(), nsnull) : 0);
|
||||
hyphenTextRun->Draw(aCtx, gfxPoint(hyphenBaselineX, aTextBaselinePt.y),
|
||||
gfxFont::GLYPH_FILL, 0, hyphenTextRun->GetLength(), nsnull, nsnull);
|
||||
gfxFont::GLYPH_FILL, 0, hyphenTextRun->GetLength(),
|
||||
nsnull, nsnull, nsnull);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1688,9 +1688,6 @@ nsPrintEngine::SetupToPrintContent()
|
|||
|
||||
// Only Shrink if we are smaller
|
||||
if (mPrt->mShrinkRatio < 0.998f) {
|
||||
// Clamp Shrink to Fit to 60%
|
||||
mPrt->mShrinkRatio = NS_MAX(mPrt->mShrinkRatio, 0.60f);
|
||||
|
||||
for (PRUint32 i=0;i<mPrt->mPrintDocList.Length();i++) {
|
||||
nsPrintObject* po = mPrt->mPrintDocList.ElementAt(i);
|
||||
NS_ASSERTION(po, "nsPrintObject can't be null!");
|
||||
|
|
|
@ -217,9 +217,17 @@ random-if(gtk2Widget) == objectBoundingBox-and-fePointLight-02.svg objectBoundin
|
|||
== style-without-type-attribute.svg pass.svg
|
||||
== svg-in-foreignObject-01.xhtml svg-in-foreignObject-01-ref.xhtml
|
||||
== svg-in-foreignObject-02.xhtml svg-in-foreignObject-01-ref.xhtml # reuse -01-ref.xhtml
|
||||
random-if(gtk2Widget) == text-font-weight-01.svg text-font-weight-01-ref.svg # bug 386713
|
||||
== switch-01.svg pass.svg
|
||||
== suspend-01.svg about:blank
|
||||
random-if(winWidget) == suspend-02.svg pass.svg # bug 724281
|
||||
fails == suspend-03.svg pass.svg # bug 724242
|
||||
== suspend-04.svg pass.svg
|
||||
== suspend-05.svg pass.svg
|
||||
== suspend-06.svg pass.svg
|
||||
== suspend-07.svg pass.svg
|
||||
== suspend-08.svg pass.svg
|
||||
== symbol-01.svg symbol-01-ref.svg
|
||||
random-if(gtk2Widget) == text-font-weight-01.svg text-font-weight-01-ref.svg # bug 386713
|
||||
== text-gradient-01.svg text-gradient-01-ref.svg
|
||||
random-if(winWidget) == text-gradient-02.svg text-gradient-02-ref.svg # see bug 590101
|
||||
== text-gradient-03.svg pass.svg
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
<?xml version="1.0"?>
|
||||
<!--
|
||||
Any copyright is dedicated to the Public Domain.
|
||||
http://creativecommons.org/licenses/publicdomain/
|
||||
-->
|
||||
<svg xmlns="http://www.w3.org/2000/svg">
|
||||
<title>Test that suspendRedraw works</title>
|
||||
<!-- https://bugzilla.mozilla.org/show_bug.cgi?id=615146 -->
|
||||
|
||||
<rect width="100%" height="100%" fill="red"/>
|
||||
<script>
|
||||
document.documentElement.suspendRedraw(10000);
|
||||
</script>
|
||||
</svg>
|
После Ширина: | Высота: | Размер: 421 B |
|
@ -0,0 +1,23 @@
|
|||
<?xml version="1.0"?>
|
||||
<!--
|
||||
Any copyright is dedicated to the Public Domain.
|
||||
http://creativecommons.org/licenses/publicdomain/
|
||||
-->
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="reftest-wait" onload="f()">
|
||||
<title>Test that suspendRedraw works</title>
|
||||
<!-- https://bugzilla.mozilla.org/show_bug.cgi?id=615146 -->
|
||||
|
||||
<script>
|
||||
function f() {
|
||||
var svg = document.documentElement;
|
||||
setTimeout(function() {
|
||||
svg.suspendRedraw(10000);
|
||||
setTimeout(function() {
|
||||
document.getElementById("r").setAttribute("fill", "red");
|
||||
svg.removeAttribute("class");
|
||||
}, 1);
|
||||
}, 1);
|
||||
}
|
||||
</script>
|
||||
<rect id="r" width="100%" height="100%" fill="lime"/>
|
||||
</svg>
|
После Ширина: | Высота: | Размер: 711 B |
|
@ -0,0 +1,24 @@
|
|||
<?xml version="1.0"?>
|
||||
<!--
|
||||
Any copyright is dedicated to the Public Domain.
|
||||
http://creativecommons.org/licenses/publicdomain/
|
||||
-->
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="reftest-wait" onload="f()">
|
||||
<title>Test that suspendRedraw works</title>
|
||||
<!-- https://bugzilla.mozilla.org/show_bug.cgi?id=615146 -->
|
||||
|
||||
<script>
|
||||
function f() {
|
||||
var svg = document.documentElement;
|
||||
setTimeout(function() {
|
||||
svg.suspendRedraw(10000);
|
||||
setTimeout(function() {
|
||||
svg.removeChild(document.getElementById("r"));
|
||||
svg.removeAttribute("class");
|
||||
}, 1);
|
||||
}, 1);
|
||||
}
|
||||
</script>
|
||||
<rect width="100%" height="100%" fill="red"/>
|
||||
<rect id="r" width="100%" height="100%" fill="lime"/>
|
||||
</svg>
|
После Ширина: | Высота: | Размер: 748 B |
|
@ -0,0 +1,27 @@
|
|||
<?xml version="1.0"?>
|
||||
<!--
|
||||
Any copyright is dedicated to the Public Domain.
|
||||
http://creativecommons.org/licenses/publicdomain/
|
||||
-->
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="reftest-wait" onload="f()">
|
||||
<title>Test that suspendRedraw works</title>
|
||||
<!-- https://bugzilla.mozilla.org/show_bug.cgi?id=615146 -->
|
||||
|
||||
<script>
|
||||
function f() {
|
||||
var svg = document.documentElement;
|
||||
setTimeout(function() {
|
||||
svg.suspendRedraw(10000);
|
||||
setTimeout(function() {
|
||||
var r = document.createElementNS("http://www.w3.org/2000/svg", "rect");
|
||||
r.setAttribute("width", "100%");
|
||||
r.setAttribute("height", "100%");
|
||||
r.setAttribute("fill", "red");
|
||||
svg.appendChild(r);
|
||||
svg.removeAttribute("class");
|
||||
}, 1);
|
||||
}, 1);
|
||||
}
|
||||
</script>
|
||||
<rect width="100%" height="100%" fill="lime"/>
|
||||
</svg>
|
После Ширина: | Высота: | Размер: 876 B |
|
@ -0,0 +1,21 @@
|
|||
<?xml version="1.0"?>
|
||||
<!--
|
||||
Any copyright is dedicated to the Public Domain.
|
||||
http://creativecommons.org/licenses/publicdomain/
|
||||
-->
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="reftest-wait" onload="f()">
|
||||
<title>Test that unsuspendRedrawAll works</title>
|
||||
<!-- https://bugzilla.mozilla.org/show_bug.cgi?id=615146 -->
|
||||
|
||||
<script>
|
||||
function f() {
|
||||
var svg = document.documentElement;
|
||||
svg.suspendRedraw(10000);
|
||||
setTimeout(function() {
|
||||
svg.unsuspendRedrawAll();
|
||||
svg.removeAttribute("class");
|
||||
}, 1);
|
||||
}
|
||||
</script>
|
||||
<rect width="100%" height="100%" fill="lime"/>
|
||||
</svg>
|
После Ширина: | Высота: | Размер: 624 B |
|
@ -0,0 +1,24 @@
|
|||
<?xml version="1.0"?>
|
||||
<!--
|
||||
Any copyright is dedicated to the Public Domain.
|
||||
http://creativecommons.org/licenses/publicdomain/
|
||||
-->
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="reftest-wait" onload="f()">
|
||||
<title>Test that unsuspendRedrawAll works</title>
|
||||
<!-- https://bugzilla.mozilla.org/show_bug.cgi?id=615146 -->
|
||||
|
||||
<script>
|
||||
function f() {
|
||||
var svg = document.documentElement;
|
||||
setTimeout(function() {
|
||||
svg.suspendRedraw(10000);
|
||||
setTimeout(function() {
|
||||
document.getElementById("r").setAttribute("fill", "lime");
|
||||
svg.unsuspendRedrawAll();
|
||||
svg.removeAttribute("class");
|
||||
}, 1);
|
||||
}, 1);
|
||||
}
|
||||
</script>
|
||||
<rect id="r" width="100%" height="100%" fill="red"/>
|
||||
</svg>
|
После Ширина: | Высота: | Размер: 752 B |
|
@ -0,0 +1,25 @@
|
|||
<?xml version="1.0"?>
|
||||
<!--
|
||||
Any copyright is dedicated to the Public Domain.
|
||||
http://creativecommons.org/licenses/publicdomain/
|
||||
-->
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="reftest-wait" onload="f()">
|
||||
<title>Test that unsuspendRedrawAll works</title>
|
||||
<!-- https://bugzilla.mozilla.org/show_bug.cgi?id=615146 -->
|
||||
|
||||
<script>
|
||||
function f() {
|
||||
var svg = document.documentElement;
|
||||
setTimeout(function() {
|
||||
svg.suspendRedraw(10000);
|
||||
setTimeout(function() {
|
||||
svg.removeChild(document.getElementById("r"));
|
||||
svg.unsuspendRedrawAll();
|
||||
svg.removeAttribute("class");
|
||||
}, 1);
|
||||
}, 1);
|
||||
}
|
||||
</script>
|
||||
<rect width="100%" height="100%" fill="lime"/>
|
||||
<rect id="r" width="100%" height="100%" fill="red"/>
|
||||
</svg>
|
После Ширина: | Высота: | Размер: 789 B |
|
@ -0,0 +1,28 @@
|
|||
<?xml version="1.0"?>
|
||||
<!--
|
||||
Any copyright is dedicated to the Public Domain.
|
||||
http://creativecommons.org/licenses/publicdomain/
|
||||
-->
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="reftest-wait" onload="f()">
|
||||
<title>Test that unsuspendRedrawAll works</title>
|
||||
<!-- https://bugzilla.mozilla.org/show_bug.cgi?id=615146 -->
|
||||
|
||||
<script>
|
||||
function f() {
|
||||
var svg = document.documentElement;
|
||||
setTimeout(function() {
|
||||
svg.suspendRedraw(10000);
|
||||
setTimeout(function() {
|
||||
var r = document.createElementNS("http://www.w3.org/2000/svg", "rect");
|
||||
r.setAttribute("width", "100%");
|
||||
r.setAttribute("height", "100%");
|
||||
r.setAttribute("fill", "lime");
|
||||
svg.appendChild(r);
|
||||
svg.unsuspendRedrawAll();
|
||||
svg.removeAttribute("class");
|
||||
}, 1);
|
||||
}, 1);
|
||||
}
|
||||
</script>
|
||||
<rect width="100%" height="100%" fill="red"/>
|
||||
</svg>
|
После Ширина: | Высота: | Размер: 917 B |
|
@ -2,7 +2,7 @@
|
|||
<head>
|
||||
</head>
|
||||
<body>
|
||||
<div style="-moz-transform: matrix(1,2,3,4,5,6); width: 100px; height: 100px;">
|
||||
<div style="-moz-transform: matrix(1,2,3,4,5,6); width: 100px; height: 100px; background: gold;">
|
||||
Test Text
|
||||
</div>
|
||||
</body>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<head>
|
||||
</head>
|
||||
<body>
|
||||
<div style="-moz-transform: matrix3d(1,2,0,0,3,4,0,0,0,0,1,0,5,6,0,1); width: 100px; height: 100px;">
|
||||
<div style="-moz-transform: matrix3d(1,2,0,0,3,4,0,0,0,0,1,0,5,6,0,1); width: 100px; height: 100px; background: gold;">
|
||||
Test Text
|
||||
</div>
|
||||
</body>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<head>
|
||||
</head>
|
||||
<body>
|
||||
<div style="-moz-transform: scale3d(1,2,3) translate3d(4px,5px,6px); width: 100px; height: 100px;">
|
||||
<div style="-moz-transform: translate3d(4px,5px,6px) scale3d(1,2,3); width: 100px; height: 100px; background: gold;">
|
||||
Test Text
|
||||
</div>
|
||||
</body>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<head>
|
||||
</head>
|
||||
<body>
|
||||
<div style="-moz-transform: matrix3d(1,0,0,0,0,2,0,0,0,0,3,0,4,5,6,1); width: 100px; height: 100px;">
|
||||
<div style="-moz-transform: matrix3d(1,0,0,0,0,2,0,0,0,0,3,0,4,5,6,1); width: 100px; height: 100px; background: gold;">
|
||||
Test Text
|
||||
</div>
|
||||
</body>
|
||||
|
|
|
@ -37,9 +37,11 @@ random == rotate-1b.html rotate-1-ref.html
|
|||
random == rotate-1c.html rotate-1-ref.html
|
||||
random == rotate-1d.html rotate-1-ref.html
|
||||
random == rotate-1e.html rotate-1-ref.html
|
||||
random == rotate-1f.html rotate-1-ref.html
|
||||
# rotate: 90deg rotations should be indistinguishable from objects constructed
|
||||
# to look the same.
|
||||
== rotate-2a.html rotate-2-ref.html
|
||||
== rotate-2b.html rotate-2-ref.html
|
||||
# -moz-transform-origin: We should NOT get the same images when using different
|
||||
# -moz-transform-origins.
|
||||
!= origin-1a.html origin-1-ref.html
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
<html>
|
||||
<head>
|
||||
</head>
|
||||
<body>
|
||||
<div style="-moz-transform: rotate(0.125turn); width: 100px; height: 100px;">
|
||||
Test Text
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,9 @@
|
|||
<html>
|
||||
<head>
|
||||
</head>
|
||||
<body>
|
||||
<div style="width:100px;height:200px;-moz-transform: translate(50px, -50px) rotate(-0.25turn); border: 1px solid black;">
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -4295,6 +4295,7 @@ const UnitInfo UnitData[] = {
|
|||
{ STR_WITH_LEN("deg"), eCSSUnit_Degree, VARIANT_ANGLE },
|
||||
{ STR_WITH_LEN("grad"), eCSSUnit_Grad, VARIANT_ANGLE },
|
||||
{ STR_WITH_LEN("rad"), eCSSUnit_Radian, VARIANT_ANGLE },
|
||||
{ STR_WITH_LEN("turn"), eCSSUnit_Turn, VARIANT_ANGLE },
|
||||
{ STR_WITH_LEN("hz"), eCSSUnit_Hertz, VARIANT_FREQUENCY },
|
||||
{ STR_WITH_LEN("khz"), eCSSUnit_Kilohertz, VARIANT_FREQUENCY },
|
||||
{ STR_WITH_LEN("s"), eCSSUnit_Seconds, VARIANT_TIME },
|
||||
|
|
|
@ -262,6 +262,7 @@ double nsCSSValue::GetAngleValueInRadians() const
|
|||
|
||||
switch (GetUnit()) {
|
||||
case eCSSUnit_Radian: return angle;
|
||||
case eCSSUnit_Turn: return angle * 2 * M_PI;
|
||||
case eCSSUnit_Degree: return angle * M_PI / 180.0;
|
||||
case eCSSUnit_Grad: return angle * M_PI / 200.0;
|
||||
|
||||
|
@ -1105,6 +1106,7 @@ nsCSSValue::AppendToString(nsCSSProperty aProperty, nsAString& aResult) const
|
|||
case eCSSUnit_Degree: aResult.AppendLiteral("deg"); break;
|
||||
case eCSSUnit_Grad: aResult.AppendLiteral("grad"); break;
|
||||
case eCSSUnit_Radian: aResult.AppendLiteral("rad"); break;
|
||||
case eCSSUnit_Turn: aResult.AppendLiteral("turn"); break;
|
||||
|
||||
case eCSSUnit_Hertz: aResult.AppendLiteral("Hz"); break;
|
||||
case eCSSUnit_Kilohertz: aResult.AppendLiteral("kHz"); break;
|
||||
|
|
|
@ -183,6 +183,7 @@ enum nsCSSUnit {
|
|||
eCSSUnit_Degree = 1000, // (float) 360 per circle
|
||||
eCSSUnit_Grad = 1001, // (float) 400 per circle
|
||||
eCSSUnit_Radian = 1002, // (float) 2*pi per circle
|
||||
eCSSUnit_Turn = 1003, // (float) 1 per circle
|
||||
|
||||
// Frequency units
|
||||
eCSSUnit_Hertz = 2000, // (float) 1/seconds
|
||||
|
@ -274,7 +275,7 @@ public:
|
|||
bool IsPixelLengthUnit() const
|
||||
{ return eCSSUnit_Point <= mUnit && mUnit <= eCSSUnit_Pixel; }
|
||||
bool IsAngularUnit() const
|
||||
{ return eCSSUnit_Degree <= mUnit && mUnit <= eCSSUnit_Radian; }
|
||||
{ return eCSSUnit_Degree <= mUnit && mUnit <= eCSSUnit_Turn; }
|
||||
bool IsFrequencyUnit() const
|
||||
{ return eCSSUnit_Hertz <= mUnit && mUnit <= eCSSUnit_Kilohertz; }
|
||||
bool IsTimeUnit() const
|
||||
|
@ -311,7 +312,7 @@ public:
|
|||
float GetAngleValue() const
|
||||
{
|
||||
NS_ABORT_IF_FALSE(eCSSUnit_Degree <= mUnit &&
|
||||
mUnit <= eCSSUnit_Radian, "not an angle value");
|
||||
mUnit <= eCSSUnit_Turn, "not an angle value");
|
||||
return mValue.mFloat;
|
||||
}
|
||||
|
||||
|
|
|
@ -1497,6 +1497,7 @@ nsComputedDOMStyle::GetCSSGradientString(const nsStyleGradient* aGradient,
|
|||
case eStyleUnit_Degree: aString.AppendLiteral("deg"); break;
|
||||
case eStyleUnit_Grad: aString.AppendLiteral("grad"); break;
|
||||
case eStyleUnit_Radian: aString.AppendLiteral("rad"); break;
|
||||
case eStyleUnit_Turn: aString.AppendLiteral("turn"); break;
|
||||
default: NS_NOTREACHED("unrecognized angle unit");
|
||||
}
|
||||
needSep = true;
|
||||
|
|
|
@ -888,6 +888,7 @@ static void SetGradient(const nsCSSValue& aValue, nsPresContext* aPresContext,
|
|||
case eCSSUnit_Degree: unit = eStyleUnit_Degree; break;
|
||||
case eCSSUnit_Grad: unit = eStyleUnit_Grad; break;
|
||||
case eCSSUnit_Radian: unit = eStyleUnit_Radian; break;
|
||||
case eCSSUnit_Turn: unit = eStyleUnit_Turn; break;
|
||||
default: NS_NOTREACHED("unrecognized angular unit");
|
||||
unit = eStyleUnit_Degree;
|
||||
}
|
||||
|
|
|
@ -116,6 +116,7 @@ bool nsStyleCoord::operator==(const nsStyleCoord& aOther) const
|
|||
case eStyleUnit_Degree:
|
||||
case eStyleUnit_Grad:
|
||||
case eStyleUnit_Radian:
|
||||
case eStyleUnit_Turn:
|
||||
return mValue.mFloat == aOther.mValue.mFloat;
|
||||
case eStyleUnit_Coord:
|
||||
case eStyleUnit_Integer:
|
||||
|
@ -170,7 +171,8 @@ void nsStyleCoord::SetAngleValue(float aValue, nsStyleUnit aUnit)
|
|||
{
|
||||
if (aUnit == eStyleUnit_Degree ||
|
||||
aUnit == eStyleUnit_Grad ||
|
||||
aUnit == eStyleUnit_Radian) {
|
||||
aUnit == eStyleUnit_Radian ||
|
||||
aUnit == eStyleUnit_Turn) {
|
||||
mUnit = aUnit;
|
||||
mValue.mFloat = aValue;
|
||||
} else {
|
||||
|
@ -212,6 +214,7 @@ nsStyleCoord::GetAngleValueInRadians() const
|
|||
|
||||
switch (GetUnit()) {
|
||||
case eStyleUnit_Radian: return angle;
|
||||
case eStyleUnit_Turn: return angle * 2 * M_PI;
|
||||
case eStyleUnit_Degree: return angle * M_PI / 180.0;
|
||||
case eStyleUnit_Grad: return angle * M_PI / 200.0;
|
||||
|
||||
|
|
|
@ -57,6 +57,7 @@ enum nsStyleUnit {
|
|||
eStyleUnit_Degree = 12, // (float) angle in degrees
|
||||
eStyleUnit_Grad = 13, // (float) angle in grads
|
||||
eStyleUnit_Radian = 14, // (float) angle in radians
|
||||
eStyleUnit_Turn = 15, // (float) angle in turns
|
||||
eStyleUnit_Coord = 20, // (nscoord) value is twips
|
||||
eStyleUnit_Integer = 30, // (int) value is simple integer
|
||||
eStyleUnit_Enumerated = 32, // (int) value has enumerated meaning
|
||||
|
@ -120,7 +121,7 @@ public:
|
|||
}
|
||||
|
||||
bool IsAngleValue() const {
|
||||
return eStyleUnit_Degree <= mUnit && mUnit <= eStyleUnit_Radian;
|
||||
return eStyleUnit_Degree <= mUnit && mUnit <= eStyleUnit_Turn;
|
||||
}
|
||||
|
||||
bool IsCalcUnit() const {
|
||||
|
@ -323,8 +324,8 @@ inline float nsStyleCoord::GetFactorValue() const
|
|||
inline float nsStyleCoord::GetAngleValue() const
|
||||
{
|
||||
NS_ASSERTION(mUnit >= eStyleUnit_Degree &&
|
||||
mUnit <= eStyleUnit_Radian, "not an angle value");
|
||||
if (mUnit >= eStyleUnit_Degree && mUnit <= eStyleUnit_Radian) {
|
||||
mUnit <= eStyleUnit_Turn, "not an angle value");
|
||||
if (mUnit >= eStyleUnit_Degree && mUnit <= eStyleUnit_Turn) {
|
||||
return mValue.mFloat;
|
||||
}
|
||||
return 0.0f;
|
||||
|
|
|
@ -1001,7 +1001,7 @@ var gCSSProperties = {
|
|||
type: CSS_TYPE_LONGHAND,
|
||||
prerequisites: { "width": "300px", "height": "50px" },
|
||||
initial_values: [ "none" ],
|
||||
other_values: [ "translatex(1px)", "translatex(4em)", "translatex(-4px)", "translatex(3px)", "translatex(0px) translatex(1px) translatex(2px) translatex(3px) translatex(4px)", "translatey(4em)", "translate(3px)", "translate(10px, -3px)", "rotate(45deg)", "rotate(45grad)", "rotate(45rad)", "rotate(0)", "scalex(10)", "scaley(10)", "scale(10)", "scale(10, 20)", "skewx(30deg)", "skewx(0)", "skewy(0)", "skewx(30grad)", "skewx(30rad)", "skewy(30deg)", "skewy(30grad)", "skewy(30rad)", "matrix(1, 2, 3, 4, 5px, 6em)", "rotate(45deg) scale(2, 1)", "skewx(45deg) skewx(-50grad)", "translate(0, 0) scale(1, 1) skewx(0) skewy(0) matrix(1, 0, 0, 1, 0, 0)", "translatex(50%)", "translatey(50%)", "translate(50%)", "translate(3%, 5px)", "translate(5px, 3%)", "matrix(1, 2, 3, 4, 5px, 6%)", "matrix(1, 2, 3, 4, 5%, 6px)", "matrix(1, 2, 3, 4, 5%, 6%)", "matrix(1, 2, 3, 4, 5, 6)",
|
||||
other_values: [ "translatex(1px)", "translatex(4em)", "translatex(-4px)", "translatex(3px)", "translatex(0px) translatex(1px) translatex(2px) translatex(3px) translatex(4px)", "translatey(4em)", "translate(3px)", "translate(10px, -3px)", "rotate(45deg)", "rotate(45grad)", "rotate(45rad)", "rotate(0.25turn)", "rotate(0)", "scalex(10)", "scaley(10)", "scale(10)", "scale(10, 20)", "skewx(30deg)", "skewx(0)", "skewy(0)", "skewx(30grad)", "skewx(30rad)", "skewx(0.08turn)", "skewy(30deg)", "skewy(30grad)", "skewy(30rad)", "skewy(0.08turn)", "matrix(1, 2, 3, 4, 5px, 6em)", "rotate(45deg) scale(2, 1)", "skewx(45deg) skewx(-50grad)", "translate(0, 0) scale(1, 1) skewx(0) skewy(0) matrix(1, 0, 0, 1, 0, 0)", "translatex(50%)", "translatey(50%)", "translate(50%)", "translate(3%, 5px)", "translate(5px, 3%)", "matrix(1, 2, 3, 4, 5px, 6%)", "matrix(1, 2, 3, 4, 5%, 6px)", "matrix(1, 2, 3, 4, 5%, 6%)", "matrix(1, 2, 3, 4, 5, 6)",
|
||||
/* valid calc() values */
|
||||
"translatex(-moz-calc(5px + 10%))",
|
||||
"translatey(-moz-calc(0.25 * 5px + 10% / 3))",
|
||||
|
@ -1010,7 +1010,7 @@ var gCSSProperties = {
|
|||
"translate(-50px, -moz-calc(5px - 10% * 3))",
|
||||
"matrix(1, 0, 0, 1, -moz-calc(5px * 3), -moz-calc(10% - 3px))"
|
||||
].concat(SpecialPowers.getBoolPref("layout.3d-transforms.enabled") ? [
|
||||
"translatez(1px)", "translatez(4em)", "translatez(-4px)", "translatez(0px)", "translatez(2px) translatez(5px)", "translate3d(3px, 4px, 5px)", "translate3d(2em, 3px, 1em)", "translatex(2px) translate3d(4px, 5px, 6px) translatey(1px)", "scale3d(4, 4, 4)", "scale3d(-2, 3, -7)", "scalez(4)", "scalez(-6)", "rotate3d(2, 3, 4, 45deg)", "rotate3d(-3, 7, 0, 12rad)", "rotatex(15deg)", "rotatey(-12grad)", "rotatez(72rad)", "perspective(1000px)", "matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16)", "matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13px, 14em, 15px, 16)", "matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 20%, 10%, 15, 16)"
|
||||
"translatez(1px)", "translatez(4em)", "translatez(-4px)", "translatez(0px)", "translatez(2px) translatez(5px)", "translate3d(3px, 4px, 5px)", "translate3d(2em, 3px, 1em)", "translatex(2px) translate3d(4px, 5px, 6px) translatey(1px)", "scale3d(4, 4, 4)", "scale3d(-2, 3, -7)", "scalez(4)", "scalez(-6)", "rotate3d(2, 3, 4, 45deg)", "rotate3d(-3, 7, 0, 12rad)", "rotatex(15deg)", "rotatey(-12grad)", "rotatez(72rad)", "rotatex(0.125turn)", "perspective(1000px)", "matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16)", "matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13px, 14em, 15px, 16)", "matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 20%, 10%, 15, 16)"
|
||||
] : []),
|
||||
invalid_values: ["1px", "#0000ff", "red", "auto", "translatex(1px 1px)", "translatex(translatex(1px))", "translatex(#0000ff)", "translatex(red)", "translatey()", "matrix(1px, 2px, 3px, 4px, 5px, 6px)", "scale(150%)", "skewx(red)", "matrix(1%, 0, 0, 0, 0px, 0px)", "matrix(0, 1%, 2, 3, 4px,5px)", "matrix(0, 1, 2%, 3, 4px, 5px)", "matrix(0, 1, 2, 3%, 4%, 5%)",
|
||||
/* invalid calc() values */
|
||||
|
@ -1170,6 +1170,7 @@ var gCSSProperties = {
|
|||
"50%",
|
||||
"-moz-radial-gradient(10% bottom, #ffffff, black) scroll no-repeat",
|
||||
"-moz-linear-gradient(10px 10px -45deg, red, blue) repeat",
|
||||
"-moz-linear-gradient(10px 10px -0.125turn, red, blue) repeat",
|
||||
"-moz-repeating-radial-gradient(10% bottom, #ffffff, black) scroll no-repeat",
|
||||
"-moz-repeating-linear-gradient(10px 10px -45deg, red, blue) repeat",
|
||||
"-moz-element(#test) lime",
|
||||
|
@ -1286,12 +1287,14 @@ var gCSSProperties = {
|
|||
"-moz-linear-gradient(20% bottom -300deg, red, blue)",
|
||||
"-moz-linear-gradient(center 20% 1.95929rad, red, blue)",
|
||||
"-moz-linear-gradient(left 35px 30grad, red, blue)",
|
||||
"-moz-linear-gradient(left 35px 0.1turn, red, blue)",
|
||||
"-moz-linear-gradient(10% 10em 99999deg, red, blue)",
|
||||
"-moz-linear-gradient(44px top -33deg, red, blue)",
|
||||
|
||||
"-moz-linear-gradient(-33deg, red, blue)",
|
||||
"-moz-linear-gradient(30grad left 35px, red, blue)",
|
||||
"-moz-linear-gradient(10deg 20px, red, blue)",
|
||||
"-moz-linear-gradient(1turn 20px, red, blue)",
|
||||
"-moz-linear-gradient(.414rad bottom, red, blue)",
|
||||
|
||||
"-moz-radial-gradient(red, blue)",
|
||||
|
|