Remove "using namespace std;"
authorHironori.Fujii@sony.com <Hironori.Fujii@sony.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 25 Dec 2018 02:00:11 +0000 (02:00 +0000)
committerHironori.Fujii@sony.com <Hironori.Fujii@sony.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 25 Dec 2018 02:00:11 +0000 (02:00 +0000)
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):

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

27 files changed:
Source/WebCore/ChangeLog
Source/WebCore/accessibility/win/AXObjectCacheWin.cpp
Source/WebCore/platform/graphics/GraphicsContext3DPrivate.cpp
Source/WebCore/platform/graphics/cairo/ImageBufferCairo.cpp
Source/WebCore/platform/graphics/win/FontPlatformDataCairoWin.cpp
Source/WebCore/platform/graphics/win/FontWin.cpp
Source/WebCore/platform/graphics/win/GraphicsContextCGWin.cpp
Source/WebCore/platform/graphics/win/GraphicsContextCairoWin.cpp
Source/WebCore/platform/graphics/win/GraphicsContextDirect2D.cpp
Source/WebCore/platform/graphics/win/GraphicsContextWin.cpp
Source/WebCore/platform/graphics/win/SimpleFontDataCGWin.cpp
Source/WebCore/platform/graphics/win/UniscribeController.cpp
Source/WebCore/platform/image-decoders/ScalableImageDecoder.cpp
Source/WebCore/platform/text/LocaleICU.cpp
Source/WebCore/platform/text/win/LocaleWin.cpp
Source/WebCore/platform/win/ScrollbarThemeWin.cpp
Source/WebCore/rendering/RenderRubyRun.cpp
Source/WebCore/rendering/RenderThemeWin.cpp
Source/WebKit/ChangeLog
Source/WebKit/Platform/IPC/win/ConnectionWin.cpp
Source/WebKitLegacy/win/ChangeLog
Source/WebKitLegacy/win/FullscreenVideoController.cpp
Source/WebKitLegacy/win/WebFrame.cpp
Source/WebKitLegacy/win/WebHistory.cpp
Source/WebKitLegacy/win/WebKitQuartzCoreAdditions/CAD3DRenderer.cpp
Source/WebKitLegacy/win/WebKitQuartzCoreAdditions/CAView.cpp
Source/WebKitLegacy/win/WebView.cpp

index ff2feea..3fe513e 100644 (file)
@@ -1,3 +1,43 @@
+2018-12-24  Fujii Hironori  <Hironori.Fujii@sony.com>
+
+        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  <simon.fraser@apple.com>
 
         Change ScrollingNodeType to an enum class
index 59ff6b0..97dc8da 100644 (file)
@@ -40,7 +40,6 @@
 
 
 namespace WebCore {
-using namespace std;
 
 void AXObjectCache::detachWrapper(AccessibilityObject* obj, AccessibilityDetachmentType)
 {
index d1286db..9130044 100644 (file)
@@ -37,7 +37,6 @@
 
 
 namespace WebCore {
-using namespace std;
 
 GraphicsContext3DPrivate::GraphicsContext3DPrivate(GraphicsContext3D*, GraphicsContext3D::RenderStyle renderStyle)
 {
index 9107c0e..8b35b82 100644 (file)
@@ -77,7 +77,6 @@
 
 
 namespace WebCore {
-using namespace std;
 
 ImageBufferData::ImageBufferData(const IntSize& size, RenderingMode renderingMode)
     : m_platformContext(0)
index a488811..a1db52e 100644 (file)
@@ -36,7 +36,6 @@
 
 
 namespace WebCore {
-using namespace std;
 
 void FontPlatformData::platformDataInit(HFONT font, float size, HDC hdc, WCHAR* faceName)
 {
index b7b4708..2d4f495 100644 (file)
@@ -38,7 +38,6 @@
 
 
 namespace WebCore {
-using namespace std;
 
 bool FontCascade::canReturnFallbackFontsForComplexText()
 {
@@ -96,10 +95,10 @@ float FontCascade::floatWidthForComplexText(const TextRun& run, HashSet<const Fo
     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();
 }
index 3974747..08bcf8a 100644 (file)
@@ -38,7 +38,6 @@
 
 
 namespace WebCore {
-using namespace std;
 
 static CGContextRef CGContextWithHDC(HDC hdc, bool hasAlpha)
 {
index 2cd5223..1067b96 100644 (file)
@@ -36,7 +36,6 @@
 
 
 namespace WebCore {
-using namespace std;
 
 #if PLATFORM(WIN)
 static cairo_t* createCairoContextWithHDC(HDC hdc, bool hasAlpha)
index 07cd533..4fab4cd 100644 (file)
@@ -49,8 +49,6 @@
 
 namespace WebCore {
 
-using namespace std;
-
 void Font::platformInit()
 {
     m_syntheticBoldOffset = m_platformData.syntheticBold() ? 1.0f : 0.f;
index ff37ac5..440a0a1 100644 (file)
@@ -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 @@ UniscribeController::UniscribeController(const FontCascade* font, const TextRun&
     : 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 @@ bool UniscribeController::shapeAndPlaceItem(const UChar* cp, unsigned i, const F
 
         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.
index c59e9f0..11684b8 100644 (file)
@@ -41,7 +41,6 @@
 
 namespace WebCore {
 using namespace icu;
-using namespace std;
 
 std::unique_ptr<Locale> Locale::create(const AtomicString& locale)
 {
index bfd6e44..15315ca 100644 (file)
@@ -44,7 +44,6 @@
 #include <wtf/text/win/WCharStringExtras.h>
 
 namespace WebCore {
-using namespace std;
 
 typedef HashMap<String, LCID, ASCIICaseInsensitiveHash> NameToLCIDMap;
 
index dee3313..a1d20e0 100644 (file)
@@ -63,7 +63,6 @@
 
 
 namespace WebCore {
-using namespace std;
 
 static HANDLE scrollbarTheme;
 static bool runningVista;
index b127660..5acd270 100644 (file)
@@ -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 @@ void RenderRubyRun::layoutBlock(bool relayoutChildren, LayoutUnit pageHeight)
         // 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;
index c9799d6..eeb9985 100644 (file)
@@ -160,7 +160,6 @@ static const unsigned vistaMenuListButtonOutset = 1;
 
 
 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 @@ void RenderThemeWin::adjustMenuListButtonStyle(StyleResolver& styleResolver, Ren
 
     // 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 @@ bool RenderThemeWin::paintSearchFieldCancelButton(const RenderBox& o, const Pain
     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 @@ void RenderThemeWin::adjustSearchFieldCancelButtonStyle(StyleResolver&, RenderSt
 {
     // 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 @@ void RenderThemeWin::adjustSearchFieldResultsDecorationPartStyle(StyleResolver&,
 {
     // 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 @@ bool RenderThemeWin::paintSearchFieldResultsDecorationPart(const RenderBox& o, c
     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 @@ void RenderThemeWin::adjustSearchFieldResultsButtonStyle(StyleResolver&, RenderS
 {
     // 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 @@ bool RenderThemeWin::paintSearchFieldResultsButton(const RenderBox& o, const Pai
     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.
index 7cb3b62..eb4eb9f 100644 (file)
@@ -1,3 +1,12 @@
+2018-12-24  Fujii Hironori  <Hironori.Fujii@sony.com>
+
+        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  <simon.fraser@apple.com>
 
         Change ScrollingNodeType to an enum class
index 3c0e850..4e5f871 100644 (file)
@@ -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.
index 733fd9b..6f70827 100644 (file)
@@ -1,3 +1,22 @@
+2018-12-24  Fujii Hironori  <Hironori.Fujii@sony.com>
+
+        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  <yusukesuzuki@slowstart.org>
 
         Use Ref<> as much as possible
index 994dcab..ca50200 100644 (file)
@@ -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 @@ void HUDSlider::drag(const IntPoint& point, bool start)
             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)
index 45e4a57..04b6fea 100644 (file)
@@ -123,7 +123,6 @@ extern "C" {
 
 using namespace WebCore;
 using namespace HTMLNames;
-using namespace std;
 
 using JSC::JSGlobalObject;
 using JSC::JSLock;
@@ -1574,7 +1573,7 @@ void WebFrame::drawHeader(PlatformGraphicsContext* pctx, IWebUIDelegate* ui, con
 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 @@ void WebFrame::drawFooter(PlatformGraphicsContext* pctx, IWebUIDelegate* ui, con
     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);
index 023384c..ff9da24 100644 (file)
@@ -52,7 +52,6 @@
 #endif
 
 using namespace WebCore;
-using namespace std;
 
 static bool areEqualOrClose(double d1, double d2)
 {
index f187222..2f1f2f4 100644 (file)
@@ -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 @@ CAD3DRenderer::RenderResult CAD3DRenderer::renderAndPresent(const CGRect& bounds
     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 @@ CAD3DRenderer::RenderResult CAD3DRenderer::renderToImage(const CGRect& bounds, I
     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 @@ CAD3DRenderer::RenderResult CAD3DRenderer::renderInternal(const CGRect& bounds,
     ASSERT(m_d3dDevice);
     ASSERT(m_renderOGLContext);
 
-    nextRenderTime = numeric_limits<CFTimeInterval>::infinity();
+    nextRenderTime = std::numeric_limits<CFTimeInterval>::infinity();
 
     if (m_deviceIsLost)
         return DeviceIsLost;
index f9ab83b..68febd1 100644 (file)
@@ -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 @@ void CAView::update(CWindow window, const CGRect& bounds)
             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 @@ void CAView::update(CWindow window, const CGRect& bounds)
                 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 @@ void CAView::drawToWindowInternal()
     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 @@ RefPtr<Image> CAView::drawToImage(CGPoint& imageOrigin, CFTimeInterval& nextDraw
     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 @@ void CAView::scheduleNextDraw(CFTimeInterval mediaTime)
 
     // 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;
index fbc04de..08a7b2c 100644 (file)
@@ -228,7 +228,6 @@ SOFT_LINK_OPTIONAL(Uxtheme, EndPanningFeedback, BOOL, WINAPI, (HWND, BOOL));
 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 @@ HRESULT PreferencesChangedOrRemovedObserver::notifyPreferencesChanged(WebCacheMo
         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 @@ HRESULT PreferencesChangedOrRemovedObserver::notifyPreferencesRemoved(WebCacheMo
         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 @@ void WebView::setCacheModel(WebCacheModel cacheModel)
 
         // 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 @@ void WebView::setCacheModel(WebCacheModel cacheModel)
 
 #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 @@ WebCacheModel WebView::maxCacheModelInAnyInstance()
         if (FAILED(pref->cacheModel(&prefCacheModel)))
             continue;
 
-        cacheModel = max(cacheModel, prefCacheModel);
+        cacheModel = std::max(cacheModel, prefCacheModel);
     }
 
     return cacheModel;