--- a/content/base/src/nsObjectLoadingContent.h
+++ b/content/base/src/nsObjectLoadingContent.h
@@ -26,16 +26,22 @@
class nsAsyncInstantiateEvent;
class nsStopPluginRunnable;
class AutoSetInstantiatingToFalse;
class nsObjectFrame;
class nsFrameLoader;
class nsXULElement;
class nsPluginInstanceOwner;
+namespace mozilla {
+namespace dom {
+template<typename T> class Sequence;
+}
+}
+
class nsObjectLoadingContent : public nsImageLoadingContent
, public nsIStreamListener
, public nsIFrameLoaderOwner
, public nsIObjectLoadingContent
, public nsIChannelEventSink
{
friend class AutoSetInstantiatingToFalse;
friend class AutoSetLoadingToFalse;
--- a/content/html/content/src/nsGenericHTMLElement.cpp
+++ b/content/html/content/src/nsGenericHTMLElement.cpp
@@ -29,17 +29,17 @@
#include "nsMappedAttributes.h"
#include "nsHTMLStyleSheet.h"
#include "nsIHTMLDocument.h"
#include "nsPIDOMWindow.h"
#include "nsIStyleRule.h"
#include "nsIURL.h"
#include "nsNetUtil.h"
#include "nsEscape.h"
-#include "nsIFrame.h"
+#include "nsIFrameInlines.h"
#include "nsIScrollableFrame.h"
#include "nsView.h"
#include "nsViewManager.h"
#include "nsIWidget.h"
#include "nsRange.h"
#include "nsIPresShell.h"
#include "nsPresContext.h"
#include "nsIDocShell.h"
@@ -95,16 +95,17 @@
#include "nsThreadUtils.h"
#include "nsTextFragment.h"
#include "mozilla/dom/BindingUtils.h"
#include "mozilla/ErrorResult.h"
#include "nsHTMLDocument.h"
#include "nsDOMTouchEvent.h"
#include "nsGlobalWindow.h"
#include "mozilla/dom/HTMLBodyElement.h"
+#include "imgIContainer.h"
using namespace mozilla;
using namespace mozilla::dom;
class nsINodeInfo;
class nsIDOMNodeList;
class nsRuleWalker;
--- a/content/svg/content/src/SVGFECompositeElement.cpp
+++ b/content/svg/content/src/SVGFECompositeElement.cpp
@@ -1,15 +1,16 @@
/* a*- 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 "mozilla/dom/SVGFECompositeElement.h"
#include "mozilla/dom/SVGFECompositeElementBinding.h"
+#include "gfxContext.h"
NS_IMPL_NS_NEW_NAMESPACED_SVG_ELEMENT(FEComposite)
namespace mozilla {
namespace dom {
JSObject*
SVGFECompositeElement::WrapNode(JSContext* aCx, JS::Handle<JSObject*> aScope)
--- a/content/svg/content/src/SVGFEFloodElement.cpp
+++ b/content/svg/content/src/SVGFEFloodElement.cpp
@@ -1,15 +1,16 @@
/* -*- 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 "mozilla/dom/SVGFEFloodElement.h"
#include "mozilla/dom/SVGFEFloodElementBinding.h"
+#include "gfxContext.h"
NS_IMPL_NS_NEW_NAMESPACED_SVG_ELEMENT(FEFlood)
namespace mozilla {
namespace dom {
JSObject*
SVGFEFloodElement::WrapNode(JSContext *aCx, JS::Handle<JSObject*> aScope)
--- a/content/svg/content/src/SVGFEImageElement.cpp
+++ b/content/svg/content/src/SVGFEImageElement.cpp
@@ -6,16 +6,17 @@
#include "mozilla/dom/SVGFEImageElement.h"
#include "mozilla/dom/SVGFEImageElementBinding.h"
#include "mozilla/dom/SVGFilterElement.h"
#include "nsContentUtils.h"
#include "nsLayoutUtils.h"
#include "nsSVGUtils.h"
#include "nsNetUtil.h"
+#include "imgIContainer.h"
NS_IMPL_NS_NEW_NAMESPACED_SVG_ELEMENT(FEImage)
namespace mozilla {
namespace dom {
JSObject*
SVGFEImageElement::WrapNode(JSContext *aCx, JS::Handle<JSObject*> aScope)
--- a/content/svg/content/src/SVGFEMergeElement.cpp
+++ b/content/svg/content/src/SVGFEMergeElement.cpp
@@ -1,16 +1,17 @@
/* -*- 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 "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)
namespace mozilla {
namespace dom {
JSObject*
SVGFEMergeElement::WrapNode(JSContext *aCx, JS::Handle<JSObject*> aScope)
--- a/content/svg/content/src/SVGFEOffsetElement.cpp
+++ b/content/svg/content/src/SVGFEOffsetElement.cpp
@@ -1,16 +1,17 @@
/* a*- 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 "mozilla/dom/SVGFEOffsetElement.h"
#include "mozilla/dom/SVGFEOffsetElementBinding.h"
#include "nsSVGFilterInstance.h"
+#include "gfxContext.h"
NS_IMPL_NS_NEW_NAMESPACED_SVG_ELEMENT(FEOffset)
namespace mozilla {
namespace dom {
JSObject*
SVGFEOffsetElement::WrapNode(JSContext* aCx, JS::Handle<JSObject*> aScope)
--- a/dom/base/nsScreen.cpp
+++ b/dom/base/nsScreen.cpp
@@ -1,15 +1,16 @@
/* -*- 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 "mozilla/Hal.h"
#include "nsScreen.h"
+#include "nsIDocument.h"
#include "nsIDocShell.h"
#include "nsIDocument.h"
#include "nsPresContext.h"
#include "nsCOMPtr.h"
#include "nsIDocShellTreeItem.h"
#include "nsLayoutUtils.h"
#include "nsDOMEvent.h"
#include "nsJSUtils.h"
--- a/embedding/components/find/src/nsFind.cpp
+++ b/embedding/components/find/src/nsFind.cpp
@@ -2,16 +2,17 @@
/* 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/. */
//#define DEBUG_FIND 1
#include "nsFind.h"
#include "nsContentCID.h"
+#include "nsIContent.h"
#include "nsIDOMNode.h"
#include "nsIDOMNodeList.h"
#include "nsISelection.h"
#include "nsISelectionController.h"
#include "nsIFrame.h"
#include "nsITextControlFrame.h"
#include "nsIFormControl.h"
#include "nsIEditor.h"
--- a/layout/base/RestyleManager.cpp
+++ b/layout/base/RestyleManager.cpp
@@ -28,16 +28,17 @@
#include "nsBlockFrame.h"
#include "nsViewportFrame.h"
#include "nsSVGTextFrame2.h"
#include "nsSVGTextPathFrame.h"
#include "StickyScrollContainer.h"
#include "nsIRootBox.h"
#include "nsIDOMMutationEvent.h"
#include "nsContentUtils.h"
+#include "nsIFrameInlines.h"
#ifdef ACCESSIBILITY
#include "nsAccessibilityService.h"
#endif
namespace mozilla {
RestyleManager::RestyleManager(nsPresContext* aPresContext)
--- a/layout/base/nsBidiPresUtils.cpp
+++ b/layout/base/nsBidiPresUtils.cpp
@@ -13,16 +13,17 @@
#include "nsCSSFrameConstructor.h"
#include "nsContainerFrame.h"
#include "nsInlineFrame.h"
#include "nsPlaceholderFrame.h"
#include "nsFirstLetterFrame.h"
#include "nsUnicodeProperties.h"
#include "nsTextFrame.h"
#include "nsBlockFrame.h"
+#include "nsIFrameInlines.h"
#include <algorithm>
#undef NOISY_BIDI
#undef REALLY_NOISY_BIDI
using namespace mozilla;
static const PRUnichar kSpace = 0x0020;
--- a/layout/base/nsCSSFrameConstructor.cpp
+++ b/layout/base/nsCSSFrameConstructor.cpp
@@ -13,17 +13,17 @@
#include "mozilla/AutoRestore.h"
#include "mozilla/DebugOnly.h"
#include "mozilla/dom/HTMLSelectElement.h"
#include "mozilla/Likely.h"
#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"
#include "nsTableFrame.h"
#include "nsTableColFrame.h"
#include "nsIDOMHTMLDocument.h"
#include "nsHTMLParts.h"
#include "nsIPresShell.h"
--- a/layout/base/nsCSSRendering.h
+++ b/layout/base/nsCSSRendering.h
@@ -15,16 +15,20 @@
#include "nsIFrame.h"
class nsStyleContext;
class nsPresContext;
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
// of these then we can compute a concrete size, that is a width and height.
struct CSSSizeOrRatio
{
CSSSizeOrRatio()
: mRatio(0, 0)
--- a/layout/base/nsFrameManager.h
+++ b/layout/base/nsFrameManager.h
@@ -16,16 +16,17 @@
/* storage of the frame tree and information about it */
#ifndef _nsFrameManager_h_
#define _nsFrameManager_h_
#include "nsIFrame.h"
#include "nsFrameManagerBase.h"
+#include "nsIContent.h"
namespace mozilla {
/**
* Node in a linked list, containing the style for an element that
* does not have a frame but whose parent does have a frame.
*/
struct UndisplayedNode {
UndisplayedNode(nsIContent* aContent, nsStyleContext* aStyle)
--- a/layout/base/nsGenConList.cpp
+++ b/layout/base/nsGenConList.cpp
@@ -3,16 +3,17 @@
/* 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/. */
/* base class for nsCounterList and nsQuoteList */
#include "nsGenConList.h"
#include "nsLayoutUtils.h"
+#include "nsIContent.h"
void
nsGenConList::Clear()
{
//Delete entire list
if (!mFirstNode)
return;
for (nsGenConNode *node = Next(mFirstNode); node != mFirstNode;
--- a/layout/base/nsLayoutUtils.cpp
+++ b/layout/base/nsLayoutUtils.cpp
@@ -64,16 +64,17 @@
#include "nsDataHashtable.h"
#include "nsTextFrame.h"
#include "nsFontFaceList.h"
#include "nsFontInflationData.h"
#include "nsSVGUtils.h"
#include "nsSVGTextFrame2.h"
#include "nsStyleStructInlines.h"
#include "nsStyleTransformMatrix.h"
+#include "nsIFrameInlines.h"
#include "mozilla/Preferences.h"
#ifdef MOZ_XUL
#include "nsXULPopupManager.h"
#endif
#include "GeckoProfiler.h"
--- a/layout/base/nsLayoutUtils.h
+++ b/layout/base/nsLayoutUtils.h
@@ -16,16 +16,17 @@ class nsRegion;
class nsDisplayListBuilder;
class nsDisplayItem;
class nsFontMetrics;
class nsClientRectList;
class nsFontFaceList;
class nsIImageLoadingContent;
class nsStyleContext;
class nsBlockFrame;
+class gfxASurface;
class gfxDrawable;
class nsView;
class imgIContainer;
class nsIFrame;
class nsStyleCoord;
class nsStyleCorners;
class gfxContext;
class nsPIDOMWindow;
--- a/layout/base/nsPresShell.cpp
+++ b/layout/base/nsPresShell.cpp
@@ -153,16 +153,17 @@
#include "nsIImageLoadingContent.h"
#include "nsIScreen.h"
#include "nsIScreenManager.h"
#include "nsPlaceholderFrame.h"
#include "nsTransitionManager.h"
#include "RestyleManager.h"
#include "nsIDOMHTMLElement.h"
#include "nsIDragSession.h"
+#include "nsIFrameInlines.h"
#ifdef ANDROID
#include "nsIDocShellTreeOwner.h"
#endif
#define ANCHOR_SCROLL_FLAGS \
(nsIPresShell::SCROLL_OVERFLOW_HIDDEN | nsIPresShell::SCROLL_NO_PARENT_FRAMES)
--- a/layout/base/nsQuoteList.cpp
+++ b/layout/base/nsQuoteList.cpp
@@ -3,16 +3,17 @@
/* 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/. */
/* implementation of quotes for the CSS 'content' property */
#include "nsQuoteList.h"
#include "nsReadableUtils.h"
+#include "nsIContent.h"
bool
nsQuoteNode::InitTextFrame(nsGenConList* aList, nsIFrame* aPseudoFrame,
nsIFrame* aTextFrame)
{
nsGenConNode::InitTextFrame(aList, aPseudoFrame, aTextFrame);
nsQuoteList* quoteList = static_cast<nsQuoteList*>(aList);
--- a/layout/base/nsRefreshDriver.cpp
+++ b/layout/base/nsRefreshDriver.cpp
@@ -41,16 +41,17 @@
#include "mozilla/Preferences.h"
#include "nsViewManager.h"
#include "GeckoProfiler.h"
#include "nsNPAPIPluginInstance.h"
#include "nsPerformance.h"
#include "mozilla/dom/WindowBinding.h"
#include "RestyleManager.h"
#include "Layers.h"
+#include "imgIContainer.h"
using namespace mozilla;
using namespace mozilla::widget;
#ifdef PR_LOGGING
static PRLogModuleInfo *gLog = nullptr;
#define LOG(...) PR_LOG(gLog, PR_LOG_NOTICE, (__VA_ARGS__))
#else
--- a/layout/generic/ScrollbarActivity.cpp
+++ b/layout/generic/ScrollbarActivity.cpp
@@ -1,15 +1,16 @@
/* -*- 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 "ScrollbarActivity.h"
#include "nsIScrollbarOwner.h"
+#include "nsIContent.h"
#include "nsIDOMEvent.h"
#include "nsIDOMElementCSSInlineStyle.h"
#include "nsIDOMCSSStyleDeclaration.h"
#include "nsIFrame.h"
#include "nsContentUtils.h"
#include "nsAString.h"
#include "nsQueryFrame.h"
#include "nsComponentManagerUtils.h"
--- a/layout/generic/TextOverflow.cpp
+++ b/layout/generic/TextOverflow.cpp
@@ -14,16 +14,17 @@
#include "nsCSSAnonBoxes.h"
#include "nsGfxScrollFrame.h"
#include "nsIScrollableFrame.h"
#include "nsLayoutUtils.h"
#include "nsPresContext.h"
#include "nsRect.h"
#include "nsRenderingContext.h"
#include "nsTextFrame.h"
+#include "nsIFrameInlines.h"
#include "mozilla/Util.h"
#include "mozilla/Likely.h"
namespace mozilla {
namespace css {
class LazyReferenceRenderingContextGetterFromFrame MOZ_FINAL :
public gfxFontGroup::LazyReferenceContextGetter {
--- a/layout/generic/moz.build
+++ b/layout/generic/moz.build
@@ -16,16 +16,17 @@ EXPORTS += [
'nsFrameIdList.h',
'nsFrameList.h',
'nsFrameSelection.h',
'nsHTMLParts.h',
'nsHTMLReflowMetrics.h',
'nsHTMLReflowState.h',
'nsIAnonymousContentCreator.h',
'nsIFrame.h',
+ 'nsIFrameInlines.h',
'nsIFrameUtil.h',
'nsILineIterator.h',
'nsIObjectFrame.h',
'nsIPageSequenceFrame.h',
'nsIScrollPositionListener.h',
'nsIScrollableFrame.h',
'nsIScrollbarOwner.h',
'nsIStatefulFrame.h',
--- a/layout/generic/nsBlockFrame.cpp
+++ b/layout/generic/nsBlockFrame.cpp
@@ -43,16 +43,17 @@
#include "nsIDOMHTMLDocument.h"
#endif
#include "nsLayoutUtils.h"
#include "nsDisplayList.h"
#include "nsCSSAnonBoxes.h"
#include "nsCSSFrameConstructor.h"
#include "nsRenderingContext.h"
#include "TextOverflow.h"
+#include "nsIFrameInlines.h"
#ifdef IBMBIDI
#include "nsBidiPresUtils.h"
#endif // IBMBIDI
static const int MIN_LINES_NEEDING_CURSOR = 20;
static const PRUnichar kDiscCharacter = 0x2022;
--- a/layout/generic/nsBlockReflowState.cpp
+++ b/layout/generic/nsBlockReflowState.cpp
@@ -8,17 +8,17 @@
#include "nsBlockReflowState.h"
#include "mozilla/DebugOnly.h"
#include "nsBlockFrame.h"
#include "nsLineLayout.h"
#include "nsPresContext.h"
-#include "nsIFrame.h"
+#include "nsIFrameInlines.h"
#include "mozilla/AutoRestore.h"
#include <algorithm>
#ifdef DEBUG
#include "nsBlockDebugFlags.h"
#endif
using namespace mozilla;
--- a/layout/generic/nsContainerFrame.cpp
+++ b/layout/generic/nsContainerFrame.cpp
@@ -23,16 +23,17 @@
#include "nsCSSRendering.h"
#include "nsError.h"
#include "nsDisplayList.h"
#include "nsIBaseWindow.h"
#include "nsBoxLayoutState.h"
#include "nsCSSFrameConstructor.h"
#include "nsBlockFrame.h"
#include "mozilla/AutoRestore.h"
+#include "nsIFrameInlines.h"
#include <algorithm>
#ifdef DEBUG
#undef NOISY
#else
#undef NOISY
#endif
--- a/layout/generic/nsFrame.cpp
+++ b/layout/generic/nsFrame.cpp
@@ -72,16 +72,17 @@
#include "gfxContext.h"
#include "nsRenderingContext.h"
#include "nsAbsoluteContainingBlock.h"
#include "StickyScrollContainer.h"
#include "nsFontInflationData.h"
#include "gfxASurface.h"
#include "nsRegion.h"
+#include "nsIFrameInlines.h"
#include "mozilla/Preferences.h"
#include "mozilla/LookAndFeel.h"
#include "mozilla/MouseEvents.h"
#include "mozilla/css/ImageLoader.h"
#include "mozilla/gfx/Tools.h"
using namespace mozilla;
@@ -8212,16 +8213,49 @@ nsIFrame::DestroySurface(void* aProperty
}
void
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;
void
nsAdaptorAddIndents()
{
for(int32_t i=0; i < gIndent2; i++)
--- a/layout/generic/nsGfxScrollFrame.cpp
+++ b/layout/generic/nsGfxScrollFrame.cpp
@@ -45,16 +45,17 @@
#include "nsSVGOuterSVGFrame.h"
#include "mozilla/Attributes.h"
#include "ScrollbarActivity.h"
#include "nsRefreshDriver.h"
#include "nsThemeConstants.h"
#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)
using namespace mozilla;
using namespace mozilla::dom;
using namespace mozilla::layout;
--- a/layout/generic/nsHTMLReflowState.cpp
+++ b/layout/generic/nsHTMLReflowState.cpp
@@ -21,16 +21,17 @@
#include "nsImageFrame.h"
#include "nsTableFrame.h"
#include "nsTableCellFrame.h"
#include "nsIPercentHeightObserver.h"
#include "nsLayoutUtils.h"
#include "mozilla/Preferences.h"
#include "nsFontInflationData.h"
#include "StickyScrollContainer.h"
+#include "nsIFrameInlines.h"
#include <algorithm>
#ifdef DEBUG
#undef NOISY_VERTICAL_ALIGN
#else
#undef NOISY_VERTICAL_ALIGN
#endif
--- a/layout/generic/nsIFrame.h
+++ b/layout/generic/nsIFrame.h
@@ -1374,16 +1374,19 @@ public:
// point. The primary and secondary offsets differ when the point is over a
// non-text object. The primary offset is the expected position of the
// cursor calculated from a point; the secondary offset, when it is different,
// indicates that the point is in the boundaries of some selectable object.
// Note that the primary offset can be after the secondary offset; for places
// 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;
int32_t secondaryOffset;
// Helpers for places that need the ends of the offsets and expect them in
// numerical order, as opposed to wanting the primary and secondary offsets
int32_t StartOffset() { return std::min(offset, secondaryOffset); }
int32_t EndOffset() { return std::max(offset, secondaryOffset); }
@@ -2570,23 +2573,18 @@ public:
virtual bool IsVisibleInSelection(nsISelection* aSelection);
/**
* Determines whether this frame is a pseudo stacking context, looking
* only as style --- i.e., assuming that it's in-flow and not a replaced
* 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; }
/**
* Determine whether the frame is logically empty, which is roughly
* whether the layout would be the same whether or not the frame is
* present. Placeholder frames should return true. Block frames
* should be considered empty whenever margins collapse through them,
* even though those margins are relevant. Text frames containing
@@ -2804,19 +2802,18 @@ NS_PTR_TO_INT32(frame->Properties().Get(
static bool AddCSSMaxSize(nsIFrame* aBox, nsSize& aSize, bool& aWidth, bool& aHeightSet);
static bool AddCSSFlex(nsBoxLayoutState& aState, nsIFrame* aBox, nscoord& aFlex);
// END OF BOX LAYOUT METHODS
// The above methods have been migrated from nsIBox and are in the process of
// being refactored. DO NOT USE OUTSIDE OF XUL.
struct CaretPosition {
- CaretPosition() :
- mContentOffset(0)
- {}
+ CaretPosition();
+ ~CaretPosition();
nsCOMPtr<nsIContent> mResultContent;
int32_t mContentOffset;
};
/**
* gets the first or last possible caret position within the frame
*
@@ -3495,59 +3492,9 @@ nsIFrame::IsFrameListSorted(nsFrameList&
trailingIter.Next();
iter.Next();
}
// We made it to the end without returning early, so the list is sorted.
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___ */
new file mode 100644
--- /dev/null
+++ b/layout/generic/nsIFrameInlines.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
--- a/layout/generic/nsLineBox.cpp
+++ b/layout/generic/nsLineBox.cpp
@@ -8,16 +8,17 @@
#include "nsLineBox.h"
#include "prprf.h"
#include "nsFrame.h"
#include "nsPresArena.h"
#ifdef IBMBIDI
#include "nsBidiPresUtils.h"
#endif
+#include "nsIFrameInlines.h"
#include "mozilla/Assertions.h"
#include "mozilla/Likely.h"
#ifdef DEBUG
static int32_t ctorCount;
int32_t nsLineBox::GetCtorCount() { return ctorCount; }
#endif
--- a/layout/generic/nsPlaceholderFrame.cpp
+++ b/layout/generic/nsPlaceholderFrame.cpp
@@ -10,16 +10,17 @@
#include "nsPlaceholderFrame.h"
#include "nsDisplayList.h"
#include "nsFrameManager.h"
#include "nsLayoutUtils.h"
#include "nsPresContext.h"
#include "nsRenderingContext.h"
+#include "nsIFrameInlines.h"
nsIFrame*
NS_NewPlaceholderFrame(nsIPresShell* aPresShell, nsStyleContext* aContext,
nsFrameState aTypeBit)
{
return new (aPresShell) nsPlaceholderFrame(aContext, aTypeBit);
}
--- a/layout/generic/nsSelection.cpp
+++ b/layout/generic/nsSelection.cpp
@@ -62,16 +62,17 @@ static NS_DEFINE_CID(kFrameTraversalCID,
// notifications
#include "nsIDOMDocument.h"
#include "nsIDocument.h"
#include "nsISelectionController.h"//for the enums
#include "nsAutoCopyListener.h"
#include "nsCopySupport.h"
#include "nsIClipboard.h"
+#include "nsIFrameInlines.h"
#ifdef IBMBIDI
#include "nsIBidiKeyboard.h"
#endif // IBMBIDI
#include "nsError.h"
#include "mozilla/dom/Element.h"
--- a/layout/generic/nsSplittableFrame.cpp
+++ b/layout/generic/nsSplittableFrame.cpp
@@ -5,16 +5,17 @@
/*
* base class for rendering objects that can be split across lines,
* columns, or pages
*/
#include "nsSplittableFrame.h"
#include "nsContainerFrame.h"
+#include "nsIFrameInlines.h"
NS_IMPL_FRAMEARENA_HELPERS(nsSplittableFrame)
void
nsSplittableFrame::Init(nsIContent* aContent,
nsIFrame* aParent,
nsIFrame* aPrevInFlow)
{
--- a/layout/generic/nsTextFrame.cpp
+++ b/layout/generic/nsTextFrame.cpp
@@ -49,16 +49,17 @@
#include "nsGkAtoms.h"
#include "nsFrameSelection.h"
#include "nsRange.h"
#include "nsCSSRendering.h"
#include "nsContentUtils.h"
#include "nsLineBreaker.h"
#include "nsIWordBreaker.h"
#include "nsGenericDOMDataNode.h"
+#include "nsIFrameInlines.h"
#include <algorithm>
#ifdef ACCESSIBILITY
#include "nsAccessibilityService.h"
#endif
#include "nsAutoPtr.h"
#include "nsPrintfCString.h"
--- a/layout/inspector/src/inFlasher.cpp
+++ b/layout/inspector/src/inFlasher.cpp
@@ -7,16 +7,18 @@
#include "nsIDOMElement.h"
#include "nsIServiceManager.h"
#include "nsIPresShell.h"
#include "nsIFrame.h"
#include "nsIWidget.h"
#include "nsReadableUtils.h"
#include "nsRenderingContext.h"
+#include "nsIDOMWindow.h"
+#include "nsIContent.h"
#include "prprf.h"
///////////////////////////////////////////////////////////////////////////////
inFlasher::inFlasher() :
mColor(NS_RGB(0,0,0)),
mThickness(0),
--- a/layout/style/ImageLoader.cpp
+++ b/layout/style/ImageLoader.cpp
@@ -8,16 +8,17 @@
#include "mozilla/css/ImageLoader.h"
#include "nsContentUtils.h"
#include "nsLayoutUtils.h"
#include "nsError.h"
#include "nsDisplayList.h"
#include "FrameLayerBuilder.h"
#include "nsSVGEffects.h"
+#include "imgIContainer.h"
namespace mozilla {
namespace css {
/* static */ PLDHashOperator
ImageLoader::SetAnimationModeEnumerator(nsISupports* aKey, FrameSet* aValue,
void* aClosure)
{
--- a/layout/tables/nsTableRowFrame.cpp
+++ b/layout/tables/nsTableRowFrame.cpp
@@ -13,16 +13,17 @@
#include "nsTableFrame.h"
#include "nsTableCellFrame.h"
#include "nsCSSRendering.h"
#include "nsHTMLParts.h"
#include "nsTableColGroupFrame.h"
#include "nsTableColFrame.h"
#include "nsCOMPtr.h"
#include "nsDisplayList.h"
+#include "nsIFrameInlines.h"
#include <algorithm>
using namespace mozilla;
struct nsTableCellReflowState : public nsHTMLReflowState
{
nsTableCellReflowState(nsPresContext* aPresContext,
const nsHTMLReflowState& aParentReflowState,