WebKit Bugzilla
Attachment 357928 Details for
Bug 192973
: Remove "using namespace std;"
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-192973-20181221155613.patch (text/plain), 31.93 KB, created by
Fujii Hironori
on 2018-12-20 22:56:15 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Fujii Hironori
Created:
2018-12-20 22:56:15 PST
Size:
31.93 KB
patch
obsolete
>Subversion Revision: 239495 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 1675be7bfc8d1cb0d3cd0de663f6da41129ba0d8..8037a02ebcdd111db5d0e19124875bcdeaf3104d 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,43 @@ >+2018-12-20 Fujii Hironori <Hironori.Fujii@sony.com> >+ >+ Remove "using namespace std;" >+ https://bugs.webkit.org/show_bug.cgi?id=192973 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ 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-20 Justin Fan <justin_fan@apple.com> > > [WebGPU] Convert WebGPUBindGroups into MTLArgumentEncoders >diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index 5c3ec33f3f7635b3164e62b8c7d99388f76e1e16..963ae124d60987baff45d808f95e72b9cc9e4008 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,12 @@ >+2018-12-20 Fujii Hironori <Hironori.Fujii@sony.com> >+ >+ Remove "using namespace std;" >+ https://bugs.webkit.org/show_bug.cgi?id=192973 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * Platform/IPC/win/ConnectionWin.cpp: >+ > 2018-12-20 Alex Christensen <achristensen@webkit.org> > > Remove unused NetworkProcessCreationParameters >diff --git a/Source/WebKitLegacy/win/ChangeLog b/Source/WebKitLegacy/win/ChangeLog >index ba434500cafc61ef51e984f562b926a0fea6e0e7..932d3114d815660b2f44d042590df158af24694d 100644 >--- a/Source/WebKitLegacy/win/ChangeLog >+++ b/Source/WebKitLegacy/win/ChangeLog >@@ -1,3 +1,22 @@ >+2018-12-20 Fujii Hironori <Hironori.Fujii@sony.com> >+ >+ Remove "using namespace std;" >+ https://bugs.webkit.org/show_bug.cgi?id=192973 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * 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 Chris Dumez <cdumez@apple.com> > > Use Optional::valueOr() instead of Optional::value_or() >diff --git a/Source/WebCore/accessibility/win/AXObjectCacheWin.cpp b/Source/WebCore/accessibility/win/AXObjectCacheWin.cpp >index 59ff6b0bf85810363f2b632c5ba60e763daca924..97dc8da760061be62955ff2b9718cb8971abb857 100644 >--- a/Source/WebCore/accessibility/win/AXObjectCacheWin.cpp >+++ b/Source/WebCore/accessibility/win/AXObjectCacheWin.cpp >@@ -40,7 +40,6 @@ > > > namespace WebCore { >-using namespace std; > > void AXObjectCache::detachWrapper(AccessibilityObject* obj, AccessibilityDetachmentType) > { >diff --git a/Source/WebCore/platform/graphics/GraphicsContext3DPrivate.cpp b/Source/WebCore/platform/graphics/GraphicsContext3DPrivate.cpp >index d1286db1773438904939dcc62a62b0cb00bca9a1..91300440cded49e1ddd50bc49ec78dd658dd6a0e 100644 >--- a/Source/WebCore/platform/graphics/GraphicsContext3DPrivate.cpp >+++ b/Source/WebCore/platform/graphics/GraphicsContext3DPrivate.cpp >@@ -37,7 +37,6 @@ > > > namespace WebCore { >-using namespace std; > > GraphicsContext3DPrivate::GraphicsContext3DPrivate(GraphicsContext3D*, GraphicsContext3D::RenderStyle renderStyle) > { >diff --git a/Source/WebCore/platform/graphics/cairo/ImageBufferCairo.cpp b/Source/WebCore/platform/graphics/cairo/ImageBufferCairo.cpp >index 9107c0ee55a3ee9f5eef0e0078cd95111697d1d3..8b35b826549f3f761c62c3bedb581c10fd3a7b3f 100644 >--- a/Source/WebCore/platform/graphics/cairo/ImageBufferCairo.cpp >+++ b/Source/WebCore/platform/graphics/cairo/ImageBufferCairo.cpp >@@ -77,7 +77,6 @@ > > > namespace WebCore { >-using namespace std; > > ImageBufferData::ImageBufferData(const IntSize& size, RenderingMode renderingMode) > : m_platformContext(0) >diff --git a/Source/WebCore/platform/graphics/win/FontPlatformDataCairoWin.cpp b/Source/WebCore/platform/graphics/win/FontPlatformDataCairoWin.cpp >index a4888116fdef93d85b09fb1706b3d77834f0783c..a1db52ee1c6b4d3fe10be1f1e72d150d5aba9bcb 100644 >--- a/Source/WebCore/platform/graphics/win/FontPlatformDataCairoWin.cpp >+++ b/Source/WebCore/platform/graphics/win/FontPlatformDataCairoWin.cpp >@@ -36,7 +36,6 @@ > > > namespace WebCore { >-using namespace std; > > void FontPlatformData::platformDataInit(HFONT font, float size, HDC hdc, WCHAR* faceName) > { >diff --git a/Source/WebCore/platform/graphics/win/FontWin.cpp b/Source/WebCore/platform/graphics/win/FontWin.cpp >index b7b4708476bf6729df81a01f4ac43bbc38dbd2c7..2d4f495d4f65afa512061a97768060e3d35e0c61 100644 >--- a/Source/WebCore/platform/graphics/win/FontWin.cpp >+++ b/Source/WebCore/platform/graphics/win/FontWin.cpp >@@ -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(); > } >diff --git a/Source/WebCore/platform/graphics/win/GraphicsContextCGWin.cpp b/Source/WebCore/platform/graphics/win/GraphicsContextCGWin.cpp >index 3974747609656923ac47bf2147bde3dcd69b8a41..08bcf8aa541783891be8938791eeeb3d6f974c77 100644 >--- a/Source/WebCore/platform/graphics/win/GraphicsContextCGWin.cpp >+++ b/Source/WebCore/platform/graphics/win/GraphicsContextCGWin.cpp >@@ -38,7 +38,6 @@ > > > namespace WebCore { >-using namespace std; > > static CGContextRef CGContextWithHDC(HDC hdc, bool hasAlpha) > { >diff --git a/Source/WebCore/platform/graphics/win/GraphicsContextCairoWin.cpp b/Source/WebCore/platform/graphics/win/GraphicsContextCairoWin.cpp >index 2cd522362f8e7a09fcc15e5959b63ccb2b797a4f..1067b96093db2ed591a21a31d9d0256dc1293e89 100644 >--- a/Source/WebCore/platform/graphics/win/GraphicsContextCairoWin.cpp >+++ b/Source/WebCore/platform/graphics/win/GraphicsContextCairoWin.cpp >@@ -36,7 +36,6 @@ > > > namespace WebCore { >-using namespace std; > > #if PLATFORM(WIN) > static cairo_t* createCairoContextWithHDC(HDC hdc, bool hasAlpha) >diff --git a/Source/WebCore/platform/graphics/win/GraphicsContextDirect2D.cpp b/Source/WebCore/platform/graphics/win/GraphicsContextDirect2D.cpp >index eaf3d25cfbff2fcfbc01eddf155567e23cf87a03..fbe753f419cfa6d063c540899b404a63407f92fb 100644 >--- a/Source/WebCore/platform/graphics/win/GraphicsContextDirect2D.cpp >+++ b/Source/WebCore/platform/graphics/win/GraphicsContextDirect2D.cpp >@@ -42,7 +42,6 @@ > > > namespace WebCore { >-using namespace std; > > GraphicsContext::GraphicsContext(HDC hdc, bool hasAlpha) > { >diff --git a/Source/WebCore/platform/graphics/win/GraphicsContextWin.cpp b/Source/WebCore/platform/graphics/win/GraphicsContextWin.cpp >index 75039e381540c1d4be14b3742a6b406eb39a25f8..5bde4cedf516a9179a6d3d3b3e33d134ed5ab511 100644 >--- a/Source/WebCore/platform/graphics/win/GraphicsContextWin.cpp >+++ b/Source/WebCore/platform/graphics/win/GraphicsContextWin.cpp >@@ -44,7 +44,6 @@ > > > namespace WebCore { >-using namespace std; > > static void fillWithClearColor(HBITMAP bitmap) > { >diff --git a/Source/WebCore/platform/graphics/win/SimpleFontDataCGWin.cpp b/Source/WebCore/platform/graphics/win/SimpleFontDataCGWin.cpp >index 07cd5331e67488c020ad220d7e035fc328b64d21..4fab4cdcfd038bf4d7ad40a3085439ec8d3ba4b2 100644 >--- a/Source/WebCore/platform/graphics/win/SimpleFontDataCGWin.cpp >+++ b/Source/WebCore/platform/graphics/win/SimpleFontDataCGWin.cpp >@@ -49,8 +49,6 @@ > > namespace WebCore { > >-using namespace std; >- > void Font::platformInit() > { > m_syntheticBoldOffset = m_platformData.syntheticBold() ? 1.0f : 0.f; >diff --git a/Source/WebCore/platform/graphics/win/UniscribeController.cpp b/Source/WebCore/platform/graphics/win/UniscribeController.cpp >index ff37ac56ec16825e65635ca09d0b7a03180df8a4..440a0a1e1cdd211044802417f2d9f1c3c9d38aec 100644 >--- a/Source/WebCore/platform/graphics/win/UniscribeController.cpp >+++ b/Source/WebCore/platform/graphics/win/UniscribeController.cpp >@@ -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. >diff --git a/Source/WebCore/platform/image-decoders/ScalableImageDecoder.cpp b/Source/WebCore/platform/image-decoders/ScalableImageDecoder.cpp >index 43ff503c1e5650f9a266394dc3556129393bcc4f..eba349a7cb4e84facb1ec63367d9cedc3c97a3b8 100644 >--- a/Source/WebCore/platform/image-decoders/ScalableImageDecoder.cpp >+++ b/Source/WebCore/platform/image-decoders/ScalableImageDecoder.cpp >@@ -38,7 +38,6 @@ > > > namespace WebCore { >-using namespace std; > > namespace { > >diff --git a/Source/WebCore/platform/text/LocaleICU.cpp b/Source/WebCore/platform/text/LocaleICU.cpp >index c59e9f0fa5dc59b431d8781d68014ea7a570db98..11684b8066c9eb509b4add4618b7388fb55ac1e5 100644 >--- a/Source/WebCore/platform/text/LocaleICU.cpp >+++ b/Source/WebCore/platform/text/LocaleICU.cpp >@@ -41,7 +41,6 @@ > > namespace WebCore { > using namespace icu; >-using namespace std; > > std::unique_ptr<Locale> Locale::create(const AtomicString& locale) > { >diff --git a/Source/WebCore/platform/text/win/LocaleWin.cpp b/Source/WebCore/platform/text/win/LocaleWin.cpp >index bfd6e44ebdde70619c8f944336631ffc502041f8..15315ca735ff2e7ab435171e6c1bde603732cbde 100644 >--- a/Source/WebCore/platform/text/win/LocaleWin.cpp >+++ b/Source/WebCore/platform/text/win/LocaleWin.cpp >@@ -44,7 +44,6 @@ > #include <wtf/text/win/WCharStringExtras.h> > > namespace WebCore { >-using namespace std; > > typedef HashMap<String, LCID, ASCIICaseInsensitiveHash> NameToLCIDMap; > >diff --git a/Source/WebCore/platform/win/ScrollbarThemeWin.cpp b/Source/WebCore/platform/win/ScrollbarThemeWin.cpp >index dee3313d69a68b2e20072aa6e4368a0e90621f3b..a1d20e014be7cc7899a55066d6279c68bbf091e5 100644 >--- a/Source/WebCore/platform/win/ScrollbarThemeWin.cpp >+++ b/Source/WebCore/platform/win/ScrollbarThemeWin.cpp >@@ -63,7 +63,6 @@ > > > namespace WebCore { >-using namespace std; > > static HANDLE scrollbarTheme; > static bool runningVista; >diff --git a/Source/WebCore/rendering/RenderRubyRun.cpp b/Source/WebCore/rendering/RenderRubyRun.cpp >index b1276608f31305e0870b3a4b7a24573479dd6f36..5acd2703d1718f061e7d6f1d1020ff2025bd16a3 100644 >--- a/Source/WebCore/rendering/RenderRubyRun.cpp >+++ b/Source/WebCore/rendering/RenderRubyRun.cpp >@@ -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; >diff --git a/Source/WebCore/rendering/RenderThemeWin.cpp b/Source/WebCore/rendering/RenderThemeWin.cpp >index c9799d69d9ff03b99dae07ed6cef7d07f24f1d3f..eeb9985e62f5c9a348243e8dde9eccc0a9bdbfb5 100644 >--- a/Source/WebCore/rendering/RenderThemeWin.cpp >+++ b/Source/WebCore/rendering/RenderThemeWin.cpp >@@ -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. >diff --git a/Source/WebKit/Platform/IPC/win/ConnectionWin.cpp b/Source/WebKit/Platform/IPC/win/ConnectionWin.cpp >index 3c0e850e114b8e96cdde548129ad4de8551e1b4e..4e5f8712ad0dacf9f2cf113b2d02f70399f89b4e 100644 >--- a/Source/WebKit/Platform/IPC/win/ConnectionWin.cpp >+++ b/Source/WebKit/Platform/IPC/win/ConnectionWin.cpp >@@ -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. >diff --git a/Source/WebKitLegacy/win/FullscreenVideoController.cpp b/Source/WebKitLegacy/win/FullscreenVideoController.cpp >index 994dcab0de1d5fc9dfc1ff4f06cceda02c4327a2..ca5020002926a6685d8269fb0acca0ddeec36429 100644 >--- a/Source/WebKitLegacy/win/FullscreenVideoController.cpp >+++ b/Source/WebKitLegacy/win/FullscreenVideoController.cpp >@@ -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) >diff --git a/Source/WebKitLegacy/win/WebFrame.cpp b/Source/WebKitLegacy/win/WebFrame.cpp >index c03242c7d6b62d8fc635d9a0d7bd6e5d7c259fed..fda2f192b208f98b125b61e1b393858e5559a7a4 100644 >--- a/Source/WebKitLegacy/win/WebFrame.cpp >+++ b/Source/WebKitLegacy/win/WebFrame.cpp >@@ -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); >diff --git a/Source/WebKitLegacy/win/WebHistory.cpp b/Source/WebKitLegacy/win/WebHistory.cpp >index 023384ce96f10949cdd59f774a8145ebbea7b7a5..ff9da24c1fc8c41bc0b3b70b8d3d9256dd4c6327 100644 >--- a/Source/WebKitLegacy/win/WebHistory.cpp >+++ b/Source/WebKitLegacy/win/WebHistory.cpp >@@ -52,7 +52,6 @@ > #endif > > using namespace WebCore; >-using namespace std; > > static bool areEqualOrClose(double d1, double d2) > { >diff --git a/Source/WebKitLegacy/win/WebKitQuartzCoreAdditions/CAD3DRenderer.cpp b/Source/WebKitLegacy/win/WebKitQuartzCoreAdditions/CAD3DRenderer.cpp >index f18722297257fa2e362d2f255b6a568dad610e7f..2f1f2f4807eb9c4fe70835db78e34a34bcff36d0 100644 >--- a/Source/WebKitLegacy/win/WebKitQuartzCoreAdditions/CAD3DRenderer.cpp >+++ b/Source/WebKitLegacy/win/WebKitQuartzCoreAdditions/CAD3DRenderer.cpp >@@ -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; >diff --git a/Source/WebKitLegacy/win/WebKitQuartzCoreAdditions/CAView.cpp b/Source/WebKitLegacy/win/WebKitQuartzCoreAdditions/CAView.cpp >index 94077912a99164117d0c681cccc06686e04c4de0..530084b556ae83f1b55fc28c02dee4f608fd87e5 100644 >--- a/Source/WebKitLegacy/win/WebKitQuartzCoreAdditions/CAView.cpp >+++ b/Source/WebKitLegacy/win/WebKitQuartzCoreAdditions/CAView.cpp >@@ -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; >diff --git a/Source/WebKitLegacy/win/WebView.cpp b/Source/WebKitLegacy/win/WebView.cpp >index e8bddebf2626f5ccad8d4aced5733e72722aeeb7..a4f014bfc78dc27a36158167b1e817cbfb55f7bf 100644 >--- a/Source/WebKitLegacy/win/WebView.cpp >+++ b/Source/WebKitLegacy/win/WebView.cpp >@@ -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;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 192973
:
357924
| 357928