Bug 1533870: Preemptively fix unified build bustage in layout/style. r=boris

I wrote this patch by first removing UNIFIED_ from layout/style/moz.build, and
then rebuilding, and then addressing build errors one by one.

Nearly all of the build errors were for using the "Document" type without a
proper namespace, and I've addressed this by sprinkling "using namespace"
declarations in the affected .cpp files (and removing a few now-unnecessary
dom:: prefixes on types in those files).

The only other errors were for WorkletGlobalScope.h which needed an #include to
provide the type "DOMHighResTimeStamp", and nsHTMLStyleSheet.h which needed a
forward-declaration for the type "mozilla::dom::Document".

Differential Revision: https://phabricator.services.mozilla.com/D22767

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Daniel Holbert 2019-03-08 21:48:39 +00:00
Родитель 7ebaf1cd2b
Коммит 3f763b8af9
7 изменённых файлов: 15 добавлений и 3 удалений

Просмотреть файл

@ -11,6 +11,7 @@
#include "mozilla/ErrorResult.h"
#include "mozilla/TimeStamp.h"
#include "mozilla/dom/BindingDeclarations.h"
#include "nsDOMNavigationTiming.h"
#include "nsIGlobalObject.h"
#include "nsWrapperCache.h"

Просмотреть файл

@ -22,6 +22,8 @@
#include "GeckoProfiler.h"
#include "mozilla/layers/WebRenderUserData.h"
using namespace mozilla::dom;
namespace mozilla {
namespace css {

Просмотреть файл

@ -13,6 +13,7 @@
#include "mozilla/dom/Document.h"
using namespace mozilla;
using namespace mozilla::dom;
/* static */
bool ServoCSSParser::IsValidCSSColor(const nsAString& aValue) {

Просмотреть файл

@ -33,6 +33,7 @@
using namespace mozilla;
using namespace mozilla::css;
using namespace mozilla::dom;
using namespace mozilla::gfx;
using nsStyleTransformMatrix::Decompose2DMatrix;
using nsStyleTransformMatrix::Decompose3DMatrix;

Просмотреть файл

@ -22,9 +22,10 @@
#include "ActiveLayerTracker.h"
using namespace mozilla;
using namespace mozilla::dom;
nsDOMCSSAttributeDeclaration::nsDOMCSSAttributeDeclaration(
dom::Element* aElement, bool aIsSMILOverride)
nsDOMCSSAttributeDeclaration::nsDOMCSSAttributeDeclaration(Element* aElement,
bool aIsSMILOverride)
: mElement(aElement), mIsSMILOverride(aIsSMILOverride) {
NS_ASSERTION(aElement, "Inline style for a NULL element?");
}

Просмотреть файл

@ -22,13 +22,14 @@
#include "mozilla/layers/ScrollLinkedEffectDetector.h"
using namespace mozilla;
using namespace mozilla::dom;
nsDOMCSSDeclaration::~nsDOMCSSDeclaration() = default;
/* virtual */
JSObject* nsDOMCSSDeclaration::WrapObject(JSContext* aCx,
JS::Handle<JSObject*> aGivenProto) {
return dom::CSS2Properties_Binding::Wrap(aCx, this, aGivenProto);
return CSS2Properties_Binding::Wrap(aCx, this, aGivenProto);
}
NS_IMPL_QUERY_INTERFACE(nsDOMCSSDeclaration, nsICSSDeclaration)

Просмотреть файл

@ -22,6 +22,11 @@
class nsMappedAttributes;
struct RawServoDeclarationBlock;
namespace mozilla {
namespace dom {
class Document;
} // namespace dom
} // namespace mozilla
class nsHTMLStyleSheet final {
public: