mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 11:25:00 +00:00
Merge the last PGO-green inbound changeset to m-c.
This commit is contained in:
commit
976960c2ce
@ -43,6 +43,7 @@
|
||||
#include "nsIForm.h"
|
||||
#include "nsIFormControl.h"
|
||||
|
||||
#include "nsDeckFrame.h"
|
||||
#include "nsLayoutUtils.h"
|
||||
#include "nsIPresShell.h"
|
||||
#include "nsIStringBundle.h"
|
||||
@ -606,26 +607,35 @@ Accessible::TranslateString(const nsString& aKey, nsAString& aStringOut)
|
||||
uint64_t
|
||||
Accessible::VisibilityState()
|
||||
{
|
||||
uint64_t vstates = states::INVISIBLE | states::OFFSCREEN;
|
||||
|
||||
nsIFrame* frame = GetFrame();
|
||||
if (!frame)
|
||||
return vstates;
|
||||
return states::INVISIBLE;
|
||||
|
||||
nsIPresShell* shell(mDoc->PresShell());
|
||||
if (!shell)
|
||||
return vstates;
|
||||
// Walk the parent frame chain to see if there's invisible parent or the frame
|
||||
// is in background tab.
|
||||
if (!frame->GetStyleVisibility()->IsVisible())
|
||||
return states::INVISIBLE;
|
||||
|
||||
// We need to know if at least a kMinPixels around the object is visible,
|
||||
// otherwise it will be marked states::OFFSCREEN.
|
||||
const uint16_t kMinPixels = 12;
|
||||
const nsSize frameSize = frame->GetSize();
|
||||
const nsRectVisibility rectVisibility =
|
||||
shell->GetRectVisibility(frame, nsRect(nsPoint(0,0), frameSize),
|
||||
nsPresContext::CSSPixelsToAppUnits(kMinPixels));
|
||||
nsIFrame* curFrame = frame;
|
||||
do {
|
||||
nsIView* view = curFrame->GetView();
|
||||
if (view && view->GetVisibility() == nsViewVisibility_kHide)
|
||||
return states::INVISIBLE;
|
||||
|
||||
if (rectVisibility == nsRectVisibility_kVisible)
|
||||
vstates &= ~states::OFFSCREEN;
|
||||
// Offscreen state for background tab content.
|
||||
nsIFrame* parentFrame = curFrame->GetParent();
|
||||
nsDeckFrame* deckFrame = do_QueryFrame(parentFrame);
|
||||
if (deckFrame && deckFrame->GetSelectedBox() != curFrame)
|
||||
return states::OFFSCREEN;
|
||||
|
||||
if (!parentFrame) {
|
||||
parentFrame = nsLayoutUtils::GetCrossDocParentFrame(curFrame);
|
||||
if (parentFrame && !parentFrame->GetStyleVisibility()->IsVisible())
|
||||
return states::INVISIBLE;
|
||||
}
|
||||
|
||||
curFrame = parentFrame;
|
||||
} while (curFrame);
|
||||
|
||||
// Zero area rects can occur in the first frame of a multi-frame text flow,
|
||||
// in which case the rendered text is not empty and the frame should not be
|
||||
@ -638,16 +648,21 @@ Accessible::VisibilityState()
|
||||
nsAutoString renderedText;
|
||||
frame->GetRenderedText(&renderedText, nullptr, nullptr, 0, 1);
|
||||
if (renderedText.IsEmpty())
|
||||
return vstates;
|
||||
|
||||
return states::INVISIBLE;
|
||||
}
|
||||
|
||||
// XXX Do we really need to cross from content to chrome ancestor?
|
||||
if (!frame->IsVisibleConsideringAncestors(nsIFrame::VISIBILITY_CROSS_CHROME_CONTENT_BOUNDARY))
|
||||
return vstates;
|
||||
// We need to know if at least a kMinPixels around the object is visible,
|
||||
// otherwise it will be marked states::OFFSCREEN.
|
||||
const uint16_t kMinPixels = 12;
|
||||
const nsSize frameSize = frame->GetSize();
|
||||
const nsRectVisibility rectVisibility =
|
||||
mDoc->PresShell()->GetRectVisibility(frame, nsRect(nsPoint(0,0), frameSize),
|
||||
nsPresContext::CSSPixelsToAppUnits(kMinPixels));
|
||||
|
||||
// Assume we are visible enough.
|
||||
return vstates &= ~states::INVISIBLE;
|
||||
if (rectVisibility != nsRectVisibility_kVisible)
|
||||
return states::OFFSCREEN;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint64_t
|
||||
|
@ -16,27 +16,56 @@
|
||||
src="../role.js"></script>
|
||||
<script type="application/javascript"
|
||||
src="../states.js"></script>
|
||||
<script type="application/javascript"
|
||||
src="../events.js"></script>
|
||||
<script type="application/javascript"
|
||||
src="../browser.js"></script>
|
||||
|
||||
<script type="application/javascript">
|
||||
function doTest()
|
||||
function addTab(aURL)
|
||||
{
|
||||
testStates("div", 0, 0, STATE_INVISIBLE);
|
||||
this.eventSeq = [
|
||||
new invokerChecker(EVENT_DOCUMENT_LOAD_COMPLETE, tabDocumentAt, 1)
|
||||
];
|
||||
|
||||
this.invoke = function addTab_invoke()
|
||||
{
|
||||
tabBrowser().loadOneTab(aURL, null, "", null, false);
|
||||
}
|
||||
|
||||
this.finalCheck = function addTab_finalCheck()
|
||||
{
|
||||
var tabDoc = tabDocumentAt(0);
|
||||
var input = getAccessible(tabDoc.getElementById("input"));
|
||||
testStates(input, STATE_OFFSCREEN, 0, STATE_INVISIBLE);
|
||||
}
|
||||
|
||||
this.getID = function addTab_getID()
|
||||
{
|
||||
return "add tab: " + aURL;
|
||||
}
|
||||
}
|
||||
|
||||
var gInputDocURI = "data:text/html,<html><input id='input'></html>";
|
||||
|
||||
function doTests()
|
||||
{
|
||||
testStates("div", 0, 0, STATE_INVISIBLE | STATE_OFFSCREEN);
|
||||
testStates("div_off", STATE_OFFSCREEN, 0, STATE_INVISIBLE);
|
||||
testStates("div_abschild", 0, 0, STATE_INVISIBLE);
|
||||
testStates("div_abschild", 0, 0, STATE_INVISIBLE | STATE_OFFSCREEN);
|
||||
|
||||
// Confirm destruction of accessibles.
|
||||
document.getElementById("div").style.visibility = "hidden";
|
||||
document.getElementById("div_off").style.visibility="hidden";
|
||||
document.getElementById("div_abschild").style.visibility="hidden";
|
||||
document.body.clientWidth; // flush layout
|
||||
testAccessibleTree("outer_div", {children:[]});
|
||||
gQueue = new eventQueue();
|
||||
|
||||
// Accessibles in background tab should have offscreen state and no
|
||||
// invisible state.
|
||||
gQueue.push(new addTab("about:blank"));
|
||||
|
||||
SimpleTest.finish();
|
||||
gQueue.onFinish = function() { closeBrowserWindow(); }
|
||||
gQueue.invoke(); // Will call SimpleTest.finish();
|
||||
}
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
addA11yLoadEvent(doTest);
|
||||
openBrowserWindow(doTests, gInputDocURI);
|
||||
</script>
|
||||
|
||||
</head>
|
||||
|
@ -492,7 +492,7 @@ pref("dom.experimental_forms", true);
|
||||
// Turns on gralloc-based direct texturing for Gonk
|
||||
pref("gfx.gralloc.enabled", false);
|
||||
|
||||
// XXXX REMOVE FOR PRODUCTION. Turns on GC and CC logging
|
||||
// XXXX REMOVE FOR PRODUCTION. Turns on GC and CC logging
|
||||
pref("javascript.options.mem.log", true);
|
||||
|
||||
// Increase mark slice time from 10ms to 30ms
|
||||
@ -513,9 +513,9 @@ pref("ui.showHideScrollbars", 1);
|
||||
// background.
|
||||
pref("dom.ipc.processPriorityManager.enabled", true);
|
||||
pref("dom.ipc.processPriorityManager.gracePeriodMS", 1000);
|
||||
pref("hal.processPriorityManager.gonk.masterOomAdjust", 0);
|
||||
pref("hal.processPriorityManager.gonk.foregroundOomAdjust", 1);
|
||||
pref("hal.processPriorityManager.gonk.backgroundOomAdjust", 6);
|
||||
pref("hal.processPriorityManager.gonk.masterOomScoreAdjust", 0);
|
||||
pref("hal.processPriorityManager.gonk.foregroundOomScoreAdjust", 67);
|
||||
pref("hal.processPriorityManager.gonk.backgroundOomScoreAdjust", 400);
|
||||
pref("hal.processPriorityManager.gonk.masterNice", -1);
|
||||
pref("hal.processPriorityManager.gonk.foregroundNice", 0);
|
||||
pref("hal.processPriorityManager.gonk.backgroundNice", 10);
|
||||
|
@ -1,11 +1,6 @@
|
||||
# Scrollbars
|
||||
category agent-style-sheets browser-content-stylesheet chrome://browser/content/content.css
|
||||
|
||||
# CameraContent.js
|
||||
component {eff4231b-abce-4f7f-a40a-d646e8fde3ce} CameraContent.js
|
||||
contract @mozilla.org/b2g-camera-content;1 {eff4231b-abce-4f7f-a40a-d646e8fde3ce}
|
||||
category JavaScript-navigator-property mozCamera @mozilla.org/b2g-camera-content;1
|
||||
|
||||
# AlertsService.js
|
||||
component {fe33c107-82a4-41d6-8c64-5353267e04c9} AlertsService.js
|
||||
contract @mozilla.org/system-alerts-service;1 {fe33c107-82a4-41d6-8c64-5353267e04c9}
|
||||
|
@ -1,83 +0,0 @@
|
||||
/* 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/. */
|
||||
|
||||
"use strict";
|
||||
|
||||
const Cc = Components.classes;
|
||||
const Ci = Components.interfaces;
|
||||
const Cu = Components.utils;
|
||||
|
||||
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||
Cu.import("resource://gre/modules/Services.jsm");
|
||||
|
||||
const kProtocolName = "b2g-camera:";
|
||||
|
||||
let CameraContent = function() {
|
||||
this.hasPrivileges = false;
|
||||
this.mapping = [];
|
||||
}
|
||||
|
||||
CameraContent.prototype = {
|
||||
getCameraURI: function(aOptions) {
|
||||
if (!this.hasPrivileges)
|
||||
return null;
|
||||
|
||||
let options = aOptions || { };
|
||||
if (!options.camera)
|
||||
options.camera = 0;
|
||||
if (!options.width)
|
||||
options.width = 320;
|
||||
if (!options.height)
|
||||
options.height = 240;
|
||||
|
||||
let uuid = Cc["@mozilla.org/uuid-generator;1"].getService(Ci.nsIUUIDGenerator).generateUUID().toString();
|
||||
uuid = uuid.substring(1, uuid.length - 2); // remove the brackets
|
||||
this.mapping.push(uuid);
|
||||
let uri = kProtocolName + "?camera=" + options.camera +
|
||||
"&width=" + options.width +
|
||||
"&height=" + options.height +
|
||||
"&type=video/x-raw-yuv";
|
||||
// XXX that's no e10s ready, but the camera inputstream itself is not...
|
||||
Services.prefs.setCharPref("b2g.camera." + kProtocolName + "?" + uuid, uri);
|
||||
return kProtocolName + "?" + uuid;
|
||||
},
|
||||
|
||||
observe: function(aSubject, aTopic, aData) {
|
||||
if (aTopic == "inner-window-destroyed") {
|
||||
let wId = aSubject.QueryInterface(Ci.nsISupportsPRUint64).data;
|
||||
if (wId == this.innerWindowID) {
|
||||
Services.obs.removeObserver(this, "inner-window-destroyed");
|
||||
for (let aId in this.mapping)
|
||||
Services.prefs.clearUserPref("b2g.camera." + kProtocolName + "?" + aId);
|
||||
this.mapping = null;
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
init: function(aWindow) {
|
||||
let principal = aWindow.document.nodePrincipal;
|
||||
let secMan = Cc["@mozilla.org/scriptsecuritymanager;1"].getService(Ci.nsIScriptSecurityManager);
|
||||
|
||||
let perm = Services.perms.testExactPermissionFromPrincipal(principal, "content-camera");
|
||||
|
||||
//only pages with perm set and chrome pages can use the camera in content
|
||||
this.hasPrivileges = perm == Ci.nsIPermissionManager.ALLOW_ACTION;
|
||||
|
||||
Services.obs.addObserver(this, "inner-window-destroyed", false);
|
||||
let util = aWindow.QueryInterface(Ci.nsIInterfaceRequestor).getInterface(Ci.nsIDOMWindowUtils);
|
||||
this.innerWindowID = util.currentInnerWindowID;
|
||||
},
|
||||
|
||||
classID: Components.ID("{eff4231b-abce-4f7f-a40a-d646e8fde3ce}"),
|
||||
|
||||
QueryInterface: XPCOMUtils.generateQI([Ci.nsIB2GCameraContent, Ci.nsIDOMGlobalPropertyInitializer, Ci.nsIObserver]),
|
||||
|
||||
classInfo: XPCOMUtils.generateCI({classID: Components.ID("{eff4231b-abce-4f7f-a40a-d646e8fde3ce}"),
|
||||
contractID: "@mozilla.org/b2g-camera-content;1",
|
||||
interfaces: [Ci.nsIB2GCameraContent],
|
||||
flags: Ci.nsIClassInfo.DOM_OBJECT,
|
||||
classDescription: "B2G Camera Content Helper"})
|
||||
}
|
||||
|
||||
const NSGetFactory = XPCOMUtils.generateNSGetFactory([CameraContent]);
|
@ -20,7 +20,6 @@ EXTRA_PP_COMPONENTS = \
|
||||
ActivitiesGlue.js \
|
||||
AlertsService.js \
|
||||
B2GComponents.manifest \
|
||||
CameraContent.js \
|
||||
ContentHandler.js \
|
||||
ContentPermissionPrompt.js \
|
||||
DirectoryProvider.js \
|
||||
|
@ -366,8 +366,6 @@
|
||||
@BINPATH@/components/nsHelperAppDlg.js
|
||||
@BINPATH@/components/nsDownloadManagerUI.manifest
|
||||
@BINPATH@/components/nsDownloadManagerUI.js
|
||||
@BINPATH@/components/nsProxyAutoConfig.manifest
|
||||
@BINPATH@/components/nsProxyAutoConfig.js
|
||||
@BINPATH@/components/NetworkGeolocationProvider.manifest
|
||||
@BINPATH@/components/NetworkGeolocationProvider.js
|
||||
@BINPATH@/components/GPSDGeolocationProvider.manifest
|
||||
|
@ -5818,10 +5818,6 @@ var OfflineApps = {
|
||||
}
|
||||
}
|
||||
|
||||
var storageManager = Cc["@mozilla.org/dom/storagemanager;1"].
|
||||
getService(Ci.nsIDOMStorageManager);
|
||||
usage += storageManager.getUsage(host);
|
||||
|
||||
return usage;
|
||||
},
|
||||
|
||||
|
@ -316,10 +316,6 @@ var gAdvancedPane = {
|
||||
}
|
||||
}
|
||||
|
||||
var storageManager = Components.classes["@mozilla.org/dom/storagemanager;1"].
|
||||
getService(Components.interfaces.nsIDOMStorageManager);
|
||||
usage += storageManager.getUsage(host);
|
||||
|
||||
return usage;
|
||||
},
|
||||
|
||||
@ -407,12 +403,6 @@ var gAdvancedPane = {
|
||||
}
|
||||
}
|
||||
|
||||
// send out an offline-app-removed signal. The nsDOMStorage
|
||||
// service will clear DOM storage for this host.
|
||||
var obs = Components.classes["@mozilla.org/observer-service;1"]
|
||||
.getService(Components.interfaces.nsIObserverService);
|
||||
obs.notifyObservers(null, "offline-app-removed", host);
|
||||
|
||||
// remove the permission
|
||||
var pm = Components.classes["@mozilla.org/permissionmanager;1"]
|
||||
.getService(Components.interfaces.nsIPermissionManager);
|
||||
|
@ -308,10 +308,6 @@ var gAdvancedPane = {
|
||||
}
|
||||
}
|
||||
|
||||
var storageManager = Components.classes["@mozilla.org/dom/storagemanager;1"].
|
||||
getService(Components.interfaces.nsIDOMStorageManager);
|
||||
usage += storageManager.getUsage(host);
|
||||
|
||||
return usage;
|
||||
},
|
||||
|
||||
@ -399,12 +395,6 @@ var gAdvancedPane = {
|
||||
}
|
||||
}
|
||||
|
||||
// send out an offline-app-removed signal. The nsDOMStorage
|
||||
// service will clear DOM storage for this host.
|
||||
var obs = Components.classes["@mozilla.org/observer-service;1"]
|
||||
.getService(Components.interfaces.nsIObserverService);
|
||||
obs.notifyObservers(null, "offline-app-removed", host);
|
||||
|
||||
// remove the permission
|
||||
var pm = Components.classes["@mozilla.org/permissionmanager;1"]
|
||||
.getService(Components.interfaces.nsIPermissionManager);
|
||||
|
@ -3,15 +3,13 @@
|
||||
<!DOCTYPE html>
|
||||
<title>Test for bug 463205</title>
|
||||
|
||||
<body>
|
||||
<body onload="onLoad()">
|
||||
<iframe src="data:text/html,<input%20id='original'>"></iframe>
|
||||
<iframe src="browser_463205_helper.html"></iframe>
|
||||
<iframe src="data:text/html,mark1"></iframe>
|
||||
|
||||
<script type="application/javascript">
|
||||
frames[2].addEventListener("DOMContentLoaded", function() {
|
||||
frames[2].removeEventListener("DOMContentLoaded", arguments.callee, false);
|
||||
|
||||
function onLoad() {
|
||||
if (frames[2].document.location.href == "data:text/html,mark1") {
|
||||
frames[2].document.location = "data:text/html,mark2";
|
||||
}
|
||||
@ -20,6 +18,6 @@
|
||||
frames[0].document.location = "http://mochi.test:8888/browser/" +
|
||||
"browser/components/sessionstore/test/browser_463205_helper.html";
|
||||
}
|
||||
}, false);
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
|
@ -471,7 +471,7 @@ GlobalSearchView.prototype = {
|
||||
|
||||
for (let [url, text] of this._scriptSources) {
|
||||
// Check if the search token is not found anywhere in the script source.
|
||||
if (text.toLowerCase().indexOf(lowerCaseToken) === -1) {
|
||||
if (!text.toLowerCase().contains(lowerCaseToken)) {
|
||||
continue;
|
||||
}
|
||||
let lines = text.split("\n");
|
||||
@ -485,7 +485,7 @@ GlobalSearchView.prototype = {
|
||||
let lowerCaseLine = line.toLowerCase();
|
||||
|
||||
// Search is not case sensitive, and is tied to each line in the source.
|
||||
if (lowerCaseLine.indexOf(lowerCaseToken) === -1) {
|
||||
if (!lowerCaseLine.contains(lowerCaseToken)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -361,8 +361,6 @@
|
||||
@BINPATH@/components/nsHelperAppDlg.js
|
||||
@BINPATH@/components/nsDownloadManagerUI.manifest
|
||||
@BINPATH@/components/nsDownloadManagerUI.js
|
||||
@BINPATH@/components/nsProxyAutoConfig.manifest
|
||||
@BINPATH@/components/nsProxyAutoConfig.js
|
||||
@BINPATH@/components/NetworkGeolocationProvider.manifest
|
||||
@BINPATH@/components/NetworkGeolocationProvider.js
|
||||
@BINPATH@/components/GPSDGeolocationProvider.manifest
|
||||
|
@ -87,6 +87,8 @@ components/xpcom.xpt
|
||||
components/xpti.dat
|
||||
components/xptitemp.dat
|
||||
components/nsMicrosummaryService.js
|
||||
components/nsProxyAutoConfig.manifest
|
||||
components/nsProxyAutoConfig.js
|
||||
D3DCompiler_42.dll
|
||||
d3dx9_42.dll
|
||||
defaults/pref/all.js
|
||||
@ -921,6 +923,7 @@ xpicleanup@BIN_SUFFIX@
|
||||
components/nsPlacesExpiration.js
|
||||
components/nsPrivateBrowsingService.js
|
||||
components/nsPrompter.js
|
||||
components/nsProxyAutoConfig.manifest
|
||||
components/nsProxyAutoConfig.js
|
||||
components/nsSafebrowsingApplication.js
|
||||
components/nsSearchService.js
|
||||
|
@ -14,9 +14,5 @@ let OfflineAppCacheHelper = {
|
||||
try {
|
||||
cacheService.evictEntries(Ci.nsICache.STORE_OFFLINE);
|
||||
} catch(er) {}
|
||||
|
||||
var storageManagerService = Cc["@mozilla.org/dom/storagemanager;1"].
|
||||
getService(Ci.nsIDOMStorageManager);
|
||||
storageManagerService.clearOfflineApps();
|
||||
}
|
||||
};
|
||||
|
@ -16,7 +16,6 @@
|
||||
import os
|
||||
import subprocess
|
||||
import re
|
||||
import sys
|
||||
|
||||
re_for_ld = re.compile('.*\((.*)\).*')
|
||||
|
||||
@ -72,19 +71,7 @@ def find_version(e):
|
||||
return encode_ver(last_version)
|
||||
|
||||
if __name__ == '__main__':
|
||||
if os.uname()[0] == 'Darwin':
|
||||
sdk_dir = os.environ['MACOS_SDK_DIR']
|
||||
if 'MacOSX10.5.sdk' in sdk_dir:
|
||||
target_ver = 0
|
||||
host_ver = 0
|
||||
else:
|
||||
target_ver = encode_ver('3.4.9')
|
||||
host_ver = encode_ver('3.4.9')
|
||||
else:
|
||||
cxx_env = os.environ['CXX']
|
||||
target_ver = find_version(cxx_env)
|
||||
host_cxx_env = os.environ.get('HOST_CXX', cxx_env)
|
||||
host_ver = find_version(host_cxx_env)
|
||||
|
||||
print 'MOZ_LIBSTDCXX_TARGET_VERSION=%s' % target_ver
|
||||
print 'MOZ_LIBSTDCXX_HOST_VERSION=%s' % host_ver
|
||||
cxx_env = os.environ['CXX']
|
||||
print 'MOZ_LIBSTDCXX_TARGET_VERSION=%s' % find_version(cxx_env)
|
||||
host_cxx_env = os.environ.get('HOST_CXX', cxx_env)
|
||||
print 'MOZ_LIBSTDCXX_HOST_VERSION=%s' % find_version(host_cxx_env)
|
||||
|
@ -13,6 +13,4 @@ elif [ -d "$topsrcdir/../clang" ]; then
|
||||
export CC=$topsrcdir/../clang/bin/clang
|
||||
export CXX=$topsrcdir/../clang/bin/clang++
|
||||
fi
|
||||
|
||||
ac_add_options --enable-stdcxx-compat
|
||||
ac_add_options --with-ccache
|
||||
|
@ -8,20 +8,29 @@ import java.lang.reflect.InvocationTargetException;
|
||||
import java.lang.reflect.Method;
|
||||
import java.net.ServerSocket;
|
||||
import java.util.Timer;
|
||||
import java.io.IOException;
|
||||
import java.net.InetAddress;
|
||||
|
||||
import com.mozilla.SUTAgentAndroid.SUTAgentAndroid;
|
||||
import com.mozilla.SUTAgentAndroid.R;
|
||||
|
||||
import android.app.Notification;
|
||||
import android.app.NotificationManager;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.net.wifi.WifiManager;
|
||||
import android.os.Handler;
|
||||
import android.os.IBinder;
|
||||
import android.util.Log;
|
||||
import android.view.Gravity;
|
||||
import android.widget.Toast;
|
||||
|
||||
import javax.jmdns.JmDNS;
|
||||
import javax.jmdns.ServiceInfo;
|
||||
|
||||
public class ASMozStub extends android.app.Service {
|
||||
private final static int COMMAND_PORT = 20701;
|
||||
private final static int DATA_PORT = 20700;
|
||||
|
||||
private ServerSocket cmdChnl = null;
|
||||
private ServerSocket dataChnl = null;
|
||||
@ -79,19 +88,97 @@ public class ASMozStub extends android.app.Service {
|
||||
doToast("Listener Service created...");
|
||||
}
|
||||
|
||||
WifiManager.MulticastLock multicastLock;
|
||||
JmDNS jmdns;
|
||||
|
||||
void startZeroConf() {
|
||||
if (multicastLock == null) {
|
||||
WifiManager wifi = (WifiManager) getSystemService(Context.WIFI_SERVICE);
|
||||
multicastLock = wifi.createMulticastLock("SUTAgent");
|
||||
multicastLock.setReferenceCounted(true);
|
||||
}
|
||||
|
||||
multicastLock.acquire();
|
||||
|
||||
try {
|
||||
InetAddress inetAddress = SUTAgentAndroid.getLocalInetAddress();
|
||||
|
||||
if (jmdns == null) {
|
||||
jmdns = JmDNS.create(inetAddress, null);
|
||||
}
|
||||
|
||||
if (jmdns != null) {
|
||||
String name = "SUTAgent";
|
||||
|
||||
String hwid = SUTAgentAndroid.getHWID(this);
|
||||
if (hwid != null) {
|
||||
name += " [hwid:" + hwid + "]";
|
||||
}
|
||||
|
||||
// multicast reception is broken for some reason, so
|
||||
// this service can't be resolved; it can only be
|
||||
// broadcast. So, we cheat -- we put the IP address
|
||||
// in the broadcast that we can pull out later.
|
||||
// However, periods aren't legal, so replace them.
|
||||
// The IP address will show up as [ip:127_0_0_1]
|
||||
name += " [ip:" + inetAddress.getHostAddress().toString().replace('.', '_') + "]";
|
||||
|
||||
final ServiceInfo serviceInfo = ServiceInfo.create("_sutagent._tcp.local.",
|
||||
name,
|
||||
COMMAND_PORT,
|
||||
"Android SUTAgent");
|
||||
final JmDNS dns = jmdns;
|
||||
// we want to call registerService on a new thread, because it can block
|
||||
// for a little while.
|
||||
Thread registerThread = new Thread() {
|
||||
public void run() {
|
||||
try {
|
||||
dns.registerService(serviceInfo);
|
||||
} catch (IOException e) {
|
||||
Log.e("SUTAgent", "Failed to register JmDNS service!", e);
|
||||
}
|
||||
}
|
||||
};
|
||||
registerThread.setDaemon(true);
|
||||
registerThread.start();
|
||||
}
|
||||
} catch (IOException e) {
|
||||
Log.e("SUTAgent", "Failed to register JmDNS service!", e);
|
||||
}
|
||||
}
|
||||
|
||||
void stopZeroConf() {
|
||||
if (jmdns != null) {
|
||||
try {
|
||||
jmdns.unregisterAllServices();
|
||||
jmdns.close();
|
||||
} catch (IOException e) {
|
||||
Log.e("SUTAgent", "Failed to close JmDNS service!", e);
|
||||
}
|
||||
jmdns = null;
|
||||
}
|
||||
|
||||
if (multicastLock != null) {
|
||||
multicastLock.release();
|
||||
multicastLock = null;
|
||||
}
|
||||
}
|
||||
|
||||
public void onStart(Intent intent, int startId) {
|
||||
super.onStart(intent, startId);
|
||||
|
||||
try {
|
||||
cmdChnl = new ServerSocket(20701);
|
||||
cmdChnl = new ServerSocket(COMMAND_PORT);
|
||||
runCmdThrd = new RunCmdThread(cmdChnl, this, handler);
|
||||
runCmdThrd.start();
|
||||
doToast("Command channel port 20701 ...");
|
||||
doToast(String.format("Command channel port %d ...", COMMAND_PORT));
|
||||
|
||||
dataChnl = new ServerSocket(20700);
|
||||
dataChnl = new ServerSocket(DATA_PORT);
|
||||
runDataThrd = new RunDataThread(dataChnl, this);
|
||||
runDataThrd.start();
|
||||
doToast("Data channel port 20700 ...");
|
||||
doToast(String.format("Data channel port %d ...", DATA_PORT));
|
||||
|
||||
startZeroConf();
|
||||
|
||||
Notification notification = new Notification();
|
||||
startForegroundCompat(R.string.foreground_service_started, notification);
|
||||
@ -108,6 +195,8 @@ public class ASMozStub extends android.app.Service {
|
||||
{
|
||||
super.onDestroy();
|
||||
|
||||
stopZeroConf();
|
||||
|
||||
if (runCmdThrd.isAlive())
|
||||
{
|
||||
runCmdThrd.StopListening();
|
||||
|
@ -33,6 +33,7 @@
|
||||
<uses-permission android:name="android.permission.INTERNET"></uses-permission>
|
||||
<uses-permission android:name="android.permission.REBOOT"></uses-permission>
|
||||
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"></uses-permission>
|
||||
<uses-permission android:name="android.permission.CHANGE_WIFI_MULTICAST_STATE"></uses-permission>
|
||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"></uses-permission>
|
||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"></uses-permission>
|
||||
<uses-permission android:name="android.permission.RESTART_PACKAGES"></uses-permission>
|
||||
|
@ -47,7 +47,8 @@ GARBAGE += \
|
||||
|
||||
GARBAGE_DIRS += res classes network-libs
|
||||
|
||||
JAVA_CLASSPATH = $(ANDROID_SDK)/android.jar:$(srcdir)/network-libs/commons-net-2.0.jar
|
||||
EXTRA_JARS = $(srcdir)/network-libs/commons-net-2.0.jar:$(srcdir)/network-libs/jmdns.jar
|
||||
JAVA_CLASSPATH = $(ANDROID_SDK)/android.jar:$(EXTRA_JARS)
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
@ -59,10 +60,10 @@ tools:: sutAgentAndroid.apk
|
||||
classes.dex: $(JAVAFILES)
|
||||
$(NSINSTALL) -D classes
|
||||
$(JAVAC) $(JAVAC_FLAGS) -d classes $(addprefix $(srcdir)/,$(JAVAFILES))
|
||||
$(DX) --dex --output=$@ classes
|
||||
$(DX) --dex --output=$@ classes $(subst :, ,$(EXTRA_JARS))
|
||||
|
||||
sutAgentAndroid.ap_: $(srcdir)/AndroidManifest.xml
|
||||
$(AAPT) package -f -M $(srcdir)/AndroidManifest.xml -I $(ANDROID_SDK)/android.jar -S res -F $@
|
||||
$(AAPT) package -f -M $(srcdir)/AndroidManifest.xml -I $(ANDROID_SDK)/android.jar -S res -F $@
|
||||
|
||||
sutAgentAndroid-unsigned-unaligned.apk: sutAgentAndroid.ap_ classes.dex
|
||||
$(APKBUILDER) $@ -v $(APKBUILDER_FLAGS) -z sutAgentAndroid.ap_ -f classes.dex
|
||||
|
@ -264,10 +264,13 @@ public class SUTAgentAndroid extends Activity
|
||||
}
|
||||
}
|
||||
|
||||
String hwid = getHWID(this);
|
||||
|
||||
sLocalIPAddr = getLocalIpAddress();
|
||||
Toast.makeText(getApplication().getApplicationContext(), "SUTAgent [" + sLocalIPAddr + "] ...", Toast.LENGTH_LONG).show();
|
||||
|
||||
String sConfig = "Unique ID: " + sUniqueID + lineSep;
|
||||
sConfig += "HWID: " + hwid + lineSep;
|
||||
sConfig += "OS Info" + lineSep;
|
||||
sConfig += "\t" + dc.GetOSInfo() + lineSep;
|
||||
sConfig += "Screen Info" + lineSep;
|
||||
@ -738,23 +741,70 @@ public class SUTAgentAndroid extends Activity
|
||||
}
|
||||
};
|
||||
|
||||
public String getLocalIpAddress()
|
||||
static String sHWID = null;
|
||||
public static String getHWID(Context cx) {
|
||||
if (sHWID != null)
|
||||
return sHWID;
|
||||
|
||||
// If we're on SDK version >= 8, use Build.SERIAL
|
||||
if (android.os.Build.VERSION.SDK_INT >= 8) {
|
||||
sHWID = android.os.Build.SERIAL;
|
||||
}
|
||||
|
||||
if (sHWID != null)
|
||||
return sHWID;
|
||||
|
||||
// Otherwise, try from the telephony manager
|
||||
TelephonyManager mTelephonyMgr = (TelephonyManager) cx.getSystemService(TELEPHONY_SERVICE);
|
||||
if (mTelephonyMgr != null) {
|
||||
sHWID = mTelephonyMgr.getDeviceId();
|
||||
}
|
||||
|
||||
if (sHWID != null)
|
||||
return sHWID;
|
||||
|
||||
// Otherwise, try WIFI_SERVICE and use the wifi manager
|
||||
WifiManager wifiMan = (WifiManager) cx.getSystemService(Context.WIFI_SERVICE);
|
||||
if (wifiMan != null) {
|
||||
WifiInfo wifi = wifiMan.getConnectionInfo();
|
||||
if (wifi != null) {
|
||||
sHWID = "wifimac" + wifi.getMacAddress();
|
||||
}
|
||||
}
|
||||
|
||||
if (sHWID != null)
|
||||
return sHWID;
|
||||
|
||||
sHWID = "0011223344556677";
|
||||
|
||||
return sHWID;
|
||||
}
|
||||
|
||||
public static InetAddress getLocalInetAddress() throws SocketException
|
||||
{
|
||||
try
|
||||
for (Enumeration<NetworkInterface> en = NetworkInterface.getNetworkInterfaces(); en.hasMoreElements();)
|
||||
{
|
||||
for (Enumeration<NetworkInterface> en = NetworkInterface.getNetworkInterfaces(); en.hasMoreElements();)
|
||||
NetworkInterface intf = en.nextElement();
|
||||
for (Enumeration<InetAddress> enumIpAddr = intf.getInetAddresses(); enumIpAddr.hasMoreElements();)
|
||||
{
|
||||
NetworkInterface intf = en.nextElement();
|
||||
for (Enumeration<InetAddress> enumIpAddr = intf.getInetAddresses(); enumIpAddr.hasMoreElements();)
|
||||
InetAddress inetAddress = enumIpAddr.nextElement();
|
||||
if (!inetAddress.isLoopbackAddress() && InetAddressUtils.isIPv4Address(inetAddress.getHostAddress()))
|
||||
{
|
||||
InetAddress inetAddress = enumIpAddr.nextElement();
|
||||
if (!inetAddress.isLoopbackAddress() && InetAddressUtils.isIPv4Address(inetAddress.getHostAddress()))
|
||||
{
|
||||
return inetAddress.getHostAddress().toString();
|
||||
}
|
||||
return inetAddress;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public String getLocalIpAddress()
|
||||
{
|
||||
try {
|
||||
InetAddress inetAddress = getLocalInetAddress();
|
||||
if (inetAddress != null)
|
||||
return inetAddress.getHostAddress().toString();
|
||||
}
|
||||
catch (SocketException ex)
|
||||
{
|
||||
Toast.makeText(getApplication().getApplicationContext(), ex.toString(), Toast.LENGTH_LONG).show();
|
||||
|
BIN
build/mobile/sutagent/android/network-libs/jmdns.jar
Normal file
BIN
build/mobile/sutagent/android/network-libs/jmdns.jar
Normal file
Binary file not shown.
10
configure.in
10
configure.in
@ -73,7 +73,7 @@ GCONF_VERSION=1.2.1
|
||||
GIO_VERSION=2.18
|
||||
STARTUP_NOTIFICATION_VERSION=0.8
|
||||
DBUS_VERSION=0.60
|
||||
SQLITE_VERSION=3.7.13
|
||||
SQLITE_VERSION=3.7.14
|
||||
|
||||
MSMANIFEST_TOOL=
|
||||
|
||||
@ -4019,7 +4019,11 @@ if test "$MOZ_NATIVE_JPEG" = 1; then
|
||||
#include <jpeglib.h> ],
|
||||
[ #if JPEG_LIB_VERSION < $MOZJPEG
|
||||
#error "Insufficient JPEG library version ($MOZJPEG required)."
|
||||
#endif ],
|
||||
#endif
|
||||
#ifndef JCS_EXTENSIONS
|
||||
#error "libjpeg-turbo JCS_EXTENSIONS required"
|
||||
#endif
|
||||
],
|
||||
MOZ_NATIVE_JPEG=1,
|
||||
AC_MSG_ERROR([Insufficient JPEG library version for --with-system-jpeg]))
|
||||
fi
|
||||
@ -7258,7 +7262,7 @@ MOZ_ARG_ENABLE_BOOL(stdcxx-compat,
|
||||
AC_SUBST(STDCXX_COMPAT)
|
||||
|
||||
if test -n "$STDCXX_COMPAT"; then
|
||||
eval $(CXX="$CXX" MACOS_SDK_DIR="$MACOS_SDK_DIR" $PYTHON $_topsrcdir/build/autoconf/libstdcxx.py)
|
||||
eval $(CXX="$CXX" $PYTHON $_topsrcdir/build/autoconf/libstdcxx.py)
|
||||
AC_SUBST(MOZ_LIBSTDCXX_TARGET_VERSION)
|
||||
AC_SUBST(MOZ_LIBSTDCXX_HOST_VERSION)
|
||||
fi
|
||||
|
@ -16,7 +16,7 @@
|
||||
#include "nsIAtom.h"
|
||||
#include "nsDOMString.h"
|
||||
|
||||
typedef PRUptrdiff PtrBits;
|
||||
typedef uintptr_t PtrBits;
|
||||
|
||||
#define NS_ATTRNAME_NODEINFO_BIT 1
|
||||
class nsAttrName
|
||||
|
@ -20,7 +20,7 @@
|
||||
#include "nsCOMPtr.h"
|
||||
#include "SVGAttrValueWrapper.h"
|
||||
|
||||
typedef PRUptrdiff PtrBits;
|
||||
typedef uintptr_t PtrBits;
|
||||
class nsAString;
|
||||
class nsIAtom;
|
||||
class nsIDocument;
|
||||
|
@ -57,7 +57,7 @@ class nsDOMTokenList;
|
||||
class ContentUnbinder;
|
||||
struct nsRect;
|
||||
|
||||
typedef PRUptrdiff PtrBits;
|
||||
typedef uintptr_t PtrBits;
|
||||
|
||||
/**
|
||||
* A generic base class for DOM elements, implementing many nsIContent,
|
||||
|
@ -27,7 +27,7 @@
|
||||
#include "prtypes.h"
|
||||
|
||||
class nsIAtom;
|
||||
typedef PRUptrdiff PtrBits;
|
||||
typedef uintptr_t PtrBits;
|
||||
|
||||
typedef void
|
||||
(*NSPropertyFunc)(void *aObject,
|
||||
|
@ -1445,8 +1445,10 @@ nsHTMLMediaElement::BuildObjectFromTags(nsCStringHashKey::KeyType aKey,
|
||||
nsString wideValue = NS_ConvertUTF8toUTF16(aValue);
|
||||
JSString* string = JS_NewUCStringCopyZ(args->cx, wideValue.Data());
|
||||
JS::Value value = STRING_TO_JSVAL(string);
|
||||
if (!JS_SetProperty(args->cx, args->tags, aKey.Data(), &value)) {
|
||||
if (!JS_DefineProperty(args->cx, args->tags, aKey.Data(), value,
|
||||
NULL, NULL, JSPROP_ENUMERATE)) {
|
||||
NS_WARNING("Failed to set metadata property");
|
||||
return PL_DHASH_STOP;
|
||||
}
|
||||
|
||||
return PL_DHASH_NEXT;
|
||||
@ -1465,7 +1467,13 @@ nsHTMLMediaElement::MozGetMetadata(JSContext* cx, JS::Value* aValue)
|
||||
}
|
||||
if (mTags) {
|
||||
MetadataIterCx iter = {cx, tags};
|
||||
mTags->EnumerateRead(BuildObjectFromTags, static_cast<void*>(&iter));
|
||||
uint32_t ret = mTags->EnumerateRead(BuildObjectFromTags,
|
||||
static_cast<void*>(&iter));
|
||||
LOG(PR_LOG_DEBUG, ("tag enumerator returned %d", ret));
|
||||
if (ret == PL_DHASH_STOP) {
|
||||
NS_WARNING("couldn't create metadata object!");
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
}
|
||||
*aValue = OBJECT_TO_JSVAL(tags);
|
||||
|
||||
|
@ -107,11 +107,11 @@ public:
|
||||
}
|
||||
void SetUncompiledMethod(nsXBLUncompiledMethod* aUncompiledMethod)
|
||||
{
|
||||
mUncompiledMethod = PRUptrdiff(aUncompiledMethod) | BIT_UNCOMPILED;
|
||||
mUncompiledMethod = uintptr_t(aUncompiledMethod) | BIT_UNCOMPILED;
|
||||
}
|
||||
nsXBLUncompiledMethod* GetUncompiledMethod() const
|
||||
{
|
||||
PRUptrdiff unmasked = mUncompiledMethod & ~BIT_UNCOMPILED;
|
||||
uintptr_t unmasked = mUncompiledMethod & ~BIT_UNCOMPILED;
|
||||
return reinterpret_cast<nsXBLUncompiledMethod*>(unmasked);
|
||||
}
|
||||
|
||||
@ -119,7 +119,7 @@ protected:
|
||||
enum { BIT_UNCOMPILED = 1 << 0 };
|
||||
|
||||
union {
|
||||
PRUptrdiff mUncompiledMethod; // An object that represents the method before being compiled.
|
||||
uintptr_t mUncompiledMethod; // An object that represents the method before being compiled.
|
||||
JSObject* mJSMethodObject; // The JS object for the method (after compilation)
|
||||
};
|
||||
|
||||
|
@ -15,23 +15,25 @@ For example:
|
||||
cd bld ;# Change to the build directory
|
||||
../sqlite/configure ;# Run the configure script
|
||||
make ;# Run the makefile.
|
||||
make install ;# (Optional) Install the build products
|
||||
|
||||
The configure script uses autoconf 2.50 and libtool. If the configure
|
||||
The configure script uses autoconf 2.61 and libtool. If the configure
|
||||
script does not work out for you, there is a generic makefile named
|
||||
"Makefile.linux-gcc" in the top directory of the source tree that you
|
||||
can copy and edit to suite your needs. Comments on the generic makefile
|
||||
can copy and edit to suit your needs. Comments on the generic makefile
|
||||
show what changes are needed.
|
||||
|
||||
The linux binaries on the website are created using the generic makefile,
|
||||
not the configure script. The configure script is unmaintained. (You
|
||||
can volunteer to take over maintenance of the configure script, if you want!)
|
||||
The windows binaries on the website are created using MinGW32 configured
|
||||
as a cross-compiler running under Linux. For details, see the ./publish.sh
|
||||
script at the top-level of the source tree.
|
||||
not the configure script. The windows binaries on the website are created
|
||||
using MinGW32 configured as a cross-compiler running under Linux. For
|
||||
details, see the ./publish.sh script at the top-level of the source tree.
|
||||
The developers do not use teh configure script.
|
||||
|
||||
SQLite does not require TCL to run, but a TCL installation is required
|
||||
by the makefiles. SQLite contains a lot of generated code and TCL is
|
||||
used to do much of that code generation. The makefile also requires
|
||||
AWK.
|
||||
|
||||
Contacts:
|
||||
|
||||
http://www.sqlite.org/
|
||||
http://www.hwaci.com/sw/sqlite/
|
||||
http://groups.yahoo.com/group/sqlite/
|
||||
drh@hwaci.com
|
||||
|
@ -1,6 +1,6 @@
|
||||
This is sqlite 3.7.13
|
||||
This is sqlite 3.7.14
|
||||
|
||||
-- Ryan VanderMeulen <ryanvm@gmail.com>, 06/2012
|
||||
-- Ryan VanderMeulen <ryanvm@gmail.com>, 09/2012
|
||||
|
||||
See http://www.sqlite.org/ for more info.
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -107,9 +107,9 @@ extern "C" {
|
||||
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
|
||||
** [sqlite_version()] and [sqlite_source_id()].
|
||||
*/
|
||||
#define SQLITE_VERSION "3.7.13"
|
||||
#define SQLITE_VERSION_NUMBER 3007013
|
||||
#define SQLITE_SOURCE_ID "2012-06-11 02:05:22 f5b5a13f7394dc143aa136f1d4faba6839eaa6dc"
|
||||
#define SQLITE_VERSION "3.7.14"
|
||||
#define SQLITE_VERSION_NUMBER 3007014
|
||||
#define SQLITE_SOURCE_ID "2012-09-03 15:42:36 c0d89d4a9752922f9e367362366efde4f1b06f2a"
|
||||
|
||||
/*
|
||||
** CAPI3REF: Run-Time Library Version Numbers
|
||||
@ -219,7 +219,8 @@ SQLITE_API int sqlite3_threadsafe(void);
|
||||
** the opaque structure named "sqlite3". It is useful to think of an sqlite3
|
||||
** pointer as an object. The [sqlite3_open()], [sqlite3_open16()], and
|
||||
** [sqlite3_open_v2()] interfaces are its constructors, and [sqlite3_close()]
|
||||
** is its destructor. There are many other interfaces (such as
|
||||
** and [sqlite3_close_v2()] are its destructors. There are many other
|
||||
** interfaces (such as
|
||||
** [sqlite3_prepare_v2()], [sqlite3_create_function()], and
|
||||
** [sqlite3_busy_timeout()] to name but three) that are methods on an
|
||||
** sqlite3 object.
|
||||
@ -266,28 +267,46 @@ typedef sqlite_uint64 sqlite3_uint64;
|
||||
/*
|
||||
** CAPI3REF: Closing A Database Connection
|
||||
**
|
||||
** ^The sqlite3_close() routine is the destructor for the [sqlite3] object.
|
||||
** ^Calls to sqlite3_close() return SQLITE_OK if the [sqlite3] object is
|
||||
** successfully destroyed and all associated resources are deallocated.
|
||||
** ^The sqlite3_close() and sqlite3_close_v2() routines are destructors
|
||||
** for the [sqlite3] object.
|
||||
** ^Calls to sqlite3_close() and sqlite3_close_v2() return SQLITE_OK if
|
||||
** the [sqlite3] object is successfully destroyed and all associated
|
||||
** resources are deallocated.
|
||||
**
|
||||
** Applications must [sqlite3_finalize | finalize] all [prepared statements]
|
||||
** and [sqlite3_blob_close | close] all [BLOB handles] associated with
|
||||
** the [sqlite3] object prior to attempting to close the object. ^If
|
||||
** ^If the database connection is associated with unfinalized prepared
|
||||
** statements or unfinished sqlite3_backup objects then sqlite3_close()
|
||||
** will leave the database connection open and return [SQLITE_BUSY].
|
||||
** ^If sqlite3_close_v2() is called with unfinalized prepared statements
|
||||
** and unfinished sqlite3_backups, then the database connection becomes
|
||||
** an unusable "zombie" which will automatically be deallocated when the
|
||||
** last prepared statement is finalized or the last sqlite3_backup is
|
||||
** finished. The sqlite3_close_v2() interface is intended for use with
|
||||
** host languages that are garbage collected, and where the order in which
|
||||
** destructors are called is arbitrary.
|
||||
**
|
||||
** Applications should [sqlite3_finalize | finalize] all [prepared statements],
|
||||
** [sqlite3_blob_close | close] all [BLOB handles], and
|
||||
** [sqlite3_backup_finish | finish] all [sqlite3_backup] objects associated
|
||||
** with the [sqlite3] object prior to attempting to close the object. ^If
|
||||
** sqlite3_close() is called on a [database connection] that still has
|
||||
** outstanding [prepared statements] or [BLOB handles], then it returns
|
||||
** SQLITE_BUSY.
|
||||
** outstanding [prepared statements], [BLOB handles], and/or
|
||||
** [sqlite3_backup] objects then it returns SQLITE_OK but the deallocation
|
||||
** of resources is deferred until all [prepared statements], [BLOB handles],
|
||||
** and [sqlite3_backup] objects are also destroyed.
|
||||
**
|
||||
** ^If [sqlite3_close()] is invoked while a transaction is open,
|
||||
** ^If an [sqlite3] object is destroyed while a transaction is open,
|
||||
** the transaction is automatically rolled back.
|
||||
**
|
||||
** The C parameter to [sqlite3_close(C)] must be either a NULL
|
||||
** The C parameter to [sqlite3_close(C)] and [sqlite3_close_v2(C)]
|
||||
** must be either a NULL
|
||||
** pointer or an [sqlite3] object pointer obtained
|
||||
** from [sqlite3_open()], [sqlite3_open16()], or
|
||||
** [sqlite3_open_v2()], and not previously closed.
|
||||
** ^Calling sqlite3_close() with a NULL pointer argument is a
|
||||
** harmless no-op.
|
||||
** ^Calling sqlite3_close() or sqlite3_close_v2() with a NULL pointer
|
||||
** argument is a harmless no-op.
|
||||
*/
|
||||
SQLITE_API int sqlite3_close(sqlite3 *);
|
||||
SQLITE_API int sqlite3_close(sqlite3*);
|
||||
SQLITE_API int sqlite3_close_v2(sqlite3*);
|
||||
|
||||
/*
|
||||
** The type for a callback function.
|
||||
@ -498,7 +517,7 @@ SQLITE_API int sqlite3_exec(
|
||||
** CAPI3REF: Device Characteristics
|
||||
**
|
||||
** The xDeviceCharacteristics method of the [sqlite3_io_methods]
|
||||
** object returns an integer which is a vector of the these
|
||||
** object returns an integer which is a vector of these
|
||||
** bit values expressing I/O characteristics of the mass storage
|
||||
** device that holds the file that the [sqlite3_io_methods]
|
||||
** refers to.
|
||||
@ -2648,6 +2667,12 @@ SQLITE_API void sqlite3_progress_handler(sqlite3*, int, int(*)(void*), void*);
|
||||
** codepage is currently defined. Filenames containing international
|
||||
** characters must be converted to UTF-8 prior to passing them into
|
||||
** sqlite3_open() or sqlite3_open_v2().
|
||||
**
|
||||
** <b>Note to Windows Runtime users:</b> The temporary directory must be set
|
||||
** prior to calling sqlite3_open() or sqlite3_open_v2(). Otherwise, various
|
||||
** features that require the use of temporary files may fail.
|
||||
**
|
||||
** See also: [sqlite3_temp_directory]
|
||||
*/
|
||||
SQLITE_API int sqlite3_open(
|
||||
const char *filename, /* Database filename (UTF-8) */
|
||||
@ -3140,8 +3165,11 @@ typedef struct sqlite3_context sqlite3_context;
|
||||
** ^(In those routines that have a fourth argument, its value is the
|
||||
** number of bytes in the parameter. To be clear: the value is the
|
||||
** number of <u>bytes</u> in the value, not the number of characters.)^
|
||||
** ^If the fourth parameter is negative, the length of the string is
|
||||
** ^If the fourth parameter to sqlite3_bind_text() or sqlite3_bind_text16()
|
||||
** is negative, then the length of the string is
|
||||
** the number of bytes up to the first zero terminator.
|
||||
** If the fourth parameter to sqlite3_bind_blob() is negative, then
|
||||
** the behavior is undefined.
|
||||
** If a non-negative fourth parameter is provided to sqlite3_bind_text()
|
||||
** or sqlite3_bind_text16() then that parameter must be the byte offset
|
||||
** where the NUL terminator would occur assuming the string were NUL
|
||||
@ -4138,11 +4166,11 @@ typedef void (*sqlite3_destructor_type)(void*);
|
||||
** the error code is SQLITE_ERROR. ^A subsequent call to sqlite3_result_error()
|
||||
** or sqlite3_result_error16() resets the error code to SQLITE_ERROR.
|
||||
**
|
||||
** ^The sqlite3_result_toobig() interface causes SQLite to throw an error
|
||||
** indicating that a string or BLOB is too long to represent.
|
||||
** ^The sqlite3_result_error_toobig() interface causes SQLite to throw an
|
||||
** error indicating that a string or BLOB is too long to represent.
|
||||
**
|
||||
** ^The sqlite3_result_nomem() interface causes SQLite to throw an error
|
||||
** indicating that a memory allocation failed.
|
||||
** ^The sqlite3_result_error_nomem() interface causes SQLite to throw an
|
||||
** error indicating that a memory allocation failed.
|
||||
**
|
||||
** ^The sqlite3_result_int() interface sets the return value
|
||||
** of the application-defined function to be the 32-bit signed integer
|
||||
@ -4449,6 +4477,21 @@ SQLITE_API int sqlite3_sleep(int);
|
||||
** Hence, if this variable is modified directly, either it should be
|
||||
** made NULL or made to point to memory obtained from [sqlite3_malloc]
|
||||
** or else the use of the [temp_store_directory pragma] should be avoided.
|
||||
**
|
||||
** <b>Note to Windows Runtime users:</b> The temporary directory must be set
|
||||
** prior to calling [sqlite3_open] or [sqlite3_open_v2]. Otherwise, various
|
||||
** features that require the use of temporary files may fail. Here is an
|
||||
** example of how to do this using C++ with the Windows Runtime:
|
||||
**
|
||||
** <blockquote><pre>
|
||||
** LPCWSTR zPath = Windows::Storage::ApplicationData::Current->
|
||||
** TemporaryFolder->Path->Data();
|
||||
** char zPathBuf[MAX_PATH + 1];
|
||||
** memset(zPathBuf, 0, sizeof(zPathBuf));
|
||||
** WideCharToMultiByte(CP_UTF8, 0, zPath, -1, zPathBuf, sizeof(zPathBuf),
|
||||
** NULL, NULL);
|
||||
** sqlite3_temp_directory = sqlite3_mprintf("%s", zPathBuf);
|
||||
** </pre></blockquote>
|
||||
*/
|
||||
SQLITE_API SQLITE_EXTERN char *sqlite3_temp_directory;
|
||||
|
||||
@ -5494,7 +5537,6 @@ SQLITE_API int sqlite3_vfs_unregister(sqlite3_vfs*);
|
||||
** implementations are available in the SQLite core:
|
||||
**
|
||||
** <ul>
|
||||
** <li> SQLITE_MUTEX_OS2
|
||||
** <li> SQLITE_MUTEX_PTHREADS
|
||||
** <li> SQLITE_MUTEX_W32
|
||||
** <li> SQLITE_MUTEX_NOOP
|
||||
@ -5502,9 +5544,9 @@ SQLITE_API int sqlite3_vfs_unregister(sqlite3_vfs*);
|
||||
**
|
||||
** ^The SQLITE_MUTEX_NOOP implementation is a set of routines
|
||||
** that does no real locking and is appropriate for use in
|
||||
** a single-threaded application. ^The SQLITE_MUTEX_OS2,
|
||||
** SQLITE_MUTEX_PTHREADS, and SQLITE_MUTEX_W32 implementations
|
||||
** are appropriate for use on OS/2, Unix, and Windows.
|
||||
** a single-threaded application. ^The SQLITE_MUTEX_PTHREADS and
|
||||
** SQLITE_MUTEX_W32 implementations are appropriate for use on Unix
|
||||
** and Windows.
|
||||
**
|
||||
** ^(If SQLite is compiled with the SQLITE_MUTEX_APPDEF preprocessor
|
||||
** macro defined (with "-DSQLITE_MUTEX_APPDEF=1"), then no mutex
|
||||
|
@ -48,7 +48,7 @@
|
||||
/*
|
||||
** Figure out if we are dealing with Unix, Windows, or some other
|
||||
** operating system. After the following block of preprocess macros,
|
||||
** all of SQLITE_OS_UNIX, SQLITE_OS_WIN, SQLITE_OS_OS2, and SQLITE_OS_OTHER
|
||||
** all of SQLITE_OS_UNIX, SQLITE_OS_WIN, and SQLITE_OS_OTHER
|
||||
** will defined to either 1 or 0. One of the four will be 1. The other
|
||||
** three will be 0.
|
||||
*/
|
||||
@ -58,8 +58,6 @@
|
||||
# define SQLITE_OS_UNIX 0
|
||||
# undef SQLITE_OS_WIN
|
||||
# define SQLITE_OS_WIN 0
|
||||
# undef SQLITE_OS_OS2
|
||||
# define SQLITE_OS_OS2 0
|
||||
# else
|
||||
# undef SQLITE_OS_OTHER
|
||||
# endif
|
||||
@ -71,20 +69,12 @@
|
||||
|| defined(__MINGW32__) || defined(__BORLANDC__)
|
||||
# define SQLITE_OS_WIN 1
|
||||
# define SQLITE_OS_UNIX 0
|
||||
# define SQLITE_OS_OS2 0
|
||||
# elif defined(__EMX__) || defined(_OS2) || defined(OS2) \
|
||||
|| defined(_OS2_) || defined(__OS2__)
|
||||
# define SQLITE_OS_WIN 0
|
||||
# define SQLITE_OS_UNIX 0
|
||||
# define SQLITE_OS_OS2 1
|
||||
# else
|
||||
# define SQLITE_OS_WIN 0
|
||||
# define SQLITE_OS_UNIX 1
|
||||
# define SQLITE_OS_OS2 0
|
||||
# endif
|
||||
# else
|
||||
# define SQLITE_OS_UNIX 0
|
||||
# define SQLITE_OS_OS2 0
|
||||
# endif
|
||||
#else
|
||||
# ifndef SQLITE_OS_WIN
|
||||
|
@ -16,12 +16,17 @@ void
|
||||
AlarmHalService::Init()
|
||||
{
|
||||
mAlarmEnabled = RegisterTheOneAlarmObserver(this);
|
||||
if (!mAlarmEnabled) {
|
||||
return;
|
||||
}
|
||||
RegisterSystemTimeChangeObserver(this);
|
||||
}
|
||||
|
||||
/* virtual */ AlarmHalService::~AlarmHalService()
|
||||
{
|
||||
if (mAlarmEnabled) {
|
||||
UnregisterTheOneAlarmObserver();
|
||||
UnregisterSystemTimeChangeObserver(this);
|
||||
}
|
||||
}
|
||||
|
||||
@ -48,7 +53,6 @@ AlarmHalService::SetAlarm(int32_t aSeconds, int32_t aNanoseconds, bool* aStatus)
|
||||
}
|
||||
|
||||
bool status = hal::SetAlarm(aSeconds, aNanoseconds);
|
||||
|
||||
if (status) {
|
||||
*aStatus = status;
|
||||
return NS_OK;
|
||||
@ -74,9 +78,19 @@ AlarmHalService::SetTimezoneChangedCb(nsITimezoneChangedCb* aTimeZoneChangedCb)
|
||||
void
|
||||
AlarmHalService::Notify(const mozilla::void_t& aVoid)
|
||||
{
|
||||
if (mAlarmFiredCb) {
|
||||
mAlarmFiredCb->OnAlarmFired();
|
||||
if (!mAlarmFiredCb) {
|
||||
return;
|
||||
}
|
||||
mAlarmFiredCb->OnAlarmFired();
|
||||
}
|
||||
|
||||
void
|
||||
AlarmHalService::Notify(const SystemTimeChange& aReason)
|
||||
{
|
||||
if (aReason != SYS_TIME_CHANGE_TZ || !mTimezoneChangedCb) {
|
||||
return;
|
||||
}
|
||||
mTimezoneChangedCb->OnTimezoneChanged(GetTimezoneOffset(false));
|
||||
}
|
||||
|
||||
int32_t
|
||||
|
@ -19,8 +19,11 @@ namespace mozilla {
|
||||
namespace dom {
|
||||
namespace alarm {
|
||||
|
||||
using namespace hal;
|
||||
|
||||
class AlarmHalService : public nsIAlarmHalService,
|
||||
mozilla::hal::AlarmObserver
|
||||
public AlarmObserver,
|
||||
public SystemTimeObserver
|
||||
{
|
||||
public:
|
||||
NS_DECL_ISUPPORTS
|
||||
@ -34,17 +37,14 @@ public:
|
||||
// Implementing hal::AlarmObserver
|
||||
void Notify(const mozilla::void_t& aVoid);
|
||||
|
||||
// Implementing hal::SystemTimeObserver
|
||||
void Notify(const SystemTimeChange& aReason);
|
||||
|
||||
private:
|
||||
bool mAlarmEnabled;
|
||||
nsCOMPtr<nsIAlarmFiredCb> mAlarmFiredCb;
|
||||
static StaticRefPtr<AlarmHalService> sSingleton;
|
||||
|
||||
// TODO The mTimezoneChangedCb would be called
|
||||
// when a timezone-changed event is detected
|
||||
// at run-time. To do so, we can register a
|
||||
// timezone-changed observer, see bug 714358.
|
||||
// We need to adjust the alarm time respect to
|
||||
// the correct timezone where user is located.
|
||||
nsCOMPtr<nsIAlarmFiredCb> mAlarmFiredCb;
|
||||
nsCOMPtr<nsITimezoneChangedCb> mTimezoneChangedCb;
|
||||
|
||||
int32_t GetTimezoneOffset(bool aIgnoreDST);
|
||||
|
@ -31,25 +31,6 @@ function WebappsRegistry() {
|
||||
|
||||
WebappsRegistry.prototype = {
|
||||
__proto__: DOMRequestIpcHelper.prototype,
|
||||
__exposedProps__: {
|
||||
install: 'r',
|
||||
#ifdef MOZ_PHOENIX
|
||||
# Firefox Desktop: installPackage not implemented
|
||||
#elifdef ANDROID
|
||||
#ifndef MOZ_WIDGET_GONK
|
||||
# Firefox Android (Fennec): installPackage not implemented
|
||||
#else
|
||||
# B2G Gonk: installPackage implemented
|
||||
installPackage: 'r',
|
||||
#endif
|
||||
#else
|
||||
# B2G Desktop and others: installPackage implementation status varies
|
||||
installPackage: 'r',
|
||||
#endif
|
||||
getSelf: 'r',
|
||||
getInstalled: 'r',
|
||||
mgmt: 'r'
|
||||
},
|
||||
|
||||
/** from https://developer.mozilla.org/en/OpenWebApps/The_Manifest
|
||||
* only the name property is mandatory
|
||||
@ -274,20 +255,6 @@ function WebappsApplication() {
|
||||
|
||||
WebappsApplication.prototype = {
|
||||
__proto__: DOMRequestIpcHelper.prototype,
|
||||
__exposedProps__: {
|
||||
origin: 'r',
|
||||
manifest: 'r',
|
||||
manifestURL: 'r',
|
||||
installOrigin: 'r',
|
||||
installTime: 'r',
|
||||
status: 'r',
|
||||
progress: 'r',
|
||||
onprogress: 'rw',
|
||||
launch: 'r',
|
||||
receipts: 'r',
|
||||
removable: 'r',
|
||||
uninstall: 'r'
|
||||
},
|
||||
|
||||
init: function(aWindow, aApp) {
|
||||
this.origin = aApp.origin;
|
||||
|
@ -82,7 +82,7 @@ struct nsExternalDOMClassInfoData : public nsDOMClassInfoData
|
||||
};
|
||||
|
||||
|
||||
typedef PRUptrdiff PtrBits;
|
||||
typedef uintptr_t PtrBits;
|
||||
|
||||
// To be used with the nsDOMClassInfoData::mCachedClassInfo pointer.
|
||||
// The low bit is set when we created a generic helper for an external
|
||||
|
@ -2812,7 +2812,7 @@ nsDOMWindowUtils::ExitFullscreen()
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDOMWindowUtils::SelectAtPoint(float aX, float aY, PRUint32 aSelectBehavior,
|
||||
nsDOMWindowUtils::SelectAtPoint(float aX, float aY, uint32_t aSelectBehavior,
|
||||
bool *_retval)
|
||||
{
|
||||
*_retval = false;
|
||||
@ -2885,7 +2885,7 @@ nsDOMWindowUtils::SelectAtPoint(float aX, float aY, PRUint32 aSelectBehavior,
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDOMWindowUtils::LoadSheet(nsIURI *aSheetURI, PRUint32 aSheetType)
|
||||
nsDOMWindowUtils::LoadSheet(nsIURI *aSheetURI, uint32_t aSheetType)
|
||||
{
|
||||
if (!IsUniversalXPConnectCapable()) {
|
||||
return NS_ERROR_DOM_SECURITY_ERR;
|
||||
@ -2916,7 +2916,7 @@ nsDOMWindowUtils::LoadSheet(nsIURI *aSheetURI, PRUint32 aSheetType)
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDOMWindowUtils::RemoveSheet(nsIURI *aSheetURI, PRUint32 aSheetType)
|
||||
nsDOMWindowUtils::RemoveSheet(nsIURI *aSheetURI, uint32_t aSheetType)
|
||||
{
|
||||
if (!IsUniversalXPConnectCapable()) {
|
||||
return NS_ERROR_DOM_SECURITY_ERR;
|
||||
|
@ -12,7 +12,7 @@ struct JSObject;
|
||||
struct JSContext;
|
||||
class XPCWrappedNativeScope;
|
||||
|
||||
typedef PRUptrdiff PtrBits;
|
||||
typedef uintptr_t PtrBits;
|
||||
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
|
@ -41,13 +41,31 @@ function SystemMessageInternal() {
|
||||
|
||||
SystemMessageInternal.prototype = {
|
||||
sendMessage: function sendMessage(aType, aMessage, aPageURI, aManifestURI) {
|
||||
this._sendMessage(aType, aMessage, aPageURI.spec, aManifestURI.spec);
|
||||
debug("Broadcasting " + aType + " " + JSON.stringify(aMessage));
|
||||
ppmm.broadcastAsyncMessage("SystemMessageManager:Message" , { type: aType,
|
||||
msg: aMessage,
|
||||
manifest: aManifestURI.spec });
|
||||
this._pages.forEach(function sendMess_openPage(aPage) {
|
||||
if (aPage.type != aType ||
|
||||
aPage.manifest != aManifestURI.spec ||
|
||||
aPage.uri != aPageURI.spec) {
|
||||
return;
|
||||
}
|
||||
|
||||
this._processPage(aPage, aMessage);
|
||||
}.bind(this))
|
||||
},
|
||||
|
||||
broadcastMessage: function broadcastMessage(aType, aMessage) {
|
||||
debug("Broadcasting " + aType + " " + JSON.stringify(aMessage));
|
||||
// Find pages that registered an handler for this type.
|
||||
this._pages.forEach(function(aPage) {
|
||||
if (aPage.type == aType) {
|
||||
this._sendMessage(aType, aMessage, aPage.uri, aPage.manifest);
|
||||
ppmm.broadcastAsyncMessage("SystemMessageManager:Message" , { type: aType,
|
||||
msg: aMessage,
|
||||
manifest: aPage.manifest });
|
||||
|
||||
this._processPage(aPage, aMessage);
|
||||
}
|
||||
}.bind(this))
|
||||
},
|
||||
@ -101,33 +119,20 @@ SystemMessageInternal.prototype = {
|
||||
}
|
||||
},
|
||||
|
||||
_sendMessage: function _sendMessage(aType, aMessage, aPageURI, aManifestURI) {
|
||||
debug("Broadcasting " + aType + " " + JSON.stringify(aMessage));
|
||||
ppmm.broadcastAsyncMessage("SystemMessageManager:Message" , { type: aType,
|
||||
msg: aMessage,
|
||||
manifest: aManifestURI });
|
||||
_processPage: function _processPage(aPage, aMessage) {
|
||||
// Queue the message for the page.
|
||||
aPage.pending.push(aMessage);
|
||||
if (aPage.pending.length > kMaxPendingMessages) {
|
||||
aPage.pending.splice(0, 1);
|
||||
}
|
||||
|
||||
// Queue the message for pages that registered an handler for this type.
|
||||
this._pages.forEach(function sendMess_openPage(aPage) {
|
||||
if (aPage.type != aType ||
|
||||
aPage.manifest != aManifestURI ||
|
||||
aPage.uri != aPageURI) {
|
||||
return;
|
||||
}
|
||||
|
||||
aPage.pending.push(aMessage);
|
||||
if (aPage.pending.length > kMaxPendingMessages) {
|
||||
aPage.pending.splice(0, 1);
|
||||
}
|
||||
|
||||
// We don't need to send the full object to observers.
|
||||
let page = { uri: aPage.uri,
|
||||
manifest: aPage.manifest,
|
||||
type: aPage.type,
|
||||
target: aMessage.target };
|
||||
debug("Asking to open " + JSON.stringify(page));
|
||||
Services.obs.notifyObservers(this, "system-messages-open-app", JSON.stringify(page));
|
||||
}.bind(this))
|
||||
// We don't need to send the full object to observers.
|
||||
let page = { uri: aPage.uri,
|
||||
manifest: aPage.manifest,
|
||||
type: aPage.type,
|
||||
target: aMessage.target };
|
||||
debug("Asking to open " + JSON.stringify(page));
|
||||
Services.obs.notifyObservers(this, "system-messages-open-app", JSON.stringify(page));
|
||||
},
|
||||
|
||||
classID: Components.ID("{70589ca5-91ac-4b9e-b839-d6a88167d714}"),
|
||||
|
@ -347,9 +347,14 @@ interface nsIDOMMozMobileCellInfo: nsISupports
|
||||
readonly attribute unsigned long gsmCellId;
|
||||
};
|
||||
|
||||
[scriptable, uuid(109c1117-1199-47aa-aad2-ea9f456220fa)]
|
||||
[scriptable, uuid(8854ee5f-8ffa-45c1-84d6-e87d82de6ae8)]
|
||||
interface nsIDOMMozMobileICCInfo : nsISupports
|
||||
{
|
||||
/**
|
||||
* Integrated Circuit Card Identifier.
|
||||
*/
|
||||
readonly attribute DOMString iccid;
|
||||
|
||||
/**
|
||||
* Mobile Country Code (MCC) of the subscriber's home network.
|
||||
*/
|
||||
|
@ -9,6 +9,10 @@ let connection = navigator.mozMobileConnection;
|
||||
ok(connection instanceof MozMobileConnection,
|
||||
"connection is instanceof " + connection.constructor);
|
||||
|
||||
// The emulator's hard coded iccid value.
|
||||
// See it here {B2G_HOME}/external/qemu/telephony/sim_card.c#L299.
|
||||
is(connection.iccInfo.iccid, 89014103211118510720);
|
||||
|
||||
// The emulator's hard coded mcc and mnc codes.
|
||||
// See it here {B2G_HOME}/external/qemu/telephony/android_modem.c#L2465.
|
||||
is(connection.iccInfo.mcc, 310);
|
||||
|
@ -31,7 +31,7 @@
|
||||
#include "nsIURL.h"
|
||||
#include "nsXPIDLString.h"
|
||||
#include "nsReadableUtils.h"
|
||||
#include "nsIProtocolProxyService.h"
|
||||
#include "nsIProtocolProxyService2.h"
|
||||
#include "nsIStreamConverterService.h"
|
||||
#include "nsIFile.h"
|
||||
#if defined(XP_MACOSX)
|
||||
@ -743,12 +743,17 @@ nsresult nsPluginHost::FindProxyForURL(const char* url, char* *result)
|
||||
|
||||
nsCOMPtr<nsIURI> uriIn;
|
||||
nsCOMPtr<nsIProtocolProxyService> proxyService;
|
||||
nsCOMPtr<nsIProtocolProxyService2> proxyService2;
|
||||
nsCOMPtr<nsIIOService> ioService;
|
||||
|
||||
proxyService = do_GetService(NS_PROTOCOLPROXYSERVICE_CONTRACTID, &res);
|
||||
if (NS_FAILED(res) || !proxyService)
|
||||
return res;
|
||||
|
||||
proxyService2 = do_QueryInterface(proxyService, &res);
|
||||
if (NS_FAILED(res) || !proxyService)
|
||||
return res;
|
||||
|
||||
ioService = do_GetService(NS_IOSERVICE_CONTRACTID, &res);
|
||||
if (NS_FAILED(res) || !ioService)
|
||||
return res;
|
||||
@ -760,7 +765,8 @@ nsresult nsPluginHost::FindProxyForURL(const char* url, char* *result)
|
||||
|
||||
nsCOMPtr<nsIProxyInfo> pi;
|
||||
|
||||
res = proxyService->Resolve(uriIn, 0, getter_AddRefs(pi));
|
||||
// Remove this with bug 778201
|
||||
res = proxyService2->DeprecatedBlockingResolve(uriIn, 0, getter_AddRefs(pi));
|
||||
if (NS_FAILED(res))
|
||||
return res;
|
||||
|
||||
|
@ -106,6 +106,7 @@ MobileICCInfo.prototype = {
|
||||
|
||||
// nsIDOMMozMobileICCInfo
|
||||
|
||||
iccid: null,
|
||||
mcc: 0,
|
||||
mnc: 0
|
||||
};
|
||||
@ -231,8 +232,9 @@ RILContentHelper.prototype = {
|
||||
Ci.nsIRILContentHelper]}),
|
||||
|
||||
updateICCInfo: function updateICCInfo(srcInfo, destInfo) {
|
||||
destInfo.mcc = srcInfo.mcc;
|
||||
destInfo.mnc = srcInfo.mnc;
|
||||
for (let key in srcInfo) {
|
||||
destInfo[key] = srcInfo[key];
|
||||
}
|
||||
},
|
||||
|
||||
updateConnectionInfo: function updateConnectionInfo(srcInfo, destInfo) {
|
||||
|
@ -1080,7 +1080,12 @@ RadioInterfaceLayer.prototype = {
|
||||
handleICCInfoChange: function handleICCInfoChange(message) {
|
||||
let oldIcc = this.rilContext.icc;
|
||||
this.rilContext.icc = message;
|
||||
if (oldIcc && (oldIcc.mcc == message.mcc || oldIcc.mnc == message.mnc)) {
|
||||
|
||||
let iccInfoChanged = !oldIcc ||
|
||||
oldIcc.iccid != message.iccid ||
|
||||
oldIcc.mcc != message.mcc ||
|
||||
oldIcc.mnc != message.mnc;
|
||||
if (!iccInfoChanged) {
|
||||
return;
|
||||
}
|
||||
// RIL:IccInfoChanged corresponds to a DOM event that gets fired only
|
||||
|
@ -1059,6 +1059,7 @@ let RIL = {
|
||||
* Fetch ICC records.
|
||||
*/
|
||||
fetchICCRecords: function fetchICCRecords() {
|
||||
this.getICCID();
|
||||
this.getIMSI();
|
||||
this.getMSISDN();
|
||||
this.getAD();
|
||||
@ -1091,6 +1092,35 @@ let RIL = {
|
||||
Buf.sendParcel();
|
||||
},
|
||||
|
||||
/**
|
||||
* Read the ICCD from the ICC card.
|
||||
*/
|
||||
getICCID: function getICCID() {
|
||||
function callback() {
|
||||
let length = Buf.readUint32();
|
||||
this.iccInfo.iccid = GsmPDUHelper.readSwappedNibbleBcdString(length / 2);
|
||||
Buf.readStringDelimiter(length);
|
||||
|
||||
if (DEBUG) debug("ICCID: " + this.iccInfo.iccid);
|
||||
if (this.iccInfo.iccid) {
|
||||
this._handleICCInfoChange();
|
||||
}
|
||||
}
|
||||
|
||||
this.iccIO({
|
||||
command: ICC_COMMAND_GET_RESPONSE,
|
||||
fileId: ICC_EF_ICCID,
|
||||
pathId: this._getPathIdForICCRecord(ICC_EF_ICCID),
|
||||
p1: 0, // For GET_RESPONSE, p1 = 0
|
||||
p2: 0, // For GET_RESPONSE, p2 = 0
|
||||
p3: GET_RESPONSE_EF_SIZE_BYTES,
|
||||
data: null,
|
||||
pin2: null,
|
||||
type: EF_TYPE_TRANSPARENT,
|
||||
callback: callback,
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* Read the MSISDN from the ICC.
|
||||
*/
|
||||
@ -2329,10 +2359,20 @@ let RIL = {
|
||||
return null;
|
||||
}
|
||||
|
||||
// Here we handle only file ids that are common to RUIM, SIM, USIM
|
||||
// and other types of ICC cards.
|
||||
switch (fileId) {
|
||||
case ICC_EF_ICCID:
|
||||
return EF_PATH_MF_SIM;
|
||||
case ICC_EF_ADN:
|
||||
return EF_PATH_MF_SIM + EF_PATH_DF_TELECOM;
|
||||
case ICC_EF_PBR:
|
||||
return EF_PATH_MF_SIM + EF_PATH_DF_TELECOM + EF_PATH_DF_PHONEBOOK;
|
||||
}
|
||||
|
||||
switch (app.app_type) {
|
||||
case CARD_APPTYPE_SIM:
|
||||
switch (fileId) {
|
||||
case ICC_EF_ADN:
|
||||
case ICC_EF_FDN:
|
||||
case ICC_EF_MSISDN:
|
||||
return EF_PATH_MF_SIM + EF_PATH_DF_TELECOM;
|
||||
@ -2341,21 +2381,16 @@ let RIL = {
|
||||
case ICC_EF_MBDN:
|
||||
case ICC_EF_UST:
|
||||
return EF_PATH_MF_SIM + EF_PATH_DF_GSM;
|
||||
case ICC_EF_PBR:
|
||||
return EF_PATH_MF_SIM + EF_PATH_DF_TELECOM + EF_PATH_DF_PHONEBOOK;
|
||||
}
|
||||
case CARD_APPTYPE_USIM:
|
||||
switch (fileId) {
|
||||
case ICC_EF_AD:
|
||||
case ICC_EF_FDN:
|
||||
case ICC_EF_MBDN:
|
||||
case ICC_EF_UST:
|
||||
case ICC_EF_MSISDN:
|
||||
return EF_PATH_MF_SIM + EF_PATH_ADF_USIM;
|
||||
case ICC_EF_ADN:
|
||||
case ICC_EF_FDN:
|
||||
return EF_PATH_MF_SIM + EF_PATH_DF_TELECOM;
|
||||
case ICC_EF_PBR:
|
||||
return EF_PATH_MF_SIM + EF_PATH_DF_TELECOM + EF_PATH_DF_PHONEBOOK;
|
||||
|
||||
default:
|
||||
// The file ids in USIM phone book entries are decided by the
|
||||
// card manufacturer. So if we don't match any of the cases
|
||||
|
@ -4,8 +4,9 @@
|
||||
* 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/. */
|
||||
|
||||
|
||||
#include "nsCookiePermission.h"
|
||||
|
||||
#include "mozIThirdPartyUtil.h"
|
||||
#include "nsICookie2.h"
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsICookiePromptService.h"
|
||||
@ -64,6 +65,8 @@ nsCookiePermission::Init()
|
||||
nsresult rv;
|
||||
mPermMgr = do_GetService(NS_PERMISSIONMANAGER_CONTRACTID, &rv);
|
||||
if (NS_FAILED(rv)) return false;
|
||||
mThirdPartyUtil = do_GetService(THIRDPARTYUTIL_CONTRACTID, &rv);
|
||||
if (NS_FAILED(rv)) return false;
|
||||
|
||||
// failure to access the pref service is non-fatal...
|
||||
nsCOMPtr<nsIPrefBranch> prefBranch =
|
||||
@ -167,29 +170,15 @@ nsCookiePermission::CanAccess(nsIURI *aURI,
|
||||
// finally, check with permission manager...
|
||||
rv = mPermMgr->TestPermission(aURI, kPermissionType, (uint32_t *) aResult);
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
switch (*aResult) {
|
||||
// if we have one of the publicly-available values, just return it
|
||||
case nsIPermissionManager::UNKNOWN_ACTION: // ACCESS_DEFAULT
|
||||
case nsIPermissionManager::ALLOW_ACTION: // ACCESS_ALLOW
|
||||
case nsIPermissionManager::DENY_ACTION: // ACCESS_DENY
|
||||
break;
|
||||
|
||||
// ACCESS_SESSION means the cookie can be accepted; the session
|
||||
// downgrade will occur in CanSetCookie().
|
||||
case nsICookiePermission::ACCESS_SESSION:
|
||||
*aResult = ACCESS_ALLOW;
|
||||
break;
|
||||
|
||||
// ack, an unknown type! just use the defaults.
|
||||
default:
|
||||
*aResult = ACCESS_DEFAULT;
|
||||
if (*aResult == nsICookiePermission::ACCESS_SESSION) {
|
||||
*aResult = nsICookiePermission::ACCESS_ALLOW;
|
||||
}
|
||||
}
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
NS_IMETHODIMP
|
||||
nsCookiePermission::CanSetCookie(nsIURI *aURI,
|
||||
nsIChannel *aChannel,
|
||||
nsICookie2 *aCookie,
|
||||
@ -207,34 +196,42 @@ nsCookiePermission::CanSetCookie(nsIURI *aURI,
|
||||
|
||||
uint32_t perm;
|
||||
mPermMgr->TestPermission(aURI, kPermissionType, &perm);
|
||||
bool isThirdParty = false;
|
||||
switch (perm) {
|
||||
case nsICookiePermission::ACCESS_SESSION:
|
||||
*aIsSession = true;
|
||||
|
||||
case nsIPermissionManager::ALLOW_ACTION: // ACCESS_ALLOW
|
||||
case nsICookiePermission::ACCESS_ALLOW:
|
||||
*aResult = true;
|
||||
break;
|
||||
|
||||
case nsIPermissionManager::DENY_ACTION: // ACCESS_DENY
|
||||
case nsICookiePermission::ACCESS_DENY:
|
||||
*aResult = false;
|
||||
break;
|
||||
|
||||
case nsICookiePermission::ACCESS_ALLOW_FIRST_PARTY_ONLY:
|
||||
mThirdPartyUtil->IsThirdPartyChannel(aChannel, aURI, &isThirdParty);
|
||||
// If it's third party, we can't set the cookie
|
||||
if (isThirdParty)
|
||||
*aResult = false;
|
||||
break;
|
||||
|
||||
default:
|
||||
// the permission manager has nothing to say about this cookie -
|
||||
// so, we apply the default prefs to it.
|
||||
NS_ASSERTION(perm == nsIPermissionManager::UNKNOWN_ACTION, "unknown permission");
|
||||
|
||||
|
||||
// now we need to figure out what type of accept policy we're dealing with
|
||||
// if we accept cookies normally, just bail and return
|
||||
if (mCookiesLifetimePolicy == ACCEPT_NORMALLY) {
|
||||
*aResult = true;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
// declare this here since it'll be used in all of the remaining cases
|
||||
int64_t currentTime = PR_Now() / PR_USEC_PER_SEC;
|
||||
int64_t delta = *aExpiry - currentTime;
|
||||
|
||||
|
||||
// check whether the user wants to be prompted
|
||||
if (mCookiesLifetimePolicy == ASK_BEFORE_ACCEPT) {
|
||||
// if it's a session cookie and the user wants to accept these
|
||||
@ -245,7 +242,7 @@ nsCookiePermission::CanSetCookie(nsIURI *aURI,
|
||||
*aResult = true;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
// default to rejecting, in case the prompting process fails
|
||||
*aResult = false;
|
||||
|
||||
|
@ -11,6 +11,7 @@
|
||||
#include "nsCOMPtr.h"
|
||||
#include "prlong.h"
|
||||
#include "nsIPrivateBrowsingService.h"
|
||||
#include "mozIThirdPartyUtil.h"
|
||||
|
||||
class nsIPrefBranch;
|
||||
|
||||
@ -22,7 +23,7 @@ public:
|
||||
NS_DECL_NSICOOKIEPERMISSION
|
||||
NS_DECL_NSIOBSERVER
|
||||
|
||||
nsCookiePermission()
|
||||
nsCookiePermission()
|
||||
: mCookiesLifetimeSec(LL_MAXINT)
|
||||
, mCookiesLifetimePolicy(0) // ACCEPT_NORMALLY
|
||||
, mCookiesAlwaysAcceptSession(false)
|
||||
@ -33,11 +34,12 @@ public:
|
||||
void PrefChanged(nsIPrefBranch *, const char *);
|
||||
|
||||
private:
|
||||
bool EnsureInitialized() { return mPermMgr != NULL || Init(); };
|
||||
bool InPrivateBrowsing();
|
||||
bool EnsureInitialized() { return (mPermMgr != NULL && mThirdPartyUtil != NULL) || Init(); };
|
||||
bool InPrivateBrowsing();
|
||||
|
||||
nsCOMPtr<nsIPermissionManager> mPermMgr;
|
||||
nsCOMPtr<nsIPrivateBrowsingService> mPBService;
|
||||
nsCOMPtr<mozIThirdPartyUtil> mThirdPartyUtil;
|
||||
|
||||
int64_t mCookiesLifetimeSec; // lifetime limit specified in seconds
|
||||
uint8_t mCookiesLifetimePolicy; // pref for how long cookies are stored
|
||||
|
@ -32,7 +32,7 @@ function run_test() {
|
||||
// Force the channel URI to be used when determining the originating URI of
|
||||
// the channel.
|
||||
var httpchannel1 = channel1.QueryInterface(Ci.nsIHttpChannelInternal);
|
||||
var httpchannel2 = channel1.QueryInterface(Ci.nsIHttpChannelInternal);
|
||||
var httpchannel2 = channel2.QueryInterface(Ci.nsIHttpChannelInternal);
|
||||
httpchannel1.forceAllowThirdPartyCookie = true;
|
||||
httpchannel2.forceAllowThirdPartyCookie = true;
|
||||
|
||||
@ -49,5 +49,27 @@ function run_test() {
|
||||
Services.cookies.removeAll();
|
||||
do_set_cookies(uri1, channel2, true, [0, 0, 0, 0]);
|
||||
Services.cookies.removeAll();
|
||||
|
||||
// Test per-site 3rd party cookies with cookies enabled
|
||||
Services.prefs.setIntPref("network.cookie.cookieBehavior", 0);
|
||||
var kPermissionType = "cookie";
|
||||
var ALLOW_FIRST_PARTY_ONLY = 9;
|
||||
// ALLOW_FIRST_PARTY_ONLY overrides
|
||||
Services.permissions.add(uri1, kPermissionType, ALLOW_FIRST_PARTY_ONLY);
|
||||
do_set_cookies(uri1, channel1, true, [0, 1, 1, 2]);
|
||||
Services.cookies.removeAll();
|
||||
do_set_cookies(uri1, channel2, true, [0, 0, 0, 0]);
|
||||
Services.cookies.removeAll();
|
||||
|
||||
// Test per-site 3rd party cookies with 3rd party cookies disabled
|
||||
Services.prefs.setIntPref("network.cookie.cookieBehavior", 1);
|
||||
do_set_cookies(uri1, channel1, true, [0, 1, 1, 2]);
|
||||
Services.cookies.removeAll();
|
||||
// No preference has been set for uri2, but it should act as if
|
||||
// ALLOW_FIRST_PARTY_ONLY has been set
|
||||
do_set_cookies(uri2, channel2, true, [0, 1, 1, 2]);
|
||||
Services.cookies.removeAll();
|
||||
do_set_cookies(uri1, channel2, true, [0, 0, 0, 0]);
|
||||
Services.cookies.removeAll();
|
||||
}
|
||||
|
||||
|
@ -35,7 +35,7 @@ function do_run_test() {
|
||||
// Force the channel URI to be used when determining the originating URI of
|
||||
// the channel.
|
||||
var httpchannel1 = channel1.QueryInterface(Ci.nsIHttpChannelInternal);
|
||||
var httpchannel2 = channel1.QueryInterface(Ci.nsIHttpChannelInternal);
|
||||
var httpchannel2 = channel2.QueryInterface(Ci.nsIHttpChannelInternal);
|
||||
httpchannel1.forceAllowThirdPartyCookie = true;
|
||||
httpchannel2.forceAllowThirdPartyCookie = true;
|
||||
|
||||
@ -73,4 +73,3 @@ function do_run_test() {
|
||||
|
||||
finish_test();
|
||||
}
|
||||
|
||||
|
@ -952,6 +952,27 @@ void AsyncPanZoomController::NotifyLayersUpdated(const FrameMetrics& aViewportFr
|
||||
} else {
|
||||
mContentPainterStatus = CONTENT_IDLE;
|
||||
}
|
||||
} else {
|
||||
// No paint was requested, but we got one anyways. One possible cause of this
|
||||
// is that content could have fired a scrollTo(). In this case, we should take
|
||||
// the new scroll offset. Document/viewport changes are handled elsewhere.
|
||||
// Also note that, since NotifyLayersUpdated() is called whenever there's a
|
||||
// layers update, we didn't necessarily get a new scroll offset, but we're
|
||||
// updating our local copy of it anyways just in case.
|
||||
switch (mState) {
|
||||
case NOTHING:
|
||||
case FLING:
|
||||
case TOUCHING:
|
||||
case WAITING_LISTENERS:
|
||||
// FIXME/bug 784908: Scroll offset is stored in layer pixels in the rest
|
||||
// of the layers code, but we want it in CSS pixels.
|
||||
mFrameMetrics.mViewportScrollOffset =
|
||||
aViewportFrame.mViewportScrollOffset / aViewportFrame.mResolution.width;
|
||||
break;
|
||||
// Don't clobber if we're in other states.
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (aIsFirstPaint || mFrameMetrics.IsDefault()) {
|
||||
|
@ -29,7 +29,7 @@ typedef uint64_t uint64_t;
|
||||
/* OS/2's stdlib typdefs uintptr_t. So we'll just include that so we don't collide */
|
||||
#include <stdlib.h>
|
||||
#elif !defined(__intptr_t_defined) && !defined(_UINTPTR_T_DEFINED)
|
||||
typedef PRUptrdiff uintptr_t;
|
||||
typedef unsigned long uintptr_t;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
@ -1064,7 +1064,7 @@ private:
|
||||
float x, y, width, height;
|
||||
};
|
||||
|
||||
typedef PRUptrdiff PtrBits;
|
||||
typedef uintptr_t PtrBits;
|
||||
enum { BLOCK_SIZE_BITS = 7, BLOCK_SIZE = 1 << BLOCK_SIZE_BITS }; // 128-glyph blocks
|
||||
|
||||
class GlyphWidths {
|
||||
|
@ -322,7 +322,7 @@ diff --git a/gfx/ycbcr/yuv_convert.cpp b/gfx/ycbcr/yuv_convert.cpp
|
||||
uint8 yuvbuf[16 + kFilterBufferSize * 3 + 16];
|
||||
uint8* ybuf =
|
||||
- reinterpret_cast<uint8*>(reinterpret_cast<uintptr_t>(yuvbuf + 15) & ~15);
|
||||
+ reinterpret_cast<uint8*>(reinterpret_cast<PRUptrdiff>(yuvbuf + 15) & ~15);
|
||||
+ reinterpret_cast<uint8*>(reinterpret_cast<uintptr_t>(yuvbuf + 15) & ~15);
|
||||
uint8* ubuf = ybuf + kFilterBufferSize;
|
||||
uint8* vbuf = ubuf + kFilterBufferSize;
|
||||
// TODO(fbarchard): Fixed point math is off by 1 on negatives.
|
||||
|
@ -252,7 +252,7 @@ NS_GFX_(void) ScaleYCbCrToRGB32(const uint8* y_buf,
|
||||
// after the end for SSE2 version.
|
||||
uint8 yuvbuf[16 + kFilterBufferSize * 3 + 16];
|
||||
uint8* ybuf =
|
||||
reinterpret_cast<uint8*>(reinterpret_cast<PRUptrdiff>(yuvbuf + 15) & ~15);
|
||||
reinterpret_cast<uint8*>(reinterpret_cast<uintptr_t>(yuvbuf + 15) & ~15);
|
||||
uint8* ubuf = ybuf + kFilterBufferSize;
|
||||
uint8* vbuf = ubuf + kFilterBufferSize;
|
||||
// TODO(fbarchard): Fixed point math is off by 1 on negatives.
|
||||
|
@ -59,6 +59,28 @@
|
||||
#define NsecPerMsec 1000000
|
||||
#define NsecPerSec 1000000000
|
||||
|
||||
// The header linux/oom.h is not available in bionic libc. We
|
||||
// redefine some of its constants here.
|
||||
|
||||
#ifndef OOM_DISABLE
|
||||
#define OOM_DISABLE (-17)
|
||||
#endif
|
||||
|
||||
#ifndef OOM_ADJUST_MIN
|
||||
#define OOM_ADJUST_MIN (-16)
|
||||
#endif
|
||||
|
||||
#ifndef OOM_ADJUST_MAX
|
||||
#define OOM_ADJUST_MAX 15
|
||||
#endif
|
||||
|
||||
#ifndef OOM_SCORE_ADJ_MIN
|
||||
#define OOM_SCORE_ADJ_MIN (-1000)
|
||||
#endif
|
||||
|
||||
#ifndef OOM_SCORE_ADJ_MAX
|
||||
#define OOM_SCORE_ADJ_MAX 1000
|
||||
#endif
|
||||
|
||||
using namespace mozilla;
|
||||
using namespace mozilla::hal;
|
||||
@ -89,7 +111,7 @@ public:
|
||||
}
|
||||
|
||||
os->AddObserver(this, NS_XPCOM_SHUTDOWN_OBSERVER_ID, /* weak ref */ true);
|
||||
}
|
||||
}
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_NSIRUNNABLE
|
||||
NS_DECL_NSIOBSERVER
|
||||
@ -371,19 +393,21 @@ bool ReadFromFile(const char *filename, char (&buf)[n])
|
||||
return true;
|
||||
}
|
||||
|
||||
void WriteToFile(const char *filename, const char *toWrite)
|
||||
bool WriteToFile(const char *filename, const char *toWrite)
|
||||
{
|
||||
int fd = open(filename, O_WRONLY);
|
||||
ScopedClose autoClose(fd);
|
||||
if (fd < 0) {
|
||||
HAL_LOG(("Unable to open file %s.", filename));
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (write(fd, toWrite, strlen(toWrite)) < 0) {
|
||||
HAL_LOG(("Unable to write to file %s.", filename));
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// We can write to screenEnabledFilename to enable/disable the screen, but when
|
||||
@ -568,9 +592,9 @@ GetLight(hal::LightType light, hal::LightConfiguration* aConfig)
|
||||
}
|
||||
|
||||
/**
|
||||
* clock_settime() is not exposed through bionic.
|
||||
* clock_settime() is not exposed through bionic.
|
||||
* we define the new function to set system time.
|
||||
* The result is the same as using clock_settime() system call.
|
||||
* The result is the same as using clock_settime() system call.
|
||||
*/
|
||||
static int
|
||||
sys_clock_settime(clockid_t clk_id, const struct timespec *tp)
|
||||
@ -578,16 +602,16 @@ sys_clock_settime(clockid_t clk_id, const struct timespec *tp)
|
||||
return syscall(__NR_clock_settime, clk_id, tp);
|
||||
}
|
||||
|
||||
void
|
||||
void
|
||||
AdjustSystemClock(int32_t aDeltaMilliseconds)
|
||||
{
|
||||
if (aDeltaMilliseconds == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
struct timespec now;
|
||||
|
||||
// Preventing context switch before setting system clock
|
||||
|
||||
// Preventing context switch before setting system clock
|
||||
sched_yield();
|
||||
clock_gettime(CLOCK_REALTIME, &now);
|
||||
now.tv_sec += aDeltaMilliseconds/1000;
|
||||
@ -601,18 +625,18 @@ AdjustSystemClock(int32_t aDeltaMilliseconds)
|
||||
if (now.tv_nsec < 0)
|
||||
{
|
||||
now.tv_nsec += NsecPerSec;
|
||||
now.tv_sec -= 1;
|
||||
now.tv_sec -= 1;
|
||||
}
|
||||
// we need to have root privilege.
|
||||
// we need to have root privilege.
|
||||
if (sys_clock_settime(CLOCK_REALTIME, &now) != 0) {
|
||||
NS_ERROR("sys_clock_settime failed");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
hal::NotifySystemTimeChange(hal::SYS_TIME_CHANGE_CLOCK);
|
||||
}
|
||||
|
||||
void
|
||||
void
|
||||
SetTimezone(const nsCString& aTimezoneSpec)
|
||||
{
|
||||
if (aTimezoneSpec.Equals(GetTimezone())) {
|
||||
@ -620,13 +644,13 @@ SetTimezone(const nsCString& aTimezoneSpec)
|
||||
}
|
||||
|
||||
property_set("persist.sys.timezone", aTimezoneSpec.get());
|
||||
// this function is automatically called by the other time conversion
|
||||
// functions that depend on the timezone. To be safe, we call it manually.
|
||||
// this function is automatically called by the other time conversion
|
||||
// functions that depend on the timezone. To be safe, we call it manually.
|
||||
tzset();
|
||||
hal::NotifySystemTimeChange(hal::SYS_TIME_CHANGE_TZ);
|
||||
}
|
||||
|
||||
nsCString
|
||||
nsCString
|
||||
GetTimezone()
|
||||
{
|
||||
char timezone[32];
|
||||
@ -704,7 +728,7 @@ private:
|
||||
};
|
||||
|
||||
// Runs on alarm-watcher thread.
|
||||
static void
|
||||
static void
|
||||
DestroyAlarmData(void* aData)
|
||||
{
|
||||
AlarmData* alarmData = static_cast<AlarmData*>(aData);
|
||||
@ -720,7 +744,7 @@ void ShutDownAlarm(int aSigno)
|
||||
return;
|
||||
}
|
||||
|
||||
static void*
|
||||
static void*
|
||||
WaitForAlarm(void* aData)
|
||||
{
|
||||
pthread_cleanup_push(DestroyAlarmData, aData);
|
||||
@ -738,7 +762,7 @@ WaitForAlarm(void* aData)
|
||||
alarmTypeFlags = ioctl(alarmData->mFd, ANDROID_ALARM_WAIT);
|
||||
} while (alarmTypeFlags < 0 && errno == EINTR && !alarmData->mShuttingDown);
|
||||
|
||||
if (!alarmData->mShuttingDown &&
|
||||
if (!alarmData->mShuttingDown &&
|
||||
alarmTypeFlags >= 0 && (alarmTypeFlags & ANDROID_ALARM_RTC_WAKEUP_MASK)) {
|
||||
NS_DispatchToMainThread(new AlarmFiredEvent(alarmData->mGeneration));
|
||||
}
|
||||
@ -826,6 +850,23 @@ SetAlarm(int32_t aSeconds, int32_t aNanoseconds)
|
||||
return true;
|
||||
}
|
||||
|
||||
static int
|
||||
oomAdjOfOomScoreAdj(int aOomScoreAdj)
|
||||
{
|
||||
// Convert OOM adjustment from the domain of /proc/<pid>/oom_score_adj
|
||||
// to thew domain of /proc/<pid>/oom_adj.
|
||||
|
||||
int adj;
|
||||
|
||||
if (aOomScoreAdj < 0) {
|
||||
adj = (OOM_DISABLE * aOomScoreAdj) / OOM_SCORE_ADJ_MIN;
|
||||
} else {
|
||||
adj = (OOM_ADJUST_MAX * aOomScoreAdj) / OOM_SCORE_ADJ_MAX;
|
||||
}
|
||||
|
||||
return adj;
|
||||
}
|
||||
|
||||
void
|
||||
SetProcessPriority(int aPid, ProcessPriority aPriority)
|
||||
{
|
||||
@ -849,13 +890,34 @@ SetProcessPriority(int aPid, ProcessPriority aPriority)
|
||||
// Notice that you can disable oom_adj and renice by deleting the prefs
|
||||
// hal.processPriorityManager{foreground,background,master}{OomAdjust,Nice}.
|
||||
|
||||
int32_t oomAdj = 0;
|
||||
int32_t oomScoreAdj = 0;
|
||||
nsresult rv = Preferences::GetInt(nsPrintfCString(
|
||||
"hal.processPriorityManager.gonk.%sOomAdjust", priorityStr).get(), &oomAdj);
|
||||
"hal.processPriorityManager.gonk.%sOomScoreAdjust",
|
||||
priorityStr).get(), &oomScoreAdj);
|
||||
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
HAL_LOG(("Setting oom_adj for pid %d to %d", aPid, oomAdj));
|
||||
WriteToFile(nsPrintfCString("/proc/%d/oom_adj", aPid).get(),
|
||||
nsPrintfCString("%d", oomAdj).get());
|
||||
|
||||
int clampedOomScoreAdj = clamped<int>(oomScoreAdj, OOM_SCORE_ADJ_MIN,
|
||||
OOM_SCORE_ADJ_MAX);
|
||||
if(clampedOomScoreAdj != oomScoreAdj) {
|
||||
HAL_LOG(("Clamping OOM adjustment for pid %d to %d",
|
||||
aPid, clampedOomScoreAdj));
|
||||
} else {
|
||||
HAL_LOG(("Setting OOM adjustment for pid %d to %d",
|
||||
aPid, clampedOomScoreAdj));
|
||||
}
|
||||
|
||||
// We try the newer interface first, and fall back to the older interface
|
||||
// on failure.
|
||||
|
||||
if (!WriteToFile(nsPrintfCString("/proc/%d/oom_score_adj", aPid).get(),
|
||||
nsPrintfCString("%d", clampedOomScoreAdj).get()))
|
||||
{
|
||||
int oomAdj = oomAdjOfOomScoreAdj(clampedOomScoreAdj);
|
||||
|
||||
WriteToFile(nsPrintfCString("/proc/%d/oom_adj", aPid).get(),
|
||||
nsPrintfCString("%d", oomAdj).get());
|
||||
}
|
||||
}
|
||||
|
||||
int32_t nice = 0;
|
||||
|
@ -21,21 +21,14 @@
|
||||
|
||||
extern "C" {
|
||||
#include "iccjpeg.h"
|
||||
|
||||
/* Colorspace conversion (copied from jpegint.h) */
|
||||
struct jpeg_color_deconverter {
|
||||
JMETHOD(void, start_pass, (j_decompress_ptr cinfo));
|
||||
JMETHOD(void, color_convert, (j_decompress_ptr cinfo,
|
||||
JSAMPIMAGE input_buf, JDIMENSION input_row,
|
||||
JSAMPARRAY output_buf, int num_rows));
|
||||
};
|
||||
|
||||
METHODDEF(void)
|
||||
ycc_rgb_convert_argb (j_decompress_ptr cinfo,
|
||||
JSAMPIMAGE input_buf, JDIMENSION input_row,
|
||||
JSAMPARRAY output_buf, int num_rows);
|
||||
}
|
||||
|
||||
#if defined(IS_BIG_ENDIAN)
|
||||
#define MOZ_JCS_EXT_NATIVE_ENDIAN_XRGB JCS_EXT_XRGB
|
||||
#else
|
||||
#define MOZ_JCS_EXT_NATIVE_ENDIAN_XRGB JCS_EXT_BGRX
|
||||
#endif
|
||||
|
||||
static void cmyk_convert_rgb(JSAMPROW row, JDIMENSION width);
|
||||
|
||||
namespace mozilla {
|
||||
@ -331,7 +324,14 @@ nsJPEGDecoder::WriteInternal(const char *aBuffer, uint32_t aCount)
|
||||
case JCS_GRAYSCALE:
|
||||
case JCS_RGB:
|
||||
case JCS_YCbCr:
|
||||
mInfo.out_color_space = JCS_RGB;
|
||||
// if we're not color managing we can decode directly to
|
||||
// MOZ_JCS_EXT_NATIVE_ENDIAN_XRGB
|
||||
if (mCMSMode != eCMSMode_All) {
|
||||
mInfo.out_color_space = MOZ_JCS_EXT_NATIVE_ENDIAN_XRGB;
|
||||
mInfo.out_color_components = 4;
|
||||
} else {
|
||||
mInfo.out_color_space = JCS_RGB;
|
||||
}
|
||||
break;
|
||||
case JCS_CMYK:
|
||||
case JCS_YCCK:
|
||||
@ -399,13 +399,6 @@ nsJPEGDecoder::WriteInternal(const char *aBuffer, uint32_t aCount)
|
||||
return; /* I/O suspension */
|
||||
}
|
||||
|
||||
/* Force to use our YCbCr to Packed RGB converter when possible */
|
||||
if (!mTransform && (mCMSMode != eCMSMode_All) &&
|
||||
mInfo.jpeg_color_space == JCS_YCbCr && mInfo.out_color_space == JCS_RGB) {
|
||||
/* Special case for the most common case: transform from YCbCr direct into packed ARGB */
|
||||
mInfo.out_color_components = 4; /* Packed ARGB pixels are always 4 bytes...*/
|
||||
mInfo.cconvert->color_convert = ycc_rgb_convert_argb;
|
||||
}
|
||||
|
||||
/* If this is a progressive JPEG ... */
|
||||
mState = mInfo.buffered_image ? JPEG_DECOMPRESS_PROGRESSIVE : JPEG_DECOMPRESS_SEQUENTIAL;
|
||||
@ -551,7 +544,7 @@ nsJPEGDecoder::OutputScanlines(bool* suspend)
|
||||
uint32_t *imageRow = ((uint32_t*)mImageData) +
|
||||
(mInfo.output_scanline * mInfo.output_width);
|
||||
|
||||
if (mInfo.cconvert->color_convert == ycc_rgb_convert_argb) {
|
||||
if (mInfo.out_color_space == MOZ_JCS_EXT_NATIVE_ENDIAN_XRGB) {
|
||||
/* Special case: scanline will be directly converted into packed ARGB */
|
||||
if (jpeg_read_scanlines(&mInfo, (JSAMPARRAY)&imageRow, 1) != 1) {
|
||||
*suspend = true; /* suspend */
|
||||
@ -861,280 +854,6 @@ term_source (j_decompress_ptr jd)
|
||||
} // namespace mozilla
|
||||
|
||||
|
||||
/**************** YCbCr -> Cairo's RGB24/ARGB32 conversion: most common case **************/
|
||||
|
||||
/*
|
||||
* YCbCr is defined per CCIR 601-1, except that Cb and Cr are
|
||||
* normalized to the range 0..MAXJSAMPLE rather than -0.5 .. 0.5.
|
||||
* The conversion equations to be implemented are therefore
|
||||
* R = Y + 1.40200 * Cr
|
||||
* G = Y - 0.34414 * Cb - 0.71414 * Cr
|
||||
* B = Y + 1.77200 * Cb
|
||||
* where Cb and Cr represent the incoming values less CENTERJSAMPLE.
|
||||
* (These numbers are derived from TIFF 6.0 section 21, dated 3-June-92.)
|
||||
*
|
||||
* To avoid floating-point arithmetic, we represent the fractional constants
|
||||
* as integers scaled up by 2^16 (about 4 digits precision); we have to divide
|
||||
* the products by 2^16, with appropriate rounding, to get the correct answer.
|
||||
* Notice that Y, being an integral input, does not contribute any fraction
|
||||
* so it need not participate in the rounding.
|
||||
*
|
||||
* For even more speed, we avoid doing any multiplications in the inner loop
|
||||
* by precalculating the constants times Cb and Cr for all possible values.
|
||||
* For 8-bit JSAMPLEs this is very reasonable (only 256 entries per table);
|
||||
* for 12-bit samples it is still acceptable. It's not very reasonable for
|
||||
* 16-bit samples, but if you want lossless storage you shouldn't be changing
|
||||
* colorspace anyway.
|
||||
* The Cr=>R and Cb=>B values can be rounded to integers in advance; the
|
||||
* values for the G calculation are left scaled up, since we must add them
|
||||
* together before rounding.
|
||||
*/
|
||||
|
||||
#define SCALEBITS 16 /* speediest right-shift on some machines */
|
||||
|
||||
/* Use static tables for color processing. */
|
||||
/* Four tables, each 256 entries of 4 bytes totals 4K which is not bad... */
|
||||
|
||||
const int Cr_r_tab[(MAXJSAMPLE+1) * sizeof(int)] ={
|
||||
-0xb3, -0xb2, -0xb1, -0xaf, -0xae, -0xac,
|
||||
-0xab, -0xaa, -0xa8, -0xa7, -0xa5, -0xa4,
|
||||
-0xa3, -0xa1, -0xa0, -0x9e, -0x9d, -0x9c,
|
||||
-0x9a, -0x99, -0x97, -0x96, -0x95, -0x93,
|
||||
-0x92, -0x90, -0x8f, -0x8e, -0x8c, -0x8b,
|
||||
-0x89, -0x88, -0x87, -0x85, -0x84, -0x82,
|
||||
-0x81, -0x80, -0x7e, -0x7d, -0x7b, -0x7a,
|
||||
-0x79, -0x77, -0x76, -0x74, -0x73, -0x72,
|
||||
-0x70, -0x6f, -0x6d, -0x6c, -0x6b, -0x69,
|
||||
-0x68, -0x66, -0x65, -0x64, -0x62, -0x61,
|
||||
-0x5f, -0x5e, -0x5d, -0x5b, -0x5a, -0x58,
|
||||
-0x57, -0x56, -0x54, -0x53, -0x51, -0x50,
|
||||
-0x4f, -0x4d, -0x4c, -0x4a, -0x49, -0x48,
|
||||
-0x46, -0x45, -0x43, -0x42, -0x40, -0x3f,
|
||||
-0x3e, -0x3c, -0x3b, -0x39, -0x38, -0x37,
|
||||
-0x35, -0x34, -0x32, -0x31, -0x30, -0x2e,
|
||||
-0x2d, -0x2b, -0x2a, -0x29, -0x27, -0x26,
|
||||
-0x24, -0x23, -0x22, -0x20, -0x1f, -0x1d,
|
||||
-0x1c, -0x1b, -0x19, -0x18, -0x16, -0x15,
|
||||
-0x14, -0x12, -0x11, -0x0f, -0x0e, -0x0d,
|
||||
-0x0b, -0x0a, -0x08, -0x07, -0x06, -0x04,
|
||||
-0x03, -0x01, 0x00, 0x01, 0x03, 0x04,
|
||||
0x06, 0x07, 0x08, 0x0a, 0x0b, 0x0d,
|
||||
0x0e, 0x0f, 0x11, 0x12, 0x14, 0x15,
|
||||
0x16, 0x18, 0x19, 0x1b, 0x1c, 0x1d,
|
||||
0x1f, 0x20, 0x22, 0x23, 0x24, 0x26,
|
||||
0x27, 0x29, 0x2a, 0x2b, 0x2d, 0x2e,
|
||||
0x30, 0x31, 0x32, 0x34, 0x35, 0x37,
|
||||
0x38, 0x39, 0x3b, 0x3c, 0x3e, 0x3f,
|
||||
0x40, 0x42, 0x43, 0x45, 0x46, 0x48,
|
||||
0x49, 0x4a, 0x4c, 0x4d, 0x4f, 0x50,
|
||||
0x51, 0x53, 0x54, 0x56, 0x57, 0x58,
|
||||
0x5a, 0x5b, 0x5d, 0x5e, 0x5f, 0x61,
|
||||
0x62, 0x64, 0x65, 0x66, 0x68, 0x69,
|
||||
0x6b, 0x6c, 0x6d, 0x6f, 0x70, 0x72,
|
||||
0x73, 0x74, 0x76, 0x77, 0x79, 0x7a,
|
||||
0x7b, 0x7d, 0x7e, 0x80, 0x81, 0x82,
|
||||
0x84, 0x85, 0x87, 0x88, 0x89, 0x8b,
|
||||
0x8c, 0x8e, 0x8f, 0x90, 0x92, 0x93,
|
||||
0x95, 0x96, 0x97, 0x99, 0x9a, 0x9c,
|
||||
0x9d, 0x9e, 0xa0, 0xa1, 0xa3, 0xa4,
|
||||
0xa5, 0xa7, 0xa8, 0xaa, 0xab, 0xac,
|
||||
0xae, 0xaf, 0xb1, 0xb2,
|
||||
};
|
||||
|
||||
const int Cb_b_tab[(MAXJSAMPLE+1) * sizeof(int)] ={
|
||||
-0xe3, -0xe1, -0xdf, -0xde, -0xdc, -0xda,
|
||||
-0xd8, -0xd6, -0xd5, -0xd3, -0xd1, -0xcf,
|
||||
-0xce, -0xcc, -0xca, -0xc8, -0xc6, -0xc5,
|
||||
-0xc3, -0xc1, -0xbf, -0xbe, -0xbc, -0xba,
|
||||
-0xb8, -0xb7, -0xb5, -0xb3, -0xb1, -0xaf,
|
||||
-0xae, -0xac, -0xaa, -0xa8, -0xa7, -0xa5,
|
||||
-0xa3, -0xa1, -0x9f, -0x9e, -0x9c, -0x9a,
|
||||
-0x98, -0x97, -0x95, -0x93, -0x91, -0x90,
|
||||
-0x8e, -0x8c, -0x8a, -0x88, -0x87, -0x85,
|
||||
-0x83, -0x81, -0x80, -0x7e, -0x7c, -0x7a,
|
||||
-0x78, -0x77, -0x75, -0x73, -0x71, -0x70,
|
||||
-0x6e, -0x6c, -0x6a, -0x69, -0x67, -0x65,
|
||||
-0x63, -0x61, -0x60, -0x5e, -0x5c, -0x5a,
|
||||
-0x59, -0x57, -0x55, -0x53, -0x52, -0x50,
|
||||
-0x4e, -0x4c, -0x4a, -0x49, -0x47, -0x45,
|
||||
-0x43, -0x42, -0x40, -0x3e, -0x3c, -0x3a,
|
||||
-0x39, -0x37, -0x35, -0x33, -0x32, -0x30,
|
||||
-0x2e, -0x2c, -0x2b, -0x29, -0x27, -0x25,
|
||||
-0x23, -0x22, -0x20, -0x1e, -0x1c, -0x1b,
|
||||
-0x19, -0x17, -0x15, -0x13, -0x12, -0x10,
|
||||
-0x0e, -0x0c, -0x0b, -0x09, -0x07, -0x05,
|
||||
-0x04, -0x02, 0x00, 0x02, 0x04, 0x05,
|
||||
0x07, 0x09, 0x0b, 0x0c, 0x0e, 0x10,
|
||||
0x12, 0x13, 0x15, 0x17, 0x19, 0x1b,
|
||||
0x1c, 0x1e, 0x20, 0x22, 0x23, 0x25,
|
||||
0x27, 0x29, 0x2b, 0x2c, 0x2e, 0x30,
|
||||
0x32, 0x33, 0x35, 0x37, 0x39, 0x3a,
|
||||
0x3c, 0x3e, 0x40, 0x42, 0x43, 0x45,
|
||||
0x47, 0x49, 0x4a, 0x4c, 0x4e, 0x50,
|
||||
0x52, 0x53, 0x55, 0x57, 0x59, 0x5a,
|
||||
0x5c, 0x5e, 0x60, 0x61, 0x63, 0x65,
|
||||
0x67, 0x69, 0x6a, 0x6c, 0x6e, 0x70,
|
||||
0x71, 0x73, 0x75, 0x77, 0x78, 0x7a,
|
||||
0x7c, 0x7e, 0x80, 0x81, 0x83, 0x85,
|
||||
0x87, 0x88, 0x8a, 0x8c, 0x8e, 0x90,
|
||||
0x91, 0x93, 0x95, 0x97, 0x98, 0x9a,
|
||||
0x9c, 0x9e, 0x9f, 0xa1, 0xa3, 0xa5,
|
||||
0xa7, 0xa8, 0xaa, 0xac, 0xae, 0xaf,
|
||||
0xb1, 0xb3, 0xb5, 0xb7, 0xb8, 0xba,
|
||||
0xbc, 0xbe, 0xbf, 0xc1, 0xc3, 0xc5,
|
||||
0xc6, 0xc8, 0xca, 0xcc, 0xce, 0xcf,
|
||||
0xd1, 0xd3, 0xd5, 0xd6, 0xd8, 0xda,
|
||||
0xdc, 0xde, 0xdf, 0xe1,
|
||||
};
|
||||
|
||||
const int Cr_g_tab[(MAXJSAMPLE+1) * sizeof(int)] ={
|
||||
0x5b6900, 0x5ab22e, 0x59fb5c, 0x59448a, 0x588db8, 0x57d6e6,
|
||||
0x572014, 0x566942, 0x55b270, 0x54fb9e, 0x5444cc, 0x538dfa,
|
||||
0x52d728, 0x522056, 0x516984, 0x50b2b2, 0x4ffbe0, 0x4f450e,
|
||||
0x4e8e3c, 0x4dd76a, 0x4d2098, 0x4c69c6, 0x4bb2f4, 0x4afc22,
|
||||
0x4a4550, 0x498e7e, 0x48d7ac, 0x4820da, 0x476a08, 0x46b336,
|
||||
0x45fc64, 0x454592, 0x448ec0, 0x43d7ee, 0x43211c, 0x426a4a,
|
||||
0x41b378, 0x40fca6, 0x4045d4, 0x3f8f02, 0x3ed830, 0x3e215e,
|
||||
0x3d6a8c, 0x3cb3ba, 0x3bfce8, 0x3b4616, 0x3a8f44, 0x39d872,
|
||||
0x3921a0, 0x386ace, 0x37b3fc, 0x36fd2a, 0x364658, 0x358f86,
|
||||
0x34d8b4, 0x3421e2, 0x336b10, 0x32b43e, 0x31fd6c, 0x31469a,
|
||||
0x308fc8, 0x2fd8f6, 0x2f2224, 0x2e6b52, 0x2db480, 0x2cfdae,
|
||||
0x2c46dc, 0x2b900a, 0x2ad938, 0x2a2266, 0x296b94, 0x28b4c2,
|
||||
0x27fdf0, 0x27471e, 0x26904c, 0x25d97a, 0x2522a8, 0x246bd6,
|
||||
0x23b504, 0x22fe32, 0x224760, 0x21908e, 0x20d9bc, 0x2022ea,
|
||||
0x1f6c18, 0x1eb546, 0x1dfe74, 0x1d47a2, 0x1c90d0, 0x1bd9fe,
|
||||
0x1b232c, 0x1a6c5a, 0x19b588, 0x18feb6, 0x1847e4, 0x179112,
|
||||
0x16da40, 0x16236e, 0x156c9c, 0x14b5ca, 0x13fef8, 0x134826,
|
||||
0x129154, 0x11da82, 0x1123b0, 0x106cde, 0x0fb60c, 0x0eff3a,
|
||||
0x0e4868, 0x0d9196, 0x0cdac4, 0x0c23f2, 0x0b6d20, 0x0ab64e,
|
||||
0x09ff7c, 0x0948aa, 0x0891d8, 0x07db06, 0x072434, 0x066d62,
|
||||
0x05b690, 0x04ffbe, 0x0448ec, 0x03921a, 0x02db48, 0x022476,
|
||||
0x016da4, 0x00b6d2, 0x000000, -0x00b6d2, -0x016da4, -0x022476,
|
||||
-0x02db48, -0x03921a, -0x0448ec, -0x04ffbe, -0x05b690, -0x066d62,
|
||||
-0x072434, -0x07db06, -0x0891d8, -0x0948aa, -0x09ff7c, -0x0ab64e,
|
||||
-0x0b6d20, -0x0c23f2, -0x0cdac4, -0x0d9196, -0x0e4868, -0x0eff3a,
|
||||
-0x0fb60c, -0x106cde, -0x1123b0, -0x11da82, -0x129154, -0x134826,
|
||||
-0x13fef8, -0x14b5ca, -0x156c9c, -0x16236e, -0x16da40, -0x179112,
|
||||
-0x1847e4, -0x18feb6, -0x19b588, -0x1a6c5a, -0x1b232c, -0x1bd9fe,
|
||||
-0x1c90d0, -0x1d47a2, -0x1dfe74, -0x1eb546, -0x1f6c18, -0x2022ea,
|
||||
-0x20d9bc, -0x21908e, -0x224760, -0x22fe32, -0x23b504, -0x246bd6,
|
||||
-0x2522a8, -0x25d97a, -0x26904c, -0x27471e, -0x27fdf0, -0x28b4c2,
|
||||
-0x296b94, -0x2a2266, -0x2ad938, -0x2b900a, -0x2c46dc, -0x2cfdae,
|
||||
-0x2db480, -0x2e6b52, -0x2f2224, -0x2fd8f6, -0x308fc8, -0x31469a,
|
||||
-0x31fd6c, -0x32b43e, -0x336b10, -0x3421e2, -0x34d8b4, -0x358f86,
|
||||
-0x364658, -0x36fd2a, -0x37b3fc, -0x386ace, -0x3921a0, -0x39d872,
|
||||
-0x3a8f44, -0x3b4616, -0x3bfce8, -0x3cb3ba, -0x3d6a8c, -0x3e215e,
|
||||
-0x3ed830, -0x3f8f02, -0x4045d4, -0x40fca6, -0x41b378, -0x426a4a,
|
||||
-0x43211c, -0x43d7ee, -0x448ec0, -0x454592, -0x45fc64, -0x46b336,
|
||||
-0x476a08, -0x4820da, -0x48d7ac, -0x498e7e, -0x4a4550, -0x4afc22,
|
||||
-0x4bb2f4, -0x4c69c6, -0x4d2098, -0x4dd76a, -0x4e8e3c, -0x4f450e,
|
||||
-0x4ffbe0, -0x50b2b2, -0x516984, -0x522056, -0x52d728, -0x538dfa,
|
||||
-0x5444cc, -0x54fb9e, -0x55b270, -0x566942, -0x572014, -0x57d6e6,
|
||||
-0x588db8, -0x59448a, -0x59fb5c, -0x5ab22e,
|
||||
};
|
||||
|
||||
const int Cb_g_tab[(MAXJSAMPLE+1) * sizeof(int)] ={
|
||||
0x2c8d00, 0x2c34e6, 0x2bdccc, 0x2b84b2, 0x2b2c98, 0x2ad47e,
|
||||
0x2a7c64, 0x2a244a, 0x29cc30, 0x297416, 0x291bfc, 0x28c3e2,
|
||||
0x286bc8, 0x2813ae, 0x27bb94, 0x27637a, 0x270b60, 0x26b346,
|
||||
0x265b2c, 0x260312, 0x25aaf8, 0x2552de, 0x24fac4, 0x24a2aa,
|
||||
0x244a90, 0x23f276, 0x239a5c, 0x234242, 0x22ea28, 0x22920e,
|
||||
0x2239f4, 0x21e1da, 0x2189c0, 0x2131a6, 0x20d98c, 0x208172,
|
||||
0x202958, 0x1fd13e, 0x1f7924, 0x1f210a, 0x1ec8f0, 0x1e70d6,
|
||||
0x1e18bc, 0x1dc0a2, 0x1d6888, 0x1d106e, 0x1cb854, 0x1c603a,
|
||||
0x1c0820, 0x1bb006, 0x1b57ec, 0x1affd2, 0x1aa7b8, 0x1a4f9e,
|
||||
0x19f784, 0x199f6a, 0x194750, 0x18ef36, 0x18971c, 0x183f02,
|
||||
0x17e6e8, 0x178ece, 0x1736b4, 0x16de9a, 0x168680, 0x162e66,
|
||||
0x15d64c, 0x157e32, 0x152618, 0x14cdfe, 0x1475e4, 0x141dca,
|
||||
0x13c5b0, 0x136d96, 0x13157c, 0x12bd62, 0x126548, 0x120d2e,
|
||||
0x11b514, 0x115cfa, 0x1104e0, 0x10acc6, 0x1054ac, 0x0ffc92,
|
||||
0x0fa478, 0x0f4c5e, 0x0ef444, 0x0e9c2a, 0x0e4410, 0x0debf6,
|
||||
0x0d93dc, 0x0d3bc2, 0x0ce3a8, 0x0c8b8e, 0x0c3374, 0x0bdb5a,
|
||||
0x0b8340, 0x0b2b26, 0x0ad30c, 0x0a7af2, 0x0a22d8, 0x09cabe,
|
||||
0x0972a4, 0x091a8a, 0x08c270, 0x086a56, 0x08123c, 0x07ba22,
|
||||
0x076208, 0x0709ee, 0x06b1d4, 0x0659ba, 0x0601a0, 0x05a986,
|
||||
0x05516c, 0x04f952, 0x04a138, 0x04491e, 0x03f104, 0x0398ea,
|
||||
0x0340d0, 0x02e8b6, 0x02909c, 0x023882, 0x01e068, 0x01884e,
|
||||
0x013034, 0x00d81a, 0x008000, 0x0027e6, -0x003034, -0x00884e,
|
||||
-0x00e068, -0x013882, -0x01909c, -0x01e8b6, -0x0240d0, -0x0298ea,
|
||||
-0x02f104, -0x03491e, -0x03a138, -0x03f952, -0x04516c, -0x04a986,
|
||||
-0x0501a0, -0x0559ba, -0x05b1d4, -0x0609ee, -0x066208, -0x06ba22,
|
||||
-0x07123c, -0x076a56, -0x07c270, -0x081a8a, -0x0872a4, -0x08cabe,
|
||||
-0x0922d8, -0x097af2, -0x09d30c, -0x0a2b26, -0x0a8340, -0x0adb5a,
|
||||
-0x0b3374, -0x0b8b8e, -0x0be3a8, -0x0c3bc2, -0x0c93dc, -0x0cebf6,
|
||||
-0x0d4410, -0x0d9c2a, -0x0df444, -0x0e4c5e, -0x0ea478, -0x0efc92,
|
||||
-0x0f54ac, -0x0facc6, -0x1004e0, -0x105cfa, -0x10b514, -0x110d2e,
|
||||
-0x116548, -0x11bd62, -0x12157c, -0x126d96, -0x12c5b0, -0x131dca,
|
||||
-0x1375e4, -0x13cdfe, -0x142618, -0x147e32, -0x14d64c, -0x152e66,
|
||||
-0x158680, -0x15de9a, -0x1636b4, -0x168ece, -0x16e6e8, -0x173f02,
|
||||
-0x17971c, -0x17ef36, -0x184750, -0x189f6a, -0x18f784, -0x194f9e,
|
||||
-0x19a7b8, -0x19ffd2, -0x1a57ec, -0x1ab006, -0x1b0820, -0x1b603a,
|
||||
-0x1bb854, -0x1c106e, -0x1c6888, -0x1cc0a2, -0x1d18bc, -0x1d70d6,
|
||||
-0x1dc8f0, -0x1e210a, -0x1e7924, -0x1ed13e, -0x1f2958, -0x1f8172,
|
||||
-0x1fd98c, -0x2031a6, -0x2089c0, -0x20e1da, -0x2139f4, -0x21920e,
|
||||
-0x21ea28, -0x224242, -0x229a5c, -0x22f276, -0x234a90, -0x23a2aa,
|
||||
-0x23fac4, -0x2452de, -0x24aaf8, -0x250312, -0x255b2c, -0x25b346,
|
||||
-0x260b60, -0x26637a, -0x26bb94, -0x2713ae, -0x276bc8, -0x27c3e2,
|
||||
-0x281bfc, -0x287416, -0x28cc30, -0x29244a, -0x297c64, -0x29d47e,
|
||||
-0x2a2c98, -0x2a84b2, -0x2adccc, -0x2b34e6,
|
||||
};
|
||||
|
||||
|
||||
/* We assume that right shift corresponds to signed division by 2 with
|
||||
* rounding towards minus infinity. This is correct for typical "arithmetic
|
||||
* shift" instructions that shift in copies of the sign bit. But some
|
||||
* C compilers implement >> with an unsigned shift. For these machines you
|
||||
* must define RIGHT_SHIFT_IS_UNSIGNED.
|
||||
* RIGHT_SHIFT provides a proper signed right shift of an INT32 quantity.
|
||||
* It is only applied with constant shift counts. SHIFT_TEMPS must be
|
||||
* included in the variables of any routine using RIGHT_SHIFT.
|
||||
*/
|
||||
|
||||
#ifdef RIGHT_SHIFT_IS_UNSIGNED
|
||||
#define SHIFT_TEMPS INT32 shift_temp;
|
||||
#define RIGHT_SHIFT(x,shft) \
|
||||
((shift_temp = (x)) < 0 ? \
|
||||
(shift_temp >> (shft)) | ((~((INT32) 0)) << (32-(shft))) : \
|
||||
(shift_temp >> (shft)))
|
||||
#else
|
||||
#define SHIFT_TEMPS
|
||||
#define RIGHT_SHIFT(x,shft) ((x) >> (shft))
|
||||
#endif
|
||||
|
||||
|
||||
METHODDEF(void)
|
||||
ycc_rgb_convert_argb (j_decompress_ptr cinfo,
|
||||
JSAMPIMAGE input_buf, JDIMENSION input_row,
|
||||
JSAMPARRAY output_buf, int num_rows)
|
||||
{
|
||||
JDIMENSION num_cols = cinfo->output_width;
|
||||
JSAMPLE * range_limit = cinfo->sample_range_limit;
|
||||
|
||||
SHIFT_TEMPS
|
||||
|
||||
/* This is used if we don't have SSE2 */
|
||||
|
||||
while (--num_rows >= 0) {
|
||||
JSAMPROW inptr0 = input_buf[0][input_row];
|
||||
JSAMPROW inptr1 = input_buf[1][input_row];
|
||||
JSAMPROW inptr2 = input_buf[2][input_row];
|
||||
input_row++;
|
||||
uint32_t *outptr = (uint32_t *) *output_buf++;
|
||||
for (JDIMENSION col = 0; col < num_cols; col++) {
|
||||
int y = GETJSAMPLE(inptr0[col]);
|
||||
int cb = GETJSAMPLE(inptr1[col]);
|
||||
int cr = GETJSAMPLE(inptr2[col]);
|
||||
JSAMPLE * range_limit_y = range_limit + y;
|
||||
/* Range-limiting is essential due to noise introduced by DCT losses. */
|
||||
outptr[col] = 0xFF000000 |
|
||||
( range_limit_y[Cr_r_tab[cr]] << 16 ) |
|
||||
( range_limit_y[((int) RIGHT_SHIFT(Cb_g_tab[cb] + Cr_g_tab[cr], SCALEBITS))] << 8 ) |
|
||||
( range_limit_y[Cb_b_tab[cb]] );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**************** Inverted CMYK -> RGB conversion **************/
|
||||
/*
|
||||
* Input is (Inverted) CMYK stored as 4 bytes per pixel.
|
||||
|
@ -45,14 +45,6 @@ GetBuildConfiguration(JSContext *cx, unsigned argc, jsval *vp)
|
||||
if (!JS_SetProperty(cx, info, "exact-rooting", &value))
|
||||
return false;
|
||||
|
||||
#ifdef JSGC_ROOT_ANALYSIS
|
||||
value = BooleanValue(true);
|
||||
#else
|
||||
value = BooleanValue(false);
|
||||
#endif
|
||||
if (!JS_SetProperty(cx, info, "rooting-analysis", &value))
|
||||
return false;
|
||||
|
||||
#ifdef DEBUG
|
||||
value = BooleanValue(true);
|
||||
#else
|
||||
@ -82,7 +74,7 @@ GetBuildConfiguration(JSContext *cx, unsigned argc, jsval *vp)
|
||||
#else
|
||||
value = BooleanValue(false);
|
||||
#endif
|
||||
if (!JS_SetProperty(cx, info, "has-gczeal", &value))
|
||||
if (!JS_SetProperty(cx, info, "threadsafe", &value))
|
||||
return false;
|
||||
|
||||
#ifdef JS_MORE_DETERMINISTIC
|
||||
|
@ -2222,11 +2222,6 @@ MOZ_ARG_ENABLE_BOOL(methodjit-spew,
|
||||
ENABLE_METHODJIT_SPEW=1,
|
||||
ENABLE_METHODJIT_SPEW= )
|
||||
|
||||
MOZ_ARG_DISABLE_BOOL(ion,
|
||||
[ --disable-ion Disable use of IONMonkey compiler],
|
||||
ENABLE_ION=,
|
||||
ENABLE_ION=1 )
|
||||
|
||||
AC_SUBST(ENABLE_METHODJIT)
|
||||
AC_SUBST(ENABLE_METHODJIT_SPEW)
|
||||
|
||||
|
@ -173,9 +173,9 @@ class NameResolver
|
||||
* listed, then it is skipped. Otherwise an intelligent name is guessed to
|
||||
* assign to the function's displayAtom field
|
||||
*/
|
||||
JSAtom *resolveFun(ParseNode *pn, JSAtom *prefix) {
|
||||
JSAtom *resolveFun(ParseNode *pn, HandleAtom prefix) {
|
||||
JS_ASSERT(pn != NULL && pn->isKind(PNK_FUNCTION));
|
||||
JSFunction *fun = pn->pn_funbox->fun();
|
||||
RootedFunction fun(cx, pn->pn_funbox->fun());
|
||||
if (nparents == 0)
|
||||
return NULL;
|
||||
|
||||
@ -268,12 +268,13 @@ class NameResolver
|
||||
* ParseNode instance given. The prefix is for each subsequent name, and
|
||||
* should initially be NULL.
|
||||
*/
|
||||
void resolve(ParseNode *cur, JSAtom *prefix = NULL) {
|
||||
void resolve(ParseNode *cur, HandleAtom prefixArg = NullPtr()) {
|
||||
RootedAtom prefix(cx, prefixArg);
|
||||
if (cur == NULL)
|
||||
return;
|
||||
|
||||
if (cur->isKind(PNK_FUNCTION) && cur->isArity(PN_FUNC)) {
|
||||
JSAtom *prefix2 = resolveFun(cur, prefix);
|
||||
RootedAtom prefix2(cx, resolveFun(cur, prefix));
|
||||
/*
|
||||
* If a function looks like (function(){})() where the parent node
|
||||
* of the definition of the function is a call, then it shouldn't
|
||||
|
@ -234,16 +234,22 @@ class MutableHandle : public MutableHandleBase<T>
|
||||
void operator =(S v) MOZ_DELETE;
|
||||
};
|
||||
|
||||
typedef MutableHandle<JSObject*> MutableHandleObject;
|
||||
typedef MutableHandle<Value> MutableHandleValue;
|
||||
typedef MutableHandle<jsid> MutableHandleId;
|
||||
typedef MutableHandle<JSObject*> MutableHandleObject;
|
||||
typedef MutableHandle<JSFunction*> MutableHandleFunction;
|
||||
typedef MutableHandle<JSScript*> MutableHandleScript;
|
||||
typedef MutableHandle<JSString*> MutableHandleString;
|
||||
typedef MutableHandle<jsid> MutableHandleId;
|
||||
typedef MutableHandle<Value> MutableHandleValue;
|
||||
|
||||
/*
|
||||
* Raw pointer used as documentation that a parameter does not need to be
|
||||
* rooted.
|
||||
*/
|
||||
typedef JSObject * RawObject;
|
||||
typedef JSFunction * RawFunction;
|
||||
typedef JSScript * RawScript;
|
||||
typedef JSString * RawString;
|
||||
typedef jsid RawId;
|
||||
typedef Value RawValue;
|
||||
|
||||
/*
|
||||
|
@ -2401,7 +2401,7 @@ CodeGenerator::emitArrayPopShift(LInstruction *lir, const MArrayPopShift *mir, R
|
||||
Register elementsTemp, Register lengthTemp, TypedOrValueRegister out)
|
||||
{
|
||||
OutOfLineCode *ool;
|
||||
typedef bool (*pf)(JSContext *, JSObject *, Value *);
|
||||
typedef bool (*pf)(JSContext *, HandleObject, MutableHandleValue);
|
||||
|
||||
if (mir->mode() == MArrayPopShift::Pop) {
|
||||
static const VMFunction Info = FunctionInfo<pf>(ion::ArrayPopDense);
|
||||
@ -2498,7 +2498,7 @@ bool
|
||||
CodeGenerator::emitArrayPush(LInstruction *lir, const MArrayPush *mir, Register obj,
|
||||
ConstantOrRegister value, Register elementsTemp, Register length)
|
||||
{
|
||||
typedef bool (*pf)(JSContext *, JSObject *, HandleValue, uint32_t *);
|
||||
typedef bool (*pf)(JSContext *, HandleObject, HandleValue, uint32_t *);
|
||||
static const VMFunction Info = FunctionInfo<pf>(ion::ArrayPushDense);
|
||||
OutOfLineCode *ool = oolCallVM(Info, lir, (ArgList(), obj, value), StoreRegisterTo(length));
|
||||
if (!ool)
|
||||
|
@ -53,7 +53,7 @@ JS_STATIC_ASSERT(sizeof(IonCode) % gc::Cell::CellSize == 0);
|
||||
|
||||
#ifdef JS_THREADSAFE
|
||||
static bool IonTLSInitialized = false;
|
||||
static PRUintn IonTLSIndex;
|
||||
static unsigned IonTLSIndex;
|
||||
|
||||
static inline IonContext *
|
||||
CurrentIonContext()
|
||||
|
@ -3661,6 +3661,41 @@ IonBuilder::jsop_funapply(uint32 argc)
|
||||
return pushTypeBarrier(apply, types, barrier);
|
||||
}
|
||||
|
||||
// Get the builtin RegExp.prototype.test function.
|
||||
static bool
|
||||
GetBuiltinRegExpTest(JSContext *cx, JSScript *script, JSFunction **result)
|
||||
{
|
||||
JS_ASSERT(*result == NULL);
|
||||
|
||||
// Get the builtin RegExp.prototype object.
|
||||
RootedObject proto(cx, script->global().getOrCreateRegExpPrototype(cx));
|
||||
if (!proto)
|
||||
return false;
|
||||
|
||||
// Get the |test| property. Note that we use lookupProperty, not getProperty,
|
||||
// to avoid calling a getter.
|
||||
RootedShape shape(cx);
|
||||
RootedObject holder(cx);
|
||||
if (!JSObject::lookupProperty(cx, proto, cx->runtime->atomState.testAtom, &holder, &shape))
|
||||
return false;
|
||||
|
||||
if (proto != holder || !shape || !shape->hasDefaultGetter() || !shape->hasSlot())
|
||||
return true;
|
||||
|
||||
// The RegExp.prototype.test property is writable, so we have to ensure
|
||||
// we got the builtin function.
|
||||
Value val = holder->getSlot(shape->slot());
|
||||
if (!val.isObject())
|
||||
return true;
|
||||
|
||||
JSObject *obj = &val.toObject();
|
||||
if (!obj->isFunction() || obj->toFunction()->maybeNative() != regexp_test)
|
||||
return true;
|
||||
|
||||
*result = obj->toFunction();
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
IonBuilder::jsop_call(uint32 argc, bool constructing)
|
||||
{
|
||||
@ -3689,7 +3724,21 @@ IonBuilder::jsop_call(uint32 argc, bool constructing)
|
||||
return inlineScriptedCall(targets, argc, constructing, types, barrier);
|
||||
}
|
||||
|
||||
RootedFunction target(cx, numTargets == 1 ? targets[0]->toFunction() : NULL);
|
||||
RootedFunction target(cx, NULL);
|
||||
if (numTargets == 1) {
|
||||
target = targets[0]->toFunction();
|
||||
|
||||
// Call RegExp.test instead of RegExp.exec if the result will not be used
|
||||
// or will only be used to test for existence.
|
||||
if (target->maybeNative() == regexp_exec && !CallResultEscapes(pc)) {
|
||||
JSFunction *newTarget = NULL;
|
||||
if (!GetBuiltinRegExpTest(cx, script, &newTarget))
|
||||
return false;
|
||||
if (newTarget)
|
||||
target = newTarget;
|
||||
}
|
||||
}
|
||||
|
||||
return makeCallBarrier(target, argc, constructing, types, barrier);
|
||||
}
|
||||
|
||||
|
@ -339,17 +339,18 @@ class MacroAssembler : public MacroAssemblerSpecific
|
||||
JS_ASSERT(type == MIRType_Value || type == MIRType_String || type == MIRType_Object);
|
||||
Label done;
|
||||
|
||||
JSContext *cx = GetIonContext()->cx;
|
||||
IonCode *preBarrier = cx->compartment->ionCompartment()->preBarrier(cx);
|
||||
if (!preBarrier) {
|
||||
enoughMemory_ = false;
|
||||
return;
|
||||
}
|
||||
|
||||
if (type == MIRType_Value)
|
||||
branchTestGCThing(Assembler::NotEqual, address, &done);
|
||||
|
||||
Push(PreBarrierReg);
|
||||
computeEffectiveAddress(address, PreBarrierReg);
|
||||
|
||||
JSContext *cx = GetIonContext()->cx;
|
||||
IonCode *preBarrier = cx->compartment->ionCompartment()->preBarrier(cx);
|
||||
if (!preBarrier)
|
||||
enoughMemory_ = false;
|
||||
|
||||
call(preBarrier);
|
||||
Pop(PreBarrierReg);
|
||||
|
||||
|
@ -276,28 +276,32 @@ NewInitObject(JSContext *cx, HandleObject templateObject)
|
||||
}
|
||||
|
||||
bool
|
||||
ArrayPopDense(JSContext *cx, JSObject *obj, Value *rval)
|
||||
ArrayPopDense(JSContext *cx, HandleObject obj, MutableHandleValue rval)
|
||||
{
|
||||
AutoDetectInvalidation adi(cx, rval);
|
||||
JS_ASSERT(obj->isDenseArray());
|
||||
|
||||
Value argv[3] = { UndefinedValue(), ObjectValue(*obj) };
|
||||
AutoDetectInvalidation adi(cx, rval.address());
|
||||
|
||||
Value argv[] = { UndefinedValue(), ObjectValue(*obj) };
|
||||
AutoValueArray ava(cx, argv, 2);
|
||||
if (!js::array_pop(cx, 0, argv))
|
||||
return false;
|
||||
|
||||
// If the result is |undefined|, the array was probably empty and we
|
||||
// have to monitor the return value.
|
||||
*rval = argv[0];
|
||||
if (rval->isUndefined())
|
||||
types::TypeScript::Monitor(cx, *rval);
|
||||
rval.set(argv[0]);
|
||||
if (rval.isUndefined())
|
||||
types::TypeScript::Monitor(cx, rval);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
ArrayPushDense(JSContext *cx, JSObject *obj, HandleValue v, uint32_t *length)
|
||||
ArrayPushDense(JSContext *cx, HandleObject obj, HandleValue v, uint32_t *length)
|
||||
{
|
||||
JS_ASSERT(obj->isDenseArray());
|
||||
|
||||
Value argv[3] = { UndefinedValue(), ObjectValue(*obj), v };
|
||||
Value argv[] = { UndefinedValue(), ObjectValue(*obj), v };
|
||||
AutoValueArray ava(cx, argv, 3);
|
||||
if (!js::array_push(cx, 1, argv))
|
||||
return false;
|
||||
|
||||
@ -306,19 +310,22 @@ ArrayPushDense(JSContext *cx, JSObject *obj, HandleValue v, uint32_t *length)
|
||||
}
|
||||
|
||||
bool
|
||||
ArrayShiftDense(JSContext *cx, JSObject *obj, Value *rval)
|
||||
ArrayShiftDense(JSContext *cx, HandleObject obj, MutableHandleValue rval)
|
||||
{
|
||||
AutoDetectInvalidation adi(cx, rval);
|
||||
JS_ASSERT(obj->isDenseArray());
|
||||
|
||||
Value argv[3] = { UndefinedValue(), ObjectValue(*obj) };
|
||||
AutoDetectInvalidation adi(cx, rval.address());
|
||||
|
||||
Value argv[] = { UndefinedValue(), ObjectValue(*obj) };
|
||||
AutoValueArray ava(cx, argv, 2);
|
||||
if (!js::array_shift(cx, 0, argv))
|
||||
return false;
|
||||
|
||||
// If the result is |undefined|, the array was probably empty and we
|
||||
// have to monitor the return value.
|
||||
*rval = argv[0];
|
||||
if (rval->isUndefined())
|
||||
types::TypeScript::Monitor(cx, *rval);
|
||||
rval.set(argv[0]);
|
||||
if (rval.isUndefined())
|
||||
types::TypeScript::Monitor(cx, rval);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -426,9 +426,9 @@ bool IteratorMore(JSContext *cx, HandleObject obj, JSBool *res);
|
||||
JSObject *NewInitArray(JSContext *cx, uint32_t count, types::TypeObject *type);
|
||||
JSObject *NewInitObject(JSContext *cx, HandleObject templateObject);
|
||||
|
||||
bool ArrayPopDense(JSContext *cx, JSObject *obj, Value *rval);
|
||||
bool ArrayPushDense(JSContext *cx, JSObject *obj, HandleValue v, uint32_t *length);
|
||||
bool ArrayShiftDense(JSContext *cx, JSObject *obj, Value *rval);
|
||||
bool ArrayPopDense(JSContext *cx, HandleObject obj, MutableHandleValue rval);
|
||||
bool ArrayPushDense(JSContext *cx, HandleObject obj, HandleValue v, uint32_t *length);
|
||||
bool ArrayShiftDense(JSContext *cx, HandleObject obj, MutableHandleValue rval);
|
||||
|
||||
bool SetProperty(JSContext *cx, HandleObject obj, HandlePropertyName name, HandleValue value,
|
||||
bool strict, bool isSetName);
|
||||
|
15
js/src/jit-test/tests/basic/bug727223.js
Normal file
15
js/src/jit-test/tests/basic/bug727223.js
Normal file
@ -0,0 +1,15 @@
|
||||
try {
|
||||
mjitChunkLimit(1)
|
||||
function x() {}
|
||||
} catch (e) {}
|
||||
(function() {
|
||||
for (let c in [0, 0, 0]) {
|
||||
let c
|
||||
for (y in decodeURI()) {
|
||||
(function() {
|
||||
c
|
||||
}())
|
||||
}
|
||||
}
|
||||
}())
|
||||
|
20
js/src/jit-test/tests/ion/regexp-exec.js
Normal file
20
js/src/jit-test/tests/ion/regexp-exec.js
Normal file
@ -0,0 +1,20 @@
|
||||
// RegExp.exec -> RegExp.test optimization should use the builtin test method.
|
||||
function f() {
|
||||
var res = 0;
|
||||
for (var i=0; i<100; i++) {
|
||||
if (/a/.exec("a"))
|
||||
res++;
|
||||
}
|
||||
assertEq(res, 100);
|
||||
}
|
||||
delete RegExp.prototype.test;
|
||||
gc();
|
||||
f();
|
||||
|
||||
RegExp.prototype.test = function() { assertEq(0, 1); }
|
||||
gc();
|
||||
f();
|
||||
|
||||
Object.defineProperty(RegExp.prototype, "test", {get: function() { assertEq(0, 1); }});
|
||||
gc();
|
||||
f();
|
@ -7101,7 +7101,7 @@ JS_SetGCZeal(JSContext *cx, uint8_t zeal, uint32_t frequency)
|
||||
" 3: GC when the window paints (browser only)\n"
|
||||
" 4: Verify pre write barriers between instructions\n"
|
||||
" 5: Verify pre write barriers between paints\n"
|
||||
" 6: Verify stack rooting (ignoring XML and Reflect)\n"
|
||||
" 6: Verify stack rooting (ignoring XML)\n"
|
||||
" 7: Verify stack rooting (all roots)\n"
|
||||
" 8: Incremental GC in two slices: 1) mark roots 2) finish collection\n"
|
||||
" 9: Incremental GC in two slices: 1) mark all 2) new marking and finish\n"
|
||||
|
@ -287,18 +287,18 @@ fun_resolve(JSContext *cx, HandleObject obj, HandleId id, unsigned flags,
|
||||
|
||||
if (JSID_IS_ATOM(id, cx->runtime->atomState.classPrototypeAtom)) {
|
||||
/*
|
||||
* Native or "built-in" functions do not have a .prototype property per
|
||||
* ECMA-262, or (Object.prototype, Function.prototype, etc.) have that
|
||||
* property created eagerly.
|
||||
* Built-in functions do not have a .prototype property per ECMA-262,
|
||||
* or (Object.prototype, Function.prototype, etc.) have that property
|
||||
* created eagerly.
|
||||
*
|
||||
* ES5 15.3.4: the non-native function object named Function.prototype
|
||||
* does not have a .prototype property.
|
||||
*
|
||||
* ES5 15.3.4.5: bound functions don't have a prototype property. The
|
||||
* isNative() test covers this case because bound functions are native
|
||||
* functions by definition/construction.
|
||||
* isBuiltin() test covers this case because bound functions are native
|
||||
* (and thus built-in) functions by definition/construction.
|
||||
*/
|
||||
if (fun->isNative() || fun->isFunctionPrototype())
|
||||
if (fun->isBuiltin() || fun->isFunctionPrototype())
|
||||
return true;
|
||||
|
||||
if (!ResolveInterpretedFunctionPrototype(cx, fun))
|
||||
|
@ -81,6 +81,7 @@ struct JSFunction : public JSObject
|
||||
bool isInterpreted() const { return flags & JSFUN_INTERPRETED; }
|
||||
bool isNative() const { return !isInterpreted(); }
|
||||
bool isSelfHostedBuiltin() const { return flags & JSFUN_SELF_HOSTED; }
|
||||
bool isBuiltin() const { return isNative() || isSelfHostedBuiltin(); }
|
||||
bool isSelfHostedConstructor() const { return flags & JSFUN_SELF_HOSTED_CTOR; }
|
||||
bool isNativeConstructor() const { return flags & JSFUN_CONSTRUCTOR; }
|
||||
bool isHeavyweight() const { return JSFUN_HEAVYWEIGHT_TEST(flags); }
|
||||
|
@ -5639,7 +5639,7 @@ js_DecompileFunction(JSPrinter *jp)
|
||||
|
||||
if (fun->hasDefaults()) {
|
||||
// Since bug 781422, this code is completely wrong. If you ever have
|
||||
// the unfortunate task of reenabling the decompiler, you'll have to
|
||||
// the unenviable task of reenabling the decompiler, you'll have to
|
||||
// completely rewrite defaults decompiling.
|
||||
MOZ_CRASH();
|
||||
|
||||
|
@ -216,6 +216,9 @@ typedef JS::Handle<JSAtom*> HandleAtom;
|
||||
typedef JS::Handle<PropertyName*> HandlePropertyName;
|
||||
|
||||
typedef JS::MutableHandle<Shape*> MutableHandleShape;
|
||||
typedef JS::MutableHandle<JSAtom*> MutableHandleAtom;
|
||||
|
||||
typedef JSAtom * RawAtom;
|
||||
|
||||
typedef JS::Rooted<Shape*> RootedShape;
|
||||
typedef JS::Rooted<BaseShape*> RootedBaseShape;
|
||||
|
1235
js/src/jsreflect.cpp
1235
js/src/jsreflect.cpp
File diff suppressed because it is too large
Load Diff
@ -4432,7 +4432,7 @@ GENERATE_JSOPTION_GETTER_SETTER(Relimit, JSOPTION_RELIMIT)
|
||||
GENERATE_JSOPTION_GETTER_SETTER(Methodjit, JSOPTION_METHODJIT)
|
||||
GENERATE_JSOPTION_GETTER_SETTER(Methodjit_always, JSOPTION_METHODJIT_ALWAYS)
|
||||
GENERATE_JSOPTION_GETTER_SETTER(Strict_mode, JSOPTION_STRICT_MODE)
|
||||
GENERATE_JSOPTION_GETTER_SETTER(Ion, JSOPTION_ION);
|
||||
GENERATE_JSOPTION_GETTER_SETTER(Ion, JSOPTION_ION)
|
||||
|
||||
#undef GENERATE_JSOPTION_GETTER_SETTER
|
||||
|
||||
|
@ -16,7 +16,7 @@ public:
|
||||
|
||||
static nsresult CreateStack(JSContext* cx, XPCJSStackFrame** stack);
|
||||
|
||||
static nsresult CreateStackFrameLocation(PRUint32 aLanguage,
|
||||
static nsresult CreateStackFrameLocation(uint32_t aLanguage,
|
||||
const char* aFilename,
|
||||
const char* aFunctionName,
|
||||
int32_t aLineNumber,
|
||||
@ -93,7 +93,6 @@ nsresult
|
||||
XPCJSStackFrame::CreateStack(JSContext* cx, XPCJSStackFrame** stack)
|
||||
{
|
||||
static const unsigned MAX_FRAMES = 100;
|
||||
unsigned numFrames = 0;
|
||||
|
||||
nsRefPtr<XPCJSStackFrame> first = new XPCJSStackFrame();
|
||||
nsRefPtr<XPCJSStackFrame> self = first;
|
||||
|
@ -13,6 +13,7 @@
|
||||
#ifndef NSDISPLAYLIST_H_
|
||||
#define NSDISPLAYLIST_H_
|
||||
|
||||
#include "mozilla/Attributes.h"
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsIFrame.h"
|
||||
#include "nsPoint.h"
|
||||
@ -1406,7 +1407,7 @@ public:
|
||||
}
|
||||
#endif
|
||||
|
||||
virtual void Paint(nsDisplayListBuilder* aBuilder, nsRenderingContext* aCtx) {
|
||||
virtual void Paint(nsDisplayListBuilder* aBuilder, nsRenderingContext* aCtx) MOZ_OVERRIDE {
|
||||
mPaint(mFrame, aCtx, mVisibleRect, ToReferenceFrame());
|
||||
}
|
||||
NS_DISPLAY_DECL_NAME(mName, mType)
|
||||
@ -1457,7 +1458,7 @@ public:
|
||||
}
|
||||
#endif
|
||||
|
||||
virtual void Paint(nsDisplayListBuilder* aBuilder, nsRenderingContext* aCtx) {
|
||||
virtual void Paint(nsDisplayListBuilder* aBuilder, nsRenderingContext* aCtx) MOZ_OVERRIDE {
|
||||
mFrame->PresContext()->PresShell()->PaintCount(mFrameName, aCtx,
|
||||
mFrame->PresContext(),
|
||||
mFrame, ToReferenceFrame(),
|
||||
@ -1523,12 +1524,12 @@ public:
|
||||
}
|
||||
#endif
|
||||
|
||||
virtual nsRect GetBounds(nsDisplayListBuilder* aBuilder, bool* aSnap) {
|
||||
virtual nsRect GetBounds(nsDisplayListBuilder* aBuilder, bool* aSnap) MOZ_OVERRIDE {
|
||||
*aSnap = false;
|
||||
// The caret returns a rect in the coordinates of mFrame.
|
||||
return mCaret->GetCaretRect() + ToReferenceFrame();
|
||||
}
|
||||
virtual void Paint(nsDisplayListBuilder* aBuilder, nsRenderingContext* aCtx);
|
||||
virtual void Paint(nsDisplayListBuilder* aBuilder, nsRenderingContext* aCtx) MOZ_OVERRIDE;
|
||||
NS_DISPLAY_DECL_NAME("Caret", TYPE_CARET)
|
||||
protected:
|
||||
nsRefPtr<nsCaret> mCaret;
|
||||
@ -1550,11 +1551,11 @@ public:
|
||||
}
|
||||
#endif
|
||||
|
||||
virtual nsRect GetBounds(nsDisplayListBuilder* aBuilder, bool* aSnap);
|
||||
virtual void Paint(nsDisplayListBuilder* aBuilder, nsRenderingContext* aCtx);
|
||||
virtual nsRect GetBounds(nsDisplayListBuilder* aBuilder, bool* aSnap) MOZ_OVERRIDE;
|
||||
virtual void Paint(nsDisplayListBuilder* aBuilder, nsRenderingContext* aCtx) MOZ_OVERRIDE;
|
||||
virtual bool ComputeVisibility(nsDisplayListBuilder* aBuilder,
|
||||
nsRegion* aVisibleRegion,
|
||||
const nsRect& aAllowVisibleRegionExpansion);
|
||||
const nsRect& aAllowVisibleRegionExpansion) MOZ_OVERRIDE;
|
||||
NS_DISPLAY_DECL_NAME("Border", TYPE_BORDER)
|
||||
};
|
||||
|
||||
@ -1584,10 +1585,10 @@ public:
|
||||
}
|
||||
#endif
|
||||
|
||||
virtual nsRect GetBounds(nsDisplayListBuilder* aBuilder, bool* aSnap);
|
||||
virtual nsRect GetBounds(nsDisplayListBuilder* aBuilder, bool* aSnap) MOZ_OVERRIDE;
|
||||
|
||||
virtual nsRegion GetOpaqueRegion(nsDisplayListBuilder* aBuilder,
|
||||
bool* aSnap) {
|
||||
bool* aSnap) MOZ_OVERRIDE {
|
||||
*aSnap = false;
|
||||
nsRegion result;
|
||||
if (NS_GET_A(mColor) == 255) {
|
||||
@ -1596,13 +1597,13 @@ public:
|
||||
return result;
|
||||
}
|
||||
|
||||
virtual bool IsUniform(nsDisplayListBuilder* aBuilder, nscolor* aColor)
|
||||
virtual bool IsUniform(nsDisplayListBuilder* aBuilder, nscolor* aColor) MOZ_OVERRIDE
|
||||
{
|
||||
*aColor = mColor;
|
||||
return true;
|
||||
}
|
||||
|
||||
virtual void Paint(nsDisplayListBuilder* aBuilder, nsRenderingContext* aCtx);
|
||||
virtual void Paint(nsDisplayListBuilder* aBuilder, nsRenderingContext* aCtx) MOZ_OVERRIDE;
|
||||
|
||||
NS_DISPLAY_DECL_NAME("SolidColor", TYPE_SOLID_COLOR)
|
||||
|
||||
@ -1634,26 +1635,26 @@ public:
|
||||
|
||||
virtual LayerState GetLayerState(nsDisplayListBuilder* aBuilder,
|
||||
LayerManager* aManager,
|
||||
const ContainerParameters& aParameters);
|
||||
const ContainerParameters& aParameters) MOZ_OVERRIDE;
|
||||
|
||||
virtual already_AddRefed<Layer> BuildLayer(nsDisplayListBuilder* aBuilder,
|
||||
LayerManager* aManager,
|
||||
const ContainerParameters& aContainerParameters);
|
||||
const ContainerParameters& aContainerParameters) MOZ_OVERRIDE;
|
||||
|
||||
virtual void HitTest(nsDisplayListBuilder* aBuilder, const nsRect& aRect,
|
||||
HitTestState* aState, nsTArray<nsIFrame*> *aOutFrames);
|
||||
HitTestState* aState, nsTArray<nsIFrame*> *aOutFrames) MOZ_OVERRIDE;
|
||||
virtual bool ComputeVisibility(nsDisplayListBuilder* aBuilder,
|
||||
nsRegion* aVisibleRegion,
|
||||
const nsRect& aAllowVisibleRegionExpansion);
|
||||
const nsRect& aAllowVisibleRegionExpansion) MOZ_OVERRIDE;
|
||||
virtual nsRegion GetOpaqueRegion(nsDisplayListBuilder* aBuilder,
|
||||
bool* aSnap);
|
||||
bool* aSnap) MOZ_OVERRIDE;
|
||||
virtual bool IsVaryingRelativeToMovingFrame(nsDisplayListBuilder* aBuilder,
|
||||
nsIFrame* aFrame);
|
||||
virtual bool IsUniform(nsDisplayListBuilder* aBuilder, nscolor* aColor);
|
||||
virtual bool ShouldFixToViewport(nsDisplayListBuilder* aBuilder);
|
||||
virtual nsRect GetBounds(nsDisplayListBuilder* aBuilder, bool* aSnap);
|
||||
virtual void Paint(nsDisplayListBuilder* aBuilder, nsRenderingContext* aCtx);
|
||||
virtual uint32_t GetPerFrameKey();
|
||||
nsIFrame* aFrame) MOZ_OVERRIDE;
|
||||
virtual bool IsUniform(nsDisplayListBuilder* aBuilder, nscolor* aColor) MOZ_OVERRIDE;
|
||||
virtual bool ShouldFixToViewport(nsDisplayListBuilder* aBuilder) MOZ_OVERRIDE;
|
||||
virtual nsRect GetBounds(nsDisplayListBuilder* aBuilder, bool* aSnap) MOZ_OVERRIDE;
|
||||
virtual void Paint(nsDisplayListBuilder* aBuilder, nsRenderingContext* aCtx) MOZ_OVERRIDE;
|
||||
virtual uint32_t GetPerFrameKey() MOZ_OVERRIDE;
|
||||
NS_DISPLAY_DECL_NAME("Background", TYPE_BACKGROUND)
|
||||
// Returns the value of GetUnderlyingFrame()->IsThemed(), but cached
|
||||
bool IsThemed() { return mIsThemed; }
|
||||
@ -1699,11 +1700,11 @@ public:
|
||||
}
|
||||
#endif
|
||||
|
||||
virtual void Paint(nsDisplayListBuilder* aBuilder, nsRenderingContext* aCtx);
|
||||
virtual nsRect GetBounds(nsDisplayListBuilder* aBuilder, bool* aSnap);
|
||||
virtual void Paint(nsDisplayListBuilder* aBuilder, nsRenderingContext* aCtx) MOZ_OVERRIDE;
|
||||
virtual nsRect GetBounds(nsDisplayListBuilder* aBuilder, bool* aSnap) MOZ_OVERRIDE;
|
||||
virtual bool ComputeVisibility(nsDisplayListBuilder* aBuilder,
|
||||
nsRegion* aVisibleRegion,
|
||||
const nsRect& aAllowVisibleRegionExpansion);
|
||||
const nsRect& aAllowVisibleRegionExpansion) MOZ_OVERRIDE;
|
||||
NS_DISPLAY_DECL_NAME("BoxShadowOuter", TYPE_BOX_SHADOW_OUTER)
|
||||
|
||||
private:
|
||||
@ -1725,10 +1726,10 @@ public:
|
||||
}
|
||||
#endif
|
||||
|
||||
virtual void Paint(nsDisplayListBuilder* aBuilder, nsRenderingContext* aCtx);
|
||||
virtual void Paint(nsDisplayListBuilder* aBuilder, nsRenderingContext* aCtx) MOZ_OVERRIDE;
|
||||
virtual bool ComputeVisibility(nsDisplayListBuilder* aBuilder,
|
||||
nsRegion* aVisibleRegion,
|
||||
const nsRect& aAllowVisibleRegionExpansion);
|
||||
const nsRect& aAllowVisibleRegionExpansion) MOZ_OVERRIDE;
|
||||
NS_DISPLAY_DECL_NAME("BoxShadowInner", TYPE_BOX_SHADOW_INNER)
|
||||
|
||||
private:
|
||||
@ -1750,11 +1751,11 @@ public:
|
||||
}
|
||||
#endif
|
||||
|
||||
virtual nsRect GetBounds(nsDisplayListBuilder* aBuilder, bool* aSnap);
|
||||
virtual void Paint(nsDisplayListBuilder* aBuilder, nsRenderingContext* aCtx);
|
||||
virtual nsRect GetBounds(nsDisplayListBuilder* aBuilder, bool* aSnap) MOZ_OVERRIDE;
|
||||
virtual void Paint(nsDisplayListBuilder* aBuilder, nsRenderingContext* aCtx) MOZ_OVERRIDE;
|
||||
virtual bool ComputeVisibility(nsDisplayListBuilder* aBuilder,
|
||||
nsRegion* aVisibleRegion,
|
||||
const nsRect& aAllowVisibleRegionExpansion);
|
||||
const nsRect& aAllowVisibleRegionExpansion) MOZ_OVERRIDE;
|
||||
NS_DISPLAY_DECL_NAME("Outline", TYPE_OUTLINE)
|
||||
};
|
||||
|
||||
@ -1774,7 +1775,7 @@ public:
|
||||
#endif
|
||||
|
||||
virtual void HitTest(nsDisplayListBuilder* aBuilder, const nsRect& aRect,
|
||||
HitTestState* aState, nsTArray<nsIFrame*> *aOutFrames);
|
||||
HitTestState* aState, nsTArray<nsIFrame*> *aOutFrames) MOZ_OVERRIDE;
|
||||
NS_DISPLAY_DECL_NAME("EventReceiver", TYPE_EVENT_RECEIVER)
|
||||
};
|
||||
|
||||
@ -1817,22 +1818,22 @@ public:
|
||||
mBounds = mList.GetBounds(aBuilder);
|
||||
}
|
||||
virtual void HitTest(nsDisplayListBuilder* aBuilder, const nsRect& aRect,
|
||||
HitTestState* aState, nsTArray<nsIFrame*> *aOutFrames);
|
||||
virtual nsRect GetBounds(nsDisplayListBuilder* aBuilder, bool* aSnap);
|
||||
HitTestState* aState, nsTArray<nsIFrame*> *aOutFrames) MOZ_OVERRIDE;
|
||||
virtual nsRect GetBounds(nsDisplayListBuilder* aBuilder, bool* aSnap) MOZ_OVERRIDE;
|
||||
virtual nsRegion GetOpaqueRegion(nsDisplayListBuilder* aBuilder,
|
||||
bool* aSnap);
|
||||
virtual bool IsUniform(nsDisplayListBuilder* aBuilder, nscolor* aColor);
|
||||
bool* aSnap) MOZ_OVERRIDE;
|
||||
virtual bool IsUniform(nsDisplayListBuilder* aBuilder, nscolor* aColor) MOZ_OVERRIDE;
|
||||
virtual bool IsVaryingRelativeToMovingFrame(nsDisplayListBuilder* aBuilder,
|
||||
nsIFrame* aFrame);
|
||||
virtual void Paint(nsDisplayListBuilder* aBuilder, nsRenderingContext* aCtx);
|
||||
nsIFrame* aFrame) MOZ_OVERRIDE;
|
||||
virtual void Paint(nsDisplayListBuilder* aBuilder, nsRenderingContext* aCtx) MOZ_OVERRIDE;
|
||||
virtual bool ComputeVisibility(nsDisplayListBuilder* aBuilder,
|
||||
nsRegion* aVisibleRegion,
|
||||
const nsRect& aAllowVisibleRegionExpansion);
|
||||
virtual bool TryMerge(nsDisplayListBuilder* aBuilder, nsDisplayItem* aItem) {
|
||||
const nsRect& aAllowVisibleRegionExpansion) MOZ_OVERRIDE;
|
||||
virtual bool TryMerge(nsDisplayListBuilder* aBuilder, nsDisplayItem* aItem) MOZ_OVERRIDE {
|
||||
NS_WARNING("This list should already have been flattened!!!");
|
||||
return false;
|
||||
}
|
||||
virtual void GetMergedFrames(nsTArray<nsIFrame*>* aFrames)
|
||||
virtual void GetMergedFrames(nsTArray<nsIFrame*>* aFrames) MOZ_OVERRIDE
|
||||
{
|
||||
aFrames->AppendElements(mMergedFrames);
|
||||
}
|
||||
@ -1840,7 +1841,7 @@ public:
|
||||
|
||||
virtual nsRect GetComponentAlphaBounds(nsDisplayListBuilder* aBuilder);
|
||||
|
||||
virtual nsDisplayList* GetList() { return &mList; }
|
||||
virtual nsDisplayList* GetList() MOZ_OVERRIDE { return &mList; }
|
||||
|
||||
/**
|
||||
* This creates a copy of this item, but wrapping aItem instead of
|
||||
@ -1926,17 +1927,17 @@ public:
|
||||
#endif
|
||||
|
||||
virtual nsRegion GetOpaqueRegion(nsDisplayListBuilder* aBuilder,
|
||||
bool* aSnap);
|
||||
bool* aSnap) MOZ_OVERRIDE;
|
||||
virtual already_AddRefed<Layer> BuildLayer(nsDisplayListBuilder* aBuilder,
|
||||
LayerManager* aManager,
|
||||
const ContainerParameters& aContainerParameters);
|
||||
const ContainerParameters& aContainerParameters) MOZ_OVERRIDE;
|
||||
virtual LayerState GetLayerState(nsDisplayListBuilder* aBuilder,
|
||||
LayerManager* aManager,
|
||||
const ContainerParameters& aParameters);
|
||||
const ContainerParameters& aParameters) MOZ_OVERRIDE;
|
||||
virtual bool ComputeVisibility(nsDisplayListBuilder* aBuilder,
|
||||
nsRegion* aVisibleRegion,
|
||||
const nsRect& aAllowVisibleRegionExpansion);
|
||||
virtual bool TryMerge(nsDisplayListBuilder* aBuilder, nsDisplayItem* aItem);
|
||||
const nsRect& aAllowVisibleRegionExpansion) MOZ_OVERRIDE;
|
||||
virtual bool TryMerge(nsDisplayListBuilder* aBuilder, nsDisplayItem* aItem) MOZ_OVERRIDE;
|
||||
NS_DISPLAY_DECL_NAME("Opacity", TYPE_OPACITY)
|
||||
|
||||
bool CanUseAsyncAnimations(nsDisplayListBuilder* aBuilder);
|
||||
@ -1956,14 +1957,14 @@ public:
|
||||
|
||||
virtual already_AddRefed<Layer> BuildLayer(nsDisplayListBuilder* aBuilder,
|
||||
LayerManager* aManager,
|
||||
const ContainerParameters& aContainerParameters);
|
||||
const ContainerParameters& aContainerParameters) MOZ_OVERRIDE;
|
||||
virtual LayerState GetLayerState(nsDisplayListBuilder* aBuilder,
|
||||
LayerManager* aManager,
|
||||
const ContainerParameters& aParameters)
|
||||
const ContainerParameters& aParameters) MOZ_OVERRIDE
|
||||
{
|
||||
return mozilla::LAYER_ACTIVE_FORCE;
|
||||
}
|
||||
virtual bool TryMerge(nsDisplayListBuilder* aBuilder, nsDisplayItem* aItem)
|
||||
virtual bool TryMerge(nsDisplayListBuilder* aBuilder, nsDisplayItem* aItem) MOZ_OVERRIDE
|
||||
{
|
||||
// Don't allow merging, each sublist must have its own layer
|
||||
return false;
|
||||
@ -1986,14 +1987,14 @@ public:
|
||||
|
||||
virtual already_AddRefed<Layer> BuildLayer(nsDisplayListBuilder* aBuilder,
|
||||
LayerManager* aManager,
|
||||
const ContainerParameters& aContainerParameters);
|
||||
const ContainerParameters& aContainerParameters) MOZ_OVERRIDE;
|
||||
virtual LayerState GetLayerState(nsDisplayListBuilder* aBuilder,
|
||||
LayerManager* aManager,
|
||||
const ContainerParameters& aParameters)
|
||||
const ContainerParameters& aParameters) MOZ_OVERRIDE
|
||||
{
|
||||
return mozilla::LAYER_ACTIVE;
|
||||
}
|
||||
virtual bool TryMerge(nsDisplayListBuilder* aBuilder, nsDisplayItem* aItem);
|
||||
virtual bool TryMerge(nsDisplayListBuilder* aBuilder, nsDisplayItem* aItem) MOZ_OVERRIDE;
|
||||
|
||||
NS_DISPLAY_DECL_NAME("FixedPosition", TYPE_FIXED_POSITION)
|
||||
|
||||
@ -2049,20 +2050,20 @@ public:
|
||||
|
||||
virtual already_AddRefed<Layer> BuildLayer(nsDisplayListBuilder* aBuilder,
|
||||
LayerManager* aManager,
|
||||
const ContainerParameters& aContainerParameters);
|
||||
const ContainerParameters& aContainerParameters) MOZ_OVERRIDE;
|
||||
|
||||
virtual bool ComputeVisibility(nsDisplayListBuilder* aBuilder,
|
||||
nsRegion* aVisibleRegion,
|
||||
const nsRect& aAllowVisibleRegionExpansion);
|
||||
const nsRect& aAllowVisibleRegionExpansion) MOZ_OVERRIDE;
|
||||
|
||||
virtual LayerState GetLayerState(nsDisplayListBuilder* aBuilder,
|
||||
LayerManager* aManager,
|
||||
const ContainerParameters& aParameters);
|
||||
const ContainerParameters& aParameters) MOZ_OVERRIDE;
|
||||
|
||||
virtual bool TryMerge(nsDisplayListBuilder* aBuilder,
|
||||
nsDisplayItem* aItem);
|
||||
nsDisplayItem* aItem) MOZ_OVERRIDE;
|
||||
|
||||
virtual bool ShouldFlattenAway(nsDisplayListBuilder* aBuilder);
|
||||
virtual bool ShouldFlattenAway(nsDisplayListBuilder* aBuilder) MOZ_OVERRIDE;
|
||||
|
||||
// Get the number of nsDisplayScrollLayers for a scroll frame. Note that this
|
||||
// number does not include nsDisplayScrollInfoLayers. If this number is not 1
|
||||
@ -2101,12 +2102,12 @@ public:
|
||||
|
||||
virtual LayerState GetLayerState(nsDisplayListBuilder* aBuilder,
|
||||
LayerManager* aManager,
|
||||
const ContainerParameters& aParameters);
|
||||
const ContainerParameters& aParameters) MOZ_OVERRIDE;
|
||||
|
||||
virtual bool TryMerge(nsDisplayListBuilder* aBuilder,
|
||||
nsDisplayItem* aItem);
|
||||
nsDisplayItem* aItem) MOZ_OVERRIDE;
|
||||
|
||||
virtual bool ShouldFlattenAway(nsDisplayListBuilder* aBuilder);
|
||||
virtual bool ShouldFlattenAway(nsDisplayListBuilder* aBuilder) MOZ_OVERRIDE;
|
||||
};
|
||||
|
||||
/**
|
||||
@ -2129,12 +2130,12 @@ public:
|
||||
virtual ~nsDisplayClip();
|
||||
#endif
|
||||
|
||||
virtual nsRect GetBounds(nsDisplayListBuilder* aBuilder, bool* aSnap);
|
||||
virtual void Paint(nsDisplayListBuilder* aBuilder, nsRenderingContext* aCtx);
|
||||
virtual nsRect GetBounds(nsDisplayListBuilder* aBuilder, bool* aSnap) MOZ_OVERRIDE;
|
||||
virtual void Paint(nsDisplayListBuilder* aBuilder, nsRenderingContext* aCtx) MOZ_OVERRIDE;
|
||||
virtual bool ComputeVisibility(nsDisplayListBuilder* aBuilder,
|
||||
nsRegion* aVisibleRegion,
|
||||
const nsRect& aAllowVisibleRegionExpansion);
|
||||
virtual bool TryMerge(nsDisplayListBuilder* aBuilder, nsDisplayItem* aItem);
|
||||
const nsRect& aAllowVisibleRegionExpansion) MOZ_OVERRIDE;
|
||||
virtual bool TryMerge(nsDisplayListBuilder* aBuilder, nsDisplayItem* aItem) MOZ_OVERRIDE;
|
||||
NS_DISPLAY_DECL_NAME("Clip", TYPE_CLIP)
|
||||
virtual uint32_t GetPerFrameKey() { return 0; }
|
||||
|
||||
@ -2142,7 +2143,7 @@ public:
|
||||
void SetClipRect(const nsRect& aRect) { mClip = aRect; }
|
||||
|
||||
virtual nsDisplayWrapList* WrapWithClone(nsDisplayListBuilder* aBuilder,
|
||||
nsDisplayItem* aItem);
|
||||
nsDisplayItem* aItem) MOZ_OVERRIDE;
|
||||
|
||||
protected:
|
||||
nsRect mClip;
|
||||
@ -2170,13 +2171,13 @@ public:
|
||||
#endif
|
||||
|
||||
virtual nsRegion GetOpaqueRegion(nsDisplayListBuilder* aBuilder,
|
||||
bool* aSnap);
|
||||
bool* aSnap) MOZ_OVERRIDE;
|
||||
virtual void HitTest(nsDisplayListBuilder* aBuilder, const nsRect& aRect,
|
||||
HitTestState* aState, nsTArray<nsIFrame*> *aOutFrames);
|
||||
HitTestState* aState, nsTArray<nsIFrame*> *aOutFrames) MOZ_OVERRIDE;
|
||||
virtual bool ComputeVisibility(nsDisplayListBuilder* aBuilder,
|
||||
nsRegion* aVisibleRegion,
|
||||
const nsRect& aAllowVisibleRegionExpansion);
|
||||
virtual bool TryMerge(nsDisplayListBuilder* aBuilder, nsDisplayItem* aItem);
|
||||
const nsRect& aAllowVisibleRegionExpansion) MOZ_OVERRIDE;
|
||||
virtual bool TryMerge(nsDisplayListBuilder* aBuilder, nsDisplayItem* aItem) MOZ_OVERRIDE;
|
||||
NS_DISPLAY_DECL_NAME("ClipRoundedRect", TYPE_CLIP_ROUNDED_RECT)
|
||||
|
||||
virtual nsDisplayWrapList* WrapWithClone(nsDisplayListBuilder* aBuilder,
|
||||
@ -2210,16 +2211,16 @@ public:
|
||||
virtual ~nsDisplayZoom();
|
||||
#endif
|
||||
|
||||
virtual nsRect GetBounds(nsDisplayListBuilder* aBuilder, bool* aSnap);
|
||||
virtual void Paint(nsDisplayListBuilder* aBuilder, nsRenderingContext* aCtx);
|
||||
virtual nsRect GetBounds(nsDisplayListBuilder* aBuilder, bool* aSnap) MOZ_OVERRIDE;
|
||||
virtual void Paint(nsDisplayListBuilder* aBuilder, nsRenderingContext* aCtx) MOZ_OVERRIDE;
|
||||
virtual void HitTest(nsDisplayListBuilder* aBuilder, const nsRect& aRect,
|
||||
HitTestState* aState, nsTArray<nsIFrame*> *aOutFrames);
|
||||
HitTestState* aState, nsTArray<nsIFrame*> *aOutFrames) MOZ_OVERRIDE;
|
||||
virtual bool ComputeVisibility(nsDisplayListBuilder* aBuilder,
|
||||
nsRegion* aVisibleRegion,
|
||||
const nsRect& aAllowVisibleRegionExpansion);
|
||||
const nsRect& aAllowVisibleRegionExpansion) MOZ_OVERRIDE;
|
||||
virtual LayerState GetLayerState(nsDisplayListBuilder* aBuilder,
|
||||
LayerManager* aManager,
|
||||
const ContainerParameters& aParameters)
|
||||
const ContainerParameters& aParameters) MOZ_OVERRIDE
|
||||
{
|
||||
return mozilla::LAYER_ACTIVE;
|
||||
}
|
||||
@ -2247,17 +2248,17 @@ public:
|
||||
#endif
|
||||
|
||||
virtual nsRegion GetOpaqueRegion(nsDisplayListBuilder* aBuilder,
|
||||
bool* aSnap);
|
||||
bool* aSnap) MOZ_OVERRIDE;
|
||||
virtual void HitTest(nsDisplayListBuilder* aBuilder, const nsRect& aRect,
|
||||
HitTestState* aState, nsTArray<nsIFrame*> *aOutFrames);
|
||||
virtual nsRect GetBounds(nsDisplayListBuilder* aBuilder, bool* aSnap) {
|
||||
HitTestState* aState, nsTArray<nsIFrame*> *aOutFrames) MOZ_OVERRIDE;
|
||||
virtual nsRect GetBounds(nsDisplayListBuilder* aBuilder, bool* aSnap) MOZ_OVERRIDE {
|
||||
*aSnap = false;
|
||||
return mEffectsBounds + ToReferenceFrame();
|
||||
}
|
||||
virtual bool ComputeVisibility(nsDisplayListBuilder* aBuilder,
|
||||
nsRegion* aVisibleRegion,
|
||||
const nsRect& aAllowVisibleRegionExpansion);
|
||||
virtual bool TryMerge(nsDisplayListBuilder* aBuilder, nsDisplayItem* aItem);
|
||||
const nsRect& aAllowVisibleRegionExpansion) MOZ_OVERRIDE;
|
||||
virtual bool TryMerge(nsDisplayListBuilder* aBuilder, nsDisplayItem* aItem) MOZ_OVERRIDE;
|
||||
NS_DISPLAY_DECL_NAME("SVGEffects", TYPE_SVG_EFFECTS)
|
||||
|
||||
virtual LayerState GetLayerState(nsDisplayListBuilder* aBuilder,
|
||||
@ -2266,7 +2267,7 @@ public:
|
||||
|
||||
virtual already_AddRefed<Layer> BuildLayer(nsDisplayListBuilder* aBuilder,
|
||||
LayerManager* aManager,
|
||||
const ContainerParameters& aContainerParameters);
|
||||
const ContainerParameters& aContainerParameters) MOZ_OVERRIDE;
|
||||
|
||||
void PaintAsLayer(nsDisplayListBuilder* aBuilder,
|
||||
nsRenderingContext* aCtx,
|
||||
@ -2335,23 +2336,23 @@ public:
|
||||
nsDisplayWrapList* GetStoredList() { return &mStoredList; }
|
||||
|
||||
virtual void HitTest(nsDisplayListBuilder *aBuilder, const nsRect& aRect,
|
||||
HitTestState *aState, nsTArray<nsIFrame*> *aOutFrames);
|
||||
virtual nsRect GetBounds(nsDisplayListBuilder *aBuilder, bool* aSnap);
|
||||
HitTestState *aState, nsTArray<nsIFrame*> *aOutFrames) MOZ_OVERRIDE;
|
||||
virtual nsRect GetBounds(nsDisplayListBuilder *aBuilder, bool* aSnap) MOZ_OVERRIDE;
|
||||
virtual nsRegion GetOpaqueRegion(nsDisplayListBuilder *aBuilder,
|
||||
bool* aSnap);
|
||||
virtual bool IsUniform(nsDisplayListBuilder *aBuilder, nscolor* aColor);
|
||||
bool* aSnap) MOZ_OVERRIDE;
|
||||
virtual bool IsUniform(nsDisplayListBuilder *aBuilder, nscolor* aColor) MOZ_OVERRIDE;
|
||||
virtual LayerState GetLayerState(nsDisplayListBuilder* aBuilder,
|
||||
LayerManager* aManager,
|
||||
const ContainerParameters& aParameters);
|
||||
const ContainerParameters& aParameters) MOZ_OVERRIDE;
|
||||
virtual already_AddRefed<Layer> BuildLayer(nsDisplayListBuilder* aBuilder,
|
||||
LayerManager* aManager,
|
||||
const ContainerParameters& aContainerParameters);
|
||||
const ContainerParameters& aContainerParameters) MOZ_OVERRIDE;
|
||||
virtual bool ComputeVisibility(nsDisplayListBuilder *aBuilder,
|
||||
nsRegion *aVisibleRegion,
|
||||
const nsRect& aAllowVisibleRegionExpansion);
|
||||
virtual bool TryMerge(nsDisplayListBuilder *aBuilder, nsDisplayItem *aItem);
|
||||
const nsRect& aAllowVisibleRegionExpansion) MOZ_OVERRIDE;
|
||||
virtual bool TryMerge(nsDisplayListBuilder *aBuilder, nsDisplayItem *aItem) MOZ_OVERRIDE;
|
||||
|
||||
virtual uint32_t GetPerFrameKey() { return (mIndex << nsDisplayItem::TYPE_BITS) | nsDisplayItem::GetPerFrameKey(); }
|
||||
virtual uint32_t GetPerFrameKey() MOZ_OVERRIDE { return (mIndex << nsDisplayItem::TYPE_BITS) | nsDisplayItem::GetPerFrameKey(); }
|
||||
|
||||
enum {
|
||||
INDEX_MAX = PR_UINT32_MAX >> nsDisplayItem::TYPE_BITS
|
||||
@ -2454,7 +2455,7 @@ public:
|
||||
static bool ShouldPrerenderTransformedContent(nsDisplayListBuilder* aBuilder,
|
||||
nsIFrame* aFrame,
|
||||
bool aLogAnimations = false);
|
||||
bool CanUseAsyncAnimations(nsDisplayListBuilder* aBuilder);
|
||||
bool CanUseAsyncAnimations(nsDisplayListBuilder* aBuilder) MOZ_OVERRIDE;
|
||||
|
||||
private:
|
||||
nsDisplayWrapList mStoredList;
|
||||
|
@ -8,6 +8,7 @@
|
||||
#ifndef nsPresContext_h___
|
||||
#define nsPresContext_h___
|
||||
|
||||
#include "mozilla/Attributes.h"
|
||||
#include "nsISupports.h"
|
||||
#include "nsColor.h"
|
||||
#include "nsCoord.h"
|
||||
@ -1259,7 +1260,7 @@ public:
|
||||
*/
|
||||
void DidApplyPluginGeometryUpdates();
|
||||
|
||||
virtual bool IsRoot() { return true; }
|
||||
virtual bool IsRoot() MOZ_OVERRIDE { return true; }
|
||||
|
||||
/**
|
||||
* Call this after reflow and scrolling to ensure that the geometry
|
||||
|
@ -613,7 +613,7 @@ protected:
|
||||
mPresShell = nullptr;
|
||||
}
|
||||
}
|
||||
virtual void WillRefresh(mozilla::TimeStamp aTime) {
|
||||
virtual void WillRefresh(mozilla::TimeStamp aTime) MOZ_OVERRIDE {
|
||||
if (mPresShell)
|
||||
mPresShell->ProcessSynthMouseMoveEvent(mFromScroll);
|
||||
}
|
||||
|
@ -8,6 +8,7 @@
|
||||
#ifndef nsQuoteList_h___
|
||||
#define nsQuoteList_h___
|
||||
|
||||
#include "mozilla/Attributes.h"
|
||||
#include "nsGenConList.h"
|
||||
|
||||
struct nsQuoteNode : public nsGenConNode {
|
||||
@ -31,7 +32,7 @@ struct nsQuoteNode : public nsGenConNode {
|
||||
}
|
||||
|
||||
virtual bool InitTextFrame(nsGenConList* aList,
|
||||
nsIFrame* aPseudoFrame, nsIFrame* aTextFrame);
|
||||
nsIFrame* aPseudoFrame, nsIFrame* aTextFrame) MOZ_OVERRIDE;
|
||||
|
||||
// is this 'open-quote' or 'no-open-quote'?
|
||||
bool IsOpenQuote() {
|
||||
|
@ -21,6 +21,7 @@
|
||||
//Mark used to indicate when onchange has been fired for current combobox item
|
||||
#define NS_SKIP_NOTIFY_INDEX -2
|
||||
|
||||
#include "mozilla/Attributes.h"
|
||||
#include "nsBlockFrame.h"
|
||||
#include "nsIFormControlFrame.h"
|
||||
#include "nsIComboboxControlFrame.h"
|
||||
@ -60,21 +61,21 @@ public:
|
||||
// nsIAnonymousContentCreator
|
||||
virtual nsresult CreateAnonymousContent(nsTArray<ContentInfo>& aElements);
|
||||
virtual void AppendAnonymousContentTo(nsBaseContentList& aElements,
|
||||
uint32_t aFilter);
|
||||
virtual nsIFrame* CreateFrameFor(nsIContent* aContent);
|
||||
uint32_t aFilter) MOZ_OVERRIDE;
|
||||
virtual nsIFrame* CreateFrameFor(nsIContent* aContent) MOZ_OVERRIDE;
|
||||
|
||||
#ifdef ACCESSIBILITY
|
||||
virtual already_AddRefed<Accessible> CreateAccessible();
|
||||
virtual already_AddRefed<Accessible> CreateAccessible() MOZ_OVERRIDE;
|
||||
#endif
|
||||
|
||||
virtual nscoord GetMinWidth(nsRenderingContext *aRenderingContext);
|
||||
virtual nscoord GetMinWidth(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
|
||||
|
||||
virtual nscoord GetPrefWidth(nsRenderingContext *aRenderingContext);
|
||||
virtual nscoord GetPrefWidth(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
|
||||
|
||||
NS_IMETHOD Reflow(nsPresContext* aCX,
|
||||
nsHTMLReflowMetrics& aDesiredSize,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus);
|
||||
nsReflowStatus& aStatus) MOZ_OVERRIDE;
|
||||
|
||||
NS_IMETHOD HandleEvent(nsPresContext* aPresContext,
|
||||
nsGUIEvent* aEvent,
|
||||
@ -82,16 +83,16 @@ public:
|
||||
|
||||
NS_IMETHOD BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||
const nsRect& aDirtyRect,
|
||||
const nsDisplayListSet& aLists);
|
||||
const nsDisplayListSet& aLists) MOZ_OVERRIDE;
|
||||
|
||||
void PaintFocus(nsRenderingContext& aRenderingContext, nsPoint aPt);
|
||||
|
||||
// XXXbz this is only needed to prevent the quirk percent height stuff from
|
||||
// leaking out of the combobox. We may be able to get rid of this as more
|
||||
// things move to IsFrameOfType.
|
||||
virtual nsIAtom* GetType() const;
|
||||
virtual nsIAtom* GetType() const MOZ_OVERRIDE;
|
||||
|
||||
virtual bool IsFrameOfType(uint32_t aFlags) const
|
||||
virtual bool IsFrameOfType(uint32_t aFlags) const MOZ_OVERRIDE
|
||||
{
|
||||
return nsBlockFrame::IsFrameOfType(aFlags &
|
||||
~(nsIFrame::eReplaced | nsIFrame::eReplacedContainsBlock));
|
||||
@ -102,19 +103,19 @@ public:
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
NS_IMETHOD GetFrameName(nsAString& aResult) const;
|
||||
NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE;
|
||||
#endif
|
||||
virtual void DestroyFrom(nsIFrame* aDestructRoot);
|
||||
virtual void DestroyFrom(nsIFrame* aDestructRoot) MOZ_OVERRIDE;
|
||||
NS_IMETHOD SetInitialChildList(ChildListID aListID,
|
||||
nsFrameList& aChildList);
|
||||
virtual const nsFrameList& GetChildList(ChildListID aListID) const;
|
||||
virtual void GetChildLists(nsTArray<ChildList>* aLists) const;
|
||||
nsFrameList& aChildList) MOZ_OVERRIDE;
|
||||
virtual const nsFrameList& GetChildList(ChildListID aListID) const MOZ_OVERRIDE;
|
||||
virtual void GetChildLists(nsTArray<ChildList>* aLists) const MOZ_OVERRIDE;
|
||||
|
||||
virtual nsIFrame* GetContentInsertionFrame();
|
||||
|
||||
// nsIFormControlFrame
|
||||
virtual nsresult SetFormProperty(nsIAtom* aName, const nsAString& aValue);
|
||||
virtual nsresult GetFormProperty(nsIAtom* aName, nsAString& aValue) const;
|
||||
virtual nsresult SetFormProperty(nsIAtom* aName, const nsAString& aValue) MOZ_OVERRIDE;
|
||||
virtual nsresult GetFormProperty(nsIAtom* aName, nsAString& aValue) const MOZ_OVERRIDE;
|
||||
/**
|
||||
* Inform the control that it got (or lost) focus.
|
||||
* If it lost focus, the dropdown menu will be rolled up if needed,
|
||||
@ -130,13 +131,13 @@ public:
|
||||
/**
|
||||
* @note This method might destroy |this|.
|
||||
*/
|
||||
virtual void ShowDropDown(bool aDoDropDown);
|
||||
virtual nsIFrame* GetDropDown();
|
||||
virtual void SetDropDown(nsIFrame* aDropDownFrame);
|
||||
virtual void ShowDropDown(bool aDoDropDown) MOZ_OVERRIDE;
|
||||
virtual nsIFrame* GetDropDown() MOZ_OVERRIDE;
|
||||
virtual void SetDropDown(nsIFrame* aDropDownFrame) MOZ_OVERRIDE;
|
||||
/**
|
||||
* @note This method might destroy |this|.
|
||||
*/
|
||||
virtual void RollupFromList();
|
||||
virtual void RollupFromList() MOZ_OVERRIDE;
|
||||
|
||||
/**
|
||||
* Return the available space above and below this frame for
|
||||
@ -147,20 +148,20 @@ public:
|
||||
void GetAvailableDropdownSpace(nscoord* aAbove,
|
||||
nscoord* aBelow,
|
||||
nsPoint* aTranslation);
|
||||
virtual int32_t GetIndexOfDisplayArea();
|
||||
virtual int32_t GetIndexOfDisplayArea() MOZ_OVERRIDE;
|
||||
/**
|
||||
* @note This method might destroy |this|.
|
||||
*/
|
||||
NS_IMETHOD RedisplaySelectedText();
|
||||
virtual int32_t UpdateRecentIndex(int32_t aIndex);
|
||||
virtual void OnContentReset();
|
||||
NS_IMETHOD RedisplaySelectedText() MOZ_OVERRIDE;
|
||||
virtual int32_t UpdateRecentIndex(int32_t aIndex) MOZ_OVERRIDE;
|
||||
virtual void OnContentReset() MOZ_OVERRIDE;
|
||||
|
||||
// nsISelectControlFrame
|
||||
NS_IMETHOD AddOption(int32_t index);
|
||||
NS_IMETHOD RemoveOption(int32_t index);
|
||||
NS_IMETHOD DoneAddingChildren(bool aIsDone);
|
||||
NS_IMETHOD OnOptionSelected(int32_t aIndex, bool aSelected);
|
||||
NS_IMETHOD OnSetSelectedIndex(int32_t aOldIndex, int32_t aNewIndex);
|
||||
NS_IMETHOD RemoveOption(int32_t index) MOZ_OVERRIDE;
|
||||
NS_IMETHOD DoneAddingChildren(bool aIsDone) MOZ_OVERRIDE;
|
||||
NS_IMETHOD OnOptionSelected(int32_t aIndex, bool aSelected) MOZ_OVERRIDE;
|
||||
NS_IMETHOD OnSetSelectedIndex(int32_t aOldIndex, int32_t aNewIndex) MOZ_OVERRIDE;
|
||||
|
||||
//nsIRollupListener
|
||||
/**
|
||||
@ -188,8 +189,8 @@ public:
|
||||
{ return 0; }
|
||||
|
||||
//nsIStatefulFrame
|
||||
NS_IMETHOD SaveState(SpecialStateID aStateID, nsPresState** aState);
|
||||
NS_IMETHOD RestoreState(nsPresState* aState);
|
||||
NS_IMETHOD SaveState(SpecialStateID aStateID, nsPresState** aState) MOZ_OVERRIDE;
|
||||
NS_IMETHOD RestoreState(nsPresState* aState) MOZ_OVERRIDE;
|
||||
|
||||
static bool ToolkitHasNativePopup();
|
||||
|
||||
|
@ -370,12 +370,11 @@ nsFileControlFrame::CaptureMouseListener::HandleEvent(nsIDOMEvent* aMouseEvent)
|
||||
// Tell our input element that this update of the value is a user
|
||||
// initiated change. Otherwise it'll think that the value is being set by
|
||||
// a script and not fire onchange when it should.
|
||||
|
||||
|
||||
inputElement->SetFiles(newFiles, true);
|
||||
|
||||
// Should fire a change event here since the SetFiles() call above ensures
|
||||
// a different value from the mFocusedValue of the inputElement.
|
||||
inputElement->FireChangeEventIfNeeded();
|
||||
nsContentUtils::DispatchTrustedEvent(content->OwnerDoc(), content,
|
||||
NS_LITERAL_STRING("change"), true,
|
||||
false);
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
@ -434,9 +433,10 @@ nsFileControlFrame::BrowseMouseListener::HandleEvent(nsIDOMEvent* aEvent)
|
||||
nsCOMPtr<nsIDOMFileList> fileList;
|
||||
dataTransfer->GetFiles(getter_AddRefs(fileList));
|
||||
|
||||
|
||||
inputElement->SetFiles(fileList, true);
|
||||
inputElement->FireChangeEventIfNeeded();
|
||||
nsContentUtils::DispatchTrustedEvent(content->OwnerDoc(), content,
|
||||
NS_LITERAL_STRING("change"), true,
|
||||
false);
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
|
@ -6,6 +6,7 @@
|
||||
#ifndef nsFileControlFrame_h___
|
||||
#define nsFileControlFrame_h___
|
||||
|
||||
#include "mozilla/Attributes.h"
|
||||
#include "nsBlockFrame.h"
|
||||
#include "nsIFormControlFrame.h"
|
||||
#include "nsIDOMEventListener.h"
|
||||
@ -36,32 +37,32 @@ public:
|
||||
|
||||
// nsIFormControlFrame
|
||||
virtual nsresult SetFormProperty(nsIAtom* aName, const nsAString& aValue);
|
||||
virtual nsresult GetFormProperty(nsIAtom* aName, nsAString& aValue) const;
|
||||
virtual nsresult GetFormProperty(nsIAtom* aName, nsAString& aValue) const MOZ_OVERRIDE;
|
||||
virtual void SetFocus(bool aOn, bool aRepaint);
|
||||
|
||||
virtual nscoord GetMinWidth(nsRenderingContext *aRenderingContext);
|
||||
virtual nscoord GetMinWidth(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
|
||||
|
||||
virtual void DestroyFrom(nsIFrame* aDestructRoot);
|
||||
virtual void DestroyFrom(nsIFrame* aDestructRoot) MOZ_OVERRIDE;
|
||||
|
||||
#ifdef DEBUG
|
||||
NS_IMETHOD GetFrameName(nsAString& aResult) const;
|
||||
NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE;
|
||||
#endif
|
||||
|
||||
NS_IMETHOD AttributeChanged(int32_t aNameSpaceID,
|
||||
nsIAtom* aAttribute,
|
||||
int32_t aModType);
|
||||
int32_t aModType) MOZ_OVERRIDE;
|
||||
virtual void ContentStatesChanged(nsEventStates aStates);
|
||||
virtual bool IsLeaf() const;
|
||||
|
||||
|
||||
|
||||
// nsIAnonymousContentCreator
|
||||
virtual nsresult CreateAnonymousContent(nsTArray<ContentInfo>& aElements);
|
||||
virtual nsresult CreateAnonymousContent(nsTArray<ContentInfo>& aElements) MOZ_OVERRIDE;
|
||||
virtual void AppendAnonymousContentTo(nsBaseContentList& aElements,
|
||||
uint32_t aFilter);
|
||||
uint32_t aFilter) MOZ_OVERRIDE;
|
||||
|
||||
#ifdef ACCESSIBILITY
|
||||
virtual already_AddRefed<Accessible> CreateAccessible();
|
||||
virtual already_AddRefed<Accessible> CreateAccessible() MOZ_OVERRIDE;
|
||||
#endif
|
||||
|
||||
typedef bool (*AcceptAttrCallback)(const nsAString&, void*);
|
||||
@ -137,13 +138,13 @@ protected:
|
||||
static bool IsValidDropData(nsIDOMDragEvent* aEvent);
|
||||
};
|
||||
|
||||
virtual bool IsFrameOfType(uint32_t aFlags) const
|
||||
virtual bool IsFrameOfType(uint32_t aFlags) const MOZ_OVERRIDE
|
||||
{
|
||||
return nsBlockFrame::IsFrameOfType(aFlags &
|
||||
~(nsIFrame::eReplaced | nsIFrame::eReplacedContainsBlock));
|
||||
}
|
||||
|
||||
virtual int GetSkipSides() const;
|
||||
virtual int GetSkipSides() const MOZ_OVERRIDE;
|
||||
|
||||
/**
|
||||
* The text box input.
|
||||
|
@ -6,6 +6,7 @@
|
||||
#ifndef nsFormControlFrame_h___
|
||||
#define nsFormControlFrame_h___
|
||||
|
||||
#include "mozilla/Attributes.h"
|
||||
#include "nsIFormControlFrame.h"
|
||||
#include "nsLeafFrame.h"
|
||||
|
||||
@ -42,7 +43,7 @@ public:
|
||||
*/
|
||||
NS_IMETHOD HandleEvent(nsPresContext* aPresContext,
|
||||
nsGUIEvent* aEvent,
|
||||
nsEventStatus* aEventStatus);
|
||||
nsEventStatus* aEventStatus) MOZ_OVERRIDE;
|
||||
|
||||
virtual nscoord GetBaseline() const;
|
||||
|
||||
@ -53,7 +54,7 @@ public:
|
||||
NS_IMETHOD Reflow(nsPresContext* aCX,
|
||||
nsHTMLReflowMetrics& aDesiredSize,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus);
|
||||
nsReflowStatus& aStatus) MOZ_OVERRIDE;
|
||||
|
||||
virtual void DestroyFrom(nsIFrame* aDestructRoot);
|
||||
|
||||
@ -62,9 +63,9 @@ public:
|
||||
virtual void SetFocus(bool aOn = true, bool aRepaint = false);
|
||||
|
||||
// nsIFormControlFrame
|
||||
virtual nsresult SetFormProperty(nsIAtom* aName, const nsAString& aValue);
|
||||
virtual nsresult SetFormProperty(nsIAtom* aName, const nsAString& aValue) MOZ_OVERRIDE;
|
||||
|
||||
virtual nsresult GetFormProperty(nsIAtom* aName, nsAString& aValue) const;
|
||||
virtual nsresult GetFormProperty(nsIAtom* aName, nsAString& aValue) const MOZ_OVERRIDE;
|
||||
|
||||
// AccessKey Helper function
|
||||
static nsresult RegUnRegAccessKey(nsIFrame * aFrame, bool aDoReg);
|
||||
@ -79,8 +80,8 @@ protected:
|
||||
|
||||
virtual ~nsFormControlFrame();
|
||||
|
||||
virtual nscoord GetIntrinsicWidth();
|
||||
virtual nscoord GetIntrinsicHeight();
|
||||
virtual nscoord GetIntrinsicWidth() MOZ_OVERRIDE;
|
||||
virtual nscoord GetIntrinsicHeight() MOZ_OVERRIDE;
|
||||
|
||||
//
|
||||
//-------------------------------------------------------------------------------------
|
||||
|
@ -6,6 +6,7 @@
|
||||
#ifndef nsGfxButtonControlFrame_h___
|
||||
#define nsGfxButtonControlFrame_h___
|
||||
|
||||
#include "mozilla/Attributes.h"
|
||||
#include "nsFormControlFrame.h"
|
||||
#include "nsHTMLButtonControlFrame.h"
|
||||
#include "nsCOMPtr.h"
|
||||
@ -28,16 +29,16 @@ public:
|
||||
|
||||
nsGfxButtonControlFrame(nsStyleContext* aContext);
|
||||
|
||||
virtual void DestroyFrom(nsIFrame* aDestructRoot);
|
||||
virtual void DestroyFrom(nsIFrame* aDestructRoot) MOZ_OVERRIDE;
|
||||
|
||||
NS_IMETHOD HandleEvent(nsPresContext* aPresContext,
|
||||
nsGUIEvent* aEvent,
|
||||
nsEventStatus* aEventStatus);
|
||||
nsEventStatus* aEventStatus) MOZ_OVERRIDE;
|
||||
|
||||
virtual nsIAtom* GetType() const;
|
||||
|
||||
#ifdef DEBUG
|
||||
NS_IMETHOD GetFrameName(nsAString& aResult) const;
|
||||
NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE;
|
||||
#endif
|
||||
|
||||
NS_DECL_QUERYFRAME
|
||||
@ -45,11 +46,11 @@ public:
|
||||
// nsIAnonymousContentCreator
|
||||
virtual nsresult CreateAnonymousContent(nsTArray<ContentInfo>& aElements);
|
||||
virtual void AppendAnonymousContentTo(nsBaseContentList& aElements,
|
||||
uint32_t aFilter);
|
||||
virtual nsIFrame* CreateFrameFor(nsIContent* aContent);
|
||||
uint32_t aFilter) MOZ_OVERRIDE;
|
||||
virtual nsIFrame* CreateFrameFor(nsIContent* aContent) MOZ_OVERRIDE;
|
||||
|
||||
// nsIFormControlFrame
|
||||
virtual nsresult GetFormProperty(nsIAtom* aName, nsAString& aValue) const;
|
||||
virtual nsresult GetFormProperty(nsIAtom* aName, nsAString& aValue) const MOZ_OVERRIDE;
|
||||
|
||||
|
||||
NS_IMETHOD AttributeChanged(int32_t aNameSpaceID,
|
||||
@ -58,7 +59,7 @@ public:
|
||||
|
||||
virtual bool IsLeaf() const;
|
||||
|
||||
virtual nsIFrame* GetContentInsertionFrame();
|
||||
virtual nsIFrame* GetContentInsertionFrame() MOZ_OVERRIDE;
|
||||
|
||||
protected:
|
||||
nsresult GetDefaultLabel(nsXPIDLString& aLabel) const;
|
||||
@ -67,7 +68,7 @@ protected:
|
||||
|
||||
bool IsFileBrowseButton(int32_t type) const; // Browse button of file input
|
||||
|
||||
virtual bool IsInput() { return true; }
|
||||
virtual bool IsInput() MOZ_OVERRIDE { return true; }
|
||||
private:
|
||||
nsCOMPtr<nsIContent> mTextContent;
|
||||
};
|
||||
|
@ -5,6 +5,7 @@
|
||||
#ifndef nsGfxCheckboxControlFrame_h___
|
||||
#define nsGfxCheckboxControlFrame_h___
|
||||
|
||||
#include "mozilla/Attributes.h"
|
||||
#include "nsFormControlFrame.h"
|
||||
|
||||
#ifdef ACCESSIBILITY
|
||||
@ -20,17 +21,17 @@ public:
|
||||
virtual ~nsGfxCheckboxControlFrame();
|
||||
|
||||
#ifdef DEBUG
|
||||
NS_IMETHOD GetFrameName(nsAString& aResult) const {
|
||||
NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE {
|
||||
return MakeFrameName(NS_LITERAL_STRING("CheckboxControl"), aResult);
|
||||
}
|
||||
#endif
|
||||
|
||||
NS_IMETHOD BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||
const nsRect& aDirtyRect,
|
||||
const nsDisplayListSet& aLists);
|
||||
const nsDisplayListSet& aLists) MOZ_OVERRIDE;
|
||||
|
||||
#ifdef ACCESSIBILITY
|
||||
virtual already_AddRefed<Accessible> CreateAccessible();
|
||||
virtual already_AddRefed<Accessible> CreateAccessible() MOZ_OVERRIDE;
|
||||
#endif
|
||||
|
||||
protected:
|
||||
|
@ -6,6 +6,7 @@
|
||||
#ifndef nsGfxRadioControlFrame_h___
|
||||
#define nsGfxRadioControlFrame_h___
|
||||
|
||||
#include "mozilla/Attributes.h"
|
||||
#include "nsFormControlFrame.h"
|
||||
|
||||
#ifdef ACCESSIBILITY
|
||||
@ -28,7 +29,7 @@ public:
|
||||
|
||||
NS_IMETHOD BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||
const nsRect& aDirtyRect,
|
||||
const nsDisplayListSet& aLists);
|
||||
const nsDisplayListSet& aLists) MOZ_OVERRIDE;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -6,6 +6,7 @@
|
||||
#ifndef nsHTMLButtonControlFrame_h___
|
||||
#define nsHTMLButtonControlFrame_h___
|
||||
|
||||
#include "mozilla/Attributes.h"
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsContainerFrame.h"
|
||||
#include "nsIFormControlFrame.h"
|
||||
@ -29,54 +30,54 @@ public:
|
||||
nsHTMLButtonControlFrame(nsStyleContext* aContext);
|
||||
~nsHTMLButtonControlFrame();
|
||||
|
||||
virtual void DestroyFrom(nsIFrame* aDestructRoot);
|
||||
virtual void DestroyFrom(nsIFrame* aDestructRoot) MOZ_OVERRIDE;
|
||||
|
||||
NS_DECL_QUERYFRAME
|
||||
NS_DECL_FRAMEARENA_HELPERS
|
||||
|
||||
NS_IMETHOD BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||
const nsRect& aDirtyRect,
|
||||
const nsDisplayListSet& aLists);
|
||||
const nsDisplayListSet& aLists) MOZ_OVERRIDE;
|
||||
|
||||
virtual nscoord GetMinWidth(nsRenderingContext *aRenderingContext);
|
||||
virtual nscoord GetMinWidth(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
|
||||
|
||||
virtual nscoord GetPrefWidth(nsRenderingContext *aRenderingContext);
|
||||
virtual nscoord GetPrefWidth(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
|
||||
|
||||
NS_IMETHOD Reflow(nsPresContext* aPresContext,
|
||||
nsHTMLReflowMetrics& aDesiredSize,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus);
|
||||
nsReflowStatus& aStatus) MOZ_OVERRIDE;
|
||||
|
||||
NS_IMETHOD HandleEvent(nsPresContext* aPresContext,
|
||||
nsGUIEvent* aEvent,
|
||||
nsEventStatus* aEventStatus);
|
||||
nsEventStatus* aEventStatus) MOZ_OVERRIDE;
|
||||
|
||||
NS_IMETHOD Init(nsIContent* aContent,
|
||||
nsIFrame* aParent,
|
||||
nsIFrame* asPrevInFlow);
|
||||
nsIFrame* asPrevInFlow) MOZ_OVERRIDE;
|
||||
|
||||
virtual nsStyleContext* GetAdditionalStyleContext(int32_t aIndex) const;
|
||||
virtual void SetAdditionalStyleContext(int32_t aIndex,
|
||||
nsStyleContext* aStyleContext);
|
||||
nsStyleContext* aStyleContext) MOZ_OVERRIDE;
|
||||
|
||||
NS_IMETHOD AppendFrames(ChildListID aListID,
|
||||
nsFrameList& aFrameList);
|
||||
nsFrameList& aFrameList) MOZ_OVERRIDE;
|
||||
|
||||
NS_IMETHOD InsertFrames(ChildListID aListID,
|
||||
nsIFrame* aPrevFrame,
|
||||
nsFrameList& aFrameList);
|
||||
nsFrameList& aFrameList) MOZ_OVERRIDE;
|
||||
|
||||
NS_IMETHOD RemoveFrame(ChildListID aListID,
|
||||
nsIFrame* aOldFrame);
|
||||
nsIFrame* aOldFrame) MOZ_OVERRIDE;
|
||||
|
||||
#ifdef ACCESSIBILITY
|
||||
virtual already_AddRefed<Accessible> CreateAccessible();
|
||||
virtual already_AddRefed<Accessible> CreateAccessible() MOZ_OVERRIDE;
|
||||
#endif
|
||||
|
||||
virtual nsIAtom* GetType() const;
|
||||
virtual nsIAtom* GetType() const MOZ_OVERRIDE;
|
||||
|
||||
#ifdef DEBUG
|
||||
NS_IMETHOD GetFrameName(nsAString& aResult) const {
|
||||
NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE {
|
||||
return MakeFrameName(NS_LITERAL_STRING("HTMLButtonControl"), aResult);
|
||||
}
|
||||
#endif
|
||||
@ -85,8 +86,8 @@ public:
|
||||
|
||||
// nsIFormControlFrame
|
||||
void SetFocus(bool aOn, bool aRepaint);
|
||||
virtual nsresult SetFormProperty(nsIAtom* aName, const nsAString& aValue);
|
||||
virtual nsresult GetFormProperty(nsIAtom* aName, nsAString& aValue) const;
|
||||
virtual nsresult SetFormProperty(nsIAtom* aName, const nsAString& aValue) MOZ_OVERRIDE;
|
||||
virtual nsresult GetFormProperty(nsIAtom* aName, nsAString& aValue) const MOZ_OVERRIDE;
|
||||
|
||||
// Inserted child content gets its frames parented by our child block
|
||||
virtual nsIFrame* GetContentInsertionFrame() {
|
||||
|
@ -6,6 +6,7 @@
|
||||
#ifndef nsLegendFrame_h___
|
||||
#define nsLegendFrame_h___
|
||||
|
||||
#include "mozilla/Attributes.h"
|
||||
#include "nsBlockFrame.h"
|
||||
|
||||
class nsLegendFrame : public nsBlockFrame {
|
||||
@ -19,14 +20,14 @@ public:
|
||||
NS_IMETHOD Reflow(nsPresContext* aPresContext,
|
||||
nsHTMLReflowMetrics& aDesiredSize,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus);
|
||||
nsReflowStatus& aStatus) MOZ_OVERRIDE;
|
||||
|
||||
virtual void DestroyFrom(nsIFrame* aDestructRoot);
|
||||
virtual void DestroyFrom(nsIFrame* aDestructRoot) MOZ_OVERRIDE;
|
||||
|
||||
virtual nsIAtom* GetType() const;
|
||||
virtual nsIAtom* GetType() const MOZ_OVERRIDE;
|
||||
|
||||
#ifdef DEBUG
|
||||
NS_IMETHOD GetFrameName(nsAString& aResult) const;
|
||||
NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE;
|
||||
#endif
|
||||
|
||||
int32_t GetAlign();
|
||||
|
@ -16,6 +16,7 @@
|
||||
//#define DO_PIXELS
|
||||
#endif
|
||||
|
||||
#include "mozilla/Attributes.h"
|
||||
#include "nsGfxScrollFrame.h"
|
||||
#include "nsIFormControlFrame.h"
|
||||
#include "nsIListControlFrame.h"
|
||||
@ -53,15 +54,15 @@ public:
|
||||
nsEventStatus* aEventStatus);
|
||||
|
||||
NS_IMETHOD SetInitialChildList(ChildListID aListID,
|
||||
nsFrameList& aChildList);
|
||||
nsFrameList& aChildList) MOZ_OVERRIDE;
|
||||
|
||||
virtual nscoord GetPrefWidth(nsRenderingContext *aRenderingContext);
|
||||
virtual nscoord GetMinWidth(nsRenderingContext *aRenderingContext);
|
||||
virtual nscoord GetPrefWidth(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
|
||||
virtual nscoord GetMinWidth(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
|
||||
|
||||
NS_IMETHOD Reflow(nsPresContext* aCX,
|
||||
nsHTMLReflowMetrics& aDesiredSize,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus);
|
||||
nsReflowStatus& aStatus) MOZ_OVERRIDE;
|
||||
|
||||
NS_IMETHOD Init(nsIContent* aContent,
|
||||
nsIFrame* aParent,
|
||||
@ -70,7 +71,7 @@ public:
|
||||
NS_IMETHOD DidReflow(nsPresContext* aPresContext,
|
||||
const nsHTMLReflowState* aReflowState,
|
||||
nsDidReflowStatus aStatus);
|
||||
virtual void DestroyFrom(nsIFrame* aDestructRoot);
|
||||
virtual void DestroyFrom(nsIFrame* aDestructRoot) MOZ_OVERRIDE;
|
||||
|
||||
NS_IMETHOD BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||
const nsRect& aDirtyRect,
|
||||
@ -83,7 +84,7 @@ public:
|
||||
*
|
||||
* @see nsGkAtoms::scrollFrame
|
||||
*/
|
||||
virtual nsIAtom* GetType() const;
|
||||
virtual nsIAtom* GetType() const MOZ_OVERRIDE;
|
||||
|
||||
virtual bool IsFrameOfType(uint32_t aFlags) const
|
||||
{
|
||||
@ -93,74 +94,74 @@ public:
|
||||
|
||||
virtual void InvalidateInternal(const nsRect& aDamageRect,
|
||||
nscoord aX, nscoord aY, nsIFrame* aForChild,
|
||||
uint32_t aFlags);
|
||||
uint32_t aFlags) MOZ_OVERRIDE;
|
||||
|
||||
#ifdef DEBUG
|
||||
NS_IMETHOD GetFrameName(nsAString& aResult) const;
|
||||
NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE;
|
||||
#endif
|
||||
|
||||
// nsIFormControlFrame
|
||||
virtual nsresult SetFormProperty(nsIAtom* aName, const nsAString& aValue);
|
||||
virtual nsresult GetFormProperty(nsIAtom* aName, nsAString& aValue) const;
|
||||
virtual nsresult SetFormProperty(nsIAtom* aName, const nsAString& aValue) MOZ_OVERRIDE;
|
||||
virtual nsresult GetFormProperty(nsIAtom* aName, nsAString& aValue) const MOZ_OVERRIDE;
|
||||
virtual void SetFocus(bool aOn = true, bool aRepaint = false);
|
||||
|
||||
virtual nsGfxScrollFrameInner::ScrollbarStyles GetScrollbarStyles() const;
|
||||
virtual bool ShouldPropagateComputedHeightToScrolledContent() const;
|
||||
virtual nsGfxScrollFrameInner::ScrollbarStyles GetScrollbarStyles() const MOZ_OVERRIDE;
|
||||
virtual bool ShouldPropagateComputedHeightToScrolledContent() const MOZ_OVERRIDE;
|
||||
|
||||
// for accessibility purposes
|
||||
#ifdef ACCESSIBILITY
|
||||
virtual already_AddRefed<Accessible> CreateAccessible();
|
||||
virtual already_AddRefed<Accessible> CreateAccessible() MOZ_OVERRIDE;
|
||||
#endif
|
||||
|
||||
// nsContainerFrame
|
||||
virtual int GetSkipSides() const;
|
||||
virtual int GetSkipSides() const MOZ_OVERRIDE;
|
||||
|
||||
// nsIListControlFrame
|
||||
virtual void SetComboboxFrame(nsIFrame* aComboboxFrame);
|
||||
virtual int32_t GetSelectedIndex();
|
||||
virtual already_AddRefed<nsIContent> GetCurrentOption();
|
||||
virtual int32_t GetSelectedIndex() MOZ_OVERRIDE;
|
||||
virtual already_AddRefed<nsIContent> GetCurrentOption() MOZ_OVERRIDE;
|
||||
|
||||
/**
|
||||
* Gets the text of the currently selected item.
|
||||
* If the there are zero items then an empty string is returned
|
||||
* If there is nothing selected, then the 0th item's text is returned.
|
||||
*/
|
||||
virtual void GetOptionText(int32_t aIndex, nsAString & aStr);
|
||||
virtual void GetOptionText(int32_t aIndex, nsAString & aStr) MOZ_OVERRIDE;
|
||||
|
||||
virtual void CaptureMouseEvents(bool aGrabMouseEvents);
|
||||
virtual nscoord GetHeightOfARow();
|
||||
virtual int32_t GetNumberOfOptions();
|
||||
virtual void AboutToDropDown();
|
||||
virtual void CaptureMouseEvents(bool aGrabMouseEvents) MOZ_OVERRIDE;
|
||||
virtual nscoord GetHeightOfARow() MOZ_OVERRIDE;
|
||||
virtual int32_t GetNumberOfOptions() MOZ_OVERRIDE;
|
||||
virtual void AboutToDropDown() MOZ_OVERRIDE;
|
||||
|
||||
/**
|
||||
* @note This method might destroy |this|.
|
||||
*/
|
||||
virtual void AboutToRollup();
|
||||
virtual void AboutToRollup() MOZ_OVERRIDE;
|
||||
|
||||
/**
|
||||
* Dispatch a DOM onchange event synchroniously.
|
||||
* @note This method might destroy |this|.
|
||||
*/
|
||||
virtual void FireOnChange();
|
||||
virtual void FireOnChange() MOZ_OVERRIDE;
|
||||
|
||||
/**
|
||||
* Makes aIndex the selected option of a combobox list.
|
||||
* @note This method might destroy |this|.
|
||||
*/
|
||||
virtual void ComboboxFinish(int32_t aIndex);
|
||||
virtual void OnContentReset();
|
||||
virtual void ComboboxFinish(int32_t aIndex) MOZ_OVERRIDE;
|
||||
virtual void OnContentReset() MOZ_OVERRIDE;
|
||||
|
||||
// nsISelectControlFrame
|
||||
NS_IMETHOD AddOption(int32_t index);
|
||||
NS_IMETHOD RemoveOption(int32_t index);
|
||||
NS_IMETHOD DoneAddingChildren(bool aIsDone);
|
||||
NS_IMETHOD RemoveOption(int32_t index) MOZ_OVERRIDE;
|
||||
NS_IMETHOD DoneAddingChildren(bool aIsDone) MOZ_OVERRIDE;
|
||||
|
||||
/**
|
||||
* Gets the content (an option) by index and then set it as
|
||||
* being selected or not selected.
|
||||
*/
|
||||
NS_IMETHOD OnOptionSelected(int32_t aIndex, bool aSelected);
|
||||
NS_IMETHOD OnSetSelectedIndex(int32_t aOldIndex, int32_t aNewIndex);
|
||||
NS_IMETHOD OnOptionSelected(int32_t aIndex, bool aSelected) MOZ_OVERRIDE;
|
||||
NS_IMETHOD OnSetSelectedIndex(int32_t aOldIndex, int32_t aNewIndex) MOZ_OVERRIDE;
|
||||
|
||||
// mouse event listeners (both )
|
||||
nsresult MouseDown(nsIDOMEvent* aMouseEvent); // might destroy |this|
|
||||
|
@ -6,6 +6,7 @@
|
||||
#ifndef nsMeterFrame_h___
|
||||
#define nsMeterFrame_h___
|
||||
|
||||
#include "mozilla/Attributes.h"
|
||||
#include "nsContainerFrame.h"
|
||||
#include "nsIAnonymousContentCreator.h"
|
||||
#include "nsCOMPtr.h"
|
||||
@ -22,7 +23,7 @@ public:
|
||||
nsMeterFrame(nsStyleContext* aContext);
|
||||
virtual ~nsMeterFrame();
|
||||
|
||||
virtual void DestroyFrom(nsIFrame* aDestructRoot);
|
||||
virtual void DestroyFrom(nsIFrame* aDestructRoot) MOZ_OVERRIDE;
|
||||
|
||||
NS_IMETHOD Reflow(nsPresContext* aCX,
|
||||
nsHTMLReflowMetrics& aDesiredSize,
|
||||
@ -35,12 +36,12 @@ public:
|
||||
}
|
||||
#endif
|
||||
|
||||
virtual bool IsLeaf() const { return true; }
|
||||
virtual bool IsLeaf() const MOZ_OVERRIDE { return true; }
|
||||
|
||||
// nsIAnonymousContentCreator
|
||||
virtual nsresult CreateAnonymousContent(nsTArray<ContentInfo>& aElements);
|
||||
virtual nsresult CreateAnonymousContent(nsTArray<ContentInfo>& aElements) MOZ_OVERRIDE;
|
||||
virtual void AppendAnonymousContentTo(nsBaseContentList& aElements,
|
||||
uint32_t aFilter);
|
||||
uint32_t aFilter) MOZ_OVERRIDE;
|
||||
|
||||
NS_IMETHOD AttributeChanged(int32_t aNameSpaceID,
|
||||
nsIAtom* aAttribute,
|
||||
@ -49,7 +50,7 @@ public:
|
||||
virtual nsSize ComputeAutoSize(nsRenderingContext *aRenderingContext,
|
||||
nsSize aCBSize, nscoord aAvailableWidth,
|
||||
nsSize aMargin, nsSize aBorder,
|
||||
nsSize aPadding, bool aShrinkWrap);
|
||||
nsSize aPadding, bool aShrinkWrap) MOZ_OVERRIDE;
|
||||
|
||||
virtual nscoord GetMinWidth(nsRenderingContext *aRenderingContext);
|
||||
virtual nscoord GetPrefWidth(nsRenderingContext *aRenderingContext);
|
||||
|
@ -6,6 +6,7 @@
|
||||
#ifndef nsProgressFrame_h___
|
||||
#define nsProgressFrame_h___
|
||||
|
||||
#include "mozilla/Attributes.h"
|
||||
#include "nsContainerFrame.h"
|
||||
#include "nsIAnonymousContentCreator.h"
|
||||
#include "nsCOMPtr.h"
|
||||
@ -23,11 +24,11 @@ public:
|
||||
nsProgressFrame(nsStyleContext* aContext);
|
||||
virtual ~nsProgressFrame();
|
||||
|
||||
virtual void DestroyFrom(nsIFrame* aDestructRoot);
|
||||
virtual void DestroyFrom(nsIFrame* aDestructRoot) MOZ_OVERRIDE;
|
||||
|
||||
NS_IMETHOD BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||
const nsRect& aDirtyRect,
|
||||
const nsDisplayListSet& aLists);
|
||||
const nsDisplayListSet& aLists) MOZ_OVERRIDE;
|
||||
|
||||
NS_IMETHOD Reflow(nsPresContext* aCX,
|
||||
nsHTMLReflowMetrics& aDesiredSize,
|
||||
@ -40,12 +41,12 @@ public:
|
||||
}
|
||||
#endif
|
||||
|
||||
virtual bool IsLeaf() const { return true; }
|
||||
virtual bool IsLeaf() const MOZ_OVERRIDE { return true; }
|
||||
|
||||
// nsIAnonymousContentCreator
|
||||
virtual nsresult CreateAnonymousContent(nsTArray<ContentInfo>& aElements);
|
||||
virtual nsresult CreateAnonymousContent(nsTArray<ContentInfo>& aElements) MOZ_OVERRIDE;
|
||||
virtual void AppendAnonymousContentTo(nsBaseContentList& aElements,
|
||||
uint32_t aFilter);
|
||||
uint32_t aFilter) MOZ_OVERRIDE;
|
||||
|
||||
NS_IMETHOD AttributeChanged(int32_t aNameSpaceID,
|
||||
nsIAtom* aAttribute,
|
||||
@ -54,7 +55,7 @@ public:
|
||||
virtual nsSize ComputeAutoSize(nsRenderingContext *aRenderingContext,
|
||||
nsSize aCBSize, nscoord aAvailableWidth,
|
||||
nsSize aMargin, nsSize aBorder,
|
||||
nsSize aPadding, bool aShrinkWrap);
|
||||
nsSize aPadding, bool aShrinkWrap) MOZ_OVERRIDE;
|
||||
|
||||
virtual nscoord GetMinWidth(nsRenderingContext *aRenderingContext);
|
||||
virtual nscoord GetPrefWidth(nsRenderingContext *aRenderingContext);
|
||||
|
@ -5,6 +5,7 @@
|
||||
#ifndef nsSelectsAreaFrame_h___
|
||||
#define nsSelectsAreaFrame_h___
|
||||
|
||||
#include "mozilla/Attributes.h"
|
||||
#include "nsBlockFrame.h"
|
||||
|
||||
class nsSelectsAreaFrame : public nsBlockFrame
|
||||
@ -16,7 +17,7 @@ public:
|
||||
|
||||
NS_IMETHOD BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||
const nsRect& aDirtyRect,
|
||||
const nsDisplayListSet& aLists);
|
||||
const nsDisplayListSet& aLists) MOZ_OVERRIDE;
|
||||
|
||||
nsresult BuildDisplayListInternal(nsDisplayListBuilder* aBuilder,
|
||||
const nsRect& aDirtyRect,
|
||||
@ -25,7 +26,7 @@ public:
|
||||
NS_IMETHOD Reflow(nsPresContext* aCX,
|
||||
nsHTMLReflowMetrics& aDesiredSize,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus);
|
||||
nsReflowStatus& aStatus) MOZ_OVERRIDE;
|
||||
|
||||
nscoord HeightOfARow() const { return mHeightOfARow; }
|
||||
|
||||
|
@ -6,6 +6,7 @@
|
||||
#ifndef nsTextControlFrame_h___
|
||||
#define nsTextControlFrame_h___
|
||||
|
||||
#include "mozilla/Attributes.h"
|
||||
#include "nsContainerFrame.h"
|
||||
#include "nsBlockFrame.h"
|
||||
#include "nsIFormControlFrame.h"
|
||||
@ -45,7 +46,7 @@ public:
|
||||
nsTextControlFrame(nsIPresShell* aShell, nsStyleContext* aContext);
|
||||
virtual ~nsTextControlFrame();
|
||||
|
||||
virtual void DestroyFrom(nsIFrame* aDestructRoot);
|
||||
virtual void DestroyFrom(nsIFrame* aDestructRoot) MOZ_OVERRIDE;
|
||||
|
||||
virtual nsIScrollableFrame* GetScrollTargetFrame() {
|
||||
if (!IsScrollable())
|
||||
@ -59,7 +60,7 @@ public:
|
||||
virtual nsSize ComputeAutoSize(nsRenderingContext *aRenderingContext,
|
||||
nsSize aCBSize, nscoord aAvailableWidth,
|
||||
nsSize aMargin, nsSize aBorder,
|
||||
nsSize aPadding, bool aShrinkWrap);
|
||||
nsSize aPadding, bool aShrinkWrap) MOZ_OVERRIDE;
|
||||
|
||||
NS_IMETHOD Reflow(nsPresContext* aPresContext,
|
||||
nsHTMLReflowMetrics& aDesiredSize,
|
||||
@ -94,14 +95,14 @@ public:
|
||||
}
|
||||
|
||||
// nsIAnonymousContentCreator
|
||||
virtual nsresult CreateAnonymousContent(nsTArray<ContentInfo>& aElements);
|
||||
virtual nsresult CreateAnonymousContent(nsTArray<ContentInfo>& aElements) MOZ_OVERRIDE;
|
||||
virtual void AppendAnonymousContentTo(nsBaseContentList& aElements,
|
||||
uint32_t aFilter);
|
||||
uint32_t aFilter) MOZ_OVERRIDE;
|
||||
|
||||
// Utility methods to set current widget state
|
||||
|
||||
NS_IMETHOD SetInitialChildList(ChildListID aListID,
|
||||
nsFrameList& aChildList);
|
||||
nsFrameList& aChildList) MOZ_OVERRIDE;
|
||||
|
||||
//==== BEGIN NSIFORMCONTROLFRAME
|
||||
virtual void SetFocus(bool aOn , bool aRepaint);
|
||||
@ -113,34 +114,34 @@ public:
|
||||
|
||||
//==== NSITEXTCONTROLFRAME
|
||||
|
||||
NS_IMETHOD GetEditor(nsIEditor **aEditor);
|
||||
NS_IMETHOD GetTextLength(int32_t* aTextLength);
|
||||
NS_IMETHOD SetSelectionStart(int32_t aSelectionStart);
|
||||
NS_IMETHOD SetSelectionEnd(int32_t aSelectionEnd);
|
||||
NS_IMETHOD GetEditor(nsIEditor **aEditor) MOZ_OVERRIDE;
|
||||
NS_IMETHOD GetTextLength(int32_t* aTextLength) MOZ_OVERRIDE;
|
||||
NS_IMETHOD SetSelectionStart(int32_t aSelectionStart) MOZ_OVERRIDE;
|
||||
NS_IMETHOD SetSelectionEnd(int32_t aSelectionEnd) MOZ_OVERRIDE;
|
||||
NS_IMETHOD SetSelectionRange(int32_t aSelectionStart,
|
||||
int32_t aSelectionEnd,
|
||||
SelectionDirection aDirection = eNone);
|
||||
SelectionDirection aDirection = eNone) MOZ_OVERRIDE;
|
||||
NS_IMETHOD GetSelectionRange(int32_t* aSelectionStart,
|
||||
int32_t* aSelectionEnd,
|
||||
SelectionDirection* aDirection = nullptr);
|
||||
NS_IMETHOD GetOwnedSelectionController(nsISelectionController** aSelCon);
|
||||
virtual nsFrameSelection* GetOwnedFrameSelection();
|
||||
SelectionDirection* aDirection = nullptr) MOZ_OVERRIDE;
|
||||
NS_IMETHOD GetOwnedSelectionController(nsISelectionController** aSelCon) MOZ_OVERRIDE;
|
||||
virtual nsFrameSelection* GetOwnedFrameSelection() MOZ_OVERRIDE;
|
||||
|
||||
nsresult GetPhonetic(nsAString& aPhonetic);
|
||||
nsresult GetPhonetic(nsAString& aPhonetic) MOZ_OVERRIDE;
|
||||
|
||||
/**
|
||||
* Ensure mEditor is initialized with the proper flags and the default value.
|
||||
* @throws NS_ERROR_NOT_INITIALIZED if mEditor has not been created
|
||||
* @throws various and sundry other things
|
||||
*/
|
||||
virtual nsresult EnsureEditorInitialized();
|
||||
virtual nsresult EnsureEditorInitialized() MOZ_OVERRIDE;
|
||||
|
||||
//==== END NSITEXTCONTROLFRAME
|
||||
|
||||
//==== NSISTATEFULFRAME
|
||||
|
||||
NS_IMETHOD SaveState(SpecialStateID aStateID, nsPresState** aState);
|
||||
NS_IMETHOD RestoreState(nsPresState* aState);
|
||||
NS_IMETHOD SaveState(SpecialStateID aStateID, nsPresState** aState) MOZ_OVERRIDE;
|
||||
NS_IMETHOD RestoreState(nsPresState* aState) MOZ_OVERRIDE;
|
||||
|
||||
//=== END NSISTATEFULFRAME
|
||||
|
||||
@ -343,7 +344,7 @@ protected:
|
||||
nsSize& aIntrinsicSize,
|
||||
float aFontSizeInflation);
|
||||
|
||||
nsresult ScrollSelectionIntoView();
|
||||
nsresult ScrollSelectionIntoView() MOZ_OVERRIDE;
|
||||
|
||||
private:
|
||||
//helper methods
|
||||
|
@ -8,6 +8,7 @@
|
||||
#ifndef nsBulletFrame_h___
|
||||
#define nsBulletFrame_h___
|
||||
|
||||
#include "mozilla/Attributes.h"
|
||||
#include "nsFrame.h"
|
||||
#include "nsStyleContext.h"
|
||||
|
||||
@ -65,19 +66,19 @@ public:
|
||||
NS_IMETHOD BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||
const nsRect& aDirtyRect,
|
||||
const nsDisplayListSet& aLists);
|
||||
virtual nsIAtom* GetType() const;
|
||||
virtual void DidSetStyleContext(nsStyleContext* aOldStyleContext);
|
||||
virtual nsIAtom* GetType() const MOZ_OVERRIDE;
|
||||
virtual void DidSetStyleContext(nsStyleContext* aOldStyleContext) MOZ_OVERRIDE;
|
||||
#ifdef DEBUG
|
||||
NS_IMETHOD GetFrameName(nsAString& aResult) const;
|
||||
NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE;
|
||||
#endif
|
||||
|
||||
// nsIHTMLReflow
|
||||
NS_IMETHOD Reflow(nsPresContext* aPresContext,
|
||||
nsHTMLReflowMetrics& aMetrics,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus);
|
||||
virtual nscoord GetMinWidth(nsRenderingContext *aRenderingContext);
|
||||
virtual nscoord GetPrefWidth(nsRenderingContext *aRenderingContext);
|
||||
nsReflowStatus& aStatus) MOZ_OVERRIDE;
|
||||
virtual nscoord GetMinWidth(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
|
||||
virtual nscoord GetPrefWidth(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
|
||||
|
||||
// nsBulletFrame
|
||||
int32_t SetListItemOrdinal(int32_t aNextOrdinal, bool* aChanged,
|
||||
@ -108,8 +109,8 @@ public:
|
||||
void PaintBullet(nsRenderingContext& aRenderingContext, nsPoint aPt,
|
||||
const nsRect& aDirtyRect);
|
||||
|
||||
virtual bool IsEmpty();
|
||||
virtual bool IsSelfEmpty();
|
||||
virtual bool IsEmpty() MOZ_OVERRIDE;
|
||||
virtual bool IsSelfEmpty() MOZ_OVERRIDE;
|
||||
virtual nscoord GetBaseline() const;
|
||||
|
||||
float GetFontSizeInflation() const;
|
||||
|
@ -8,6 +8,7 @@
|
||||
#ifndef nsCanvasFrame_h___
|
||||
#define nsCanvasFrame_h___
|
||||
|
||||
#include "mozilla/Attributes.h"
|
||||
#include "nsContainerFrame.h"
|
||||
#include "nsIScrollPositionListener.h"
|
||||
#include "nsDisplayList.h"
|
||||
@ -41,21 +42,21 @@ public:
|
||||
virtual void DestroyFrom(nsIFrame* aDestructRoot);
|
||||
|
||||
NS_IMETHOD SetInitialChildList(ChildListID aListID,
|
||||
nsFrameList& aChildList);
|
||||
nsFrameList& aChildList) MOZ_OVERRIDE;
|
||||
NS_IMETHOD AppendFrames(ChildListID aListID,
|
||||
nsFrameList& aFrameList);
|
||||
nsFrameList& aFrameList) MOZ_OVERRIDE;
|
||||
NS_IMETHOD InsertFrames(ChildListID aListID,
|
||||
nsIFrame* aPrevFrame,
|
||||
nsFrameList& aFrameList);
|
||||
nsFrameList& aFrameList) MOZ_OVERRIDE;
|
||||
NS_IMETHOD RemoveFrame(ChildListID aListID,
|
||||
nsIFrame* aOldFrame);
|
||||
nsIFrame* aOldFrame) MOZ_OVERRIDE;
|
||||
|
||||
virtual nscoord GetMinWidth(nsRenderingContext *aRenderingContext);
|
||||
virtual nscoord GetPrefWidth(nsRenderingContext *aRenderingContext);
|
||||
virtual nscoord GetMinWidth(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
|
||||
virtual nscoord GetPrefWidth(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
|
||||
NS_IMETHOD Reflow(nsPresContext* aPresContext,
|
||||
nsHTMLReflowMetrics& aDesiredSize,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus);
|
||||
nsReflowStatus& aStatus) MOZ_OVERRIDE;
|
||||
virtual bool IsFrameOfType(uint32_t aFlags) const
|
||||
{
|
||||
return nsContainerFrame::IsFrameOfType(aFlags &
|
||||
@ -69,7 +70,7 @@ public:
|
||||
|
||||
NS_IMETHOD BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||
const nsRect& aDirtyRect,
|
||||
const nsDisplayListSet& aLists);
|
||||
const nsDisplayListSet& aLists) MOZ_OVERRIDE;
|
||||
|
||||
void PaintFocus(nsRenderingContext& aRenderingContext, nsPoint aPt);
|
||||
|
||||
@ -82,11 +83,11 @@ public:
|
||||
*
|
||||
* @see nsGkAtoms::canvasFrame
|
||||
*/
|
||||
virtual nsIAtom* GetType() const;
|
||||
virtual nsIAtom* GetType() const MOZ_OVERRIDE;
|
||||
|
||||
virtual nsresult StealFrame(nsPresContext* aPresContext,
|
||||
nsIFrame* aChild,
|
||||
bool aForceNormal)
|
||||
bool aForceNormal) MOZ_OVERRIDE
|
||||
{
|
||||
NS_ASSERTION(!aForceNormal, "No-one should be passing this in here");
|
||||
|
||||
@ -100,10 +101,10 @@ public:
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
NS_IMETHOD GetFrameName(nsAString& aResult) const;
|
||||
NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE;
|
||||
#endif
|
||||
NS_IMETHOD GetContentForEvent(nsEvent* aEvent,
|
||||
nsIContent** aContent);
|
||||
nsIContent** aContent) MOZ_OVERRIDE;
|
||||
|
||||
nsRect CanvasArea() const;
|
||||
|
||||
@ -131,21 +132,21 @@ public:
|
||||
|
||||
virtual bool ComputeVisibility(nsDisplayListBuilder* aBuilder,
|
||||
nsRegion* aVisibleRegion,
|
||||
const nsRect& aAllowVisibleRegionExpansion)
|
||||
const nsRect& aAllowVisibleRegionExpansion) MOZ_OVERRIDE
|
||||
{
|
||||
return NS_GET_A(mExtraBackgroundColor) > 0 ||
|
||||
nsDisplayBackground::ComputeVisibility(aBuilder, aVisibleRegion,
|
||||
aAllowVisibleRegionExpansion);
|
||||
}
|
||||
virtual nsRegion GetOpaqueRegion(nsDisplayListBuilder* aBuilder,
|
||||
bool* aSnap)
|
||||
bool* aSnap) MOZ_OVERRIDE
|
||||
{
|
||||
if (NS_GET_A(mExtraBackgroundColor) == 255) {
|
||||
return nsRegion(GetBounds(aBuilder, aSnap));
|
||||
}
|
||||
return nsDisplayBackground::GetOpaqueRegion(aBuilder, aSnap);
|
||||
}
|
||||
virtual bool IsUniform(nsDisplayListBuilder* aBuilder, nscolor* aColor)
|
||||
virtual bool IsUniform(nsDisplayListBuilder* aBuilder, nscolor* aColor) MOZ_OVERRIDE
|
||||
{
|
||||
nscolor background;
|
||||
if (!nsDisplayBackground::IsUniform(aBuilder, &background))
|
||||
@ -156,21 +157,21 @@ public:
|
||||
*aColor = mExtraBackgroundColor;
|
||||
return true;
|
||||
}
|
||||
virtual nsRect GetBounds(nsDisplayListBuilder* aBuilder, bool* aSnap)
|
||||
virtual nsRect GetBounds(nsDisplayListBuilder* aBuilder, bool* aSnap) MOZ_OVERRIDE
|
||||
{
|
||||
nsCanvasFrame* frame = static_cast<nsCanvasFrame*>(mFrame);
|
||||
*aSnap = true;
|
||||
return frame->CanvasArea() + ToReferenceFrame();
|
||||
}
|
||||
virtual void HitTest(nsDisplayListBuilder* aBuilder, const nsRect& aRect,
|
||||
HitTestState* aState, nsTArray<nsIFrame*> *aOutFrames)
|
||||
HitTestState* aState, nsTArray<nsIFrame*> *aOutFrames) MOZ_OVERRIDE
|
||||
{
|
||||
// We need to override so we don't consider border-radius.
|
||||
aOutFrames->AppendElement(mFrame);
|
||||
}
|
||||
|
||||
virtual void Paint(nsDisplayListBuilder* aBuilder,
|
||||
nsRenderingContext* aCtx);
|
||||
nsRenderingContext* aCtx) MOZ_OVERRIDE;
|
||||
|
||||
void SetExtraBackgroundColor(nscolor aColor)
|
||||
{
|
||||
|
@ -8,6 +8,7 @@
|
||||
#ifndef nsContainerFrame_h___
|
||||
#define nsContainerFrame_h___
|
||||
|
||||
#include "mozilla/Attributes.h"
|
||||
#include "nsSplittableFrame.h"
|
||||
#include "nsFrameList.h"
|
||||
#include "nsLayoutUtils.h"
|
||||
@ -53,27 +54,27 @@ public:
|
||||
nsIFrame* aParent,
|
||||
nsIFrame* aPrevInFlow);
|
||||
NS_IMETHOD SetInitialChildList(ChildListID aListID,
|
||||
nsFrameList& aChildList);
|
||||
nsFrameList& aChildList) MOZ_OVERRIDE;
|
||||
NS_IMETHOD AppendFrames(ChildListID aListID,
|
||||
nsFrameList& aFrameList);
|
||||
NS_IMETHOD InsertFrames(ChildListID aListID,
|
||||
nsIFrame* aPrevFrame,
|
||||
nsFrameList& aFrameList);
|
||||
NS_IMETHOD RemoveFrame(ChildListID aListID,
|
||||
nsIFrame* aOldFrame);
|
||||
nsIFrame* aOldFrame) MOZ_OVERRIDE;
|
||||
|
||||
virtual const nsFrameList& GetChildList(ChildListID aList) const;
|
||||
virtual void GetChildLists(nsTArray<ChildList>* aLists) const;
|
||||
virtual void DestroyFrom(nsIFrame* aDestructRoot);
|
||||
virtual void ChildIsDirty(nsIFrame* aChild);
|
||||
virtual const nsFrameList& GetChildList(ChildListID aList) const MOZ_OVERRIDE;
|
||||
virtual void GetChildLists(nsTArray<ChildList>* aLists) const MOZ_OVERRIDE;
|
||||
virtual void DestroyFrom(nsIFrame* aDestructRoot) MOZ_OVERRIDE;
|
||||
virtual void ChildIsDirty(nsIFrame* aChild) MOZ_OVERRIDE;
|
||||
|
||||
virtual bool IsLeaf() const;
|
||||
virtual bool PeekOffsetNoAmount(bool aForward, int32_t* aOffset);
|
||||
virtual bool PeekOffsetNoAmount(bool aForward, int32_t* aOffset) MOZ_OVERRIDE;
|
||||
virtual bool PeekOffsetCharacter(bool aForward, int32_t* aOffset,
|
||||
bool aRespectClusters = true);
|
||||
bool aRespectClusters = true) MOZ_OVERRIDE;
|
||||
|
||||
#ifdef DEBUG
|
||||
NS_IMETHOD List(FILE* out, int32_t aIndent) const;
|
||||
NS_IMETHOD List(FILE* out, int32_t aIndent) const MOZ_OVERRIDE;
|
||||
#endif
|
||||
|
||||
// nsContainerFrame methods
|
||||
@ -182,7 +183,7 @@ public:
|
||||
virtual nsSize ComputeAutoSize(nsRenderingContext *aRenderingContext,
|
||||
nsSize aCBSize, nscoord aAvailableWidth,
|
||||
nsSize aMargin, nsSize aBorder,
|
||||
nsSize aPadding, bool aShrinkWrap);
|
||||
nsSize aPadding, bool aShrinkWrap) MOZ_OVERRIDE;
|
||||
|
||||
/**
|
||||
* Invokes the WillReflow() function, positions the frame and its view (if
|
||||
|
@ -8,6 +8,7 @@
|
||||
|
||||
/* rendering object for CSS :first-letter pseudo-element */
|
||||
|
||||
#include "mozilla/Attributes.h"
|
||||
#include "nsContainerFrame.h"
|
||||
|
||||
class nsFirstLetterFrame : public nsContainerFrame {
|
||||
@ -20,17 +21,17 @@ public:
|
||||
|
||||
NS_IMETHOD BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||
const nsRect& aDirtyRect,
|
||||
const nsDisplayListSet& aLists);
|
||||
const nsDisplayListSet& aLists) MOZ_OVERRIDE;
|
||||
|
||||
NS_IMETHOD Init(nsIContent* aContent,
|
||||
nsIFrame* aParent,
|
||||
nsIFrame* aPrevInFlow);
|
||||
nsIFrame* aPrevInFlow) MOZ_OVERRIDE;
|
||||
NS_IMETHOD SetInitialChildList(ChildListID aListID,
|
||||
nsFrameList& aChildList);
|
||||
nsFrameList& aChildList) MOZ_OVERRIDE;
|
||||
#ifdef DEBUG
|
||||
NS_IMETHOD GetFrameName(nsAString& aResult) const;
|
||||
NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE;
|
||||
#endif
|
||||
virtual nsIAtom* GetType() const;
|
||||
virtual nsIAtom* GetType() const MOZ_OVERRIDE;
|
||||
|
||||
bool IsFloating() const { return GetStateBits() & NS_FRAME_OUT_OF_FLOW; }
|
||||
|
||||
@ -42,12 +43,12 @@ public:
|
||||
~(nsIFrame::eBidiInlineContainer));
|
||||
}
|
||||
|
||||
virtual nscoord GetMinWidth(nsRenderingContext *aRenderingContext);
|
||||
virtual nscoord GetPrefWidth(nsRenderingContext *aRenderingContext);
|
||||
virtual nscoord GetMinWidth(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
|
||||
virtual nscoord GetPrefWidth(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
|
||||
virtual void AddInlineMinWidth(nsRenderingContext *aRenderingContext,
|
||||
InlineMinWidthData *aData);
|
||||
InlineMinWidthData *aData) MOZ_OVERRIDE;
|
||||
virtual void AddInlinePrefWidth(nsRenderingContext *aRenderingContext,
|
||||
InlinePrefWidthData *aData);
|
||||
InlinePrefWidthData *aData) MOZ_OVERRIDE;
|
||||
virtual nsSize ComputeSize(nsRenderingContext *aRenderingContext,
|
||||
nsSize aCBSize, nscoord aAvailableWidth,
|
||||
nsSize aMargin, nsSize aBorder, nsSize aPadding,
|
||||
@ -55,16 +56,16 @@ public:
|
||||
NS_IMETHOD Reflow(nsPresContext* aPresContext,
|
||||
nsHTMLReflowMetrics& aDesiredSize,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus);
|
||||
nsReflowStatus& aStatus) MOZ_OVERRIDE;
|
||||
|
||||
virtual bool CanContinueTextRun() const;
|
||||
virtual bool CanContinueTextRun() const MOZ_OVERRIDE;
|
||||
virtual nscoord GetBaseline() const;
|
||||
|
||||
//override of nsFrame method
|
||||
NS_IMETHOD GetChildFrameContainingOffset(int32_t inContentOffset,
|
||||
bool inHint,
|
||||
int32_t* outFrameContentOffset,
|
||||
nsIFrame **outChildFrame);
|
||||
nsIFrame **outChildFrame) MOZ_OVERRIDE;
|
||||
|
||||
nscoord GetFirstLetterBaseline() const { return mBaseline; }
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user