зеркало из https://github.com/mozilla/gecko-dev.git
Bug 921753 - Part 1: Avoid #including nsStyleStructInlines.h in nsIFrame.h; r=roc
This patch reduces the number of files that transitively #include gfx/2d.h from 1782 to 1582.
This commit is contained in:
Родитель
0c807f11d4
Коммит
77b5078c36
|
@ -31,6 +31,12 @@ class nsFrameLoader;
|
|||
class nsXULElement;
|
||||
class nsPluginInstanceOwner;
|
||||
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
template<typename T> class Sequence;
|
||||
}
|
||||
}
|
||||
|
||||
class nsObjectLoadingContent : public nsImageLoadingContent
|
||||
, public nsIStreamListener
|
||||
, public nsIFrameLoaderOwner
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
#include "nsIURL.h"
|
||||
#include "nsNetUtil.h"
|
||||
#include "nsEscape.h"
|
||||
#include "nsIFrame.h"
|
||||
#include "nsIFrameInlines.h"
|
||||
#include "nsIScrollableFrame.h"
|
||||
#include "nsView.h"
|
||||
#include "nsViewManager.h"
|
||||
|
@ -100,6 +100,7 @@
|
|||
#include "nsDOMTouchEvent.h"
|
||||
#include "nsGlobalWindow.h"
|
||||
#include "mozilla/dom/HTMLBodyElement.h"
|
||||
#include "imgIContainer.h"
|
||||
|
||||
using namespace mozilla;
|
||||
using namespace mozilla::dom;
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
|
||||
#include "mozilla/dom/SVGFECompositeElement.h"
|
||||
#include "mozilla/dom/SVGFECompositeElementBinding.h"
|
||||
#include "gfxContext.h"
|
||||
|
||||
NS_IMPL_NS_NEW_NAMESPACED_SVG_ELEMENT(FEComposite)
|
||||
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
|
||||
#include "mozilla/dom/SVGFEFloodElement.h"
|
||||
#include "mozilla/dom/SVGFEFloodElementBinding.h"
|
||||
#include "gfxContext.h"
|
||||
|
||||
NS_IMPL_NS_NEW_NAMESPACED_SVG_ELEMENT(FEFlood)
|
||||
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
#include "nsLayoutUtils.h"
|
||||
#include "nsSVGUtils.h"
|
||||
#include "nsNetUtil.h"
|
||||
#include "imgIContainer.h"
|
||||
|
||||
NS_IMPL_NS_NEW_NAMESPACED_SVG_ELEMENT(FEImage)
|
||||
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
#include "mozilla/dom/SVGFEMergeElement.h"
|
||||
#include "mozilla/dom/SVGFEMergeElementBinding.h"
|
||||
#include "mozilla/dom/SVGFEMergeNodeElement.h"
|
||||
#include "gfxContext.h"
|
||||
|
||||
NS_IMPL_NS_NEW_NAMESPACED_SVG_ELEMENT(FEMerge)
|
||||
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
#include "mozilla/dom/SVGFEOffsetElement.h"
|
||||
#include "mozilla/dom/SVGFEOffsetElementBinding.h"
|
||||
#include "nsSVGFilterInstance.h"
|
||||
#include "gfxContext.h"
|
||||
|
||||
NS_IMPL_NS_NEW_NAMESPACED_SVG_ELEMENT(FEOffset)
|
||||
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
|
||||
#include "mozilla/Hal.h"
|
||||
#include "nsScreen.h"
|
||||
#include "nsIDocument.h"
|
||||
#include "nsIDocShell.h"
|
||||
#include "nsIDocument.h"
|
||||
#include "nsPresContext.h"
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
|
||||
#include "nsFind.h"
|
||||
#include "nsContentCID.h"
|
||||
#include "nsIContent.h"
|
||||
#include "nsIDOMNode.h"
|
||||
#include "nsIDOMNodeList.h"
|
||||
#include "nsISelection.h"
|
||||
|
|
|
@ -33,6 +33,7 @@
|
|||
#include "nsIRootBox.h"
|
||||
#include "nsIDOMMutationEvent.h"
|
||||
#include "nsContentUtils.h"
|
||||
#include "nsIFrameInlines.h"
|
||||
|
||||
#ifdef ACCESSIBILITY
|
||||
#include "nsAccessibilityService.h"
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
#include "nsUnicodeProperties.h"
|
||||
#include "nsTextFrame.h"
|
||||
#include "nsBlockFrame.h"
|
||||
#include "nsIFrameInlines.h"
|
||||
#include <algorithm>
|
||||
|
||||
#undef NOISY_BIDI
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
#include "mozilla/LinkedList.h"
|
||||
#include "nsAbsoluteContainingBlock.h"
|
||||
#include "nsIAtom.h"
|
||||
#include "nsIFrame.h"
|
||||
#include "nsIFrameInlines.h"
|
||||
#include "nsGkAtoms.h"
|
||||
#include "nsPresContext.h"
|
||||
#include "nsIDocument.h"
|
||||
|
|
|
@ -20,6 +20,10 @@ class nsRenderingContext;
|
|||
|
||||
namespace mozilla {
|
||||
|
||||
namespace layers {
|
||||
class ImageContainer;
|
||||
}
|
||||
|
||||
// A CSSSizeOrRatio represents a (possibly partially specified) size for use
|
||||
// in computing image sizes. Either or both of the width and height might be
|
||||
// given. A ratio of width to height may also be given. If we at least two
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
|
||||
#include "nsIFrame.h"
|
||||
#include "nsFrameManagerBase.h"
|
||||
#include "nsIContent.h"
|
||||
|
||||
namespace mozilla {
|
||||
/**
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
|
||||
#include "nsGenConList.h"
|
||||
#include "nsLayoutUtils.h"
|
||||
#include "nsIContent.h"
|
||||
|
||||
void
|
||||
nsGenConList::Clear()
|
||||
|
|
|
@ -69,6 +69,7 @@
|
|||
#include "nsSVGTextFrame2.h"
|
||||
#include "nsStyleStructInlines.h"
|
||||
#include "nsStyleTransformMatrix.h"
|
||||
#include "nsIFrameInlines.h"
|
||||
|
||||
#include "mozilla/Preferences.h"
|
||||
|
||||
|
|
|
@ -21,6 +21,7 @@ class nsFontFaceList;
|
|||
class nsIImageLoadingContent;
|
||||
class nsStyleContext;
|
||||
class nsBlockFrame;
|
||||
class gfxASurface;
|
||||
class gfxDrawable;
|
||||
class nsView;
|
||||
class imgIContainer;
|
||||
|
|
|
@ -158,6 +158,7 @@
|
|||
#include "RestyleManager.h"
|
||||
#include "nsIDOMHTMLElement.h"
|
||||
#include "nsIDragSession.h"
|
||||
#include "nsIFrameInlines.h"
|
||||
|
||||
#ifdef ANDROID
|
||||
#include "nsIDocShellTreeOwner.h"
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
|
||||
#include "nsQuoteList.h"
|
||||
#include "nsReadableUtils.h"
|
||||
#include "nsIContent.h"
|
||||
|
||||
bool
|
||||
nsQuoteNode::InitTextFrame(nsGenConList* aList, nsIFrame* aPseudoFrame,
|
||||
|
|
|
@ -46,6 +46,7 @@
|
|||
#include "mozilla/dom/WindowBinding.h"
|
||||
#include "RestyleManager.h"
|
||||
#include "Layers.h"
|
||||
#include "imgIContainer.h"
|
||||
|
||||
using namespace mozilla;
|
||||
using namespace mozilla::widget;
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
|
||||
#include "ScrollbarActivity.h"
|
||||
#include "nsIScrollbarOwner.h"
|
||||
#include "nsIContent.h"
|
||||
#include "nsIDOMEvent.h"
|
||||
#include "nsIDOMElementCSSInlineStyle.h"
|
||||
#include "nsIDOMCSSStyleDeclaration.h"
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
#include "nsRect.h"
|
||||
#include "nsRenderingContext.h"
|
||||
#include "nsTextFrame.h"
|
||||
#include "nsIFrameInlines.h"
|
||||
#include "mozilla/Util.h"
|
||||
#include "mozilla/Likely.h"
|
||||
|
||||
|
|
|
@ -21,6 +21,7 @@ EXPORTS += [
|
|||
'nsHTMLReflowState.h',
|
||||
'nsIAnonymousContentCreator.h',
|
||||
'nsIFrame.h',
|
||||
'nsIFrameInlines.h',
|
||||
'nsIFrameUtil.h',
|
||||
'nsILineIterator.h',
|
||||
'nsIObjectFrame.h',
|
||||
|
|
|
@ -48,6 +48,7 @@
|
|||
#include "nsCSSFrameConstructor.h"
|
||||
#include "nsRenderingContext.h"
|
||||
#include "TextOverflow.h"
|
||||
#include "nsIFrameInlines.h"
|
||||
|
||||
#ifdef IBMBIDI
|
||||
#include "nsBidiPresUtils.h"
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
#include "nsBlockFrame.h"
|
||||
#include "nsLineLayout.h"
|
||||
#include "nsPresContext.h"
|
||||
#include "nsIFrame.h"
|
||||
#include "nsIFrameInlines.h"
|
||||
#include "mozilla/AutoRestore.h"
|
||||
#include <algorithm>
|
||||
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
#include "nsCSSFrameConstructor.h"
|
||||
#include "nsBlockFrame.h"
|
||||
#include "mozilla/AutoRestore.h"
|
||||
#include "nsIFrameInlines.h"
|
||||
#include <algorithm>
|
||||
|
||||
#ifdef DEBUG
|
||||
|
|
|
@ -77,6 +77,7 @@
|
|||
#include "nsFontInflationData.h"
|
||||
#include "gfxASurface.h"
|
||||
#include "nsRegion.h"
|
||||
#include "nsIFrameInlines.h"
|
||||
|
||||
#include "mozilla/Preferences.h"
|
||||
#include "mozilla/LookAndFeel.h"
|
||||
|
@ -8217,6 +8218,39 @@ nsIFrame::DestroyRegion(void* aPropertyValue)
|
|||
delete static_cast<nsRegion*>(aPropertyValue);
|
||||
}
|
||||
|
||||
bool
|
||||
nsIFrame::IsPseudoStackingContextFromStyle() {
|
||||
const nsStyleDisplay* disp = StyleDisplay();
|
||||
return disp->mOpacity != 1.0f ||
|
||||
disp->IsPositioned(this) ||
|
||||
disp->IsFloating(this);
|
||||
}
|
||||
|
||||
nsIFrame::ContentOffsets::ContentOffsets()
|
||||
{
|
||||
}
|
||||
|
||||
nsIFrame::ContentOffsets::ContentOffsets(const ContentOffsets& rhs)
|
||||
: content(rhs.content),
|
||||
offset(rhs.offset),
|
||||
secondaryOffset(rhs.secondaryOffset),
|
||||
associateWithNext(rhs.associateWithNext)
|
||||
{
|
||||
}
|
||||
|
||||
nsIFrame::ContentOffsets::~ContentOffsets()
|
||||
{
|
||||
}
|
||||
|
||||
nsIFrame::CaretPosition::CaretPosition()
|
||||
: mContentOffset(0)
|
||||
{
|
||||
}
|
||||
|
||||
nsIFrame::CaretPosition::~CaretPosition()
|
||||
{
|
||||
}
|
||||
|
||||
// Box layout debugging
|
||||
#ifdef DEBUG_REFLOW
|
||||
int32_t gIndent2 = 0;
|
||||
|
|
|
@ -50,6 +50,7 @@
|
|||
#include "nsSVGIntegrationUtils.h"
|
||||
#include "nsIScrollPositionListener.h"
|
||||
#include "StickyScrollContainer.h"
|
||||
#include "nsIFrameInlines.h"
|
||||
#include <algorithm>
|
||||
#include <cstdlib> // for std::abs(int/long)
|
||||
#include <cmath> // for std::abs(float/double)
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
#include "mozilla/Preferences.h"
|
||||
#include "nsFontInflationData.h"
|
||||
#include "StickyScrollContainer.h"
|
||||
#include "nsIFrameInlines.h"
|
||||
#include <algorithm>
|
||||
|
||||
#ifdef DEBUG
|
||||
|
|
|
@ -1379,6 +1379,9 @@ public:
|
|||
// that need the beginning and end of the object, the StartOffset and
|
||||
// EndOffset helpers can be used.
|
||||
struct MOZ_STACK_CLASS ContentOffsets {
|
||||
ContentOffsets();
|
||||
ContentOffsets(const ContentOffsets&);
|
||||
~ContentOffsets();
|
||||
nsCOMPtr<nsIContent> content;
|
||||
bool IsNull() { return !content; }
|
||||
int32_t offset;
|
||||
|
@ -2575,13 +2578,8 @@ public:
|
|||
* element and not an SVG element.
|
||||
* XXX maybe check IsTransformed()?
|
||||
*/
|
||||
bool IsPseudoStackingContextFromStyle() {
|
||||
const nsStyleDisplay* disp = StyleDisplay();
|
||||
return disp->mOpacity != 1.0f ||
|
||||
disp->IsPositioned(this) ||
|
||||
disp->IsFloating(this);
|
||||
}
|
||||
|
||||
bool IsPseudoStackingContextFromStyle();
|
||||
|
||||
virtual bool HonorPrintBackgroundSettings() { return true; }
|
||||
|
||||
/**
|
||||
|
@ -2809,9 +2807,8 @@ NS_PTR_TO_INT32(frame->Properties().Get(nsIFrame::ParagraphDepthProperty()))
|
|||
// being refactored. DO NOT USE OUTSIDE OF XUL.
|
||||
|
||||
struct CaretPosition {
|
||||
CaretPosition() :
|
||||
mContentOffset(0)
|
||||
{}
|
||||
CaretPosition();
|
||||
~CaretPosition();
|
||||
|
||||
nsCOMPtr<nsIContent> mResultContent;
|
||||
int32_t mContentOffset;
|
||||
|
@ -3500,54 +3497,4 @@ nsIFrame::IsFrameListSorted(nsFrameList& aFrameList)
|
|||
return true;
|
||||
}
|
||||
|
||||
#include "nsStyleStructInlines.h"
|
||||
|
||||
bool
|
||||
nsIFrame::IsFloating() const
|
||||
{
|
||||
return StyleDisplay()->IsFloating(this);
|
||||
}
|
||||
|
||||
bool
|
||||
nsIFrame::IsPositioned() const
|
||||
{
|
||||
return StyleDisplay()->IsPositioned(this);
|
||||
}
|
||||
|
||||
bool
|
||||
nsIFrame::IsRelativelyPositioned() const
|
||||
{
|
||||
return StyleDisplay()->IsRelativelyPositioned(this);
|
||||
}
|
||||
|
||||
bool
|
||||
nsIFrame::IsAbsolutelyPositioned() const
|
||||
{
|
||||
return StyleDisplay()->IsAbsolutelyPositioned(this);
|
||||
}
|
||||
|
||||
bool
|
||||
nsIFrame::IsBlockInside() const
|
||||
{
|
||||
return StyleDisplay()->IsBlockInside(this);
|
||||
}
|
||||
|
||||
bool
|
||||
nsIFrame::IsBlockOutside() const
|
||||
{
|
||||
return StyleDisplay()->IsBlockOutside(this);
|
||||
}
|
||||
|
||||
bool
|
||||
nsIFrame::IsInlineOutside() const
|
||||
{
|
||||
return StyleDisplay()->IsInlineOutside(this);
|
||||
}
|
||||
|
||||
uint8_t
|
||||
nsIFrame::GetDisplay() const
|
||||
{
|
||||
return StyleDisplay()->GetDisplay(this);
|
||||
}
|
||||
|
||||
#endif /* nsIFrame_h___ */
|
||||
|
|
|
@ -0,0 +1,61 @@
|
|||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* vim: set ts=2 sw=2 et tw=78: */
|
||||
/* 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 nsIFrameInlines_h___
|
||||
#define nsIFrameInlines_h___
|
||||
|
||||
#include "nsIFrame.h"
|
||||
#include "nsStyleStructInlines.h"
|
||||
|
||||
bool
|
||||
nsIFrame::IsFloating() const
|
||||
{
|
||||
return StyleDisplay()->IsFloating(this);
|
||||
}
|
||||
|
||||
bool
|
||||
nsIFrame::IsPositioned() const
|
||||
{
|
||||
return StyleDisplay()->IsPositioned(this);
|
||||
}
|
||||
|
||||
bool
|
||||
nsIFrame::IsRelativelyPositioned() const
|
||||
{
|
||||
return StyleDisplay()->IsRelativelyPositioned(this);
|
||||
}
|
||||
|
||||
bool
|
||||
nsIFrame::IsAbsolutelyPositioned() const
|
||||
{
|
||||
return StyleDisplay()->IsAbsolutelyPositioned(this);
|
||||
}
|
||||
|
||||
bool
|
||||
nsIFrame::IsBlockInside() const
|
||||
{
|
||||
return StyleDisplay()->IsBlockInside(this);
|
||||
}
|
||||
|
||||
bool
|
||||
nsIFrame::IsBlockOutside() const
|
||||
{
|
||||
return StyleDisplay()->IsBlockOutside(this);
|
||||
}
|
||||
|
||||
bool
|
||||
nsIFrame::IsInlineOutside() const
|
||||
{
|
||||
return StyleDisplay()->IsInlineOutside(this);
|
||||
}
|
||||
|
||||
uint8_t
|
||||
nsIFrame::GetDisplay() const
|
||||
{
|
||||
return StyleDisplay()->GetDisplay(this);
|
||||
}
|
||||
|
||||
#endif
|
|
@ -13,6 +13,7 @@
|
|||
#ifdef IBMBIDI
|
||||
#include "nsBidiPresUtils.h"
|
||||
#endif
|
||||
#include "nsIFrameInlines.h"
|
||||
#include "mozilla/Assertions.h"
|
||||
#include "mozilla/Likely.h"
|
||||
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
#include "nsLayoutUtils.h"
|
||||
#include "nsPresContext.h"
|
||||
#include "nsRenderingContext.h"
|
||||
#include "nsIFrameInlines.h"
|
||||
|
||||
nsIFrame*
|
||||
NS_NewPlaceholderFrame(nsIPresShell* aPresShell, nsStyleContext* aContext,
|
||||
|
|
|
@ -67,6 +67,7 @@ static NS_DEFINE_CID(kFrameTraversalCID, NS_FRAMETRAVERSAL_CID);
|
|||
#include "nsAutoCopyListener.h"
|
||||
#include "nsCopySupport.h"
|
||||
#include "nsIClipboard.h"
|
||||
#include "nsIFrameInlines.h"
|
||||
|
||||
#ifdef IBMBIDI
|
||||
#include "nsIBidiKeyboard.h"
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
|
||||
#include "nsSplittableFrame.h"
|
||||
#include "nsContainerFrame.h"
|
||||
#include "nsIFrameInlines.h"
|
||||
|
||||
NS_IMPL_FRAMEARENA_HELPERS(nsSplittableFrame)
|
||||
|
||||
|
|
|
@ -54,6 +54,7 @@
|
|||
#include "nsLineBreaker.h"
|
||||
#include "nsIWordBreaker.h"
|
||||
#include "nsGenericDOMDataNode.h"
|
||||
#include "nsIFrameInlines.h"
|
||||
|
||||
#include <algorithm>
|
||||
#ifdef ACCESSIBILITY
|
||||
|
|
|
@ -12,6 +12,8 @@
|
|||
#include "nsIWidget.h"
|
||||
#include "nsReadableUtils.h"
|
||||
#include "nsRenderingContext.h"
|
||||
#include "nsIDOMWindow.h"
|
||||
#include "nsIContent.h"
|
||||
|
||||
#include "prprf.h"
|
||||
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
#include "nsDisplayList.h"
|
||||
#include "FrameLayerBuilder.h"
|
||||
#include "nsSVGEffects.h"
|
||||
#include "imgIContainer.h"
|
||||
|
||||
namespace mozilla {
|
||||
namespace css {
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
#include "nsTableColFrame.h"
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsDisplayList.h"
|
||||
#include "nsIFrameInlines.h"
|
||||
#include <algorithm>
|
||||
|
||||
using namespace mozilla;
|
||||
|
|
Загрузка…
Ссылка в новой задаче