Bug 1321387 part 6: Add #includes & forward declarations to some headers in layout/generic, to provide types used in those files. r=TYLin
authorDaniel Holbert <dholbert@cs.stanford.edu>
Wed, 30 Nov 2016 14:52:26 -0800
changeset 324909 1fa4b27c956ff3d0a471aaf0efa7e03d4162b560
parent 324908 9fc8534e92e24d257a1fbe99bfaa16a931397019
child 324910 5c37c5f9875e435e4c9ddc4513669798da546f21
child 324912 e36b4963793fe08d4c6f7d02a6fe753a72a0c86a
child 325016 07b9aab24f30b7172e4b6553773c382200b32488
push id24
push usermaklebus@msu.edu
push dateTue, 20 Dec 2016 03:11:33 +0000
reviewersTYLin
bugs1321387
milestone53.0a1
Bug 1321387 part 6: Add #includes & forward declarations to some headers in layout/generic, to provide types used in those files. r=TYLin Notes: * In CSSAlignUtils.h, I'm just adding a forward-decl for a type used there. * RubyUtils.h needs to #include nsIFrame.h -- a forward-declare won't suffice -- because it makes a nsIFrame method-call ("aFrame->GetType()"). * ScrollSnap.h uses the "Maybe" type and a unit defined in nsIScrollableFrame.h; hence it needs both of those headers. MozReview-Commit-ID: KuhJVh9RTjZ
layout/generic/CSSAlignUtils.h
layout/generic/RubyUtils.h
layout/generic/ScrollSnap.h
--- a/layout/generic/CSSAlignUtils.h
+++ b/layout/generic/CSSAlignUtils.h
@@ -7,16 +7,18 @@
 
 #ifndef mozilla_CSSAlignUtils_h
 #define mozilla_CSSAlignUtils_h
 
 #include "mozilla/WritingModes.h"
 
 namespace mozilla {
 
+struct ReflowInput;
+
 class CSSAlignUtils {
 public:
   /**
    * Flags to customize the behavior of AlignJustifySelf:
    */
   enum class AlignJustifyFlags {
     eNoFlags           = 0,
     // Indicates that we have <overflow-position> = safe.
--- a/layout/generic/RubyUtils.h
+++ b/layout/generic/RubyUtils.h
@@ -4,16 +4,17 @@
  * 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 mozilla_RubyUtils_h_
 #define mozilla_RubyUtils_h_
 
 #include "nsCSSAnonBoxes.h"
 #include "nsGkAtoms.h"
+#include "nsIFrame.h"
 #include "nsTArray.h"
 
 #define RTC_ARRAY_SIZE 1
 
 class nsRubyFrame;
 class nsRubyBaseFrame;
 class nsRubyTextFrame;
 class nsRubyContentFrame;
--- a/layout/generic/ScrollSnap.h
+++ b/layout/generic/ScrollSnap.h
@@ -1,16 +1,19 @@
 /* -*- 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/. */
 
 #ifndef mozilla_layout_ScrollSnap_h_
 #define mozilla_layout_ScrollSnap_h_
 
+#include "mozilla/Maybe.h"
+#include "nsIScrollableFrame.h"
+
 namespace mozilla {
 
 namespace layers {
 struct ScrollSnapInfo;
 }
 
 struct ScrollSnapUtils {
   /**