зеркало из https://github.com/mozilla/gecko-dev.git
Bug 904541 - Don't #include Layers.h in nsPresContext.h. r=roc
This commit is contained in:
Родитель
7e0193ea5c
Коммит
1213991850
|
@ -2962,7 +2962,7 @@ FrameLayerBuilder::BuildContainerLayerFor(nsDisplayListBuilder* aBuilder,
|
|||
containerLayer->SetContentFlags(flags);
|
||||
|
||||
mContainerLayerGeneration = oldGeneration;
|
||||
containerLayer->SetUserData(&gNotifySubDocInvalidationData, nullptr);
|
||||
nsPresContext::ClearNotifySubDocInvalidationData(containerLayer);
|
||||
|
||||
return containerLayer.forget();
|
||||
}
|
||||
|
|
|
@ -3032,14 +3032,12 @@ already_AddRefed<Layer>
|
|||
nsDisplayOwnLayer::BuildLayer(nsDisplayListBuilder* aBuilder,
|
||||
LayerManager* aManager,
|
||||
const ContainerParameters& aContainerParameters) {
|
||||
nsRefPtr<Layer> layer = aManager->GetLayerBuilder()->
|
||||
nsRefPtr<ContainerLayer> layer = aManager->GetLayerBuilder()->
|
||||
BuildContainerLayerFor(aBuilder, aManager, mFrame, this, mList,
|
||||
aContainerParameters, nullptr);
|
||||
|
||||
if (mFlags & GENERATE_SUBDOC_INVALIDATIONS) {
|
||||
ContainerLayerPresContext* pres = new ContainerLayerPresContext;
|
||||
pres->mPresContext = mFrame->PresContext();
|
||||
layer->SetUserData(&gNotifySubDocInvalidationData, pres);
|
||||
mFrame->PresContext()->SetNotifySubDocInvalidationData(layer);
|
||||
}
|
||||
return layer.forget();
|
||||
}
|
||||
|
|
|
@ -35,6 +35,7 @@ class nsIImageLoadingContent;
|
|||
#include "nsHTMLReflowState.h"
|
||||
#include "nsIFrameLoader.h"
|
||||
#include "FrameMetrics.h"
|
||||
#include "gfx3DMatrix.h"
|
||||
|
||||
#include <limits>
|
||||
#include <algorithm>
|
||||
|
|
|
@ -70,6 +70,7 @@
|
|||
#include "mozilla/dom/TabChild.h"
|
||||
#include "RestyleManager.h"
|
||||
#include "nsRefreshDriver.h"
|
||||
#include "Layers.h"
|
||||
|
||||
#ifdef IBMBIDI
|
||||
#include "nsBidiPresUtils.h"
|
||||
|
@ -95,6 +96,16 @@ using namespace mozilla::layers;
|
|||
|
||||
uint8_t gNotifySubDocInvalidationData;
|
||||
|
||||
/**
|
||||
* Layer UserData for ContainerLayers that want to be notified
|
||||
* of local invalidations of them and their descendant layers.
|
||||
* Pass a callback to ComputeDifferences to have these called.
|
||||
*/
|
||||
class ContainerLayerPresContext : public LayerUserData {
|
||||
public:
|
||||
nsPresContext* mPresContext;
|
||||
};
|
||||
|
||||
namespace {
|
||||
|
||||
class CharSetChangingRunnable : public nsRunnable
|
||||
|
@ -2352,6 +2363,20 @@ nsPresContext::NotifySubDocInvalidation(ContainerLayer* aContainer,
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
nsPresContext::SetNotifySubDocInvalidationData(ContainerLayer* aContainer)
|
||||
{
|
||||
ContainerLayerPresContext* pres = new ContainerLayerPresContext;
|
||||
pres->mPresContext = this;
|
||||
aContainer->SetUserData(&gNotifySubDocInvalidationData, pres);
|
||||
}
|
||||
|
||||
/* static */ void
|
||||
nsPresContext::ClearNotifySubDocInvalidationData(ContainerLayer* aContainer)
|
||||
{
|
||||
aContainer->SetUserData(&gNotifySubDocInvalidationData, nullptr);
|
||||
}
|
||||
|
||||
struct NotifyDidPaintSubdocumentCallbackClosure {
|
||||
uint32_t mFlags;
|
||||
bool mNeedsAnotherDidPaintNotification;
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
#include "mozilla/MemoryReporting.h"
|
||||
#include "mozilla/TimeStamp.h"
|
||||
#include "prclist.h"
|
||||
#include "Layers.h"
|
||||
#include "nsThreadUtils.h"
|
||||
|
||||
#ifdef IBMBIDI
|
||||
class nsBidiPresUtils;
|
||||
|
@ -77,7 +77,10 @@ class nsRenderingContext;
|
|||
#endif
|
||||
|
||||
namespace mozilla {
|
||||
class RestyleManager;
|
||||
class RestyleManager;
|
||||
namespace layers {
|
||||
class ContainerLayer;
|
||||
}
|
||||
}
|
||||
|
||||
// supported values for cached bool types
|
||||
|
@ -125,17 +128,6 @@ public:
|
|||
nsTArray<Request> mRequests;
|
||||
};
|
||||
|
||||
/**
|
||||
* Layer UserData for ContainerLayers that want to be notified
|
||||
* of local invalidations of them and their descendant layers.
|
||||
* Pass a callback to ComputeDifferences to have these called.
|
||||
*/
|
||||
class ContainerLayerPresContext : public mozilla::layers::LayerUserData {
|
||||
public:
|
||||
nsPresContext* mPresContext;
|
||||
};
|
||||
extern uint8_t gNotifySubDocInvalidationData;
|
||||
|
||||
/* Used by nsPresContext::HasAuthorSpecifiedRules */
|
||||
#define NS_AUTHOR_SPECIFIED_BACKGROUND (1 << 0)
|
||||
#define NS_AUTHOR_SPECIFIED_BORDER (1 << 1)
|
||||
|
@ -897,6 +889,8 @@ public:
|
|||
// Passed to LayerProperties::ComputeDifference
|
||||
static void NotifySubDocInvalidation(mozilla::layers::ContainerLayer* aContainer,
|
||||
const nsIntRegion& aRegion);
|
||||
void SetNotifySubDocInvalidationData(mozilla::layers::ContainerLayer* aContainer);
|
||||
static void ClearNotifySubDocInvalidationData(mozilla::layers::ContainerLayer* aContainer);
|
||||
bool IsDOMPaintEventPending();
|
||||
void ClearMozAfterPaintEvents() {
|
||||
mInvalidateRequestsSinceLastPaint.mRequests.Clear();
|
||||
|
|
|
@ -49,6 +49,7 @@ typedef HRESULT (WINAPI*DwmGetCompositionTimingInfoProc)(HWND hWnd, DWM_TIMING_I
|
|||
#include "nsPerformance.h"
|
||||
#include "mozilla/dom/WindowBinding.h"
|
||||
#include "RestyleManager.h"
|
||||
#include "Layers.h"
|
||||
|
||||
using mozilla::TimeStamp;
|
||||
using mozilla::TimeDuration;
|
||||
|
|
|
@ -35,6 +35,8 @@
|
|||
#include "nsDirection.h"
|
||||
#include <algorithm>
|
||||
#include "nsITheme.h"
|
||||
#include "gfx3DMatrix.h"
|
||||
#include "gfxASurface.h"
|
||||
|
||||
#ifdef ACCESSIBILITY
|
||||
#include "mozilla/a11y/AccTypes.h"
|
||||
|
|
|
@ -30,6 +30,7 @@ class nsIPresShell;
|
|||
class nsDOMCSSValueList;
|
||||
class nsROCSSPrimitiveValue;
|
||||
class nsStyleContext;
|
||||
class gfx3DMatrix;
|
||||
|
||||
class nsComputedDOMStyle MOZ_FINAL : public nsDOMCSSDeclaration
|
||||
{
|
||||
|
|
Загрузка…
Ссылка в новой задаче