Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(194)

Unified Diff: Source/platform/fonts/WidthIterator.cpp

Issue 516953003: Removing "using" declarations that import names in the C++ Standard library.(Source/platform/[fonts… (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/platform/fonts/WidthIterator.cpp
diff --git a/Source/platform/fonts/WidthIterator.cpp b/Source/platform/fonts/WidthIterator.cpp
index 5cb81ba59f9bc2fab53f53ab1c3c9a5367b49cb4..3f797c403a51cfdf2d10663dc62d07ad4cdbef74 100644
--- a/Source/platform/fonts/WidthIterator.cpp
+++ b/Source/platform/fonts/WidthIterator.cpp
@@ -34,7 +34,6 @@
using namespace WTF;
using namespace Unicode;
-using namespace std;
namespace blink {
@@ -45,8 +44,8 @@ WidthIterator::WidthIterator(const Font* font, const TextRun& run, HashSet<const
, m_runWidthSoFar(0)
, m_isAfterExpansion(!run.allowsLeadingExpansion())
, m_fallbackFonts(fallbackFonts)
- , m_maxGlyphBoundingBoxY(numeric_limits<float>::min())
- , m_minGlyphBoundingBoxY(numeric_limits<float>::max())
+ , m_maxGlyphBoundingBoxY(std::numeric_limits<float>::min())
+ , m_minGlyphBoundingBoxY(std::numeric_limits<float>::max())
, m_firstGlyphOverflow(0)
, m_lastGlyphOverflow(0)
, m_accountForGlyphBounds(accountForGlyphBounds)
@@ -179,10 +178,10 @@ void WidthIterator::updateGlyphBounds(const GlyphData& glyphData, float width, b
FloatRect bounds = glyphData.fontData->boundsForGlyph(glyphData.glyph);
if (firstCharacter)
- m_firstGlyphOverflow = max<float>(0, -bounds.x());
- m_lastGlyphOverflow = max<float>(0, bounds.maxX() - width);
- m_maxGlyphBoundingBoxY = max(m_maxGlyphBoundingBoxY, bounds.maxY());
- m_minGlyphBoundingBoxY = min(m_minGlyphBoundingBoxY, bounds.y());
+ m_firstGlyphOverflow = std::max<float>(0, -bounds.x());
+ m_lastGlyphOverflow = std::max<float>(0, bounds.maxX() - width);
+ m_maxGlyphBoundingBoxY = std::max(m_maxGlyphBoundingBoxY, bounds.maxY());
+ m_minGlyphBoundingBoxY = std::min(m_minGlyphBoundingBoxY, bounds.y());
}
template <typename TextIterator>

Powered by Google App Engine
This is Rietveld 408576698