зеркало из https://github.com/mozilla/gecko-dev.git
Merge last PGO green changeset from mozilla-inbound to mozilla-central
This commit is contained in:
Коммит
894a244c4f
|
@ -166,6 +166,7 @@ endif
|
|||
OBJCOPY="$(OBJCOPY)" \
|
||||
$(PYTHON) $(topsrcdir)/toolkit/crashreporter/tools/symbolstore.py \
|
||||
$(MAKE_SYM_STORE_ARGS) \
|
||||
--exclude="*test*" --exclude="*Test*" \
|
||||
$(foreach dir,$(SYM_STORE_SOURCE_DIRS),-s $(dir)) \
|
||||
$(DUMP_SYMS_BIN) \
|
||||
$(DIST)/crashreporter-symbols \
|
||||
|
|
|
@ -63,6 +63,7 @@
|
|||
#include "nsTextFragment.h"
|
||||
#include "mozilla/FunctionTimer.h"
|
||||
#include "mozilla/dom/Element.h"
|
||||
#include "mozilla/Preferences.h"
|
||||
#include "mozilla/Services.h"
|
||||
#include "mozilla/Util.h"
|
||||
|
||||
|
@ -1819,8 +1820,30 @@ nsAccessibilityService::CreateAccessibleForXULTree(nsIContent* aContent,
|
|||
// Services
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
mozilla::a11y::FocusManager*
|
||||
mozilla::a11y::FocusMgr()
|
||||
namespace mozilla {
|
||||
namespace a11y {
|
||||
|
||||
FocusManager*
|
||||
FocusMgr()
|
||||
{
|
||||
return nsAccessibilityService::gAccessibilityService;
|
||||
}
|
||||
|
||||
EPlatformDisabledState
|
||||
PlatformDisabledState()
|
||||
{
|
||||
static int disabledState = 0xff;
|
||||
|
||||
if (disabledState == 0xff) {
|
||||
disabledState = Preferences::GetInt("accessibility.force_disabled", 0);
|
||||
if (disabledState < ePlatformIsForceEnabled)
|
||||
disabledState = ePlatformIsForceEnabled;
|
||||
else if (disabledState > ePlatformIsDisabled)
|
||||
disabledState = ePlatformIsDisabled;
|
||||
}
|
||||
|
||||
return (EPlatformDisabledState)disabledState;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -26,6 +26,17 @@ namespace a11y {
|
|||
*/
|
||||
FocusManager* FocusMgr();
|
||||
|
||||
enum EPlatformDisabledState {
|
||||
ePlatformIsForceEnabled = -1,
|
||||
ePlatformIsEnabled = 0,
|
||||
ePlatformIsDisabled = 1
|
||||
};
|
||||
|
||||
/**
|
||||
* Return the platform disabled state.
|
||||
*/
|
||||
EPlatformDisabledState PlatformDisabledState();
|
||||
|
||||
#ifdef MOZ_ACCESSIBILITY_ATK
|
||||
/**
|
||||
* Perform initialization that should be done as soon as possible, in order
|
||||
|
|
|
@ -155,7 +155,11 @@ nsAccessiblePivot::SetTextRange(nsIAccessibleText* aTextAccessible,
|
|||
(aStartOffset >= 0 || (aStartOffset != -1 && aEndOffset != -1)),
|
||||
NS_ERROR_INVALID_ARG);
|
||||
|
||||
nsRefPtr<HyperTextAccessible> newPosition = do_QueryObject(aTextAccessible);
|
||||
nsRefPtr<Accessible> acc(do_QueryObject(aTextAccessible));
|
||||
if (!acc)
|
||||
return NS_ERROR_INVALID_ARG;
|
||||
|
||||
HyperTextAccessible* newPosition = acc->AsHyperText();
|
||||
if (!newPosition || !IsRootDescendant(newPosition))
|
||||
return NS_ERROR_INVALID_ARG;
|
||||
|
||||
|
@ -170,7 +174,7 @@ nsAccessiblePivot::SetTextRange(nsIAccessibleText* aTextAccessible,
|
|||
mEndOffset = aEndOffset;
|
||||
|
||||
nsRefPtr<Accessible> oldPosition = mPosition.forget();
|
||||
mPosition = newPosition.forget();
|
||||
mPosition = newPosition;
|
||||
|
||||
NotifyOfPivotChange(oldPosition, oldStart, oldEnd);
|
||||
|
||||
|
|
|
@ -55,12 +55,6 @@ HyperTextAccessible::QueryInterface(REFNSIID aIID, void** aInstancePtr)
|
|||
{
|
||||
*aInstancePtr = nsnull;
|
||||
|
||||
if (aIID.Equals(NS_GET_IID(HyperTextAccessible))) {
|
||||
*aInstancePtr = static_cast<HyperTextAccessible*>(this);
|
||||
NS_ADDREF_THIS();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
// ARIA roles that these interfaces are not appropriate for.
|
||||
if (!IsTextRole())
|
||||
return Accessible::QueryInterface(aIID, aInstancePtr);
|
||||
|
|
|
@ -24,14 +24,6 @@ const PRUnichar kEmbeddedObjectChar = 0xfffc;
|
|||
const PRUnichar kImaginaryEmbeddedObjectChar = ' ';
|
||||
const PRUnichar kForcedNewLineChar = '\n';
|
||||
|
||||
#define NS_HYPERTEXTACCESSIBLE_IMPL_CID \
|
||||
{ /* 245f3bc9-224f-4839-a92e-95239705f30b */ \
|
||||
0x245f3bc9, \
|
||||
0x224f, \
|
||||
0x4839, \
|
||||
{ 0xa9, 0x2e, 0x95, 0x23, 0x97, 0x05, 0xf3, 0x0b } \
|
||||
}
|
||||
|
||||
/**
|
||||
* Special Accessible that knows how contain both text and embedded objects
|
||||
*/
|
||||
|
@ -48,7 +40,6 @@ public:
|
|||
NS_DECL_NSIACCESSIBLETEXT
|
||||
NS_DECL_NSIACCESSIBLEHYPERTEXT
|
||||
NS_DECL_NSIACCESSIBLEEDITABLETEXT
|
||||
NS_DECLARE_STATIC_IID_ACCESSOR(NS_HYPERTEXTACCESSIBLE_IMPL_CID)
|
||||
|
||||
// Accessible
|
||||
virtual PRInt32 GetLevelInternal();
|
||||
|
@ -410,9 +401,6 @@ private:
|
|||
nsTArray<PRUint32> mOffsets;
|
||||
};
|
||||
|
||||
NS_DEFINE_STATIC_IID_ACCESSOR(HyperTextAccessible,
|
||||
NS_HYPERTEXTACCESSIBLE_IMPL_CID)
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Accessible downcasting method
|
||||
|
|
|
@ -324,9 +324,8 @@ HTMLTextFieldAccessible::
|
|||
{
|
||||
}
|
||||
|
||||
NS_IMPL_ISUPPORTS_INHERITED3(HTMLTextFieldAccessible,
|
||||
Accessible,
|
||||
HyperTextAccessible,
|
||||
NS_IMPL_ISUPPORTS_INHERITED2(HTMLTextFieldAccessible,
|
||||
Accessible,
|
||||
nsIAccessibleText,
|
||||
nsIAccessibleEditableText)
|
||||
|
||||
|
|
|
@ -13,12 +13,14 @@
|
|||
namespace mozilla {
|
||||
namespace a11y {
|
||||
|
||||
// Mac a11y whitelisting
|
||||
static bool sA11yShouldBeEnabled = false;
|
||||
|
||||
bool
|
||||
ShouldA11yBeEnabled()
|
||||
{
|
||||
return sA11yShouldBeEnabled;
|
||||
EPlatformDisabledState disabledState = PlatformDisabledState();
|
||||
return (disabledState == ePlatformIsForceEnabled) || ((disabledState == ePlatformIsEnabled) && sA11yShouldBeEnabled);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -57,7 +57,7 @@ ToNSString(id aValue)
|
|||
NS_OBJC_BEGIN_TRY_ABORT_BLOCK_NIL;
|
||||
|
||||
if ((self = [super initWithAccessible:accessible])) {
|
||||
CallQueryInterface(accessible, &mGeckoTextAccessible);
|
||||
mGeckoTextAccessible = accessible->AsHyperText();
|
||||
CallQueryInterface(accessible, &mGeckoEditableTextAccessible);
|
||||
}
|
||||
return self;
|
||||
|
@ -312,7 +312,7 @@ ToNSString(id aValue)
|
|||
{
|
||||
NS_OBJC_BEGIN_TRY_ABORT_BLOCK;
|
||||
|
||||
NS_IF_RELEASE(mGeckoTextAccessible);
|
||||
mGeckoTextAccessible = nsnull;
|
||||
NS_IF_RELEASE(mGeckoEditableTextAccessible);
|
||||
[super expire];
|
||||
|
||||
|
|
|
@ -119,9 +119,8 @@ nsXFormsInputAccessible::
|
|||
{
|
||||
}
|
||||
|
||||
NS_IMPL_ISUPPORTS_INHERITED3(nsXFormsInputAccessible,
|
||||
NS_IMPL_ISUPPORTS_INHERITED2(nsXFormsInputAccessible,
|
||||
Accessible,
|
||||
HyperTextAccessible,
|
||||
nsIAccessibleText,
|
||||
nsIAccessibleEditableText)
|
||||
|
||||
|
|
|
@ -685,9 +685,8 @@ XULTextFieldAccessible::
|
|||
{
|
||||
}
|
||||
|
||||
NS_IMPL_ISUPPORTS_INHERITED3(XULTextFieldAccessible,
|
||||
NS_IMPL_ISUPPORTS_INHERITED2(XULTextFieldAccessible,
|
||||
Accessible,
|
||||
HyperTextAccessible,
|
||||
nsIAccessibleText,
|
||||
nsIAccessibleEditableText)
|
||||
|
||||
|
|
|
@ -307,6 +307,24 @@
|
|||
attrs = {};
|
||||
testTextAttrs(ID, 123, attrs, defAttrs, 122, 130);
|
||||
|
||||
attrs = {
|
||||
"text-line-through-style": "solid",
|
||||
"text-line-through-color": gComputedStyle.color
|
||||
};
|
||||
testTextAttrs(ID, 131, attrs, defAttrs, 130, 143);
|
||||
|
||||
attrs = {};
|
||||
testTextAttrs(ID, 144, attrs, defAttrs, 143, 151);
|
||||
|
||||
attrs = {
|
||||
"text-line-through-style": "solid",
|
||||
"text-line-through-color": gComputedStyle.color
|
||||
};
|
||||
testTextAttrs(ID, 152, attrs, defAttrs, 151, 164);
|
||||
|
||||
attrs = {};
|
||||
testTextAttrs(ID, 165, attrs, defAttrs, 164, 172);
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// area10, different single style spans in non-styled paragraph
|
||||
ID = "area10";
|
||||
|
@ -621,6 +639,8 @@
|
|||
<span style="font-family: monospace;">Different font</span> normal
|
||||
<span style="text-decoration: underline;">underlined</span> normal
|
||||
<span style="text-decoration: line-through;">strikethrough</span> normal
|
||||
<s>strikethrough</s> normal
|
||||
<strike>strikethrough</strike> normal
|
||||
</p>
|
||||
|
||||
<p id="area10">Normal
|
||||
|
|
|
@ -1,6 +1,23 @@
|
|||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
// Copyright (c) 2009 Thomas Robinson <tlrobinson.net>
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person
|
||||
// obtaining a copy of this software and associated documentation files
|
||||
// (the “Software”), to deal in the Software without restriction,
|
||||
// including without limitation the rights to use, copy, modify, merge,
|
||||
// publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
// and to permit persons to whom the Software is furnished to do so,
|
||||
// subject to the following conditions:
|
||||
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
|
||||
// THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY
|
||||
// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
// This module was taken from narwhal:
|
||||
//
|
||||
|
|
|
@ -27,8 +27,15 @@ var gConnectionsDialog = {
|
|||
var backupPortPref = document.getElementById("network.proxy.backup." + proxyPrefs[i] + "_port");
|
||||
backupServerURLPref.value = proxyServerURLPref.value;
|
||||
backupPortPref.value = proxyPortPref.value;
|
||||
proxyServerURLPref.value = httpProxyURLPref.value;
|
||||
proxyPortPref.value = httpProxyPortPref.value;
|
||||
// SOCKS: not a protocol: set value to empty/0 while shareProxies is on
|
||||
if (proxyPrefs[i] == "socks") {
|
||||
proxyServerURLPref.value = "";
|
||||
proxyPortPref.value = 0;
|
||||
} else {
|
||||
// protocols get HTTP proxy's values
|
||||
proxyServerURLPref.value = httpProxyURLPref.value;
|
||||
proxyPortPref.value = httpProxyPortPref.value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -134,6 +141,10 @@ var gConnectionsDialog = {
|
|||
{
|
||||
var shareProxiesPref = document.getElementById("network.proxy.share_proxy_settings");
|
||||
if (shareProxiesPref.value) {
|
||||
// during shareProxiesPref SOCKS values are empty
|
||||
if (aProtocol == 'socks') {
|
||||
return aIsPort ? 0 : "";
|
||||
}
|
||||
var pref = document.getElementById("network.proxy.http" + (aIsPort ? "_port" : ""));
|
||||
return pref.value;
|
||||
}
|
||||
|
|
|
@ -1676,18 +1676,18 @@ richlistitem[type~="action"][actiontype="switchtab"][selected="true"] > .ac-url-
|
|||
}
|
||||
|
||||
.panel-promo-box {
|
||||
margin: 16px 0 -2px;
|
||||
margin: 10px -10px -10px;
|
||||
padding: 8px 10px;
|
||||
border-top: 1px solid ThreeDShadow;
|
||||
background-image: -moz-linear-gradient(hsla(0,0%,0%,.15), hsla(0,0%,0%,.08) 6px);
|
||||
border-bottom-left-radius: 3px;
|
||||
border-bottom-right-radius: 3px;
|
||||
}
|
||||
|
||||
@media (-moz-windows-default-theme) {
|
||||
.panel-promo-box {
|
||||
margin: 8px -16px -16px;
|
||||
padding: 8px 16px;
|
||||
%ifndef WINSTRIPE_AERO
|
||||
border-bottom-left-radius: 6px;
|
||||
border-bottom-right-radius: 6px;
|
||||
%endif
|
||||
background-color: #f1f5fb;
|
||||
border-top-style: none;
|
||||
background: #f1f5fb;
|
||||
color: GrayText;
|
||||
box-shadow: 0px 1px 2px rgb(204,214,234) inset;
|
||||
}
|
||||
|
|
|
@ -6,10 +6,6 @@
|
|||
%include downloads.css
|
||||
%undef WINSTRIPE_AERO
|
||||
|
||||
#downloadsPanel > .panel-arrowcontainer > .panel-arrowcontent > .panel-inner-arrowcontent {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
@media (-moz-windows-default-theme) {
|
||||
#downloadsPanel[hasdownloads] > #downloadsHistory {
|
||||
background-color: #f1f5fb;
|
||||
|
|
|
@ -16,11 +16,6 @@
|
|||
border-top-left-radius: 6px;
|
||||
border-top-right-radius: 6px;
|
||||
}
|
||||
|
||||
#downloadsPanel > .panel-arrowcontainer > .panel-arrowcontent {
|
||||
/* Avoid that the arrow overlaps the selection on first item */
|
||||
padding-top: 5px;
|
||||
}
|
||||
%endif
|
||||
|
||||
#downloadsPanel > .panel-arrowcontainer > .panel-arrowcontent {
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
print_header() {
|
||||
_mozconfig=${MOZCONFIG:-$HOME/.mozconfig}
|
||||
cat >> $tmp_file <<EOF
|
||||
cat <<EOF
|
||||
# gmake
|
||||
# This file is automatically generated for client.mk.
|
||||
# Do not edit. Edit $_mozconfig instead.
|
||||
|
@ -20,11 +20,11 @@ EOF
|
|||
}
|
||||
|
||||
ac_add_options() {
|
||||
echo "# $* is used by configure (not client.mk)" >> $tmp_file
|
||||
echo "# $* is used by configure (not client.mk)"
|
||||
}
|
||||
|
||||
ac_add_app_options() {
|
||||
echo "# $* is used by configure (not client.mk)" >> $tmp_file
|
||||
echo "# $* is used by configure (not client.mk)"
|
||||
}
|
||||
|
||||
mk_add_options() {
|
||||
|
@ -35,14 +35,14 @@ mk_add_options() {
|
|||
_opt=`echo "$_opt" | sed -e 's/\([\"\\]\)/\\\1/g; s/@\([^@]*\)@/\$(\1)/g;'`
|
||||
echo $_opt;
|
||||
opts="${opts:+$opts^}$_opt";
|
||||
done >> $tmp_file
|
||||
done
|
||||
}
|
||||
|
||||
mk_echo_options() {
|
||||
echo "Adding client.mk options from $FOUND_MOZCONFIG:"
|
||||
echo "Adding client.mk options from $FOUND_MOZCONFIG:" >&2
|
||||
IFS=^
|
||||
for _opt in $opts; do
|
||||
echo " $_opt"
|
||||
echo " $_opt" >&2
|
||||
done
|
||||
}
|
||||
|
||||
|
@ -51,23 +51,19 @@ mk_echo_options() {
|
|||
|
||||
scriptdir=`dirname $0`
|
||||
topsrcdir=$1
|
||||
out_file=$2
|
||||
tmp_file="$out_file-tmp$$"
|
||||
opts=""
|
||||
|
||||
trap "rm -f $tmp_file; exit 1" 1 2 15
|
||||
|
||||
print_header > $tmp_file
|
||||
print_header
|
||||
|
||||
# If the path changes, configure should be rerun
|
||||
echo "# PATH=$PATH" >> $tmp_file
|
||||
echo "# PATH=$PATH"
|
||||
|
||||
# If FOUND_MOZCONFIG isn't set, look for it and make sure the script doesn't error out
|
||||
isfoundset=${FOUND_MOZCONFIG+yes}
|
||||
if [ -z $isfoundset ]; then
|
||||
FOUND_MOZCONFIG=`$scriptdir/mozconfig-find $topsrcdir`
|
||||
if [ $? -ne 0 ]; then
|
||||
echo '$(error Fix above errors before continuing.)' >> $tmp_file
|
||||
echo '$(error Fix above errors before continuing.)'
|
||||
else
|
||||
isfoundset=yes
|
||||
fi
|
||||
|
@ -78,15 +74,9 @@ if [ -n $isfoundset ]; then
|
|||
then
|
||||
. "$FOUND_MOZCONFIG"
|
||||
fi
|
||||
echo "export FOUND_MOZCONFIG := $FOUND_MOZCONFIG" >> $tmp_file
|
||||
echo "export FOUND_MOZCONFIG := $FOUND_MOZCONFIG"
|
||||
|
||||
if [ "$opts" ]; then
|
||||
mk_echo_options
|
||||
fi
|
||||
fi
|
||||
|
||||
if test -f $out_file && cmp -s $tmp_file $out_file; then
|
||||
rm $tmp_file
|
||||
else
|
||||
mv -f $tmp_file $out_file
|
||||
fi
|
||||
|
|
|
@ -501,6 +501,14 @@ class DeviceManager:
|
|||
|
||||
return str(buf.getvalue()[0:-1]).rstrip().split('\r')
|
||||
|
||||
@abstractmethod
|
||||
def chmodDir(self, remoteDir):
|
||||
"""
|
||||
external function
|
||||
returns:
|
||||
success: True
|
||||
failure: False
|
||||
"""
|
||||
|
||||
class NetworkTools:
|
||||
def __init__(self):
|
||||
|
|
|
@ -168,7 +168,6 @@ class DeviceManagerADB(DeviceManager):
|
|||
self.checkCmd(["push", os.path.realpath(localname), destname])
|
||||
if (self.isDir(destname)):
|
||||
destname = destname + "/" + os.path.basename(localname)
|
||||
self.chmodDir(destname)
|
||||
return True
|
||||
except:
|
||||
return False
|
||||
|
@ -184,8 +183,6 @@ class DeviceManagerADB(DeviceManager):
|
|||
return None
|
||||
if 'file exists' in result.lower():
|
||||
return name
|
||||
|
||||
self.chmodDir(name)
|
||||
return name
|
||||
except:
|
||||
return None
|
||||
|
@ -253,7 +250,6 @@ class DeviceManagerADB(DeviceManager):
|
|||
targetDir = targetDir + dir
|
||||
if (not self.dirExists(targetDir)):
|
||||
self.mkDir(targetDir)
|
||||
self.checkCmdAs(["shell", "chmod", "777", remoteDir])
|
||||
return remoteDir
|
||||
except:
|
||||
print "pushing " + localDir + " to " + remoteDir + " failed"
|
||||
|
@ -752,20 +748,26 @@ class DeviceManagerADB(DeviceManager):
|
|||
args.insert(2, self.packageName)
|
||||
return self.checkCmd(args)
|
||||
|
||||
# external function
|
||||
# returns:
|
||||
# success: True
|
||||
# failure: False
|
||||
def chmodDir(self, remoteDir):
|
||||
if (self.isDir(remoteDir)):
|
||||
files = self.listFiles(remoteDir.strip())
|
||||
for f in files:
|
||||
if (self.isDir(remoteDir.strip() + "/" + f.strip())):
|
||||
self.chmodDir(remoteDir.strip() + "/" + f.strip())
|
||||
remoteEntry = remoteDir.strip() + "/" + f.strip()
|
||||
if (self.isDir(remoteEntry)):
|
||||
self.chmodDir(remoteEntry)
|
||||
else:
|
||||
self.checkCmdAs(["shell", "chmod", "777", remoteDir.strip()])
|
||||
print "chmod " + remoteDir.strip()
|
||||
self.checkCmdAs(["shell", "chmod", "777", remoteEntry])
|
||||
print "chmod " + remoteEntry
|
||||
self.checkCmdAs(["shell", "chmod", "777", remoteDir])
|
||||
print "chmod " + remoteDir
|
||||
else:
|
||||
self.checkCmdAs(["shell", "chmod", "777", remoteDir.strip()])
|
||||
print "chmod " + remoteDir.strip()
|
||||
return True
|
||||
|
||||
def verifyADB(self):
|
||||
# Check to see if adb itself can be executed.
|
||||
|
|
|
@ -1182,6 +1182,17 @@ class DeviceManagerSUT(DeviceManager):
|
|||
|
||||
return True
|
||||
|
||||
# external function
|
||||
# returns:
|
||||
# success: True
|
||||
# failure: False
|
||||
def chmodDir(self, remoteDir):
|
||||
try:
|
||||
self.runCmds(["chmod "+remoteDir])
|
||||
except AgentError:
|
||||
return False
|
||||
return True
|
||||
|
||||
gCallbackData = ''
|
||||
|
||||
class myServer(SocketServer.TCPServer):
|
||||
|
|
|
@ -169,6 +169,7 @@ public class DoCommand {
|
|||
TZGET ("tzget"),
|
||||
TZSET ("tzset"),
|
||||
ADB ("adb"),
|
||||
CHMOD ("chmod"),
|
||||
UNKNOWN ("unknown");
|
||||
|
||||
private final String theCmd;
|
||||
|
@ -732,6 +733,13 @@ public class DoCommand {
|
|||
strReturn = Zip(Argv[1], (Argc == 3 ? Argv[2] : ""));
|
||||
break;
|
||||
|
||||
case CHMOD:
|
||||
if (Argc == 2)
|
||||
strReturn = ChmodDir(Argv[1]);
|
||||
else
|
||||
strReturn = sErrorPrefix + "Wrong number of arguments for chmod command!";
|
||||
break;
|
||||
|
||||
case HELP:
|
||||
strReturn = PrintUsage();
|
||||
break;
|
||||
|
@ -1910,14 +1918,6 @@ private void CancelNotification()
|
|||
if (dstFile != null) {
|
||||
dstFile.flush();
|
||||
dstFile.close();
|
||||
// set the new file's permissions to rwxrwxrwx, if possible
|
||||
Process pProc = Runtime.getRuntime().exec("chmod 777 "+sTmpFileName);
|
||||
RedirOutputThread outThrd = new RedirOutputThread(pProc, null);
|
||||
outThrd.start();
|
||||
try {
|
||||
outThrd.join(5000);
|
||||
} catch (InterruptedException e) {
|
||||
}
|
||||
}
|
||||
|
||||
if (lRead == lSize) {
|
||||
|
@ -2258,18 +2258,6 @@ private void CancelNotification()
|
|||
File dir = new File(sTmpDir);
|
||||
|
||||
if (dir.mkdirs()) {
|
||||
// set the new dir's permissions to rwxrwxrwx, if possible
|
||||
try {
|
||||
Process pProc = Runtime.getRuntime().exec("chmod 777 "+sTmpDir);
|
||||
RedirOutputThread outThrd = new RedirOutputThread(pProc, null);
|
||||
outThrd.start();
|
||||
try {
|
||||
outThrd.join(5000);
|
||||
} catch (InterruptedException e) {
|
||||
}
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
sRet = sDir + " successfully created";
|
||||
}
|
||||
}
|
||||
|
@ -3672,6 +3660,63 @@ private void CancelNotification()
|
|||
return (sRet);
|
||||
}
|
||||
|
||||
public String ChmodDir(String sDir)
|
||||
{
|
||||
String sRet = "";
|
||||
int nFiles = 0;
|
||||
String sSubDir = null;
|
||||
String sTmpDir = fixFileName(sDir);
|
||||
|
||||
File dir = new File(sTmpDir);
|
||||
|
||||
if (dir.isDirectory()) {
|
||||
sRet = "Changing permissions for " + sTmpDir;
|
||||
|
||||
File [] files = dir.listFiles();
|
||||
if (files != null) {
|
||||
if ((nFiles = files.length) > 0) {
|
||||
for (int lcv = 0; lcv < nFiles; lcv++) {
|
||||
if (files[lcv].isDirectory()) {
|
||||
sSubDir = files[lcv].getAbsolutePath();
|
||||
sRet += "\n" + ChmodDir(sSubDir);
|
||||
}
|
||||
else {
|
||||
// set the new file's permissions to rwxrwxrwx, if possible
|
||||
try {
|
||||
Process pProc = Runtime.getRuntime().exec("chmod 777 "+files[lcv]);
|
||||
RedirOutputThread outThrd = new RedirOutputThread(pProc, null);
|
||||
outThrd.start();
|
||||
outThrd.join(5000);
|
||||
sRet += "\n\tchmod " + files[lcv].getName() + " ok";
|
||||
} catch (InterruptedException e) {
|
||||
sRet += "\n\ttimeout waiting for chmod " + files[lcv].getName();
|
||||
} catch (IOException e) {
|
||||
sRet += "\n\tunable to chmod " + files[lcv].getName();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
sRet += "\n\t<empty>";
|
||||
}
|
||||
}
|
||||
|
||||
// set the new directory's (or file's) permissions to rwxrwxrwx, if possible
|
||||
try {
|
||||
Process pProc = Runtime.getRuntime().exec("chmod 777 "+sTmpDir);
|
||||
RedirOutputThread outThrd = new RedirOutputThread(pProc, null);
|
||||
outThrd.start();
|
||||
outThrd.join(5000);
|
||||
sRet += "\n\tchmod " + sTmpDir + " ok";
|
||||
} catch (InterruptedException e) {
|
||||
sRet += "\n\ttimeout waiting for chmod " + sTmpDir;
|
||||
} catch (IOException e) {
|
||||
sRet += "\n\tunable to chmod " + sTmpDir;
|
||||
}
|
||||
|
||||
return(sRet);
|
||||
}
|
||||
|
||||
private String PrintUsage()
|
||||
{
|
||||
String sRet =
|
||||
|
@ -3706,6 +3751,7 @@ private void CancelNotification()
|
|||
"mkdr directory - create directory\n" +
|
||||
"dirw directory - tests whether the directory is writable\n" +
|
||||
"isdir directory - test whether the directory exists\n" +
|
||||
"chmod directory|file - change permissions of directory and contents (or file) to 777\n" +
|
||||
"stat processid - stat process\n" +
|
||||
"dead processid - print whether the process is alive or hung\n" +
|
||||
"mems - dump memory stats\n" +
|
||||
|
|
|
@ -59,6 +59,7 @@
|
|||
#include "mozilla/Preferences.h"
|
||||
#include "mozilla/dom/BindingUtils.h"
|
||||
#include "mozilla/StandardInteger.h"
|
||||
#include "mozilla/ClearOnShutdown.h"
|
||||
|
||||
using namespace mozilla;
|
||||
using namespace mozilla::dom;
|
||||
|
@ -3144,7 +3145,7 @@ nsresult nsScriptSecurityManager::Init()
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
static nsScriptSecurityManager *gScriptSecMan = nsnull;
|
||||
static nsRefPtr<nsScriptSecurityManager> gScriptSecMan;
|
||||
|
||||
jsid nsScriptSecurityManager::sEnabledID = JSID_VOID;
|
||||
|
||||
|
@ -3156,7 +3157,6 @@ nsScriptSecurityManager::~nsScriptSecurityManager(void)
|
|||
if(mDefaultPolicy)
|
||||
mDefaultPolicy->Drop();
|
||||
delete mCapabilities;
|
||||
gScriptSecMan = nsnull;
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -3180,14 +3180,12 @@ nsScriptSecurityManager::GetScriptSecurityManager()
|
|||
{
|
||||
if (!gScriptSecMan)
|
||||
{
|
||||
nsScriptSecurityManager* ssManager = new nsScriptSecurityManager();
|
||||
if (!ssManager)
|
||||
return nsnull;
|
||||
nsRefPtr<nsScriptSecurityManager> ssManager = new nsScriptSecurityManager();
|
||||
|
||||
nsresult rv;
|
||||
rv = ssManager->Init();
|
||||
NS_ASSERTION(NS_SUCCEEDED(rv), "Failed to initialize nsScriptSecurityManager");
|
||||
if (NS_FAILED(rv)) {
|
||||
delete ssManager;
|
||||
return nsnull;
|
||||
}
|
||||
|
||||
|
@ -3195,10 +3193,10 @@ nsScriptSecurityManager::GetScriptSecurityManager()
|
|||
nsIXPCSecurityManager::HOOK_ALL);
|
||||
if (NS_FAILED(rv)) {
|
||||
NS_WARNING("Failed to install xpconnect security manager!");
|
||||
delete ssManager;
|
||||
return nsnull;
|
||||
}
|
||||
|
||||
ClearOnShutdown(&gScriptSecMan);
|
||||
gScriptSecMan = ssManager;
|
||||
}
|
||||
return gScriptSecMan;
|
||||
|
|
13
client.mk
13
client.mk
|
@ -95,10 +95,15 @@ MOZCONFIG_LOADER := build/autoconf/mozconfig2client-mk
|
|||
MOZCONFIG_FINDER := build/autoconf/mozconfig-find
|
||||
MOZCONFIG_MODULES := build/unix/uniq.pl
|
||||
|
||||
run_for_side_effects := \
|
||||
$(shell $(TOPSRCDIR)/$(MOZCONFIG_LOADER) $(TOPSRCDIR) $(TOPSRCDIR)/.mozconfig.mk > $(TOPSRCDIR)/.mozconfig.out)
|
||||
define CR
|
||||
|
||||
include $(TOPSRCDIR)/.mozconfig.mk
|
||||
|
||||
endef
|
||||
|
||||
# As $(shell) doesn't preserve newlines, use sed to replace them with an
|
||||
# unlikely sequence (||), which is then replaced back to newlines by make
|
||||
# before evaluation.
|
||||
$(eval $(subst ||,$(CR),$(shell $(TOPSRCDIR)/$(MOZCONFIG_LOADER) $(TOPSRCDIR) 2> $(TOPSRCDIR)/.mozconfig.out | sed 's/$$/||/')))
|
||||
|
||||
ifndef MOZ_OBJDIR
|
||||
MOZ_OBJDIR = obj-$(CONFIG_GUESS)
|
||||
|
@ -293,7 +298,7 @@ configure-preqs = \
|
|||
save-mozconfig \
|
||||
$(NULL)
|
||||
|
||||
save-mozconfig:
|
||||
save-mozconfig: $(FOUND_MOZCONFIG)
|
||||
-cp $(FOUND_MOZCONFIG) $(OBJDIR)/.mozconfig
|
||||
|
||||
configure:: $(configure-preqs)
|
||||
|
|
|
@ -62,9 +62,10 @@ LIBXUL_DIST ?= $(DIST)
|
|||
# FINAL_TARGET specifies the location into which we copy end-user-shipped
|
||||
# build products (typelibs, components, chrome).
|
||||
#
|
||||
# It will usually be the well-loved $(DIST)/bin, today, but can also be an
|
||||
# XPI-contents staging directory for ambitious and right-thinking extensions.
|
||||
FINAL_TARGET = $(if $(XPI_NAME),$(DIST)/xpi-stage/$(XPI_NAME),$(DIST)/bin)
|
||||
# If XPI_NAME is set, the files will be shipped to $(DIST)/xpi-stage/$(XPI_NAME)
|
||||
# If DIST_SUBDIR is set, the files will be shipped to $(DIST)/$(DIST_SUBDIR)
|
||||
# Otherwise, the default $(DIST)/bin will be used.
|
||||
FINAL_TARGET = $(if $(XPI_NAME),$(DIST)/xpi-stage/$(XPI_NAME),$(if $(DIST_SUBDIR),$(DIST)/bin/$(DIST_SUBDIR),$(DIST)/bin))
|
||||
|
||||
ifdef XPI_NAME
|
||||
DEFINES += -DXPI_NAME=$(XPI_NAME)
|
||||
|
|
17
configure.in
17
configure.in
|
@ -4312,15 +4312,7 @@ MOZ_USE_NATIVE_POPUP_WINDOWS=
|
|||
MOZ_ANDROID_HISTORY=
|
||||
MOZ_WEBSMS_BACKEND=
|
||||
MOZ_GRAPHITE=1
|
||||
|
||||
case "${target}" in
|
||||
*darwin*)
|
||||
ACCESSIBILITY=
|
||||
;;
|
||||
*)
|
||||
ACCESSIBILITY=1
|
||||
;;
|
||||
esac
|
||||
ACCESSIBILITY=1
|
||||
|
||||
case "$target_os" in
|
||||
mingw*)
|
||||
|
@ -5269,10 +5261,9 @@ AC_DEFINE(IBMBIDI)
|
|||
|
||||
dnl ========================================================
|
||||
dnl accessibility support on by default on all platforms
|
||||
dnl except OS X.
|
||||
dnl ========================================================
|
||||
MOZ_ARG_DISABLE_BOOL(accessibility,
|
||||
[ --disable-accessibility Disable accessibility support (off by default on OS X)],
|
||||
[ --disable-accessibility Disable accessibility support],
|
||||
ACCESSIBILITY=,
|
||||
ACCESSIBILITY=1 )
|
||||
if test "$ACCESSIBILITY"; then
|
||||
|
@ -8941,7 +8932,9 @@ if test "$MOZ_JEMALLOC" -a "$MOZ_MEMORY"; then
|
|||
for var in AS CC CXX CPP LD AR RANLIB STRIP CPPFLAGS EXTRA_CFLAGS LDFLAGS; do
|
||||
ac_configure_args="$ac_configure_args $var='`eval echo \\${${var}}`'"
|
||||
done
|
||||
ac_configure_args="$ac_configure_args je_cv_static_page_shift=12"
|
||||
if test "$CROSS_COMPILE"; then
|
||||
ac_configure_args="$ac_configure_args je_cv_static_page_shift=12"
|
||||
fi
|
||||
_save_cache_file="$cache_file"
|
||||
cache_file=$_objdir/memory/jemalloc/src/config.cache
|
||||
AC_OUTPUT_SUBDIRS(memory/jemalloc/src)
|
||||
|
|
|
@ -250,65 +250,6 @@ public:
|
|||
return OwnerDoc()->IsHTML();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the namespace that this element's tag is defined in
|
||||
* @return the namespace
|
||||
*/
|
||||
PRInt32 GetNameSpaceID() const
|
||||
{
|
||||
return mNodeInfo->NamespaceID();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the tag for this element. This will always return a non-null
|
||||
* atom pointer (as implied by the naming of the method).
|
||||
*/
|
||||
nsIAtom *Tag() const
|
||||
{
|
||||
return mNodeInfo->NameAtom();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the NodeInfo for this element
|
||||
* @return the nodes node info
|
||||
*/
|
||||
nsINodeInfo *NodeInfo() const
|
||||
{
|
||||
return mNodeInfo;
|
||||
}
|
||||
|
||||
inline bool IsInNamespace(PRInt32 aNamespace) const {
|
||||
return mNodeInfo->NamespaceID() == aNamespace;
|
||||
}
|
||||
|
||||
inline bool IsHTML() const {
|
||||
return IsInNamespace(kNameSpaceID_XHTML);
|
||||
}
|
||||
|
||||
inline bool IsHTML(nsIAtom* aTag) const {
|
||||
return mNodeInfo->Equals(aTag, kNameSpaceID_XHTML);
|
||||
}
|
||||
|
||||
inline bool IsSVG() const {
|
||||
return IsInNamespace(kNameSpaceID_SVG);
|
||||
}
|
||||
|
||||
inline bool IsSVG(nsIAtom* aTag) const {
|
||||
return mNodeInfo->Equals(aTag, kNameSpaceID_SVG);
|
||||
}
|
||||
|
||||
inline bool IsXUL() const {
|
||||
return IsInNamespace(kNameSpaceID_XUL);
|
||||
}
|
||||
|
||||
inline bool IsMathML() const {
|
||||
return IsInNamespace(kNameSpaceID_MathML);
|
||||
}
|
||||
|
||||
inline bool IsMathML(nsIAtom* aTag) const {
|
||||
return mNodeInfo->Equals(aTag, kNameSpaceID_MathML);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an atom holding the name of the attribute of type ID on
|
||||
* this content node (if applicable). Returns null for non-element
|
||||
|
|
|
@ -476,6 +476,75 @@ public:
|
|||
return mNodeInfo->LocalName();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the namespace that this element's tag is defined in
|
||||
* @return the namespace
|
||||
*/
|
||||
PRInt32 GetNameSpaceID() const
|
||||
{
|
||||
return mNodeInfo->NamespaceID();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the tag for this element. This will always return a non-null atom
|
||||
* pointer (as implied by the naming of the method). For elements this is
|
||||
* the non-namespaced tag, and for other nodes it's something like "#text",
|
||||
* "#comment", "#document", etc.
|
||||
*/
|
||||
nsIAtom* Tag() const
|
||||
{
|
||||
return mNodeInfo->NameAtom();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the NodeInfo for this element
|
||||
* @return the nodes node info
|
||||
*/
|
||||
nsINodeInfo* NodeInfo() const
|
||||
{
|
||||
return mNodeInfo;
|
||||
}
|
||||
|
||||
bool IsInNamespace(PRInt32 aNamespace) const
|
||||
{
|
||||
return mNodeInfo->NamespaceID() == aNamespace;
|
||||
}
|
||||
|
||||
bool IsHTML() const
|
||||
{
|
||||
return IsInNamespace(kNameSpaceID_XHTML);
|
||||
}
|
||||
|
||||
bool IsHTML(nsIAtom* aTag) const
|
||||
{
|
||||
return mNodeInfo->Equals(aTag, kNameSpaceID_XHTML);
|
||||
}
|
||||
|
||||
bool IsSVG() const
|
||||
{
|
||||
return IsInNamespace(kNameSpaceID_SVG);
|
||||
}
|
||||
|
||||
bool IsSVG(nsIAtom* aTag) const
|
||||
{
|
||||
return mNodeInfo->Equals(aTag, kNameSpaceID_SVG);
|
||||
}
|
||||
|
||||
bool IsXUL() const
|
||||
{
|
||||
return IsInNamespace(kNameSpaceID_XUL);
|
||||
}
|
||||
|
||||
bool IsMathML() const
|
||||
{
|
||||
return IsInNamespace(kNameSpaceID_MathML);
|
||||
}
|
||||
|
||||
bool IsMathML(nsIAtom* aTag) const
|
||||
{
|
||||
return mNodeInfo->Equals(aTag, kNameSpaceID_MathML);
|
||||
}
|
||||
|
||||
nsINode*
|
||||
InsertBefore(nsINode *aNewChild, nsINode *aRefChild, nsresult *aReturn)
|
||||
{
|
||||
|
|
|
@ -9,12 +9,13 @@
|
|||
#include "nsString.h"
|
||||
#include "mozIThirdPartyUtil.h"
|
||||
#include "nsIEffectiveTLDService.h"
|
||||
#include "mozilla/Attributes.h"
|
||||
|
||||
class nsIURI;
|
||||
class nsIChannel;
|
||||
class nsIDOMWindow;
|
||||
|
||||
class ThirdPartyUtil : public mozIThirdPartyUtil
|
||||
class ThirdPartyUtil MOZ_FINAL : public mozIThirdPartyUtil
|
||||
{
|
||||
public:
|
||||
NS_DECL_ISUPPORTS
|
||||
|
|
|
@ -5,10 +5,11 @@
|
|||
|
||||
#include "nsIObserver.h"
|
||||
#include "nsCycleCollectionParticipant.h"
|
||||
#include "mozilla/Attributes.h"
|
||||
|
||||
struct JSTracer;
|
||||
|
||||
class nsCCUncollectableMarker : public nsIObserver
|
||||
class nsCCUncollectableMarker MOZ_FINAL : public nsIObserver
|
||||
{
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_NSIOBSERVER
|
||||
|
|
|
@ -181,6 +181,7 @@ static NS_DEFINE_CID(kXTFServiceCID, NS_XTFSERVICE_CID);
|
|||
#include "nsICharsetDetector.h"
|
||||
#include "nsICharsetDetectionObserver.h"
|
||||
#include "nsIPlatformCharset.h"
|
||||
#include "mozilla/Attributes.h"
|
||||
|
||||
extern "C" int MOZ_XMLTranslateEntity(const char* ptr, const char* end,
|
||||
const char** next, PRUnichar* result);
|
||||
|
@ -307,15 +308,15 @@ EventListenerManagerHashClearEntry(PLDHashTable *table, PLDHashEntryHdr *entry)
|
|||
lm->~EventListenerManagerMapEntry();
|
||||
}
|
||||
|
||||
class SameOriginChecker : public nsIChannelEventSink,
|
||||
public nsIInterfaceRequestor
|
||||
class SameOriginChecker MOZ_FINAL : public nsIChannelEventSink,
|
||||
public nsIInterfaceRequestor
|
||||
{
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_NSICHANNELEVENTSINK
|
||||
NS_DECL_NSIINTERFACEREQUESTOR
|
||||
};
|
||||
|
||||
class CharsetDetectionObserver : public nsICharsetDetectionObserver
|
||||
class CharsetDetectionObserver MOZ_FINAL : public nsICharsetDetectionObserver
|
||||
{
|
||||
public:
|
||||
NS_DECL_ISUPPORTS
|
||||
|
|
|
@ -809,9 +809,9 @@ nsCORSListenerProxy::UpdateChannel(nsIChannel* aChannel, bool aAllowDataURI)
|
|||
|
||||
// Class used as streamlistener and notification callback when
|
||||
// doing the initial OPTIONS request for a CORS check
|
||||
class nsCORSPreflightListener : public nsIStreamListener,
|
||||
public nsIInterfaceRequestor,
|
||||
public nsIChannelEventSink
|
||||
class nsCORSPreflightListener MOZ_FINAL : public nsIStreamListener,
|
||||
public nsIInterfaceRequestor,
|
||||
public nsIChannelEventSink
|
||||
{
|
||||
public:
|
||||
nsCORSPreflightListener(nsIChannel* aOuterChannel,
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
#include "nsIInterfaceRequestor.h"
|
||||
#include "nsIChannelEventSink.h"
|
||||
#include "nsIAsyncVerifyRedirectCallback.h"
|
||||
#include "mozilla/Attributes.h"
|
||||
|
||||
class nsIURI;
|
||||
class nsIParser;
|
||||
|
@ -31,10 +32,10 @@ NS_StartCORSPreflight(nsIChannel* aRequestChannel,
|
|||
nsTArray<nsCString>& aACUnsafeHeaders,
|
||||
nsIChannel** aPreflightChannel);
|
||||
|
||||
class nsCORSListenerProxy : public nsIStreamListener,
|
||||
public nsIInterfaceRequestor,
|
||||
public nsIChannelEventSink,
|
||||
public nsIAsyncVerifyRedirectCallback
|
||||
class nsCORSListenerProxy MOZ_FINAL : public nsIStreamListener,
|
||||
public nsIInterfaceRequestor,
|
||||
public nsIChannelEventSink,
|
||||
public nsIAsyncVerifyRedirectCallback
|
||||
{
|
||||
public:
|
||||
nsCORSListenerProxy(nsIStreamListener* aOuter,
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
#include "nsDOMFile.h"
|
||||
|
||||
#include "mozilla/CheckedInt.h"
|
||||
#include "mozilla/Attributes.h"
|
||||
|
||||
using namespace mozilla;
|
||||
|
||||
|
@ -141,8 +142,8 @@ protected:
|
|||
PRUint64 mDataBufferLen;
|
||||
};
|
||||
|
||||
class nsDOMBlobBuilder : public nsIDOMMozBlobBuilder,
|
||||
public nsIJSNativeInitializer
|
||||
class nsDOMBlobBuilder MOZ_FINAL : public nsIDOMMozBlobBuilder,
|
||||
public nsIJSNativeInitializer
|
||||
{
|
||||
public:
|
||||
nsDOMBlobBuilder()
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
#include "nsJSUtils.h"
|
||||
#include "mozilla/CheckedInt.h"
|
||||
#include "mozilla/Preferences.h"
|
||||
#include "mozilla/Attributes.h"
|
||||
|
||||
#include "plbase64.h"
|
||||
#include "prmem.h"
|
||||
|
@ -44,8 +45,8 @@ using namespace mozilla::dom;
|
|||
// ensure that the buffer underlying the stream we get
|
||||
// from NS_NewByteInputStream is held alive as long as the
|
||||
// stream is. We do that by passing back this class instead.
|
||||
class DataOwnerAdapter : public nsIInputStream,
|
||||
public nsISeekableStream
|
||||
class DataOwnerAdapter MOZ_FINAL : public nsIInputStream,
|
||||
public nsISeekableStream
|
||||
{
|
||||
typedef nsDOMMemoryFile::DataOwner DataOwner;
|
||||
public:
|
||||
|
|
|
@ -44,7 +44,7 @@ public:
|
|||
}
|
||||
|
||||
protected:
|
||||
~nsDOMTokenList();
|
||||
virtual ~nsDOMTokenList();
|
||||
|
||||
nsresult CheckToken(const nsAString& aStr);
|
||||
void AddInternal(const nsAttrValue* aAttr, const nsAString& aToken);
|
||||
|
|
|
@ -20,8 +20,9 @@
|
|||
|
||||
|
||||
#include "nsIContentPolicy.h"
|
||||
#include "mozilla/Attributes.h"
|
||||
|
||||
class nsDataDocumentContentPolicy : public nsIContentPolicy
|
||||
class nsDataDocumentContentPolicy MOZ_FINAL : public nsIContentPolicy
|
||||
{
|
||||
public:
|
||||
NS_DECL_ISUPPORTS
|
||||
|
|
|
@ -1169,8 +1169,7 @@ nsExternalResourceMap::ExternalResource::~ExternalResource()
|
|||
// If we ever have an nsIDocumentObserver notification for stylesheet title
|
||||
// changes, we could make this inherit from nsDOMStringList instead of
|
||||
// reimplementing nsIDOMDOMStringList.
|
||||
class nsDOMStyleSheetSetList : public nsIDOMDOMStringList
|
||||
|
||||
class nsDOMStyleSheetSetList MOZ_FINAL : public nsIDOMDOMStringList
|
||||
{
|
||||
public:
|
||||
NS_DECL_ISUPPORTS
|
||||
|
@ -7687,7 +7686,7 @@ namespace {
|
|||
* Stub for LoadSheet(), since all we want is to get the sheet into
|
||||
* the CSSLoader's style cache
|
||||
*/
|
||||
class StubCSSLoaderObserver : public nsICSSLoaderObserver {
|
||||
class StubCSSLoaderObserver MOZ_FINAL : public nsICSSLoaderObserver {
|
||||
public:
|
||||
NS_IMETHOD
|
||||
StyleSheetLoaded(nsCSSStyleSheet*, bool, nsresult)
|
||||
|
|
|
@ -68,6 +68,7 @@
|
|||
#include "nsIInlineEventHandlers.h"
|
||||
#include "nsDataHashtable.h"
|
||||
#include "mozilla/TimeStamp.h"
|
||||
#include "mozilla/Attributes.h"
|
||||
|
||||
#define XML_DECLARATION_BITS_DECLARATION_EXISTS (1 << 0)
|
||||
#define XML_DECLARATION_BITS_ENCODING_EXISTS (1 << 1)
|
||||
|
@ -286,7 +287,7 @@ protected:
|
|||
nsIDocument* mDocument;
|
||||
};
|
||||
|
||||
class nsOnloadBlocker : public nsIRequest
|
||||
class nsOnloadBlocker MOZ_FINAL : public nsIRequest
|
||||
{
|
||||
public:
|
||||
nsOnloadBlocker() {}
|
||||
|
@ -388,7 +389,7 @@ protected:
|
|||
};
|
||||
friend class PendingLoad;
|
||||
|
||||
class LoadgroupCallbacks : public nsIInterfaceRequestor
|
||||
class LoadgroupCallbacks MOZ_FINAL : public nsIInterfaceRequestor
|
||||
{
|
||||
public:
|
||||
LoadgroupCallbacks(nsIInterfaceRequestor* aOtherCallbacks)
|
||||
|
@ -409,8 +410,8 @@ protected:
|
|||
|
||||
// XXXbz I wish we could just derive the _allcaps thing from _i
|
||||
#define DECL_SHIM(_i, _allcaps) \
|
||||
class _i##Shim : public nsIInterfaceRequestor, \
|
||||
public _i \
|
||||
class _i##Shim MOZ_FINAL : public nsIInterfaceRequestor, \
|
||||
public _i \
|
||||
{ \
|
||||
public: \
|
||||
_i##Shim(nsIInterfaceRequestor* aIfreq, _i* aRealPtr) \
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
#include "nsCrossSiteListenerProxy.h"
|
||||
#include "nsWrapperCacheInlines.h"
|
||||
#include "nsDOMEventTargetHelper.h"
|
||||
#include "mozilla/Attributes.h"
|
||||
|
||||
using namespace mozilla;
|
||||
|
||||
|
@ -638,7 +639,7 @@ nsEventSource::OnStopRequest(nsIRequest *aRequest,
|
|||
* Simple helper class that just forwards the redirect callback back
|
||||
* to the nsEventSource.
|
||||
*/
|
||||
class AsyncVerifyRedirectCallbackFwr : public nsIAsyncVerifyRedirectCallback
|
||||
class AsyncVerifyRedirectCallbackFwr MOZ_FINAL : public nsIAsyncVerifyRedirectCallback
|
||||
{
|
||||
public:
|
||||
AsyncVerifyRedirectCallbackFwr(nsEventSource* aEventsource)
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
#include "nsFrameMessageManager.h"
|
||||
#include "Layers.h"
|
||||
#include "mozilla/dom/Element.h"
|
||||
#include "mozilla/Attributes.h"
|
||||
|
||||
class nsIURI;
|
||||
class nsSubDocumentFrame;
|
||||
|
@ -56,7 +57,7 @@ class QX11EmbedContainer;
|
|||
* Used to support asynchronous re-paints of content pixels; see
|
||||
* nsIContentView.
|
||||
*/
|
||||
class nsContentView : public nsIContentView
|
||||
class nsContentView MOZ_FINAL : public nsIContentView
|
||||
{
|
||||
public:
|
||||
typedef mozilla::layers::FrameMetrics::ViewID ViewID;
|
||||
|
@ -133,8 +134,8 @@ private:
|
|||
};
|
||||
|
||||
|
||||
class nsFrameLoader : public nsIFrameLoader,
|
||||
public nsIContentViewManager
|
||||
class nsFrameLoader MOZ_FINAL : public nsIFrameLoader,
|
||||
public nsIContentViewManager
|
||||
{
|
||||
friend class AutoResetInShow;
|
||||
typedef mozilla::dom::PBrowserParent PBrowserParent;
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
#include "mozilla/Services.h"
|
||||
#include "nsIObserverService.h"
|
||||
#include "nsThreadUtils.h"
|
||||
#include "mozilla/Attributes.h"
|
||||
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
|
@ -46,8 +47,8 @@ typedef bool (*nsAsyncMessageCallback)(void* aCallbackData,
|
|||
const nsAString& aMessage,
|
||||
const nsAString& aJSON);
|
||||
|
||||
class nsFrameMessageManager : public nsIContentFrameMessageManager,
|
||||
public nsIChromeFrameMessageManager
|
||||
class nsFrameMessageManager MOZ_FINAL : public nsIContentFrameMessageManager,
|
||||
public nsIChromeFrameMessageManager
|
||||
{
|
||||
public:
|
||||
nsFrameMessageManager(bool aChrome,
|
||||
|
@ -236,7 +237,7 @@ public:
|
|||
nsFrameScriptExecutor* mExec;
|
||||
};
|
||||
|
||||
class nsScriptCacheCleaner : public nsIObserver
|
||||
class nsScriptCacheCleaner MOZ_FINAL : public nsIObserver
|
||||
{
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
|
|
|
@ -34,6 +34,7 @@
|
|||
#include "nsIDOMTouchEvent.h"
|
||||
#include "nsIInlineEventHandlers.h"
|
||||
#include "mozilla/CORSMode.h"
|
||||
#include "mozilla/Attributes.h"
|
||||
|
||||
#include "nsISMILAttr.h"
|
||||
|
||||
|
@ -62,7 +63,7 @@ typedef PRUptrdiff PtrBits;
|
|||
* and Item to its existing child list.
|
||||
* @see nsIDOMNodeList
|
||||
*/
|
||||
class nsChildContentList : public nsINodeList
|
||||
class nsChildContentList MOZ_FINAL : public nsINodeList
|
||||
{
|
||||
public:
|
||||
nsChildContentList(nsINode* aNode)
|
||||
|
@ -126,7 +127,7 @@ private:
|
|||
* A class that implements nsIWeakReference
|
||||
*/
|
||||
|
||||
class nsNodeWeakReference : public nsIWeakReference
|
||||
class nsNodeWeakReference MOZ_FINAL : public nsIWeakReference
|
||||
{
|
||||
public:
|
||||
nsNodeWeakReference(nsINode* aNode)
|
||||
|
@ -154,7 +155,7 @@ private:
|
|||
/**
|
||||
* Tearoff to use for nodes to implement nsISupportsWeakReference
|
||||
*/
|
||||
class nsNodeSupportsWeakRefTearoff : public nsISupportsWeakReference
|
||||
class nsNodeSupportsWeakRefTearoff MOZ_FINAL : public nsISupportsWeakReference
|
||||
{
|
||||
public:
|
||||
nsNodeSupportsWeakRefTearoff(nsINode* aNode)
|
||||
|
@ -177,7 +178,7 @@ private:
|
|||
/**
|
||||
* A tearoff class for nsGenericElement to implement NodeSelector
|
||||
*/
|
||||
class nsNodeSelectorTearoff : public nsIDOMNodeSelector
|
||||
class nsNodeSelectorTearoff MOZ_FINAL : public nsIDOMNodeSelector
|
||||
{
|
||||
public:
|
||||
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
|
||||
|
@ -1038,7 +1039,7 @@ _elementName::Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const \
|
|||
/**
|
||||
* Tearoff class to implement nsITouchEventReceiver
|
||||
*/
|
||||
class nsTouchEventReceiverTearoff : public nsITouchEventReceiver
|
||||
class nsTouchEventReceiverTearoff MOZ_FINAL : public nsITouchEventReceiver
|
||||
{
|
||||
public:
|
||||
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
|
||||
|
@ -1058,7 +1059,7 @@ private:
|
|||
/**
|
||||
* Tearoff class to implement nsIInlineEventHandlers
|
||||
*/
|
||||
class nsInlineEventHandlersTearoff : public nsIInlineEventHandlers
|
||||
class nsInlineEventHandlersTearoff MOZ_FINAL : public nsIInlineEventHandlers
|
||||
{
|
||||
public:
|
||||
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
|
||||
|
|
|
@ -14,12 +14,13 @@
|
|||
#include "nsAttrAndChildArray.h"
|
||||
#include "nsMappedAttributeElement.h"
|
||||
#include "nsIStyleRule.h"
|
||||
#include "mozilla/Attributes.h"
|
||||
|
||||
class nsIAtom;
|
||||
class nsHTMLStyleSheet;
|
||||
class nsRuleWalker;
|
||||
|
||||
class nsMappedAttributes : public nsIStyleRule
|
||||
class nsMappedAttributes MOZ_FINAL : public nsIStyleRule
|
||||
{
|
||||
public:
|
||||
nsMappedAttributes(nsHTMLStyleSheet* aSheet,
|
||||
|
|
|
@ -20,8 +20,9 @@
|
|||
|
||||
|
||||
#include "nsIContentPolicy.h"
|
||||
#include "mozilla/Attributes.h"
|
||||
|
||||
class nsNoDataProtocolContentPolicy : public nsIContentPolicy
|
||||
class nsNoDataProtocolContentPolicy MOZ_FINAL : public nsIContentPolicy
|
||||
{
|
||||
public:
|
||||
NS_DECL_ISUPPORTS
|
||||
|
|
|
@ -2081,28 +2081,29 @@ nsRange::InsertNode(nsIDOMNode* aNode)
|
|||
NS_ENSURE_SUCCESS(res, res);
|
||||
}
|
||||
|
||||
// We might need to update the end to include the new node (bug 433662)
|
||||
// We might need to update the end to include the new node (bug 433662).
|
||||
// Ideally we'd only do this if needed, but it's tricky to know when it's
|
||||
// needed in advance (bug 765799).
|
||||
PRInt32 newOffset;
|
||||
|
||||
if (Collapsed()) {
|
||||
if (referenceNode) {
|
||||
newOffset = IndexOf(referenceNode);
|
||||
} else {
|
||||
PRUint32 length;
|
||||
res = tChildList->GetLength(&length);
|
||||
NS_ENSURE_SUCCESS(res, res);
|
||||
newOffset = length;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsINode> node = do_QueryInterface(aNode);
|
||||
NS_ENSURE_STATE(node);
|
||||
if (node->NodeType() == nsIDOMNode::DOCUMENT_FRAGMENT_NODE) {
|
||||
newOffset += node->GetChildCount();
|
||||
} else {
|
||||
newOffset++;
|
||||
}
|
||||
if (referenceNode) {
|
||||
newOffset = IndexOf(referenceNode);
|
||||
} else {
|
||||
PRUint32 length;
|
||||
res = tChildList->GetLength(&length);
|
||||
NS_ENSURE_SUCCESS(res, res);
|
||||
newOffset = length;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsINode> node = do_QueryInterface(aNode);
|
||||
NS_ENSURE_STATE(node);
|
||||
if (node->NodeType() == nsIDOMNode::DOCUMENT_FRAGMENT_NODE) {
|
||||
newOffset += node->GetChildCount();
|
||||
} else {
|
||||
newOffset++;
|
||||
}
|
||||
|
||||
// Now actually insert the node
|
||||
nsCOMPtr<nsIDOMNode> tResultNode;
|
||||
res = referenceParentNode->InsertBefore(aNode, referenceNode, getter_AddRefs(tResultNode));
|
||||
NS_ENSURE_SUCCESS(res, res);
|
||||
|
|
|
@ -45,6 +45,7 @@
|
|||
|
||||
#include "mozilla/FunctionTimer.h"
|
||||
#include "mozilla/CORSMode.h"
|
||||
#include "mozilla/Attributes.h"
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
static PRLogModuleInfo* gCspPRLog;
|
||||
|
@ -57,7 +58,7 @@ using namespace mozilla::dom;
|
|||
// Per-request data structure
|
||||
//////////////////////////////////////////////////////////////
|
||||
|
||||
class nsScriptLoadRequest : public nsISupports {
|
||||
class nsScriptLoadRequest MOZ_FINAL : public nsISupports {
|
||||
public:
|
||||
nsScriptLoadRequest(nsIScriptElement* aElement,
|
||||
PRUint32 aVersion,
|
||||
|
|
|
@ -76,6 +76,7 @@
|
|||
#include "mozilla/dom/XMLHttpRequestBinding.h"
|
||||
#include "nsIDOMFormData.h"
|
||||
#include "DictionaryHelpers.h"
|
||||
#include "mozilla/Attributes.h"
|
||||
|
||||
#include "nsWrapperCacheInlines.h"
|
||||
#include "nsStreamListenerWrapper.h"
|
||||
|
@ -3546,7 +3547,7 @@ nsXMLHttpRequest::ChangeState(PRUint32 aState, bool aBroadcast)
|
|||
* Simple helper class that just forwards the redirect callback back
|
||||
* to the nsXMLHttpRequest.
|
||||
*/
|
||||
class AsyncVerifyRedirectCallbackForwarder : public nsIAsyncVerifyRedirectCallback
|
||||
class AsyncVerifyRedirectCallbackForwarder MOZ_FINAL : public nsIAsyncVerifyRedirectCallback
|
||||
{
|
||||
public:
|
||||
AsyncVerifyRedirectCallbackForwarder(nsXMLHttpRequest *xhr)
|
||||
|
|
|
@ -50,6 +50,10 @@ public:
|
|||
{
|
||||
mCanvasElement = aParentCanvas;
|
||||
}
|
||||
nsHTMLCanvasElement* GetParentObject() const
|
||||
{
|
||||
return mCanvasElement;
|
||||
}
|
||||
|
||||
// Sets the dimensions of the canvas, in pixels. Called
|
||||
// whenever the size of the element changes.
|
||||
|
|
|
@ -9,22 +9,6 @@
|
|||
|
||||
#include "mozilla/dom/ImageData.h"
|
||||
|
||||
static bool
|
||||
GetPositiveInt(JSContext* cx, JSObject& obj, const char* name, uint32_t* out)
|
||||
{
|
||||
JS::Value temp;
|
||||
int32_t signedInt;
|
||||
if (!JS_GetProperty(cx, &obj, name, &temp) ||
|
||||
!JS_ValueToECMAInt32(cx, temp, &signedInt)) {
|
||||
return false;
|
||||
}
|
||||
if (signedInt <= 0) {
|
||||
return xpc_qsThrow(cx, NS_ERROR_DOM_TYPE_MISMATCH_ERR);
|
||||
}
|
||||
*out = uint32_t(signedInt);
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool
|
||||
GetImageData(JSContext* cx, JS::Value& imageData,
|
||||
uint32_t* width, uint32_t* height, JS::Anchor<JSObject*>* array)
|
||||
|
@ -35,34 +19,17 @@ GetImageData(JSContext* cx, JS::Value& imageData,
|
|||
|
||||
nsIDOMImageData* domImageData;
|
||||
xpc_qsSelfRef imageDataRef;
|
||||
if (NS_SUCCEEDED(xpc_qsUnwrapArg<nsIDOMImageData>(cx, imageData,
|
||||
&domImageData,
|
||||
&imageDataRef.ptr,
|
||||
&imageData))) {
|
||||
mozilla::dom::ImageData* concreteImageData =
|
||||
static_cast<mozilla::dom::ImageData*>(domImageData);
|
||||
*width = concreteImageData->GetWidth();
|
||||
*height = concreteImageData->GetHeight();
|
||||
array->set(concreteImageData->GetDataObject());
|
||||
return true;
|
||||
nsresult rv = xpc_qsUnwrapArg<nsIDOMImageData>(cx, imageData, &domImageData,
|
||||
&imageDataRef.ptr, &imageData);
|
||||
if (NS_FAILED(rv)) {
|
||||
return xpc_qsThrow(cx, rv);
|
||||
}
|
||||
|
||||
// TODO - bug 625804: Remove support for duck-typed ImageData.
|
||||
JSObject& dataObject = imageData.toObject();
|
||||
|
||||
if (!GetPositiveInt(cx, dataObject, "width", width) ||
|
||||
!GetPositiveInt(cx, dataObject, "height", height)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
JS::Value temp;
|
||||
if (!JS_GetProperty(cx, &dataObject, "data", &temp)) {
|
||||
return false;
|
||||
}
|
||||
if (!temp.isObject()) {
|
||||
return xpc_qsThrow(cx, NS_ERROR_DOM_TYPE_MISMATCH_ERR);
|
||||
}
|
||||
array->set(&temp.toObject());
|
||||
mozilla::dom::ImageData* concreteImageData =
|
||||
static_cast<mozilla::dom::ImageData*>(domImageData);
|
||||
*width = concreteImageData->GetWidth();
|
||||
*height = concreteImageData->GetHeight();
|
||||
array->set(concreteImageData->GetDataObject());
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -1240,7 +1240,8 @@ NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(WebGLContext)
|
|||
NS_INTERFACE_MAP_ENTRY(nsITimerCallback)
|
||||
// If the exact way we cast to nsISupports here ever changes, fix our
|
||||
// PreCreate hook!
|
||||
NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIDOMWebGLRenderingContext)
|
||||
NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports,
|
||||
nsICanvasRenderingContextInternal)
|
||||
NS_DOM_INTERFACE_MAP_ENTRY_CLASSINFO(WebGLRenderingContext)
|
||||
NS_INTERFACE_MAP_END
|
||||
|
||||
|
|
|
@ -482,10 +482,6 @@ public:
|
|||
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS_AMBIGUOUS(WebGLContext,
|
||||
nsIDOMWebGLRenderingContext)
|
||||
|
||||
nsINode* GetParentObject() {
|
||||
return mCanvasElement;
|
||||
}
|
||||
|
||||
virtual JSObject* WrapObject(JSContext *cx, JSObject *scope,
|
||||
bool *triedToWrap);
|
||||
|
||||
|
|
|
@ -595,9 +595,8 @@ protected:
|
|||
* Gets the pres shell from either the canvas element or the doc shell
|
||||
*/
|
||||
nsIPresShell *GetPresShell() {
|
||||
nsCOMPtr<nsIContent> content = do_QueryObject(mCanvasElement);
|
||||
if (content) {
|
||||
return content->OwnerDoc()->GetShell();
|
||||
if (mCanvasElement) {
|
||||
return mCanvasElement->OwnerDoc()->GetShell();
|
||||
}
|
||||
if (mDocShell) {
|
||||
nsCOMPtr<nsIPresShell> shell;
|
||||
|
@ -772,7 +771,8 @@ DOMCI_DATA(CanvasRenderingContext2D, nsCanvasRenderingContext2D)
|
|||
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(nsCanvasRenderingContext2D)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIDOMCanvasRenderingContext2D)
|
||||
NS_INTERFACE_MAP_ENTRY(nsICanvasRenderingContextInternal)
|
||||
NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIDOMCanvasRenderingContext2D)
|
||||
NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports,
|
||||
nsICanvasRenderingContextInternal)
|
||||
NS_DOM_INTERFACE_MAP_ENTRY_CLASSINFO(CanvasRenderingContext2D)
|
||||
NS_INTERFACE_MAP_END
|
||||
|
||||
|
@ -1177,10 +1177,9 @@ nsCanvasRenderingContext2D::EnsureSurface()
|
|||
gfxASurface::gfxImageFormat format = GetImageFormat();
|
||||
|
||||
if (!PR_GetEnv("MOZ_CANVAS_IMAGE_SURFACE")) {
|
||||
nsCOMPtr<nsIContent> content = do_QueryObject(mCanvasElement);
|
||||
nsIDocument* ownerDoc = nsnull;
|
||||
if (content)
|
||||
ownerDoc = content->OwnerDoc();
|
||||
if (mCanvasElement)
|
||||
ownerDoc = mCanvasElement->OwnerDoc();
|
||||
nsRefPtr<LayerManager> layerManager = nsnull;
|
||||
|
||||
if (ownerDoc)
|
||||
|
|
|
@ -89,6 +89,8 @@
|
|||
#include "mozilla/ipc/PDocumentRendererParent.h"
|
||||
#include "mozilla/Preferences.h"
|
||||
#include "mozilla/unused.h"
|
||||
#include "nsCCUncollectableMarker.h"
|
||||
#include "nsWrapperCacheInlines.h"
|
||||
|
||||
#ifdef XP_WIN
|
||||
#include "gfxWindowsPlatform.h"
|
||||
|
@ -364,7 +366,8 @@ static const Float SIGMA_MAX = 100;
|
|||
**/
|
||||
class nsCanvasRenderingContext2DAzure :
|
||||
public nsIDOMCanvasRenderingContext2D,
|
||||
public nsICanvasRenderingContextInternal
|
||||
public nsICanvasRenderingContextInternal,
|
||||
public nsWrapperCache
|
||||
{
|
||||
public:
|
||||
nsCanvasRenderingContext2DAzure();
|
||||
|
@ -405,7 +408,8 @@ public:
|
|||
// nsISupports interface + CC
|
||||
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
|
||||
|
||||
NS_DECL_CYCLE_COLLECTION_CLASS_AMBIGUOUS(nsCanvasRenderingContext2DAzure, nsIDOMCanvasRenderingContext2D)
|
||||
NS_DECL_CYCLE_COLLECTION_SKIPPABLE_SCRIPT_HOLDER_CLASS_AMBIGUOUS(
|
||||
nsCanvasRenderingContext2DAzure, nsIDOMCanvasRenderingContext2D)
|
||||
|
||||
// nsIDOMCanvasRenderingContext2D interface
|
||||
NS_DECL_NSIDOMCANVASRENDERINGCONTEXT2D
|
||||
|
@ -586,9 +590,8 @@ protected:
|
|||
* Gets the pres shell from either the canvas element or the doc shell
|
||||
*/
|
||||
nsIPresShell *GetPresShell() {
|
||||
nsCOMPtr<nsIContent> content = do_QueryObject(mCanvasElement);
|
||||
if (content) {
|
||||
return content->OwnerDoc()->GetShell();
|
||||
if (mCanvasElement) {
|
||||
return mCanvasElement->OwnerDoc()->GetShell();
|
||||
}
|
||||
if (mDocShell) {
|
||||
nsCOMPtr<nsIPresShell> shell;
|
||||
|
@ -938,18 +941,46 @@ NS_IMPL_CYCLE_COLLECTING_RELEASE(nsCanvasRenderingContext2DAzure)
|
|||
NS_IMPL_CYCLE_COLLECTION_CLASS(nsCanvasRenderingContext2DAzure)
|
||||
NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(nsCanvasRenderingContext2DAzure)
|
||||
NS_IMPL_CYCLE_COLLECTION_UNLINK_NSCOMPTR(mCanvasElement)
|
||||
NS_IMPL_CYCLE_COLLECTION_UNLINK_PRESERVED_WRAPPER
|
||||
NS_IMPL_CYCLE_COLLECTION_UNLINK_END
|
||||
NS_IMPL_CYCLE_COLLECTION_TRACE_BEGIN(nsCanvasRenderingContext2DAzure)
|
||||
NS_IMPL_CYCLE_COLLECTION_TRACE_PRESERVED_WRAPPER
|
||||
NS_IMPL_CYCLE_COLLECTION_TRACE_END
|
||||
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN(nsCanvasRenderingContext2DAzure)
|
||||
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_NSCOMPTR_AMBIGUOUS(mCanvasElement, nsINode)
|
||||
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_SCRIPT_OBJECTS
|
||||
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
|
||||
|
||||
NS_IMPL_CYCLE_COLLECTION_CAN_SKIP_BEGIN(nsCanvasRenderingContext2DAzure)
|
||||
if (nsCCUncollectableMarker::sGeneration && tmp->IsBlack()) {
|
||||
nsGenericElement* canvasElement = tmp->mCanvasElement;
|
||||
if (canvasElement) {
|
||||
if (canvasElement->IsPurple()) {
|
||||
canvasElement->RemovePurple();
|
||||
}
|
||||
nsGenericElement::MarkNodeChildren(canvasElement);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
NS_IMPL_CYCLE_COLLECTION_CAN_SKIP_END
|
||||
|
||||
NS_IMPL_CYCLE_COLLECTION_CAN_SKIP_IN_CC_BEGIN(nsCanvasRenderingContext2DAzure)
|
||||
return nsCCUncollectableMarker::sGeneration && tmp->IsBlack();
|
||||
NS_IMPL_CYCLE_COLLECTION_CAN_SKIP_IN_CC_END
|
||||
|
||||
NS_IMPL_CYCLE_COLLECTION_CAN_SKIP_THIS_BEGIN(nsCanvasRenderingContext2DAzure)
|
||||
return nsCCUncollectableMarker::sGeneration && tmp->IsBlack();
|
||||
NS_IMPL_CYCLE_COLLECTION_CAN_SKIP_THIS_END
|
||||
|
||||
// XXX
|
||||
// DOMCI_DATA(CanvasRenderingContext2D, nsCanvasRenderingContext2DAzure)
|
||||
|
||||
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(nsCanvasRenderingContext2DAzure)
|
||||
NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
|
||||
NS_INTERFACE_MAP_ENTRY(nsIDOMCanvasRenderingContext2D)
|
||||
NS_INTERFACE_MAP_ENTRY(nsICanvasRenderingContextInternal)
|
||||
NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIDOMCanvasRenderingContext2D)
|
||||
NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports,
|
||||
nsICanvasRenderingContextInternal)
|
||||
NS_DOM_INTERFACE_MAP_ENTRY_CLASSINFO(CanvasRenderingContext2D)
|
||||
NS_INTERFACE_MAP_END
|
||||
|
||||
|
@ -1241,10 +1272,9 @@ nsCanvasRenderingContext2DAzure::SetDimensions(PRInt32 width, PRInt32 height)
|
|||
if (size.width <= 0xFFFF && size.height <= 0xFFFF &&
|
||||
size.width >= 0 && size.height >= 0) {
|
||||
SurfaceFormat format = GetSurfaceFormat();
|
||||
nsCOMPtr<nsIContent> content = do_QueryObject(mCanvasElement);
|
||||
nsIDocument* ownerDoc = nsnull;
|
||||
if (content) {
|
||||
ownerDoc = content->OwnerDoc();
|
||||
if (mCanvasElement) {
|
||||
ownerDoc = mCanvasElement->OwnerDoc();
|
||||
}
|
||||
|
||||
nsRefPtr<LayerManager> layerManager = nsnull;
|
||||
|
|
|
@ -32,18 +32,8 @@ try {
|
|||
threw = true;
|
||||
}
|
||||
|
||||
is(threw, false, "Should be able to pass in custom imagedata objects with array data");
|
||||
|
||||
threw = false;
|
||||
try {
|
||||
c.putImageData({ width: 1, height: 1, data: null }, 0, 0);
|
||||
threw = false;
|
||||
} catch(e) {
|
||||
threw = e.name;
|
||||
}
|
||||
|
||||
is(threw, "TypeMismatchError",
|
||||
"Should throw TypeMismatchError when data is not an array");
|
||||
ok(threw,
|
||||
"Should not be able to pass in custom imagedata objects with array data");
|
||||
|
||||
</script>
|
||||
</pre>
|
||||
|
|
|
@ -3521,7 +3521,7 @@ var ctx = canvas.getContext('2d');
|
|||
|
||||
var _thrown = undefined; try {
|
||||
ctx.drawImage(null, 0, 0);
|
||||
} catch (e) { _thrown = e }; ok(_thrown && _thrown.name == "TypeMismatchError" && _thrown.code == DOMException.TYPE_MISMATCH_ERR, "should throw TypeMismatchError");
|
||||
} catch (e) { _thrown = e }; todo(_thrown && _thrown.name == "TypeError", "should throw TypeError");
|
||||
|
||||
|
||||
}
|
||||
|
@ -3693,23 +3693,21 @@ isPixel(ctx, 50,25, 0,255,0,255, 2);
|
|||
|
||||
function test_2d_drawImage_wrongtype() {
|
||||
|
||||
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
|
||||
var canvas = document.getElementById('c127');
|
||||
var ctx = canvas.getContext('2d');
|
||||
|
||||
var _thrown = undefined; try {
|
||||
ctx.drawImage(undefined, 0, 0);
|
||||
} catch (e) { _thrown = e }; ok(_thrown && _thrown.name == "TypeMismatchError" && _thrown.code == DOMException.TYPE_MISMATCH_ERR, "should throw TypeMismatchError");
|
||||
} catch (e) { _thrown = e }; todo(_thrown && _thrown.name == "TypeError", "should throw TypeError");
|
||||
var _thrown = undefined; try {
|
||||
ctx.drawImage(0, 0, 0);
|
||||
} catch (e) { _thrown = e }; ok(_thrown && _thrown.result == Components.results.NS_ERROR_XPC_BAD_CONVERT_JS_ZERO_ISNOT_NULL, "should throw NS_ERROR_XPC_BAD_CONVERT_JS_ZERO_ISNOT_NULL");
|
||||
} catch (e) { _thrown = e }; todo(_thrown && _thrown.name == "TypeError", "should throw TypeError");
|
||||
var _thrown = undefined; try {
|
||||
ctx.drawImage("", 0, 0);
|
||||
} catch (e) { _thrown = e }; ok(_thrown && _thrown.result == Components.results.NS_ERROR_XPC_BAD_CONVERT_JS, "should throw NS_ERROR_XPC_BAD_CONVERT_JS");
|
||||
} catch (e) { _thrown = e }; todo(_thrown && _thrown.name == "TypeError", "should throw TypeError");
|
||||
var _thrown = undefined; try {
|
||||
ctx.drawImage(document.createElement('p'), 0, 0);
|
||||
} catch (e) { _thrown = e }; todo(_thrown && _thrown.name == "TypeMismatchError" && _thrown.code == DOMException.TYPE_MISMATCH_ERR, "should throw TypeMismatchError");
|
||||
} catch (e) { _thrown = e }; todo(_thrown && _thrown.name == "TypeError", "should throw TypeError");
|
||||
|
||||
|
||||
}
|
||||
|
@ -9192,7 +9190,7 @@ var ctx = canvas.getContext('2d');
|
|||
|
||||
var _thrown = undefined; try {
|
||||
ctx.putImageData(null, 0, 0);
|
||||
} catch (e) { _thrown = e }; ok(_thrown && _thrown.name == "TypeMismatchError" && _thrown.code == DOMException.TYPE_MISMATCH_ERR, "should throw TypeMismatchError");
|
||||
} catch (e) { _thrown = e }; todo(_thrown && _thrown.name == "TypeError", "should throw TypeError");
|
||||
|
||||
|
||||
}
|
||||
|
@ -9304,13 +9302,13 @@ var ctx = canvas.getContext('2d');
|
|||
var imgdata = { width: 1, height: 1, data: [255, 0, 0, 255] };
|
||||
var _thrown = undefined; try {
|
||||
ctx.putImageData(imgdata, 0, 0);
|
||||
} catch (e) { _thrown = e }; todo(_thrown && _thrown.name == "TypeMismatchError" && _thrown.code == DOMException.TYPE_MISMATCH_ERR, "should throw TypeMismatchError");
|
||||
} catch (e) { _thrown = e }; todo(_thrown && _thrown.name == "TypeError", "should throw TypeError");
|
||||
var _thrown = undefined; try {
|
||||
ctx.putImageData("cheese", 0, 0);
|
||||
} catch (e) { _thrown = e }; ok(_thrown && _thrown.name == "TypeMismatchError" && _thrown.code == DOMException.TYPE_MISMATCH_ERR, "should throw TypeMismatchError");
|
||||
} catch (e) { _thrown = e }; todo(_thrown && _thrown.name == "TypeError", "should throw TypeError");
|
||||
var _thrown = undefined; try {
|
||||
ctx.putImageData(42, 0, 0);
|
||||
} catch (e) { _thrown = e }; ok(_thrown && _thrown.name == "TypeMismatchError" && _thrown.code == DOMException.TYPE_MISMATCH_ERR, "should throw TypeMismatchError");
|
||||
} catch (e) { _thrown = e }; todo(_thrown && _thrown.name == "TypeError", "should throw TypeError");
|
||||
|
||||
|
||||
}
|
||||
|
@ -15097,7 +15095,7 @@ var ctx = canvas.getContext('2d');
|
|||
|
||||
var _thrown = undefined; try {
|
||||
ctx.createPattern(null, 'repeat');
|
||||
} catch (e) { _thrown = e }; ok(_thrown && _thrown.name == "TypeMismatchError" && _thrown.code == DOMException.TYPE_MISMATCH_ERR, "should throw TypeMismatchError");
|
||||
} catch (e) { _thrown = e }; todo(_thrown && _thrown.name == "TypeError", "should throw TypeError");
|
||||
|
||||
|
||||
}
|
||||
|
@ -15116,7 +15114,7 @@ var ctx = canvas.getContext('2d');
|
|||
|
||||
var _thrown = undefined; try {
|
||||
ctx.createPattern('image_red.png', 'repeat');
|
||||
} catch (e) { _thrown = e }; todo(_thrown && _thrown.name == "TypeMismatchError" && _thrown.code == DOMException.TYPE_MISMATCH_ERR, "should throw TypeMismatchError");
|
||||
} catch (e) { _thrown = e }; todo(_thrown && _thrown.name == "TypeError", "should throw TypeError");
|
||||
|
||||
|
||||
}
|
||||
|
@ -15135,7 +15133,7 @@ var ctx = canvas.getContext('2d');
|
|||
|
||||
var _thrown = undefined; try {
|
||||
ctx.createPattern(undefined, 'repeat');
|
||||
} catch (e) { _thrown = e }; ok(_thrown && _thrown.name == "TypeMismatchError" && _thrown.code == DOMException.TYPE_MISMATCH_ERR, "should throw TypeMismatchError");
|
||||
} catch (e) { _thrown = e }; todo(_thrown && _thrown.name == "TypeError", "should throw TypeError");
|
||||
|
||||
|
||||
}
|
||||
|
@ -15977,17 +15975,9 @@ function test_2d_pattern_repeat_null() {
|
|||
var canvas = document.getElementById('c494');
|
||||
var ctx = canvas.getContext('2d');
|
||||
|
||||
ctx.fillStyle = '#f00';
|
||||
ctx.fillRect(0, 0, 100, 50);
|
||||
var img = document.getElementById('green-1x1_2.png');
|
||||
var pattern = ctx.createPattern(img, null);
|
||||
ctx.fillStyle = pattern;
|
||||
ctx.fillRect(0, 0, 100, 50);
|
||||
|
||||
isPixel(ctx, 1,1, 0,255,0,255, 0);
|
||||
isPixel(ctx, 98,1, 0,255,0,255, 0);
|
||||
isPixel(ctx, 1,48, 0,255,0,255, 0);
|
||||
isPixel(ctx, 98,48, 0,255,0,255, 0);
|
||||
var _thrown = undefined; try {
|
||||
ctx.createPattern(canvas, null);
|
||||
} catch (e) { _thrown = e }; ok(_thrown && _thrown.name == "SyntaxError" && _thrown.code == DOMException.SYNTAX_ERR, "should throw SyntaxError");
|
||||
|
||||
|
||||
}
|
||||
|
@ -19548,6 +19538,7 @@ function test_2d_type_prototype() {
|
|||
var canvas = document.getElementById('c611');
|
||||
var ctx = canvas.getContext('2d');
|
||||
|
||||
var fill = window.CanvasRenderingContext2D.prototype.fill;
|
||||
ok(window.CanvasRenderingContext2D.prototype, "window.CanvasRenderingContext2D.prototype");
|
||||
ok(window.CanvasRenderingContext2D.prototype.fill, "window.CanvasRenderingContext2D.prototype.fill");
|
||||
window.CanvasRenderingContext2D.prototype = null;
|
||||
|
@ -19559,7 +19550,8 @@ ok(window.CanvasRenderingContext2D.prototype.fill === 1, "window.CanvasRendering
|
|||
delete window.CanvasRenderingContext2D.prototype.fill;
|
||||
todo(window.CanvasRenderingContext2D.prototype.fill === undefined, "window.CanvasRenderingContext2D.prototype.fill === undefined");
|
||||
|
||||
|
||||
//restore the original method to ensure that other tests can run successfully
|
||||
window.CanvasRenderingContext2D.prototype.fill = fill;
|
||||
}
|
||||
</script>
|
||||
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
#include "nsAutoPtr.h"
|
||||
#include "nsIFile.h"
|
||||
#include "nsDOMFile.h"
|
||||
#include "mozilla/Attributes.h"
|
||||
|
||||
class nsITransferable;
|
||||
|
||||
|
@ -34,7 +35,7 @@ struct TransferItem {
|
|||
nsCOMPtr<nsIVariant> mData;
|
||||
};
|
||||
|
||||
class nsDOMDataTransfer : public nsIDOMDataTransfer
|
||||
class nsDOMDataTransfer MOZ_FINAL : public nsIDOMDataTransfer
|
||||
{
|
||||
public:
|
||||
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
|
||||
|
|
|
@ -7,8 +7,9 @@
|
|||
|
||||
#include "nsIDOMDeviceMotionEvent.h"
|
||||
#include "nsDOMEvent.h"
|
||||
#include "mozilla/Attributes.h"
|
||||
|
||||
class nsDOMDeviceRotationRate : public nsIDOMDeviceRotationRate
|
||||
class nsDOMDeviceRotationRate MOZ_FINAL : public nsIDOMDeviceRotationRate
|
||||
{
|
||||
public:
|
||||
NS_DECL_ISUPPORTS
|
||||
|
@ -23,7 +24,7 @@ protected:
|
|||
double mAlpha, mBeta, mGamma;
|
||||
};
|
||||
|
||||
class nsDOMDeviceAcceleration : public nsIDOMDeviceAcceleration
|
||||
class nsDOMDeviceAcceleration MOZ_FINAL : public nsIDOMDeviceAcceleration
|
||||
{
|
||||
public:
|
||||
NS_DECL_ISUPPORTS
|
||||
|
@ -38,8 +39,8 @@ protected:
|
|||
double mX, mY, mZ;
|
||||
};
|
||||
|
||||
class nsDOMDeviceMotionEvent : public nsDOMEvent,
|
||||
public nsIDOMDeviceMotionEvent
|
||||
class nsDOMDeviceMotionEvent MOZ_FINAL : public nsDOMEvent,
|
||||
public nsIDOMDeviceMotionEvent
|
||||
{
|
||||
public:
|
||||
|
||||
|
|
|
@ -17,8 +17,9 @@
|
|||
#include "nsIScriptContext.h"
|
||||
#include "nsWrapperCache.h"
|
||||
#include "mozilla/ErrorResult.h"
|
||||
#include "mozilla/Attributes.h"
|
||||
|
||||
class nsDOMEventListenerWrapper : public nsIDOMEventListener
|
||||
class nsDOMEventListenerWrapper MOZ_FINAL : public nsIDOMEventListener
|
||||
{
|
||||
public:
|
||||
nsDOMEventListenerWrapper(nsIDOMEventListener* aListener)
|
||||
|
|
|
@ -11,8 +11,9 @@
|
|||
#include "nsTArray.h"
|
||||
#include "nsIDocument.h"
|
||||
#include "dombindings.h"
|
||||
#include "mozilla/Attributes.h"
|
||||
|
||||
class nsDOMTouch : public nsIDOMTouch
|
||||
class nsDOMTouch MOZ_FINAL : public nsIDOMTouch
|
||||
{
|
||||
public:
|
||||
nsDOMTouch(nsIDOMEventTarget* aTarget,
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
#include "nsString.h"
|
||||
#include "nsCycleCollectionParticipant.h"
|
||||
#include "jsapi.h"
|
||||
#include "mozilla/Attributes.h"
|
||||
|
||||
|
||||
class nsEventListenerInfo : public nsIEventListenerInfo
|
||||
|
@ -38,7 +39,7 @@ protected:
|
|||
bool mInSystemEventGroup;
|
||||
};
|
||||
|
||||
class nsEventListenerService : public nsIEventListenerService
|
||||
class nsEventListenerService MOZ_FINAL : public nsIEventListenerService
|
||||
{
|
||||
public:
|
||||
NS_DECL_ISUPPORTS
|
||||
|
|
|
@ -96,6 +96,7 @@
|
|||
|
||||
#include "mozilla/Preferences.h"
|
||||
#include "mozilla/LookAndFeel.h"
|
||||
#include "mozilla/Attributes.h"
|
||||
#include "sampler.h"
|
||||
|
||||
#include "nsIDOMClientRect.h"
|
||||
|
@ -217,7 +218,7 @@ PrintDocTreeAll(nsIDocShellTreeItem* aItem)
|
|||
}
|
||||
#endif
|
||||
|
||||
class nsUITimerCallback : public nsITimerCallback
|
||||
class nsUITimerCallback MOZ_FINAL : public nsITimerCallback
|
||||
{
|
||||
public:
|
||||
nsUITimerCallback() : mPreviousCount(0) {}
|
||||
|
|
|
@ -34,6 +34,7 @@
|
|||
#include "nsIFormControl.h"
|
||||
#include "nsIForm.h"
|
||||
#include "nsHTMLFormElement.h"
|
||||
#include "mozilla/Attributes.h"
|
||||
|
||||
using namespace mozilla::widget;
|
||||
|
||||
|
@ -386,8 +387,8 @@ nsIMEStateManager::GetWidget(nsPresContext* aPresContext)
|
|||
// sTextStateObserver points to the currently active nsTextStateManager
|
||||
// sTextStateObserver is null if there is no focused editor
|
||||
|
||||
class nsTextStateManager : public nsISelectionListener,
|
||||
public nsStubMutationObserver
|
||||
class nsTextStateManager MOZ_FINAL : public nsISelectionListener,
|
||||
public nsStubMutationObserver
|
||||
{
|
||||
public:
|
||||
nsTextStateManager();
|
||||
|
|
|
@ -11,8 +11,9 @@
|
|||
#include "nsPresContext.h"
|
||||
#include "nsIDOMEvent.h"
|
||||
#include "dombindings.h"
|
||||
#include "mozilla/Attributes.h"
|
||||
|
||||
class nsPaintRequest : public nsIDOMPaintRequest
|
||||
class nsPaintRequest MOZ_FINAL : public nsIDOMPaintRequest
|
||||
{
|
||||
public:
|
||||
NS_DECL_ISUPPORTS
|
||||
|
|
|
@ -9,8 +9,9 @@
|
|||
#include "nsIPrivateTextRange.h"
|
||||
#include "nsTArray.h"
|
||||
#include "nsAutoPtr.h"
|
||||
#include "mozilla/Attributes.h"
|
||||
|
||||
class nsPrivateTextRange : public nsIPrivateTextRange
|
||||
class nsPrivateTextRange MOZ_FINAL : public nsIPrivateTextRange
|
||||
{
|
||||
NS_DECL_ISUPPORTS
|
||||
public:
|
||||
|
@ -31,7 +32,7 @@ protected:
|
|||
nsTextRangeStyle mRangeStyle;
|
||||
};
|
||||
|
||||
class nsPrivateTextRangeList: public nsIPrivateTextRangeList
|
||||
class nsPrivateTextRangeList MOZ_FINAL : public nsIPrivateTextRangeList
|
||||
{
|
||||
NS_DECL_ISUPPORTS
|
||||
public:
|
||||
|
|
|
@ -14,13 +14,14 @@
|
|||
#include "nsInterfaceHashtable.h"
|
||||
#include "nsIAtom.h"
|
||||
#include "nsStubDocumentObserver.h"
|
||||
#include "mozilla/Attributes.h"
|
||||
|
||||
/*
|
||||
* The implementation of the XML Events Basic profile
|
||||
*/
|
||||
|
||||
class nsXMLEventsManager;
|
||||
class nsXMLEventsListener : public nsIDOMEventListener {
|
||||
class nsXMLEventsListener MOZ_FINAL : public nsIDOMEventListener {
|
||||
public:
|
||||
static bool InitXMLEventsListener(nsIDocument * aDocument,
|
||||
nsXMLEventsManager * aManager,
|
||||
|
@ -57,7 +58,7 @@ private:
|
|||
|
||||
};
|
||||
|
||||
class nsXMLEventsManager : public nsStubDocumentObserver {
|
||||
class nsXMLEventsManager MOZ_FINAL : public nsStubDocumentObserver {
|
||||
public:
|
||||
nsXMLEventsManager();
|
||||
~nsXMLEventsManager();
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
#include "nsIChannelEventSink.h"
|
||||
#include "nsIInterfaceRequestor.h"
|
||||
#include "nsMediaCache.h"
|
||||
#include "mozilla/Attributes.h"
|
||||
|
||||
// For HTTP seeking, if number of bytes needing to be
|
||||
// seeked forward is less than this value then a read is
|
||||
|
@ -390,9 +391,9 @@ public:
|
|||
virtual bool IsSuspendedByCache(MediaResource** aActiveResource);
|
||||
virtual bool IsSuspended();
|
||||
|
||||
class Listener : public nsIStreamListener,
|
||||
public nsIInterfaceRequestor,
|
||||
public nsIChannelEventSink
|
||||
class Listener MOZ_FINAL : public nsIStreamListener,
|
||||
public nsIInterfaceRequestor,
|
||||
public nsIChannelEventSink
|
||||
{
|
||||
public:
|
||||
Listener(ChannelMediaResource* aResource) : mResource(aResource) {}
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
#include "nsXPCOMCIDInternal.h"
|
||||
#include "prlog.h"
|
||||
#include "VideoUtils.h"
|
||||
#include "mozilla/Attributes.h"
|
||||
|
||||
using namespace mozilla::layers;
|
||||
|
||||
|
@ -1469,7 +1470,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
class MediaStreamGraphShutdownObserver : public nsIObserver
|
||||
class MediaStreamGraphShutdownObserver MOZ_FINAL : public nsIObserver
|
||||
{
|
||||
public:
|
||||
NS_DECL_ISUPPORTS
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
#include "prlog.h"
|
||||
#include "mozilla/Preferences.h"
|
||||
#include "FileBlockCache.h"
|
||||
#include "mozilla/Attributes.h"
|
||||
|
||||
using namespace mozilla;
|
||||
|
||||
|
@ -59,8 +60,8 @@ static const PRUint32 FREE_BLOCK_SCAN_LIMIT = 16;
|
|||
// size limits).
|
||||
static nsMediaCache* gMediaCache;
|
||||
|
||||
class nsMediaCacheFlusher : public nsIObserver,
|
||||
public nsSupportsWeakReference {
|
||||
class nsMediaCacheFlusher MOZ_FINAL : public nsIObserver,
|
||||
public nsSupportsWeakReference {
|
||||
nsMediaCacheFlusher() {}
|
||||
~nsMediaCacheFlusher();
|
||||
public:
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
#include "nsCycleCollectionParticipant.h"
|
||||
#include "nsIDOMSVGAnimatedLengthList.h"
|
||||
#include "nsSVGElement.h"
|
||||
#include "mozilla/Attributes.h"
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
|
@ -103,7 +104,7 @@ class DOMSVGLengthList;
|
|||
* One drawback of this design is that objects must look up their parent
|
||||
* chain to find their element, but that overhead is relatively small.
|
||||
*/
|
||||
class DOMSVGAnimatedLengthList : public nsIDOMSVGAnimatedLengthList
|
||||
class DOMSVGAnimatedLengthList MOZ_FINAL : public nsIDOMSVGAnimatedLengthList
|
||||
{
|
||||
friend class DOMSVGLengthList;
|
||||
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
#include "nsCycleCollectionParticipant.h"
|
||||
#include "nsIDOMSVGAnimatedNumberList.h"
|
||||
#include "nsSVGElement.h"
|
||||
#include "mozilla/Attributes.h"
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
|
@ -33,7 +34,7 @@ class SVGNumberList;
|
|||
* out our pointers to them when they die (making our pointers to them true
|
||||
* weak refs).
|
||||
*/
|
||||
class DOMSVGAnimatedNumberList : public nsIDOMSVGAnimatedNumberList
|
||||
class DOMSVGAnimatedNumberList MOZ_FINAL : public nsIDOMSVGAnimatedNumberList
|
||||
{
|
||||
friend class DOMSVGNumberList;
|
||||
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
#include "nsCycleCollectionParticipant.h"
|
||||
#include "nsIDOMSVGAnimTransformList.h"
|
||||
#include "nsSVGElement.h"
|
||||
#include "mozilla/Attributes.h"
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
|
@ -34,7 +35,7 @@ class SVGAnimatedTransformList;
|
|||
* nulling out our pointers to them when they die (making our pointers to them
|
||||
* true weak refs).
|
||||
*/
|
||||
class DOMSVGAnimatedTransformList : public nsIDOMSVGAnimatedTransformList
|
||||
class DOMSVGAnimatedTransformList MOZ_FINAL : public nsIDOMSVGAnimatedTransformList
|
||||
{
|
||||
friend class DOMSVGTransformList;
|
||||
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
#include "nsIDOMSVGLength.h"
|
||||
#include "nsTArray.h"
|
||||
#include "SVGLength.h"
|
||||
#include "mozilla/Attributes.h"
|
||||
|
||||
class nsSVGElement;
|
||||
|
||||
|
@ -65,7 +66,7 @@ namespace mozilla {
|
|||
* if-else as appropriate. The bug for doing that work is:
|
||||
* https://bugzilla.mozilla.org/show_bug.cgi?id=571734
|
||||
*/
|
||||
class DOMSVGLength : public nsIDOMSVGLength
|
||||
class DOMSVGLength MOZ_FINAL : public nsIDOMSVGLength
|
||||
{
|
||||
public:
|
||||
NS_DECLARE_STATIC_IID_ACCESSOR(MOZILLA_DOMSVGLENGTH_IID)
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
#include "nsIDOMSVGLengthList.h"
|
||||
#include "nsTArray.h"
|
||||
#include "SVGLengthList.h"
|
||||
#include "mozilla/Attributes.h"
|
||||
|
||||
class nsIDOMSVGLength;
|
||||
class nsSVGElement;
|
||||
|
@ -38,8 +39,8 @@ class DOMSVGLength;
|
|||
*
|
||||
* Our DOM items are created lazily on demand as and when script requests them.
|
||||
*/
|
||||
class DOMSVGLengthList : public nsIDOMSVGLengthList,
|
||||
public nsWrapperCache
|
||||
class DOMSVGLengthList MOZ_FINAL : public nsIDOMSVGLengthList,
|
||||
public nsWrapperCache
|
||||
{
|
||||
friend class DOMSVGLength;
|
||||
|
||||
|
|
|
@ -42,6 +42,7 @@
|
|||
#include "nsAutoPtr.h"
|
||||
#include "nsCycleCollectionParticipant.h"
|
||||
#include "nsIDOMSVGMatrix.h"
|
||||
#include "mozilla/Attributes.h"
|
||||
|
||||
// We make DOMSVGMatrix a pseudo-interface to allow us to QI to it in order
|
||||
// to check that the objects that scripts pass in are our *native* matrix
|
||||
|
@ -57,7 +58,7 @@ namespace mozilla {
|
|||
/**
|
||||
* DOM wrapper for an SVG matrix.
|
||||
*/
|
||||
class DOMSVGMatrix : public nsIDOMSVGMatrix
|
||||
class DOMSVGMatrix MOZ_FINAL : public nsIDOMSVGMatrix
|
||||
{
|
||||
public:
|
||||
NS_DECLARE_STATIC_IID_ACCESSOR(MOZILLA_DOMSVGMATRIX_IID)
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
#include "nsCycleCollectionParticipant.h"
|
||||
#include "nsIDOMSVGNumber.h"
|
||||
#include "nsTArray.h"
|
||||
#include "mozilla/Attributes.h"
|
||||
|
||||
class nsSVGElement;
|
||||
|
||||
|
@ -40,7 +41,7 @@ namespace mozilla {
|
|||
*
|
||||
* See the comment in DOMSVGLength.h (yes, LENGTH), which applies here too.
|
||||
*/
|
||||
class DOMSVGNumber : public nsIDOMSVGNumber
|
||||
class DOMSVGNumber MOZ_FINAL : public nsIDOMSVGNumber
|
||||
{
|
||||
public:
|
||||
NS_DECLARE_STATIC_IID_ACCESSOR(MOZILLA_DOMSVGNUMBER_IID)
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
#include "nsIDOMSVGNumberList.h"
|
||||
#include "nsTArray.h"
|
||||
#include "SVGNumberList.h"
|
||||
#include "mozilla/Attributes.h"
|
||||
|
||||
class nsSVGElement;
|
||||
|
||||
|
@ -37,8 +38,8 @@ class DOMSVGNumber;
|
|||
*
|
||||
* Our DOM items are created lazily on demand as and when script requests them.
|
||||
*/
|
||||
class DOMSVGNumberList : public nsIDOMSVGNumberList,
|
||||
public nsWrapperCache
|
||||
class DOMSVGNumberList MOZ_FINAL : public nsIDOMSVGNumberList,
|
||||
public nsWrapperCache
|
||||
{
|
||||
friend class DOMSVGNumber;
|
||||
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
#include "nsSVGElement.h"
|
||||
#include "nsTArray.h"
|
||||
#include "SVGPathData.h" // IWYU pragma: keep
|
||||
#include "mozilla/Attributes.h"
|
||||
|
||||
class nsIDOMSVGPathSeg;
|
||||
|
||||
|
@ -47,8 +48,8 @@ class SVGAnimatedPathSegList;
|
|||
*
|
||||
* Our DOM items are created lazily on demand as and when script requests them.
|
||||
*/
|
||||
class DOMSVGPathSegList : public nsIDOMSVGPathSegList,
|
||||
public nsWrapperCache
|
||||
class DOMSVGPathSegList MOZ_FINAL : public nsIDOMSVGPathSegList,
|
||||
public nsWrapperCache
|
||||
{
|
||||
friend class DOMSVGPathSeg;
|
||||
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
#include "nsIDOMSVGPoint.h"
|
||||
#include "nsTArray.h"
|
||||
#include "SVGPoint.h"
|
||||
#include "mozilla/Attributes.h"
|
||||
|
||||
class nsSVGElement;
|
||||
|
||||
|
@ -44,7 +45,7 @@ namespace mozilla {
|
|||
* See the architecture comment in DOMSVGLength.h (yes, LENGTH) for an overview
|
||||
* of the important points regarding how this specific class works.
|
||||
*/
|
||||
class DOMSVGPoint : public nsIDOMSVGPoint
|
||||
class DOMSVGPoint MOZ_FINAL : public nsIDOMSVGPoint
|
||||
{
|
||||
public:
|
||||
NS_DECLARE_STATIC_IID_ACCESSOR(MOZILLA_DOMSVGPOINT_IID)
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
#include "nsSVGElement.h"
|
||||
#include "nsTArray.h"
|
||||
#include "SVGPointList.h" // IWYU pragma: keep
|
||||
#include "mozilla/Attributes.h"
|
||||
|
||||
class nsIDOMSVGPoint;
|
||||
|
||||
|
@ -47,8 +48,8 @@ class SVGAnimatedPointList;
|
|||
*
|
||||
* Our DOM items are created lazily on demand as and when script requests them.
|
||||
*/
|
||||
class DOMSVGPointList : public nsIDOMSVGPointList,
|
||||
public nsWrapperCache
|
||||
class DOMSVGPointList MOZ_FINAL : public nsIDOMSVGPointList,
|
||||
public nsWrapperCache
|
||||
{
|
||||
friend class DOMSVGPoint;
|
||||
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
#include "nsCycleCollectionParticipant.h"
|
||||
#include "nsIDOMSVGStringList.h"
|
||||
#include "nsSVGElement.h"
|
||||
#include "mozilla/Attributes.h"
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
|
@ -42,7 +43,7 @@ class SVGStringList;
|
|||
* them so it can return the same objects each time. It simply returns a new
|
||||
* string each time any given item is requested.
|
||||
*/
|
||||
class DOMSVGStringList : public nsIDOMSVGStringList
|
||||
class DOMSVGStringList MOZ_FINAL : public nsIDOMSVGStringList
|
||||
{
|
||||
public:
|
||||
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
|
||||
|
|
|
@ -24,6 +24,8 @@ public:
|
|||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_NSIDOMSVGTESTS
|
||||
|
||||
virtual ~DOMSVGTests() {}
|
||||
|
||||
friend class mozilla::DOMSVGStringList;
|
||||
typedef mozilla::SVGStringList SVGStringList;
|
||||
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
#include "nsIDOMSVGTransform.h"
|
||||
#include "nsTArray.h"
|
||||
#include "SVGTransform.h"
|
||||
#include "mozilla/Attributes.h"
|
||||
|
||||
class nsSVGElement;
|
||||
|
||||
|
@ -38,7 +39,7 @@ class DOMSVGMatrix;
|
|||
/**
|
||||
* DOM wrapper for an SVG transform. See DOMSVGLength.h.
|
||||
*/
|
||||
class DOMSVGTransform : public nsIDOMSVGTransform
|
||||
class DOMSVGTransform MOZ_FINAL : public nsIDOMSVGTransform
|
||||
{
|
||||
public:
|
||||
NS_DECLARE_STATIC_IID_ACCESSOR(MOZILLA_DOMSVGTRANSFORM_IID)
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
#include "nsIDOMSVGTransformList.h"
|
||||
#include "nsTArray.h"
|
||||
#include "SVGTransformList.h"
|
||||
#include "mozilla/Attributes.h"
|
||||
|
||||
class nsIDOMSVGTransform;
|
||||
class nsSVGElement;
|
||||
|
@ -30,8 +31,8 @@ class DOMSVGTransform;
|
|||
*
|
||||
* See the architecture comment in DOMSVGAnimatedTransformList.h.
|
||||
*/
|
||||
class DOMSVGTransformList : public nsIDOMSVGTransformList,
|
||||
public nsWrapperCache
|
||||
class DOMSVGTransformList MOZ_FINAL : public nsIDOMSVGTransformList,
|
||||
public nsWrapperCache
|
||||
{
|
||||
friend class DOMSVGTransform;
|
||||
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
#include "nsIDOMSVGPresAspectRatio.h"
|
||||
#include "nsISMILAttr.h"
|
||||
#include "nsSVGElement.h"
|
||||
#include "mozilla/Attributes.h"
|
||||
|
||||
class nsISMILAnimationElement;
|
||||
class nsSMILValue;
|
||||
|
@ -147,7 +148,7 @@ private:
|
|||
nsSVGElement* aSVGElement);
|
||||
|
||||
public:
|
||||
struct DOMBaseVal : public nsIDOMSVGPreserveAspectRatio
|
||||
struct DOMBaseVal MOZ_FINAL : public nsIDOMSVGPreserveAspectRatio
|
||||
{
|
||||
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
|
||||
NS_DECL_CYCLE_COLLECTION_CLASS(DOMBaseVal)
|
||||
|
@ -169,7 +170,7 @@ public:
|
|||
{ return mVal->SetBaseMeetOrSlice(aMeetOrSlice, mSVGElement); }
|
||||
};
|
||||
|
||||
struct DOMAnimVal : public nsIDOMSVGPreserveAspectRatio
|
||||
struct DOMAnimVal MOZ_FINAL : public nsIDOMSVGPreserveAspectRatio
|
||||
{
|
||||
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
|
||||
NS_DECL_CYCLE_COLLECTION_CLASS(DOMAnimVal)
|
||||
|
@ -201,7 +202,7 @@ public:
|
|||
{ return NS_ERROR_DOM_NO_MODIFICATION_ALLOWED_ERR; }
|
||||
};
|
||||
|
||||
struct DOMAnimPAspectRatio : public nsIDOMSVGAnimatedPreserveAspectRatio
|
||||
struct DOMAnimPAspectRatio MOZ_FINAL : public nsIDOMSVGAnimatedPreserveAspectRatio
|
||||
{
|
||||
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
|
||||
NS_DECL_CYCLE_COLLECTION_CLASS(DOMAnimPAspectRatio)
|
||||
|
@ -222,7 +223,7 @@ public:
|
|||
{ return mVal->ToDOMAnimVal(aAnimVal, mSVGElement); }
|
||||
};
|
||||
|
||||
struct SMILPreserveAspectRatio : public nsISMILAttr
|
||||
struct SMILPreserveAspectRatio MOZ_FINAL : public nsISMILAttr
|
||||
{
|
||||
public:
|
||||
SMILPreserveAspectRatio(SVGAnimatedPreserveAspectRatio* aVal,
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
#include "nsContentUtils.h" // NS_ENSURE_FINITE
|
||||
#include "nsSMILValue.h"
|
||||
#include "SVGOrientSMILType.h"
|
||||
#include "mozilla/Attributes.h"
|
||||
|
||||
using namespace mozilla;
|
||||
|
||||
|
@ -25,7 +26,7 @@ using namespace mozilla;
|
|||
* any DOMSVGAngle passed in. Perhaps this is wrong and inconsistent with
|
||||
* other parts of SVG, but it's how the code works for now.
|
||||
*/
|
||||
class DOMSVGAngle : public nsIDOMSVGAngle
|
||||
class DOMSVGAngle MOZ_FINAL : public nsIDOMSVGAngle
|
||||
{
|
||||
public:
|
||||
NS_DECL_ISUPPORTS
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
#include "nsIDOMSVGAnimatedAngle.h"
|
||||
#include "nsISMILAttr.h"
|
||||
#include "nsSVGElement.h"
|
||||
#include "mozilla/Attributes.h"
|
||||
|
||||
class nsISMILAnimationElement;
|
||||
class nsSMILValue;
|
||||
|
@ -77,7 +78,7 @@ private:
|
|||
nsresult ToDOMAnimVal(nsIDOMSVGAngle **aResult, nsSVGElement* aSVGElement);
|
||||
|
||||
public:
|
||||
struct DOMBaseVal : public nsIDOMSVGAngle
|
||||
struct DOMBaseVal MOZ_FINAL : public nsIDOMSVGAngle
|
||||
{
|
||||
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
|
||||
NS_DECL_CYCLE_COLLECTION_CLASS(DOMBaseVal)
|
||||
|
@ -116,7 +117,7 @@ public:
|
|||
{ return mVal->ConvertToSpecifiedUnits(unitType, mSVGElement); }
|
||||
};
|
||||
|
||||
struct DOMAnimVal : public nsIDOMSVGAngle
|
||||
struct DOMAnimVal MOZ_FINAL : public nsIDOMSVGAngle
|
||||
{
|
||||
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
|
||||
NS_DECL_CYCLE_COLLECTION_CLASS(DOMAnimVal)
|
||||
|
@ -153,7 +154,7 @@ public:
|
|||
{ return NS_ERROR_DOM_NO_MODIFICATION_ALLOWED_ERR; }
|
||||
};
|
||||
|
||||
struct DOMAnimatedAngle : public nsIDOMSVGAnimatedAngle
|
||||
struct DOMAnimatedAngle MOZ_FINAL : public nsIDOMSVGAnimatedAngle
|
||||
{
|
||||
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
|
||||
NS_DECL_CYCLE_COLLECTION_CLASS(DOMAnimatedAngle)
|
||||
|
@ -176,7 +177,7 @@ public:
|
|||
// 'marker' element, and 'orient' must be special cased since it can also
|
||||
// take the value 'auto', making it a more complex type.
|
||||
|
||||
struct SMILOrient : public nsISMILAttr
|
||||
struct SMILOrient MOZ_FINAL : public nsISMILAttr
|
||||
{
|
||||
public:
|
||||
SMILOrient(nsSVGOrientType* aOrientType,
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
#include "nsISMILAttr.h"
|
||||
#include "nsISupportsImpl.h"
|
||||
#include "nsSVGElement.h"
|
||||
#include "mozilla/Attributes.h"
|
||||
|
||||
class nsISMILAnimationElement;
|
||||
class nsSMILValue;
|
||||
|
@ -51,7 +52,7 @@ private:
|
|||
PRUint8 mAttrEnum; // element specified tracking for attribute
|
||||
|
||||
public:
|
||||
struct DOMAnimatedBoolean : public nsIDOMSVGAnimatedBoolean
|
||||
struct DOMAnimatedBoolean MOZ_FINAL : public nsIDOMSVGAnimatedBoolean
|
||||
{
|
||||
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
|
||||
NS_DECL_CYCLE_COLLECTION_CLASS(DOMAnimatedBoolean)
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
#include "nsIDOMSVGAnimatedString.h"
|
||||
#include "nsISMILAttr.h"
|
||||
#include "nsString.h"
|
||||
#include "mozilla/Attributes.h"
|
||||
|
||||
class nsSVGStylableElement;
|
||||
|
||||
|
@ -43,7 +44,7 @@ private:
|
|||
nsAutoPtr<nsString> mAnimVal;
|
||||
|
||||
public:
|
||||
struct DOMAnimatedString : public nsIDOMSVGAnimatedString
|
||||
struct DOMAnimatedString MOZ_FINAL : public nsIDOMSVGAnimatedString
|
||||
{
|
||||
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
|
||||
NS_DECL_CYCLE_COLLECTION_CLASS(DOMAnimatedString)
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
#include "nsIDOMSVGAnimatedEnum.h"
|
||||
#include "nsISMILAttr.h"
|
||||
#include "nsSVGElement.h"
|
||||
#include "mozilla/Attributes.h"
|
||||
|
||||
class nsIAtom;
|
||||
class nsISMILAnimationElement;
|
||||
|
@ -62,7 +63,7 @@ private:
|
|||
nsSVGEnumMapping *GetMapping(nsSVGElement *aSVGElement);
|
||||
|
||||
public:
|
||||
struct DOMAnimatedEnum : public nsIDOMSVGAnimatedEnumeration
|
||||
struct DOMAnimatedEnum MOZ_FINAL : public nsIDOMSVGAnimatedEnumeration
|
||||
{
|
||||
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
|
||||
NS_DECL_CYCLE_COLLECTION_CLASS(DOMAnimatedEnum)
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
#include "nsIDOMSVGAnimatedInteger.h"
|
||||
#include "nsISMILAttr.h"
|
||||
#include "nsSVGElement.h"
|
||||
#include "mozilla/Attributes.h"
|
||||
|
||||
class nsISMILAnimationElement;
|
||||
class nsSMILValue;
|
||||
|
@ -61,7 +62,7 @@ private:
|
|||
bool mIsBaseSet;
|
||||
|
||||
public:
|
||||
struct DOMAnimatedInteger : public nsIDOMSVGAnimatedInteger
|
||||
struct DOMAnimatedInteger MOZ_FINAL : public nsIDOMSVGAnimatedInteger
|
||||
{
|
||||
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
|
||||
NS_DECL_CYCLE_COLLECTION_CLASS(DOMAnimatedInteger)
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
#include "nsIDOMSVGAnimatedInteger.h"
|
||||
#include "nsISMILAttr.h"
|
||||
#include "nsSVGElement.h"
|
||||
#include "mozilla/Attributes.h"
|
||||
|
||||
class nsISMILAnimationElement;
|
||||
class nsSMILValue;
|
||||
|
@ -68,7 +69,7 @@ private:
|
|||
bool mIsBaseSet;
|
||||
|
||||
public:
|
||||
struct DOMAnimatedInteger : public nsIDOMSVGAnimatedInteger
|
||||
struct DOMAnimatedInteger MOZ_FINAL : public nsIDOMSVGAnimatedInteger
|
||||
{
|
||||
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
|
||||
NS_DECL_CYCLE_COLLECTION_CLASS(DOMAnimatedInteger)
|
||||
|
|
|
@ -177,13 +177,14 @@ nsSVGLength2::GetAxisLength(nsSVGSVGElement *aCtx) const
|
|||
float
|
||||
nsSVGLength2::GetAxisLength(nsIFrame *aNonSVGFrame) const
|
||||
{
|
||||
gfxRect rect = nsSVGIntegrationUtils::GetSVGRectForNonSVGFrame(aNonSVGFrame);
|
||||
gfxSize size =
|
||||
nsSVGIntegrationUtils::GetSVGCoordContextForNonSVGFrame(aNonSVGFrame);
|
||||
float length;
|
||||
switch (mCtxType) {
|
||||
case nsSVGUtils::X: length = rect.Width(); break;
|
||||
case nsSVGUtils::Y: length = rect.Height(); break;
|
||||
case nsSVGUtils::X: length = size.width; break;
|
||||
case nsSVGUtils::Y: length = size.height; break;
|
||||
case nsSVGUtils::XY:
|
||||
length = nsSVGUtils::ComputeNormalizedHypotenuse(rect.Width(), rect.Height());
|
||||
length = nsSVGUtils::ComputeNormalizedHypotenuse(size.width, size.height);
|
||||
break;
|
||||
default:
|
||||
NS_NOTREACHED("Unknown axis type");
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
#include "nsSVGLength2.h"
|
||||
#include "nsSVGViewBox.h"
|
||||
#include "SVGAnimatedPreserveAspectRatio.h"
|
||||
#include "mozilla/Attributes.h"
|
||||
|
||||
class nsSVGOrientType
|
||||
{
|
||||
|
@ -46,7 +47,7 @@ private:
|
|||
nsSVGEnumValue mAnimVal;
|
||||
nsSVGEnumValue mBaseVal;
|
||||
|
||||
struct DOMAnimatedEnum : public nsIDOMSVGAnimatedEnumeration
|
||||
struct DOMAnimatedEnum MOZ_FINAL : public nsIDOMSVGAnimatedEnumeration
|
||||
{
|
||||
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
|
||||
NS_DECL_CYCLE_COLLECTION_CLASS(DOMAnimatedEnum)
|
||||
|
|
|
@ -12,8 +12,9 @@
|
|||
#include "nsSMILValue.h"
|
||||
#include "nsSMILFloatType.h"
|
||||
#include "nsIDOMSVGNumber.h"
|
||||
#include "mozilla/Attributes.h"
|
||||
|
||||
class DOMSVGNumber : public nsIDOMSVGNumber
|
||||
class DOMSVGNumber MOZ_FINAL : public nsIDOMSVGNumber
|
||||
{
|
||||
public:
|
||||
NS_DECL_ISUPPORTS
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
#include "nsISMILAttr.h"
|
||||
#include "nsMathUtils.h"
|
||||
#include "nsSVGElement.h"
|
||||
#include "mozilla/Attributes.h"
|
||||
|
||||
class nsISMILAnimationElement;
|
||||
class nsSMILValue;
|
||||
|
@ -61,7 +62,7 @@ private:
|
|||
bool mIsBaseSet;
|
||||
|
||||
public:
|
||||
struct DOMAnimatedNumber : public nsIDOMSVGAnimatedNumber
|
||||
struct DOMAnimatedNumber MOZ_FINAL : public nsIDOMSVGAnimatedNumber
|
||||
{
|
||||
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
|
||||
NS_DECL_CYCLE_COLLECTION_CLASS(DOMAnimatedNumber)
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
#include "nsISMILAttr.h"
|
||||
#include "nsMathUtils.h"
|
||||
#include "nsSVGElement.h"
|
||||
#include "mozilla/Attributes.h"
|
||||
|
||||
class nsISMILAnimationElement;
|
||||
class nsSMILValue;
|
||||
|
@ -69,7 +70,7 @@ private:
|
|||
bool mIsBaseSet;
|
||||
|
||||
public:
|
||||
struct DOMAnimatedNumber : public nsIDOMSVGAnimatedNumber
|
||||
struct DOMAnimatedNumber MOZ_FINAL : public nsIDOMSVGAnimatedNumber
|
||||
{
|
||||
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
|
||||
NS_DECL_CYCLE_COLLECTION_CLASS(DOMAnimatedNumber)
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
|
||||
#include "gfxRect.h"
|
||||
#include "nsIDOMSVGRect.h"
|
||||
#include "mozilla/Attributes.h"
|
||||
|
||||
nsresult
|
||||
NS_NewSVGRect(nsIDOMSVGRect** result,
|
||||
|
@ -20,7 +21,7 @@ NS_NewSVGRect(nsIDOMSVGRect** result, const gfxRect& rect);
|
|||
////////////////////////////////////////////////////////////////////////
|
||||
// nsSVGRect class
|
||||
|
||||
class nsSVGRect : public nsIDOMSVGRect
|
||||
class nsSVGRect MOZ_FINAL : public nsIDOMSVGRect
|
||||
{
|
||||
public:
|
||||
nsSVGRect(float x=0.0f, float y=0.0f, float w=0.0f, float h=0.0f);
|
||||
|
|
|
@ -1145,16 +1145,6 @@ nsSVGSVGElement::GetLength(PRUint8 aCtxType)
|
|||
return 0;
|
||||
}
|
||||
|
||||
void
|
||||
nsSVGSVGElement::SyncWidthOrHeight(nsIAtom* aName, nsSVGElement *aTarget) const
|
||||
{
|
||||
NS_ASSERTION(aName == nsGkAtoms::width || aName == nsGkAtoms::height,
|
||||
"The clue is in the function name");
|
||||
|
||||
PRUint32 index = *sLengthInfo[WIDTH].mName == aName ? WIDTH : HEIGHT;
|
||||
aTarget->SetLength(aName, mLengthAttributes[index]);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// nsSVGElement methods
|
||||
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
#include "nsSVGStylableElement.h"
|
||||
#include "nsSVGViewBox.h"
|
||||
#include "SVGAnimatedPreserveAspectRatio.h"
|
||||
#include "mozilla/Attributes.h"
|
||||
|
||||
class nsIDOMSVGMatrix;
|
||||
class nsSMILTimeContainer;
|
||||
|
@ -59,7 +60,7 @@ public:
|
|||
|
||||
private:
|
||||
|
||||
struct DOMVal : public nsIDOMSVGPoint {
|
||||
struct DOMVal MOZ_FINAL : public nsIDOMSVGPoint {
|
||||
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
|
||||
NS_DECL_CYCLE_COLLECTION_CLASS(DOMVal)
|
||||
|
||||
|
@ -173,8 +174,6 @@ public:
|
|||
|
||||
// nsSVGSVGElement methods:
|
||||
float GetLength(PRUint8 mCtxType);
|
||||
// Copy our width or height to the target
|
||||
void SyncWidthOrHeight(nsIAtom* aName, nsSVGElement *aTarget) const;
|
||||
|
||||
// public helpers:
|
||||
|
||||
|
|
Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше
Загрузка…
Ссылка в новой задаче