Bug 1326574: Add some needed includes/forward-declarations in layout/style, to preemptively fix unified bustage. r?xidorn
MozReview-Commit-ID: 2vM3aiR87T3
--- a/layout/style/DocumentStyleRootIterator.cpp
+++ b/layout/style/DocumentStyleRootIterator.cpp
@@ -1,16 +1,17 @@
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
/* 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 "DocumentStyleRootIterator.h"
+#include "mozilla/dom/Element.h"
#include "nsContentUtils.h"
namespace mozilla {
DocumentStyleRootIterator::DocumentStyleRootIterator(nsIDocument* aDocument)
: mPosition(0)
{
MOZ_COUNT_CTOR(DocumentStyleRootIterator);
--- a/layout/style/DocumentStyleRootIterator.h
+++ b/layout/style/DocumentStyleRootIterator.h
@@ -9,28 +9,32 @@
#include "nsTArray.h"
class nsIContent;
class nsIDocument;
namespace mozilla {
+namespace dom {
+class Element;
+} // namespace dom
+
/**
* DocumentStyleRootIterator traverses the roots of the document from the
* perspective of the Servo-backed style system. This will first traverse
* the document root, followed by any document level native anonymous content.
*/
class DocumentStyleRootIterator
{
public:
explicit DocumentStyleRootIterator(nsIDocument* aDocument);
~DocumentStyleRootIterator() { MOZ_COUNT_DTOR(DocumentStyleRootIterator); }
- Element* GetNextStyleRoot();
+ dom::Element* GetNextStyleRoot();
private:
AutoTArray<nsIContent*, 8> mStyleRoots;
uint32_t mPosition;
};
} // namespace mozilla
--- a/layout/style/ServoStyleSet.cpp
+++ b/layout/style/ServoStyleSet.cpp
@@ -4,16 +4,18 @@
* 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/ServoStyleSet.h"
#include "mozilla/DocumentStyleRootIterator.h"
#include "mozilla/ServoRestyleManager.h"
#include "mozilla/dom/ChildIterator.h"
+#include "mozilla/dom/Element.h"
+#include "mozilla/dom/ElementInlines.h"
#include "nsCSSAnonBoxes.h"
#include "nsCSSPseudoElements.h"
#include "nsIDocumentInlines.h"
#include "nsPrintfCString.h"
#include "nsStyleContext.h"
#include "nsStyleSet.h"
using namespace mozilla;
--- a/layout/style/nsComputedDOMStyle.cpp
+++ b/layout/style/nsComputedDOMStyle.cpp
@@ -80,17 +80,17 @@ GetROCSSValueList(bool aCommaDelimited)
return new nsDOMCSSValueList(aCommaDelimited, true);
}
template<typename T>
already_AddRefed<CSSValue>
GetBackgroundList(T nsStyleImageLayers::Layer::* aMember,
uint32_t nsStyleImageLayers::* aCount,
const nsStyleImageLayers& aLayers,
- const KTableEntry aTable[])
+ const nsCSSProps::KTableEntry aTable[])
{
RefPtr<nsDOMCSSValueList> valueList = GetROCSSValueList(true);
for (uint32_t i = 0, i_end = aLayers.*aCount; i < i_end; ++i) {
RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
val->SetIdent(nsCSSProps::ValueToKeywordEnum(aLayers.mLayers[i].*aMember, aTable));
valueList->AppendCSSValue(val.forget());
}