This commit is contained in:
Wes Kocher 2017-03-31 17:53:52 -07:00
Родитель 5c91602e70 483fea00ef
Коммит 3a0357deec
89 изменённых файлов: 18751 добавлений и 18047 удалений

Просмотреть файл

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='UTF-8'?>
<blocklist lastupdate="1483471392954" xmlns="http://www.mozilla.org/2006/addons-blocklist">
<blocklist lastupdate="1483646608603" xmlns="http://www.mozilla.org/2006/addons-blocklist">
<emItems>
<emItem blockID="i988" id="{b12785f5-d8d0-4530-a3ea-5c4263b85bef}">
<prefs/>
@ -886,22 +886,6 @@
<prefs/>
<versionRange minVersion="0" maxVersion="*" severity="1"/>
</emItem>
<emItem blockID="i55" id="youtube@youtube7.com">
<prefs/>
<versionRange minVersion="0" maxVersion="*" severity="3"/>
</emItem>
<emItem blockID="i440" id="{2d069a16-fca1-4e81-81ea-5d5086dcbd0c}">
<prefs/>
<versionRange minVersion="0" maxVersion="*" severity="1"/>
</emItem>
<emItem blockID="i1077" id="helper@vidscrab.com">
<prefs/>
<versionRange minVersion="0" maxVersion="*" severity="1"/>
</emItem>
<emItem blockID="i1492" id="googlotim@gmail.com">
<prefs/>
<versionRange minVersion="1.3.2" maxVersion="1.3.2" severity="1"/>
</emItem>
<emItem blockID="i93" id="{68b8676b-99a5-46d1-b390-22411d8bcd61}">
<prefs/>
<versionRange minVersion="0" maxVersion="*" severity="3"/>
@ -1365,6 +1349,10 @@
<prefs/>
<versionRange minVersion="0" maxVersion="*" severity="1"/>
</emItem>
<emItem blockID="0f8344d0-8211-49a1-81be-c0084b3da9b1" id="fr@fbt.ovh">
<prefs/>
<versionRange minVersion="0" maxVersion="*" severity="3"/>
</emItem>
<emItem blockID="i79" id="GifBlock@facebook.com">
<prefs/>
<versionRange minVersion="0" maxVersion="*" severity="3"/>
@ -1955,6 +1943,10 @@
</prefs>
<versionRange minVersion="0" maxVersion="*" severity="3"/>
</emItem>
<emItem blockID="d6425f24-8c9e-4c0a-89b4-6890fc68d5c9" id="/^\{(9321F452-96D5-11E6-BC3E-3769C7AD2208)|({18ED1ECA-96D3-11E6-A373-BD66C7AD2208})\}$/">
<prefs/>
<versionRange minVersion="0" maxVersion="*" severity="3"/>
</emItem>
<emItem blockID="i920" id="{FCE04E1F-9378-4f39-96F6-5689A9159E45}">
<prefs/>
<versionRange minVersion="0" maxVersion="*" severity="3">
@ -2067,6 +2059,22 @@
<prefs/>
<versionRange minVersion="0" maxVersion="*" severity="3"/>
</emItem>
<emItem blockID="i55" id="youtube@youtube7.com">
<prefs/>
<versionRange minVersion="0" maxVersion="*" severity="3"/>
</emItem>
<emItem blockID="i440" id="{2d069a16-fca1-4e81-81ea-5d5086dcbd0c}">
<prefs/>
<versionRange minVersion="0" maxVersion="*" severity="1"/>
</emItem>
<emItem blockID="i1077" id="helper@vidscrab.com">
<prefs/>
<versionRange minVersion="0" maxVersion="*" severity="1"/>
</emItem>
<emItem blockID="i1492" id="googlotim@gmail.com">
<prefs/>
<versionRange minVersion="1.3.2" maxVersion="1.3.2" severity="1"/>
</emItem>
</emItems>
<pluginItems>
<pluginItem blockID="p416">

Просмотреть файл

@ -9,6 +9,9 @@
:root {
--identity-popup-expander-width: 38px;
--panelui-subview-transition-duration: 150ms;
--lwt-additional-images: none;
--lwt-background-alignment: right top;
--lwt-background-tiling: no-repeat;
}
:root:-moz-lwtheme {
@ -17,7 +20,9 @@
:root:-moz-lwtheme:not([customization-lwtheme]) {
background-color: var(--lwt-accent-color) !important;
background-image: var(--lwt-header-image) !important;
background-image: var(--lwt-header-image), var(--lwt-additional-images) !important;
background-position: var(--lwt-background-alignment) !important;
background-repeat: var(--lwt-background-tiling) !important;
}
#main-window:not([chromehidden~="toolbar"]) {

Просмотреть файл

@ -18,15 +18,9 @@ if (AppConstants.E10S_TESTING_ONLY) {
XPCOMUtils.defineLazyModuleGetter(this, "UpdateUtils",
"resource://gre/modules/UpdateUtils.jsm");
}
XPCOMUtils.defineLazyModuleGetter(this, "PlacesUtils",
"resource://gre/modules/PlacesUtils.jsm");
if (AppConstants.MOZ_DEV_EDITION) {
XPCOMUtils.defineLazyModuleGetter(this, "fxAccounts",
"resource://gre/modules/FxAccounts.jsm");
}
const ENGINE_FLAVOR = "text/x-moz-search-engine";
var gEngineView = null;
@ -191,11 +185,6 @@ var gMainPane = {
OS.File.stat(ignoreSeparateProfile).then(() => separateProfileModeCheckbox.checked = false,
() => separateProfileModeCheckbox.checked = true);
fxAccounts.getSignedInUser().then(data => {
document.getElementById("getStarted").selectedIndex = data ? 1 : 0;
})
.catch(Cu.reportError);
}
// Notify observers that the UI is now ready
@ -293,17 +282,10 @@ var gMainPane = {
.getService(Ci.nsIWindowMediator);
let win = wm.getMostRecentWindow("navigator:browser");
fxAccounts.getSignedInUser().then(data => {
if (win) {
if (data) {
// We have a user, open Sync preferences in the same tab
win.openUILinkIn("about:preferences#sync", "current");
return;
}
let accountsTab = win.gBrowser.addTab("about:accounts?action=signin&entrypoint=dev-edition-setup");
win.gBrowser.selectedTab = accountsTab;
}
});
if (win) {
let accountsTab = win.gBrowser.addTab("about:accounts?action=signin&entrypoint=dev-edition-setup");
win.gBrowser.selectedTab = accountsTab;
}
}
},

Просмотреть файл

@ -202,10 +202,7 @@
label="&separateProfileMode.label;"/>
<hbox align="center" class="indent">
<label id="useFirefoxSync">&useFirefoxSync.label;</label>
<deck id="getStarted">
<label class="text-link">&getStarted.notlogged.label;</label>
<label class="text-link">&getStarted.configured.label;</label>
</deck>
<label id="getStarted" class="text-link">&getStarted.label;</label>
</hbox>
</vbox>
#endif

Просмотреть файл

@ -40,7 +40,6 @@
<!ENTITY separateProfileMode.label "Allow &brandShortName; and Firefox to run at the same time">
<!ENTITY useFirefoxSync.label "Tip: This uses separate profiles. Use Sync to share data between them.">
<!ENTITY getStarted.notlogged.label "Sign in to &syncBrand.shortName.label;…">
<!ENTITY getStarted.configured.label "Open &syncBrand.shortName.label; preferences">
<!ENTITY getStarted.label "Start using Sync…">
<!ENTITY e10sEnabled.label "Enable multi-process &brandShortName;">

Просмотреть файл

@ -23,7 +23,7 @@
#include "mozilla/KeyframeEffectParams.h"
// RawServoDeclarationBlock and associated RefPtrTraits
#include "mozilla/ServoBindingTypes.h"
#include "mozilla/StyleAnimationValueInlines.h"
#include "mozilla/StyleAnimationValue.h"
#include "mozilla/dom/AnimationEffectReadOnly.h"
#include "mozilla/dom/BindingDeclarations.h"
#include "mozilla/dom/Element.h"

Просмотреть файл

@ -67,6 +67,7 @@ Element::NoteDirtyDescendantsForServo()
if (nsIPresShell* shell = OwnerDoc()->GetShell()) {
shell->SetNeedStyleFlush();
shell->ObserveStyleFlushes();
}
MOZ_ASSERT(DirtyDescendantsBitIsPropagatedForServo());

Просмотреть файл

@ -627,6 +627,7 @@ child:
async InitRendering(TextureFactoryIdentifier textureFactoryIdentifier,
uint64_t layersId,
bool layersConnected,
nullable PRenderFrame renderFrame);
async LoadURL(nsCString uri, ShowInfo info);

Просмотреть файл

@ -373,6 +373,7 @@ TabChild::TabChild(nsIContentChild* aManager,
, mChromeFlags(aChromeFlags)
, mActiveSuppressDisplayport(0)
, mLayersId(0)
, mLayersConnected(true)
, mDidFakeShow(false)
, mNotified(false)
, mTriedBrowserInit(false)
@ -1261,10 +1262,12 @@ TabChild::RecvShow(const ScreenIntSize& aSize,
mozilla::ipc::IPCResult
TabChild::RecvInitRendering(const TextureFactoryIdentifier& aTextureFactoryIdentifier,
const uint64_t& aLayersId,
const bool& aLayersConnected,
PRenderFrameChild* aRenderFrame)
{
MOZ_ASSERT((!mDidFakeShow && aRenderFrame) || (mDidFakeShow && !aRenderFrame));
mLayersConnected = aLayersConnected;
InitRenderingState(aTextureFactoryIdentifier, aLayersId, aRenderFrame);
return IPC_OK();
}

Просмотреть файл

@ -343,6 +343,7 @@ public:
virtual mozilla::ipc::IPCResult
RecvInitRendering(const TextureFactoryIdentifier& aTextureFactoryIdentifier,
const uint64_t& aLayersId,
const bool& aLayersConnected,
PRenderFrameChild* aRenderFrame) override;
virtual mozilla::ipc::IPCResult
@ -552,6 +553,7 @@ public:
static TabChild* GetFrom(uint64_t aLayersId);
uint64_t LayersId() { return mLayersId; }
bool IsLayersConnected() { return mLayersConnected; }
void DidComposite(uint64_t aTransactionId,
const TimeStamp& aCompositeStart,
@ -774,6 +776,7 @@ private:
uint64_t mLayersId;
CSSRect mUnscaledOuterRect;
nscolor mLastBackgroundColor;
bool mLayersConnected;
bool mDidFakeShow;
bool mNotified;
bool mTriedBrowserInit;

Просмотреть файл

@ -649,8 +649,8 @@ TabParent::InitRenderFrame()
RefPtr<nsFrameLoader> frameLoader = GetFrameLoader();
MOZ_ASSERT(frameLoader);
if (frameLoader) {
bool success;
RenderFrameParent* renderFrame = new RenderFrameParent(frameLoader, &success);
RenderFrameParent* renderFrame = new RenderFrameParent(frameLoader);
MOZ_ASSERT(renderFrame->IsInitted());
uint64_t layersId = renderFrame->GetLayersId();
AddTabParentToTable(layersId, this);
if (!SendPRenderFrameConstructor(renderFrame)) {
@ -659,7 +659,8 @@ TabParent::InitRenderFrame()
TextureFactoryIdentifier textureFactoryIdentifier;
renderFrame->GetTextureFactoryIdentifier(&textureFactoryIdentifier);
Unused << SendInitRendering(textureFactoryIdentifier, layersId, renderFrame);
Unused << SendInitRendering(textureFactoryIdentifier, layersId,
renderFrame->IsLayersConnected(), renderFrame);
}
} else {
// Otherwise, the child should have constructed the RenderFrame,
@ -2490,17 +2491,13 @@ TabParent::AllocPRenderFrameParent()
{
MOZ_ASSERT(ManagedPRenderFrameParent().IsEmpty());
RefPtr<nsFrameLoader> frameLoader = GetFrameLoader();
uint64_t layersId = 0;
bool success = false;
PRenderFrameParent* renderFrame =
new RenderFrameParent(frameLoader, &success);
if (success) {
RenderFrameParent* rfp = static_cast<RenderFrameParent*>(renderFrame);
layersId = rfp->GetLayersId();
RenderFrameParent* rfp = new RenderFrameParent(frameLoader);
if (rfp->IsInitted()) {
uint64_t layersId = rfp->GetLayersId();
AddTabParentToTable(layersId, this);
}
return renderFrame;
return rfp;
}
bool

Просмотреть файл

@ -114,6 +114,7 @@ private:
#ifdef MOZ_WIDGET_ANDROID
DECL_MEDIA_PREF("media.android-media-codec.enabled", PDMAndroidMediaCodecEnabled, bool, false);
DECL_MEDIA_PREF("media.android-media-codec.preferred", PDMAndroidMediaCodecPreferred, bool, false);
DECL_MEDIA_PREF("media.navigator.hardware.vp8_encode.acceleration_remote_enabled", RemoteMediaCodecVP8EncoderEnabled, bool, false);
#endif
#ifdef MOZ_FFMPEG
DECL_MEDIA_PREF("media.ffmpeg.enabled", PDMFFmpegEnabled, bool, true);

Просмотреть файл

@ -0,0 +1,76 @@
/* 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 JavaCallbacksSupport_h_
#define JavaCallbacksSupport_h_
#include "FennecJNINatives.h"
#include "MediaResult.h"
#include "MediaCodec.h"
namespace mozilla {
class JavaCallbacksSupport
: public java::CodecProxy::NativeCallbacks::Natives<JavaCallbacksSupport>
{
public:
typedef java::CodecProxy::NativeCallbacks::Natives<JavaCallbacksSupport> Base;
using Base::AttachNative;
using Base::DisposeNative;
JavaCallbacksSupport() : mCanceled(false) { }
virtual ~JavaCallbacksSupport() { }
virtual void HandleInputExhausted() = 0;
void OnInputExhausted()
{
if (!mCanceled) {
HandleInputExhausted();
}
}
virtual void HandleOutput(java::Sample::Param aSample) = 0;
void OnOutput(jni::Object::Param aSample)
{
if (!mCanceled) {
HandleOutput(java::Sample::Ref::From(aSample));
}
}
virtual void HandleOutputFormatChanged(java::sdk::MediaFormat::Param aFormat) { };
void OnOutputFormatChanged(jni::Object::Param aFormat)
{
if (!mCanceled) {
HandleOutputFormatChanged(java::sdk::MediaFormat::Ref::From(aFormat));
}
}
virtual void HandleError(const MediaResult& aError) = 0;
void OnError(bool aIsFatal)
{
if (!mCanceled) {
HandleError(
aIsFatal
? MediaResult(NS_ERROR_DOM_MEDIA_FATAL_ERR, __func__)
: MediaResult(NS_ERROR_DOM_MEDIA_DECODE_ERR, __func__));
}
}
void Cancel()
{
mCanceled = true;
}
private:
Atomic<bool> mCanceled;
};
} // namespace mozilla
#endif

Просмотреть файл

@ -5,8 +5,8 @@
#include "AndroidBridge.h"
#include "AndroidDecoderModule.h"
#include "AndroidSurfaceTexture.h"
#include "JavaCallbacksSupport.h"
#include "SimpleMap.h"
#include "FennecJNINatives.h"
#include "GLImages.h"
#include "MediaData.h"
#include "MediaInfo.h"
@ -33,70 +33,6 @@ using media::TimeUnit;
namespace mozilla {
class JavaCallbacksSupport
: public CodecProxy::NativeCallbacks::Natives<JavaCallbacksSupport>
{
public:
typedef CodecProxy::NativeCallbacks::Natives<JavaCallbacksSupport> Base;
using Base::AttachNative;
JavaCallbacksSupport() : mCanceled(false) { }
virtual ~JavaCallbacksSupport() { }
virtual void HandleInputExhausted() = 0;
void OnInputExhausted()
{
if (!mCanceled) {
HandleInputExhausted();
}
}
virtual void HandleOutput(Sample::Param aSample) = 0;
void OnOutput(jni::Object::Param aSample)
{
if (!mCanceled) {
HandleOutput(Sample::Ref::From(aSample));
}
}
virtual void HandleOutputFormatChanged(MediaFormat::Param aFormat) { };
void OnOutputFormatChanged(jni::Object::Param aFormat)
{
if (!mCanceled) {
HandleOutputFormatChanged(MediaFormat::Ref::From(aFormat));
}
}
virtual void HandleError(const MediaResult& aError) = 0;
void OnError(bool aIsFatal)
{
if (!mCanceled) {
HandleError(
aIsFatal
? MediaResult(NS_ERROR_DOM_MEDIA_FATAL_ERR, __func__)
: MediaResult(NS_ERROR_DOM_MEDIA_DECODE_ERR, __func__));
}
}
void DisposeNative()
{
// TODO
}
void Cancel()
{
mCanceled = true;
}
private:
Atomic<bool> mCanceled;
};
class RemoteVideoDecoder : public RemoteDataDecoder
{
public:
@ -260,7 +196,8 @@ public:
JavaCallbacksSupport::AttachNative(
mJavaCallbacks, mozilla::MakeUnique<CallbacksSupport>(this));
mJavaDecoder = CodecProxy::Create(mFormat,
mJavaDecoder = CodecProxy::Create(false, // false indicates to create a decoder and true denotes encoder
mFormat,
mSurfaceTexture->JavaSurface(),
mJavaCallbacks,
mDrmStubId);
@ -340,7 +277,7 @@ public:
mJavaCallbacks, mozilla::MakeUnique<CallbacksSupport>(this));
mJavaDecoder =
CodecProxy::Create(mFormat, nullptr, mJavaCallbacks, mDrmStubId);
CodecProxy::Create(false, mFormat, nullptr, mJavaCallbacks, mDrmStubId);
if (mJavaDecoder == nullptr) {
return InitPromise::CreateAndReject(NS_ERROR_DOM_MEDIA_FATAL_ERR,
__func__);
@ -568,6 +505,7 @@ RemoteDataDecoder::ProcessShutdown()
if (mJavaCallbacks) {
JavaCallbacksSupport::GetNative(mJavaCallbacks)->Cancel();
JavaCallbacksSupport::DisposeNative(mJavaCallbacks);
mJavaCallbacks = nullptr;
}

Просмотреть файл

@ -80,6 +80,7 @@ include('/ipc/chromium/chromium-config.mozbuild')
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android':
EXPORTS += [
'android/AndroidDecoderModule.h',
'android/JavaCallbacksSupport.h',
]
UNIFIED_SOURCES += [
'android/AndroidDecoderModule.cpp',

Просмотреть файл

@ -604,6 +604,24 @@ GeckoRestyleManager::UpdateOnlyAnimationStyles()
transitionManager->SetInAnimationOnlyStyleUpdate(false);
}
void
GeckoRestyleManager::PostRestyleEventInternal()
{
// Make sure we're not in a style refresh; if we are, we still have
// a call to ProcessPendingRestyles coming and there's no need to
// add ourselves as a refresh observer until then.
nsIPresShell* presShell = PresContext()->PresShell();
if (!mInStyleRefresh) {
presShell->ObserveStyleFlushes();
}
// Unconditionally flag our document as needing a flush. The other
// option here would be a dedicated boolean to track whether we need
// to do so (set here and unset in ProcessPendingRestyles).
presShell->SetNeedStyleFlush();
}
void
GeckoRestyleManager::PostRestyleEvent(Element* aElement,
nsRestyleHint aRestyleHint,
@ -631,7 +649,7 @@ GeckoRestyleManager::PostRestyleEvent(Element* aElement,
mHavePendingNonAnimationRestyles = true;
}
PostRestyleEventInternal(false);
PostRestyleEventInternal();
}
void
@ -650,7 +668,7 @@ GeckoRestyleManager::PostRebuildAllStyleDataEvent(nsChangeHint aExtraHint,
mRebuildAllRestyleHint |= aRestyleHint;
// Get a restyle event posted if necessary
PostRestyleEventInternal(false);
PostRestyleEventInternal();
}
// aContent must be the content for the frame in question, which may be

Просмотреть файл

@ -113,7 +113,11 @@ public:
mPendingRestyles.ClearSelectors();
}
void PostRestyleEventForLazyConstruction() { PostRestyleEventInternal(); }
private:
void PostRestyleEventInternal();
// Used when restyling an element with a frame.
void ComputeAndProcessStyleChange(nsIFrame* aFrame,
nsChangeHint aMinChange,

Просмотреть файл

@ -494,24 +494,6 @@ RestyleManager::ChangeHintToString(nsChangeHint aHint)
}
#endif
void
RestyleManager::PostRestyleEventInternal(bool aForLazyConstruction)
{
// Make sure we're not in a style refresh; if we are, we still have
// a call to ProcessPendingRestyles coming and there's no need to
// add ourselves as a refresh observer until then.
bool inRefresh = !aForLazyConstruction && mInStyleRefresh;
nsIPresShell* presShell = PresContext()->PresShell();
if (!inRefresh) {
presShell->ObserveStyleFlushes();
}
// Unconditionally flag our document as needing a flush. The other
// option here would be a dedicated boolean to track whether we need
// to do so (set here and unset in ProcessPendingRestyles).
presShell->SetNeedStyleFlush();
}
/**
* Frame construction helpers follow.
*/

Просмотреть файл

@ -134,8 +134,6 @@ public:
return mAnimationsWithDestroyedFrame;
}
void PostRestyleEventForLazyConstruction() { PostRestyleEventInternal(true); }
void ContentInserted(nsINode* aContainer, nsIContent* aChild);
void ContentAppended(nsIContent* aContainer, nsIContent* aFirstNewContent);
@ -235,8 +233,6 @@ protected:
OverflowChangedTracker mOverflowChangedTracker;
void PostRestyleEventInternal(bool aForLazyConstruction);
/**
* These are protected static methods that help with the change hint
* processing bits of the restyle managers.

Просмотреть файл

@ -55,11 +55,7 @@ ServoRestyleManager::PostRestyleEvent(Element* aElement,
return;
}
if (aRestyleHint || aMinChangeHint) {
Servo_NoteExplicitHints(aElement, aRestyleHint, aMinChangeHint);
}
PostRestyleEventInternal(false);
Servo_NoteExplicitHints(aElement, aRestyleHint, aMinChangeHint);
}
/* static */ void

Просмотреть файл

@ -7170,7 +7170,10 @@ nsCSSFrameConstructor::MaybeConstructLazily(Operation aOperation,
}
}
RestyleManager()->PostRestyleEventForLazyConstruction();
if (mozilla::GeckoRestyleManager* geckoRM = RestyleManager()->GetAsGecko()) {
geckoRM->PostRestyleEventForLazyConstruction();
}
return true;
}
@ -7410,6 +7413,7 @@ nsCSSFrameConstructor::ContentAppended(nsIContent* aContainer,
TreeMatchContext* aProvidedTreeMatchContext)
{
MOZ_ASSERT_IF(aProvidedTreeMatchContext, !aAllowLazyConstruction);
MOZ_ASSERT_IF(aAllowLazyConstruction, !RestyleManager()->IsInStyleRefresh());
AUTO_LAYOUT_PHASE_ENTRY_POINT(mPresShell->GetPresContext(), FrameC);
NS_PRECONDITION(mUpdateCount != 0,
@ -7809,6 +7813,9 @@ nsCSSFrameConstructor::ContentRangeInserted(nsIContent* aContainer,
bool aAllowLazyConstruction,
TreeMatchContext* aProvidedTreeMatchContext)
{
MOZ_ASSERT_IF(aProvidedTreeMatchContext, !aAllowLazyConstruction);
MOZ_ASSERT_IF(aAllowLazyConstruction, !RestyleManager()->IsInStyleRefresh());
AUTO_LAYOUT_PHASE_ENTRY_POINT(mPresShell->GetPresContext(), FrameC);
NS_PRECONDITION(mUpdateCount != 0,
"Should be in an update while creating frames");

Просмотреть файл

@ -117,7 +117,7 @@
#include "mozilla/EventDispatcher.h"
#include "mozilla/EventStateManager.h"
#include "mozilla/RuleNodeCacheConditions.h"
#include "mozilla/StyleAnimationValueInlines.h"
#include "mozilla/StyleAnimationValue.h"
#include "mozilla/StyleSetHandle.h"
#include "mozilla/StyleSetHandleInlines.h"
#include "RegionBuilder.h"

Просмотреть файл

@ -85,15 +85,15 @@ GetFrom(nsFrameLoader* aFrameLoader)
return nsContentUtils::LayerManagerForDocument(doc);
}
RenderFrameParent::RenderFrameParent(nsFrameLoader* aFrameLoader, bool* aSuccess)
RenderFrameParent::RenderFrameParent(nsFrameLoader* aFrameLoader)
: mLayersId(0)
, mLayersConnected(false)
, mFrameLoader(aFrameLoader)
, mFrameLoaderDestroyed(false)
, mAsyncPanZoomEnabled(false)
, mInitted(false)
{
mInitted = Init(aFrameLoader);
*aSuccess = mInitted;
}
RenderFrameParent::~RenderFrameParent()
@ -118,11 +118,11 @@ RenderFrameParent::Init(nsFrameLoader* aFrameLoader)
// and we'll keep an indirect reference to that tree.
browser->Manager()->AsContentParent()->AllocateLayerTreeId(browser, &mLayersId);
if (lm && lm->GetCompositorBridgeChild()) {
lm->GetCompositorBridgeChild()->SendNotifyChildCreated(mLayersId);
mLayersConnected = lm->GetCompositorBridgeChild()->SendNotifyChildCreated(mLayersId);
}
} else if (XRE_IsContentProcess()) {
ContentChild::GetSingleton()->SendAllocateLayerTreeId(browser->Manager()->ChildID(), browser->GetTabId(), &mLayersId);
CompositorBridgeChild::Get()->SendNotifyChildCreated(mLayersId);
mLayersConnected = CompositorBridgeChild::Get()->SendNotifyChildCreated(mLayersId);
}
mInitted = true;
@ -170,8 +170,7 @@ RenderFrameParent::BuildLayer(nsDisplayListBuilder* aBuilder,
return nullptr;
}
uint64_t id = GetLayerTreeId();
if (!id) {
if (!mLayersId) {
return nullptr;
}
@ -185,7 +184,7 @@ RenderFrameParent::BuildLayer(nsDisplayListBuilder* aBuilder,
// use ref layers.
return nullptr;
}
static_cast<RefLayer*>(layer.get())->SetReferentId(id);
static_cast<RefLayer*>(layer.get())->SetReferentId(mLayersId);
nsIntPoint offset = GetContentRectLayerOffset(aFrame, aBuilder);
// We can only have an offset if we're a child of an inactive
// container, but our display item is LAYER_ACTIVE_FORCE which
@ -209,7 +208,7 @@ RenderFrameParent::OwnerContentChanged(nsIContent* aContent)
RefPtr<LayerManager> lm = mFrameLoader ? GetFrom(mFrameLoader) : nullptr;
// Perhaps the document containing this frame currently has no presentation?
if (lm && lm->GetCompositorBridgeChild()) {
lm->GetCompositorBridgeChild()->SendAdoptChild(mLayersId);
mLayersConnected = lm->GetCompositorBridgeChild()->SendAdoptChild(mLayersId);
FrameLayerBuilder::InvalidateAllLayers(lm);
}
}
@ -251,12 +250,6 @@ RenderFrameParent::TriggerRepaint()
docFrame->InvalidateLayer(nsDisplayItem::TYPE_REMOTE);
}
uint64_t
RenderFrameParent::GetLayerTreeId() const
{
return mLayersId;
}
void
RenderFrameParent::BuildDisplayList(nsDisplayListBuilder* aBuilder,
nsSubDocumentFrame* aFrame,
@ -319,7 +312,7 @@ RenderFrameParent::EnsureLayersConnected()
return;
}
lm->GetCompositorBridgeChild()->SendNotifyChildRecreated(mLayersId);
mLayersConnected = lm->GetCompositorBridgeChild()->SendNotifyChildRecreated(mLayersId);
}
} // namespace layout

Просмотреть файл

@ -55,7 +55,7 @@ public:
* chosen, then RenderFrameParent will watch input events and use
* them to asynchronously pan and zoom.
*/
RenderFrameParent(nsFrameLoader* aFrameLoader, bool* aSuccess);
explicit RenderFrameParent(nsFrameLoader* aFrameLoader);
virtual ~RenderFrameParent();
bool Init(nsFrameLoader* aFrameLoader);
@ -80,7 +80,8 @@ public:
void GetTextureFactoryIdentifier(TextureFactoryIdentifier* aTextureFactoryIdentifier);
inline uint64_t GetLayersId() { return mLayersId; }
inline uint64_t GetLayersId() const { return mLayersId; }
inline bool IsLayersConnected() const { return mLayersConnected; }
void TakeFocusForClickFromTap();
@ -95,12 +96,14 @@ private:
void TriggerRepaint();
void DispatchEventForPanZoomController(const InputEvent& aEvent);
uint64_t GetLayerTreeId() const;
// When our child frame is pushing transactions directly to the
// compositor, this is the ID of its layer tree in the compositor's
// context.
uint64_t mLayersId;
// A flag that indicates whether or not the compositor knows about the
// layers id. In some cases this RenderFrameParent is not connected to the
// compositor and so this flag is false.
bool mLayersConnected;
RefPtr<nsFrameLoader> mFrameLoader;
RefPtr<ContainerLayer> mContainer;

Просмотреть файл

@ -61,7 +61,8 @@
#include "mozilla/OperatorNewExtensions.h"
#include "mozilla/PendingAnimationTracker.h"
#include "mozilla/Preferences.h"
#include "mozilla/StyleAnimationValueInlines.h"
#include "mozilla/StyleAnimationValue.h"
#include "mozilla/ServoBindings.h"
#include "mozilla/Telemetry.h"
#include "mozilla/UniquePtr.h"
#include "mozilla/Unused.h"

Просмотреть файл

@ -11,6 +11,7 @@
#include "mozilla/ArrayUtils.h"
#include "mozilla/MathAlgorithms.h"
#include "mozilla/RuleNodeCacheConditions.h"
#include "mozilla/ServoBindings.h"
#include "mozilla/StyleSetHandle.h"
#include "mozilla/StyleSetHandleInlines.h"
#include "mozilla/Tuple.h"
@ -5192,3 +5193,53 @@ StyleAnimationValue::operator==(const StyleAnimationValue& aOther) const
NS_NOTREACHED("incomplete case");
return false;
}
// AnimationValue Implementation
bool
AnimationValue::operator==(const AnimationValue& aOther) const
{
// It is possible to compare an empty AnimationValue with others, so both
// mServo and mGecko could be null while comparing.
MOZ_ASSERT(!mServo || mGecko.IsNull());
if (mServo && aOther.mServo) {
return Servo_AnimationValue_DeepEqual(mServo, aOther.mServo);
}
return !mServo && !aOther.mServo &&
mGecko == aOther.mGecko;
}
float
AnimationValue::GetOpacity() const
{
MOZ_ASSERT(!mServo != mGecko.IsNull());
return mServo ? Servo_AnimationValue_GetOpacity(mServo)
: mGecko.GetFloatValue();
}
gfxSize
AnimationValue::GetScaleValue(const nsIFrame* aFrame) const
{
MOZ_ASSERT(!mServo != mGecko.IsNull());
if (mServo) {
RefPtr<nsCSSValueSharedList> list;
Servo_AnimationValue_GetTransform(mServo, &list);
return nsStyleTransformMatrix::GetScaleValue(list, aFrame);
}
return mGecko.GetScaleValue(aFrame);
}
void
AnimationValue::SerializeSpecifiedValue(nsCSSPropertyID aProperty,
nsAString& aString) const
{
MOZ_ASSERT(!mServo != mGecko.IsNull());
if (mServo) {
Servo_AnimationValue_Serialize(mServo, aProperty, &aString);
return;
}
DebugOnly<bool> uncomputeResult =
StyleAnimationValue::UncomputeValue(aProperty, mGecko, aString);
MOZ_ASSERT(uncomputeResult, "failed to uncompute StyleAnimationValue");
}

Просмотреть файл

@ -570,22 +570,27 @@ private:
struct AnimationValue
{
// mGecko and mServo are mutually exclusive: only one or the other should
// ever be set.
// FIXME: After obsoleting StyleAnimationValue, we should remove mGecko, and
// make AnimationValue a wrapper of RawServoAnimationValue to hide these
// FFIs.
StyleAnimationValue mGecko;
RefPtr<RawServoAnimationValue> mServo;
inline bool operator==(const AnimationValue& aOther) const;
bool operator==(const AnimationValue& aOther) const;
bool IsNull() const { return mGecko.IsNull() && !mServo; }
inline float GetOpacity() const;
float GetOpacity() const;
// Returns the scale for mGecko or mServo, which are calculated with
// reference to aFrame.
inline gfxSize GetScaleValue(const nsIFrame* aFrame) const;
gfxSize GetScaleValue(const nsIFrame* aFrame) const;
// Uncompute this AnimationValue and then serialize it.
inline void SerializeSpecifiedValue(nsCSSPropertyID aProperty,
nsAString& aString) const;
void SerializeSpecifiedValue(nsCSSPropertyID aProperty,
nsAString& aString) const;
};
struct PropertyStyleAnimationValuePair

Просмотреть файл

@ -1,58 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* 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_StyleAnimationValueInlines_h_
#define mozilla_StyleAnimationValueInlines_h_
#include "mozilla/StyleAnimationValue.h"
#include "mozilla/ServoBindings.h"
namespace mozilla {
bool
AnimationValue::operator==(const AnimationValue& aOther) const
{
// mGecko and mServo are mutual exclusive, one of them must be null
if (mServo) {
return Servo_AnimationValue_DeepEqual(mServo, aOther.mServo);
}
return mGecko == aOther.mGecko;
}
float
AnimationValue::GetOpacity() const
{
return mServo ? Servo_AnimationValue_GetOpacity(mServo)
: mGecko.GetFloatValue();
}
gfxSize
AnimationValue::GetScaleValue(const nsIFrame* aFrame) const
{
if (mServo) {
RefPtr<nsCSSValueSharedList> list;
Servo_AnimationValue_GetTransform(mServo, &list);
return nsStyleTransformMatrix::GetScaleValue(list, aFrame);
}
return mGecko.GetScaleValue(aFrame);
}
void
AnimationValue::SerializeSpecifiedValue(nsCSSPropertyID aProperty,
nsAString& aString) const
{
if (mServo) {
Servo_AnimationValue_Serialize(mServo, aProperty, &aString);
return;
}
DebugOnly<bool> uncomputeResult =
StyleAnimationValue::UncomputeValue(aProperty, mGecko, aString);
MOZ_ASSERT(uncomputeResult, "failed to uncompute StyleAnimationValue");
}
} // namespace mozilla
#endif // mozilla_StyleAnimationValueInlines_h_

Просмотреть файл

@ -115,7 +115,6 @@ EXPORTS.mozilla += [
'ServoUtils.h',
'SheetType.h',
'StyleAnimationValue.h',
'StyleAnimationValueInlines.h',
'StyleBackendType.h',
'StyleComplexColor.h',
'StyleContextSource.h',

Просмотреть файл

@ -7,6 +7,7 @@
#include "WebrtcMediaCodecVP8VideoCodec.h"
#include "MediaCodecVideoCodec.h"
#include "MediaPrefs.h"
namespace mozilla {
@ -15,7 +16,11 @@ static const char* logTag ="MediaCodecVideoCodec";
WebrtcVideoEncoder* MediaCodecVideoCodec::CreateEncoder(CodecType aCodecType) {
CSFLogDebug(logTag, "%s ", __FUNCTION__);
if (aCodecType == CODEC_VP8) {
return new WebrtcMediaCodecVP8VideoEncoder();
if (MediaPrefs::RemoteMediaCodecVP8EncoderEnabled()) {
return new WebrtcMediaCodecVP8VideoRemoteEncoder();
} else {
return new WebrtcMediaCodecVP8VideoEncoder();
}
}
return nullptr;
}

Просмотреть файл

@ -9,6 +9,7 @@
#include "CSFLog.h"
#include "nspr.h"
#include "JavaCallbacksSupport.h"
#include "MediaCodec.h"
#include "WebrtcMediaCodecVP8VideoCodec.h"
#include "AndroidJNIWrapper.h"
@ -16,6 +17,7 @@
#include "nsThreadUtils.h"
#include "mozilla/Monitor.h"
#include "runnable_utils.h"
#include "MediaResult.h"
#include "AudioConduit.h"
#include "VideoConduit.h"
@ -24,10 +26,12 @@
#include "libyuv/row.h"
#include "webrtc/modules/video_coding/include/video_error_codes.h"
#include "webrtc/system_wrappers/include/critical_section_wrapper.h"
#include <webrtc/common_video/libyuv/include/webrtc_libyuv.h>
using namespace mozilla;
using namespace mozilla::java;
using namespace mozilla::java::sdk;
static const int32_t DECODER_TIMEOUT = 10 * PR_USEC_PER_MSEC; // 10ms
@ -37,6 +41,119 @@ namespace mozilla {
static const char* logTag ="WebrtcMediaCodecVP8VideoCodec";
class CallbacksSupport final : public JavaCallbacksSupport
{
public:
CallbacksSupport(webrtc::EncodedImageCallback* aCallback) :
mCallback(aCallback),
mCritSect(webrtc::CriticalSectionWrapper::CreateCriticalSection()) {
CSFLogDebug(logTag, "%s %p", __FUNCTION__, this);
memset(&mEncodedImage, 0, sizeof(mEncodedImage));
}
~CallbacksSupport() {
CSFLogDebug(logTag, "%s %p", __FUNCTION__, this);
if (mEncodedImage._size) {
delete [] mEncodedImage._buffer;
mEncodedImage._buffer = nullptr;
mEncodedImage._size = 0;
}
}
void VerifyAndAllocate(const uint32_t minimumSize)
{
CSFLogDebug(logTag, "%s %p", __FUNCTION__, this);
if(minimumSize > mEncodedImage._size)
{
uint8_t* newBuffer = new uint8_t[minimumSize];
MOZ_RELEASE_ASSERT(newBuffer);
if(mEncodedImage._buffer) {
delete [] mEncodedImage._buffer;
}
mEncodedImage._buffer = newBuffer;
mEncodedImage._size = minimumSize;
}
}
void HandleInputExhausted() override
{
CSFLogDebug(logTag, "%s %p", __FUNCTION__, this);
}
void HandleOutputFormatChanged(MediaFormat::Param aFormat) override
{
CSFLogDebug(logTag, "%s %p", __FUNCTION__, this);
}
void HandleOutput(Sample::Param aSample)
{
CSFLogDebug(logTag, "%s %p", __FUNCTION__, this);
BufferInfo::LocalRef info = aSample->Info();
int32_t size;
bool ok = NS_SUCCEEDED(info->Size(&size));
MOZ_RELEASE_ASSERT(ok);
if (size > 0) {
webrtc::CriticalSectionScoped lock(mCritSect.get());
VerifyAndAllocate(size);
int64_t presentationTimeUs;
ok = NS_SUCCEEDED(info->PresentationTimeUs(&presentationTimeUs));
MOZ_RELEASE_ASSERT(ok);
mEncodedImage._timeStamp = presentationTimeUs;
mEncodedImage.capture_time_ms_ = mEncodedImage._timeStamp;
int32_t flags;
ok = NS_SUCCEEDED(info->Flags(&flags));
MOZ_ASSERT(ok);
if (flags == MediaCodec::BUFFER_FLAG_SYNC_FRAME) {
mEncodedImage._frameType = webrtc::kVideoFrameKey;
} else {
mEncodedImage._frameType = webrtc::kVideoFrameDelta;
}
mEncodedImage._completeFrame = true;
mEncodedImage._length = size;
jni::ByteBuffer::LocalRef dest =
jni::ByteBuffer::New(mEncodedImage._buffer, size);
aSample->WriteToByteBuffer(dest);
webrtc::CodecSpecificInfo info;
info.codecType = webrtc::kVideoCodecVP8;
info.codecSpecific.VP8.pictureId = -1;
info.codecSpecific.VP8.tl0PicIdx = -1;
info.codecSpecific.VP8.keyIdx = -1;
info.codecSpecific.VP8.temporalIdx = 1;
info.codecSpecific.VP8.simulcastIdx = 0;
webrtc::RTPFragmentationHeader header;
memset(&header, 0, sizeof(header));
header.VerifyAndAllocateFragmentationHeader(1);
header.fragmentationLength[0] = mEncodedImage._length;
MOZ_RELEASE_ASSERT(mCallback);
mCallback->Encoded(mEncodedImage, &info, &header);
}
}
void HandleError(const MediaResult& aError) override
{
CSFLogDebug(logTag, "%s %p", __FUNCTION__, this);
}
friend class WebrtcMediaCodecVP8VideoRemoteEncoder;
private:
webrtc::EncodedImageCallback* mCallback;
Atomic<bool> mCanceled;
webrtc::EncodedImage mEncodedImage;
rtc::scoped_ptr<webrtc::CriticalSectionWrapper> mCritSect;
};
static MediaCodec::LocalRef CreateDecoder(const char* aMimeType)
{
if (!aMimeType) {
@ -208,11 +325,11 @@ public:
return NS_ERROR_FAILURE;
}
res = format->SetInteger(nsCString("bitrate"), 1000*300);
res = format->SetInteger(nsCString("bitrate-mode"), 2);
res = format->SetInteger(nsCString("color-format"), 21);
res = format->SetInteger(nsCString("frame-rate"), 30);
res = format->SetInteger(nsCString("i-frame-interval"), 100);
res = format->SetInteger(MediaFormat::KEY_BIT_RATE, 1000*300);
res = format->SetInteger(MediaFormat::KEY_BITRATE_MODE, 2);
res = format->SetInteger(MediaFormat::KEY_COLOR_FORMAT, 21);
res = format->SetInteger(MediaFormat::KEY_FRAME_RATE, 30);
res = format->SetInteger(MediaFormat::KEY_I_FRAME_INTERVAL, 100);
} else {
mCoder = CreateDecoder(mime);
@ -859,6 +976,136 @@ int32_t WebrtcMediaCodecVP8VideoEncoder::SetRates(uint32_t newBitRate, uint32_t
return WEBRTC_VIDEO_CODEC_OK;
}
WebrtcMediaCodecVP8VideoRemoteEncoder::~WebrtcMediaCodecVP8VideoRemoteEncoder() {
CSFLogDebug(logTag, "%s %p", __FUNCTION__, this);
Release();
}
int32_t WebrtcMediaCodecVP8VideoRemoteEncoder::InitEncode(
const webrtc::VideoCodec* codecSettings,
int32_t numberOfCores,
size_t maxPayloadSize) {
return WEBRTC_VIDEO_CODEC_OK;
}
int32_t WebrtcMediaCodecVP8VideoRemoteEncoder::SetRates(uint32_t newBitRate, uint32_t frameRate) {
CSFLogDebug(logTag, "%s, newBitRate: %d, frameRate: %d", __FUNCTION__, newBitRate, frameRate);
if (!mJavaEncoder) {
return WEBRTC_VIDEO_CODEC_UNINITIALIZED;
}
mJavaEncoder->SetRates(newBitRate);
return WEBRTC_VIDEO_CODEC_OK;
}
int32_t WebrtcMediaCodecVP8VideoRemoteEncoder::Encode(
const webrtc::VideoFrame& inputImage,
const webrtc::CodecSpecificInfo* codecSpecificInfo,
const std::vector<webrtc::FrameType>* frame_types) {
CSFLogDebug(logTag, "%s, w = %d, h = %d", __FUNCTION__, inputImage.width(), inputImage.height());
if (inputImage.width() == 0 || inputImage.height() == 0) {
return WEBRTC_VIDEO_CODEC_ERROR;
}
if (!mJavaEncoder) {
JavaCallbacksSupport::Init();
mJavaCallbacks = CodecProxy::NativeCallbacks::New();
JavaCallbacksSupport::AttachNative(
mJavaCallbacks, mozilla::MakeUnique<CallbacksSupport>(mCallback));
MediaFormat::LocalRef format;
nsresult res = MediaFormat::CreateVideoFormat(nsCString(MEDIACODEC_VIDEO_MIME_VP8),
inputImage.width(),
inputImage.height(),
&format);
if (NS_FAILED(res)) {
CSFLogDebug(logTag, "%s, CreateVideoFormat failed err = %d", __FUNCTION__, (int)res);
return WEBRTC_VIDEO_CODEC_ERROR;
}
res = format->SetInteger(nsCString("bitrate"), 300 * 1000);
res = format->SetInteger(nsCString("bitrate-mode"), 2);
res = format->SetInteger(nsCString("color-format"), 21);
res = format->SetInteger(nsCString("frame-rate"), 30);
res = format->SetInteger(nsCString("i-frame-interval"), 100);
mJavaEncoder = CodecProxy::Create(true,
format,
nullptr,
mJavaCallbacks,
EmptyString());
if (mJavaEncoder == nullptr) {
return WEBRTC_VIDEO_CODEC_ERROR;
}
}
size_t sizeY = inputImage.allocated_size(webrtc::kYPlane);
size_t sizeUV = inputImage.allocated_size(webrtc::kUPlane);
size_t size = sizeY + 2 * sizeUV;
if (mConvertBuf == nullptr) {
mConvertBuf = new uint8_t[size];
mConvertBufsize = size;
}
uint8_t* dstY = mConvertBuf;
uint16_t* dstUV = reinterpret_cast<uint16_t*>(dstY + sizeY);
bool converted = I420toNV12(dstY, dstUV, inputImage);
if (!converted) {
CSFLogError(logTag, "%s WebrtcMediaCodecVP8VideoEncoder::Encode() convert input buffer to NV12 error.", __FUNCTION__);
return WEBRTC_VIDEO_CODEC_ERROR;
}
jni::ByteBuffer::LocalRef bytes = jni::ByteBuffer::New(mConvertBuf, size);
BufferInfo::LocalRef bufferInfo;
nsresult rv = BufferInfo::New(&bufferInfo);
if (NS_FAILED(rv)) {
return WEBRTC_VIDEO_CODEC_ERROR;
}
if((*frame_types)[0] == webrtc::kVideoFrameKey) {
bufferInfo->Set(0, size, inputImage.timestamp(), MediaCodec::BUFFER_FLAG_SYNC_FRAME);
} else {
bufferInfo->Set(0, size, inputImage.timestamp(), 0);
}
mJavaEncoder->Input(bytes, bufferInfo, nullptr);
return WEBRTC_VIDEO_CODEC_OK;
}
int32_t WebrtcMediaCodecVP8VideoRemoteEncoder::RegisterEncodeCompleteCallback(webrtc::EncodedImageCallback* callback) {
mCallback = callback;
return WEBRTC_VIDEO_CODEC_OK;
}
int32_t WebrtcMediaCodecVP8VideoRemoteEncoder::Release() {
CSFLogDebug(logTag, "%s %p", __FUNCTION__, this);
if (mJavaEncoder) {
mJavaEncoder->Release();
mJavaEncoder = nullptr;
}
if (mJavaCallbacks) {
JavaCallbacksSupport::GetNative(mJavaCallbacks)->Cancel();
JavaCallbacksSupport::DisposeNative(mJavaCallbacks);
mJavaCallbacks = nullptr;
}
if (mConvertBuf) {
delete [] mConvertBuf;
mConvertBuf = nullptr;
}
return WEBRTC_VIDEO_CODEC_OK;
}
// Decoder.
WebrtcMediaCodecVP8VideoDecoder::WebrtcMediaCodecVP8VideoDecoder()
: mCallback(nullptr)

Просмотреть файл

@ -14,6 +14,7 @@
#include "MediaConduitInterface.h"
#include "AudioConduit.h"
#include "VideoConduit.h"
#include "FennecJNIWrappers.h"
#include "webrtc/modules/video_coding/include/video_codec_interface.h"
@ -71,6 +72,39 @@ private:
jobjectArray mOutputBuffers;
};
class WebrtcMediaCodecVP8VideoRemoteEncoder : public WebrtcVideoEncoder {
public:
WebrtcMediaCodecVP8VideoRemoteEncoder() : mConvertBuf(nullptr), mConvertBufsize(0), mCallback(nullptr) {}
~WebrtcMediaCodecVP8VideoRemoteEncoder() override;
// Implement VideoEncoder interface.
uint64_t PluginID() const override { return 0; }
int32_t InitEncode(const webrtc::VideoCodec* codecSettings,
int32_t numberOfCores,
size_t maxPayloadSize) override;
int32_t Encode(const webrtc::VideoFrame& inputImage,
const webrtc::CodecSpecificInfo* codecSpecificInfo,
const std::vector<webrtc::FrameType>* frame_types) override;
int32_t RegisterEncodeCompleteCallback(webrtc::EncodedImageCallback* callback) override;
int32_t Release() override;
int32_t SetChannelParameters(uint32_t packetLoss, int64_t rtt) override { return 0; }
int32_t SetRates(uint32_t newBitRate, uint32_t frameRate) override;
private:
java::CodecProxy::GlobalRef mJavaEncoder;
java::CodecProxy::NativeCallbacks::GlobalRef mJavaCallbacks;
uint8_t* mConvertBuf;
uint8_t mConvertBufsize;
webrtc::EncodedImageCallback* mCallback;
};
class WebrtcMediaCodecVP8VideoDecoder : public WebrtcVideoDecoder {
public:
WebrtcMediaCodecVP8VideoDecoder();

Просмотреть файл

@ -24,4 +24,5 @@ interface ICodec {
oneway void queueInput(in Sample sample);
oneway void releaseOutput(in Sample sample, in boolean render);
oneway void setRates(in int newBitRate);
}

Просмотреть файл

@ -35,6 +35,7 @@ public interface AsyncCodec {
public abstract ByteBuffer getInputBuffer(int index);
public abstract ByteBuffer getOutputBuffer(int index);
public abstract void queueInputBuffer(int index, int offset, int size, long presentationTimeUs, int flags);
public abstract void setRates(int newBitRate);
public abstract void queueSecureInputBuffer(int index, int offset, CryptoInfo info, long presentationTimeUs, int flags);
public abstract void releaseOutputBuffer(int index, boolean render);
}

Просмотреть файл

@ -339,7 +339,7 @@ import java.util.concurrent.ConcurrentLinkedQueue;
if (DEBUG) { Log.d(LOGTAG, "configure " + this); }
MediaFormat fmt = format.asFormat();
String codecName = getDecoderForFormat(fmt);
String codecName = getCodecForFormat(fmt, flags == MediaCodec.CONFIGURE_FLAG_ENCODE ? true : false);
if (codecName == null) {
Log.e(LOGTAG, "FAIL: cannot find codec");
return false;
@ -401,7 +401,7 @@ import java.util.concurrent.ConcurrentLinkedQueue;
mCodec = null;
}
private String getDecoderForFormat(MediaFormat format) {
private String getCodecForFormat(MediaFormat format, boolean isEncoder) {
String mime = format.getString(MediaFormat.KEY_MIME);
if (mime == null) {
return null;
@ -409,7 +409,7 @@ import java.util.concurrent.ConcurrentLinkedQueue;
int numCodecs = MediaCodecList.getCodecCount();
for (int i = 0; i < numCodecs; i++) {
MediaCodecInfo info = MediaCodecList.getCodecInfoAt(i);
if (info.isEncoder()) {
if (info.isEncoder() == !isEncoder) {
continue;
}
String[] types = info.getSupportedTypes();
@ -493,6 +493,15 @@ import java.util.concurrent.ConcurrentLinkedQueue;
mInputProcessor.onSample(sample);
}
@Override
public synchronized void setRates(int newBitRate) {
try {
mCodec.setRates(newBitRate);
} catch (Exception e) {
reportError(Error.FATAL, e);
}
}
@Override
public synchronized void releaseOutput(Sample sample, boolean render) {
try {

Просмотреть файл

@ -27,6 +27,7 @@ public final class CodecProxy {
private static final boolean DEBUG = false;
private ICodec mRemote;
private boolean mIsEncoder;
private FormatParam mFormat;
private Surface mOutputSurface;
private CallbacksForwarder mCallbacks;
@ -48,7 +49,9 @@ public final class CodecProxy {
public native void onError(boolean fatal);
@Override // JNIObject
protected native void disposeNative();
protected void disposeNative() {
throw new UnsupportedOperationException();
}
}
private class CallbacksForwarder extends ICodecCallbacks.Stub {
@ -100,21 +103,24 @@ public final class CodecProxy {
}
@WrapForJNI
public static CodecProxy create(MediaFormat format,
public static CodecProxy create(boolean isEncoder,
MediaFormat format,
Surface surface,
Callbacks callbacks,
String drmStubId) {
return RemoteManager.getInstance().createCodec(format, surface, callbacks, drmStubId);
return RemoteManager.getInstance().createCodec(isEncoder, format, surface, callbacks, drmStubId);
}
public static CodecProxy createCodecProxy(MediaFormat format,
public static CodecProxy createCodecProxy(boolean isEncoder,
MediaFormat format,
Surface surface,
Callbacks callbacks,
String drmStubId) {
return new CodecProxy(format, surface, callbacks, drmStubId);
return new CodecProxy(isEncoder, format, surface, callbacks, drmStubId);
}
private CodecProxy(MediaFormat format, Surface surface, Callbacks callbacks, String drmStubId) {
private CodecProxy(boolean isEncoder, MediaFormat format, Surface surface, Callbacks callbacks, String drmStubId) {
mIsEncoder = isEncoder;
mFormat = new FormatParam(format);
mOutputSurface = surface;
mRemoteDrmStubId = drmStubId;
@ -124,7 +130,7 @@ public final class CodecProxy {
boolean init(ICodec remote) {
try {
remote.setCallbacks(mCallbacks);
if (!remote.configure(mFormat, mOutputSurface, 0, mRemoteDrmStubId)) {
if (!remote.configure(mFormat, mOutputSurface, mIsEncoder ? MediaCodec.CONFIGURE_FLAG_ENCODE : 0, mRemoteDrmStubId)) {
return false;
}
remote.start();
@ -255,6 +261,32 @@ public final class CodecProxy {
return true;
}
@WrapForJNI
public synchronized boolean setRates(int newBitRate) {
if (!mIsEncoder) {
Log.w(LOGTAG, "this api is encoder-only");
return false;
}
if (android.os.Build.VERSION.SDK_INT < 19) {
Log.w(LOGTAG, "this api was added in API level 19");
return false;
}
if (mRemote == null) {
Log.w(LOGTAG, "codec already ended");
return true;
}
try {
mRemote.setRates(newBitRate);
} catch (RemoteException e) {
Log.e(LOGTAG, "remote fail to set rates:" + newBitRate);
e.printStackTrace();
}
return true;
}
@WrapForJNI
public synchronized boolean releaseOutput(Sample sample, boolean render) {
if (!mSurfaceOutputs.remove(sample)) {

Просмотреть файл

@ -19,6 +19,11 @@ import java.nio.ByteBuffer;
* <li>{@link MediaFormat#KEY_HEIGHT}</li>
* <li>{@link MediaFormat#KEY_CHANNEL_COUNT}</li>
* <li>{@link MediaFormat#KEY_SAMPLE_RATE}</li>
* <li>{@link MediaFormat#KEY_BIT_RATE}</li>
* <li>{@link MediaFormat#KEY_BITRATE_MODE}</li>
* <li>{@link MediaFormat#KEY_COLOR_FORMAT}</li>
* <li>{@link MediaFormat#KEY_FRAME_RATE}</li>
* <li>{@link MediaFormat#KEY_I_FRAME_INTERVAL}</li>
* <li>"csd-0"</li>
* <li>"csd-1"</li>
* </ul>
@ -94,6 +99,26 @@ public final class FormatParam implements Parcelable {
mFormat.setByteBuffer(KEY_CONFIG_1,
ByteBuffer.wrap(bundle.getByteArray((KEY_CONFIG_1))));
}
if (bundle.containsKey(MediaFormat.KEY_BIT_RATE)) {
mFormat.setInteger(MediaFormat.KEY_BIT_RATE,
bundle.getInt(MediaFormat.KEY_BIT_RATE));
}
if (bundle.containsKey(MediaFormat.KEY_BITRATE_MODE)) {
mFormat.setInteger(MediaFormat.KEY_BITRATE_MODE,
bundle.getInt(MediaFormat.KEY_BITRATE_MODE));
}
if (bundle.containsKey(MediaFormat.KEY_COLOR_FORMAT)) {
mFormat.setInteger(MediaFormat.KEY_COLOR_FORMAT,
bundle.getInt(MediaFormat.KEY_COLOR_FORMAT));
}
if (bundle.containsKey(MediaFormat.KEY_FRAME_RATE)) {
mFormat.setInteger(MediaFormat.KEY_FRAME_RATE,
bundle.getInt(MediaFormat.KEY_FRAME_RATE));
}
if (bundle.containsKey(MediaFormat.KEY_I_FRAME_INTERVAL)) {
mFormat.setInteger(MediaFormat.KEY_I_FRAME_INTERVAL,
bundle.getInt(MediaFormat.KEY_I_FRAME_INTERVAL));
}
}
@Override
@ -128,6 +153,21 @@ public final class FormatParam implements Parcelable {
bundle.putByteArray(KEY_CONFIG_1,
Sample.byteArrayFromBuffer(bytes, 0, bytes.capacity()));
}
if (mFormat.containsKey(MediaFormat.KEY_BIT_RATE)) {
bundle.putInt(MediaFormat.KEY_BIT_RATE, mFormat.getInteger(MediaFormat.KEY_BIT_RATE));
}
if (mFormat.containsKey(MediaFormat.KEY_BITRATE_MODE)) {
bundle.putInt(MediaFormat.KEY_BITRATE_MODE, mFormat.getInteger(MediaFormat.KEY_BITRATE_MODE));
}
if (mFormat.containsKey(MediaFormat.KEY_COLOR_FORMAT)) {
bundle.putInt(MediaFormat.KEY_COLOR_FORMAT, mFormat.getInteger(MediaFormat.KEY_COLOR_FORMAT));
}
if (mFormat.containsKey(MediaFormat.KEY_FRAME_RATE)) {
bundle.putInt(MediaFormat.KEY_FRAME_RATE, mFormat.getInteger(MediaFormat.KEY_FRAME_RATE));
}
if (mFormat.containsKey(MediaFormat.KEY_I_FRAME_INTERVAL)) {
bundle.putInt(MediaFormat.KEY_I_FRAME_INTERVAL, mFormat.getInteger(MediaFormat.KEY_I_FRAME_INTERVAL));
}
return bundle;
}
}

Просмотреть файл

@ -13,6 +13,7 @@ import android.os.Handler;
import android.os.HandlerThread;
import android.os.Looper;
import android.os.Message;
import android.os.Bundle;
import android.util.Log;
import android.view.Surface;
@ -332,12 +333,27 @@ final class JellyBeanAsyncCodec implements AsyncCodec {
}
}
@Override
public final void setRates(int newBitRate) {
if (android.os.Build.VERSION.SDK_INT >= 19) {
Bundle params = new Bundle();
params.putInt(MediaCodec.PARAMETER_KEY_VIDEO_BITRATE, newBitRate * 1000);
mCodec.setParameters(params);
}
}
@Override
public final void queueInputBuffer(int index, int offset, int size, long presentationTimeUs, int flags) {
assertCallbacks();
mInputEnded = (flags & MediaCodec.BUFFER_FLAG_END_OF_STREAM) != 0;
if ((android.os.Build.VERSION.SDK_INT >= 19) && ((flags & MediaCodec.BUFFER_FLAG_KEY_FRAME) != 0)) {
Bundle params = new Bundle();
params.putInt(MediaCodec.PARAMETER_KEY_REQUEST_SYNC_FRAME, 0);
mCodec.setParameters(params);
}
try {
mCodec.queueInputBuffer(index, offset, size, presentationTimeUs, flags);
} catch (IllegalStateException e) {

Просмотреть файл

@ -109,7 +109,8 @@ public final class RemoteManager implements IBinder.DeathRecipient {
return mConnection.connect();
}
public synchronized CodecProxy createCodec(MediaFormat format,
public synchronized CodecProxy createCodec(boolean isEncoder,
MediaFormat format,
Surface surface,
CodecProxy.Callbacks callbacks,
String drmStubId) {
@ -119,7 +120,7 @@ public final class RemoteManager implements IBinder.DeathRecipient {
}
try {
ICodec remote = mRemote.createCodec();
CodecProxy proxy = CodecProxy.createCodecProxy(format, surface, callbacks, drmStubId);
CodecProxy proxy = CodecProxy.createCodecProxy(isEncoder, format, surface, callbacks, drmStubId);
if (proxy.init(remote)) {
mProxies.add(proxy);
return proxy;

Просмотреть файл

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- 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/. -->
<clip xmlns:android="http://schemas.android.com/apk/res/android"
android:drawable="@drawable/url_bar_entry"
android:clipOrientation="horizontal"
android:gravity="left"/>

Просмотреть файл

@ -3,18 +3,12 @@
- 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/. -->
<merge xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:gecko="http://schemas.android.com/apk/res-auto">
<merge xmlns:android="http://schemas.android.com/apk/res/android">
<ImageView android:id="@+id/url_bar_entry"
style="@style/UrlBar.Entry"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignLeft="@+id/back"
android:layout_alignStart="@+id/back"
android:layout_toLeftOf="@id/menu_items"
android:layout_toStartOf="@id/menu_items"
android:layout_marginStart="@dimen/tablet_nav_button_width_half"
android:layout_marginLeft="@dimen/tablet_nav_button_width_half"
android:layout_marginTop="10dp"
android:layout_marginBottom="10dp"
android:duplicateParentState="true"
@ -40,10 +34,8 @@
(for paddingLeft) We use left padding to center the
arrow in the visible area as opposed to the true width. -->
<org.mozilla.gecko.toolbar.ForwardButton
style="@style/UrlBar.ImageButton.BrowserToolbarColors"
style="@style/UrlBar.ForwardButton"
android:id="@+id/forward"
android:layout_alignLeft="@id/back"
android:layout_alignStart="@id/back"
android:contentDescription="@string/forward"
android:layout_height="match_parent"
android:paddingTop="0dp"
@ -56,99 +48,63 @@
android:background="@drawable/url_bar_nav_button"
android:alpha="0"
android:layout_width="@dimen/tablet_nav_button_width_plus_half"
android:layout_marginLeft="@dimen/tablet_nav_button_width_half"
android:layout_marginStart="@dimen/tablet_nav_button_width_half"
android:paddingLeft="@dimen/tablet_fwd_button_padding_start"
android:paddingStart="@dimen/tablet_fwd_button_padding_start"
android:paddingRight="@dimen/tablet_fwd_button_padding_end"
android:paddingEnd="@dimen/tablet_fwd_button_padding_end"
/>
<org.mozilla.gecko.toolbar.BackButton android:id="@id/back"
style="@style/UrlBar.ImageButton.BrowserToolbarColors"
<org.mozilla.gecko.toolbar.BackButton android:id="@+id/back"
style="@style/UrlBar.BackButton"
android:layout_width="@dimen/tablet_nav_button_width"
android:layout_height="@dimen/tablet_nav_button_width"
android:layout_centerVertical="true"
android:layout_marginLeft="12dp"
android:layout_marginStart="12dp"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:src="@drawable/ic_menu_back"
android:contentDescription="@string/back"
android:background="@drawable/url_bar_nav_button"
/>
<org.mozilla.gecko.toolbar.ToolbarEditLayout android:id="@+id/edit_layout"
style="@style/UrlBar.Button"
android:paddingRight="12dp"
android:paddingEnd="12dp"
style="@style/UrlBar.EditLayout"
android:visibility="gone"
android:orientation="horizontal"
android:layout_toLeftOf="@id/menu_items"
android:layout_toStartOf="@id/menu_items"
android:layout_toRightOf="@id/back"
android:layout_toEndOf="@id/back"/>
/>
<!-- Note: we set the padding on the site security icon to increase its tappable area. -->
<org.mozilla.gecko.toolbar.ToolbarDisplayLayout android:id="@+id/display_layout"
style="@style/UrlBar.Button.Container"
android:layout_toRightOf="@id/back"
android:layout_toEndOf="@id/back"
android:layout_toLeftOf="@id/menu_items"
android:layout_toStartOf="@id/menu_items"
android:paddingRight="4dip"
android:paddingEnd="4dip"/>
style="@style/UrlBar.DisplayLayout"
/>
<LinearLayout android:id="@+id/menu_items"
style="@style/UrlBar.MenuItem"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:gravity="center_vertical"
android:layout_marginLeft="6dp"
android:layout_marginStart="6dp"
android:layout_toLeftOf="@id/tabs"
android:layout_toStartOf="@id/tabs"
android:orientation="horizontal"/>
<org.mozilla.gecko.widget.themed.ThemedImageButton
android:id="@+id/tabs"
style="@style/UrlBar.ImageButton"
android:layout_toLeftOf="@id/menu"
android:layout_toStartOf="@id/menu"
style="@style/UrlBar.Tabs"
android:layout_alignWithParentIfMissing="true"
android:background="@drawable/browser_toolbar_action_bar_button"/>
<!-- In a 56x60dp space, centering 24dp image will leave 16x18dp. -->
<org.mozilla.gecko.toolbar.TabCounter android:id="@+id/tabs_counter"
style="@style/UrlBar.ImageButton"
android:layout_alignLeft="@id/tabs"
android:layout_alignStart="@id/tabs"
android:layout_alignRight="@id/tabs"
android:layout_alignEnd="@id/tabs"
style="@style/UrlBar.TabCounter"
android:layout_alignTop="@id/tabs"
android:layout_alignBottom="@id/tabs"
android:layout_marginTop="18dp"
android:layout_marginBottom="18dp"
android:layout_marginLeft="16dp"
android:layout_marginStart="16dp"
android:layout_marginRight="16dp"
android:layout_marginEnd="16dp"
android:background="@drawable/tabs_count"/>
<!-- Bug 1144707. Use clickable View instead of menu button margin to prevent
edit mode actiivation when user clicks on the edge of the screen. -->
<View android:id="@id/menu_margin"
style="@style/UrlBar.MenuMargin"
android:layout_width="6dp"
android:layout_height="match_parent"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"
android:clickable="true"
android:visibility="gone"/>
<org.mozilla.gecko.widget.themed.ThemedFrameLayout
android:id="@+id/menu"
style="@style/UrlBar.ImageButton"
android:layout_toLeftOf="@id/menu_margin"
android:layout_toStartOf="@id/menu_margin"
style="@style/UrlBar.Menu"
android:layout_alignWithParentIfMissing="true"
android:contentDescription="@string/menu"
android:background="@drawable/browser_toolbar_action_bar_button">
@ -168,12 +124,10 @@
which is thus drawn on top, may be pressed. -->
<org.mozilla.gecko.widget.themed.ThemedImageView
android:id="@+id/edit_cancel"
style="@style/UrlBar.ImageButton"
style="@style/UrlBar.EditCancel"
android:layout_width="@dimen/browser_toolbar_icon_width"
android:layout_height="@dimen/browser_toolbar_height"
android:layout_weight="0.0"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"
android:src="@drawable/close_edit_mode_selector"
android:contentDescription="@string/edit_mode_cancel"
android:visibility="gone"/>

Просмотреть файл

@ -8,15 +8,9 @@
<!-- Note: any layout parameters setting the right edge of
this View should be matched in the url_bar_translating_edge. -->
<ImageView android:id="@+id/url_bar_entry"
style="@style/UrlBar.Button"
android:layout_marginLeft="8dp"
android:layout_marginStart="8dp"
android:layout_marginRight="-6dp"
android:layout_marginEnd="-6dp"
style="@style/UrlBar.Entry"
android:layout_marginTop="8dp"
android:layout_marginBottom="8dp"
android:layout_toLeftOf="@+id/tabs"
android:layout_toStartOf="@+id/tabs"
android:duplicateParentState="true"
android:clickable="false"
android:focusable="false"
@ -27,11 +21,7 @@
around it to animate growing the url bar,
which occurs in the display/editing mode transitions. -->
<ImageView android:id="@+id/url_bar_translating_edge"
style="@style/UrlBar.Button"
android:layout_alignLeft="@id/url_bar_entry"
android:layout_alignStart="@id/url_bar_entry"
android:layout_alignRight="@+id/url_bar_entry"
android:layout_alignEnd="@+id/url_bar_entry"
style="@style/UrlBar.Edge"
android:layout_alignTop="@id/url_bar_entry"
android:layout_alignBottom="@id/url_bar_entry"
android:duplicateParentState="true"
@ -43,9 +33,7 @@
<org.mozilla.gecko.toolbar.ShapedButtonFrameLayout
android:id="@+id/menu"
style="@style/UrlBar.ImageButton"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"
style="@style/UrlBar.Menu"
android:contentDescription="@string/menu"
android:background="@drawable/shaped_button">
@ -62,10 +50,8 @@
</org.mozilla.gecko.toolbar.ShapedButtonFrameLayout>
<org.mozilla.gecko.toolbar.PhoneTabsButton android:id="@+id/tabs"
style="@style/UrlBar.ImageButton"
style="@style/UrlBar.Tabs"
android:layout_width="64dip"
android:layout_toLeftOf="@id/menu"
android:layout_toStartOf="@id/menu"
android:layout_alignWithParentIfMissing="true"
android:background="@drawable/shaped_button"/>
@ -76,14 +62,10 @@
The margins will be 40dp on left, 8dp on right, instead of ideal 30dp
and 12dp. -->
<org.mozilla.gecko.toolbar.TabCounter android:id="@+id/tabs_counter"
style="@style/UrlBar.ImageButton"
style="@style/UrlBar.TabCounter"
android:layout_width="24dip"
android:layout_height="24dip"
android:layout_centerVertical="true"
android:layout_marginRight="8dip"
android:layout_marginEnd="8dip"
android:layout_alignRight="@id/tabs"
android:layout_alignEnd="@id/tabs"
android:background="@drawable/tabs_count"
android:gravity="center_horizontal"
android:clipChildren="false"
@ -93,9 +75,7 @@
depending on their location can properly layout. -->
<org.mozilla.gecko.widget.themed.ThemedImageView
android:id="@+id/edit_cancel"
style="@style/UrlBar.ImageButton"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"
style="@style/UrlBar.EditCancel"
android:src="@drawable/close_edit_mode_selector"
android:contentDescription="@string/edit_mode_cancel"
android:background="@drawable/action_bar_button"
@ -105,26 +85,12 @@
the url bar drawable contains some whitespace, so we compensate by removing
some padding from the right (value determined through experimentation). -->
<org.mozilla.gecko.toolbar.ToolbarEditLayout android:id="@+id/edit_layout"
style="@style/UrlBar.Button"
android:layout_alignLeft="@id/url_bar_entry"
android:layout_alignStart="@id/url_bar_entry"
android:layout_toLeftOf="@id/edit_cancel"
android:layout_toStartOf="@id/edit_cancel"
style="@style/UrlBar.EditLayout"
android:visibility="invisible"
android:paddingLeft="8dp"
android:paddingStart="8dp"
android:paddingRight="8dp"
android:paddingEnd="8dp"/>
/>
<org.mozilla.gecko.toolbar.ToolbarDisplayLayout android:id="@+id/display_layout"
style="@style/UrlBar.Button"
android:layout_alignLeft="@id/url_bar_entry"
android:layout_alignStart="@id/url_bar_entry"
android:layout_alignRight="@id/url_bar_entry"
android:layout_alignEnd="@id/url_bar_entry"
android:paddingLeft="1dip"
android:paddingStart="1dip"
android:paddingRight="4dip"
android:paddingEnd="4dip" />
style="@style/UrlBar.DisplayLayout"
/>
</merge>

Просмотреть файл

@ -0,0 +1,86 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="UrlBar.MenuMargin" parent="UrlBar.V17.MenuMargin" />
<style name="UrlBar.V17.MenuMargin" parent="UrlBar.Base.MenuMargin">
<item name="android:layout_alignParentEnd">true</item>
</style>
<style name="UrlBar.Menu" parent="UrlBar.V17.Menu" />
<style name="UrlBar.V17.Menu" parent="UrlBar.Base.Menu">
<item name="android:layout_toStartOf">@id/menu_margin</item>
</style>
<style name="UrlBar.MenuItem" parent="UrlBar.V17.MenuItem" />
<style name="UrlBar.V17.MenuItem" parent="UrlBar.Base.MenuItem">
<item name="android:layout_marginStart">6dp</item>
<item name="android:layout_toStartOf">@id/tabs</item>
</style>
<style name="UrlBar.Tabs" parent="UrlBar.V17.Tabs" />
<style name="UrlBar.V17.Tabs" parent="UrlBar.Base.Tabs">
<item name="android:layout_toStartOf">@id/menu</item>
</style>
<style name="UrlBar.TabCounter" parent="UrlBar.V17.TabCounter" />
<style name="UrlBar.V17.TabCounter" parent="UrlBar.Base.TabCounter">
<item name="android:layout_alignStart">@id/tabs</item>
<item name="android:layout_alignEnd">@id/tabs</item>
<item name="android:layout_marginStart">16dp</item>
<item name="android:layout_marginEnd">16dp</item>
</style>
<style name="UrlBar.Entry" parent="UrlBar.V17.Entry" />
<style name="UrlBar.V17.Entry" parent="UrlBar.Base.Entry">
<item name="android:layout_alignStart">@id/back</item>
<item name="android:layout_toStartOf">@id/menu_items</item>
<item name="android:layout_marginStart">@dimen/tablet_nav_button_width_half</item>
</style>
<style name="UrlBar.ForwardButton" parent="UrlBar.V17.ForwardButton" />
<style name="UrlBar.V17.ForwardButton" parent="UrlBar.Base.ForwardButton">
<item name="android:layout_alignStart">@id/back</item>
<item name="android:layout_marginStart">@dimen/tablet_nav_button_width_half</item>
<item name="android:paddingStart">@dimen/tablet_fwd_button_padding_start</item>
<item name="android:paddingEnd">@dimen/tablet_fwd_button_padding_end</item>
</style>
<style name="UrlBar.BackButton" parent="UrlBar.V17.BackButton" />
<style name="UrlBar.V17.BackButton" parent="UrlBar.Base.BackButton">
<item name="android:layout_marginStart">12dp</item>
<item name="android:layout_alignParentStart">true</item>
</style>
<style name="UrlBar.EditLayout" parent="UrlBar.V17.EditLayout" />
<style name="UrlBar.V17.EditLayout" parent="UrlBar.Base.EditLayout">
<item name="android:paddingStart">0dp</item>
<item name="android:paddingEnd">12dp</item>
<item name="android:layout_toStartOf">@id/menu_items</item>
<item name="android:layout_toEndOf">@id/back</item>
</style>
<style name="UrlBar.DisplayLayout" parent="UrlBar.V17.DisplayLayout" />
<style name="UrlBar.V17.DisplayLayout" parent="UrlBar.Base.DisplayLayout">
<item name="android:layout_toStartOf">@id/menu_items</item>
<item name="android:layout_toEndOf">@id/back</item>
<item name="android:paddingStart">0dip</item>
<item name="android:paddingEnd">4dip</item>
</style>
<style name="UrlBar.EditCancel" parent="UrlBar.V17.EditCancel" />
<style name="UrlBar.V17.EditCancel" parent="UrlBar.Base.EditCancel">
<item name="android:layout_alignParentEnd">true</item>
</style>
</resources>

Просмотреть файл

@ -82,4 +82,110 @@
<item name="android:textSize">16sp</item>
</style>
<style name="UrlBar.Base" />
<style name="UrlBar.MenuMargin" parent="UrlBar.V15.MenuMargin" />
<style name="UrlBar.Base.MenuMargin" />
<style name="UrlBar.V15.MenuMargin" parent="UrlBar.Base.MenuMargin">
<item name="android:layout_alignParentRight">true</item>
</style>
<style name="UrlBar.Menu" parent="UrlBar.V15.Menu" />
<style name="UrlBar.Base.Menu" parent="UrlBar.ImageButton" />
<style name="UrlBar.V15.Menu" parent="UrlBar.Base.Menu">
<item name="android:layout_toLeftOf">@id/menu_margin</item>
</style>
<style name="UrlBar.MenuItem" parent="UrlBar.V15.MenuItem" />
<style name="UrlBar.Base.MenuItem" />
<style name="UrlBar.V15.MenuItem" parent="UrlBar.Base.MenuItem">
<item name="android:layout_marginLeft">6dp</item>
<item name="android:layout_toLeftOf">@id/tabs</item>
</style>
<style name="UrlBar.Tabs" parent="UrlBar.V15.Tabs" />
<style name="UrlBar.Base.Tabs" parent="UrlBar.ImageButton" />
<style name="UrlBar.V15.Tabs" parent="UrlBar.Base.Tabs">
<item name="android:layout_toLeftOf">@id/menu</item>
</style>
<style name="UrlBar.TabCounter" parent="UrlBar.V15.TabCounter" />
<style name="UrlBar.Base.TabCounter" parent="UrlBar.ImageButton" />
<style name="UrlBar.V15.TabCounter" parent="UrlBar.Base.TabCounter">
<item name="android:layout_alignLeft">@id/tabs</item>
<item name="android:layout_alignRight">@id/tabs</item>
<item name="android:layout_marginLeft">16dp</item>
<item name="android:layout_marginRight">16dp</item>
<item name="android:layout_toLeftOf">@id/menu</item>
</style>
<style name="UrlBar.Entry" parent="UrlBar.V15.Entry" />
<style name="UrlBar.Base.Entry" />
<style name="UrlBar.V15.Entry" parent="UrlBar.Base.Entry">
<item name="android:layout_alignLeft">@id/back</item>
<item name="android:layout_toLeftOf">@id/menu_items</item>
<item name="android:layout_marginLeft">@dimen/tablet_nav_button_width_half</item>
</style>
<style name="UrlBar.ForwardButton" parent="UrlBar.V15.ForwardButton" />
<style name="UrlBar.Base.ForwardButton" parent="UrlBar.ImageButton.BrowserToolbarColors" />
<style name="UrlBar.V15.ForwardButton" parent="UrlBar.Base.ForwardButton">
<item name="android:layout_alignLeft">@id/back</item>
<item name="android:layout_marginLeft">@dimen/tablet_nav_button_width_half</item>
<item name="android:paddingLeft">@dimen/tablet_fwd_button_padding_start</item>
<item name="android:paddingRight">@dimen/tablet_fwd_button_padding_end</item>
</style>
<style name="UrlBar.BackButton" parent="UrlBar.V15.BackButton" />
<style name="UrlBar.Base.BackButton" parent="UrlBar.ImageButton.BrowserToolbarColors" />
<style name="UrlBar.V15.BackButton" parent="UrlBar.Base.BackButton">
<item name="android:layout_marginLeft">12dp</item>
<item name="android:layout_alignParentLeft">true</item>
</style>
<style name="UrlBar.EditLayout" parent="UrlBar.V15.EditLayout" />
<style name="UrlBar.Base.EditLayout" parent="UrlBar.Button" />
<style name="UrlBar.V15.EditLayout" parent="UrlBar.Base.EditLayout">
<item name="android:paddingRight">12dp</item>
<item name="android:layout_toLeftOf">@id/menu_items</item>
<item name="android:layout_toRightOf">@id/back</item>
</style>
<style name="UrlBar.DisplayLayout" parent="UrlBar.V15.DisplayLayout" />
<style name="UrlBar.Base.DisplayLayout" parent="UrlBar.Button.Container" />
<style name="UrlBar.V15.DisplayLayout" parent="UrlBar.Base.DisplayLayout">
<item name="android:layout_toLeftOf">@id/menu_items</item>
<item name="android:layout_toRightOf">@id/back</item>
<item name="android:paddingLeft">0dip</item>
<item name="android:paddingRight">4dip</item>
</style>
<style name="UrlBar.EditCancel" parent="UrlBar.V15.EditCancel" />
<style name="UrlBar.Base.EditCancel" parent="UrlBar.ImageButton" />
<style name="UrlBar.V15.EditCancel" parent="UrlBar.Base.EditCancel">
<item name="android:layout_alignParentRight">true</item>
</style>
</resources>

Просмотреть файл

@ -0,0 +1,62 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="UrlBar.Entry" parent="UrlBar.V17.Entry" />
<style name="UrlBar.V17.Entry" parent="UrlBar.Base.Entry">
<item name="android:layout_marginStart">8dp</item>
<item name="android:layout_marginEnd">-6dp</item>
<item name="android:layout_toStartOf">@+id/tabs</item>
</style>
<style name="UrlBar.Edge" parent="UrlBar.V17.Edge" />
<style name="UrlBar.V17.Edge" parent="UrlBar.Base.Edge">
<item name="android:layout_alignStart">@id/url_bar_entry</item>
<item name="android:layout_alignEnd">@+id/url_bar_entry</item>
</style>
<style name="UrlBar.Menu" parent="UrlBar.V17.Menu" />
<style name="UrlBar.V17.Menu" parent="UrlBar.Base.Menu">
<item name="android:layout_alignParentEnd">true</item>
</style>
<style name="UrlBar.Tabs" parent="UrlBar.V17.Tabs" />
<style name="UrlBar.V17.Tabs" parent="UrlBar.Base.Tabs">
<item name="android:layout_toStartOf">@id/menu</item>
</style>
<style name="UrlBar.TabCounter" parent="UrlBar.V17.TabCounter" />
<style name="UrlBar.V17.TabCounter" parent="UrlBar.Base.TabCounter">
<item name="android:layout_marginEnd">8dip</item>
<item name="android:layout_alignEnd">@id/tabs</item>
</style>
<style name="UrlBar.EditCancel" parent="UrlBar.V17.EditCancel" />
<style name="UrlBar.V17.EditCancel" parent="UrlBar.Base.EditCancel">
<item name="android:layout_alignParentEnd">true</item>
</style>
<style name="UrlBar.EditLayout" parent="UrlBar.V17.EditLayout" />
<style name="UrlBar.V17.EditLayout" parent="UrlBar.Base.EditLayout">
<item name="android:layout_alignStart">@id/url_bar_entry</item>
<item name="android:layout_toStartOf">@id/edit_cancel</item>
<item name="android:paddingStart">8dp</item>
<item name="android:paddingEnd">8dp</item>
</style>
<style name="UrlBar.DisplayLayout" parent="UrlBar.V17.DisplayLayout" />
<style name="UrlBar.V17.DisplayLayout" parent="UrlBar.Base.DisplayLayout">
<item name="android:layout_alignStart">@id/url_bar_entry</item>
<item name="android:layout_alignEnd">@id/url_bar_entry</item>
<item name="android:paddingStart">1dip</item>
<item name="android:paddingEnd">4dip</item>
</style>
</resources>

Просмотреть файл

@ -805,4 +805,63 @@
<item name="android:textColor">@android:color/white</item>
</style>
<style name="UrlBar.Entry" parent="UrlBar.V15.Entry"/>
<style name="UrlBar.Base.Entry" parent="UrlBar.Button"/>
<style name="UrlBar.V15.Entry" parent="UrlBar.Base.Entry">
<item name="android:layout_marginLeft">8dp</item>
<item name="android:layout_marginRight">-6dp</item>
<item name="android:layout_toLeftOf">@+id/tabs</item>
</style>
<style name="UrlBar.Edge" parent="UrlBar.V15.Edge"/>
<style name="UrlBar.Base.Edge" parent="UrlBar.Button"/>
<style name="UrlBar.V15.Edge" parent="UrlBar.Base.Edge">
<item name="android:layout_alignLeft">@id/url_bar_entry</item>
<item name="android:layout_alignRight">@+id/url_bar_entry</item>
</style>
<style name="UrlBar.Menu" parent="UrlBar.V15.Menu"/>
<style name="UrlBar.Base.Menu" parent="UrlBar.ImageButton"/>
<style name="UrlBar.V15.Menu" parent="UrlBar.Base.Menu">
<item name="android:layout_alignParentRight">true</item>
</style>
<style name="UrlBar.Tabs" parent="UrlBar.V15.Tabs"/>
<style name="UrlBar.Base.Tabs" parent="UrlBar.ImageButton"/>
<style name="UrlBar.V15.Tabs" parent="UrlBar.Base.Tabs">
<item name="android:layout_toLeftOf">@id/menu</item>
</style>
<style name="UrlBar.TabCounter" parent="UrlBar.V15.TabCounter"/>
<style name="UrlBar.Base.TabCounter" parent="UrlBar.ImageButton"/>
<style name="UrlBar.V15.TabCounter" parent="UrlBar.Base.TabCounter">
<item name="android:layout_marginRight">8dip</item>
<item name="android:layout_alignRight">@id/tabs</item>
</style>
<style name="UrlBar.EditCancel" parent="UrlBar.V15.EditCancel"/>
<style name="UrlBar.Base.EditCancel" parent="UrlBar.ImageButton"/>
<style name="UrlBar.V15.EditCancel" parent="UrlBar.Base.EditCancel">
<item name="android:layout_alignParentRight">true</item>
</style>
<style name="UrlBar.EditLayout" parent="UrlBar.V15.EditLayout"/>
<style name="UrlBar.Base.EditLayout" parent="UrlBar.Button"/>
<style name="UrlBar.V15.EditLayout" parent="UrlBar.Base.EditLayout">
<item name="android:layout_alignLeft">@id/url_bar_entry</item>
<item name="android:layout_toLeftOf">@id/edit_cancel</item>
<item name="android:paddingLeft">8dp</item>
<item name="android:paddingRight">8dp</item>
</style>
<style name="UrlBar.DisplayLayout" parent="UrlBar.V15.DisplayLayout"/>
<style name="UrlBar.Base.DisplayLayout" parent="UrlBar.Button"/>
<style name="UrlBar.V15.DisplayLayout" parent="UrlBar.Base.DisplayLayout">
<item name="android:layout_alignLeft">@id/url_bar_entry</item>
<item name="android:layout_alignRight">@id/url_bar_entry</item>
<item name="android:paddingLeft">1dip</item>
<item name="android:paddingRight">4dip</item>
</style>
</resources>

Просмотреть файл

@ -10,12 +10,45 @@ This needs to stay in sync with the copy in mobile/locales.
def test(mod, path, entity = None):
import re
# ignore anything but mobile, which is our local repo checkout name
if mod not in ("netwerk", "dom", "toolkit", "security/manager",
"devtools/shared",
"services/sync", "mobile",
if mod not in ("dom", "toolkit", "mobile",
"mobile/android/base", "mobile/android"):
return "ignore"
if mod == "toolkit":
# keep this file list in sync with jar.mn
if path in (
"chrome/global/about.dtd",
"chrome/global/aboutAbout.dtd",
"chrome/global/aboutReader.properties",
"chrome/global/aboutRights.dtd",
"chrome/global/charsetMenu.properties",
"chrome/global/commonDialogs.properties",
"chrome/global/intl.properties",
"chrome/global/intl.css",
"chrome/passwordmgr/passwordmgr.properties",
"chrome/search/search.properties",
"chrome/pluginproblem/pluginproblem.dtd",
"chrome/global/aboutSupport.dtd",
"chrome/global/aboutSupport.properties",
"crashreporter/crashes.dtd",
"crashreporter/crashes.properties",
"chrome/global/mozilla.dtd",
"chrome/global/aboutTelemetry.dtd",
"chrome/global/aboutTelemetry.properties",
"chrome/global/aboutWebrtc.properties"):
return "error"
return "ignore"
if mod == "dom":
# keep this file list in sync with jar.mn
if path in (
"chrome/global.dtd",
"chrome/accessibility/AccessFu.properties",
"chrome/dom/dom.properties",
"chrome/plugins.properties"):
return "error"
return "ignore"
if mod not in ("mobile", "mobile/android"):
# we only have exceptions for mobile*
return "error"

Просмотреть файл

@ -37,6 +37,7 @@
% resource search-plugins chrome://browser/locale/searchplugins/
# overrides for toolkit l10n, also for en-US
# keep this file list in sync with filter.py
relativesrcdir toolkit/locales:
locale/@AB_CD@/browser/overrides/about.dtd (%chrome/global/about.dtd)
locale/@AB_CD@/browser/overrides/aboutAbout.dtd (%chrome/global/aboutAbout.dtd)
@ -86,6 +87,7 @@ relativesrcdir toolkit/locales:
% override chrome://global/locale/aboutWebrtc.properties chrome://browser/locale/overrides/global/aboutWebrtc.properties
# overrides for dom l10n, also for en-US
# keep this file list in sync with filter.py
relativesrcdir dom/locales:
locale/@AB_CD@/browser/overrides/global.dtd (%chrome/global.dtd)
locale/@AB_CD@/browser/overrides/AccessFu.properties (%chrome/accessibility/AccessFu.properties)

Просмотреть файл

@ -10,12 +10,45 @@ This needs to stay in sync with the copy in mobile/android/locales.
def test(mod, path, entity = None):
import re
# ignore anything but mobile, which is our local repo checkout name
if mod not in ("netwerk", "dom", "toolkit", "security/manager",
"devtools/shared",
"services/sync", "mobile",
if mod not in ("dom", "toolkit", "mobile",
"mobile/android/base", "mobile/android"):
return "ignore"
if mod == "toolkit":
# keep this file list in sync with jar.mn
if path in (
"chrome/global/about.dtd",
"chrome/global/aboutAbout.dtd",
"chrome/global/aboutReader.properties",
"chrome/global/aboutRights.dtd",
"chrome/global/charsetMenu.properties",
"chrome/global/commonDialogs.properties",
"chrome/global/intl.properties",
"chrome/global/intl.css",
"chrome/passwordmgr/passwordmgr.properties",
"chrome/search/search.properties",
"chrome/pluginproblem/pluginproblem.dtd",
"chrome/global/aboutSupport.dtd",
"chrome/global/aboutSupport.properties",
"crashreporter/crashes.dtd",
"crashreporter/crashes.properties",
"chrome/global/mozilla.dtd",
"chrome/global/aboutTelemetry.dtd",
"chrome/global/aboutTelemetry.properties",
"chrome/global/aboutWebrtc.properties"):
return "error"
return "ignore"
if mod == "dom":
# keep this file list in sync with jar.mn
if path in (
"chrome/global.dtd",
"chrome/accessibility/AccessFu.properties",
"chrome/dom/dom.properties",
"chrome/plugins.properties"):
return "error"
return "ignore"
if mod not in ("mobile", "mobile/android"):
# we only have exceptions for mobile*
return "error"

Просмотреть файл

@ -514,6 +514,7 @@ pref("media.getusermedia.playout_delay", 100);
pref("media.navigator.audio.full_duplex", true);
// Whether to enable Webrtc Hardware acceleration support
pref("media.navigator.hardware.vp8_encode.acceleration_enabled", false);
pref("media.navigator.hardware.vp8_encode.acceleration_remote_enabled", false);
pref("media.navigator.hardware.vp8_decode.acceleration_enabled", false);
#elif defined(XP_LINUX)
pref("media.peerconnection.capture_delay", 70);

Просмотреть файл

@ -1157,4 +1157,4 @@ static const TransportSecurityPreload kPublicKeyPinningPreloadList[] = {
static const int32_t kUnknownId = -1;
static const PRTime kPreloadPKPinsExpirationTime = INT64_C(1499352989214000);
static const PRTime kPreloadPKPinsExpirationTime = INT64_C(1499442522796000);

Просмотреть файл

@ -18,7 +18,7 @@
123plons.nl: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: /builds/slave/m-cen-l64-periodicupdate-00000/getHSTSPreloadList.js :: processStsHeader :: line 118" data: no]
123test.de: did not receive HSTS header
126ium.moe: could not connect to host
127011-networks.ch: did not receive HSTS header
127011-networks.ch: could not connect to host
12vpnchina.com: could not connect to host
16packets.com: could not connect to host
188betwarriors.co.uk: could not connect to host
@ -35,12 +35,13 @@
2859cc.com: could not connect to host
2brokegirls.org: could not connect to host
2intermediate.co.uk: did not receive HSTS header
2krueger.de: could not connect to host
2or3.tk: could not connect to host
2smart4food.com: did not receive HSTS header
2ss.jp: did not receive HSTS header
300651.ru: did not receive HSTS header
300m.com: did not receive HSTS header
300mbmovies4u.cc: could not connect to host
300mbmovies4u.cc: did not receive HSTS header
301.website: could not connect to host
302.nyc: could not connect to host
33drugstore.com: did not receive HSTS header
@ -90,6 +91,7 @@ aaeblog.org: did not receive HSTS header
aapp.space: could not connect to host
aaron-gustafson.com: did not receive HSTS header
aati.info: did not receive HSTS header
abe.cloud: could not connect to host
abearofsoap.com: could not connect to host
abecodes.net: did not receive HSTS header
abeestrada.com: did not receive HSTS header
@ -144,7 +146,6 @@ adquisitio.de: could not connect to host
adquisitio.es: could not connect to host
adquisitio.fr: could not connect to host
adquisitio.it: could not connect to host
adrenaline-gaming.ru: could not connect to host
adrianseo.ro: did not receive HSTS header
adrl.ca: could not connect to host
adsfund.org: could not connect to host
@ -157,11 +158,11 @@ aerialmediapro.net: could not connect to host
aes256.ru: could not connect to host
aether.pw: could not connect to host
aevpn.net: could not connect to host
af-fotografie.net: could not connect to host
aficotroceni.ro: did not receive HSTS header
afp548.tk: could not connect to host
afyou.co.kr: could not connect to host
agalaxyfarfaraway.co.uk: could not connect to host
agate.pw: could not connect to host
agbremen.de: did not receive HSTS header
agentseeker.ca: did not receive HSTS header
agrimap.com: did not receive HSTS header
@ -239,6 +240,7 @@ amunoz.org: did not receive HSTS header
anadoluefessporkulubu.org: could not connect to host
anagra.ms: could not connect to host
analytic-s.ml: did not receive HSTS header
analyticum.at: could not connect to host
anarchistischegroepnijmegen.nl: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: /builds/slave/m-cen-l64-periodicupdate-00000/getHSTSPreloadList.js :: processStsHeader :: line 118" data: no]
anassiriphotography.com: could not connect to host
ancientkarma.com: could not connect to host
@ -248,9 +250,7 @@ andreasbreitenlohner.de: did not receive HSTS header
andreasfritz-fotografie.de: could not connect to host
andreastoneman.com: could not connect to host
andreigec.net: did not receive HSTS header
andrew.london: did not receive HSTS header
andrewbroekman.com: could not connect to host
andrewhowden.com: did not receive HSTS header
andrewmichaud.beer: could not connect to host
andrewregan.me: could not connect to host
andreypopp.com: could not connect to host
@ -386,6 +386,7 @@ auraredshield.com: did not receive HSTS header
auroratownshipfd.org: could not connect to host
ausnah.me: could not connect to host
ausoptic.com.au: max-age too low: 2592000
aussiecable.org: did not receive HSTS header
auth.mail.ru: did not receive HSTS header
authentication.io: could not connect to host
authoritynutrition.com: did not receive HSTS header
@ -457,7 +458,7 @@ baumstark.ca: could not connect to host
baysse.eu: could not connect to host
bazarstupava.sk: could not connect to host
bazdell.com: could not connect to host
bbb1991.me: could not connect to host
bbb1991.me: did not receive HSTS header
bcbsmagentprofile.com: could not connect to host
bcchack.com: could not connect to host
bccx.com: could not connect to host
@ -481,7 +482,7 @@ bedeta.de: could not connect to host
bedreid.dk: did not receive HSTS header
bedrijvenadministratie.nl: did not receive HSTS header
beholdthehurricane.com: could not connect to host
beier.io: could not connect to host
beier.io: did not receive HSTS header
belairsewvac.com: could not connect to host
belics.com: did not receive HSTS header
belltower.io: could not connect to host
@ -551,7 +552,6 @@ bitfarm-archiv.de: did not receive HSTS header
bitgo.com: max-age too low: 0
bitheus.com: could not connect to host
bithosting.io: did not receive HSTS header
bitmoe.com: could not connect to host
bitnet.io: did not receive HSTS header
bitraum.io: could not connect to host
bitsafe.systems: did not receive HSTS header
@ -570,7 +570,6 @@ blackpayment.ru: could not connect to host
blackscytheconsulting.com: could not connect to host
blackunicorn.wtf: could not connect to host
blakerandall.xyz: could not connect to host
blaudev.es: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: /builds/slave/m-cen-l64-periodicupdate-00000/getHSTSPreloadList.js :: processStsHeader :: line 118" data: no]
blendlecdn.com: could not connect to host
blenheimchalcot.com: did not receive HSTS header
blha303.com.au: could not connect to host
@ -606,7 +605,6 @@ bonigo.de: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_
bonitabrazilian.co.nz: did not receive HSTS header
bonobo.cz: could not connect to host
bonop.com: did not receive HSTS header
bonta.one: could not connect to host
bookcelerator.com: did not receive HSTS header
booked.holiday: could not connect to host
bookofraonlinecasinos.com: did not receive HSTS header
@ -770,7 +768,7 @@ cctech.ph: did not receive HSTS header
cd.search.yahoo.com: did not receive HSTS header
cd0.us: could not connect to host
cdnb.co: could not connect to host
cdndepo.com: did not receive HSTS header
cdndepo.com: could not connect to host
cdreporting.co.uk: did not receive HSTS header
celina-reads.de: did not receive HSTS header
cellsites.nz: could not connect to host
@ -816,6 +814,7 @@ cheerflow.com: could not connect to host
cheesetart.my: could not connect to host
cheetah85.de: could not connect to host
chejianer.cn: did not receive HSTS header
chenky.com: could not connect to host
chensir.net: could not connect to host
chepaofen.com: could not connect to host
cherysunzhang.com: max-age too low: 7776000
@ -854,6 +853,7 @@ ciplanutrition.com: did not receive HSTS header
ciscommerce.net: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: /builds/slave/m-cen-l64-periodicupdate-00000/getHSTSPreloadList.js :: processStsHeader :: line 118" data: no]
citiagent.cz: could not connect to host
cityoflaurel.org: did not receive HSTS header
ciuciucadou.ro: could not connect to host
cium.ru: could not connect to host
clara-baumert.de: could not connect to host
classicsandexotics.com: did not receive HSTS header
@ -873,6 +873,7 @@ clientsecure.me: could not connect to host
clint.id.au: max-age too low: 0
clintonbloodworth.com: did not receive HSTS header
clintonbloodworth.io: could not connect to host
clintonlibrary.gov: could not connect to host
clintwilson.technology: max-age too low: 2592000
cloud.wtf: could not connect to host
cloudapi.vc: could not connect to host
@ -881,6 +882,7 @@ cloudcy.net: could not connect to host
clouddesktop.co.nz: could not connect to host
cloudey.net: could not connect to host
cloudflare.com: did not receive HSTS header
cloudily.com: could not connect to host
cloudimag.es: could not connect to host
cloudlink.club: could not connect to host
cloudns.com.au: could not connect to host
@ -915,6 +917,7 @@ codelayer.ca: could not connect to host
codelitmus.com: did not receive HSTS header
codemonkeyrawks.net: could not connect to host
codepoet.de: could not connect to host
codepult.com: could not connect to host
codepx.com: did not receive HSTS header
codewiththepros.org: could not connect to host
codiva.io: max-age too low: 2592000
@ -1113,7 +1116,6 @@ davidhunter.scot: did not receive HSTS header
davidnoren.com: did not receive HSTS header
davidreinhardt.de: could not connect to host
daylightcompany.com: did not receive HSTS header
dayman.net: did not receive HSTS header
daytonaseaside.com: did not receive HSTS header
db.gy: could not connect to host
dbx.ovh: could not connect to host
@ -1207,7 +1209,6 @@ digitalskillswap.com: could not connect to host
dim.lighting: could not connect to host
dinamoelektrik.com: max-age too low: 0
dinkum.online: could not connect to host
disclosure.io: did not receive HSTS header
discovery.lookout.com: did not receive HSTS header
dislocated.de: did not receive HSTS header
disowned.net: max-age too low: 0
@ -1298,6 +1299,7 @@ dullsir.com: did not receive HSTS header
dutchessuganda.com: did not receive HSTS header
dutchrank.com: could not connect to host
dwhd.org: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: /builds/slave/m-cen-l64-periodicupdate-00000/getHSTSPreloadList.js :: processStsHeader :: line 118" data: no]
dworzak.ch: could not connect to host
dycontrol.de: could not connect to host
dylanscott.com.au: did not receive HSTS header
dynamic-innovations.net: could not connect to host
@ -1327,7 +1329,7 @@ ecake.in: could not connect to host
ecdn.cz: could not connect to host
ecfs.link: could not connect to host
ecg.fr: could not connect to host
echipstore.com: did not receive HSTS header
echipstore.com: could not connect to host
ecogen.net.au: could not connect to host
ecole-en-danger.fr: could not connect to host
ecole-maternelle-saint-joseph.be: could not connect to host
@ -1427,7 +1429,6 @@ envygeeks.io: did not receive HSTS header
eol34.com: did not receive HSTS header
epanurse.com: could not connect to host
ephry.com: could not connect to host
epicwalnutcreek.com: did not receive HSTS header
epoxate.com: could not connect to host
eq8.net.au: could not connect to host
equilibre-yoga-jennifer-will.com: could not connect to host
@ -1460,6 +1461,7 @@ essexcosmeticdentists.co.uk: did not receive HSTS header
essexghosthunters.co.uk: did not receive HSTS header
estilosapeca.com: could not connect to host
et-buchholz.de: could not connect to host
etaxi.tn: could not connect to host
etdonline.co.uk: could not connect to host
eternitylove.us: could not connect to host
eth9.net: max-age too low: 0
@ -1527,7 +1529,6 @@ falconfrag.com: could not connect to host
falkena.net: max-age too low: 5184000
falkp.no: did not receive HSTS header
fallenangelspirits.uk: could not connect to host
falsum.net: could not connect to host
familie-sprink.de: could not connect to host
familie-zimmermann.at: could not connect to host
familjenm.se: could not connect to host
@ -1597,7 +1598,6 @@ fixingdns.com: did not receive HSTS header
fj.search.yahoo.com: did not receive HSTS header
fjruiz.es: did not receive HSTS header
flags.ninja: could not connect to host
flam.io: could not connect to host
flamewall.net: could not connect to host
flareon.net: could not connect to host
flawcheck.com: did not receive HSTS header
@ -1623,7 +1623,6 @@ fojtova.cz: did not receive HSTS header
fojtovi.cz: did not receive HSTS header
fonetiq.io: could not connect to host
food4health.guide: could not connect to host
foodblogger.club: could not connect to host
foodievenues.com: could not connect to host
footballmapped.com: could not connect to host
foraje-profesionale.ro: did not receive HSTS header
@ -1633,12 +1632,12 @@ foreignexchangeresource.com: did not receive HSTS header
foreveralone.io: could not connect to host
forex-dan.com: did not receive HSTS header
forextimes.ru: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: /builds/slave/m-cen-l64-periodicupdate-00000/getHSTSPreloadList.js :: processStsHeader :: line 118" data: no]
formazioneopen.it: could not connect to host
formazioneopen.it: did not receive HSTS header
formbetter.com: could not connect to host
formula.cf: could not connect to host
forschbach-janssen.de: could not connect to host
fotiu.com: could not connect to host
fotm.net: did not receive HSTS header
fotm.net: max-age too low: 30000
fotocerita.net: could not connect to host
fotografosexpertos.com: did not receive HSTS header
fotopasja.info: could not connect to host
@ -1724,7 +1723,7 @@ gamechasm.com: could not connect to host
gamefund.me: did not receive HSTS header
gamehacks.me: could not connect to host
gameink.net: max-age too low: 0
gamek.es: could not connect to host
gamek.es: did not receive HSTS header
gamenected.com: could not connect to host
gamenected.de: could not connect to host
gameofpwnz.com: did not receive HSTS header
@ -1735,6 +1734,7 @@ gamerslair.org: did not receive HSTS header
gamesdepartment.co.uk: did not receive HSTS header
gameserver-sponsor.de: could not connect to host
gamingmedia.eu: did not receive HSTS header
gamingzoneservers.com: could not connect to host
gampenhof.de: did not receive HSTS header
gaptek.id: did not receive HSTS header
garciamartin.me: could not connect to host
@ -1755,7 +1755,7 @@ genyhitch.com: did not receive HSTS header
geofox.org: did not receive HSTS header
georgesonarthurs.com.au: did not receive HSTS header
gerencianet.com.br: did not receive HSTS header
gersting.net: did not receive HSTS header
gersting.net: could not connect to host
gesiwista.net: could not connect to host
gesunde-smoothies.de: did not receive HSTS header
get.zenpayroll.com: did not receive HSTS header
@ -1782,6 +1782,7 @@ getlolaccount.com: could not connect to host
getmassage.com.ng: could not connect to host
getremembrall.com: could not connect to host
getsello.com: could not connect to host
getwashdaddy.com: did not receive HSTS header
gfm.tech: could not connect to host
gfwsb.ml: could not connect to host
ggss.ml: could not connect to host
@ -1810,7 +1811,6 @@ glitzmirror.com: could not connect to host
global-adult-webcams.com: did not receive HSTS header
globalado.com: could not connect to host
globalexpert.co.nz: could not connect to host
globalgivingtime.com: could not connect to host
globalittech.com: could not connect to host
globalmusic.ga: could not connect to host
globalsites.nl: did not receive HSTS header
@ -1859,6 +1859,7 @@ gpstuner.com: did not receive HSTS header
grabi.ga: could not connect to host
gracesofgrief.com: max-age too low: 86400
gradienthosting.co.uk: did not receive HSTS header
grafmurr.de: could not connect to host
grandmascookieblog.com: did not receive HSTS header
grantedby.me: max-age too low: 0
graph.no: did not receive HSTS header
@ -1899,7 +1900,6 @@ gtraxapp.com: could not connect to host
gts-schulsoftware.de: did not receive HSTS header
guava.studio: did not receive HSTS header
guenthernoack.de: could not connect to host
guge.gq: could not connect to host
gugga.dk: did not receive HSTS header
guilde-vindicta.fr: did not receive HSTS header
gulenet.com: could not connect to host
@ -1927,7 +1927,7 @@ gyz.io: could not connect to host
h2check.org: could not connect to host
haarkliniek.com: did not receive HSTS header
habanaavenue.com: did not receive HSTS header
habbo.life: did not receive HSTS header
habbo.life: could not connect to host
hablemosdetecnologia.com.ve: could not connect to host
hack.cz: could not connect to host
hack.li: could not connect to host
@ -1935,6 +1935,7 @@ hackerforever.com: did not receive HSTS header
hackerone-ext-adroll.com: could not connect to host
hackest.org: did not receive HSTS header
hackit.im: could not connect to host
hackthissite.org: could not connect to host
hacktivis.me: could not connect to host
hadzic.co: could not connect to host
haeckdesign.com: did not receive HSTS header
@ -1949,6 +1950,7 @@ haku.moe: could not connect to host
hakugin.org: could not connect to host
halo.red: could not connect to host
hancc.net: could not connect to host
handicapindeles.nl: did not receive HSTS header
hanfu.la: could not connect to host
hanimalis.fr: could not connect to host
hansen.hn: could not connect to host
@ -2005,6 +2007,7 @@ helpium.de: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR
helpmebuild.com: did not receive HSTS header
hemdal.se: could not connect to host
hencagon.com: could not connect to host
henriknoerr.com: could not connect to host
hepteract.us: did not receive HSTS header
herrenfahrt.com: did not receive HSTS header
herzbotschaft.de: did not receive HSTS header
@ -2123,7 +2126,6 @@ idecode.net: could not connect to host
idedr.com: could not connect to host
identitylabs.uk: could not connect to host
idgsupply.com: could not connect to host
idinby.dk: did not receive HSTS header
idlekernel.com: could not connect to host
idontexist.me: did not receive HSTS header
ie.search.yahoo.com: did not receive HSTS header
@ -2212,7 +2214,6 @@ integrationinc.com: could not connect to host
intel.li: could not connect to host
interference.io: could not connect to host
interlun.com: could not connect to host
internect.co.za: did not receive HSTS header
internetcasinos.de: could not connect to host
internetcensus.org: could not connect to host
interserved.com: did not receive HSTS header
@ -2269,6 +2270,7 @@ ithakama.com: did not receive HSTS header
ithakama.cz: did not receive HSTS header
itos.asia: did not receive HSTS header
itos.pl: did not receive HSTS header
itpros.ru: did not receive HSTS header
itriskltd.com: could not connect to host
itsadog.co.uk: did not receive HSTS header
itsagadget.com: did not receive HSTS header
@ -2281,8 +2283,7 @@ ivi-fertility.com: max-age too low: 0
ivi.es: max-age too low: 0
ivk.website: could not connect to host
ivo.co.za: could not connect to host
iwannarefill.com: could not connect to host
ixec2.tk: did not receive HSTS header
ixec2.tk: could not connect to host
izdiwho.com: could not connect to host
izolight.ch: could not connect to host
izoox.com: did not receive HSTS header
@ -2308,14 +2309,13 @@ jamesf.xyz: could not connect to host
jamesmaurer.com: did not receive HSTS header
jamesmorrison.me: did not receive HSTS header
jamourtney.com: could not connect to host
jan-roenspies.de: could not connect to host
jan27.org: did not receive HSTS header
janario.me: could not connect to host
janbrodda.de: max-age too low: 2592000
jangho.me: could not connect to host
jannyrijneveld.nl: did not receive HSTS header
janus-engineering.de: did not receive HSTS header
japaripark.com: did not receive HSTS header
japaripark.com: could not connect to host
japlex.com: could not connect to host
jaqen.ch: could not connect to host
jardins-utopie.net: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: /builds/slave/m-cen-l64-periodicupdate-00000/getHSTSPreloadList.js :: processStsHeader :: line 118" data: no]
@ -2341,6 +2341,7 @@ jcor.me: did not receive HSTS header
jcoscia.com: could not connect to host
jctf.io: could not connect to host
jdcdirectsales.com.ph: did not receive HSTS header
jdubya.info: could not connect to host
jebengotai.com: did not receive HSTS header
jeff393.com: could not connect to host
jenjoit.de: could not connect to host
@ -2405,6 +2406,7 @@ jualautoclave.com: did not receive HSTS header
jualssh.com: could not connect to host
juliamweber.de: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: /builds/slave/m-cen-l64-periodicupdate-00000/getHSTSPreloadList.js :: processStsHeader :: line 118" data: no]
julian-kipka.de: could not connect to host
juliansimioni.com: could not connect to host
julido.de: did not receive HSTS header
jumbox.xyz: could not connect to host
junaos.xyz: did not receive HSTS header
@ -2417,7 +2419,7 @@ justlikethat.hosting: did not receive HSTS header
justnaw.co.uk: could not connect to host
justudin.com: did not receive HSTS header
jutella.de: did not receive HSTS header
juwairen.cn: did not receive HSTS header
juwairen.cn: could not connect to host
jvoice.net: could not connect to host
jwilsson.me: could not connect to host
jxm.in: did not receive HSTS header
@ -2426,6 +2428,7 @@ k-dev.de: could not connect to host
ka-clan.com: could not connect to host
kabinapp.com: could not connect to host
kabuabc.com: did not receive HSTS header
kabus.org: could not connect to host
kadioglumakina.com.tr: did not receive HSTS header
kaela.design: could not connect to host
kahopoon.net: could not connect to host
@ -2433,6 +2436,7 @@ kaisers.de: did not receive HSTS header
kalami.nl: could not connect to host
kamikano.com: could not connect to host
kaneo-gmbh.de: did not receive HSTS header
kaniklani.co.za: could not connect to host
kaplatz.is: could not connect to host
kapucini.si: max-age too low: 0
karaoketonight.com: could not connect to host
@ -2518,6 +2522,7 @@ kollabria.com: [Exception... "Component returned failure code: 0x80004005 (NS_ER
kolozsvaricsuhe.hu: could not connect to host
komikito.com: could not connect to host
kompetenzwerft.de: did not receive HSTS header
konata.us: could not connect to host
kontaxis.network: could not connect to host
kontorhaus-schlachte.de: could not connect to host
koop-bremen.de: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: /builds/slave/m-cen-l64-periodicupdate-00000/getHSTSPreloadList.js :: processStsHeader :: line 118" data: no]
@ -2530,13 +2535,13 @@ korsanparti.org: could not connect to host
kostuumstore.nl: did not receive HSTS header
kotonehoko.net: could not connect to host
kotovstyle.ru: could not connect to host
koukni.cz: could not connect to host
kourpe.online: could not connect to host
kr.search.yahoo.com: did not receive HSTS header
krayx.com: could not connect to host
kreavis.com: did not receive HSTS header
kredite.sale: could not connect to host
kriegt.es: did not receive HSTS header
kristikala.nl: could not connect to host
krizevci.info: did not receive HSTS header
kroetenfuchs.de: could not connect to host
kropkait.pl: could not connect to host
@ -2554,7 +2559,6 @@ kupelne-ptacek.sk: did not receive HSTS header
kuppingercole.com: did not receive HSTS header
kura.io: could not connect to host
kurehun.org: could not connect to host
kuro346.moe: did not receive HSTS header
kurtmclester.com: did not receive HSTS header
kusaka-abacus.jp: max-age too low: 0
kweddingplanning.com: did not receive HSTS header
@ -2562,7 +2566,6 @@ kwok.tv: could not connect to host
kwondratsch.com: could not connect to host
kyanite.co: could not connect to host
kylapps.com: did not receive HSTS header
kylelaker.com: could not connect to host
kylinj.com: could not connect to host
kyochon.fr: could not connect to host
kz.search.yahoo.com: did not receive HSTS header
@ -2595,7 +2598,6 @@ langhun.me: did not receive HSTS header
laobox.fr: could not connect to host
laozhu.me: could not connect to host
laquack.com: could not connect to host
lasercloud.ml: could not connect to host
laserfuchs.de: did not receive HSTS header
lashstuff.com: did not receive HSTS header
latinred.com: could not connect to host
@ -2618,6 +2620,7 @@ leermotorrijden.nl: max-age too low: 300
lefebvristes.com: could not connect to host
lefebvristes.fr: could not connect to host
legarage.org: did not receive HSTS header
lehighmathcircle.org: could not connect to host
leifdreizler.com: could not connect to host
leinir.dk: max-age too low: 86400
leitner.com.au: did not receive HSTS header
@ -2675,6 +2678,7 @@ lifetimemoneymachine.com: did not receive HSTS header
lightarmory.com: could not connect to host
lightpaste.com: could not connect to host
lightworx.io: did not receive HSTS header
lila.pink: did not receive HSTS header
lillpopp.eu: max-age too low: 10
lilpwny.com: could not connect to host
lim-light.com: did not receive HSTS header
@ -2707,7 +2711,6 @@ lixingcong.com: could not connect to host
lkummer.cz: could not connect to host
loacg.com: could not connect to host
loadingdeck.com: did not receive HSTS header
loadlow.me: could not connect to host
loadso.me: could not connect to host
loafbox.com: could not connect to host
loansonline.today: could not connect to host
@ -2752,6 +2755,7 @@ lufthansaexperts.com: max-age too low: 2592000
luine.xyz: did not receive HSTS header
luis-checa.com: could not connect to host
luisv.me: could not connect to host
lukeng.me: did not receive HSTS header
lukeng.net: did not receive HSTS header
lukonet.com: did not receive HSTS header
lumd.me: could not connect to host
@ -2788,7 +2792,6 @@ mac-torrents.me: did not receive HSTS header
macchaberrycream.com: could not connect to host
macdj.tk: could not connect to host
macgeneral.de: did not receive HSTS header
macoun.de: did not receive HSTS header
macsandcheesedreams.com: could not connect to host
madars.org: did not receive HSTS header
maddin.ga: could not connect to host
@ -2820,6 +2823,7 @@ mammothmail.com: could not connect to host
mammothmail.net: could not connect to host
mammothmail.org: could not connect to host
managemynetsuite.com: did not receive HSTS header
manesht.ir: could not connect to host
maniadeprazer.com.br: could not connect to host
manifestbin.com: did not receive HSTS header
manningbrothers.com: did not receive HSTS header
@ -2852,9 +2856,11 @@ marumagic.com: did not receive HSTS header
masjidtawheed.net: did not receive HSTS header
masterapi.ninja: did not receive HSTS header
masteringtheterminal.com: did not receive HSTS header
masty.nl: did not receive HSTS header
matatall.com: did not receive HSTS header
matchneedle.com: could not connect to host
maternalsafety.org: did not receive HSTS header
maths.network: could not connect to host
matrict.com: could not connect to host
matrip.de: could not connect to host
matrix.ac: did not receive HSTS header
@ -2875,7 +2881,6 @@ mavisang.cf: could not connect to host
mawe.red: could not connect to host
maya.mg: could not connect to host
mazz-tech.com: could not connect to host
mbrooks.info: could not connect to host
mca2017.org: did not receive HSTS header
mcard.vn: did not receive HSTS header
mcc.re: could not connect to host
@ -2895,6 +2900,7 @@ mediacru.sh: did not receive HSTS header
mediamag.am: max-age too low: 0
mediastorm.us: could not connect to host
mediawikicn.org: could not connect to host
medienservice-fritz.de: could not connect to host
medirich.co: could not connect to host
meditek-dv.ru: could not connect to host
medm-test.com: could not connect to host
@ -2910,6 +2916,7 @@ mein-gesundheitsmanager.com: did not receive HSTS header
meincenter-meinemeinung.de: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: /builds/slave/m-cen-l64-periodicupdate-00000/getHSTSPreloadList.js :: processStsHeader :: line 118" data: no]
meincloudspeicher.de: could not connect to host
meinebo.it: could not connect to host
melpomene.me: could not connect to host
melted.pw: could not connect to host
members.mayfirst.org: did not receive HSTS header
memory-plus-180.com: could not connect to host
@ -2967,7 +2974,7 @@ mijn-email.org: could not connect to host
mikaelemilsson.net: did not receive HSTS header
mikeburns.com: did not receive HSTS header
mikeg.de: did not receive HSTS header
mikek.work: did not receive HSTS header
mikek.work: could not connect to host
mikeology.org: could not connect to host
mikrom.cz: did not receive HSTS header
miku.be: did not receive HSTS header
@ -3035,6 +3042,7 @@ moneytoday.com: max-age too low: 0
monika-sokol.de: did not receive HSTS header
monitman.com: could not connect to host
monsieurbureau.com: did not receive HSTS header
montanacures.org: could not connect to host
montenero.pl: could not connect to host
montonicms.com: could not connect to host
moon.lc: could not connect to host
@ -3105,6 +3113,7 @@ my.swedbank.se: did not receive HSTS header
myairshop.gr: could not connect to host
mybon.at: could not connect to host
mybudget.xyz: could not connect to host
mychocolateweightloss.com: did not receive HSTS header
mycollab.net: could not connect to host
mycoted.com: did not receive HSTS header
mydeos.com: could not connect to host
@ -3125,13 +3134,13 @@ mypension.ca: could not connect to host
myphonebox.de: could not connect to host
mysecretrewards.com: did not receive HSTS header
mystery-science-theater-3000.de: did not receive HSTS header
mytweeps.com: could not connect to host
myweb360.de: did not receive HSTS header
myzone.com: did not receive HSTS header
n0psled.nl: could not connect to host
n2x.in: could not connect to host
n4l.pw: could not connect to host
nabru.co.uk: did not receive HSTS header
nabytko.cz: could not connect to host
nadia.pt: could not connect to host
nagios.by: could not connect to host
nagoya-kyuyo.com: could not connect to host
@ -3184,7 +3193,7 @@ nepustil.net: did not receive HSTS header
nestedquotes.ca: could not connect to host
netba.net: could not connect to host
netbox.cc: could not connect to host
netherwind.eu: could not connect to host
netherwind.eu: did not receive HSTS header
netloanusa.com: max-age too low: 0
netmagik.com: did not receive HSTS header
netresourcedesign.com: could not connect to host
@ -3236,6 +3245,7 @@ nightx.uk: could not connect to host
niho.jp: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: /builds/slave/m-cen-l64-periodicupdate-00000/getHSTSPreloadList.js :: processStsHeader :: line 118" data: no]
nikcub.com: could not connect to host
niklaslindblad.se: did not receive HSTS header
nikobradshaw.com: did not receive HSTS header
nikomo.fi: could not connect to host
nilrem.org: could not connect to host
ninchisho-online.com: did not receive HSTS header
@ -3255,7 +3265,7 @@ nocallaghan.com: could not connect to host
noclegi-online.pl: did not receive HSTS header
noctinus.tk: could not connect to host
nodebrewery.com: could not connect to host
nodecompat.com: could not connect to host
nodecompat.com: did not receive HSTS header
nodetemple.com: could not connect to host
nodi.at: could not connect to host
noexpect.org: could not connect to host
@ -3359,7 +3369,6 @@ oneb4nk.com: could not connect to host
oneclickloan.com: could not connect to host
onefour.co: could not connect to host
onehourloan.com: could not connect to host
onehourloan.sg: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: /builds/slave/m-cen-l64-periodicupdate-00000/getHSTSPreloadList.js :: processStsHeader :: line 118" data: no]
oneminute.io: did not receive HSTS header
onepluscamps.com: could not connect to host
onespiritinc.com: did not receive HSTS header
@ -3392,6 +3401,7 @@ oost.io: did not receive HSTS header
ooyo.be: could not connect to host
open-mx.de: could not connect to host
open-to-repair.fr: did not receive HSTS header
openas.org: could not connect to host
opendesk.cc: did not receive HSTS header
openmind-shop.de: did not receive HSTS header
openmtbmap.org: did not receive HSTS header
@ -3448,6 +3458,7 @@ ouvirmusica.com.br: did not receive HSTS header
ovenapp.io: did not receive HSTS header
overclockers.ge: could not connect to host
override.io: did not receive HSTS header
overseamusic.de: could not connect to host
oversight.io: could not connect to host
ovvy.net: did not receive HSTS header
owncloud.help: could not connect to host
@ -3527,7 +3538,6 @@ pdamsidoarjo.co.id: could not connect to host
pdevio.com: could not connect to host
pdf.yt: could not connect to host
peakapp.nl: could not connect to host
pebbles.net.in: could not connect to host
pebblesdemo.com: could not connect to host
peerherrmann.de: could not connect to host
peissen.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: /builds/slave/m-cen-l64-periodicupdate-00000/getHSTSPreloadList.js :: processStsHeader :: line 118" data: no]
@ -3565,7 +3575,6 @@ pgpm.io: could not connect to host
pharmgkb.org: could not connect to host
phillprice.com: could not connect to host
phoebe.co.nz: did not receive HSTS header
phoenix.dj: could not connect to host
phonenumberinfo.co.uk: could not connect to host
phongmay24h.com: could not connect to host
photoblogverona.com: could not connect to host
@ -3618,7 +3627,6 @@ pleier.it: could not connect to host
plhdb.org: did not receive HSTS header
plirt.ru: did not receive HSTS header
plixer.com: did not receive HSTS header
ploader.ru: could not connect to host
plogable.co: could not connect to host
plombirator.kz: did not receive HSTS header
plothost.com: did not receive HSTS header
@ -3647,7 +3655,6 @@ poolsandstuff.com: did not receive HSTS header
poon.tech: could not connect to host
porno-gif.ru: did not receive HSTS header
portalplatform.net: did not receive HSTS header
portalzine.de: did not receive HSTS header
poshpak.com: max-age too low: 86400
postcodewise.co.uk: did not receive HSTS header
postscheduler.org: could not connect to host
@ -3689,6 +3696,7 @@ prodpad.com: did not receive HSTS header
production.vn: did not receive HSTS header
professionalboundaries.com: did not receive HSTS header
profi-durchgangsmelder.de: did not receive HSTS header
profpay.com: could not connect to host
profundr.com: could not connect to host
progblog.net: could not connect to host
progg.no: could not connect to host
@ -3842,6 +3850,7 @@ remitatm.com: did not receive HSTS header
remodela.com.ve: could not connect to host
rene-schwarz.com: could not connect to host
renem.net: did not receive HSTS header
renkhosting.com: did not receive HSTS header
renlong.org: did not receive HSTS header
renrenss.com: did not receive HSTS header
rentacarcluj.xyz: could not connect to host
@ -4090,6 +4099,7 @@ sellocdn.com: could not connect to host
semen3325.xyz: could not connect to host
semenkovich.com: did not receive HSTS header
semps-servers.de: could not connect to host
sendash.com: could not connect to host
sendya.me: did not receive HSTS header
senedirect.com: did not receive HSTS header
sensiblemn.org: could not connect to host
@ -4119,6 +4129,7 @@ shadoom.com: did not receive HSTS header
shadowmorph.info: did not receive HSTS header
shadowsocks.net: could not connect to host
shakepeers.org: did not receive HSTS header
shanekoster.net: could not connect to host
shanesage.com: could not connect to host
shareimg.xyz: could not connect to host
sharepass.pw: could not connect to host
@ -4128,6 +4139,7 @@ shawnh.net: could not connect to host
shellj.me: max-age too low: 86400
shellsec.pw: did not receive HSTS header
shentengtu.idv.tw: could not connect to host
sherbers.de: could not connect to host
shereallyheals.com: could not connect to host
shibe.club: could not connect to host
shiftins.com: did not receive HSTS header
@ -4182,7 +4194,6 @@ simplepractice.com: did not receive HSTS header
simply-premium.com: did not receive HSTS header
sin30.net: could not connect to host
sincron.org: could not connect to host
sinfield.com: could not connect to host
sinful.pw: could not connect to host
sinfulforums.net: max-age too low: 600
singul4rity.com: could not connect to host
@ -4194,7 +4205,7 @@ sites.google.com: did not receive HSTS header (error ignored - included regardle
sitesten.com: did not receive HSTS header
sixtwentyten.com: did not receive HSTS header
skhosting.eu: did not receive HSTS header
ski-insurance.com.au: could not connect to host
ski-insurance.com.au: did not receive HSTS header
skidstresser.com: did not receive HSTS header
skile.ru: could not connect to host
skillproxy.com: could not connect to host
@ -4337,6 +4348,7 @@ ssmato.me: could not connect to host
ssnc.org: max-age too low: 300
sss3s.com: could not connect to host
ssworld.ga: could not connect to host
staack.com: did not receive HSTS header
stabletoken.com: could not connect to host
stadjerspasonline.nl: could not connect to host
staffjoy.com: did not receive HSTS header
@ -4418,7 +4430,6 @@ studiozelden.com: did not receive HSTS header
studybay.com: did not receive HSTS header
studydrive.net: did not receive HSTS header
studyhub.cf: did not receive HSTS header
stuff-fibre.co.nz: could not connect to host
stugb.de: did not receive HSTS header
stw-group.at: could not connect to host
stylenda.com: could not connect to host
@ -4515,6 +4526,7 @@ tauchkater.de: could not connect to host
tavopica.lt: did not receive HSTS header
taxbench.com: could not connect to host
taxsnaps.co.nz: did not receive HSTS header
tazj.in: could not connect to host
tazz.in: could not connect to host
tc-bonito.de: did not receive HSTS header
tcao.info: could not connect to host
@ -4543,6 +4555,7 @@ techpointed.com: could not connect to host
techreview.link: could not connect to host
tecnimotos.com: did not receive HSTS header
tegelsensanitaironline.nl: did not receive HSTS header
teknologi.or.id: could not connect to host
teknotes.co.uk: could not connect to host
tekshrek.com: did not receive HSTS header
telefonnummer.online: could not connect to host
@ -4594,7 +4607,6 @@ thecrochetcottage.net: could not connect to host
thediaryofadam.com: did not receive HSTS header
theendofzion.com: did not receive HSTS header
theescapistswiki.com: could not connect to host
theeyeopener.com: did not receive HSTS header
theflowerbasketonline.com: could not connect to host
thefootballanalyst.com: did not receive HSTS header
thefrozenfire.com: did not receive HSTS header
@ -4643,6 +4655,7 @@ thomasschweizer.net: could not connect to host
thompsonfamily.cloud: could not connect to host
thorncreek.net: did not receive HSTS header
thriveapproach.co.uk: did not receive HSTS header
thrx.net: could not connect to host
thumbtack.com: did not receive HSTS header
thusoy.com: did not receive HSTS header
tickettoaster.de: max-age too low: 0
@ -4651,6 +4664,7 @@ tickreport.com: did not receive HSTS header
ticktock.today: did not receive HSTS header
tictactux.de: could not connect to host
tidmore.us: could not connect to host
tie-online.org: did not receive HSTS header
tiensnet.com: did not receive HSTS header
tightlineproductions.com: did not receive HSTS header
tikutiku.pl: could not connect to host
@ -4675,7 +4689,6 @@ tittelbach.at: did not receive HSTS header
titties.ml: could not connect to host
tjc.wiki: could not connect to host
tkappertjedemetamorfose.nl: could not connect to host
tkarstens.de: did not receive HSTS header
tlo.hosting: could not connect to host
tlo.link: did not receive HSTS header
tlo.network: could not connect to host
@ -4741,9 +4754,9 @@ translate.googleapis.com: did not receive HSTS header (error ignored - included
transportal.sk: did not receive HSTS header
travelinsurance.co.nz: did not receive HSTS header
treasuredinheritanceministry.com: did not receive HSTS header
treatprostatewithhifu.com: did not receive HSTS header
treeby.net: could not connect to host
trendberry.ru: could not connect to host
trik.es: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: /builds/slave/m-cen-l64-periodicupdate-00000/getHSTSPreloadList.js :: processStsHeader :: line 118" data: no]
trinityaffirmations.com: max-age too low: 0
trinitycore.org: max-age too low: 2592000
tripdelta.com: did not receive HSTS header
@ -4871,7 +4884,7 @@ urbanstylestaging.com: did not receive HSTS header
urphp.com: could not connect to host
us-immigration.com: did not receive HSTS header
usaa.com: did not receive HSTS header
usaab.org: could not connect to host
usaab.org: did not receive HSTS header
usbtypeccompliant.com: could not connect to host
uscitizenship.info: did not receive HSTS header
uscntalk.com: could not connect to host
@ -4896,6 +4909,7 @@ uzmandroid.top: could not connect to host
v2.pw: did not receive HSTS header
v4veedu.com: could not connect to host
vaddder.com: could not connect to host
valasi.eu: could not connect to host
valentin-sundermann.de: could not connect to host
valethound.com: could not connect to host
validator.nu: did not receive HSTS header
@ -4934,7 +4948,6 @@ veryhax.de: could not connect to host
veterinaire-cazeres-foucault.fr: could not connect to host
vetmgmt.com: could not connect to host
veto.fish: could not connect to host
vetofish.com: did not receive HSTS header
vfree.org: could not connect to host
vglimg.com: could not connect to host
vhost.co.id: could not connect to host
@ -4955,7 +4968,6 @@ viktorsvantesson.net: did not receive HSTS header
villenvinkit.com: did not receive HSTS header
vincentkooijman.at: did not receive HSTS header
vincentkooijman.nl: did not receive HSTS header
vinetalk.net: could not connect to host
vintageheartcoffee.com: did not receive HSTS header
vio.no: did not receive HSTS header
viperdns.com: could not connect to host
@ -4977,6 +4989,7 @@ vlastimilburian.cz: did not receive HSTS header
vlora.city: could not connect to host
vm0.eu: did not receive HSTS header
vmrdev.com: could not connect to host
vnd.cloud: could not connect to host
voceinveste.com: did not receive HSTS header
vodpay.net: could not connect to host
vodpay.org: could not connect to host
@ -4992,8 +5005,10 @@ vosjesweb.nl: did not receive HSTS header
vox.vg: did not receive HSTS header
vpl.me: did not receive HSTS header
vpn-byen.dk: did not receive HSTS header
vpsmojo.com: did not receive HSTS header
vratny.space: could not connect to host
vrobert.fr: could not connect to host
vserver-preis-vergleich.de: could not connect to host
vsestiralnie.com: did not receive HSTS header
vvl.me: did not receive HSTS header
vxstream-sandbox.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: /builds/slave/m-cen-l64-periodicupdate-00000/getHSTSPreloadList.js :: processStsHeader :: line 118" data: no]
@ -5021,7 +5036,6 @@ warandpeace.xyz: could not connect to host
warehost.de: did not receive HSTS header
warhistoryonline.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: /builds/slave/m-cen-l64-periodicupdate-00000/getHSTSPreloadList.js :: processStsHeader :: line 118" data: no]
warlions.info: did not receive HSTS header
warmservers.com: could not connect to host
warped.com: did not receive HSTS header
warsentech.com: could not connect to host
washingtonviews.com: did not receive HSTS header
@ -5060,6 +5074,7 @@ webstory.xyz: could not connect to host
webswitch.io: could not connect to host
webtechgadgetry.com: did not receive HSTS header
webtiles.co.uk: could not connect to host
webuni.hu: did not receive HSTS header
webwork.pw: could not connect to host
weddingenvelopes.co.uk: did not receive HSTS header
weekly.fyi: could not connect to host
@ -5079,11 +5094,10 @@ westendzone.com: max-age too low: 0
westerhoud.nl: did not receive HSTS header
wettbuero.de: did not receive HSTS header
wetten.eu: did not receive HSTS header
wettertoertchen.com: did not receive HSTS header
wettertoertchen.com: could not connect to host
wetttipps.com: did not receive HSTS header
wetttipps.de: did not receive HSTS header
wevahoo.com: could not connect to host
wf-training-master.appspot.com: could not connect to host (error ignored - included regardless)
wftda.com: did not receive HSTS header
whatnext.limited: did not receive HSTS header
whats.io: could not connect to host
@ -5112,6 +5126,7 @@ willosagiede.com: did not receive HSTS header
wimake.solutions: did not receive HSTS header
winaes.com: did not receive HSTS header
winclient.cn: could not connect to host
wind.moe: did not receive HSTS header
windhaven.nl: could not connect to host
winecodeavocado.com: could not connect to host
winged.io: could not connect to host
@ -5137,6 +5152,7 @@ wlzhiyin.cn: could not connect to host
wmcuk.net: could not connect to host
wmfinanz.com: could not connect to host
wnmm.nl: could not connect to host
wobblylang.org: could not connect to host
wodice.com: could not connect to host
wohnungsbau-ludwigsburg.de: did not receive HSTS header
woima.fi: max-age too low: 604800
@ -5162,7 +5178,7 @@ wphostingspot.com: did not receive HSTS header
wpmetadatastandardsproject.org: could not connect to host
writeapp.me: could not connect to host
wsscompany.com.ve: could not connect to host
wufu.org: did not receive HSTS header
wufu.org: could not connect to host
wuhengmin.com: did not receive HSTS header
wurzelzwerg.net: could not connect to host
wusx.club: could not connect to host
@ -5191,6 +5207,7 @@ www.zenpayroll.com: did not receive HSTS header
www3.info: did not receive HSTS header
wxukang.cn: could not connect to host
wyzphoto.nl: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: /builds/slave/m-cen-l64-periodicupdate-00000/getHSTSPreloadList.js :: processStsHeader :: line 118" data: no]
wzrd.in: did not receive HSTS header
x-power-detox.com: could not connect to host
x2w.io: could not connect to host
x3led.com: could not connect to host
@ -5209,7 +5226,7 @@ xenesisziarovky.sk: could not connect to host
xett.com: did not receive HSTS header
xf-liam.com: did not receive HSTS header
xfive.de: did not receive HSTS header
xia100.xyz: did not receive HSTS header
xia100.xyz: could not connect to host
xiaody.me: could not connect to host
xiaolvmu.com: could not connect to host
xiaolvmu.me: could not connect to host
@ -5338,7 +5355,7 @@ zerudi.com: did not receive HSTS header
zett4.me: could not connect to host
zeytin.pro: could not connect to host
zh.search.yahoo.com: did not receive HSTS header
zhaochen.xyz: did not receive HSTS header
zhangzifan.com: did not receive HSTS header
zhaojin97.cn: did not receive HSTS header
zhendingresources.com: max-age too low: 0
zhihua-lai.com: did not receive HSTS header
@ -5354,6 +5371,7 @@ zking.ga: could not connect to host
zmy.im: did not receive HSTS header
zocken.com: did not receive HSTS header
zoe.vc: did not receive HSTS header
zolotoy-standart.com.ua: did not receive HSTS header
zomerschoen.nl: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: /builds/slave/m-cen-l64-periodicupdate-00000/getHSTSPreloadList.js :: processStsHeader :: line 118" data: no]
zomiac.pp.ua: could not connect to host
zoneminder.com: did not receive HSTS header
@ -5366,7 +5384,6 @@ zoznamrealit.sk: did not receive HSTS header
zqhong.com: could not connect to host
ztan.tk: could not connect to host
ztcaoll222.cn: did not receive HSTS header
zulu7.com: could not connect to host
zvncloud.com: did not receive HSTS header
zwollemagazine.nl: did not receive HSTS header
zyf.pw: could not connect to host

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -59,13 +59,13 @@ use std::marker::PhantomData;
use std::mem::transmute;
use std::sync::Arc;
use std::sync::atomic::Ordering;
use style;
use style::attr::AttrValue;
use style::computed_values::display;
use style::context::{QuirksMode, SharedStyleContext};
use style::data::ElementData;
use style::dom::{DirtyDescendants, LayoutIterator, NodeInfo, OpaqueNode, PresentationalHintsSynthetizer};
use style::dom::{TElement, TNode};
use style::dom::UnsafeNode;
use style::dom::{DescendantsBit, DirtyDescendants, LayoutIterator, NodeInfo, OpaqueNode};
use style::dom::{PresentationalHintsSynthetizer, TElement, TNode, UnsafeNode};
use style::element_state::*;
use style::properties::{ComputedValues, PropertyDeclarationBlock};
use style::selector_parser::{NonTSPseudoClass, PseudoElement, SelectorImpl};
@ -409,6 +409,11 @@ impl<'le> TElement for ServoLayoutElement<'le> {
unsafe { self.as_node().node.get_flag(HAS_DIRTY_DESCENDANTS) }
}
unsafe fn note_descendants<B: DescendantsBit<Self>>(&self) {
debug_assert!(self.get_data().is_some());
style::dom::raw_note_descendants::<Self, B>(*self);
}
unsafe fn set_dirty_descendants(&self) {
debug_assert!(self.as_node().node.get_flag(IS_IN_DOC));
self.as_node().node.set_flag(HAS_DIRTY_DESCENDANTS, true)
@ -488,19 +493,22 @@ impl<'le> ServoLayoutElement<'le> {
}
}
// FIXME(bholley): This should be merged with TElement::note_dirty_descendants,
// FIXME(bholley): This should be merged with TElement::note_descendants,
// but that requires re-testing and possibly fixing the broken callers given
// the FIXME below, which I don't have time to do right now.
//
// FIXME(emilio): We'd also need to relax the invariant in note_descendants
// re. the data already available I think.
pub unsafe fn note_dirty_descendant(&self) {
use ::selectors::Element;
let mut current = Some(*self);
while let Some(el) = current {
// FIXME(bholley): Ideally we'd have the invariant that any element
// with has_dirty_descendants also has the bit set on all its ancestors.
// However, there are currently some corner-cases where we get that wrong.
// I have in-flight patches to fix all this stuff up, so we just always
// propagate this bit for now.
// with has_dirty_descendants also has the bit set on all its
// ancestors. However, there are currently some corner-cases where
// we get that wrong. I have in-flight patches to fix all this
// stuff up, so we just always propagate this bit for now.
el.set_dirty_descendants();
current = el.parent_element();
}

Просмотреть файл

@ -222,6 +222,44 @@ fn fmt_subtree<F, N: TNode>(f: &mut fmt::Formatter, stringify: &F, n: N, indent:
Ok(())
}
/// Flag that this element has a descendant for style processing, propagating
/// the bit up to the root as needed.
///
/// This is _not_ safe to call during the parallel traversal.
///
/// This is intended as a helper so Servo and Gecko can override it with custom
/// stuff if needed.
///
/// Returns whether no parent had already noted it, that is, whether we reached
/// the root during the walk up.
pub unsafe fn raw_note_descendants<E, B>(element: E) -> bool
where E: TElement,
B: DescendantsBit<E>,
{
debug_assert!(!thread_state::get().is_worker());
// TODO(emilio, bholley): Documenting the flags setup a bit better wouldn't
// really hurt I guess.
debug_assert!(element.get_data().is_some(),
"You should ensure you only flag styled elements");
let mut curr = Some(element);
while let Some(el) = curr {
if B::has(el) {
break;
}
B::set(el);
curr = el.parent_element();
}
// Note: We disable this assertion on servo because of bugs. See the
// comment around note_dirty_descendant in layout/wrapper.rs.
if cfg!(feature = "gecko") {
debug_assert!(element.descendants_bit_is_propagated::<B>());
}
curr.is_none()
}
/// A trait used to synthesize presentational hints for HTML element attributes.
pub trait PresentationalHintsSynthetizer {
/// Generate the proper applicable declarations due to presentational hints,
@ -301,30 +339,19 @@ pub trait TElement : PartialEq + Debug + Sized + Copy + Clone + ElementExt + Pre
/// the actual restyle traversal.
fn has_dirty_descendants(&self) -> bool;
/// Flags an element and its ancestors with a given `DescendantsBit`.
///
/// TODO(emilio): We call this conservatively from restyle_element_internal
/// because we never flag unstyled stuff. A different setup for this may be
/// a bit cleaner, but it's probably not worth to invest on it right now
/// unless necessary.
unsafe fn note_descendants<B: DescendantsBit<Self>>(&self);
/// Flag that this element has a descendant for style processing.
///
/// Only safe to call with exclusive access to the element.
unsafe fn set_dirty_descendants(&self);
/// Flag that this element has a descendant for style processing, propagating
/// the bit up to the root as needed.
///
/// This is _not_ safe to call during the parallel traversal.
unsafe fn note_descendants<B: DescendantsBit<Self>>(&self) {
debug_assert!(!thread_state::get().is_worker());
let mut curr = Some(*self);
while curr.is_some() && !B::has(curr.unwrap()) {
B::set(curr.unwrap());
curr = curr.unwrap().parent_element();
}
// Note: We disable this assertion on servo because of bugs. See the
// comment around note_dirty_descendant in layout/wrapper.rs.
if cfg!(feature = "gecko") {
debug_assert!(self.descendants_bit_is_propagated::<B>());
}
}
/// Debug helper to be sure the bit is propagated.
fn descendants_bit_is_propagated<B: DescendantsBit<Self>>(&self) -> bool {
let mut current = Some(*self);

Просмотреть файл

@ -17,7 +17,7 @@
use atomic_refcell::AtomicRefCell;
use context::UpdateAnimationsTasks;
use data::ElementData;
use dom::{AnimationRules, LayoutIterator, NodeInfo, TElement, TNode, UnsafeNode};
use dom::{self, AnimationRules, DescendantsBit, LayoutIterator, NodeInfo, TElement, TNode, UnsafeNode};
use dom::{OpaqueNode, PresentationalHintsSynthetizer};
use element_state::ElementState;
use error_reporting::StdoutErrorReporter;
@ -505,10 +505,28 @@ impl<'le> TElement for GeckoElement<'le> {
}
unsafe fn set_dirty_descendants(&self) {
debug_assert!(self.get_data().is_some());
debug!("Setting dirty descendants: {:?}", self);
self.set_flags(NODE_HAS_DIRTY_DESCENDANTS_FOR_SERVO as u32)
}
unsafe fn note_descendants<B: DescendantsBit<Self>>(&self) {
// FIXME(emilio): We seem to reach this in Gecko's
// layout/style/test/test_pseudoelement_state.html, while changing the
// state of an anonymous content element which is styled, but whose
// parent isn't, presumably because we've cleared the data and haven't
// reached it yet.
//
// Otherwise we should be able to assert this.
if self.get_data().is_none() {
return;
}
if dom::raw_note_descendants::<Self, B>(*self) {
bindings::Gecko_SetOwnerDocumentNeedsStyleFlush(self.0);
}
}
unsafe fn unset_dirty_descendants(&self) {
self.unset_flags(NODE_HAS_DIRTY_DESCENDANTS_FOR_SERVO as u32)
}

Просмотреть файл

@ -1076,6 +1076,28 @@ ${helpers.single_keyword("text-align-last",
vertical.to_css(dest)
}
}
% if product == "gecko":
impl SpecifiedValue {
pub fn from_gecko_keyword(kw: u32) -> Self {
use gecko_bindings::structs;
let vert = if kw & structs::NS_STYLE_TEXT_EMPHASIS_POSITION_RIGHT != 0 {
VerticalWritingModeValue::Right
} else {
debug_assert!(kw & structs::NS_STYLE_TEXT_EMPHASIS_POSITION_LEFT != 0);
VerticalWritingModeValue::Left
};
let horiz = if kw & structs::NS_STYLE_TEXT_EMPHASIS_POSITION_OVER != 0 {
HorizontalWritingModeValue::Over
} else {
debug_assert!(kw & structs::NS_STYLE_TEXT_EMPHASIS_POSITION_UNDER != 0);
HorizontalWritingModeValue::Under
};
SpecifiedValue(horiz, vert)
}
}
% endif
</%helpers:longhand>
${helpers.predefined_type("text-emphasis-color", "CSSColor",

Просмотреть файл

@ -1148,6 +1148,7 @@ pub extern "C" fn Servo_DeclarationBlock_SetKeywordValue(declarations:
Float => longhands::float::SpecifiedValue::from_gecko_keyword(value),
VerticalAlign => longhands::vertical_align::SpecifiedValue::from_gecko_keyword(value),
TextAlign => longhands::text_align::SpecifiedValue::from_gecko_keyword(value),
TextEmphasisPosition => longhands::text_emphasis_position::SpecifiedValue::from_gecko_keyword(value),
Clear => longhands::clear::SpecifiedValue::from_gecko_keyword(value),
FontSize => {
// We rely on Gecko passing in font-size values (0...7) here.
@ -1551,6 +1552,7 @@ pub extern "C" fn Servo_GetComputedKeyframeValues(keyframes: RawGeckoKeyframeLis
raw_data: RawServoStyleSetBorrowed,
computed_keyframes: RawGeckoComputedKeyframeValuesListBorrowedMut)
{
use std::mem;
use style::properties::LonghandIdSet;
use style::properties::declaration_block::Importance;
use style::values::computed::Context;
@ -1614,6 +1616,10 @@ pub extern "C" fn Servo_GetComputedKeyframeValues(keyframes: RawGeckoKeyframeLis
unsafe { animation_values.set_len((i + 1) as u32) };
seen.set_transition_property_bit(&anim.0);
animation_values[i].mProperty = anim.0.into();
// We only make sure we have enough space for this variable,
// but didn't construct a default value for StyleAnimationValue,
// so we should zero it to avoid getting undefined behaviors.
animation_values[i].mValue.mGecko = unsafe { mem::zeroed() };
animation_values[i].mValue.mServo.set_arc_leaky(Arc::new(anim.1));
}
}

Просмотреть файл

@ -1,32 +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/.
loader: taskgraph.loader.push_apk:loader
transforms:
- taskgraph.transforms.push_apk_breakpoint:transforms
- taskgraph.transforms.task:transforms
kind-dependencies:
- build-signing
jobs:
android-push-apk-breakpoint/opt:
description: PushApk breakpoint. Decides whether APK should be published onto Google Play Store
attributes:
build_platform: android-nightly
nightly: true
worker-type: # see transforms
worker:
implementation: push-apk-breakpoint
treeherder:
symbol: pub(Br)
platform: Android/opt
tier: 2
kind: other
run-on-projects:
- mozilla-aurora
- mozilla-beta
- mozilla-release
deadline-after: 5 days

Просмотреть файл

@ -1,38 +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/.
loader: taskgraph.loader.push_apk:loader
transforms:
- taskgraph.transforms.push_apk:transforms
- taskgraph.transforms.task:transforms
kind-dependencies:
- build-signing
- push-apk-breakpoint
jobs:
push-apk/opt:
description: Publishes APK onto Google Play Store
attributes:
build_platform: android-nightly
nightly: true
worker-type: scriptworker-prov-v1/pushapk-v1
worker:
upstream-artifacts: # see transforms
google-play-track: # see transforms
implementation: push-apk
# TODO unhardcode that line
dry-run: true
scopes: # see transforms
treeherder:
symbol: pub(gp)
platform: Android/opt
tier: 2
kind: other
run-on-projects:
- mozilla-aurora
- mozilla-beta
- mozilla-release
deadline-after: 5 days

Просмотреть файл

@ -195,15 +195,3 @@ beetmover-checksums
Beetmover, takes specific artifact checksums and pushes it to a location outside
of Taskcluster's task artifacts (archive.mozilla.org as one place) and in the
process determines the final location and "pretty" names it (version product name)
push-apk-breakpoint
-------------------
Decides whether or not APKs should be published onto Google Play Store. Jobs of this
kind depend on all the signed multi-locales (aka "multi") APKs for a given release,
in order to make the decision.
push-apk
--------
PushApk publishes Android packages onto Google Play Store. Jobs of this kind take
all the signed multi-locales (aka "multi") APKs for a given release and upload them
all at once. They also depend on the breakpoint.

Просмотреть файл

@ -1,32 +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/.
from __future__ import absolute_import, print_function, unicode_literals
from .transform import loader as base_loader
def loader(kind, path, config, params, loaded_tasks):
"""
Generate inputs implementing PushApk jobs. These depend on signed multi-locales nightly builds.
"""
jobs = base_loader(kind, path, config, params, loaded_tasks)
for job in jobs:
job['dependent-tasks'] = get_dependent_loaded_tasks(config, loaded_tasks)
yield job
def get_dependent_loaded_tasks(config, loaded_tasks):
nightly_tasks = (
task for task in loaded_tasks if task.attributes.get('nightly')
)
tasks_with_matching_kind = (
task for task in nightly_tasks if task.kind in config.get('kind-dependencies')
)
android_tasks = [
task for task in tasks_with_matching_kind if 'android' in task.label
]
return android_tasks

Просмотреть файл

@ -184,13 +184,13 @@ def target_tasks_code_coverage(full_task_graph, parameters):
@_target_task('nightly_fennec')
def target_tasks_nightly_fennec(full_task_graph, parameters):
def target_tasks_nightly(full_task_graph, parameters):
"""Select the set of tasks required for a nightly build of fennec. The
nightly build process involves a pipeline of builds, signing,
and, eventually, uploading the tasks to balrog."""
def filter(task):
platform = task.attributes.get('build_platform')
if platform in ('android-api-15-nightly', 'android-x86-nightly', 'android-nightly'):
if platform in ('android-api-15-nightly', 'android-x86-nightly'):
return task.attributes.get('nightly', False)
return [l for l, t in full_task_graph.tasks.iteritems() if filter(t)]
@ -228,7 +228,6 @@ def target_tasks_mozilla_beta(full_task_graph, parameters):
if task.kind in [
'balrog', 'beetmover', 'beetmover-checksums', 'beetmover-l10n',
'checksums-signing', 'nightly-l10n', 'nightly-l10n-signing',
'push-apk', 'push-apk-breakpoint',
]:
return False
return True
@ -249,7 +248,7 @@ def target_tasks_candidates_fennec(full_task_graph, parameters):
"""Select the set of tasks required for a candidates build of fennec. The
nightly build process involves a pipeline of builds, signing,
and, eventually, uploading the tasks to balrog."""
filtered_for_project = target_tasks_nightly_fennec(full_task_graph, parameters)
filtered_for_project = target_tasks_nightly(full_task_graph, parameters)
def filter(task):
if task.kind not in ['balrog']:

Просмотреть файл

@ -19,6 +19,7 @@ from taskgraph.transforms.base import TransformSequence
from taskgraph.util.schema import (
validate_schema,
Schema,
optionally_keyed_by,
)
from taskgraph.transforms.task import task_description_schema
from voluptuous import (
@ -80,14 +81,17 @@ job_description_schema = Schema({
Extra: object,
},
Required('worker-type'): Any(
task_description_schema['worker-type'],
{'by-platform': {basestring: task_description_schema['worker-type']}},
),
Required('worker'): Any(
task_description_schema['worker'],
{'by-platform': {basestring: task_description_schema['worker']}},
),
Required('worker-type'): optionally_keyed_by(
'platform',
task_description_schema['worker-type']),
# for `worker`, all we need is the implementation; the rest will be verified
# by the task description schema
Required('worker'): optionally_keyed_by(
'platform', {
Required('implementation'): basestring,
Extra: object,
}),
})
transforms = TransformSequence()

Просмотреть файл

@ -48,7 +48,7 @@ def docker_worker_spidermonkey(config, job, taskdesc, schema=sm_run_schema):
docker_worker_add_public_artifacts(config, job, taskdesc)
env = worker['env']
env = worker.setdefault('env', {})
env.update({
'MOZHARNESS_DISABLE': 'true',
'SPIDERMONKEY_VARIANT': run['spidermonkey-variant'],

Просмотреть файл

@ -1,67 +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/.
"""
Transform the push-apk kind into an actual task description.
"""
from __future__ import absolute_import, print_function, unicode_literals
import functools
from taskgraph.transforms.base import TransformSequence
from taskgraph.util.schema import Schema
from taskgraph.util.scriptworker import get_push_apk_scope, get_push_apk_track
from taskgraph.util.push_apk import fill_labels_tranform, validate_jobs_schema_transform_partial, \
validate_dependent_tasks_transform, delete_non_required_fields_transform, generate_dependencies
from voluptuous import Required
transforms = TransformSequence()
push_apk_description_schema = Schema({
# the dependent task (object) for this beetmover job, used to inform beetmover.
Required('dependent-tasks'): object,
Required('name'): basestring,
Required('label'): basestring,
Required('description'): basestring,
Required('attributes'): object,
Required('treeherder'): object,
Required('run-on-projects'): list,
Required('worker-type'): basestring,
Required('worker'): object,
Required('scopes'): None,
Required('deadline-after'): basestring,
})
validate_jobs_schema_transform = functools.partial(
validate_jobs_schema_transform_partial,
push_apk_description_schema,
'PushApk'
)
transforms.add(fill_labels_tranform)
transforms.add(validate_jobs_schema_transform)
transforms.add(validate_dependent_tasks_transform)
@transforms.add
def make_task_description(config, jobs):
for job in jobs:
job['dependencies'] = generate_dependencies(job['dependent-tasks'])
job['worker']['upstream-artifacts'] = generate_upstream_artifacts(job['dependencies'])
job['worker']['google-play-track'] = get_push_apk_track(config)
job['scopes'] = [get_push_apk_scope(config)]
yield job
transforms.add(delete_non_required_fields_transform)
def generate_upstream_artifacts(dependencies):
return [{
'taskId': {'task-reference': '<{}>'.format(task_kind)},
'taskType': 'signing',
'paths': ['public/build/target.apk'],
} for task_kind in dependencies.keys() if 'breakpoint' not in task_kind]

Просмотреть файл

@ -1,68 +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/.
"""
Transform the push-apk-breakpoint kind into an actual task description.
"""
from __future__ import absolute_import, print_function, unicode_literals
import functools
from taskgraph.transforms.base import TransformSequence
from taskgraph.util.schema import Schema
from taskgraph.util.scriptworker import get_push_apk_breakpoint_worker_type
from taskgraph.util.push_apk import fill_labels_tranform, validate_jobs_schema_transform_partial, \
validate_dependent_tasks_transform, delete_non_required_fields_transform, generate_dependencies
from voluptuous import Required
transforms = TransformSequence()
push_apk_breakpoint_description_schema = Schema({
# the dependent task (object) for this beetmover job, used to inform beetmover.
Required('dependent-tasks'): object,
Required('name'): basestring,
Required('label'): basestring,
Required('description'): basestring,
Required('attributes'): object,
Required('worker-type'): None,
Required('worker'): object,
Required('treeherder'): object,
Required('run-on-projects'): list,
Required('deadline-after'): basestring,
})
validate_jobs_schema_transform = functools.partial(
validate_jobs_schema_transform_partial,
push_apk_breakpoint_description_schema,
'PushApkBreakpoint'
)
transforms.add(fill_labels_tranform)
transforms.add(validate_jobs_schema_transform)
transforms.add(validate_dependent_tasks_transform)
@transforms.add
def make_task_description(config, jobs):
for job in jobs:
job['dependencies'] = generate_dependencies(job['dependent-tasks'])
worker_type = get_push_apk_breakpoint_worker_type(config)
job['worker-type'] = worker_type
job['worker']['payload'] = {} if 'human' in worker_type else {
'image': 'ubuntu:16.10',
'command': [
'/bin/bash',
'-c',
'echo "Dummy task while while bug 1351664 is implemented"'
],
'maxRunTime': 600,
}
yield job
transforms.add(delete_non_required_fields_transform)

Просмотреть файл

@ -201,11 +201,12 @@ task_description_schema = Schema({
# environment variables
Required('env', default={}): {basestring: taskref_or_string},
# the command to run
'command': [taskref_or_string],
# the command to run; if not given, docker-worker will default to the
# command in the docker image
Optional('command'): [taskref_or_string],
# the maximum time to run, in seconds
'max-run-time': int,
Required('max-run-time'): int,
# the exit status code that indicates the task should be retried
Optional('retry-exit-status'): int,
@ -214,7 +215,7 @@ task_description_schema = Schema({
Required('implementation'): 'generic-worker',
# command is a list of commands to run, sequentially
'command': [taskref_or_string],
Required('command'): [taskref_or_string],
# artifacts to extract from the task image after completion; note that artifacts
# for the generic worker cannot have names
@ -239,7 +240,7 @@ task_description_schema = Schema({
Required('env', default={}): {basestring: taskref_or_string},
# the maximum time to run, in seconds
'max-run-time': int,
Required('max-run-time'): int,
# os user groups for test task workers
Optional('os-groups', default=[]): [basestring],
@ -248,14 +249,14 @@ task_description_schema = Schema({
# see
# https://github.com/mozilla/buildbot-bridge/blob/master/bbb/schemas/payload.yml
'buildername': basestring,
'sourcestamp': {
Required('buildername'): basestring,
Required('sourcestamp'): {
'branch': basestring,
Optional('revision'): basestring,
Optional('repository'): basestring,
Optional('project'): basestring,
},
'properties': {
Required('properties'): {
'product': basestring,
Extra: basestring, # additional properties are allowed
},
@ -344,28 +345,6 @@ task_description_schema = Schema({
# Paths to the artifacts to sign
Required('paths'): [basestring],
}],
}, {
Required('implementation'): 'push-apk-breakpoint',
Required('payload'): object,
}, {
Required('implementation'): 'push-apk',
# list of artifact URLs for the artifacts that should be beetmoved
Required('upstream-artifacts'): [{
# taskId of the task with the artifact
Required('taskId'): taskref_or_string,
# type of signing task (for CoT)
Required('taskType'): basestring,
# Paths to the artifacts to sign
Required('paths'): [basestring],
}],
# "Invalid" is a noop for try and other non-supported branches
Required('google-play-track'): Any('production', 'beta', 'alpha', 'invalid'),
Required('dry-run', default=True): bool,
}),
})
@ -403,7 +382,6 @@ GROUP_NAMES = {
'TW32': 'Toolchain builds for Windows 32-bits',
'TW64': 'Toolchain builds for Windows 64-bits',
'SM-tc': 'Spidermonkey builds',
'pub': 'APK publishing',
}
UNKNOWN_GROUP_NAME = "Treeherder group {} has no name; add it to " + __file__
@ -620,22 +598,6 @@ def build_balrog_payload(config, task, task_def):
}
@payload_builder('push-apk')
def build_push_apk_payload(config, task, task_def):
worker = task['worker']
task_def['payload'] = {
'dry_run': worker['dry-run'],
'upstreamArtifacts': worker['upstream-artifacts'],
'google_play_track': worker['google-play-track'],
}
@payload_builder('push-apk-breakpoint')
def build_push_apk_breakpoint_payload(config, task, task_def):
task_def['payload'] = task['worker']['payload']
@payload_builder('native-engine')
def build_macosx_engine_payload(config, task, task_def):
worker = task['worker']

Просмотреть файл

@ -1,73 +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/.
"""
Common functions for both push-apk and push-apk-breakpoint.
"""
import re
from taskgraph.util.schema import validate_schema
REQUIRED_ARCHITECTURES = ('android-x86', 'android-api-15')
PLATFORM_REGEX = re.compile(r'signing-android-(\S+)-nightly')
def fill_labels_tranform(_, jobs):
for job in jobs:
job['label'] = job['name']
yield job
def validate_jobs_schema_transform_partial(description_schema, transform_type, config, jobs):
for job in jobs:
label = job.get('label', '?no-label?')
yield validate_schema(
description_schema, job,
"In {} ({!r} kind) task for {!r}:".format(transform_type, config.kind, label)
)
def validate_dependent_tasks_transform(_, jobs):
for job in jobs:
check_every_architecture_is_present_in_dependent_tasks(job['dependent-tasks'])
yield job
def check_every_architecture_is_present_in_dependent_tasks(dependent_tasks):
dependencies_labels = [task.label for task in dependent_tasks]
is_this_required_architecture_present = {
architecture: any(architecture in label for label in dependencies_labels)
for architecture in REQUIRED_ARCHITECTURES
}
are_all_required_achitectures_present = all(is_this_required_architecture_present.values())
if not are_all_required_achitectures_present:
raise Exception('''One or many required architectures are missing.
Required architectures: {}.
Given dependencies: {}.
'''.format(REQUIRED_ARCHITECTURES, dependent_tasks)
)
def delete_non_required_fields_transform(_, jobs):
for job in jobs:
del job['name']
del job['dependent-tasks']
yield job
def generate_dependencies(dependent_tasks):
# Because we depend on several tasks that have the same kind, we introduce the platform
dependencies = {}
for task in dependent_tasks:
platform_match = PLATFORM_REGEX.match(task.label)
# platform_match is None when the breakpoint task is given
task_kind = task.kind if platform_match is None else \
'{}-{}'.format(task.kind, platform_match.group(1))
dependencies[task_kind] = task.label
return dependencies

Просмотреть файл

@ -144,44 +144,6 @@ BALROG_SERVER_SCOPES = {
}
PUSH_APK_SCOPE_ALIAS_TO_PROJECT = [[
'aurora', set([
'mozilla-aurora',
])
], [
'beta', set([
'mozilla-beta',
])
], [
'release', set([
'mozilla-release',
])
]]
PUSH_APK_SCOPES = {
'aurora': 'project:releng:googleplay:aurora',
'beta': 'project:releng:googleplay:beta',
'release': 'project:releng:googleplay:release',
'default': 'project:releng:googleplay:invalid',
}
# See https://github.com/mozilla-releng/pushapkscript#aurora-beta-release-vs-alpha-beta-production
PUSH_APK_GOOGLE_PLAY_TRACT = {
'aurora': 'beta',
'beta': 'production',
'release': 'production',
'default': 'invalid',
}
PUSH_APK_BREAKPOINT_WORKER_TYPE = {
'aurora': 'aws-provisioner-v1/taskcluster-generic',
'beta': 'null-provisioner/human-breakpoint',
'release': 'null-provisioner/human-breakpoint',
'default': 'invalid/invalid',
}
# scope functions {{{1
def get_scope_from_project(alias_to_project_map, alias_to_scope_map, config):
"""Determine the restricted scope from `config.params['project']`.
@ -274,24 +236,6 @@ get_balrog_server_scope = functools.partial(
BALROG_SERVER_SCOPES
)
get_push_apk_scope = functools.partial(
get_scope_from_project,
PUSH_APK_SCOPE_ALIAS_TO_PROJECT,
PUSH_APK_SCOPES
)
get_push_apk_track = functools.partial(
get_scope_from_project,
PUSH_APK_SCOPE_ALIAS_TO_PROJECT,
PUSH_APK_GOOGLE_PLAY_TRACT
)
get_push_apk_breakpoint_worker_type = functools.partial(
get_scope_from_project,
PUSH_APK_SCOPE_ALIAS_TO_PROJECT,
PUSH_APK_BREAKPOINT_WORKER_TYPE
)
# release_config {{{1
def get_release_config(config):

Просмотреть файл

@ -23,13 +23,16 @@ class Theme {
*
* @param {string} baseURI The base URI of the extension, used to
* resolve relative filepaths.
* @param {Object} logger Reference to the (console) logger that will be used
* to show manifest warnings to the theme author.
*/
constructor(baseURI) {
constructor(baseURI, logger) {
// A dictionary of light weight theme styles.
this.lwtStyles = {
icons: {},
};
this.baseURI = baseURI;
this.logger = logger;
}
/**
@ -52,6 +55,10 @@ class Theme {
this.loadIcons(details.icons);
}
if (details.properties) {
this.loadProperties(details.properties);
}
// Lightweight themes require all properties to be defined.
if (this.lwtStyles.headerURL &&
this.lwtStyles.accentcolor &&
@ -108,6 +115,11 @@ class Theme {
}
switch (image) {
case "additional_backgrounds": {
let backgroundImages = val.map(img => this.baseURI.resolve(img));
this.lwtStyles.additionalBackgrounds = backgroundImages;
break;
}
case "headerURL":
case "theme_frame": {
let resolvedURL = this.baseURI.resolve(val);
@ -140,6 +152,69 @@ class Theme {
}
}
/**
* Helper method for preparing properties found in the extension's manifest.
* Properties are commonly used to specify more advanced behavior of colors,
* images or icons.
*
* @param {Object} properties Dictionary mapping properties to values.
*/
loadProperties(properties) {
let additionalBackgroundsCount = (this.lwtStyles.additionalBackgrounds &&
this.lwtStyles.additionalBackgrounds.length) || 0;
const assertValidAdditionalBackgrounds = (property, valueCount) => {
if (!additionalBackgroundsCount) {
this.logger.warn(`The '${property}' property takes effect only when one ` +
`or more additional background images are specified using the 'additional_backgrounds' property.`);
return false;
}
if (additionalBackgroundsCount !== valueCount) {
this.logger.warn(`The amount of values specified for '${property}' ` +
`(${valueCount}) is not equal to the amount of additional background ` +
`images (${additionalBackgroundsCount}), which may lead to unexpected results.`);
}
return true;
};
for (let property of Object.getOwnPropertyNames(properties)) {
let val = properties[property];
if (!val) {
continue;
}
switch (property) {
case "additional_backgrounds_alignment": {
if (!assertValidAdditionalBackgrounds(property, val.length)) {
break;
}
let alignment = [];
if (this.lwtStyles.headerURL) {
alignment.push("right top");
}
this.lwtStyles.backgroundsAlignment = alignment.concat(val).join(",");
break;
}
case "additional_backgrounds_tiling": {
if (!assertValidAdditionalBackgrounds(property, val.length)) {
break;
}
let tiling = [];
if (this.lwtStyles.headerURL) {
tiling.push("no-repeat");
}
for (let i = 0, l = this.lwtStyles.additionalBackgrounds.length; i < l; ++i) {
tiling.push(val[i] || "no-repeat");
}
this.lwtStyles.backgroundsTiling = tiling.join(",");
break;
}
}
}
}
/**
* Unloads the currently applied theme.
*/
@ -147,6 +222,9 @@ class Theme {
let lwtStyles = {
headerURL: "",
accentcolor: "",
additionalBackgrounds: "",
backgroundsAlignment: "",
backgroundsTiling: "",
textcolor: "",
icons: {},
};
@ -168,7 +246,7 @@ extensions.on("manifest_theme", (type, directive, extension, manifest) => {
return;
}
let theme = new Theme(extension.baseURI);
let theme = new Theme(extension.baseURI, extension.logger);
theme.load(manifest.theme);
themeMap.set(extension, theme);
});
@ -201,7 +279,7 @@ extensions.registerSchemaAPI("theme", "addon_parent", context => {
// WebExtensions using the Theme API will not have a theme defined
// in the manifest. Therefore, we need to initialize the theme the
// first time browser.theme.update is called.
theme = new Theme(extension.baseURI);
theme = new Theme(extension.baseURI, extension.logger);
themeMap.set(extension, theme);
}

Просмотреть файл

@ -23,12 +23,17 @@
"type": "object",
"optional": true,
"properties": {
"additional_backgrounds": {
"type": "array",
"items": { "$ref": "ExtensionURL" },
"optional": true
},
"headerURL": {
"type": "string",
"$ref": "ExtensionURL",
"optional": true
},
"theme_frame": {
"type": "string",
"$ref": "ExtensionURL",
"optional": true
}
},
@ -193,6 +198,34 @@
}
},
"additionalProperties": { "$ref": "UnrecognizedProperty" }
},
"properties": {
"type": "object",
"optional": true,
"properties": {
"additional_backgrounds_alignment": {
"type": "array",
"items": {
"type": "string",
"enum": [
"bottom", "center", "left", "right", "top",
"center bottom", "center center", "center top",
"left bottom", "left center", "left top",
"right bottom", "right center", "right top"
]
},
"optional": true
},
"additional_backgrounds_tiling": {
"type": "array",
"items": {
"type": "string",
"enum": ["no-repeat", "repeat", "repeat-x", "repeat-y"]
},
"optional": true
}
},
"additionalProperties": { "$ref": "UnrecognizedProperty" }
}
},
"additionalProperties": { "$ref": "UnrecognizedProperty" }

Просмотреть файл

@ -5,4 +5,5 @@ support-files =
[browser_ext_themes_chromeparity.js]
[browser_ext_themes_dynamic_updates.js]
[browser_ext_themes_lwtsupport.js]
[browser_ext_themes_multiple_backgrounds.js]
[browser_ext_themes_persistence.js]

Просмотреть файл

@ -1,12 +1,5 @@
"use strict";
const ENCODED_IMAGE_DATA = "iVBORw0KGgoAAAANSUhEUgAAABkAAAAZCAYAAADE6YVjAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAAdhwAAHYcBj+XxZQAAB5dJREFUSMd91vmTlEcZB/Bvd7/vO+/ce83O3gfLDUsC4VgIghBUEo2GM9GCFTaQBEISA1qIEVNQ4aggJDGIgAGTlFUKKcqKQpVHaQyny7FrCMiywp4ze+/Mzs67M/PO+3a3v5jdWo32H/B86vv0U083weecV3+0C8lkEh6PhzS3tuLkieMSAKo3fW9Mb1eoUtM0jemerukLllzrbGlKheovUpeqkmt113hPfx/27tyFF7+/bbge+U9g20s7kEwmMXXGNLrp2fWi4V5z/tFjJ3fWX726INbfU2xx0yelkJAKdJf3Xl5+2QcPTpv2U0JZR+u92+xvly5ygKDm20/hlX17/jvB6VNnIKXEOydO0iFh4PLVy0XV1U83Vk54QI7JK+bl+UE5vjRfTCzJ5eWBTFEayBLjisvljKmzwmtWrVkEAPNmVrEZkyfh+fU1n59k//7X4Fbz8MK2DRSAWLNq/Yc36y9+3UVMsyAYVPMy/MTvdBKvriJhphDq6xa9vf0i1GMwPVhM5s9bsLw/EvtN2kywwnw/nzBuLDZs2z4auXGjHuvWbmBQdT5v7qytn165fLCyyGtXTR6j5GVkIsvlBCwTVNgQhMKCRDQ2iIbmJv7BpU+Ykl02UFOzdt6gkbzTEQ5Rl2KL3W8eGUE+/ssFXK+rJQ8vWigLgjk5z9ZsvpOniJzVi+ZKTUhCuATTKCjhoLAhhQAsjrSZBJcm7rZ22O+ev6mMmTLj55eu1T+jU8GOH/kJf2TZCiifIQsXfwEbN2yktxoaeYbf93DKSORMnTOZE0aZaVlQGYVKJCgjEJSCcgLB0xDERjINFBUEaXmuB20t95eEutr0xrufpo4eepMAkMPIxx+dx9at25EWQNXsh77q0Bzwen0ShEF32HCrCpjksAWHFAKqokFhgEJt2DKJeFoQv8eDuz3duaseXZYdixthaQ+NRlRCcKO+FgCweP68wswMF/yZWcTkNpLJFAZEGi6XC07NCUIIoqaNSLQfFALCEpCSEL/bK/wuw+12sKlDQzKs6k5yZt+rI+2aNKUSNdUbSSQWh2mJP46rGPeYrjtkY0M7jFgciUQCiqqgrCAfBTle3G9rR1NHN3SnDq9Lg49QlBQEcbfbQCKZlhQEDkXBih27RpDOrmacfP8YB4CfHT7uNXrCMFM2FdDBVQ5TE/A5HbDSJoSpQXAbXm8A4b5+gKrwulU4KKEBnwuzHpiQu+n1jQoQsM+9cYQMT9fvf/FLBYTaDqdzbfgft95PKzbPyQqwnlAXGkJtGIgNYnJpMfwOghLG0GJE0ZdiaOnsQ16OD6XZLkiRROdAgud5sxk8ridsy/pQU1VlOIkZN6QtAGnx0FA0AtXvIA4C5OX4kOWbiLRhQBDApTmgJuLwEonMgBvjgpmgjIEhhX7DAIVKNeqE05/dJbgEgRy5eOJ1ieXr1gJA7ZNLTrVVlAZLyopLJAUlHsrAMrwwrRQ4t6E5VHgSBExjcGpO0JQNizCE05a41dhOi+cXXVm144e1AHD1vXfFMOLy+KSHEDoEJLZ8s+ZWKpUusWwpFKiMUQ4jbiAaj8Hp9oExBsMCUpEIfD6JLKZjKJVGV3RIZGdm0qxA5qmz+/cgMhBVuuMRewRRGF7fe4BYHMgN5LxdV3vhy1EjrrjA5GAyTuKpFHricfS0dSDNCQRPoSyQgSSPI+UBEtwShiWUQEHw5mMvbz4JRcXvDr3B3dBG1sq5X53GlMcX4JWVTyvRQcOumDD2vfKcjOqiQDZPGBF2ryUEnjRhJlP4d6/BiQ1TABPKiyQhgtzvjPCJlQ/OGRwauqESSUPX68U3Vi4fGeH83Hwc3bYHBWUV0m0k4HB6z7aGu6sznDos00R3exgl5ZMwc+FMaJoKKxHFnbo6DMYiELBlqLOXDBq8dsvuPTfKALpwdbX42iMLsHjLd0Zv4RNvvY1wZxdZunyVDGZm6D/47sv12RqbmOPVhG5LGnAH4S8sgu71oK/pn2BWAoYw0dDbaTd19iqlZROejwzEjqgMSuXUifak8jF49JnNI0kAoGrBfET7+uXOrS+y5ta21JzZsw7faW45XJaXxSvyAtTpkOi483fwtAWP1wtvrhvd/VFx+26zojr9Les2PnfaTNu4cuGvvKe9BVv3/RgARiNTpk/Hod17MWikxcqzzfhK/+1jL2xc+YQAX1ISDHLV7WTpQQaLcASzPEiB41ZrmEeHkrTQ49uz/aXn+iilLKXq/MmlS0e/jFcuX4SmaQAAKSXlnIvVy1aQ6EBMFgRyCznDpfGFwdKqirF2tu5SdIeGrkiP+KS5yb7dHtIKsnI++kP9rS8RQvjmxxejePxD2HHwwP9FdCllurGhUbx14CAbiMc4Y2qVJqwLbo0qfpdLSilILB4Xg0mT6h7vnSWzZn9RoaynobWF3K6rk1NmzMWZ83/+37+V4a1cVg5JACYF45bFGVVWOFS2V1HUCjOdBqW0Q9fYb7N9/tcSptnldjpott8rFEXBO+f+NKrWMHL9Wu1nSUAIAaUUa59aAyE43E4X3bD8W6K5K6x1h1snRaMDJDuQf7+vrzfeG+mgfrcLHh3C79bx6wttGEqERiH/AjPohWMouv2ZAAAAAElFTkSuQmCC";
function imageBufferFromDataURI(encodedImageData) {
let decodedImageData = atob(encodedImageData);
return Uint8Array.from(decodedImageData, byte => byte.charCodeAt(0)).buffer;
}
add_task(function* setup() {
yield SpecialPowers.pushPrefEnv({
set: [["extensions.webextensions.themes.enabled", true]],

Просмотреть файл

@ -23,8 +23,7 @@ function validateTheme(backgroundImage, accentColor, textColor) {
Assert.equal(docEl.getAttribute("lwthemetextcolor"), "bright",
"LWT text color attribute should be set");
Assert.equal(style.backgroundImage, 'url("' + backgroundImage.replace(/"/g, '\\"') + '")',
"Expected correct background image");
Assert.ok(style.backgroundImage.includes(backgroundImage), "Expected correct background image");
Assert.equal(style.backgroundColor, "rgb(" + hexToRGB(accentColor).join(", ") + ")",
"Expected correct accent color");
Assert.equal(style.color, "rgb(" + hexToRGB(textColor).join(", ") + ")",
@ -42,6 +41,10 @@ add_task(function* test_dynamic_theme_updates() {
manifest: {
permissions: ["theme"],
},
files: {
"image1.png": BACKGROUND_1,
"image2.png": BACKGROUND_2,
},
background() {
browser.test.onMessage.addListener((msg, details) => {
if (msg != "update-theme") {
@ -58,7 +61,7 @@ add_task(function* test_dynamic_theme_updates() {
extension.sendMessage("update-theme", {
"images": {
"headerURL": BACKGROUND_1,
"headerURL": "image1.png",
},
"colors": {
"accentcolor": ACCENT_COLOR_1,
@ -68,11 +71,11 @@ add_task(function* test_dynamic_theme_updates() {
yield extension.awaitMessage("theme-updated");
validateTheme(BACKGROUND_1, ACCENT_COLOR_1, TEXT_COLOR_1);
validateTheme("image1.png", ACCENT_COLOR_1, TEXT_COLOR_1);
extension.sendMessage("update-theme", {
"images": {
"headerURL": BACKGROUND_2,
"headerURL": "image2.png",
},
"colors": {
"accentcolor": ACCENT_COLOR_2,
@ -82,7 +85,7 @@ add_task(function* test_dynamic_theme_updates() {
yield extension.awaitMessage("theme-updated");
validateTheme(BACKGROUND_2, ACCENT_COLOR_2, TEXT_COLOR_2);
validateTheme("image2.png", ACCENT_COLOR_2, TEXT_COLOR_2);
yield extension.unload();

Просмотреть файл

@ -11,7 +11,7 @@ add_task(function* test_support_LWT_properties() {
manifest: {
"theme": {
"images": {
"headerURL": BACKGROUND,
"headerURL": "image1.png",
},
"colors": {
"accentcolor": ACCENT_COLOR,
@ -19,6 +19,9 @@ add_task(function* test_support_LWT_properties() {
},
},
},
files: {
"image1.png": BACKGROUND,
},
});
yield extension.startup();
@ -30,8 +33,7 @@ add_task(function* test_support_LWT_properties() {
Assert.equal(docEl.getAttribute("lwthemetextcolor"), "bright",
"LWT text color attribute should be set");
Assert.equal(style.backgroundImage, 'url("' + BACKGROUND.replace(/"/g, '\\"') + '")',
"Expected background image");
Assert.ok(style.backgroundImage.includes("image1.png"), "Expected background image");
Assert.equal(style.backgroundColor, "rgb(" + hexToRGB(ACCENT_COLOR).join(", ") + ")",
"Expected correct background color");
Assert.equal(style.color, "rgb(" + hexToRGB(TEXT_COLOR).join(", ") + ")",
@ -47,10 +49,13 @@ add_task(function* test_LWT_requires_all_properties_defined_image_only() {
manifest: {
"theme": {
"images": {
"headerURL": BACKGROUND,
"headerURL": "image1.png",
},
},
},
files: {
"image1.png": BACKGROUND,
},
});
yield extension.startup();

Просмотреть файл

@ -0,0 +1,152 @@
"use strict";
add_task(async function setup() {
await SpecialPowers.pushPrefEnv({
set: [["extensions.webextensions.themes.enabled", true]],
});
});
add_task(async function test_support_backgrounds_position() {
let extension = ExtensionTestUtils.loadExtension({
manifest: {
"theme": {
"images": {
"headerURL": "face.png",
"additional_backgrounds": ["face.png", "face.png", "face.png"],
},
"colors": {
"accentcolor": `rgb(${FRAME_COLOR.join(",")})`,
"textcolor": `rgb(${TAB_TEXT_COLOR.join(",")})`,
},
"properties": {
"additional_backgrounds_alignment": ["left top", "center top", "right bottom"],
},
},
},
files: {
"face.png": imageBufferFromDataURI(ENCODED_IMAGE_DATA),
},
});
await extension.startup();
let docEl = window.document.documentElement;
Assert.ok(docEl.hasAttribute("lwtheme"), "LWT attribute should be set");
Assert.equal(docEl.getAttribute("lwthemetextcolor"), "bright",
"LWT text color attribute should be set");
let style = window.getComputedStyle(docEl);
let bgImage = style.backgroundImage.split(",")[0].trim();
Assert.ok(bgImage.includes("face.png"),
`The backgroundImage should use face.png. Actual value is: ${bgImage}`);
Assert.equal(Array(4).fill(bgImage).join(", "), style.backgroundImage,
"The backgroundImage should use face.png four times.");
Assert.equal(style.backgroundPosition, "100% 0%, 0% 0%, 50% 0%, 100% 100%",
"The backgroundPosition should use the four values provided.");
Assert.equal(style.backgroundRepeat, "no-repeat",
"The backgroundPosition should use the default value.");
await extension.unload();
Assert.ok(!docEl.hasAttribute("lwtheme"), "LWT attribute should not be set");
style = window.getComputedStyle(docEl);
// Styles should've reverted to their initial values.
Assert.equal(style.backgroundImage, "none");
Assert.equal(style.backgroundPosition, "0% 0%");
Assert.equal(style.backgroundRepeat, "repeat");
});
add_task(async function test_support_backgrounds_repeat() {
let extension = ExtensionTestUtils.loadExtension({
manifest: {
"theme": {
"images": {
"theme_frame": "face0.png",
"additional_backgrounds": ["face1.png", "face2.png", "face3.png"],
},
"colors": {
"frame": FRAME_COLOR,
"tab_text": TAB_TEXT_COLOR,
},
"properties": {
"additional_backgrounds_tiling": ["repeat-x", "repeat-y", "repeat"],
},
},
},
files: {
"face0.png": imageBufferFromDataURI(ENCODED_IMAGE_DATA),
"face1.png": imageBufferFromDataURI(ENCODED_IMAGE_DATA),
"face2.png": imageBufferFromDataURI(ENCODED_IMAGE_DATA),
"face3.png": imageBufferFromDataURI(ENCODED_IMAGE_DATA),
},
});
await extension.startup();
let docEl = window.document.documentElement;
Assert.ok(docEl.hasAttribute("lwtheme"), "LWT attribute should be set");
Assert.equal(docEl.getAttribute("lwthemetextcolor"), "bright",
"LWT text color attribute should be set");
let style = window.getComputedStyle(docEl);
let bgImage = style.backgroundImage.split(",")[0].trim();
Assert.ok(bgImage.includes("face0.png"),
`The backgroundImage should use face.png. Actual value is: ${bgImage}`);
Assert.equal([0, 1, 2, 3].map(num => bgImage.replace(/face[\d]*/, `face${num}`)).join(", "),
style.backgroundImage, "The backgroundImage should use face.png four times.");
Assert.equal(style.backgroundPosition, "100% 0%",
"The backgroundPosition should use the default value.");
Assert.equal(style.backgroundRepeat, "no-repeat, repeat-x, repeat-y, repeat",
"The backgroundPosition should use the four values provided.");
await extension.unload();
Assert.ok(!docEl.hasAttribute("lwtheme"), "LWT attribute should not be set");
});
add_task(async function test_additional_images_check() {
let extension = ExtensionTestUtils.loadExtension({
manifest: {
"theme": {
"images": {
"theme_frame": "face.png",
},
"colors": {
"frame": FRAME_COLOR,
"tab_text": TAB_TEXT_COLOR,
},
"properties": {
"additional_backgrounds_tiling": ["repeat-x", "repeat-y", "repeat"],
},
},
},
files: {
"face.png": imageBufferFromDataURI(ENCODED_IMAGE_DATA),
},
});
await extension.startup();
let docEl = window.document.documentElement;
Assert.ok(docEl.hasAttribute("lwtheme"), "LWT attribute should be set");
Assert.equal(docEl.getAttribute("lwthemetextcolor"), "bright",
"LWT text color attribute should be set");
let style = window.getComputedStyle(docEl);
let bgImage = style.backgroundImage.split(",")[0];
Assert.ok(bgImage.includes("face.png"),
`The backgroundImage should use face.png. Actual value is: ${bgImage}`);
Assert.equal(bgImage + ", none", style.backgroundImage,
"The backgroundImage should use face.png only once.");
Assert.equal(style.backgroundPosition, "100% 0%",
"The backgroundPosition should use the default value.");
Assert.equal(style.backgroundRepeat, "no-repeat",
"The backgroundPosition should use only one (default) value.");
await extension.unload();
Assert.ok(!docEl.hasAttribute("lwtheme"), "LWT attribute should not be set");
});

Просмотреть файл

@ -14,7 +14,7 @@ add_task(function* test_multiple_windows() {
manifest: {
"theme": {
"images": {
"headerURL": BACKGROUND,
"headerURL": "image1.png",
},
"colors": {
"accentcolor": ACCENT_COLOR,
@ -22,6 +22,9 @@ add_task(function* test_multiple_windows() {
},
},
},
files: {
"image1.png": BACKGROUND,
},
});
yield extension.startup();
@ -32,8 +35,7 @@ add_task(function* test_multiple_windows() {
Assert.ok(docEl.hasAttribute("lwtheme"), "LWT attribute should be set");
Assert.equal(docEl.getAttribute("lwthemetextcolor"), "bright",
"LWT text color attribute should be set");
Assert.equal(style.backgroundImage, 'url("' + BACKGROUND.replace(/"/g, '\\"') + '")',
"Expected background image");
Assert.ok(style.backgroundImage.includes("image1.png"), "Expected background image");
// Now we'll open a new window to see if the theme is also applied there.
let window2 = yield BrowserTestUtils.openNewBrowserWindow();
@ -43,8 +45,7 @@ add_task(function* test_multiple_windows() {
Assert.ok(docEl.hasAttribute("lwtheme"), "LWT attribute should be set");
Assert.equal(docEl.getAttribute("lwthemetextcolor"), "bright",
"LWT text color attribute should be set");
Assert.equal(style.backgroundImage, 'url("' + BACKGROUND.replace(/"/g, '\\"') + '")',
"Expected background image");
Assert.ok(style.backgroundImage.includes("image1.png"), "Expected background image");
yield BrowserTestUtils.closeWindow(window2);
yield extension.unload();

Просмотреть файл

@ -1,12 +1,47 @@
/* exported BACKGROUND, ACCENT_COLOR, TEXT_COLOR, hexToRGB */
/* exported ACCENT_COLOR, BACKGROUND, ENCODED_IMAGE_DATA, FRAME_COLOR, TAB_TEXT_COLOR,
TEXT_COLOR, imageBufferFromDataURI, hexToRGB */
"use strict";
const BACKGROUND = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==";
const BACKGROUND = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0" +
"DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==";
const ENCODED_IMAGE_DATA = "iVBORw0KGgoAAAANSUhEUgAAABkAAAAZCAYAAADE6YVjAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAgY0h" +
"STQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAAdhwAAHYcBj+XxZQAAB5dJREFUSMd" +
"91vmTlEcZB/Bvd7/vO+/ce83O3gfLDUsC4VgIghBUEo2GM9GCFTaQBEISA1qIEVNQ4aggJDGIgAGTlFUKKcqKQpVHaQyny7FrCMiywp4ze+/Mzs67M/P" +
"O+3a3v5jdWo32H/B86vv0U083weecV3+0C8lkEh6PhzS3tuLkieMSAKo3fW9Mb1eoUtM0jemerukLllzrbGlKheovUpeqkmt113hPfx/27tyFF7+/bbg" +
"e+U9g20s7kEwmMXXGNLrp2fWi4V5z/tFjJ3fWX726INbfU2xx0yelkJAKdJf3Xl5+2QcPTpv2U0JZR+u92+xvly5ygKDm20/hlX17/jvB6VNnIKXEOyd" +
"O0iFh4PLVy0XV1U83Vk54QI7JK+bl+UE5vjRfTCzJ5eWBTFEayBLjisvljKmzwmtWrVkEAPNmVrEZkyfh+fU1n59k//7X4Fbz8MK2DRSAWLNq/Yc36y9" +
"+3UVMsyAYVPMy/MTvdBKvriJhphDq6xa9vf0i1GMwPVhM5s9bsLw/EvtN2kywwnw/nzBuLDZs2z4auXGjHuvWbmBQdT5v7qytn165fLCyyGtXTR6j5GV" +
"kIsvlBCwTVNgQhMKCRDQ2iIbmJv7BpU+Ykl02UFOzdt6gkbzTEQ5Rl2KL3W8eGUE+/ssFXK+rJQ8vWigLgjk5z9ZsvpOniJzVi+ZKTUhCuATTKCjhoLA" +
"hhQAsjrSZBJcm7rZ22O+ev6mMmTLj55eu1T+jU8GOH/kJf2TZCiifIQsXfwEbN2yktxoaeYbf93DKSORMnTOZE0aZaVlQGYVKJCgjEJSCcgLB0xDERjI" +
"NFBUEaXmuB20t95eEutr0xrufpo4eepMAkMPIxx+dx9at25EWQNXsh77q0Bzwen0ShEF32HCrCpjksAWHFAKqokFhgEJt2DKJeFoQv8eDuz3duaseXZY" +
"dixthaQ+NRlRCcKO+FgCweP68wswMF/yZWcTkNpLJFAZEGi6XC07NCUIIoqaNSLQfFALCEpCSEL/bK/wuw+12sKlDQzKs6k5yZt+rI+2aNKUSNdUbSSQ" +
"Wh2mJP46rGPeYrjtkY0M7jFgciUQCiqqgrCAfBTle3G9rR1NHN3SnDq9Lg49QlBQEcbfbQCKZlhQEDkXBih27RpDOrmacfP8YB4CfHT7uNXrCMFM2FdD" +
"BVQ5TE/A5HbDSJoSpQXAbXm8A4b5+gKrwulU4KKEBnwuzHpiQu+n1jQoQsM+9cYQMT9fvf/FLBYTaDqdzbfgft95PKzbPyQqwnlAXGkJtGIgNYnJpMfw" +
"OghLG0GJE0ZdiaOnsQ16OD6XZLkiRROdAgud5sxk8ridsy/pQU1VlOIkZN6QtAGnx0FA0AtXvIA4C5OX4kOWbiLRhQBDApTmgJuLwEonMgBvjgpmgjIE" +
"hhX7DAIVKNeqE05/dJbgEgRy5eOJ1ieXr1gJA7ZNLTrVVlAZLyopLJAUlHsrAMrwwrRQ4t6E5VHgSBExjcGpO0JQNizCE05a41dhOi+cXXVm144e1AHD" +
"1vXfFMOLy+KSHEDoEJLZ8s+ZWKpUusWwpFKiMUQ4jbiAaj8Hp9oExBsMCUpEIfD6JLKZjKJVGV3RIZGdm0qxA5qmz+/cgMhBVuuMRewRRGF7fe4BYHMg" +
"N5LxdV3vhy1EjrrjA5GAyTuKpFHricfS0dSDNCQRPoSyQgSSPI+UBEtwShiWUQEHw5mMvbz4JRcXvDr3B3dBG1sq5X53GlMcX4JWVTyvRQcOumDD2vfK" +
"cjOqiQDZPGBF2ryUEnjRhJlP4d6/BiQ1TABPKiyQhgtzvjPCJlQ/OGRwauqESSUPX68U3Vi4fGeH83Hwc3bYHBWUV0m0k4HB6z7aGu6sznDos00R3exg" +
"l5ZMwc+FMaJoKKxHFnbo6DMYiELBlqLOXDBq8dsvuPTfKALpwdbX42iMLsHjLd0Zv4RNvvY1wZxdZunyVDGZm6D/47sv12RqbmOPVhG5LGnAH4S8sgu7" +
"1oK/pn2BWAoYw0dDbaTd19iqlZROejwzEjqgMSuXUifak8jF49JnNI0kAoGrBfET7+uXOrS+y5ta21JzZsw7faW45XJaXxSvyAtTpkOi483fwtAWP1wt" +
"vrhvd/VFx+26zojr9Les2PnfaTNu4cuGvvKe9BVv3/RgARiNTpk/Hod17MWikxcqzzfhK/+1jL2xc+YQAX1ISDHLV7WTpQQaLcASzPEiB41ZrmEeHkrT" +
"Q49uz/aXn+iilLKXq/MmlS0e/jFcuX4SmaQAAKSXlnIvVy1aQ6EBMFgRyCznDpfGFwdKqirF2tu5SdIeGrkiP+KS5yb7dHtIKsnI++kP9rS8RQvjmxxe" +
"jePxD2HHwwP9FdCllurGhUbx14CAbiMc4Y2qVJqwLbo0qfpdLSilILB4Xg0mT6h7vnSWzZn9RoaynobWF3K6rk1NmzMWZ83/+37+V4a1cVg5JACYF45b" +
"FGVVWOFS2V1HUCjOdBqW0Q9fYb7N9/tcSptnldjpott8rFEXBO+f+NKrWMHL9Wu1nSUAIAaUUa59aAyE43E4X3bD8W6K5K6x1h1snRaMDJDuQf7+vrzf" +
"eG+mgfrcLHh3C79bx6wttGEqERiH/AjPohWMouv2ZAAAAAElFTkSuQmCC";
const ACCENT_COLOR = "#a14040";
const TEXT_COLOR = "#fac96e";
// For testing aliases of the colors above:
const FRAME_COLOR = [71, 105, 91];
const TAB_TEXT_COLOR = [207, 221, 192, .9];
function hexToRGB(hex) {
hex = parseInt((hex.indexOf("#") > -1 ? hex.substring(1) : hex), 16);
return [hex >> 16, (hex & 0x00FF00) >> 8, (hex & 0x0000FF)];
}
function imageBufferFromDataURI(encodedImageData) {
let decodedImageData = atob(encodedImageData);
return Uint8Array.from(decodedImageData, byte => byte.charCodeAt(0)).buffer;
}

Просмотреть файл

@ -105,10 +105,10 @@ LightweightThemeConsumer.prototype = {
// so if we don't reset first, it'll keep the old value.
root.style.removeProperty("--lwt-text-color");
root.style.removeProperty("--lwt-accent-color");
let textcolor = aData.textcolor || "black";
_setProperty(root, active, "--lwt-text-color", textcolor);
_setProperty(root, active, "--lwt-accent-color", aData.accentcolor || "white");
if (active) {
let textcolor = aData.textcolor || "black";
root.style.setProperty("--lwt-text-color", textcolor);
root.style.setProperty("--lwt-accent-color", aData.accentcolor || "white");
let dummy = this._doc.createElement("dummy");
dummy.style.color = textcolor;
let [r, g, b] = _parseRGB(this._doc.defaultView.getComputedStyle(dummy).color);
@ -134,6 +134,9 @@ LightweightThemeConsumer.prototype = {
_setImage(root, active, "--lwt-header-image", aData.headerURL);
_setImage(root, active, "--lwt-footer-image", aData.footerURL);
_setImage(root, active, "--lwt-additional-images", aData.additionalBackgrounds);
_setProperty(root, active, "--lwt-background-alignment", aData.backgroundsAlignment);
_setProperty(root, active, "--lwt-background-tiling", aData.backgroundsTiling);
if (active && aData.footerURL)
root.setAttribute("lwthemefooter", "true");
@ -166,11 +169,18 @@ LightweightThemeConsumer.prototype = {
}
}
function _setImage(aRoot, aActive, aVariableName, aURL) {
if (aActive && aURL) {
aRoot.style.setProperty(aVariableName, `url("${aURL.replace(/"/g, '\\"')}")`);
function _setImage(aRoot, aActive, aVariableName, aURLs) {
if (aURLs && !Array.isArray(aURLs)) {
aURLs = [aURLs];
}
_setProperty(aRoot, aActive, aVariableName, aURLs && aURLs.map(v => `url("${v.replace(/"/g, '\\"')}")`).join(","));
}
function _setProperty(root, active, variableName, value) {
if (active && value) {
root.style.setProperty(variableName, value);
} else {
aRoot.style.removeProperty(aVariableName);
root.style.removeProperty(variableName);
}
}

Просмотреть файл

@ -321,7 +321,7 @@ add_task(function*() {
id: ID
}
},
theme: { images: { headerURL: "https://example.com/example.png" } }
theme: { images: { headerURL: "example.png" } }
}
});

Просмотреть файл

@ -358,7 +358,7 @@ add_task(function* uninstallWebExtensionOffersUndo() {
manifest_version: 2,
name: "Web Extension Name",
version: "1.0",
theme: { images: { headerURL: "https://example.com/example.png" } },
theme: { images: { headerURL: "example.png" } },
}
});

Просмотреть файл

@ -406,7 +406,7 @@ add_task(function* testThemeExtension() {
manifest_version: 2,
name: "Web Extension Name",
version: "1.0",
theme: { images: { headerURL: "https://example.com/example.png" } },
theme: { images: { headerURL: "example.png" } },
}
});

Просмотреть файл

@ -161,7 +161,7 @@ add_task(function*() {
48: "icon48.png",
64: "icon64.png"
},
theme: { images: { headerURL: "https://example.com/example.png" } }
theme: { images: { headerURL: "example.png" } }
});
});
@ -201,7 +201,7 @@ add_task(function*() {
128: "icon128.png",
256: "icon256.png"
},
theme: { images: { headerURL: "https://example.com/example.png" } }
theme: { images: { headerURL: "example.png" } }
});
});
@ -227,6 +227,6 @@ add_task(function*() {
id: ID
}
},
theme: { images: { headerURL: "https://example.com/example.png" } }
theme: { images: { headerURL: "example.png" } }
});
});

Просмотреть файл

@ -42,7 +42,7 @@ add_task(function* setup_to_default_browserish_state() {
manifest_version: 2,
name: "Web Extension Name",
version: "1.0",
theme: { images: { headerURL: "https://example.com/example.png" } },
theme: { images: { headerURL: "example.png" } },
applications: {
gecko: {
id: THEME_IDS[1]

Просмотреть файл

@ -607,7 +607,13 @@ PuppetWidget::GetLayerManager(PLayerTransactionChild* aShadowManager,
return mLayerManager;
}
if (gfxVars::UseWebRender()) {
if (mTabChild && !mTabChild->IsLayersConnected()) {
// If we know for sure that the parent side of this TabChild is not
// connected to the compositor, we don't want to use a "remote" layer
// manager like WebRender or Client. Instead we use a Basic one which
// can do drawing in this process.
mLayerManager = new BasicLayerManager(this);
} else if (gfxVars::UseWebRender()) {
mLayerManager = new WebRenderLayerManager(this);
} else {
mLayerManager = new ClientLayerManager(this);

Просмотреть файл

@ -154,16 +154,12 @@ template<class Impl>
class CodecProxy::NativeCallbacks::Natives : public mozilla::jni::NativeImpl<NativeCallbacks, Impl>
{
public:
static const JNINativeMethod methods[5];
static const JNINativeMethod methods[4];
};
template<class Impl>
const JNINativeMethod CodecProxy::NativeCallbacks::Natives<Impl>::methods[] = {
mozilla::jni::MakeNativeMethod<CodecProxy::NativeCallbacks::DisposeNative_t>(
mozilla::jni::NativeStub<CodecProxy::NativeCallbacks::DisposeNative_t, Impl>
::template Wrap<&Impl::DisposeNative>),
mozilla::jni::MakeNativeMethod<CodecProxy::NativeCallbacks::OnError_t>(
mozilla::jni::NativeStub<CodecProxy::NativeCallbacks::OnError_t, Impl>
::template Wrap<&Impl::OnError>),

Просмотреть файл

@ -184,9 +184,9 @@ const char CodecProxy::name[] =
constexpr char CodecProxy::Create_t::name[];
constexpr char CodecProxy::Create_t::signature[];
auto CodecProxy::Create(mozilla::jni::Object::Param a0, mozilla::jni::Object::Param a1, mozilla::jni::Object::Param a2, mozilla::jni::String::Param a3) -> CodecProxy::LocalRef
auto CodecProxy::Create(bool a0, mozilla::jni::Object::Param a1, mozilla::jni::Object::Param a2, mozilla::jni::Object::Param a3, mozilla::jni::String::Param a4) -> CodecProxy::LocalRef
{
return mozilla::jni::Method<Create_t>::Call(CodecProxy::Context(), nullptr, a0, a1, a2, a3);
return mozilla::jni::Method<Create_t>::Call(CodecProxy::Context(), nullptr, a0, a1, a2, a3, a4);
}
constexpr char CodecProxy::Flush_t::name[];
@ -229,6 +229,14 @@ auto CodecProxy::ReleaseOutput(mozilla::jni::Object::Param a0, bool a1) const ->
return mozilla::jni::Method<ReleaseOutput_t>::Call(CodecProxy::mCtx, nullptr, a0, a1);
}
constexpr char CodecProxy::SetRates_t::name[];
constexpr char CodecProxy::SetRates_t::signature[];
auto CodecProxy::SetRates(int32_t a0) const -> bool
{
return mozilla::jni::Method<SetRates_t>::Call(CodecProxy::mCtx, nullptr, a0);
}
const char CodecProxy::NativeCallbacks::name[] =
"org/mozilla/gecko/media/CodecProxy$NativeCallbacks";
@ -243,6 +251,11 @@ auto CodecProxy::NativeCallbacks::New() -> NativeCallbacks::LocalRef
constexpr char CodecProxy::NativeCallbacks::DisposeNative_t::name[];
constexpr char CodecProxy::NativeCallbacks::DisposeNative_t::signature[];
auto CodecProxy::NativeCallbacks::DisposeNative() const -> void
{
return mozilla::jni::Method<DisposeNative_t>::Call(NativeCallbacks::mCtx, nullptr);
}
constexpr char CodecProxy::NativeCallbacks::OnError_t::name[];
constexpr char CodecProxy::NativeCallbacks::OnError_t::signature[];

Просмотреть файл

@ -668,13 +668,14 @@ public:
typedef CodecProxy::LocalRef ReturnType;
typedef CodecProxy::Param SetterType;
typedef mozilla::jni::Args<
bool,
mozilla::jni::Object::Param,
mozilla::jni::Object::Param,
mozilla::jni::Object::Param,
mozilla::jni::String::Param> Args;
static constexpr char name[] = "create";
static constexpr char signature[] =
"(Landroid/media/MediaFormat;Landroid/view/Surface;Lorg/mozilla/gecko/media/CodecProxy$Callbacks;Ljava/lang/String;)Lorg/mozilla/gecko/media/CodecProxy;";
"(ZLandroid/media/MediaFormat;Landroid/view/Surface;Lorg/mozilla/gecko/media/CodecProxy$Callbacks;Ljava/lang/String;)Lorg/mozilla/gecko/media/CodecProxy;";
static const bool isStatic = true;
static const mozilla::jni::ExceptionMode exceptionMode =
mozilla::jni::ExceptionMode::ABORT;
@ -684,7 +685,7 @@ public:
mozilla::jni::DispatchTarget::CURRENT;
};
static auto Create(mozilla::jni::Object::Param, mozilla::jni::Object::Param, mozilla::jni::Object::Param, mozilla::jni::String::Param) -> CodecProxy::LocalRef;
static auto Create(bool, mozilla::jni::Object::Param, mozilla::jni::Object::Param, mozilla::jni::Object::Param, mozilla::jni::String::Param) -> CodecProxy::LocalRef;
struct Flush_t {
typedef CodecProxy Owner;
@ -786,6 +787,26 @@ public:
auto ReleaseOutput(mozilla::jni::Object::Param, bool) const -> bool;
struct SetRates_t {
typedef CodecProxy Owner;
typedef bool ReturnType;
typedef bool SetterType;
typedef mozilla::jni::Args<
int32_t> Args;
static constexpr char name[] = "setRates";
static constexpr char signature[] =
"(I)Z";
static const bool isStatic = false;
static const mozilla::jni::ExceptionMode exceptionMode =
mozilla::jni::ExceptionMode::ABORT;
static const mozilla::jni::CallingThread callingThread =
mozilla::jni::CallingThread::ANY;
static const mozilla::jni::DispatchTarget dispatchTarget =
mozilla::jni::DispatchTarget::CURRENT;
};
auto SetRates(int32_t) const -> bool;
static const mozilla::jni::CallingThread callingThread =
mozilla::jni::CallingThread::ANY;
@ -834,6 +855,8 @@ public:
mozilla::jni::DispatchTarget::CURRENT;
};
auto DisposeNative() const -> void;
struct OnError_t {
typedef NativeCallbacks Owner;
typedef void ReturnType;