Merge last green changeset from mozilla-inbound to mozilla-central
|
@ -399,3 +399,12 @@ pref("dom.sms.enabled", true);
|
|||
pref("dom.sms.whitelist", "file://,http://localhost:6666");
|
||||
// Ignore X-Frame-Options headers.
|
||||
pref("b2g.ignoreXFrameOptions", true);
|
||||
|
||||
// "Preview" landing of bug 710563, which is bogged down in analysis
|
||||
// of talos regression. This is a needed change for higher-framerate
|
||||
// CSS animations, and incidentally works around an apparent bug in
|
||||
// our handling of requestAnimationFrame() listeners, which are
|
||||
// supposed to enable this REPEATING_PRECISE_CAN_SKIP behavior. The
|
||||
// secondary bug isn't really worth investigating since it's obseleted
|
||||
// by bug 710563.
|
||||
pref("layout.frame_rate.precise", true);
|
||||
|
|
|
@ -179,7 +179,8 @@
|
|||
<menupopup id="appmenu_webDeveloper_popup">
|
||||
<menuitem id="appmenu_webConsole"
|
||||
label="&webConsoleCmd.label;"
|
||||
oncommand="HUDConsoleUI.toggleHUD();"
|
||||
type="checkbox"
|
||||
command="Tools:WebConsole"
|
||||
key="key_webConsole"/>
|
||||
<menuitem id="appmenu_pageInspect"
|
||||
hidden="true"
|
||||
|
|
|
@ -533,10 +533,11 @@
|
|||
accesskey="&webDeveloperMenu.accesskey;">
|
||||
<menupopup id="menuWebDeveloperPopup">
|
||||
<menuitem id="webConsole"
|
||||
type="checkbox"
|
||||
label="&webConsoleCmd.label;"
|
||||
accesskey="&webConsoleCmd.accesskey;"
|
||||
key="key_webConsole"
|
||||
oncommand="HUDConsoleUI.toggleHUD();"/>
|
||||
command="Tools:WebConsole"/>
|
||||
<menuitem id="menu_pageinspect"
|
||||
type="checkbox"
|
||||
hidden="true"
|
||||
|
|
|
@ -125,6 +125,7 @@
|
|||
|
||||
<command id="Tools:Search" oncommand="BrowserSearch.webSearch();"/>
|
||||
<command id="Tools:Downloads" oncommand="BrowserDownloadsUI();"/>
|
||||
<command id="Tools:WebConsole" oncommand="HUDConsoleUI.toggleHUD();"/>
|
||||
<command id="Tools:Inspect" oncommand="InspectorUI.toggleInspectorUI();" disabled="true"/>
|
||||
<command id="Tools:Scratchpad" oncommand="Scratchpad.openScratchpad();" disabled="true"/>
|
||||
<command id="Tools:StyleEditor" oncommand="StyleEditor.openChrome();" disabled="true"/>
|
||||
|
|
|
@ -9,6 +9,3 @@ mk_add_options MOZ_MAKE_FLAGS="-j4"
|
|||
export MOZILLA_OFFICIAL=1
|
||||
|
||||
ac_add_options --with-macbundlename-prefix=Firefox
|
||||
|
||||
# Treat warnings as errors in directories with FAIL_ON_WARNINGS.
|
||||
ac_add_options --enable-warnings-as-errors
|
||||
|
|
|
@ -18,7 +18,7 @@ function test()
|
|||
|
||||
function runTests()
|
||||
{
|
||||
scratchpad = gScratchpadWindow.Scratchpad;
|
||||
var scratchpad = gScratchpadWindow.Scratchpad;
|
||||
|
||||
var message = "\"Hello World!\""
|
||||
var openComment = "/*\n";
|
||||
|
|
|
@ -1511,8 +1511,8 @@ HUD_SERVICE.prototype =
|
|||
this.wakeup();
|
||||
|
||||
let window = aContext.linkedBrowser.contentWindow;
|
||||
let nBox = aContext.ownerDocument.defaultView.
|
||||
getNotificationBox(window);
|
||||
let chromeDocument = aContext.ownerDocument;
|
||||
let nBox = chromeDocument.defaultView.getNotificationBox(window);
|
||||
this.registerActiveContext(nBox.id);
|
||||
this.windowInitializer(window);
|
||||
|
||||
|
@ -1523,6 +1523,8 @@ HUD_SERVICE.prototype =
|
|||
this.disableAnimation(hudId);
|
||||
}
|
||||
|
||||
chromeDocument.getElementById("Tools:WebConsole").setAttribute("checked", "true");
|
||||
|
||||
// Create a processing instruction for GCLIs CSS stylesheet, but only if
|
||||
// we don't have one for this document. Also record the context we're
|
||||
// adding this for so we know when to remove it.
|
||||
|
@ -1572,6 +1574,8 @@ HUD_SERVICE.prototype =
|
|||
window.focus();
|
||||
}
|
||||
|
||||
chromeDocument.getElementById("Tools:WebConsole").setAttribute("checked", "false");
|
||||
|
||||
// Remove this context from the list of contexts that need the GCLI CSS
|
||||
// processing instruction and then remove the processing instruction if it
|
||||
// isn't needed any more.
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* vim:set ts=2 sw=2 sts=2 et: */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
|
@ -22,6 +22,18 @@
|
|||
* Contributor(s):
|
||||
* Mihai Sucan <mihai.sucan@gmail.com>
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the MPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
// Tests that network log messages bring up the network panel.
|
||||
|
|
|
@ -39,36 +39,17 @@
|
|||
|
||||
package @ANDROID_PACKAGE_NAME@;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.BufferedWriter;
|
||||
import java.io.File;
|
||||
import java.io.FileReader;
|
||||
import java.io.FileWriter;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Date;
|
||||
|
||||
import java.lang.Class;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.lang.reflect.Method;
|
||||
import java.lang.reflect.Proxy;
|
||||
import java.lang.reflect.InvocationHandler;
|
||||
import java.lang.Long;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
|
||||
import org.json.*;
|
||||
|
||||
import com.jayway.android.robotium.solo.Solo;
|
||||
|
||||
public class FennecNativeAssert implements Assert {
|
||||
// Map of IDs to element names.
|
||||
private HashMap locators = null;
|
||||
private String logFile = null;
|
||||
|
||||
// Objects for reflexive access of fennec classes.
|
||||
|
@ -204,6 +185,9 @@ public class FennecNativeAssert implements Assert {
|
|||
} else {
|
||||
passed++;
|
||||
}
|
||||
if (isError) {
|
||||
junit.framework.Assert.fail(message);
|
||||
}
|
||||
}
|
||||
|
||||
public void finalize()
|
||||
|
|
|
@ -111,7 +111,6 @@ $(_JAVA_TESTS): % : $(TESTPATH)/%.in
|
|||
|
||||
$(_ROBOCOP_TOOLS):
|
||||
cp $(TESTPATH)/robocop.ini robocop.ini
|
||||
cp $(srcdir)/parse_ids.txt parse_ids.txt
|
||||
|
||||
libs:: $(_TEST_FILES)
|
||||
$(NSINSTALL) -D $(DEPTH)/_tests/testing/mochitest/tests/robocop
|
||||
|
|
|
@ -68,7 +68,7 @@ interface nsIDOMBlob : nsISupports
|
|||
|
||||
[noscript] readonly attribute nsIInputStream internalStream;
|
||||
// The caller is responsible for releasing the internalUrl from the
|
||||
// moz-filedata: protocol handler
|
||||
// blob: protocol handler
|
||||
[noscript] DOMString getInternalUrl(in nsIPrincipal principal);
|
||||
|
||||
[optional_argc] nsIDOMBlob mozSlice([optional] in long long start,
|
||||
|
|
|
@ -1495,7 +1495,7 @@ public:
|
|||
* Register/Unregister a filedata uri as being "owned" by this document.
|
||||
* I.e. that its lifetime is connected with this document. When the document
|
||||
* goes away it should "kill" the uri by calling
|
||||
* nsFileDataProtocolHandler::RemoveFileDataEntry
|
||||
* nsBlobProtocolHandler::RemoveFileDataEntry
|
||||
*/
|
||||
virtual void RegisterFileDataUri(const nsACString& aUri) = 0;
|
||||
virtual void UnregisterFileDataUri(const nsACString& aUri) = 0;
|
||||
|
|
|
@ -98,6 +98,7 @@ interface nsISelectionController : nsISelectionDisplay
|
|||
|
||||
const short SCROLL_SYNCHRONOUS = 1<<1;
|
||||
const short SCROLL_FIRST_ANCESTOR_ONLY = 1<<2;
|
||||
const short SCROLL_CENTER_VERTICALLY = 1<<4;
|
||||
|
||||
/**
|
||||
* ScrollSelectionIntoView scrolls a region of the selection,
|
||||
|
|
|
@ -151,7 +151,7 @@ CPPSRCS = \
|
|||
nsXMLHttpRequest.cpp \
|
||||
nsXMLNameSpaceMap.cpp \
|
||||
Link.cpp \
|
||||
nsFileDataProtocolHandler.cpp \
|
||||
nsBlobProtocolHandler.cpp \
|
||||
nsFrameMessageManager.cpp \
|
||||
nsInProcessTabChildGlobal.cpp \
|
||||
ThirdPartyUtil.cpp \
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#include "nsFileDataProtocolHandler.h"
|
||||
#include "nsBlobProtocolHandler.h"
|
||||
#include "nsSimpleURI.h"
|
||||
#include "nsDOMError.h"
|
||||
#include "nsCOMPtr.h"
|
||||
|
@ -60,7 +60,7 @@ struct FileDataInfo
|
|||
static nsClassHashtable<nsCStringHashKey, FileDataInfo>* gFileDataTable;
|
||||
|
||||
void
|
||||
nsFileDataProtocolHandler::AddFileDataEntry(nsACString& aUri,
|
||||
nsBlobProtocolHandler::AddFileDataEntry(nsACString& aUri,
|
||||
nsIDOMBlob* aFile,
|
||||
nsIPrincipal* aPrincipal)
|
||||
{
|
||||
|
@ -78,7 +78,7 @@ nsFileDataProtocolHandler::AddFileDataEntry(nsACString& aUri,
|
|||
}
|
||||
|
||||
void
|
||||
nsFileDataProtocolHandler::RemoveFileDataEntry(nsACString& aUri)
|
||||
nsBlobProtocolHandler::RemoveFileDataEntry(nsACString& aUri)
|
||||
{
|
||||
if (gFileDataTable) {
|
||||
gFileDataTable->Remove(aUri);
|
||||
|
@ -90,7 +90,7 @@ nsFileDataProtocolHandler::RemoveFileDataEntry(nsACString& aUri)
|
|||
}
|
||||
|
||||
nsIPrincipal*
|
||||
nsFileDataProtocolHandler::GetFileDataEntryPrincipal(nsACString& aUri)
|
||||
nsBlobProtocolHandler::GetFileDataEntryPrincipal(nsACString& aUri)
|
||||
{
|
||||
if (!gFileDataTable) {
|
||||
return nsnull;
|
||||
|
@ -109,7 +109,7 @@ static FileDataInfo*
|
|||
GetFileDataInfo(const nsACString& aUri)
|
||||
{
|
||||
NS_ASSERTION(StringBeginsWith(aUri,
|
||||
NS_LITERAL_CSTRING(FILEDATA_SCHEME ":")),
|
||||
NS_LITERAL_CSTRING(BLOBURI_SCHEME ":")),
|
||||
"Bad URI");
|
||||
|
||||
if (!gFileDataTable) {
|
||||
|
@ -124,23 +124,23 @@ GetFileDataInfo(const nsACString& aUri)
|
|||
// -----------------------------------------------------------------------
|
||||
// Uri
|
||||
|
||||
#define NS_FILEDATAURI_CID \
|
||||
#define NS_BLOBURI_CID \
|
||||
{ 0xf5475c51, 0x59a7, 0x4757, \
|
||||
{ 0xb3, 0xd9, 0xe2, 0x11, 0xa9, 0x41, 0x08, 0x72 } }
|
||||
|
||||
static NS_DEFINE_CID(kFILEDATAURICID, NS_FILEDATAURI_CID);
|
||||
static NS_DEFINE_CID(kBLOBURICID, NS_BLOBURI_CID);
|
||||
|
||||
class nsFileDataURI : public nsSimpleURI,
|
||||
class nsBlobURI : public nsSimpleURI,
|
||||
public nsIURIWithPrincipal
|
||||
{
|
||||
public:
|
||||
nsFileDataURI(nsIPrincipal* aPrincipal) :
|
||||
nsBlobURI(nsIPrincipal* aPrincipal) :
|
||||
nsSimpleURI(), mPrincipal(aPrincipal)
|
||||
{}
|
||||
virtual ~nsFileDataURI() {}
|
||||
virtual ~nsBlobURI() {}
|
||||
|
||||
// For use only from deserialization
|
||||
nsFileDataURI() : nsSimpleURI() {}
|
||||
nsBlobURI() : nsSimpleURI() {}
|
||||
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
NS_DECL_NSIURIWITHPRINCIPAL
|
||||
|
@ -154,9 +154,9 @@ public:
|
|||
RefHandlingEnum aRefHandlingMode,
|
||||
bool* aResult);
|
||||
|
||||
// Override StartClone to hand back a nsFileDataURI
|
||||
// Override StartClone to hand back a nsBlobURI
|
||||
virtual nsSimpleURI* StartClone(RefHandlingEnum /* unused */)
|
||||
{ return new nsFileDataURI(); }
|
||||
{ return new nsBlobURI(); }
|
||||
|
||||
nsCOMPtr<nsIPrincipal> mPrincipal;
|
||||
};
|
||||
|
@ -164,12 +164,12 @@ public:
|
|||
static NS_DEFINE_CID(kThisSimpleURIImplementationCID,
|
||||
NS_THIS_SIMPLEURI_IMPLEMENTATION_CID);
|
||||
|
||||
NS_IMPL_ADDREF_INHERITED(nsFileDataURI, nsSimpleURI)
|
||||
NS_IMPL_RELEASE_INHERITED(nsFileDataURI, nsSimpleURI)
|
||||
NS_IMPL_ADDREF_INHERITED(nsBlobURI, nsSimpleURI)
|
||||
NS_IMPL_RELEASE_INHERITED(nsBlobURI, nsSimpleURI)
|
||||
|
||||
NS_INTERFACE_MAP_BEGIN(nsFileDataURI)
|
||||
NS_INTERFACE_MAP_BEGIN(nsBlobURI)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIURIWithPrincipal)
|
||||
if (aIID.Equals(kFILEDATAURICID))
|
||||
if (aIID.Equals(kBLOBURICID))
|
||||
foundInterface = static_cast<nsIURI*>(this);
|
||||
else if (aIID.Equals(kThisSimpleURIImplementationCID)) {
|
||||
// Need to return explicitly here, because if we just set foundInterface
|
||||
|
@ -184,7 +184,7 @@ NS_INTERFACE_MAP_END_INHERITING(nsSimpleURI)
|
|||
// nsIURIWithPrincipal methods:
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsFileDataURI::GetPrincipal(nsIPrincipal** aPrincipal)
|
||||
nsBlobURI::GetPrincipal(nsIPrincipal** aPrincipal)
|
||||
{
|
||||
NS_IF_ADDREF(*aPrincipal = mPrincipal);
|
||||
|
||||
|
@ -192,7 +192,7 @@ nsFileDataURI::GetPrincipal(nsIPrincipal** aPrincipal)
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsFileDataURI::GetPrincipalUri(nsIURI** aUri)
|
||||
nsBlobURI::GetPrincipalUri(nsIURI** aUri)
|
||||
{
|
||||
if (mPrincipal) {
|
||||
mPrincipal->GetURI(aUri);
|
||||
|
@ -207,7 +207,7 @@ nsFileDataURI::GetPrincipalUri(nsIURI** aUri)
|
|||
// nsISerializable methods:
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsFileDataURI::Read(nsIObjectInputStream* aStream)
|
||||
nsBlobURI::Read(nsIObjectInputStream* aStream)
|
||||
{
|
||||
nsresult rv = nsSimpleURI::Read(aStream);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
@ -216,7 +216,7 @@ nsFileDataURI::Read(nsIObjectInputStream* aStream)
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsFileDataURI::Write(nsIObjectOutputStream* aStream)
|
||||
nsBlobURI::Write(nsIObjectOutputStream* aStream)
|
||||
{
|
||||
nsresult rv = nsSimpleURI::Write(aStream);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
@ -228,7 +228,7 @@ nsFileDataURI::Write(nsIObjectOutputStream* aStream)
|
|||
|
||||
// nsIURI methods:
|
||||
nsresult
|
||||
nsFileDataURI::CloneInternal(nsSimpleURI::RefHandlingEnum aRefHandlingMode,
|
||||
nsBlobURI::CloneInternal(nsSimpleURI::RefHandlingEnum aRefHandlingMode,
|
||||
nsIURI** aClone)
|
||||
{
|
||||
nsCOMPtr<nsIURI> simpleClone;
|
||||
|
@ -237,22 +237,22 @@ nsFileDataURI::CloneInternal(nsSimpleURI::RefHandlingEnum aRefHandlingMode,
|
|||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
#ifdef DEBUG
|
||||
nsRefPtr<nsFileDataURI> uriCheck;
|
||||
rv = simpleClone->QueryInterface(kFILEDATAURICID, getter_AddRefs(uriCheck));
|
||||
nsRefPtr<nsBlobURI> uriCheck;
|
||||
rv = simpleClone->QueryInterface(kBLOBURICID, getter_AddRefs(uriCheck));
|
||||
NS_ABORT_IF_FALSE(NS_SUCCEEDED(rv) && uriCheck,
|
||||
"Unexpected!");
|
||||
#endif
|
||||
|
||||
nsFileDataURI* fileDataURI = static_cast<nsFileDataURI*>(simpleClone.get());
|
||||
nsBlobURI* blobURI = static_cast<nsBlobURI*>(simpleClone.get());
|
||||
|
||||
fileDataURI->mPrincipal = mPrincipal;
|
||||
blobURI->mPrincipal = mPrincipal;
|
||||
|
||||
simpleClone.forget(aClone);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/* virtual */ nsresult
|
||||
nsFileDataURI::EqualsInternal(nsIURI* aOther,
|
||||
nsBlobURI::EqualsInternal(nsIURI* aOther,
|
||||
nsSimpleURI::RefHandlingEnum aRefHandlingMode,
|
||||
bool* aResult)
|
||||
{
|
||||
|
@ -261,32 +261,32 @@ nsFileDataURI::EqualsInternal(nsIURI* aOther,
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
nsRefPtr<nsFileDataURI> otherFileDataUri;
|
||||
aOther->QueryInterface(kFILEDATAURICID, getter_AddRefs(otherFileDataUri));
|
||||
if (!otherFileDataUri) {
|
||||
nsRefPtr<nsBlobURI> otherBlobUri;
|
||||
aOther->QueryInterface(kBLOBURICID, getter_AddRefs(otherBlobUri));
|
||||
if (!otherBlobUri) {
|
||||
*aResult = false;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
// Compare the member data that our base class knows about.
|
||||
if (!nsSimpleURI::EqualsInternal(otherFileDataUri, aRefHandlingMode)) {
|
||||
if (!nsSimpleURI::EqualsInternal(otherBlobUri, aRefHandlingMode)) {
|
||||
*aResult = false;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
// Compare the piece of additional member data that we add to base class.
|
||||
if (mPrincipal && otherFileDataUri->mPrincipal) {
|
||||
if (mPrincipal && otherBlobUri->mPrincipal) {
|
||||
// Both of us have mPrincipals. Compare them.
|
||||
return mPrincipal->Equals(otherFileDataUri->mPrincipal, aResult);
|
||||
return mPrincipal->Equals(otherBlobUri->mPrincipal, aResult);
|
||||
}
|
||||
// else, at least one of us lacks a principal; only equal if *both* lack it.
|
||||
*aResult = (!mPrincipal && !otherFileDataUri->mPrincipal);
|
||||
*aResult = (!mPrincipal && !otherBlobUri->mPrincipal);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
// nsIClassInfo methods:
|
||||
NS_IMETHODIMP
|
||||
nsFileDataURI::GetInterfaces(PRUint32 *count, nsIID * **array)
|
||||
nsBlobURI::GetInterfaces(PRUint32 *count, nsIID * **array)
|
||||
{
|
||||
*count = 0;
|
||||
*array = nsnull;
|
||||
|
@ -294,14 +294,14 @@ nsFileDataURI::GetInterfaces(PRUint32 *count, nsIID * **array)
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsFileDataURI::GetHelperForLanguage(PRUint32 language, nsISupports **_retval)
|
||||
nsBlobURI::GetHelperForLanguage(PRUint32 language, nsISupports **_retval)
|
||||
{
|
||||
*_retval = nsnull;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsFileDataURI::GetContractID(char * *aContractID)
|
||||
nsBlobURI::GetContractID(char * *aContractID)
|
||||
{
|
||||
// Make sure to modify any subclasses as needed if this ever
|
||||
// changes.
|
||||
|
@ -310,14 +310,14 @@ nsFileDataURI::GetContractID(char * *aContractID)
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsFileDataURI::GetClassDescription(char * *aClassDescription)
|
||||
nsBlobURI::GetClassDescription(char * *aClassDescription)
|
||||
{
|
||||
*aClassDescription = nsnull;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsFileDataURI::GetClassID(nsCID * *aClassID)
|
||||
nsBlobURI::GetClassID(nsCID * *aClassID)
|
||||
{
|
||||
// Make sure to modify any subclasses as needed if this ever
|
||||
// changes to not call the virtual GetClassIDNoAlloc.
|
||||
|
@ -328,47 +328,47 @@ nsFileDataURI::GetClassID(nsCID * *aClassID)
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsFileDataURI::GetImplementationLanguage(PRUint32 *aImplementationLanguage)
|
||||
nsBlobURI::GetImplementationLanguage(PRUint32 *aImplementationLanguage)
|
||||
{
|
||||
*aImplementationLanguage = nsIProgrammingLanguage::CPLUSPLUS;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsFileDataURI::GetFlags(PRUint32 *aFlags)
|
||||
nsBlobURI::GetFlags(PRUint32 *aFlags)
|
||||
{
|
||||
*aFlags = nsIClassInfo::MAIN_THREAD_ONLY;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsFileDataURI::GetClassIDNoAlloc(nsCID *aClassIDNoAlloc)
|
||||
nsBlobURI::GetClassIDNoAlloc(nsCID *aClassIDNoAlloc)
|
||||
{
|
||||
*aClassIDNoAlloc = kFILEDATAURICID;
|
||||
*aClassIDNoAlloc = kBLOBURICID;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------
|
||||
// Protocol handler
|
||||
|
||||
NS_IMPL_ISUPPORTS1(nsFileDataProtocolHandler, nsIProtocolHandler)
|
||||
NS_IMPL_ISUPPORTS1(nsBlobProtocolHandler, nsIProtocolHandler)
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsFileDataProtocolHandler::GetScheme(nsACString &result)
|
||||
nsBlobProtocolHandler::GetScheme(nsACString &result)
|
||||
{
|
||||
result.AssignLiteral(FILEDATA_SCHEME);
|
||||
result.AssignLiteral(BLOBURI_SCHEME);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsFileDataProtocolHandler::GetDefaultPort(PRInt32 *result)
|
||||
nsBlobProtocolHandler::GetDefaultPort(PRInt32 *result)
|
||||
{
|
||||
*result = -1;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsFileDataProtocolHandler::GetProtocolFlags(PRUint32 *result)
|
||||
nsBlobProtocolHandler::GetProtocolFlags(PRUint32 *result)
|
||||
{
|
||||
*result = URI_NORELATIVE | URI_NOAUTH | URI_LOADABLE_BY_SUBSUMERS |
|
||||
URI_IS_LOCAL_RESOURCE | URI_NON_PERSISTABLE;
|
||||
|
@ -376,7 +376,7 @@ nsFileDataProtocolHandler::GetProtocolFlags(PRUint32 *result)
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsFileDataProtocolHandler::NewURI(const nsACString& aSpec,
|
||||
nsBlobProtocolHandler::NewURI(const nsACString& aSpec,
|
||||
const char *aCharset,
|
||||
nsIURI *aBaseURI,
|
||||
nsIURI **aResult)
|
||||
|
@ -387,8 +387,8 @@ nsFileDataProtocolHandler::NewURI(const nsACString& aSpec,
|
|||
FileDataInfo* info =
|
||||
GetFileDataInfo(aSpec);
|
||||
|
||||
nsRefPtr<nsFileDataURI> uri =
|
||||
new nsFileDataURI(info ? info->mPrincipal.get() : nsnull);
|
||||
nsRefPtr<nsBlobURI> uri =
|
||||
new nsBlobURI(info ? info->mPrincipal.get() : nsnull);
|
||||
|
||||
rv = uri->SetSpec(aSpec);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
@ -400,7 +400,7 @@ nsFileDataProtocolHandler::NewURI(const nsACString& aSpec,
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsFileDataProtocolHandler::NewChannel(nsIURI* uri, nsIChannel* *result)
|
||||
nsBlobProtocolHandler::NewChannel(nsIURI* uri, nsIChannel* *result)
|
||||
{
|
||||
*result = nsnull;
|
||||
|
||||
|
@ -448,7 +448,7 @@ nsFileDataProtocolHandler::NewChannel(nsIURI* uri, nsIChannel* *result)
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsFileDataProtocolHandler::AllowPort(PRInt32 port, const char *scheme,
|
||||
nsBlobProtocolHandler::AllowPort(PRInt32 port, const char *scheme,
|
||||
bool *_retval)
|
||||
{
|
||||
// don't override anything.
|
|
@ -34,17 +34,17 @@
|
|||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#ifndef nsFileDataProtocolHandler_h___
|
||||
#define nsFileDataProtocolHandler_h___
|
||||
#ifndef nsBlobProtocolHandler_h
|
||||
#define nsBlobProtocolHandler_h
|
||||
|
||||
#include "nsIProtocolHandler.h"
|
||||
|
||||
#define FILEDATA_SCHEME "moz-filedata"
|
||||
#define BLOBURI_SCHEME "blob"
|
||||
|
||||
class nsIDOMBlob;
|
||||
class nsIPrincipal;
|
||||
|
||||
class nsFileDataProtocolHandler : public nsIProtocolHandler
|
||||
class nsBlobProtocolHandler : public nsIProtocolHandler
|
||||
{
|
||||
public:
|
||||
NS_DECL_ISUPPORTS
|
||||
|
@ -52,9 +52,9 @@ public:
|
|||
// nsIProtocolHandler methods:
|
||||
NS_DECL_NSIPROTOCOLHANDLER
|
||||
|
||||
// nsFileDataProtocolHandler methods:
|
||||
nsFileDataProtocolHandler() {}
|
||||
virtual ~nsFileDataProtocolHandler() {}
|
||||
// nsBlobProtocolHandler methods:
|
||||
nsBlobProtocolHandler() {}
|
||||
virtual ~nsBlobProtocolHandler() {}
|
||||
|
||||
// Methods for managing uri->file mapping
|
||||
static void AddFileDataEntry(nsACString& aUri,
|
||||
|
@ -65,8 +65,8 @@ public:
|
|||
|
||||
};
|
||||
|
||||
#define NS_FILEDATAPROTOCOLHANDLER_CID \
|
||||
#define NS_BLOBPROTOCOLHANDLER_CID \
|
||||
{ 0xb43964aa, 0xa078, 0x44b2, \
|
||||
{ 0xb0, 0x6b, 0xfd, 0x4d, 0x1b, 0x17, 0x2e, 0x66 } }
|
||||
|
||||
#endif /* nsFileDataProtocolHandler_h___ */
|
||||
#endif /* nsBlobProtocolHandler_h */
|
|
@ -60,7 +60,7 @@
|
|||
#include "nsNetCID.h"
|
||||
#include "nsNetUtil.h"
|
||||
#include "nsIUUIDGenerator.h"
|
||||
#include "nsFileDataProtocolHandler.h"
|
||||
#include "nsBlobProtocolHandler.h"
|
||||
#include "nsStringStream.h"
|
||||
#include "CheckedInt.h"
|
||||
#include "nsJSUtils.h"
|
||||
|
@ -288,10 +288,10 @@ nsDOMFileBase::GetInternalUrl(nsIPrincipal* aPrincipal, nsAString& aURL)
|
|||
char chars[NSID_LENGTH];
|
||||
id.ToProvidedString(chars);
|
||||
|
||||
nsCString url = NS_LITERAL_CSTRING(FILEDATA_SCHEME ":") +
|
||||
nsCString url = NS_LITERAL_CSTRING(BLOBURI_SCHEME ":") +
|
||||
Substring(chars + 1, chars + NSID_LENGTH - 2);
|
||||
|
||||
nsFileDataProtocolHandler::AddFileDataEntry(url, this,
|
||||
nsBlobProtocolHandler::AddFileDataEntry(url, this,
|
||||
aPrincipal);
|
||||
|
||||
CopyASCIItoUTF16(url, aURL);
|
||||
|
@ -668,6 +668,6 @@ nsDOMFileInternalUrlHolder::~nsDOMFileInternalUrlHolder() {
|
|||
if (!mUrl.IsEmpty()) {
|
||||
nsCAutoString narrowUrl;
|
||||
CopyUTF16toUTF8(mUrl, narrowUrl);
|
||||
nsFileDataProtocolHandler::RemoveFileDataEntry(narrowUrl);
|
||||
nsBlobProtocolHandler::RemoveFileDataEntry(narrowUrl);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -74,7 +74,7 @@
|
|||
#include "nsCycleCollectionParticipant.h"
|
||||
#include "nsLayoutStatics.h"
|
||||
#include "nsIScriptObjectPrincipal.h"
|
||||
#include "nsFileDataProtocolHandler.h"
|
||||
#include "nsBlobProtocolHandler.h"
|
||||
#include "mozilla/Preferences.h"
|
||||
#include "xpcpublic.h"
|
||||
#include "nsIScriptSecurityManager.h"
|
||||
|
|
|
@ -102,7 +102,7 @@ nsDataDocumentContentPolicy::ShouldLoad(PRUint32 aContentType,
|
|||
// also satisfy one of the following conditions:
|
||||
// - URI inherits security context, e.g. data URIs
|
||||
// OR
|
||||
// - URI loadable by subsumers, e.g. moz-filedata URIs
|
||||
// - URI loadable by subsumers, e.g. blob URIs
|
||||
// Any URI that doesn't meet these requirements will be rejected below.
|
||||
if (!HasFlags(aContentLocation,
|
||||
nsIProtocolHandler::URI_IS_LOCAL_RESOURCE) ||
|
||||
|
|
|
@ -144,7 +144,7 @@
|
|||
#include "nsIDOMHTMLFormElement.h"
|
||||
#include "nsIRequest.h"
|
||||
#include "nsILink.h"
|
||||
#include "nsFileDataProtocolHandler.h"
|
||||
#include "nsBlobProtocolHandler.h"
|
||||
|
||||
#include "nsICharsetAlias.h"
|
||||
#include "nsIParser.h"
|
||||
|
@ -1669,7 +1669,7 @@ nsDocument::~nsDocument()
|
|||
mPendingTitleChangeEvent.Revoke();
|
||||
|
||||
for (PRUint32 i = 0; i < mFileDataUris.Length(); ++i) {
|
||||
nsFileDataProtocolHandler::RemoveFileDataEntry(mFileDataUris[i]);
|
||||
nsBlobProtocolHandler::RemoveFileDataEntry(mFileDataUris[i]);
|
||||
}
|
||||
|
||||
// We don't want to leave residual locks on images. Make sure we're in an
|
||||
|
|
|
@ -208,7 +208,6 @@ public:
|
|||
NS_IMETHOD DidProcessTokens(void);
|
||||
NS_IMETHOD WillProcessAToken(void);
|
||||
NS_IMETHOD DidProcessAToken(void);
|
||||
NS_IMETHOD NotifyTagObservers(nsIParserNode* aNode);
|
||||
NS_IMETHOD BeginContext(PRInt32 aID);
|
||||
NS_IMETHOD EndContext(PRInt32 aID);
|
||||
NS_IMETHOD OpenHead();
|
||||
|
@ -270,8 +269,6 @@ protected:
|
|||
PRUint8 mFormOnStack : 1;
|
||||
PRUint8 unused : 5; // bits available if someone needs one
|
||||
|
||||
nsCOMPtr<nsIObserverEntry> mObservers;
|
||||
|
||||
nsINodeInfo* mNodeInfoCache[NS_HTML_TAG_MAX + 1];
|
||||
|
||||
nsresult FlushTags();
|
||||
|
@ -1574,15 +1571,6 @@ HTMLContentSink::Init(nsIDocument* aDoc,
|
|||
mIsDocumentObserver = true;
|
||||
mHTMLDocument = do_QueryInterface(aDoc);
|
||||
|
||||
mObservers = nsnull;
|
||||
nsIParserService* service = nsContentUtils::GetParserService();
|
||||
if (!service) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
|
||||
service->GetTopicObservers(NS_LITERAL_STRING("text/html"),
|
||||
getter_AddRefs(mObservers));
|
||||
|
||||
NS_ASSERTION(mDocShell, "oops no docshell!");
|
||||
|
||||
// Find out if subframes are enabled
|
||||
|
@ -2506,27 +2494,6 @@ HTMLContentSink::WillResume()
|
|||
return WillResumeImpl();
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLContentSink::NotifyTagObservers(nsIParserNode* aNode)
|
||||
{
|
||||
// Bug 125317
|
||||
// Inform observers that we're handling a document.write().
|
||||
// This information is necessary for the charset observer, atleast,
|
||||
// to make a decision whether a new charset loading is required or not.
|
||||
|
||||
if (!mObservers) {
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
PRUint32 flag = 0;
|
||||
|
||||
if (mHTMLDocument && mHTMLDocument->IsWriting()) {
|
||||
flag = nsIElementObserver::IS_DOCUMENT_WRITE;
|
||||
}
|
||||
|
||||
return mObservers->Notify(aNode, mParser, mDocShell, flag);
|
||||
}
|
||||
|
||||
void
|
||||
HTMLContentSink::StartLayout(bool aIgnorePendingSheets)
|
||||
{
|
||||
|
|
|
@ -45,6 +45,7 @@ include $(DEPTH)/config/autoconf.mk
|
|||
MODULE = content
|
||||
LIBRARY_NAME = gkconsmil_s
|
||||
LIBXUL_LIBRARY = 1
|
||||
FAIL_ON_WARNINGS = 1
|
||||
|
||||
EXPORTS = \
|
||||
nsISMILAnimationElement.h \
|
||||
|
|
|
@ -45,6 +45,7 @@ include $(DEPTH)/config/autoconf.mk
|
|||
MODULE = content
|
||||
LIBRARY_NAME = gkconsvgdoc_s
|
||||
LIBXUL_LIBRARY = 1
|
||||
FAIL_ON_WARNINGS = 1
|
||||
|
||||
CPPSRCS = \
|
||||
nsSVGDocument.cpp \
|
||||
|
|
|
@ -26,7 +26,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=330705
|
|||
ok(isFocused,
|
||||
"The first box element is still focused after blur() has been called on the second box element");
|
||||
SimpleTest.finish();
|
||||
}, 100);
|
||||
}, 0);
|
||||
}
|
||||
|
||||
function onLoad() {
|
||||
|
@ -34,6 +34,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=330705
|
|||
box.addEventListener('focus', function() {
|
||||
isFocused = true;
|
||||
setTimeout(doTest, 0);
|
||||
box.removeEventListener('focus', arguments.callee, true);
|
||||
}, true);
|
||||
box.addEventListener('blur', function() { isFocused = false;}, true);
|
||||
box.focus();
|
||||
|
|
|
@ -180,7 +180,7 @@
|
|||
#include "nsAutoPtr.h"
|
||||
#include "nsContentUtils.h"
|
||||
#include "nsCSSProps.h"
|
||||
#include "nsFileDataProtocolHandler.h"
|
||||
#include "nsBlobProtocolHandler.h"
|
||||
#include "nsIDOMFile.h"
|
||||
#include "nsIDOMFileList.h"
|
||||
#include "nsIURIFixup.h"
|
||||
|
@ -689,7 +689,7 @@ nsDOMMozURLProperty::RevokeObjectURL(const nsAString& aURL)
|
|||
}
|
||||
|
||||
nsIPrincipal* principal =
|
||||
nsFileDataProtocolHandler::GetFileDataEntryPrincipal(asciiurl);
|
||||
nsBlobProtocolHandler::GetFileDataEntryPrincipal(asciiurl);
|
||||
bool subsumes;
|
||||
if (principal && winPrincipal &&
|
||||
NS_SUCCEEDED(winPrincipal->Subsumes(principal, &subsumes)) &&
|
||||
|
@ -697,7 +697,7 @@ nsDOMMozURLProperty::RevokeObjectURL(const nsAString& aURL)
|
|||
if (mWindow->mDoc) {
|
||||
mWindow->mDoc->UnregisterFileDataUri(asciiurl);
|
||||
}
|
||||
nsFileDataProtocolHandler::RemoveFileDataEntry(asciiurl);
|
||||
nsBlobProtocolHandler::RemoveFileDataEntry(asciiurl);
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
|
|
|
@ -3094,6 +3094,9 @@ nsresult nsPluginHost::NewPluginURLStream(const nsString& aURL,
|
|||
// deal with headers and post data
|
||||
nsCOMPtr<nsIHttpChannel> httpChannel(do_QueryInterface(channel));
|
||||
if (httpChannel) {
|
||||
rv = httpChannel->SetReferrer(doc->GetDocumentURI());
|
||||
NS_ENSURE_SUCCESS(rv,rv);
|
||||
|
||||
if (aPostStream) {
|
||||
// XXX it's a bit of a hack to rewind the postdata stream
|
||||
// here but it has to be done in case the post data is
|
||||
|
@ -3109,8 +3112,10 @@ nsresult nsPluginHost::NewPluginURLStream(const nsString& aURL,
|
|||
uploadChannel->SetUploadStream(aPostStream, EmptyCString(), -1);
|
||||
}
|
||||
|
||||
if (aHeadersData)
|
||||
if (aHeadersData) {
|
||||
rv = AddHeadersToChannel(aHeadersData, aHeadersDataLen, httpChannel);
|
||||
NS_ENSURE_SUCCESS(rv,rv);
|
||||
}
|
||||
}
|
||||
rv = channel->AsyncOpen(listenerPeer, nsnull);
|
||||
if (NS_SUCCEEDED(rv))
|
||||
|
|
|
@ -64,6 +64,7 @@ _MOCHITEST_FILES = \
|
|||
test_painting.html \
|
||||
test_pluginstream_err.html \
|
||||
test_pluginstream_src.html \
|
||||
test_pluginstream_src_dynamic.html \
|
||||
test_pluginstream_geturl.html \
|
||||
test_pluginstream_geturlnotify.html \
|
||||
test_pluginstream_asfile.html \
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
function frameLoaded() {
|
||||
var testframe = document.getElementById('testframe');
|
||||
var embed = document.getElementsByTagName('embed')[0];
|
||||
if (undefined === embed)
|
||||
embed = document.getElementsByTagName('object')[0];
|
||||
try {
|
||||
var content = testframe.contentDocument.body.innerHTML;
|
||||
if (!content.length)
|
||||
|
@ -10,7 +12,8 @@
|
|||
|
||||
var filename = embed.getAttribute("src") ||
|
||||
embed.getAttribute("geturl") ||
|
||||
embed.getAttribute("geturlnotify");
|
||||
embed.getAttribute("geturlnotify") ||
|
||||
embed.getAttribute("data");
|
||||
|
||||
var req = new XMLHttpRequest();
|
||||
req.open('GET', filename, false);
|
||||
|
|
|
@ -24,4 +24,4 @@
|
|||
id="embedtest" style="width: 400px; height: 100px;"
|
||||
type="application/x-test"></embed>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
|
|
@ -0,0 +1,39 @@
|
|||
<html>
|
||||
<head>
|
||||
<title>NPAPI src="" NPStream Test</title>
|
||||
<script type="text/javascript"
|
||||
src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="text/javascript"
|
||||
src="pluginstream.js"></script>
|
||||
<link rel="stylesheet" type="text/css"
|
||||
href="/tests/SimpleTest/test.css" />
|
||||
</head>
|
||||
<body>
|
||||
<p id="display"></p>
|
||||
|
||||
<iframe id="testframe" name="testframe" onload="frameLoaded()"></iframe>
|
||||
|
||||
<!--
|
||||
- A stream is sent to the browser via NPP_NewStream, NP_NORMAL.
|
||||
- The plugin reports that data can only be sent to it in 100-byte
|
||||
- chunks. When NPP_DestroyStream is called, the plugin sends the stream
|
||||
- content back to the browser by passing it as a data: url to
|
||||
- NPN_GetURL, using a frame, so that the stream content should
|
||||
- be displayed in the frame in the browser.
|
||||
-
|
||||
- We create the object element dynamically, which in some cases has caused us to deliver the data=""
|
||||
- stream twice. This verifies that we only deliver the data="" stream once.
|
||||
-->
|
||||
|
||||
<script type="text/javascript">
|
||||
var e = document.createElement('object');
|
||||
e.setAttribute('data', 'loremipsum.xtest');
|
||||
e.setAttribute('type', 'application/x-test');
|
||||
e.setAttribute('streammode', 'normal');
|
||||
e.setAttribute('streamchunksize', '100');
|
||||
e.setAttribute('frame', 'testframe');
|
||||
e.setAttribute('style', 'width: 400px; height: 100px;');
|
||||
document.body.appendChild(e);
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -1033,6 +1033,10 @@ NPP_NewStream(NPP instance, NPMIMEType type, NPStream* stream, NPBool seekable,
|
|||
instanceData->postMode == POSTMODE_STREAM) {
|
||||
instanceData->testFunction = FUNCTION_NPP_GETURL;
|
||||
}
|
||||
else {
|
||||
// We already got a stream and didn't ask for another one.
|
||||
instanceData->err << "Received unexpected multiple NPP_NewStream";
|
||||
}
|
||||
}
|
||||
}
|
||||
return NPERR_NO_ERROR;
|
||||
|
|
|
@ -202,6 +202,17 @@ Telephony::Dial(const nsAString& aNumber, nsIDOMTelephonyCall** aResult)
|
|||
{
|
||||
NS_ENSURE_ARG(!aNumber.IsEmpty());
|
||||
|
||||
for (PRUint32 index = 0; index < mCalls.Length(); index++) {
|
||||
const nsRefPtr<TelephonyCall>& tempCall = mCalls[index];
|
||||
if (tempCall->IsOutgoing() &&
|
||||
tempCall->CallState() < nsITelephone::CALL_STATE_CONNECTED) {
|
||||
// One call has been dialed already and we only support one outgoing call
|
||||
// at a time.
|
||||
NS_WARNING("Only permitted to dial one call at a time!");
|
||||
return NS_ERROR_NOT_AVAILABLE;
|
||||
}
|
||||
}
|
||||
|
||||
nsresult rv = mTelephone->Dial(aNumber);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
|
@ -357,24 +368,51 @@ NS_IMETHODIMP
|
|||
Telephony::CallStateChanged(PRUint32 aCallIndex, PRUint16 aCallState,
|
||||
const nsAString& aNumber)
|
||||
{
|
||||
// If we already know about this call then just update its state.
|
||||
NS_ASSERTION(aCallIndex != kOutgoingPlaceholderCallIndex,
|
||||
"This should never happen!");
|
||||
|
||||
nsRefPtr<TelephonyCall> modifiedCall;
|
||||
nsRefPtr<TelephonyCall> outgoingCall;
|
||||
|
||||
for (PRUint32 index = 0; index < mCalls.Length(); index++) {
|
||||
nsRefPtr<TelephonyCall>& tempCall = mCalls[index];
|
||||
if (tempCall->CallIndex() == aCallIndex) {
|
||||
// This can call back and modify the array... Grab a real ref here.
|
||||
nsRefPtr<TelephonyCall> call = tempCall;
|
||||
|
||||
// See if this should replace our current active call.
|
||||
if (aCallState == nsITelephone::CALL_STATE_CONNECTED) {
|
||||
SwitchActiveCall(call);
|
||||
}
|
||||
|
||||
// Change state.
|
||||
call->ChangeState(aCallState);
|
||||
return NS_OK;
|
||||
if (tempCall->CallIndex() == kOutgoingPlaceholderCallIndex) {
|
||||
NS_ASSERTION(!outgoingCall, "More than one outgoing call not supported!");
|
||||
NS_ASSERTION(tempCall->CallState() == nsITelephone::CALL_STATE_DIALING,
|
||||
"Something really wrong here!");
|
||||
// Stash this for later, we may need it if aCallIndex doesn't match one of
|
||||
// our other calls.
|
||||
outgoingCall = tempCall;
|
||||
} else if (tempCall->CallIndex() == aCallIndex) {
|
||||
// We already know about this call so just update its state.
|
||||
modifiedCall = tempCall;
|
||||
outgoingCall = nsnull;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// If nothing matched above and the call state isn't incoming but we do have
|
||||
// an outgoing call then we must be seeing a status update for our outgoing
|
||||
// call.
|
||||
if (!modifiedCall &&
|
||||
aCallState != nsITelephone::CALL_STATE_INCOMING &&
|
||||
outgoingCall) {
|
||||
outgoingCall->UpdateCallIndex(aCallIndex);
|
||||
modifiedCall.swap(outgoingCall);
|
||||
}
|
||||
|
||||
if (modifiedCall) {
|
||||
// Change state.
|
||||
modifiedCall->ChangeState(aCallState);
|
||||
|
||||
// See if this should replace our current active call.
|
||||
if (aCallState == nsITelephone::CALL_STATE_CONNECTED) {
|
||||
SwitchActiveCall(modifiedCall);
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
// Didn't know anything about this call before now, must be incoming.
|
||||
NS_ASSERTION(aCallState == nsITelephone::CALL_STATE_INCOMING,
|
||||
"Serious logic problem here!");
|
||||
|
@ -434,36 +472,51 @@ NS_NewTelephony(nsPIDOMWindow* aWindow, nsIDOMTelephony** aTelephony)
|
|||
aWindow->GetCurrentInnerWindow();
|
||||
NS_ENSURE_TRUE(innerWindow, NS_ERROR_FAILURE);
|
||||
|
||||
// Make sure we're being called from a window that we have permission to
|
||||
// access.
|
||||
if (!nsContentUtils::CanCallerAccess(innerWindow)) {
|
||||
return NS_ERROR_DOM_SECURITY_ERR;
|
||||
}
|
||||
|
||||
// Need the document in order to make security decisions.
|
||||
nsCOMPtr<nsIDocument> document =
|
||||
do_QueryInterface(innerWindow->GetExtantDocument());
|
||||
NS_ENSURE_TRUE(document, NS_NOINTERFACE);
|
||||
|
||||
nsCOMPtr<nsIURI> documentURI;
|
||||
nsresult rv = document->NodePrincipal()->GetURI(getter_AddRefs(documentURI));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
// Do security checks. We assume that chrome is always allowed and we also
|
||||
// allow a single page specified by preferences.
|
||||
if (!nsContentUtils::IsSystemPrincipal(document->NodePrincipal())) {
|
||||
nsCOMPtr<nsIURI> documentURI;
|
||||
nsresult rv =
|
||||
document->NodePrincipal()->GetURI(getter_AddRefs(documentURI));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
nsCString documentURL;
|
||||
rv = documentURI->GetSpec(documentURL);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
nsCString documentURL;
|
||||
rv = documentURI->GetSpec(documentURL);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
nsCString phoneAppURL;
|
||||
rv = Preferences::GetCString(DOM_TELEPHONY_APP_PHONE_URL_PREF, &phoneAppURL);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
nsRefPtr<Telephony> telephony;
|
||||
if (phoneAppURL.Equals(documentURL, nsCaseInsensitiveCStringComparator())) {
|
||||
nsIInterfaceRequestor* ireq = SystemWorkerManager::GetInterfaceRequestor();
|
||||
NS_ENSURE_TRUE(ireq, NS_ERROR_UNEXPECTED);
|
||||
|
||||
nsCOMPtr<nsITelephone> telephone = do_GetInterface(ireq);
|
||||
NS_ENSURE_TRUE(telephone, NS_ERROR_UNEXPECTED);
|
||||
|
||||
telephony = Telephony::Create(innerWindow, telephone);
|
||||
// The pref may not exist but in that case we deny access just as we do if
|
||||
// the url doesn't match.
|
||||
nsCString phoneAppURL;
|
||||
if (NS_FAILED(Preferences::GetCString(DOM_TELEPHONY_APP_PHONE_URL_PREF,
|
||||
&phoneAppURL)) ||
|
||||
!phoneAppURL.Equals(documentURL,
|
||||
nsCaseInsensitiveCStringComparator())) {
|
||||
*aTelephony = nsnull;
|
||||
return NS_OK;
|
||||
}
|
||||
}
|
||||
|
||||
// Security checks passed, make a telephony object.
|
||||
nsIInterfaceRequestor* ireq = SystemWorkerManager::GetInterfaceRequestor();
|
||||
NS_ENSURE_TRUE(ireq, NS_ERROR_UNEXPECTED);
|
||||
|
||||
nsCOMPtr<nsITelephone> telephone = do_GetInterface(ireq);
|
||||
NS_ENSURE_TRUE(telephone, NS_ERROR_UNEXPECTED);
|
||||
|
||||
nsRefPtr<Telephony> telephony = Telephony::Create(innerWindow, telephone);
|
||||
NS_ENSURE_TRUE(telephony, NS_ERROR_UNEXPECTED);
|
||||
|
||||
telephony.forget(aTelephony);
|
||||
return NS_OK;
|
||||
}
|
||||
|
|
|
@ -115,6 +115,10 @@ TelephonyCall::ChangeStateInternal(PRUint16 aCallState, bool aFireEvents)
|
|||
mState = stateString;
|
||||
mCallState = aCallState;
|
||||
|
||||
if (aCallState == nsITelephone::CALL_STATE_DIALING) {
|
||||
mOutgoing = true;
|
||||
}
|
||||
|
||||
if (aCallState == nsITelephone::CALL_STATE_DISCONNECTED) {
|
||||
NS_ASSERTION(mLive, "Should be live!");
|
||||
mTelephony->RemoveCall(this);
|
||||
|
|
|
@ -70,6 +70,7 @@ class TelephonyCall : public nsDOMEventTargetWrapperCache,
|
|||
PRUint32 mCallIndex;
|
||||
PRUint16 mCallState;
|
||||
bool mLive;
|
||||
bool mOutgoing;
|
||||
|
||||
public:
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
|
@ -80,7 +81,7 @@ public:
|
|||
|
||||
static already_AddRefed<TelephonyCall>
|
||||
Create(Telephony* aTelephony, const nsAString& aNumber, PRUint16 aCallState,
|
||||
PRUint32 aCallIndex = PR_UINT32_MAX);
|
||||
PRUint32 aCallIndex = kOutgoingPlaceholderCallIndex);
|
||||
|
||||
nsIDOMEventTarget*
|
||||
ToIDOMEventTarget() const
|
||||
|
@ -107,16 +108,30 @@ public:
|
|||
return mCallIndex;
|
||||
}
|
||||
|
||||
void
|
||||
UpdateCallIndex(PRUint32 aCallIndex)
|
||||
{
|
||||
NS_ASSERTION(mCallIndex == kOutgoingPlaceholderCallIndex,
|
||||
"Call index should not be set!");
|
||||
mCallIndex = aCallIndex;
|
||||
}
|
||||
|
||||
PRUint16
|
||||
CallState() const
|
||||
{
|
||||
return mCallState;
|
||||
}
|
||||
|
||||
bool
|
||||
IsOutgoing() const
|
||||
{
|
||||
return mOutgoing;
|
||||
}
|
||||
|
||||
private:
|
||||
TelephonyCall()
|
||||
: mCallIndex(PR_UINT32_MAX), mCallState(nsITelephone::CALL_STATE_UNKNOWN),
|
||||
mLive(false)
|
||||
: mCallIndex(kOutgoingPlaceholderCallIndex),
|
||||
mCallState(nsITelephone::CALL_STATE_UNKNOWN), mLive(false), mOutgoing(false)
|
||||
{ }
|
||||
|
||||
~TelephonyCall()
|
||||
|
|
|
@ -60,6 +60,10 @@ class nsIDOMTelephonyCall;
|
|||
|
||||
BEGIN_TELEPHONY_NAMESPACE
|
||||
|
||||
enum {
|
||||
kOutgoingPlaceholderCallIndex = PR_UINT32_MAX
|
||||
};
|
||||
|
||||
class Telephony;
|
||||
class TelephonyCall;
|
||||
|
||||
|
|
|
@ -189,30 +189,26 @@ nsTelephonyWorker.prototype = {
|
|||
* XXX Needs some more work to support hold/resume.
|
||||
*/
|
||||
_activeCall: null,
|
||||
get activeCall() {
|
||||
return this._activeCall;
|
||||
},
|
||||
set activeCall(val) {
|
||||
if (val && !this._activeCall) {
|
||||
// Enable audio.
|
||||
switch (val.state) {
|
||||
case nsITelephone.CALL_STATE_INCOMING:
|
||||
gAudioManager.phoneState = nsIAudioManager.PHONE_STATE_RINGTONE;
|
||||
break;
|
||||
case nsITelephone.CALL_STATE_DIALING: // Fall through...
|
||||
case nsITelephone.CALL_STATE_CONNECTED:
|
||||
gAudioManager.phoneState = nsIAudioManager.PHONE_STATE_IN_CALL;
|
||||
gAudioManager.setForceForUse(nsIAudioManager.USE_COMMUNICATION,
|
||||
nsIAudioManager.FORCE_NONE);
|
||||
break;
|
||||
default:
|
||||
throw new Error("Invalid call state for active call: " + val.state);
|
||||
}
|
||||
} else if (!val && this._activeCall) {
|
||||
updateCallAudioState: function updateCallAudioState() {
|
||||
if (!this._activeCall) {
|
||||
// Disable audio.
|
||||
gAudioManager.phoneState = nsIAudioManager.PHONE_STATE_NORMAL;
|
||||
debug("No active call, put audio system into PHONE_STATE_NORMAL.");
|
||||
return;
|
||||
}
|
||||
switch (this._activeCall.state) {
|
||||
case nsITelephone.CALL_STATE_INCOMING:
|
||||
gAudioManager.phoneState = nsIAudioManager.PHONE_STATE_RINGTONE;
|
||||
debug("Incoming call, put audio system into PHONE_STATE_RINGTONE.");
|
||||
break;
|
||||
case nsITelephone.CALL_STATE_DIALING: // Fall through...
|
||||
case nsITelephone.CALL_STATE_CONNECTED:
|
||||
gAudioManager.phoneState = nsIAudioManager.PHONE_STATE_IN_CALL;
|
||||
gAudioManager.setForceForUse(nsIAudioManager.USE_COMMUNICATION,
|
||||
nsIAudioManager.FORCE_NONE);
|
||||
debug("Active call, put audio system into PHONE_STATE_IN_CALL.");
|
||||
break;
|
||||
}
|
||||
this._activeCall = val;
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -222,12 +218,11 @@ nsTelephonyWorker.prototype = {
|
|||
handleCallStateChange: function handleCallStateChange(call) {
|
||||
debug("handleCallStateChange: " + JSON.stringify(call));
|
||||
call.state = convertRILCallState(call.state);
|
||||
if (call.state == nsITelephone.CALL_STATE_INCOMING ||
|
||||
call.state == nsITelephone.CALL_STATE_DIALING ||
|
||||
call.state == nsITelephone.CALL_STATE_CONNECTED) {
|
||||
if (call.state == nsITelephone.CALL_STATE_CONNECTED) {
|
||||
// This is now the active call.
|
||||
this.activeCall = call;
|
||||
this._activeCall = call;
|
||||
}
|
||||
this.updateCallAudioState();
|
||||
this._deliverCallback("callStateChanged",
|
||||
[call.callIndex, call.state, call.number]);
|
||||
},
|
||||
|
@ -235,12 +230,12 @@ nsTelephonyWorker.prototype = {
|
|||
/**
|
||||
* Handle call disconnects by updating our current state and the audio system.
|
||||
*/
|
||||
handleCallDisconnected: function handleCallStateChange(call) {
|
||||
handleCallDisconnected: function handleCallDisconnected(call) {
|
||||
debug("handleCallDisconnected: " + JSON.stringify(call));
|
||||
if (this.activeCall == call) {
|
||||
// No loner active.
|
||||
this.activeCall = null;
|
||||
if (this._activeCall.callIndex == call.callIndex) {
|
||||
this._activeCall = null;
|
||||
}
|
||||
this.updateCallAudioState();
|
||||
this._deliverCallback("callStateChanged",
|
||||
[call.callIndex, nsITelephone.CALL_STATE_DISCONNECTED,
|
||||
call.number]);
|
||||
|
@ -252,7 +247,7 @@ nsTelephonyWorker.prototype = {
|
|||
handleEnumerateCalls: function handleEnumerateCalls(calls) {
|
||||
debug("handleEnumerateCalls: " + JSON.stringify(calls));
|
||||
let callback = this._enumerationCallbacks.shift();
|
||||
let activeCallIndex = this.activeCall ? this.activeCall.callIndex : -1;
|
||||
let activeCallIndex = this._activeCall ? this._activeCall.callIndex : -1;
|
||||
for (let i in calls) {
|
||||
let call = calls[i];
|
||||
let state = convertRILCallState(call.state);
|
||||
|
@ -363,7 +358,6 @@ nsTelephonyWorker.prototype = {
|
|||
_enumerationCallbacks: null,
|
||||
|
||||
registerCallback: function registerCallback(callback) {
|
||||
debug("Registering callback: " + callback);
|
||||
if (this._callbacks) {
|
||||
if (this._callbacks.indexOf(callback) != -1) {
|
||||
throw new Error("Already registered this callback!");
|
||||
|
@ -372,13 +366,17 @@ nsTelephonyWorker.prototype = {
|
|||
this._callbacks = [];
|
||||
}
|
||||
this._callbacks.push(callback);
|
||||
debug("Registered callback: " + callback);
|
||||
},
|
||||
|
||||
unregisterCallback: function unregisterCallback(callback) {
|
||||
debug("Unregistering callback: " + callback);
|
||||
let index;
|
||||
if (this._callbacks && (index = this._callbacks.indexOf(callback) != -1)) {
|
||||
if (!this._callbacks) {
|
||||
return;
|
||||
}
|
||||
let index = this._callbacks.indexOf(callback);
|
||||
if (index != -1) {
|
||||
this._callbacks.splice(index, 1);
|
||||
debug("Unregistered callback: " + callback);
|
||||
}
|
||||
},
|
||||
|
||||
|
|
|
@ -32,6 +32,8 @@ function failureCallback(error)
|
|||
}
|
||||
|
||||
function successCallback(position) {
|
||||
ok(true, "successCallback was called, hasBeenCleared=" + hasBeenCleared +
|
||||
", successWasCalledAfterClear=" + successWasCalledAfterClear);
|
||||
if (hasBeenCleared == true) {
|
||||
successWasCalledAfterClear = true;
|
||||
}
|
||||
|
@ -39,19 +41,25 @@ function successCallback(position) {
|
|||
}
|
||||
|
||||
function clearWatch() {
|
||||
ok(true, "clearWatch was called, hasBeenCleared=" + hasBeenCleared +
|
||||
", successWasCalledAfterClear=" + successWasCalledAfterClear);
|
||||
navigator.geolocation.clearWatch(watchID);
|
||||
hasBeenCleared = true;
|
||||
SimpleTest.executeSoon(testAccepted);
|
||||
}
|
||||
|
||||
function testAccepted() {
|
||||
ok(true, "testAccepted was called, hasBeenCleared=" + hasBeenCleared +
|
||||
", successWasCalledAfterClear=" + successWasCalledAfterClear);
|
||||
ok(!successWasCalledAfterClear, "The successCallback should not be called after clear");
|
||||
reset_prompt();
|
||||
SimpleTest.finish();
|
||||
}
|
||||
|
||||
|
||||
ok(true, "Getting the watchPosition");
|
||||
watchID = navigator.geolocation.watchPosition(successCallback, failureCallback, null);
|
||||
ok(true, "Waiting");
|
||||
|
||||
</script>
|
||||
</pre>
|
||||
|
|
|
@ -235,7 +235,7 @@ CPPSRCS = \
|
|||
SkMaskFilter.cpp \
|
||||
SkMath.cpp \
|
||||
SkMatrix.cpp \
|
||||
SkMemory_stdlib.cpp \
|
||||
SkMemory_malloc.cpp \
|
||||
SkMetaData.cpp \
|
||||
SkPackBits.cpp \
|
||||
SkPaint.cpp \
|
||||
|
|
|
@ -313,7 +313,7 @@ namespace {
|
|||
* RAII class to help us remember to close file descriptors.
|
||||
*/
|
||||
const char *screenEnabledFilename = "/sys/power/state";
|
||||
const char *screenBrightnessFilename = "/sys/class/backlight/pwm-backlight/brightness";
|
||||
const char *screenBrightnessFilename = "/sys/class/leds/lcd-backlight/brightness";
|
||||
|
||||
template<ssize_t n>
|
||||
bool ReadFromFile(const char *filename, char (&buf)[n])
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
var count = 0;
|
||||
var a = {__noSuchMethod__: function() { count++; } }
|
||||
|
||||
function f() {
|
||||
for (var i = 0; i < 10; i++) {
|
||||
try {
|
||||
a.b();
|
||||
} catch (e) {
|
||||
assertEq(true, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
f();
|
||||
|
||||
assertEq(count, 10);
|
|
@ -144,7 +144,7 @@ extern JSBool js_IsRuntimeLocked(JSRuntime *rt);
|
|||
#define JS_ATOMIC_ADD(p,v) (*(p) += (v))
|
||||
#define JS_ATOMIC_SET(p,v) (*(p) = (v))
|
||||
|
||||
#define js_CurrentThreadId() (void*)NULL
|
||||
#define js_CurrentThreadId() ((void*)NULL)
|
||||
#define JS_NEW_LOCK() NULL
|
||||
#define JS_DESTROY_LOCK(l) ((void)0)
|
||||
#define JS_ACQUIRE_LOCK(l) ((void)0)
|
||||
|
|
|
@ -859,20 +859,22 @@ bool
|
|||
SecurityWrapper<Base>::nativeCall(JSContext *cx, JSObject *wrapper, Class *clasp, Native native,
|
||||
CallArgs args)
|
||||
{
|
||||
/* Let ProxyHandler report the error. */
|
||||
DebugOnly<bool> ret = ProxyHandler::nativeCall(cx, wrapper, clasp, native, args);
|
||||
JS_ASSERT(!ret);
|
||||
return false;
|
||||
/*
|
||||
* Let this through until compartment-per-global lets us have stronger
|
||||
* invariants wrt document.domain (bug 714547).
|
||||
*/
|
||||
return Base::nativeCall(cx, wrapper, clasp, native, args);
|
||||
}
|
||||
|
||||
template <class Base>
|
||||
bool
|
||||
SecurityWrapper<Base>::objectClassIs(JSObject *obj, ESClassValue classValue, JSContext *cx)
|
||||
{
|
||||
/* Let ProxyHandler say 'no'. */
|
||||
bool ret = ProxyHandler::objectClassIs(obj, classValue, cx);
|
||||
JS_ASSERT(!ret && !cx->isExceptionPending());
|
||||
return ret;
|
||||
/*
|
||||
* Let this through until compartment-per-global lets us have stronger
|
||||
* invariants wrt document.domain (bug 714547).
|
||||
*/
|
||||
return Base::objectClassIs(obj, classValue, cx);
|
||||
}
|
||||
|
||||
template class js::SecurityWrapper<Wrapper>;
|
||||
|
|
|
@ -4641,26 +4641,6 @@ mjit::Compiler::jsop_getprop(PropertyName *name, JSValueType knownType,
|
|||
|
||||
PICGenInfo pic(ic::PICInfo::GET, JSOp(*PC));
|
||||
|
||||
/* Guard that the type is an object. */
|
||||
Label typeCheck;
|
||||
if (doTypeCheck && !top->isTypeKnown()) {
|
||||
RegisterID reg = frame.tempRegForType(top);
|
||||
pic.typeReg = reg;
|
||||
|
||||
/* Start the hot path where it's easy to patch it. */
|
||||
pic.fastPathStart = masm.label();
|
||||
Jump j = masm.testObject(Assembler::NotEqual, reg);
|
||||
typeCheck = masm.label();
|
||||
RETURN_IF_OOM(false);
|
||||
|
||||
pic.typeCheck = stubcc.linkExit(j, Uses(1));
|
||||
pic.hasTypeCheck = true;
|
||||
} else {
|
||||
pic.fastPathStart = masm.label();
|
||||
pic.hasTypeCheck = false;
|
||||
pic.typeReg = Registers::ReturnReg;
|
||||
}
|
||||
|
||||
/*
|
||||
* If this access has been on a shape with a getter hook, make preparations
|
||||
* so that we can generate a stub to call the hook directly (rather than be
|
||||
|
@ -4672,10 +4652,35 @@ mjit::Compiler::jsop_getprop(PropertyName *name, JSValueType knownType,
|
|||
pic.canCallHook = pic.forcedTypeBarrier =
|
||||
!forPrototype &&
|
||||
JSOp(*PC) == JSOP_GETPROP &&
|
||||
name != cx->runtime->atomState.lengthAtom &&
|
||||
analysis->getCode(PC).accessGetter;
|
||||
if (pic.canCallHook)
|
||||
frame.syncAndKillEverything();
|
||||
|
||||
/* Guard that the type is an object. */
|
||||
Label typeCheck;
|
||||
if (doTypeCheck && !top->isTypeKnown()) {
|
||||
RegisterID reg = frame.tempRegForType(top);
|
||||
pic.typeReg = reg;
|
||||
|
||||
if (pic.canCallHook) {
|
||||
PinRegAcrossSyncAndKill p1(frame, reg);
|
||||
frame.syncAndKillEverything();
|
||||
}
|
||||
|
||||
/* Start the hot path where it's easy to patch it. */
|
||||
pic.fastPathStart = masm.label();
|
||||
Jump j = masm.testObject(Assembler::NotEqual, reg);
|
||||
typeCheck = masm.label();
|
||||
RETURN_IF_OOM(false);
|
||||
|
||||
pic.typeCheck = stubcc.linkExit(j, Uses(1));
|
||||
pic.hasTypeCheck = true;
|
||||
} else {
|
||||
if (pic.canCallHook)
|
||||
frame.syncAndKillEverything();
|
||||
|
||||
pic.fastPathStart = masm.label();
|
||||
pic.hasTypeCheck = false;
|
||||
pic.typeReg = Registers::ReturnReg;
|
||||
}
|
||||
|
||||
pic.shapeReg = shapeReg;
|
||||
pic.name = name;
|
||||
|
|
|
@ -1835,9 +1835,23 @@ class BindNameCompiler : public PICStubCompiler
|
|||
}
|
||||
};
|
||||
|
||||
static inline void
|
||||
GetPropWithStub(VMFrame &f, ic::PICInfo *pic, VoidStubPIC stub)
|
||||
static void JS_FASTCALL
|
||||
DisabledGetPropIC(VMFrame &f, ic::PICInfo *pic)
|
||||
{
|
||||
stubs::GetProp(f, pic->name);
|
||||
}
|
||||
|
||||
static void JS_FASTCALL
|
||||
DisabledGetPropNoCacheIC(VMFrame &f, ic::PICInfo *pic)
|
||||
{
|
||||
stubs::GetPropNoCache(f, pic->name);
|
||||
}
|
||||
|
||||
static inline void
|
||||
GetPropMaybeCached(VMFrame &f, ic::PICInfo *pic, bool cached)
|
||||
{
|
||||
VoidStubPIC stub = cached ? DisabledGetPropIC : DisabledGetPropNoCacheIC;
|
||||
|
||||
JSScript *script = f.fp()->script();
|
||||
|
||||
PropertyName *name = pic->name;
|
||||
|
@ -1907,34 +1921,27 @@ GetPropWithStub(VMFrame &f, ic::PICInfo *pic, VoidStubPIC stub)
|
|||
}
|
||||
|
||||
Value v;
|
||||
if (!GetPropertyGenericMaybeCallXML(f.cx, JSOp(*f.pc()), obj, ATOM_TO_JSID(name), &v))
|
||||
THROW();
|
||||
if (cached) {
|
||||
if (!GetPropertyOperation(f.cx, f.pc(), ObjectValue(*obj), &v))
|
||||
THROW();
|
||||
} else {
|
||||
if (!obj->getProperty(f.cx, name, &v))
|
||||
THROW();
|
||||
}
|
||||
|
||||
f.regs.sp[-1] = v;
|
||||
}
|
||||
|
||||
static void JS_FASTCALL
|
||||
DisabledGetPropIC(VMFrame &f, ic::PICInfo *pic)
|
||||
{
|
||||
stubs::GetProp(f, pic->name);
|
||||
}
|
||||
|
||||
static void JS_FASTCALL
|
||||
DisabledGetPropNoCacheIC(VMFrame &f, ic::PICInfo *pic)
|
||||
{
|
||||
stubs::GetPropNoCache(f, pic->name);
|
||||
}
|
||||
|
||||
void JS_FASTCALL
|
||||
ic::GetProp(VMFrame &f, ic::PICInfo *pic)
|
||||
{
|
||||
GetPropWithStub(f, pic, DisabledGetPropIC);
|
||||
GetPropMaybeCached(f, pic, /* cache = */ true);
|
||||
}
|
||||
|
||||
void JS_FASTCALL
|
||||
ic::GetPropNoCache(VMFrame &f, ic::PICInfo *pic)
|
||||
{
|
||||
GetPropWithStub(f, pic, DisabledGetPropNoCacheIC);
|
||||
GetPropMaybeCached(f, pic, /* cache = */ false);
|
||||
}
|
||||
|
||||
template <JSBool strict>
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
* vim: set ts=4 sw=4 et tw=99 ft=cpp:
|
||||
*
|
||||
* ***** BEGIN LICENSE BLOCK *****
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
||||
/* vim: set ts=4 sw=4 et tw=99 ft=cpp: */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
|
@ -18,10 +17,12 @@
|
|||
* June 24, 2010.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* The Mozilla Foundation
|
||||
* the Mozilla Foundation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 2010
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Andreas Gal <gal@mozilla.com>
|
||||
* Andreas Gal <gal@mozilla.com>
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either of the GNU General Public License Version 2 or later (the "GPL"),
|
||||
|
|
|
@ -7506,9 +7506,10 @@ PresShell::ProcessReflowCommands(bool aInterruptible)
|
|||
UnsuppressAndInvalidate();
|
||||
}
|
||||
|
||||
if (mDocument->GetRootElement() && mDocument->GetRootElement()->IsXUL()) {
|
||||
mozilla::Telemetry::AccumulateTimeDelta(Telemetry::XUL_REFLOW_MS,
|
||||
timerStart);
|
||||
if (mDocument->GetRootElement()) {
|
||||
Telemetry::ID id = (mDocument->GetRootElement()->IsXUL()
|
||||
? Telemetry::XUL_REFLOW_MS : Telemetry::HTML_REFLOW_MS);
|
||||
Telemetry::AccumulateTimeDelta(id, timerStart);
|
||||
}
|
||||
|
||||
return !interrupted;
|
||||
|
|
|
@ -114,7 +114,7 @@
|
|||
#include "nsDOMException.h"
|
||||
#include "nsDOMFileReader.h"
|
||||
#include "nsFormData.h"
|
||||
#include "nsFileDataProtocolHandler.h"
|
||||
#include "nsBlobProtocolHandler.h"
|
||||
#include "nsGlobalWindowCommands.h"
|
||||
#include "nsIControllerCommandTable.h"
|
||||
#include "nsJSProtocolHandler.h"
|
||||
|
@ -274,7 +274,7 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(nsEventSource)
|
|||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsWebSocket)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsDOMFileReader, Init)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsFormData)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsFileDataProtocolHandler)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsBlobProtocolHandler)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsDOMParser)
|
||||
NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(nsDOMStorageManager,
|
||||
nsDOMStorageManager::GetInstance)
|
||||
|
@ -738,7 +738,7 @@ NS_DEFINE_NAMED_CID(TRANSFORMIIX_NODESET_CID);
|
|||
NS_DEFINE_NAMED_CID(NS_XMLSERIALIZER_CID);
|
||||
NS_DEFINE_NAMED_CID(NS_FILEREADER_CID);
|
||||
NS_DEFINE_NAMED_CID(NS_FORMDATA_CID);
|
||||
NS_DEFINE_NAMED_CID(NS_FILEDATAPROTOCOLHANDLER_CID);
|
||||
NS_DEFINE_NAMED_CID(NS_BLOBPROTOCOLHANDLER_CID);
|
||||
NS_DEFINE_NAMED_CID(NS_XMLHTTPREQUEST_CID);
|
||||
NS_DEFINE_NAMED_CID(NS_EVENTSOURCE_CID);
|
||||
NS_DEFINE_NAMED_CID(NS_WEBSOCKET_CID);
|
||||
|
@ -1009,7 +1009,7 @@ static const mozilla::Module::CIDEntry kLayoutCIDs[] = {
|
|||
{ &kNS_XMLSERIALIZER_CID, false, NULL, nsDOMSerializerConstructor },
|
||||
{ &kNS_FILEREADER_CID, false, NULL, nsDOMFileReaderConstructor },
|
||||
{ &kNS_FORMDATA_CID, false, NULL, nsFormDataConstructor },
|
||||
{ &kNS_FILEDATAPROTOCOLHANDLER_CID, false, NULL, nsFileDataProtocolHandlerConstructor },
|
||||
{ &kNS_BLOBPROTOCOLHANDLER_CID, false, NULL, nsBlobProtocolHandlerConstructor },
|
||||
{ &kNS_XMLHTTPREQUEST_CID, false, NULL, nsXMLHttpRequestConstructor },
|
||||
{ &kNS_EVENTSOURCE_CID, false, NULL, nsEventSourceConstructor },
|
||||
{ &kNS_WEBSOCKET_CID, false, NULL, nsWebSocketConstructor },
|
||||
|
@ -1145,7 +1145,7 @@ static const mozilla::Module::ContractIDEntry kLayoutContracts[] = {
|
|||
{ NS_XMLSERIALIZER_CONTRACTID, &kNS_XMLSERIALIZER_CID },
|
||||
{ NS_FILEREADER_CONTRACTID, &kNS_FILEREADER_CID },
|
||||
{ NS_FORMDATA_CONTRACTID, &kNS_FORMDATA_CID },
|
||||
{ NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX FILEDATA_SCHEME, &kNS_FILEDATAPROTOCOLHANDLER_CID },
|
||||
{ NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX BLOBURI_SCHEME, &kNS_BLOBPROTOCOLHANDLER_CID },
|
||||
{ NS_XMLHTTPREQUEST_CONTRACTID, &kNS_XMLHTTPREQUEST_CID },
|
||||
{ NS_EVENTSOURCE_CONTRACTID, &kNS_EVENTSOURCE_CID },
|
||||
{ NS_WEBSOCKET_CONTRACTID, &kNS_WEBSOCKET_CID },
|
||||
|
|
|
@ -86,7 +86,7 @@ interface nsICapturePicker : nsISupports
|
|||
|
||||
/**
|
||||
* Get the captured image/video/audio. This may be a data URI, file URI,
|
||||
* or a moz-filedata reference URI.
|
||||
* or a blob reference URI.
|
||||
*/
|
||||
readonly attribute nsIDOMFile file;
|
||||
|
||||
|
|
|
@ -208,7 +208,10 @@ public:
|
|||
// The 'position' is a zero-width rectangle.
|
||||
nsIFrame* GetSelectionEndPointGeometry(SelectionRegion aRegion, nsRect *aRect);
|
||||
|
||||
nsresult PostScrollSelectionIntoViewEvent(SelectionRegion aRegion, bool aFirstAncestorOnly);
|
||||
nsresult PostScrollSelectionIntoViewEvent(SelectionRegion aRegion,
|
||||
bool aFirstAncestorOnly,
|
||||
PRInt16 aVPercent,
|
||||
PRInt16 aHPercent);
|
||||
enum {
|
||||
SCROLL_SYNCHRONOUS = 1<<1,
|
||||
SCROLL_FIRST_ANCESTOR_ONLY = 1<<2,
|
||||
|
@ -285,9 +288,13 @@ private:
|
|||
NS_DECL_NSIRUNNABLE
|
||||
ScrollSelectionIntoViewEvent(nsTypedSelection *aTypedSelection,
|
||||
SelectionRegion aRegion,
|
||||
PRInt16 aVScroll,
|
||||
PRInt16 aHScroll,
|
||||
bool aFirstAncestorOnly)
|
||||
: mTypedSelection(aTypedSelection),
|
||||
mRegion(aRegion),
|
||||
mVerticalScroll(aVScroll),
|
||||
mHorizontalScroll(aHScroll),
|
||||
mFirstAncestorOnly(aFirstAncestorOnly) {
|
||||
NS_ASSERTION(aTypedSelection, "null parameter");
|
||||
}
|
||||
|
@ -295,6 +302,8 @@ private:
|
|||
private:
|
||||
nsTypedSelection *mTypedSelection;
|
||||
SelectionRegion mRegion;
|
||||
PRInt16 mVerticalScroll;
|
||||
PRInt16 mHorizontalScroll;
|
||||
bool mFirstAncestorOnly;
|
||||
};
|
||||
|
||||
|
@ -1151,8 +1160,7 @@ nsFrameSelection::MoveCaret(PRUint32 aKeycode,
|
|||
anchorFocusRange->StartOffset());
|
||||
}
|
||||
mHint = HINTRIGHT;
|
||||
sel->ScrollIntoView(nsISelectionController::SELECTION_FOCUS_REGION,
|
||||
false, false);
|
||||
sel->ScrollIntoView(nsISelectionController::SELECTION_FOCUS_REGION);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
@ -1165,8 +1173,7 @@ nsFrameSelection::MoveCaret(PRUint32 aKeycode,
|
|||
anchorFocusRange->EndOffset());
|
||||
}
|
||||
mHint = HINTLEFT;
|
||||
sel->ScrollIntoView(nsISelectionController::SELECTION_FOCUS_REGION,
|
||||
false, false);
|
||||
sel->ScrollIntoView(nsISelectionController::SELECTION_FOCUS_REGION);
|
||||
return NS_OK;
|
||||
}
|
||||
}
|
||||
|
@ -1292,8 +1299,7 @@ nsFrameSelection::MoveCaret(PRUint32 aKeycode,
|
|||
if (NS_SUCCEEDED(result))
|
||||
{
|
||||
result = mDomSelections[index]->
|
||||
ScrollIntoView(nsISelectionController::SELECTION_FOCUS_REGION,
|
||||
false, false);
|
||||
ScrollIntoView(nsISelectionController::SELECTION_FOCUS_REGION);
|
||||
}
|
||||
|
||||
return result;
|
||||
|
@ -1966,17 +1972,21 @@ nsFrameSelection::ScrollSelectionIntoView(SelectionType aType,
|
|||
if (!mDomSelections[index])
|
||||
return NS_ERROR_NULL_POINTER;
|
||||
|
||||
PRInt16 verticalScroll = PRInt16(NS_PRESSHELL_SCROLL_ANYWHERE);
|
||||
PRInt32 flags = nsTypedSelection::SCROLL_DO_FLUSH;
|
||||
if (aFlags & nsISelectionController::SCROLL_SYNCHRONOUS) {
|
||||
flags |= nsTypedSelection::SCROLL_SYNCHRONOUS;
|
||||
} else if (aFlags & nsISelectionController::SCROLL_FIRST_ANCESTOR_ONLY) {
|
||||
flags |= nsTypedSelection::SCROLL_FIRST_ANCESTOR_ONLY;
|
||||
}
|
||||
if (aFlags & nsISelectionController::SCROLL_CENTER_VERTICALLY) {
|
||||
verticalScroll = PRInt16(NS_PRESSHELL_SCROLL_CENTER);
|
||||
}
|
||||
|
||||
// After ScrollSelectionIntoView(), the pending notifications might be
|
||||
// flushed and PresShell/PresContext/Frames may be dead. See bug 418470.
|
||||
return mDomSelections[index]->ScrollIntoView(aRegion,
|
||||
PRInt16(NS_PRESSHELL_SCROLL_ANYWHERE),
|
||||
verticalScroll,
|
||||
PRInt16(NS_PRESSHELL_SCROLL_ANYWHERE),
|
||||
flags);
|
||||
}
|
||||
|
@ -4834,8 +4844,7 @@ nsTypedSelection::RemoveRange(nsIDOMRange* aDOMRange)
|
|||
// in the background. We don't want to scroll in this case or the view
|
||||
// might appear to be moving randomly (bug 337871).
|
||||
if (mType != nsISelectionController::SELECTION_SPELLCHECK && cnt > 0)
|
||||
ScrollIntoView(nsISelectionController::SELECTION_FOCUS_REGION, false,
|
||||
false);
|
||||
ScrollIntoView(nsISelectionController::SELECTION_FOCUS_REGION);
|
||||
}
|
||||
|
||||
if (!mFrameSelection)
|
||||
|
@ -5569,15 +5578,16 @@ nsTypedSelection::ScrollSelectionIntoViewEvent::Run()
|
|||
}
|
||||
|
||||
mTypedSelection->mScrollEvent.Forget();
|
||||
mTypedSelection->ScrollIntoView(mRegion,
|
||||
PRInt16(NS_PRESSHELL_SCROLL_ANYWHERE),
|
||||
PRInt16(NS_PRESSHELL_SCROLL_ANYWHERE),
|
||||
flags);
|
||||
mTypedSelection->ScrollIntoView(mRegion, mVerticalScroll,
|
||||
mHorizontalScroll, flags);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult
|
||||
nsTypedSelection::PostScrollSelectionIntoViewEvent(SelectionRegion aRegion, bool aFirstAncestorOnly)
|
||||
nsTypedSelection::PostScrollSelectionIntoViewEvent(SelectionRegion aRegion,
|
||||
bool aFirstAncestorOnly,
|
||||
PRInt16 aVPercent,
|
||||
PRInt16 aHPercent)
|
||||
{
|
||||
// If we've already posted an event, revoke it and place a new one at the
|
||||
// end of the queue to make sure that any new pending reflow events are
|
||||
|
@ -5586,7 +5596,8 @@ nsTypedSelection::PostScrollSelectionIntoViewEvent(SelectionRegion aRegion, bool
|
|||
mScrollEvent.Revoke();
|
||||
|
||||
nsRefPtr<ScrollSelectionIntoViewEvent> ev =
|
||||
new ScrollSelectionIntoViewEvent(this, aRegion, aFirstAncestorOnly);
|
||||
new ScrollSelectionIntoViewEvent(this, aRegion, aVPercent, aHPercent,
|
||||
aFirstAncestorOnly);
|
||||
nsresult rv = NS_DispatchToCurrentThread(ev);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
|
@ -5616,7 +5627,8 @@ nsTypedSelection::ScrollIntoView(SelectionRegion aRegion,
|
|||
|
||||
if (!(aFlags & nsTypedSelection::SCROLL_SYNCHRONOUS))
|
||||
return PostScrollSelectionIntoViewEvent(aRegion,
|
||||
!!(aFlags & nsTypedSelection::SCROLL_FIRST_ANCESTOR_ONLY));
|
||||
!!(aFlags & nsTypedSelection::SCROLL_FIRST_ANCESTOR_ONLY),
|
||||
aVPercent, aHPercent);
|
||||
|
||||
//
|
||||
// Shut the caret off before scrolling to avoid
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
<!DOCTYPE html>
|
||||
<!-- This test checks to be sure we can render SVG-as-an-image
|
||||
from a MozBlobBuilder-generated 'moz-filedata' URI. -->
|
||||
from a MozBlobBuilder-generated 'blob' URI. -->
|
||||
<html class="reftest-wait">
|
||||
<head>
|
||||
<script>
|
||||
function go() {
|
||||
// Generate a moz-filedata URL encoding of an SVG document
|
||||
// Generate a blob URL encoding of an SVG document
|
||||
var filedataURL = generateMozFiledataURL();
|
||||
|
||||
// Tell our img element to render the URL
|
||||
|
@ -18,7 +18,7 @@
|
|||
});
|
||||
}
|
||||
|
||||
// Helper function -- returns a moz-filedata URL representing a
|
||||
// Helper function -- returns a blob URL representing a
|
||||
// 100x100 fully-lime SVG document.
|
||||
function generateMozFiledataURL() {
|
||||
var blobBuilder = new self.MozBlobBuilder;
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
<!DOCTYPE html>
|
||||
<!-- This test checks to be sure we allow MozBlobBuilder-generated
|
||||
'moz-filedata' URIs *inside of* SVG-as-an-image. -->
|
||||
'blob' URIs *inside of* SVG-as-an-image. -->
|
||||
<html class="reftest-wait">
|
||||
<head>
|
||||
<script>
|
||||
function go() {
|
||||
// Generate a moz-filedata URL encoding of an SVG document
|
||||
// Generate a blob URL encoding of an SVG document
|
||||
var filedataURL = generateMozFiledataURL();
|
||||
|
||||
// Now generate a data URI, containing our moz-filedata URI
|
||||
// Now generate a data URI, containing our blob URI
|
||||
var outerSVG =
|
||||
'<svg xmlns="http://www.w3.org/2000/svg" ' +
|
||||
'xmlns:xlink="http://www.w3.org/1999/xlink" ' +
|
||||
|
@ -27,7 +27,7 @@
|
|||
});
|
||||
}
|
||||
|
||||
// Helper function -- returns a moz-filedata URL representing a
|
||||
// Helper function -- returns a blob URL representing a
|
||||
// 100x100 fully-lime SVG document.
|
||||
function generateMozFiledataURL() {
|
||||
var blobBuilder = new self.MozBlobBuilder;
|
||||
|
|
|
@ -0,0 +1,27 @@
|
|||
<!--
|
||||
Any copyright is dedicated to the Public Domain.
|
||||
http://creativecommons.org/publicdomain/zero/1.0/
|
||||
-->
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="reftest-wait" onload="sample()">
|
||||
<script>
|
||||
var curXScale = 3;
|
||||
function sample() {
|
||||
var g = document.getElementById("g");
|
||||
g.setAttribute("transform", "scale(" + curXScale + " 1)");
|
||||
|
||||
if (curXScale > 1) {
|
||||
curXScale -= 0.1;
|
||||
setTimeout("sample()", 1);
|
||||
} else {
|
||||
document.documentElement.removeAttribute('class');
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<rect width="100%" height="100%" fill="lime"/>
|
||||
<g font-family="sans-serif" font-weight="bold" font-size="120px" id="g">
|
||||
<text y="100">A</text>
|
||||
<text y="250">V</text>
|
||||
</g>
|
||||
<rect width="100" height="100%" fill="lime"/>
|
||||
</svg>
|
После Ширина: | Высота: | Размер: 796 B |
|
@ -98,6 +98,7 @@ include svg-integration/reftest.list
|
|||
== dynamic-text-03.svg dynamic-text-03-ref.svg
|
||||
fails-if(/^Windows\x20NT\x205\.1/.test(http.oscpu)) == dynamic-text-04.svg dynamic-text-04-ref.svg # bug 421587 for WinXP
|
||||
== dynamic-text-05.svg pass.svg
|
||||
== dynamic-text-06.svg pass.svg
|
||||
== dynamic-textPath-01.svg dynamic-textPath-01-ref.svg
|
||||
== dynamic-use-01.svg pass.svg
|
||||
== dynamic-use-02.svg pass.svg
|
||||
|
|
|
@ -2013,10 +2013,7 @@ nsCSSKeyframesRule::InsertRule(const nsAString& aRule)
|
|||
nsRefPtr<nsCSSKeyframeRule> rule =
|
||||
parser.ParseKeyframeRule(aRule, nsnull, 0);
|
||||
if (rule) {
|
||||
mRules.AppendObject(rule);
|
||||
if (mSheet) {
|
||||
mSheet->SetModifiedByChildRule();
|
||||
}
|
||||
AppendStyleRule(rule);
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
|
|
|
@ -133,6 +133,7 @@ _TEST_FILES = test_acid3_test46.html \
|
|||
test_bug645998.html \
|
||||
file_bug645998-1.css \
|
||||
file_bug645998-2.css \
|
||||
test_bug716226.html \
|
||||
test_cascade.html \
|
||||
test_ch_ex_no_infloops.html \
|
||||
test_compute_data_with_start_struct.html \
|
||||
|
|
|
@ -0,0 +1,52 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<!--
|
||||
https://bugzilla.mozilla.org/show_bug.cgi?id=716226
|
||||
-->
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Test for Bug 716226</title>
|
||||
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
<style id="s">
|
||||
@-moz-keyframes foo { }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=716226">Mozilla Bug 716226</a>
|
||||
<p id="display"></p>
|
||||
<div id="content" style="display: none">
|
||||
|
||||
</div>
|
||||
<pre id="test">
|
||||
<script type="application/javascript">
|
||||
|
||||
/** Test for Bug 716226 **/
|
||||
var sheet = $("s").sheet;
|
||||
var rules = sheet.cssRules;
|
||||
is(rules.length, 1, "Should have one keyframes rule");
|
||||
var keyframesRule = rules[0];
|
||||
var keyframeRules = keyframesRule.cssRules;
|
||||
is(keyframeRules.length, 0, "Should have no keyframe rules yet");
|
||||
|
||||
keyframesRule.insertRule('0% { }');
|
||||
is(keyframeRules.length, 1, "Should have a keyframe rule now");
|
||||
var keyframeRule = keyframeRules[0];
|
||||
is(keyframeRule.parentRule, keyframesRule,
|
||||
"Parent of keyframe should be keyframes");
|
||||
is(keyframeRule.parentStyleSheet, sheet,
|
||||
"Parent stylesheet of keyframe should be our sheet");
|
||||
|
||||
is(keyframeRule.style.cssText, "", "Should have no declarations yet");
|
||||
// Note: purposefully non-canonical cssText string so we can make sure we
|
||||
// really invoked the CSS parser and serializer.
|
||||
keyframeRule.style.cssText = "color:green";
|
||||
is(keyframeRule.style.cssText, "color: green;",
|
||||
"Should have the declarations we set now");
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
</pre>
|
||||
</body>
|
||||
</html>
|
|
@ -45,6 +45,7 @@ include $(DEPTH)/config/autoconf.mk
|
|||
MODULE = layout
|
||||
LIBRARY_NAME = gksvgbase_s
|
||||
LIBXUL_LIBRARY = 1
|
||||
FAIL_ON_WARNINGS = 1
|
||||
|
||||
|
||||
CPPSRCS = \
|
||||
|
|
|
@ -464,11 +464,9 @@ nsSVGGlyphFrame::UpdateCoveredRegion()
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
mPropagateTransform = false;
|
||||
CharacterIterator iter(this, true);
|
||||
iter.SetInitialMatrix(tmpCtx);
|
||||
AddBoundingBoxesToPath(&iter, tmpCtx);
|
||||
mPropagateTransform = true;
|
||||
tmpCtx->IdentityMatrix();
|
||||
|
||||
// Be careful when replacing the following logic to get the fill and stroke
|
||||
|
@ -1462,23 +1460,10 @@ nsSVGGlyphFrame::NotifyGlyphMetricsChange()
|
|||
containerFrame->NotifyGlyphMetricsChange();
|
||||
}
|
||||
|
||||
bool
|
||||
nsSVGGlyphFrame::GetGlobalTransform(gfxMatrix *aMatrix)
|
||||
{
|
||||
if (!mPropagateTransform) {
|
||||
aMatrix->Reset();
|
||||
return true;
|
||||
}
|
||||
|
||||
*aMatrix = GetCanvasTM();
|
||||
return !aMatrix->IsSingular();
|
||||
}
|
||||
|
||||
void
|
||||
nsSVGGlyphFrame::SetupGlobalTransform(gfxContext *aContext)
|
||||
{
|
||||
gfxMatrix matrix;
|
||||
GetGlobalTransform(&matrix);
|
||||
gfxMatrix matrix = GetCanvasTM();
|
||||
if (!matrix.IsSingular()) {
|
||||
aContext->Multiply(matrix);
|
||||
}
|
||||
|
@ -1557,7 +1542,8 @@ nsSVGGlyphFrame::EnsureTextRun(float *aDrawScale, float *aMetricsScale,
|
|||
gfxMatrix m;
|
||||
if (aForceGlobalTransform ||
|
||||
!(GetStateBits() & NS_STATE_SVG_NONDISPLAY_CHILD)) {
|
||||
if (!GetGlobalTransform(&m))
|
||||
m = GetCanvasTM();
|
||||
if (m.IsSingular())
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -68,8 +68,7 @@ protected:
|
|||
mStartIndex(0),
|
||||
mCompressWhitespace(true),
|
||||
mTrimLeadingWhitespace(false),
|
||||
mTrimTrailingWhitespace(false),
|
||||
mPropagateTransform(true)
|
||||
mTrimTrailingWhitespace(false)
|
||||
{}
|
||||
~nsSVGGlyphFrame()
|
||||
{
|
||||
|
@ -232,7 +231,6 @@ protected:
|
|||
gfxContext *aContext);
|
||||
|
||||
void NotifyGlyphMetricsChange();
|
||||
bool GetGlobalTransform(gfxMatrix *aMatrix);
|
||||
void SetupGlobalTransform(gfxContext *aContext);
|
||||
nsresult GetHighlight(PRUint32 *charnum, PRUint32 *nchars,
|
||||
nscolor *foreground, nscolor *background);
|
||||
|
@ -255,7 +253,6 @@ protected:
|
|||
bool mCompressWhitespace;
|
||||
bool mTrimLeadingWhitespace;
|
||||
bool mTrimTrailingWhitespace;
|
||||
bool mPropagateTransform;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
@ -622,7 +622,15 @@ public class AwesomeBarTabs extends TabHost {
|
|||
mAllPagesCursorAdapter.setFilterQueryProvider(new FilterQueryProvider() {
|
||||
public Cursor runQuery(CharSequence constraint) {
|
||||
ContentResolver resolver = mContext.getContentResolver();
|
||||
return BrowserDB.filter(resolver, constraint, MAX_RESULTS);
|
||||
long start = new Date().getTime();
|
||||
|
||||
Cursor c = BrowserDB.filter(resolver, constraint, MAX_RESULTS);
|
||||
c.getCount(); // ensure the query runs at least once
|
||||
|
||||
long end = new Date().getTime();
|
||||
Log.i(LOGTAG, "Got cursor in " + (end - start) + "ms");
|
||||
|
||||
return c;
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -358,8 +358,6 @@ RES_DRAWABLE_HDPI_V9 = \
|
|||
$(NULL)
|
||||
|
||||
RES_DRAWABLE_MDPI_V11 = \
|
||||
res/drawable-mdpi-v11/ic_awesomebar_go.png \
|
||||
res/drawable-mdpi-v11/ic_awesomebar_search.png \
|
||||
res/drawable-mdpi-v11/ic_menu_bookmark_add.png \
|
||||
res/drawable-mdpi-v11/ic_menu_bookmark_remove.png \
|
||||
res/drawable-mdpi-v11/ic_menu_find_in_page.png \
|
||||
|
@ -370,8 +368,6 @@ RES_DRAWABLE_MDPI_V11 = \
|
|||
$(NULL)
|
||||
|
||||
RES_DRAWABLE_HDPI_V11 = \
|
||||
res/drawable-hdpi-v11/ic_awesomebar_go.png \
|
||||
res/drawable-hdpi-v11/ic_awesomebar_search.png \
|
||||
res/drawable-hdpi-v11/ic_menu_bookmark_add.png \
|
||||
res/drawable-hdpi-v11/ic_menu_bookmark_remove.png \
|
||||
res/drawable-hdpi-v11/ic_menu_find_in_page.png \
|
||||
|
|
|
@ -58,7 +58,8 @@ import org.mozilla.gecko.db.BrowserDB;
|
|||
public class Tab {
|
||||
public static enum AgentMode { MOBILE, DESKTOP };
|
||||
private static final String LOGTAG = "GeckoTab";
|
||||
private static final int kThumbnailSize = 96;
|
||||
private static final int kThumbnailWidth = 120;
|
||||
private static final int kThumbnailHeight = 80;
|
||||
|
||||
static int sMinDim = 0;
|
||||
static float sDensity = 1;
|
||||
|
@ -152,13 +153,13 @@ public class Tab {
|
|||
if (sMinDim == 0) {
|
||||
DisplayMetrics metrics = new DisplayMetrics();
|
||||
GeckoApp.mAppContext.getWindowManager().getDefaultDisplay().getMetrics(metrics);
|
||||
sMinDim = Math.min(metrics.widthPixels, metrics.heightPixels);
|
||||
sMinDim = Math.min(metrics.widthPixels / 3, metrics.heightPixels / 2);
|
||||
sDensity = metrics.density;
|
||||
}
|
||||
if (b != null) {
|
||||
try {
|
||||
Bitmap cropped = Bitmap.createBitmap(b, 0, 0, sMinDim, sMinDim);
|
||||
Bitmap bitmap = Bitmap.createScaledBitmap(cropped, kThumbnailSize, kThumbnailSize, false);
|
||||
Bitmap cropped = Bitmap.createBitmap(b, 0, 0, sMinDim * 3, sMinDim * 2);
|
||||
Bitmap bitmap = Bitmap.createScaledBitmap(cropped, (int) (kThumbnailWidth * sDensity), (int) (kThumbnailHeight * sDensity), false);
|
||||
saveThumbnailToDB(new BitmapDrawable(bitmap));
|
||||
b.recycle();
|
||||
|
||||
|
|
|
@ -83,9 +83,8 @@ public class BrowserDB {
|
|||
}
|
||||
|
||||
static {
|
||||
// FIXME: Still need to figure out how to use local or android
|
||||
// database here.
|
||||
sDb = new AndroidBrowserDB();
|
||||
// Forcing local DB no option to switch to Android DB for now
|
||||
sDb = new LocalBrowserDB(BrowserContract.DEFAULT_PROFILE);
|
||||
}
|
||||
|
||||
public static Cursor filter(ContentResolver cr, CharSequence constraint, int limit, CharSequence urlFilter) {
|
||||
|
|
|
@ -693,9 +693,9 @@ public class BrowserProvider extends ContentProvider {
|
|||
|
||||
String url = values.getAsString(Bookmarks.URL);
|
||||
ContentValues imageValues = extractImageValues(values, url);
|
||||
Boolean isFolder = values.getAsInteger(Bookmarks.IS_FOLDER) == 1;
|
||||
Integer isFolder = values.getAsInteger(Bookmarks.IS_FOLDER);
|
||||
|
||||
if ((isFolder == null || !isFolder) && imageValues != null
|
||||
if ((isFolder == null || isFolder != 1) && imageValues != null
|
||||
&& !TextUtils.isEmpty(url)) {
|
||||
Log.d(LOGTAG, "Inserting bookmark image for URL: " + url);
|
||||
updateOrInsertImage(uri, imageValues, Images.URL + " = ?",
|
||||
|
|
До Ширина: | Высота: | Размер: 320 B |
До Ширина: | Высота: | Размер: 361 B |
До Ширина: | Высота: | Размер: 876 B После Ширина: | Высота: | Размер: 662 B |
До Ширина: | Высота: | Размер: 1.6 KiB После Ширина: | Высота: | Размер: 1.1 KiB |
Двоичные данные
mobile/android/base/resources/drawable-hdpi-v8/tab_close.png
До Ширина: | Высота: | Размер: 951 B После Ширина: | Высота: | Размер: 913 B |
Двоичные данные
mobile/android/base/resources/drawable-hdpi-v8/tab_new.png
До Ширина: | Высота: | Размер: 345 B После Ширина: | Высота: | Размер: 584 B |
Двоичные данные
mobile/android/base/resources/drawable-hdpi-v8/urlbar_stop.png
До Ширина: | Высота: | Размер: 1.1 KiB После Ширина: | Высота: | Размер: 792 B |
До Ширина: | Высота: | Размер: 809 B После Ширина: | Высота: | Размер: 577 B |
До Ширина: | Высота: | Размер: 1.3 KiB После Ширина: | Высота: | Размер: 922 B |
До Ширина: | Высота: | Размер: 987 B После Ширина: | Высота: | Размер: 707 B |
До Ширина: | Высота: | Размер: 564 B После Ширина: | Высота: | Размер: 282 B |
До Ширина: | Высота: | Размер: 933 B После Ширина: | Высота: | Размер: 432 B |
До Ширина: | Высота: | Размер: 691 B После Ширина: | Высота: | Размер: 317 B |
До Ширина: | Высота: | Размер: 975 B После Ширина: | Высота: | Размер: 773 B |
До Ширина: | Высота: | Размер: 1.7 KiB После Ширина: | Высота: | Размер: 1.3 KiB |
До Ширина: | Высота: | Размер: 1.1 KiB После Ширина: | Высота: | Размер: 828 B |
До Ширина: | Высота: | Размер: 277 B |
До Ширина: | Высота: | Размер: 280 B |
До Ширина: | Высота: | Размер: 660 B После Ширина: | Высота: | Размер: 492 B |
До Ширина: | Высота: | Размер: 1.1 KiB После Ширина: | Высота: | Размер: 799 B |
Двоичные данные
mobile/android/base/resources/drawable-mdpi-v8/tab_close.png
До Ширина: | Высота: | Размер: 673 B После Ширина: | Высота: | Размер: 669 B |
Двоичные данные
mobile/android/base/resources/drawable-mdpi-v8/tab_new.png
До Ширина: | Высота: | Размер: 319 B После Ширина: | Высота: | Размер: 481 B |
Двоичные данные
mobile/android/base/resources/drawable-mdpi-v8/urlbar_stop.png
До Ширина: | Высота: | Размер: 837 B После Ширина: | Высота: | Размер: 569 B |
До Ширина: | Высота: | Размер: 1.0 KiB После Ширина: | Высота: | Размер: 866 B |
До Ширина: | Высота: | Размер: 2.0 KiB После Ширина: | Высота: | Размер: 1.5 KiB |
Двоичные данные
mobile/android/base/resources/drawable-xhdpi-v11/tab_close.png
До Ширина: | Высота: | Размер: 1.1 KiB После Ширина: | Высота: | Размер: 1005 B |
Двоичные данные
mobile/android/base/resources/drawable-xhdpi-v11/tab_new.png
До Ширина: | Высота: | Размер: 388 B После Ширина: | Высота: | Размер: 481 B |
Двоичные данные
mobile/android/base/resources/drawable-xhdpi-v11/urlbar_stop.png
До Ширина: | Высота: | Размер: 1.2 KiB После Ширина: | Высота: | Размер: 966 B |
|
@ -4,7 +4,7 @@
|
|||
<item android:right="44dp">
|
||||
<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:src="@drawable/address_bar_texture"
|
||||
android:tileMode="repeat"
|
||||
android:tileMode="mirror"
|
||||
android:dither="false"/>
|
||||
</item>
|
||||
|
||||
|
|
|
@ -969,12 +969,9 @@ var NativeWindow = {
|
|||
},
|
||||
contextmenus: {
|
||||
items: {}, // a list of context menu items that we may show
|
||||
textContext: null, // saved selector for text input areas
|
||||
|
||||
_contextId: 0, // id to assign to new context menu items if they are added
|
||||
|
||||
init: function() {
|
||||
this.textContext = this.SelectorContext("input[type='text'],input[type='password'],textarea");
|
||||
this.imageContext = this.SelectorContext("img");
|
||||
|
||||
Services.obs.addObserver(this, "Gesture:LongPress", false);
|
||||
|
@ -1080,6 +1077,13 @@ var NativeWindow = {
|
|||
}
|
||||
},
|
||||
|
||||
textContext: {
|
||||
matches: function textContext(aElement) {
|
||||
return ((aElement instanceof Ci.nsIDOMHTMLInputElement && aElement.mozIsTextField(false))
|
||||
|| aElement instanceof Ci.nsIDOMHTMLTextAreaElement);
|
||||
}
|
||||
},
|
||||
|
||||
_sendToContent: function(aX, aY) {
|
||||
// initially we look for nearby clickable elements. If we don't find one we fall back to using whatever this click was on
|
||||
let rootElement = ElementTouchHelper.elementFromPoint(BrowserApp.selectedBrowser.contentWindow, aX, aY);
|
||||
|
@ -3435,7 +3439,7 @@ var ClipboardHelper = {
|
|||
init: function() {
|
||||
NativeWindow.contextmenus.add(Strings.browser.GetStringFromName("contextmenu.copy"), ClipboardHelper.getCopyContext(false), ClipboardHelper.copy.bind(ClipboardHelper));
|
||||
NativeWindow.contextmenus.add(Strings.browser.GetStringFromName("contextmenu.copyAll"), ClipboardHelper.getCopyContext(true), ClipboardHelper.copy.bind(ClipboardHelper));
|
||||
NativeWindow.contextmenus.add(Strings.browser.GetStringFromName("contextmenu.selectAll"), NativeWindow.contextmenus.textContext, ClipboardHelper.select.bind(ClipboardHelper));
|
||||
NativeWindow.contextmenus.add(Strings.browser.GetStringFromName("contextmenu.selectAll"), ClipboardHelper.selectAllContext, ClipboardHelper.select.bind(ClipboardHelper));
|
||||
NativeWindow.contextmenus.add(Strings.browser.GetStringFromName("contextmenu.paste"), ClipboardHelper.pasteContext, ClipboardHelper.paste.bind(ClipboardHelper));
|
||||
NativeWindow.contextmenus.add(Strings.browser.GetStringFromName("contextmenu.changeInputMethod"), NativeWindow.contextmenus.textContext, ClipboardHelper.inputMethod.bind(ClipboardHelper));
|
||||
},
|
||||
|
@ -3485,11 +3489,17 @@ var ClipboardHelper = {
|
|||
return {
|
||||
matches: function(aElement) {
|
||||
if (NativeWindow.contextmenus.textContext.matches(aElement)) {
|
||||
// Don't include "copy" for password fields.
|
||||
// mozIsTextField(true) tests for only non-password fields.
|
||||
if (aElement instanceof Ci.nsIDOMHTMLInputElement && !aElement.mozIsTextField(true))
|
||||
return false;
|
||||
|
||||
let selectionStart = aElement.selectionStart;
|
||||
let selectionEnd = aElement.selectionEnd;
|
||||
if (selectionStart != selectionEnd)
|
||||
return true;
|
||||
else if (isCopyAll)
|
||||
|
||||
if (isCopyAll && aElement.textLength > 0)
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
@ -3497,6 +3507,17 @@ var ClipboardHelper = {
|
|||
}
|
||||
},
|
||||
|
||||
selectAllContext: {
|
||||
matches: function selectAllContextMatches(aElement) {
|
||||
if (NativeWindow.contextmenus.textContext.matches(aElement)) {
|
||||
let selectionStart = aElement.selectionStart;
|
||||
let selectionEnd = aElement.selectionEnd;
|
||||
return (selectionStart > 0 || selectionEnd < aElement.textLength);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
},
|
||||
|
||||
pasteContext: {
|
||||
matches: function(aElement) {
|
||||
if (NativeWindow.contextmenus.textContext.matches(aElement)) {
|
||||
|
|
|
@ -3414,7 +3414,7 @@ pref("memory.low_virtual_memory_threshold_mb", 128);
|
|||
|
||||
// On Windows 32- or 64-bit, fire a low-memory notification if we have less
|
||||
// than this many mb of physical memory available on the whole machine.
|
||||
pref("memory.low_physical_mem_threshold_mb", 0);
|
||||
pref("memory.low_physical_memory_threshold_mb", 0);
|
||||
|
||||
// On Windows 32- or 64-bit, don't fire a low-memory notification because of
|
||||
// low available physical memory more than once every
|
||||
|
|
|
@ -46,6 +46,7 @@
|
|||
#include "nsString.h"
|
||||
#include "nsAutodialWin.h"
|
||||
#include "prlog.h"
|
||||
#include "nsWindowsHelpers.h"
|
||||
|
||||
#define AUTODIAL_DEFAULT AUTODIAL_NEVER
|
||||
|
||||
|
@ -515,8 +516,9 @@ nsresult nsAutodial::GetDefaultEntryName(PRUnichar* entryName, int bufferSize)
|
|||
// Determine if the autodial service is running on this PC.
|
||||
bool nsAutodial::IsAutodialServiceRunning()
|
||||
{
|
||||
SC_HANDLE hSCManager =
|
||||
OpenSCManager(nsnull, SERVICES_ACTIVE_DATABASE, SERVICE_QUERY_STATUS);
|
||||
nsAutoServiceHandle hSCManager(OpenSCManager(nsnull,
|
||||
SERVICES_ACTIVE_DATABASE,
|
||||
SERVICE_QUERY_STATUS));
|
||||
|
||||
if (hSCManager == nsnull)
|
||||
{
|
||||
|
@ -526,8 +528,9 @@ bool nsAutodial::IsAutodialServiceRunning()
|
|||
return false;
|
||||
}
|
||||
|
||||
SC_HANDLE hService =
|
||||
OpenServiceW(hSCManager, L"RasAuto", SERVICE_QUERY_STATUS);
|
||||
nsAutoServiceHandle hService(OpenServiceW(hSCManager,
|
||||
L"RasAuto",
|
||||
SERVICE_QUERY_STATUS));
|
||||
|
||||
if (hSCManager == nsnull)
|
||||
{
|
||||
|
|
|
@ -63,7 +63,6 @@
|
|||
#include "nsIProxyInfo.h"
|
||||
#include "nsEscape.h"
|
||||
#include "nsNetCID.h"
|
||||
#include "nsIRecyclingAllocator.h"
|
||||
#include "nsISocketTransport.h"
|
||||
#include "nsCRT.h"
|
||||
#include "nsSimpleNestedURI.h"
|
||||
|
@ -86,6 +85,9 @@
|
|||
#define AUTODIAL_PREF "network.autodial-helper.enabled"
|
||||
#define MANAGE_OFFLINE_STATUS_PREF "network.manage-offline-status"
|
||||
|
||||
// Nb: these have been misnomers since bug 715770 removed the buffer cache.
|
||||
// "network.segment.count" and "network.segment.size" would be better names,
|
||||
// but the old names are still used to preserve backward compatibility.
|
||||
#define NECKO_BUFFER_CACHE_COUNT_PREF "network.buffer.cache.count"
|
||||
#define NECKO_BUFFER_CACHE_SIZE_PREF "network.buffer.cache.size"
|
||||
|
||||
|
@ -166,8 +168,7 @@ static const char kProfileChangeNetTeardownTopic[] = "profile-change-net-teardow
|
|||
static const char kProfileChangeNetRestoreTopic[] = "profile-change-net-restore";
|
||||
static const char kProfileDoChange[] = "profile-do-change";
|
||||
|
||||
// Necko buffer cache
|
||||
nsIMemory* nsIOService::gBufferCache = nsnull;
|
||||
// Necko buffer defaults
|
||||
PRUint32 nsIOService::gDefaultSegmentSize = 4096;
|
||||
PRUint32 nsIOService::gDefaultSegmentCount = 24;
|
||||
|
||||
|
@ -245,24 +246,6 @@ nsIOService::Init()
|
|||
|
||||
NS_TIME_FUNCTION_MARK("Registered observers");
|
||||
|
||||
// Get the allocator ready
|
||||
if (!gBufferCache) {
|
||||
nsresult rv = NS_OK;
|
||||
nsCOMPtr<nsIRecyclingAllocator> recyclingAllocator =
|
||||
do_CreateInstance(NS_RECYCLINGALLOCATOR_CONTRACTID, &rv);
|
||||
|
||||
if (NS_FAILED(rv))
|
||||
return rv;
|
||||
rv = recyclingAllocator->Init(gDefaultSegmentCount,
|
||||
(15 * 60), // 15 minutes
|
||||
"necko");
|
||||
|
||||
NS_WARN_IF_FALSE(NS_SUCCEEDED(rv), "Was unable to allocate. No gBufferCache.");
|
||||
CallQueryInterface(recyclingAllocator, &gBufferCache);
|
||||
}
|
||||
|
||||
NS_TIME_FUNCTION_MARK("Set up the recycling allocator");
|
||||
|
||||
gIOService = this;
|
||||
|
||||
InitializeNetworkLinkService();
|
||||
|
@ -924,7 +907,7 @@ nsIOService::PrefsChanged(nsIPrefBranch *prefs, const char *pref)
|
|||
*/
|
||||
if (size > 0 && size < 1024*1024)
|
||||
gDefaultSegmentSize = size;
|
||||
NS_WARN_IF_FALSE( (!(size & (size - 1))) , "network buffer cache size is not a power of 2!");
|
||||
NS_WARN_IF_FALSE( (!(size & (size - 1))) , "network segment size is not a power of 2!");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -165,9 +165,7 @@ private:
|
|||
|
||||
bool mAutoDialEnabled;
|
||||
public:
|
||||
// Necko buffer cache. Used for all default buffer sizes that necko
|
||||
// allocates.
|
||||
static nsIMemory *gBufferCache;
|
||||
// Used for all default buffer sizes that necko allocates.
|
||||
static PRUint32 gDefaultSegmentSize;
|
||||
static PRUint32 gDefaultSegmentCount;
|
||||
};
|
||||
|
|
|
@ -40,18 +40,6 @@
|
|||
|
||||
#include "nsIOService.h"
|
||||
|
||||
/**
|
||||
* returns preferred allocator for given segment size. NULL implies
|
||||
* system allocator. this result can be used when allocating a pipe.
|
||||
*/
|
||||
|
||||
static inline nsIMemory *
|
||||
net_GetSegmentAlloc(PRUint32 segsize)
|
||||
{
|
||||
return (segsize == nsIOService::gDefaultSegmentSize)
|
||||
? nsIOService::gBufferCache : nsnull;
|
||||
}
|
||||
|
||||
/**
|
||||
* applies defaults to segment params in a consistent way.
|
||||
*/
|
||||
|
|
|
@ -1725,12 +1725,11 @@ nsSocketTransport::OpenInputStream(PRUint32 flags,
|
|||
bool openBlocking = (flags & OPEN_BLOCKING);
|
||||
|
||||
net_ResolveSegmentParams(segsize, segcount);
|
||||
nsIMemory *segalloc = net_GetSegmentAlloc(segsize);
|
||||
|
||||
// create a pipe
|
||||
nsCOMPtr<nsIAsyncOutputStream> pipeOut;
|
||||
rv = NS_NewPipe2(getter_AddRefs(pipeIn), getter_AddRefs(pipeOut),
|
||||
!openBlocking, true, segsize, segcount, segalloc);
|
||||
!openBlocking, true, segsize, segcount);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
// async copy from socket to pipe
|
||||
|
@ -1772,12 +1771,11 @@ nsSocketTransport::OpenOutputStream(PRUint32 flags,
|
|||
bool openBlocking = (flags & OPEN_BLOCKING);
|
||||
|
||||
net_ResolveSegmentParams(segsize, segcount);
|
||||
nsIMemory *segalloc = net_GetSegmentAlloc(segsize);
|
||||
|
||||
// create a pipe
|
||||
nsCOMPtr<nsIAsyncInputStream> pipeIn;
|
||||
rv = NS_NewPipe2(getter_AddRefs(pipeIn), getter_AddRefs(pipeOut),
|
||||
true, !openBlocking, segsize, segcount, segalloc);
|
||||
true, !openBlocking, segsize, segcount);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
// async copy from socket to pipe
|
||||
|
|