Back out 5 csets from bug 1229052 on a CLOSED TREE for failing to fix the nonunified build error even after many attempts. r=backout

This commit is contained in:
Kartikaya Gupta 2015-12-14 15:52:31 -05:00
parent 02cbbb38a5
commit 6b0c32286a
10 changed files with 4 additions and 146 deletions

View File

@ -1435,7 +1435,6 @@ nsIDocument::nsIDocument()
mPostedFlushUserFontSet(false),
mPartID(0),
mDidFireDOMContentLoaded(true),
mHasScrollLinkedEffect(false),
mUserHasInteracted(false)
{
SetInDocument();
@ -1556,8 +1555,6 @@ nsDocument::~nsDocument()
mixedContentLevel = MIXED_DISPLAY_CONTENT;
}
Accumulate(Telemetry::MIXED_CONTENT_PAGE_LOAD, mixedContentLevel);
Accumulate(Telemetry::SCROLL_LINKED_EFFECT_FOUND, mHasScrollLinkedEffect);
}
}
@ -13289,17 +13286,3 @@ nsIDocument::Fonts()
}
return mFontFaceSet;
}
void
nsIDocument::ReportHasScrollLinkedEffect()
{
if (mHasScrollLinkedEffect) {
// We already did this once for this document, don't do it again.
return;
}
mHasScrollLinkedEffect = true;
nsContentUtils::ReportToConsole(nsIScriptError::warningFlag,
NS_LITERAL_CSTRING("Async Pan/Zoom"),
this, nsContentUtils::eLAYOUT_PROPERTIES,
"ScrollLinkedEffectFound");
}

View File

@ -155,8 +155,8 @@ typedef CallbackObjectHolder<NodeFilter, nsIDOMNodeFilter> NodeFilterHolder;
} // namespace mozilla
#define NS_IDOCUMENT_IID \
{ 0xce1f7627, 0x7109, 0x4977, \
{ 0xba, 0x77, 0x49, 0x0f, 0xfd, 0xe0, 0x7a, 0xaa } }
{ 0x13011a82, 0x46cd, 0x4c33, \
{ 0x9d, 0x4e, 0x31, 0x41, 0xbb, 0x3f, 0x18, 0xe9 } }
// Enum for requesting a particular type of document when creating a doc
enum DocumentFlavor {
@ -2652,8 +2652,6 @@ public:
return mUserHasInteracted;
}
void ReportHasScrollLinkedEffect();
protected:
bool GetUseCounter(mozilla::UseCounter aUseCounter)
{
@ -3054,8 +3052,6 @@ protected:
uint32_t mBlockDOMContentLoaded;
bool mDidFireDOMContentLoaded:1;
bool mHasScrollLinkedEffect:1;
// Our live MediaQueryLists
PRCList mDOMMediaQueryLists;

View File

@ -9,4 +9,3 @@ ImageMapPolyWrongNumberOfCoords=The "coords" attribute of the <area shape="poly"
ImageMapPolyOddNumberOfCoords=The "coords" attribute of the <area shape="poly"> tag is missing the last "y" coordinate (the correct format is "x1,y1,x2,y2 …").
TablePartRelPosWarning=Relative positioning of table rows and row groups is now supported. This site may need to be updated because it may depend on this feature having no effect.
ScrollLinkedEffectFound=This site appears to use a scroll-linked positioning effect. This may not work well with asynchronous panning; see https://developers.mozilla.org/docs/Mozilla/Performance/ScrollLinkedEffects for further details and to join the discussion on related tools and features!

View File

@ -1,48 +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/. */
#include "ScrollLinkedEffectDetector.h"
#include "nsIDocument.h"
namespace mozilla {
namespace layers {
uint32_t ScrollLinkedEffectDetector::sDepth = 0;
bool ScrollLinkedEffectDetector::sFoundScrollLinkedEffect = false;
/* static */ void
ScrollLinkedEffectDetector::PositioningPropertyMutated()
{
MOZ_ASSERT(NS_IsMainThread());
if (sDepth > 0) {
// We are inside a scroll event dispatch
sFoundScrollLinkedEffect = true;
}
}
ScrollLinkedEffectDetector::ScrollLinkedEffectDetector(nsIDocument* aDoc)
: mDocument(aDoc)
{
MOZ_ASSERT(NS_IsMainThread());
sDepth++;
}
ScrollLinkedEffectDetector::~ScrollLinkedEffectDetector()
{
sDepth--;
if (sDepth == 0) {
// We have exited all (possibly-nested) scroll event dispatches,
// record whether or not we found an effect, and reset state
if (sFoundScrollLinkedEffect) {
mDocument->ReportHasScrollLinkedEffect();
sFoundScrollLinkedEffect = false;
}
}
}
} // namespace layers
} // namespace mozilla

View File

@ -1,43 +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_layers_ScrollLinkedEffectDetector_h
#define mozilla_layers_ScrollLinkedEffectDetector_h
#include "mozilla/RefPtr.h"
class nsIDocument;
namespace mozilla {
namespace layers {
// ScrollLinkedEffectDetector is used to detect the existence of a scroll-linked
// effect on a webpage. Generally speaking, a scroll-linked effect is something
// on the page that animates or changes with respect to the scroll position.
// Content authors usually rely on running some JS in response to the scroll
// event in order to implement such effects, and therefore it tends to be laggy
// or work improperly with APZ enabled. This class helps us detect such an
// effect so that we can warn the author and/or take other preventative
// measures.
class MOZ_STACK_CLASS ScrollLinkedEffectDetector
{
private:
static uint32_t sDepth;
static bool sFoundScrollLinkedEffect;
public:
static void PositioningPropertyMutated();
explicit ScrollLinkedEffectDetector(nsIDocument* aDoc);
~ScrollLinkedEffectDetector();
private:
RefPtr<nsIDocument> mDocument;
};
} // namespace layers
} // namespace mozilla
#endif /* mozilla_layers_ScrollLinkedEffectDetector_h */

View File

@ -118,7 +118,7 @@ protected:
}
public:
static bool ClientSupportsLayerSize(const gfx::IntSize& aSize, ClientLayerManager* aManager);
static bool ClientSupportsLayerSize(const IntSize& aSize, ClientLayerManager* aManager);
virtual void ClearCachedResources() override;
@ -127,7 +127,7 @@ public:
virtual ClientTiledLayerBuffer* GetTiledBuffer() override { return mTiledBuffer; }
virtual ClientTiledLayerBuffer* GetLowPrecisionTiledBuffer() override { return nullptr; }
virtual bool SupportsLayerSize(const gfx::IntSize& aSize, ClientLayerManager* aManager) const override;
virtual bool SupportsLayerSize(const IntSize& aSize, ClientLayerManager* aManager) const override;
private:
RefPtr<ClientSingleTiledLayerBuffer> mTiledBuffer;

View File

@ -109,7 +109,6 @@ EXPORTS.mozilla.layers += [
'apz/util/ChromeProcessController.h',
'apz/util/DoubleTapToZoom.h',
'apz/util/InputAPZContext.h',
'apz/util/ScrollLinkedEffectDetector.h',
'AsyncCanvasRenderer.h',
'AtomicRefCountedWithFinalize.h',
'AxisPhysicsModel.h',
@ -261,7 +260,6 @@ UNIFIED_SOURCES += [
'apz/util/ChromeProcessController.cpp',
'apz/util/DoubleTapToZoom.cpp',
'apz/util/InputAPZContext.cpp',
'apz/util/ScrollLinkedEffectDetector.cpp',
'AsyncCanvasRenderer.cpp',
'AxisPhysicsModel.cpp',
'AxisPhysicsMSDModel.cpp',

View File

@ -61,7 +61,6 @@
#include "nsPluginFrame.h"
#include <mozilla/layers/AxisPhysicsModel.h>
#include <mozilla/layers/AxisPhysicsMSDModel.h>
#include "mozilla/layers/ScrollLinkedEffectDetector.h"
#include "mozilla/unused.h"
#include <algorithm>
#include <cstdlib> // for std::abs(int/long)
@ -4228,7 +4227,6 @@ ScrollFrameHelper::FireScrollEvent()
nsPresContext* prescontext = mOuter->PresContext();
// Fire viewport scroll events at the document (where they
// will bubble to the window)
mozilla::layers::ScrollLinkedEffectDetector detector(content->GetComposedDoc());
if (mIsRoot) {
nsIDocument* doc = content->GetCurrentDoc();
if (doc) {

View File

@ -19,7 +19,6 @@
#include "mozilla/dom/BindingUtils.h"
#include "nsContentUtils.h"
#include "nsQueryObject.h"
#include "mozilla/layers/ScrollLinkedEffectDetector.h"
using namespace mozilla;
@ -78,23 +77,6 @@ NS_IMETHODIMP
nsDOMCSSDeclaration::SetPropertyValue(const nsCSSProperty aPropID,
const nsAString& aValue)
{
switch (aPropID) {
case eCSSProperty_background_position:
case eCSSProperty_transform:
case eCSSProperty_top:
case eCSSProperty_left:
case eCSSProperty_bottom:
case eCSSProperty_right:
case eCSSProperty_margin_top:
case eCSSProperty_margin_left:
case eCSSProperty_margin_bottom:
case eCSSProperty_margin_right:
mozilla::layers::ScrollLinkedEffectDetector::PositioningPropertyMutated();
break;
default:
break;
}
if (aValue.IsEmpty()) {
// If the new value of the property is an empty string we remove the
// property.

View File

@ -10086,13 +10086,6 @@
"releaseChannelCollection": "opt-out",
"description": "Counts number of times a certain plugin has been activated."
},
"SCROLL_LINKED_EFFECT_FOUND": {
"alert_emails": ["kgupta@mozilla.com"],
"bug_numbers": [1229052],
"expires_in_version": "50",
"kind": "boolean",
"description": "Attempt to determine prevalence of scroll-linked effects on the web."
},
"WEB_NOTIFICATION_CLICKED": {
"alert_emails": ["firefox-dev@mozilla.org"],
"bug_numbers": [1225336],