Remove all 'std' using directives from WebCore
authorandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 10 Nov 2013 19:32:33 +0000 (19:32 +0000)
committerandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 10 Nov 2013 19:32:33 +0000 (19:32 +0000)
https://bugs.webkit.org/show_bug.cgi?id=124125

Reviewed by Sam Weinig.

As per the coding style guidelines.

* loader/CrossOriginPreflightResultCache.cpp:
(WebCore::CrossOriginPreflightResultCache::appendEntry):
(WebCore::CrossOriginPreflightResultCache::canSkipPreflight):
* loader/WorkerThreadableLoader.cpp:
* loader/appcache/ApplicationCacheStorage.cpp:
(WebCore::ApplicationCacheStorage::loadCache):
* loader/appcache/ManifestParser.cpp:
(WebCore::parseManifest):
* loader/cache/MemoryCache.cpp:
(WebCore::MemoryCache::deadCapacity):
(WebCore::MemoryCache::lruListFor):
* page/CaptionUserPreferencesMediaAF.cpp:
* page/Chrome.cpp:
* page/DOMTimer.cpp:
(WebCore::DOMTimer::intervalClampedToMinimum):
* page/FocusController.cpp:
* page/Frame.cpp:
(WebCore::Frame::resizePageRectsKeepingRatio):
* page/PageGroupLoadDeferrer.cpp:
* page/Settings.cpp:
* page/animation/AnimationBase.cpp:
(WebCore::solveStepsFunction):
(WebCore::AnimationBase::fireAnimationEventsIfNeeded):
(WebCore::AnimationBase::timeToNextService):
(WebCore::AnimationBase::fractionalTime):
(WebCore::AnimationBase::getTimeToNextEvent):
* page/animation/KeyframeAnimation.cpp:
(WebCore::KeyframeAnimation::fetchIntervalEndpointsForProperty):
* platform/DateComponents.cpp:
* platform/ScrollAnimator.cpp:
(WebCore::ScrollAnimator::handleWheelEvent):
* platform/ScrollView.cpp:
(WebCore::ScrollView::unscaledVisibleContentSize):
(WebCore::ScrollView::setScrollOffset):
(WebCore::ScrollView::updateScrollbars):
(WebCore::ScrollView::scrollContents):
* platform/Scrollbar.cpp:
(WebCore::Scrollbar::moveThumb):
* platform/ScrollbarThemeComposite.cpp:
(WebCore::usedTotalSize):
(WebCore::ScrollbarThemeComposite::thumbPosition):
(WebCore::ScrollbarThemeComposite::thumbLength):
* platform/SharedBuffer.cpp:
(WebCore::SharedBuffer::append):
(WebCore::SharedBuffer::copyBufferAndClear):
(WebCore::SharedBuffer::getSomeData):
* platform/ThreadTimers.cpp:
(WebCore::ThreadTimers::updateSharedTimer):
* platform/Timer.cpp:
(WebCore::TimerHeapLessThanFunction::operator()):
(WebCore::TimerBase::heapPop):
(WebCore::TimerBase::nextUnalignedFireInterval):
* platform/URL.cpp:
(WebCore::findHostnamesInMailToURL):
(WebCore::portAllowed):
* platform/audio/AudioResampler.cpp:
(WebCore::AudioResampler::setRate):
* platform/audio/AudioResamplerKernel.cpp:
(WebCore::AudioResamplerKernel::process):
* platform/audio/Distance.cpp:
(WebCore::DistanceEffect::gain):
* platform/audio/DynamicsCompressorKernel.cpp:
(WebCore::DynamicsCompressorKernel::process):
* platform/audio/EqualPowerPanner.cpp:
(WebCore::EqualPowerPanner::pan):
* platform/audio/HRTFDatabase.cpp:
(WebCore::HRTFDatabase::indexFromElevationAngle):
* platform/audio/HRTFElevation.cpp:
(WebCore::HRTFElevation::createForSubject):
* platform/audio/HRTFKernel.cpp:
(WebCore::HRTFKernel::HRTFKernel):
(WebCore::HRTFKernel::createInterpolatedKernel):
* platform/audio/HRTFPanner.cpp:
(WebCore::HRTFPanner::calculateDesiredAzimuthIndexAndBlend):
* platform/audio/Reverb.cpp:
* platform/audio/SincResampler.cpp:
(WebCore::SincResampler::process):
* platform/cf/URLCF.cpp:
* platform/graphics/Color.cpp:
(WebCore::makeRGB):
(WebCore::makeRGBA):
(WebCore::colorFloatToRGBAByte):
(WebCore::Color::light):
(WebCore::Color::dark):
* platform/graphics/CrossfadeGeneratedImage.cpp:
* platform/graphics/FloatQuad.cpp:
(WebCore::min4):
(WebCore::max4):
(WebCore::withinEpsilon):
* platform/graphics/FloatSize.cpp:
(WebCore::FloatSize::isZero):
* platform/graphics/FontFastPath.cpp:
(WebCore::Font::floatWidthForSimpleText):
* platform/graphics/FontPlatformData.cpp:
* platform/graphics/GraphicsContext.cpp:
* platform/graphics/RoundedRect.cpp:
(WebCore::RoundedRect::Radii::expand):
* platform/graphics/ShadowBlur.cpp:
(WebCore::calculateLobes):
(WebCore::computeSliceSizesFromRadii):
* platform/graphics/SimpleFontData.cpp:
(WebCore::SimpleFontData::initCharWidths):
* platform/graphics/WidthIterator.cpp:
(WebCore::WidthIterator::WidthIterator):
(WebCore::WidthIterator::advanceInternal):
* platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
(WebCore::InbandTextTrackPrivateAVF::processCue):
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
* platform/graphics/avfoundation/objc/InbandTextTrackPrivateAVFObjC.mm:
* platform/graphics/avfoundation/objc/InbandTextTrackPrivateLegacyAVFObjC.mm:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::platformDuration):
(WebCore::MediaPlayerPrivateAVFoundationObjC::currentTime):
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::setOpacity):
(WebCore::GraphicsLayerCA::setNeedsDisplay):
(WebCore::GraphicsLayerCA::setupAnimation):
(WebCore::clampedContentsScaleForScale):
* platform/graphics/ca/mac/TileController.mm:
(WebCore::TileController::getTileIndexRangeForRect):
(WebCore::TileController::computeTileCoverageRect):
* platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::GraphicsContext::setPlatformShadow):
(WebCore::computeLineBoundsAndAntialiasingModeForText):
* platform/graphics/cg/ImageBufferCG.cpp:
* platform/graphics/cg/ImageBufferDataCG.cpp:
(WebCore::ImageBufferData::getData):
* platform/graphics/cg/ImageSourceCG.cpp:
* platform/graphics/filters/FEDropShadow.cpp:
* platform/graphics/filters/FEGaussianBlur.cpp:
(WebCore::boxBlur):
(WebCore::FEGaussianBlur::platformApplyGeneric):
(WebCore::FEGaussianBlur::calculateUnscaledKernelSize):
(WebCore::FEGaussianBlur::calculateStdDeviation):
* platform/graphics/gpu/Texture.cpp:
(WebCore::Texture::updateSubRect):
* platform/graphics/gpu/TilingData.cpp:
(WebCore::computeNumTiles):
(WebCore::TilingData::tileXIndexFromSrcCoord):
(WebCore::TilingData::tileYIndexFromSrcCoord):
* platform/graphics/mac/ComplexTextController.cpp:
(WebCore::ComplexTextController::ComplexTextController):
(WebCore::ComplexTextController::offsetForPosition):
(WebCore::ComplexTextController::advance):
(WebCore::ComplexTextController::adjustGlyphsAndAdvances):
* platform/graphics/mac/FontComplexTextMac.cpp:
(WebCore::Font::floatWidthForComplexText):
* platform/graphics/mac/FontMac.mm:
* platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
(WebCore::MediaPlayerPrivateQTKit::duration):
* platform/graphics/mac/SimpleFontDataMac.mm:
* platform/graphics/transforms/Matrix3DTransformOperation.cpp:
* platform/graphics/transforms/MatrixTransformOperation.cpp:
* platform/graphics/transforms/PerspectiveTransformOperation.cpp:
* platform/graphics/transforms/RotateTransformOperation.cpp:
* platform/graphics/transforms/TransformOperations.cpp:
(WebCore::TransformOperations::blendByMatchingOperations):
* platform/graphics/transforms/TransformationMatrix.cpp:
(WebCore::clampEdgeValue):
* platform/mac/ScrollAnimatorMac.mm:
(WebCore::ScrollAnimatorMac::adjustScrollPositionIfNecessary):
* platform/mac/ScrollViewMac.mm:
(WebCore::ScrollView::platformSetContentsSize):
(WebCore::ScrollView::platformSetScrollPosition):
* platform/mac/ScrollbarThemeMac.mm:
* platform/mac/ThemeMac.mm:
* platform/mac/WebVideoFullscreenHUDWindowController.mm:
(-[WebVideoFullscreenHUDWindowController incrementVolume]):
(timeToString):
* platform/network/HTTPHeaderMap.cpp:
(WebCore::HTTPHeaderMap::copyData):
* platform/network/ResourceRequestBase.cpp:
* platform/network/ResourceResponseBase.cpp:
(WebCore::ResourceResponseBase::parseCacheControlDirectives):
* platform/network/cf/ResourceResponseCFNet.cpp:
* platform/network/mac/ResourceResponseMac.mm:
(WebCore::ResourceResponse::initNSURLResponse):
* platform/text/TextBreakIteratorICU.cpp:
(WebCore::textClone):
(WebCore::textLatin1MoveInPrimaryContext):
(WebCore::textLatin1MoveInPriorContext):
(WebCore::textInChunkOrOutOfRange):
(WebCore::textOpenLatin1):
(WebCore::textUTF16MoveInPrimaryContext):
(WebCore::textUTF16MoveInPriorContext):
(WebCore::textOpenUTF16):
* platform/text/TextCodecUTF16.cpp:
(WebCore::TextCodecUTF16::encode):
* platform/text/TextCodecUTF8.cpp:
(WebCore::TextCodecUTF8::encode):
* platform/text/TextStream.cpp:
* platform/text/mac/LocaleMac.mm:
* platform/text/mac/TextCodecMac.cpp:
(WebCore::TextCodecMac::decode):
* rendering/AutoTableLayout.cpp:
(WebCore::AutoTableLayout::recalcColumn):
(WebCore::AutoTableLayout::computeIntrinsicLogicalWidths):
(WebCore::AutoTableLayout::applyPreferredLogicalWidthQuirks):
(WebCore::AutoTableLayout::calcEffectiveLogicalWidth):
(WebCore::AutoTableLayout::layout):
* rendering/FixedTableLayout.cpp:
(WebCore::FixedTableLayout::applyPreferredLogicalWidthQuirks):
* rendering/FloatingObjects.cpp:
(WebCore::FindNextFloatLogicalBottomAdapter::collectIfNeeded):
(WebCore::FloatingObjects::logicalRightOffsetForPositioningFloat):
(WebCore::FloatingObjects::logicalRightOffset):
* rendering/InlineBox.cpp:
* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::placeBoxRangeInInlineDirection):
(WebCore::InlineFlowBox::adjustMaxAscentAndDescent):
(WebCore::InlineFlowBox::placeBoxesInBlockDirection):
(WebCore::InlineFlowBox::computeMaxLogicalTop):
(WebCore::InlineFlowBox::addBoxShadowVisualOverflow):
(WebCore::InlineFlowBox::addBorderOutsetVisualOverflow):
(WebCore::InlineFlowBox::addTextBoxVisualOverflow):
(WebCore::InlineFlowBox::nodeAtPoint):
(WebCore::InlineFlowBox::constrainToLineTopAndBottomIfNeeded):
(WebCore::InlineFlowBox::computeOverAnnotationAdjustment):
(WebCore::InlineFlowBox::computeUnderAnnotationAdjustment):
(WebCore::InlineFlowBox::collectLeafBoxesInLogicalOrder):
* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::isSelected):
(WebCore::InlineTextBox::localSelectionRect):
(WebCore::InlineTextBox::placeEllipsisBox):
(WebCore::InlineTextBox::applyShadowToGraphicsContext):
(WebCore::InlineTextBox::paint):
(WebCore::InlineTextBox::selectionStartEnd):
(WebCore::InlineTextBox::paintSelection):
(WebCore::InlineTextBox::paintCompositionBackground):
(WebCore::computeUnderlineOffset):
(WebCore::InlineTextBox::paintDecoration):
(WebCore::InlineTextBox::paintDocumentMarker):
(WebCore::InlineTextBox::paintTextMatchMarker):
(WebCore::InlineTextBox::computeRectForReplacementMarker):
(WebCore::InlineTextBox::paintCompositionUnderline):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::computeOverflow):
(WebCore::RenderBlock::computeStartPositionDeltaForChildAvoidingFloats):
(WebCore::RenderBlock::paintChild):
(WebCore::RenderBlock::blockSelectionGap):
(WebCore::RenderBlock::logicalLeftSelectionGap):
(WebCore::RenderBlock::logicalRightSelectionGap):
(WebCore::RenderBlock::calcColumnWidth):
(WebCore::RenderBlock::adjustRectForColumns):
(WebCore::RenderBlock::computeIntrinsicLogicalWidths):
(WebCore::RenderBlock::computePreferredLogicalWidths):
(WebCore::RenderBlock::adjustIntrinsicLogicalWidthsForColumns):
(WebCore::updatePreferredWidth):
(WebCore::RenderBlock::computeInlinePreferredLogicalWidths):
(WebCore::RenderBlock::computeBlockPreferredLogicalWidths):
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::clearFloats):
(WebCore::RenderBlockFlow::layoutBlock):
(WebCore::RenderBlockFlow::layoutBlockChild):
(WebCore::RenderBlockFlow::collapseMargins):
(WebCore::RenderBlockFlow::clearFloatsIfNeeded):
(WebCore::RenderBlockFlow::marginBeforeEstimateForChild):
(WebCore::RenderBlockFlow::estimateLogicalTopPosition):
(WebCore::RenderBlockFlow::setCollapsedBottomMargin):
(WebCore::RenderBlockFlow::handleAfterSideOfBlock):
(WebCore::calculateMinimumPageHeight):
(WebCore::RenderBlockFlow::adjustLinePositionForPagination):
(WebCore::RenderBlockFlow::removeFloatingObject):
(WebCore::RenderBlockFlow::computeLogicalLocationForFloat):
(WebCore::RenderBlockFlow::positionNewFloats):
(WebCore::RenderBlockFlow::lowestFloatLogicalBottom):
(WebCore::RenderBlockFlow::addOverhangingFloats):
(WebCore::RenderBlockFlow::getClearDelta):
(WebCore::RenderBlockFlow::adjustForBorderFit):
(WebCore::RenderBlockFlow::fitBorderToLinesIfNeeded):
(WebCore::RenderBlockFlow::updateLogicalHeight):
(WebCore::RenderBlockFlow::positionForPointWithInlineChildren):
(WebCore::RenderBlockFlow::addFocusRingRectsForInlineChildren):
(WebCore::RenderBlockFlow::relayoutForPagination):
* rendering/RenderBlockLineLayout.cpp:
(WebCore::updateLogicalWidthForLeftAlignedBlock):
(WebCore::updateLogicalWidthForRightAlignedBlock):
(WebCore::updateLogicalWidthForCenterAlignedBlock):
(WebCore::setLogicalWidthForTextRun):
(WebCore::RenderBlockFlow::computeInlineDirectionPositionsForLine):
(WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange):
(WebCore::RenderBlockFlow::layoutLineBoxes):
(WebCore::RenderBlockFlow::checkFloatsInCleanLine):
(WebCore::RenderBlockFlow::checkPaginationAndFloatsAtEndLine):
(WebCore::tryHyphenating):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::scrollWidth):
(WebCore::RenderBox::scrollHeight):
(WebCore::RenderBox::constrainLogicalWidthInRegionByMinMax):
(WebCore::RenderBox::constrainLogicalHeightByMinMax):
(WebCore::RenderBox::constrainContentBoxLogicalHeightByMinMax):
(WebCore::RenderBox::adjustBorderBoxLogicalWidthForBoxSizing):
(WebCore::RenderBox::adjustBorderBoxLogicalHeightForBoxSizing):
(WebCore::RenderBox::adjustContentBoxLogicalWidthForBoxSizing):
(WebCore::RenderBox::adjustContentBoxLogicalHeightForBoxSizing):
(WebCore::RenderBox::repaintLayerRectsForImage):
(WebCore::RenderBox::shrinkLogicalWidthToAvoidFloats):
(WebCore::RenderBox::containingBlockLogicalWidthForContentInRegion):
(WebCore::RenderBox::containingBlockAvailableLineWidthInRegion):
(WebCore::RenderBox::perpendicularContainingBlockLogicalHeight):
(WebCore::RenderBox::computeLogicalWidthInRegion):
(WebCore::RenderBox::computeIntrinsicLogicalWidthUsing):
(WebCore::RenderBox::computeLogicalWidthInRegionUsing):
(WebCore::RenderBox::computeInlineDirectionMargins):
(WebCore::RenderBox::computeLogicalHeight):
(WebCore::RenderBox::computePercentageLogicalHeight):
(WebCore::RenderBox::computeReplacedLogicalWidthRespectingMinMaxWidth):
(WebCore::RenderBox::computeReplacedLogicalHeightRespectingMinMaxHeight):
(WebCore::RenderBox::computeReplacedLogicalHeightUsing):
(WebCore::RenderBox::containingBlockLogicalWidthForPositioned):
(WebCore::RenderBox::computePositionedLogicalWidthUsing):
(WebCore::RenderBox::computePositionedLogicalHeightUsing):
(WebCore::RenderBox::applyVisualEffectOverflow):
(WebCore::RenderBox::addLayoutOverflow):
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::calculateFillTileSize):
(WebCore::RenderBoxModelObject::BackgroundImageGeometry::setNoRepeatX):
(WebCore::RenderBoxModelObject::BackgroundImageGeometry::setNoRepeatY):
(WebCore::RenderBoxModelObject::BackgroundImageGeometry::useFixedAttachment):
(WebCore::RenderBoxModelObject::paintNinePieceImage):
(WebCore::RenderBoxModelObject::paintOneBorderSide):
(WebCore::calculateAdjustedInnerBorder):
(WebCore::RenderBoxModelObject::paintBoxShadow):
(WebCore::RenderBoxModelObject::localCaretRectForEmptyElement):
* rendering/RenderDeprecatedFlexibleBox.cpp:
(WebCore::FlexBoxIterator::next):
(WebCore::RenderDeprecatedFlexibleBox::computeIntrinsicLogicalWidths):
(WebCore::RenderDeprecatedFlexibleBox::computePreferredLogicalWidths):
(WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
(WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox):
(WebCore::RenderDeprecatedFlexibleBox::applyLineClamp):
(WebCore::RenderDeprecatedFlexibleBox::allowedChildFlex):
* rendering/RenderFileUploadControl.cpp:
(WebCore::RenderFileUploadControl::maxFilenameWidth):
(WebCore::RenderFileUploadControl::computeIntrinsicLogicalWidths):
(WebCore::RenderFileUploadControl::computePreferredLogicalWidths):
* rendering/RenderImage.cpp:
(WebCore::RenderImage::setImageSizeForAltText):
* rendering/RenderInline.cpp:
(WebCore::computeMargin):
(WebCore::RenderInline::linesVisualOverflowBoundingBox):
(WebCore::RenderInline::paintOutline):
(WebCore::RenderInline::paintOutlineForLine):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::clampScrollOffset):
(WebCore::RenderLayer::scrollRectToVisible):
(WebCore::RenderLayer::visibleContentRect):
(WebCore::RenderLayer::updateScrollbarsAfterLayout):
(WebCore::RenderLayer::hitTestOverflowControls):
(WebCore::RenderLayer::hitTestLayer):
(WebCore::RenderLayer::calculateLayerBounds):
* rendering/RenderLayerBacking.cpp:
* rendering/RenderLayerModelObject.cpp:
* rendering/RenderLineBoxList.cpp:
(WebCore::RenderLineBoxList::rangeIntersectsRect):
(WebCore::RenderLineBoxList::anyLineIntersectsRect):
(WebCore::RenderLineBoxList::lineIntersectsDirtyRect):
(WebCore::RenderLineBoxList::paint):
* rendering/RenderListBox.cpp:
(WebCore::RenderListBox::updateFromElement):
(WebCore::RenderListBox::layout):
(WebCore::RenderListBox::computePreferredLogicalWidths):
(WebCore::RenderListBox::size):
(WebCore::RenderListBox::numVisibleItems):
(WebCore::RenderListBox::panScroll):
(WebCore::RenderListBox::scrollHeight):
* rendering/RenderListItem.cpp:
* rendering/RenderListMarker.cpp:
* rendering/RenderMarquee.cpp:
(WebCore::RenderMarquee::marqueeSpeed):
(WebCore::RenderMarquee::computePosition):
(WebCore::RenderMarquee::timerFired):
* rendering/RenderMediaControls.cpp:
* rendering/RenderMenuList.cpp:
(WebCore::RenderMenuList::updateOptionsWidth):
(WebCore::RenderMenuList::computeIntrinsicLogicalWidths):
(WebCore::RenderMenuList::computePreferredLogicalWidths):
* rendering/RenderMeter.cpp:
* rendering/RenderMultiColumnBlock.cpp:
* rendering/RenderMultiColumnSet.cpp:
(WebCore::RenderMultiColumnSet::heightAdjustedForSetOffset):
(WebCore::RenderMultiColumnSet::calculateBalancedHeight):
(WebCore::RenderMultiColumnSet::updateLogicalWidth):
* rendering/RenderNamedFlowFragment.cpp:
* rendering/RenderObject.cpp:
(WebCore::RenderObject::drawLineForBoxSide):
(WebCore::RenderObject::repaintAfterLayoutIfNeeded):
(WebCore::RenderObject::caretMaxOffset):
* rendering/RenderProgress.cpp:
* rendering/RenderRegion.cpp:
(WebCore::RenderRegion::overflowRectForFlowThreadPortion):
* rendering/RenderReplaced.cpp:
(WebCore::RenderReplaced::shouldPaint):
(WebCore::RenderReplaced::computeReplacedLogicalWidth):
(WebCore::RenderReplaced::computePreferredLogicalWidths):
* rendering/RenderRubyBase.cpp:
* rendering/RenderRubyRun.cpp:
(WebCore::RenderRubyRun::getOverhang):
* rendering/RenderRubyText.cpp:
(WebCore::RenderRubyText::adjustInlineDirectionLineBounds):
* rendering/RenderScrollbarPart.cpp:
(WebCore::RenderScrollbarPart::computeScrollbarWidth):
(WebCore::RenderScrollbarPart::computeScrollbarHeight):
* rendering/RenderSearchField.cpp:
(WebCore::RenderSearchField::computeControlLogicalHeight):
* rendering/RenderTable.cpp:
(WebCore::RenderTable::updateLogicalWidth):
(WebCore::RenderTable::convertStyleLogicalHeightToComputedHeight):
(WebCore::RenderTable::layout):
(WebCore::RenderTable::computePreferredLogicalWidths):
(WebCore::RenderTable::calcBorderStart):
(WebCore::RenderTable::calcBorderEnd):
(WebCore::RenderTable::outerBorderBefore):
(WebCore::RenderTable::outerBorderAfter):
(WebCore::RenderTable::outerBorderStart):
(WebCore::RenderTable::outerBorderEnd):
* rendering/RenderTableCell.cpp:
(WebCore::RenderTableCell::parseColSpanFromDOM):
(WebCore::RenderTableCell::parseRowSpanFromDOM):
(WebCore::RenderTableCell::logicalWidthFromColumns):
(WebCore::RenderTableCell::computePreferredLogicalWidths):
(WebCore::RenderTableCell::layout):
(WebCore::RenderTableCell::setOverrideLogicalContentHeightFromRowHeight):
(WebCore::RenderTableCell::clippedOverflowRectForRepaint):
(WebCore::RenderTableCell::alignLeftRightBorderPaintRect):
(WebCore::RenderTableCell::alignTopBottomBorderPaintRect):
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::ensureRows):
(WebCore::RenderTableSection::calcRowLogicalHeight):
(WebCore::RenderTableSection::distributeExtraLogicalHeightToPercentRows):
(WebCore::RenderTableSection::layoutRows):
(WebCore::RenderTableSection::firstLineBaseline):
(WebCore::RenderTableSection::removeCachedCollapsedBorders):
(WebCore::RenderTableSection::setCachedCollapsedBorder):
(WebCore::RenderTableSection::cachedCollapsedBorder):
* rendering/RenderText.cpp:
(WebCore::makeCapitalized):
(WebCore::RenderText::absoluteRectsForRange):
(WebCore::RenderText::absoluteQuadsForRange):
(WebCore::maxWordFragmentWidth):
(WebCore::RenderText::computePreferredLogicalWidths):
* rendering/RenderTextControl.cpp:
(WebCore::RenderTextControl::computePreferredLogicalWidths):
* rendering/RenderTextControlSingleLine.cpp:
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::paintProgressBar):
(WebCore::RenderThemeMac::paintMenuListButton):
* rendering/RenderWidget.cpp:
* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::alignBoxesInBlockDirection):
(WebCore::RootInlineBox::beforeAnnotationsAdjustment):
(WebCore::RootInlineBox::selectionTopAdjustedForPrecedingBlock):
(WebCore::RootInlineBox::blockDirectionPointInLine):
(WebCore::RootInlineBox::paddedLayoutOverflowRect):
(WebCore::setAscentAndDescent):
(WebCore::RootInlineBox::ascentAndDescentForBox):
* rendering/mathml/RenderMathMLRoot.cpp:
(WebCore::RenderMathMLRoot::layout):
* rendering/style/RenderStyle.cpp:
(WebCore::calcConstraintScaleFor):
(WebCore::RenderStyle::setFontSize):
(WebCore::RenderStyle::getShadowExtent):
(WebCore::RenderStyle::getShadowInsetExtent):
(WebCore::RenderStyle::getShadowHorizontalExtent):
(WebCore::RenderStyle::getShadowVerticalExtent):
* rendering/style/SVGRenderStyle.cpp:
* rendering/style/ShadowData.cpp:
(WebCore::calculateShadowExtent):
* rendering/svg/RenderSVGResourceFilter.cpp:
* rendering/svg/RenderSVGRoot.cpp:
* rendering/svg/SVGInlineFlowBox.cpp:
(WebCore::SVGInlineFlowBox::computeTextMatchMarkerRectForRenderer):
* rendering/svg/SVGInlineTextBox.cpp:
(WebCore::SVGInlineTextBox::localSelectionRect):
* svg/SVGAnimatedNumber.cpp:
* svg/SVGAnimatedNumberOptionalNumber.cpp:
* svg/animation/SMILTimeContainer.cpp:
(WebCore::SMILTimeContainer::startTimer):
(WebCore::SMILTimeContainer::updateAnimations):
* svg/animation/SVGSMILElement.cpp:
(WebCore::SVGSMILElement::simpleDuration):
(WebCore::SVGSMILElement::repeatingDuration):
(WebCore::SVGSMILElement::resolveActiveEnd):
(WebCore::SVGSMILElement::resolveInterval):
(WebCore::SVGSMILElement::resolveFirstInterval):
(WebCore::SVGSMILElement::resolveNextInterval):
(WebCore::SVGSMILElement::calculateAnimationPercentAndRepeat):
* xml/XMLTreeViewer.cpp:
* xml/parser/XMLDocumentParser.cpp:
* xml/parser/XMLDocumentParserLibxml2.cpp:
(WebCore::OffsetBuffer::readOutBytes):

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

151 files changed:
Source/WebCore/ChangeLog
Source/WebCore/loader/CrossOriginPreflightResultCache.cpp
Source/WebCore/loader/WorkerThreadableLoader.cpp
Source/WebCore/loader/appcache/ApplicationCacheStorage.cpp
Source/WebCore/loader/appcache/ManifestParser.cpp
Source/WebCore/loader/cache/MemoryCache.cpp
Source/WebCore/page/CaptionUserPreferencesMediaAF.cpp
Source/WebCore/page/Chrome.cpp
Source/WebCore/page/DOMTimer.cpp
Source/WebCore/page/FocusController.cpp
Source/WebCore/page/Frame.cpp
Source/WebCore/page/PageGroupLoadDeferrer.cpp
Source/WebCore/page/Settings.cpp
Source/WebCore/page/animation/AnimationBase.cpp
Source/WebCore/page/animation/KeyframeAnimation.cpp
Source/WebCore/platform/DateComponents.cpp
Source/WebCore/platform/ScrollAnimator.cpp
Source/WebCore/platform/ScrollView.cpp
Source/WebCore/platform/Scrollbar.cpp
Source/WebCore/platform/ScrollbarThemeComposite.cpp
Source/WebCore/platform/SharedBuffer.cpp
Source/WebCore/platform/ThreadTimers.cpp
Source/WebCore/platform/Timer.cpp
Source/WebCore/platform/URL.cpp
Source/WebCore/platform/audio/AudioResampler.cpp
Source/WebCore/platform/audio/AudioResamplerKernel.cpp
Source/WebCore/platform/audio/Distance.cpp
Source/WebCore/platform/audio/DynamicsCompressorKernel.cpp
Source/WebCore/platform/audio/EqualPowerPanner.cpp
Source/WebCore/platform/audio/HRTFDatabase.cpp
Source/WebCore/platform/audio/HRTFElevation.cpp
Source/WebCore/platform/audio/HRTFKernel.cpp
Source/WebCore/platform/audio/HRTFPanner.cpp
Source/WebCore/platform/audio/Reverb.cpp
Source/WebCore/platform/audio/SincResampler.cpp
Source/WebCore/platform/cf/URLCF.cpp
Source/WebCore/platform/graphics/Color.cpp
Source/WebCore/platform/graphics/CrossfadeGeneratedImage.cpp
Source/WebCore/platform/graphics/FloatQuad.cpp
Source/WebCore/platform/graphics/FloatSize.cpp
Source/WebCore/platform/graphics/FontFastPath.cpp
Source/WebCore/platform/graphics/FontPlatformData.cpp
Source/WebCore/platform/graphics/GraphicsContext.cpp
Source/WebCore/platform/graphics/RoundedRect.cpp
Source/WebCore/platform/graphics/ShadowBlur.cpp
Source/WebCore/platform/graphics/SimpleFontData.cpp
Source/WebCore/platform/graphics/WidthIterator.cpp
Source/WebCore/platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp
Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp
Source/WebCore/platform/graphics/avfoundation/objc/InbandTextTrackPrivateAVFObjC.mm
Source/WebCore/platform/graphics/avfoundation/objc/InbandTextTrackPrivateLegacyAVFObjC.mm
Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm
Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp
Source/WebCore/platform/graphics/ca/mac/TileController.mm
Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp
Source/WebCore/platform/graphics/cg/ImageBufferCG.cpp
Source/WebCore/platform/graphics/cg/ImageBufferDataCG.cpp
Source/WebCore/platform/graphics/cg/ImageSourceCG.cpp
Source/WebCore/platform/graphics/filters/FEDropShadow.cpp
Source/WebCore/platform/graphics/filters/FEGaussianBlur.cpp
Source/WebCore/platform/graphics/gpu/Texture.cpp
Source/WebCore/platform/graphics/gpu/TilingData.cpp
Source/WebCore/platform/graphics/mac/ComplexTextController.cpp
Source/WebCore/platform/graphics/mac/FontComplexTextMac.cpp
Source/WebCore/platform/graphics/mac/FontMac.mm
Source/WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.mm
Source/WebCore/platform/graphics/mac/SimpleFontDataMac.mm
Source/WebCore/platform/graphics/transforms/Matrix3DTransformOperation.cpp
Source/WebCore/platform/graphics/transforms/MatrixTransformOperation.cpp
Source/WebCore/platform/graphics/transforms/PerspectiveTransformOperation.cpp
Source/WebCore/platform/graphics/transforms/RotateTransformOperation.cpp
Source/WebCore/platform/graphics/transforms/TransformOperations.cpp
Source/WebCore/platform/graphics/transforms/TransformationMatrix.cpp
Source/WebCore/platform/mac/ScrollAnimatorMac.mm
Source/WebCore/platform/mac/ScrollViewMac.mm
Source/WebCore/platform/mac/ScrollbarThemeMac.mm
Source/WebCore/platform/mac/ThemeMac.mm
Source/WebCore/platform/mac/WebVideoFullscreenHUDWindowController.mm
Source/WebCore/platform/network/HTTPHeaderMap.cpp
Source/WebCore/platform/network/ResourceRequestBase.cpp
Source/WebCore/platform/network/ResourceResponseBase.cpp
Source/WebCore/platform/network/cf/ResourceResponseCFNet.cpp
Source/WebCore/platform/network/mac/ResourceResponseMac.mm
Source/WebCore/platform/text/TextBreakIteratorICU.cpp
Source/WebCore/platform/text/TextCodecUTF16.cpp
Source/WebCore/platform/text/TextCodecUTF8.cpp
Source/WebCore/platform/text/TextStream.cpp
Source/WebCore/platform/text/mac/LocaleMac.mm
Source/WebCore/platform/text/mac/TextCodecMac.cpp
Source/WebCore/rendering/AutoTableLayout.cpp
Source/WebCore/rendering/FixedTableLayout.cpp
Source/WebCore/rendering/FloatingObjects.cpp
Source/WebCore/rendering/InlineBox.cpp
Source/WebCore/rendering/InlineFlowBox.cpp
Source/WebCore/rendering/InlineTextBox.cpp
Source/WebCore/rendering/RenderBlock.cpp
Source/WebCore/rendering/RenderBlockFlow.cpp
Source/WebCore/rendering/RenderBlockLineLayout.cpp
Source/WebCore/rendering/RenderBox.cpp
Source/WebCore/rendering/RenderBoxModelObject.cpp
Source/WebCore/rendering/RenderDeprecatedFlexibleBox.cpp
Source/WebCore/rendering/RenderFileUploadControl.cpp
Source/WebCore/rendering/RenderImage.cpp
Source/WebCore/rendering/RenderInline.cpp
Source/WebCore/rendering/RenderLayer.cpp
Source/WebCore/rendering/RenderLayerBacking.cpp
Source/WebCore/rendering/RenderLayerModelObject.cpp
Source/WebCore/rendering/RenderLineBoxList.cpp
Source/WebCore/rendering/RenderListBox.cpp
Source/WebCore/rendering/RenderListItem.cpp
Source/WebCore/rendering/RenderListMarker.cpp
Source/WebCore/rendering/RenderMarquee.cpp
Source/WebCore/rendering/RenderMediaControls.cpp
Source/WebCore/rendering/RenderMenuList.cpp
Source/WebCore/rendering/RenderMeter.cpp
Source/WebCore/rendering/RenderMultiColumnBlock.cpp
Source/WebCore/rendering/RenderMultiColumnSet.cpp
Source/WebCore/rendering/RenderNamedFlowFragment.cpp
Source/WebCore/rendering/RenderObject.cpp
Source/WebCore/rendering/RenderProgress.cpp
Source/WebCore/rendering/RenderRegion.cpp
Source/WebCore/rendering/RenderReplaced.cpp
Source/WebCore/rendering/RenderRubyBase.cpp
Source/WebCore/rendering/RenderRubyRun.cpp
Source/WebCore/rendering/RenderRubyText.cpp
Source/WebCore/rendering/RenderScrollbarPart.cpp
Source/WebCore/rendering/RenderSearchField.cpp
Source/WebCore/rendering/RenderTable.cpp
Source/WebCore/rendering/RenderTableCell.cpp
Source/WebCore/rendering/RenderTableSection.cpp
Source/WebCore/rendering/RenderText.cpp
Source/WebCore/rendering/RenderTextControl.cpp
Source/WebCore/rendering/RenderTextControlSingleLine.cpp
Source/WebCore/rendering/RenderThemeMac.mm
Source/WebCore/rendering/RenderWidget.cpp
Source/WebCore/rendering/RootInlineBox.cpp
Source/WebCore/rendering/mathml/RenderMathMLRoot.cpp
Source/WebCore/rendering/style/RenderStyle.cpp
Source/WebCore/rendering/style/SVGRenderStyle.cpp
Source/WebCore/rendering/style/ShadowData.cpp
Source/WebCore/rendering/svg/RenderSVGResourceFilter.cpp
Source/WebCore/rendering/svg/RenderSVGRoot.cpp
Source/WebCore/rendering/svg/SVGInlineFlowBox.cpp
Source/WebCore/rendering/svg/SVGInlineTextBox.cpp
Source/WebCore/svg/SVGAnimatedNumber.cpp
Source/WebCore/svg/SVGAnimatedNumberOptionalNumber.cpp
Source/WebCore/svg/animation/SMILTimeContainer.cpp
Source/WebCore/svg/animation/SVGSMILElement.cpp
Source/WebCore/xml/XMLTreeViewer.cpp
Source/WebCore/xml/parser/XMLDocumentParser.cpp
Source/WebCore/xml/parser/XMLDocumentParserLibxml2.cpp

index 1182c41..9407992 100644 (file)
@@ -1,3 +1,504 @@
+2013-11-10  Anders Carlsson  <andersca@apple.com>
+
+        Remove all 'std' using directives from WebCore
+        https://bugs.webkit.org/show_bug.cgi?id=124125
+
+        Reviewed by Sam Weinig.
+
+        As per the coding style guidelines.
+
+        * loader/CrossOriginPreflightResultCache.cpp:
+        (WebCore::CrossOriginPreflightResultCache::appendEntry):
+        (WebCore::CrossOriginPreflightResultCache::canSkipPreflight):
+        * loader/WorkerThreadableLoader.cpp:
+        * loader/appcache/ApplicationCacheStorage.cpp:
+        (WebCore::ApplicationCacheStorage::loadCache):
+        * loader/appcache/ManifestParser.cpp:
+        (WebCore::parseManifest):
+        * loader/cache/MemoryCache.cpp:
+        (WebCore::MemoryCache::deadCapacity):
+        (WebCore::MemoryCache::lruListFor):
+        * page/CaptionUserPreferencesMediaAF.cpp:
+        * page/Chrome.cpp:
+        * page/DOMTimer.cpp:
+        (WebCore::DOMTimer::intervalClampedToMinimum):
+        * page/FocusController.cpp:
+        * page/Frame.cpp:
+        (WebCore::Frame::resizePageRectsKeepingRatio):
+        * page/PageGroupLoadDeferrer.cpp:
+        * page/Settings.cpp:
+        * page/animation/AnimationBase.cpp:
+        (WebCore::solveStepsFunction):
+        (WebCore::AnimationBase::fireAnimationEventsIfNeeded):
+        (WebCore::AnimationBase::timeToNextService):
+        (WebCore::AnimationBase::fractionalTime):
+        (WebCore::AnimationBase::getTimeToNextEvent):
+        * page/animation/KeyframeAnimation.cpp:
+        (WebCore::KeyframeAnimation::fetchIntervalEndpointsForProperty):
+        * platform/DateComponents.cpp:
+        * platform/ScrollAnimator.cpp:
+        (WebCore::ScrollAnimator::handleWheelEvent):
+        * platform/ScrollView.cpp:
+        (WebCore::ScrollView::unscaledVisibleContentSize):
+        (WebCore::ScrollView::setScrollOffset):
+        (WebCore::ScrollView::updateScrollbars):
+        (WebCore::ScrollView::scrollContents):
+        * platform/Scrollbar.cpp:
+        (WebCore::Scrollbar::moveThumb):
+        * platform/ScrollbarThemeComposite.cpp:
+        (WebCore::usedTotalSize):
+        (WebCore::ScrollbarThemeComposite::thumbPosition):
+        (WebCore::ScrollbarThemeComposite::thumbLength):
+        * platform/SharedBuffer.cpp:
+        (WebCore::SharedBuffer::append):
+        (WebCore::SharedBuffer::copyBufferAndClear):
+        (WebCore::SharedBuffer::getSomeData):
+        * platform/ThreadTimers.cpp:
+        (WebCore::ThreadTimers::updateSharedTimer):
+        * platform/Timer.cpp:
+        (WebCore::TimerHeapLessThanFunction::operator()):
+        (WebCore::TimerBase::heapPop):
+        (WebCore::TimerBase::nextUnalignedFireInterval):
+        * platform/URL.cpp:
+        (WebCore::findHostnamesInMailToURL):
+        (WebCore::portAllowed):
+        * platform/audio/AudioResampler.cpp:
+        (WebCore::AudioResampler::setRate):
+        * platform/audio/AudioResamplerKernel.cpp:
+        (WebCore::AudioResamplerKernel::process):
+        * platform/audio/Distance.cpp:
+        (WebCore::DistanceEffect::gain):
+        * platform/audio/DynamicsCompressorKernel.cpp:
+        (WebCore::DynamicsCompressorKernel::process):
+        * platform/audio/EqualPowerPanner.cpp:
+        (WebCore::EqualPowerPanner::pan):
+        * platform/audio/HRTFDatabase.cpp:
+        (WebCore::HRTFDatabase::indexFromElevationAngle):
+        * platform/audio/HRTFElevation.cpp:
+        (WebCore::HRTFElevation::createForSubject):
+        * platform/audio/HRTFKernel.cpp:
+        (WebCore::HRTFKernel::HRTFKernel):
+        (WebCore::HRTFKernel::createInterpolatedKernel):
+        * platform/audio/HRTFPanner.cpp:
+        (WebCore::HRTFPanner::calculateDesiredAzimuthIndexAndBlend):
+        * platform/audio/Reverb.cpp:
+        * platform/audio/SincResampler.cpp:
+        (WebCore::SincResampler::process):
+        * platform/cf/URLCF.cpp:
+        * platform/graphics/Color.cpp:
+        (WebCore::makeRGB):
+        (WebCore::makeRGBA):
+        (WebCore::colorFloatToRGBAByte):
+        (WebCore::Color::light):
+        (WebCore::Color::dark):
+        * platform/graphics/CrossfadeGeneratedImage.cpp:
+        * platform/graphics/FloatQuad.cpp:
+        (WebCore::min4):
+        (WebCore::max4):
+        (WebCore::withinEpsilon):
+        * platform/graphics/FloatSize.cpp:
+        (WebCore::FloatSize::isZero):
+        * platform/graphics/FontFastPath.cpp:
+        (WebCore::Font::floatWidthForSimpleText):
+        * platform/graphics/FontPlatformData.cpp:
+        * platform/graphics/GraphicsContext.cpp:
+        * platform/graphics/RoundedRect.cpp:
+        (WebCore::RoundedRect::Radii::expand):
+        * platform/graphics/ShadowBlur.cpp:
+        (WebCore::calculateLobes):
+        (WebCore::computeSliceSizesFromRadii):
+        * platform/graphics/SimpleFontData.cpp:
+        (WebCore::SimpleFontData::initCharWidths):
+        * platform/graphics/WidthIterator.cpp:
+        (WebCore::WidthIterator::WidthIterator):
+        (WebCore::WidthIterator::advanceInternal):
+        * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
+        (WebCore::InbandTextTrackPrivateAVF::processCue):
+        * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
+        * platform/graphics/avfoundation/objc/InbandTextTrackPrivateAVFObjC.mm:
+        * platform/graphics/avfoundation/objc/InbandTextTrackPrivateLegacyAVFObjC.mm:
+        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
+        (WebCore::MediaPlayerPrivateAVFoundationObjC::platformDuration):
+        (WebCore::MediaPlayerPrivateAVFoundationObjC::currentTime):
+        * platform/graphics/ca/GraphicsLayerCA.cpp:
+        (WebCore::GraphicsLayerCA::setOpacity):
+        (WebCore::GraphicsLayerCA::setNeedsDisplay):
+        (WebCore::GraphicsLayerCA::setupAnimation):
+        (WebCore::clampedContentsScaleForScale):
+        * platform/graphics/ca/mac/TileController.mm:
+        (WebCore::TileController::getTileIndexRangeForRect):
+        (WebCore::TileController::computeTileCoverageRect):
+        * platform/graphics/cg/GraphicsContextCG.cpp:
+        (WebCore::GraphicsContext::setPlatformShadow):
+        (WebCore::computeLineBoundsAndAntialiasingModeForText):
+        * platform/graphics/cg/ImageBufferCG.cpp:
+        * platform/graphics/cg/ImageBufferDataCG.cpp:
+        (WebCore::ImageBufferData::getData):
+        * platform/graphics/cg/ImageSourceCG.cpp:
+        * platform/graphics/filters/FEDropShadow.cpp:
+        * platform/graphics/filters/FEGaussianBlur.cpp:
+        (WebCore::boxBlur):
+        (WebCore::FEGaussianBlur::platformApplyGeneric):
+        (WebCore::FEGaussianBlur::calculateUnscaledKernelSize):
+        (WebCore::FEGaussianBlur::calculateStdDeviation):
+        * platform/graphics/gpu/Texture.cpp:
+        (WebCore::Texture::updateSubRect):
+        * platform/graphics/gpu/TilingData.cpp:
+        (WebCore::computeNumTiles):
+        (WebCore::TilingData::tileXIndexFromSrcCoord):
+        (WebCore::TilingData::tileYIndexFromSrcCoord):
+        * platform/graphics/mac/ComplexTextController.cpp:
+        (WebCore::ComplexTextController::ComplexTextController):
+        (WebCore::ComplexTextController::offsetForPosition):
+        (WebCore::ComplexTextController::advance):
+        (WebCore::ComplexTextController::adjustGlyphsAndAdvances):
+        * platform/graphics/mac/FontComplexTextMac.cpp:
+        (WebCore::Font::floatWidthForComplexText):
+        * platform/graphics/mac/FontMac.mm:
+        * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
+        (WebCore::MediaPlayerPrivateQTKit::duration):
+        * platform/graphics/mac/SimpleFontDataMac.mm:
+        * platform/graphics/transforms/Matrix3DTransformOperation.cpp:
+        * platform/graphics/transforms/MatrixTransformOperation.cpp:
+        * platform/graphics/transforms/PerspectiveTransformOperation.cpp:
+        * platform/graphics/transforms/RotateTransformOperation.cpp:
+        * platform/graphics/transforms/TransformOperations.cpp:
+        (WebCore::TransformOperations::blendByMatchingOperations):
+        * platform/graphics/transforms/TransformationMatrix.cpp:
+        (WebCore::clampEdgeValue):
+        * platform/mac/ScrollAnimatorMac.mm:
+        (WebCore::ScrollAnimatorMac::adjustScrollPositionIfNecessary):
+        * platform/mac/ScrollViewMac.mm:
+        (WebCore::ScrollView::platformSetContentsSize):
+        (WebCore::ScrollView::platformSetScrollPosition):
+        * platform/mac/ScrollbarThemeMac.mm:
+        * platform/mac/ThemeMac.mm:
+        * platform/mac/WebVideoFullscreenHUDWindowController.mm:
+        (-[WebVideoFullscreenHUDWindowController incrementVolume]):
+        (timeToString):
+        * platform/network/HTTPHeaderMap.cpp:
+        (WebCore::HTTPHeaderMap::copyData):
+        * platform/network/ResourceRequestBase.cpp:
+        * platform/network/ResourceResponseBase.cpp:
+        (WebCore::ResourceResponseBase::parseCacheControlDirectives):
+        * platform/network/cf/ResourceResponseCFNet.cpp:
+        * platform/network/mac/ResourceResponseMac.mm:
+        (WebCore::ResourceResponse::initNSURLResponse):
+        * platform/text/TextBreakIteratorICU.cpp:
+        (WebCore::textClone):
+        (WebCore::textLatin1MoveInPrimaryContext):
+        (WebCore::textLatin1MoveInPriorContext):
+        (WebCore::textInChunkOrOutOfRange):
+        (WebCore::textOpenLatin1):
+        (WebCore::textUTF16MoveInPrimaryContext):
+        (WebCore::textUTF16MoveInPriorContext):
+        (WebCore::textOpenUTF16):
+        * platform/text/TextCodecUTF16.cpp:
+        (WebCore::TextCodecUTF16::encode):
+        * platform/text/TextCodecUTF8.cpp:
+        (WebCore::TextCodecUTF8::encode):
+        * platform/text/TextStream.cpp:
+        * platform/text/mac/LocaleMac.mm:
+        * platform/text/mac/TextCodecMac.cpp:
+        (WebCore::TextCodecMac::decode):
+        * rendering/AutoTableLayout.cpp:
+        (WebCore::AutoTableLayout::recalcColumn):
+        (WebCore::AutoTableLayout::computeIntrinsicLogicalWidths):
+        (WebCore::AutoTableLayout::applyPreferredLogicalWidthQuirks):
+        (WebCore::AutoTableLayout::calcEffectiveLogicalWidth):
+        (WebCore::AutoTableLayout::layout):
+        * rendering/FixedTableLayout.cpp:
+        (WebCore::FixedTableLayout::applyPreferredLogicalWidthQuirks):
+        * rendering/FloatingObjects.cpp:
+        (WebCore::FindNextFloatLogicalBottomAdapter::collectIfNeeded):
+        (WebCore::FloatingObjects::logicalRightOffsetForPositioningFloat):
+        (WebCore::FloatingObjects::logicalRightOffset):
+        * rendering/InlineBox.cpp:
+        * rendering/InlineFlowBox.cpp:
+        (WebCore::InlineFlowBox::placeBoxRangeInInlineDirection):
+        (WebCore::InlineFlowBox::adjustMaxAscentAndDescent):
+        (WebCore::InlineFlowBox::placeBoxesInBlockDirection):
+        (WebCore::InlineFlowBox::computeMaxLogicalTop):
+        (WebCore::InlineFlowBox::addBoxShadowVisualOverflow):
+        (WebCore::InlineFlowBox::addBorderOutsetVisualOverflow):
+        (WebCore::InlineFlowBox::addTextBoxVisualOverflow):
+        (WebCore::InlineFlowBox::nodeAtPoint):
+        (WebCore::InlineFlowBox::constrainToLineTopAndBottomIfNeeded):
+        (WebCore::InlineFlowBox::computeOverAnnotationAdjustment):
+        (WebCore::InlineFlowBox::computeUnderAnnotationAdjustment):
+        (WebCore::InlineFlowBox::collectLeafBoxesInLogicalOrder):
+        * rendering/InlineTextBox.cpp:
+        (WebCore::InlineTextBox::isSelected):
+        (WebCore::InlineTextBox::localSelectionRect):
+        (WebCore::InlineTextBox::placeEllipsisBox):
+        (WebCore::InlineTextBox::applyShadowToGraphicsContext):
+        (WebCore::InlineTextBox::paint):
+        (WebCore::InlineTextBox::selectionStartEnd):
+        (WebCore::InlineTextBox::paintSelection):
+        (WebCore::InlineTextBox::paintCompositionBackground):
+        (WebCore::computeUnderlineOffset):
+        (WebCore::InlineTextBox::paintDecoration):
+        (WebCore::InlineTextBox::paintDocumentMarker):
+        (WebCore::InlineTextBox::paintTextMatchMarker):
+        (WebCore::InlineTextBox::computeRectForReplacementMarker):
+        (WebCore::InlineTextBox::paintCompositionUnderline):
+        * rendering/RenderBlock.cpp:
+        (WebCore::RenderBlock::computeOverflow):
+        (WebCore::RenderBlock::computeStartPositionDeltaForChildAvoidingFloats):
+        (WebCore::RenderBlock::paintChild):
+        (WebCore::RenderBlock::blockSelectionGap):
+        (WebCore::RenderBlock::logicalLeftSelectionGap):
+        (WebCore::RenderBlock::logicalRightSelectionGap):
+        (WebCore::RenderBlock::calcColumnWidth):
+        (WebCore::RenderBlock::adjustRectForColumns):
+        (WebCore::RenderBlock::computeIntrinsicLogicalWidths):
+        (WebCore::RenderBlock::computePreferredLogicalWidths):
+        (WebCore::RenderBlock::adjustIntrinsicLogicalWidthsForColumns):
+        (WebCore::updatePreferredWidth):
+        (WebCore::RenderBlock::computeInlinePreferredLogicalWidths):
+        (WebCore::RenderBlock::computeBlockPreferredLogicalWidths):
+        * rendering/RenderBlockFlow.cpp:
+        (WebCore::RenderBlockFlow::clearFloats):
+        (WebCore::RenderBlockFlow::layoutBlock):
+        (WebCore::RenderBlockFlow::layoutBlockChild):
+        (WebCore::RenderBlockFlow::collapseMargins):
+        (WebCore::RenderBlockFlow::clearFloatsIfNeeded):
+        (WebCore::RenderBlockFlow::marginBeforeEstimateForChild):
+        (WebCore::RenderBlockFlow::estimateLogicalTopPosition):
+        (WebCore::RenderBlockFlow::setCollapsedBottomMargin):
+        (WebCore::RenderBlockFlow::handleAfterSideOfBlock):
+        (WebCore::calculateMinimumPageHeight):
+        (WebCore::RenderBlockFlow::adjustLinePositionForPagination):
+        (WebCore::RenderBlockFlow::removeFloatingObject):
+        (WebCore::RenderBlockFlow::computeLogicalLocationForFloat):
+        (WebCore::RenderBlockFlow::positionNewFloats):
+        (WebCore::RenderBlockFlow::lowestFloatLogicalBottom):
+        (WebCore::RenderBlockFlow::addOverhangingFloats):
+        (WebCore::RenderBlockFlow::getClearDelta):
+        (WebCore::RenderBlockFlow::adjustForBorderFit):
+        (WebCore::RenderBlockFlow::fitBorderToLinesIfNeeded):
+        (WebCore::RenderBlockFlow::updateLogicalHeight):
+        (WebCore::RenderBlockFlow::positionForPointWithInlineChildren):
+        (WebCore::RenderBlockFlow::addFocusRingRectsForInlineChildren):
+        (WebCore::RenderBlockFlow::relayoutForPagination):
+        * rendering/RenderBlockLineLayout.cpp:
+        (WebCore::updateLogicalWidthForLeftAlignedBlock):
+        (WebCore::updateLogicalWidthForRightAlignedBlock):
+        (WebCore::updateLogicalWidthForCenterAlignedBlock):
+        (WebCore::setLogicalWidthForTextRun):
+        (WebCore::RenderBlockFlow::computeInlineDirectionPositionsForLine):
+        (WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange):
+        (WebCore::RenderBlockFlow::layoutLineBoxes):
+        (WebCore::RenderBlockFlow::checkFloatsInCleanLine):
+        (WebCore::RenderBlockFlow::checkPaginationAndFloatsAtEndLine):
+        (WebCore::tryHyphenating):
+        * rendering/RenderBox.cpp:
+        (WebCore::RenderBox::scrollWidth):
+        (WebCore::RenderBox::scrollHeight):
+        (WebCore::RenderBox::constrainLogicalWidthInRegionByMinMax):
+        (WebCore::RenderBox::constrainLogicalHeightByMinMax):
+        (WebCore::RenderBox::constrainContentBoxLogicalHeightByMinMax):
+        (WebCore::RenderBox::adjustBorderBoxLogicalWidthForBoxSizing):
+        (WebCore::RenderBox::adjustBorderBoxLogicalHeightForBoxSizing):
+        (WebCore::RenderBox::adjustContentBoxLogicalWidthForBoxSizing):
+        (WebCore::RenderBox::adjustContentBoxLogicalHeightForBoxSizing):
+        (WebCore::RenderBox::repaintLayerRectsForImage):
+        (WebCore::RenderBox::shrinkLogicalWidthToAvoidFloats):
+        (WebCore::RenderBox::containingBlockLogicalWidthForContentInRegion):
+        (WebCore::RenderBox::containingBlockAvailableLineWidthInRegion):
+        (WebCore::RenderBox::perpendicularContainingBlockLogicalHeight):
+        (WebCore::RenderBox::computeLogicalWidthInRegion):
+        (WebCore::RenderBox::computeIntrinsicLogicalWidthUsing):
+        (WebCore::RenderBox::computeLogicalWidthInRegionUsing):
+        (WebCore::RenderBox::computeInlineDirectionMargins):
+        (WebCore::RenderBox::computeLogicalHeight):
+        (WebCore::RenderBox::computePercentageLogicalHeight):
+        (WebCore::RenderBox::computeReplacedLogicalWidthRespectingMinMaxWidth):
+        (WebCore::RenderBox::computeReplacedLogicalHeightRespectingMinMaxHeight):
+        (WebCore::RenderBox::computeReplacedLogicalHeightUsing):
+        (WebCore::RenderBox::containingBlockLogicalWidthForPositioned):
+        (WebCore::RenderBox::computePositionedLogicalWidthUsing):
+        (WebCore::RenderBox::computePositionedLogicalHeightUsing):
+        (WebCore::RenderBox::applyVisualEffectOverflow):
+        (WebCore::RenderBox::addLayoutOverflow):
+        * rendering/RenderBoxModelObject.cpp:
+        (WebCore::RenderBoxModelObject::calculateFillTileSize):
+        (WebCore::RenderBoxModelObject::BackgroundImageGeometry::setNoRepeatX):
+        (WebCore::RenderBoxModelObject::BackgroundImageGeometry::setNoRepeatY):
+        (WebCore::RenderBoxModelObject::BackgroundImageGeometry::useFixedAttachment):
+        (WebCore::RenderBoxModelObject::paintNinePieceImage):
+        (WebCore::RenderBoxModelObject::paintOneBorderSide):
+        (WebCore::calculateAdjustedInnerBorder):
+        (WebCore::RenderBoxModelObject::paintBoxShadow):
+        (WebCore::RenderBoxModelObject::localCaretRectForEmptyElement):
+        * rendering/RenderDeprecatedFlexibleBox.cpp:
+        (WebCore::FlexBoxIterator::next):
+        (WebCore::RenderDeprecatedFlexibleBox::computeIntrinsicLogicalWidths):
+        (WebCore::RenderDeprecatedFlexibleBox::computePreferredLogicalWidths):
+        (WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
+        (WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox):
+        (WebCore::RenderDeprecatedFlexibleBox::applyLineClamp):
+        (WebCore::RenderDeprecatedFlexibleBox::allowedChildFlex):
+        * rendering/RenderFileUploadControl.cpp:
+        (WebCore::RenderFileUploadControl::maxFilenameWidth):
+        (WebCore::RenderFileUploadControl::computeIntrinsicLogicalWidths):
+        (WebCore::RenderFileUploadControl::computePreferredLogicalWidths):
+        * rendering/RenderImage.cpp:
+        (WebCore::RenderImage::setImageSizeForAltText):
+        * rendering/RenderInline.cpp:
+        (WebCore::computeMargin):
+        (WebCore::RenderInline::linesVisualOverflowBoundingBox):
+        (WebCore::RenderInline::paintOutline):
+        (WebCore::RenderInline::paintOutlineForLine):
+        * rendering/RenderLayer.cpp:
+        (WebCore::RenderLayer::clampScrollOffset):
+        (WebCore::RenderLayer::scrollRectToVisible):
+        (WebCore::RenderLayer::visibleContentRect):
+        (WebCore::RenderLayer::updateScrollbarsAfterLayout):
+        (WebCore::RenderLayer::hitTestOverflowControls):
+        (WebCore::RenderLayer::hitTestLayer):
+        (WebCore::RenderLayer::calculateLayerBounds):
+        * rendering/RenderLayerBacking.cpp:
+        * rendering/RenderLayerModelObject.cpp:
+        * rendering/RenderLineBoxList.cpp:
+        (WebCore::RenderLineBoxList::rangeIntersectsRect):
+        (WebCore::RenderLineBoxList::anyLineIntersectsRect):
+        (WebCore::RenderLineBoxList::lineIntersectsDirtyRect):
+        (WebCore::RenderLineBoxList::paint):
+        * rendering/RenderListBox.cpp:
+        (WebCore::RenderListBox::updateFromElement):
+        (WebCore::RenderListBox::layout):
+        (WebCore::RenderListBox::computePreferredLogicalWidths):
+        (WebCore::RenderListBox::size):
+        (WebCore::RenderListBox::numVisibleItems):
+        (WebCore::RenderListBox::panScroll):
+        (WebCore::RenderListBox::scrollHeight):
+        * rendering/RenderListItem.cpp:
+        * rendering/RenderListMarker.cpp:
+        * rendering/RenderMarquee.cpp:
+        (WebCore::RenderMarquee::marqueeSpeed):
+        (WebCore::RenderMarquee::computePosition):
+        (WebCore::RenderMarquee::timerFired):
+        * rendering/RenderMediaControls.cpp:
+        * rendering/RenderMenuList.cpp:
+        (WebCore::RenderMenuList::updateOptionsWidth):
+        (WebCore::RenderMenuList::computeIntrinsicLogicalWidths):
+        (WebCore::RenderMenuList::computePreferredLogicalWidths):
+        * rendering/RenderMeter.cpp:
+        * rendering/RenderMultiColumnBlock.cpp:
+        * rendering/RenderMultiColumnSet.cpp:
+        (WebCore::RenderMultiColumnSet::heightAdjustedForSetOffset):
+        (WebCore::RenderMultiColumnSet::calculateBalancedHeight):
+        (WebCore::RenderMultiColumnSet::updateLogicalWidth):
+        * rendering/RenderNamedFlowFragment.cpp:
+        * rendering/RenderObject.cpp:
+        (WebCore::RenderObject::drawLineForBoxSide):
+        (WebCore::RenderObject::repaintAfterLayoutIfNeeded):
+        (WebCore::RenderObject::caretMaxOffset):
+        * rendering/RenderProgress.cpp:
+        * rendering/RenderRegion.cpp:
+        (WebCore::RenderRegion::overflowRectForFlowThreadPortion):
+        * rendering/RenderReplaced.cpp:
+        (WebCore::RenderReplaced::shouldPaint):
+        (WebCore::RenderReplaced::computeReplacedLogicalWidth):
+        (WebCore::RenderReplaced::computePreferredLogicalWidths):
+        * rendering/RenderRubyBase.cpp:
+        * rendering/RenderRubyRun.cpp:
+        (WebCore::RenderRubyRun::getOverhang):
+        * rendering/RenderRubyText.cpp:
+        (WebCore::RenderRubyText::adjustInlineDirectionLineBounds):
+        * rendering/RenderScrollbarPart.cpp:
+        (WebCore::RenderScrollbarPart::computeScrollbarWidth):
+        (WebCore::RenderScrollbarPart::computeScrollbarHeight):
+        * rendering/RenderSearchField.cpp:
+        (WebCore::RenderSearchField::computeControlLogicalHeight):
+        * rendering/RenderTable.cpp:
+        (WebCore::RenderTable::updateLogicalWidth):
+        (WebCore::RenderTable::convertStyleLogicalHeightToComputedHeight):
+        (WebCore::RenderTable::layout):
+        (WebCore::RenderTable::computePreferredLogicalWidths):
+        (WebCore::RenderTable::calcBorderStart):
+        (WebCore::RenderTable::calcBorderEnd):
+        (WebCore::RenderTable::outerBorderBefore):
+        (WebCore::RenderTable::outerBorderAfter):
+        (WebCore::RenderTable::outerBorderStart):
+        (WebCore::RenderTable::outerBorderEnd):
+        * rendering/RenderTableCell.cpp:
+        (WebCore::RenderTableCell::parseColSpanFromDOM):
+        (WebCore::RenderTableCell::parseRowSpanFromDOM):
+        (WebCore::RenderTableCell::logicalWidthFromColumns):
+        (WebCore::RenderTableCell::computePreferredLogicalWidths):
+        (WebCore::RenderTableCell::layout):
+        (WebCore::RenderTableCell::setOverrideLogicalContentHeightFromRowHeight):
+        (WebCore::RenderTableCell::clippedOverflowRectForRepaint):
+        (WebCore::RenderTableCell::alignLeftRightBorderPaintRect):
+        (WebCore::RenderTableCell::alignTopBottomBorderPaintRect):
+        * rendering/RenderTableSection.cpp:
+        (WebCore::RenderTableSection::ensureRows):
+        (WebCore::RenderTableSection::calcRowLogicalHeight):
+        (WebCore::RenderTableSection::distributeExtraLogicalHeightToPercentRows):
+        (WebCore::RenderTableSection::layoutRows):
+        (WebCore::RenderTableSection::firstLineBaseline):
+        (WebCore::RenderTableSection::removeCachedCollapsedBorders):
+        (WebCore::RenderTableSection::setCachedCollapsedBorder):
+        (WebCore::RenderTableSection::cachedCollapsedBorder):
+        * rendering/RenderText.cpp:
+        (WebCore::makeCapitalized):
+        (WebCore::RenderText::absoluteRectsForRange):
+        (WebCore::RenderText::absoluteQuadsForRange):
+        (WebCore::maxWordFragmentWidth):
+        (WebCore::RenderText::computePreferredLogicalWidths):
+        * rendering/RenderTextControl.cpp:
+        (WebCore::RenderTextControl::computePreferredLogicalWidths):
+        * rendering/RenderTextControlSingleLine.cpp:
+        * rendering/RenderThemeMac.mm:
+        (WebCore::RenderThemeMac::paintProgressBar):
+        (WebCore::RenderThemeMac::paintMenuListButton):
+        * rendering/RenderWidget.cpp:
+        * rendering/RootInlineBox.cpp:
+        (WebCore::RootInlineBox::alignBoxesInBlockDirection):
+        (WebCore::RootInlineBox::beforeAnnotationsAdjustment):
+        (WebCore::RootInlineBox::selectionTopAdjustedForPrecedingBlock):
+        (WebCore::RootInlineBox::blockDirectionPointInLine):
+        (WebCore::RootInlineBox::paddedLayoutOverflowRect):
+        (WebCore::setAscentAndDescent):
+        (WebCore::RootInlineBox::ascentAndDescentForBox):
+        * rendering/mathml/RenderMathMLRoot.cpp:
+        (WebCore::RenderMathMLRoot::layout):
+        * rendering/style/RenderStyle.cpp:
+        (WebCore::calcConstraintScaleFor):
+        (WebCore::RenderStyle::setFontSize):
+        (WebCore::RenderStyle::getShadowExtent):
+        (WebCore::RenderStyle::getShadowInsetExtent):
+        (WebCore::RenderStyle::getShadowHorizontalExtent):
+        (WebCore::RenderStyle::getShadowVerticalExtent):
+        * rendering/style/SVGRenderStyle.cpp:
+        * rendering/style/ShadowData.cpp:
+        (WebCore::calculateShadowExtent):
+        * rendering/svg/RenderSVGResourceFilter.cpp:
+        * rendering/svg/RenderSVGRoot.cpp:
+        * rendering/svg/SVGInlineFlowBox.cpp:
+        (WebCore::SVGInlineFlowBox::computeTextMatchMarkerRectForRenderer):
+        * rendering/svg/SVGInlineTextBox.cpp:
+        (WebCore::SVGInlineTextBox::localSelectionRect):
+        * svg/SVGAnimatedNumber.cpp:
+        * svg/SVGAnimatedNumberOptionalNumber.cpp:
+        * svg/animation/SMILTimeContainer.cpp:
+        (WebCore::SMILTimeContainer::startTimer):
+        (WebCore::SMILTimeContainer::updateAnimations):
+        * svg/animation/SVGSMILElement.cpp:
+        (WebCore::SVGSMILElement::simpleDuration):
+        (WebCore::SVGSMILElement::repeatingDuration):
+        (WebCore::SVGSMILElement::resolveActiveEnd):
+        (WebCore::SVGSMILElement::resolveInterval):
+        (WebCore::SVGSMILElement::resolveFirstInterval):
+        (WebCore::SVGSMILElement::resolveNextInterval):
+        (WebCore::SVGSMILElement::calculateAnimationPercentAndRepeat):
+        * xml/XMLTreeViewer.cpp:
+        * xml/parser/XMLDocumentParser.cpp:
+        * xml/parser/XMLDocumentParserLibxml2.cpp:
+        (WebCore::OffsetBuffer::readOutBytes):
+
 2013-11-10  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
 
         [AX] Clean up static_cast<> to cast from AccessibilityObject 
index 3580a50..7398d0f 100644 (file)
@@ -35,8 +35,6 @@
 
 namespace WebCore {
 
-using namespace std;
-
 // These values are at the discretion of the user agent.
 static const unsigned defaultPreflightCacheTimeoutSeconds = 5;
 static const unsigned maxPreflightCacheTimeoutSeconds = 600; // Should be short enough to minimize the risk of using a poisoned cache after switching to a secure network.
@@ -157,13 +155,13 @@ CrossOriginPreflightResultCache& CrossOriginPreflightResultCache::shared()
 void CrossOriginPreflightResultCache::appendEntry(const String& origin, const URL& url, PassOwnPtr<CrossOriginPreflightResultCacheItem> preflightResult)
 {
     ASSERT(isMainThread());
-    m_preflightHashMap.set(make_pair(origin, url), preflightResult);
+    m_preflightHashMap.set(std::make_pair(origin, url), preflightResult);
 }
 
 bool CrossOriginPreflightResultCache::canSkipPreflight(const String& origin, const URL& url, StoredCredentials includeCredentials, const String& method, const HTTPHeaderMap& requestHeaders)
 {
     ASSERT(isMainThread());
-    CrossOriginPreflightResultHashMap::iterator cacheIt = m_preflightHashMap.find(make_pair(origin, url));
+    CrossOriginPreflightResultHashMap::iterator cacheIt = m_preflightHashMap.find(std::make_pair(origin, url));
     if (cacheIt == m_preflightHashMap.end())
         return false;
 
index b7b6f7a..416cb06 100644 (file)
@@ -49,8 +49,6 @@
 #include <wtf/OwnPtr.h>
 #include <wtf/Vector.h>
 
-using namespace std;
-
 namespace WebCore {
 
 static const char loadResourceSynchronouslyMode[] = "loadResourceSynchronouslyMode";
index 13bed0f..a74bf2d 100644 (file)
@@ -42,8 +42,6 @@
 #include <wtf/StringExtras.h>
 #include <wtf/text/StringBuilder.h>
 
-using namespace std;
-
 namespace WebCore {
 
 static const char flatFileSubdirectory[] = "ApplicationCache";
@@ -1188,7 +1186,7 @@ PassRefPtr<ApplicationCache> ApplicationCacheStorage::loadCache(unsigned storage
     
     FallbackURLVector fallbackURLs;
     while ((result = fallbackStatement.step()) == SQLResultRow) 
-        fallbackURLs.append(make_pair(URL(ParsedURLString, fallbackStatement.getColumnText(0)), URL(ParsedURLString, fallbackStatement.getColumnText(1))));
+        fallbackURLs.append(std::make_pair(URL(ParsedURLString, fallbackStatement.getColumnText(0)), URL(ParsedURLString, fallbackStatement.getColumnText(1))));
 
     if (result != SQLResultDone)
         LOG_ERROR("Could not load fallback URLs, error \"%s\"", m_database.lastErrorMsg());
index bb1f039..77b0096 100644 (file)
@@ -30,8 +30,6 @@
 #include "URL.h"
 #include <wtf/unicode/CharacterNames.h>
 
-using namespace std;
-
 namespace WebCore {
 
 enum Mode { Explicit, Fallback, OnlineWhitelist, Unknown };
@@ -173,7 +171,7 @@ bool parseManifest(const URL& manifestURL, const char* data, int length, Manifes
             if (!protocolHostAndPortAreEqual(manifestURL, fallbackURL))
                 continue;
 
-            manifest.fallbackURLs.append(make_pair(namespaceURL, fallbackURL));            
+            manifest.fallbackURLs.append(std::make_pair(namespaceURL, fallbackURL));            
         } else 
             ASSERT_NOT_REACHED();
     }
index 4690485..8506f01 100644 (file)
@@ -49,8 +49,6 @@
 #include "ResourceBuffer.h"
 #endif
 
-using namespace std;
-
 namespace WebCore {
 
 static const int cDefaultCacheCapacity = 8192 * 1024;
@@ -200,9 +198,9 @@ CachedResource* MemoryCache::resourceForRequest(const ResourceRequest& request)
 unsigned MemoryCache::deadCapacity() const 
 {
     // Dead resource capacity is whatever space is not occupied by live resources, bounded by an independent minimum and maximum.
-    unsigned capacity = m_capacity - min(m_liveSize, m_capacity); // Start with available capacity.
-    capacity = max(capacity, m_minDeadCapacity); // Make sure it's above the minimum.
-    capacity = min(capacity, m_maxDeadCapacity); // Make sure it's below the maximum.
+    unsigned capacity = m_capacity - std::min(m_liveSize, m_capacity); // Start with available capacity.
+    capacity = std::max(capacity, m_minDeadCapacity); // Make sure it's above the minimum.
+    capacity = std::min(capacity, m_maxDeadCapacity); // Make sure it's below the maximum.
     return capacity;
 }
 
@@ -495,7 +493,7 @@ void MemoryCache::evict(CachedResource* resource)
 
 MemoryCache::LRUList* MemoryCache::lruListFor(CachedResource* resource)
 {
-    unsigned accessCount = max(resource->accessCount(), 1U);
+    unsigned accessCount = std::max(resource->accessCount(), 1U);
     unsigned queueIndex = WTF::fastLog2(resource->size() / accessCount);
 #ifndef NDEBUG
     resource->m_lruIndex = queueIndex;
index 83af7fd..bdfce61 100644 (file)
@@ -122,8 +122,6 @@ SOFT_LINK_AVF_POINTER(CoreText, kCTFontNameAttribute, CFStringRef)
 #define kCTFontNameAttribute getkCTFontNameAttribute()
 #endif
 
-using namespace std;
-
 namespace WebCore {
 
 #if HAVE(MEDIA_ACCESSIBILITY_FRAMEWORK)
index a328ea9..9b4b0ba 100644 (file)
@@ -60,7 +60,6 @@
 namespace WebCore {
 
 using namespace HTMLNames;
-using namespace std;
 
 Chrome::Chrome(Page& page, ChromeClient& client)
     : m_page(page)
index fd697fb..6527a06 100644 (file)
@@ -35,8 +35,6 @@
 #include <wtf/HashSet.h>
 #include <wtf/StdLibExtras.h>
 
-using namespace std;
-
 namespace WebCore {
 
 static const int maxIntervalForUserGestureForwarding = 1000; // One second matches Gecko.
@@ -178,7 +176,7 @@ void DOMTimer::adjustMinimumTimerInterval(double oldMinimumTimerInterval)
 
 double DOMTimer::intervalClampedToMinimum(int timeout, double minimumTimerInterval) const
 {
-    double intervalMilliseconds = max(oneMillisecond, timeout * oneMillisecond);
+    double intervalMilliseconds = std::max(oneMillisecond, timeout * oneMillisecond);
 
     if (intervalMilliseconds < minimumTimerInterval && m_nestingLevel >= maxTimerNestingLevel)
         intervalMilliseconds = minimumTimerInterval;
index e1d6d16..e6eb490 100644 (file)
@@ -65,7 +65,6 @@
 namespace WebCore {
 
 using namespace HTMLNames;
-using namespace std;
 
 FocusNavigationScope::FocusNavigationScope(TreeScope* treeScope)
     : m_rootTreeScope(treeScope)
index 636cefe..6241ee3 100644 (file)
 #include "TiledBackingStore.h"
 #endif
 
-using namespace std;
-
 namespace WebCore {
 
 using namespace HTMLNames;
@@ -511,12 +509,12 @@ FloatSize Frame::resizePageRectsKeepingRatio(const FloatSize& originalSize, cons
         return FloatSize();
 
     if (contentRenderer()->style().isHorizontalWritingMode()) {
-        ASSERT(fabs(originalSize.width()) > numeric_limits<float>::epsilon());
+        ASSERT(fabs(originalSize.width()) > std::numeric_limits<float>::epsilon());
         float ratio = originalSize.height() / originalSize.width();
         resultSize.setWidth(floorf(expectedSize.width()));
         resultSize.setHeight(floorf(resultSize.width() * ratio));
     } else {
-        ASSERT(fabs(originalSize.height()) > numeric_limits<float>::epsilon());
+        ASSERT(fabs(originalSize.height()) > std::numeric_limits<float>::epsilon());
         float ratio = originalSize.width() / originalSize.height();
         resultSize.setHeight(floorf(expectedSize.height()));
         resultSize.setWidth(floorf(resultSize.height() * ratio));
index 51cb945..b5f1ca3 100644 (file)
@@ -31,8 +31,6 @@
 
 namespace WebCore {
 
-using namespace std;
-
 PageGroupLoadDeferrer::PageGroupLoadDeferrer(Page& page, bool deferSelf)
 {
     const HashSet<Page*>& pages = page.group().pages();
index 6a366ba..5bf6d87 100644 (file)
@@ -46,8 +46,6 @@
 #include "TextAutosizer.h"
 #include <limits>
 
-using namespace std;
-
 namespace WebCore {
 
 static void setImageLoadingSettings(Page* page)
index 085be22..dd3315e 100644 (file)
@@ -44,8 +44,6 @@
 #include <wtf/CurrentTime.h>
 #include <wtf/Ref.h>
 
-using namespace std;
-
 namespace WebCore {
 
 // The epsilon value we pass to UnitBezier::solve given that the animation is going to run over |dur| seconds. The longer the
@@ -66,7 +64,7 @@ static inline double solveCubicBezierFunction(double p1x, double p1y, double p2x
 static inline double solveStepsFunction(int numSteps, bool stepAtStart, double t)
 {
     if (stepAtStart)
-        return min(1.0, (floor(numSteps * t) + 1) / numSteps);
+        return std::min(1.0, (floor(numSteps * t) + 1) / numSteps);
     return floor(numSteps * t) / numSteps;
 }
 
@@ -469,7 +467,7 @@ void AnimationBase::fireAnimationEventsIfNeeded()
     // FIXME: we need to ensure that elapsedDuration is never < 0. If it is, this suggests that
     // we had a recalcStyle() outside of beginAnimationUpdate()/endAnimationUpdate().
     // Also check in getTimeToNextEvent().
-    elapsedDuration = max(elapsedDuration, 0.0);
+    elapsedDuration = std::max(elapsedDuration, 0.0);
     
     // Check for end timeout
     if (m_totalDuration >= 0 && elapsedDuration >= m_totalDuration) {
@@ -525,7 +523,7 @@ double AnimationBase::timeToNextService()
     
     if (m_animState == AnimationStateStartWaitTimer) {
         double timeFromNow = m_animation->delay() - (beginAnimationUpdateTime() - m_requestedStartTime);
-        return max(timeFromNow, 0.0);
+        return std::max(timeFromNow, 0.0);
     }
     
     fireAnimationEventsIfNeeded();
@@ -553,7 +551,7 @@ double AnimationBase::fractionalTime(double scale, double elapsedTime, double of
     const int integralIterationCount = static_cast<int>(m_animation->iterationCount());
     const bool iterationCountHasFractional = m_animation->iterationCount() - integralIterationCount;
     if (m_animation->iterationCount() != Animation::IterationCountInfinite && !iterationCountHasFractional)
-        integralTime = min(integralTime, integralIterationCount - 1);
+        integralTime = std::min(integralTime, integralIterationCount - 1);
 
     fractionalTime -= integralTime;
 
@@ -613,7 +611,7 @@ double AnimationBase::progress(double scale, double offset, const TimingFunction
 void AnimationBase::getTimeToNextEvent(double& time, bool& isLooping) const
 {
     // Decide when the end or loop event needs to fire
-    const double elapsedDuration = max(beginAnimationUpdateTime() - m_startTime, 0.0);
+    const double elapsedDuration = std::max(beginAnimationUpdateTime() - m_startTime, 0.0);
     double durationLeft = 0;
     double nextIterationTime = m_totalDuration;
 
index 67c5688..6f111b3 100644 (file)
@@ -38,8 +38,6 @@
 #include "RenderStyle.h"
 #include "StyleResolver.h"
 
-using namespace std;
-
 namespace WebCore {
 
 KeyframeAnimation::KeyframeAnimation(const Animation& animation, RenderElement* renderer, int index, CompositeAnimation* compAnim, RenderStyle* unanimatedStyle)
@@ -85,7 +83,7 @@ void KeyframeAnimation::fetchIntervalEndpointsForProperty(CSSPropertyID property
     // Find the first key
     double elapsedTime = getElapsedTime();
     if (m_animation->duration() && m_animation->iterationCount() != Animation::IterationCountInfinite)
-        elapsedTime = min(elapsedTime, m_animation->duration() * m_animation->iterationCount());
+        elapsedTime = std::min(elapsedTime, m_animation->duration() * m_animation->iterationCount());
 
     const double fractionalTime = this->fractionalTime(1, elapsedTime, 0);
 
index 0c0f3d8..b092f88 100644 (file)
@@ -37,8 +37,6 @@
 #include <wtf/MathExtras.h>
 #include <wtf/text/WTFString.h>
 
-using namespace std;
-
 namespace WebCore {
 
 // HTML5 specification defines minimum week of year is one.
index 729af75..787fb12 100644 (file)
@@ -37,8 +37,6 @@
 #include <algorithm>
 #include <wtf/PassOwnPtr.h>
 
-using namespace std;
-
 namespace WebCore {
 
 #if !ENABLE(SMOOTH_SCROLLING)
@@ -105,7 +103,7 @@ bool ScrollAnimator::handleWheelEvent(const PlatformWheelEvent& e)
         if (deltaY) {
             if (e.granularity() == ScrollByPageWheelEvent) {
                 bool negative = deltaY < 0;
-                deltaY = max(max(static_cast<float>(m_scrollableArea->visibleHeight()) * Scrollbar::minFractionToStepWhenPaging(), static_cast<float>(m_scrollableArea->visibleHeight() - Scrollbar::maxOverlapBetweenPages())), 1.0f);
+                deltaY = std::max(std::max(static_cast<float>(m_scrollableArea->visibleHeight()) * Scrollbar::minFractionToStepWhenPaging(), static_cast<float>(m_scrollableArea->visibleHeight() - Scrollbar::maxOverlapBetweenPages())), 1.0f);
                 if (negative)
                     deltaY = -deltaY;
             }
@@ -115,7 +113,7 @@ bool ScrollAnimator::handleWheelEvent(const PlatformWheelEvent& e)
         if (deltaX) {
             if (e.granularity() == ScrollByPageWheelEvent) {
                 bool negative = deltaX < 0;
-                deltaX = max(max(static_cast<float>(m_scrollableArea->visibleWidth()) * Scrollbar::minFractionToStepWhenPaging(), static_cast<float>(m_scrollableArea->visibleWidth() - Scrollbar::maxOverlapBetweenPages())), 1.0f);
+                deltaX = std::max(std::max(static_cast<float>(m_scrollableArea->visibleWidth()) * Scrollbar::minFractionToStepWhenPaging(), static_cast<float>(m_scrollableArea->visibleWidth() - Scrollbar::maxOverlapBetweenPages())), 1.0f);
                 if (negative)
                     deltaX = -deltaX;
             }
index bbae3de..c2c3857 100644 (file)
@@ -36,8 +36,6 @@
 #include "ScrollbarTheme.h"
 #include <wtf/StdLibExtras.h>
 
-using namespace std;
-
 namespace WebCore {
 
 ScrollView::ScrollView()
@@ -256,8 +254,8 @@ IntSize ScrollView::unscaledVisibleContentSize(VisibleContentRectIncludesScrollb
             horizontalScrollbarHeight = !horizontalBar->isOverlayScrollbar() ? horizontalBar->height() : 0;
     }
 
-    return IntSize(max(0, width() - verticalScrollbarWidth),
-                   max(0, height() - horizontalScrollbarHeight));
+    return IntSize(std::max(0, width() - verticalScrollbarWidth),
+                   std::max(0, height() - horizontalScrollbarHeight));
 }
 
 #if !PLATFORM(GTK)
@@ -387,8 +385,8 @@ void ScrollView::setScrollOffset(const IntPoint& offset)
     int horizontalOffset = offset.x();
     int verticalOffset = offset.y();
     if (constrainsScrollingToContentEdge()) {
-        horizontalOffset = max(min(horizontalOffset, contentsWidth() - visibleWidth()), 0);
-        verticalOffset = max(min(verticalOffset, totalContentsSize().height() - visibleHeight()), 0);
+        horizontalOffset = std::max(std::min(horizontalOffset, contentsWidth() - visibleWidth()), 0);
+        verticalOffset = std::max(std::min(verticalOffset, totalContentsSize().height() - visibleHeight()), 0);
     }
 
     IntSize newOffset = m_scrollOffset;
@@ -623,7 +621,7 @@ void ScrollView::updateScrollbars(const IntSize& desiredOffset)
 
     if (m_horizontalScrollbar) {
         int clientWidth = visibleWidth();
-        int pageStep = max(max<int>(clientWidth * Scrollbar::minFractionToStepWhenPaging(), clientWidth - Scrollbar::maxOverlapBetweenPages()), 1);
+        int pageStep = std::max(std::max<int>(clientWidth * Scrollbar::minFractionToStepWhenPaging(), clientWidth - Scrollbar::maxOverlapBetweenPages()), 1);
         IntRect oldRect(m_horizontalScrollbar->frameRect());
         IntRect hBarRect(0,
                         height() - m_horizontalScrollbar->height(),
@@ -644,7 +642,7 @@ void ScrollView::updateScrollbars(const IntSize& desiredOffset)
 
     if (m_verticalScrollbar) {
         int clientHeight = visibleHeight();
-        int pageStep = max(max<int>(clientHeight * Scrollbar::minFractionToStepWhenPaging(), clientHeight - Scrollbar::maxOverlapBetweenPages()), 1);
+        int pageStep = std::max(std::max<int>(clientHeight * Scrollbar::minFractionToStepWhenPaging(), clientHeight - Scrollbar::maxOverlapBetweenPages()), 1);
         IntRect oldRect(m_verticalScrollbar->frameRect());
         IntRect vBarRect(width() - m_verticalScrollbar->width(), 
                          0,
@@ -724,7 +722,7 @@ void ScrollView::scrollContents(const IntSize& scrollDelta)
     if (m_drawPanScrollIcon) {
         // FIXME: the pan icon is broken when accelerated compositing is on, since it will draw under the compositing layers.
         // https://bugs.webkit.org/show_bug.cgi?id=47837
-        int panIconDirtySquareSizeLength = 2 * (panIconSizeLength + max(abs(scrollDelta.width()), abs(scrollDelta.height()))); // We only want to repaint what's necessary
+        int panIconDirtySquareSizeLength = 2 * (panIconSizeLength + std::max(abs(scrollDelta.width()), abs(scrollDelta.height()))); // We only want to repaint what's necessary
         IntPoint panIconDirtySquareLocation = IntPoint(m_panScrollIconPoint.x() - (panIconDirtySquareSizeLength / 2), m_panScrollIconPoint.y() - (panIconDirtySquareSizeLength / 2));
         IntRect panScrollIconDirtyRect = IntRect(panIconDirtySquareLocation, IntSize(panIconDirtySquareSizeLength, panIconDirtySquareSizeLength));
         panScrollIconDirtyRect.intersect(clipRect);
index 550560e..9e4a63b 100644 (file)
@@ -34,8 +34,6 @@
 #include "ScrollbarTheme.h"
 #include <algorithm>
 
-using namespace std;
-
 #if PLATFORM(GTK)
 // The position of the scrollbar thumb affects the appearance of the steppers, so
 // when the thumb moves, we have to invalidate them for painting.
@@ -282,9 +280,9 @@ void Scrollbar::moveThumb(int pos, bool draggingDocument)
         FloatPoint currentPosition = m_scrollableArea->scrollAnimator()->currentPosition();
         int destinationPosition = (m_orientation == HorizontalScrollbar ? currentPosition.x() : currentPosition.y()) + delta;
         if (delta > 0)
-            destinationPosition = min(destinationPosition + delta, maximum());
+            destinationPosition = std::min(destinationPosition + delta, maximum());
         else if (delta < 0)
-            destinationPosition = max(destinationPosition + delta, 0);
+            destinationPosition = std::max(destinationPosition + delta, 0);
         m_scrollableArea->scrollToOffsetWithoutAnimation(m_orientation, destinationPosition);
         m_documentDragPos = pos;
         return;
@@ -301,9 +299,9 @@ void Scrollbar::moveThumb(int pos, bool draggingDocument)
     int trackLen = theme()->trackLength(this);
     int maxPos = trackLen - thumbLen;
     if (delta > 0)
-        delta = min(maxPos - thumbPos, delta);
+        delta = std::min(maxPos - thumbPos, delta);
     else if (delta < 0)
-        delta = max(-thumbPos, delta);
+        delta = std::max(-thumbPos, delta);
     
     if (delta) {
         float newPosition = static_cast<float>(thumbPos + delta) * maximum() / (trackLen - thumbLen);
index 523b0aa..a0fef74 100644 (file)
@@ -29,8 +29,6 @@
 #include "GraphicsContext.h"
 #include "ScrollbarThemeClient.h"
 
-using namespace std;
-
 namespace WebCore {
 
 bool ScrollbarThemeComposite::paint(ScrollbarThemeClient* scrollbar, GraphicsContext* graphicsContext, const IntRect& damageRect)
@@ -214,7 +212,7 @@ static float usedTotalSize(ScrollbarThemeClient* scrollbar)
 {
     float overhangAtStart = -scrollbar->currentPos();
     float overhangAtEnd = scrollbar->currentPos() + scrollbar->visibleSize() - scrollbar->totalSize();
-    float overhang = max(0.0f, max(overhangAtStart, overhangAtEnd));
+    float overhang = std::max(0.0f, std::max(overhangAtStart, overhangAtEnd));
     return scrollbar->totalSize() + overhang;
 }
 
@@ -225,7 +223,7 @@ int ScrollbarThemeComposite::thumbPosition(ScrollbarThemeClient* scrollbar)
         // Avoid doing a floating point divide by zero and return 1 when usedTotalSize == visibleSize.
         if (!size)
             return 1;
-        float pos = max(0.0f, scrollbar->currentPos()) * (trackLength(scrollbar) - thumbLength(scrollbar)) / size;
+        float pos = std::max(0.0f, scrollbar->currentPos()) * (trackLength(scrollbar) - thumbLength(scrollbar)) / size;
         return (pos < 1 && pos > 0) ? 1 : pos;
     }
     return 0;
@@ -239,7 +237,7 @@ int ScrollbarThemeComposite::thumbLength(ScrollbarThemeClient* scrollbar)
     float proportion = scrollbar->visibleSize() / usedTotalSize(scrollbar);
     int trackLen = trackLength(scrollbar);
     int length = round(proportion * trackLen);
-    length = max(length, minimumThumbLength(scrollbar));
+    length = std::max(length, minimumThumbLength(scrollbar));
     if (length > trackLen)
         length = 0; // Once the thumb is below the track length, it just goes away (to make more room for the track).
     return length;
index 5587aa3..a5d955b 100644 (file)
@@ -36,8 +36,6 @@
 #include "DiskImageCacheIOS.h"
 #endif
 
-using namespace std;
-
 namespace WebCore {
 
 static const unsigned segmentSize = 0x1000;
@@ -305,7 +303,7 @@ void SharedBuffer::append(const char* data, unsigned length)
         segment = m_segments.last() + positionInSegment;
 
     unsigned segmentFreeSpace = segmentSize - positionInSegment;
-    unsigned bytesToCopy = min(length, segmentFreeSpace);
+    unsigned bytesToCopy = std::min(length, segmentFreeSpace);
 
     for (;;) {
         memcpy(segment, data, bytesToCopy);
@@ -316,7 +314,7 @@ void SharedBuffer::append(const char* data, unsigned length)
         data += bytesToCopy;
         segment = allocateSegment();
         m_segments.append(segment);
-        bytesToCopy = min(length, segmentSize);
+        bytesToCopy = std::min(length, segmentSize);
     }
 #else
     m_size += length;
@@ -380,7 +378,7 @@ PassOwnPtr<PurgeableBuffer> SharedBuffer::releasePurgeableBuffer()
 void SharedBuffer::copyBufferAndClear(char* destination, unsigned bytesToCopy) const
 {
     for (unsigned i = 0; i < m_segments.size(); ++i) {
-        unsigned effectiveBytesToCopy = min(bytesToCopy, segmentSize);
+        unsigned effectiveBytesToCopy = std::min(bytesToCopy, segmentSize);
         memcpy(destination, m_segments[i], effectiveBytesToCopy);
         destination += effectiveBytesToCopy;
         bytesToCopy -= effectiveBytesToCopy;
@@ -440,7 +438,7 @@ unsigned SharedBuffer::getSomeData(const char*& someData, unsigned position) con
     unsigned segment = segmentIndex(position);
     if (segment < segments) {
         unsigned bytesLeft = totalSize - consecutiveSize;
-        unsigned segmentedSize = min(maxSegmentedSize, bytesLeft);
+        unsigned segmentedSize = std::min(maxSegmentedSize, bytesLeft);
 
         unsigned positionInSegment = offsetInSegment(position);
         someData = m_segments[segment] + positionInSegment;
index 8520d77..846440f 100644 (file)
@@ -33,8 +33,6 @@
 #include <wtf/CurrentTime.h>
 #include <wtf/MainThread.h>
 
-using namespace std;
-
 namespace WebCore {
 
 // Fire timers for this length of time, and then quit to let the run loop process user input events.
@@ -95,7 +93,7 @@ void ThreadTimers::updateSharedTimer()
                 return;
         } 
         m_pendingSharedTimerFireTime = nextFireTime;
-        m_sharedTimer->setFireInterval(max(nextFireTime - currentMonotonicTime, 0.0));
+        m_sharedTimer->setFireInterval(std::max(nextFireTime - currentMonotonicTime, 0.0));
     }
 }
 
index 4a160a3..31a405d 100644 (file)
@@ -37,8 +37,6 @@
 #include <wtf/HashSet.h>
 #include <wtf/Vector.h>
 
-using namespace std;
-
 namespace WebCore {
 
 class TimerHeapReference;
@@ -108,7 +106,7 @@ inline void swap(TimerHeapReference a, TimerHeapReference b)
 
 // Class to represent iterators in the heap when calling the standard library heap algorithms.
 // Uses a custom pointer and reference type that update indices for pointers in the heap.
-class TimerHeapIterator : public iterator<random_access_iterator_tag, TimerBase*, ptrdiff_t, TimerHeapPointer, TimerHeapReference> {
+class TimerHeapIterator : public std::iterator<std::random_access_iterator_tag, TimerBase*, ptrdiff_t, TimerHeapPointer, TimerHeapReference> {
 public:
     explicit TimerHeapIterator(TimerBase** pointer) : m_pointer(pointer) { checkConsistency(); }
 
@@ -182,7 +180,7 @@ inline bool TimerHeapLessThanFunction::operator()(const TimerBase* a, const Time
     // We need to look at the difference of the insertion orders instead of comparing the two 
     // outright in case of overflow. 
     unsigned difference = a->m_heapInsertionOrder - b->m_heapInsertionOrder;
-    return difference < numeric_limits<unsigned>::max() / 2;
+    return difference < std::numeric_limits<unsigned>::max() / 2;
 }
 
 // ----------------
@@ -299,7 +297,7 @@ inline void TimerBase::heapPop()
 {
     // Temporarily force this timer to have the minimum key so we can pop it.
     double fireTime = m_nextFireTime;
-    m_nextFireTime = -numeric_limits<double>::infinity();
+    m_nextFireTime = -std::numeric_limits<double>::infinity();
     heapDecreaseKey();
     heapPopMin();
     m_nextFireTime = fireTime;
@@ -415,7 +413,7 @@ void TimerBase::didChangeAlignmentInterval()
 double TimerBase::nextUnalignedFireInterval() const
 {
     ASSERT(isActive());
-    return max(m_unalignedNextFireTime - monotonicallyIncreasingTime(), 0.0);
+    return std::max(m_unalignedNextFireTime - monotonicallyIncreasingTime(), 0.0);
 }
 
 } // namespace WebCore
index a4e4111..46abb80 100644 (file)
@@ -46,7 +46,6 @@
 // We either have to optimize that operator so it doesn't involve
 // so many allocations, or change this to use StringBuffer instead.
 
-using namespace std;
 using namespace WTF;
 
 namespace WebCore {
@@ -1532,7 +1531,7 @@ static void findHostnamesInMailToURL(const UChar* str, int strLen, Vector<pair<i
                 done = false;
             }
 
-            nameRanges.append(make_pair(hostnameStart, hostnameEnd));
+            nameRanges.append(std::make_pair(hostnameStart, hostnameEnd));
 
             if (done)
                 return;
@@ -1877,7 +1876,7 @@ bool portAllowed(const URL& url)
 #endif
 
     // If the port is not in the blocked port list, allow it.
-    if (!binary_search(blockedPortList, blockedPortListEnd, port))
+    if (!std::binary_search(blockedPortList, blockedPortListEnd, port))
         return true;
 
     // Allow ports 21 and 22 for FTP URLs, as Mozilla does.
index f041e32..59f2b37 100644 (file)
@@ -32,8 +32,6 @@
 #include <algorithm>
 #include <wtf/MathExtras.h>
 
-using namespace std;
 namespace WebCore {
 
 const double AudioResampler::MaxRate = 8.0;
@@ -113,7 +111,7 @@ void AudioResampler::setRate(double rate)
     if (std::isnan(rate) || std::isinf(rate) || rate <= 0.0)
         return;
     
-    m_rate = min(AudioResampler::MaxRate, rate);
+    m_rate = std::min(AudioResampler::MaxRate, rate);
 }
 
 void AudioResampler::reset()
index 7b99997..86a8eb5 100644 (file)
@@ -31,8 +31,6 @@
 #include "AudioResampler.h"
 #include <algorithm>
 
-using namespace std;
-
 namespace WebCore {
     
 const size_t AudioResamplerKernel::MaxFramesToProcess = 128;
@@ -80,8 +78,8 @@ void AudioResamplerKernel::process(float* destination, size_t framesToProcess)
     float* source = m_sourceBuffer.data();
     
     double rate = this->rate();
-    rate = max(0.0, rate);
-    rate = min(AudioResampler::MaxRate, rate);
+    rate = std::max(0.0, rate);
+    rate = std::min(AudioResampler::MaxRate, rate);
     
     // Start out with the previous saved values (if any).
     if (m_fillIndex > 0) {
index f3d9873..c7a6457 100644 (file)
@@ -35,8 +35,6 @@
 #include <algorithm>
 #include <math.h>
 
-using namespace std;
-
 namespace WebCore {
 
 DistanceEffect::DistanceEffect()
@@ -51,11 +49,11 @@ DistanceEffect::DistanceEffect()
 double DistanceEffect::gain(double distance)
 {
     // don't go beyond maximum distance
-    distance = min(distance, m_maxDistance);
+    distance = std::min(distance, m_maxDistance);
 
     // if clamped, don't get closer than reference distance
     if (m_isClamped)
-        distance = max(distance, m_refDistance);
+        distance = std::max(distance, m_refDistance);
 
     switch (m_model) {
     case ModelLinear:
index 4abe8e7..b57e71f 100644 (file)
@@ -37,8 +37,6 @@
 #include <algorithm>
 #include <wtf/MathExtras.h>
 
-using namespace std;
-
 namespace WebCore {
 
 using namespace AudioUtilities;
@@ -240,7 +238,7 @@ void DynamicsCompressorKernel::process(float* sourceChannels[],
     float masterLinearGain = decibelsToLinear(dbPostGain) * fullRangeMakeupGain;
 
     // Attack parameters.
-    attackTime = max(0.001f, attackTime);
+    attackTime = std::max(0.001f, attackTime);
     float attackFrames = attackTime * sampleRate;
 
     // Release parameters.
@@ -323,8 +321,8 @@ void DynamicsCompressorKernel::process(float* sourceChannels[],
 
             // Contain within range: -12 -> 0 then scale to go from 0 -> 3
             float x = compressionDiffDb;
-            x = max(-12.0f, x);
-            x = min(0.0f, x);
+            x = std::max(-12.0f, x);
+            x = std::min(0.0f, x);
             x = 0.25f * (x + 12);
 
             // Compute adaptive release curve using 4th order polynomial.
@@ -352,7 +350,7 @@ void DynamicsCompressorKernel::process(float* sourceChannels[],
             if (m_maxAttackCompressionDiffDb == -1 || m_maxAttackCompressionDiffDb < compressionDiffDb)
                 m_maxAttackCompressionDiffDb = compressionDiffDb;
 
-            float effAttenDiffDb = max(0.5f, m_maxAttackCompressionDiffDb);
+            float effAttenDiffDb = std::max(0.5f, m_maxAttackCompressionDiffDb);
 
             float x = 0.25f / effAttenDiffDb;
             envelopeRate = 1 - powf(x, 1 / attackFrames);
@@ -397,7 +395,7 @@ void DynamicsCompressorKernel::process(float* sourceChannels[],
                 float attenuation = absInput <= 0.0001f ? 1 : shapedInput / absInput;
 
                 float attenuationDb = -linearToDecibels(attenuation);
-                attenuationDb = max(2.0f, attenuationDb);
+                attenuationDb = std::max(2.0f, attenuationDb);
 
                 float dbPerFrame = attenuationDb / satReleaseFrames;
 
@@ -407,7 +405,7 @@ void DynamicsCompressorKernel::process(float* sourceChannels[],
                 float rate = isRelease ? satReleaseRate : 1;
 
                 detectorAverage += (attenuation - detectorAverage) * rate;
-                detectorAverage = min(1.0f, detectorAverage);
+                detectorAverage = std::min(1.0f, detectorAverage);
 
                 // Fix gremlins.
                 if (std::isnan(detectorAverage))
@@ -422,7 +420,7 @@ void DynamicsCompressorKernel::process(float* sourceChannels[],
                 } else {
                     // Release - exponentially increase gain to 1.0
                     compressorGain *= envelopeRate;
-                    compressorGain = min(1.0f, compressorGain);
+                    compressorGain = std::min(1.0f, compressorGain);
                 }
 
                 // Warp pre-compression gain to smooth out sharp exponential transition points.
index 6b229f8..986a9bd 100644 (file)
@@ -36,8 +36,6 @@
 // Use a 50ms smoothing / de-zippering time-constant.
 const float SmoothingTimeConstant = 0.050f;
 
-using namespace std;
-
 namespace WebCore {
 
 EqualPowerPanner::EqualPowerPanner(float sampleRate)
@@ -72,8 +70,8 @@ void EqualPowerPanner::pan(double azimuth, double /*elevation*/, const AudioBus*
         return;
     
     // Clamp azimuth to allowed range of -180 -> +180.
-    azimuth = max(-180.0, azimuth);
-    azimuth = min(180.0, azimuth);
+    azimuth = std::max(-180.0, azimuth);
+    azimuth = std::min(180.0, azimuth);
     
     // Alias the azimuth ranges behind us to in front of us:
     // -90 -> -180 to -90 -> 0 and 90 -> 180 to 90 -> 0
index 4db4dca..9d12452 100644 (file)
@@ -34,8 +34,6 @@
 
 #include "HRTFElevation.h"
 
-using namespace std;
-
 namespace WebCore {
 
 const int HRTFDatabase::MinElevation = -45;
@@ -112,8 +110,8 @@ void HRTFDatabase::getKernelsFromAzimuthElevation(double azimuthBlend, unsigned
 unsigned HRTFDatabase::indexFromElevationAngle(double elevationAngle)
 {
     // Clamp to allowed range.
-    elevationAngle = max(static_cast<double>(MinElevation), elevationAngle);
-    elevationAngle = min(static_cast<double>(MaxElevation), elevationAngle);
+    elevationAngle = std::max(static_cast<double>(MinElevation), elevationAngle);
+    elevationAngle = std::min(static_cast<double>(MaxElevation), elevationAngle);
 
     unsigned elevationIndex = static_cast<int>(InterpolationFactor * (elevationAngle - MinElevation) / RawElevationAngleSpacing);    
     return elevationIndex;
index 5596608..38c1d16 100644 (file)
@@ -42,8 +42,7 @@
 #include <math.h>
 #include <wtf/OwnPtr.h>
 
-using namespace std;
+
 namespace WebCore {
 
 const unsigned HRTFElevation::AzimuthSpacing = 15;
@@ -254,7 +253,7 @@ PassOwnPtr<HRTFElevation> HRTFElevation::createForSubject(const String& subjectN
     for (unsigned rawIndex = 0; rawIndex < NumberOfRawAzimuths; ++rawIndex) {
         // Don't let elevation exceed maximum for this azimuth.
         int maxElevation = maxElevations[rawIndex];
-        int actualElevation = min(elevation, maxElevation);
+        int actualElevation = std::min(elevation, maxElevation);
 
         bool success = calculateKernelsForAzimuthElevation(rawIndex * AzimuthSpacing, actualElevation, sampleRate, subjectName, kernelListL->at(interpolatedIndex), kernelListR->at(interpolatedIndex));
         if (!success)
index 50d9a8c..8ebc00a 100644 (file)
@@ -38,8 +38,6 @@
 #include "FloatConversion.h"
 #include <wtf/MathExtras.h>
 
-using namespace std;
-
 namespace WebCore {
 
 // Takes the input AudioChannel as an input impulse response and calculates the average group delay.
@@ -82,7 +80,7 @@ HRTFKernel::HRTFKernel(AudioChannel* channel, size_t fftSize, float sampleRate)
     size_t responseLength = channel->length();
 
     // We need to truncate to fit into 1/2 the FFT size (with zero padding) in order to do proper convolution.
-    size_t truncatedResponseLength = min(responseLength, fftSize / 2); // truncate if necessary to max impulse response length allowed by FFT
+    size_t truncatedResponseLength = std::min(responseLength, fftSize / 2); // truncate if necessary to max impulse response length allowed by FFT
 
     // Quick fade-out (apply window) at truncation point
     unsigned numberOfFadeOutFrames = static_cast<unsigned>(sampleRate / 4410); // 10 sample-frames @44.1KHz sample-rate
@@ -123,7 +121,7 @@ PassRefPtr<HRTFKernel> HRTFKernel::createInterpolatedKernel(HRTFKernel* kernel1,
         return 0;
  
     ASSERT(x >= 0.0 && x < 1.0);
-    x = min(1.0f, max(0.0f, x));
+    x = std::min(1.0f, std::max(0.0f, x));
     
     float sampleRate1 = kernel1->sampleRate();
     float sampleRate2 = kernel2->sampleRate();
index c80e066..f282547 100644 (file)
@@ -36,8 +36,6 @@
 #include <wtf/MathExtras.h>
 #include <wtf/RefPtr.h>
 
-using namespace std;
-
 namespace WebCore {
 
 // The value of 2 milliseconds is larger than the largest delay which exists in any HRTFKernel from the default HRTFDatabase (0.0136 seconds).
@@ -115,8 +113,8 @@ int HRTFPanner::calculateDesiredAzimuthIndexAndBlend(double azimuth, double& azi
 
     // We don't immediately start using this azimuth index, but instead approach this index from the last index we rendered at.
     // This minimizes the clicks and graininess for moving sources which occur otherwise.
-    desiredAzimuthIndex = max(0, desiredAzimuthIndex);
-    desiredAzimuthIndex = min(numberOfAzimuths - 1, desiredAzimuthIndex);
+    desiredAzimuthIndex = std::max(0, desiredAzimuthIndex);
+    desiredAzimuthIndex = std::min(numberOfAzimuths - 1, desiredAzimuthIndex);
     return desiredAzimuthIndex;
 }
 
index 79c4237..32dd6ff 100644 (file)
 #include <wtf/OwnPtr.h>
 #include <wtf/PassOwnPtr.h>
 
-#if OS(DARWIN)
-using namespace std;
-#endif
-
 namespace WebCore {
 
 using namespace VectorMath;
index 35ef3ba..06ef554 100644 (file)
@@ -39,8 +39,6 @@
 #include <emmintrin.h>
 #endif
 
-using namespace std;
-
 // Input buffer layout, dividing the total buffer into regions (r0 - r5):
 //
 // |----------------|----------------------------------------------------------------|----------------|
@@ -164,7 +162,7 @@ public:
         float* buffer = bus->channel(0)->mutableData();
 
         // Clamp to number of frames available and zero-pad.
-        size_t framesToCopy = min(m_sourceFramesAvailable, framesToProcess);
+        size_t framesToCopy = std::min(m_sourceFramesAvailable, framesToProcess);
         memcpy(buffer, m_source, sizeof(float) * framesToCopy);
 
         // Zero-pad if necessary.
@@ -191,7 +189,7 @@ void SincResampler::process(const float* source, float* destination, unsigned nu
     unsigned remaining = numberOfDestinationFrames;
     
     while (remaining) {
-        unsigned framesThisTime = min(remaining, m_blockSize);
+        unsigned framesThisTime = std::min(remaining, m_blockSize);
         process(&sourceProvider, destination, framesThisTime);
         
         destination += framesThisTime;
index 0c2ef28..b3ecb50 100644 (file)
@@ -30,8 +30,6 @@
 #include <CoreFoundation/CFURL.h>
 #include <wtf/text/CString.h>
 
-using namespace std;
-
 namespace WebCore {
 
 URL::URL(CFURLRef url)
index 51c7100..22c8dc1 100644 (file)
@@ -33,8 +33,6 @@
 #include <wtf/MathExtras.h>
 #include <wtf/text/StringBuilder.h>
 
-using namespace std;
-
 namespace WebCore {
 
 #if !COMPILER(MSVC)
@@ -51,18 +49,18 @@ static const RGBA32 darkenedWhite = 0xFFABABAB;
 
 RGBA32 makeRGB(int r, int g, int b)
 {
-    return 0xFF000000 | max(0, min(r, 255)) << 16 | max(0, min(g, 255)) << 8 | max(0, min(b, 255));
+    return 0xFF000000 | std::max(0, std::min(r, 255)) << 16 | std::max(0, std::min(g, 255)) << 8 | std::max(0, std::min(b, 255));
 }
 
 RGBA32 makeRGBA(int r, int g, int b, int a)
 {
-    return max(0, min(a, 255)) << 24 | max(0, min(r, 255)) << 16 | max(0, min(g, 255)) << 8 | max(0, min(b, 255));
+    return std::max(0, std::min(a, 255)) << 24 | std::max(0, std::min(r, 255)) << 16 | std::max(0, std::min(g, 255)) << 8 | std::max(0, std::min(b, 255));
 }
 
 static int colorFloatToRGBAByte(float f)
 {
     // We use lroundf and 255 instead of nextafterf(256, 0) to match CG's rounding
-    return max(0, min(static_cast<int>(lroundf(255.0f * f)), 255));
+    return std::max(0, std::min(static_cast<int>(lroundf(255.0f * f)), 255));
 }
 
 RGBA32 makeRGBA32FromFloats(float r, float g, float b, float a)
@@ -278,13 +276,13 @@ Color Color::light() const
     float r, g, b, a;
     getRGBA(r, g, b, a);
 
-    float v = max(r, max(g, b));
+    float v = std::max(r, std::max(g, b));
 
     if (v == 0.0f)
         // Lightened black with alpha.
         return Color(0x54, 0x54, 0x54, alpha());
 
-    float multiplier = min(1.0f, v + 0.33f) / v;
+    float multiplier = std::min(1.0f, v + 0.33f) / v;
 
     return Color(static_cast<int>(multiplier * r * scaleFactor),
                  static_cast<int>(multiplier * g * scaleFactor),
@@ -303,8 +301,8 @@ Color Color::dark() const
     float r, g, b, a;
     getRGBA(r, g, b, a);
 
-    float v = max(r, max(g, b));
-    float multiplier = max(0.0f, (v - 0.33f) / v);
+    float v = std::max(r, std::max(g, b));
+    float multiplier = std::max(0.0f, (v - 0.33f) / v);
 
     return Color(static_cast<int>(multiplier * r * scaleFactor),
                  static_cast<int>(multiplier * g * scaleFactor),
index 2e158df..b0db2df 100644 (file)
@@ -30,8 +30,6 @@
 #include "GraphicsContext.h"
 #include "ImageBuffer.h"
 
-using namespace std;
-
 namespace WebCore {
 
 CrossfadeGeneratedImage::CrossfadeGeneratedImage(Image* fromImage, Image* toImage, float percentage, IntSize crossfadeSize, const IntSize& size)
index cb15111..655beab 100644 (file)
 #include <algorithm>
 #include <limits>
 
-using namespace std;
-
 namespace WebCore {
 
 static inline float min4(float a, float b, float c, float d)
 {
-    return min(min(a, b), min(c, d));
+    return std::min(std::min(a, b), std::min(c, d));
 }
 
 static inline float max4(float a, float b, float c, float d)
 {
-    return max(max(a, b), max(c, d));
+    return std::max(std::max(a, b), std::max(c, d));
 }
 
 inline float dot(const FloatSize& a, const FloatSize& b)
@@ -94,7 +92,7 @@ FloatRect FloatQuad::boundingBox() const
 
 static inline bool withinEpsilon(float a, float b)
 {
-    return fabs(a - b) < numeric_limits<float>::epsilon();
+    return fabs(a - b) < std::numeric_limits<float>::epsilon();
 }
 
 bool FloatQuad::isRectilinear() const
index 3225886..60ae586 100644 (file)
@@ -32,8 +32,6 @@
 #include <limits>
 #include <math.h>
 
-using namespace std;
-
 namespace WebCore {
 
 FloatSize::FloatSize(const IntSize& size) : m_width(size.width()), m_height(size.height())
@@ -47,7 +45,7 @@ float FloatSize::diagonalLength() const
 
 bool FloatSize::isZero() const
 {
-    return fabs(m_width) < numeric_limits<float>::epsilon() && fabs(m_height) < numeric_limits<float>::epsilon();
+    return fabs(m_width) < std::numeric_limits<float>::epsilon() && fabs(m_height) < std::numeric_limits<float>::epsilon();
 }
 
 bool FloatSize::isExpressibleAsIntSize() const
index 5801f4a..0740173 100644 (file)
@@ -38,7 +38,6 @@
 
 using namespace WTF;
 using namespace Unicode;
-using namespace std;
 
 namespace WebCore {
 
@@ -285,8 +284,8 @@ float Font::floatWidthForSimpleText(const TextRun& run, HashSet<const SimpleFont
     it.advance(run.length(), (typesettingFeatures() & (Kerning | Ligatures)) ? &glyphBuffer : 0);
 
     if (glyphOverflow) {
-        glyphOverflow->top = max<int>(glyphOverflow->top, ceilf(-it.minGlyphBoundingBoxY()) - (glyphOverflow->computeBounds ? 0 : fontMetrics().ascent()));
-        glyphOverflow->bottom = max<int>(glyphOverflow->bottom, ceilf(it.maxGlyphBoundingBoxY()) - (glyphOverflow->computeBounds ? 0 : fontMetrics().descent()));
+        glyphOverflow->top = std::max<int>(glyphOverflow->top, ceilf(-it.minGlyphBoundingBoxY()) - (glyphOverflow->computeBounds ? 0 : fontMetrics().ascent()));
+        glyphOverflow->bottom = std::max<int>(glyphOverflow->bottom, ceilf(it.maxGlyphBoundingBoxY()) - (glyphOverflow->computeBounds ? 0 : fontMetrics().descent()));
         glyphOverflow->left = ceilf(it.firstGlyphOverflow());
         glyphOverflow->right = ceilf(it.lastGlyphOverflow());
     }
index 913ad90..21bea37 100644 (file)
@@ -27,8 +27,6 @@
 #include <wtf/text/StringHash.h>
 #include <wtf/text/WTFString.h>
 
-using namespace std;
-
 namespace WebCore {
 
 FontPlatformData::FontPlatformData(WTF::HashTableDeletedValueType)
index f5c9d7e..f21f914 100644 (file)
@@ -36,8 +36,6 @@
 
 #include "stdio.h"
 
-using namespace std;
-
 namespace WebCore {
 
 class TextRunIterator {
index e8d31be..8f2f1cf 100644 (file)
@@ -30,8 +30,6 @@
 
 #include <algorithm>
 
-using namespace std;
-
 namespace WebCore {
 
 bool RoundedRect::Radii::isZero() const
@@ -63,20 +61,20 @@ void RoundedRect::Radii::scale(float factor)
 void RoundedRect::Radii::expand(int topWidth, int bottomWidth, int leftWidth, int rightWidth)
 {
     if (m_topLeft.width() > 0 && m_topLeft.height() > 0) {
-        m_topLeft.setWidth(max<int>(0, m_topLeft.width() + leftWidth));
-        m_topLeft.setHeight(max<int>(0, m_topLeft.height() + topWidth));
+        m_topLeft.setWidth(std::max<int>(0, m_topLeft.width() + leftWidth));
+        m_topLeft.setHeight(std::max<int>(0, m_topLeft.height() + topWidth));
     }
     if (m_topRight.width() > 0 && m_topRight.height() > 0) {
-        m_topRight.setWidth(max<int>(0, m_topRight.width() + rightWidth));
-        m_topRight.setHeight(max<int>(0, m_topRight.height() + topWidth));
+        m_topRight.setWidth(std::max<int>(0, m_topRight.width() + rightWidth));
+        m_topRight.setHeight(std::max<int>(0, m_topRight.height() + topWidth));
     }
     if (m_bottomLeft.width() > 0 && m_bottomLeft.height() > 0) {
-        m_bottomLeft.setWidth(max<int>(0, m_bottomLeft.width() + leftWidth));
-        m_bottomLeft.setHeight(max<int>(0, m_bottomLeft.height() + bottomWidth));
+        m_bottomLeft.setWidth(std::max<int>(0, m_bottomLeft.width() + leftWidth));
+        m_bottomLeft.setHeight(std::max<int>(0, m_bottomLeft.height() + bottomWidth));
     }
     if (m_bottomRight.width() > 0 && m_bottomRight.height() > 0) {
-        m_bottomRight.setWidth(max<int>(0, m_bottomRight.width() + rightWidth));
-        m_bottomRight.setHeight(max<int>(0, m_bottomRight.height() + bottomWidth));
+        m_bottomRight.setWidth(std::max<int>(0, m_bottomRight.width() + rightWidth));
+        m_bottomRight.setHeight(std::max<int>(0, m_bottomRight.height() + bottomWidth));
     }
 }
 
index 7458ea8..7387273 100644 (file)
@@ -38,8 +38,6 @@
 #include <wtf/MathExtras.h>
 #include <wtf/Noncopyable.h>
 
-using namespace std;
-
 namespace WebCore {
 
 enum {
@@ -248,7 +246,7 @@ static void calculateLobes(int lobes[][2], float blurRadius, bool shadowsIgnoreT
 {
     int diameter;
     if (shadowsIgnoreTransforms)
-        diameter = max(2, static_cast<int>(floorf((2 / 3.f) * blurRadius))); // Canvas shadow. FIXME: we should adjust the blur radius higher up.
+        diameter = std::max(2, static_cast<int>(floorf((2 / 3.f) * blurRadius))); // Canvas shadow. FIXME: we should adjust the blur radius higher up.
     else {
         // http://dev.w3.org/csswg/css3-background/#box-shadow
         // Approximate a Gaussian blur with a standard deviation equal to half the blur radius,
@@ -258,7 +256,7 @@ static void calculateLobes(int lobes[][2], float blurRadius, bool shadowsIgnoreT
         float stdDev = blurRadius / 2;
         const float gaussianKernelFactor = 3 / 4.f * sqrtf(2 * piFloat);
         const float fudgeFactor = 0.88f;
-        diameter = max(2, static_cast<int>(floorf(stdDev * gaussianKernelFactor * fudgeFactor + 0.5f)));
+        diameter = std::max(2, static_cast<int>(floorf(stdDev * gaussianKernelFactor * fudgeFactor + 0.5f)));
     }
 
     if (diameter & 1) {
@@ -485,11 +483,11 @@ void ShadowBlur::drawShadowBuffer(GraphicsContext* graphicsContext)
 
 static void computeSliceSizesFromRadii(const IntSize& twiceRadius, const RoundedRect::Radii& radii, int& leftSlice, int& rightSlice, int& topSlice, int& bottomSlice)
 {
-    leftSlice = twiceRadius.width() + max(radii.topLeft().width(), radii.bottomLeft().width()); 
-    rightSlice = twiceRadius.width() + max(radii.topRight().width(), radii.bottomRight().width()); 
+    leftSlice = twiceRadius.width() + std::max(radii.topLeft().width(), radii.bottomLeft().width());
+    rightSlice = twiceRadius.width() + std::max(radii.topRight().width(), radii.bottomRight().width());
 
-    topSlice = twiceRadius.height() + max(radii.topLeft().height(), radii.topRight().height());
-    bottomSlice = twiceRadius.height() + max(radii.bottomLeft().height(), radii.bottomRight().height());
+    topSlice = twiceRadius.height() + std::max(radii.topLeft().height(), radii.topRight().height());
+    bottomSlice = twiceRadius.height() + std::max(radii.bottomLeft().height(), radii.bottomRight().height());
 }
 
 IntSize ShadowBlur::templateSize(const IntSize& radiusPadding, const RoundedRect::Radii& radii) const
index fe0fb98..32574a9 100644 (file)
@@ -38,8 +38,6 @@
 #include "OpenTypeVerticalData.h"
 #endif
 
-using namespace std;
-
 namespace WebCore {
 
 const float smallCapsFontSizeMultiplier = 0.7f;
@@ -104,7 +102,7 @@ void SimpleFontData::initCharWidths()
         m_avgCharWidth = m_fontMetrics.xHeight();
 
     if (m_maxCharWidth <= 0.f)
-        m_maxCharWidth = max(m_avgCharWidth, m_fontMetrics.floatAscent());
+        m_maxCharWidth = std::max(m_avgCharWidth, m_fontMetrics.floatAscent());
 }
 
 void SimpleFontData::platformGlyphInit()
index e2de30c..0fcd608 100644 (file)
@@ -31,7 +31,6 @@
 
 using namespace WTF;
 using namespace Unicode;
-using namespace std;
 
 namespace WebCore {
 
@@ -45,8 +44,8 @@ WidthIterator::WidthIterator(const Font* font, const TextRun& run, HashSet<const
     , m_typesettingFeatures(font->typesettingFeatures())
     , m_fallbackFonts(fallbackFonts)
     , m_accountForGlyphBounds(accountForGlyphBounds)
-    , 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_forTextEmphasis(forTextEmphasis)
@@ -266,13 +265,13 @@ inline unsigned WidthIterator::advanceInternal(TextIterator& textIterator, Glyph
         }
 
         if (shouldApplyFontTransforms() && glyphBuffer && Font::treatAsSpace(character))
-            charactersTreatedAsSpace.append(make_pair(glyphBuffer->size(),
+            charactersTreatedAsSpace.append(std::make_pair(glyphBuffer->size(),
                 OriginalAdvancesForCharacterTreatedAsSpace(character == ' ', glyphBuffer->size() ? glyphBuffer->advanceAt(glyphBuffer->size() - 1).width() : 0, width)));
 
         if (m_accountForGlyphBounds) {
             bounds = fontData->boundsForGlyph(glyph);
             if (!textIterator.currentCharacter())
-                m_firstGlyphOverflow = max<float>(0, -bounds.x());
+                m_firstGlyphOverflow = std::max<float>(0, -bounds.x());
         }
 
         if (m_forTextEmphasis && !Font::canReceiveTextEmphasis(character))
@@ -317,9 +316,9 @@ inline unsigned WidthIterator::advanceInternal(TextIterator& textIterator, Glyph
         lastRoundingWidth = width - oldWidth;
 
         if (m_accountForGlyphBounds) {
-            m_maxGlyphBoundingBoxY = max(m_maxGlyphBoundingBoxY, bounds.maxY());
-            m_minGlyphBoundingBoxY = min(m_minGlyphBoundingBoxY, bounds.y());
-            m_lastGlyphOverflow = max<float>(0, bounds.maxX() - width);
+            m_maxGlyphBoundingBoxY = std::max(m_maxGlyphBoundingBoxY, bounds.maxY());
+            m_minGlyphBoundingBoxY = std::min(m_minGlyphBoundingBoxY, bounds.y());
+            m_lastGlyphOverflow = std::max<float>(0, bounds.maxX() - width);
         }
     }
 
index 23951de..a571388 100644 (file)
@@ -93,8 +93,6 @@ SOFT_LINK_AVF_POINTER(CoreMedia, kCMTextMarkupAttribute_CharacterBackgroundColor
 #define kCMTextMarkupAttribute_BackgroundColorARGB getkCMTextMarkupAttribute_BackgroundColorARGB()
 #define kCMTextMarkupAttribute_CharacterBackgroundColorARGB getkCMTextMarkupAttribute_CharacterBackgroundColorARGB()
 
-using namespace std;
-
 namespace WebCore {
 
 AVFInbandTrackParent::~AVFInbandTrackParent()
@@ -410,7 +408,7 @@ void InbandTextTrackPrivateAVF::processCue(CFArrayRef attributedStrings, double
 
         m_currentCueStartTime = time;
         cueData->setStartTime(m_currentCueStartTime);
-        cueData->setEndTime(numeric_limits<double>::infinity());
+        cueData->setEndTime(std::numeric_limits<double>::infinity());
         
         // AVFoundation cue "position" is to the center of the text so adjust relative to the edge because we will use it to
         // set CSS "left".
index 8a29042..885597e 100644 (file)
@@ -43,8 +43,6 @@
 #include <CoreMedia/CoreMedia.h>
 #include <wtf/MainThread.h>
 
-using namespace std;
-
 namespace WebCore {
 
 MediaPlayerPrivateAVFoundation::MediaPlayerPrivateAVFoundation(MediaPlayer* player)
index a6b373b..fbc6109 100644 (file)
@@ -74,9 +74,6 @@ SOFT_LINK_POINTER(AVFoundation, AVMediaCharacteristicEasyToRead, NSString *)
 #define AVMediaCharacteristicTranscribesSpokenDialogForAccessibility getAVMediaCharacteristicTranscribesSpokenDialogForAccessibility()
 #define AVMediaCharacteristicDescribesMusicAndSoundForAccessibility getAVMediaCharacteristicDescribesMusicAndSoundForAccessibility()
 
-using namespace WebCore;
-using namespace std;
-
 namespace WebCore {
 
 InbandTextTrackPrivateAVFObjC::InbandTextTrackPrivateAVFObjC(AVFInbandTrackParent* player, AVMediaSelectionOption *selection)
index bd5c5e1..a8df55a 100644 (file)
@@ -53,9 +53,6 @@ SOFT_LINK_POINTER(AVFoundation, AVMetadataKeySpaceCommon, NSString *)
 #define AVMetadataCommonKeyTitle getAVMetadataCommonKeyTitle()
 #define AVMetadataKeySpaceCommon getAVMetadataKeySpaceCommon()
 
-using namespace WebCore;
-using namespace std;
-
 namespace WebCore {
 
 InbandTextTrackPrivateLegacyAVFObjC::InbandTextTrackPrivateLegacyAVFObjC(MediaPlayerPrivateAVFoundationObjC* player, AVPlayerItemTrack* track)
index fa7f805..8f4c366 100644 (file)
@@ -157,7 +157,6 @@ SOFT_LINK_POINTER(AVFoundation, AVPlayerItemLegibleOutputTextStylingResolutionSo
 #define kCMTimeZero getkCMTimeZero()
 
 using namespace WebCore;
-using namespace std;
 
 enum MediaPlayerAVFoundationObservationContext {
     MediaPlayerAVFoundationObservationContextPlayerItem,
@@ -626,7 +625,7 @@ float MediaPlayerPrivateAVFoundationObjC::platformDuration() const
         return narrowPrecisionToFloat(CMTimeGetSeconds(cmDuration));
 
     if (CMTIME_IS_INDEFINITE(cmDuration)) {
-        return numeric_limits<float>::infinity();
+        return std::numeric_limits<float>::infinity();
     }
 
     LOG(Media, "MediaPlayerPrivateAVFoundationObjC::platformDuration(%p) - invalid duration, returning %.0f", this, MediaPlayer::invalidTime());
@@ -639,9 +638,8 @@ float MediaPlayerPrivateAVFoundationObjC::currentTime() const
         return 0;
 
     CMTime itemTime = [m_avPlayerItem.get() currentTime];
-    if (CMTIME_IS_NUMERIC(itemTime)) {
-        return max(narrowPrecisionToFloat(CMTimeGetSeconds(itemTime)), 0.0f);
-    }
+    if (CMTIME_IS_NUMERIC(itemTime))
+        return std::max(narrowPrecisionToFloat(CMTimeGetSeconds(itemTime)), 0.0f);
 
     return 0;
 }
index 7a2adb5..9a44ba3 100644 (file)
@@ -56,8 +56,6 @@
 #include "PlatformCALayerWin.h"
 #endif
 
-using namespace std;
-
 namespace WebCore {
 
 // The threshold width or height above which a tiled layer will be used. This should be
@@ -653,7 +651,7 @@ void GraphicsLayerCA::setBackfaceVisibility(bool visible)
 
 void GraphicsLayerCA::setOpacity(float opacity)
 {
-    float clampedOpacity = max(0.0f, min(opacity, 1.0f));
+    float clampedOpacity = std::max(0.0f, std::min(opacity, 1.0f));
 
     if (clampedOpacity == m_opacity)
         return;
@@ -688,8 +686,8 @@ bool GraphicsLayerCA::setFilters(const FilterOperations& filterOperations)
 
 void GraphicsLayerCA::setNeedsDisplay()
 {
-    FloatRect hugeRect(-numeric_limits<float>::max() / 2, -numeric_limits<float>::max() / 2,
-                       numeric_limits<float>::max(), numeric_limits<float>::max());
+    FloatRect hugeRect(-std::numeric_limits<float>::max() / 2, -std::numeric_limits<float>::max() / 2,
+                       std::numeric_limits<float>::max(), std::numeric_limits<float>::max());
 
     setNeedsDisplayInRect(hugeRect);
 }
@@ -2455,7 +2453,7 @@ void GraphicsLayerCA::setupAnimation(PlatformCAAnimation* propertyAnim, const An
 
     float repeatCount = anim->iterationCount();
     if (repeatCount == Animation::IterationCountInfinite)
-        repeatCount = numeric_limits<float>::max();
+        repeatCount = std::numeric_limits<float>::max();
     else if (anim->direction() == Animation::AnimationDirectionAlternate || anim->direction() == Animation::AnimationDirectionAlternateReverse)
         repeatCount /= 2;
 
@@ -2821,7 +2819,7 @@ static float clampedContentsScaleForScale(float scale)
     // those too small to see.
     const float maxScale = 10.0f;
     const float minScale = 0.01f;
-    return max(minScale, min(scale, maxScale));
+    return std::max(minScale, std::min(scale, maxScale));
 }
 
 void GraphicsLayerCA::updateContentsScale(float pageScaleFactor)
index 2d8dca0..ff5b718 100644 (file)
@@ -34,8 +34,6 @@
 #import <wtf/MainThread.h>
 #import <utility>
 
-using namespace std;
-
 namespace WebCore {
     
 enum TileValidationPolicyFlag {
@@ -410,14 +408,14 @@ void TileController::getTileIndexRangeForRect(const IntRect& rect, TileIndex& to
     clampedRect.scale(m_scale);
     clampedRect.intersect(rect);
 
-    topLeft.setX(max(clampedRect.x() / m_tileSize.width(), 0));
-    topLeft.setY(max(clampedRect.y() / m_tileSize.height(), 0));
+    topLeft.setX(std::max(clampedRect.x() / m_tileSize.width(), 0));
+    topLeft.setY(std::max(clampedRect.y() / m_tileSize.height(), 0));
 
     int bottomXRatio = ceil((float)clampedRect.maxX() / m_tileSize.width());
-    bottomRight.setX(max(bottomXRatio - 1, 0));
+    bottomRight.setX(std::max(bottomXRatio - 1, 0));
 
     int bottomYRatio = ceil((float)clampedRect.maxY() / m_tileSize.height());
-    bottomRight.setY(max(bottomYRatio - 1, 0));
+    bottomRight.setY(std::max(bottomYRatio - 1, 0));
 }
 
 FloatRect TileController::computeTileCoverageRect(const FloatRect& previousVisibleRect, const FloatRect& currentVisibleRect) const
@@ -451,12 +449,12 @@ FloatRect TileController::computeTileCoverageRect(const FloatRect& previousVisib
     // Don't extend coverage before 0 or after the end.
     FloatRect coverageBounds = bounds();
     float coverageLeft = visibleRect.x() - (coverageHorizontalSize - visibleRect.width()) / 2;
-    coverageLeft = min(coverageLeft, coverageBounds.maxX() - coverageHorizontalSize);
-    coverageLeft = max(coverageLeft, coverageBounds.x());
+    coverageLeft = std::min(coverageLeft, coverageBounds.maxX() - coverageHorizontalSize);
+    coverageLeft = std::max(coverageLeft, coverageBounds.x());
 
     float coverageTop = visibleRect.y() - (coverageVerticalSize - visibleRect.height()) / 2;
-    coverageTop = min(coverageTop, coverageBounds.maxY() - coverageVerticalSize);
-    coverageTop = max(coverageTop, coverageBounds.y());
+    coverageTop = std::min(coverageTop, coverageBounds.maxY() - coverageVerticalSize);
+    coverageTop = std::max(coverageTop, coverageBounds.y());
 
     return FloatRect(coverageLeft, coverageTop, coverageHorizontalSize, coverageVerticalSize);
 }
index a88de7f..4a68162 100644 (file)
@@ -56,8 +56,6 @@ extern "C" {
     CG_EXTERN CGAffineTransform CGContextGetBaseCTM(CGContextRef);
 };
 
-using namespace std;
-
 // FIXME: The following using declaration should be in <wtf/HashFunctions.h>.
 using WTF::pairIntHash;
 
@@ -958,7 +956,7 @@ void GraphicsContext::setPlatformShadow(const FloatSize& offset, float blur, con
     }
 
     // Extreme "blur" values can make text drawing crash or take crazy long times, so clamp
-    blurRadius = min(blurRadius, narrowPrecisionToCGFloat(1000.0));
+    blurRadius = std::min(blurRadius, narrowPrecisionToCGFloat(1000.0));
 
     applyShadowOffsetWorkaroundIfNeeded(*this, xOffset, yOffset);
 
@@ -1244,14 +1242,14 @@ static FloatRect computeLineBoundsAndAntialiasingModeForText(GraphicsContext& co
 
     // Use a minimum thickness of 0.5 in user space.
     // See http://bugs.webkit.org/show_bug.cgi?id=4255 for details of why 0.5 is the right minimum thickness to use.
-    FloatRect initialBounds(point, FloatSize(width, max(context.strokeThickness(), 0.5f)));
+    FloatRect initialBounds(point, FloatSize(width, std::max(context.strokeThickness(), 0.5f)));
 
     if (printing || context.paintingDisabled() || !context.getCTM(GraphicsContext::DefinitelyIncludeDeviceScale).preservesAxisAlignment())
         return initialBounds;
 
     // On screen, use a minimum thickness of 1.0 in user space (later rounded to an integral number in device space).
     FloatRect adjustedBounds = initialBounds;
-    adjustedBounds.setHeight(max(initialBounds.width(), 1.0f));
+    adjustedBounds.setHeight(std::max(initialBounds.width(), 1.0f));
 
     // FIXME: This should be done a better way.
     // We try to round all parameters to integer boundaries in device space. If rounding pixels in device space
index bdae1e2..4fab678 100644 (file)
@@ -50,8 +50,6 @@
 #include <IOSurface/IOSurface.h>
 #endif
 
-using namespace std;
-
 namespace WebCore {
 
 #if USE(IOSURFACE_CANVAS_BACKING_STORE)
index 6848953..556ae54 100644 (file)
@@ -38,8 +38,6 @@
 #include <dispatch/dispatch.h>
 #endif
 
-using namespace std;
-
 #if USE(ACCELERATE)
 struct ScanlineData {
     vImagePixelCount scanlineWidth;
@@ -130,7 +128,7 @@ PassRefPtr<Uint8ClampedArray> ImageBufferData::getData(const IntRect& rect, cons
         destx = -originx;
         originx = 0;
     }
-    destw = min<int>(destw, ceilf(size.width() / resolutionScale) - originx);
+    destw = std::min<int>(destw, ceilf(size.width() / resolutionScale) - originx);
     originx *= resolutionScale;
     if (endx.unsafeGet() > size.width())
         endx = size.width();
@@ -144,7 +142,7 @@ PassRefPtr<Uint8ClampedArray> ImageBufferData::getData(const IntRect& rect, cons
         desty = -originy;
         originy = 0;
     }
-    desth = min<int>(desth, ceilf(size.height() / resolutionScale) - originy);
+    desth = std::min<int>(desth, ceilf(size.height() / resolutionScale) - originy);
     originy *= resolutionScale;
     if (endy.unsafeGet() > size.height())
         endy = size.height();
index e4c166f..413cd3f 100644 (file)
@@ -36,8 +36,6 @@
 #include "SharedBuffer.h"
 #include <ApplicationServices/ApplicationServices.h>
 
-using namespace std;
-
 namespace WebCore {
 
 const CFStringRef kCGImageSourceShouldPreferRGB32 = CFSTR("kCGImageSourceShouldPreferRGB32");
index 57818c6..bdc94d2 100644 (file)
@@ -31,8 +31,6 @@
 #include <runtime/Uint8ClampedArray.h>
 #include <wtf/MathExtras.h>
 
-using namespace std;
-
 namespace WebCore {
     
 FEDropShadow::FEDropShadow(Filter* filter, float stdX, float stdY, float dx, float dy, const Color& shadowColor, float shadowOpacity)
index 4957f47..5669ba1 100644 (file)
@@ -38,8 +38,6 @@
 #include <wtf/MathExtras.h>
 #include <wtf/ParallelJobs.h>
 
-using namespace std;
-
 static inline float gaussianKernelFactor()
 {
     return 3 / 4.f * sqrtf(2 * piFloat);
@@ -103,7 +101,7 @@ inline void boxBlur(Uint8ClampedArray* srcPixelArray, Uint8ClampedArray* dstPixe
             // Furthermore, this code path affects more than just the input area.
             if (edgeMode == EDGEMODE_NONE) {
                 // Fill the kernel
-                int maxKernelSize = min(dxRight, effectWidth);
+                int maxKernelSize = std::min(dxRight, effectWidth);
                 for (int i = 0; i < maxKernelSize; ++i)
                     sum += srcPixelArray->item(line + i * stride + channel);
 
@@ -173,7 +171,7 @@ inline void FEGaussianBlur::platformApplyGeneric(Uint8ClampedArray* srcPixelArra
 #else
             boxBlur(src, dst, kernelSizeX, dxLeft, dxRight, 4, stride, paintSize.width(), paintSize.height(), isAlphaImage(), m_edgeMode);
 #endif
-            swap(src, dst);
+            std::swap(src, dst);
         }
 
         if (kernelSizeY) {
@@ -186,7 +184,7 @@ inline void FEGaussianBlur::platformApplyGeneric(Uint8ClampedArray* srcPixelArra
 #else
             boxBlur(src, dst, kernelSizeY, dyLeft, dyRight, stride, 4, paintSize.height(), paintSize.width(), isAlphaImage(), m_edgeMode);
 #endif
-            swap(src, dst);
+            std::swap(src, dst);
         }
     }
 
@@ -279,10 +277,10 @@ void FEGaussianBlur::calculateUnscaledKernelSize(unsigned& kernelSizeX, unsigned
 
     kernelSizeX = 0;
     if (stdX)
-        kernelSizeX = max<unsigned>(2, static_cast<unsigned>(floorf(stdX * gaussianKernelFactor() + 0.5f)));
+        kernelSizeX = std::max<unsigned>(2, static_cast<unsigned>(floorf(stdX * gaussianKernelFactor() + 0.5f)));
     kernelSizeY = 0;
     if (stdY)
-        kernelSizeY = max<unsigned>(2, static_cast<unsigned>(floorf(stdY * gaussianKernelFactor() + 0.5f)));
+        kernelSizeY = std::max<unsigned>(2, static_cast<unsigned>(floorf(stdY * gaussianKernelFactor() + 0.5f)));
     
     // Limit the kernel size to 1000. A bigger radius won't make a big difference for the result image but
     // inflates the absolute paint rect to much. This is compatible with Firefox' behavior.
@@ -369,7 +367,7 @@ TextStream& FEGaussianBlur::externalRepresentation(TextStream& ts, int indent) c
 float FEGaussianBlur::calculateStdDeviation(float radius)
 {
     // Blur radius represents 2/3 times the kernel size, the dest pixel is half of the radius applied 3 times
-    return max((radius * 2 / 3.f - 0.5f) / gaussianKernelFactor(), 0.f);
+    return std::max((radius * 2 / 3.f - 0.5f) / gaussianKernelFactor(), 0.f);
 }
 
 } // namespace WebCore
index 9eb6d9a..642b0d5 100644 (file)
 #include <algorithm>
 #include <wtf/StdLibExtras.h>
 
-using namespace std;
-
 namespace WebCore {
 
-
 Texture::Texture(GraphicsContext3D* context, PassOwnPtr<Vector<unsigned int>> tileTextureIds, Format format, int width, int height, int maxTextureSize)
     : m_context(context)
     , m_format(format)
@@ -171,8 +168,8 @@ void Texture::updateSubRect(void* pixels, const IntRect& updateRect)
         // FIXME:  This could use PBO's to save doing an extra copy here.
     }
     int tempBuffSize = // Temporary buffer size is the smaller of the max texture size or the updateRectSanitized
-        min(m_tiles.maxTextureSize().width(), m_tiles.borderTexels() + updateRectSanitized.width()) *
-        min(m_tiles.maxTextureSize().height(), m_tiles.borderTexels() + updateRectSanitized.height());
+        std::min(m_tiles.maxTextureSize().width(), m_tiles.borderTexels() + updateRectSanitized.width()) *
+        std::min(m_tiles.maxTextureSize().height(), m_tiles.borderTexels() + updateRectSanitized.height());
     auto tempBuff = std::make_unique<uint32_t[]>(tempBuffSize);
 
     for (int tile = 0; tile < m_tiles.numTilesX() * m_tiles.numTilesY(); tile++) {
index 8c230b3..23df37d 100644 (file)
@@ -38,8 +38,6 @@
 #include "IntRect.h"
 #include <algorithm>
 
-using namespace std;
-
 namespace WebCore {
 
 static int computeNumTiles(int maxTextureSize, int totalSize, int borderTexels)
@@ -47,7 +45,7 @@ static int computeNumTiles(int maxTextureSize, int totalSize, int borderTexels)
     if (maxTextureSize - 2 * borderTexels <= 0)
         return totalSize > 0 && maxTextureSize >= totalSize ? 1 : 0;
 
-    int numTiles = max(1, 1 + (totalSize - 1 - 2 * borderTexels) / (maxTextureSize - 2 * borderTexels));
+    int numTiles = std::max(1, 1 + (totalSize - 1 - 2 * borderTexels) / (maxTextureSize - 2 * borderTexels));
     return totalSize > 0 ? numTiles : 0;
 }
 
@@ -84,7 +82,7 @@ int TilingData::tileXIndexFromSrcCoord(int srcPos) const
 
     ASSERT(m_maxTextureSize.width() - 2 * m_borderTexels);
     int x = (srcPos - m_borderTexels) / (m_maxTextureSize.width() - 2 * m_borderTexels);
-    return min(max(x, 0), numTilesX() - 1);
+    return std::min(std::max(x, 0), numTilesX() - 1);
 }
 
 int TilingData::tileYIndexFromSrcCoord(int srcPos) const
@@ -94,7 +92,7 @@ int TilingData::tileYIndexFromSrcCoord(int srcPos) const
 
     ASSERT(m_maxTextureSize.height() - 2 * m_borderTexels);
     int y = (srcPos - m_borderTexels) / (m_maxTextureSize.height() - 2 * m_borderTexels);
-    return min(max(y, 0), numTilesY() - 1);
+    return std::min(std::max(y, 0), numTilesY() - 1);
 }
 
 IntRect TilingData::tileBounds(int i, int j) const
index 556c85d..bc1c8f5 100644 (file)
@@ -35,8 +35,6 @@
 #include <wtf/StdLibExtras.h>
 #include <wtf/unicode/CharacterNames.h>
 
-using namespace std;
-
 namespace WebCore {
 
 class TextLayout {
@@ -132,10 +130,10 @@ ComplexTextController::ComplexTextController(const Font* font, const TextRun& ru
     , m_leadingExpansion(0)
     , m_afterExpansion(!run.allowsLeadingExpansion())
     , 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_lastRoundingGlyph(0)
 {
     if (!m_expansion)
@@ -195,9 +193,9 @@ int ComplexTextController::offsetForPosition(float h, bool includePartialGlyphs)
                 CFIndex hitGlyphStart = complexTextRun.indexAt(j);
                 CFIndex hitGlyphEnd;
                 if (m_run.ltr())
-                    hitGlyphEnd = max<CFIndex>(hitGlyphStart, j + 1 < complexTextRun.glyphCount() ? complexTextRun.indexAt(j + 1) : static_cast<CFIndex>(complexTextRun.indexEnd()));
+                    hitGlyphEnd = std::max<CFIndex>(hitGlyphStart, j + 1 < complexTextRun.glyphCount() ? complexTextRun.indexAt(j + 1) : static_cast<CFIndex>(complexTextRun.indexEnd()));
                 else
-                    hitGlyphEnd = max<CFIndex>(hitGlyphStart, j > 0 ? complexTextRun.indexAt(j - 1) : static_cast<CFIndex>(complexTextRun.indexEnd()));
+                    hitGlyphEnd = std::max<CFIndex>(hitGlyphStart, j > 0 ? complexTextRun.indexAt(j - 1) : static_cast<CFIndex>(complexTextRun.indexEnd()));
 
                 // FIXME: Instead of dividing the glyph's advance equally between the characters, this
                 // could use the glyph's "ligature carets". However, there is no Core Text API to get the
@@ -512,9 +510,9 @@ void ComplexTextController::advance(unsigned offset, GlyphBuffer* glyphBuffer, G
             unsigned glyphEndOffset;
             if (complexTextRun.isMonotonic()) {
                 if (ltr)
-                    glyphEndOffset = max<unsigned>(glyphStartOffset, static_cast<unsigned>(g + 1 < glyphCount ? complexTextRun.indexAt(g + 1) : complexTextRun.indexEnd()));
+                    glyphEndOffset = std::max<unsigned>(glyphStartOffset, static_cast<unsigned>(g + 1 < glyphCount ? complexTextRun.indexAt(g + 1) : complexTextRun.indexEnd()));
                 else
-                    glyphEndOffset = max<unsigned>(glyphStartOffset, static_cast<unsigned>(g > 0 ? complexTextRun.indexAt(g - 1) : complexTextRun.indexEnd()));
+                    glyphEndOffset = std::max<unsigned>(glyphStartOffset, static_cast<unsigned>(g > 0 ? complexTextRun.indexAt(g - 1) : complexTextRun.indexEnd()));
             } else
                 glyphEndOffset = complexTextRun.endOffsetAt(g);
 
@@ -527,7 +525,7 @@ void ComplexTextController::advance(unsigned offset, GlyphBuffer* glyphBuffer, G
                 glyphBuffer->add(m_adjustedGlyphs[k], complexTextRun.fontData(), adjustedAdvance);
 
             unsigned oldCharacterInCurrentGlyph = m_characterInCurrentGlyph;
-            m_characterInCurrentGlyph = min(m_currentCharacter - complexTextRun.stringLocation(), glyphEndOffset) - glyphStartOffset;
+            m_characterInCurrentGlyph = std::min(m_currentCharacter - complexTextRun.stringLocation(), glyphEndOffset) - glyphStartOffset;
             // FIXME: Instead of dividing the glyph's advance equally between the characters, this
             // could use the glyph's "ligature carets". However, there is no Core Text API to get the
             // ligature carets.
@@ -593,7 +591,7 @@ void ComplexTextController::adjustGlyphsAndAdvances()
         CGFloat roundedSpaceWidth = roundCGFloat(spaceWidth);
         const UChar* cp = complexTextRun.characters();
         CGPoint glyphOrigin = CGPointZero;
-        CFIndex lastCharacterIndex = m_run.ltr() ? numeric_limits<CFIndex>::min() : numeric_limits<CFIndex>::max();
+        CFIndex lastCharacterIndex = m_run.ltr() ? std::numeric_limits<CFIndex>::min() : std::numeric_limits<CFIndex>::max();
         bool isMonotonic = true;
 
         for (unsigned i = 0; i < glyphCount; i++) {
@@ -714,10 +712,10 @@ void ComplexTextController::adjustGlyphsAndAdvances()
             
             FloatRect glyphBounds = fontData->boundsForGlyph(glyph);
             glyphBounds.move(glyphOrigin.x, 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());
             glyphOrigin.x += advance.width;
             glyphOrigin.y += advance.height;
             
index d4d4df0..e0936f3 100644 (file)
@@ -34,8 +34,6 @@
 #include "TextRun.h"
 #include <wtf/MathExtras.h>
 
-using namespace std;
-
 namespace WebCore {
 
 FloatRect Font::selectionRectForComplexText(const TextRun& run, const FloatPoint& point, int h,
@@ -110,10 +108,10 @@ float Font::floatWidthForComplexText(const TextRun& run, HashSet<const SimpleFon
 {
     ComplexTextController controller(this, run, true, fallbackFonts);
     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.totalWidth()));
+        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.totalWidth()));
     }
     return controller.totalWidth();
 }
index 85d9c82..718c16d 100644 (file)
@@ -59,8 +59,6 @@ SOFT_LINK(UIKit, _UIKitGetTextEffectsCatalog, CUICatalog *, (void), ())
 #define URefCon UInt32
 #endif
 
-using namespace std;
-
 namespace WebCore {
 
 bool Font::canReturnFallbackFontsForComplexText()
index e9e8529..df5f7b2 100644 (file)
@@ -153,7 +153,6 @@ enum {
 @end
 
 using namespace WebCore;
-using namespace std;
 
 @interface WebCoreMovieObserver : NSObject
 {
@@ -737,7 +736,7 @@ float MediaPlayerPrivateQTKit::duration() const
 
     QTTime time = [m_qtMovie.get() duration];
     if (time.flags == kQTTimeIsIndefinite)
-        return numeric_limits<float>::infinity();
+        return std::numeric_limits<float>::infinity();
     return static_cast<float>(time.timeValue) / time.timeScale;
 }
 
index abdea1d..21ea611 100644 (file)
@@ -47,8 +47,6 @@
 - (BOOL)_isFakeFixedPitch;
 @end
 
-using namespace std;
-
 namespace WebCore {
   
 static bool fontHasVerticalGlyphs(CTFontRef ctFont)
index e366213..443816f 100644 (file)
@@ -28,8 +28,6 @@
 
 #include <algorithm>
 
-using namespace std;
-
 namespace WebCore {
 
 PassRefPtr<TransformOperation> Matrix3DTransformOperation::blend(const TransformOperation* from, double progress, bool blendToIdentity)
index 05efee0..a3658a9 100644 (file)
@@ -24,8 +24,6 @@
 
 #include <algorithm>
 
-using namespace std;
-
 namespace WebCore {
 
 PassRefPtr<TransformOperation> MatrixTransformOperation::blend(const TransformOperation* from, double progress, bool blendToIdentity)
index ce9b5fb..a3ffb66 100644 (file)
@@ -29,8 +29,6 @@
 #include "AnimationUtilities.h"
 #include <wtf/MathExtras.h>
 
-using namespace std;
-
 namespace WebCore {
 
 PassRefPtr<TransformOperation> PerspectiveTransformOperation::blend(const TransformOperation* from, double progress, bool blendToIdentity)
index a7b34c2..32b4c6e 100644 (file)
@@ -26,8 +26,6 @@
 #include <algorithm>
 #include <wtf/MathExtras.h>
 
-using namespace std;
-
 namespace WebCore {
 
 PassRefPtr<TransformOperation> RotateTransformOperation::blend(const TransformOperation* from, double progress, bool blendToIdentity)
index 0e2a1db..a71de47 100644 (file)
@@ -26,8 +26,6 @@
 #include "Matrix3DTransformOperation.h"
 #include <algorithm>
 
-using namespace std;
-
 namespace WebCore {
 
 TransformOperations::TransformOperations(bool makeIdentity)
@@ -71,7 +69,7 @@ TransformOperations TransformOperations::blendByMatchingOperations(const Transfo
 
     unsigned fromSize = from.operations().size();
     unsigned toSize = operations().size();
-    unsigned size = max(fromSize, toSize);
+    unsigned size = std::max(fromSize, toSize);
     for (unsigned i = 0; i < size; i++) {
         RefPtr<TransformOperation> fromOperation = (i < fromSize) ? from.operations()[i].get() : 0;
         RefPtr<TransformOperation> toOperation = (i < toSize) ? operations()[i].get() : 0;
index f9e098a..bf50745 100644 (file)
@@ -40,8 +40,6 @@
 #include <emmintrin.h>
 #endif
 
-using namespace std;
-
 namespace WebCore {
 
 //
@@ -682,7 +680,7 @@ FloatQuad TransformationMatrix::projectQuad(const FloatQuad& q, bool* clamped) c
 static float clampEdgeValue(float f)
 {
     ASSERT(!std::isnan(f));
-    return min<float>(max<float>(f, -LayoutUnit::max() / 2), LayoutUnit::max() / 2);
+    return std::min<float>(std::max<float>(f, -LayoutUnit::max() / 2), LayoutUnit::max() / 2);
 }
 
 LayoutRect TransformationMatrix::clampedBoundsOfProjectedQuad(const FloatQuad& q) const
index 63d9ddf..6b4cddf 100644 (file)
@@ -42,7 +42,6 @@
 #include <wtf/PassOwnPtr.h>
 
 using namespace WebCore;
-using namespace std;
 
 static bool supportsUIStateTransitionProgress()
 {
@@ -728,8 +727,8 @@ FloatPoint ScrollAnimatorMac::adjustScrollPositionIfNecessary(const FloatPoint&
     if (!m_scrollableArea->constrainsScrollingToContentEdge())
         return position;
 
-    float newX = max<float>(min<float>(position.x(), m_scrollableArea->totalContentsSize().width() - m_scrollableArea->visibleWidth()), 0);
-    float newY = max<float>(min<float>(position.y(), m_scrollableArea->totalContentsSize().height() - m_scrollableArea->visibleHeight()), 0);
+    float newX = std::max<float>(std::min<float>(position.x(), m_scrollableArea->totalContentsSize().width() - m_scrollableArea->visibleWidth()), 0);
+    float newY = std::max<float>(std::min<float>(position.y(), m_scrollableArea->totalContentsSize().height() - m_scrollableArea->visibleHeight()), 0);
 
     return FloatPoint(newX, newY);
 }
index b207a74..d8ce26d 100644 (file)
@@ -34,8 +34,6 @@
 #import "NotImplemented.h"
 #import "WebCoreFrameView.h"
 
-using namespace std;
-
 @interface NSWindow (WebWindowDetails)
 - (BOOL)_needsToResetDragMargins;
 - (void)_setNeedsToResetDragMargins:(BOOL)needs;
@@ -134,7 +132,7 @@ void ScrollView::platformSetContentsSize()
     int w = m_contentsSize.width();
     int h = m_contentsSize.height();
     LOG(Frames, "%p %@ at w %d h %d\n", documentView(), [(id)[documentView() class] className], w, h);            
-    [documentView() setFrameSize:NSMakeSize(max(0, w), max(0, h))];
+    [documentView() setFrameSize:NSMakeSize(std::max(0, w), std::max(0, h))];
     END_BLOCK_OBJC_EXCEPTIONS;
 }
 
@@ -150,7 +148,7 @@ void ScrollView::platformSetScrollPosition(const IntPoint& scrollPoint)
 {
     BEGIN_BLOCK_OBJC_EXCEPTIONS;
     NSPoint floatPoint = scrollPoint;
-    NSPoint tempPoint = { max(-[scrollView() scrollOrigin].x, floatPoint.x), max(-[scrollView() scrollOrigin].y, floatPoint.y) };  // Don't use NSMakePoint to work around 4213314.
+    NSPoint tempPoint = { std::max(-[scrollView() scrollOrigin].x, floatPoint.x), std::max(-[scrollView() scrollOrigin].y, floatPoint.y) };  // Don't use NSMakePoint to work around 4213314.
     [documentView() scrollPoint:tempPoint];
     END_BLOCK_OBJC_EXCEPTIONS;
 }
index f2278f5..6ff73f4 100644 (file)
@@ -42,7 +42,6 @@
 
 // FIXME: There are repainting problems due to Aqua scroll bar buttons' visual overflow.
 
-using namespace std;
 using namespace WebCore;
 
 @interface NSColor (WebNSColorDetails)
index d90add0..69c8d3f 100644 (file)
@@ -35,8 +35,6 @@
 #import <Carbon/Carbon.h>
 #include <wtf/StdLibExtras.h>
 
-using namespace std;
-
 NSRect focusRingClipRect;
 
 // This is a view whose sole purpose is to tell AppKit that it's flipped.
index 7de2228..078bcc4 100644 (file)
@@ -35,7 +35,6 @@
 #import <wtf/RetainPtr.h>
 
 using namespace WebCore;
-using namespace std;
 
 static inline CGFloat webkit_CGFloor(CGFloat value)
 {
@@ -482,7 +481,7 @@ static NSTextField *createTimeTextField(NSRect frame)
         return;
 
     float volume = [self volume] + 10;
-    [self setVolume:min(volume, [self maxVolume])];
+    [self setVolume:std::min(volume, [self maxVolume])];
 }
 
 - (float)volume
@@ -554,7 +553,7 @@ static NSString *timeToString(double time)
     if (!std::isfinite(time))
         time = 0;
 
-    int seconds = narrowPrecisionToFloat(abs(time));
+    int seconds = narrowPrecisionToFloat(std::abs(time));
     int hours = seconds / (60 * 60);
     int minutes = (seconds / 60) % 60;
     seconds %= 60;
index ea06897..3ea32a7 100644 (file)
@@ -33,8 +33,6 @@
 
 #include <utility>
 
-using namespace std;
-
 namespace WebCore {
 
 HTTPHeaderMap::HTTPHeaderMap()
@@ -52,7 +50,7 @@ PassOwnPtr<CrossThreadHTTPHeaderMapData> HTTPHeaderMap::copyData() const
 
     HTTPHeaderMap::const_iterator end_it = end();
     for (HTTPHeaderMap::const_iterator it = begin(); it != end_it; ++it)
-        data->uncheckedAppend(make_pair(it->key.string().isolatedCopy(), it->value.isolatedCopy()));
+        data->uncheckedAppend(std::make_pair(it->key.string().isolatedCopy(), it->value.isolatedCopy()));
 
     return data.release();
 }
index c5bdeee..ef42193 100644 (file)
@@ -28,8 +28,6 @@
 
 #include "ResourceRequest.h"
 
-using namespace std;
-
 namespace WebCore {
 
 #if !USE(SOUP) && (!PLATFORM(MAC) || USE(CFNETWORK))
index d0711f0..fba8c37 100644 (file)
@@ -33,8 +33,6 @@
 #include <wtf/MathExtras.h>
 #include <wtf/StdLibExtras.h>
 
-using namespace std;
-
 namespace WebCore {
 
 static void parseCacheHeader(const String& header, Vector<pair<String, String>>& result);
@@ -348,7 +346,7 @@ void ResourceResponseBase::parseCacheControlDirectives() const
 
     m_cacheControlContainsMustRevalidate = false;
     m_cacheControlContainsNoCache = false;
-    m_cacheControlMaxAge = numeric_limits<double>::quiet_NaN();
+    m_cacheControlMaxAge = std::numeric_limits<double>::quiet_NaN();
 
     DEFINE_STATIC_LOCAL(const AtomicString, cacheControlString, ("cache-control", AtomicString::ConstructFromLiteral));
     DEFINE_STATIC_LOCAL(const AtomicString, noCacheDirective, ("no-cache", AtomicString::ConstructFromLiteral));
index 2078fe2..335f72f 100644 (file)
@@ -33,8 +33,6 @@
 #include <CFNetwork/CFURLResponsePriv.h>
 #include <wtf/RetainPtr.h>
 
-using namespace std;
-
 // We would like a better value for a maximum time_t,
 // but there is no way to do that in C with any certainty.
 // INT_MAX should work well enough for our purposes.
index 5425e1f..974dfec 100644 (file)
@@ -33,8 +33,6 @@
 #import <limits>
 #import <wtf/StdLibExtras.h>
 
-using namespace std;
-
 @interface NSURLResponse (WebNSURLResponseDetails)
 - (NSTimeInterval)_calculatedExpiration;
 - (id)_initWithCFURLResponse:(CFURLResponseRef)response;
@@ -51,7 +49,7 @@ void ResourceResponse::initNSURLResponse() const
     // The init function takes an NSInteger, even though the accessor returns a long long.
     // For values that won't fit in an NSInteger, pass -1 instead.
     NSInteger expectedContentLength;
-    if (m_expectedContentLength < 0 || m_expectedContentLength > numeric_limits<NSInteger>::max())
+    if (m_expectedContentLength < 0 || m_expectedContentLength > std::numeric_limits<NSInteger>::max())
         expectedContentLength = -1;
     else
         expectedContentLength = static_cast<NSInteger>(m_expectedContentLength);
index 5e25684..5e14e3f 100644 (file)
@@ -27,7 +27,6 @@
 #include <wtf/text/WTFString.h>
 
 using namespace WTF;
-using namespace std;
 
 namespace WebCore {
 
@@ -100,7 +99,7 @@ static UText* textClone(UText* destination, const UText* source, UBool deep, UEr
         return destination;
     void* extraNew = destination->pExtra;
     int32_t flags = destination->flags;
-    int sizeToCopy = min(source->sizeOfStruct, destination->sizeOfStruct);
+    int sizeToCopy = std::min(source->sizeOfStruct, destination->sizeOfStruct);
     memcpy(destination, source, sizeToCopy);
     destination->pExtra = extraNew;
     destination->flags = flags;
@@ -168,8 +167,8 @@ static void textLatin1MoveInPrimaryContext(UText* text, int64_t nativeIndex, int
     }
     int64_t length = text->chunkNativeLimit - text->chunkNativeStart;
     // Ensure chunk length is well defined if computed length exceeds int32_t range.
-    ASSERT(length < numeric_limits<int32_t>::max());
-    text->chunkLength = length < numeric_limits<int32_t>::max() ? static_cast<int32_t>(length) : 0;
+    ASSERT(length < std::numeric_limits<int32_t>::max());
+    text->chunkLength = length < std::numeric_limits<int32_t>::max() ? static_cast<int32_t>(length) : 0;
     text->nativeIndexingLimit = text->chunkLength;
     text->chunkOffset = forward ? 0 : text->chunkLength;
     StringImpl::copyChars(const_cast<UChar*>(text->chunkContents), static_cast<const LChar*>(text->p) + (text->chunkNativeStart - text->b), static_cast<unsigned>(text->chunkLength));
@@ -194,8 +193,8 @@ static void textLatin1MoveInPriorContext(UText* text, int64_t nativeIndex, int64
     text->nativeIndexingLimit = text->chunkLength;
     int64_t offset = nativeIndex - text->chunkNativeStart;
     // Ensure chunk offset is well defined if computed offset exceeds int32_t range or chunk length.
-    ASSERT(offset < numeric_limits<int32_t>::max());
-    text->chunkOffset = min(offset < numeric_limits<int32_t>::max() ? static_cast<int32_t>(offset) : 0, text->chunkLength);
+    ASSERT(offset < std::numeric_limits<int32_t>::max());
+    text->chunkOffset = std::min(offset < std::numeric_limits<int32_t>::max() ? static_cast<int32_t>(offset) : 0, text->chunkLength);
 }
 
 static void textLatin1SwitchToPriorContext(UText* text, int64_t nativeIndex, int64_t nativeLength, UBool forward)
@@ -211,8 +210,8 @@ static inline bool textInChunkOrOutOfRange(UText* text, int64_t nativeIndex, int
         if (nativeIndex >= text->chunkNativeStart && nativeIndex < text->chunkNativeLimit) {
             int64_t offset = nativeIndex - text->chunkNativeStart;
             // Ensure chunk offset is well formed if computed offset exceeds int32_t range.
-            ASSERT(offset < numeric_limits<int32_t>::max());
-            text->chunkOffset = offset < numeric_limits<int32_t>::max() ? static_cast<int32_t>(offset) : 0;
+            ASSERT(offset < std::numeric_limits<int32_t>::max());
+            text->chunkOffset = offset < std::numeric_limits<int32_t>::max() ? static_cast<int32_t>(offset) : 0;
             isAccessible = TRUE;
             return true;
         }
@@ -225,8 +224,8 @@ static inline bool textInChunkOrOutOfRange(UText* text, int64_t nativeIndex, int
         if (nativeIndex > text->chunkNativeStart && nativeIndex <= text->chunkNativeLimit) {
             int64_t offset = nativeIndex - text->chunkNativeStart;
             // Ensure chunk offset is well formed if computed offset exceeds int32_t range.
-            ASSERT(offset < numeric_limits<int32_t>::max());
-            text->chunkOffset = offset < numeric_limits<int32_t>::max() ? static_cast<int32_t>(offset) : 0;
+            ASSERT(offset < std::numeric_limits<int32_t>::max());
+            text->chunkOffset = offset < std::numeric_limits<int32_t>::max() ? static_cast<int32_t>(offset) : 0;
             isAccessible = TRUE;
             return true;
         }
@@ -292,7 +291,7 @@ static UText* textOpenLatin1(UTextWithBuffer* utWithBuffer, const LChar* string,
 {
     if (U_FAILURE(*status))
         return 0;
-    if (!string || length > static_cast<unsigned>(numeric_limits<int32_t>::max())) {
+    if (!string || length > static_cast<unsigned>(std::numeric_limits<int32_t>::max())) {
         *status = U_ILLEGAL_ARGUMENT_ERROR;
         return 0;
     }
@@ -321,13 +320,13 @@ static void textUTF16MoveInPrimaryContext(UText* text, int64_t nativeIndex, int6
     text->chunkNativeLimit = nativeLength;
     int64_t length = text->chunkNativeLimit - text->chunkNativeStart;
     // Ensure chunk length is well defined if computed length exceeds int32_t range.
-    ASSERT(length < numeric_limits<int32_t>::max());
-    text->chunkLength = length < numeric_limits<int32_t>::max() ? static_cast<int32_t>(length) : 0;
+    ASSERT(length < std::numeric_limits<int32_t>::max());
+    text->chunkLength = length < std::numeric_limits<int32_t>::max() ? static_cast<int32_t>(length) : 0;
     text->nativeIndexingLimit = text->chunkLength;
     int64_t offset = nativeIndex - text->chunkNativeStart;
     // Ensure chunk offset is well defined if computed offset exceeds int32_t range or chunk length.
-    ASSERT(offset < numeric_limits<int32_t>::max());
-    text->chunkOffset = min(offset < numeric_limits<int32_t>::max() ? static_cast<int32_t>(offset) : 0, text->chunkLength);
+    ASSERT(offset < std::numeric_limits<int32_t>::max());
+    text->chunkOffset = std::min(offset < std::numeric_limits<int32_t>::max() ? static_cast<int32_t>(offset) : 0, text->chunkLength);
 }
 
 static void textUTF16SwitchToPrimaryContext(UText* text, int64_t nativeIndex, int64_t nativeLength, UBool forward)
@@ -349,8 +348,8 @@ static void textUTF16MoveInPriorContext(UText* text, int64_t nativeIndex, int64_
     text->nativeIndexingLimit = text->chunkLength;
     int64_t offset = nativeIndex - text->chunkNativeStart;
     // Ensure chunk offset is well defined if computed offset exceeds int32_t range or chunk length.
-    ASSERT(offset < numeric_limits<int32_t>::max());
-    text->chunkOffset = min(offset < numeric_limits<int32_t>::max() ? static_cast<int32_t>(offset) : 0, text->chunkLength);
+    ASSERT(offset < std::numeric_limits<int32_t>::max());
+    text->chunkOffset = std::min(offset < std::numeric_limits<int32_t>::max() ? static_cast<int32_t>(offset) : 0, text->chunkLength);
 }
 
 static void textUTF16SwitchToPriorContext(UText* text, int64_t nativeIndex, int64_t nativeLength, UBool forward)
@@ -402,7 +401,7 @@ static UText* textOpenUTF16(UText* text, const UChar* string, unsigned length, c
 {
     if (U_FAILURE(*status))
         return 0;
-    if (!string || length > static_cast<unsigned>(numeric_limits<int32_t>::max())) {
+    if (!string || length > static_cast<unsigned>(std::numeric_limits<int32_t>::max())) {
         *status = U_ILLEGAL_ARGUMENT_ERROR;
         return 0;
     }
index 7f2a888..673f738 100644 (file)
@@ -31,8 +31,6 @@
 #include <wtf/text/StringBuffer.h>
 #include <wtf/text/WTFString.h>
 
-using namespace std;
-
 namespace WebCore {
 
 void TextCodecUTF16::registerEncodingNames(EncodingNameRegistrar registrar)
@@ -125,7 +123,7 @@ CString TextCodecUTF16::encode(const UChar* characters, size_t length, Unencodab
     // the buffer doesn't occupy the entire address space, we can
     // assert here that doubling the length does not overflow size_t
     // and there's no need for a runtime check.
-    ASSERT(length <= numeric_limits<size_t>::max() / 2);
+    ASSERT(length <= std::numeric_limits<size_t>::max() / 2);
 
     char* bytes;
     CString string = CString::newUninitialized(length * 2, bytes);
index 0fa6df7..6abf431 100644 (file)
@@ -33,7 +33,6 @@
 
 using namespace WTF;
 using namespace WTF::Unicode;
-using namespace std;
 
 namespace WebCore {
 
@@ -426,7 +425,7 @@ CString TextCodecUTF8::encode(const UChar* characters, size_t length, Unencodabl
     // The maximum number of UTF-8 bytes needed per UTF-16 code unit is 3.
     // BMP characters take only one UTF-16 code unit and can take up to 3 bytes (3x).
     // Non-BMP characters take two UTF-16 code units and can take up to 4 bytes (2x).
-    if (length > numeric_limits<size_t>::max() / 3)
+    if (length > std::numeric_limits<size_t>::max() / 3)
         CRASH();
     Vector<uint8_t> bytes(length * 3);
 
index 07b3331..d07bffd 100644 (file)
@@ -35,8 +35,6 @@
 #include <wtf/StringExtras.h>
 #include <wtf/text/WTFString.h>
 
-using namespace std;
-
 namespace WebCore {
 
 static const size_t printBufferSize = 100; // large enough for any integer or floating point value in string format, including trailing null character
index 6366a40..9675f80 100644 (file)
@@ -40,8 +40,6 @@
 #include <wtf/RetainPtr.h>
 #include <wtf/text/StringBuilder.h>
 
-using namespace std;
-
 namespace WebCore {
 
 static inline String languageFromLocale(const String& locale)
index 8d86204..48a9776 100644 (file)
@@ -37,8 +37,6 @@
 #include <wtf/text/WTFString.h>
 #include <wtf/unicode/CharacterNames.h>
 
-using namespace std;
-
 namespace WebCore {
 
 // We need to keep this because ICU doesn't support some of the encodings that we need:
@@ -142,7 +140,7 @@ OSStatus TextCodecMac::decode(const unsigned char* inputBuffer, int inputBufferL
         // First, fill the partial character buffer with as many bytes as are available.
         ASSERT_WITH_SECURITY_IMPLICATION(m_numBufferedBytes < sizeof(m_bufferedBytes));
         const int spaceInBuffer = sizeof(m_bufferedBytes) - m_numBufferedBytes;
-        const int bytesToPutInBuffer = min(spaceInBuffer, inputBufferLength);
+        const int bytesToPutInBuffer = std::min(spaceInBuffer, inputBufferLength);
         ASSERT(bytesToPutInBuffer != 0);
         memcpy(m_bufferedBytes + m_numBufferedBytes, inputBuffer, bytesToPutInBuffer);
 
index 95c63fd..3fb6928 100644 (file)
@@ -27,8 +27,6 @@
 #include "RenderTableCol.h"
 #include "RenderTableSection.h"
 
-using namespace std;
-
 namespace WebCore {
 
 AutoTableLayout::AutoTableLayout(RenderTable* table)
@@ -71,11 +69,11 @@ void AutoTableLayout::recalcColumn(unsigned effCol)
 
                 // A cell originates in this column. Ensure we have
                 // a min/max width of at least 1px for this column now.
-                columnLayout.minLogicalWidth = max<int>(columnLayout.minLogicalWidth, cellHasContent ? 1 : 0);
-                columnLayout.maxLogicalWidth = max<int>(columnLayout.maxLogicalWidth, 1);
+                columnLayout.minLogicalWidth = std::max<int>(columnLayout.minLogicalWidth, cellHasContent ? 1 : 0);
+                columnLayout.maxLogicalWidth = std::max<int>(columnLayout.maxLogicalWidth, 1);
 
                 if (cell->colSpan() == 1) {
-                    columnLayout.minLogicalWidth = max<int>(cell->minPreferredLogicalWidth(), columnLayout.minLogicalWidth);
+                    columnLayout.minLogicalWidth = std::max<int>(cell->minPreferredLogicalWidth(), columnLayout.minLogicalWidth);
                     if (cell->maxPreferredLogicalWidth() > columnLayout.maxLogicalWidth) {
                         columnLayout.maxLogicalWidth = cell->maxPreferredLogicalWidth();
                         maxContributor = cell;
@@ -137,7 +135,7 @@ void AutoTableLayout::recalcColumn(unsigned effCol)
         }
     }
 
-    columnLayout.maxLogicalWidth = max(columnLayout.maxLogicalWidth, columnLayout.minLogicalWidth);
+    columnLayout.maxLogicalWidth = std::max(columnLayout.maxLogicalWidth, columnLayout.minLogicalWidth);
 }
 
 void AutoTableLayout::fullRecalc()
@@ -231,9 +229,9 @@ void AutoTableLayout::computeIntrinsicLogicalWidths(LayoutUnit& minWidth, Layout
         maxWidth += m_layoutStruct[i].effectiveMaxLogicalWidth;
         if (scaleColumns) {
             if (m_layoutStruct[i].effectiveLogicalWidth.isPercent()) {
-                float percent = min(static_cast<float>(m_layoutStruct[i].effectiveLogicalWidth.percent()), remainingPercent);
-                float logicalWidth = static_cast<float>(m_layoutStruct[i].effectiveMaxLogicalWidth) * 100 / max(percent, epsilon);
-                maxPercent = max(logicalWidth,  maxPercent);
+                float percent = std::min(static_cast<float>(m_layoutStruct[i].effectiveLogicalWidth.percent()), remainingPercent);
+                float logicalWidth = static_cast<float>(m_layoutStruct[i].effectiveMaxLogicalWidth) * 100 / std::max(percent, epsilon);
+                maxPercent = std::max(logicalWidth,  maxPercent);
                 remainingPercent -= percent;
             } else
                 maxNonPercent += m_layoutStruct[i].effectiveMaxLogicalWidth;
@@ -241,19 +239,19 @@ void AutoTableLayout::computeIntrinsicLogicalWidths(LayoutUnit& minWidth, Layout
     }
 
     if (scaleColumns) {
-        maxNonPercent = maxNonPercent * 100 / max(remainingPercent, epsilon);
-        maxWidth = max<int>(maxWidth, static_cast<int>(min(maxNonPercent, static_cast<float>(tableMaxWidth))));
-        maxWidth = max<int>(maxWidth, static_cast<int>(min(maxPercent, static_cast<float>(tableMaxWidth))));
+        maxNonPercent = maxNonPercent * 100 / std::max(remainingPercent, epsilon);
+        maxWidth = std::max<int>(maxWidth, static_cast<int>(std::min(maxNonPercent, static_cast<float>(tableMaxWidth))));
+        maxWidth = std::max<int>(maxWidth, static_cast<int>(std::min(maxPercent, static_cast<float>(tableMaxWidth))));
     }
 
-    maxWidth = max<int>(maxWidth, spanMaxLogicalWidth);
+    maxWidth = std::max<int>(maxWidth, spanMaxLogicalWidth);
 }
 
 void AutoTableLayout::applyPreferredLogicalWidthQuirks(LayoutUnit& minWidth, LayoutUnit& maxWidth) const
 {
     Length tableLogicalWidth = m_table->style().logicalWidth();
     if (tableLogicalWidth.isFixed() && tableLogicalWidth.isPositive())
-        minWidth = maxWidth = max<int>(minWidth, tableLogicalWidth.value());
+        minWidth = maxWidth = std::max<int>(minWidth, tableLogicalWidth.value());
 }
 
 /*
@@ -346,7 +344,7 @@ int AutoTableLayout::calcEffectiveLogicalWidth()
                 // can't satify this condition, treat as variable
                 cellLogicalWidth = Length();
             } else {
-                maxLogicalWidth = max(maxLogicalWidth, static_cast<int>(max(spanMaxLogicalWidth, cellMaxLogicalWidth) * 100  / cellLogicalWidth.percent()));
+                maxLogicalWidth = std::max(maxLogicalWidth, static_cast<int>(std::max(spanMaxLogicalWidth, cellMaxLogicalWidth) * 100  / cellLogicalWidth.percent()));
 
                 // all non percent columns in the span get percent values to sum up correctly.
                 float percentMissing = cellLogicalWidth.percent() - totalPercent;
@@ -374,7 +372,7 @@ int AutoTableLayout::calcEffectiveLogicalWidth()
         if (cellMinLogicalWidth > spanMinLogicalWidth) {
             if (allColsAreFixed) {
                 for (unsigned pos = effCol; fixedWidth > 0 && pos < lastCol; ++pos) {
-                    int cellLogicalWidth = max(m_layoutStruct[pos].effectiveMinLogicalWidth, static_cast<int>(cellMinLogicalWidth * m_layoutStruct[pos].logicalWidth.value() / fixedWidth));
+                    int cellLogicalWidth = std::max(m_layoutStruct[pos].effectiveMinLogicalWidth, static_cast<int>(cellMinLogicalWidth * m_layoutStruct[pos].logicalWidth.value() / fixedWidth));
                     fixedWidth -= m_layoutStruct[pos].logicalWidth.value();
                     cellMinLogicalWidth -= cellLogicalWidth;
                     m_layoutStruct[pos].effectiveMinLogicalWidth = cellLogicalWidth;
@@ -389,7 +387,7 @@ int AutoTableLayout::calcEffectiveLogicalWidth()
                     float percent = m_layoutStruct[pos].logicalWidth.isPercent() ? m_layoutStruct[pos].logicalWidth.percent() : m_layoutStruct[pos].effectiveLogicalWidth.percent();
                     int columnMinLogicalWidth = static_cast<int>(percent * cellMinLogicalWidth / totalPercent);
                     int columnMaxLogicalWidth = static_cast<int>(percent * cellMaxLogicalWidth / totalPercent);
-                    m_layoutStruct[pos].effectiveMinLogicalWidth = max(m_layoutStruct[pos].effectiveMinLogicalWidth, columnMinLogicalWidth);
+                    m_layoutStruct[pos].effectiveMinLogicalWidth = std::max(m_layoutStruct[pos].effectiveMinLogicalWidth, columnMinLogicalWidth);
                     m_layoutStruct[pos].effectiveMaxLogicalWidth = columnMaxLogicalWidth;
                     allocatedMinLogicalWidth += columnMinLogicalWidth;
                     allocatedMaxLogicalWidth += columnMaxLogicalWidth;
@@ -405,7 +403,7 @@ int AutoTableLayout::calcEffectiveLogicalWidth()
                 // Give min to variable first, to fixed second, and to others third.
                 for (unsigned pos = effCol; remainingMaxLogicalWidth >= 0 && pos < lastCol; ++pos) {
                     if (m_layoutStruct[pos].logicalWidth.isFixed() && haveAuto && fixedWidth <= cellMinLogicalWidth) {
-                        int colMinLogicalWidth = max<int>(m_layoutStruct[pos].effectiveMinLogicalWidth, m_layoutStruct[pos].logicalWidth.value());
+                        int colMinLogicalWidth = std::max<int>(m_layoutStruct[pos].effectiveMinLogicalWidth, m_layoutStruct[pos].logicalWidth.value());
                         fixedWidth -= m_layoutStruct[pos].logicalWidth.value();
                         remainingMinLogicalWidth -= m_layoutStruct[pos].effectiveMinLogicalWidth;
                         remainingMaxLogicalWidth -= m_layoutStruct[pos].effectiveMaxLogicalWidth;
@@ -416,8 +414,8 @@ int AutoTableLayout::calcEffectiveLogicalWidth()
 
                 for (unsigned pos = effCol; remainingMaxLogicalWidth >= 0 && pos < lastCol && remainingMinLogicalWidth < cellMinLogicalWidth; ++pos) {
                     if (!(m_layoutStruct[pos].logicalWidth.isFixed() && haveAuto && fixedWidth <= cellMinLogicalWidth)) {
-                        int colMinLogicalWidth = max<int>(m_layoutStruct[pos].effectiveMinLogicalWidth, static_cast<int>(remainingMaxLogicalWidth ? cellMinLogicalWidth * static_cast<float>(m_layoutStruct[pos].effectiveMaxLogicalWidth) / remainingMaxLogicalWidth : cellMinLogicalWidth));
-                        colMinLogicalWidth = min<int>(m_layoutStruct[pos].effectiveMinLogicalWidth + (cellMinLogicalWidth - remainingMinLogicalWidth), colMinLogicalWidth);
+                        int colMinLogicalWidth = std::max<int>(m_layoutStruct[pos].effectiveMinLogicalWidth, static_cast<int>(remainingMaxLogicalWidth ? cellMinLogicalWidth * static_cast<float>(m_layoutStruct[pos].effectiveMaxLogicalWidth) / remainingMaxLogicalWidth : cellMinLogicalWidth));
+                        colMinLogicalWidth = std::min<int>(m_layoutStruct[pos].effectiveMinLogicalWidth + (cellMinLogicalWidth - remainingMinLogicalWidth), colMinLogicalWidth);
                         remainingMaxLogicalWidth -= m_layoutStruct[pos].effectiveMaxLogicalWidth;
                         remainingMinLogicalWidth -= m_layoutStruct[pos].effectiveMinLogicalWidth;
                         cellMinLogicalWidth -= colMinLogicalWidth;
@@ -429,7 +427,7 @@ int AutoTableLayout::calcEffectiveLogicalWidth()
         if (!cellLogicalWidth.isPercent()) {
             if (cellMaxLogicalWidth > spanMaxLogicalWidth) {
                 for (unsigned pos = effCol; spanMaxLogicalWidth >= 0 && pos < lastCol; ++pos) {
-                    int colMaxLogicalWidth = max(m_layoutStruct[pos].effectiveMaxLogicalWidth, static_cast<int>(spanMaxLogicalWidth ? cellMaxLogicalWidth * static_cast<float>(m_layoutStruct[pos].effectiveMaxLogicalWidth) / spanMaxLogicalWidth : cellMaxLogicalWidth));
+                    int colMaxLogicalWidth = std::max(m_layoutStruct[pos].effectiveMaxLogicalWidth, static_cast<int>(spanMaxLogicalWidth ? cellMaxLogicalWidth * static_cast<float>(m_layoutStruct[pos].effectiveMaxLogicalWidth) / spanMaxLogicalWidth : cellMaxLogicalWidth));
                     spanMaxLogicalWidth -= m_layoutStruct[pos].effectiveMaxLogicalWidth;
                     cellMaxLogicalWidth -= colMaxLogicalWidth;
                     m_layoutStruct[pos].effectiveMaxLogicalWidth = colMaxLogicalWidth;
@@ -437,7 +435,7 @@ int AutoTableLayout::calcEffectiveLogicalWidth()
             }
         } else {
             for (unsigned pos = effCol; pos < lastCol; ++pos)
-                m_layoutStruct[pos].maxLogicalWidth = max(m_layoutStruct[pos].maxLogicalWidth, m_layoutStruct[pos].minLogicalWidth);
+                m_layoutStruct[pos].maxLogicalWidth = std::max(m_layoutStruct[pos].maxLogicalWidth, m_layoutStruct[pos].minLogicalWidth);
         }
         // treat span ranges consisting of empty cells only as if they had content
         if (spanHasEmptyCellsOnly) {
@@ -447,7 +445,7 @@ int AutoTableLayout::calcEffectiveLogicalWidth()
     }
     m_effectiveLogicalWidthDirty = false;
 
-    return min(maxLogicalWidth, INT_MAX / 2);
+    return std::min(maxLogicalWidth, INT_MAX / 2);
 }
 
 /* gets all cells that originate in a column and have a cellspan > 1
@@ -543,7 +541,7 @@ void AutoTableLayout::layout()
         for (size_t i = 0; i < nEffCols; ++i) {
             Length& logicalWidth = m_layoutStruct[i].effectiveLogicalWidth;
             if (logicalWidth.isPercent()) {
-                int cellLogicalWidth = max<int>(m_layoutStruct[i].effectiveMinLogicalWidth, minimumValueForLength(logicalWidth, tableLogicalWidth));
+                int cellLogicalWidth = std::max<int>(m_layoutStruct[i].effectiveMinLogicalWidth, minimumValueForLength(logicalWidth, tableLogicalWidth));
                 available += m_layoutStruct[i].computedLogicalWidth - cellLogicalWidth;
                 m_layoutStruct[i].computedLogicalWidth = cellLogicalWidth;
             }
@@ -555,10 +553,10 @@ void AutoTableLayout::layout()
                 --i;
                 if (m_layoutStruct[i].effectiveLogicalWidth.isPercent()) {
                     int cellLogicalWidth = m_layoutStruct[i].computedLogicalWidth;
-                    int reduction = min(cellLogicalWidth,  excess);
+                    int reduction = std::min(cellLogicalWidth,  excess);
                     // the lines below might look inconsistent, but that's the way it's handled in mozilla
                     excess -= reduction;
-                    int newLogicalWidth = max<int>(m_layoutStruct[i].effectiveMinLogicalWidth, cellLogicalWidth - reduction);
+                    int newLogicalWidth = std::max<int>(m_layoutStruct[i].effectiveMinLogicalWidth, cellLogicalWidth - reduction);
                     available += cellLogicalWidth - newLogicalWidth;
                     m_layoutStruct[i].computedLogicalWidth = newLogicalWidth;
                 }
@@ -596,7 +594,7 @@ void AutoTableLayout::layout()
         for (size_t i = 0; i < nEffCols; ++i) {
             Length& logicalWidth = m_layoutStruct[i].effectiveLogicalWidth;
             if (logicalWidth.isAuto() && totalAuto && !m_layoutStruct[i].emptyCellsOnly) {
-                int cellLogicalWidth = max<int>(m_layoutStruct[i].computedLogicalWidth, static_cast<int>(available * static_cast<float>(m_layoutStruct[i].effectiveMaxLogicalWidth) / totalAuto));
+                int cellLogicalWidth = std::max<int>(m_layoutStruct[i].computedLogicalWidth, static_cast<int>(available * static_cast<float>(m_layoutStruct[i].effectiveMaxLogicalWidth) / totalAuto));
                 available -= cellLogicalWidth;
                 totalAuto -= m_layoutStruct[i].effectiveMaxLogicalWidth;
                 m_layoutStruct[i].computedLogicalWidth = cellLogicalWidth;
index e4447ae..a460f8c 100644 (file)
@@ -68,8 +68,6 @@
   overflow content.
 */
 
-using namespace std;
-
 namespace WebCore {
 
 FixedTableLayout::FixedTableLayout(RenderTable* table)
@@ -180,7 +178,7 @@ void FixedTableLayout::applyPreferredLogicalWidthQuirks(LayoutUnit& minWidth, La
 {
     Length tableLogicalWidth = m_table->style().logicalWidth();
     if (tableLogicalWidth.isFixed() && tableLogicalWidth.isPositive())
-        minWidth = maxWidth = max<int>(minWidth, tableLogicalWidth.value() - m_table->bordersPaddingAndSpacingInRowDirection());
+        minWidth = maxWidth = std::max<int>(minWidth, tableLogicalWidth.value() - m_table->bordersPaddingAndSpacingInRowDirection());
 
     /*
         <table style="width:100%; background-color:red"><tr><td>
index 2eceb4c..e0f6abc 100644 (file)
@@ -28,7 +28,6 @@
 #include "RenderBox.h"
 #include "RenderView.h"
 
-using namespace std;
 using namespace WTF;
 
 namespace WebCore {
@@ -198,7 +197,7 @@ inline void FindNextFloatLogicalBottomAdapter::collectIfNeeded(const IntervalTyp
     if (ShapeOutsideInfo* shapeOutside = floatingObject->renderer().shapeOutsideInfo()) {
         LayoutUnit shapeBottom = m_renderer.logicalTopForFloat(floatingObject) + m_renderer.marginBeforeForChild(floatingObject->renderer()) + shapeOutside->shapeLogicalBottom();
         // Use the shapeBottom unless it extends outside of the margin box, in which case it is clipped.
-        m_nextShapeLogicalBottom = min(shapeBottom, floatBottom);
+        m_nextShapeLogicalBottom = std::min(shapeBottom, floatBottom);
     } else
         m_nextShapeLogicalBottom = floatBottom;
 #endif
@@ -411,7 +410,7 @@ LayoutUnit FloatingObjects::logicalRightOffsetForPositioningFloat(LayoutUnit fix
     if (heightRemaining)
         *heightRemaining = adapter.heightRemaining();
 
-    return min(fixedOffset, adapter.offset());
+    return std::min(fixedOffset, adapter.offset());
 }
 
 LayoutUnit FloatingObjects::logicalLeftOffset(LayoutUnit fixedOffset, LayoutUnit logicalTop, LayoutUnit logicalHeight)
@@ -427,7 +426,7 @@ LayoutUnit FloatingObjects::logicalRightOffset(LayoutUnit fixedOffset, LayoutUni
     ComputeFloatOffsetAdapter<FloatingObject::FloatRight> adapter(m_renderer, logicalTop, logicalTop + logicalHeight, fixedOffset);
     placedFloatsTree().allOverlapsWithAdapter(adapter);
 
-    return min(fixedOffset, adapter.shapeOffset());
+    return std::min(fixedOffset, adapter.shapeOffset());
 }
 
 template<>
index cda1ba4..511c695 100644 (file)
@@ -34,8 +34,6 @@
 #include <stdio.h>
 #endif
 
-using namespace std;
-
 namespace WebCore {
 
 struct SameSizeAsInlineBox {
index d74192d..17d0930 100644 (file)
 #include "RenderView.h"
 #include "RootInlineBox.h"
 #include "Text.h"
-
 #include <math.h>
 
-using namespace std;
-
 namespace WebCore {
 
 struct SameSizeAsInlineFlowBox : public InlineBox {
@@ -397,10 +394,10 @@ float InlineFlowBox::placeBoxRangeInInlineDirection(InlineBox* firstChild, Inlin
             }
             text->setLogicalLeft(logicalLeft);
             if (knownToHaveNoOverflow())
-                minLogicalLeft = min(logicalLeft, minLogicalLeft);
+                minLogicalLeft = std::min(logicalLeft, minLogicalLeft);
             logicalLeft += text->logicalWidth();
             if (knownToHaveNoOverflow())
-                maxLogicalRight = max(logicalLeft, maxLogicalRight);
+                maxLogicalRight = std::max(logicalLeft, maxLogicalRight);
         } else {
             if (curr->renderer().isOutOfFlowPositioned()) {
                 if (curr->renderer().parent()->style().isLeftToRightDirection())
@@ -416,10 +413,10 @@ float InlineFlowBox::placeBoxRangeInInlineDirection(InlineBox* firstChild, Inlin
                 InlineFlowBox* flow = toInlineFlowBox(curr);
                 logicalLeft += flow->marginLogicalLeft();
                 if (knownToHaveNoOverflow())
-                    minLogicalLeft = min(logicalLeft, minLogicalLeft);
+                    minLogicalLeft = std::min(logicalLeft, minLogicalLeft);
                 logicalLeft = flow->placeBoxesInInlineDirection(logicalLeft, needsWordSpacing, textBoxDataMap);
                 if (knownToHaveNoOverflow())
-                    maxLogicalRight = max(logicalLeft, maxLogicalRight);
+                    maxLogicalRight = std::max(logicalLeft, maxLogicalRight);
                 logicalLeft += flow->marginLogicalRight();
             } else if (!curr->renderer().isListMarker() || toRenderListMarker(curr->renderer()).isInside()) {
                 // The box can have a different writing-mode than the overall line, so this is a bit complicated.
@@ -430,10 +427,10 @@ float InlineFlowBox::placeBoxRangeInInlineDirection(InlineBox* firstChild, Inlin
                 logicalLeft += logicalLeftMargin;
                 curr->setLogicalLeft(logicalLeft);
                 if (knownToHaveNoOverflow())
-                    minLogicalLeft = min(logicalLeft, minLogicalLeft);
+                    minLogicalLeft = std::min(logicalLeft, minLogicalLeft);
                 logicalLeft += curr->logicalWidth();
                 if (knownToHaveNoOverflow())
-                    maxLogicalRight = max(logicalLeft, maxLogicalRight);
+                    maxLogicalRight = std::max(logicalLeft, maxLogicalRight);
                 logicalLeft += logicalRightMargin;
                 // If we encounter any space after this inline block then ensure it is treated as the space between two words.
                 needsWordSpacing = true;
@@ -508,7 +505,7 @@ void InlineFlowBox::adjustMaxAscentAndDescent(int& maxAscent, int& maxDescent, i
                     maxAscent = lineHeight - maxDescent;
             }
 
-            if (maxAscent + maxDescent >= max(maxPositionTop, maxPositionBottom))
+            if (maxAscent + maxDescent >= std::max(maxPositionTop, maxPositionBottom))
                 break;
         }
 
@@ -715,13 +712,13 @@ void InlineFlowBox::placeBoxesInBlockDirection(LayoutUnit top, LayoutUnit maxHei
             if (!setLineTop) {
                 setLineTop = true;
                 lineTop = newLogicalTop;
-                lineTopIncludingMargins = min(lineTop, newLogicalTopIncludingMargins);
+                lineTopIncludingMargins = std::min(lineTop, newLogicalTopIncludingMargins);
             } else {
-                lineTop = min(lineTop, newLogicalTop);
-                lineTopIncludingMargins = min(lineTop, min(lineTopIncludingMargins, newLogicalTopIncludingMargins));
+                lineTop = std::min(lineTop, newLogicalTop);
+                lineTopIncludingMargins = std::min(lineTop, std::min(lineTopIncludingMargins, newLogicalTopIncludingMargins));
             }
-            lineBottom = max(lineBottom, newLogicalTop + boxHeight);
-            lineBottomIncludingMargins = max(lineBottom, max(lineBottomIncludingMargins, newLogicalTopIncludingMargins + boxHeightIncludingMargins));
+            lineBottom = std::max(lineBottom, newLogicalTop + boxHeight);
+            lineBottomIncludingMargins = std::max(lineBottom, std::max(lineBottomIncludingMargins, newLogicalTopIncludingMargins + boxHeightIncludingMargins));
         }
 
         // Adjust boxes to use their real box y/height and not the logical height (as dictated by
@@ -738,11 +735,11 @@ void InlineFlowBox::placeBoxesInBlockDirection(LayoutUnit top, LayoutUnit maxHei
                 lineTop = pixelSnappedLogicalTop();
                 lineTopIncludingMargins = lineTop;
             } else {
-                lineTop = min<LayoutUnit>(lineTop, pixelSnappedLogicalTop());
-                lineTopIncludingMargins = min(lineTop, lineTopIncludingMargins);
+                lineTop = std::min<LayoutUnit>(lineTop, pixelSnappedLogicalTop());
+                lineTopIncludingMargins = std::min(lineTop, lineTopIncludingMargins);
             }
-            lineBottom = max<LayoutUnit>(lineBottom, pixelSnappedLogicalBottom());
-            lineBottomIncludingMargins = max(lineBottom, lineBottomIncludingMargins);
+            lineBottom = std::max<LayoutUnit>(lineBottom, pixelSnappedLogicalBottom());
+            lineBottomIncludingMargins = std::max(lineBottom, lineBottomIncludingMargins);
         }
         
         if (renderer().style().isFlippedLinesWritingMode())
@@ -760,11 +757,11 @@ void InlineFlowBox::computeMaxLogicalTop(float& maxLogicalTop) const
         if (descendantsHaveSameLineHeightAndBaseline())
             continue;
 
-        maxLogicalTop = max<float>(maxLogicalTop, curr->y());
+        maxLogicalTop = std::max<float>(maxLogicalTop, curr->y());
         float localMaxLogicalTop = 0;
         if (curr->isInlineFlowBox())
             toInlineFlowBox(curr)->computeMaxLogicalTop(localMaxLogicalTop);
-        maxLogicalTop = max<float>(maxLogicalTop, localMaxLogicalTop);
+        maxLogicalTop = std::max<float>(maxLogicalTop, localMaxLogicalTop);
     }
 }
 #endif // CSS3_TEXT_DECORATION
@@ -804,15 +801,15 @@ inline void InlineFlowBox::addBoxShadowVisualOverflow(LayoutRect& logicalVisualO
     LayoutUnit shadowLogicalTop = lineStyle.isFlippedLinesWritingMode() ? -boxShadowLogicalBottom : boxShadowLogicalTop;
     LayoutUnit shadowLogicalBottom = lineStyle.isFlippedLinesWritingMode() ? -boxShadowLogicalTop : boxShadowLogicalBottom;
     
-    LayoutUnit logicalTopVisualOverflow = min(pixelSnappedLogicalTop() + shadowLogicalTop, logicalVisualOverflow.y());
-    LayoutUnit logicalBottomVisualOverflow = max(pixelSnappedLogicalBottom() + shadowLogicalBottom, logicalVisualOverflow.maxY());
+    LayoutUnit logicalTopVisualOverflow = std::min(pixelSnappedLogicalTop() + shadowLogicalTop, logicalVisualOverflow.y());
+    LayoutUnit logicalBottomVisualOverflow = std::max(pixelSnappedLogicalBottom() + shadowLogicalBottom, logicalVisualOverflow.maxY());
     
     LayoutUnit boxShadowLogicalLeft;
     LayoutUnit boxShadowLogicalRight;
     lineStyle.getBoxShadowInlineDirectionExtent(boxShadowLogicalLeft, boxShadowLogicalRight);
 
-    LayoutUnit logicalLeftVisualOverflow = min(pixelSnappedLogicalLeft() + boxShadowLogicalLeft, logicalVisualOverflow.x());
-    LayoutUnit logicalRightVisualOverflow = max(pixelSnappedLogicalRight() + boxShadowLogicalRight, logicalVisualOverflow.maxX());
+    LayoutUnit logicalLeftVisualOverflow = std::min(pixelSnappedLogicalLeft() + boxShadowLogicalLeft, logicalVisualOverflow.x());
+    LayoutUnit logicalRightVisualOverflow = std::max(pixelSnappedLogicalRight() + boxShadowLogicalRight, logicalVisualOverflow.maxX());
     
     logicalVisualOverflow = LayoutRect(logicalLeftVisualOverflow, logicalTopVisualOverflow,
                                        logicalRightVisualOverflow - logicalLeftVisualOverflow, logicalBottomVisualOverflow - logicalTopVisualOverflow);
@@ -840,14 +837,14 @@ inline void InlineFlowBox::addBorderOutsetVisualOverflow(LayoutRect& logicalVisu
     LayoutUnit outsetLogicalTop = lineStyle.isFlippedLinesWritingMode() ? borderOutsetLogicalBottom : borderOutsetLogicalTop;
     LayoutUnit outsetLogicalBottom = lineStyle.isFlippedLinesWritingMode() ? borderOutsetLogicalTop : borderOutsetLogicalBottom;
 
-    LayoutUnit logicalTopVisualOverflow = min(pixelSnappedLogicalTop() - outsetLogicalTop, logicalVisualOverflow.y());
-    LayoutUnit logicalBottomVisualOverflow = max(pixelSnappedLogicalBottom() + outsetLogicalBottom, logicalVisualOverflow.maxY());
+    LayoutUnit logicalTopVisualOverflow = std::min(pixelSnappedLogicalTop() - outsetLogicalTop, logicalVisualOverflow.y());
+    LayoutUnit logicalBottomVisualOverflow = std::max(pixelSnappedLogicalBottom() + outsetLogicalBottom, logicalVisualOverflow.maxY());
 
     LayoutUnit outsetLogicalLeft = includeLogicalLeftEdge() ? borderOutsetLogicalLeft : LayoutUnit();
     LayoutUnit outsetLogicalRight = includeLogicalRightEdge() ? borderOutsetLogicalRight : LayoutUnit();
 
-    LayoutUnit logicalLeftVisualOverflow = min(pixelSnappedLogicalLeft() - outsetLogicalLeft, logicalVisualOverflow.x());
-    LayoutUnit logicalRightVisualOverflow = max(pixelSnappedLogicalRight() + outsetLogicalRight, logicalVisualOverflow.maxX());
+    LayoutUnit logicalLeftVisualOverflow = std::min(pixelSnappedLogicalLeft() - outsetLogicalLeft, logicalVisualOverflow.x());
+    LayoutUnit logicalRightVisualOverflow = std::max(pixelSnappedLogicalRight() + outsetLogicalRight, logicalVisualOverflow.maxX());
     
     logicalVisualOverflow = LayoutRect(logicalLeftVisualOverflow, logicalTopVisualOverflow,
                                        logicalRightVisualOverflow - logicalLeftVisualOverflow, logicalBottomVisualOverflow - logicalTopVisualOverflow);
@@ -879,33 +876,33 @@ inline void InlineFlowBox::addTextBoxVisualOverflow(InlineTextBox* textBox, Glyp
     if (lineStyle.textEmphasisMark() != TextEmphasisMarkNone && textBox->getEmphasisMarkPosition(lineStyle, emphasisMarkPosition)) {
         int emphasisMarkHeight = lineStyle.font().emphasisMarkHeight(lineStyle.textEmphasisMarkString());
         if ((emphasisMarkPosition == TextEmphasisPositionOver) == (!lineStyle.isFlippedLinesWritingMode()))
-            topGlyphOverflow = min(topGlyphOverflow, -emphasisMarkHeight);
+            topGlyphOverflow = std::min(topGlyphOverflow, -emphasisMarkHeight);
         else
-            bottomGlyphOverflow = max(bottomGlyphOverflow, emphasisMarkHeight);
+            bottomGlyphOverflow = std::max(bottomGlyphOverflow, emphasisMarkHeight);
     }
 
     // If letter-spacing is negative, we should factor that into right layout overflow. (Even in RTL, letter-spacing is
     // applied to the right, so this is not an issue with left overflow.
-    rightGlyphOverflow -= min(0, (int)lineStyle.font().letterSpacing());
+    rightGlyphOverflow -= std::min(0, (int)lineStyle.font().letterSpacing());
 
     LayoutUnit textShadowLogicalTop;
     LayoutUnit textShadowLogicalBottom;
     lineStyle.getTextShadowBlockDirectionExtent(textShadowLogicalTop, textShadowLogicalBottom);
     
-    LayoutUnit childOverflowLogicalTop = min<LayoutUnit>(textShadowLogicalTop + topGlyphOverflow, topGlyphOverflow);
-    LayoutUnit childOverflowLogicalBottom = max<LayoutUnit>(textShadowLogicalBottom + bottomGlyphOverflow, bottomGlyphOverflow);
+    LayoutUnit childOverflowLogicalTop = std::min<LayoutUnit>(textShadowLogicalTop + topGlyphOverflow, topGlyphOverflow);
+    LayoutUnit childOverflowLogicalBottom = std::max<LayoutUnit>(textShadowLogicalBottom + bottomGlyphOverflow, bottomGlyphOverflow);
    
     LayoutUnit textShadowLogicalLeft;
     LayoutUnit textShadowLogicalRight;
     lineStyle.getTextShadowInlineDirectionExtent(textShadowLogicalLeft, textShadowLogicalRight);
    
-    LayoutUnit childOverflowLogicalLeft = min<LayoutUnit>(textShadowLogicalLeft + leftGlyphOverflow, leftGlyphOverflow);
-    LayoutUnit childOverflowLogicalRight = max<LayoutUnit>(textShadowLogicalRight + rightGlyphOverflow, rightGlyphOverflow);
+    LayoutUnit childOverflowLogicalLeft = std::min<LayoutUnit>(textShadowLogicalLeft + leftGlyphOverflow, leftGlyphOverflow);
+    LayoutUnit childOverflowLogicalRight = std::max<LayoutUnit>(textShadowLogicalRight + rightGlyphOverflow, rightGlyphOverflow);
 
-    LayoutUnit logicalTopVisualOverflow = min(textBox->pixelSnappedLogicalTop() + childOverflowLogicalTop, logicalVisualOverflow.y());
-    LayoutUnit logicalBottomVisualOverflow = max(textBox->pixelSnappedLogicalBottom() + childOverflowLogicalBottom, logicalVisualOverflow.maxY());
-    LayoutUnit logicalLeftVisualOverflow = min(textBox->pixelSnappedLogicalLeft() + childOverflowLogicalLeft, logicalVisualOverflow.x());
-    LayoutUnit logicalRightVisualOverflow = max(textBox->pixelSnappedLogicalRight() + childOverflowLogicalRight, logicalVisualOverflow.maxX());
+    LayoutUnit logicalTopVisualOverflow = std::min(textBox->pixelSnappedLogicalTop() + childOverflowLogicalTop, logicalVisualOverflow.y());
+    LayoutUnit logicalBottomVisualOverflow = std::max(textBox->pixelSnappedLogicalBottom() + childOverflowLogicalBottom, logicalVisualOverflow.maxY());
+    LayoutUnit logicalLeftVisualOverflow = std::min(textBox->pixelSnappedLogicalLeft() + childOverflowLogicalLeft, logicalVisualOverflow.x());
+    LayoutUnit logicalRightVisualOverflow = std::max(textBox->pixelSnappedLogicalRight() + childOverflowLogicalRight, logicalVisualOverflow.maxX());
     
     logicalVisualOverflow = LayoutRect(logicalLeftVisualOverflow, logicalTopVisualOverflow,
                                        logicalRightVisualOverflow - logicalLeftVisualOverflow, logicalBottomVisualOverflow - logicalTopVisualOverflow);
@@ -1086,8 +1083,8 @@ bool InlineFlowBox::nodeAtPoint(const HitTestRequest& request, HitTestResult& re
         RootInlineBox& rootBox = root();
         LayoutUnit& top = isHorizontal() ? minY : minX;
         LayoutUnit& logicalHeight = isHorizontal() ? height : width;
-        LayoutUnit bottom = min(rootBox.lineBottom(), top + logicalHeight);
-        top = max(rootBox.lineTop(), top);
+        LayoutUnit bottom = std::min(rootBox.lineBottom(), top + logicalHeight);
+        top = std::max(rootBox.lineTop(), top);
         logicalHeight = bottom - top;
     }
 
@@ -1256,8 +1253,8 @@ void InlineFlowBox::constrainToLineTopAndBottomIfNeeded(LayoutRect& rect) const
         const RootInlineBox& rootBox = root();
         LayoutUnit logicalTop = isHorizontal() ? rect.y() : rect.x();
         LayoutUnit logicalHeight = isHorizontal() ? rect.height() : rect.width();
-        LayoutUnit bottom = min(rootBox.lineBottom(), logicalTop + logicalHeight);
-        logicalTop = max(rootBox.lineTop(), logicalTop);
+        LayoutUnit bottom = std::min(rootBox.lineBottom(), logicalTop + logicalHeight);
+        logicalTop = std::max(rootBox.lineTop(), logicalTop);
         logicalHeight = bottom - logicalTop;
         if (isHorizontal()) {
             rect.setY(logicalTop);
@@ -1517,7 +1514,7 @@ LayoutUnit InlineFlowBox::computeOverAnnotationAdjustment(LayoutUnit allowedPosi
             continue; // Positioned placeholders don't affect calculations.
         
         if (curr->isInlineFlowBox())
-            result = max(result, toInlineFlowBox(curr)->computeOverAnnotationAdjustment(allowedPosition));
+            result = std::max(result, toInlineFlowBox(curr)->computeOverAnnotationAdjustment(allowedPosition));
         
         if (curr->renderer().isReplaced() && curr->renderer().isRubyRun() && curr->renderer().style().rubyPosition() == RubyPositionBefore) {
             RenderRubyRun& rubyRun = toRenderRubyRun(curr->renderer());
@@ -1530,13 +1527,13 @@ LayoutUnit InlineFlowBox::computeOverAnnotationAdjustment(LayoutUnit allowedPosi
                 if (topOfFirstRubyTextLine >= 0)
                     continue;
                 topOfFirstRubyTextLine += curr->logicalTop();
-                result = max(result, allowedPosition - topOfFirstRubyTextLine);
+                result = std::max(result, allowedPosition - topOfFirstRubyTextLine);
             } else {
                 LayoutUnit bottomOfLastRubyTextLine = rubyText->logicalTop() + (rubyText->lastRootBox() ? rubyText->lastRootBox()->lineBottom() : rubyText->logicalHeight());
                 if (bottomOfLastRubyTextLine <= curr->logicalHeight())
                     continue;
                 bottomOfLastRubyTextLine += curr->logicalTop();
-                result = max(result, bottomOfLastRubyTextLine - allowedPosition);
+                result = std::max(result, bottomOfLastRubyTextLine - allowedPosition);
             }
         }
 
@@ -1546,10 +1543,10 @@ LayoutUnit InlineFlowBox::computeOverAnnotationAdjustment(LayoutUnit allowedPosi
             if (childLineStyle.textEmphasisMark() != TextEmphasisMarkNone && toInlineTextBox(curr)->getEmphasisMarkPosition(childLineStyle, emphasisMarkPosition) && emphasisMarkPosition == TextEmphasisPositionOver) {
                 if (!childLineStyle.isFlippedLinesWritingMode()) {
                     int topOfEmphasisMark = curr->logicalTop() - childLineStyle.font().emphasisMarkHeight(childLineStyle.textEmphasisMarkString());
-                    result = max(result, allowedPosition - topOfEmphasisMark);
+                    result = std::max(result, allowedPosition - topOfEmphasisMark);
                 } else {
                     int bottomOfEmphasisMark = curr->logicalBottom() + childLineStyle.font().emphasisMarkHeight(childLineStyle.textEmphasisMarkString());
-                    result = max(result, bottomOfEmphasisMark - allowedPosition);
+                    result = std::max(result, bottomOfEmphasisMark - allowedPosition);
                 }
             }
         }
@@ -1565,7 +1562,7 @@ LayoutUnit InlineFlowBox::computeUnderAnnotationAdjustment(LayoutUnit allowedPos
             continue; // Positioned placeholders don't affect calculations.
 
         if (curr->isInlineFlowBox())
-            result = max(result, toInlineFlowBox(curr)->computeUnderAnnotationAdjustment(allowedPosition));
+            result = std::max(result, toInlineFlowBox(curr)->computeUnderAnnotationAdjustment(allowedPosition));
 
         if (curr->renderer().isReplaced() && curr->renderer().isRubyRun() && curr->renderer().style().rubyPosition() == RubyPositionAfter) {
             RenderRubyRun& rubyRun = toRenderRubyRun(curr->renderer());
@@ -1578,13 +1575,13 @@ LayoutUnit InlineFlowBox::computeUnderAnnotationAdjustment(LayoutUnit allowedPos
                 if (topOfFirstRubyTextLine >= 0)
                     continue;
                 topOfFirstRubyTextLine += curr->logicalTop();
-                result = max(result, allowedPosition - topOfFirstRubyTextLine);
+                result = std::max(result, allowedPosition - topOfFirstRubyTextLine);
             } else {
                 LayoutUnit bottomOfLastRubyTextLine = rubyText->logicalTop() + (rubyText->lastRootBox() ? rubyText->lastRootBox()->lineBottom() : rubyText->logicalHeight());
                 if (bottomOfLastRubyTextLine <= curr->logicalHeight())
                     continue;
                 bottomOfLastRubyTextLine += curr->logicalTop();
-                result = max(result, bottomOfLastRubyTextLine - allowedPosition);
+                result = std::max(result, bottomOfLastRubyTextLine - allowedPosition);
             }
         }
 
@@ -1593,10 +1590,10 @@ LayoutUnit InlineFlowBox::computeUnderAnnotationAdjustment(LayoutUnit allowedPos
             if (childLineStyle.textEmphasisMark() != TextEmphasisMarkNone && childLineStyle.textEmphasisPosition() == TextEmphasisPositionUnder) {
                 if (!childLineStyle.isFlippedLinesWritingMode()) {
                     LayoutUnit bottomOfEmphasisMark = curr->logicalBottom() + childLineStyle.font().emphasisMarkHeight(childLineStyle.textEmphasisMarkString());
-                    result = max(result, bottomOfEmphasisMark - allowedPosition);
+                    result = std::max(result, bottomOfEmphasisMark - allowedPosition);
                 } else {
                     LayoutUnit topOfEmphasisMark = curr->logicalTop() - childLineStyle.font().emphasisMarkHeight(childLineStyle.textEmphasisMarkString());
-                    result = max(result, allowedPosition - topOfEmphasisMark);
+                    result = std::max(result, allowedPosition - topOfEmphasisMark);
                 }
             }
         }
@@ -1615,8 +1612,8 @@ void InlineFlowBox::collectLeafBoxesInLogicalOrder(Vector<InlineBox*>& leafBoxes
 
     // First find highest and lowest levels, and initialize leafBoxesInLogicalOrder with the leaf boxes in visual order.
     for (; leaf; leaf = leaf->nextLeafChild()) {
-        minLevel = min(minLevel, leaf->bidiLevel());
-        maxLevel = max(maxLevel, leaf->bidiLevel());
+        minLevel = std::min(minLevel, leaf->bidiLevel());
+        maxLevel = std::max(maxLevel, leaf->bidiLevel());
         leafBoxesInLogicalOrder.append(leaf);
     }
 
index 7fca315..6ae1c7a 100644 (file)
@@ -52,8 +52,6 @@
 #include "break_lines.h"
 #include <wtf/text/CString.h>
 
-using namespace std;
-
 namespace WebCore {
 
 struct SameSizeAsInlineTextBox : public InlineBox {
@@ -132,8 +130,8 @@ LayoutUnit InlineTextBox::selectionHeight() const
 
 bool InlineTextBox::isSelected(int startPos, int endPos) const
 {
-    LayoutUnit sPos = max<LayoutUnit>(startPos - m_start, 0);
-    LayoutUnit ePos = min<LayoutUnit>(endPos - m_start, m_len);
+    LayoutUnit sPos = std::max<LayoutUnit>(startPos - m_start, 0);
+    LayoutUnit ePos = std::min<LayoutUnit>(endPos - m_start, m_len);
     return (sPos < ePos);
 }
 
@@ -202,8 +200,8 @@ static const Font& fontToUse(const RenderStyle& style, const RenderText& rendere
 
 LayoutRect InlineTextBox::localSelectionRect(int startPos, int endPos) const
 {
-    int sPos = max(startPos - m_start, 0);
-    int ePos = min(endPos - m_start, (int)m_len);
+    int sPos = std::max(startPos - m_start, 0);
+    int ePos = std::min(endPos - m_start, (int)m_len);
     
     if (sPos > ePos)
         return LayoutRect();
@@ -306,7 +304,7 @@ float InlineTextBox::placeEllipsisBox(bool flowIsLTR, float visibleLeftEdge, flo
             // and the ellipsis edge.
             m_truncation = cFullTruncation;
             truncatedWidth += ellipsisWidth;
-            return flowIsLTR ? min(ellipsisX, x()) : max(ellipsisX, right() - ellipsisWidth);
+            return flowIsLTR ? std::min(ellipsisX, x()) : std::max(ellipsisX, right() - ellipsisWidth);
         }
 
         // Set the truncation index on the text run.
@@ -389,7 +387,7 @@ FloatSize InlineTextBox::applyShadowToGraphicsContext(GraphicsContext* context,
         context->save();
         context->clip(shadowRect);
 
-        extraOffset = FloatSize(0, 2 * textRect.height() + max(0.0f, shadowOffset.height()) + shadowRadius);
+        extraOffset = FloatSize(0, 2 * textRect.height() + std::max(0.0f, shadowOffset.height()) + shadowRadius);
         shadowOffset -= extraOffset;
     }
 
@@ -558,8 +556,8 @@ void InlineTextBox::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffset,
         selectionStartEnd(sPos, ePos);
 
     if (m_truncation != cNoTruncation) {
-        sPos = min<int>(sPos, m_truncation);
-        ePos = min<int>(ePos, m_truncation);
+        sPos = std::min<int>(sPos, m_truncation);
+        ePos = std::min<int>(ePos, m_truncation);
         length = m_truncation;
     }
 
@@ -633,8 +631,8 @@ void InlineTextBox::selectionStartEnd(int& sPos, int& ePos)
             startPos = 0;
     }
 
-    sPos = max(startPos - m_start, 0);
-    ePos = min(endPos - m_start, (int)m_len);
+    sPos = std::max(startPos - m_start, 0);
+    ePos = std::min(endPos - m_start, (int)m_len);
 }
 
 void alignSelectionRectToDevicePixels(FloatRect& rect)
@@ -689,7 +687,7 @@ void InlineTextBox::paintSelection(GraphicsContext* context, const FloatPoint& b
     LayoutUnit selectionTop = rootBox.selectionTopAdjustedForPrecedingBlock();
 
     int deltaY = roundToInt(renderer().style().isFlippedLinesWritingMode() ? selectionBottom - logicalBottom() : logicalTop() - selectionTop);
-    int selHeight = max(0, roundToInt(selectionBottom - selectionTop));
+    int selHeight = std::max(0, roundToInt(selectionBottom - selectionTop));
 
     FloatPoint localOrigin(boxOrigin.x(), boxOrigin.y() - deltaY);
     FloatRect clipRect(localOrigin, FloatSize(m_logicalWidth, selHeight));
@@ -710,8 +708,8 @@ void InlineTextBox::paintSelection(GraphicsContext* context, const FloatPoint& b
 void InlineTextBox::paintCompositionBackground(GraphicsContext* context, const FloatPoint& boxOrigin, const RenderStyle& style, const Font& font, int startPos, int endPos)
 {
     int offset = m_start;
-    int sPos = max(startPos - offset, 0);
-    int ePos = min(endPos - offset, (int)m_len);
+    int sPos = std::max(startPos - offset, 0);
+    int ePos = std::min(endPos - offset, (int)m_len);
 
     if (sPos >= ePos)
         return;
@@ -776,7 +774,7 @@ static int computeUnderlineOffset(const TextUnderlinePosition underlinePosition,
 {
     // Compute the gap between the font and the underline. Use at least one
     // pixel gap, if underline is thick then use a bigger gap.
-    const int gap = max<int>(1, ceilf(textDecorationThickness / 2.0));
+    const int gap = std::max<int>(1, ceilf(textDecorationThickness / 2.0));
 
     // According to the specification TextUnderlinePositionAuto should default to 'alphabetic' for horizontal text
     // and to 'under Left' for vertical text (e.g. japanese). We support only horizontal text for now.
@@ -1022,7 +1020,7 @@ void InlineTextBox::paintDecoration(GraphicsContext& context, const FloatPoint&
             int shadowY = isHorizontal() ? s->y() : -s->x();
             shadowRect.move(shadowX, shadowY);
             clipRect.unite(shadowRect);
-            extraOffset = max(extraOffset, max(0, shadowY) + shadowExtent);
+            extraOffset = std::max(extraOffset, std::max(0, shadowY) + shadowExtent);
         }
         context.save();
         context.clip(clipRect);
@@ -1195,11 +1193,11 @@ void InlineTextBox::paintDocumentMarker(GraphicsContext* pt, const FloatPoint& b
 
     bool isDictationMarker = marker->type() == DocumentMarker::DictationAlternatives;
     if (!markerSpansWholeBox || grammar || isDictationMarker) {
-        int startPosition = max<int>(marker->startOffset() - m_start, 0);
-        int endPosition = min<int>(marker->endOffset() - m_start, m_len);
+        int startPosition = std::max<int>(marker->startOffset() - m_start, 0);
+        int endPosition = std::min<int>(marker->endOffset() - m_start, m_len);
         
         if (m_truncation != cNoTruncation)
-            endPosition = min<int>(endPosition, m_truncation);
+            endPosition = std::min<int>(endPosition, m_truncation);
 
         // Calculate start & width
         int deltaY = renderer().style().isFlippedLinesWritingMode() ? selectionBottom() - logicalBottom() : logicalTop() - selectionTop();
@@ -1248,8 +1246,8 @@ void InlineTextBox::paintTextMatchMarker(GraphicsContext* pt, const FloatPoint&
     int deltaY = renderer().style().isFlippedLinesWritingMode() ? selectionBottom() - logicalBottom() : logicalTop() - selectionTop();
     int selHeight = selectionHeight();
 
-    int sPos = max(marker->startOffset() - m_start, (unsigned)0);
-    int ePos = min(marker->endOffset() - m_start, (unsigned)m_len);
+    int sPos = std::max(marker->startOffset() - m_start, (unsigned)0);
+    int ePos = std::min(marker->endOffset() - m_start, (unsigned)m_len);
     TextRun run = constructTextRun(style, font);
 
     // Always compute and store the rect associated with this marker. The computed rect is in absolute coordinates.
@@ -1275,8 +1273,8 @@ void InlineTextBox::computeRectForReplacementMarker(DocumentMarker* marker, cons
     int top = selectionTop();
     int h = selectionHeight();
     
-    int sPos = max(marker->startOffset() - m_start, (unsigned)0);
-    int ePos = min(marker->endOffset() - m_start, (unsigned)m_len);
+    int sPos = std::max(marker->startOffset() - m_start, (unsigned)0);
+    int ePos = std::min(marker->endOffset() - m_start, (unsigned)m_len);
     TextRun run = constructTextRun(style, font);
     IntPoint startPoint = IntPoint(x(), top);
     
@@ -1365,11 +1363,11 @@ void InlineTextBox::paintCompositionUnderline(GraphicsContext* ctx, const FloatP
         start = renderer().width(m_start, paintStart - m_start, textPos(), isFirstLine());
     }
     if (paintEnd != underline.endOffset) {      // end points at the last char, not past it
-        paintEnd = min(paintEnd, (unsigned)underline.endOffset);
+        paintEnd = std::min(paintEnd, (unsigned)underline.endOffset);
         useWholeWidth = false;
     }
     if (m_truncation != cNoTruncation) {
-        paintEnd = min(paintEnd, (unsigned)m_start + m_truncation);
+        paintEnd = std::min(paintEnd, (unsigned)m_start + m_truncation);
         useWholeWidth = false;
     }
     if (!useWholeWidth) {
index 45b17e6..10a9882 100644 (file)
@@ -76,7 +76,6 @@
 #include "HTMLElement.h"
 #endif
 
-using namespace std;
 using namespace WTF;
 using namespace Unicode;
 
@@ -1574,9 +1573,9 @@ void RenderBlock::computeOverflow(LayoutUnit oldClientAfterEdge, bool)
         LayoutRect clientRect(clientBoxRect());
         LayoutRect rectToApply;
         if (isHorizontalWritingMode())
-            rectToApply = LayoutRect(clientRect.x(), clientRect.y(), 1, max<LayoutUnit>(0, oldClientAfterEdge - clientRect.y()));
+            rectToApply = LayoutRect(clientRect.x(), clientRect.y(), 1, std::max<LayoutUnit>(0, oldClientAfterEdge - clientRect.y()));
         else
-            rectToApply = LayoutRect(clientRect.x(), clientRect.y(), max<LayoutUnit>(0, oldClientAfterEdge - clientRect.x()), 1);
+            rectToApply = LayoutRect(clientRect.x(), clientRect.y(), std::max<LayoutUnit>(0, oldClientAfterEdge - clientRect.x()), 1);
         addLayoutOverflow(rectToApply);
         if (hasRenderOverflow())
             m_overflow->setLayoutClientAfterEdge(oldClientAfterEdge);
@@ -1801,14 +1800,14 @@ LayoutUnit RenderBlock::computeStartPositionDeltaForChildAvoidingFloats(const Re
 
     LayoutUnit blockOffset = logicalTopForChild(child);
     if (region)
-        blockOffset = max(blockOffset, blockOffset + (region->logicalTopForFlowThreadContent() - offsetFromLogicalTopOfFirstPage()));
+        blockOffset = std::max(blockOffset, blockOffset + (region->logicalTopForFlowThreadContent() - offsetFromLogicalTopOfFirstPage()));
 
     LayoutUnit startOff = startOffsetForLineInRegion(blockOffset, false, region, logicalHeightForChild(child));
 
     if (style().textAlign() != WEBKIT_CENTER && !child.style().marginStartUsing(&style()).isAuto()) {
         if (childMarginStart < 0)
             startOff += childMarginStart;
-        newPosition = max(newPosition, startOff); // Let the float sit in the child's margin if it can fit.
+        newPosition = std::max(newPosition, startOff); // Let the float sit in the child's margin if it can fit.
     } else if (startOff != startPosition)
         newPosition = startOff + childMarginStart;
 
@@ -2368,7 +2367,7 @@ bool RenderBlock::paintChild(RenderBox& child, PaintInfo& paintInfo, const Layou
     if (checkAfterAlways
         && (absoluteChildY + child.height()) > paintInfo.rect.y()
         && (absoluteChildY + child.height()) < paintInfo.rect.maxY()) {
-        view().setBestTruncatedAt(absoluteChildY + child.height() + max<LayoutUnit>(0, child.collapsedMarginAfter()), this, true);
+        view().setBestTruncatedAt(absoluteChildY + child.height() + std::max<LayoutUnit>(0, child.collapsedMarginAfter()), this, true);
         return false;
     }
 
@@ -2808,8 +2807,8 @@ LayoutRect RenderBlock::blockSelectionGap(RenderBlock& rootBlock, const LayoutPo
         return LayoutRect();
 
     // Get the selection offsets for the bottom of the gap
-    LayoutUnit logicalLeft = max(lastLogicalLeft, logicalLeftSelectionOffset(rootBlock, logicalBottom, cache));
-    LayoutUnit logicalRight = min(lastLogicalRight, logicalRightSelectionOffset(rootBlock, logicalBottom, cache));
+    LayoutUnit logicalLeft = std::max(lastLogicalLeft, logicalLeftSelectionOffset(rootBlock, logicalBottom, cache));
+    LayoutUnit logicalRight = std::min(lastLogicalRight, logicalRightSelectionOffset(rootBlock, logicalBottom, cache));
     LayoutUnit logicalWidth = logicalRight - logicalLeft;
     if (logicalWidth <= 0)
         return LayoutRect();
@@ -2824,9 +2823,9 @@ LayoutRect RenderBlock::logicalLeftSelectionGap(RenderBlock& rootBlock, const La
     RenderObject* selObj, LayoutUnit logicalLeft, LayoutUnit logicalTop, LayoutUnit logicalHeight, const LogicalSelectionOffsetCaches& cache, const PaintInfo* paintInfo)
 {
     LayoutUnit rootBlockLogicalTop = blockDirectionOffset(rootBlock, offsetFromRootBlock) + logicalTop;
-    LayoutUnit rootBlockLogicalLeft = max(logicalLeftSelectionOffset(rootBlock, logicalTop, cache), logicalLeftSelectionOffset(rootBlock, logicalTop + logicalHeight, cache));
-    LayoutUnit rootBlockLogicalRight = min(inlineDirectionOffset(rootBlock, offsetFromRootBlock) + floorToInt(logicalLeft),
-        min(logicalRightSelectionOffset(rootBlock, logicalTop, cache), logicalRightSelectionOffset(rootBlock, logicalTop + logicalHeight, cache)));
+    LayoutUnit rootBlockLogicalLeft = std::max(logicalLeftSelectionOffset(rootBlock, logicalTop, cache), logicalLeftSelectionOffset(rootBlock, logicalTop + logicalHeight, cache));
+    LayoutUnit rootBlockLogicalRight = std::min(inlineDirectionOffset(rootBlock, offsetFromRootBlock) + floorToInt(logicalLeft),
+        std::min(logicalRightSelectionOffset(rootBlock, logicalTop, cache), logicalRightSelectionOffset(rootBlock, logicalTop + logicalHeight, cache)));
     LayoutUnit rootBlockLogicalWidth = rootBlockLogicalRight - rootBlockLogicalLeft;
     if (rootBlockLogicalWidth <= 0)
         return LayoutRect();
@@ -2841,9 +2840,9 @@ LayoutRect RenderBlock::logicalRightSelectionGap(RenderBlock& rootBlock, const L
     RenderObject* selObj, LayoutUnit logicalRight, LayoutUnit logicalTop, LayoutUnit logicalHeight, const LogicalSelectionOffsetCaches& cache, const PaintInfo* paintInfo)
 {
     LayoutUnit rootBlockLogicalTop = blockDirectionOffset(rootBlock, offsetFromRootBlock) + logicalTop;
-    LayoutUnit rootBlockLogicalLeft = max(inlineDirectionOffset(rootBlock, offsetFromRootBlock) + floorToInt(logicalRight),
-        max(logicalLeftSelectionOffset(rootBlock, logicalTop, cache), logicalLeftSelectionOffset(rootBlock, logicalTop + logicalHeight, cache)));
-    LayoutUnit rootBlockLogicalRight = min(logicalRightSelectionOffset(rootBlock, logicalTop, cache), logicalRightSelectionOffset(rootBlock, logicalTop + logicalHeight, cache));
+    LayoutUnit rootBlockLogicalLeft = std::max(inlineDirectionOffset(rootBlock, offsetFromRootBlock) + floorToInt(logicalRight),
+        std::max(logicalLeftSelectionOffset(rootBlock, logicalTop, cache), logicalLeftSelectionOffset(rootBlock, logicalTop + logicalHeight, cache)));
+    LayoutUnit rootBlockLogicalRight = std::min(logicalRightSelectionOffset(rootBlock, logicalTop, cache), logicalRightSelectionOffset(rootBlock, logicalTop + logicalHeight, cache));
     LayoutUnit rootBlockLogicalWidth = rootBlockLogicalRight - rootBlockLogicalLeft;
     if (rootBlockLogicalWidth <= 0)
         return LayoutRect();
@@ -3566,17 +3565,17 @@ void RenderBlock::calcColumnWidth()
         
     LayoutUnit availWidth = desiredColumnWidth;
     LayoutUnit colGap = columnGap();
-    LayoutUnit colWidth = max<LayoutUnit>(1, LayoutUnit(style().columnWidth()));
-    int colCount = max<int>(1, style().columnCount());
+    LayoutUnit colWidth = std::max<LayoutUnit>(1, LayoutUnit(style().columnWidth()));
+    int colCount = std::max<int>(1, style().columnCount());
 
     if (style().hasAutoColumnWidth() && !style().hasAutoColumnCount()) {
         desiredColumnCount = colCount;
-        desiredColumnWidth = max<LayoutUnit>(0, (availWidth - ((desiredColumnCount - 1) * colGap)) / desiredColumnCount);
+        desiredColumnWidth = std::max<LayoutUnit>(0, (availWidth - ((desiredColumnCount - 1) * colGap)) / desiredColumnCount);
     } else if (!style().hasAutoColumnWidth() && style().hasAutoColumnCount()) {
-        desiredColumnCount = max<LayoutUnit>(1, (availWidth + colGap) / (colWidth + colGap));
+        desiredColumnCount = std::max<LayoutUnit>(1, (availWidth + colGap) / (colWidth + colGap));
         desiredColumnWidth = ((availWidth + colGap) / desiredColumnCount) - colGap;
     } else {
-        desiredColumnCount = max<LayoutUnit>(min<LayoutUnit>(colCount, (availWidth + colGap) / (colWidth + colGap)), 1);
+        desiredColumnCount = std::max<LayoutUnit>(std::min<LayoutUnit>(colCount, (availWidth + colGap) / (colWidth + colGap)), 1);
         desiredColumnWidth = ((availWidth + colGap) / desiredColumnCount) - colGap;
     }
     setDesiredColumnCountAndWidth(desiredColumnCount, desiredColumnWidth);
@@ -3810,8 +3809,8 @@ void RenderBlock::adjustRectForColumns(LayoutRect& r) const
     if (!colHeight)
         return;
 
-    LayoutUnit startOffset = max(isHorizontal ? r.y() : r.x(), beforeBorderPadding);
-    LayoutUnit endOffset = max(min<LayoutUnit>(isHorizontal ? r.maxY() : r.maxX(), beforeBorderPadding + colCount * colHeight), beforeBorderPadding);
+    LayoutUnit startOffset = std::max(isHorizontal ? r.y() : r.x(), beforeBorderPadding);
+    LayoutUnit endOffset = std::max(std::min<LayoutUnit>(isHorizontal ? r.maxY() : r.maxX(), beforeBorderPadding + colCount * colHeight), beforeBorderPadding);
 
     // FIXME: Can overflow on fast/block/float/float-not-removed-from-next-sibling4.html, see https://bugs.webkit.org/show_bug.cgi?id=68744
     unsigned startColumn = (startOffset - beforeBorderPadding) / colHeight;
@@ -3925,7 +3924,7 @@ void RenderBlock::computeIntrinsicLogicalWidths(LayoutUnit& minLogicalWidth, Lay
     } else
         computeBlockPreferredLogicalWidths(minLogicalWidth, maxLogicalWidth);
 
-    maxLogicalWidth = max(minLogicalWidth, maxLogicalWidth);
+    maxLogicalWidth = std::max(minLogicalWidth, maxLogicalWidth);
 
     adjustIntrinsicLogicalWidthsForColumns(minLogicalWidth, maxLogicalWidth);
 
@@ -3938,7 +3937,7 @@ void RenderBlock::computeIntrinsicLogicalWidths(LayoutUnit& minLogicalWidth, Lay
     if (isTableCell()) {
         Length tableCellWidth = toRenderTableCell(this)->styleOrColLogicalWidth();
         if (tableCellWidth.isFixed() && tableCellWidth.value() > 0)
-            maxLogicalWidth = max(minLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(tableCellWidth.value()));
+            maxLogicalWidth = std::max(minLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(tableCellWidth.value()));
     }
 
     int scrollbarWidth = instrinsicScrollbarLogicalWidth();
@@ -3963,13 +3962,13 @@ void RenderBlock::computePreferredLogicalWidths()
         computeIntrinsicLogicalWidths(m_minPreferredLogicalWidth, m_maxPreferredLogicalWidth);
     
     if (styleToUse.logicalMinWidth().isFixed() && styleToUse.logicalMinWidth().value() > 0) {
-        m_maxPreferredLogicalWidth = max(m_maxPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(styleToUse.logicalMinWidth().value()));
-        m_minPreferredLogicalWidth = max(m_minPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(styleToUse.logicalMinWidth().value()));
+        m_maxPreferredLogicalWidth = std::max(m_maxPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(styleToUse.logicalMinWidth().value()));
+        m_minPreferredLogicalWidth = std::max(m_minPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(styleToUse.logicalMinWidth().value()));
     }
     
     if (styleToUse.logicalMaxWidth().isFixed()) {
-        m_maxPreferredLogicalWidth = min(m_maxPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(styleToUse.logicalMaxWidth().value()));
-        m_minPreferredLogicalWidth = min(m_minPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(styleToUse.logicalMaxWidth().value()));
+        m_maxPreferredLogicalWidth = std::min(m_maxPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(styleToUse.logicalMaxWidth().value()));
+        m_minPreferredLogicalWidth = std::min(m_minPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(styleToUse.logicalMaxWidth().value()));
     }
     
     // Table layout uses integers, ceil the preferred widths to ensure that they can contain the contents.
@@ -4001,14 +4000,14 @@ void RenderBlock::adjustIntrinsicLogicalWidthsForColumns(LayoutUnit& minLogicalW
             minLogicalWidth = minLogicalWidth * columnCount + gapExtra;
         else {
             columnWidth = style().columnWidth();
-            minLogicalWidth = min(minLogicalWidth, columnWidth);
+            minLogicalWidth = std::min(minLogicalWidth, columnWidth);
         }
         // FIXME: If column-count is auto here, we should resolve it to calculate the maximum
         // intrinsic width, instead of pretending that it's 1. The only way to do that is by
         // performing a layout pass, but this is not an appropriate time or place for layout. The
         // good news is that if height is unconstrained and there are no explicit breaks, the
         // resolved column-count really should be 1.
-        maxLogicalWidth = max(maxLogicalWidth, columnWidth) * columnCount + gapExtra;
+        maxLogicalWidth = std::max(maxLogicalWidth, columnWidth) * columnCount + gapExtra;
     }
 }
 
@@ -4113,7 +4112,7 @@ static inline void stripTrailingSpace(float& inlineMax, float& inlineMin,
 static inline void updatePreferredWidth(LayoutUnit& preferredWidth, float& result)
 {
     LayoutUnit snappedResult = ceiledLayoutUnit(result);
-    preferredWidth = max(snappedResult, preferredWidth);
+    preferredWidth = std::max(snappedResult, preferredWidth);
 }
 
 // With sub-pixel enabled: When converting between floating point and LayoutUnits
@@ -4285,7 +4284,7 @@ void RenderBlock::computeInlinePreferredLogicalWidths(LayoutUnit& minLogicalWidt
                 }
 
                 // Add our width to the max.
-                inlineMax += max<float>(0, childMax);
+                inlineMax += std::max<float>(0, childMax);
 
                 if (!autoWrap || !canBreakReplacedElement || (isPrevChildInlineFlow && !shouldBreakLineAfterText)) {
                     if (child->isFloating())
@@ -4406,7 +4405,7 @@ void RenderBlock::computeInlinePreferredLogicalWidths(LayoutUnit& minLogicalWidt
                     inlineMax = endMax;
                     addedTextIndent = true;
                 } else
-                    inlineMax += max<float>(0, childMax);
+                    inlineMax += std::max<float>(0, childMax);
             }
 
             // Ignore spaces after a list marker.
@@ -4455,11 +4454,11 @@ void RenderBlock::computeBlockPreferredLogicalWidths(LayoutUnit& minLogicalWidth
         if (child->isFloating() || (child->isBox() && toRenderBox(child)->avoidsFloats())) {
             LayoutUnit floatTotalWidth = floatLeftWidth + floatRightWidth;
             if (childStyle.clear() & CLEFT) {
-                maxLogicalWidth = max(floatTotalWidth, maxLogicalWidth);
+                maxLogicalWidth = std::max(floatTotalWidth, maxLogicalWidth);
                 floatLeftWidth = 0;
             }
             if (childStyle.clear() & CRIGHT) {
-                maxLogicalWidth = max(floatTotalWidth, maxLogicalWidth);
+                maxLogicalWidth = std::max(floatTotalWidth, maxLogicalWidth);
                 floatRightWidth = 0;
             }
         }
@@ -4490,11 +4489,11 @@ void RenderBlock::computeBlockPreferredLogicalWidths(LayoutUnit& minLogicalWidth
         }
 
         LayoutUnit w = childMinPreferredLogicalWidth + margin;
-        minLogicalWidth = max(w, minLogicalWidth);
+        minLogicalWidth = std::max(w, minLogicalWidth);
         
         // IE ignores tables for calculation of nowrap. Makes some sense.
         if (nowrap && !child->isTable())
-            maxLogicalWidth = max(w, maxLogicalWidth);
+            maxLogicalWidth = std::max(w, maxLogicalWidth);
 
         w = childMaxPreferredLogicalWidth + margin;
 
@@ -4506,13 +4505,13 @@ void RenderBlock::computeBlockPreferredLogicalWidths(LayoutUnit& minLogicalWidth
                 bool ltr = containingBlock ? containingBlock->style().isLeftToRightDirection() : styleToUse.isLeftToRightDirection();
                 LayoutUnit marginLogicalLeft = ltr ? marginStart : marginEnd;
                 LayoutUnit marginLogicalRight = ltr ? marginEnd : marginStart;
-                LayoutUnit maxLeft = marginLogicalLeft > 0 ? max(floatLeftWidth, marginLogicalLeft) : floatLeftWidth + marginLogicalLeft;
-                LayoutUnit maxRight = marginLogicalRight > 0 ? max(floatRightWidth, marginLogicalRight) : floatRightWidth + marginLogicalRight;
+                LayoutUnit maxLeft = marginLogicalLeft > 0 ? std::max(floatLeftWidth, marginLogicalLeft) : floatLeftWidth + marginLogicalLeft;
+                LayoutUnit maxRight = marginLogicalRight > 0 ? std::max(floatRightWidth, marginLogicalRight) : floatRightWidth + marginLogicalRight;
                 w = childMaxPreferredLogicalWidth + maxLeft + maxRight;
-                w = max(w, floatLeftWidth + floatRightWidth);
+                w = std::max(w, floatLeftWidth + floatRightWidth);
             }
             else
-                maxLogicalWidth = max(floatLeftWidth + floatRightWidth, maxLogicalWidth);
+                maxLogicalWidth = std::max(floatLeftWidth + floatRightWidth, maxLogicalWidth);
             floatLeftWidth = floatRightWidth = 0;
         }
         
@@ -4522,16 +4521,16 @@ void RenderBlock::computeBlockPreferredLogicalWidths(LayoutUnit& minLogicalWidth
             else
                 floatRightWidth += w;
         } else
-            maxLogicalWidth = max(w, maxLogicalWidth);
+            maxLogicalWidth = std::max(w, maxLogicalWidth);
         
         child = child->nextSibling();
     }
 
     // Always make sure these values are non-negative.
-    minLogicalWidth = max<LayoutUnit>(0, minLogicalWidth);
-    maxLogicalWidth = max<LayoutUnit>(0, maxLogicalWidth);
+    minLogicalWidth = std::max<LayoutUnit>(0, minLogicalWidth);
+    maxLogicalWidth = std::max<LayoutUnit>(0, maxLogicalWidth);
 
-    maxLogicalWidth = max(floatLeftWidth + floatRightWidth, maxLogicalWidth);
+    maxLogicalWidth = std::max(floatLeftWidth + floatRightWidth, maxLogicalWidth);
 }
 
 bool RenderBlock::hasLineIfEmpty() const
index 8e99c51..418600f 100644 (file)
@@ -40,8 +40,6 @@
 #include "VerticalPositionCache.h"
 #include "VisiblePosition.h"
 
-using namespace std;
-
 namespace WebCore {
 
 bool RenderBlock::s_canPropagateFloatIntoSibling = false;
@@ -249,17 +247,17 @@ void RenderBlockFlow::clearFloats()
                     LayoutUnit oldLogicalBottom = logicalBottomForFloat(oldFloatingObject.get());
                     if (logicalWidthForFloat(floatingObject) != logicalWidthForFloat(oldFloatingObject.get()) || logicalLeftForFloat(floatingObject) != logicalLeftForFloat(oldFloatingObject.get())) {
                         changeLogicalTop = 0;
-                        changeLogicalBottom = max(changeLogicalBottom, max(logicalBottom, oldLogicalBottom));
+                        changeLogicalBottom = std::max(changeLogicalBottom, std::max(logicalBottom, oldLogicalBottom));
                     } else {
                         if (logicalBottom != oldLogicalBottom) {
-                            changeLogicalTop = min(changeLogicalTop, min(logicalBottom, oldLogicalBottom));
-                            changeLogicalBottom = max(changeLogicalBottom, max(logicalBottom, oldLogicalBottom));
+                            changeLogicalTop = std::min(changeLogicalTop, std::min(logicalBottom, oldLogicalBottom));
+                            changeLogicalBottom = std::max(changeLogicalBottom, std::max(logicalBottom, oldLogicalBottom));
                         }
                         LayoutUnit logicalTop = logicalTopForFloat(floatingObject);
                         LayoutUnit oldLogicalTop = logicalTopForFloat(oldFloatingObject.get());
                         if (logicalTop != oldLogicalTop) {
-                            changeLogicalTop = min(changeLogicalTop, min(logicalTop, oldLogicalTop));
-                            changeLogicalBottom = max(changeLogicalBottom, max(logicalTop, oldLogicalTop));
+                            changeLogicalTop = std::min(changeLogicalTop, std::min(logicalTop, oldLogicalTop));
+                            changeLogicalBottom = std::max(changeLogicalBottom, std::max(logicalTop, oldLogicalTop));
                         }
                     }
 
@@ -269,7 +267,7 @@ void RenderBlockFlow::clearFloats()
                     }
                 } else {
                     changeLogicalTop = 0;
-                    changeLogicalBottom = max(changeLogicalBottom, logicalBottom);
+                    changeLogicalBottom = std::max(changeLogicalBottom, logicalBottom);
                 }
             }
         }
@@ -279,7 +277,7 @@ void RenderBlockFlow::clearFloats()
             FloatingObject* floatingObject = it->value.get();
             if (!floatingObject->isDescendant()) {
                 changeLogicalTop = 0;
-                changeLogicalBottom = max(changeLogicalBottom, logicalBottomForFloat(floatingObject));
+                changeLogicalBottom = std::max(changeLogicalBottom, logicalBottomForFloat(floatingObject));
             }
         }
 
@@ -429,8 +427,8 @@ void RenderBlockFlow::layoutBlock(bool relayoutChildren, LayoutUnit pageLogicalH
             // If we have clipped overflow, we should use layout overflow as well, since visual overflow from lines didn't propagate to our block's overflow.
             // Note the old code did this as well but even for overflow:visible. The addition of hasOverflowClip() at least tightens up the hack a bit.
             // layoutInlineChildren should be patched to compute the entire repaint rect.
-            repaintLogicalLeft = min(repaintLogicalLeft, logicalLeftLayoutOverflow());
-            repaintLogicalRight = max(repaintLogicalRight, logicalRightLayoutOverflow());
+            repaintLogicalLeft = std::min(repaintLogicalLeft, logicalLeftLayoutOverflow());
+            repaintLogicalRight = std::max(repaintLogicalRight, logicalRightLayoutOverflow());
         }
         
         LayoutRect repaintRect;
@@ -573,7 +571,7 @@ void RenderBlockFlow::layoutBlockChild(RenderBox& child, MarginInfo& marginInfo,
     else if (!child.avoidsFloats() || child.shrinkToAvoidFloats()) {
         // If an element might be affected by the presence of floats, then always mark it for
         // layout.
-        LayoutUnit fb = max(previousFloatLogicalBottom, lowestFloatLogicalBottom());
+        LayoutUnit fb = std::max(previousFloatLogicalBottom, lowestFloatLogicalBottom());
         if (fb > logicalTopEstimate)
             markDescendantsWithFloats = true;
     }
@@ -582,7 +580,7 @@ void RenderBlockFlow::layoutBlockChild(RenderBox& child, MarginInfo& marginInfo,
         if (markDescendantsWithFloats)
             childBlockFlow->markAllDescendantsWithFloatsForLayout();
         if (!child.isWritingModeRoot())
-            previousFloatLogicalBottom = max(previousFloatLogicalBottom, oldLogicalTop + childBlockFlow->lowestFloatLogicalBottom());
+            previousFloatLogicalBottom = std::max(previousFloatLogicalBottom, oldLogicalTop + childBlockFlow->lowestFloatLogicalBottom());
     }
 
     if (!child.needsLayout())
@@ -659,7 +657,7 @@ void RenderBlockFlow::layoutBlockChild(RenderBox& child, MarginInfo& marginInfo,
     // If the child has overhanging floats that intrude into following siblings (or possibly out
     // of this block), then the parent gets notified of the floats now.
     if (childBlockFlow && childBlockFlow->containsFloats())
-        maxFloatLogicalBottom = max(maxFloatLogicalBottom, addOverhangingFloats(*childBlockFlow, !childNeededLayout));
+        maxFloatLogicalBottom = std::max(maxFloatLogicalBottom, addOverhangingFloats(*childBlockFlow, !childNeededLayout));
 
     if (childOffset.width() || childOffset.height()) {
         view().addLayoutDelta(childOffset);
@@ -827,8 +825,8 @@ LayoutUnit RenderBlockFlow::collapseMargins(RenderBox& child, MarginInfo& margin
     // For self-collapsing blocks, collapse our bottom margins into our
     // top to get new posTop and negTop values.
     if (childIsSelfCollapsing) {
-        posTop = max(posTop, childMargins.positiveMarginAfter());
-        negTop = max(negTop, childMargins.negativeMarginAfter());
+        posTop = std::max(posTop, childMargins.positiveMarginAfter());
+        negTop = std::max(negTop, childMargins.negativeMarginAfter());
     }
     
     // See if the top margin is quirky. We only care if this child has
@@ -841,7 +839,7 @@ LayoutUnit RenderBlockFlow::collapseMargins(RenderBox& child, MarginInfo& margin
             // block. If it has larger margin values, then we need to update
             // our own maximal values.
             if (!document().inQuirksMode() || !marginInfo.quirkContainer() || !topQuirk)
-                setMaxMarginBeforeValues(max(posTop, maxPositiveMarginBefore()), max(negTop, maxNegativeMarginBefore()));
+                setMaxMarginBeforeValues(std::max(posTop, maxPositiveMarginBefore()), std::max(negTop, maxNegativeMarginBefore()));
 
             // The minute any of the margins involved isn't a quirk, don't
             // collapse it away, even if the margin is smaller (www.webreference.com
@@ -882,8 +880,8 @@ LayoutUnit RenderBlockFlow::collapseMargins(RenderBox& child, MarginInfo& margin
             // This child has no height. We need to compute our
             // position before we collapse the child's margins together,
             // so that we can get an accurate position for the zero-height block.
-            LayoutUnit collapsedBeforePos = max(marginInfo.positiveMargin(), childMargins.positiveMarginBefore());
-            LayoutUnit collapsedBeforeNeg = max(marginInfo.negativeMargin(), childMargins.negativeMarginBefore());
+            LayoutUnit collapsedBeforePos = std::max(marginInfo.positiveMargin(), childMargins.positiveMarginBefore());
+            LayoutUnit collapsedBeforeNeg = std::max(marginInfo.negativeMargin(), childMargins.negativeMarginBefore());
             marginInfo.setMargin(collapsedBeforePos, collapsedBeforeNeg);
             
             // Now collapse the child's margins together, which means examining our
@@ -912,7 +910,7 @@ LayoutUnit RenderBlockFlow::collapseMargins(RenderBox& child, MarginInfo& margin
             && (!document().inQuirksMode() || !marginInfo.quirkContainer() || !marginInfo.hasMarginBeforeQuirk())))) {
             // We're collapsing with a previous sibling's margins and not
             // with the top of the block.
-            setLogicalHeight(logicalHeight() + max(marginInfo.positiveMargin(), posTop) - max(marginInfo.negativeMargin(), negTop));
+            setLogicalHeight(logicalHeight() + std::max(marginInfo.positiveMargin(), posTop) - std::max(marginInfo.negativeMargin(), negTop));
             logicalTop = logicalHeight();
         }
 
@@ -934,7 +932,7 @@ LayoutUnit RenderBlockFlow::collapseMargins(RenderBox& child, MarginInfo& margin
     if (layoutState->isPaginated() && layoutState->pageLogicalHeight() && logicalTop > beforeCollapseLogicalTop
         && hasNextPage(beforeCollapseLogicalTop)) {
         LayoutUnit oldLogicalTop = logicalTop;
-        logicalTop = min(logicalTop, nextPageLogicalTop(beforeCollapseLogicalTop));
+        logicalTop = std::min(logicalTop, nextPageLogicalTop(beforeCollapseLogicalTop));
         setLogicalHeight(logicalHeight() + (logicalTop - oldLogicalTop));
     }
 
@@ -969,8 +967,8 @@ LayoutUnit RenderBlockFlow::clearFloatsIfNeeded(RenderBox& child, MarginInfo& ma
         // If DISCARD is specified for -webkit-margin-collapse, reset the margin values.
         if (!childDiscardMargin) {
             MarginValues childMargins = marginValuesForChild(child);
-            marginInfo.setPositiveMargin(max(childMargins.positiveMarginBefore(), childMargins.positiveMarginAfter()));
-            marginInfo.setNegativeMargin(max(childMargins.negativeMarginBefore(), childMargins.negativeMarginAfter()));
+            marginInfo.setPositiveMargin(std::max(childMargins.positiveMarginBefore(), childMargins.positiveMarginAfter()));
+            marginInfo.setNegativeMargin(std::max(childMargins.negativeMarginBefore(), childMargins.negativeMarginAfter()));
         } else
             marginInfo.clearMargin();
         marginInfo.setDiscardMargin(childDiscardMargin);
@@ -993,7 +991,7 @@ LayoutUnit RenderBlockFlow::clearFloatsIfNeeded(RenderBox& child, MarginInfo& ma
         LayoutUnit collapsedMargin = collapsedMarginBeforeForChild(child);
         setLogicalHeight(child.logicalTop() - collapsedMargin);
         // A negative collapsed margin-top value cancels itself out as it has already been factored into |yPos| above.
-        heightIncrease -= max(LayoutUnit(), collapsedMargin);
+        heightIncrease -= std::max(LayoutUnit(), collapsedMargin);
     } else
         // Increase our height by the amount we had to clear.
         setLogicalHeight(logicalHeight() + heightIncrease);
@@ -1038,8 +1036,8 @@ void RenderBlockFlow::marginBeforeEstimateForChild(RenderBox& child, LayoutUnit&
     }
 
     LayoutUnit beforeChildMargin = marginBeforeForChild(child);
-    positiveMarginBefore = max(positiveMarginBefore, beforeChildMargin);
-    negativeMarginBefore = max(negativeMarginBefore, -beforeChildMargin);
+    positiveMarginBefore = std::max(positiveMarginBefore, beforeChildMargin);
+    negativeMarginBefore = std::max(negativeMarginBefore, -beforeChildMargin);
 
     if (!child.isRenderBlockFlow())
         return;
@@ -1092,14 +1090,14 @@ LayoutUnit RenderBlockFlow::estimateLogicalTopPosition(RenderBox& child, const M
             // Use the cached collapsed margin values from a previous layout. Most of the time they
             // will be right.
             MarginValues marginValues = marginValuesForChild(child);
-            positiveMarginBefore = max(positiveMarginBefore, marginValues.positiveMarginBefore());
-            negativeMarginBefore = max(negativeMarginBefore, marginValues.negativeMarginBefore());
+            positiveMarginBefore = std::max(positiveMarginBefore, marginValues.positiveMarginBefore());
+            negativeMarginBefore = std::max(negativeMarginBefore, marginValues.negativeMarginBefore());
             discardMarginBefore = mustDiscardMarginBeforeForChild(child);
         }
 
         // Collapse the result with our current margins.
         if (!discardMarginBefore)
-            logicalTopEstimate += max(marginInfo.positiveMargin(), positiveMarginBefore) - max(marginInfo.negativeMargin(), negativeMarginBefore);
+            logicalTopEstimate += std::max(marginInfo.positiveMargin(), positiveMarginBefore) - std::max(marginInfo.negativeMargin(), negativeMarginBefore);
     }
 
     // Adjust logicalTopEstimate down to the next page if the margins are so large that we don't fit on the current
@@ -1107,7 +1105,7 @@ LayoutUnit RenderBlockFlow::estimateLogicalTopPosition(RenderBox& child, const M
     LayoutState* layoutState = view().layoutState();
     if (layoutState->isPaginated() && layoutState->pageLogicalHeight() && logicalTopEstimate > logicalHeight()
         && hasNextPage(logicalHeight()))
-        logicalTopEstimate = min(logicalTopEstimate, nextPageLogicalTop(logicalHeight()));
+        logicalTopEstimate = std::min(logicalTopEstimate, nextPageLogicalTop(logicalHeight()));
 
     logicalTopEstimate += getClearDelta(child, logicalTopEstimate);
     
@@ -1139,7 +1137,7 @@ void RenderBlockFlow::setCollapsedBottomMargin(const MarginInfo& marginInfo)
 
         // Update our max pos/neg bottom margins, since we collapsed our bottom margins
         // with our children.
-        setMaxMarginAfterValues(max(maxPositiveMarginAfter(), marginInfo.positiveMargin()), max(maxNegativeMarginAfter(), marginInfo.negativeMargin()));
+        setMaxMarginAfterValues(std::max(maxPositiveMarginAfter(), marginInfo.positiveMargin()), std::max(maxNegativeMarginAfter(), marginInfo.negativeMargin()));
 
         if (!marginInfo.hasMarginAfterQuirk())
             setHasMarginAfterQuirk(false);
@@ -1166,7 +1164,7 @@ void RenderBlockFlow::handleAfterSideOfBlock(LayoutUnit beforeSide, LayoutUnit a
 
     // Negative margins can cause our height to shrink below our minimal height (border/padding).
     // If this happens, ensure that the computed height is increased to the minimal height.
-    setLogicalHeight(max(logicalHeight(), beforeSide + afterSide));
+    setLogicalHeight(std::max(logicalHeight(), beforeSide + afterSide));
 
     // Update our bottom collapsed margin info.
     setCollapsedBottomMargin(marginInfo);
@@ -1434,7 +1432,7 @@ static inline LayoutUnit calculateMinimumPageHeight(RenderStyle* renderStyle, Ro
 {
     // We may require a certain minimum number of lines per page in order to satisfy
     // orphans and widows, and that may affect the minimum page height.
-    unsigned lineCount = max<unsigned>(renderStyle->hasAutoOrphans() ? 1 : renderStyle->orphans(), renderStyle->hasAutoWidows() ? 1 : renderStyle->widows());
+    unsigned lineCount = std::max<unsigned>(renderStyle->hasAutoOrphans() ? 1 : renderStyle->orphans(), renderStyle->hasAutoWidows() ? 1 : renderStyle->widows());
     if (lineCount > 1) {
         RootInlineBox* line = lastLine;
         for (unsigned i = 1; i < lineCount && line->prevRootBox(); i++)
@@ -1443,7 +1441,7 @@ static inline LayoutUnit calculateMinimumPageHeight(RenderStyle* renderStyle, Ro
         // FIXME: Paginating using line overflow isn't all fine. See FIXME in
         // adjustLinePositionForPagination() for more details.
         LayoutRect overflow = line->logicalVisualOverflowRect(line->lineTop(), line->lineBottom());
-        lineTop = min(line->lineTopWithLeading(), overflow.y());
+        lineTop = std::min(line->lineTopWithLeading(), overflow.y());
     }
     return lineBottom - lineTop;
 }
@@ -1470,8 +1468,8 @@ void RenderBlockFlow::adjustLinePositionForPagination(RootInlineBox* lineBox, La
     // Technically if the location we move the line to has a different line width than our old position, then we need to dirty the
     // line and all following lines.
     LayoutRect logicalVisualOverflow = lineBox->logicalVisualOverflowRect(lineBox->lineTop(), lineBox->lineBottom());
-    LayoutUnit logicalOffset = min(lineBox->lineTopWithLeading(), logicalVisualOverflow.y());
-    LayoutUnit logicalBottom = max(lineBox->lineBottomWithLeading(), logicalVisualOverflow.maxY());
+    LayoutUnit logicalOffset = std::min(lineBox->lineTopWithLeading(), logicalVisualOverflow.y());
+    LayoutUnit logicalBottom = std::max(lineBox->lineBottomWithLeading(), logicalVisualOverflow.maxY());
     LayoutUnit lineHeight = logicalBottom - logicalOffset;
     updateMinimumPageHeight(logicalOffset, calculateMinimumPageHeight(&style(), lineBox, logicalOffset, logicalBottom));
     logicalOffset += delta;
@@ -1499,14 +1497,14 @@ void RenderBlockFlow::adjustLinePositionForPagination(RootInlineBox* lineBox, La
             return;
         if (lineHeight > pageLogicalHeight) {
             // Split the top margin in order to avoid splitting the visible part of the line.
-            remainingLogicalHeight -= min(lineHeight - pageLogicalHeight, max<LayoutUnit>(0, logicalVisualOverflow.y() - lineBox->lineTopWithLeading()));
+            remainingLogicalHeight -= std::min(lineHeight - pageLogicalHeight, std::max<LayoutUnit>(0, logicalVisualOverflow.y() - lineBox->lineTopWithLeading()));
         }
-        LayoutUnit totalLogicalHeight = lineHeight + max<LayoutUnit>(0, logicalOffset);
+        LayoutUnit totalLogicalHeight = lineHeight + std::max<LayoutUnit>(0, logicalOffset);
         LayoutUnit pageLogicalHeightAtNewOffset = hasUniformPageLogicalHeight ? pageLogicalHeight : pageLogicalHeightForOffset(logicalOffset + remainingLogicalHeight);
         setPageBreak(logicalOffset, lineHeight - remainingLogicalHeight);
         if (((lineBox == firstRootBox() && totalLogicalHeight < pageLogicalHeightAtNewOffset) || (!style().hasAutoOrphans() && style().orphans() >= lineIndex))
             && !isOutOfFlowPositioned() && !isTableCell())
-            setPaginationStrut(remainingLogicalHeight + max<LayoutUnit>(0, logicalOffset));
+            setPaginationStrut(remainingLogicalHeight + std::max<LayoutUnit>(0, logicalOffset));
         else {
             delta += remainingLogicalHeight;
             lineBox->setPaginationStrut(remainingLogicalHeight);
@@ -1994,7 +1992,7 @@ void RenderBlockFlow::removeFloatingObject(RenderBox& floatBox)
                     // Special-case zero- and less-than-zero-height floats: those don't touch
                     // the line that they're on, but it still needs to be dirtied. This is
                     // accomplished by pretending they have a height of 1.
-                    logicalBottom = max(logicalBottom, logicalTop + 1);
+                    logicalBottom = std::max(logicalBottom, logicalTop + 1);
                 }
                 if (floatingObject->originatingLine()) {
                     if (!selfNeedsLayout()) {
@@ -2073,7 +2071,7 @@ LayoutPoint RenderBlockFlow::computeLogicalLocationForFloat(const FloatingObject
 #endif
         logicalRightOffset = logicalRightOffsetForContent(logicalTopOffset);
 
-    LayoutUnit floatLogicalWidth = min(logicalWidthForFloat(floatingObject), logicalRightOffset - logicalLeftOffset); // The width we look for.
+    LayoutUnit floatLogicalWidth = std::min(logicalWidthForFloat(floatingObject), logicalRightOffset - logicalLeftOffset); // The width we look for.
 
     LayoutUnit floatLogicalLeft;
 
@@ -2084,28 +2082,28 @@ LayoutPoint RenderBlockFlow::computeLogicalLocationForFloat(const FloatingObject
         LayoutUnit heightRemainingRight = 1;
         floatLogicalLeft = logicalLeftOffsetForPositioningFloat(logicalTopOffset, logicalLeftOffset, false, &heightRemainingLeft);
         while (logicalRightOffsetForPositioningFloat(logicalTopOffset, logicalRightOffset, false, &heightRemainingRight) - floatLogicalLeft < floatLogicalWidth) {
-            logicalTopOffset += min(heightRemainingLeft, heightRemainingRight);
+            logicalTopOffset += std::min(heightRemainingLeft, heightRemainingRight);
             floatLogicalLeft = logicalLeftOffsetForPositioningFloat(logicalTopOffset, logicalLeftOffset, false, &heightRemainingLeft);
             if (insideFlowThread) {
                 // Have to re-evaluate all of our offsets, since they may have changed.
                 logicalRightOffset = logicalRightOffsetForContent(logicalTopOffset); // Constant part of right offset.
                 logicalLeftOffset = logicalLeftOffsetForContent(logicalTopOffset); // Constant part of left offset.
-                floatLogicalWidth = min(logicalWidthForFloat(floatingObject), logicalRightOffset - logicalLeftOffset);
+                floatLogicalWidth = std::min(logicalWidthForFloat(floatingObject), logicalRightOffset - logicalLeftOffset);
             }
         }
-        floatLogicalLeft = max(logicalLeftOffset - borderAndPaddingLogicalLeft(), floatLogicalLeft);
+        floatLogicalLeft = std::max(logicalLeftOffset - borderAndPaddingLogicalLeft(), floatLogicalLeft);
     } else {
         LayoutUnit heightRemainingLeft = 1;
         LayoutUnit heightRemainingRight = 1;
         floatLogicalLeft = logicalRightOffsetForPositioningFloat(logicalTopOffset, logicalRightOffset, false, &heightRemainingRight);
         while (floatLogicalLeft - logicalLeftOffsetForPositioningFloat(logicalTopOffset, logicalLeftOffset, false, &heightRemainingLeft) < floatLogicalWidth) {
-            logicalTopOffset += min(heightRemainingLeft, heightRemainingRight);
+            logicalTopOffset += std::min(heightRemainingLeft, heightRemainingRight);
             floatLogicalLeft = logicalRightOffsetForPositioningFloat(logicalTopOffset, logicalRightOffset, false, &heightRemainingRight);
             if (insideFlowThread) {
                 // Have to re-evaluate all of our offsets, since they may have changed.
                 logicalRightOffset = logicalRightOffsetForContent(logicalTopOffset); // Constant part of right offset.
                 logicalLeftOffset = logicalLeftOffsetForContent(logicalTopOffset); // Constant part of left offset.
-                floatLogicalWidth = min(logicalWidthForFloat(floatingObject), logicalRightOffset - logicalLeftOffset);
+                floatLogicalWidth = std::min(logicalWidthForFloat(floatingObject), logicalRightOffset - logicalLeftOffset);
             }
         }
         // Use the original width of the float here, since the local variable
@@ -2150,7 +2148,7 @@ bool RenderBlockFlow::positionNewFloats()
     
     // The float cannot start above the top position of the last positioned float.
     if (lastPlacedFloatingObject)
-        logicalTop = max(logicalTopForFloat(lastPlacedFloatingObject), logicalTop);
+        logicalTop = std::max(logicalTopForFloat(lastPlacedFloatingObject), logicalTop);
 
     auto end = floatingObjectSet.end();
     // Now walk through the set of unpositioned floats and place them.
@@ -2168,9 +2166,9 @@ bool RenderBlockFlow::positionNewFloats()
         LayoutRect oldRect = childBox.frameRect();
 
         if (childBox.style().clear() & CLEFT)
-            logicalTop = max(lowestFloatLogicalBottom(FloatingObject::FloatLeft), logicalTop);
+            logicalTop = std::max(lowestFloatLogicalBottom(FloatingObject::FloatLeft), logicalTop);
         if (childBox.style().clear() & CRIGHT)
-            logicalTop = max(lowestFloatLogicalBottom(FloatingObject::FloatRight), logicalTop);
+            logicalTop = std::max(lowestFloatLogicalBottom(FloatingObject::FloatRight), logicalTop);
 
         LayoutPoint floatLogicalLocation = computeLogicalLocationForFloat(floatingObject, logicalTop);
 
@@ -2302,7 +2300,7 @@ LayoutUnit RenderBlockFlow::lowestFloatLogicalBottom(FloatingObject::Type floatT
     for (auto it = floatingObjectSet.begin(); it != end; ++it) {
         FloatingObject* floatingObject = it->get();
         if (floatingObject->isPlaced() && floatingObject->type() & floatType)
-            lowestFloatBottom = max(lowestFloatBottom, logicalBottomForFloat(floatingObject));
+            lowestFloatBottom = std::max(lowestFloatBottom, logicalBottomForFloat(floatingObject));
     }
     return lowestFloatBottom;
 }
@@ -2322,9 +2320,9 @@ LayoutUnit RenderBlockFlow::addOverhangingFloats(RenderBlockFlow& child, bool ma
     auto childEnd = child.m_floatingObjects->set().end();
     for (auto childIt = child.m_floatingObjects->set().begin(); childIt != childEnd; ++childIt) {
         FloatingObject* floatingObject = childIt->get();
-        LayoutUnit floatLogicalBottom = min(logicalBottomForFloat(floatingObject), LayoutUnit::max() - childLogicalTop);
+        LayoutUnit floatLogicalBottom = std::min(logicalBottomForFloat(floatingObject), LayoutUnit::max() - childLogicalTop);
         LayoutUnit logicalBottom = childLogicalTop + floatLogicalBottom;
-        lowestFloatLogicalBottom = max(lowestFloatLogicalBottom, logicalBottom);
+        lowestFloatLogicalBottom = std::max(lowestFloatLogicalBottom, logicalBottom);
 
         if (logicalBottom > logicalHeight()) {
             // If the object is not in the list, we add it now.
@@ -2503,7 +2501,7 @@ LayoutUnit RenderBlockFlow::getClearDelta(RenderBox& child, LayoutUnit logicalTo
     }
 
     // We also clear floats if we are too big to sit on the same line as a float (and wish to avoid floats by default).
-    LayoutUnit result = clearSet ? max<LayoutUnit>(0, logicalBottom - logicalTop) : LayoutUnit();
+    LayoutUnit result = clearSet ? std::max<LayoutUnit>(0, logicalBottom - logicalTop) : LayoutUnit();
     if (!result && child.avoidsFloats()) {
         LayoutUnit newLogicalTop = logicalTop;
         while (true) {
@@ -2601,9 +2599,9 @@ void RenderBlockFlow::adjustForBorderFit(LayoutUnit x, LayoutUnit& left, LayoutU
 
         for (auto box = firstRootBox(); box; box = box->nextRootBox()) {
             if (box->firstChild())
-                left = min(left, x + static_cast<LayoutUnit>(box->firstChild()->x()));
+                left = std::min(left, x + static_cast<LayoutUnit>(box->firstChild()->x()));
             if (box->lastChild())
-                right = max(right, x + static_cast<LayoutUnit>(ceilf(box->lastChild()->logicalRight())));
+                right = std::max(right, x + static_cast<LayoutUnit>(ceilf(box->lastChild()->logicalRight())));
         }
     } else {
         for (RenderBox* obj = firstChildBox(); obj; obj = obj->nextSiblingBox()) {
@@ -2612,8 +2610,8 @@ void RenderBlockFlow::adjustForBorderFit(LayoutUnit x, LayoutUnit& left, LayoutU
                     toRenderBlockFlow(obj)->adjustForBorderFit(x + obj->x(), left, right);
                 else if (obj->style().visibility() == VISIBLE) {
                     // We are a replaced element or some kind of non-block-flow object.
-                    left = min(left, x + obj->x());
-                    right = max(right, x + obj->x() + obj->width());
+                    left = std::min(left, x + obj->x());
+                    right = std::max(right, x + obj->x() + obj->width());
                 }
             }
         }
@@ -2628,8 +2626,8 @@ void RenderBlockFlow::adjustForBorderFit(LayoutUnit x, LayoutUnit& left, LayoutU
             if (r->shouldPaint()) {
                 LayoutUnit floatLeft = xPositionForFloatIncludingMargin(r) - r->renderer().x();
                 LayoutUnit floatRight = floatLeft + r->renderer().width();
-                left = min(left, floatLeft);
-                right = max(right, floatRight);
+                left = std::min(left, floatLeft);
+                right = std::max(right, floatRight);
             }
         }
     }
@@ -2649,8 +2647,8 @@ void RenderBlockFlow::fitBorderToLinesIfNeeded()
     // Clamp to our existing edges. We can never grow. We only shrink.
     LayoutUnit leftEdge = borderLeft() + paddingLeft();
     LayoutUnit rightEdge = leftEdge + oldWidth;
-    left = min(rightEdge, max(leftEdge, left));
-    right = max(leftEdge, min(rightEdge, right));
+    left = std::min(rightEdge, std::max(leftEdge, left));
+    right = std::max(leftEdge, std::min(rightEdge, right));
     
     LayoutUnit newContentWidth = right - left;
     if (newContentWidth == oldWidth)
@@ -2814,7 +2812,7 @@ void RenderBlockFlow::updateLogicalHeight()
     RenderBlock::updateLogicalHeight();
 
     if (renderNamedFlowFragment())
-        renderNamedFlowFragment()->setLogicalHeight(max<LayoutUnit>(0, logicalHeight() - borderAndPaddingLogicalHeight()));
+        renderNamedFlowFragment()->setLogicalHeight(std::max<LayoutUnit>(0, logicalHeight() - borderAndPaddingLogicalHeight()));
 }
 
 void RenderBlockFlow::setRenderNamedFlowFragment(RenderNamedFlowFragment* flowFragment)
@@ -3029,7 +3027,7 @@ VisiblePosition RenderBlockFlow::positionForPointWithInlineChildren(const Layout
 
     if (closestBox) {
         if (moveCaretToBoundary) {
-            LayoutUnit firstRootBoxWithChildrenTop = min<LayoutUnit>(firstRootBoxWithChildren->selectionTop(), firstRootBoxWithChildren->logicalTop());
+            LayoutUnit firstRootBoxWithChildrenTop = std::min<LayoutUnit>(firstRootBoxWithChildren->selectionTop(), firstRootBoxWithChildren->logicalTop());
             if (pointInLogicalContents.y() < firstRootBoxWithChildrenTop
                 || (blocksAreFlipped && pointInLogicalContents.y() == firstRootBoxWithChildrenTop)) {
                 InlineBox* box = firstRootBoxWithChildren->firstLeafChild();
@@ -3072,8 +3070,8 @@ void RenderBlockFlow::addFocusRingRectsForInlineChildren(Vector<IntRect>& rects,
     ensureLineBoxes();
 
     for (RootInlineBox* curr = firstRootBox(); curr; curr = curr->nextRootBox()) {
-        LayoutUnit top = max<LayoutUnit>(curr->lineTop(), curr->top());
-        LayoutUnit bottom = min<LayoutUnit>(curr->lineBottom(), curr->top() + curr->height());
+        LayoutUnit top = std::max<LayoutUnit>(curr->lineTop(), curr->top());
+        LayoutUnit bottom = std::min<LayoutUnit>(curr->lineBottom(), curr->top() + curr->height());
         LayoutRect rect(additionalOffset.x() + curr->x(), additionalOffset.y() + top, curr->width(), bottom - top);
         if (!rect.isEmpty())
             rects.append(pixelSnappedIntRect(rect));
@@ -3114,13 +3112,13 @@ bool RenderBlockFlow::relayoutForPagination(bool hasSpecifiedPageLogicalHeight,
             // The forced page breaks are in control of the balancing.  Just set the column height to the
             // maximum page break distance.
             if (!pageLogicalHeight) {
-                LayoutUnit distanceBetweenBreaks = max<LayoutUnit>(colInfo->maximumDistanceBetweenForcedBreaks(),
+                LayoutUnit distanceBetweenBreaks = std::max<LayoutUnit>(colInfo->maximumDistanceBetweenForcedBreaks(),
                     view().layoutState()->pageLogicalOffset(this, borderAndPaddingBefore() + layoutOverflowLogicalBottom) - colInfo->forcedBreakOffset());
-                columnHeight = max(colInfo->minimumColumnHeight(), distanceBetweenBreaks);
+                columnHeight = std::max(colInfo->minimumColumnHeight(), distanceBetweenBreaks);
             }
         } else if (layoutOverflowLogicalBottom > boundedMultiply(pageLogicalHeight, desiredColumnCount)) {
             // Now that we know the intrinsic height of the columns, we have to rebalance them.
-            columnHeight = max<LayoutUnit>(colInfo->minimumColumnHeight(), ceilf((float)layoutOverflowLogicalBottom / desiredColumnCount));
+            columnHeight = std::max<LayoutUnit>(colInfo->minimumColumnHeight(), ceilf((float)layoutOverflowLogicalBottom / desiredColumnCount));
         }
         
         if (columnHeight && columnHeight != pageLogicalHeight) {
index 3bd02bf..6b3ad28 100644 (file)
@@ -63,7 +63,6 @@
 #include "SVGRootInlineBox.h"
 #endif
 
-using namespace std;
 using namespace WTF;
 using namespace Unicode;
 
@@ -544,7 +543,7 @@ static void updateLogicalWidthForLeftAlignedBlock(bool isLeftToRightDirection, B
     // In particular with RTL blocks, wide lines should still spill out to the left.
     if (isLeftToRightDirection) {
         if (totalLogicalWidth > availableLogicalWidth && trailingSpaceRun)
-            trailingSpaceRun->box()->setLogicalWidth(max<float>(0, trailingSpaceRun->box()->logicalWidth() - totalLogicalWidth + availableLogicalWidth));
+            trailingSpaceRun->box()->setLogicalWidth(std::max<float>(0, trailingSpaceRun->box()->logicalWidth() - totalLogicalWidth + availableLogicalWidth));
         return;
     }
 
@@ -570,7 +569,7 @@ static void updateLogicalWidthForRightAlignedBlock(bool isLeftToRightDirection,
     }
 
     if (totalLogicalWidth > availableLogicalWidth && trailingSpaceRun) {
-        trailingSpaceRun->box()->setLogicalWidth(max<float>(0, trailingSpaceRun->box()->logicalWidth() - totalLogicalWidth + availableLogicalWidth));
+        trailingSpaceRun->box()->setLogicalWidth(std::max<float>(0, trailingSpaceRun->box()->logicalWidth() - totalLogicalWidth + availableLogicalWidth));
         totalLogicalWidth -= trailingSpaceRun->box()->logicalWidth();
     } else
         logicalLeft += availableLogicalWidth - totalLogicalWidth;
@@ -581,11 +580,11 @@ static void updateLogicalWidthForCenterAlignedBlock(bool isLeftToRightDirection,
     float trailingSpaceWidth = 0;
     if (trailingSpaceRun) {
         totalLogicalWidth -= trailingSpaceRun->box()->logicalWidth();
-        trailingSpaceWidth = min(trailingSpaceRun->box()->logicalWidth(), (availableLogicalWidth - totalLogicalWidth + 1) / 2);
-        trailingSpaceRun->box()->setLogicalWidth(max<float>(0, trailingSpaceWidth));
+        trailingSpaceWidth = std::min(trailingSpaceRun->box()->logicalWidth(), (availableLogicalWidth - totalLogicalWidth + 1) / 2);
+        trailingSpaceRun->box()->setLogicalWidth(std::max<float>(0, trailingSpaceWidth));
     }
     if (isLeftToRightDirection)
-        logicalLeft += max<float>((availableLogicalWidth - totalLogicalWidth) / 2, 0);
+        logicalLeft += std::max<float>((availableLogicalWidth - totalLogicalWidth) / 2, 0);
     else
         logicalLeft += totalLogicalWidth > availableLogicalWidth ? (availableLogicalWidth - totalLogicalWidth) : (availableLogicalWidth - totalLogicalWidth) / 2 - trailingSpaceWidth;
 }
@@ -706,14 +705,14 @@ static inline void setLogicalWidthForTextRun(RootInlineBox* lineBox, BidiRun* ru
     run->box()->setLogicalWidth(measuredWidth + hyphenWidth);
     if (!fallbackFonts.isEmpty()) {
         ASSERT(run->box()->behavesLikeText());
-        GlyphOverflowAndFallbackFontsMap::iterator it = textBoxDataMap.add(toInlineTextBox(run->box()), make_pair(Vector<const SimpleFontData*>(), GlyphOverflow())).iterator;
+        GlyphOverflowAndFallbackFontsMap::iterator it = textBoxDataMap.add(toInlineTextBox(run->box()), std::make_pair(Vector<const SimpleFontData*>(), GlyphOverflow())).iterator;
         ASSERT(it->value.first.isEmpty());
         copyToVector(fallbackFonts, it->value.first);
         run->box()->parent()->clearDescendantsHaveSameLineHeightAndBaseline();
     }
     if ((glyphOverflow.top || glyphOverflow.bottom || glyphOverflow.left || glyphOverflow.right)) {
         ASSERT(run->box()->behavesLikeText());
-        GlyphOverflowAndFallbackFontsMap::iterator it = textBoxDataMap.add(toInlineTextBox(run->box()), make_pair(Vector<const SimpleFontData*>(), GlyphOverflow())).iterator;
+        GlyphOverflowAndFallbackFontsMap::iterator it = textBoxDataMap.add(toInlineTextBox(run->box()), std::make_pair(Vector<const SimpleFontData*>(), GlyphOverflow())).iterator;
         it->value.second = glyphOverflow;
         run->box()->clearKnownToHaveNoOverflow();
     }
@@ -845,8 +844,8 @@ void RenderBlockFlow::computeInlineDirectionPositionsForLine(RootInlineBox* line
     if (shapeInsideInfo && shapeInsideInfo->hasSegments()) {
         BidiRun* segmentStart = firstRun;
         const SegmentList& segments = shapeInsideInfo->segments();
-        float logicalLeft = max<float>(roundToInt(segments[0].logicalLeft), lineLogicalLeft);
-        float logicalRight = min<float>(floorToInt(segments[0].logicalRight), lineLogicalRight);
+        float logicalLeft = std::max<float>(roundToInt(segments[0].logicalLeft), lineLogicalLeft);
+        float logicalRight = std::min<float>(floorToInt(segments[0].logicalRight), lineLogicalRight);
         float startLogicalLeft = logicalLeft;
         float endLogicalRight = logicalLeft;
         float minLogicalLeft = logicalLeft;
@@ -854,8 +853,8 @@ void RenderBlockFlow::computeInlineDirectionPositionsForLine(RootInlineBox* line
         lineBox->beginPlacingBoxRangesInInlineDirection(logicalLeft);
         for (size_t i = 0; i < segments.size(); i++) {
             if (i) {
-                logicalLeft = max<float>(roundToInt(segments[i].logicalLeft), lineLogicalLeft);
-                logicalRight = min<float>(floorToInt(segments[i].logicalRight), lineLogicalRight);
+                logicalLeft = std::max<float>(roundToInt(segments[i].logicalLeft), lineLogicalLeft);
+                logicalRight = std::min<float>(floorToInt(segments[i].logicalRight), lineLogicalRight);
             }
             availableLogicalWidth = logicalRight - logicalLeft;
             BidiRun* newSegmentStart = computeInlineDirectionPositionsForSegment(lineBox, lineInfo, textAlign, logicalLeft, availableLogicalWidth, segmentStart, trailingSpaceRun, textBoxDataMap, verticalPositionCache, wordMeasurements);
@@ -1737,7 +1736,7 @@ void RenderBlockFlow::layoutRunsAndFloatsInRange(LineLayoutState& layoutState, I
             if (numLinesAvailable <= 0)
                 return;
 
-            int numLinesToTake = min(numLinesAvailable, numLinesNeeded);
+            int numLinesToTake = std::min(numLinesAvailable, numLinesNeeded);
             // Wind back from our first widowed line.
             lineBox = currentFirstLineOfNewPage;
             for (int i = 0; i < numLinesToTake; ++i)
@@ -1931,7 +1930,7 @@ void RenderBlockFlow::layoutLineBoxes(bool relayoutChildren, LayoutUnit& repaint
     // Expand the last line to accommodate Ruby and emphasis marks.
     int lastLineAnnotationsAdjustment = 0;
     if (lastRootBox()) {
-        LayoutUnit lowestAllowedPosition = max(lastRootBox()->lineBottom(), logicalHeight() + paddingAfter());
+        LayoutUnit lowestAllowedPosition = std::max(lastRootBox()->lineBottom(), logicalHeight() + paddingAfter());
         if (!style().isFlippedLinesWritingMode())
             lastLineAnnotationsAdjustment = lastRootBox()->computeUnderAnnotationAdjustment(lowestAllowedPosition);
         else
@@ -1968,8 +1967,8 @@ void RenderBlockFlow::checkFloatsInCleanLine(RootInlineBox* line, Vector<FloatWi
 
         if (floats[floatIndex].rect.size() != newSize) {
             LayoutUnit floatTop = isHorizontalWritingMode() ? floats[floatIndex].rect.y() : floats[floatIndex].rect.x();
-            LayoutUnit floatHeight = isHorizontalWritingMode() ? max(floats[floatIndex].rect.height(), newSize.height()) : max(floats[floatIndex].rect.width(), newSize.width());
-            floatHeight = min(floatHeight, LayoutUnit::max() - floatTop);
+            LayoutUnit floatHeight = isHorizontalWritingMode() ? std::max(floats[floatIndex].rect.height(), newSize.height()) : std::max(floats[floatIndex].rect.width(), newSize.width());
+            floatHeight = std::min(floatHeight, LayoutUnit::max() - floatTop);
             line->markDirty();
             markLinesDirtyInBlockRange(line->lineBottomWithLeading(), floatTop + floatHeight, line);
             floats[floatIndex].rect.setSize(newSize);
@@ -2159,7 +2158,7 @@ bool RenderBlockFlow::checkPaginationAndFloatsAtEndLine(LineLayoutState& layoutS
         return true;
     
     // See if any floats end in the range along which we want to shift the lines vertically.
-    LayoutUnit logicalTop = min(logicalHeight(), layoutState.endLineLogicalTop());
+    LayoutUnit logicalTop = std::min(logicalHeight(), layoutState.endLineLogicalTop());
 
     RootInlineBox* lastLine = layoutState.endLine();
     while (RootInlineBox* nextLine = lastLine->nextRootBox())
@@ -2452,7 +2451,7 @@ static void tryHyphenating(RenderText* text, const Font& font, const AtomicStrin
     if (prefixLength < minimumPrefixLength)
         return;
 
-    prefixLength = lastHyphenLocation(text->characters() + lastSpace, pos - lastSpace, min(prefixLength, pos - lastSpace - minimumSuffixLength) + 1, localeIdentifier);
+    prefixLength = lastHyphenLocation(text->characters() + lastSpace, pos - lastSpace, std::min(prefixLength, pos - lastSpace - minimumSuffixLength) + 1, localeIdentifier);
     if (!prefixLength || prefixLength < minimumPrefixLength)
         return;
 
index 179aac3..7d4bcba 100644 (file)
@@ -62,8 +62,6 @@
 #include "RenderLayerCompositor.h"
 #endif
 
-using namespace std;
-
 namespace WebCore {
 
 using namespace HTMLNames;
@@ -521,8 +519,8 @@ int RenderBox::scrollWidth() const
     // For objects with visible overflow, this matches IE.
     // FIXME: Need to work right with writing modes.
     if (style().isLeftToRightDirection())
-        return snapSizeToPixel(max(clientWidth(), layoutOverflowRect().maxX() - borderLeft()), x() + clientLeft());
-    return clientWidth() - min<LayoutUnit>(0, layoutOverflowRect().x() - borderLeft());
+        return snapSizeToPixel(std::max(clientWidth(), layoutOverflowRect().maxX() - borderLeft()), x() + clientLeft());
+    return clientWidth() - std::min<LayoutUnit>(0, layoutOverflowRect().x() - borderLeft());
 }
 
 int RenderBox::scrollHeight() const
@@ -531,7 +529,7 @@ int RenderBox::scrollHeight() const
         return layer()->scrollHeight();
     // For objects with visible overflow, this matches IE.
     // FIXME: Need to work right with writing modes.
-    return snapSizeToPixel(max(clientHeight(), layoutOverflowRect().maxY() - borderTop()), y() + clientTop());
+    return snapSizeToPixel(std::max(clientHeight(), layoutOverflowRect().maxY() - borderTop()), y() + clientTop());
 }
 
 int RenderBox::scrollLeft() const
@@ -577,8 +575,8 @@ LayoutUnit RenderBox::constrainLogicalWidthInRegionByMinMax(LayoutUnit logicalWi
 {
     const RenderStyle& styleToUse = style();
     if (!styleToUse.logicalMaxWidth().isUndefined())
-        logicalWidth = min(logicalWidth, computeLogicalWidthInRegionUsing(MaxSize, styleToUse.logicalMaxWidth(), availableWidth, cb, region));
-    return max(logicalWidth, computeLogicalWidthInRegionUsing(MinSize, styleToUse.logicalMinWidth(), availableWidth, cb, region));
+        logicalWidth = std::min(logicalWidth, computeLogicalWidthInRegionUsing(MaxSize, styleToUse.logicalMaxWidth(), availableWidth, cb, region));
+    return std::max(logicalWidth, computeLogicalWidthInRegionUsing(MinSize, styleToUse.logicalMinWidth(), availableWidth, cb, region));
 }
 
 LayoutUnit RenderBox::constrainLogicalHeightByMinMax(LayoutUnit logicalHeight) const
@@ -587,9 +585,9 @@ LayoutUnit RenderBox::constrainLogicalHeightByMinMax(LayoutUnit logicalHeight) c
     if (!styleToUse.logicalMaxHeight().isUndefined()) {
         LayoutUnit maxH = computeLogicalHeightUsing(styleToUse.logicalMaxHeight());
         if (maxH != -1)
-            logicalHeight = min(logicalHeight, maxH);
+            logicalHeight = std::min(logicalHeight, maxH);
     }
-    return max(logicalHeight, computeLogicalHeightUsing(styleToUse.logicalMinHeight()));
+    return std::max(logicalHeight, computeLogicalHeightUsing(styleToUse.logicalMinHeight()));
 }
 
 LayoutUnit RenderBox::constrainContentBoxLogicalHeightByMinMax(LayoutUnit logicalHeight) const
@@ -598,9 +596,9 @@ LayoutUnit RenderBox::constrainContentBoxLogicalHeightByMinMax(LayoutUnit logica
     if (!styleToUse.logicalMaxHeight().isUndefined()) {
         LayoutUnit maxH = computeContentLogicalHeight(styleToUse.logicalMaxHeight());
         if (maxH != -1)
-            logicalHeight = min(logicalHeight, maxH);
+            logicalHeight = std::min(logicalHeight, maxH);
     }
-    return max(logicalHeight, computeContentLogicalHeight(styleToUse.logicalMinHeight()));
+    return std::max(logicalHeight, computeContentLogicalHeight(styleToUse.logicalMinHeight()));
 }
 
 IntRect RenderBox::absoluteContentBox() const
@@ -1057,7 +1055,7 @@ LayoutUnit RenderBox::adjustBorderBoxLogicalWidthForBoxSizing(LayoutUnit width)
     LayoutUnit bordersPlusPadding = borderAndPaddingLogicalWidth();
     if (style().boxSizing() == CONTENT_BOX)
         return width + bordersPlusPadding;
-    return max(width, bordersPlusPadding);
+    return std::max(width, bordersPlusPadding);
 }
 
 LayoutUnit RenderBox::adjustBorderBoxLogicalHeightForBoxSizing(LayoutUnit height) const
@@ -1065,21 +1063,21 @@ LayoutUnit RenderBox::adjustBorderBoxLogicalHeightForBoxSizing(LayoutUnit height
     LayoutUnit bordersPlusPadding = borderAndPaddingLogicalHeight();
     if (style().boxSizing() == CONTENT_BOX)
         return height + bordersPlusPadding;
-    return max(height, bordersPlusPadding);
+    return std::max(height, bordersPlusPadding);
 }
 
 LayoutUnit RenderBox::adjustContentBoxLogicalWidthForBoxSizing(LayoutUnit width) const
 {
     if (style().boxSizing() == BORDER_BOX)
         width -= borderAndPaddingLogicalWidth();
-    return max<LayoutUnit>(0, width);
+    return std::max<LayoutUnit>(0, width);
 }
 
 LayoutUnit RenderBox::adjustContentBoxLogicalHeightForBoxSizing(LayoutUnit height) const
 {
     if (style().boxSizing() == BORDER_BOX)
         height -= borderAndPaddingLogicalHeight();
-    return max<LayoutUnit>(0, height);
+    return std::max<LayoutUnit>(0, height);
 }
 
 // Hit Testing
@@ -1549,8 +1547,8 @@ bool RenderBox::repaintLayerRectsForImage(WrappedImagePtr image, const FillLayer
 
                     rendererRect = LayoutRect(-layerRenderer->marginLeft(),
                         -layerRenderer->marginTop(),
-                        max(layerRenderer->width() + layerRenderer->marginWidth() + layerRenderer->borderLeft() + layerRenderer->borderRight(), rw),
-                        max(layerRenderer->height() + layerRenderer->marginHeight() + layerRenderer->borderTop() + layerRenderer->borderBottom(), rh));
+                        std::max(layerRenderer->width() + layerRenderer->marginWidth() + layerRenderer->borderLeft() + layerRenderer->borderRight(), rw),
+                        std::max(layerRenderer->height() + layerRenderer->marginHeight() + layerRenderer->borderTop() + layerRenderer->borderBottom(), rh));
                 } else {
                     layerRenderer = this;
                     rendererRect = borderBoxRect();
@@ -1688,7 +1686,7 @@ LayoutUnit RenderBox::shrinkLogicalWidthToAvoidFloats(LayoutUnit childMarginStar
     LayoutUnit logicalTopPosition = logicalTop();
     if (region) {
         LayoutUnit offsetFromLogicalTopOfRegion = region ? region->logicalTopForFlowThreadContent() - offsetFromLogicalTopOfFirstPage() : LayoutUnit();
-        logicalTopPosition = max(logicalTopPosition, logicalTopPosition + offsetFromLogicalTopOfRegion);
+        logicalTopPosition = std::max(logicalTopPosition, logicalTopPosition + offsetFromLogicalTopOfRegion);
         containingBlockRegion = cb->clampToStartAndEndRegions(region);
     }
 
@@ -1753,7 +1751,7 @@ LayoutUnit RenderBox::containingBlockLogicalWidthForContentInRegion(RenderRegion
     RenderBoxRegionInfo* boxInfo = cb->renderBoxRegionInfo(containingBlockRegion);
     if (!boxInfo)
         return result;
-    return max<LayoutUnit>(0, result - (cb->logicalWidth() - boxInfo->logicalWidth()));
+    return std::max<LayoutUnit>(0, result - (cb->logicalWidth() - boxInfo->logicalWidth()));
 }
 
 LayoutUnit RenderBox::containingBlockAvailableLineWidthInRegion(RenderRegion* region) const
@@ -1763,7 +1761,7 @@ LayoutUnit RenderBox::containingBlockAvailableLineWidthInRegion(RenderRegion* re
     LayoutUnit logicalTopPosition = logicalTop();
     if (region) {
         LayoutUnit offsetFromLogicalTopOfRegion = region ? region->logicalTopForFlowThreadContent() - offsetFromLogicalTopOfFirstPage() : LayoutUnit();
-        logicalTopPosition = max(logicalTopPosition, logicalTopPosition + offsetFromLogicalTopOfRegion);
+        logicalTopPosition = std::max(logicalTopPosition, logicalTopPosition + offsetFromLogicalTopOfRegion);
         containingBlockRegion = cb->clampToStartAndEndRegions(region);
     }
     return cb->availableLogicalWidthForLineInRegion(logicalTopPosition, false, containingBlockRegion, availableLogicalHeight(IncludeMarginBorderPadding));
@@ -1785,7 +1783,7 @@ LayoutUnit RenderBox::perpendicularContainingBlockLogicalHeight() const
     if (!logicalHeightLength.isFixed()) {
         LayoutUnit fillFallbackExtent = containingBlockStyle.isHorizontalWritingMode() ? view().frameView().visibleHeight() : view().frameView().visibleWidth();
         LayoutUnit fillAvailableExtent = containingBlock()->availableLogicalHeight(ExcludeMarginBorderPadding);
-        return min(fillAvailableExtent, fillFallbackExtent);
+        return std::min(fillAvailableExtent, fillFallbackExtent);
     }
 
     // Use the content box logical height as specified by the style.
@@ -2190,7 +2188,7 @@ void RenderBox::computeLogicalWidthInRegion(LogicalExtentComputedValues& compute
     Length logicalWidthLength = treatAsReplaced ? Length(computeReplacedLogicalWidth(), Fixed) : styleToUse.logicalWidth();
 
     RenderBlock* cb = containingBlock();
-    LayoutUnit containerLogicalWidth = max<LayoutUnit>(0, containingBlockLogicalWidthForContentInRegion(region));
+    LayoutUnit containerLogicalWidth = std::max<LayoutUnit>(0, containingBlockLogicalWidthForContentInRegion(region));
     bool hasPerpendicularContainingBlock = cb->isHorizontalWritingMode() != isHorizontalWritingMode();
     
     if (isInline() && !isInlineBlockOrInlineTable()) {
@@ -2198,7 +2196,7 @@ void RenderBox::computeLogicalWidthInRegion(LogicalExtentComputedValues& compute
         computedValues.m_margins.m_start = minimumValueForLength(styleToUse.marginStart(), containerLogicalWidth);
         computedValues.m_margins.m_end = minimumValueForLength(styleToUse.marginEnd(), containerLogicalWidth);
         if (treatAsReplaced)
-            computedValues.m_extent = max<LayoutUnit>(floatValueForLength(logicalWidthLength, 0) + borderAndPaddingLogicalWidth(), minPreferredLogicalWidth());
+            computedValues.m_extent = std::max<LayoutUnit>(floatValueForLength(logicalWidthLength, 0) + borderAndPaddingLogicalWidth(), minPreferredLogicalWidth());
         return;
     }
 
@@ -2270,7 +2268,7 @@ LayoutUnit RenderBox::computeIntrinsicLogicalWidthUsing(Length logicalWidthLengt
     if (logicalWidthLength.type() == FitContent) {
         minLogicalWidth += borderAndPadding;
         maxLogicalWidth += borderAndPadding;
-        return max(minLogicalWidth, min(maxLogicalWidth, fillAvailableMeasure(availableLogicalWidth)));
+        return std::max(minLogicalWidth, std::min(maxLogicalWidth, fillAvailableMeasure(availableLogicalWidth)));
     }
 
     ASSERT_NOT_REACHED();
@@ -2293,10 +2291,10 @@ LayoutUnit RenderBox::computeLogicalWidthInRegionUsing(SizeType widthType, Lengt
     LayoutUnit logicalWidthResult = fillAvailableMeasure(availableLogicalWidth, marginStart, marginEnd);
 
     if (shrinkToAvoidFloats() && cb->containsFloats())
-        logicalWidthResult = min(logicalWidthResult, shrinkLogicalWidthToAvoidFloats(marginStart, marginEnd, cb, region));        
+        logicalWidthResult = std::min(logicalWidthResult, shrinkLogicalWidthToAvoidFloats(marginStart, marginEnd, cb, region));
 
     if (widthType == MainOrPreferredSize && sizesLogicalWidthToFitContent(widthType))
-        return max(minPreferredLogicalWidth(), min(maxPreferredLogicalWidth(), logicalWidthResult));
+        return std::max(minPreferredLogicalWidth(), std::min(maxPreferredLogicalWidth(), logicalWidthResult));
     return logicalWidthResult;
 }
 
@@ -2392,7 +2390,7 @@ void RenderBox::computeInlineDirectionMargins(RenderBlock* containingBlock, Layo
         // Other browsers center the margin box for align=center elements so we match them here.
         LayoutUnit marginStartWidth = minimumValueForLength(marginStartLength, containerWidth);
         LayoutUnit marginEndWidth = minimumValueForLength(marginEndLength, containerWidth);
-        LayoutUnit centeredMarginBoxStart = max<LayoutUnit>(0, (containerWidth - childWidth - marginStartWidth - marginEndWidth) / 2);
+        LayoutUnit centeredMarginBoxStart = std::max<LayoutUnit>(0, (containerWidth - childWidth - marginStartWidth - marginEndWidth) / 2);
         marginStart = centeredMarginBoxStart + marginStartWidth;
         marginEnd = containerWidth - childWidth - marginStart + marginEndWidth;
         return;
@@ -2619,10 +2617,10 @@ void RenderBox::computeLogicalHeight(LayoutUnit logicalHeight, LayoutUnit logica
         LayoutUnit margins = collapsedMarginBefore() + collapsedMarginAfter();
         LayoutUnit visibleHeight = view().pageOrViewLogicalHeight();
         if (isRoot())
-            computedValues.m_extent = max(computedValues.m_extent, visibleHeight - margins);
+            computedValues.m_extent = std::max(computedValues.m_extent, visibleHeight - margins);
         else {
             LayoutUnit marginsBordersPadding = margins + parentBox()->marginBefore() + parentBox()->marginAfter() + parentBox()->borderAndPaddingLogicalHeight();
-            computedValues.m_extent = max(computedValues.m_extent, visibleHeight - marginsBordersPadding);
+            computedValues.m_extent = std::max(computedValues.m_extent, visibleHeight - marginsBordersPadding);
         }
     }
 }
@@ -2715,7 +2713,7 @@ LayoutUnit RenderBox::computePercentageLogicalHeight(const Length& height) const
         }
     } else if (cbstyle.logicalHeight().isFixed()) {
         LayoutUnit contentBoxHeight = cb->adjustContentBoxLogicalHeightForBoxSizing(cbstyle.logicalHeight().value());
-        availableHeight = max<LayoutUnit>(0, cb->constrainContentBoxLogicalHeightByMinMax(contentBoxHeight - cb->scrollbarLogicalHeight()));
+        availableHeight = std::max<LayoutUnit>(0, cb->constrainContentBoxLogicalHeightByMinMax(contentBoxHeight - cb->scrollbarLogicalHeight()));
     } else if (cbstyle.logicalHeight().isPercent() && !isOutOfFlowPositionedWithSpecifiedHeight) {
         // We need to recur and compute the percentage height for our containing block.
         LayoutUnit heightWithScrollbar = cb->computePercentageLogicalHeight(cbstyle.logicalHeight());
@@ -2726,7 +2724,7 @@ LayoutUnit RenderBox::computePercentageLogicalHeight(const Length& height) const
             // return value from the recursive call will not have been adjusted
             // yet.
             LayoutUnit contentBoxHeight = cb->constrainContentBoxLogicalHeightByMinMax(contentBoxHeightWithScrollbar - cb->scrollbarLogicalHeight());
-            availableHeight = max<LayoutUnit>(0, contentBoxHeight);
+            availableHeight = std::max<LayoutUnit>(0, contentBoxHeight);
         }
     } else if (isOutOfFlowPositionedWithSpecifiedHeight) {
         // Don't allow this to affect the block' height() member variable, since this
@@ -2749,7 +2747,7 @@ LayoutUnit RenderBox::computePercentageLogicalHeight(const Length& height) const
         // box model. This is essential for sizing inside
         // table cells using percentage heights.
         result -= borderAndPaddingLogicalHeight();
-        return max<LayoutUnit>(0, result);
+        return std::max<LayoutUnit>(0, result);
     }
     return result;
 }
@@ -2763,7 +2761,7 @@ LayoutUnit RenderBox::computeReplacedLogicalWidthRespectingMinMaxWidth(LayoutUni
 {
     LayoutUnit minLogicalWidth = (shouldComputePreferred == ComputePreferred && style().logicalMinWidth().isPercent()) || style().logicalMinWidth().isUndefined() ? logicalWidth : computeReplacedLogicalWidthUsing(style().logicalMinWidth());
     LayoutUnit maxLogicalWidth = (shouldComputePreferred == ComputePreferred && style().logicalMaxWidth().isPercent()) || style().logicalMaxWidth().isUndefined() ? logicalWidth : computeReplacedLogicalWidthUsing(style().logicalMaxWidth());
-    return max(minLogicalWidth, min(logicalWidth, maxLogicalWidth));
+    return std::max(minLogicalWidth, std::min(logicalWidth, maxLogicalWidth));
 }
 
 LayoutUnit RenderBox::computeReplacedLogicalWidthUsing(Length logicalWidth) const
@@ -2820,7 +2818,7 @@ LayoutUnit RenderBox::computeReplacedLogicalHeightRespectingMinMaxHeight(LayoutU
 {
     LayoutUnit minLogicalHeight = computeReplacedLogicalHeightUsing(style().logicalMinHeight());
     LayoutUnit maxLogicalHeight = style().logicalMaxHeight().isUndefined() ? logicalHeight : computeReplacedLogicalHeightUsing(style().logicalMaxHeight());
-    return max(minLogicalHeight, min(logicalHeight, maxLogicalHeight));
+    return std::max(minLogicalHeight, std::min(logicalHeight, maxLogicalHeight));
 }
 
 LayoutUnit RenderBox::computeReplacedLogicalHeightUsing(Length logicalHeight) const
@@ -2866,7 +2864,7 @@ LayoutUnit RenderBox::computeReplacedLogicalHeightUsing(Length logicalHeight) co
                     if (cb->isTableCell()) {
                         // Don't let table cells squeeze percent-height replaced elements
                         // <http://bugs.webkit.org/show_bug.cgi?id=15359>
-                        availableHeight = max(availableHeight, intrinsicLogicalHeight());
+                        availableHeight = std::max(availableHeight, intrinsicLogicalHeight());
                         return valueForLength(logicalHeight, availableHeight - borderAndPaddingLogicalHeight());
                     }
                     toRenderBlock(cb)->addPercentHeightDescendant(const_cast<RenderBox&>(*this));
@@ -2990,7 +2988,7 @@ LayoutUnit RenderBox::containingBlockLogicalWidthForPositioned(const RenderBoxMo
             RenderRegion* containingBlockRegion = cb->clampToStartAndEndRegions(region);
             boxInfo = cb->renderBoxRegionInfo(containingBlockRegion);
         }
-        return (boxInfo) ? max<LayoutUnit>(0, cb->clientLogicalWidth() - (cb->logicalWidth() - boxInfo->logicalWidth())) : cb->clientLogicalWidth();
+        return (boxInfo) ? std::max<LayoutUnit>(0, cb->clientLogicalWidth() - (cb->logicalWidth() - boxInfo->logicalWidth())) : cb->clientLogicalWidth();
     }
 
     ASSERT(containingBlock->isRenderInline() && containingBlock->isInFlowPositioned());
@@ -3013,7 +3011,7 @@ LayoutUnit RenderBox::containingBlockLogicalWidthForPositioned(const RenderBoxMo
         fromLeft = last->logicalLeft() + last->borderLogicalLeft();
     }
 
-    return max<LayoutUnit>(0, fromRight - fromLeft);
+    return std::max<LayoutUnit>(0, fromRight - fromLeft);
 }
 
 LayoutUnit RenderBox::containingBlockLogicalHeightForPositioned(const RenderBoxModelObject* containingBlock, bool checkForPerpendicularWritingMode) const
@@ -3386,7 +3384,7 @@ void RenderBox::computePositionedLogicalWidthUsing(Length logicalWidth, const Re
             LayoutUnit preferredWidth = maxPreferredLogicalWidth() - bordersPlusPadding;
             LayoutUnit preferredMinWidth = minPreferredLogicalWidth() - bordersPlusPadding;
             LayoutUnit availableWidth = availableSpace - logicalRightValue;
-            computedValues.m_extent = min(max(preferredMinWidth, availableWidth), preferredWidth);
+            computedValues.m_extent = std::min(std::max(preferredMinWidth, availableWidth), preferredWidth);
             logicalLeftValue = availableSpace - (computedValues.m_extent + logicalRightValue);
         } else if (!logicalLeftIsAuto && logicalWidthIsAuto && logicalRightIsAuto) {
             // RULE 3: (use shrink-to-fit for width, and no need solve of right)
@@ -3396,7 +3394,7 @@ void RenderBox::computePositionedLogicalWidthUsing(Length logicalWidth, const Re
             LayoutUnit preferredWidth = maxPreferredLogicalWidth() - bordersPlusPadding;
             LayoutUnit preferredMinWidth = minPreferredLogicalWidth() - bordersPlusPadding;
             LayoutUnit availableWidth = availableSpace - logicalLeftValue;
-            computedValues.m_extent = min(max(preferredMinWidth, availableWidth), preferredWidth);
+            computedValues.m_extent = std::min(std::max(preferredMinWidth, availableWidth), preferredWidth);
         } else if (logicalLeftIsAuto && !logicalWidthIsAuto && !logicalRightIsAuto) {
             // RULE 4: (solve for left)
             computedValues.m_extent = adjustContentBoxLogicalWidthForBoxSizing(valueForLength(logicalWidth, containerLogicalWidth));
@@ -3688,7 +3686,7 @@ void RenderBox::computePositionedLogicalHeightUsing(Length logicalHeightLength,
         } else if (!logicalTopIsAuto && logicalHeightIsAuto && !logicalBottomIsAuto) {
             // RULE 5: (solve of height)
             logicalTopValue = valueForLength(logicalTop, containerLogicalHeight);
-            logicalHeightValue = max<LayoutUnit>(0, availableSpace - (logicalTopValue + valueForLength(logicalBottom, containerLogicalHeight)));
+            logicalHeightValue = std::max<LayoutUnit>(0, availableSpace - (logicalTopValue + valueForLength(logicalBottom, containerLogicalHeight)));
         } else if (!logicalTopIsAuto && !logicalHeightIsAuto && logicalBottomIsAuto) {
             // RULE 6: (no need solve of bottom)
             logicalHeightValue = adjustContentBoxLogicalHeightForBoxSizing(valueForLength(logicalHeightLength, containerLogicalHeight));
@@ -4194,10 +4192,10 @@ LayoutRect RenderBox::applyVisualEffectOverflow(const LayoutRect& borderBox) con
         
         // In flipped blocks writing modes, the physical sides are inverted. For example in vertical-rl, the right
         // border is at the lower x coordinate value.
-        overflowMinX = min(overflowMinX, borderBox.x() - ((!isFlipped || isHorizontal) ? borderOutsets.left() : borderOutsets.right()));
-        overflowMaxX = max(overflowMaxX, borderBox.maxX() + ((!isFlipped || isHorizontal) ? borderOutsets.right() : borderOutsets.left()));
-        overflowMinY = min(overflowMinY, borderBox.y() - ((!isFlipped || !isHorizontal) ? borderOutsets.top() : borderOutsets.bottom()));
-        overflowMaxY = max(overflowMaxY, borderBox.maxY() + ((!isFlipped || !isHorizontal) ? borderOutsets.bottom() : borderOutsets.top()));
+        overflowMinX = std::min(overflowMinX, borderBox.x() - ((!isFlipped || isHorizontal) ? borderOutsets.left() : borderOutsets.right()));
+        overflowMaxX = std::max(overflowMaxX, borderBox.maxX() + ((!isFlipped || isHorizontal) ? borderOutsets.right() : borderOutsets.left()));
+        overflowMinY = std::min(overflowMinY, borderBox.y() - ((!isFlipped || !isHorizontal) ? borderOutsets.top() : borderOutsets.bottom()));
+        overflowMaxY = std::max(overflowMaxY, borderBox.maxY() + ((!isFlipped || !isHorizontal) ? borderOutsets.bottom() : borderOutsets.top()));
     }
 
     // Add in the final overflow with shadows and outsets combined.
@@ -4261,13 +4259,13 @@ void RenderBox::addLayoutOverflow(const LayoutRect& rect)
         }
 
         if (!hasTopOverflow)
-            overflowRect.shiftYEdgeTo(max(overflowRect.y(), clientBox.y()));
+            overflowRect.shiftYEdgeTo(std::max(overflowRect.y(), clientBox.y()));
         else
-            overflowRect.shiftMaxYEdgeTo(min(overflowRect.maxY(), clientBox.maxY()));
+            overflowRect.shiftMaxYEdgeTo(std::min(overflowRect.maxY(), clientBox.maxY()));
         if (!hasLeftOverflow)
-            overflowRect.shiftXEdgeTo(max(overflowRect.x(), clientBox.x()));
+            overflowRect.shiftXEdgeTo(std::max(overflowRect.x(), clientBox.x()));
         else
-            overflowRect.shiftMaxXEdgeTo(min(overflowRect.maxX(), clientBox.maxX()));
+            overflowRect.shiftMaxXEdgeTo(std::min(overflowRect.maxX(), clientBox.maxX()));
         
         // Now re-test with the adjusted rectangle and see if it has become unreachable or fully
         // contained.
index 1950313..c5eaa69 100644 (file)
@@ -50,8 +50,6 @@
 #include "RenderLayerCompositor.h"
 #endif
 
-using namespace std;
-
 namespace WebCore {
 
 using namespace HTMLNames;
@@ -977,8 +975,8 @@ IntSize RenderBoxModelObject::calculateFillTileSize(const FillLayer* fillLayer,
                 ? static_cast<float>(positioningAreaSize.width()) / imageIntrinsicSize.width() : 1;
             float verticalScaleFactor = imageIntrinsicSize.height()
                 ? static_cast<float>(positioningAreaSize.height()) / imageIntrinsicSize.height() : 1;
-            float scaleFactor = type == Contain ? min(horizontalScaleFactor, verticalScaleFactor) : max(horizontalScaleFactor, verticalScaleFactor);
-            return IntSize(max(1, static_cast<int>(imageIntrinsicSize.width() * scaleFactor)), max(1, static_cast<int>(imageIntrinsicSize.height() * scaleFactor)));
+            float scaleFactor = type == Contain ? std::min(horizontalScaleFactor, verticalScaleFactor) : std::max(horizontalScaleFactor, verticalScaleFactor);
+            return IntSize(std::max(1, static_cast<int>(imageIntrinsicSize.width() * scaleFactor)), std::max(1, static_cast<int>(imageIntrinsicSize.height() * scaleFactor)));
        }
     }
 
@@ -988,21 +986,21 @@ IntSize RenderBoxModelObject::calculateFillTileSize(const FillLayer* fillLayer,
 
 void RenderBoxModelObject::BackgroundImageGeometry::setNoRepeatX(int xOffset)
 {
-    m_destRect.move(max(xOffset, 0), 0);
-    m_phase.setX(-min(xOffset, 0));
-    m_destRect.setWidth(m_tileSize.width() + min(xOffset, 0));
+    m_destRect.move(std::max(xOffset, 0), 0);
+    m_phase.setX(-std::min(xOffset, 0));
+    m_destRect.setWidth(m_tileSize.width() + std::min(xOffset, 0));
 }
 void RenderBoxModelObject::BackgroundImageGeometry::setNoRepeatY(int yOffset)
 {
-    m_destRect.move(0, max(yOffset, 0));
-    m_phase.setY(-min(yOffset, 0));
-    m_destRect.setHeight(m_tileSize.height() + min(yOffset, 0));
+    m_destRect.move(0, std::max(yOffset, 0));
+    m_phase.setY(-std::min(yOffset, 0));
+    m_destRect.setHeight(m_tileSize.height() + std::min(yOffset, 0));
 }
 
 void RenderBoxModelObject::BackgroundImageGeometry::useFixedAttachment(const IntPoint& attachmentPoint)
 {
     IntPoint alignedPoint = attachmentPoint;
-    m_phase.move(max(alignedPoint.x() - m_destRect.x(), 0), max(alignedPoint.y() - m_destRect.y(), 0));
+    m_phase.move(std::max(alignedPoint.x() - m_destRect.x(), 0), std::max(alignedPoint.y() - m_destRect.y(), 0));
 }
 
 void RenderBoxModelObject::BackgroundImageGeometry::clip(const IntRect& clipRect)
@@ -1251,10 +1249,10 @@ bool RenderBoxModelObject::paintNinePieceImage(GraphicsContext* graphicsContext,
     RenderView* renderView = &view();
 
     float imageScaleFactor = styleImage->imageScaleFactor();
-    int topSlice = min<int>(imageHeight, valueForLength(ninePieceImage.imageSlices().top(), imageHeight)) * imageScaleFactor;
-    int rightSlice = min<int>(imageWidth, valueForLength(ninePieceImage.imageSlices().right(), imageWidth)) * imageScaleFactor;
-    int bottomSlice = min<int>(imageHeight, valueForLength(ninePieceImage.imageSlices().bottom(), imageHeight)) * imageScaleFactor;
-    int leftSlice = min<int>(imageWidth, valueForLength(ninePieceImage.imageSlices().left(), imageWidth)) * imageScaleFactor;
+    int topSlice = std::min<int>(imageHeight, valueForLength(ninePieceImage.imageSlices().top(), imageHeight)) * imageScaleFactor;
+    int rightSlice = std::min<int>(imageWidth, valueForLength(ninePieceImage.imageSlices().right(), imageWidth)) * imageScaleFactor;
+    int bottomSlice =&