mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1032880 - Disable 'transparent content with displayports' warning in tests. r=tn
--HG-- extra : source : 15adf5eda9a8f4576202b62ad0268c73bcdc4977
This commit is contained in:
parent
7f3b653089
commit
465a491b64
@ -65,6 +65,22 @@ using namespace mozilla::dom;
|
||||
using namespace mozilla::layout;
|
||||
typedef FrameMetrics::ViewID ViewID;
|
||||
|
||||
#ifdef DEBUG
|
||||
static bool
|
||||
SpammyLayoutWarningsEnabled()
|
||||
{
|
||||
static bool sValue = false;
|
||||
static bool sValueInitialized = false;
|
||||
|
||||
if (!sValueInitialized) {
|
||||
Preferences::GetBool("layout.spammy_warnings.enabled", &sValue);
|
||||
sValueInitialized = true;
|
||||
}
|
||||
|
||||
return sValue;
|
||||
}
|
||||
#endif
|
||||
|
||||
static inline nsIFrame*
|
||||
GetTransformRootFrame(nsIFrame* aFrame)
|
||||
{
|
||||
@ -1254,13 +1270,6 @@ void nsDisplayList::PaintForFrame(nsDisplayListBuilder* aBuilder,
|
||||
bool isRoot = presContext->IsRootContentDocument();
|
||||
|
||||
nsIFrame* rootScrollFrame = presShell->GetRootScrollFrame();
|
||||
bool usingDisplayport = false;
|
||||
if (rootScrollFrame) {
|
||||
nsIContent* content = rootScrollFrame->GetContent();
|
||||
if (content) {
|
||||
usingDisplayport = nsLayoutUtils::GetDisplayPort(content, nullptr);
|
||||
}
|
||||
}
|
||||
|
||||
nsRect viewport(aBuilder->ToReferenceFrame(aForFrame), aForFrame->GetSize());
|
||||
|
||||
@ -1268,11 +1277,24 @@ void nsDisplayList::PaintForFrame(nsDisplayListBuilder* aBuilder,
|
||||
aBuilder->FindReferenceFrameFor(aForFrame),
|
||||
root, viewport,
|
||||
!isRoot, isRoot, containerParameters);
|
||||
|
||||
// NS_WARNING is debug-only, so don't even bother checking the conditions in
|
||||
// a release build.
|
||||
#ifdef DEBUG
|
||||
bool usingDisplayport = false;
|
||||
if (rootScrollFrame) {
|
||||
nsIContent* content = rootScrollFrame->GetContent();
|
||||
if (content) {
|
||||
usingDisplayport = nsLayoutUtils::GetDisplayPort(content, nullptr);
|
||||
}
|
||||
}
|
||||
if (usingDisplayport &&
|
||||
!(root->GetContentFlags() & Layer::CONTENT_OPAQUE)) {
|
||||
!(root->GetContentFlags() & Layer::CONTENT_OPAQUE) &&
|
||||
SpammyLayoutWarningsEnabled()) {
|
||||
// See bug 693938, attachment 567017
|
||||
NS_WARNING("Transparent content with displayports can be expensive.");
|
||||
}
|
||||
#endif
|
||||
|
||||
layerManager->SetRoot(root);
|
||||
layerBuilder->WillEndTransaction();
|
||||
|
@ -2046,6 +2046,9 @@ pref("layout.display-list.dump", false);
|
||||
// heavily loaded.
|
||||
pref("layout.frame_rate.precise", false);
|
||||
|
||||
// pref to control whether layout warnings that are hit quite often are enabled
|
||||
pref("layout.spammy_warnings.enabled", true);
|
||||
|
||||
// Is support for the Web Animations API enabled?
|
||||
#ifdef RELEASE_BUILD
|
||||
pref("dom.animations-api.core.enabled", false);
|
||||
|
@ -139,6 +139,9 @@ user_pref("layout.css.grid.enabled", true);
|
||||
// Enable CSS Ruby for testing
|
||||
user_pref("layout.css.ruby.enabled", true);
|
||||
|
||||
// Disable spammy layout warnings because they pollute test logs
|
||||
user_pref("layout.spammy_warnings.enabled", false);
|
||||
|
||||
// Enable mozContacts
|
||||
user_pref("dom.mozContacts.enabled", true);
|
||||
user_pref("dom.navigator-property.disable.mozContacts", false);
|
||||
|
Loading…
Reference in New Issue
Block a user