Title: [239549] trunk/Source
Revision
239549
Author
[email protected]
Date
2018-12-24 18:00:11 -0800 (Mon, 24 Dec 2018)

Log Message

Remove "using namespace std;"
https://bugs.webkit.org/show_bug.cgi?id=192973

Reviewed by Alex Christensen.

Source/WebCore:

Removed "using namespace std" statement, and use std:: prefix.

No new tests since no behavior changes.

* accessibility/win/AXObjectCacheWin.cpp:
* platform/graphics/GraphicsContext3DPrivate.cpp:
* platform/graphics/cairo/ImageBufferCairo.cpp:
* platform/graphics/win/FontPlatformDataCairoWin.cpp:
* platform/graphics/win/FontWin.cpp:
(WebCore::FontCascade::floatWidthForComplexText const):
* platform/graphics/win/GraphicsContextCGWin.cpp:
* platform/graphics/win/GraphicsContextCairoWin.cpp:
* platform/graphics/win/GraphicsContextDirect2D.cpp:
* platform/graphics/win/GraphicsContextWin.cpp:
* platform/graphics/win/SimpleFontDataCGWin.cpp:
* platform/graphics/win/UniscribeController.cpp:
(WebCore::UniscribeController::UniscribeController):
(WebCore::UniscribeController::shapeAndPlaceItem):
* platform/image-decoders/ScalableImageDecoder.cpp:
* platform/text/LocaleICU.cpp:
* platform/text/win/LocaleWin.cpp:
* platform/win/ScrollbarThemeWin.cpp:
* rendering/RenderRubyRun.cpp:
(WebCore::RenderRubyRun::layoutBlock):
* rendering/RenderThemeWin.cpp:
(WebCore::RenderThemeWin::adjustMenuListButtonStyle const):
(WebCore::RenderThemeWin::paintSearchFieldCancelButton):
(WebCore::RenderThemeWin::adjustSearchFieldCancelButtonStyle const):
(WebCore::RenderThemeWin::adjustSearchFieldResultsDecorationPartStyle const):
(WebCore::RenderThemeWin::paintSearchFieldResultsDecorationPart):
(WebCore::RenderThemeWin::adjustSearchFieldResultsButtonStyle const):
(WebCore::RenderThemeWin::paintSearchFieldResultsButton):

Source/WebKit:

* Platform/IPC/win/ConnectionWin.cpp:

Source/WebKitLegacy/win:

* FullscreenVideoController.cpp:
* WebFrame.cpp:
(WebFrame::drawFooter):
* WebHistory.cpp:
* WebKitQuartzCoreAdditions/CAD3DRenderer.cpp:
* WebKitQuartzCoreAdditions/CAView.cpp:
* WebView.cpp:
(PreferencesChangedOrRemovedObserver::notifyPreferencesChanged):
(PreferencesChangedOrRemovedObserver::notifyPreferencesRemoved):
(WebView::setCacheModel):
(WebView::maxCacheModelInAnyInstance):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (239548 => 239549)


--- trunk/Source/WebCore/ChangeLog	2018-12-24 19:20:18 UTC (rev 239548)
+++ trunk/Source/WebCore/ChangeLog	2018-12-25 02:00:11 UTC (rev 239549)
@@ -1,3 +1,43 @@
+2018-12-24  Fujii Hironori  <[email protected]>
+
+        Remove "using namespace std;"
+        https://bugs.webkit.org/show_bug.cgi?id=192973
+
+        Reviewed by Alex Christensen.
+
+        Removed "using namespace std" statement, and use std:: prefix.
+
+        No new tests since no behavior changes.
+
+        * accessibility/win/AXObjectCacheWin.cpp:
+        * platform/graphics/GraphicsContext3DPrivate.cpp:
+        * platform/graphics/cairo/ImageBufferCairo.cpp:
+        * platform/graphics/win/FontPlatformDataCairoWin.cpp:
+        * platform/graphics/win/FontWin.cpp:
+        (WebCore::FontCascade::floatWidthForComplexText const):
+        * platform/graphics/win/GraphicsContextCGWin.cpp:
+        * platform/graphics/win/GraphicsContextCairoWin.cpp:
+        * platform/graphics/win/GraphicsContextDirect2D.cpp:
+        * platform/graphics/win/GraphicsContextWin.cpp:
+        * platform/graphics/win/SimpleFontDataCGWin.cpp:
+        * platform/graphics/win/UniscribeController.cpp:
+        (WebCore::UniscribeController::UniscribeController):
+        (WebCore::UniscribeController::shapeAndPlaceItem):
+        * platform/image-decoders/ScalableImageDecoder.cpp:
+        * platform/text/LocaleICU.cpp:
+        * platform/text/win/LocaleWin.cpp:
+        * platform/win/ScrollbarThemeWin.cpp:
+        * rendering/RenderRubyRun.cpp:
+        (WebCore::RenderRubyRun::layoutBlock):
+        * rendering/RenderThemeWin.cpp:
+        (WebCore::RenderThemeWin::adjustMenuListButtonStyle const):
+        (WebCore::RenderThemeWin::paintSearchFieldCancelButton):
+        (WebCore::RenderThemeWin::adjustSearchFieldCancelButtonStyle const):
+        (WebCore::RenderThemeWin::adjustSearchFieldResultsDecorationPartStyle const):
+        (WebCore::RenderThemeWin::paintSearchFieldResultsDecorationPart):
+        (WebCore::RenderThemeWin::adjustSearchFieldResultsButtonStyle const):
+        (WebCore::RenderThemeWin::paintSearchFieldResultsButton):
+
 2018-12-24  Simon Fraser  <[email protected]>
 
         Change ScrollingNodeType to an enum class

Modified: trunk/Source/WebCore/accessibility/win/AXObjectCacheWin.cpp (239548 => 239549)


--- trunk/Source/WebCore/accessibility/win/AXObjectCacheWin.cpp	2018-12-24 19:20:18 UTC (rev 239548)
+++ trunk/Source/WebCore/accessibility/win/AXObjectCacheWin.cpp	2018-12-25 02:00:11 UTC (rev 239549)
@@ -40,7 +40,6 @@
 
 
 namespace WebCore {
-using namespace std;
 
 void AXObjectCache::detachWrapper(AccessibilityObject* obj, AccessibilityDetachmentType)
 {

Modified: trunk/Source/WebCore/platform/graphics/GraphicsContext3DPrivate.cpp (239548 => 239549)


--- trunk/Source/WebCore/platform/graphics/GraphicsContext3DPrivate.cpp	2018-12-24 19:20:18 UTC (rev 239548)
+++ trunk/Source/WebCore/platform/graphics/GraphicsContext3DPrivate.cpp	2018-12-25 02:00:11 UTC (rev 239549)
@@ -37,7 +37,6 @@
 
 
 namespace WebCore {
-using namespace std;
 
 GraphicsContext3DPrivate::GraphicsContext3DPrivate(GraphicsContext3D*, GraphicsContext3D::RenderStyle renderStyle)
 {

Modified: trunk/Source/WebCore/platform/graphics/cairo/ImageBufferCairo.cpp (239548 => 239549)


--- trunk/Source/WebCore/platform/graphics/cairo/ImageBufferCairo.cpp	2018-12-24 19:20:18 UTC (rev 239548)
+++ trunk/Source/WebCore/platform/graphics/cairo/ImageBufferCairo.cpp	2018-12-25 02:00:11 UTC (rev 239549)
@@ -77,7 +77,6 @@
 
 
 namespace WebCore {
-using namespace std;
 
 ImageBufferData::ImageBufferData(const IntSize& size, RenderingMode renderingMode)
     : m_platformContext(0)

Modified: trunk/Source/WebCore/platform/graphics/win/FontPlatformDataCairoWin.cpp (239548 => 239549)


--- trunk/Source/WebCore/platform/graphics/win/FontPlatformDataCairoWin.cpp	2018-12-24 19:20:18 UTC (rev 239548)
+++ trunk/Source/WebCore/platform/graphics/win/FontPlatformDataCairoWin.cpp	2018-12-25 02:00:11 UTC (rev 239549)
@@ -36,7 +36,6 @@
 
 
 namespace WebCore {
-using namespace std;
 
 void FontPlatformData::platformDataInit(HFONT font, float size, HDC hdc, WCHAR* faceName)
 {

Modified: trunk/Source/WebCore/platform/graphics/win/FontWin.cpp (239548 => 239549)


--- trunk/Source/WebCore/platform/graphics/win/FontWin.cpp	2018-12-24 19:20:18 UTC (rev 239548)
+++ trunk/Source/WebCore/platform/graphics/win/FontWin.cpp	2018-12-25 02:00:11 UTC (rev 239549)
@@ -38,7 +38,6 @@
 
 
 namespace WebCore {
-using namespace std;
 
 bool FontCascade::canReturnFallbackFontsForComplexText()
 {
@@ -96,10 +95,10 @@
     UniscribeController controller(this, run, fallbackFonts);
     controller.advance(run.length());
     if (glyphOverflow) {
-        glyphOverflow->top = max<int>(glyphOverflow->top, ceilf(-controller.minGlyphBoundingBoxY()) - (glyphOverflow->computeBounds ? 0 : fontMetrics().ascent()));
-        glyphOverflow->bottom = max<int>(glyphOverflow->bottom, ceilf(controller.maxGlyphBoundingBoxY()) - (glyphOverflow->computeBounds ? 0  : fontMetrics().descent()));
-        glyphOverflow->left = max<int>(0, ceilf(-controller.minGlyphBoundingBoxX()));
-        glyphOverflow->right = max<int>(0, ceilf(controller.maxGlyphBoundingBoxX() - controller.runWidthSoFar()));
+        glyphOverflow->top = std::max<int>(glyphOverflow->top, ceilf(-controller.minGlyphBoundingBoxY()) - (glyphOverflow->computeBounds ? 0 : fontMetrics().ascent()));
+        glyphOverflow->bottom = std::max<int>(glyphOverflow->bottom, ceilf(controller.maxGlyphBoundingBoxY()) - (glyphOverflow->computeBounds ? 0  : fontMetrics().descent()));
+        glyphOverflow->left = std::max<int>(0, ceilf(-controller.minGlyphBoundingBoxX()));
+        glyphOverflow->right = std::max<int>(0, ceilf(controller.maxGlyphBoundingBoxX() - controller.runWidthSoFar()));
     }
     return controller.runWidthSoFar();
 }

Modified: trunk/Source/WebCore/platform/graphics/win/GraphicsContextCGWin.cpp (239548 => 239549)


--- trunk/Source/WebCore/platform/graphics/win/GraphicsContextCGWin.cpp	2018-12-24 19:20:18 UTC (rev 239548)
+++ trunk/Source/WebCore/platform/graphics/win/GraphicsContextCGWin.cpp	2018-12-25 02:00:11 UTC (rev 239549)
@@ -38,7 +38,6 @@
 
 
 namespace WebCore {
-using namespace std;
 
 static CGContextRef CGContextWithHDC(HDC hdc, bool hasAlpha)
 {

Modified: trunk/Source/WebCore/platform/graphics/win/GraphicsContextCairoWin.cpp (239548 => 239549)


--- trunk/Source/WebCore/platform/graphics/win/GraphicsContextCairoWin.cpp	2018-12-24 19:20:18 UTC (rev 239548)
+++ trunk/Source/WebCore/platform/graphics/win/GraphicsContextCairoWin.cpp	2018-12-25 02:00:11 UTC (rev 239549)
@@ -36,7 +36,6 @@
 
 
 namespace WebCore {
-using namespace std;
 
 #if PLATFORM(WIN)
 static cairo_t* createCairoContextWithHDC(HDC hdc, bool hasAlpha)

Modified: trunk/Source/WebCore/platform/graphics/win/GraphicsContextDirect2D.cpp (239548 => 239549)


--- trunk/Source/WebCore/platform/graphics/win/GraphicsContextDirect2D.cpp	2018-12-24 19:20:18 UTC (rev 239548)
+++ trunk/Source/WebCore/platform/graphics/win/GraphicsContextDirect2D.cpp	2018-12-25 02:00:11 UTC (rev 239549)
@@ -42,7 +42,6 @@
 
 
 namespace WebCore {
-using namespace std;
 
 GraphicsContext::GraphicsContext(HDC hdc, bool hasAlpha)
 {

Modified: trunk/Source/WebCore/platform/graphics/win/GraphicsContextWin.cpp (239548 => 239549)


--- trunk/Source/WebCore/platform/graphics/win/GraphicsContextWin.cpp	2018-12-24 19:20:18 UTC (rev 239548)
+++ trunk/Source/WebCore/platform/graphics/win/GraphicsContextWin.cpp	2018-12-25 02:00:11 UTC (rev 239549)
@@ -44,7 +44,6 @@
 
 
 namespace WebCore {
-using namespace std;
 
 static void fillWithClearColor(HBITMAP bitmap)
 {

Modified: trunk/Source/WebCore/platform/graphics/win/SimpleFontDataCGWin.cpp (239548 => 239549)


--- trunk/Source/WebCore/platform/graphics/win/SimpleFontDataCGWin.cpp	2018-12-24 19:20:18 UTC (rev 239548)
+++ trunk/Source/WebCore/platform/graphics/win/SimpleFontDataCGWin.cpp	2018-12-25 02:00:11 UTC (rev 239549)
@@ -49,8 +49,6 @@
 
 namespace WebCore {
 
-using namespace std;
-
 void Font::platformInit()
 {
     m_syntheticBoldOffset = m_platformData.syntheticBold() ? 1.0f : 0.f;

Modified: trunk/Source/WebCore/platform/graphics/win/UniscribeController.cpp (239548 => 239549)


--- trunk/Source/WebCore/platform/graphics/win/UniscribeController.cpp	2018-12-24 19:20:18 UTC (rev 239548)
+++ trunk/Source/WebCore/platform/graphics/win/UniscribeController.cpp	2018-12-25 02:00:11 UTC (rev 239549)
@@ -34,9 +34,7 @@
 
 
 namespace WebCore {
-using namespace WTF;
-using namespace Unicode;
-using namespace std;
+using namespace WTF::Unicode;
 
 // FIXME: Rearchitect this to be more like WidthIterator in Font.cpp.  Have an advance() method
 // that does stuff in that method instead of doing everything in the constructor.  Have advance()
@@ -46,10 +44,10 @@
     : m_font(*font)
     , m_run(run)
     , m_fallbackFonts(fallbackFonts)
-    , m_minGlyphBoundingBoxX(numeric_limits<float>::max())
-    , m_maxGlyphBoundingBoxX(numeric_limits<float>::min())
-    , m_minGlyphBoundingBoxY(numeric_limits<float>::max())
-    , m_maxGlyphBoundingBoxY(numeric_limits<float>::min())
+    , m_minGlyphBoundingBoxX(std::numeric_limits<float>::max())
+    , m_maxGlyphBoundingBoxX(std::numeric_limits<float>::min())
+    , m_minGlyphBoundingBoxY(std::numeric_limits<float>::max())
+    , m_maxGlyphBoundingBoxY(std::numeric_limits<float>::min())
     , m_currentCharacter(0)
     , m_end(run.length())
     , m_runWidthSoFar(0)
@@ -374,10 +372,10 @@
 
         FloatRect glyphBounds = fontData->boundsForGlyph(glyph);
         glyphBounds.move(m_glyphOrigin.x(), m_glyphOrigin.y());
-        m_minGlyphBoundingBoxX = min(m_minGlyphBoundingBoxX, glyphBounds.x());
-        m_maxGlyphBoundingBoxX = max(m_maxGlyphBoundingBoxX, glyphBounds.maxX());
-        m_minGlyphBoundingBoxY = min(m_minGlyphBoundingBoxY, glyphBounds.y());
-        m_maxGlyphBoundingBoxY = max(m_maxGlyphBoundingBoxY, glyphBounds.maxY());
+        m_minGlyphBoundingBoxX = std::min(m_minGlyphBoundingBoxX, glyphBounds.x());
+        m_maxGlyphBoundingBoxX = std::max(m_maxGlyphBoundingBoxX, glyphBounds.maxX());
+        m_minGlyphBoundingBoxY = std::min(m_minGlyphBoundingBoxY, glyphBounds.y());
+        m_maxGlyphBoundingBoxY = std::max(m_maxGlyphBoundingBoxY, glyphBounds.maxY());
         m_glyphOrigin.move(advance + offsetX, -offsetY);
 
         // Mutate the glyph array to contain our altered advances.

Modified: trunk/Source/WebCore/platform/image-decoders/ScalableImageDecoder.cpp (239548 => 239549)


--- trunk/Source/WebCore/platform/image-decoders/ScalableImageDecoder.cpp	2018-12-24 19:20:18 UTC (rev 239548)
+++ trunk/Source/WebCore/platform/image-decoders/ScalableImageDecoder.cpp	2018-12-25 02:00:11 UTC (rev 239549)
@@ -38,7 +38,6 @@
 
 
 namespace WebCore {
-using namespace std;
 
 namespace {
 

Modified: trunk/Source/WebCore/platform/text/LocaleICU.cpp (239548 => 239549)


--- trunk/Source/WebCore/platform/text/LocaleICU.cpp	2018-12-24 19:20:18 UTC (rev 239548)
+++ trunk/Source/WebCore/platform/text/LocaleICU.cpp	2018-12-25 02:00:11 UTC (rev 239549)
@@ -41,7 +41,6 @@
 
 namespace WebCore {
 using namespace icu;
-using namespace std;
 
 std::unique_ptr<Locale> Locale::create(const AtomicString& locale)
 {

Modified: trunk/Source/WebCore/platform/text/win/LocaleWin.cpp (239548 => 239549)


--- trunk/Source/WebCore/platform/text/win/LocaleWin.cpp	2018-12-24 19:20:18 UTC (rev 239548)
+++ trunk/Source/WebCore/platform/text/win/LocaleWin.cpp	2018-12-25 02:00:11 UTC (rev 239549)
@@ -44,7 +44,6 @@
 #include <wtf/text/win/WCharStringExtras.h>
 
 namespace WebCore {
-using namespace std;
 
 typedef HashMap<String, LCID, ASCIICaseInsensitiveHash> NameToLCIDMap;
 

Modified: trunk/Source/WebCore/platform/win/ScrollbarThemeWin.cpp (239548 => 239549)


--- trunk/Source/WebCore/platform/win/ScrollbarThemeWin.cpp	2018-12-24 19:20:18 UTC (rev 239548)
+++ trunk/Source/WebCore/platform/win/ScrollbarThemeWin.cpp	2018-12-25 02:00:11 UTC (rev 239549)
@@ -63,7 +63,6 @@
 
 
 namespace WebCore {
-using namespace std;
 
 static HANDLE scrollbarTheme;
 static bool runningVista;

Modified: trunk/Source/WebCore/rendering/RenderRubyRun.cpp (239548 => 239549)


--- trunk/Source/WebCore/rendering/RenderRubyRun.cpp	2018-12-24 19:20:18 UTC (rev 239548)
+++ trunk/Source/WebCore/rendering/RenderRubyRun.cpp	2018-12-25 02:00:11 UTC (rev 239549)
@@ -43,8 +43,6 @@
 
 namespace WebCore {
 
-using namespace std;
-
 WTF_MAKE_ISO_ALLOCATED_IMPL(RenderRubyRun);
 
 RenderRubyRun::RenderRubyRun(Document& document, RenderStyle&& style)
@@ -167,7 +165,7 @@
         // Bopomofo. We need to move the RenderRubyText over to the right side and center it
         // vertically relative to the base.
         const FontCascade& font = style().fontCascade();
-        float distanceBetweenBase = max(font.letterSpacing(), 2.0f * rt->style().fontCascade().fontMetrics().height());
+        float distanceBetweenBase = std::max(font.letterSpacing(), 2.0f * rt->style().fontCascade().fontMetrics().height());
         setWidth(width() + distanceBetweenBase - font.letterSpacing());
         if (RenderRubyBase* rb = rubyBase()) {
             LayoutUnit firstLineTop;

Modified: trunk/Source/WebCore/rendering/RenderThemeWin.cpp (239548 => 239549)


--- trunk/Source/WebCore/rendering/RenderThemeWin.cpp	2018-12-24 19:20:18 UTC (rev 239548)
+++ trunk/Source/WebCore/rendering/RenderThemeWin.cpp	2018-12-25 02:00:11 UTC (rev 239549)
@@ -160,7 +160,6 @@
 
 
 namespace WebCore {
-using namespace std;
 
 // This is the fixed width IE and Firefox use for buttons on dropdown menus
 static const int dropDownButtonWidth = 17;
@@ -775,7 +774,7 @@
 
     // Calculate our min-height
     int minHeight = style.fontMetrics().height();
-    minHeight = max(minHeight, dropDownBoxMinHeight);
+    minHeight = std::max(minHeight, dropDownBoxMinHeight);
 
     style.setMinHeight(Length(minHeight, Fixed));
 
@@ -880,7 +879,7 @@
     IntRect parentBox = downcast<RenderBox>(*o.parent()).absoluteContentBox();
     
     // Make sure the scaled button stays square and will fit in its parent's box
-    bounds.setHeight(min(parentBox.width(), min(parentBox.height(), bounds.height())));
+    bounds.setHeight(std::min(parentBox.width(), std::min(parentBox.height(), bounds.height())));
     bounds.setWidth(bounds.height());
 
     // Center the button vertically.  Round up though, so if it has to be one pixel off-center, it will
@@ -897,7 +896,7 @@
 {
     // Scale the button size based on the font size
     float fontScale = style.computedFontPixelSize() / defaultControlFontPixelSize;
-    int cancelButtonSize = lroundf(min(max(minCancelButtonSize, defaultCancelButtonSize * fontScale), maxCancelButtonSize));
+    int cancelButtonSize = lroundf(std::min(std::max(minCancelButtonSize, defaultCancelButtonSize * fontScale), maxCancelButtonSize));
     style.setWidth(Length(cancelButtonSize, Fixed));
     style.setHeight(Length(cancelButtonSize, Fixed));
 }
@@ -913,7 +912,7 @@
 {
     // Scale the decoration size based on the font size
     float fontScale = style.computedFontPixelSize() / defaultControlFontPixelSize;
-    int magnifierSize = lroundf(min(max(minSearchFieldResultsDecorationSize, defaultSearchFieldResultsDecorationSize * fontScale), 
+    int magnifierSize = lroundf(std::min(std::max(minSearchFieldResultsDecorationSize, defaultSearchFieldResultsDecorationSize * fontScale), 
                                      maxSearchFieldResultsDecorationSize));
     style.setWidth(Length(magnifierSize, Fixed));
     style.setHeight(Length(magnifierSize, Fixed));
@@ -929,7 +928,7 @@
     IntRect parentBox = downcast<RenderBox>(*o.parent()).absoluteContentBox();
     
     // Make sure the scaled decoration stays square and will fit in its parent's box
-    bounds.setHeight(min(parentBox.width(), min(parentBox.height(), bounds.height())));
+    bounds.setHeight(std::min(parentBox.width(), std::min(parentBox.height(), bounds.height())));
     bounds.setWidth(bounds.height());
 
     // Center the decoration vertically.  Round up though, so if it has to be one pixel off-center, it will
@@ -945,7 +944,7 @@
 {
     // Scale the button size based on the font size
     float fontScale = style.computedFontPixelSize() / defaultControlFontPixelSize;
-    int magnifierHeight = lroundf(min(max(minSearchFieldResultsDecorationSize, defaultSearchFieldResultsDecorationSize * fontScale), 
+    int magnifierHeight = lroundf(std::min(std::max(minSearchFieldResultsDecorationSize, defaultSearchFieldResultsDecorationSize * fontScale), 
                                    maxSearchFieldResultsDecorationSize));
     int magnifierWidth = lroundf(magnifierHeight * defaultSearchFieldResultsButtonWidth / defaultSearchFieldResultsDecorationSize);
     style.setWidth(Length(magnifierWidth, Fixed));
@@ -964,8 +963,8 @@
     IntRect parentBox = downcast<RenderBox>(*o.parent()).absoluteContentBox();
     
     // Make sure the scaled decoration will fit in its parent's box
-    bounds.setHeight(min(parentBox.height(), bounds.height()));
-    bounds.setWidth(min<int>(parentBox.width(), bounds.height() * defaultSearchFieldResultsButtonWidth / defaultSearchFieldResultsDecorationSize));
+    bounds.setHeight(std::min(parentBox.height(), bounds.height()));
+    bounds.setWidth(std::min<int>(parentBox.width(), bounds.height() * defaultSearchFieldResultsButtonWidth / defaultSearchFieldResultsDecorationSize));
 
     // Center the button vertically.  Round up though, so if it has to be one pixel off-center, it will
     // be one pixel closer to the bottom of the field.  This tends to look better with the text.

Modified: trunk/Source/WebKit/ChangeLog (239548 => 239549)


--- trunk/Source/WebKit/ChangeLog	2018-12-24 19:20:18 UTC (rev 239548)
+++ trunk/Source/WebKit/ChangeLog	2018-12-25 02:00:11 UTC (rev 239549)
@@ -1,3 +1,12 @@
+2018-12-24  Fujii Hironori  <[email protected]>
+
+        Remove "using namespace std;"
+        https://bugs.webkit.org/show_bug.cgi?id=192973
+
+        Reviewed by Alex Christensen.
+
+        * Platform/IPC/win/ConnectionWin.cpp:
+
 2018-12-24  Simon Fraser  <[email protected]>
 
         Change ScrollingNodeType to an enum class

Modified: trunk/Source/WebKit/Platform/IPC/win/ConnectionWin.cpp (239548 => 239549)


--- trunk/Source/WebKit/Platform/IPC/win/ConnectionWin.cpp	2018-12-24 19:20:18 UTC (rev 239548)
+++ trunk/Source/WebKit/Platform/IPC/win/ConnectionWin.cpp	2018-12-25 02:00:11 UTC (rev 239549)
@@ -30,8 +30,6 @@
 #include <wtf/RandomNumber.h>
 #include <wtf/text/WTFString.h>
 
-using namespace std;
-
 namespace IPC {
 
 // FIXME: Rename this or use a different constant on windows.

Modified: trunk/Source/WebKitLegacy/win/ChangeLog (239548 => 239549)


--- trunk/Source/WebKitLegacy/win/ChangeLog	2018-12-24 19:20:18 UTC (rev 239548)
+++ trunk/Source/WebKitLegacy/win/ChangeLog	2018-12-25 02:00:11 UTC (rev 239549)
@@ -1,3 +1,22 @@
+2018-12-24  Fujii Hironori  <[email protected]>
+
+        Remove "using namespace std;"
+        https://bugs.webkit.org/show_bug.cgi?id=192973
+
+        Reviewed by Alex Christensen.
+
+        * FullscreenVideoController.cpp:
+        * WebFrame.cpp:
+        (WebFrame::drawFooter):
+        * WebHistory.cpp:
+        * WebKitQuartzCoreAdditions/CAD3DRenderer.cpp:
+        * WebKitQuartzCoreAdditions/CAView.cpp:
+        * WebView.cpp:
+        (PreferencesChangedOrRemovedObserver::notifyPreferencesChanged):
+        (PreferencesChangedOrRemovedObserver::notifyPreferencesRemoved):
+        (WebView::setCacheModel):
+        (WebView::maxCacheModelInAnyInstance):
+
 2018-12-20  Yusuke Suzuki  <[email protected]>
 
         Use Ref<> as much as possible

Modified: trunk/Source/WebKitLegacy/win/FullscreenVideoController.cpp (239548 => 239549)


--- trunk/Source/WebKitLegacy/win/FullscreenVideoController.cpp	2018-12-24 19:20:18 UTC (rev 239548)
+++ trunk/Source/WebKitLegacy/win/FullscreenVideoController.cpp	2018-12-25 02:00:11 UTC (rev 239549)
@@ -47,7 +47,6 @@
 #include <WebCore/PlatformCALayerWin.h>
 #endif
 
-using namespace std;
 using namespace WebCore;
 
 static const Seconds timerInterval { 33_ms };
@@ -171,7 +170,7 @@
             m_dragStartOffset = m_rect.location().x() + m_buttonSize / 2;
     }
 
-    m_buttonPosition = max(0, min(m_rect.width() - m_buttonSize, point.x() - m_dragStartOffset));
+    m_buttonPosition = std::max(0, std::min(m_rect.width() - m_buttonSize, point.x() - m_dragStartOffset));
 }
 
 #if USE(CA)

Modified: trunk/Source/WebKitLegacy/win/WebFrame.cpp (239548 => 239549)


--- trunk/Source/WebKitLegacy/win/WebFrame.cpp	2018-12-24 19:20:18 UTC (rev 239548)
+++ trunk/Source/WebKitLegacy/win/WebFrame.cpp	2018-12-25 02:00:11 UTC (rev 239549)
@@ -123,7 +123,6 @@
 
 using namespace WebCore;
 using namespace HTMLNames;
-using namespace std;
 
 using JSC::JSGlobalObject;
 using JSC::JSLock;
@@ -1574,7 +1573,7 @@
 void WebFrame::drawFooter(PlatformGraphicsContext* pctx, IWebUIDelegate* ui, const IntRect& pageRect, UINT page, UINT pageCount, float headerHeight, float footerHeight)
 {
     int x = pageRect.x();
-    int y = max((int)headerHeight+pageRect.height(), m_pageHeight-static_cast<int>(footerHeight));
+    int y = std::max((int)headerHeight+pageRect.height(), m_pageHeight-static_cast<int>(footerHeight));
     RECT footerRect = {x, y, x+pageRect.width(), y+static_cast<int>(footerHeight)};
     ui->drawFooterInRect(d->webView, &footerRect, reinterpret_cast<ULONG_PTR>(pctx), page + 1, pageCount);
 }
@@ -1655,7 +1654,7 @@
     HDC hdc = hdcFromContext(pctx);
     
     int x = pageRect.x();
-    int y = max(static_cast<int>(headerHeight) + pageRect.height(), m_pageHeight  -static_cast<int>(footerHeight));
+    int y = std::max(static_cast<int>(headerHeight) + pageRect.height(), m_pageHeight  -static_cast<int>(footerHeight));
     RECT footerRect = {x, y, x + pageRect.width(), y + static_cast<int>(footerHeight)};
 
     ui->drawFooterInRect(d->webView, &footerRect, reinterpret_cast<ULONG_PTR>(hdc), page+1, pageCount);

Modified: trunk/Source/WebKitLegacy/win/WebHistory.cpp (239548 => 239549)


--- trunk/Source/WebKitLegacy/win/WebHistory.cpp	2018-12-24 19:20:18 UTC (rev 239548)
+++ trunk/Source/WebKitLegacy/win/WebHistory.cpp	2018-12-25 02:00:11 UTC (rev 239549)
@@ -52,7 +52,6 @@
 #endif
 
 using namespace WebCore;
-using namespace std;
 
 static bool areEqualOrClose(double d1, double d2)
 {

Modified: trunk/Source/WebKitLegacy/win/WebKitQuartzCoreAdditions/CAD3DRenderer.cpp (239548 => 239549)


--- trunk/Source/WebKitLegacy/win/WebKitQuartzCoreAdditions/CAD3DRenderer.cpp	2018-12-24 19:20:18 UTC (rev 239548)
+++ trunk/Source/WebKitLegacy/win/WebKitQuartzCoreAdditions/CAD3DRenderer.cpp	2018-12-25 02:00:11 UTC (rev 239549)
@@ -41,8 +41,6 @@
 
 typedef HRESULT (CALLBACK *LPFNDLL_Direct3DCreate9Ex)(UINT, void **);
 
-using namespace std;
-
 namespace WKQCA {
 
 static const DWORD customVertexFormat = D3DFVF_XYZRHW | D3DFVF_TEX1;
@@ -418,7 +416,7 @@
     setDeviceIsLost(true);
 
     // We can't render until the device is reset, which the caller will have to take care of.
-    nextRenderTime = numeric_limits<CFTimeInterval>::infinity();
+    nextRenderTime = std::numeric_limits<CFTimeInterval>::infinity();
 
     return DeviceBecameLost;
 }
@@ -464,7 +462,7 @@
     setDeviceIsLost(true);
 
     // We can't render until the device is reset, which the caller will have to take care of.
-    nextRenderTime = numeric_limits<CFTimeInterval>::infinity();
+    nextRenderTime = std::numeric_limits<CFTimeInterval>::infinity();
 
     return DeviceBecameLost;
 }
@@ -498,7 +496,7 @@
     ASSERT(m_d3dDevice);
     ASSERT(m_renderOGLContext);
 
-    nextRenderTime = numeric_limits<CFTimeInterval>::infinity();
+    nextRenderTime = std::numeric_limits<CFTimeInterval>::infinity();
 
     if (m_deviceIsLost)
         return DeviceIsLost;

Modified: trunk/Source/WebKitLegacy/win/WebKitQuartzCoreAdditions/CAView.cpp (239548 => 239549)


--- trunk/Source/WebKitLegacy/win/WebKitQuartzCoreAdditions/CAView.cpp	2018-12-24 19:20:18 UTC (rev 239548)
+++ trunk/Source/WebKitLegacy/win/WebKitQuartzCoreAdditions/CAView.cpp	2018-12-25 02:00:11 UTC (rev 239549)
@@ -38,8 +38,6 @@
 #include <wtf/Vector.h>
 #include <wtf/win/GDIObject.h>
 
-using namespace std;
-
 namespace WKQCA {
 
 class CAView::Handle : public ThreadSafeRefCounted<Handle> {
@@ -250,7 +248,7 @@
             m_swapChain = nullptr;
             // If we don't have a window, we can't draw, so there's no point in having the display
             // link fire.
-            scheduleNextDraw(numeric_limits<CFTimeInterval>::infinity());
+            scheduleNextDraw(std::numeric_limits<CFTimeInterval>::infinity());
         } else {
             // FIXME: We might be able to get better resizing performance by allocating swap chains in
             // multiples of some size (say, 256x256) and only reallocating when our window size passes into
@@ -263,10 +261,10 @@
                 m_drawingProhibited = true;
                 // There's no point in allowing the display link to fire until drawing becomes
                 // allowed again (at which time we'll restart the display link).
-                scheduleNextDraw(numeric_limits<CFTimeInterval>::infinity());
+                scheduleNextDraw(std::numeric_limits<CFTimeInterval>::infinity());
             } else if (m_destination == DrawingDestinationImage) {
                 // It is the caller's responsibility to ask us to draw sometime later.
-                scheduleNextDraw(numeric_limits<CFTimeInterval>::infinity());
+                scheduleNextDraw(std::numeric_limits<CFTimeInterval>::infinity());
             } else {
                 // We should draw into the new window and/or swap chain as soon as possible.
                 scheduleNextDraw(0);
@@ -306,7 +304,7 @@
     if (willDraw(unusedWillUpdateSoon))
         didDraw(CAD3DRenderer::shared().renderAndPresent(m_bounds, m_swapChain, m_d3dPostProcessingContext.get(), m_context.get(), nextDrawTime), unusedWillUpdateSoon);
     else
-        nextDrawTime = numeric_limits<CFTimeInterval>::infinity();
+        nextDrawTime = std::numeric_limits<CFTimeInterval>::infinity();
     scheduleNextDraw(nextDrawTime);
 }
 
@@ -315,7 +313,7 @@
     ASSERT(m_destination == DrawingDestinationImage);
 
     imageOrigin = CGPointZero;
-    nextDrawTime = numeric_limits<CFTimeInterval>::infinity();
+    nextDrawTime = std::numeric_limits<CFTimeInterval>::infinity();
 
     auto locker = holdLock(m_lock);
 
@@ -473,7 +471,7 @@
 
     // We use !< here to ensure that we bail out when mediaTime is NaN.
     // (Comparisons with NaN always yield false.)
-    if (!(m_nextDrawTime < numeric_limits<CFTimeInterval>::infinity())) {
+    if (!(m_nextDrawTime < std::numeric_limits<CFTimeInterval>::infinity())) {
         if (m_displayLink)
             m_displayLink->setPaused(true);
         return;

Modified: trunk/Source/WebKitLegacy/win/WebView.cpp (239548 => 239549)


--- trunk/Source/WebKitLegacy/win/WebView.cpp	2018-12-24 19:20:18 UTC (rev 239548)
+++ trunk/Source/WebKitLegacy/win/WebView.cpp	2018-12-25 02:00:11 UTC (rev 239549)
@@ -228,7 +228,6 @@
 SOFT_LINK_OPTIONAL(Uxtheme, UpdatePanningFeedback, BOOL, WINAPI, (HWND, LONG, LONG, BOOL));
 
 using namespace WebCore;
-using namespace std;
 using JSC::JSLock;
 
 static String webKitVersionString();
@@ -354,7 +353,7 @@
         hr = WebPreferences::sharedStandardPreferences()->cacheModel(&sharedPreferencesCacheModel);
         if (FAILED(hr))
             return hr;
-        WebView::setCacheModel(max(sharedPreferencesCacheModel, WebView::maxCacheModelInAnyInstance()));
+        WebView::setCacheModel(std::max(sharedPreferencesCacheModel, WebView::maxCacheModelInAnyInstance()));
     }
 
     return hr;
@@ -369,7 +368,7 @@
         hr = WebPreferences::sharedStandardPreferences()->cacheModel(&sharedPreferencesCacheModel);
         if (FAILED(hr))
             return hr;
-        WebView::setCacheModel(max(sharedPreferencesCacheModel, WebView::maxCacheModelInAnyInstance()));
+        WebView::setCacheModel(std::max(sharedPreferencesCacheModel, WebView::maxCacheModelInAnyInstance()));
     }
 
     return hr;
@@ -642,7 +641,7 @@
 
         // This code is here to avoid a PLT regression. We can remove it if we
         // can prove that the overall system gain would justify the regression.
-        cacheMaxDeadCapacity = max(24u, cacheMaxDeadCapacity);
+        cacheMaxDeadCapacity = std::max(24u, cacheMaxDeadCapacity);
 
         deadDecodedDataDeletionInterval = 60_s;
 
@@ -684,7 +683,7 @@
 
 #if USE(CFURLCONNECTION)
     // Don't shrink a big disk cache, since that would cause churn.
-    cacheDiskCapacity = max(cacheDiskCapacity, CFURLCacheDiskCapacity(cfurlCache.get()));
+    cacheDiskCapacity = std::max(cacheDiskCapacity, CFURLCacheDiskCapacity(cfurlCache.get()));
 
     CFURLCacheSetMemoryCapacity(cfurlCache.get(), cacheMemoryCapacity);
     CFURLCacheSetDiskCapacity(cfurlCache.get(), cacheDiskCapacity);
@@ -720,7 +719,7 @@
         if (FAILED(pref->cacheModel(&prefCacheModel)))
             continue;
 
-        cacheModel = max(cacheModel, prefCacheModel);
+        cacheModel = std::max(cacheModel, prefCacheModel);
     }
 
     return cacheModel;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to