Don't place "using namespace XXX;" in global space for unified source builds
authorHironori.Fujii@sony.com <Hironori.Fujii@sony.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 21 Aug 2018 13:55:13 +0000 (13:55 +0000)
committerHironori.Fujii@sony.com <Hironori.Fujii@sony.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 21 Aug 2018 13:55:13 +0000 (13:55 +0000)
https://bugs.webkit.org/show_bug.cgi?id=188739

Reviewed by Yusuke Suzuki.

No new tests (No behavior change).

* html/track/AudioTrackList.cpp:
* html/track/TextTrackList.cpp:
* html/track/VideoTrackList.cpp:
* page/SecurityOriginData.cpp:
* page/TextIndicator.cpp:
* platform/geoclue/GeolocationProviderGeoclue.cpp:
* platform/graphics/gstreamer/ImageGStreamerCairo.cpp:
* platform/graphics/win/FullScreenController.cpp:
* platform/mediastream/CaptureDeviceManager.cpp:
* platform/mock/MediaPlaybackTargetPickerMock.cpp:
* svg/animation/SMILTime.cpp:
* testing/js/WebCoreTestSupport.cpp:
* xml/XPathParser.cpp:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235115 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 files changed:
Source/WebCore/ChangeLog
Source/WebCore/html/track/AudioTrackList.cpp
Source/WebCore/html/track/TextTrackList.cpp
Source/WebCore/html/track/VideoTrackList.cpp
Source/WebCore/page/SecurityOriginData.cpp
Source/WebCore/page/TextIndicator.cpp
Source/WebCore/platform/geoclue/GeolocationProviderGeoclue.cpp
Source/WebCore/platform/graphics/gstreamer/ImageGStreamerCairo.cpp
Source/WebCore/platform/graphics/win/FullScreenController.cpp
Source/WebCore/platform/mediastream/CaptureDeviceManager.cpp
Source/WebCore/platform/mock/MediaPlaybackTargetPickerMock.cpp
Source/WebCore/svg/animation/SMILTime.cpp
Source/WebCore/testing/js/WebCoreTestSupport.cpp
Source/WebCore/xml/XPathParser.cpp

index 9a14112..c41411b 100644 (file)
@@ -1,3 +1,26 @@
+2018-08-21  Fujii Hironori  <Hironori.Fujii@sony.com>
+
+        Don't place "using namespace XXX;" in global space for unified source builds
+        https://bugs.webkit.org/show_bug.cgi?id=188739
+
+        Reviewed by Yusuke Suzuki.
+
+        No new tests (No behavior change).
+
+        * html/track/AudioTrackList.cpp:
+        * html/track/TextTrackList.cpp:
+        * html/track/VideoTrackList.cpp:
+        * page/SecurityOriginData.cpp:
+        * page/TextIndicator.cpp:
+        * platform/geoclue/GeolocationProviderGeoclue.cpp:
+        * platform/graphics/gstreamer/ImageGStreamerCairo.cpp:
+        * platform/graphics/win/FullScreenController.cpp:
+        * platform/mediastream/CaptureDeviceManager.cpp:
+        * platform/mock/MediaPlaybackTargetPickerMock.cpp:
+        * svg/animation/SMILTime.cpp:
+        * testing/js/WebCoreTestSupport.cpp:
+        * xml/XPathParser.cpp:
+
 2018-08-21  Philippe Normand  <philn@igalia.com>
 
         [GStreamer] Warn early about incomplete MSE track switching support
index f8b5d0a..aaddcde 100644 (file)
@@ -31,7 +31,7 @@
 
 #include "AudioTrack.h"
 
-using namespace WebCore;
+namespace WebCore {
 
 AudioTrackList::AudioTrackList(HTMLMediaElement* element, ScriptExecutionContext* context)
     : TrackListBase(element, context)
@@ -86,4 +86,5 @@ const char* AudioTrackList::activeDOMObjectName() const
     return "AudioTrackList";
 }
 
+} // namespace WebCore
 #endif
index 9b691f5..ea5930f 100644 (file)
@@ -34,7 +34,7 @@
 #include "InbandTextTrackPrivate.h"
 #include "LoadableTextTrack.h"
 
-using namespace WebCore;
+namespace WebCore {
 
 TextTrackList::TextTrackList(HTMLMediaElement* element, ScriptExecutionContext* context)
     : TrackListBase(element, context)
@@ -270,4 +270,5 @@ const char* TextTrackList::activeDOMObjectName() const
     return "TextTrackList";
 }
 
+} // namespace WebCore
 #endif
index a1549ab..4d8b325 100644 (file)
@@ -31,7 +31,7 @@
 
 #include "VideoTrack.h"
 
-using namespace WebCore;
+namespace WebCore {
 
 VideoTrackList::VideoTrackList(HTMLMediaElement* element, ScriptExecutionContext* context)
     : TrackListBase(element, context)
@@ -99,4 +99,5 @@ const char* VideoTrackList::activeDOMObjectName() const
     return "VideoTrackList";
 }
 
+} // namespace WebCore
 #endif
index 1a5790e..b7f83ce 100644 (file)
@@ -34,8 +34,6 @@
 #include <wtf/text/StringBuilder.h>
 #include <wtf/text/StringConcatenateNumbers.h>
 
-using namespace WebCore;
-
 namespace WebCore {
 
 String SecurityOriginData::toString() const
index a3746e0..73120c4 100644 (file)
@@ -50,8 +50,6 @@
 #include "SelectionRect.h"
 #endif
 
-using namespace WebCore;
-
 namespace WebCore {
 
 static bool initializeIndicator(TextIndicatorData&, Frame&, const Range&, FloatSize margin, bool indicatesCurrentSelection);
index 4a16220..9839773 100644 (file)
@@ -35,7 +35,7 @@
 const char* gGeoclueBusName = "org.freedesktop.GeoClue2";
 const char* gGeoclueManagerPath = "/org/freedesktop/GeoClue2/Manager";
 
-using namespace WebCore;
+namespace WebCore {
 
 typedef enum {
     GeoclueAccuracyLevelCountry = 1,
@@ -210,4 +210,6 @@ void GeolocationProviderGeoclue::updateClientRequirements()
     geoclue_client_set_requested_accuracy_level(m_clientProxy.get(), accuracyLevel);
 }
 
+} // namespace WebCore
+
 #endif // ENABLE(GEOLOCATION)
index bed6604..c0de8c4 100644 (file)
@@ -29,7 +29,7 @@
 #include <gst/video/gstvideometa.h>
 
 
-using namespace WebCore;
+namespace WebCore {
 
 ImageGStreamer::ImageGStreamer(GstSample* sample)
 {
@@ -117,4 +117,7 @@ ImageGStreamer::~ImageGStreamer()
     if (m_frameMapped)
         gst_video_frame_unmap(&m_videoFrame);
 }
+
+} // namespace WebCore
+
 #endif // USE(GSTREAMER)
index ca07a78..b953550 100644 (file)
@@ -38,7 +38,7 @@
 #include "WebCoreInstanceHandle.h"
 #include <wtf/RefPtr.h>
 
-using namespace WebCore;
+namespace WebCore {
 
 static const int kFullScreenAnimationDuration = 500; // milliseconds 
 
@@ -217,4 +217,7 @@ void FullScreenController::close()
     ::RedrawWindow(m_private->m_client->fullScreenClientWindow(), 0, 0, RDW_INVALIDATE | RDW_UPDATENOW | RDW_ERASE | RDW_ALLCHILDREN);
     m_private->m_backgroundWindow = nullptr;
 }
+
+} // namespace WebCore
+
 #endif
index 8a39b29..01c856f 100644 (file)
@@ -36,7 +36,7 @@
 #include <wtf/MainThread.h>
 #include <wtf/text/StringHash.h>
 
-using namespace WebCore;
+namespace WebCore {
 
 CaptureDeviceManager::~CaptureDeviceManager() = default;
 
@@ -60,4 +60,6 @@ void CaptureDeviceManager::deviceChanged()
     });
 }
 
+} // namespace WebCore
+
 #endif // ENABLE(MEDIA_STREAM)
index d5700d1..f080082 100644 (file)
@@ -33,8 +33,6 @@
 #include "MediaPlaybackTargetMock.h"
 #include "WebMediaSessionManager.h"
 
-using namespace WebCore;
-
 namespace WebCore {
 
 static const Seconds timerInterval { 100_ms };
index 3e3d707..3d5c9c9 100644 (file)
 
 #include <float.h>
 
-using namespace WebCore;
+namespace WebCore {
 
 const double SMILTime::unresolvedValue = DBL_MAX;
 // Just a big value smaller than DBL_MAX. Our times are relative to 0, we don't really need the full range.
 const double SMILTime::indefiniteValue = FLT_MAX;    
 
-SMILTime WebCore::operator+(const SMILTime& a, const SMILTime& b)
+SMILTime operator+(const SMILTime& a, const SMILTime& b)
 {
     if (a.isUnresolved() || b.isUnresolved())
         return SMILTime::unresolved();
@@ -43,7 +43,7 @@ SMILTime WebCore::operator+(const SMILTime& a, const SMILTime& b)
     return a.value() + b.value();
 }
 
-SMILTime WebCore::operator-(const SMILTime& a, const SMILTime& b)
+SMILTime operator-(const SMILTime& a, const SMILTime& b)
 {
     if (a.isUnresolved() || b.isUnresolved())
         return SMILTime::unresolved();
@@ -52,7 +52,7 @@ SMILTime WebCore::operator-(const SMILTime& a, const SMILTime& b)
     return a.value() - b.value();
 }
 
-SMILTime WebCore::operator*(const SMILTime& a,  const SMILTime& b)
+SMILTime operator*(const SMILTime& a,  const SMILTime& b)
 {
     if (a.isUnresolved() || b.isUnresolved())
         return SMILTime::unresolved();
@@ -62,3 +62,5 @@ SMILTime WebCore::operator*(const SMILTime& a,  const SMILTime& b)
         return SMILTime::indefinite();
     return a.value() * b.value();
 }
+
+} // namespace WebCore
index 07ded44..d241206 100644 (file)
 #include <JavaScriptCore/IdentifierInlines.h>
 #include <JavaScriptCore/JSValueRef.h>
 
-using namespace WebCore;
-
 namespace WebCoreTestSupport {
 using namespace JSC;
+using namespace WebCore;
 
 void injectInternalsObject(JSContextRef context)
 {
index e86329a..2eb7e58 100644 (file)
@@ -38,9 +38,6 @@
 
 extern int xpathyyparse(WebCore::XPath::Parser&);
 
-using namespace WebCore;
-using namespace XPath;
-
 #include "XPathGrammar.h"
 
 namespace WebCore {