Bug 1321387 part 6: Add #includes & forward declarations to some headers in layout/generic, to provide types used in those files. r?TYLin draft
authorDaniel Holbert <dholbert@cs.stanford.edu>
Wed, 30 Nov 2016 14:52:26 -0800
changeset 446124 740db0e10d4ee4581d0d420dca1806af5d9e0cf2
parent 446123 2c52944ec51f72d70ffdb0d5b3299a36c3fd38fb
child 538705 841c39f1770386faa63555665c20dfd22a4964f9
push id37701
push userdholbert@mozilla.com
push dateWed, 30 Nov 2016 22:52:44 +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 {
   /**