Merge mozilla-central to autoland. a=merge CLOSED TREE

This commit is contained in:
Bogdan Tara 2018-11-16 11:50:21 +02:00
commit df744acb24
41 changed files with 696 additions and 198 deletions

View File

@ -104,6 +104,7 @@ function setPrefDefaults() {
Services.prefs.setBoolPref("devtools.performance.ui.show-platform-data", true);
Services.prefs.setBoolPref("devtools.inspector.showAllAnonymousContent", true);
Services.prefs.setBoolPref("browser.dom.window.dump.enabled", true);
Services.prefs.setBoolPref("devtools.console.stdout.chrome", true);
Services.prefs.setBoolPref("devtools.command-button-noautohide.enabled", true);
// Bug 1225160 - Using source maps with browser debugging can lead to a crash
Services.prefs.setBoolPref("devtools.debugger.source-maps-enabled", false);

View File

@ -29,6 +29,8 @@ You can change the value of these preferences by going to `about:config`:
| Preference name | Value | Comments |
| --------------- | --------------- | -------- |
| `browser.dom.window.dump.enabled` | `true` | Adds global `dump` function to log strings to `stdout` |
| `devtools.console.stdout.chrome` | `true` | Allows console API to write to `stdout` when used by chrome content |
| `devtools.console.stdout.content` | `true` | Allows console API to write to `stdout` when used by content |
| `devtools.debugger.log` (*) | `true` | Dump packets sent over remote debugging protocol to `stdout`.<br /><br />The [remote protocol inspector add-on](https://github.com/firebug/rdp-inspector/wiki) might be useful too. |
| `devtools.dump.emit` (*) | `true` | Log event notifications from the EventEmitter class<br />(found at `devtools/shared/event-emitter.js`). |

View File

@ -243,12 +243,15 @@ ReplayDebugger.prototype = {
// Object methods
/////////////////////////////////////////////////////////
_getObject(id) {
// Objects which |forConsole| is set are objects that were logged in console
// messages, and had their properties recorded so that they can be inspected
// without switching to a replaying child.
_getObject(id, forConsole) {
if (id && !this._objects[id]) {
const data = this._sendRequest({ type: "getObject", id });
switch (data.kind) {
case "Object":
this._objects[id] = new ReplayDebuggerObject(this, data);
this._objects[id] = new ReplayDebuggerObject(this, data, forConsole);
break;
case "Environment":
this._objects[id] = new ReplayDebuggerEnvironment(this, data);
@ -257,13 +260,17 @@ ReplayDebugger.prototype = {
ThrowError("Unknown object kind");
}
}
return this._objects[id];
const rv = this._objects[id];
if (forConsole) {
rv._forConsole = true;
}
return rv;
},
_convertValue(value) {
if (value && typeof value == "object") {
_convertValue(value, forConsole) {
if (isNonNullObject(value)) {
if (value.object) {
return this._getObject(value.object);
return this._getObject(value.object, forConsole);
} else if (value.special == "undefined") {
return undefined;
} else if (value.special == "NaN") {
@ -332,7 +339,8 @@ ReplayDebugger.prototype = {
// other contents of the message can be left alone.
if (message.messageType == "ConsoleAPI" && message.arguments) {
for (let i = 0; i < message.arguments.length; i++) {
message.arguments[i] = this._convertValue(message.arguments[i]);
message.arguments[i] = this._convertValue(message.arguments[i],
/* forConsole = */ true);
}
}
return message;
@ -497,7 +505,7 @@ function ReplayDebuggerFrame(dbg, data) {
this._data = data;
if (this._data.arguments) {
this._data.arguments =
this._data.arguments.map(this._dbg._convertValue.bind(this._dbg));
this._data.arguments.map(a => this._dbg._convertValue(a));
}
}
@ -606,9 +614,10 @@ ReplayDebuggerFrame.prototype = {
// ReplayDebuggerObject
///////////////////////////////////////////////////////////////////////////////
function ReplayDebuggerObject(dbg, data) {
function ReplayDebuggerObject(dbg, data, forConsole) {
this._dbg = dbg;
this._data = data;
this._forConsole = forConsole;
this._properties = null;
}
@ -623,7 +632,6 @@ ReplayDebuggerObject.prototype = {
get isArrowFunction() { return this._data.isArrowFunction; },
get isGeneratorFunction() { return this._data.isGeneratorFunction; },
get isAsyncFunction() { return this._data.isAsyncFunction; },
get proto() { return this._dbg._getObject(this._data.proto); },
get class() { return this._data.class; },
get name() { return this._data.name; },
get displayName() { return this._data.displayName; },
@ -641,6 +649,13 @@ ReplayDebuggerObject.prototype = {
isFrozen() { return this._data.isFrozen; },
unwrap() { return this.isProxy ? NYI() : this; },
get proto() {
// Don't allow inspection of the prototypes of objects logged to the
// console. This is a hack that prevents the object inspector from crawling
// the object's prototype chain.
return this._forConsole ? null : this._dbg._getObject(this._data.proto);
},
unsafeDereference() {
// Direct access to the referent is not currently available.
return null;
@ -664,10 +679,10 @@ ReplayDebuggerObject.prototype = {
_ensureProperties() {
if (!this._properties) {
const properties = this._dbg._sendRequestAllowDiverge({
type: "getObjectProperties",
id: this._data.id,
});
const id = this._data.id;
const properties = this._forConsole
? this._dbg._sendRequest({ type: "getObjectPropertiesForConsole", id })
: this._dbg._sendRequestAllowDiverge({ type: "getObjectProperties", id });
this._properties = {};
properties.forEach(({name, desc}) => { this._properties[name] = desc; });
}
@ -791,4 +806,8 @@ function assert(v) {
}
}
function isNonNullObject(obj) {
return obj && (typeof obj == "object" || typeof obj == "function");
}
module.exports = ReplayDebugger;

View File

@ -116,6 +116,10 @@ function scriptFrameForIndex(index) {
return frame;
}
function isNonNullObject(obj) {
return obj && (typeof obj == "object" || typeof obj == "function");
}
///////////////////////////////////////////////////////////////////////////////
// Persistent Script State
///////////////////////////////////////////////////////////////////////////////
@ -179,6 +183,26 @@ dbg.onNewScript = function(script) {
installPendingHandlers();
};
const gConsoleObjectProperties = new Map();
function shouldSaveConsoleProperty({ desc }) {
// When logging an object to the console, only properties captured here will
// be shown. We limit this to non-object data properties, as more complex
// properties have two problems: A) to inspect them we will need to switch to
// a replaying child process, which is very slow when there are many console
// messages, and B) trying to access objects transitively referred to by
// logged console objects will fail when unpaused, and depends on the current
// state of the process otherwise.
return "value" in desc && !isNonNullObject(desc.value);
}
function saveConsoleObjectProperties(obj) {
if (obj instanceof Debugger.Object) {
const properties = getObjectProperties(obj).filter(shouldSaveConsoleProperty);
gConsoleObjectProperties.set(obj, properties);
}
}
///////////////////////////////////////////////////////////////////////////////
// Console Message State
///////////////////////////////////////////////////////////////////////////////
@ -250,6 +274,7 @@ Services.obs.addObserver({
// Message arguments are preserved as debuggee values.
if (apiMessage.arguments) {
contents.arguments = apiMessage.arguments.map(makeDebuggeeValue);
contents.arguments.forEach(saveConsoleObjectProperties);
}
newConsoleMessage("ConsoleAPI", null, contents);
@ -465,7 +490,7 @@ function convertCompletionValue(value) {
}
function makeDebuggeeValue(value) {
if (value && typeof value == "object") {
if (isNonNullObject(value)) {
assert(!(value instanceof Debugger.Object));
const global = Cu.getGlobalForObject(value);
const dbgGlobal = dbg.makeGlobalObjectReference(global);
@ -517,6 +542,24 @@ function forwardToScript(name) {
return request => gScripts.getObject(request.id)[name](request.value);
}
function getObjectProperties(object) {
const names = object.getOwnPropertyNames();
return names.map(name => {
const desc = object.getOwnPropertyDescriptor(name);
if ("value" in desc) {
desc.value = convertValue(desc.value);
}
if ("get" in desc) {
desc.get = getObjectId(desc.get);
}
if ("set" in desc) {
desc.set = getObjectId(desc.set);
}
return { name, desc };
});
}
///////////////////////////////////////////////////////////////////////////////
// Handlers
///////////////////////////////////////////////////////////////////////////////
@ -626,21 +669,16 @@ const gRequestHandlers = {
}
const object = gPausedObjects.getObject(request.id);
const names = object.getOwnPropertyNames();
return getObjectProperties(object);
},
return names.map(name => {
const desc = object.getOwnPropertyDescriptor(name);
if ("value" in desc) {
desc.value = convertValue(desc.value);
}
if ("get" in desc) {
desc.get = getObjectId(desc.get);
}
if ("set" in desc) {
desc.set = getObjectId(desc.set);
}
return { name, desc };
});
getObjectPropertiesForConsole(request) {
const object = gPausedObjects.getObject(request.id);
const properties = gConsoleObjectProperties.get(object);
if (!properties) {
throw new Error("Console object properties not saved");
}
return properties;
},
getEnvironmentNames(request) {

View File

@ -545,10 +545,20 @@ const ThreadActor = ActorClassWithSpec(threadSpec, {
if (steppingType == "finish") {
const parentFrame = thread._getNextStepFrame(this);
if (parentFrame && parentFrame.script) {
// We can't use the completion value in stepping hooks if we're
// replaying, as we can't use its contents after resuming.
const ncompletion = thread.dbg.replaying ? null : completion;
const { onStep, onPop } = thread._makeSteppingHooks(
originalLocation, "next", false, completion
originalLocation, "next", false, ncompletion
);
parentFrame.onStep = onStep;
if (thread.dbg.replaying) {
const offsets =
thread._findReplayingStepOffsets(originalLocation, parentFrame,
/* rewinding = */ false);
parentFrame.setReplayingOnStep(onStep, offsets);
} else {
parentFrame.onStep = onStep;
}
// We need the onPop alongside the onStep because it is possible that
// the parent frame won't have any steppable offsets, and we want to
// make sure that we always pause in the parent _somewhere_.

View File

@ -484,6 +484,15 @@ WebGLContext::CreateAndInitGL(bool forceEnabled,
return false;
}
// WebGL can't be used when recording/replaying.
if (recordreplay::IsRecordingOrReplaying()) {
FailureReason reason;
reason.info = "Can't use WebGL when recording or replaying (https://bugzil.la/1506467).";
out_failReasons->push_back(reason);
GenerateWarning("%s", reason.info.BeginReading());
return false;
}
// WebGL2 is separately blocked:
if (IsWebGL2()) {
const nsCOMPtr<nsIGfxInfo> gfxInfo = services::GetGfxInfo();

View File

@ -1093,7 +1093,9 @@ Console::Console(JSContext* aCx, nsIGlobalObject* aGlobal,
{
// Let's enable the dumping to stdout by default for chrome.
if (nsContentUtils::ThreadsafeIsSystemCaller(aCx)) {
mDumpToStdout = DOMPrefs::DumpEnabled();
mDumpToStdout = StaticPrefs::devtools_console_stdout_chrome();
} else {
mDumpToStdout = StaticPrefs::devtools_console_stdout_content();
}
mozilla::HoldJSObjects(this);

View File

@ -0,0 +1,23 @@
<html id='a'>
<script>
window.onload=function() {
b.src=document.getElementById('c').innerHTML;
b.setAttribute('src', 'data:audio/mpeg,');
document.documentElement.style.display='none';
window.top.open('');
var o = window.frames[0].document.body.childNodes[0];
document.getElementById('d').appendChild(o.parentNode.removeChild(o));
o = document.getElementById('a');
var p = o.parentNode;
o.setAttribute('id', 0)
p.removeChild(o);
p.appendChild(o);
o.setAttribute('style', 0)
p.removeChild(o);
p.appendChild(o);
}
</script>
<iframe id='b'></iframe>
<object id='c'>
<ruby id='d'>
</html>

View File

@ -24,3 +24,4 @@ pref(browser.link.open_newwindow,2) load 1429507_1.html # window.open() in tab d
pref(browser.link.open_newwindow,2) load 1429507_2.html # window.open() in tab doesn't work for crashtest in e10s, this opens a new window instead
load 1453030.html
skip-if(Android) load 1490700.html # No screenshare on Android
load 1505957.html

View File

@ -1,3 +1,4 @@
pref("toolkit.defaultChromeURI", "chrome://mybrowser/content/hello.xul");
pref("browser.dom.window.dump.enabled", true);
pref("devtools.console.stdout.chrome", true);
pref("dom.max_script_run_time", 0);

View File

@ -16,6 +16,7 @@
#include "mozilla/gfx/BaseSize.h" // for BaseSize
#include "mozilla/gfx/Logging.h" // for gfxCriticalError
#include "mozilla/layers/ISurfaceAllocator.h"
#include "mozilla/webrender/WebRenderAPI.h"
#include "nsRegion.h" // for nsIntRegion
#include "AndroidSurfaceTexture.h"
#include "GfxTexturesReporter.h" // for GfxTexturesReporter
@ -26,6 +27,10 @@
#include "mozilla/layers/MacIOSurfaceTextureHostOGL.h"
#endif
#ifdef MOZ_WIDGET_ANDROID
#include "mozilla/webrender/RenderAndroidSurfaceTextureHostOGL.h"
#endif
using namespace mozilla::gl;
using namespace mozilla::gfx;
@ -678,6 +683,66 @@ SurfaceTextureHost::DeallocateDeviceData()
}
}
void
SurfaceTextureHost::CreateRenderTexture(const wr::ExternalImageId& aExternalImageId)
{
RefPtr<wr::RenderTextureHost> texture =
new wr::RenderAndroidSurfaceTextureHostOGL(mSurfTex, mSize, mFormat, mContinuousUpdate);
wr::RenderThread::Get()->RegisterExternalImage(wr::AsUint64(aExternalImageId), texture.forget());
}
void
SurfaceTextureHost::PushResourceUpdates(wr::TransactionBuilder& aResources,
ResourceUpdateOp aOp,
const Range<wr::ImageKey>& aImageKeys,
const wr::ExternalImageId& aExtID)
{
auto method = aOp == TextureHost::ADD_IMAGE ? &wr::TransactionBuilder::AddExternalImage
: &wr::TransactionBuilder::UpdateExternalImage;
auto bufferType = wr::WrExternalImageBufferType::TextureRectHandle;
switch (GetFormat()) {
case gfx::SurfaceFormat::R8G8B8X8:
case gfx::SurfaceFormat::R8G8B8A8: {
MOZ_ASSERT(aImageKeys.length() == 1);
// XXX Add RGBA handling. Temporary hack to avoid crash
// With BGRA format setting, rendering works without problem.
auto format = GetFormat() == gfx::SurfaceFormat::R8G8B8A8 ? gfx::SurfaceFormat::B8G8R8A8
: gfx::SurfaceFormat::B8G8R8X8;
wr::ImageDescriptor descriptor(GetSize(), format);
(aResources.*method)(aImageKeys[0], descriptor, aExtID, bufferType, 0);
break;
}
default: {
MOZ_ASSERT_UNREACHABLE("unexpected to be called");
}
}
}
void
SurfaceTextureHost::PushDisplayItems(wr::DisplayListBuilder& aBuilder,
const wr::LayoutRect& aBounds,
const wr::LayoutRect& aClip,
wr::ImageRendering aFilter,
const Range<wr::ImageKey>& aImageKeys)
{
switch (GetFormat()) {
case gfx::SurfaceFormat::R8G8B8X8:
case gfx::SurfaceFormat::R8G8B8A8:
case gfx::SurfaceFormat::B8G8R8A8:
case gfx::SurfaceFormat::B8G8R8X8: {
MOZ_ASSERT(aImageKeys.length() == 1);
aBuilder.PushImage(aBounds, aClip, true, aFilter, aImageKeys[0], !(mFlags & TextureFlags::NON_PREMULTIPLIED));
break;
}
default: {
MOZ_ASSERT_UNREACHABLE("unexpected to be called");
}
}
}
#endif // MOZ_WIDGET_ANDROID
////////////////////////////////////////////////////////////////////////

View File

@ -26,6 +26,7 @@
#include "mozilla/layers/LayersSurfaces.h" // for SurfaceDescriptor
#include "mozilla/layers/TextureHost.h" // for TextureHost, etc
#include "mozilla/mozalloc.h" // for operator delete, etc
#include "mozilla/webrender/RenderThread.h"
#include "nsCOMPtr.h" // for already_AddRefed
#include "nsDebug.h" // for NS_WARNING
#include "nsISupportsImpl.h" // for TextureImage::Release, etc
@ -474,6 +475,19 @@ public:
virtual const char* Name() override { return "SurfaceTextureHost"; }
virtual void CreateRenderTexture(const wr::ExternalImageId& aExternalImageId) override;
virtual void PushResourceUpdates(wr::TransactionBuilder& aResources,
ResourceUpdateOp aOp,
const Range<wr::ImageKey>& aImageKeys,
const wr::ExternalImageId& aExtID) override;
virtual void PushDisplayItems(wr::DisplayListBuilder& aBuilder,
const wr::LayoutRect& aBounds,
const wr::LayoutRect& aClip,
wr::ImageRendering aFilter,
const Range<wr::ImageKey>& aImageKeys) override;
protected:
bool EnsureAttached();

View File

@ -0,0 +1,120 @@
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
/* 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/. */
#include "RenderAndroidSurfaceTextureHostOGL.h"
#include "mozilla/gfx/Logging.h"
namespace mozilla {
namespace wr {
RenderAndroidSurfaceTextureHostOGL::RenderAndroidSurfaceTextureHostOGL(
const java::GeckoSurfaceTexture::GlobalRef& aSurfTex,
gfx::IntSize aSize,
gfx::SurfaceFormat aFormat,
bool aContinuousUpdate)
: mSurfTex(aSurfTex)
, mSize(aSize)
{
MOZ_COUNT_CTOR_INHERITED(RenderAndroidSurfaceTextureHostOGL, RenderTextureHostOGL);
if (mSurfTex) {
mSurfTex->IncrementUse();
}
}
RenderAndroidSurfaceTextureHostOGL::~RenderAndroidSurfaceTextureHostOGL()
{
MOZ_COUNT_DTOR_INHERITED(RenderAndroidSurfaceTextureHostOGL, RenderTextureHostOGL);
DeleteTextureHandle();
if (mSurfTex) {
mSurfTex->DecrementUse();
}
}
GLuint
RenderAndroidSurfaceTextureHostOGL::GetGLHandle(uint8_t aChannelIndex) const
{
if (!mSurfTex) {
return 0;
}
return mSurfTex->GetTexName();
}
gfx::IntSize
RenderAndroidSurfaceTextureHostOGL::GetSize(uint8_t aChannelIndex) const
{
return mSize;
}
wr::WrExternalImage
RenderAndroidSurfaceTextureHostOGL::Lock(uint8_t aChannelIndex,
gl::GLContext* aGL,
wr::ImageRendering aRendering)
{
MOZ_ASSERT(aChannelIndex == 0);
if (mGL.get() != aGL) {
// release the texture handle in the previous gl context
DeleteTextureHandle();
mGL = aGL;
mGL->MakeCurrent();
}
if (!mSurfTex || !mGL || !mGL->MakeCurrent()) {
return InvalidToWrExternalImage();
}
if (!mSurfTex->IsAttachedToGLContext((int64_t)mGL.get())) {
GLuint texName;
mGL->fGenTextures(1, &texName);
// Cache rendering filter.
mCachedRendering = aRendering;
ActivateBindAndTexParameteri(mGL,
LOCAL_GL_TEXTURE0,
LOCAL_GL_TEXTURE_EXTERNAL_OES,
texName,
aRendering);
if (NS_FAILED(mSurfTex->AttachToGLContext((int64_t)mGL.get(), texName))) {
MOZ_ASSERT(0);
mGL->fDeleteTextures(1, &texName);
return InvalidToWrExternalImage();;
}
} else if(IsFilterUpdateNecessary(aRendering)) {
// Cache new rendering filter.
mCachedRendering = aRendering;
ActivateBindAndTexParameteri(mGL,
LOCAL_GL_TEXTURE0,
LOCAL_GL_TEXTURE_EXTERNAL_OES,
mSurfTex->GetTexName(),
aRendering);
}
// XXX Call UpdateTexImage() only when it is necessary.
// For now, alyways call UpdateTexImage().
//if (mContinuousUpdate) {
mSurfTex->UpdateTexImage();
//}
return NativeTextureToWrExternalImage(mSurfTex->GetTexName(), 0, 0,
mSize.width, mSize.height);
}
void
RenderAndroidSurfaceTextureHostOGL::Unlock()
{
}
void
RenderAndroidSurfaceTextureHostOGL::DeleteTextureHandle()
{
// XXX Do we need to call mSurfTex->DetachFromGLContext() here?
// But Surface texture is shared among many SurfaceTextureHosts.
}
} // namespace wr
} // namespace mozilla

View File

@ -0,0 +1,49 @@
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
/* 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/. */
#ifndef MOZILLA_GFX_RENDERANDROIDSURFACETEXTUREHOSTOGL_H
#define MOZILLA_GFX_RENDERANDROIDSURFACETEXTUREHOSTOGL_H
#include "GeneratedJNIWrappers.h"
#include "mozilla/layers/TextureHostOGL.h"
#include "RenderTextureHostOGL.h"
namespace mozilla {
namespace wr {
class RenderAndroidSurfaceTextureHostOGL final : public RenderTextureHostOGL
{
public:
explicit RenderAndroidSurfaceTextureHostOGL(const java::GeckoSurfaceTexture::GlobalRef& aSurfTex,
gfx::IntSize aSize,
gfx::SurfaceFormat aFormat,
bool aContinuousUpdate);
wr::WrExternalImage Lock(uint8_t aChannelIndex,
gl::GLContext* aGL,
wr::ImageRendering aRendering) override;
void Unlock() override;
virtual gfx::IntSize GetSize(uint8_t aChannelIndex) const override;
virtual GLuint GetGLHandle(uint8_t aChannelIndex) const override;
private:
virtual ~RenderAndroidSurfaceTextureHostOGL();
void DeleteTextureHandle();
const mozilla::java::GeckoSurfaceTexture::GlobalRef mSurfTex;
const gfx::IntSize mSize;
// XXX const bool mContinuousUpdate;
// XXX const bool mIgnoreTransform;
RefPtr<gl::GLContext> mGL;
};
} // namespace wr
} // namespace mozilla
#endif // MOZILLA_GFX_RENDERANDROIDSURFACETEXTUREHOSTOGL_H

View File

@ -46,6 +46,14 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
'RenderMacIOSurfaceTextureHostOGL.cpp',
]
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android':
EXPORTS.mozilla.webrender += [
'RenderAndroidSurfaceTextureHostOGL.h',
]
UNIFIED_SOURCES += [
'RenderAndroidSurfaceTextureHostOGL.cpp',
]
if CONFIG['MOZ_ENABLE_D3D10_LAYER']:
DEFINES['MOZ_ENABLE_D3D10_LAYER'] = True
EXPORTS.mozilla.webrender += [

View File

@ -1,5 +1,6 @@
user_pref("app.update.disabledForTesting", true);
user_pref("browser.dom.window.dump.enabled", true);
user_pref("devtools.console.stdout.chrome", true);
user_pref("browser.sessionstore.resume_from_crash", false);
user_pref("browser.shell.checkDefaultBrowser", false);
user_pref("browser.xul.error_pages.enabled", true);

View File

@ -1291,6 +1291,7 @@ XRE_XPCShellMain(int argc, char** argv, char** envp,
// xpc::ErrorReport::LogToConsoleWithStack needs this to print errors
// to stderr.
Preferences::SetBool("browser.dom.window.dump.enabled", true);
Preferences::SetBool("devtools.console.stdout.chrome", true);
AutoJSAPI jsapi;
jsapi.Init();

View File

@ -6400,6 +6400,14 @@ PresShell::Paint(nsView* aViewToPaint,
// We can paint directly into the widget using its layer manager.
nsLayoutUtils::PaintFrame(nullptr, frame, aDirtyRegion, bgcolor,
nsDisplayListBuilderMode::PAINTING, flags);
// When recording/replaying, create a checkpoint after every paint. This
// can cause content JS to run, so reset |nojs|.
if (recordreplay::IsRecordingOrReplaying()) {
nojs.reset();
recordreplay::child::CreateCheckpoint();
}
return;
}

View File

@ -30,7 +30,9 @@
#include "nsAccessibilityService.h"
#endif
#define LONG_SIDE_TO_SHORT_SIDE_RATIO 10
// Our intrinsic size is 12em in the main-axis and 1.3em in the cross-axis.
#define MAIN_AXIS_EM_SIZE 12
#define CROSS_AXIS_EM_SIZE 1.3f
using namespace mozilla;
using namespace mozilla::dom;
@ -774,61 +776,34 @@ nsRangeFrame::ComputeAutoSize(gfxContext* aRenderingContext,
const LogicalSize& aPadding,
ComputeSizeFlags aFlags)
{
nscoord oneEm = NSToCoordRound(StyleFont()->mFont.size *
nsLayoutUtils::FontSizeInflationFor(this)); // 1em
bool isInlineOriented = IsInlineOriented();
auto em = StyleFont()->mFont.size * nsLayoutUtils::FontSizeInflationFor(this);
const WritingMode wm = GetWritingMode();
LogicalSize autoSize(wm);
// nsFrame::ComputeSize calls GetMinimumWidgetSize to prevent us from being
// given too small a size when we're natively themed. If we're themed, we set
// our "thickness" dimension to zero below and rely on that
// GetMinimumWidgetSize check to correct that dimension to the natural
// thickness of a slider in the current theme.
if (isInlineOriented) {
autoSize.ISize(wm) = LONG_SIDE_TO_SHORT_SIDE_RATIO * oneEm;
autoSize.BSize(wm) = IsThemed() ? 0 : oneEm;
autoSize.ISize(wm) = NSToCoordRound(MAIN_AXIS_EM_SIZE * em);
autoSize.BSize(wm) = NSToCoordRound(CROSS_AXIS_EM_SIZE * em);
} else {
autoSize.ISize(wm) = IsThemed() ? 0 : oneEm;
autoSize.BSize(wm) = LONG_SIDE_TO_SHORT_SIDE_RATIO * oneEm;
autoSize.ISize(wm) = NSToCoordRound(CROSS_AXIS_EM_SIZE * em);
autoSize.BSize(wm) = NSToCoordRound(MAIN_AXIS_EM_SIZE * em);
}
return autoSize.ConvertTo(aWM, wm);
}
nscoord
nsRangeFrame::GetMinISize(gfxContext *aRenderingContext)
nsRangeFrame::GetMinISize(gfxContext* aRenderingContext)
{
// nsFrame::ComputeSize calls GetMinimumWidgetSize to prevent us from being
// given too small a size when we're natively themed. If we aren't native
// themed, we don't mind how small we're sized.
return nscoord(0);
}
nscoord
nsRangeFrame::GetPrefISize(gfxContext *aRenderingContext)
nsRangeFrame::GetPrefISize(gfxContext* aRenderingContext)
{
bool isInline = IsInlineOriented();
if (!isInline && IsThemed()) {
// nsFrame::ComputeSize calls GetMinimumWidgetSize to prevent us from being
// given too small a size when we're natively themed. We return zero and
// depend on that correction to get our "natural" width when we're a
// vertical slider.
return 0;
}
nscoord prefISize = NSToCoordRound(StyleFont()->mFont.size *
nsLayoutUtils::FontSizeInflationFor(this)); // 1em
if (isInline) {
prefISize *= LONG_SIDE_TO_SHORT_SIDE_RATIO;
}
return prefISize;
auto em = StyleFont()->mFont.size * nsLayoutUtils::FontSizeInflationFor(this);
return NSToCoordRound(em * (isInline ? MAIN_AXIS_EM_SIZE : CROSS_AXIS_EM_SIZE));
}
bool
@ -876,9 +851,6 @@ nsRangeFrame::ShouldUseNativeStyle() const
nsIFrame* thumbFrame = mThumbDiv->GetPrimaryFrame();
return (StyleDisplay()->mAppearance == StyleAppearance::Range) &&
!PresContext()->HasAuthorSpecifiedRules(this,
(NS_AUTHOR_SPECIFIED_BORDER |
NS_AUTHOR_SPECIFIED_BACKGROUND)) &&
trackFrame &&
!PresContext()->HasAuthorSpecifiedRules(trackFrame,
STYLES_DISABLING_NATIVE_THEMING) &&

View File

@ -0,0 +1,26 @@
<!DOCTYPE html>
<html>
<style>
html,body {
color:black; background-color:white; font:16px/1 monospace; padding:0; margin:0;
}
input { height: 2em; }
</style>
<div style="float:left">
<input type=range><br>
<span style="display:inline-block; background-color:rgba(0,255,0,0.3);"><input type=range style="-webkit-appearance:none; margin:0; vertical-align:top; background: none"></span><br>
</div>
<div style="float:left">
<span><input type=range style="-webkit-appearance:none; margin:0; vertical-align:top"></span><br>
</div>
<div style="float:left">
<input type=range><br>
<span style="display:inline-block; background-color: -moz-Field; background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAE0lEQVQYlWNg+M/gTRQeVUhfhQBHR4DpEUeLigAAAABJRU5ErkJggg==)"><input type=range style="-webkit-appearance:none; margin:0; vertical-align:top; background: none"></span><br>
</div>
<div style="float:left">
<input type=range><br>
<span style="display:inline-block; border:1px solid green"><input type=range style="-webkit-appearance:none; margin:0; vertical-align:top"></span><br>
</div>

View File

@ -0,0 +1,26 @@
<!DOCTYPE html>
<html>
<style>
html,body {
color:black; background-color:white; font:16px/1 monospace; padding:0; margin:0;
}
input { height: 2em; }
</style>
<div style="float:left">
<input type=range style="background-color:rgba(0,255,0,0.3)"><br>
<input type=range style="-webkit-appearance:none; background-color:rgba(0,255,0,0.3); margin:0"><br>
</div>
<div style="float:left">
<span style="background:red"><input type=range style="-webkit-appearance:none; margin:0; vertical-align:top"></span><br>
</div>
<div style="float:left">
<input type=range style="background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAE0lEQVQYlWNg+M/gTRQeVUhfhQBHR4DpEUeLigAAAABJRU5ErkJggg==)"><br>
<input type=range style="-webkit-appearance:none; background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAE0lEQVQYlWNg+M/gTRQeVUhfhQBHR4DpEUeLigAAAABJRU5ErkJggg==); margin:0"><br>
</div>
<div style="float:left">
<input type=range style="border:1px solid red"><br>
<input type=range style="-webkit-appearance:none; border:1px solid green; margin:0"><br>
</div>

View File

@ -14,13 +14,13 @@ fuzzy-if(skiaContent,0-1,0-40) == to-range-from-other-type-unthemed-1.html to-ra
# dynamic value changes:
fuzzy-if(skiaContent,0-1,0-40) == value-prop-unthemed.html 75pct-unthemed-common-ref.html
fuzzy-if(webrender&&gtkWidget,96-96,163-163) == value-prop.html 75pct-common-ref.html
fuzzy-if(webrender&&gtkWidget,79-79,138-138) == value-prop.html 75pct-common-ref.html
fuzzy-if(skiaContent,0-1,0-40) == valueAsNumber-prop-unthemed.html 75pct-unthemed-common-ref.html
fuzzy-if(webrender&&gtkWidget,96-96,163-163) == valueAsNumber-prop.html 75pct-common-ref.html
fuzzy-if(webrender&&gtkWidget,79-79,138-138) == valueAsNumber-prop.html 75pct-common-ref.html
fuzzy-if(skiaContent,0-1,0-40) == stepDown-unthemed.html 75pct-unthemed-common-ref.html
fuzzy-if(webrender&&gtkWidget,96-96,163-163) == stepDown.html 75pct-common-ref.html
fuzzy-if(webrender&&gtkWidget,79-79,138-138) == stepDown.html 75pct-common-ref.html
fuzzy-if(skiaContent,0-1,0-40) == stepUp-unthemed.html 75pct-unthemed-common-ref.html
fuzzy-if(webrender&&gtkWidget,96-96,163-163) == stepUp.html 75pct-common-ref.html
fuzzy-if(webrender&&gtkWidget,79-79,138-138) == stepUp.html 75pct-common-ref.html
== max-prop.html 100pct-common-ref.html
== reset-value.html reset-value-ref.html
@ -47,3 +47,5 @@ fuzzy-if(webrender&&gtkWidget,96-96,163-163) == stepUp.html 75pct-common-ref.htm
== range-vrl-orient-inline.html range-orient-vertical-rtl.html
== range-vrl-orient-horizontal.html range-orient-horizontal-rtl.html
== range-vrl-orient-vertical.html range-orient-vertical-rtl.html
skip-if(Android) == range-border-background.html range-border-background-ref.html # Android doesn't have a native theme for -webkit-appearance:range

View File

@ -877,41 +877,15 @@ meter {
input[type=range] {
-moz-appearance: range;
display: inline-block;
inline-size: 12em;
block-size: 1.3em;
margin-inline-start: 0.7em;
margin-inline-end: 0.7em;
margin-block-start: 0;
margin-block-end: 0;
margin: 2px;
/* Override some rules that apply on all input types: */
cursor: default;
background: none;
border: none;
padding: unset;
border: unset;
/* Prevent nsFrame::HandlePress setting mouse capture to this element. */
-moz-user-select: none ! important;
}
input[type=range][orient=block] {
inline-size: 1.3em;
block-size: 12em;
margin-inline-start: 0;
margin-inline-end: 0;
margin-block-start: 0.7em;
margin-block-end: 0.7em;
}
input[type=range][orient=horizontal] {
width: 12em;
height: 1.3em;
margin: 0 0.7em;
}
input[type=range][orient=vertical] {
width: 1.3em;
height: 12em;
margin: 0.7em 0;
}
/**
* Ideally we'd also require :-moz-focusring here, but that doesn't currently
* work. Instead we only use the -moz-focus-outer border style if
@ -933,32 +907,16 @@ input[type=range]::-moz-focus-outer {
*/
input[type=range]::-moz-range-track {
/* Prevent styling that would change the type of frame we construct. */
display: inline-block !important;
display: block !important;
float: none !important;
position: static !important;
border: none;
background-color: #999;
inline-size: 100%;
writing-mode: unset !important;
direction: unset !important;
block-size: 0.2em;
/* Prevent nsFrame::HandlePress setting mouse capture to this element. */
-moz-user-select: none ! important;
}
input[type=range][orient=block]::-moz-range-track {
inline-size: 0.2em;
block-size: 100%;
}
input[type=range][orient=horizontal]::-moz-range-track {
width: 100%;
height: 0.2em;
}
input[type=range][orient=vertical]::-moz-range-track {
width: 0.2em;
height: 100%;
}
/**
* Layout handles positioning of this pseudo-element specially (so that content
* authors can concentrate on styling this pseudo-element without worrying
@ -969,9 +927,11 @@ input[type=range][orient=vertical]::-moz-range-track {
*/
input[type=range]::-moz-range-progress {
/* Prevent styling that would change the type of frame we construct. */
display: inline-block !important;
display: block !important;
float: none !important;
position: static !important;
writing-mode: unset !important;
direction: unset !important;
/* Since one of width/height will be ignored, this just sets the "other"
dimension.
*/
@ -993,9 +953,11 @@ input[type=range]::-moz-range-thumb {
*/
-moz-appearance: range-thumb !important;
/* Prevent styling that would change the type of frame we construct. */
display: inline-block !important;
display: block !important;
float: none !important;
position: static !important;
writing-mode: unset !important;
direction: unset !important;
width: 1em;
height: 1em;
border: 0.1em solid #999;

View File

@ -394,8 +394,9 @@ that do not depend on XUL, or even ones testing other layout engines.
Running Tests
=============
(If you're not using a DEBUG build, first set browser.dom.window.dump.enabled
to true (in about:config, in the profile you'll be using to run the tests).
(If you're not using a DEBUG build, first set browser.dom.window.dump.enabled,
devtools.console.stdout.chrome and devtools.console.stdout.content to true (in
about:config, in the profile you'll be using to run the tests).
Create the option as a new boolean if it doesn't exist already. If you skip
this step you won't get any output in the terminal.)

View File

@ -623,6 +623,7 @@ pref("browser.firstrun.show.localepicker", false);
// $ adb shell setprop log.redirect-stdio true
// $ adb shell start
pref("browser.dom.window.dump.enabled", true);
pref("devtools.console.stdout.chrome", true);
// controls if we want camera support
pref("device.camera.enabled", true);

View File

@ -1776,6 +1776,24 @@ VARCACHE_PREF(
RelaxedAtomicBool, false
)
#ifdef MOZILLA_OFFICIAL
# define PREF_VALUE false
#else
# define PREF_VALUE true
#endif
VARCACHE_PREF(
"devtools.console.stdout.chrome",
devtools_console_stdout_chrome,
RelaxedAtomicBool, PREF_VALUE
)
#undef PREF_VALUE
VARCACHE_PREF(
"devtools.console.stdout.content",
devtools_console_stdout_content,
RelaxedAtomicBool, false
)
//---------------------------------------------------------------------------
// Feature-Policy prefs
//---------------------------------------------------------------------------

View File

@ -1096,10 +1096,14 @@ pref("toolkit.asyncshutdown.log", false);
// it being specified, dump is disabled in artifact builds (see Bug 1490412).
#ifdef MOZILLA_OFFICIAL
pref("browser.dom.window.dump.enabled", false, sticky);
pref("devtools.console.stdout.chrome", false, sticky);
#else
pref("browser.dom.window.dump.enabled", true, sticky);
pref("devtools.console.stdout.chrome", true, sticky);
#endif
pref("devtools.console.stdout.content", false, sticky);
// Controls whether EventEmitter module throws dump message on each emit
pref("toolkit.dump.emit", false);

View File

@ -118,6 +118,7 @@ SpecialPowers.pushPrefEnv({"set": [
["identity.fxaccounts.enabled", true], // fx accounts
["identity.fxaccounts.auth.uri", TEST_SERVER], // our sjs server
["browser.dom.window.dump.enabled", true],
["devtools.console.stdout.chrome", true],
]},
function() { runTest(); }
);

View File

@ -18,6 +18,7 @@ lazy_static! {
// Enable the dump function, which sends messages to the system
// console
("browser.dom.window.dump.enabled", Pref::new(true)),
("devtools.console.stdout.chrome", Pref::new(true)),
// Disable safebrowsing components
("browser.safebrowsing.blockedURIs.enabled", Pref::new(false)),

View File

@ -376,8 +376,9 @@ class GeckoInstance(object):
class FennecInstance(GeckoInstance):
fennec_prefs = {
# Enable output of dump()
# Enable output for dump() and chrome console API
"browser.dom.window.dump.enabled": True,
"devtools.console.stdout.chrome": True,
# Disable Android snippets
"browser.snippets.enabled": False,
@ -504,8 +505,9 @@ class DesktopInstance(GeckoInstance):
# We use a larger number than the default 22 to have some buffer
"browser.contentblocking.introCount": 99,
# Enable output of dump()
# Enable output for dump() and chrome console API
"browser.dom.window.dump.enabled": True,
"devtools.console.stdout.chrome": True,
# Indicate that the download panel has been shown once so that whichever
# download test runs first doesn"t show the popup inconsistently

View File

@ -93,6 +93,9 @@ class RemoteContext(object):
pass
devices = {}
class FennecContext(RemoteContext):
_remote_profiles_ini = None
_remote_test_root = None
@ -102,7 +105,19 @@ class FennecContext(RemoteContext):
self.avd_home = avd_home
self.remote_process = app
self.device_serial = device_serial
self.device = ADBAndroid(adb=self.adb, device=device_serial)
self.device = self.get_device(self.adb, device_serial)
def get_device(self, adb_path, device_serial):
# Create a mozdevice.ADBAndroid object for the specified device_serial
# and cache it for future use. If the same device_serial is subsequently
# requested, retrieve it from the cache to avoid costly re-initialization.
global devices
if device_serial in devices:
device = devices[device_serial]
else:
device = ADBAndroid(adb=adb_path, device=device_serial)
devices[device_serial] = device
return device
def stop_application(self):
self.device.stop_application(self.remote_process)

View File

@ -3,6 +3,7 @@
user_pref("app.update.disabledForTesting", true);
user_pref("browser.chrome.guess_favicon", false);
user_pref("browser.dom.window.dump.enabled", true);
user_pref("devtools.console.stdout.chrome", true);
// Use a python-eval-able empty JSON array even though asrouter expects plain object
user_pref("browser.newtabpage.activity-stream.asrouter.providers.snippets", "[]");
user_pref("browser.newtabpage.activity-stream.feeds.section.topstories", false);

View File

@ -59,6 +59,7 @@ class TPSTestRunner(object):
'app.update.disabledForTesting': True,
'security.turn_off_all_security_so_that_viruses_can_take_over_this_computer': True,
'browser.dom.window.dump.enabled': True,
'devtools.console.stdout.chrome': True,
'browser.sessionstore.resume_from_crash': False,
'browser.shell.checkDefaultBrowser': False,
'browser.tabs.warnOnClose': False,

View File

@ -0,0 +1,61 @@
<!DOCTYPE HTML>
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/
-->
<html><head>
<meta charset="utf-8">
<title>CSS Grid Reference: align/justify-self on range INPUT items</title>
<link rel="author" title="Mats Palmgren" href="https://bugzilla.mozilla.org/show_bug.cgi?id=">
<style>
html,body {
color:black; background-color:white; font:16px/1 monospace;
}
input {
margin:0;
padding:0;
border:none; /* NOTE: On Windows, GetWidgetBorder returns 1px on all sides,
so we need the next declaration for the width/height to match: */
box-sizing: border-box;
width:300px;
height:80px;
}
.grid {
display: inline-grid;
grid: 80px / 300px;
place-items: stretch;
border:1px solid;
}
.zero { grid:0/0; }
.zero input { width:0; height:0; }
.none input { -webkit-appearance:none; }
</style>
</head>
<body>
<div class="grid"><input type=range></div>
<br>
<div class="grid zero"><input type=range></div>
<br>
<div class="grid"><input type=range style="place-self:normal"></div>
<br>
<div class="grid zero"><input type=range style="place-self:normal"></div>
<br>
<div class="none">
<div class="grid"><input type=range></div>
<br>
<div class="grid zero"><input type=range></div>
<br>
<div class="grid"><input type=range style="place-self:normal"></div>
<br>
<div class="grid zero"><input type=range style="place-self:normal"></div>
</div>
</body>
</html>

View File

@ -0,0 +1,58 @@
<!DOCTYPE HTML>
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/
-->
<html><head>
<meta charset="utf-8">
<title>CSS Grid Test: align/justify-self on range INPUT items</title>
<link rel="author" title="Mats Palmgren" href="https://bugzilla.mozilla.org/show_bug.cgi?id=">
<link rel="help" href="https://drafts.csswg.org/css-align-3/#align-self-property">
<link rel="match" href="grid-self-alignment-stretch-input-range-ref.html">
<style>
html,body {
color:black; background-color:white; font:16px/1 monospace;
}
input {
margin:0;
padding:0;
border:none;
}
.grid {
display: inline-grid;
grid: 80px / 300px;
place-items: stretch;
border:1px solid;
}
.zero { grid:0/0; }
.none input { -webkit-appearance:none; }
</style>
</head>
<body>
<div class="grid"><input type=range></div>
<br>
<div class="grid zero"><input type=range></div>
<br>
<div class="grid"><input type=range style="place-self:normal"></div>
<br>
<div class="grid zero"><input type=range style="place-self:normal"></div>
<br>
<div class="none">
<div class="grid"><input type=range></div>
<br>
<div class="grid zero"><input type=range></div>
<br>
<div class="grid"><input type=range style="place-self:normal"></div>
<br>
<div class="grid zero"><input type=range style="place-self:normal"></div>
</div>
</body>
</html>

View File

@ -39,8 +39,9 @@ class FennecProfile(FirefoxProfile):
"app.normandy.api_url": "",
# Increase the APZ content response timeout in tests to 1 minute.
"apz.content_response_timeout": 60000,
# Enable output of dump()
# Enable output for dump() and chrome console API
"browser.dom.window.dump.enabled": True,
"devtools.console.stdout.chrome": True,
# Disable safebrowsing components
"browser.safebrowsing.blockedURIs.enabled": False,
"browser.safebrowsing.downloads.enabled": False,

View File

@ -536,8 +536,6 @@ NotifyPaintStart()
gNumPendingPaints++;
gNumPendingMainThreadPaints++;
CreateCheckpoint();
}
static void

View File

@ -585,8 +585,7 @@ SpawnReplayingChildren()
}
// Hit any installed breakpoints with the specified kind.
static void HitBreakpointsWithKind(js::BreakpointPosition::Kind aKind,
bool aRecordingBoundary = false);
static void HitBreakpointsWithKind(js::BreakpointPosition::Kind aKind);
// Change the current active child, and select a new role for the old one.
static void
@ -1058,8 +1057,7 @@ Resume(bool aForward)
// Don't rewind if we are at the beginning of the recording.
if (targetCheckpoint == CheckpointId::Invalid) {
SendMessageToUIProcess("HitRecordingBeginning");
HitBreakpointsWithKind(js::BreakpointPosition::Kind::ForcedPause,
/* aRecordingBoundary = */ true);
HitBreakpointsWithKind(js::BreakpointPosition::Kind::ForcedPause);
return;
}
@ -1086,8 +1084,7 @@ Resume(bool aForward)
MOZ_RELEASE_ASSERT(!gActiveChild->IsRecording());
if (!gRecordingChild) {
SendMessageToUIProcess("HitRecordingEndpoint");
HitBreakpointsWithKind(js::BreakpointPosition::Kind::ForcedPause,
/* aRecordingBoundary = */ true);
HitBreakpointsWithKind(js::BreakpointPosition::Kind::ForcedPause);
return;
}
@ -1216,34 +1213,47 @@ RecvHitCheckpoint(const HitCheckpointMessage& aMsg)
}
static void
HitBreakpoint(uint32_t* aBreakpoints, size_t aNumBreakpoints, bool aRecordingBoundary)
HitBreakpoint(uint32_t* aBreakpoints, size_t aNumBreakpoints,
js::BreakpointPosition::Kind aSharedKind)
{
if (!gActiveChild->IsPaused()) {
if (aNumBreakpoints) {
Print("Warning: Process resumed before breakpoints were hit.\n");
}
delete[] aBreakpoints;
return;
}
MarkActiveChildExplicitPause();
gResumeForwardOrBackward = true;
// Call breakpoint handlers until one of them explicitly resumes forward or
// backward travel.
for (size_t i = 0; i < aNumBreakpoints && gResumeForwardOrBackward; i++) {
AutoSafeJSContext cx;
if (!js::HitBreakpoint(cx, aBreakpoints[i])) {
Print("Warning: hitBreakpoint hook threw an exception.\n");
switch (aSharedKind) {
case js::BreakpointPosition::ForcedPause:
MarkActiveChildExplicitPause();
MOZ_FALLTHROUGH;
case js::BreakpointPosition::PositionChange:
// Call all breakpoint handlers.
for (size_t i = 0; i < aNumBreakpoints; i++) {
AutoSafeJSContext cx;
if (!js::HitBreakpoint(cx, aBreakpoints[i])) {
Print("Warning: hitBreakpoint hook threw an exception.\n");
}
}
}
break;
default:
gResumeForwardOrBackward = true;
// If the child was not explicitly resumed by any breakpoint handler, and we
// are not at a forced pause at the recording boundary, resume travel in
// whichever direction it was going previously.
if (gResumeForwardOrBackward && !aRecordingBoundary) {
ResumeForwardOrBackward();
MarkActiveChildExplicitPause();
// Call breakpoint handlers until one of them explicitly resumes forward or
// backward travel.
for (size_t i = 0; i < aNumBreakpoints && gResumeForwardOrBackward; i++) {
AutoSafeJSContext cx;
if (!js::HitBreakpoint(cx, aBreakpoints[i])) {
Print("Warning: hitBreakpoint hook threw an exception.\n");
}
}
// If the child was not explicitly resumed by any breakpoint handler,
// resume travel in whichever direction we were going previously.
if (gResumeForwardOrBackward) {
ResumeForwardOrBackward();
}
break;
}
delete[] aBreakpoints;
@ -1256,11 +1266,11 @@ RecvHitBreakpoint(const HitBreakpointMessage& aMsg)
PodCopy(breakpoints, aMsg.Breakpoints(), aMsg.NumBreakpoints());
gMainThreadMessageLoop->PostTask(NewRunnableFunction("HitBreakpoint", HitBreakpoint,
breakpoints, aMsg.NumBreakpoints(),
/* aRecordingBoundary = */ false));
js::BreakpointPosition::Invalid));
}
static void
HitBreakpointsWithKind(js::BreakpointPosition::Kind aKind, bool aRecordingBoundary)
HitBreakpointsWithKind(js::BreakpointPosition::Kind aKind)
{
Vector<uint32_t> breakpoints;
gActiveChild->GetMatchingInstalledBreakpoints([=](js::BreakpointPosition::Kind aInstalled) {
@ -1271,7 +1281,7 @@ HitBreakpointsWithKind(js::BreakpointPosition::Kind aKind, bool aRecordingBounda
PodCopy(newBreakpoints, breakpoints.begin(), breakpoints.length());
gMainThreadMessageLoop->PostTask(NewRunnableFunction("HitBreakpoint", HitBreakpoint,
newBreakpoints, breakpoints.length(),
aRecordingBoundary));
aKind));
}
}

View File

@ -4390,24 +4390,6 @@ nsNativeThemeCocoa::GetMinimumWidgetSize(nsPresContext* aPresContext,
break;
}
case StyleAppearance::Range:
{
// The Mac Appearance Manager API (the old API we're currently using)
// doesn't define constants to obtain a minimum size for sliders. We use
// the "thickness" of a slider that has default dimensions for both the
// minimum width and height to get something sane and so that paint
// invalidation works.
SInt32 size = 0;
if (IsRangeHorizontal(aFrame)) {
::GetThemeMetric(kThemeMetricHSliderHeight, &size);
} else {
::GetThemeMetric(kThemeMetricVSliderWidth, &size);
}
aResult->SizeTo(size, size);
*aIsOverridable = true;
break;
}
case StyleAppearance::RangeThumb:
{
SInt32 width = 0;

View File

@ -1618,19 +1618,6 @@ nsNativeThemeGTK::GetMinimumWidgetSize(nsPresContext* aPresContext,
*aIsOverridable = false;
}
break;
case StyleAppearance::Range:
{
gint scale_width, scale_height;
moz_gtk_get_scale_metrics(IsRangeHorizontal(aFrame) ?
GTK_ORIENTATION_HORIZONTAL : GTK_ORIENTATION_VERTICAL,
&scale_width, &scale_height);
aResult->width = scale_width;
aResult->height = scale_height;
*aIsOverridable = true;
}
break;
case StyleAppearance::ScalethumbHorizontal:
case StyleAppearance::ScalethumbVertical:
{

View File

@ -305,10 +305,6 @@ HeadlessThemeGTK::GetMinimumWidgetSize(nsPresContext* aPresContext,
aResult->height = 13;
*aIsOverridable = false;
break;
case StyleAppearance::Range:
aResult->width = 14;
aResult->height = 18;
break;
case StyleAppearance::Menuseparator:
aResult->width = 0;
aResult->height = 8;