Bug 1141931 part 5 - Eliminate unnecessary includes in header files of ruby frames. r=dholbert
☠☠ backed out by 44c475f5adc1 ☠ ☠
authorXidorn Quan <quanxunzhen@gmail.com>
Wed, 08 Apr 2015 08:40:31 +1200
changeset 238004 f432612b6475043f68d405eb5e38aad1be936b2e
parent 238003 48cf9568a4b18c834dc4f7e72d9f1df7d01352f4
child 238005 9cfea55b5e952ce1e09908dc58721fce21c80e4d
push id58082
push userxquan@mozilla.com
push dateTue, 07 Apr 2015 20:41:55 +0000
treeherdermozilla-inbound@26118238484f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdholbert
bugs1141931
milestone40.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1141931 part 5 - Eliminate unnecessary includes in header files of ruby frames. r=dholbert
layout/generic/RubyUtils.cpp
layout/generic/RubyUtils.h
layout/generic/nsLineLayout.cpp
layout/generic/nsRubyBaseContainerFrame.cpp
layout/generic/nsRubyBaseContainerFrame.h
layout/generic/nsRubyTextContainerFrame.h
--- a/layout/generic/RubyUtils.cpp
+++ b/layout/generic/RubyUtils.cpp
@@ -1,15 +1,16 @@
 /* -*- Mode: C++; tab-width: 2; 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 "RubyUtils.h"
+#include "nsRubyBaseContainerFrame.h"
 
 using namespace mozilla;
 
 NS_DECLARE_FRAME_PROPERTY(ReservedISize, nullptr);
 
 union NSCoordValue
 {
   nscoord mCoord;
--- a/layout/generic/RubyUtils.h
+++ b/layout/generic/RubyUtils.h
@@ -3,19 +3,20 @@
 /* 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_RubyUtils_h_
 #define mozilla_RubyUtils_h_
 
 #include "nsGkAtoms.h"
-#include "nsRubyBaseContainerFrame.h"
 #include "nsRubyTextContainerFrame.h"
 
+class nsRubyBaseContainerFrame;
+
 namespace mozilla {
 
 /**
  * Reserved ISize
  *
  * With some exceptions, each ruby internal box has two isizes, which
  * are the reflowed isize and the final isize. The reflowed isize is
  * what a box itself needs. It is determined when the box gets reflowed.
--- a/layout/generic/nsLineLayout.cpp
+++ b/layout/generic/nsLineLayout.cpp
@@ -20,16 +20,17 @@
 #include "nsPresContext.h"
 #include "nsGkAtoms.h"
 #include "nsIContent.h"
 #include "nsLayoutUtils.h"
 #include "nsTextFrame.h"
 #include "nsStyleStructInlines.h"
 #include "nsBidiPresUtils.h"
 #include "nsRubyFrame.h"
+#include "nsRubyTextFrame.h"
 #include "RubyUtils.h"
 #include <algorithm>
 
 #ifdef DEBUG
 #undef  NOISY_INLINEDIR_ALIGN
 #undef  NOISY_BLOCKDIR_ALIGN
 #undef  REALLY_NOISY_BLOCKDIR_ALIGN
 #undef  NOISY_REFLOW
--- a/layout/generic/nsRubyBaseContainerFrame.cpp
+++ b/layout/generic/nsRubyBaseContainerFrame.cpp
@@ -2,17 +2,19 @@
 /* vim: set ts=2 et sw=2 tw=80: */
 /* This Source Code is subject to the terms of the Mozilla Public License
  * version 2.0 (the "License"). You can obtain a copy of the License at
  * http://mozilla.org/MPL/2.0/. */
 
 /* rendering object for CSS "display: ruby-base-container" */
 
 #include "nsRubyBaseContainerFrame.h"
-
+#include "nsRubyTextContainerFrame.h"
+#include "nsRubyBaseFrame.h"
+#include "nsRubyTextFrame.h"
 #include "mozilla/DebugOnly.h"
 #include "mozilla/Maybe.h"
 #include "mozilla/WritingModes.h"
 #include "nsContentUtils.h"
 #include "nsLineLayout.h"
 #include "nsPresContext.h"
 #include "nsStyleContext.h"
 #include "nsStyleStructInlines.h"
--- a/layout/generic/nsRubyBaseContainerFrame.h
+++ b/layout/generic/nsRubyBaseContainerFrame.h
@@ -5,33 +5,32 @@
  * http://mozilla.org/MPL/2.0/. */
 
 /* rendering object for CSS "display: ruby-base-container" */
 
 #ifndef nsRubyBaseContainerFrame_h___
 #define nsRubyBaseContainerFrame_h___
 
 #include "nsContainerFrame.h"
-#include "nsRubyTextContainerFrame.h"
-#include "nsRubyBaseFrame.h"
-#include "nsRubyTextFrame.h"
 
 #define RTC_ARRAY_SIZE 1
 
 /**
  * Factory function.
  * @return a newly allocated nsRubyBaseContainerFrame (infallible)
  */
 nsContainerFrame* NS_NewRubyBaseContainerFrame(nsIPresShell* aPresShell,
                                                nsStyleContext* aContext);
 
 namespace mozilla {
 struct RubyColumn;
 }
 
+class nsRubyTextContainerFrame;
+
 class nsRubyBaseContainerFrame final : public nsContainerFrame
 {
 public:
   NS_DECL_FRAMEARENA_HELPERS
   NS_DECL_QUERYFRAME_TARGET(nsRubyBaseContainerFrame)
   NS_DECL_QUERYFRAME
 
   // nsIFrame overrides
--- a/layout/generic/nsRubyTextContainerFrame.h
+++ b/layout/generic/nsRubyTextContainerFrame.h
@@ -5,19 +5,16 @@
  * http://mozilla.org/MPL/2.0/. */
 
 /* rendering object for CSS "display: ruby-text-container" */
 
 #ifndef nsRubyTextContainerFrame_h___
 #define nsRubyTextContainerFrame_h___
 
 #include "nsBlockFrame.h"
-#include "nsRubyBaseFrame.h"
-#include "nsRubyTextFrame.h"
-#include "nsLineLayout.h"
 
 typedef nsContainerFrame nsRubyTextContainerFrameSuper;
 
 /**
  * Factory function.
  * @return a newly allocated nsRubyTextContainerFrame (infallible)
  */
 nsContainerFrame* NS_NewRubyTextContainerFrame(nsIPresShell* aPresShell,