Bug 1321387 part 2: Add missing "using namespace" declarations to a few .cpp files in layout/generic. r?TYLin
This adds 2 "using namespace mozilla" (to provide various types),
and 2 "using namespace mozilla::gfx" (to provide mozilla::gfx::DrawTarget).
MozReview-Commit-ID: 2bXbMlr4Dbn
--- a/layout/generic/nsPageContentFrame.cpp
+++ b/layout/generic/nsPageContentFrame.cpp
@@ -4,18 +4,17 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "nsPageContentFrame.h"
#include "nsCSSFrameConstructor.h"
#include "nsPresContext.h"
#include "nsGkAtoms.h"
#include "nsIPresShell.h"
#include "nsSimplePageSequenceFrame.h"
-using mozilla::LogicalSize;
-using mozilla::WritingMode;
+using namespace mozilla;
nsPageContentFrame*
NS_NewPageContentFrame(nsIPresShell* aPresShell, nsStyleContext* aContext)
{
return new (aPresShell) nsPageContentFrame(aContext);
}
NS_IMPL_FRAMEARENA_HELPERS(nsPageContentFrame)
--- a/layout/generic/nsRubyBaseContainerFrame.cpp
+++ b/layout/generic/nsRubyBaseContainerFrame.cpp
@@ -17,16 +17,17 @@
#include "nsLineLayout.h"
#include "nsPresContext.h"
#include "nsStyleContext.h"
#include "nsStyleStructInlines.h"
#include "nsTextFrame.h"
#include "RubyUtils.h"
using namespace mozilla;
+using namespace mozilla::gfx;
//----------------------------------------------------------------------
// Frame class boilerplate
// =======================
NS_QUERYFRAME_HEAD(nsRubyBaseContainerFrame)
NS_QUERYFRAME_ENTRY(nsRubyBaseContainerFrame)
--- a/layout/generic/nsTextFrameUtils.cpp
+++ b/layout/generic/nsTextFrameUtils.cpp
@@ -8,16 +8,18 @@
#include "nsBidiUtils.h"
#include "nsCharTraits.h"
#include "nsIContent.h"
#include "nsStyleStruct.h"
#include "nsTextFragment.h"
#include "nsUnicharUtils.h"
#include <algorithm>
+using namespace mozilla;
+
static bool IsDiscardable(char16_t ch, uint32_t* aFlags)
{
// Unlike IS_DISCARDABLE, we don't discard \r. \r will be ignored by gfxTextRun
// and discarding it would force us to copy text in many cases of preformatted
// text containing \r\n.
if (ch == CH_SHY) {
*aFlags |= nsTextFrameUtils::TEXT_HAS_SHY;
return true;
--- a/layout/generic/nsTextRunTransformations.cpp
+++ b/layout/generic/nsTextRunTransformations.cpp
@@ -15,16 +15,17 @@
#include "nsSpecialCasingData.h"
#include "mozilla/gfx/2D.h"
#include "nsTextFrameUtils.h"
#include "nsIPersistentProperties2.h"
#include "GreekCasing.h"
#include "IrishCasing.h"
using namespace mozilla;
+using namespace mozilla::gfx;
// Unicode characters needing special casing treatment in tr/az languages
#define LATIN_CAPITAL_LETTER_I_WITH_DOT_ABOVE 0x0130
#define LATIN_SMALL_LETTER_DOTLESS_I 0x0131
// Greek sigma needs custom handling for the lowercase transform; for details
// see comments under "case NS_STYLE_TEXT_TRANSFORM_LOWERCASE" within
// nsCaseTransformTextRunFactory::RebuildTextRun(), and bug 740120.