Bug 1347270: remove the nsIDOMWindowUtils::ElementsRestyled API. r?bholley
MozReview-Commit-ID: AKsEWc7Wpip
--- a/dom/base/nsDOMWindowUtils.cpp
+++ b/dom/base/nsDOMWindowUtils.cpp
@@ -4017,28 +4017,16 @@ nsDOMWindowUtils::XpconnectArgument(nsID
NS_IMETHODIMP
nsDOMWindowUtils::AskPermission(nsIContentPermissionRequest* aRequest)
{
nsCOMPtr<nsPIDOMWindowOuter> window = do_QueryReferent(mWindow);
return nsContentPermissionUtils::AskPermission(aRequest, window->GetCurrentInnerWindow());
}
NS_IMETHODIMP
-nsDOMWindowUtils::GetElementsRestyled(uint64_t* aResult)
-{
- nsPresContext* presContext = GetPresContext();
- if (!presContext) {
- return NS_ERROR_NOT_AVAILABLE;
- }
-
- *aResult = presContext->ElementsRestyledCount();
- return NS_OK;
-}
-
-NS_IMETHODIMP
nsDOMWindowUtils::GetRestyleGeneration(uint64_t* aResult)
{
nsPresContext* presContext = GetPresContext();
if (!presContext) {
return NS_ERROR_NOT_AVAILABLE;
}
*aResult = presContext->GetRestyleGeneration();
--- a/dom/interfaces/base/nsIDOMWindowUtils.idl
+++ b/dom/interfaces/base/nsIDOMWindowUtils.idl
@@ -45,17 +45,17 @@ interface nsIURI;
interface nsIDOMEventTarget;
interface nsIRunnable;
interface nsITranslationNodeList;
interface nsIJSRAIIHelper;
interface nsIContentPermissionRequest;
interface nsIObserver;
interface nsIDOMStorage;
-[scriptable, uuid(c471d440-004b-4c50-a6f2-747db5f443b6)]
+[scriptable, uuid(4d6732ca-9da7-4176-b8a1-8dde15cd0bf9)]
interface nsIDOMWindowUtils : nsISupports {
/**
* Image animation mode of the window. When this attribute's value
* is changed, the implementation should set all images in the window
* to the given value. That is, when set to kDontAnimMode, all images
* will stop animating. The attribute's value must be one of the
* animationMode values from imgIContainer.
@@ -1871,27 +1871,16 @@ interface nsIDOMWindowUtils : nsISupport
/**
* Helper for JS components that need to send permission requests with
* e10s support properly.
*/
void askPermission(in nsIContentPermissionRequest aRequest);
/**
- * Number of elements restyled for the curent document.
- *
- * Note that during a restyle operation we may restyle an element more
- * than once (e.g., for an inline that contains blocks). This also
- * counts restyling of pseudo-elements and anonymous boxes.
- *
- * May throw NS_ERROR_NOT_AVAILABLE.
- */
- readonly attribute unsigned long long elementsRestyled;
-
- /**
* Restyle generation for the current document.
*
* May throw NS_ERROR_NOT_AVAILABLE.
*/
readonly attribute unsigned long long restyleGeneration;
/**
* Number of frames constructed (excluding breaking) for the curent
--- a/layout/base/GeckoRestyleManager.cpp
+++ b/layout/base/GeckoRestyleManager.cpp
@@ -1714,18 +1714,16 @@ ElementRestyler::Restyle(nsRestyleHint a
MOZ_ASSERT(mPresContext == mFrame->PresContext(), "pres contexts match");
NS_ASSERTION(!GetPrevContinuationWithSameStyle(mFrame),
"should not be trying to restyle this frame separately");
MOZ_ASSERT(!(aRestyleHint & eRestyle_LaterSiblings),
"eRestyle_LaterSiblings must not be part of aRestyleHint");
- mPresContext->RestyledElement();
-
AutoDisplayContentsAncestorPusher adcp(mTreeMatchContext, mPresContext,
mFrame->GetContent() ? mFrame->GetContent()->GetParent() : nullptr);
AutoSelectorArrayTruncater asat(mSelectorsForDescendants);
// List of descendant elements of mContent we know we will eventually need to
// restyle. Before we return from this function, we call
// RestyleTracker::AddRestyleRootsIfAwaitingRestyle to ensure they get
--- a/layout/base/nsPresContext.h
+++ b/layout/base/nsPresContext.h
@@ -899,29 +899,23 @@ public:
*/
bool EnsureVisible();
#ifdef MOZ_REFLOW_PERF
void CountReflows(const char * aName,
nsIFrame * aFrame);
#endif
- void RestyledElement() {
- ++mElementsRestyled;
- }
void ConstructedFrame() {
++mFramesConstructed;
}
void ReflowedFrame() {
++mFramesReflowed;
}
- uint64_t ElementsRestyledCount() {
- return mElementsRestyled;
- }
uint64_t FramesConstructedCount() {
return mFramesConstructed;
}
uint64_t FramesReflowedCount() {
return mFramesReflowed;
}
/*