mirror of
https://github.com/roytam1/palemoon27.git
synced 2026-05-26 14:30:27 +00:00
2828386673
- Bug 1247182 - Add an nsCSSRuleProcessor constructor that takes ownership of the given sheet array. r=birtles (07fd64f305)
- Bug 1260983 - Update animation properties when the style context changes; r=heycam (f68f67fc24)
- Bug 1160342 - Implement marquee using mutation observers, r=smaug (f8be96bfd8)
- Bug 1219842 - Enable a bunch of mochitest-plain tests under e10s. r=mrbkap (40aa7c1fce)
- Bug 1249061 - Improve property/attribute handling for marquees. r=smaug (1189869b3d)
- Bug 1266324 - Rename style const macro for unicode-bidi:bidi-override to be consistent with other style consts. r=jfkthame (24ded3fb69)
- Bug 1189894 - remove Atomics.h IntrinsicAddSub hack; r=erahm (d68fcf1801)
- Bug 1247338 - really make Atomic's constructor constexpr; r=Waldo (948c372b36)
- Bug 1266294 - Remove unnecessary compiler version checks for gcc <= 4.8.0 in mfbt. r=froydnj (8739fa352b)
- Bug 1260247. In chaos mode randomly decide to start a new image load even if the image is in the image cache when allowed by spec. r=seth (0d9dd4a1e9)
- Bug 1266294 - Remove unnecessary compiler version checks for gcc <= 4.8.0 in mfbt. r=froydnj (c230e51053)
- Bug 1209100 - Back out bug 1165185 on inbound. (af5f585393)
- Bug 1263342 - don't use REFCOUNTED_VIRTUAL_TYPENAME for mfbt FunctionImplBase. r=froydnj (f02a160c0b)
- Bug 1262577 - allow comparing mozilla::function with nullptr. r=froydnj (515a90b79a)
- Bug 1232418 - Allow mozilla::Tuple to support equality comparison; r=Waldo (1e8cb10660)
- Bug 1262663 - Clean up UniquePtr return documentation. r=Waldo (e92392b74e)
- Bug 1254831 - Fix compiler errors when SHOW_BOUNDING_BOX #ifdef is enabled. r=fredw (c0982211e8)
- Bug 1161169: Clean up usage of mContentParent and clearly identify it as specifically for async plugin init; r=billm,jimm (2ed3b9f96d)
- Bug 1164931 - Clear hangs when they're over (r=mrbkap) (f8de731e19)
- Bug 1250046 - Remove Shumway references from IPC. r=jmathies (7d7305c309)
- Bug 1254831 - Invalidate mfracs when linethickness changes. r=fredw (ff3d2bf6d0)
- Bug 1256943: Ensure that BLOCKED_ON_PLUGIN_MODULE_INIT_MS is being recorded in e10s chrome; r=jimm (ab879d7aec)
- Bug 1248821 - Force Flash to windowless mode regardless of sandbox level. r=jimm (007d45d5ef)
- Bug 1253434 - Avoid trying to capture plugin windows that have a zero width or height and a positive value for the other dim. r=aklotz (7a4995e8a5)
- Bug 1254829 - Calling TerminateProcess for WindowsXP to bypass DLL detach handler, r=bsmedberg (c04377e7b9)
- Bug 1263499 - unify the QuickExit function, r=bsmedberg (eeefdd7c2b)
- Bug 1246763 - Refactor GMP info file parsing into helper class. r=gerald (b4544c7370)
- Bug 1247556 - Use GMPInfoFileParser in GMPParent::ReadGMPMetaData(). r=gerald (6369ea568b)
- Bug 1247763 - Remove info file parsing from GMP child process. r=gerald (4454d25162)
- Bug 1258220 - Disable Adobe GMP if SSE2 isn't supported. r=gerald (55aba6b28a)
- Bug 1245789 - Make GMPParent::Init() return a promise, so it can be async. r=gerald (34ecae588a)
- Bug 1245789 - Add GMPAdapter which can be passed to GMPLoader to adapt non GMP library to GMP API. r=gerald (11f1734a6a)
- Bug 1245789 - Send name of GMPAdapter over to GMP process in StartPlugin message. r=gerald (a7b2df2c0d)
- Bug 1231633 - give scalar mLoadReplace a default value. r=bz (a7d1293b26)
- Bug 1245743 - Don't push new timeline markers while popping markers. r=vporof (f6efe5651e)
- Bug 1255459 - Use AutoRestore in ObservedDocShell::PopMarkers. r=smaug (d5fa90046e)
- Bug 1244897 - Use TimerlineConsumers in PopProfileTimelineMarkers to ensure that all methods acquire TimelineConsumers Mutex. r=vporof (39485ada73)
- Bug 1253516 - Do not acquire a lock that protects data that is not used; r=vporof (773337acce)
- Bug 1262970 - Change PRINCIPAL_HANDLE_NONE to a nullptr #define. r=froydnj (df470bc91c)
- Bug 1068596 - Pass SHARE_DELETE when opening a file so the file can be deleted without waiting for GC. r=roc (5b7d146cb8)
- Bug 1262970 - Allow nsMainThreadPtrHandle to be constructed by and compared to nullptr. r=froydnj (dbf01e5191)
- Bug 1249904: Use content-range values to determine length if content-length is unknown. r=roc (38a1388ea5)
- Bug 1251044: P1. Use content-range values to determine content's length. r=roc (72fb7f2a37)
- Bug 1251044: P2. Remove dead code and generalise the use of content-range header. r=roc (81d8dbf6f0)
- Bug 1228677 - Do not enforce CORS when loading file for MediaResource. r=cpearce (7d042fd6c2)
- Bug 1142272 - platformAPI memory leak, delete on return false. r=erahm (a7932ba850)
- Bug 1149616 - Fix the calculation of slots count in Read/WriteBuffer. r=bechen (6a2d010b3b)
- Bug 1262473 - don't needlessly construct nsAutoCString temporaries when serializing GMPVideoCodec; r=cpearce (7734560bb5)
- Bug 1245789 - Handle unencrypted samples in encrypted media. r=gerald Some encrypted MP4 files lack subsample info for some samples, so we need this check to prevent us crashing on such files. (6cf556699c)
- Bug 1245789 - Load Widevine CDM with sandbox level USER_RESTRICTED instead of USER_LOCKDOWN. r=bobowen (fd1ffd40a4)
- Bug 1245789 - Store GMPCapabilities by value, rather than on the heap. r=gerald (06c1737a4b)
- non-EME bits of Bug 1245789 - Parse Chrome CDM manifest in GMPService.addPluginDir (4116c843bd)
- Bug 1245789 - Whitelist functions needed by Widevine CDM in GMP child processes. r=jed (e525178fe5)
- Bug 1245789 - Ensure Widevine's nodeId are always unique and not permitted persistent storage. r=gerald (562e5b389b)
- Bug 1245789 - Push detection of WMF decoding for clearkey into GMPParent to simplify request media key system access logic. r=gerald (feffe136ba)
- Bug 1245789 - Make XPCOMThreadWrapper::GetCurrent() work. r=bholley (4e04f099cc)
- Bug 1245789 - Change GMPParent::InitPromise to instead use GenericPromise as defined in MozPromise.h. r=gerald (7c7c0f15d4)
- Bug 1158773: Use the same initial and delayed integrity level for Windows content sandbox level 0. r=tabraldes (2d6607e8a8)
- Bug 1219369: In Windows debug builds allow write access to TEMP for logging purposes. r=tabraldes (61737cff53)
- Bug 1166669: Enable process-level mitigations for the Windows content process sandbox. r=tabraldes (da06c34ceb)
- Bug 1197943: Turn off MITIGATION_STRICT_HANDLE_CHECKS for NPAPI process sandbox for causing hangs. r=aklotz (d31b767cd0)
- Bug 1245789 - Ensure GMPs have finished loading from MOZ_GMP_PATH before GMPServiceParent::GetContentParentFrom returns. r=gerald (361156a95b)
- Bug 1245789 - Ensure GMP service has added all plugins before running GMP remove tests. r=gerald (53616c6f09)
- Bug 1245789 - Expose AsyncAddPluginDirectory on GMPServiceParent. r=gerald (2a0fcd39ee)
- Bug 1183433 - Remove G-M-PServiceParent::AbortAsyncShutdown declaration, as it's not defined nor used anywhere. r=cpearce (b8f29f61dd)
- bit of Bug 1185392 - Use a separate mutex to protect mAsyncShutdownPluginStatesMutex, as mMutex could already be held when trying to update the states. r=cpearce (2be59fc7c9)
205 lines
5.0 KiB
C++
205 lines
5.0 KiB
C++
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
#include "nsIStyleRuleProcessor.h"
|
|
#include "nsIDocument.h"
|
|
#include "nsIContent.h"
|
|
#include "nsIServiceManager.h"
|
|
#include "nsXBLResourceLoader.h"
|
|
#include "nsXBLPrototypeResources.h"
|
|
#include "nsXBLPrototypeBinding.h"
|
|
#include "nsIDocumentObserver.h"
|
|
#include "mozilla/css/Loader.h"
|
|
#include "nsIURI.h"
|
|
#include "nsLayoutCID.h"
|
|
#include "nsCSSRuleProcessor.h"
|
|
#include "nsStyleSet.h"
|
|
#include "mozilla/dom/URL.h"
|
|
#include "mozilla/DebugOnly.h"
|
|
#include "mozilla/StyleSheetHandle.h"
|
|
#include "mozilla/StyleSheetHandleInlines.h"
|
|
|
|
using namespace mozilla;
|
|
using mozilla::dom::IsChromeURI;
|
|
|
|
nsXBLPrototypeResources::nsXBLPrototypeResources(nsXBLPrototypeBinding* aBinding)
|
|
{
|
|
MOZ_COUNT_CTOR(nsXBLPrototypeResources);
|
|
|
|
mLoader = new nsXBLResourceLoader(aBinding, this);
|
|
}
|
|
|
|
nsXBLPrototypeResources::~nsXBLPrototypeResources()
|
|
{
|
|
MOZ_COUNT_DTOR(nsXBLPrototypeResources);
|
|
if (mLoader) {
|
|
mLoader->mResources = nullptr;
|
|
}
|
|
}
|
|
|
|
void
|
|
nsXBLPrototypeResources::AddResource(nsIAtom* aResourceType, const nsAString& aSrc)
|
|
{
|
|
if (mLoader)
|
|
mLoader->AddResource(aResourceType, aSrc);
|
|
}
|
|
|
|
void
|
|
nsXBLPrototypeResources::LoadResources(bool* aResult)
|
|
{
|
|
if (mLoader)
|
|
mLoader->LoadResources(aResult);
|
|
else
|
|
*aResult = true; // All resources loaded.
|
|
}
|
|
|
|
void
|
|
nsXBLPrototypeResources::AddResourceListener(nsIContent* aBoundElement)
|
|
{
|
|
if (mLoader)
|
|
mLoader->AddResourceListener(aBoundElement);
|
|
}
|
|
|
|
nsresult
|
|
nsXBLPrototypeResources::FlushSkinSheets()
|
|
{
|
|
if (mStyleSheetList.Length() == 0)
|
|
return NS_OK;
|
|
|
|
nsCOMPtr<nsIDocument> doc =
|
|
mLoader->mBinding->XBLDocumentInfo()->GetDocument();
|
|
|
|
// If doc is null, we're in the process of tearing things down, so just
|
|
// return without rebuilding anything.
|
|
if (!doc) {
|
|
return NS_OK;
|
|
}
|
|
|
|
// We have scoped stylesheets. Reload any chrome stylesheets we
|
|
// encounter. (If they aren't skin sheets, it doesn't matter, since
|
|
// they'll still be in the chrome cache. Skip inline sheets, which
|
|
// skin sheets can't be, and which in any case don't have a usable
|
|
// URL to reload.)
|
|
|
|
nsTArray<StyleSheetHandle::RefPtr> oldSheets;
|
|
|
|
oldSheets.SwapElements(mStyleSheetList);
|
|
|
|
mozilla::css::Loader* cssLoader = doc->CSSLoader();
|
|
|
|
for (size_t i = 0, count = oldSheets.Length(); i < count; ++i) {
|
|
StyleSheetHandle oldSheet = oldSheets[i];
|
|
|
|
nsIURI* uri = oldSheet->GetSheetURI();
|
|
|
|
StyleSheetHandle::RefPtr newSheet;
|
|
if (!oldSheet->IsInline() && IsChromeURI(uri)) {
|
|
if (NS_FAILED(cssLoader->LoadSheetSync(uri, &newSheet)))
|
|
continue;
|
|
}
|
|
else {
|
|
newSheet = oldSheet;
|
|
}
|
|
|
|
mStyleSheetList.AppendElement(newSheet);
|
|
}
|
|
|
|
GatherRuleProcessor();
|
|
|
|
return NS_OK;
|
|
}
|
|
|
|
nsresult
|
|
nsXBLPrototypeResources::Write(nsIObjectOutputStream* aStream)
|
|
{
|
|
if (mLoader)
|
|
return mLoader->Write(aStream);
|
|
return NS_OK;
|
|
}
|
|
|
|
void
|
|
nsXBLPrototypeResources::Traverse(nsCycleCollectionTraversalCallback &cb)
|
|
{
|
|
NS_CYCLE_COLLECTION_NOTE_EDGE_NAME(cb, "proto mResources mLoader");
|
|
cb.NoteXPCOMChild(mLoader);
|
|
|
|
CycleCollectionNoteChild(cb, mRuleProcessor.get(), "mRuleProcessor");
|
|
ImplCycleCollectionTraverse(cb, mStyleSheetList, "mStyleSheetList");
|
|
}
|
|
|
|
void
|
|
nsXBLPrototypeResources::Unlink()
|
|
{
|
|
mStyleSheetList.Clear();
|
|
mRuleProcessor = nullptr;
|
|
}
|
|
|
|
void
|
|
nsXBLPrototypeResources::ClearLoader()
|
|
{
|
|
mLoader = nullptr;
|
|
}
|
|
|
|
void
|
|
nsXBLPrototypeResources::GatherRuleProcessor()
|
|
{
|
|
nsTArray<RefPtr<CSSStyleSheet>> sheets(mStyleSheetList.Length());
|
|
for (StyleSheetHandle sheet : mStyleSheetList) {
|
|
MOZ_ASSERT(sheet->IsGecko(),
|
|
"GatherRuleProcessor must only be called for "
|
|
"nsXBLPrototypeResources objects with Gecko-flavored style "
|
|
"backends");
|
|
sheets.AppendElement(sheet->AsGecko());
|
|
}
|
|
mRuleProcessor = new nsCSSRuleProcessor(Move(sheets),
|
|
SheetType::Doc,
|
|
nullptr,
|
|
mRuleProcessor);
|
|
}
|
|
|
|
void
|
|
nsXBLPrototypeResources::AppendStyleSheet(StyleSheetHandle aSheet)
|
|
{
|
|
mStyleSheetList.AppendElement(aSheet);
|
|
}
|
|
|
|
void
|
|
nsXBLPrototypeResources::RemoveStyleSheet(StyleSheetHandle aSheet)
|
|
{
|
|
mStyleSheetList.RemoveElement(aSheet);
|
|
}
|
|
|
|
void
|
|
nsXBLPrototypeResources::InsertStyleSheetAt(size_t aIndex, StyleSheetHandle aSheet)
|
|
{
|
|
mStyleSheetList.InsertElementAt(aIndex, aSheet);
|
|
}
|
|
|
|
StyleSheetHandle
|
|
nsXBLPrototypeResources::StyleSheetAt(size_t aIndex) const
|
|
{
|
|
return mStyleSheetList[aIndex];
|
|
}
|
|
|
|
size_t
|
|
nsXBLPrototypeResources::SheetCount() const
|
|
{
|
|
return mStyleSheetList.Length();
|
|
}
|
|
|
|
bool
|
|
nsXBLPrototypeResources::HasStyleSheets() const
|
|
{
|
|
return !mStyleSheetList.IsEmpty();
|
|
}
|
|
|
|
void
|
|
nsXBLPrototypeResources::AppendStyleSheetsTo(
|
|
nsTArray<StyleSheetHandle>& aResult) const
|
|
{
|
|
aResult.AppendElements(mStyleSheetList);
|
|
}
|