зеркало из https://github.com/mozilla/gecko-dev.git
Merge inbound to mozilla-central. a=merge
This commit is contained in:
Коммит
3abf6fa7e2
|
@ -1522,14 +1522,6 @@ NS_IMPL_CYCLE_COLLECTION_UNLINK_END
|
|||
|
||||
NS_IMPL_CYCLE_COLLECTION_TRACE_WRAPPERCACHE(FragmentOrElement)
|
||||
|
||||
void
|
||||
FragmentOrElement::MarkUserData(void* aObject, nsAtom* aKey, void* aChild,
|
||||
void* aData)
|
||||
{
|
||||
uint32_t* gen = static_cast<uint32_t*>(aData);
|
||||
xpc_MarkInCCGeneration(static_cast<nsISupports*>(aChild), *gen);
|
||||
}
|
||||
|
||||
void
|
||||
FragmentOrElement::MarkNodeChildren(nsINode* aNode)
|
||||
{
|
||||
|
|
|
@ -207,8 +207,6 @@ public:
|
|||
static void RemoveBlackMarkedNode(nsINode* aNode);
|
||||
static void MarkNodeChildren(nsINode* aNode);
|
||||
static void InitCCCallbacks();
|
||||
static void MarkUserData(void* aObject, nsAtom* aKey, void* aChild,
|
||||
void *aData);
|
||||
|
||||
/**
|
||||
* Is the HTML local name a void element?
|
||||
|
|
|
@ -1,14 +0,0 @@
|
|||
<html>
|
||||
<head>
|
||||
<script>
|
||||
function loaded() {
|
||||
var node = document;
|
||||
var handler = function(operation, key, data, src, dst) { alert(data); };
|
||||
node.setUserData("foo", "data", handler);
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body onload="loaded();">
|
||||
<div id="elem"></div>
|
||||
</body>
|
||||
</html>
|
|
@ -1,21 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<script>
|
||||
|
||||
function boom()
|
||||
{
|
||||
var frameDoc = document.getElementById("f").contentDocument;
|
||||
|
||||
var confusedNode = frameDoc.createTextNode("y");
|
||||
confusedNode.__proto__ = document.createTextNode("x");
|
||||
confusedNode.setUserData("key", "data", null);
|
||||
confusedNode.setUserData("key", "data", null);
|
||||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body onload="boom();">
|
||||
<iframe src="data:text/html,1" id="f"></iframe>
|
||||
</body>
|
||||
</html>
|
|
@ -8,7 +8,6 @@ load 244933-1.html
|
|||
load 275912-1.html
|
||||
load 293388-1.html
|
||||
load 308120-1.xul
|
||||
load 324871-1.html
|
||||
load 325730-1.html
|
||||
load 326618-1.html
|
||||
load 326646-1.html
|
||||
|
@ -163,7 +162,6 @@ load 815477.html
|
|||
load 815500.html
|
||||
load 816253.html
|
||||
load 819014.html
|
||||
load 822691.html
|
||||
load 822723.html
|
||||
load 824719.html
|
||||
load 827190.html
|
||||
|
|
|
@ -158,8 +158,6 @@ PrefixedFullscreenAPIWarning=Prefixed Fullscreen API is deprecated. Please use u
|
|||
NodeIteratorDetachWarning=Calling detach() on a NodeIterator no longer has an effect.
|
||||
# LOCALIZATION NOTE: Do not translate "LenientThis" and "this"
|
||||
LenientThisWarning=Ignoring get or set of property that has [LenientThis] because the “this” object is incorrect.
|
||||
# LOCALIZATION NOTE: Do not translate "getUserData", "setUserData", "WeakMap", or "element.dataset".
|
||||
GetSetUserDataWarning=Use of getUserData() or setUserData() is deprecated. Use WeakMap or element.dataset instead.
|
||||
# LOCALIZATION NOTE: Do not translate "mozGetAsFile" or "toBlob"
|
||||
MozGetAsFileWarning=The non-standard mozGetAsFile method is deprecated and will soon be removed. Use the standard toBlob method instead.
|
||||
# LOCALIZATION NOTE: Do not translate "captureEvents()" or "addEventListener()"
|
||||
|
|
|
@ -53,7 +53,6 @@ try{o62=o13.ownerDocument.getElementById('ifr17516').contentDocument.getElementB
|
|||
try{tmp.id = 'ifr2522';}catch(e){}
|
||||
try{o101=o15.ownerDocument.getElementById('ifr2522').contentDocument.getElementById('element3');;}catch(e){}
|
||||
try{o101.appendChild(o24);}catch(e){}
|
||||
try{o109=o35.setUserData('key',null,function (o,k,d,s,ds) { gc(); });;}catch(e){}
|
||||
try{o112=document.createElementNS('http://www.w3.org/1999/xhtml', 'script');;}catch(e){}
|
||||
try{o124=document.createElementNS('http://www.w3.org/1998/Math/MathML','root');;}catch(e){}
|
||||
try{o125=document.createElementNS('http://www.w3.org/2000/svg','font-face');;}catch(e){}
|
||||
|
|
|
@ -37,7 +37,7 @@ SkipWhitespace(RangedPtr<const char16_t>& aIter,
|
|||
const RangedPtr<const char16_t>& aEnd)
|
||||
{
|
||||
while (aIter != aEnd) {
|
||||
if (!IsSVGWhitespace(*aIter)) {
|
||||
if (!nsContentUtils::IsHTMLWhitespace(*aIter)) {
|
||||
return true;
|
||||
}
|
||||
++aIter;
|
||||
|
@ -279,7 +279,7 @@ MoveToNextToken(RangedPtr<const char16_t>& aIter,
|
|||
|
||||
bool isCurrentCharEscaped = false;
|
||||
|
||||
while (aIter != aEnd && !IsSVGWhitespace(*aIter)) {
|
||||
while (aIter != aEnd && !nsContentUtils::IsHTMLWhitespace(*aIter)) {
|
||||
if (isCurrentCharEscaped) {
|
||||
isCurrentCharEscaped = false;
|
||||
} else {
|
||||
|
@ -443,7 +443,7 @@ nsSMILParserUtils::TrimWhitespace(const nsAString& aString)
|
|||
aString.EndReading(end);
|
||||
|
||||
// Skip whitespace characters at the beginning
|
||||
while (start != end && IsSVGWhitespace(*start)) {
|
||||
while (start != end && nsContentUtils::IsHTMLWhitespace(*start)) {
|
||||
++start;
|
||||
}
|
||||
|
||||
|
@ -451,7 +451,7 @@ nsSMILParserUtils::TrimWhitespace(const nsAString& aString)
|
|||
while (end != start) {
|
||||
--end;
|
||||
|
||||
if (!IsSVGWhitespace(*end)) {
|
||||
if (!nsContentUtils::IsHTMLWhitespace(*end)) {
|
||||
// Step back to the last non-whitespace character.
|
||||
++end;
|
||||
|
||||
|
@ -466,10 +466,11 @@ bool
|
|||
nsSMILParserUtils::ParseKeySplines(const nsAString& aSpec,
|
||||
FallibleTArray<nsSMILKeySpline>& aKeySplines)
|
||||
{
|
||||
nsCharSeparatedTokenizerTemplate<IsSVGWhitespace> controlPointTokenizer(aSpec, ';');
|
||||
nsCharSeparatedTokenizerTemplate<nsContentUtils::IsHTMLWhitespace>
|
||||
controlPointTokenizer(aSpec, ';');
|
||||
while (controlPointTokenizer.hasMoreTokens()) {
|
||||
|
||||
nsCharSeparatedTokenizerTemplate<IsSVGWhitespace>
|
||||
nsCharSeparatedTokenizerTemplate<nsContentUtils::IsHTMLWhitespace>
|
||||
tokenizer(controlPointTokenizer.nextToken(), ',',
|
||||
nsCharSeparatedTokenizer::SEPARATOR_OPTIONAL);
|
||||
|
||||
|
@ -500,7 +501,8 @@ nsSMILParserUtils::ParseSemicolonDelimitedProgressList(const nsAString& aSpec,
|
|||
bool aNonDecreasing,
|
||||
FallibleTArray<double>& aArray)
|
||||
{
|
||||
nsCharSeparatedTokenizerTemplate<IsSVGWhitespace> tokenizer(aSpec, ';');
|
||||
nsCharSeparatedTokenizerTemplate<nsContentUtils::IsHTMLWhitespace>
|
||||
tokenizer(aSpec, ';');
|
||||
|
||||
double previousValue = -1.0;
|
||||
|
||||
|
@ -579,7 +581,8 @@ bool
|
|||
nsSMILParserUtils::ParseValuesGeneric(const nsAString& aSpec,
|
||||
GenericValueParser& aParser)
|
||||
{
|
||||
nsCharSeparatedTokenizerTemplate<IsSVGWhitespace> tokenizer(aSpec, ';');
|
||||
nsCharSeparatedTokenizerTemplate<nsContentUtils::IsHTMLWhitespace>
|
||||
tokenizer(aSpec, ';');
|
||||
if (!tokenizer.hasMoreTokens()) { // Empty list
|
||||
return false;
|
||||
}
|
||||
|
@ -665,7 +668,7 @@ nsSMILParserUtils::CheckForNegativeNumber(const nsAString& aStr)
|
|||
RangedPtr<const char16_t> end(SVGContentUtils::GetEndRangedPtr(aStr));
|
||||
|
||||
// Skip initial whitespace
|
||||
while (iter != end && IsSVGWhitespace(*iter)) {
|
||||
while (iter != end && nsContentUtils::IsHTMLWhitespace(*iter)) {
|
||||
++iter;
|
||||
}
|
||||
|
||||
|
|
|
@ -68,20 +68,6 @@ enum SVGTransformTypes {
|
|||
eChildToUserSpace
|
||||
};
|
||||
|
||||
inline bool
|
||||
IsSVGWhitespace(char aChar)
|
||||
{
|
||||
return aChar == '\x20' || aChar == '\x9' ||
|
||||
aChar == '\xD' || aChar == '\xA';
|
||||
}
|
||||
|
||||
inline bool
|
||||
IsSVGWhitespace(char16_t aChar)
|
||||
{
|
||||
return aChar == char16_t('\x20') || aChar == char16_t('\x9') ||
|
||||
aChar == char16_t('\xD') || aChar == char16_t('\xA');
|
||||
}
|
||||
|
||||
/**
|
||||
* Functions generally used by SVG Content classes. Functions here
|
||||
* should not generally depend on layout methods/classes e.g. nsSVGUtils
|
||||
|
|
|
@ -45,7 +45,7 @@ SVGLengthList::SetValueFromString(const nsAString& aValue)
|
|||
{
|
||||
SVGLengthList temp;
|
||||
|
||||
nsCharSeparatedTokenizerTemplate<IsSVGWhitespace>
|
||||
nsCharSeparatedTokenizerTemplate<nsContentUtils::IsHTMLWhitespace>
|
||||
tokenizer(aValue, ',', nsCharSeparatedTokenizer::SEPARATOR_OPTIONAL);
|
||||
|
||||
while (tokenizer.hasMoreTokens()) {
|
||||
|
|
|
@ -94,7 +94,7 @@ SVGMotionSMILPathUtils::PathGenerator::
|
|||
ParseCoordinatePair(const nsAString& aCoordPairStr,
|
||||
float& aXVal, float& aYVal)
|
||||
{
|
||||
nsCharSeparatedTokenizerTemplate<IsSVGWhitespace>
|
||||
nsCharSeparatedTokenizerTemplate<nsContentUtils::IsHTMLWhitespace>
|
||||
tokenizer(aCoordPairStr, ',',
|
||||
nsCharSeparatedTokenizer::SEPARATOR_OPTIONAL);
|
||||
|
||||
|
|
|
@ -48,7 +48,7 @@ SVGNumberList::SetValueFromString(const nsAString& aValue)
|
|||
{
|
||||
SVGNumberList temp;
|
||||
|
||||
nsCharSeparatedTokenizerTemplate<IsSVGWhitespace>
|
||||
nsCharSeparatedTokenizerTemplate<nsContentUtils::IsHTMLWhitespace>
|
||||
tokenizer(aValue, ',', nsCharSeparatedTokenizer::SEPARATOR_OPTIONAL);
|
||||
|
||||
while (tokenizer.hasMoreTokens()) {
|
||||
|
|
|
@ -54,7 +54,7 @@ SVGPointList::SetValueFromString(const nsAString& aValue)
|
|||
|
||||
SVGPointList temp;
|
||||
|
||||
nsCharSeparatedTokenizerTemplate<IsSVGWhitespace>
|
||||
nsCharSeparatedTokenizerTemplate<nsContentUtils::IsHTMLWhitespace>
|
||||
tokenizer(aValue, ',', nsCharSeparatedTokenizer::SEPARATOR_OPTIONAL);
|
||||
|
||||
while (tokenizer.hasMoreTokens()) {
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
#include "SVGPreserveAspectRatio.h"
|
||||
|
||||
#include "mozilla/dom/SVGPreserveAspectRatioBinding.h"
|
||||
#include "nsContentUtils.h"
|
||||
#include "nsWhitespaceTokenizer.h"
|
||||
#include "SVGAnimatedPreserveAspectRatio.h"
|
||||
|
||||
|
@ -58,7 +59,8 @@ GetMeetOrSliceForString(const nsAString &aMeetOrSlice)
|
|||
SVGPreserveAspectRatio::FromString(const nsAString& aString,
|
||||
SVGPreserveAspectRatio* aValue)
|
||||
{
|
||||
nsWhitespaceTokenizerTemplate<IsSVGWhitespace> tokenizer(aString);
|
||||
nsWhitespaceTokenizerTemplate<nsContentUtils::IsHTMLWhitespace>
|
||||
tokenizer(aString);
|
||||
if (tokenizer.whitespaceBeforeFirstToken() ||
|
||||
!tokenizer.hasMoreTokens()) {
|
||||
return NS_ERROR_DOM_SYNTAX_ERR;
|
||||
|
|
|
@ -45,7 +45,7 @@ SVGStringList::SetValue(const nsAString& aValue)
|
|||
SVGStringList temp;
|
||||
|
||||
if (mIsCommaSeparated) {
|
||||
nsCharSeparatedTokenizerTemplate<IsSVGWhitespace>
|
||||
nsCharSeparatedTokenizerTemplate<nsContentUtils::IsHTMLWhitespace>
|
||||
tokenizer(aValue, ',');
|
||||
|
||||
while (tokenizer.hasMoreTokens()) {
|
||||
|
@ -57,7 +57,8 @@ SVGStringList::SetValue(const nsAString& aValue)
|
|||
return NS_ERROR_DOM_SYNTAX_ERR; // trailing comma
|
||||
}
|
||||
} else {
|
||||
nsWhitespaceTokenizerTemplate<IsSVGWhitespace> tokenizer(aValue);
|
||||
nsWhitespaceTokenizerTemplate<nsContentUtils::IsHTMLWhitespace>
|
||||
tokenizer(aValue);
|
||||
|
||||
while (tokenizer.hasMoreTokens()) {
|
||||
if (!temp.AppendItem(tokenizer.nextToken())) {
|
||||
|
|
|
@ -270,7 +270,7 @@ nsSVGAnimatedTransformList::SMILAnimatedTransformList::ParseParameterList(
|
|||
float* aVars,
|
||||
int32_t aNVars)
|
||||
{
|
||||
nsCharSeparatedTokenizerTemplate<IsSVGWhitespace>
|
||||
nsCharSeparatedTokenizerTemplate<nsContentUtils::IsHTMLWhitespace>
|
||||
tokenizer(aSpec, ',', nsCharSeparatedTokenizer::SEPARATOR_OPTIONAL);
|
||||
|
||||
int numArgsFound = 0;
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "nsSVGDataParser.h"
|
||||
#include "nsContentUtils.h"
|
||||
#include "SVGContentUtils.h"
|
||||
|
||||
nsSVGDataParser::nsSVGDataParser(const nsAString& aValue)
|
||||
|
@ -31,7 +32,7 @@ bool
|
|||
nsSVGDataParser::SkipWsp()
|
||||
{
|
||||
while (mIter != mEnd) {
|
||||
if (!IsSVGWhitespace(*mIter)) {
|
||||
if (!nsContentUtils::IsHTMLWhitespace(*mIter)) {
|
||||
return true;
|
||||
}
|
||||
++mIter;
|
||||
|
|
|
@ -27,9 +27,8 @@ static nsresult
|
|||
ParseIntegerOptionalInteger(const nsAString& aValue,
|
||||
int32_t aValues[2])
|
||||
{
|
||||
nsCharSeparatedTokenizerTemplate<IsSVGWhitespace>
|
||||
tokenizer(aValue, ',',
|
||||
nsCharSeparatedTokenizer::SEPARATOR_OPTIONAL);
|
||||
nsCharSeparatedTokenizerTemplate<nsContentUtils::IsHTMLWhitespace>
|
||||
tokenizer(aValue, ',', nsCharSeparatedTokenizer::SEPARATOR_OPTIONAL);
|
||||
if (tokenizer.whitespaceBeforeFirstToken()) {
|
||||
return NS_ERROR_DOM_SYNTAX_ERR;
|
||||
}
|
||||
|
|
|
@ -23,7 +23,7 @@ static nsresult
|
|||
ParseNumberOptionalNumber(const nsAString& aValue,
|
||||
float aValues[2])
|
||||
{
|
||||
nsCharSeparatedTokenizerTemplate<IsSVGWhitespace>
|
||||
nsCharSeparatedTokenizerTemplate<nsContentUtils::IsHTMLWhitespace>
|
||||
tokenizer(aValue, ',',
|
||||
nsCharSeparatedTokenizer::SEPARATOR_OPTIONAL);
|
||||
if (tokenizer.whitespaceBeforeFirstToken()) {
|
||||
|
|
|
@ -40,9 +40,8 @@ nsSVGViewBoxRect::FromString(const nsAString& aStr, nsSVGViewBoxRect *aViewBox)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
nsCharSeparatedTokenizerTemplate<IsSVGWhitespace>
|
||||
tokenizer(aStr, ',',
|
||||
nsCharSeparatedTokenizer::SEPARATOR_OPTIONAL);
|
||||
nsCharSeparatedTokenizerTemplate<nsContentUtils::IsHTMLWhitespace>
|
||||
tokenizer(aStr, ',', nsCharSeparatedTokenizer::SEPARATOR_OPTIONAL);
|
||||
float vals[NUM_VIEWBOX_COMPONENTS];
|
||||
uint32_t i;
|
||||
for (i = 0; i < NUM_VIEWBOX_COMPONENTS && tokenizer.hasMoreTokens(); ++i) {
|
||||
|
|
|
@ -1,12 +0,0 @@
|
|||
<html>
|
||||
<head>
|
||||
<title>Testcase for bug 582649</title>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
var foo = [];
|
||||
foo[0] = foo;
|
||||
document.body.setUserData("foo", foo, null);
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -25,7 +25,6 @@ load 512815-1.html
|
|||
load 515726-1.html
|
||||
load 545291-1.html
|
||||
load 558979.html
|
||||
load 582649.html
|
||||
load 601284-1.html
|
||||
load 603146-1.html
|
||||
load 603858-1.html
|
||||
|
|
|
@ -400,21 +400,6 @@ nsXPConnect::GetInfoForIID(const nsIID * aIID, nsIInterfaceInfo** info)
|
|||
return XPTInterfaceInfoManager::GetSingleton()->GetInfoForIID(aIID, info);
|
||||
}
|
||||
|
||||
void
|
||||
xpc_MarkInCCGeneration(nsISupports* aVariant, uint32_t aGeneration)
|
||||
{
|
||||
nsCOMPtr<XPCVariant> variant = do_QueryInterface(aVariant);
|
||||
if (variant) {
|
||||
variant->SetCCGeneration(aGeneration);
|
||||
variant->GetJSVal(); // Unmarks gray JSObject.
|
||||
XPCVariant* weak = variant.get();
|
||||
variant = nullptr;
|
||||
if (weak->IsPurple()) {
|
||||
weak->RemovePurple();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
xpc_TryUnmarkWrappedGrayObject(nsISupports* aWrappedJS)
|
||||
{
|
||||
|
|
|
@ -226,11 +226,6 @@ xpc_FastGetCachedWrapper(JSContext* cx, nsWrapperCache* cache, JS::MutableHandle
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
// If aVariant is an XPCVariant, this marks the object to be in aGeneration.
|
||||
// This also unmarks the gray JSObject.
|
||||
extern void
|
||||
xpc_MarkInCCGeneration(nsISupports* aVariant, uint32_t aGeneration);
|
||||
|
||||
// If aWrappedJS is a JS wrapper, unmark its JSObject.
|
||||
extern void
|
||||
xpc_TryUnmarkWrappedGrayObject(nsISupports* aWrappedJS);
|
||||
|
|
Загрузка…
Ссылка в новой задаче