Stop bringing in the std namespace
authorandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 25 Oct 2013 01:15:36 +0000 (01:15 +0000)
committerandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 25 Oct 2013 01:15:36 +0000 (01:15 +0000)
https://bugs.webkit.org/show_bug.cgi?id=123273

Reviewed by Andreas Kling.

Source/WebCore:

* Modules/webaudio/AudioBufferSourceNode.cpp:
(WebCore::AudioBufferSourceNode::renderFromBuffer):
(WebCore::AudioBufferSourceNode::startGrain):
(WebCore::AudioBufferSourceNode::totalPitchRate):
* Modules/webaudio/AudioNodeInput.cpp:
(WebCore::AudioNodeInput::numberOfChannels):
* Modules/webaudio/AudioParamTimeline.cpp:
(WebCore::AudioParamTimeline::valuesForTimeRangeImpl):
* Modules/webaudio/AudioScheduledSourceNode.cpp:
(WebCore::AudioScheduledSourceNode::updateSchedulingInfo):
(WebCore::AudioScheduledSourceNode::stop):
* Modules/webaudio/AudioSummingJunction.cpp:
* Modules/webaudio/DelayDSPKernel.cpp:
(WebCore::DelayDSPKernel::process):
* Modules/webaudio/OfflineAudioDestinationNode.cpp:
(WebCore::OfflineAudioDestinationNode::offlineRender):
* Modules/webaudio/OscillatorNode.cpp:
* Modules/webaudio/PannerNode.cpp:
(WebCore::PannerNode::dopplerRate):
* Modules/webaudio/WaveShaperDSPKernel.cpp:
(WebCore::WaveShaperDSPKernel::processCurve):
* Modules/webdatabase/DatabaseTracker.cpp:
(WebCore::DatabaseTracker::hasAdequateQuotaForOrigin):
* Modules/websockets/WebSocket.cpp:
(WebCore::saturateAdd):
* Modules/websockets/WebSocketChannel.cpp:
* Modules/websockets/WebSocketFrame.cpp:
(WebCore::WebSocketFrame::parseFrame):
* accessibility/AccessibilityARIAGrid.cpp:
* accessibility/AccessibilityARIAGridCell.cpp:
* accessibility/AccessibilityARIAGridRow.cpp:
* accessibility/AccessibilityList.cpp:
* accessibility/AccessibilityListBox.cpp:
* accessibility/AccessibilityListBoxOption.cpp:
* accessibility/AccessibilityNodeObject.cpp:
* accessibility/AccessibilityObject.cpp:
* accessibility/AccessibilityRenderObject.cpp:
* accessibility/AccessibilityTable.cpp:
(WebCore::AccessibilityTable::addChildren):
* accessibility/AccessibilityTableCell.cpp:
* accessibility/AccessibilityTableColumn.cpp:
* accessibility/AccessibilityTableHeaderContainer.cpp:
* accessibility/AccessibilityTableRow.cpp:
* accessibility/mac/WebAccessibilityObjectWrapperBase.mm:
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper accessibilityArrayAttributeValues:index:maxCount:]):
* bindings/js/JSCSSStyleDeclarationCustom.cpp:
(WebCore::JSCSSStyleDeclaration::getOwnPropertyNames):
* bindings/js/JSGeolocationCustom.cpp:
(WebCore::setTimeout):
(WebCore::setMaximumAge):
* bindings/js/ScriptController.cpp:
* bindings/js/SerializedScriptValue.cpp:
(WebCore::writeLittleEndian):
(WebCore::CloneSerializer::write):
(WebCore::CloneDeserializer::deserialize):
(WebCore::CloneDeserializer::readString):
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::propertyValue):
* css/CSSFontSelector.cpp:
(WebCore::CSSFontSelector::getFontFace):
* css/CSSGradientValue.cpp:
(WebCore::CSSRadialGradientValue::createGradient):
* css/CSSParser.cpp:
(WebCore::CSSParser::parseValue):
(WebCore::CSSParser::parseColorParameters):
(WebCore::CSSParser::parseHSLParameters):
* css/CSSReflectValue.cpp:
* css/DeprecatedStyleBuilder.cpp:
(WebCore::ApplyPropertyFontSize::applyValue):
* css/PropertySetCSSStyleDeclaration.cpp:
* css/SVGCSSParser.cpp:
* css/StylePropertySet.cpp:
(WebCore::StylePropertySet::getLayeredShorthandValue):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::viewportPercentageValue):
* dom/CharacterData.cpp:
(WebCore::CharacterData::parserAppendData):
* dom/ContainerNode.cpp:
* dom/Document.cpp:
(WebCore::Document::minimumLayoutDelay):
* dom/Node.cpp:
(WebCore::Node::compareDocumentPosition):
* dom/Range.cpp:
(WebCore::Range::toString):
(WebCore::Range::textRects):
(WebCore::Range::textQuads):
* dom/ScriptedAnimationController.cpp:
(WebCore::ScriptedAnimationController::scheduleAnimation):
* dom/StyledElement.cpp:
(WebCore::StyledElement::makePresentationAttributeCacheKey):
* dom/Text.cpp:
* dom/ViewportArguments.cpp:
(WebCore::clampLengthValue):
(WebCore::clampScaleValue):
(WebCore::ViewportArguments::resolve):
(WebCore::computeMinimumScaleFactorForContentContained):
(WebCore::restrictMinimumScaleFactorToViewportSize):
* editing/AlternativeTextController.cpp:
* editing/ApplyStyleCommand.cpp:
(WebCore::ApplyStyleCommand::applyRelativeFontStyleChange):
* editing/CompositeEditCommand.cpp:
(WebCore::CompositeEditCommand::deleteInsignificantText):
* editing/Editor.cpp:
(WebCore::Editor::setComposition):
(WebCore::Editor::compositionRange):
* editing/EditorCommand.cpp:
(WebCore::verticalScrollDistance):
* editing/TextIterator.cpp:
(WebCore::TextIterator::handleTextNode):
(WebCore::TextIterator::handleTextBox):
(WebCore::CharacterIterator::string):
(WebCore::SearchBuffer::SearchBuffer):
(WebCore::SearchBuffer::append):
(WebCore::SearchBuffer::prependContext):
(WebCore::SearchBuffer::search):
* editing/VisibleUnits.cpp:
(WebCore::startOfParagraph):
* editing/htmlediting.cpp:
* editing/markup.cpp:
* fileapi/FileReaderLoader.cpp:
(WebCore::FileReaderLoader::didReceiveResponse):
(WebCore::FileReaderLoader::didReceiveData):
* history/BackForwardList.cpp:
(WebCore::BackForwardList::backListWithLimit):
(WebCore::BackForwardList::forwardListWithLimit):
* history/PageCache.cpp:
(WebCore::PageCache::setCapacity):
* html/BaseDateAndTimeInputType.cpp:
* html/FTPDirectoryDocument.cpp:
* html/HTMLAreaElement.cpp:
(WebCore::HTMLAreaElement::getRegion):
* html/HTMLElement.cpp:
(WebCore::HTMLElement::parseAttribute):
(WebCore::parseColorStringWithCrazyLegacyRules):
* html/HTMLFormControlElement.cpp:
* html/HTMLFormElement.cpp:
(WebCore::HTMLFormElement::getTextFieldValues):
* html/HTMLImageElement.cpp:
* html/HTMLInputElement.cpp:
* html/HTMLMapElement.cpp:
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::HTMLMediaElement):
(WebCore::HTMLMediaElement::updateActiveTextTrackCues):
(WebCore::HTMLMediaElement::textTrackAddCue):
(WebCore::HTMLMediaElement::textTrackRemoveCue):
(WebCore::HTMLMediaElement::rewind):
(WebCore::HTMLMediaElement::seek):
(WebCore::HTMLMediaElement::duration):
* html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::parseAttribute):
(WebCore::HTMLSelectElement::updateListBoxSelection):
* html/HTMLSourceElement.cpp:
* html/HTMLTableCellElement.cpp:
(WebCore::HTMLTableCellElement::colSpan):
(WebCore::HTMLTableCellElement::rowSpan):
* html/HTMLTableElement.cpp:
(WebCore::HTMLTableElement::parseAttribute):
* html/HTMLTextFormControlElement.cpp:
(WebCore::HTMLTextFormControlElement::setSelectionStart):
(WebCore::HTMLTextFormControlElement::setSelectionEnd):
(WebCore::HTMLTextFormControlElement::select):
(WebCore::HTMLTextFormControlElement::setSelectionRange):
* html/HTMLTrackElement.cpp:
* html/ImageDocument.cpp:
(WebCore::ImageDocument::scale):
* html/InputType.cpp:
(WebCore::InputType::valueAsDouble):
* html/MediaController.cpp:
(MediaController::duration):
(MediaController::currentTime):
(MediaController::setCurrentTime):
(MediaController::updateReadyState):
* html/NumberInputType.cpp:
(WebCore::NumberInputType::setValueAsDouble):
(WebCore::NumberInputType::setValueAsDecimal):
(WebCore::NumberInputType::createStepRange):
* html/RangeInputType.cpp:
(WebCore::RangeInputType::handleKeydownEvent):
* html/SearchInputType.cpp:
(WebCore::SearchInputType::startSearchEventTimer):
* html/StepRange.cpp:
(WebCore::StepRange::clampValue):
(WebCore::StepRange::parseStep):
* html/TimeRanges.cpp:
* html/ValidationMessage.cpp:
(WebCore::ValidationMessage::setMessageDOMAndStartTimer):
(WebCore::adjustBubblePosition):
* html/canvas/CanvasRenderingContext2D.cpp:
(WebCore::normalizeRect):
* html/canvas/WebGLRenderingContext.cpp:
(WebCore::WebGLRenderingContext::validateIndexArrayConservative):
(WebCore::WebGLRenderingContext::validateCompressedTexFuncData):
* html/shadow/MediaControlElements.cpp:
(WebCore::MediaControlRewindButtonElement::defaultEventHandler):
* html/shadow/MediaControlsApple.cpp:
* html/shadow/SliderThumbElement.cpp:
(WebCore::SliderThumbElement::setPositionFromPoint):
* inspector/ContentSearchUtils.cpp:
* inspector/DOMEditor.cpp:
* inspector/DOMPatchSupport.cpp:
(WebCore::DOMPatchSupport::diff):
* inspector/InjectedScriptHost.cpp:
* loader/ProgressTracker.cpp:
(WebCore::ProgressTracker::incrementProgress):
* loader/cache/CachedImage.cpp:
* page/DOMWindow.cpp:
(WebCore::DOMWindow::adjustWindowRect):
* page/EventHandler.cpp:
(WebCore::MaximumDurationTracker::~MaximumDurationTracker):
* page/FrameTree.cpp:
* page/FrameView.cpp:
(WebCore::FrameView::adjustedDeferredRepaintDelay):
(WebCore::FrameView::autoSizeIfEnabled):
* page/PrintContext.cpp:
(WebCore::PrintContext::computeAutomaticScaleFactor):
* page/SpatialNavigation.cpp:
(WebCore::entryAndExitPointsForDirection):
* page/animation/CSSPropertyAnimation.cpp:
(WebCore::blendFilterOperations):
(WebCore::PropertyWrapperShadow::blendMismatchedShadowLists):
* platform/graphics/FloatRect.cpp:
(WebCore::FloatRect::FloatRect):
(WebCore::FloatRect::intersect):
(WebCore::FloatRect::uniteEvenIfEmpty):
(WebCore::FloatRect::extend):
(WebCore::FloatRect::fitToPoints):
* platform/graphics/GlyphPageTreeNode.cpp:
(WebCore::GlyphPageTreeNode::initializePage):
(WebCore::GlyphPageTreeNode::getChild):
* platform/graphics/IntRect.cpp:
(WebCore::IntRect::intersect):
(WebCore::IntRect::unite):
(WebCore::IntRect::uniteIfNonZero):
* platform/graphics/LayoutRect.cpp:
(WebCore::LayoutRect::intersect):
(WebCore::LayoutRect::unite):
(WebCore::LayoutRect::uniteIfNonZero):
* platform/graphics/filters/FEMorphology.cpp:
(WebCore::FEMorphology::platformApplyGeneric):
(WebCore::FEMorphology::platformApplySoftware):
* platform/mac/MemoryPressureHandlerMac.mm:
(WebCore::MemoryPressureHandler::respondToMemoryPressure):
* platform/text/TextCodecICU.cpp:
* rendering/LineWidth.cpp:
(WebCore::LineWidth::fitBelowFloats):
(WebCore::LineWidth::computeAvailableWidthFromLeftAndRight):
* rendering/RenderBlock.h:
(WebCore::RenderBlock::availableLogicalWidthForLine):
(WebCore::RenderBlock::availableLogicalWidthForContent):
* rendering/RenderFieldset.cpp:
(WebCore::RenderFieldset::computePreferredLogicalWidths):
(WebCore::RenderFieldset::layoutSpecialExcludedChild):
(WebCore::RenderFieldset::paintBoxDecorations):
* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::updateLogicalWidth):
(WebCore::RenderFlowThread::addForcedRegionBreak):
* rendering/RenderFrameBase.cpp:
(WebCore::RenderFrameBase::layoutWithFlattening):
* rendering/RenderFrameSet.cpp:
(WebCore::RenderFrameSet::layOutAxis):
* rendering/RenderSlider.cpp:
(WebCore::RenderSlider::computePreferredLogicalWidths):
* rendering/RenderTableCell.h:
* rendering/RenderTreeAsText.cpp:
(WebCore::writeLayers):
* rendering/RootInlineBox.h:
(WebCore::RootInlineBox::selectionHeight):
(WebCore::RootInlineBox::selectionHeightAdjustedForPrecedingBlock):
* rendering/mathml/RenderMathMLRow.cpp:
(WebCore::RenderMathMLRow::layout):
* rendering/mathml/RenderMathMLScripts.cpp:
(WebCore::RenderMathMLScripts::layout):
* rendering/style/RenderStyle.h:
* rendering/style/StyleGeneratedImage.cpp:
(WebCore::StyleGeneratedImage::imageSize):
* style/StyleFontSizeFunctions.cpp:
(WebCore::Style::fontSizeForKeyword):
* svg/SVGSVGElement.cpp:
(WebCore::SVGSVGElement::setCurrentTime):

Source/WebKit/mac:

* WebView/WebFrameView.mm:
(-[WebFrameView _verticalPageScrollDistance]):
(-[WebFrameView _horizontalPageScrollDistance]):
* WebView/WebHTMLView.mm:
(-[WebHTMLView _scaleFactorForPrintOperation:]):
* WebView/WebView.mm:
(+[WebView _setCacheModel:]):
(+[WebView _maxCacheModelInAnyInstance]):
(+[WebView _cacheModelChangedNotification:]):
(+[WebView _preferencesRemovedNotification:]):

Source/WebKit2:

* WebProcess/mac/WebProcessMac.mm:
(WebKit::WebProcess::platformSetCacheModel):

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

143 files changed:
Source/WebCore/ChangeLog
Source/WebCore/Modules/webaudio/AudioBufferSourceNode.cpp
Source/WebCore/Modules/webaudio/AudioNodeInput.cpp
Source/WebCore/Modules/webaudio/AudioParamTimeline.cpp
Source/WebCore/Modules/webaudio/AudioScheduledSourceNode.cpp
Source/WebCore/Modules/webaudio/AudioSummingJunction.cpp
Source/WebCore/Modules/webaudio/DelayDSPKernel.cpp
Source/WebCore/Modules/webaudio/OfflineAudioDestinationNode.cpp
Source/WebCore/Modules/webaudio/OscillatorNode.cpp
Source/WebCore/Modules/webaudio/PannerNode.cpp
Source/WebCore/Modules/webaudio/WaveShaperDSPKernel.cpp
Source/WebCore/Modules/webdatabase/DatabaseTracker.cpp
Source/WebCore/Modules/websockets/WebSocket.cpp
Source/WebCore/Modules/websockets/WebSocketChannel.cpp
Source/WebCore/Modules/websockets/WebSocketFrame.cpp
Source/WebCore/accessibility/AccessibilityARIAGrid.cpp
Source/WebCore/accessibility/AccessibilityARIAGridCell.cpp
Source/WebCore/accessibility/AccessibilityARIAGridRow.cpp
Source/WebCore/accessibility/AccessibilityList.cpp
Source/WebCore/accessibility/AccessibilityListBox.cpp
Source/WebCore/accessibility/AccessibilityListBoxOption.cpp
Source/WebCore/accessibility/AccessibilityNodeObject.cpp
Source/WebCore/accessibility/AccessibilityObject.cpp
Source/WebCore/accessibility/AccessibilityRenderObject.cpp
Source/WebCore/accessibility/AccessibilityTable.cpp
Source/WebCore/accessibility/AccessibilityTableCell.cpp
Source/WebCore/accessibility/AccessibilityTableColumn.cpp
Source/WebCore/accessibility/AccessibilityTableHeaderContainer.cpp
Source/WebCore/accessibility/AccessibilityTableRow.cpp
Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperBase.mm
Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm
Source/WebCore/bindings/js/JSCSSStyleDeclarationCustom.cpp
Source/WebCore/bindings/js/JSGeolocationCustom.cpp
Source/WebCore/bindings/js/ScriptController.cpp
Source/WebCore/bindings/js/SerializedScriptValue.cpp
Source/WebCore/css/CSSComputedStyleDeclaration.cpp
Source/WebCore/css/CSSFontSelector.cpp
Source/WebCore/css/CSSGradientValue.cpp
Source/WebCore/css/CSSParser.cpp
Source/WebCore/css/CSSReflectValue.cpp
Source/WebCore/css/DeprecatedStyleBuilder.cpp
Source/WebCore/css/PropertySetCSSStyleDeclaration.cpp
Source/WebCore/css/SVGCSSParser.cpp
Source/WebCore/css/StylePropertySet.cpp
Source/WebCore/css/StyleResolver.cpp
Source/WebCore/dom/CharacterData.cpp
Source/WebCore/dom/ContainerNode.cpp
Source/WebCore/dom/Document.cpp
Source/WebCore/dom/Node.cpp
Source/WebCore/dom/Range.cpp
Source/WebCore/dom/ScriptedAnimationController.cpp
Source/WebCore/dom/StyledElement.cpp
Source/WebCore/dom/Text.cpp
Source/WebCore/dom/ViewportArguments.cpp
Source/WebCore/editing/AlternativeTextController.cpp
Source/WebCore/editing/ApplyStyleCommand.cpp
Source/WebCore/editing/CompositeEditCommand.cpp
Source/WebCore/editing/Editor.cpp
Source/WebCore/editing/EditorCommand.cpp
Source/WebCore/editing/TextIterator.cpp
Source/WebCore/editing/VisibleUnits.cpp
Source/WebCore/editing/htmlediting.cpp
Source/WebCore/editing/markup.cpp
Source/WebCore/fileapi/FileReaderLoader.cpp
Source/WebCore/history/BackForwardList.cpp
Source/WebCore/history/PageCache.cpp
Source/WebCore/html/BaseDateAndTimeInputType.cpp
Source/WebCore/html/FTPDirectoryDocument.cpp
Source/WebCore/html/HTMLAreaElement.cpp
Source/WebCore/html/HTMLElement.cpp
Source/WebCore/html/HTMLFormControlElement.cpp
Source/WebCore/html/HTMLFormElement.cpp
Source/WebCore/html/HTMLImageElement.cpp
Source/WebCore/html/HTMLInputElement.cpp
Source/WebCore/html/HTMLMapElement.cpp
Source/WebCore/html/HTMLMediaElement.cpp
Source/WebCore/html/HTMLSelectElement.cpp
Source/WebCore/html/HTMLSourceElement.cpp
Source/WebCore/html/HTMLTableCellElement.cpp
Source/WebCore/html/HTMLTableElement.cpp
Source/WebCore/html/HTMLTextFormControlElement.cpp
Source/WebCore/html/HTMLTrackElement.cpp
Source/WebCore/html/ImageDocument.cpp
Source/WebCore/html/InputType.cpp
Source/WebCore/html/MediaController.cpp
Source/WebCore/html/NumberInputType.cpp
Source/WebCore/html/RangeInputType.cpp
Source/WebCore/html/SearchInputType.cpp
Source/WebCore/html/StepRange.cpp
Source/WebCore/html/TimeRanges.cpp
Source/WebCore/html/ValidationMessage.cpp
Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp
Source/WebCore/html/canvas/WebGLRenderingContext.cpp
Source/WebCore/html/shadow/MediaControlElements.cpp
Source/WebCore/html/shadow/MediaControlsApple.cpp
Source/WebCore/html/shadow/SliderThumbElement.cpp
Source/WebCore/inspector/ContentSearchUtils.cpp
Source/WebCore/inspector/DOMEditor.cpp
Source/WebCore/inspector/DOMPatchSupport.cpp
Source/WebCore/inspector/InjectedScriptHost.cpp
Source/WebCore/loader/ProgressTracker.cpp
Source/WebCore/loader/cache/CachedImage.cpp
Source/WebCore/page/DOMWindow.cpp
Source/WebCore/page/EventHandler.cpp
Source/WebCore/page/FrameTree.cpp
Source/WebCore/page/FrameView.cpp
Source/WebCore/page/PrintContext.cpp
Source/WebCore/page/SpatialNavigation.cpp
Source/WebCore/page/animation/CSSPropertyAnimation.cpp
Source/WebCore/platform/efl/RenderThemeEfl.cpp
Source/WebCore/platform/graphics/FloatRect.cpp
Source/WebCore/platform/graphics/GlyphPageTreeNode.cpp
Source/WebCore/platform/graphics/IntRect.cpp
Source/WebCore/platform/graphics/LayoutRect.cpp
Source/WebCore/platform/graphics/filters/FEMorphology.cpp
Source/WebCore/platform/gtk/RenderThemeGtk.cpp
Source/WebCore/platform/gtk/RenderThemeGtk2.cpp
Source/WebCore/platform/gtk/RenderThemeGtk3.cpp
Source/WebCore/platform/mac/MemoryPressureHandlerMac.mm
Source/WebCore/platform/text/TextCodecICU.cpp
Source/WebCore/platform/win/PopupMenuWin.cpp
Source/WebCore/rendering/LineWidth.cpp
Source/WebCore/rendering/RenderBlock.h
Source/WebCore/rendering/RenderFieldset.cpp
Source/WebCore/rendering/RenderFlowThread.cpp
Source/WebCore/rendering/RenderFrameBase.cpp
Source/WebCore/rendering/RenderFrameSet.cpp
Source/WebCore/rendering/RenderSlider.cpp
Source/WebCore/rendering/RenderTableCell.h
Source/WebCore/rendering/RenderTreeAsText.cpp
Source/WebCore/rendering/RootInlineBox.h
Source/WebCore/rendering/mathml/RenderMathMLRow.cpp
Source/WebCore/rendering/mathml/RenderMathMLScripts.cpp
Source/WebCore/rendering/style/RenderStyle.h
Source/WebCore/rendering/style/StyleGeneratedImage.cpp
Source/WebCore/style/StyleFontSizeFunctions.cpp
Source/WebCore/svg/SVGSVGElement.cpp
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/WebView/WebFrameView.mm
Source/WebKit/mac/WebView/WebHTMLView.mm
Source/WebKit/mac/WebView/WebView.mm
Source/WebKit2/ChangeLog
Source/WebKit2/WebProcess/mac/WebProcessMac.mm

index d6394e3..522dc78 100644 (file)
@@ -1,3 +1,291 @@
+2013-10-24  Anders Carlsson  <andersca@apple.com>
+
+        Stop bringing in the std namespace
+        https://bugs.webkit.org/show_bug.cgi?id=123273
+
+        Reviewed by Andreas Kling.
+
+        * Modules/webaudio/AudioBufferSourceNode.cpp:
+        (WebCore::AudioBufferSourceNode::renderFromBuffer):
+        (WebCore::AudioBufferSourceNode::startGrain):
+        (WebCore::AudioBufferSourceNode::totalPitchRate):
+        * Modules/webaudio/AudioNodeInput.cpp:
+        (WebCore::AudioNodeInput::numberOfChannels):
+        * Modules/webaudio/AudioParamTimeline.cpp:
+        (WebCore::AudioParamTimeline::valuesForTimeRangeImpl):
+        * Modules/webaudio/AudioScheduledSourceNode.cpp:
+        (WebCore::AudioScheduledSourceNode::updateSchedulingInfo):
+        (WebCore::AudioScheduledSourceNode::stop):
+        * Modules/webaudio/AudioSummingJunction.cpp:
+        * Modules/webaudio/DelayDSPKernel.cpp:
+        (WebCore::DelayDSPKernel::process):
+        * Modules/webaudio/OfflineAudioDestinationNode.cpp:
+        (WebCore::OfflineAudioDestinationNode::offlineRender):
+        * Modules/webaudio/OscillatorNode.cpp:
+        * Modules/webaudio/PannerNode.cpp:
+        (WebCore::PannerNode::dopplerRate):
+        * Modules/webaudio/WaveShaperDSPKernel.cpp:
+        (WebCore::WaveShaperDSPKernel::processCurve):
+        * Modules/webdatabase/DatabaseTracker.cpp:
+        (WebCore::DatabaseTracker::hasAdequateQuotaForOrigin):
+        * Modules/websockets/WebSocket.cpp:
+        (WebCore::saturateAdd):
+        * Modules/websockets/WebSocketChannel.cpp:
+        * Modules/websockets/WebSocketFrame.cpp:
+        (WebCore::WebSocketFrame::parseFrame):
+        * accessibility/AccessibilityARIAGrid.cpp:
+        * accessibility/AccessibilityARIAGridCell.cpp:
+        * accessibility/AccessibilityARIAGridRow.cpp:
+        * accessibility/AccessibilityList.cpp:
+        * accessibility/AccessibilityListBox.cpp:
+        * accessibility/AccessibilityListBoxOption.cpp:
+        * accessibility/AccessibilityNodeObject.cpp:
+        * accessibility/AccessibilityObject.cpp:
+        * accessibility/AccessibilityRenderObject.cpp:
+        * accessibility/AccessibilityTable.cpp:
+        (WebCore::AccessibilityTable::addChildren):
+        * accessibility/AccessibilityTableCell.cpp:
+        * accessibility/AccessibilityTableColumn.cpp:
+        * accessibility/AccessibilityTableHeaderContainer.cpp:
+        * accessibility/AccessibilityTableRow.cpp:
+        * accessibility/mac/WebAccessibilityObjectWrapperBase.mm:
+        * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
+        (-[WebAccessibilityObjectWrapper accessibilityArrayAttributeValues:index:maxCount:]):
+        * bindings/js/JSCSSStyleDeclarationCustom.cpp:
+        (WebCore::JSCSSStyleDeclaration::getOwnPropertyNames):
+        * bindings/js/JSGeolocationCustom.cpp:
+        (WebCore::setTimeout):
+        (WebCore::setMaximumAge):
+        * bindings/js/ScriptController.cpp:
+        * bindings/js/SerializedScriptValue.cpp:
+        (WebCore::writeLittleEndian):
+        (WebCore::CloneSerializer::write):
+        (WebCore::CloneDeserializer::deserialize):
+        (WebCore::CloneDeserializer::readString):
+        * css/CSSComputedStyleDeclaration.cpp:
+        (WebCore::ComputedStyleExtractor::propertyValue):
+        * css/CSSFontSelector.cpp:
+        (WebCore::CSSFontSelector::getFontFace):
+        * css/CSSGradientValue.cpp:
+        (WebCore::CSSRadialGradientValue::createGradient):
+        * css/CSSParser.cpp:
+        (WebCore::CSSParser::parseValue):
+        (WebCore::CSSParser::parseColorParameters):
+        (WebCore::CSSParser::parseHSLParameters):
+        * css/CSSReflectValue.cpp:
+        * css/DeprecatedStyleBuilder.cpp:
+        (WebCore::ApplyPropertyFontSize::applyValue):
+        * css/PropertySetCSSStyleDeclaration.cpp:
+        * css/SVGCSSParser.cpp:
+        * css/StylePropertySet.cpp:
+        (WebCore::StylePropertySet::getLayeredShorthandValue):
+        * css/StyleResolver.cpp:
+        (WebCore::StyleResolver::viewportPercentageValue):
+        * dom/CharacterData.cpp:
+        (WebCore::CharacterData::parserAppendData):
+        * dom/ContainerNode.cpp:
+        * dom/Document.cpp:
+        (WebCore::Document::minimumLayoutDelay):
+        * dom/Node.cpp:
+        (WebCore::Node::compareDocumentPosition):
+        * dom/Range.cpp:
+        (WebCore::Range::toString):
+        (WebCore::Range::textRects):
+        (WebCore::Range::textQuads):
+        * dom/ScriptedAnimationController.cpp:
+        (WebCore::ScriptedAnimationController::scheduleAnimation):
+        * dom/StyledElement.cpp:
+        (WebCore::StyledElement::makePresentationAttributeCacheKey):
+        * dom/Text.cpp:
+        * dom/ViewportArguments.cpp:
+        (WebCore::clampLengthValue):
+        (WebCore::clampScaleValue):
+        (WebCore::ViewportArguments::resolve):
+        (WebCore::computeMinimumScaleFactorForContentContained):
+        (WebCore::restrictMinimumScaleFactorToViewportSize):
+        * editing/AlternativeTextController.cpp:
+        * editing/ApplyStyleCommand.cpp:
+        (WebCore::ApplyStyleCommand::applyRelativeFontStyleChange):
+        * editing/CompositeEditCommand.cpp:
+        (WebCore::CompositeEditCommand::deleteInsignificantText):
+        * editing/Editor.cpp:
+        (WebCore::Editor::setComposition):
+        (WebCore::Editor::compositionRange):
+        * editing/EditorCommand.cpp:
+        (WebCore::verticalScrollDistance):
+        * editing/TextIterator.cpp:
+        (WebCore::TextIterator::handleTextNode):
+        (WebCore::TextIterator::handleTextBox):
+        (WebCore::CharacterIterator::string):
+        (WebCore::SearchBuffer::SearchBuffer):
+        (WebCore::SearchBuffer::append):
+        (WebCore::SearchBuffer::prependContext):
+        (WebCore::SearchBuffer::search):
+        * editing/VisibleUnits.cpp:
+        (WebCore::startOfParagraph):
+        * editing/htmlediting.cpp:
+        * editing/markup.cpp:
+        * fileapi/FileReaderLoader.cpp:
+        (WebCore::FileReaderLoader::didReceiveResponse):
+        (WebCore::FileReaderLoader::didReceiveData):
+        * history/BackForwardList.cpp:
+        (WebCore::BackForwardList::backListWithLimit):
+        (WebCore::BackForwardList::forwardListWithLimit):
+        * history/PageCache.cpp:
+        (WebCore::PageCache::setCapacity):
+        * html/BaseDateAndTimeInputType.cpp:
+        * html/FTPDirectoryDocument.cpp:
+        * html/HTMLAreaElement.cpp:
+        (WebCore::HTMLAreaElement::getRegion):
+        * html/HTMLElement.cpp:
+        (WebCore::HTMLElement::parseAttribute):
+        (WebCore::parseColorStringWithCrazyLegacyRules):
+        * html/HTMLFormControlElement.cpp:
+        * html/HTMLFormElement.cpp:
+        (WebCore::HTMLFormElement::getTextFieldValues):
+        * html/HTMLImageElement.cpp:
+        * html/HTMLInputElement.cpp:
+        * html/HTMLMapElement.cpp:
+        * html/HTMLMediaElement.cpp:
+        (WebCore::HTMLMediaElement::HTMLMediaElement):
+        (WebCore::HTMLMediaElement::updateActiveTextTrackCues):
+        (WebCore::HTMLMediaElement::textTrackAddCue):
+        (WebCore::HTMLMediaElement::textTrackRemoveCue):
+        (WebCore::HTMLMediaElement::rewind):
+        (WebCore::HTMLMediaElement::seek):
+        (WebCore::HTMLMediaElement::duration):
+        * html/HTMLSelectElement.cpp:
+        (WebCore::HTMLSelectElement::parseAttribute):
+        (WebCore::HTMLSelectElement::updateListBoxSelection):
+        * html/HTMLSourceElement.cpp:
+        * html/HTMLTableCellElement.cpp:
+        (WebCore::HTMLTableCellElement::colSpan):
+        (WebCore::HTMLTableCellElement::rowSpan):
+        * html/HTMLTableElement.cpp:
+        (WebCore::HTMLTableElement::parseAttribute):
+        * html/HTMLTextFormControlElement.cpp:
+        (WebCore::HTMLTextFormControlElement::setSelectionStart):
+        (WebCore::HTMLTextFormControlElement::setSelectionEnd):
+        (WebCore::HTMLTextFormControlElement::select):
+        (WebCore::HTMLTextFormControlElement::setSelectionRange):
+        * html/HTMLTrackElement.cpp:
+        * html/ImageDocument.cpp:
+        (WebCore::ImageDocument::scale):
+        * html/InputType.cpp:
+        (WebCore::InputType::valueAsDouble):
+        * html/MediaController.cpp:
+        (MediaController::duration):
+        (MediaController::currentTime):
+        (MediaController::setCurrentTime):
+        (MediaController::updateReadyState):
+        * html/NumberInputType.cpp:
+        (WebCore::NumberInputType::setValueAsDouble):
+        (WebCore::NumberInputType::setValueAsDecimal):
+        (WebCore::NumberInputType::createStepRange):
+        * html/RangeInputType.cpp:
+        (WebCore::RangeInputType::handleKeydownEvent):
+        * html/SearchInputType.cpp:
+        (WebCore::SearchInputType::startSearchEventTimer):
+        * html/StepRange.cpp:
+        (WebCore::StepRange::clampValue):
+        (WebCore::StepRange::parseStep):
+        * html/TimeRanges.cpp:
+        * html/ValidationMessage.cpp:
+        (WebCore::ValidationMessage::setMessageDOMAndStartTimer):
+        (WebCore::adjustBubblePosition):
+        * html/canvas/CanvasRenderingContext2D.cpp:
+        (WebCore::normalizeRect):
+        * html/canvas/WebGLRenderingContext.cpp:
+        (WebCore::WebGLRenderingContext::validateIndexArrayConservative):
+        (WebCore::WebGLRenderingContext::validateCompressedTexFuncData):
+        * html/shadow/MediaControlElements.cpp:
+        (WebCore::MediaControlRewindButtonElement::defaultEventHandler):
+        * html/shadow/MediaControlsApple.cpp:
+        * html/shadow/SliderThumbElement.cpp:
+        (WebCore::SliderThumbElement::setPositionFromPoint):
+        * inspector/ContentSearchUtils.cpp:
+        * inspector/DOMEditor.cpp:
+        * inspector/DOMPatchSupport.cpp:
+        (WebCore::DOMPatchSupport::diff):
+        * inspector/InjectedScriptHost.cpp:
+        * loader/ProgressTracker.cpp:
+        (WebCore::ProgressTracker::incrementProgress):
+        * loader/cache/CachedImage.cpp:
+        * page/DOMWindow.cpp:
+        (WebCore::DOMWindow::adjustWindowRect):
+        * page/EventHandler.cpp:
+        (WebCore::MaximumDurationTracker::~MaximumDurationTracker):
+        * page/FrameTree.cpp:
+        * page/FrameView.cpp:
+        (WebCore::FrameView::adjustedDeferredRepaintDelay):
+        (WebCore::FrameView::autoSizeIfEnabled):
+        * page/PrintContext.cpp:
+        (WebCore::PrintContext::computeAutomaticScaleFactor):
+        * page/SpatialNavigation.cpp:
+        (WebCore::entryAndExitPointsForDirection):
+        * page/animation/CSSPropertyAnimation.cpp:
+        (WebCore::blendFilterOperations):
+        (WebCore::PropertyWrapperShadow::blendMismatchedShadowLists):
+        * platform/graphics/FloatRect.cpp:
+        (WebCore::FloatRect::FloatRect):
+        (WebCore::FloatRect::intersect):
+        (WebCore::FloatRect::uniteEvenIfEmpty):
+        (WebCore::FloatRect::extend):
+        (WebCore::FloatRect::fitToPoints):
+        * platform/graphics/GlyphPageTreeNode.cpp:
+        (WebCore::GlyphPageTreeNode::initializePage):
+        (WebCore::GlyphPageTreeNode::getChild):
+        * platform/graphics/IntRect.cpp:
+        (WebCore::IntRect::intersect):
+        (WebCore::IntRect::unite):
+        (WebCore::IntRect::uniteIfNonZero):
+        * platform/graphics/LayoutRect.cpp:
+        (WebCore::LayoutRect::intersect):
+        (WebCore::LayoutRect::unite):
+        (WebCore::LayoutRect::uniteIfNonZero):
+        * platform/graphics/filters/FEMorphology.cpp:
+        (WebCore::FEMorphology::platformApplyGeneric):
+        (WebCore::FEMorphology::platformApplySoftware):
+        * platform/mac/MemoryPressureHandlerMac.mm:
+        (WebCore::MemoryPressureHandler::respondToMemoryPressure):
+        * platform/text/TextCodecICU.cpp:
+        * rendering/LineWidth.cpp:
+        (WebCore::LineWidth::fitBelowFloats):
+        (WebCore::LineWidth::computeAvailableWidthFromLeftAndRight):
+        * rendering/RenderBlock.h:
+        (WebCore::RenderBlock::availableLogicalWidthForLine):
+        (WebCore::RenderBlock::availableLogicalWidthForContent):
+        * rendering/RenderFieldset.cpp:
+        (WebCore::RenderFieldset::computePreferredLogicalWidths):
+        (WebCore::RenderFieldset::layoutSpecialExcludedChild):
+        (WebCore::RenderFieldset::paintBoxDecorations):
+        * rendering/RenderFlowThread.cpp:
+        (WebCore::RenderFlowThread::updateLogicalWidth):
+        (WebCore::RenderFlowThread::addForcedRegionBreak):
+        * rendering/RenderFrameBase.cpp:
+        (WebCore::RenderFrameBase::layoutWithFlattening):
+        * rendering/RenderFrameSet.cpp:
+        (WebCore::RenderFrameSet::layOutAxis):
+        * rendering/RenderSlider.cpp:
+        (WebCore::RenderSlider::computePreferredLogicalWidths):
+        * rendering/RenderTableCell.h:
+        * rendering/RenderTreeAsText.cpp:
+        (WebCore::writeLayers):
+        * rendering/RootInlineBox.h:
+        (WebCore::RootInlineBox::selectionHeight):
+        (WebCore::RootInlineBox::selectionHeightAdjustedForPrecedingBlock):
+        * rendering/mathml/RenderMathMLRow.cpp:
+        (WebCore::RenderMathMLRow::layout):
+        * rendering/mathml/RenderMathMLScripts.cpp:
+        (WebCore::RenderMathMLScripts::layout):
+        * rendering/style/RenderStyle.h:
+        * rendering/style/StyleGeneratedImage.cpp:
+        (WebCore::StyleGeneratedImage::imageSize):
+        * style/StyleFontSizeFunctions.cpp:
+        (WebCore::Style::fontSizeForKeyword):
+        * svg/SVGSVGElement.cpp:
+        (WebCore::SVGSVGElement::setCurrentTime):
+
 2013-10-24  Andreas Kling  <akling@apple.com>
 
         Uncomplicate some of SVGTextRunRenderingContext.
index 9bec347..a307cac 100644 (file)
@@ -40,8 +40,6 @@
 #include <wtf/MathExtras.h>
 #include <wtf/StdLibExtras.h>
 
-using namespace std;
-
 namespace WebCore {
 
 const double DefaultGrainDuration = 0.020; // 20ms
@@ -231,7 +229,7 @@ bool AudioBufferSourceNode::renderFromBuffer(AudioBus* bus, unsigned destination
         double loopStartFrame = m_loopStart * buffer()->sampleRate();
         double loopEndFrame = m_loopEnd * buffer()->sampleRate();
 
-        virtualEndFrame = min(loopEndFrame, virtualEndFrame);
+        virtualEndFrame = std::min(loopEndFrame, virtualEndFrame);
         virtualDeltaFrames = virtualEndFrame - loopStartFrame;
     }
 
@@ -261,8 +259,8 @@ bool AudioBufferSourceNode::renderFromBuffer(AudioBus* bus, unsigned destination
         endFrame = static_cast<unsigned>(virtualEndFrame);
         while (framesToProcess > 0) {
             int framesToEnd = endFrame - readIndex;
-            int framesThisTime = min(framesToProcess, framesToEnd);
-            framesThisTime = max(0, framesThisTime);
+            int framesThisTime = std::min(framesToProcess, framesToEnd);
+            framesThisTime = std::max(0, framesThisTime);
 
             for (unsigned i = 0; i < numberOfChannels; ++i) 
                 memcpy(destinationChannels[i] + writeIndex, sourceChannels[i] + readIndex, sizeof(float) * framesThisTime);
@@ -398,8 +396,8 @@ void AudioBufferSourceNode::startGrain(double when, double grainOffset, double g
     // Do sanity checking of grain parameters versus buffer size.
     double bufferDuration = buffer()->duration();
 
-    grainOffset = max(0.0, grainOffset);
-    grainOffset = min(bufferDuration, grainOffset);
+    grainOffset = std::max(0.0, grainOffset);
+    grainOffset = std::min(bufferDuration, grainOffset);
     m_grainOffset = grainOffset;
 
     // Handle default/unspecified duration.
@@ -407,8 +405,8 @@ void AudioBufferSourceNode::startGrain(double when, double grainOffset, double g
     if (!grainDuration)
         grainDuration = maxDuration;
 
-    grainDuration = max(0.0, grainDuration);
-    grainDuration = min(maxDuration, grainDuration);
+    grainDuration = std::max(0.0, grainDuration);
+    grainDuration = std::min(maxDuration, grainDuration);
     m_grainDuration = grainDuration;
 
     m_isGrain = true;
@@ -447,10 +445,10 @@ double AudioBufferSourceNode::totalPitchRate()
     double totalRate = dopplerRate * sampleRateFactor * basePitchRate;
 
     // Sanity check the total rate.  It's very important that the resampler not get any bad rate values.
-    totalRate = max(0.0, totalRate);
+    totalRate = std::max(0.0, totalRate);
     if (!totalRate)
         totalRate = 1; // zero rate is considered illegal
-    totalRate = min(MaxRate, totalRate);
+    totalRate = std::min(MaxRate, totalRate);
     
     bool isTotalRateValid = !std::isnan(totalRate) && !std::isinf(totalRate);
     ASSERT(isTotalRateValid);
index 6a2e5dd..c62333d 100644 (file)
@@ -33,8 +33,6 @@
 #include "AudioNodeOutput.h"
 #include <algorithm>
 
-using namespace std;
 namespace WebCore {
 
 AudioNodeInput::AudioNodeInput(AudioNode* node)
@@ -157,11 +155,11 @@ unsigned AudioNodeInput::numberOfChannels() const
         AudioNodeOutput* output = *i;
         // Use output()->numberOfChannels() instead of output->bus()->numberOfChannels(),
         // because the calling of AudioNodeOutput::bus() is not safe here.
-        maxChannels = max(maxChannels, output->numberOfChannels());
+        maxChannels = std::max(maxChannels, output->numberOfChannels());
     }
 
     if (mode == AudioNode::ClampedMax)
-        maxChannels = min(maxChannels, static_cast<unsigned>(node()->channelCount()));
+        maxChannels = std::min(maxChannels, static_cast<unsigned>(node()->channelCount()));
 
     return maxChannels;
 }
index a63683a..1219e49 100644 (file)
@@ -34,8 +34,6 @@
 #include <algorithm>
 #include <wtf/MathExtras.h>
 
-using namespace std;
-
 namespace WebCore {
 
 void AudioParamTimeline::setValueAtTime(float value, float time)
@@ -189,9 +187,9 @@ float AudioParamTimeline::valuesForTimeRangeImpl(
     // until we reach the first event time.
     double firstEventTime = m_events[0].time();
     if (firstEventTime > startTime) {
-        double fillToTime = min(endTime, firstEventTime);
+        double fillToTime = std::min(endTime, firstEventTime);
         unsigned fillToFrame = AudioUtilities::timeToSampleFrame(fillToTime - startTime, sampleRate);
-        fillToFrame = min(fillToFrame, numberOfValues);
+        fillToFrame = std::min(fillToFrame, numberOfValues);
         for (; writeIndex < fillToFrame; ++writeIndex)
             values[writeIndex] = defaultValue;
 
@@ -222,9 +220,9 @@ float AudioParamTimeline::valuesForTimeRangeImpl(
         float k = deltaTime > 0 ? 1 / deltaTime : 0;
         double sampleFrameTimeIncr = 1 / sampleRate;
 
-        double fillToTime = min(endTime, time2);
+        double fillToTime = std::min(endTime, time2);
         unsigned fillToFrame = AudioUtilities::timeToSampleFrame(fillToTime - startTime, sampleRate);
-        fillToFrame = min(fillToFrame, numberOfValues);
+        fillToFrame = std::min(fillToFrame, numberOfValues);
 
         ParamEvent::Type nextEventType = nextEvent ? static_cast<ParamEvent::Type>(nextEvent->type()) : ParamEvent::LastType /* unknown */;
 
@@ -316,9 +314,9 @@ float AudioParamTimeline::valuesForTimeRangeImpl(
                     // instead of the next event time.
                     unsigned nextEventFillToFrame = fillToFrame;
                     float nextEventFillToTime = fillToTime;
-                    fillToTime = min(endTime, time1 + duration);
+                    fillToTime = std::min(endTime, time1 + duration);
                     fillToFrame = AudioUtilities::timeToSampleFrame(fillToTime - startTime, sampleRate);
-                    fillToFrame = min(fillToFrame, numberOfValues);
+                    fillToFrame = std::min(fillToFrame, numberOfValues);
 
                     // Index into the curve data using a floating-point value.
                     // We're scaling the number of curve points by the duration (see curvePointsPerFrame).
index 0361b8b..67c0359 100644 (file)
@@ -35,8 +35,6 @@
 #include <algorithm>
 #include <wtf/MathExtras.h>
 
-using namespace std;
-
 namespace WebCore {
 
 const double AudioScheduledSourceNode::UnknownTime = -1;
@@ -93,7 +91,7 @@ void AudioScheduledSourceNode::updateSchedulingInfo(size_t quantumFrameSize,
     }
 
     quantumFrameOffset = startFrame > quantumStartFrame ? startFrame - quantumStartFrame : 0;
-    quantumFrameOffset = min(quantumFrameOffset, quantumFrameSize); // clamp to valid range
+    quantumFrameOffset = std::min(quantumFrameOffset, quantumFrameSize); // clamp to valid range
     nonSilentFramesToProcess = quantumFrameSize - quantumFrameOffset;
 
     if (!nonSilentFramesToProcess) {
@@ -159,7 +157,7 @@ void AudioScheduledSourceNode::stop(double when, ExceptionCode& ec)
         return;
     }
     
-    when = max(0.0, when);
+    when = std::max<double>(0, when);
     m_endTime = when;
 }
 
index ad81cad..ed417fa 100644 (file)
@@ -32,8 +32,6 @@
 #include "AudioNodeOutput.h"
 #include <algorithm>
 
-using namespace std;
-
 namespace WebCore {
 
 AudioSummingJunction::AudioSummingJunction(AudioContext* context)
index a3505f1..db704be 100644 (file)
@@ -31,8 +31,6 @@
 #include "AudioUtilities.h"
 #include <algorithm>
 
-using namespace std;
-
 namespace WebCore {
 
 const float SmoothingTimeConstant = 0.020f; // 20ms
@@ -112,8 +110,8 @@ void DelayDSPKernel::process(const float* source, float* destination, size_t fra
         delayTime = delayProcessor() ? delayProcessor()->delayTime()->finalValue() : m_desiredDelayFrames / sampleRate;
 
         // Make sure the delay time is in a valid range.
-        delayTime = min(maxTime, delayTime);
-        delayTime = max(0.0, delayTime);
+        delayTime = std::min(maxTime, delayTime);
+        delayTime = std::max(0.0, delayTime);
 
         if (m_firstTime) {
             m_currentDelayTime = delayTime;
index ff365f6..fd3123a 100644 (file)
@@ -33,8 +33,6 @@
 #include "HRTFDatabaseLoader.h"
 #include <algorithm>
 #include <wtf/MainThread.h>
-
-using namespace std;
  
 namespace WebCore {
     
@@ -133,7 +131,7 @@ void OfflineAudioDestinationNode::offlineRender()
         // Render one render quantum.
         render(0, m_renderBus.get(), renderQuantumSize);
         
-        size_t framesAvailableToCopy = min(framesToProcess, renderQuantumSize);
+        size_t framesAvailableToCopy = std::min(framesToProcess, renderQuantumSize);
         
         for (unsigned channelIndex = 0; channelIndex < numberOfChannels; ++channelIndex) {
             const float* source = m_renderBus->channel(channelIndex)->data();
index e68d8dd..7eb147d 100644 (file)
@@ -37,8 +37,6 @@
 #include <algorithm>
 #include <wtf/MathExtras.h>
 
-using namespace std;
-
 namespace WebCore {
 
 using namespace VectorMath;
index 1715e71..be93869 100644 (file)
@@ -38,8 +38,6 @@
 #include "ScriptExecutionContext.h"
 #include <wtf/MathExtras.h>
 
-using namespace std;
-
 namespace WebCore {
 
 static void fixNANs(double &x)
@@ -353,8 +351,8 @@ float PannerNode::dopplerRate()
             sourceProjection = -sourceProjection;
 
             double scaledSpeedOfSound = speedOfSound / dopplerFactor;
-            listenerProjection = min(listenerProjection, scaledSpeedOfSound);
-            sourceProjection = min(sourceProjection, scaledSpeedOfSound);
+            listenerProjection = std::min(listenerProjection, scaledSpeedOfSound);
+            sourceProjection = std::min(sourceProjection, scaledSpeedOfSound);
 
             dopplerShift = ((speedOfSound - dopplerFactor * listenerProjection) / (speedOfSound - dopplerFactor * sourceProjection));
             fixNANs(dopplerShift); // avoid illegal values
index 4313f0d..e58ad1b 100644 (file)
@@ -35,8 +35,6 @@
 
 const unsigned RenderingQuantum = 128;
 
-using namespace std;
-
 namespace WebCore {
 
 WaveShaperDSPKernel::WaveShaperDSPKernel(WaveShaperProcessor* processor)
@@ -112,10 +110,10 @@ void WaveShaperDSPKernel::processCurve(const float* source, float* destination,
 
         // Clip index to the input range of the curve.
         // This takes care of input outside of nominal range -1 -> +1
-        index1 = max(index1, 0);
-        index1 = min(index1, curveLength - 1);
-        index2 = max(index2, 0);
-        index2 = min(index2, curveLength - 1);
+        index1 = std::max(index1, 0);
+        index1 = std::min(index1, curveLength - 1);
+        index2 = std::max(index2, 0);
+        index2 = std::min(index2, curveLength - 1);
 
         double value1 = curveData[index1];
         double value2 = curveData[index2];
index 21f9dd6..ef375b6 100644 (file)
@@ -50,8 +50,6 @@
 #include <wtf/StdLibExtras.h>
 #include <wtf/text/CString.h>
 
-using namespace std;
-
 namespace WebCore {
 
 static DatabaseTracker* staticTracker = 0;
@@ -141,7 +139,7 @@ bool DatabaseTracker::hasAdequateQuotaForOrigin(SecurityOrigin* origin, unsigned
     unsigned long long usage = usageForOrigin(origin);
 
     // If the database will fit, allow its creation.
-    unsigned long long requirement = usage + max(1UL, estimatedSize);
+    unsigned long long requirement = usage + std::max<unsigned long long>(1, estimatedSize);
     if (requirement < usage) {
         // The estimated size is so big it causes an overflow; don't allow creation.
         err = DatabaseError::DatabaseSizeOverflowed;
index 9a15391..077a6b6 100644 (file)
@@ -64,8 +64,6 @@
 #include <wtf/text/StringBuilder.h>
 #include <wtf/text/WTFString.h>
 
-using namespace std;
-
 namespace WebCore {
 
 const size_t maxReasonSizeInBytes = 123;
@@ -121,8 +119,8 @@ static String joinStrings(const Vector<String>& strings, const char* separator)
 
 static unsigned long saturateAdd(unsigned long a, unsigned long b)
 {
-    if (numeric_limits<unsigned long>::max() - a < b)
-        return numeric_limits<unsigned long>::max();
+    if (std::numeric_limits<unsigned long>::max() - a < b)
+        return std::numeric_limits<unsigned long>::max();
     return a + b;
 }
 
index 649f97e..7164edc 100644 (file)
@@ -66,8 +66,6 @@
 #include <wtf/text/StringHash.h>
 #include <wtf/text/WTFString.h>
 
-using namespace std;
-
 namespace WebCore {
 
 const double TCPMaximumSegmentLifetime = 2 * 60.0;
index a2876ea..16bb458 100644 (file)
@@ -29,8 +29,6 @@
 #include <wtf/CryptographicallyRandomNumber.h>
 #include <wtf/MathExtras.h>
 
-using namespace std;
-
 namespace WebCore {
 
 // Constants for hybi-10 frame format.
@@ -97,7 +95,7 @@ WebSocketFrame::ParseFrameResult WebSocketFrame::parseFrame(char* data, size_t d
 
     static const uint64_t maxPayloadLength = UINT64_C(0x7FFFFFFFFFFFFFFF);
     size_t maskingKeyLength = masked ? maskingKeyWidthInBytes : 0;
-    if (payloadLength64 > maxPayloadLength || payloadLength64 + maskingKeyLength > numeric_limits<size_t>::max()) {
+    if (payloadLength64 > maxPayloadLength || payloadLength64 + maskingKeyLength > std::numeric_limits<size_t>::max()) {
         errorString = "WebSocket frame length too large: " + String::number(payloadLength64) + " bytes";
         return FrameError;
     }
index c5ec9bf..eb744dc 100644 (file)
@@ -36,8 +36,6 @@
 #include "AccessibilityTableRow.h"
 #include "RenderObject.h"
 
-using namespace std;
-
 namespace WebCore {
 
 AccessibilityARIAGrid::AccessibilityARIAGrid(RenderObject* renderer)
index 9c3b167..3f6b442 100644 (file)
@@ -33,8 +33,6 @@
 #include "AccessibilityTable.h"
 #include "AccessibilityTableRow.h"
 
-using namespace std;
-
 namespace WebCore {
     
 AccessibilityARIAGridCell::AccessibilityARIAGridCell(RenderObject* renderer)
index 39edf70..d08d279 100644 (file)
@@ -33,8 +33,6 @@
 #include "AccessibilityTable.h"
 #include "RenderObject.h"
 
-using namespace std;
-
 namespace WebCore {
     
 AccessibilityARIAGridRow::AccessibilityARIAGridRow(RenderObject* renderer)
index 8039cf0..a2406ba 100644 (file)
@@ -33,8 +33,6 @@
 #include "HTMLNames.h"
 #include "RenderObject.h"
 
-using namespace std;
-
 namespace WebCore {
     
 using namespace HTMLNames;
index 0f08687..7a3c971 100644 (file)
@@ -37,8 +37,6 @@
 #include "RenderListBox.h"
 #include "RenderObject.h"
 
-using namespace std;
-
 namespace WebCore {
 
 using namespace HTMLNames;
index 484a20d..d2b243c 100644 (file)
@@ -41,8 +41,6 @@
 #include "RenderListBox.h"
 #include "RenderObject.h"
 
-using namespace std;
-
 namespace WebCore {
 
 using namespace HTMLNames;
index 1b38cbb..f50b4b3 100644 (file)
@@ -82,8 +82,6 @@
 #include <wtf/text/StringBuilder.h>
 #include <wtf/unicode/CharacterNames.h>
 
-using namespace std;
-
 namespace WebCore {
 
 using namespace HTMLNames;
index f8557f0..fa314ad 100644 (file)
@@ -67,8 +67,6 @@
 #include <wtf/text/WTFString.h>
 #include <wtf/unicode/CharacterNames.h>
 
-using namespace std;
-
 namespace WebCore {
 
 using namespace HTMLNames;
index 3ca2a94..5c044a2 100644 (file)
 #include <wtf/text/StringBuilder.h>
 #include <wtf/unicode/CharacterNames.h>
 
-using namespace std;
-
 namespace WebCore {
 
 using namespace HTMLNames;
index 339529f..4c40470 100644 (file)
@@ -382,7 +382,7 @@ void AccessibilityTable::addChildren()
             appendedRows.add(row);
         }
     
-        maxColumnCount = max(tableSection->numColumns(), maxColumnCount);
+        maxColumnCount = std::max(tableSection->numColumns(), maxColumnCount);
         tableSection = table->sectionBelow(tableSection, SkipEmptySections);
     }
     
index 535afed..8a2cd57 100644 (file)
@@ -34,8 +34,6 @@
 #include "RenderObject.h"
 #include "RenderTableCell.h"
 
-using namespace std;
-
 namespace WebCore {
     
 using namespace HTMLNames;
index c479c86..1a55943 100644 (file)
@@ -36,8 +36,6 @@
 #include "RenderTableCell.h"
 #include "RenderTableSection.h"
 
-using namespace std;
-
 namespace WebCore {
     
 using namespace HTMLNames;
index 8a0912d..019f312 100644 (file)
@@ -32,8 +32,6 @@
 #include "AXObjectCache.h"
 #include "AccessibilityTable.h"
 
-using namespace std;
-
 namespace WebCore {
 
 AccessibilityTableHeaderContainer::AccessibilityTableHeaderContainer()
index 44edada..653a062 100644 (file)
@@ -37,8 +37,6 @@
 #include "RenderTableCell.h"
 #include "RenderTableRow.h"
 
-using namespace std;
-
 namespace WebCore {
     
 using namespace HTMLNames;
index d1b8417..1caf4b3 100644 (file)
@@ -75,7 +75,6 @@
 
 using namespace WebCore;
 using namespace HTMLNames;
-using namespace std;
 
 static NSArray *convertMathPairsToNSArray(const AccessibilityObject::AccessibilityMathMultiscriptPairs& pairs, NSString *subscriptKey, NSString *superscriptKey)
 {
index 8e23920..a8a2d19 100644 (file)
@@ -77,7 +77,6 @@
 
 using namespace WebCore;
 using namespace HTMLNames;
-using namespace std;
 
 // Cell Tables
 #ifndef NSAccessibilitySelectedCellsAttribute
@@ -3619,7 +3618,7 @@ static RenderObject* rendererForView(NSView* view)
             if (index >= childCount)
                 return nil;
             
-            NSUInteger arrayLength = min(childCount - index, maxCount);
+            NSUInteger arrayLength = std::min(childCount - index, maxCount);
             return [children subarrayWithRange:NSMakeRange(index, arrayLength)];
         } else if (m_object->isTree()) {
             // Tree objects return their rows as their children. We can use the original method in this case.
@@ -3631,7 +3630,7 @@ static RenderObject* rendererForView(NSView* view)
         if (index >= childCount)
             return nil;
         
-        unsigned available = min(childCount - index, maxCount);
+        unsigned available = std::min(childCount - index, maxCount);
         
         NSMutableArray *subarray = [NSMutableArray arrayWithCapacity:available];
         for (unsigned added = 0; added < available; ++index, ++added) {
index 66488bf..0ab98ce 100644 (file)
@@ -45,7 +45,6 @@
 
 using namespace JSC;
 using namespace WTF;
-using namespace std;
 
 namespace WebCore {
 
@@ -389,7 +388,7 @@ void JSCSSStyleDeclaration::getOwnPropertyNames(JSObject* object, ExecState* exe
         Vector<String, numCSSProperties> jsPropertyNames;
         for (int id = firstCSSProperty; id < firstCSSProperty + numCSSProperties; ++id)
             jsPropertyNames.append(getJSPropertyName(static_cast<CSSPropertyID>(id)));
-        sort(jsPropertyNames.begin(), jsPropertyNames.end(), WTF::codePointCompareLessThan);
+        std::sort(jsPropertyNames.begin(), jsPropertyNames.end(), WTF::codePointCompareLessThan);
 
         propertyIdentifiers = new Identifier[numCSSProperties];
         for (int i = 0; i < numCSSProperties; ++i)
index cb00744..d1a2daa 100644 (file)
@@ -38,7 +38,6 @@
 #include "PositionOptions.h"
 
 using namespace JSC;
-using namespace std;
 
 namespace WebCore {
 
@@ -54,7 +53,7 @@ static void setTimeout(PositionOptions* options, const double& timeout)
     // If the value is positive infinity, there's nothing to do.
     if (!(std::isinf(timeout) && (timeout > 0))) {
         // Wrap to int32 and force non-negative to match behavior of window.setTimeout.
-        options->setTimeout(max(0, static_cast<int>(timeout)));
+        options->setTimeout(std::max<int>(0, timeout));
     }
 }
 
@@ -65,7 +64,7 @@ static void setMaximumAge(PositionOptions* options, const double& maximumAge)
         options->clearMaximumAge();
     } else {
         // Wrap to int32 and force non-negative to match behavior of window.setTimeout.
-        options->setMaximumAge(max(0, static_cast<int>(maximumAge)));
+        options->setMaximumAge(std::max<int>(0, maximumAge));
     }
 }
 
index 41ad408..e6c78c5 100644 (file)
@@ -56,7 +56,6 @@
 #include <wtf/text/TextPosition.h>
 
 using namespace JSC;
-using namespace std;
 
 namespace WebCore {
 
index de4c729..a535c34 100644 (file)
@@ -69,7 +69,6 @@
 #include <wtf/Vector.h>
 
 using namespace JSC;
-using namespace std;
 
 #if CPU(BIG_ENDIAN) || CPU(MIDDLE_ENDIAN) || CPU(NEEDS_ALIGNED_ACCESS)
 #define ASSUME_LITTLE_ENDIAN 0
@@ -312,7 +311,7 @@ template <> void writeLittleEndian<uint8_t>(Vector<uint8_t>& buffer, uint8_t val
 
 template <typename T> static bool writeLittleEndian(Vector<uint8_t>& buffer, const T* values, uint32_t length)
 {
-    if (length > numeric_limits<uint32_t>::max() / sizeof(T))
+    if (length > std::numeric_limits<uint32_t>::max() / sizeof(T))
         return false;
 
 #if ASSUME_LITTLE_ENDIAN
@@ -821,7 +820,7 @@ private:
         }
 
         // Guard against overflow
-        if (str.length() > (numeric_limits<uint32_t>::max() - sizeof(uint32_t)) / sizeof(UChar)) {
+        if (str.length() > (std::numeric_limits<uint32_t>::max() - sizeof(uint32_t)) / sizeof(UChar)) {
             fail();
             return;
         }
@@ -1109,10 +1108,10 @@ public:
                                              const Vector<uint8_t>& buffer)
     {
         if (!buffer.size())
-            return make_pair(jsNull(), UnspecifiedError);
+            return std::make_pair(jsNull(), UnspecifiedError);
         CloneDeserializer deserializer(exec, globalObject, messagePorts, arrayBufferContentsArray, buffer);
         if (!deserializer.isValid())
-            return make_pair(JSValue(), ValidationError);
+            return std::make_pair(JSValue(), ValidationError);
         return deserializer.deserialize();
     }
 
@@ -1283,7 +1282,7 @@ private:
 
     static bool readString(const uint8_t*& ptr, const uint8_t* end, String& str, unsigned length)
     {
-        if (length >= numeric_limits<int32_t>::max() / sizeof(UChar))
+        if (length >= std::numeric_limits<int32_t>::max() / sizeof(UChar))
             return false;
 
         unsigned size = length * sizeof(UChar);
@@ -1748,7 +1747,7 @@ DeserializationResult CloneDeserializer::deserialize()
         objectStartState:
         case ObjectStartState: {
             if (outputObjectStack.size() > maximumFilterRecursion)
-                return make_pair(JSValue(), StackOverflowError);
+                return std::make_pair(JSValue(), StackOverflowError);
             JSObject* outObject = constructEmptyObject(m_exec, m_globalObject->objectPrototype());
             m_gcBuffer.append(outObject);
             outputObjectStack.append(outObject);
@@ -1783,7 +1782,7 @@ DeserializationResult CloneDeserializer::deserialize()
         }
         mapObjectStartState: {
             if (outputObjectStack.size() > maximumFilterRecursion)
-                return make_pair(JSValue(), StackOverflowError);
+                return std::make_pair(JSValue(), StackOverflowError);
             JSMap* map = JSMap::create(m_exec->vm(), m_globalObject->mapStructure());
             m_gcBuffer.append(map);
             outputObjectStack.append(map);
@@ -1793,7 +1792,7 @@ DeserializationResult CloneDeserializer::deserialize()
         }
         setObjectStartState: {
             if (outputObjectStack.size() > maximumFilterRecursion)
-                return make_pair(JSValue(), StackOverflowError);
+                return std::make_pair(JSValue(), StackOverflowError);
             JSSet* set = JSSet::create(m_exec->vm(), m_globalObject->setStructure());
             m_gcBuffer.append(set);
             outputObjectStack.append(set);
@@ -1847,10 +1846,10 @@ DeserializationResult CloneDeserializer::deserialize()
     }
     ASSERT(outValue);
     ASSERT(!m_failed);
-    return make_pair(outValue, SuccessfullyCompleted);
+    return std::make_pair(outValue, SuccessfullyCompleted);
 error:
     fail();
-    return make_pair(JSValue(), ValidationError);
+    return std::make_pair(JSValue(), ValidationError);
 }
 
 
index d1bea04..565ff59 100644 (file)
@@ -2302,7 +2302,7 @@ PassRefPtr<CSSValue> ComputedStyleExtractor::propertyValue(CSSPropertyID propert
         case CSSPropertyOutlineWidth:
             return zoomAdjustedPixelValue(style->outlineWidth(), style.get());
         case CSSPropertyOverflow:
-            return cssValuePool().createValue(max(style->overflowX(), style->overflowY()));
+            return cssValuePool().createValue(std::max(style->overflowX(), style->overflowY()));
         case CSSPropertyOverflowWrap:
             return cssValuePool().createValue(style->overflowWrap());
         case CSSPropertyOverflowX:
index 1a64c7a..211dfa5 100644 (file)
@@ -57,8 +57,6 @@
 #include "SVGNames.h"
 #endif
 
-using namespace std;
-
 namespace WebCore {
 
 static unsigned fontSelectorId;
@@ -550,7 +548,7 @@ CSSSegmentedFontFace* CSSFontSelector::getFontFace(const FontDescription& fontDe
         }
 
         desiredTraitsMaskForComparison = traitsMask;
-        stable_sort(candidateFontFaces.begin(), candidateFontFaces.end(), compareFontFaces);
+        std::stable_sort(candidateFontFaces.begin(), candidateFontFaces.end(), compareFontFaces);
         unsigned numCandidates = candidateFontFaces.size();
         for (unsigned i = 0; i < numCandidates; ++i)
             face->appendFontFace(candidateFontFaces[i]);
index bd382ca..e33de3d 100644 (file)
@@ -39,8 +39,6 @@
 #include <wtf/text/StringBuilder.h>
 #include <wtf/text/WTFString.h>
 
-using namespace std;
-
 namespace WebCore {
 
 PassRefPtr<Image> CSSGradientValue::image(RenderElement* renderer, const IntSize& size)
@@ -1049,10 +1047,10 @@ PassRefPtr<Gradient> CSSRadialGradientValue::createGradient(RenderElement* rende
         // Horizontal
         switch (fill) {
         case ClosestSide: {
-            float xDist = min(secondPoint.x(), size.width() - secondPoint.x());
-            float yDist = min(secondPoint.y(), size.height() - secondPoint.y());
+            float xDist = std::min(secondPoint.x(), size.width() - secondPoint.x());
+            float yDist = std::min(secondPoint.y(), size.height() - secondPoint.y());
             if (shape == Circle) {
-                float smaller = min(xDist, yDist);
+                float smaller = std::min(xDist, yDist);
                 xDist = smaller;
                 yDist = smaller;
             }
@@ -1061,10 +1059,10 @@ PassRefPtr<Gradient> CSSRadialGradientValue::createGradient(RenderElement* rende
             break;
         }
         case FarthestSide: {
-            float xDist = max(secondPoint.x(), size.width() - secondPoint.x());
-            float yDist = max(secondPoint.y(), size.height() - secondPoint.y());
+            float xDist = std::max(secondPoint.x(), size.width() - secondPoint.x());
+            float yDist = std::max(secondPoint.y(), size.height() - secondPoint.y());
             if (shape == Circle) {
-                float larger = max(xDist, yDist);
+                float larger = std::max(xDist, yDist);
                 xDist = larger;
                 yDist = larger;
             }
@@ -1080,8 +1078,8 @@ PassRefPtr<Gradient> CSSRadialGradientValue::createGradient(RenderElement* rende
             else {
                 // If <shape> is ellipse, the gradient-shape has the same ratio of width to height
                 // that it would if closest-side or farthest-side were specified, as appropriate.
-                float xDist = min(secondPoint.x(), size.width() - secondPoint.x());
-                float yDist = min(secondPoint.y(), size.height() - secondPoint.y());
+                float xDist = std::min(secondPoint.x(), size.width() - secondPoint.x());
+                float yDist = std::min(secondPoint.y(), size.height() - secondPoint.y());
 
                 secondRadius = horizontalEllipseRadius(corner - secondPoint, xDist / yDist);
                 aspectRatio = xDist / yDist;
@@ -1097,8 +1095,8 @@ PassRefPtr<Gradient> CSSRadialGradientValue::createGradient(RenderElement* rende
             else {
                 // If <shape> is ellipse, the gradient-shape has the same ratio of width to height
                 // that it would if closest-side or farthest-side were specified, as appropriate.
-                float xDist = max(secondPoint.x(), size.width() - secondPoint.x());
-                float yDist = max(secondPoint.y(), size.height() - secondPoint.y());
+                float xDist = std::max(secondPoint.x(), size.width() - secondPoint.x());
+                float yDist = std::max(secondPoint.y(), size.height() - secondPoint.y());
 
                 secondRadius = horizontalEllipseRadius(corner - secondPoint, xDist / yDist);
                 aspectRatio = xDist / yDist;
index a50f41a..a3c4c21 100644 (file)
@@ -127,7 +127,6 @@ extern int cssyydebug;
 
 extern int cssyyparse(WebCore::CSSParser*);
 
-using namespace std;
 using namespace WTF;
 
 namespace {
@@ -2569,8 +2568,7 @@ bool CSSParser::parseValue(CSSPropertyID propId, bool important)
     case CSSPropertyWebkitOrder:
         if (validUnit(value, FInteger, CSSStrictMode)) {
             // We restrict the smallest value to int min + 2 because we use int min and int min + 1 as special values in a hash set.
-            parsedValue = cssValuePool().createValue(max(static_cast<double>(std::numeric_limits<int>::min() + 2), value->fValue),
-                                                             static_cast<CSSPrimitiveValue::UnitTypes>(value->unit));
+            parsedValue = cssValuePool().createValue(std::max<double>(std::numeric_limits<int>::min() + 2, value->fValue), static_cast<CSSPrimitiveValue::UnitTypes>(value->unit));
             m_valueList->next();
         }
         break;
@@ -6480,7 +6478,7 @@ bool CSSParser::parseColorParameters(CSSParserValue* value, int* colorArray, boo
         const double value = parsedDouble(v, ReleaseParsedCalcValue);
         // Convert the floating pointer number of alpha to an integer in the range [0, 256),
         // with an equal distribution across all 256 values.
-        colorArray[3] = static_cast<int>(max(0.0, min(1.0, value)) * nextafter(256.0, 0.0));
+        colorArray[3] = static_cast<int>(std::max<double>(0, std::min<double>(1, value)) * nextafter(256.0, 0.0));
     }
     return true;
 }
@@ -6506,7 +6504,7 @@ bool CSSParser::parseHSLParameters(CSSParserValue* value, double* colorArray, bo
         v = args->next();
         if (!validUnit(v, FPercent, CSSStrictMode))
             return false;
-        colorArray[i] = max(0.0, min(100.0, parsedDouble(v, ReleaseParsedCalcValue))) / 100.0; // needs to be value between 0 and 1.0
+        colorArray[i] = std::max<double>(0, std::min<double>(100, parsedDouble(v, ReleaseParsedCalcValue))) / 100.0; // needs to be value between 0 and 1.0
     }
     if (parseAlpha) {
         v = args->next();
@@ -6515,7 +6513,7 @@ bool CSSParser::parseHSLParameters(CSSParserValue* value, double* colorArray, bo
         v = args->next();
         if (!validUnit(v, FNumber, CSSStrictMode))
             return false;
-        colorArray[3] = max(0.0, min(1.0, parsedDouble(v, ReleaseParsedCalcValue)));
+        colorArray[3] = std::max<double>(0, std::min<double>(1, parsedDouble(v, ReleaseParsedCalcValue)));
     }
     return true;
 }
index 15ae8fa..8ae83cf 100644 (file)
@@ -29,8 +29,6 @@
 #include "CSSPrimitiveValue.h"
 #include <wtf/text/StringBuilder.h>
 
-using namespace std;
-
 namespace WebCore {
 
 String CSSReflectValue::customCSSText() const
index 7074900..000f473 100644 (file)
@@ -53,8 +53,6 @@
 #include "ShapeValue.h"
 #endif
 
-using namespace std;
-
 namespace WebCore {
 
 enum ExpandValueBehavior {SuppressValue = 0, ExpandValue};
@@ -883,7 +881,7 @@ public:
 
         // Overly large font sizes will cause crashes on some platforms (such as Windows).
         // Cap font size here to make sure that doesn't happen.
-        size = min(maximumAllowedFontSize, size);
+        size = std::min(maximumAllowedFontSize, size);
 
         styleResolver->setFontSize(fontDescription, size);
         styleResolver->setFontDescription(fontDescription);
index 1d802f5..da28a4c 100644 (file)
@@ -31,8 +31,6 @@
 #include "StylePropertySet.h"
 #include "StyledElement.h"
 
-using namespace std;
-
 namespace WebCore {
 
 namespace {
index dfdc74e..9e52e9c 100644 (file)
@@ -32,8 +32,6 @@
 #include "RenderTheme.h"
 #include "SVGPaint.h"
 
-using namespace std;
-
 namespace WebCore {
 
 bool CSSParser::parseSVGValue(CSSPropertyID propId, bool important)
index bea7d40..d06986c 100644 (file)
@@ -45,8 +45,6 @@
 #include <wtf/text/CString.h>
 #endif
 
-using namespace std;
-
 namespace WebCore {
 
 static size_t sizeForImmutableStylePropertySetWithPropertyCount(unsigned count)
@@ -367,9 +365,9 @@ String StylePropertySet::getLayeredShorthandValue(const StylePropertyShorthand&
         values[i] = getPropertyCSSValue(shorthand.properties()[i]);
         if (values[i]) {
             if (values[i]->isBaseValueList())
-                numLayers = max(toCSSValueList(values[i].get())->length(), numLayers);
+                numLayers = std::max(toCSSValueList(values[i].get())->length(), numLayers);
             else
-                numLayers = max<size_t>(1U, numLayers);
+                numLayers = std::max<size_t>(1U, numLayers);
         }
     }
 
index 3c8e781..e7af63f 100644 (file)
 #include "WebVTTElement.h"
 #endif
 
-using namespace std;
-
 namespace WebCore {
 
 using namespace HTMLNames;
@@ -4121,9 +4119,9 @@ int StyleResolver::viewportPercentageValue(CSSPrimitiveValue& unit, int percenta
     if (unit.isViewportPercentageWidth())
         return viewPortWidth;
     if (unit.isViewportPercentageMax())
-        return max(viewPortWidth, viewPortHeight);
+        return std::max(viewPortWidth, viewPortHeight);
     if (unit.isViewportPercentageMin())
-        return min(viewPortWidth, viewPortHeight);
+        return std::min(viewPortWidth, viewPortHeight);
 
     ASSERT_NOT_REACHED();
     return 0;
index a2c763c..710da5e 100644 (file)
@@ -38,8 +38,6 @@
 #include "TextBreakIterator.h"
 #include <wtf/Ref.h>
 
-using namespace std;
-
 namespace WebCore {
 
 void CharacterData::setData(const String& data, ExceptionCode&)
@@ -72,7 +70,7 @@ unsigned CharacterData::parserAppendData(const String& string, unsigned offset,
     ASSERT(lengthLimit >= oldLength);
 
     unsigned characterLength = string.length() - offset;
-    unsigned characterLengthLimit = min(characterLength, lengthLimit - oldLength);
+    unsigned characterLengthLimit = std::min(characterLength, lengthLimit - oldLength);
 
     // Check that we are not on an unbreakable boundary.
     // Some text break iterator implementations work best if the passed buffer is as small as possible,
index c0aead3..3244d82 100644 (file)
@@ -64,8 +64,6 @@
 #include "DeleteButtonController.h"
 #endif
 
-using namespace std;
-
 namespace WebCore {
 
 static void dispatchChildInsertionEvents(Node&);
index da51e33..edc8a25 100644 (file)
 #include "CaptionUserPreferences.h"
 #endif
 
-using namespace std;
 using namespace WTF;
 using namespace Unicode;
 
@@ -2482,7 +2481,7 @@ int Document::minimumLayoutDelay()
     m_overMinimumLayoutThreshold = elapsed > cLayoutScheduleThreshold;
     
     // We'll want to schedule the timer to fire at the minimum layout threshold.
-    return max(0, cLayoutScheduleThreshold - elapsed);
+    return std::max(0, cLayoutScheduleThreshold - elapsed);
 }
 
 int Document::elapsedTime() const
index 50c8237..6e338da 100644 (file)
 #include "InspectorController.h"
 #endif
 
-using namespace std;
-
 namespace WebCore {
 
 using namespace HTMLNames;
@@ -1508,7 +1506,7 @@ unsigned short Node::compareDocumentPosition(Node* otherNode)
         return compareDetachedElementsPosition(this, otherNode);
 
     // Walk the two chains backwards and look for the first difference.
-    for (unsigned i = min(index1, index2); i; --i) {
+    for (unsigned i = std::min(index1, index2); i; --i) {
         Node* child1 = chain1[--index1];
         Node* child2 = chain2[--index2];
         if (child1 != child2) {
index 6aef7ea..7aba175 100644 (file)
@@ -57,7 +57,6 @@
 
 namespace WebCore {
 
-using namespace std;
 using namespace HTMLNames;
 
 DEFINE_DEBUG_ONLY_GLOBAL(WTF::RefCountedLeakCounter, rangeCounter, ("Range"));
@@ -1072,8 +1071,8 @@ String Range::toString(ExceptionCode& ec) const
         if (n->nodeType() == Node::TEXT_NODE || n->nodeType() == Node::CDATA_SECTION_NODE) {
             const String& data = static_cast<CharacterData*>(n)->data();
             int length = data.length();
-            int start = (n == m_start.container()) ? min(max(0, m_start.offset()), length) : 0;
-            int end = (n == m_end.container()) ? min(max(start, m_end.offset()), length) : length;
+            int start = (n == m_start.container()) ? std::min(std::max(0, m_start.offset()), length) : 0;
+            int end = (n == m_end.container()) ? std::min(std::max(start, m_end.offset()), length) : length;
             builder.append(data, start, end - start);
         }
     }
@@ -1614,7 +1613,7 @@ void Range::textRects(Vector<IntRect>& rects, bool useSelectionHeight, RangeInFi
             r->absoluteRects(rects, flooredLayoutPoint(r->localToAbsolute()));
         else if (r->isText()) {
             int startOffset = node == startContainer ? m_start.offset() : 0;
-            int endOffset = node == endContainer ? m_end.offset() : numeric_limits<int>::max();
+            int endOffset = node == endContainer ? m_end.offset() : std::numeric_limits<int>::max();
             rects.appendVector(toRenderText(r)->absoluteRectsForRange(startOffset, endOffset, useSelectionHeight, &isFixed));
         } else
             continue;
@@ -1650,7 +1649,7 @@ void Range::textQuads(Vector<FloatQuad>& quads, bool useSelectionHeight, RangeIn
             r->absoluteQuads(quads, &isFixed);
         else if (r->isText()) {
             int startOffset = node == startContainer ? m_start.offset() : 0;
-            int endOffset = node == endContainer ? m_end.offset() : numeric_limits<int>::max();
+            int endOffset = node == endContainer ? m_end.offset() : std::numeric_limits<int>::max();
             quads.appendVector(toRenderText(r)->absoluteQuadsForRange(startOffset, endOffset, useSelectionHeight, &isFixed));
         } else
             continue;
index 34c81d0..65b95cb 100644 (file)
@@ -40,8 +40,6 @@
 #include <algorithm>
 #include <wtf/CurrentTime.h>
 
-using namespace std;
-
 // Allow a little more than 60fps to make sure we can at least hit that frame rate.
 #define MinimumAnimationInterval 0.015
 #define MinimumThrottledAnimationInterval 10
@@ -202,7 +200,7 @@ void ScriptedAnimationController::scheduleAnimation()
         animationInterval = MinimumThrottledAnimationInterval;
 #endif
 
-    double scheduleDelay = max<double>(animationInterval - (monotonicallyIncreasingTime() - m_lastAnimationFrameTimeMonotonic), 0);
+    double scheduleDelay = std::max<double>(animationInterval - (monotonicallyIncreasingTime() - m_lastAnimationFrameTimeMonotonic), 0);
     m_animationTimer.startOneShot(scheduleDelay);
 #else
     if (FrameView* frameView = m_document->view())
index c5d537a..3868ad2 100644 (file)
@@ -45,8 +45,6 @@
 #include <wtf/HashFunctions.h>
 #include <wtf/text/TextPosition.h>
 
-using namespace std;
-
 namespace WebCore {
 
 COMPILE_ASSERT(sizeof(StyledElement) == sizeof(Element), styledelement_should_remain_same_size_as_element);
@@ -304,7 +302,7 @@ void StyledElement::makePresentationAttributeCacheKey(PresentationAttributeCache
         // FIXME: Background URL may depend on the base URL and can't be shared. Disallow caching.
         if (attribute.name() == backgroundAttr)
             return;
-        result.attributesAndValues.append(make_pair(attribute.localName().impl(), attribute.value()));
+        result.attributesAndValues.append(std::make_pair(attribute.localName().impl(), attribute.value()));
     }
     if (result.attributesAndValues.isEmpty())
         return;
index 12aa48e..22a5dc5 100644 (file)
@@ -41,8 +41,6 @@
 #include <wtf/text/CString.h>
 #include <wtf/text/StringBuilder.h>
 
-using namespace std;
-
 namespace WebCore {
 
 PassRefPtr<Text> Text::create(Document& document, const String& data)
index 591a1e8..8660004 100644 (file)
@@ -38,8 +38,6 @@
 #include "ScriptableDocumentParser.h"
 #include <wtf/text/WTFString.h>
 
-using namespace std;
-
 namespace WebCore {
 
 #if PLATFORM(BLACKBERRY) || PLATFORM(GTK)
@@ -66,7 +64,7 @@ static inline float clampLengthValue(float value)
 
     // Limits as defined in the css-device-adapt spec.
     if (value != ViewportArguments::ValueAuto)
-        return min(float(10000), max(value, float(1)));
+        return std::min<float>(10000, std::max<float>(value, 1));
     return value;
 }
 
@@ -77,7 +75,7 @@ static inline float clampScaleValue(float value)
 
     // Limits as defined in the css-device-adapt spec.
     if (value != ViewportArguments::ValueAuto)
-        return min(float(10), max(value, float(0.1)));
+        return std::min<float>(10, std::max<float>(value, 0.1));
     return value;
 }
 
@@ -150,16 +148,16 @@ ViewportAttributes ViewportArguments::resolve(const FloatSize& initialViewportSi
         }
 
         if (resultMinWidth != ViewportArguments::ValueAuto || resultMaxWidth != ViewportArguments::ValueAuto)
-            resultWidth = compareIgnoringAuto(resultMinWidth, compareIgnoringAuto(resultMaxWidth, deviceSize.width(), min), max);
+            resultWidth = compareIgnoringAuto(resultMinWidth, compareIgnoringAuto(resultMaxWidth, deviceSize.width(), std::min), std::max);
 
         if (resultMinHeight != ViewportArguments::ValueAuto || resultMaxHeight != ViewportArguments::ValueAuto)
-            resultHeight = compareIgnoringAuto(resultMinHeight, compareIgnoringAuto(resultMaxHeight, deviceSize.height(), min), max);
+            resultHeight = compareIgnoringAuto(resultMinHeight, compareIgnoringAuto(resultMaxHeight, deviceSize.height(), std::min), std::max);
 
         if (resultMinZoom != ViewportArguments::ValueAuto && resultMaxZoom != ViewportArguments::ValueAuto)
-            resultMaxZoom = max(resultMinZoom, resultMaxZoom);
+            resultMaxZoom = std::max(resultMinZoom, resultMaxZoom);
 
         if (resultZoom != ViewportArguments::ValueAuto)
-            resultZoom = compareIgnoringAuto(resultMinZoom, compareIgnoringAuto(resultMaxZoom, resultZoom, min), max);
+            resultZoom = compareIgnoringAuto(resultMinZoom, compareIgnoringAuto(resultMaxZoom, resultZoom, std::min), std::max);
 
         if (resultWidth == ViewportArguments::ValueAuto && resultZoom == ViewportArguments::ValueAuto)
             resultWidth = deviceSize.width();
@@ -174,12 +172,12 @@ ViewportAttributes ViewportArguments::resolve(const FloatSize& initialViewportSi
             resultHeight = resultWidth * deviceSize.height() / deviceSize.width();
 
         if (resultZoom != ViewportArguments::ValueAuto || resultMaxZoom != ViewportArguments::ValueAuto) {
-            resultWidth = compareIgnoringAuto(resultWidth, deviceSize.width() / compareIgnoringAuto(resultZoom, resultMaxZoom, min), max);
-            resultHeight = compareIgnoringAuto(resultHeight, deviceSize.height() / compareIgnoringAuto(resultZoom, resultMaxZoom, min), max);
+            resultWidth = compareIgnoringAuto(resultWidth, deviceSize.width() / compareIgnoringAuto(resultZoom, resultMaxZoom, std::min), std::max);
+            resultHeight = compareIgnoringAuto(resultHeight, deviceSize.height() / compareIgnoringAuto(resultZoom, resultMaxZoom, std::min), std::max);
         }
 
-        resultWidth = max<float>(1, resultWidth);
-        resultHeight = max<float>(1, resultHeight);
+        resultWidth = std::max<float>(1, resultWidth);
+        resultHeight = std::max<float>(1, resultHeight);
     }
 
     if (type != ViewportArguments::CSSDeviceAdaptation && type != ViewportArguments::Implicit) {
@@ -201,11 +199,11 @@ ViewportAttributes ViewportArguments::resolve(const FloatSize& initialViewportSi
         result.minimumScale = resultMinZoom;
 
     if (resultMaxZoom == ViewportArguments::ValueAuto) {
-        result.maximumScale = float(5.0);
-        result.minimumScale = min(float(5.0), result.minimumScale);
+        result.maximumScale = 5;
+        result.minimumScale = std::min<float>(5, result.minimumScale);
     } else
         result.maximumScale = resultMaxZoom;
-    result.maximumScale = max(result.minimumScale, result.maximumScale);
+    result.maximumScale = std::max(result.minimumScale, result.maximumScale);
 
     // Resolve initial-scale value.
     result.initialScale = resultZoom;
@@ -215,12 +213,12 @@ ViewportAttributes ViewportArguments::resolve(const FloatSize& initialViewportSi
             result.initialScale = initialViewportSize.width() / resultWidth;
         if (resultHeight != ViewportArguments::ValueAuto) {
             // if 'auto', the initial-scale will be negative here and thus ignored.
-            result.initialScale = max<float>(result.initialScale, initialViewportSize.height() / resultHeight);
+            result.initialScale = std::max<float>(result.initialScale, initialViewportSize.height() / resultHeight);
         }
     }
 
     // Constrain initial-scale value to minimum-scale/maximum-scale range.
-    result.initialScale = min(result.maximumScale, max(result.minimumScale, result.initialScale));
+    result.initialScale = std::min(result.maximumScale, std::max(result.minimumScale, result.initialScale));
 
     // Resolve width value.
     if (resultWidth == ViewportArguments::ValueAuto) {
@@ -238,8 +236,8 @@ ViewportAttributes ViewportArguments::resolve(const FloatSize& initialViewportSi
 
     if (type == ViewportArguments::ViewportMeta) {
         // Extend width and height to fill the visual viewport for the resolved initial-scale.
-        resultWidth = max<float>(resultWidth, initialViewportSize.width() / result.initialScale);
-        resultHeight = max<float>(resultHeight, initialViewportSize.height() / result.initialScale);
+        resultWidth = std::max<float>(resultWidth, initialViewportSize.width() / result.initialScale);
+        resultHeight = std::max<float>(resultHeight, initialViewportSize.height() / result.initialScale);
     }
 
     result.layoutSize.setWidth(resultWidth);
@@ -275,14 +273,14 @@ ViewportAttributes computeViewportAttributes(ViewportArguments args, int desktop
 float computeMinimumScaleFactorForContentContained(const ViewportAttributes& result, const IntSize& visibleViewport, const IntSize& contentsSize)
 {
     FloatSize viewportSize(visibleViewport);
-    return max<float>(result.minimumScale, max(viewportSize.width() / contentsSize.width(), viewportSize.height() / contentsSize.height()));
+    return std::max<float>(result.minimumScale, std::max(viewportSize.width() / contentsSize.width(), viewportSize.height() / contentsSize.height()));
 }
 
 void restrictMinimumScaleFactorToViewportSize(ViewportAttributes& result, IntSize visibleViewport, float devicePixelRatio)
 {
     FloatSize viewportSize = convertToUserSpace(visibleViewport, devicePixelRatio);
 
-    result.minimumScale = max<float>(result.minimumScale, max(viewportSize.width() / result.layoutSize.width(), viewportSize.height() / result.layoutSize.height()));
+    result.minimumScale = std::max<float>(result.minimumScale, std::max(viewportSize.width() / result.layoutSize.width(), viewportSize.height() / result.layoutSize.height()));
 }
 
 void restrictScaleFactorToInitialScaleIfNotUserScalable(ViewportAttributes& result)
index 269222a..230017b 100644 (file)
@@ -52,9 +52,6 @@
 
 namespace WebCore {
 
-using namespace std;
-using namespace WTF;
-
 class AutocorrectionAlternativeDetails : public AlternativeTextDetails {
 public:
     static PassRefPtr<AutocorrectionAlternativeDetails> create(const String& replacementString)
index c8a3554..f618ada 100644 (file)
@@ -403,7 +403,7 @@ void ApplyStyleCommand::applyRelativeFontStyleChange(EditingStyle* style)
 
         RefPtr<MutableStylePropertySet> inlineStyle = copyStyleOrCreateEmpty(element->inlineStyle());
         float currentFontSize = computedFontSize(node);
-        float desiredFontSize = max(MinimumFontSize, startingFontSizes.get(node) + style->fontSizeDelta());
+        float desiredFontSize = std::max(MinimumFontSize, startingFontSizes.get(node) + style->fontSizeDelta());
         RefPtr<CSSValue> value = inlineStyle->getPropertyCSSValue(CSSPropertyFontSize);
         if (value) {
             element->removeInlineStyleProperty(CSSPropertyFontSize);
index 26ab24d..51ce98b 100644 (file)
@@ -72,8 +72,6 @@
 #include "DeleteButtonController.h"
 #endif
 
-using namespace std;
-
 namespace WebCore {
 
 using namespace HTMLNames;
@@ -776,8 +774,8 @@ void CompositeEditCommand::deleteInsignificantText(PassRefPtr<Text> textNode, un
         bool indicesIntersect = start <= gapEnd && end >= gapStart;
         int gapLen = gapEnd - gapStart;
         if (indicesIntersect && gapLen > 0) {
-            gapStart = max(gapStart, start);
-            gapEnd = min(gapEnd, end);
+            gapStart = std::max(gapStart, start);
+            gapEnd = std::min(gapEnd, end);
             if (str.isNull())
                 str = textNode->data().substring(start, end - start);
             // remove text in the gap
index 7b8a5f7..19f5cb0 100644 (file)
@@ -97,7 +97,6 @@
 
 namespace WebCore {
 
-using namespace std;
 using namespace HTMLNames;
 using namespace WTF;
 using namespace Unicode;
@@ -1635,8 +1634,8 @@ void Editor::setComposition(const String& text, const Vector<CompositionUnderlin
             if (baseNode->renderer())
                 baseNode->renderer()->repaint();
 
-            unsigned start = min(baseOffset + selectionStart, extentOffset);
-            unsigned end = min(max(start, baseOffset + selectionEnd), extentOffset);
+            unsigned start = std::min(baseOffset + selectionStart, extentOffset);
+            unsigned end = std::min(std::max(start, baseOffset + selectionEnd), extentOffset);
             RefPtr<Range> selectedRange = Range::create(baseNode->document(), baseNode, start, baseNode, end);
             m_frame.selection().setSelectedRange(selectedRange.get(), DOWNSTREAM, false);
         }
@@ -2543,8 +2542,8 @@ PassRefPtr<Range> Editor::compositionRange() const
     if (!m_compositionNode)
         return 0;
     unsigned length = m_compositionNode->length();
-    unsigned start = min(m_compositionStart, length);
-    unsigned end = min(max(start, m_compositionEnd), length);
+    unsigned start = std::min(m_compositionStart, length);
+    unsigned end = std::min(std::max(start, m_compositionEnd), length);
     if (start >= end)
         return 0;
     return Range::create(m_compositionNode->document(), m_compositionNode.get(), start, m_compositionNode.get(), end);
index 937d67a..0a19276 100644 (file)
@@ -262,7 +262,7 @@ static unsigned verticalScrollDistance(Frame& frame)
     if (!(style->overflowY() == OSCROLL || style->overflowY() == OAUTO || focusedElement->rendererIsEditable()))
         return 0;
     int height = std::min<int>(toRenderBox(renderer)->clientHeight(), frame.view()->visibleHeight());
-    return static_cast<unsigned>(max(max<int>(height * Scrollbar::minFractionToStepWhenPaging(), height - Scrollbar::maxOverlapBetweenPages()), 1));
+    return static_cast<unsigned>(std::max(std::max<int>(height * Scrollbar::minFractionToStepWhenPaging(), height - Scrollbar::maxOverlapBetweenPages()), 1));
 }
 
 static RefPtr<Range> unionDOMRanges(Range* a, Range* b)
index f88a912..d4d89ed 100644 (file)
@@ -58,7 +58,6 @@
 #endif
 
 using namespace WTF::Unicode;
-using namespace std;
 
 namespace WebCore {
 
@@ -512,7 +511,7 @@ bool TextIterator::handleTextNode()
             return false;
         int strLength = str.length();
         int end = (m_node == m_endContainer) ? m_endOffset : INT_MAX;
-        int runEnd = min(strLength, end);
+        int runEnd = std::min(strLength, end);
 
         if (runStart >= runEnd)
             return true;
@@ -595,7 +594,7 @@ void TextIterator::handleTextBox()
     unsigned end = (m_node == m_endContainer) ? static_cast<unsigned>(m_endOffset) : UINT_MAX;
     while (m_textBox) {
         unsigned textBoxStart = m_textBox->start();
-        unsigned runStart = max(textBoxStart, start);
+        unsigned runStart = std::max(textBoxStart, start);
 
         // Check for collapsed space at the start of this run.
         InlineTextBox* firstTextBox = renderer->containsReversedText() ? (m_sortedTextBoxes.isEmpty() ? 0 : m_sortedTextBoxes[0]) : renderer->firstTextBox();
@@ -612,7 +611,7 @@ void TextIterator::handleTextBox()
             return;
         }
         unsigned textBoxEnd = textBoxStart + m_textBox->len();
-        unsigned runEnd = min(textBoxEnd, end);
+        unsigned runEnd = std::min(textBoxEnd, end);
         
         // Determine what the next text box will be, but don't advance yet
         InlineTextBox* nextTextBox = 0;
@@ -1482,7 +1481,7 @@ String CharacterIterator::string(int numChars)
     Vector<UChar> result;
     result.reserveInitialCapacity(numChars);
     while (numChars > 0 && !atEnd()) {
-        int runSize = min(numChars, length());
+        int runSize = std::min(numChars, length());
         result.append(characters(), runSize);
         numChars -= runSize;
         advance(runSize);
@@ -1995,7 +1994,7 @@ inline SearchBuffer::SearchBuffer(const String& target, FindOptions options)
     foldQuoteMarksAndSoftHyphens(m_target);
 
     size_t targetLength = m_target.length();
-    m_buffer.reserveInitialCapacity(max(targetLength * 8, minimumSearchBufferSize));
+    m_buffer.reserveInitialCapacity(std::max(targetLength * 8, minimumSearchBufferSize));
     m_overlap = m_buffer.capacity() / 4;
 
     if ((m_options & AtWordStarts) && targetLength) {
@@ -2065,12 +2064,12 @@ inline size_t SearchBuffer::append(const UChar* characters, size_t length)
         m_atBreak = false;
     } else if (m_buffer.size() == m_buffer.capacity()) {
         memcpy(m_buffer.data(), m_buffer.data() + m_buffer.size() - m_overlap, m_overlap * sizeof(UChar));
-        m_prefixLength -= min(m_prefixLength, m_buffer.size() - m_overlap);
+        m_prefixLength -= std::min(m_prefixLength, m_buffer.size() - m_overlap);
         m_buffer.shrink(m_overlap);
     }
 
     size_t oldLength = m_buffer.size();
-    size_t usableLength = min(m_buffer.capacity() - oldLength, length);
+    size_t usableLength = std::min(m_buffer.capacity() - oldLength, length);
     ASSERT(usableLength);
     m_buffer.append(characters, usableLength);
     foldQuoteMarksAndSoftHyphens(m_buffer.data() + oldLength, usableLength);
@@ -2098,7 +2097,7 @@ inline void SearchBuffer::prependContext(const UChar* characters, size_t length)
         wordBoundaryContextStart = startOfLastWordBoundaryContext(characters, wordBoundaryContextStart);
     }
 
-    size_t usableLength = min(m_buffer.capacity() - m_prefixLength, length - wordBoundaryContextStart);
+    size_t usableLength = std::min(m_buffer.capacity() - m_prefixLength, length - wordBoundaryContextStart);
     m_buffer.insert(0, characters + length - usableLength, usableLength);
     m_prefixLength += usableLength;
 
@@ -2271,10 +2270,10 @@ nextMatch:
             int wordBoundaryContextStart = matchStart;
             U16_BACK_1(m_buffer.data(), 0, wordBoundaryContextStart);
             wordBoundaryContextStart = startOfLastWordBoundaryContext(m_buffer.data(), wordBoundaryContextStart);
-            overlap = min(size - 1, max(overlap, size - wordBoundaryContextStart));
+            overlap = std::min(size - 1, std::max(overlap, size - wordBoundaryContextStart));
         }
         memcpy(m_buffer.data(), m_buffer.data() + size - overlap, overlap * sizeof(UChar));
-        m_prefixLength -= min(m_prefixLength, size - overlap);
+        m_prefixLength -= std::min(m_prefixLength, size - overlap);
         m_buffer.shrink(overlap);
         return 0;
     }
@@ -2291,7 +2290,7 @@ nextMatch:
 
     size_t newSize = size - (matchStart + 1);
     memmove(m_buffer.data(), m_buffer.data() + matchStart + 1, newSize * sizeof(UChar));
-    m_prefixLength -= min<size_t>(m_prefixLength, matchStart + 1);
+    m_prefixLength -= std::min<size_t>(m_prefixLength, matchStart + 1);
     m_buffer.shrink(newSize);
 
     start = size - matchStart;
index af2ea13..5e7fcb6 100644 (file)
@@ -1137,7 +1137,7 @@ VisiblePosition startOfParagraph(const VisiblePosition& c, EditingBoundaryCrossi
                 int i = toRenderText(r)->textLength();
                 int o = offset;
                 if (n == startNode && o < i)
-                    i = max(0, o);
+                    i = std::max(0, o);
                 while (--i >= 0) {
                     if (chars[i] == '\n')
                         return VisiblePosition(Position(toText(n), i + 1), DOWNSTREAM);
index fc7a835..eff4585 100644 (file)
@@ -57,8 +57,6 @@
 #include <wtf/StdLibExtras.h>
 #include <wtf/unicode/CharacterNames.h>
 
-using namespace std;
-
 namespace WebCore {
 
 using namespace HTMLNames;
index 70b54fe..e838a43 100644 (file)
@@ -64,8 +64,6 @@
 #include "DeleteButtonController.h"
 #endif
 
-using namespace std;
-
 namespace WebCore {
 
 using namespace HTMLNames;
index 2447c30..89a67b9 100644 (file)
@@ -50,8 +50,6 @@
 #include <wtf/text/Base64.h>
 #include <wtf/text/StringBuilder.h>
 
-using namespace std;
-
 namespace WebCore {
 
 const int defaultBufferLength = 32768;
@@ -154,7 +152,7 @@ void FileReaderLoader::didReceiveResponse(unsigned long, const ResourceResponse&
     // Check that we can cast to unsigned since we have to do
     // so to call ArrayBuffer's create function.
     // FIXME: Support reading more than the current size limit of ArrayBuffer.
-    if (length > numeric_limits<unsigned>::max()) {
+    if (length > std::numeric_limits<unsigned>::max()) {
         failed(FileError::NOT_READABLE_ERR);
         return;
     }
@@ -186,14 +184,14 @@ void FileReaderLoader::didReceiveData(const char* data, int dataLength)
     unsigned remainingBufferSpace = m_totalBytes - m_bytesLoaded;
     if (length > static_cast<long long>(remainingBufferSpace)) {
         // If the buffer has hit maximum size, it can't be grown any more.
-        if (m_totalBytes >= numeric_limits<unsigned>::max()) {
+        if (m_totalBytes >= std::numeric_limits<unsigned>::max()) {
             failed(FileError::NOT_READABLE_ERR);
             return;
         }
         if (m_variableLength) {
             unsigned long long newLength = m_totalBytes * 2;
-            if (newLength > numeric_limits<unsigned>::max())
-                newLength = numeric_limits<unsigned>::max();
+            if (newLength > std::numeric_limits<unsigned>::max())
+                newLength = std::numeric_limits<unsigned>::max();
             RefPtr<ArrayBuffer> newData =
                 ArrayBuffer::create(static_cast<unsigned>(newLength), 1);
             memcpy(static_cast<char*>(newData->data()), static_cast<char*>(m_rawData->data()), m_bytesLoaded);
index 15f1015..1b4f765 100644 (file)
@@ -36,8 +36,6 @@
 #include "PageCache.h"
 #include "SerializedScriptValue.h"
 
-using namespace std;
-
 namespace WebCore {
 
 static const unsigned DefaultCapacity = 100;
@@ -144,7 +142,7 @@ void BackForwardList::backListWithLimit(int limit, HistoryItemVector& list)
 {
     list.clear();
     if (m_current != NoCurrentItemIndex) {
-        unsigned first = max((int)m_current - limit, 0);
+        unsigned first = std::max((int)m_current - limit, 0);
         for (; first < m_current; ++first)
             list.append(m_entries[first]);
     }
@@ -159,7 +157,7 @@ void BackForwardList::forwardListWithLimit(int limit, HistoryItemVector& list)
         
     unsigned lastEntry = m_entries.size() - 1;
     if (m_current < lastEntry) {
-        int last = min(m_current + limit, lastEntry);
+        int last = std::min(m_current + limit, lastEntry);
         limit = m_current + 1;
         for (; limit <= last; ++limit)
             list.append(m_entries[limit]);
index 3294206..09cf387 100644 (file)
@@ -57,8 +57,6 @@
 #include "DeviceProximityController.h"
 #endif
 
-using namespace std;
-
 namespace WebCore {
 
 #if !defined(NDEBUG)
@@ -373,7 +371,7 @@ bool PageCache::canCache(Page* page) const
 void PageCache::setCapacity(int capacity)
 {
     ASSERT(capacity >= 0);
-    m_capacity = max(capacity, 0);
+    m_capacity = std::max(capacity, 0);
 
     prune();
 }
index 0cad685..843f9f7 100644 (file)
@@ -45,7 +45,6 @@
 namespace WebCore {
 
 using namespace HTMLNames;
-using namespace std;
 
 static const int msecPerMinute = 60 * 1000;
 static const int msecPerSecond = 1000;
index 8f92f3f..23d75b4 100644 (file)
@@ -44,8 +44,6 @@
 #include <wtf/text/WTFString.h>
 #include <wtf/unicode/CharacterNames.h>
 
-using namespace std;
-
 namespace WebCore {
 
 using namespace HTMLNames;
@@ -66,7 +64,7 @@ public:
     {
         if ((m_dest - m_buffer) > m_size - len) {
             // Enlarge buffer
-            int newSize = max(m_size * 2, m_size + len);
+            int newSize = std::max(m_size * 2, m_size + len);
             int oldOffset = m_dest - m_buffer;
             m_buffer = static_cast<UChar*>(fastRealloc(m_buffer, newSize * sizeof(UChar)));
             m_dest = m_buffer + oldOffset;
index db41c5b..ef09dfd 100644 (file)
@@ -33,8 +33,6 @@
 #include "RenderImage.h"
 #include "RenderView.h"
 
-using namespace std;
-
 namespace WebCore {
 
 using namespace HTMLNames;
@@ -158,7 +156,7 @@ Path HTMLAreaElement::getRegion(const LayoutSize& size) const
         case Circle:
             if (m_coordsLen >= 3) {
                 Length radius = m_coords[2];
-                int r = min(minimumValueForLength(radius, width, renderView), minimumValueForLength(radius, height, renderView));
+                int r = std::min(minimumValueForLength(radius, width, renderView), minimumValueForLength(radius, height, renderView));
                 path.addEllipse(FloatRect(minimumValueForLength(m_coords[0], width, renderView) - r, minimumValueForLength(m_coords[1], height, renderView) - r, 2 * r, 2 * r));
             }
             break;
index 69705de..f739582 100644 (file)
@@ -67,9 +67,6 @@ namespace WebCore {
 using namespace HTMLNames;
 using namespace WTF;
 
-using std::min;
-using std::max;
-
 PassRefPtr<HTMLElement> HTMLElement::create(const QualifiedName& tagName, Document& document)
 {
     return adoptRef(new HTMLElement(tagName, document));
@@ -329,7 +326,7 @@ void HTMLElement::parseAttribute(const QualifiedName& name, const AtomicString&
             clearTabIndexExplicitlyIfNeeded();
         else if (parseHTMLInteger(value, tabindex)) {
             // Clamp tabindex to the range of 'short' to match Firefox's behavior.
-            setTabIndexExplicitly(max(static_cast<int>(std::numeric_limits<short>::min()), min(tabindex, static_cast<int>(std::numeric_limits<short>::max()))));
+            setTabIndexExplicitly(std::max(static_cast<int>(std::numeric_limits<short>::min()), std::min(tabindex, static_cast<int>(std::numeric_limits<short>::max()))));
         }
     } else if (name.namespaceURI().isNull()) {
         // FIXME: Can we do this even faster by checking the local name "on" prefix before we do anything with the map?
@@ -1034,7 +1031,7 @@ static RGBA32 parseColorStringWithCrazyLegacyRules(const String& colorString)
     // Split the digits into three components, then search the last 8 digits of each component.
     ASSERT(digitBuffer.size() >= 6);
     size_t componentLength = digitBuffer.size() / 3;
-    size_t componentSearchWindowLength = min<size_t>(componentLength, 8);
+    size_t componentSearchWindowLength = std::min<size_t>(componentLength, 8);
     size_t redIndex = componentLength - componentSearchWindowLength;
     size_t greenIndex = componentLength * 2 - componentSearchWindowLength;
     size_t blueIndex = componentLength * 3 - componentSearchWindowLength;
index 0439ae9..0f576c2 100644 (file)
@@ -45,7 +45,6 @@
 namespace WebCore {
 
 using namespace HTMLNames;
-using namespace std;
 
 HTMLFormControlElement::HTMLFormControlElement(const QualifiedName& tagName, Document& document, HTMLFormElement* form)
     : LabelableElement(tagName, document)
index b17b87e..958903e 100644 (file)
@@ -48,8 +48,6 @@
 #include <limits>
 #include <wtf/Ref.h>
 
-using namespace std;
-
 namespace WebCore {
 
 using namespace HTMLNames;
@@ -311,7 +309,7 @@ void HTMLFormElement::getTextFieldValues(StringPairVector& fieldNamesAndValues)
         HTMLInputElement& input = toHTMLInputElement(element);
         if (!input.isTextField())
             continue;
-        fieldNamesAndValues.append(make_pair(input.name().string(), input.value()));
+        fieldNamesAndValues.append(std::make_pair(input.name().string(), input.value()));
     }
 }
 
index e44780b..7966614 100644 (file)
@@ -37,8 +37,6 @@
 #include "Page.h"
 #include "RenderImage.h"
 
-using namespace std;
-
 namespace WebCore {
 
 using namespace HTMLNames;
index 7256f2e..bc04057 100644 (file)
@@ -81,8 +81,6 @@
 #include "TouchEvent.h"
 #endif
 
-using namespace std;
-
 namespace WebCore {
 
 using namespace HTMLNames;
index 00adc30..4e39b1e 100644 (file)
@@ -32,8 +32,6 @@
 #include "HitTestResult.h"
 #include "IntSize.h"
 
-using namespace std;
-
 namespace WebCore {
 
 using namespace HTMLNames;
index 563ed48..295bd56 100644 (file)
 #include "UserAgentScripts.h"
 #endif
 
-using namespace std;
-
 namespace WebCore {
 
 static void setFlags(unsigned& value, unsigned flags)
@@ -197,7 +195,6 @@ static const char* mediaSourceBlobProtocol = "blob";
 #endif
 
 using namespace HTMLNames;
-using namespace std;
 
 typedef HashMap<Document*, HashSet<HTMLMediaElement*>> DocumentElementSetMap;
 static DocumentElementSetMap& documentToElementSetMap()
@@ -276,9 +273,9 @@ HTMLMediaElement::HTMLMediaElement(const QualifiedName& tagName, Document& docum
     , m_volume(1.0f)
     , m_volumeInitialized(false)
     , m_lastSeekTime(0)
-    , m_previousProgressTime(numeric_limits<double>::max())
+    , m_previousProgressTime(std::numeric_limits<double>::max())
     , m_clockTimeAtLastUpdateEvent(0)
-    , m_lastTimeUpdateEventMovieTime(numeric_limits<double>::max())
+    , m_lastTimeUpdateEventMovieTime(std::numeric_limits<double>::max())
     , m_loadState(WaitingForSource)
 #if ENABLE(PLUGIN_PROXY_FOR_VIDEO)
     , m_proxyWidget(0)
@@ -1224,7 +1221,7 @@ void HTMLMediaElement::updateActiveTextTrackCues(double movieTime)
             double cueEndTime = potentiallySkippedCues[i].high();
 
             // Consider cues that may have been missed since the last seek time.
-            if (cueStartTime > max(m_lastSeekTime, lastTime) && cueEndTime < movieTime)
+            if (cueStartTime > std::max(m_lastSeekTime, lastTime) && cueEndTime < movieTime)
                 missedCues.append(potentiallySkippedCues[i]);
         }
     }
@@ -1520,7 +1517,7 @@ void HTMLMediaElement::textTrackAddCue(TextTrack* track, PassRefPtr<TextTrackCue
 
     // Negative duration cues need be treated in the interval tree as
     // zero-length cues.
-    double endTime = max(cue->startTime(), cue->endTime());
+    double endTime = std::max(cue->startTime(), cue->endTime());
 
     CueInterval interval = m_cueTree.createInterval(cue->startTime(), endTime, cue.get());
     if (!m_cueTree.contains(interval))
@@ -1532,7 +1529,7 @@ void HTMLMediaElement::textTrackRemoveCue(TextTrack*, PassRefPtr<TextTrackCue> c
 {
     // Negative duration cues need to be treated in the interval tree as
     // zero-length cues.
-    double endTime = max(cue->startTime(), cue->endTime());
+    double endTime = std::max(cue->startTime(), cue->endTime());
 
     CueInterval interval = m_cueTree.createInterval(cue->startTime(), endTime, cue.get());
     m_cueTree.remove(interval);
@@ -2103,7 +2100,7 @@ void HTMLMediaElement::progressEventTimerFired(Timer<HTMLMediaElement>*)
 void HTMLMediaElement::rewind(double timeDelta)
 {
     LOG(Media, "HTMLMediaElement::rewind(%f)", timeDelta);
-    setCurrentTime(max(currentTime() - timeDelta, minTimeSeekable()), IGNORE_EXCEPTION);
+    setCurrentTime(std::max(currentTime() - timeDelta, minTimeSeekable()), IGNORE_EXCEPTION);
 }
 
 void HTMLMediaElement::returnToRealtime()
@@ -2170,11 +2167,11 @@ void HTMLMediaElement::seek(double time, ExceptionCode& ec)
 
     // 5 - If the new playback position is later than the end of the media resource, then let it be the end 
     // of the media resource instead.
-    time = min(time, duration());
+    time = std::min(time, duration());
 
     // 6 - If the new playback position is less than the earliest possible position, let it be that position instead.
     double earliestTime = m_player->startTime();
-    time = max(time, earliestTime);
+    time = std::max(time, earliestTime);
 
     // Ask the media engine for the time value in the movie's time scale before comparing with current time. This
     // is necessary because if the seek time is not equal to currentTime but the delta is less than the movie's
@@ -2377,7 +2374,7 @@ double HTMLMediaElement::duration() const
     if (m_player && m_readyState >= HAVE_METADATA)
         return m_player->duration();
 
-    return numeric_limits<double>::quiet_NaN();
+    return std::numeric_limits<double>::quiet_NaN();
 }
 
 bool HTMLMediaElement::paused() const
index eaa76c7..33cc162 100644 (file)
@@ -55,7 +55,6 @@
 #include "Settings.h"
 #include "SpatialNavigation.h"
 
-using namespace std;
 using namespace WTF::Unicode;
 
 namespace WebCore {
@@ -304,7 +303,7 @@ void HTMLSelectElement::parseAttribute(const QualifiedName& name, const AtomicSt
             if (Attribute* sizeAttribute = ensureUniqueElementData().findAttributeByName(sizeAttr))
                 sizeAttribute->setValue(attrSize);
         }
-        size = max(size, 1);
+        size = std::max(size, 1);
 
         // Ensure that we've determined selectedness of the items at least once prior to changing the size.
         if (oldSize != size)
@@ -621,8 +620,8 @@ void HTMLSelectElement::updateListBoxSelection(bool deselectOtherOptions)
     ASSERT(renderer() && (renderer()->isListBox() || m_multiple));
     ASSERT(!listItems().size() || m_activeSelectionAnchorIndex >= 0);
 
-    unsigned start = min(m_activeSelectionAnchorIndex, m_activeSelectionEndIndex);
-    unsigned end = max(m_activeSelectionAnchorIndex, m_activeSelectionEndIndex);
+    unsigned start = std::min(m_activeSelectionAnchorIndex, m_activeSelectionEndIndex);
+    unsigned end = std::max(m_activeSelectionAnchorIndex, m_activeSelectionEndIndex);
 
     const Vector<HTMLElement*>& items = listItems();
     for (unsigned i = 0; i < items.size(); ++i) {
index 92d6956..fa0d24d 100644 (file)
@@ -34,8 +34,6 @@
 #include "HTMLNames.h"
 #include "Logging.h"
 
-using namespace std;
-
 namespace WebCore {
 
 using namespace HTMLNames;
index 03451e8..91fd115 100644 (file)
@@ -32,9 +32,6 @@
 #include "HTMLTableElement.h"
 #include "RenderTableCell.h"
 
-using std::max;
-using std::min;
-
 namespace WebCore {
 
 // Clamp rowspan at 8k to match Firefox.
@@ -55,13 +52,13 @@ PassRefPtr<HTMLTableCellElement> HTMLTableCellElement::create(const QualifiedNam
 int HTMLTableCellElement::colSpan() const
 {
     const AtomicString& colSpanValue = fastGetAttribute(colspanAttr);
-    return max(1, colSpanValue.toInt());
+    return std::max(1, colSpanValue.toInt());
 }
 
 int HTMLTableCellElement::rowSpan() const
 {
     const AtomicString& rowSpanValue = fastGetAttribute(rowspanAttr);
-    return max(1, min(rowSpanValue.toInt(), maxRowspan));
+    return std::max(1, std::min(rowSpanValue.toInt(), maxRowspan));
 }
 
 int HTMLTableCellElement::cellIndex() const
index 97b3b08..45ad774 100644 (file)
@@ -394,7 +394,7 @@ void HTMLTableElement::parseAttribute(const QualifiedName& name, const AtomicStr
             m_rulesAttr = AllRules;
     } else if (name == cellpaddingAttr) {
         if (!value.isEmpty())
-            m_padding = max(0, value.toInt());
+            m_padding = std::max(0, value.toInt());
         else
             m_padding = 1;
     } else if (name == colsAttr) {
index f257b6b..c7770d3 100644 (file)
@@ -51,7 +51,6 @@
 namespace WebCore {
 
 using namespace HTMLNames;
-using namespace std;
 
 HTMLTextFormControlElement::HTMLTextFormControlElement(const QualifiedName& tagName, Document& document, HTMLFormElement* form)
     : HTMLFormControlElementWithState(tagName, document, form)
@@ -171,12 +170,12 @@ void HTMLTextFormControlElement::updatePlaceholderVisibility(bool placeholderVal
 
 void HTMLTextFormControlElement::setSelectionStart(int start)
 {
-    setSelectionRange(start, max(start, selectionEnd()), selectionDirection());
+    setSelectionRange(start, std::max(start, selectionEnd()), selectionDirection());
 }
 
 void HTMLTextFormControlElement::setSelectionEnd(int end)
 {
-    setSelectionRange(min(end, selectionStart()), end, selectionDirection());
+    setSelectionRange(std::min(end, selectionStart()), end, selectionDirection());
 }
 
 void HTMLTextFormControlElement::setSelectionDirection(const String& direction)
@@ -186,7 +185,7 @@ void HTMLTextFormControlElement::setSelectionDirection(const String& direction)
 
 void HTMLTextFormControlElement::select()
 {
-    setSelectionRange(0, numeric_limits<int>::max(), SelectionHasNoDirection);
+    setSelectionRange(0, std::numeric_limits<int>::max(), SelectionHasNoDirection);
 }
 
 String HTMLTextFormControlElement::selectedText() const
@@ -287,8 +286,8 @@ void HTMLTextFormControlElement::setSelectionRange(int start, int end, TextField
     if (!renderer() || !renderer()->isTextControl())
         return;
 
-    end = max(end, 0);
-    start = min(max(start, 0), end);
+    end = std::max(end, 0);
+    start = std::min(std::max(start, 0), end);
 
     if (!hasVisibleTextArea(*renderer(), innerTextElement())) {
         cacheSelection(start, end, direction);
index 2212990..8c9b758 100644 (file)
@@ -34,8 +34,6 @@
 #include "Logging.h"
 #include "RuntimeEnabledFeatures.h"
 
-using namespace std;
-
 namespace WebCore {
 
 using namespace HTMLNames;
index 854c471..e518606 100644 (file)
@@ -46,8 +46,6 @@
 #include "ResourceBuffer.h"
 #include "Settings.h"
 
-using std::min;
-
 namespace WebCore {
 
 using namespace HTMLNames;
@@ -241,7 +239,7 @@ float ImageDocument::scale() const
     float widthScale = (float)windowSize.width() / imageSize.width();
     float heightScale = (float)windowSize.height() / imageSize.height();
 
-    return min(widthScale, heightScale);
+    return std::min(widthScale, heightScale);
 }
 
 void ImageDocument::resizeImageToFit()
index 90078bb..ed3443a 100644 (file)
@@ -82,7 +82,6 @@
 namespace WebCore {
 
 using namespace HTMLNames;
-using namespace std;
 
 typedef OwnPtr<InputType> (*InputTypeFactoryFunction)(HTMLInputElement&);
 typedef HashMap<AtomicString, InputTypeFactoryFunction, CaseFoldingHash> InputTypeFactoryMap;
@@ -223,7 +222,7 @@ void InputType::setValueAsDate(double, ExceptionCode& ec) const
 
 double InputType::valueAsDouble() const
 {
-    return numeric_limits<double>::quiet_NaN();
+    return std::numeric_limits<double>::quiet_NaN();
 }
 
 void InputType::setValueAsDouble(double doubleValue, TextFieldEventBehavior eventBehavior, ExceptionCode& ec) const
index 27d8e3a..246d314 100644 (file)
@@ -37,7 +37,6 @@
 #include <wtf/text/AtomicString.h>
 
 using namespace WebCore;
-using namespace std;
 
 PassRefPtr<MediaController> MediaController::create(ScriptExecutionContext* context)
 {
@@ -138,7 +137,7 @@ double MediaController::duration() const
         double duration = m_mediaElements[index]->duration();
         if (std::isnan(duration))
             continue;
-        maxDuration = max(maxDuration, duration);
+        maxDuration = std::max(maxDuration, duration);
     }
     return maxDuration;
 }
@@ -150,7 +149,7 @@ double MediaController::currentTime() const
 
     if (m_position == MediaPlayer::invalidTime()) {
         // Some clocks may return times outside the range of [0..duration].
-        m_position = max(0.0, min(duration(), m_clock->currentTime()));
+        m_position = std::max<double>(0, std::min(duration(), m_clock->currentTime()));
         m_clearPositionTimer.startOneShot(0);
     }
 
@@ -162,11 +161,11 @@ void MediaController::setCurrentTime(double time, ExceptionCode& code)
     // When the user agent is to seek the media controller to a particular new playback position, 
     // it must follow these steps:
     // If the new playback position is less than zero, then set it to zero.
-    time = max(0.0, time);
+    time = std::max(0.0, time);
     
     // If the new playback position is greater than the media controller duration, then set it 
     // to the media controller duration.
-    time = min(time, duration());
+    time = std::min(time, duration());
     
     // Set the media controller position to the new playback position.
     m_clock->setCurrentTime(time);
@@ -360,7 +359,7 @@ void MediaController::updateReadyState()
         // slaved media elements.
         newReadyState = m_mediaElements.first()->readyState();
         for (size_t index = 1; index < m_mediaElements.size(); ++index)
-            newReadyState = min(newReadyState, m_mediaElements[index]->readyState());
+            newReadyState = std::min(newReadyState, m_mediaElements[index]->readyState());
     }
 
     if (newReadyState == oldReadyState) 
index 6f55dfb..2f302f2 100644 (file)
@@ -49,7 +49,6 @@
 namespace WebCore {
 
 using namespace HTMLNames;
-using namespace std;
 
 static const int numberDefaultStep = 1;
 static const int numberDefaultStepBase = 0;
@@ -125,7 +124,7 @@ double NumberInputType::valueAsDouble() const
 void NumberInputType::setValueAsDouble(double newValue, TextFieldEventBehavior eventBehavior, ExceptionCode& ec) const
 {
     // FIXME: We should use numeric_limits<double>::max for number input type.
-    const double floatMax = numeric_limits<float>::max();
+    const double floatMax = std::numeric_limits<float>::max();
     if (newValue < -floatMax) {
         ec = INVALID_STATE_ERR;
         return;
@@ -140,7 +139,7 @@ void NumberInputType::setValueAsDouble(double newValue, TextFieldEventBehavior e
 void NumberInputType::setValueAsDecimal(const Decimal& newValue, TextFieldEventBehavior eventBehavior, ExceptionCode& ec) const
 {
     // FIXME: We should use numeric_limits<double>::max for number input type.
-    const Decimal floatMax = Decimal::fromDouble(numeric_limits<float>::max());
+    const Decimal floatMax = Decimal::fromDouble(std::numeric_limits<float>::max());
     if (newValue < -floatMax) {
         ec = INVALID_STATE_ERR;
         return;
@@ -168,7 +167,7 @@ StepRange NumberInputType::createStepRange(AnyStepHandling anyStepHandling) cons
     DEFINE_STATIC_LOCAL(const StepRange::StepDescription, stepDescription, (numberDefaultStep, numberDefaultStepBase, numberStepScaleFactor));
     const Decimal stepBase = parseToDecimalForNumberType(element().fastGetAttribute(minAttr), numberDefaultStepBase);
     // FIXME: We should use numeric_limits<double>::max for number input type.
-    const Decimal floatMax = Decimal::fromDouble(numeric_limits<float>::max());
+    const Decimal floatMax = Decimal::fromDouble(std::numeric_limits<float>::max());
     const Decimal minimum = parseToNumber(element().fastGetAttribute(minAttr), -floatMax);
     const Decimal maximum = parseToNumber(element().fastGetAttribute(maxAttr), floatMax);
     const Decimal step = StepRange::parseStep(anyStepHandling, stepDescription, element().fastGetAttribute(stepAttr));
index 80b3b65..99f0b86 100644 (file)
@@ -65,7 +65,6 @@
 namespace WebCore {
 
 using namespace HTMLNames;
-using namespace std;
 
 static const int rangeDefaultMinimum = 0;
 static const int rangeDefaultMaximum = 100;
@@ -207,7 +206,7 @@ void RangeInputType::handleKeydownEvent(KeyboardEvent* event)
     // FIXME: We can't use stepUp() for the step value "any". So, we increase
     // or decrease the value by 1/100 of the value range. Is it reasonable?
     const Decimal step = equalIgnoringCase(element().fastGetAttribute(stepAttr), "any") ? (stepRange.maximum() - stepRange.minimum()) / 100 : stepRange.step();
-    const Decimal bigStep = max((stepRange.maximum() - stepRange.minimum()) / 10, step);
+    const Decimal bigStep = std::max((stepRange.maximum() - stepRange.minimum()) / 10, step);
 
     bool isVertical = false;
     if (element().renderer()) {
index fc8dd76..8296647 100644 (file)
@@ -162,7 +162,7 @@ void SearchInputType::startSearchEventTimer()
 
     // After typing the first key, we wait 0.5 seconds.
     // After the second key, 0.4 seconds, then 0.3, then 0.2 from then on.
-    m_searchEventTimer.startOneShot(max(0.2, 0.6 - 0.1 * length));
+    m_searchEventTimer.startOneShot(std::max(0.2, 0.6 - 0.1 * length));
 }
 
 void SearchInputType::stopSearchEventTimer()
index 4d0042f..bf234ed 100644 (file)
@@ -26,8 +26,6 @@
 #include <wtf/MathExtras.h>
 #include <wtf/text/WTFString.h>
 
-using namespace std;
-
 namespace WebCore {
 
 using namespace HTMLNames;
@@ -83,7 +81,7 @@ Decimal StepRange::alignValueForStep(const Decimal& currentValue, const Decimal&
 
 Decimal StepRange::clampValue(const Decimal& value) const
 {
-    const Decimal inRangeValue = max(m_minimum, min(value, m_maximum));
+    const Decimal inRangeValue = std::max(m_minimum, std::min(value, m_maximum));
     if (!m_hasStep)
         return inRangeValue;
     // Rounds inRangeValue to minimum + N * step.
@@ -120,13 +118,13 @@ Decimal StepRange::parseStep(AnyStepHandling anyStepHandling, const StepDescript
         break;
     case ParsedStepValueShouldBeInteger:
         // For date, month, and week, the parsed value should be an integer for some types.
-        step = max(step.round(), Decimal(1));
+        step = std::max(step.round(), Decimal(1));
         step *= stepDescription.stepScaleFactor;
         break;
     case ScaledStepValueShouldBeInteger:
         // For datetime, datetime-local, time, the result should be an integer.
         step *= stepDescription.stepScaleFactor;
-        step = max(step.round(), Decimal(1));
+        step = std::max(step.round(), Decimal(1));
         break;
     default:
         ASSERT_NOT_REACHED();
index cf8e20f..1093fae 100644 (file)
@@ -31,8 +31,7 @@
 #include "ExceptionCodePlaceholder.h"
 #include <math.h>
 
-using namespace WebCore;
-using namespace std;
+namespace WebCore {
 
 TimeRanges::TimeRanges(double start, double end)
 {
@@ -194,3 +193,5 @@ double TimeRanges::totalDuration() const
         total += fabs(end(n, IGNORE_EXCEPTION) - start(n, IGNORE_EXCEPTION));
     return total;
 }
+
+}
index 7e9c3ea..6719cb5 100644 (file)
@@ -143,7 +143,7 @@ void ValidationMessage::setMessageDOMAndStartTimer(Timer<ValidationMessage>*)
         m_timer.clear();
     else {
         m_timer = adoptPtr(new Timer<ValidationMessage>(this, &ValidationMessage::deleteBubbleTree));
-        m_timer->startOneShot(max(5.0, static_cast<double>(m_message.length()) * magnification / 1000));
+        m_timer->startOneShot(std::max(5.0, static_cast<double>(m_message.length()) * magnification / 1000));
     }
 }
 
@@ -167,7 +167,7 @@ static void adjustBubblePosition(const LayoutRect& hostRect, HTMLElement* bubble
     const int bubbleArrowTopOffset = 32;
     double bubbleX = hostX;
     if (hostRect.width() / 2 < bubbleArrowTopOffset)
-        bubbleX = max(hostX + hostRect.width() / 2 - bubbleArrowTopOffset, 0.0);
+        bubbleX = std::max(hostX + hostRect.width() / 2 - bubbleArrowTopOffset, 0.0);
     bubble->setInlineStyleProperty(CSSPropertyLeft, bubbleX, CSSPrimitiveValue::CSS_PX);
 }
 
index 70c829e..e84aae2 100755 (executable)
@@ -74,8 +74,6 @@
 #include <ApplicationServices/ApplicationServices.h>
 #endif
 
-using namespace std;
-
 namespace WebCore {
 
 using namespace HTMLNames;
@@ -1229,10 +1227,10 @@ static IntSize size(HTMLVideoElement* video)
 
 static inline FloatRect normalizeRect(const FloatRect& rect)
 {
-    return FloatRect(min(rect.x(), rect.maxX()),
-        min(rect.y(), rect.maxY()),
-        max(rect.width(), -rect.width()),
-        max(rect.height(), -rect.height()));
+    return FloatRect(std::min(rect.x(), rect.maxX()),
+        std::min(rect.y(), rect.maxY()),
+        std::max(rect.width(), -rect.width()),
+        std::max(rect.height(), -rect.height()));
 }
 
 void CanvasRenderingContext2D::drawImage(HTMLImageElement* image, float x, float y, ExceptionCode& ec)
index eea7aa4..060d73f 100644 (file)
@@ -1793,14 +1793,14 @@ bool WebGLRenderingContext::validateIndexArrayConservative(GC3Denum type, unsign
         case GraphicsContext3D::UNSIGNED_BYTE: {
             const GC3Dubyte* p = static_cast<const GC3Dubyte*>(buffer->data());
             for (GC3Dsizeiptr i = 0; i < numElements; i++)
-                maxIndex = max(maxIndex, static_cast<int>(p[i]));
+                maxIndex = std::max(maxIndex, static_cast<int>(p[i]));
             break;
         }
         case GraphicsContext3D::UNSIGNED_SHORT: {
             numElements /= sizeof(GC3Dushort);
             const GC3Dushort* p = static_cast<const GC3Dushort*>(buffer->data());
             for (GC3Dsizeiptr i = 0; i < numElements; i++)
-                maxIndex = max(maxIndex, static_cast<int>(p[i]));
+                maxIndex = std::max(maxIndex, static_cast<int>(p[i]));
             break;
         }
         case GraphicsContext3D::UNSIGNED_INT: {
@@ -1809,7 +1809,7 @@ bool WebGLRenderingContext::validateIndexArrayConservative(GC3Denum type, unsign
             numElements /= sizeof(GC3Duint);
             const GC3Duint* p = static_cast<const GC3Duint*>(buffer->data());
             for (GC3Dsizeiptr i = 0; i < numElements; i++)
-                maxIndex = max(maxIndex, static_cast<int>(p[i]));
+                maxIndex = std::max(maxIndex, static_cast<int>(p[i]));
             break;
         }
         default:
@@ -5329,13 +5329,13 @@ bool WebGLRenderingContext::validateCompressedTexFuncData(const char* functionNa
     case Extensions3D::COMPRESSED_RGB_PVRTC_4BPPV1_IMG:
     case Extensions3D::COMPRESSED_RGBA_PVRTC_4BPPV1_IMG:
         {
-            bytesRequired = max(width, 8) * max(height, 8) / 2;
+            bytesRequired = std::max(width, 8) * std::max(height, 8) / 2;
         }
         break;
     case Extensions3D::COMPRESSED_RGB_PVRTC_2BPPV1_IMG:
     case Extensions3D::COMPRESSED_RGBA_PVRTC_2BPPV1_IMG:
         {
-            bytesRequired = max(width, 8) * max(height, 8) / 4;
+            bytesRequired = std::max(width, 8) * std::max(height, 8) / 4;
         }
         break;
     default:
index 9f021cb..206ce0e 100644 (file)
@@ -631,7 +631,7 @@ PassRefPtr<MediaControlRewindButtonElement> MediaControlRewindButtonElement::cre
 void MediaControlRewindButtonElement::defaultEventHandler(Event* event)
 {
     if (event->type() == eventNames().clickEvent) {
-        mediaController()->setCurrentTime(max(0.0, mediaController()->currentTime() - 30), IGNORE_EXCEPTION);
+        mediaController()->setCurrentTime(std::max<double>(0, mediaController()->currentTime() - 30), IGNORE_EXCEPTION);
         event->setDefaultHandled();
     }
     HTMLInputElement::defaultEventHandler(event);
index 1e4879e..b087fba 100644 (file)
@@ -45,8 +45,6 @@
 #include "TextTrackCue.h"
 #endif
 
-using namespace std;
-
 namespace WebCore {
 
 MediaControlsApple::MediaControlsApple(Document& document)
index bdcd9a8..89f0123 100644 (file)
@@ -46,8 +46,6 @@
 #include "ShadowRoot.h"
 #include "StepRange.h"
 
-using namespace std;
-
 namespace WebCore {
 
 using namespace HTMLNames;
@@ -272,7 +270,7 @@ void SliderThumbElement::setPositionFromPoint(const LayoutPoint& absolutePoint)
         position -= isLeftToRightDirection ? renderBox()->marginLeft() : renderBox()->marginRight();
     }
 
-    position = max<LayoutUnit>(0, min(position, trackLength));
+    position = std::max<LayoutUnit>(0, std::min(position, trackLength));
     const Decimal ratio = Decimal::fromDouble(static_cast<double>(position) / trackLength);
     const Decimal fraction = isVertical || !isLeftToRightDirection ? Decimal(1) - ratio : ratio;
     StepRange stepRange(input->createStepRange(RejectAny));
index 5457e5d..03a805f 100644 (file)
@@ -39,8 +39,6 @@
 #include <wtf/StdLibExtras.h>
 #include <yarr/Yarr.h>
 
-using namespace std;
-
 namespace WebCore {
 namespace ContentSearchUtils {
 
index 51aa8e4..45b289f 100644 (file)
 #include "InspectorHistory.h"
 #include "Node.h"
 #include "Text.h"
-
 #include "markup.h"
-
 #include <wtf/RefPtr.h>
 
-using namespace std;
-
 namespace WebCore {
 
 class DOMEditor::RemoveChildAction : public InspectorHistory::Action {
index 4479d8a..d2c674a 100644 (file)
@@ -54,8 +54,6 @@
 #include <wtf/text/Base64.h>
 #include <wtf/text/CString.h>
 
-using namespace std;
-
 namespace WebCore {
 
 using HTMLNames::bodyTag;
@@ -267,8 +265,8 @@ DOMPatchSupport::diff(const Vector<OwnPtr<Digest>>& oldList, const Vector<OwnPtr
         if (oldIt == oldTable.end() || oldIt->value.size() != 1)
             continue;
 
-        newMap[newIt->value[0]] = make_pair(newList[newIt->value[0]].get(), oldIt->value[0]);
-        oldMap[oldIt->value[0]] = make_pair(oldList[oldIt->value[0]].get(), newIt->value[0]);
+        newMap[newIt->value[0]] = std::make_pair(newList[newIt->value[0]].get(), oldIt->value[0]);
+        oldMap[oldIt->value[0]] = std::make_pair(oldList[oldIt->value[0]].get(), newIt->value[0]);
     }
 
     for (size_t i = 0; newList.size() > 0 && i < newList.size() - 1; ++i) {
@@ -277,8 +275,8 @@ DOMPatchSupport::diff(const Vector<OwnPtr<Digest>>& oldList, const Vector<OwnPtr
 
         size_t j = newMap[i].second + 1;
         if (j < oldMap.size() && !oldMap[j].first && newList[i + 1]->m_sha1 == oldList[j]->m_sha1) {
-            newMap[i + 1] = make_pair(newList[i + 1].get(), j);
-            oldMap[j] = make_pair(oldList[j].get(), i + 1);
+            newMap[i + 1] = std::make_pair(newList[i + 1].get(), j);
+            oldMap[j] = std::make_pair(oldList[j].get(), i + 1);
         }
     }
 
@@ -288,8 +286,8 @@ DOMPatchSupport::diff(const Vector<OwnPtr<Digest>>& oldList, const Vector<OwnPtr
 
         size_t j = newMap[i].second - 1;
         if (!oldMap[j].first && newList[i - 1]->m_sha1 == oldList[j]->m_sha1) {
-            newMap[i - 1] = make_pair(newList[i - 1].get(), j);
-            oldMap[j] = make_pair(oldList[j].get(), i - 1);
+            newMap[i - 1] = std::make_pair(newList[i - 1].get(), j);
+            oldMap[j] = std::make_pair(oldList[j].get(), i - 1);
         }
     }
 
index 1e42dc3..2502694 100644 (file)
@@ -60,8 +60,6 @@
 #include <wtf/RefPtr.h>
 #include <wtf/StdLibExtras.h>
 
-using namespace std;
-
 namespace WebCore {
 
 PassRefPtr<InjectedScriptHost> InjectedScriptHost::create()
index 8d1ce1a..6c9b35c 100644 (file)
@@ -37,8 +37,6 @@
 #include <wtf/text/CString.h>
 #include <wtf/CurrentTime.h>
 
-using std::min;
-
 namespace WebCore {
 
 // Always start progress at initialProgressValue. This helps provide feedback as 
@@ -231,7 +229,7 @@ void ProgressTracker::incrementProgress(unsigned long identifier, const char*, i
     double maxProgressValue = useClampedMaxProgress ? 0.5 : finalProgressValue;
     increment = (maxProgressValue - m_progressValue) * percentOfRemainingBytes;
     m_progressValue += increment;
-    m_progressValue = min(m_progressValue, maxProgressValue);
+    m_progressValue = std::min(m_progressValue, maxProgressValue);
     ASSERT(m_progressValue >= initialProgressValue);
     
     m_totalBytesReceived += bytesReceived;
index 319cb7e..1b13cf3 100644 (file)
@@ -56,8 +56,6 @@
 #include "DiskImageCacheIOS.h"
 #endif
 
-using std::max;
-
 namespace WebCore {
 
 CachedImage::CachedImage(const ResourceRequest& resourceRequest)
index 8c7d0da..064d2a4 100644 (file)
 #include "RequestAnimationFrameCallback.h"
 #endif
 
-using std::min;
-using std::max;
-
 namespace WebCore {
 
 class PostMessageTimer : public TimerBase {
@@ -324,12 +321,12 @@ FloatRect DOMWindow::adjustWindowRect(Page* page, const FloatRect& pendingChange
         window.setHeight(pendingChanges.height());
 
     FloatSize minimumSize = page->chrome().client().minimumWindowSize();
-    window.setWidth(min(max(minimumSize.width(), window.width()), screen.width()));
-    window.setHeight(min(max(minimumSize.height(), window.height()), screen.height()));
+    window.setWidth(std::min(std::max(minimumSize.width(), window.width()), screen.width()));
+    window.setHeight(std::min(std::max(minimumSize.height(), window.height()), screen.height()));
 
     // Constrain the window position within the valid screen area.
-    window.setX(max(screen.x(), min(window.x(), screen.maxX() - window.width())));
-    window.setY(max(screen.y(), min(window.y(), screen.maxY() - window.height())));
+    window.setX(std::max(screen.x(), std::min(window.x(), screen.maxX() - window.width())));
+    window.setY(std::max(screen.y(), std::min(window.y(), screen.maxY() - window.height())));
 
     return window;
 }
index aa9c8f3..1bc732b 100644 (file)
@@ -182,7 +182,7 @@ public:
 
     ~MaximumDurationTracker()
     {
-        *m_maxDuration = max(*m_maxDuration, monotonicallyIncreasingTime() - m_start);
+        *m_maxDuration = std::max(*m_maxDuration, monotonicallyIncreasingTime() - m_start);
     }
 
 private:
index 025d32e..cee126d 100644 (file)
@@ -33,8 +33,6 @@
 #include <wtf/text/CString.h>
 #include <wtf/text/StringBuilder.h>
 
-using std::swap;
-
 namespace WebCore {
 
 FrameTree::~FrameTree()
index 6e783ac..81b8411 100644 (file)
@@ -2288,7 +2288,7 @@ double FrameView::adjustedDeferredRepaintDelay() const
     if (!m_deferredRepaintDelay)
         return 0;
     double timeSinceLastPaint = monotonicallyIncreasingTime() - m_lastPaintTime;
-    return max(0., m_deferredRepaintDelay - timeSinceLastPaint);
+    return std::max<double>(0, m_deferredRepaintDelay - timeSinceLastPaint);
 }
     
 void FrameView::deferredRepaintTimerFired(Timer<FrameView>*)
@@ -2904,7 +2904,7 @@ void FrameView::autoSizeIfEnabled()
     m_autoSizeContentSize = contentsSize();
 
     if (m_autoSizeFixedMinimumHeight) {
-        resize(m_autoSizeContentSize.width(), max(m_autoSizeFixedMinimumHeight, m_autoSizeContentSize.height()));
+        resize(m_autoSizeContentSize.width(), std::max(m_autoSizeFixedMinimumHeight, m_autoSizeContentSize.height()));
         document->updateLayoutIgnorePendingStylesheets();
     }
 
index ebc8180..14c78a0 100644 (file)
@@ -188,7 +188,7 @@ float PrintContext::computeAutomaticScaleFactor(const FloatSize& availablePaperS
 
     float maxShrinkToFitScaleFactor = 1 / printingMaximumShrinkFactor;
     float shrinkToFitScaleFactor = (useViewWidth ? availablePaperSize.width() : availablePaperSize.height()) / viewLogicalWidth;
-    return max(maxShrinkToFitScaleFactor, shrinkToFitScaleFactor);
+    return std::max(maxShrinkToFitScaleFactor, shrinkToFitScaleFactor);
 }
 
 void PrintContext::spoolPage(GraphicsContext& ctx, int pageNumber, float width)
index 1a268f4..93f5ffb 100644 (file)
@@ -574,7 +574,7 @@ void entryAndExitPointsForDirection(FocusDirection direction, const LayoutRect&
             exitPoint.setY(startingRect.maxY());
             entryPoint.setY(potentialRect.y());
         } else {
-            exitPoint.setY(max(startingRect.y(), potentialRect.y()));
+            exitPoint.setY(std::max(startingRect.y(), potentialRect.y()));
             entryPoint.setY(exitPoint.y());
         }
         break;
@@ -587,7 +587,7 @@ void entryAndExitPointsForDirection(FocusDirection direction, const LayoutRect&
             exitPoint.setX(startingRect.maxX());
             entryPoint.setX(potentialRect.x());
         } else {
-            exitPoint.setX(max(startingRect.x(), potentialRect.x()));
+            exitPoint.setX(std::max(startingRect.x(), potentialRect.x()));
             entryPoint.setX(exitPoint.x());
         }
         break;
index 7ad05d5..f9a1aa4 100644 (file)
@@ -176,7 +176,7 @@ static inline FilterOperations blendFilterOperations(const AnimationBase* anim,
     FilterOperations result;
     size_t fromSize = from.operations().size();
     size_t toSize = to.operations().size();
-    size_t size = max(fromSize, toSize);
+    size_t size = std::max(fromSize, toSize);
     for (size_t i = 0; i < size; i++) {
         RefPtr<FilterOperation> fromOp = (i < fromSize) ? from.operations()[i].get() : 0;
         RefPtr<FilterOperation> toOp = (i < toSize) ? to.operations()[i].get() : 0;
@@ -699,7 +699,7 @@ private:
 
         OwnPtr<ShadowData> newShadowData;
 
-        int maxLength = max(fromLength, toLength);
+        int maxLength = std::max(fromLength, toLength);
         for (int i = 0; i < maxLength; ++i) {
             const ShadowData* fromShadow = i < fromLength ? fromShadows[i] : 0;
             const ShadowData* toShadow = i < toLength ? toShadows[i] : 0;
index 009e133..1a77090 100755 (executable)
@@ -881,7 +881,7 @@ void RenderThemeEfl::adjustMenuListButtonStyle(StyleResolver* styleResolver, Ren
 
     // Calculate min-height of the <select> element.
     int minHeight = style->fontMetrics().height();
-    minHeight = max(minHeight, dropDownBoxMinHeight);
+    minHeight = std::max(minHeight, dropDownBoxMinHeight);
     style->setMinHeight(Length(minHeight, Fixed));
 
     adjustMenuListStyle(styleResolver, style, element);
index ad4c2eb..2fae4e7 100644 (file)
 #include <wtf/MathExtras.h>
 #include <wtf/PrintStream.h>
 
-using std::max;
-using std::min;
-
 namespace WebCore {
 
-FloatRect::FloatRect(const IntRect& r) : m_location(r.location()), m_size(r.size())
+FloatRect::FloatRect(const IntRect& r)
+    : m_location(r.location())
+    , m_size(r.size())
 {
 }
 
@@ -78,10 +77,10 @@ bool FloatRect::contains(const FloatPoint& point, ContainsMode containsMode) con
 
 void FloatRect::intersect(const FloatRect& other)
 {
-    float l = max(x(), other.x());
-    float t = max(y(), other.y());
-    float r = min(maxX(), other.maxX());
-    float b = min(maxY(), other.maxY());
+    float l = std::max(x(), other.x());
+    float t = std::max(y(), other.y());
+    float r = std::min(maxX(), other.maxX());
+    float b = std::min(maxY(), other.maxY());
 
     // Return a clean empty rectangle for non-intersecting cases.
     if (l >= r || t >= b) {
@@ -109,10 +108,10 @@ void FloatRect::unite(const FloatRect& other)
 
 void FloatRect::uniteEvenIfEmpty(const FloatRect& other)
 {
-    float minX = min(x(), other.x());
-    float minY = min(y(), other.y());
-    float maxX = max(this->maxX(), other.maxX());
-    float maxY = max(this->maxY(), other.maxY());
+    float minX = std::min(x(), other.x());
+    float minY = std::min(y(), other.y());
+    float maxX = std::max(this->maxX(), other.maxX());
+    float maxY = std::max(this->maxY(), other.maxY());
 
     setLocationAndSizeFromEdges(minX, minY, maxX, maxY);
 }
@@ -132,10 +131,10 @@ void FloatRect::uniteIfNonZero(const FloatRect& other)
 
 void FloatRect::extend(const FloatPoint& p)
 {
-    float minX = min(x(), p.x());
-    float minY = min(y(), p.y());
-    float maxX = max(this->maxX(), p.x());
-    float maxY = max(this->maxY(), p.y());
+    float minX = std::min(x(), p.x());
+    float minY = std::min(y(), p.y());
+    float maxX = std::max(this->maxX(), p.x());
+    float maxY = std::max(this->maxY(), p.y());
 
     setLocationAndSizeFromEdges(minX, minY, maxX, maxY);
 }
@@ -161,10 +160,10 @@ FloatRect unionRect(const Vector<FloatRect>& rects)
 
 void FloatRect::fitToPoints(const FloatPoint& p0, const FloatPoint& p1)
 {
-    float left = min(p0.x(), p1.x());
-    float top = min(p0.y(), p1.y());
-    float right = max(p0.x(), p1.x());
-    float bottom = max(p0.y(), p1.y());
+    float left = std::min(p0.x(), p1.x());
+    float top = std::min(p0.y(), p1.y());
+    float right = std::max(p0.x(), p1.x());
+    float bottom = std::max(p0.y(), p1.y());
 
     setLocationAndSizeFromEdges(left, top, right, bottom);
 }
@@ -175,25 +174,25 @@ namespace {
 template <typename T>
 T min3(const T& v1, const T& v2, const T& v3)
 {
-    return min(min(v1, v2), v3);
+    return std::min(std::min(v1, v2), v3);
 }
 
 template <typename T>
 T max3(const T& v1, const T& v2, const T& v3)
 {
-    return max(max(v1, v2), v3);
+    return std::max(std::max(v1, v2), v3);
 }
 
 template <typename T>
 T min4(const T& v1, const T& v2, const T& v3, const T& v4)
 {
-    return min(min(v1, v2), min(v3, v4));
+    return std::min(std::min(v1, v2), std::min(v3, v4));
 }
 
 template <typename T>
 T max4(const T& v1, const T& v2, const T& v3, const T& v4)
 {
-    return max(max(v1, v2), max(v3, v4));
+    return std::max(std::max(v1, v2), std::max(v3, v4));
 }
 
 } // anonymous namespace
index a36f33b..6454e73 100644 (file)
@@ -43,9 +43,6 @@
 
 namespace WebCore {
 
-using std::max;
-using std::min;
-
 HashMap<int, GlyphPageTreeNode*>* GlyphPageTreeNode::roots = 0;
 GlyphPageTreeNode* GlyphPageTreeNode::pageZeroRoot = 0;
 
@@ -229,8 +226,8 @@ void GlyphPageTreeNode::initializePage(const FontData* fontData, unsigned pageNu
                     const FontDataRange& range = segmentedFontData->rangeAt(i);
                     // all this casting is to ensure all the parameters to min and max have the same type,
                     // to avoid ambiguous template parameter errors on Windows
-                    int from = max(0, static_cast<int>(range.from()) - static_cast<int>(start));
-                    int to = 1 + min(static_cast<int>(range.to()) - static_cast<int>(start), static_cast<int>(GlyphPage::size) - 1);
+                    int from = std::max(0, static_cast<int>(range.from()) - static_cast<int>(start));
+                    int to = 1 + std::min(static_cast<int>(range.to()) - static_cast<int>(start), static_cast<int>(GlyphPage::size) - 1);
                     if (from < static_cast<int>(GlyphPage::size) && to > 0) {
                         if (haveGlyphs && !scratchPage) {
                             scratchPage = GlyphPage::createForMixedFontData(this);
@@ -339,7 +336,7 @@ GlyphPageTreeNode* GlyphPageTreeNode::getChild(const FontData* fontData, unsigne
 #endif
     if (fontData) {
         m_children.set(fontData, adoptPtr(child));
-        fontData->setMaxGlyphPageTreeLevel(max(fontData->maxGlyphPageTreeLevel(), child->m_level));
+        fontData->setMaxGlyphPageTreeLevel(std::max(fontData->maxGlyphPageTreeLevel(), child->m_level));
     } else {
         m_systemFallbackChild = adoptPtr(child);
         child->m_isSystemFallback = true;
index cda0ec3..0e8ff97 100644 (file)
@@ -31,9 +31,6 @@
 #include <algorithm>
 #include <wtf/PrintStream.h>
 
-using std::max;
-using std::min;
-
 namespace WebCore {
 
 IntRect::IntRect(const FloatRect& r)
@@ -64,10 +61,10 @@ bool IntRect::contains(const IntRect& other) const
 
 void IntRect::intersect(const IntRect& other)
 {
-    int l = max(x(), other.x());
-    int t = max(y(), other.y());
-    int r = min(maxX(), other.maxX());
-    int b = min(maxY(), other.maxY());
+    int l = std::max(x(), other.x());
+    int t = std::max(y(), other.y());
+    int r = std::min(maxX(), other.maxX());
+    int b = std::min(maxY(), other.maxY());
 
     // Return a clean empty rectangle for non-intersecting cases.
     if (l >= r || t >= b) {
@@ -93,10 +90,10 @@ void IntRect::unite(const IntRect& other)
         return;
     }
 
-    int l = min(x(), other.x());
-    int t = min(y(), other.y());
-    int r = max(maxX(), other.maxX());
-    int b = max(maxY(), other.maxY());
+    int l = std::min(x(), other.x());
+    int t = std::min(y(), other.y());
+    int r = std::max(maxX(), other.maxX());
+    int b = std::max(maxY(), other.maxY());
 
     m_location.setX(l);
     m_location.setY(t);
@@ -114,10 +111,10 @@ void IntRect::uniteIfNonZero(const IntRect& other)
         return;
     }
 
-    int left = min(x(), other.x());
-    int top = min(y(), other.y());
-    int right = max(maxX(), other.maxX());
-    int bottom = max(maxY(), other.maxY());
+    int left = std::min(x(), other.x());
+    int top = std::min(y(), other.y());
+    int right = std::max(maxX(), other.maxX());
+    int bottom = std::max(maxY(), other.maxY());
 
     m_location.setX(left);
     m_location.setY(top);
index 1a5b989..dce0e12 100644 (file)
@@ -33,9 +33,6 @@
 
 #include <algorithm>
 
-using std::max;
-using std::min;
-
 namespace WebCore {
 
 LayoutRect::LayoutRect(const FloatRect& r)
@@ -60,8 +57,8 @@ bool LayoutRect::contains(const LayoutRect& other) const
 
 void LayoutRect::intersect(const LayoutRect& other)
 {
-    LayoutPoint newLocation(max(x(), other.x()), max(y(), other.y()));
-    LayoutPoint newMaxPoint(min(maxX(), other.maxX()), min(maxY(), other.maxY()));
+    LayoutPoint newLocation(std::max(x(), other.x()), std::max(y(), other.y()));
+    LayoutPoint newMaxPoint(std::min(maxX(), other.maxX()), std::min(maxY(), other.maxY()));
 
     // Return a clean empty rectangle for non-intersecting cases.
     if (newLocation.x() >= newMaxPoint.x() || newLocation.y() >= newMaxPoint.y()) {
@@ -83,8 +80,8 @@ void LayoutRect::unite(const LayoutRect& other)
         return;
     }
 
-    LayoutPoint newLocation(min(x(), other.x()), min(y(), other.y()));
-    LayoutPoint newMaxPoint(max(maxX(), other.maxX()), max(maxY(), other.maxY()));
+    LayoutPoint newLocation(std::min(x(), other.x()), std::min(y(), other.y()));
+    LayoutPoint newMaxPoint(std::max(maxX(), other.maxX()), std::max(maxY(), other.maxY()));
 
     m_location = newLocation;
     m_size = newMaxPoint - newLocation;
@@ -100,8 +97,8 @@ void LayoutRect::uniteIfNonZero(const LayoutRect& other)
         return;
     }
 
-    LayoutPoint newLocation(min(x(), other.x()), min(y(), other.y()));
-    LayoutPoint newMaxPoint(max(maxX(), other.maxX()), max(maxY(), other.maxY()));
+    LayoutPoint newLocation(std::min(x(), other.x()), std::min(y(), other.y()));
+    LayoutPoint newMaxPoint(std::max(maxX(), other.maxX()), std::max(maxY(), other.maxY()));
 
     m_location = newLocation;
     m_size = newMaxPoint - newLocation;
index 6b028ee..2d39e69 100644 (file)
@@ -34,9 +34,6 @@
 #include <wtf/ParallelJobs.h>
 #include <wtf/Vector.h>
 
-using std::min;
-using std::max;
-
 namespace WebCore {
 
 FEMorphology::FEMorphology(Filter* filter, MorphologyOperatorType type, float radiusX, float radiusY)
@@ -116,8 +113,8 @@ void FEMorphology::platformApplyGeneric(PaintingData* paintingData, int yStart,
 
     Vector<unsigned char> extrema;
     for (int y = yStart; y < yEnd; ++y) {
-        int extremaStartY = max(0, y - radiusY);
-        int extremaEndY = min(height - 1, y + radiusY);
+        int extremaStartY = std::max(0, y - radiusY);
+        int extremaEndY = std::min(height - 1, y + radiusY);
         for (unsigned int clrChannel = 0; clrChannel < 4; ++clrChannel) {
             extrema.clear();
             // Compute extremas for each columns
@@ -136,7 +133,7 @@ void FEMorphology::platformApplyGeneric(PaintingData* paintingData, int yStart,
 
             // Kernel is filled, get extrema of next column
             for (int x = 0; x < width; ++x) {
-                const int endX = min(x + radiusX, width - 1);
+                const int endX = std::min(x + radiusX, width - 1);
                 unsigned char columnExtrema = srcPixelArray->item(extremaStartY * effectWidth + endX * 4 + clrChannel);
                 for (int i = extremaStartY + 1; i <= extremaEndY; ++i) {
                     unsigned char pixel = srcPixelArray->item(i * effectWidth + endX * 4 + clrChannel);
@@ -222,8 +219,8 @@ void FEMorphology::platformApplySoftware()
     paintingData.dstPixelArray = dstPixelArray;
     paintingData.width = effectDrawingRect.width();
     paintingData.height = effectDrawingRect.height();
-    paintingData.radiusX = min(effectDrawingRect.width() - 1, radiusX);
-    paintingData.radiusY = min(effectDrawingRect.height() - 1, radiusY);
+    paintingData.radiusX = std::min(effectDrawingRect.width() - 1, radiusX);
+    paintingData.radiusY = std::min(effectDrawingRect.height() - 1, radiusY);
 
     platformApply(&paintingData);
 }
index c722fa6..75231f6 100644 (file)
@@ -677,7 +677,7 @@ IntRect RenderThemeGtk::calculateProgressRect(RenderObject* renderObject, const
     double animationProgress = renderProgress->animationProgress();
 
     // Never let the progress rect shrink smaller than 2 pixels.
-    int newWidth = max(2, progressRect.width() / progressActivityBlocks);
+    int newWidth = std::max(2, progressRect.width() / progressActivityBlocks);
     int movableWidth = progressRect.width() - newWidth;
     progressRect.setWidth(newWidth);
 
index 993fe44..832c2d2 100644 (file)
@@ -579,7 +579,7 @@ void RenderThemeGtk::adjustInnerSpinButtonStyle(StyleResolver*, RenderStyle* sty
 
     // Force an odd arrow size here. GTK+ 3.x forces even in this case, but
     // Nodoka-based themes look incorrect with an even arrow size.
-    int width = max(PANGO_PIXELS(fontSize), minSpinButtonArrowSize);
+    int width = std::max(PANGO_PIXELS(fontSize), minSpinButtonArrowSize);
     width += -((width % 2) - 1) + gtkStyle->xthickness;
 
     style->setWidth(Length(width, Fixed));
index 2eca390..2528773 100644 (file)
@@ -509,8 +509,8 @@ bool RenderThemeGtk::paintMenuList(RenderObject* renderObject, const PaintInfo&
                                     NULL);
         innerRect.move(childDisplacementX, childDisplacementY);
     }
-    innerRect.setWidth(max(1, innerRect.width()));
-    innerRect.setHeight(max(1, innerRect.height()));
+    innerRect.setWidth(std::max(1, innerRect.width()));
+    innerRect.setHeight(std::max(1, innerRect.height()));
 
     gtk_style_context_restore(buttonStyleContext);
 
@@ -768,7 +768,7 @@ static gint spinButtonArrowSize(GtkStyleContext* context)
     PangoFontDescription* fontDescription;
     gtk_style_context_get(context, static_cast<GtkStateFlags>(0), "font", &fontDescription, NULL);
     gint fontSize = pango_font_description_get_size(fontDescription);
-    gint arrowSize = max(PANGO_PIXELS(fontSize), minSpinButtonArrowSize);
+    gint arrowSize = std::max(PANGO_PIXELS(fontSize), minSpinButtonArrowSize);
     pango_font_description_free(fontDescription);
 
     return arrowSize - arrowSize % 2; // Force even.
index 76964fa..e6e96db 100644 (file)
@@ -44,8 +44,6 @@
 #import <notify.h>
 #endif
 
-using std::max;
-
 namespace WebCore {
 
 #if !PLATFORM(IOS)
@@ -140,7 +138,7 @@ void MemoryPressureHandler::respondToMemoryPressure()
 
     unsigned holdOffTime = (monotonicallyIncreasingTime() - startTime) * s_holdOffMultiplier;
 
-    holdOff(max(holdOffTime, s_minimumHoldOffTime));
+    holdOff(std::max(holdOffTime, s_minimumHoldOffTime));
 }
 #endif // !PLATFORM(IOS)
 
index 86d4ea1..b4bb390 100644 (file)
@@ -40,8 +40,6 @@
 #include <wtf/text/StringBuilder.h>
 #include <wtf/unicode/CharacterNames.h>
 
-using std::min;
-
 namespace WebCore {
 
 const size_t ConversionBufferSize = 16384;
index 4c56fac..1dd9413 100644 (file)
@@ -332,7 +332,7 @@ void PopupMenuWin::calculatePositionAndSize(const IntRect& r, FrameView* v)
     int itemCount = client()->listSize();
     m_itemHeight = client()->menuStyle().font().fontMetrics().height() + optionSpacingMiddle;
     int naturalHeight = m_itemHeight * itemCount;
-    int popupHeight = min(maxPopupHeight, naturalHeight);
+    int popupHeight = std::min(maxPopupHeight, naturalHeight);
     // The popup should show an integral number of items (i.e. no partial items should be visible)
     popupHeight -= popupHeight % m_itemHeight;
     
@@ -351,7 +351,7 @@ void PopupMenuWin::calculatePositionAndSize(const IntRect& r, FrameView* v)
             itemFont.update(m_popupClient->fontSelector());
         }
 
-        popupWidth = max(popupWidth, static_cast<int>(ceilf(itemFont.width(TextRun(text.characters(), text.length())))));
+        popupWidth = std::max(popupWidth, static_cast<int>(ceilf(itemFont.width(TextRun(text.characters(), text.length())))));
     }
 
     if (naturalHeight > maxPopupHeight)
@@ -359,14 +359,14 @@ void PopupMenuWin::calculatePositionAndSize(const IntRect& r, FrameView* v)
         popupWidth += ScrollbarTheme::theme()->scrollbarThickness(SmallScrollbar);
 
     // Add padding to align the popup text with the <select> text
-    popupWidth += max<int>(0, client()->clientPaddingRight() - client()->clientInsetRight()) + max<int>(0, client()->clientPaddingLeft() - client()->clientInsetLeft());
+    popupWidth += std::max<int>(0, client()->clientPaddingRight() - client()->clientInsetRight()) + std::max<int>(0, client()->clientPaddingLeft() - client()->clientInsetLeft());
 
     // Leave room for the border
     popupWidth += 2 * popupWindowBorderWidth;
     popupHeight += 2 * popupWindowBorderWidth;
 
     // The popup should be at least as wide as the control on the page
-    popupWidth = max(rScreenCoords.width() - client()->clientInsetLeft() - client()->clientInsetRight(), popupWidth);
+    popupWidth = std::max(rScreenCoords.width() - client()->clientInsetLeft() - client()->clientInsetRight(), popupWidth);
 
     // Always left-align items in the popup.  This matches popup menus on the mac.
     int popupX = rScreenCoords.x() + client()->clientInsetLeft();
@@ -665,12 +665,12 @@ void PopupMenuWin::paint(const IntRect& damageRect, HDC hdc)
         if (itemStyle.isVisible()) {
             int textX = 0;
             if (client()->menuStyle().textDirection() == LTR) {
-                textX = max<int>(0, client()->clientPaddingLeft() - client()->clientInsetLeft());
+                textX = std::max<int>(0, client()->clientPaddingLeft() - client()->clientInsetLeft());
                 if (RenderTheme::defaultTheme()->popupOptionSupportsTextIndent())
                     textX += minimumIntValueForLength(itemStyle.textIndent(), itemRect.width());
             } else {
                 textX = itemRect.width() - client()->menuStyle().font().width(textRun);
-                textX = min<int>(textX, textX - client()->clientPaddingRight() + client()->clientInsetRight());
+                textX = std::min<int>(textX, textX - client()->clientPaddingRight() + client()->clientInsetRight());
                 if (RenderTheme::defaultTheme()->popupOptionSupportsTextIndent())
                     textX -= minimumIntValueForLength(itemStyle.textIndent(), itemRect.width());
             }
@@ -837,7 +837,7 @@ LRESULT PopupMenuWin::wndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lPa
 
             int visibleItems = this->visibleItems();
             scrollbar()->setEnabled(visibleItems < client()->listSize());
-            scrollbar()->setSteps(1, max(1, visibleItems - 1));
+            scrollbar()->setSteps(1, std::max(1, visibleItems - 1));
             scrollbar()->setProportion(visibleItems, client()->listSize());
 
             break;
index 798752c..2830bb5 100644 (file)
@@ -187,7 +187,7 @@ void LineWidth::fitBelowFloats()
 
         newLineLeft = m_block.logicalLeftOffsetForLine(floatLogicalBottom, shouldIndentText());
         newLineRight = m_block.logicalRightOffsetForLine(floatLogicalBottom, shouldIndentText());
-        newLineWidth = max(0.0f, newLineRight - newLineLeft);
+        newLineWidth = std::max(0.0f, newLineRight - newLineLeft);
         lastFloatLogicalBottom = floatLogicalBottom;
 
 #if ENABLE(CSS_SHAPES)
@@ -229,7 +229,7 @@ void LineWidth::updateCurrentShapeSegment()
 
 void LineWidth::computeAvailableWidthFromLeftAndRight()
 {
-    m_availableWidth = max(0.0f, m_right - m_left) + m_overhangWidth;
+    m_availableWidth = std::max<float>(0, m_right - m_left) + m_overhangWidth;
 }
 
 bool LineWidth::fitsOnLineExcludingTrailingCollapsedWhitespace() const
index bb36347..2e1f947 100644 (file)
@@ -157,7 +157,7 @@ public:
     // compute the region all over again when you already know it.
     LayoutUnit availableLogicalWidthForLine(LayoutUnit position, bool shouldIndentText, RenderRegion* region, LayoutUnit logicalHeight = 0) const
     {
-        return max<LayoutUnit>(0, logicalRightOffsetForLine(position, shouldIndentText, region, logicalHeight)
+        return std::max<LayoutUnit>(0, logicalRightOffsetForLine(position, shouldIndentText, region, logicalHeight)
             - logicalLeftOffsetForLine(position, shouldIndentText, region, logicalHeight));
     }
     LayoutUnit logicalRightOffsetForLine(LayoutUnit position, bool shouldIndentText, RenderRegion* region, LayoutUnit logicalHeight = 0) const 
@@ -333,7 +333,7 @@ public:
     LayoutUnit logicalRightOffsetForContent(RenderRegion*) const;
     LayoutUnit availableLogicalWidthForContent(RenderRegion* region) const
     { 
-        return max<LayoutUnit>(0, logicalRightOffsetForContent(region) - logicalLeftOffsetForContent(region)); }
+        return std::max<LayoutUnit>(0, logicalRightOffsetForContent(region) - logicalLeftOffsetForContent(region)); }
     LayoutUnit startOffsetForContent(RenderRegion* region) const
     {
         return style()->isLeftToRightDirection() ? logicalLeftOffsetForContent(region) : logicalWidth() - logicalRightOffsetForContent(region);
index 952d75e..2091581 100644 (file)
@@ -30,9 +30,6 @@
 #include "HTMLNames.h"
 #include "PaintInfo.h"
 
-using std::min;
-using std::max;
-
 namespace WebCore {
 
 using namespace HTMLNames;
@@ -57,7 +54,7 @@ void RenderFieldset::computePreferredLogicalWidths()
         if (legendMarginRight.isFixed())
             legendMinWidth += legendMarginRight.value();
 
-        m_minPreferredLogicalWidth = max(m_minPreferredLogicalWidth, legendMinWidth + borderAndPaddingWidth());
+        m_minPreferredLogicalWidth = std::max(m_minPreferredLogicalWidth, legendMinWidth + borderAndPaddingWidth());
     }
 }
 
@@ -117,7 +114,7 @@ RenderObject* RenderFieldset::layoutSpecialExcludedChild(bool relayoutChildren)
         // on the legend's margins as we want to still follow the author's cues.
         // Firefox completely ignores the margins in this case which seems wrong.
         legendLogicalTop = (fieldsetBorderBefore - legendLogicalHeight) / 2;
-        collapsedLegendExtent = max<LayoutUnit>(fieldsetBorderBefore, legendLogicalTop + legendLogicalHeight + marginAfterForChild(legend));
+        collapsedLegendExtent = std::max<LayoutUnit>(fieldsetBorderBefore, legendLogicalTop + legendLogicalHeight + marginAfterForChild(legend));
     } else
         collapsedLegendExtent = legendLogicalHeight + marginAfterForChild(legend);
 
@@ -179,11 +176,11 @@ void RenderFieldset::paintBoxDecorations(PaintInfo& paintInfo, const LayoutPoint
     // https://bugs.webkit.org/show_bug.cgi?id=47236
     if (style()->isHorizontalWritingMode()) {
         LayoutUnit clipTop = paintRect.y();
-        LayoutUnit clipHeight = max(static_cast<LayoutUnit>(style()->borderTopWidth()), legend->height() - ((legend->height() - borderTop()) / 2));
+        LayoutUnit clipHeight = std::max(static_cast<LayoutUnit>(style()->borderTopWidth()), legend->height() - ((legend->height() - borderTop()) / 2));
         graphicsContext->clipOut(pixelSnappedIntRect(paintRect.x() + legend->x(), clipTop, legend->width(), clipHeight));
     } else {
         LayoutUnit clipLeft = paintRect.x();
-        LayoutUnit clipWidth = max(static_cast<LayoutUnit>(style()->borderLeftWidth()), legend->width());
+        LayoutUnit clipWidth = std::max(static_cast<LayoutUnit>(style()->borderLeftWidth()), legend->width());
         graphicsContext->clipOut(pixelSnappedIntRect(clipLeft, paintRect.y() + legend->y(), clipWidth, legend->height()));
     }
 
index a98dc93..ec8d83d 100644 (file)
@@ -368,7 +368,7 @@ void RenderFlowThread::updateLogicalWidth()
     for (RenderRegionList::iterator iter = m_regionList.begin(); iter != m_regionList.end(); ++iter) {
         RenderRegion* region = *iter;
         ASSERT(!region->needsLayout() || region->isRenderRegionSet());
-        logicalWidth = max(region->pageLogicalWidth(), logicalWidth);
+        logicalWidth = std::max(region->pageLogicalWidth(), logicalWidth);
     }
     setLogicalWidth(logicalWidth);
 
@@ -1132,7 +1132,7 @@ bool RenderFlowThread::addForcedRegionBreak(const RenderBlock* block, LayoutUnit
         updateRegionsFlowThreadPortionRect();
 
     if (offsetBreakAdjustment)
-        *offsetBreakAdjustment = max<LayoutUnit>(0, currentRegionOffsetInFlowThread - offsetBreakInFlowThread);
+        *offsetBreakAdjustment = std::max<LayoutUnit>(0, currentRegionOffsetInFlowThread - offsetBreakInFlowThread);
 
     return hasComputedAutoHeight;
 }
index 81c3007..f505d3e 100644 (file)
@@ -80,7 +80,7 @@ void RenderFrameBase::layoutWithFlattening(bool hasFixedWidth, bool hasFixedHeig
 
     // make sure minimum preferred width is enforced
     if (isScrollable || !hasFixedWidth) {
-        setWidth(max(width(), childRoot->minPreferredLogicalWidth() + hBorder));
+        setWidth(std::max(width(), childRoot->minPreferredLogicalWidth() + hBorder));
         // update again to pass the new width to the child frame
         updateWidgetPosition();
         childFrameView->layout();
@@ -88,9 +88,9 @@ void RenderFrameBase::layoutWithFlattening(bool hasFixedWidth, bool hasFixedHeig
 
     // expand the frame by setting frame height = content height
     if (isScrollable || !hasFixedHeight || childRoot->isFrameSet())
-        setHeight(max<LayoutUnit>(height(), childFrameView->contentsHeight() + vBorder));
+        setHeight(std::max<LayoutUnit>(height(), childFrameView->contentsHeight() + vBorder));
     if (isScrollable || !hasFixedWidth || childRoot->isFrameSet())
-        setWidth(max<LayoutUnit>(width(), childFrameView->contentsWidth() + hBorder));
+        setWidth(std::max<LayoutUnit>(width(), childFrameView->contentsWidth() + hBorder));
 
     updateWidgetPosition();
 
index 2e5db0c..075e310 100644 (file)
@@ -173,7 +173,7 @@ void RenderFrameSet::GridAxis::resize(int size)
 
 void RenderFrameSet::layOutAxis(GridAxis& axis, const Length* grid, int availableLen)
 {
-    availableLen = max(availableLen, 0);
+    availableLen = std::max(availableLen, 0);
 
     int* gridLayout = axis.m_sizes.data();
 
@@ -198,7 +198,7 @@ void RenderFrameSet::layOutAxis(GridAxis& axis, const Length* grid, int availabl
         // Count the total length of all of the fixed columns/rows -> totalFixed
         // Count the number of columns/rows which are fixed -> countFixed
         if (grid[i].isFixed()) {
-            gridLayout[i] = max(grid[i].intValue(), 0);
+            gridLayout[i] = std::max(grid[i].intValue(), 0);
             totalFixed += gridLayout[i];
             countFixed++;
         }
@@ -206,7 +206,7 @@ void RenderFrameSet::layOutAxis(GridAxis& axis, const Length* grid, int availabl
         // Count the total percentage of all of the percentage columns/rows -> totalPercent
         // Count the number of columns/rows which are percentages -> countPercent
         if (grid[i].isPercent()) {
-            gridLayout[i] = max(intValueForLength(grid[i], availableLen), 0);
+            gridLayout[i] = std::max(intValueForLength(grid[i], availableLen), 0);
             totalPercent += gridLayout[i];
             countPercent++;
         }
@@ -214,7 +214,7 @@ void RenderFrameSet::layOutAxis(GridAxis& axis, const Length* grid, int availabl
         // Count the total relative of all the relative columns/rows -> totalRelative
         // Count the number of columns/rows which are relative -> countRelative
         if (grid[i].isRelative()) {
-            totalRelative += max(grid[i].intValue(), 1);
+            totalRelative += std::max(grid[i].intValue(), 1);
             countRelative++;
         }            
     }
@@ -259,7 +259,7 @@ void RenderFrameSet::layOutAxis(GridAxis& axis, const Length* grid, int availabl
 
         for (int i = 0; i < gridLen; ++i) {
             if (grid[i].isRelative()) {
-                gridLayout[i] = (max(grid[i].intValue(), 1) * remainingRelative) / totalRelative;
+                gridLayout[i] = (std::max(grid[i].intValue(), 1) * remainingRelative) / totalRelative;
                 remainingLen -= gridLayout[i];
                 lastRelative = i;
             }
index 1d94850..b50588e 100644 (file)
@@ -43,8 +43,6 @@
 #include <wtf/MathExtras.h>
 #include <wtf/StackStats.h>
 
-using std::min;
-
 namespace WebCore {
 
 const int RenderSlider::defaultTrackLength = 129;
@@ -94,13 +92,13 @@ void RenderSlider::computePreferredLogicalWidths()
         computeIntrinsicLogicalWidths(m_minPreferredLogicalWidth, m_maxPreferredLogicalWidth);
 
     if (style()->minWidth().isFixed() && style()->minWidth().value() > 0) {
-        m_maxPreferredLogicalWidth = max(m_maxPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(style()->minWidth().value()));
-        m_minPreferredLogicalWidth = max(m_minPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(style()->minWidth().value()));
+        m_maxPreferredLogicalWidth = std::max(m_maxPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(style()->minWidth().value()));
+        m_minPreferredLogicalWidth = std::max(m_minPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(style()->minWidth().value()));
     }
 
     if (style()->maxWidth().isFixed()) {
-        m_maxPreferredLogicalWidth = min(m_maxPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(style()->maxWidth().value()));
-        m_minPreferredLogicalWidth = min(m_minPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(style()->maxWidth().value()));
+        m_maxPreferredLogicalWidth = std::min(m_maxPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(style()->maxWidth().value()));
+        m_minPreferredLogicalWidth = std::min(m_minPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(style()->maxWidth().value()));
     }
 
     LayoutUnit toAdd = borderAndPaddingWidth();
index 01116b2..5ea249e 100644 (file)
@@ -104,7 +104,7 @@ public:
         // Call computedCSSPadding* directly to avoid including implicitPadding.
         if (!document().inQuirksMode() && style()->boxSizing() != BORDER_BOX)
             styleLogicalHeight += (computedCSSPaddingBefore() + computedCSSPaddingAfter()).floor() + borderBefore() + borderAfter();
-        return max(styleLogicalHeight, adjustedLogicalHeight);
+        return std::max(styleLogicalHeight, adjustedLogicalHeight);
     }
 
 
index 38588a5..393f579 100644 (file)
@@ -764,8 +764,8 @@ static void writeLayers(TextStream& ts, const RenderLayer* rootLayer, RenderLaye
     // FIXME: Apply overflow to the root layer to not break every test.  Complete hack.  Sigh.
     LayoutRect paintDirtyRect(paintRect);
     if (rootLayer == l) {
-        paintDirtyRect.setWidth(max<LayoutUnit>(paintDirtyRect.width(), rootLayer->renderBox()->layoutOverflowRect().maxX()));
-        paintDirtyRect.setHeight(max<LayoutUnit>(paintDirtyRect.height(), rootLayer->renderBox()->layoutOverflowRect().maxY()));
+        paintDirtyRect.setWidth(std::max<LayoutUnit>(paintDirtyRect.width(), rootLayer->renderBox()->layoutOverflowRect().maxX()));
+        paintDirtyRect.setHeight(std::max<LayoutUnit>(paintDirtyRect.height(), rootLayer->renderBox()->layoutOverflowRect().maxY()));
         l->setSize(l->size().expandedTo(pixelSnappedIntSize(maxLayoutOverflow(l->renderBox()), LayoutPoint(0, 0))));
     }
     
index a9bb5b1..f9caafe 100644 (file)
@@ -71,10 +71,10 @@ public:
 
     LayoutUnit selectionTop() const;
     LayoutUnit selectionBottom() const;
-    LayoutUnit selectionHeight() const { return max<LayoutUnit>(0, selectionBottom() - selectionTop()); }
+    LayoutUnit selectionHeight() const { return std::max<LayoutUnit>(0, selectionBottom() - selectionTop()); }
 
     LayoutUnit selectionTopAdjustedForPrecedingBlock() const;
-    LayoutUnit selectionHeightAdjustedForPrecedingBlock() const { return max<LayoutUnit>(0, selectionBottom() - selectionTopAdjustedForPrecedingBlock()); }
+    LayoutUnit selectionHeightAdjustedForPrecedingBlock() const { return std::max<LayoutUnit>(0, selectionBottom() - selectionTopAdjustedForPrecedingBlock()); }
 
     int blockDirectionPointInLine() const;
 
index d68eeae..d8d45e3 100644 (file)
@@ -64,7 +64,7 @@ void RenderMathMLRow::layout()
         if (child->isRenderMathMLBlock() && toRenderMathMLBlock(child)->unembellishedOperator())
             continue;
         if (child->isBox())
-            stretchLogicalHeight = max<int>(stretchLogicalHeight, roundToInt(toRenderBox(child)->logicalHeight()));
+            stretchLogicalHeight = std::max<int>(stretchLogicalHeight, roundToInt(toRenderBox(child)->logicalHeight()));
     }
     if (!stretchLogicalHeight)
         stretchLogicalHeight = style()->fontSize();
index a2d3309..3f057b2 100644 (file)
@@ -316,9 +316,9 @@ void RenderMathMLScripts::layout()
             LayoutUnit superscriptBaseline = superscript->firstLineBaseline();
             if (superscriptBaseline == -1)
                 superscriptBaseline = superscriptHeight;
-            LayoutUnit minBaseline = max<LayoutUnit>(fontSize / 3 + 1 + superscriptBaseline, superscriptHeight + axis + superscriptShiftValue);
+            LayoutUnit minBaseline = std::max<LayoutUnit>(fontSize / 3 + 1 + superscriptBaseline, superscriptHeight + axis + superscriptShiftValue);
 
-            topPadding = max<LayoutUnit>(topPadding, minBaseline - baseBaseline);
+            topPadding = std::max<LayoutUnit>(topPadding, minBaseline - baseBaseline);
         }
 
         if (RenderBox* subscript = m_kind == Super ? 0 : subSupPair->firstChildBox()) {
@@ -328,9 +328,9 @@ void RenderMathMLScripts::layout()
                 subscriptBaseline = subscriptHeight;
             LayoutUnit baseExtendUnderBaseline = baseHeight - baseBaseline;
             LayoutUnit subscriptUnderItsBaseline = subscriptHeight - subscriptBaseline;
-            LayoutUnit minExtendUnderBaseline = max<LayoutUnit>(fontSize / 5 + 1 + subscriptUnderItsBaseline, subscriptHeight + subscriptShiftValue - axis);
+            LayoutUnit minExtendUnderBaseline = std::max<LayoutUnit>(fontSize / 5 + 1 + subscriptUnderItsBaseline, subscriptHeight + subscriptShiftValue - axis);
 
-            bottomPadding = max<LayoutUnit>(bottomPadding, minExtendUnderBaseline - baseExtendUnderBaseline);
+            bottomPadding = std::max<LayoutUnit>(bottomPadding, minExtendUnderBaseline - baseExtendUnderBaseline);
         }
     }
 
index e9d7be6..6a34198 100644 (file)
@@ -103,8 +103,6 @@ template<typename T, typename U> inline bool compareEqual(const T& t, const U& u
 
 namespace WebCore {
 
-using std::max;
-
 #if ENABLE(CSS_FILTERS)
 class FilterOperations;
 #endif
@@ -525,7 +523,7 @@ public:
     unsigned short borderStartWidth() const;
     unsigned short borderEndWidth() const;
 
-    unsigned short outlineSize() const { return max(0, outlineWidth() + outlineOffset()); }
+    unsigned short outlineSize() const { return std::max(0, outlineWidth() + outlineOffset()); }
     unsigned short outlineWidth() const
     {
         if (m_background->outline().style() == BNONE)
index 278a857..e4fc712 100644 (file)
@@ -54,10 +54,10 @@ LayoutSize StyleGeneratedImage::imageSize(const RenderElement* renderer, float m
 
         // Don't let images that have a width/height >= 1 shrink below 1 when zoomed.
         if (fixedSize.width() > 0)
-            width = max<LayoutUnit>(1, width);
+            width = std::max<LayoutUnit>(1, width);
 
         if (fixedSize.height() > 0)
-            height = max<LayoutUnit>(1, height);
+            height = std::max<LayoutUnit>(1, height);
 
         return LayoutSize(width, height);
     }
index 68dda71..0ab3e16 100644 (file)
@@ -157,8 +157,8 @@ float fontSizeForKeyword(unsigned keywordID, bool shouldUseFixedDefaultSize, con
     }
 
     // Value is outside the range of the table. Apply the scale factor instead.
-    float minLogicalSize = max(settings->minimumLogicalFontSize(), 1);
-    return max(fontSizeFactors[keywordID - CSSValueXxSmall] * mediumSize, minLogicalSize);
+    float minLogicalSize = std::max(settings->minimumLogicalFontSize(), 1);
+    return std::max(fontSizeFactors[keywordID - CSSValueXxSmall] * mediumSize, minLogicalSize);
 }
 
 template<typename T>
index a40b959..85b8a63 100644 (file)
@@ -535,7 +535,7 @@ void SVGSVGElement::setCurrentTime(float seconds)
 {
     if (std::isnan(seconds))
         return;
-    seconds = max(seconds, 0.0f);
+    seconds = std::max(seconds, 0.0f);
     m_timeContainer->setElapsed(seconds);
 }
 
index 993aabc..c33b762 100644 (file)
@@ -1,3 +1,21 @@
+2013-10-24  Anders Carlsson  <andersca@apple.com>
+
+        Stop bringing in the std namespace
+        https://bugs.webkit.org/show_bug.cgi?id=123273
+
+        Reviewed by Andreas Kling.
+
+        * WebView/WebFrameView.mm:
+        (-[WebFrameView _verticalPageScrollDistance]):
+        (-[WebFrameView _horizontalPageScrollDistance]):
+        * WebView/WebHTMLView.mm:
+        (-[WebHTMLView _scaleFactorForPrintOperation:]):
+        * WebView/WebView.mm:
+        (+[WebView _setCacheModel:]):
+        (+[WebView _maxCacheModelInAnyInstance]):
+        (+[WebView _cacheModelChangedNotification:]):
+        (+[WebView _preferencesRemovedNotification:]):
+
 2013-10-22  Dean Jackson  <dino@apple.com>
 
         [WebGL] Implement a software rendering option on Mac
index 6ce0f3a..f9fc139 100644 (file)
@@ -216,7 +216,7 @@ enum {
 - (float)_verticalPageScrollDistance
 {
     float height = [[self _contentView] bounds].size.height;
-    return max<float>(height * Scrollbar::minFractionToStepWhenPaging(), height - Scrollbar::maxOverlapBetweenPages());
+    return std::max<float>(height * Scrollbar::minFractionToStepWhenPaging(), height - Scrollbar::maxOverlapBetweenPages());
 }
 
 static inline void addTypesFromClass(NSMutableDictionary *allTypes, Class objCClass, NSArray *supportTypes)
@@ -698,7 +698,7 @@ static inline void addTypesFromClass(NSMutableDictionary *allTypes, Class objCCl
 - (float)_horizontalPageScrollDistance
 {
     float width = [[self _contentView] bounds].size.width;
-    return max<float>(width * Scrollbar::minFractionToStepWhenPaging(), width - Scrollbar::maxOverlapBetweenPages());
+    return std::max<float>(width * Scrollbar::minFractionToStepWhenPaging(), width - Scrollbar::maxOverlapBetweenPages());
 }
 
 - (BOOL)_pageVertically:(BOOL)up
index eb5b118..40d1ac5 100644 (file)
@@ -3984,7 +3984,7 @@ static PassRefPtr<KeyboardEvent> currentKeyboardEvent(Frame* coreFrame)
     float userScaleFactor = [printOperation _web_pageSetupScaleFactor];
     float maxShrinkToFitScaleFactor = 1.0f / _WebHTMLViewPrintingMaximumShrinkFactor;
     float shrinkToFitScaleFactor = (useViewWidth ? [printOperation _web_availablePaperWidth] :  [printOperation _web_availablePaperHeight]) / viewLogicalWidth;
-    return userScaleFactor * max(maxShrinkToFitScaleFactor, shrinkToFitScaleFactor);
+    return userScaleFactor * std::max(maxShrinkToFitScaleFactor, shrinkToFitScaleFactor);
 }
 
 // FIXME 3491344: This is a secret AppKit-internal method that we need to override in order
index 750c79a..19559cb 100644 (file)
@@ -6071,7 +6071,7 @@ static inline uint64_t roundUpToPowerOf2(uint64_t num)
 
         // This code is here to avoid a PLT regression. We can remove it if we
         // can prove that the overall system gain would justify the regression.
-        cacheMaxDeadCapacity = max(24u, cacheMaxDeadCapacity);
+        cacheMaxDeadCapacity = std::max<unsigned>(24, cacheMaxDeadCapacity);
 
         deadDecodedDataDeletionInterval = 60;
 
@@ -6108,7 +6108,7 @@ static inline uint64_t roundUpToPowerOf2(uint64_t num)
 
 
     // Don't shrink a big disk cache, since that would cause churn.
-    nsurlCacheDiskCapacity = max(nsurlCacheDiskCapacity, [nsurlCache diskCapacity]);
+    nsurlCacheDiskCapacity = std::max(nsurlCacheDiskCapacity, [nsurlCache diskCapacity]);
 
     memoryCache()->setCapacities(cacheMinDeadCapacity, cacheMaxDeadCapacity, cacheTotalCapacity);
     memoryCache()->setDeadDecodedDataDeletionInterval(deadDecodedDataDeletionInterval);
@@ -6135,7 +6135,7 @@ static inline uint64_t roundUpToPowerOf2(uint64_t num)
     WebCacheModel cacheModel = WebCacheModelDocumentViewer;
     NSEnumerator *enumerator = [(NSMutableSet *)allWebViewsSet objectEnumerator];
     while (WebPreferences *preferences = [[enumerator nextObject] preferences])
-        cacheModel = max(cacheModel, [preferences cacheModel]);
+        cacheModel = std::max(cacheModel, [preferences cacheModel]);
     return cacheModel;
 }
 
@@ -6148,7 +6148,7 @@ static inline uint64_t roundUpToPowerOf2(uint64_t num)
     if (![self _didSetCacheModel] || cacheModel > [self _cacheModel])
         [self _setCacheModel:cacheModel];
     else if (cacheModel < [self _cacheModel])
-        [self _setCacheModel:max([[WebPreferences standardPreferences] cacheModel], [self _maxCacheModelInAnyInstance])];
+        [self _setCacheModel:std::max([[WebPreferences standardPreferences] cacheModel], [self _maxCacheModelInAnyInstance])];
 }
 
 + (void)_preferencesRemovedNotification:(NSNotification *)notification
@@ -6157,7 +6157,7 @@ static inline uint64_t roundUpToPowerOf2(uint64_t num)
     ASSERT([preferences isKindOfClass:[WebPreferences class]]);
 
     if ([preferences cacheModel] == [self _cacheModel])
-        [self _setCacheModel:max([[WebPreferences standardPreferences] cacheModel], [self _maxCacheModelInAnyInstance])];
+        [self _setCacheModel:std::max([[WebPreferences standardPreferences] cacheModel], [self _maxCacheModelInAnyInstance])];
 }
 
 - (WebFrame *)_focusedFrame
index 2fc32ab..0625d45 100644 (file)
@@ -1,3 +1,13 @@
+2013-10-24  Anders Carlsson  <andersca@apple.com>
+
+        Stop bringing in the std namespace
+        https://bugs.webkit.org/show_bug.cgi?id=123273
+
+        Reviewed by Andreas Kling.
+
+        * WebProcess/mac/WebProcessMac.mm:
+        (WebKit::WebProcess::platformSetCacheModel):
+
 2013-10-24  Gavin Barraclough  <barraclough@apple.com>
 
         Simplify window occlusion detection code
index 91dc4db..4dd65a5 100644 (file)
@@ -126,7 +126,7 @@ void WebProcess::platformSetCacheModel(CacheModel cacheModel)
 #endif
 
     [nsurlCache setMemoryCapacity:urlCacheMemoryCapacity];
-    [nsurlCache setDiskCapacity:max<unsigned long>(urlCacheDiskCapacity, [nsurlCache diskCapacity])]; // Don't shrink a big disk cache, since that would cause churn.
+    [nsurlCache setDiskCapacity:std::max<unsigned long>(urlCacheDiskCapacity, [nsurlCache diskCapacity])]; // Don't shrink a big disk cache, since that would cause churn.
 }
 
 void WebProcess::platformClearResourceCaches(ResourceCachesToClear cachesToClear)