Rubber-stamped by Anders.
authordarin <darin@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 13 Apr 2006 07:07:34 +0000 (07:07 +0000)
committerdarin <darin@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 13 Apr 2006 07:07:34 +0000 (07:07 +0000)
        - fix Windows build

        * WebCore.vcproj/Image\ Viewer/Image\ Viewer.vcproj: Add loader directory.

        - use std::min/max exclusively intead of kMin/Max
        - eliminate KWQDef.h since all it had left in it was kMin/Max

        * WebCore.vcproj/WebCore/WebCore.vcproj: Remove KWQDef.h.
        * WebCore.xcodeproj/project.pbxproj: Ditto.

        * kwq/KWQDef.h: Removed.

        * bridge/mac/FrameMac.mm:
        (WebCore::FrameMac::attributedString):
        * bridge/mac/WebCoreFrameBridge.mm:
        (-[WebCoreFrameBridge computePageRectsWithPrintWidthScaleFactor:printHeight:]):
        * css/cssstyleselector.cpp:
        (WebCore::CSSStyleSelector::applyProperty):
        (WebCore::CSSStyleSelector::getComputedSizeFromSpecifiedSize):
        (WebCore::CSSStyleSelector::fontSizeForKeyword):
        * dom/Document.cpp:
        (WebCore::Document::minimumLayoutDelay):
        (WebCore::Document::addMarker):
        * dom/StyledElement.cpp:
        (WebCore::StyledElement::addCSSColor):
        * dom/xml_tokenizer.cpp:
        (WebCore::OffsetBuffer::readOutBytes):
        * editing/ApplyStyleCommand.cpp:
        (WebCore::ApplyStyleCommand::applyRelativeFontStyleChange):
        * editing/CompositeEditCommand.cpp:
        (WebCore::CompositeEditCommand::deleteInsignificantText):
        * editing/TextIterator.cpp:
        (WebCore::TextIterator::handleTextNode):
        (WebCore::TextIterator::handleTextBox):
        (WebCore::CharacterIterator::string):
        (WebCore::findPlainText):
        * editing/htmlediting.cpp:
        (WebCore::rangeCompliantEquivalent):
        * editing/markup.cpp:
        (WebCore::renderedText):
        * editing/visible_units.cpp:
        (WebCore::startOfParagraph):
        * html/HTMLSelectElement.cpp:
        (WebCore::HTMLSelectElement::parseMappedAttribute):
        * html/HTMLTokenizer.cpp:
        (WebCore::HTMLTokenizer::parseComment):
        (WebCore::HTMLTokenizer::parseEntity):
        (WebCore::HTMLTokenizer::parseTag):
        (WebCore::HTMLTokenizer::enlargeBuffer):
        (WebCore::HTMLTokenizer::enlargeScriptBuffer):
        * html/html_imageimpl.cpp:
        (WebCore::HTMLAreaElement::getRegion):
        * html/html_tableimpl.cpp:
        (WebCore::HTMLTableElement::parseMappedAttribute):
        * ksvg2/css/SVGCSSParser.cpp:
        (WebCore::CSSParser::parseSVGPaint):
        (WebCore::CSSParser::parseSVGColor):
        * kwq/KWQComboBox.mm:
        (QComboBox::sizeHint):
        * kwq/KWQListBox.mm:
        (QListBox::sizeForNumberOfLines):
        * kwq/KWQSlider.mm:
        (QSlider::setValue):
        * loader/Cache.cpp:
        (WebCore::Cache::setSize):
        * page/Frame.cpp:
        (WebCore::Frame::forceLayoutWithPageWidthRange):
        * platform/DeprecatedPtrListImpl.h:
        * platform/DeprecatedString.cpp:
        (ucstrcmp):
        * platform/DeprecatedString.h:
        * platform/DeprecatedValueListImpl.h:
        * platform/mac/GraphicsContextMac.mm:
        (WebCore::GraphicsContext::addRoundedRectClip):
        * platform/mac/WebCoreTextArea.mm:
        (-[WebCoreTextView _trackResizeFromMouseDown:]):
        * rendering/InlineTextBox.cpp:
        (WebCore::InlineTextBox::isSelected):
        (WebCore::InlineTextBox::selectionRect):
        (WebCore::InlineTextBox::placeEllipsisBox):
        (WebCore::InlineTextBox::selectionStartEnd):
        (WebCore::InlineTextBox::paintMarkedTextBackground):
        (WebCore::InlineTextBox::paintSpellingMarker):
        (WebCore::InlineTextBox::paintTextMatchMarker):
        (WebCore::InlineTextBox::paintMarkedTextUnderline):
        * rendering/RenderBlock.cpp:
        (WebCore::RenderBlock::overflowRect):
        (WebCore::RenderBlock::layoutBlock):
        (WebCore::RenderBlock::collapseMargins):
        (WebCore::RenderBlock::clearFloatsIfNeeded):
        (WebCore::RenderBlock::estimateVerticalPosition):
        (WebCore::RenderBlock::determineHorizontalPosition):
        (WebCore::RenderBlock::setCollapsedBottomMargin):
        (WebCore::RenderBlock::handleBottomOfBlock):
        (WebCore::RenderBlock::layoutBlockChildren):
        (WebCore::RenderBlock::fillVerticalSelectionGap):
        (WebCore::RenderBlock::fillLeftSelectionGap):
        (WebCore::RenderBlock::fillRightSelectionGap):
        (WebCore::RenderBlock::positionNewFloats):
        (WebCore::RenderBlock::nearestFloatBottom):
        (WebCore::RenderBlock::lowestPosition):
        (WebCore::RenderBlock::rightmostPosition):
        (WebCore::RenderBlock::leftmostPosition):
        (WebCore::RenderBlock::getClearDelta):
        (WebCore::RenderBlock::calcMinMaxWidth):
        (WebCore::RenderBlock::calcInlineMinMaxWidth):
        (WebCore::RenderBlock::calcBlocminMaxWidth):
        * rendering/RenderBlock.h:
        * rendering/RenderBox.cpp:
        (WebCore::RenderBox::calcBorderBoxWidth):
        (WebCore::RenderBox::calcBorderBoxHeight):
        (WebCore::RenderBox::calcContentBoxWidth):
        (WebCore::RenderBox::calcContentBoxHeight):
        (WebCore::RenderBox::paintRootBoxDecorations):
        (WebCore::RenderBox::paintBoxDecorations):
        (WebCore::RenderBox::calcWidth):
        (WebCore::RenderBox::calcWidthUsing):
        (WebCore::RenderBox::calcHeight):
        (WebCore::RenderBox::calcPercentageHeight):
        (WebCore::RenderBox::calcReplacedWidth):
        (WebCore::RenderBox::calcReplacedHeight):
        (WebCore::RenderBox::calcAbsoluteHorizontalValues):
        (WebCore::RenderBox::calcAbsoluteVerticalValues):
        * rendering/RenderCanvas.cpp:
        (WebCore::RenderCanvas::layout):
        * rendering/RenderFlexibleBox.cpp:
        (WebCore::RenderFlexibleBox::calcMinMaxWidth):
        (WebCore::RenderFlexibleBox::layoutHorizontalBox):
        (WebCore::RenderFlexibleBox::layoutVerticalBox):
        (WebCore::RenderFlexibleBox::allowedChildFlex):
        * rendering/RenderFlow.cpp:
        (WebCore::RenderFlow::paintLines):
        (WebCore::RenderFlow::lowestPosition):
        (WebCore::RenderFlow::rightmostPosition):
        (WebCore::RenderFlow::leftmostPosition):
        (WebCore::RenderFlow::paintOutlineForLine):
        * rendering/RenderImage.cpp:
        (WebCore::RenderImage::imageChanged):
        (WebCore::RenderImage::calcReplacedWidth):
        (WebCore::RenderImage::calcReplacedHeight):
        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::scrollRectToVisible):
        (WebCore::RenderLayer::computeScrollDimensions):
        (WebCore::RenderLayer::updateScrollInfoAfterLayout):
        (WebCore::RenderLayer::absoluteBoundingBox):
        (WebCore::Marquee::marqueeSpeed):
        (WebCore::Marquee::computePosition):
        (WebCore::Marquee::timerFired):
        * rendering/RenderObject.cpp:
        (WebCore::RenderObject::drawBorder):
        (WebCore::RenderObject::paintBorderImage):
        (WebCore::RenderObject::paintBorder):
        (WebCore::RenderObject::repaintAfterLayoutIfNeeded):
        * rendering/RenderTable.cpp:
        (WebCore::RenderTable::calcWidth):
        (WebCore::RenderTable::layout):
        (WebCore::RenderTable::paintBoxDecorations):
        * rendering/RenderTableCell.cpp:
        (WebCore::RenderTableCell::paintBackgroundsBehindCell):
        * rendering/RenderTableSection.cpp:
        (WebCore::RenderTableSection::layoutRows):
        (WebCore::RenderTableSection::lowestPosition):
        (WebCore::RenderTableSection::rightmostPosition):
        (WebCore::RenderTableSection::leftmostPosition):
        * rendering/RenderText.cpp:
        (WebCore::RenderText::caretRect):
        (WebCore::RenderText::calcMinMaxWidth):
        (WebCore::RenderText::minXPos):
        (WebCore::RenderText::width):
        (WebCore::RenderText::caretMinOffset):
        (WebCore::RenderText::caretMaxOffset):
        * rendering/bidi.cpp:
        (WebCore::RenderBlock::computeHorizontalPositionsForLine):
        (WebCore::RenderBlock::layoutInlineChildren):
        (WebCore::RenderBlock::checkLinesForOverflow):
        * rendering/render_form.cpp:
        (WebCore::RenderLineEdit::setSelectionStart):
        (WebCore::RenderLineEdit::setSelectionEnd):
        (WebCore::RenderLineEdit::setSelectionRange):
        (WebCore::RenderFieldset::layoutLegend):
        (WebCore::RenderFieldset::paintBoxDecorations):
        (WebCore::RenderSelect::layout):
        (WebCore::RenderTextArea::calcMinMaxWidth):
        (WebCore::RenderSlider::updateFromElement):
        * rendering/render_frames.cpp:
        (WebCore::RenderFrameSet::layout):
        * rendering/render_line.cpp:
        (WebCore::InlineFlowBox::placeBoxesHorizontally):
        (WebCore::InlineFlowBox::verticallyAlignBoxes):
        (WebCore::InlineFlowBox::adjustMaxAscentAndDescent):
        (WebCore::InlineFlowBox::placeBoxesVertically):
        (WebCore::InlineFlowBox::paintBackgroundAndBorder):
        * rendering/render_line.h:
        (WebCore::RootInlineBox::selectionHeight):
        * rendering/render_list.cpp:
        (WebCore::RenderListItem::positionListMarker):
        * rendering/render_replaced.cpp:
        (WebCore::RenderReplaced::shouldPaint):
        * rendering/table_layout.cpp:
        (WebCore::FixedTableLayout::calcMinMaxWidth):
        (WebCore::AutoTableLayout::recalcColumn):
        (WebCore::AutoTableLayout::calcMinMaxWidth):
        (WebCore::AutoTableLayout::calcEffectiveWidth):
        (WebCore::AutoTableLayout::layout):
        Use min/max instead of kMin/kMax.

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

55 files changed:
WebCore/ChangeLog
WebCore/WebCore.vcproj/Image Viewer/Image Viewer.vcproj
WebCore/WebCore.vcproj/WebCore/WebCore.vcproj
WebCore/WebCore.xcodeproj/project.pbxproj
WebCore/bridge/mac/FrameMac.mm
WebCore/bridge/mac/WebCoreFrameBridge.mm
WebCore/css/cssstyleselector.cpp
WebCore/dom/Document.cpp
WebCore/dom/StyledElement.cpp
WebCore/dom/xml_tokenizer.cpp
WebCore/editing/ApplyStyleCommand.cpp
WebCore/editing/CompositeEditCommand.cpp
WebCore/editing/TextIterator.cpp
WebCore/editing/htmlediting.cpp
WebCore/editing/markup.cpp
WebCore/editing/visible_units.cpp
WebCore/html/HTMLSelectElement.cpp
WebCore/html/HTMLTokenizer.cpp
WebCore/html/html_imageimpl.cpp
WebCore/html/html_tableimpl.cpp
WebCore/ksvg2/css/SVGCSSParser.cpp
WebCore/kwq/KWQComboBox.mm
WebCore/kwq/KWQDef.h [deleted file]
WebCore/kwq/KWQListBox.mm
WebCore/kwq/KWQSlider.mm
WebCore/loader/Cache.cpp
WebCore/page/Frame.cpp
WebCore/platform/DeprecatedPtrListImpl.h
WebCore/platform/DeprecatedString.cpp
WebCore/platform/DeprecatedString.h
WebCore/platform/DeprecatedValueListImpl.h
WebCore/platform/mac/GraphicsContextMac.mm
WebCore/platform/mac/WebCoreTextArea.mm
WebCore/rendering/InlineTextBox.cpp
WebCore/rendering/RenderBlock.cpp
WebCore/rendering/RenderBlock.h
WebCore/rendering/RenderBox.cpp
WebCore/rendering/RenderCanvas.cpp
WebCore/rendering/RenderFlexibleBox.cpp
WebCore/rendering/RenderFlow.cpp
WebCore/rendering/RenderImage.cpp
WebCore/rendering/RenderLayer.cpp
WebCore/rendering/RenderObject.cpp
WebCore/rendering/RenderTable.cpp
WebCore/rendering/RenderTableCell.cpp
WebCore/rendering/RenderTableSection.cpp
WebCore/rendering/RenderText.cpp
WebCore/rendering/bidi.cpp
WebCore/rendering/render_form.cpp
WebCore/rendering/render_frames.cpp
WebCore/rendering/render_line.cpp
WebCore/rendering/render_line.h
WebCore/rendering/render_list.cpp
WebCore/rendering/render_replaced.cpp
WebCore/rendering/table_layout.cpp

index 48fecb7..2de2496 100644 (file)
@@ -2,6 +2,216 @@
 
         Rubber-stamped by Anders.
 
+        - fix Windows build
+
+        * WebCore.vcproj/Image\ Viewer/Image\ Viewer.vcproj: Add loader directory.
+
+        - use std::min/max exclusively intead of kMin/Max
+        - eliminate KWQDef.h since all it had left in it was kMin/Max
+
+        * WebCore.vcproj/WebCore/WebCore.vcproj: Remove KWQDef.h.
+        * WebCore.xcodeproj/project.pbxproj: Ditto.
+
+        * kwq/KWQDef.h: Removed.
+
+        * bridge/mac/FrameMac.mm:
+        (WebCore::FrameMac::attributedString):
+        * bridge/mac/WebCoreFrameBridge.mm:
+        (-[WebCoreFrameBridge computePageRectsWithPrintWidthScaleFactor:printHeight:]):
+        * css/cssstyleselector.cpp:
+        (WebCore::CSSStyleSelector::applyProperty):
+        (WebCore::CSSStyleSelector::getComputedSizeFromSpecifiedSize):
+        (WebCore::CSSStyleSelector::fontSizeForKeyword):
+        * dom/Document.cpp:
+        (WebCore::Document::minimumLayoutDelay):
+        (WebCore::Document::addMarker):
+        * dom/StyledElement.cpp:
+        (WebCore::StyledElement::addCSSColor):
+        * dom/xml_tokenizer.cpp:
+        (WebCore::OffsetBuffer::readOutBytes):
+        * editing/ApplyStyleCommand.cpp:
+        (WebCore::ApplyStyleCommand::applyRelativeFontStyleChange):
+        * editing/CompositeEditCommand.cpp:
+        (WebCore::CompositeEditCommand::deleteInsignificantText):
+        * editing/TextIterator.cpp:
+        (WebCore::TextIterator::handleTextNode):
+        (WebCore::TextIterator::handleTextBox):
+        (WebCore::CharacterIterator::string):
+        (WebCore::findPlainText):
+        * editing/htmlediting.cpp:
+        (WebCore::rangeCompliantEquivalent):
+        * editing/markup.cpp:
+        (WebCore::renderedText):
+        * editing/visible_units.cpp:
+        (WebCore::startOfParagraph):
+        * html/HTMLSelectElement.cpp:
+        (WebCore::HTMLSelectElement::parseMappedAttribute):
+        * html/HTMLTokenizer.cpp:
+        (WebCore::HTMLTokenizer::parseComment):
+        (WebCore::HTMLTokenizer::parseEntity):
+        (WebCore::HTMLTokenizer::parseTag):
+        (WebCore::HTMLTokenizer::enlargeBuffer):
+        (WebCore::HTMLTokenizer::enlargeScriptBuffer):
+        * html/html_imageimpl.cpp:
+        (WebCore::HTMLAreaElement::getRegion):
+        * html/html_tableimpl.cpp:
+        (WebCore::HTMLTableElement::parseMappedAttribute):
+        * ksvg2/css/SVGCSSParser.cpp:
+        (WebCore::CSSParser::parseSVGPaint):
+        (WebCore::CSSParser::parseSVGColor):
+        * kwq/KWQComboBox.mm:
+        (QComboBox::sizeHint):
+        * kwq/KWQListBox.mm:
+        (QListBox::sizeForNumberOfLines):
+        * kwq/KWQSlider.mm:
+        (QSlider::setValue):
+        * loader/Cache.cpp:
+        (WebCore::Cache::setSize):
+        * page/Frame.cpp:
+        (WebCore::Frame::forceLayoutWithPageWidthRange):
+        * platform/DeprecatedPtrListImpl.h:
+        * platform/DeprecatedString.cpp:
+        (ucstrcmp):
+        * platform/DeprecatedString.h:
+        * platform/DeprecatedValueListImpl.h:
+        * platform/mac/GraphicsContextMac.mm:
+        (WebCore::GraphicsContext::addRoundedRectClip):
+        * platform/mac/WebCoreTextArea.mm:
+        (-[WebCoreTextView _trackResizeFromMouseDown:]):
+        * rendering/InlineTextBox.cpp:
+        (WebCore::InlineTextBox::isSelected):
+        (WebCore::InlineTextBox::selectionRect):
+        (WebCore::InlineTextBox::placeEllipsisBox):
+        (WebCore::InlineTextBox::selectionStartEnd):
+        (WebCore::InlineTextBox::paintMarkedTextBackground):
+        (WebCore::InlineTextBox::paintSpellingMarker):
+        (WebCore::InlineTextBox::paintTextMatchMarker):
+        (WebCore::InlineTextBox::paintMarkedTextUnderline):
+        * rendering/RenderBlock.cpp:
+        (WebCore::RenderBlock::overflowRect):
+        (WebCore::RenderBlock::layoutBlock):
+        (WebCore::RenderBlock::collapseMargins):
+        (WebCore::RenderBlock::clearFloatsIfNeeded):
+        (WebCore::RenderBlock::estimateVerticalPosition):
+        (WebCore::RenderBlock::determineHorizontalPosition):
+        (WebCore::RenderBlock::setCollapsedBottomMargin):
+        (WebCore::RenderBlock::handleBottomOfBlock):
+        (WebCore::RenderBlock::layoutBlockChildren):
+        (WebCore::RenderBlock::fillVerticalSelectionGap):
+        (WebCore::RenderBlock::fillLeftSelectionGap):
+        (WebCore::RenderBlock::fillRightSelectionGap):
+        (WebCore::RenderBlock::positionNewFloats):
+        (WebCore::RenderBlock::nearestFloatBottom):
+        (WebCore::RenderBlock::lowestPosition):
+        (WebCore::RenderBlock::rightmostPosition):
+        (WebCore::RenderBlock::leftmostPosition):
+        (WebCore::RenderBlock::getClearDelta):
+        (WebCore::RenderBlock::calcMinMaxWidth):
+        (WebCore::RenderBlock::calcInlineMinMaxWidth):
+        (WebCore::RenderBlock::calcBlocminMaxWidth):
+        * rendering/RenderBlock.h:
+        * rendering/RenderBox.cpp:
+        (WebCore::RenderBox::calcBorderBoxWidth):
+        (WebCore::RenderBox::calcBorderBoxHeight):
+        (WebCore::RenderBox::calcContentBoxWidth):
+        (WebCore::RenderBox::calcContentBoxHeight):
+        (WebCore::RenderBox::paintRootBoxDecorations):
+        (WebCore::RenderBox::paintBoxDecorations):
+        (WebCore::RenderBox::calcWidth):
+        (WebCore::RenderBox::calcWidthUsing):
+        (WebCore::RenderBox::calcHeight):
+        (WebCore::RenderBox::calcPercentageHeight):
+        (WebCore::RenderBox::calcReplacedWidth):
+        (WebCore::RenderBox::calcReplacedHeight):
+        (WebCore::RenderBox::calcAbsoluteHorizontalValues):
+        (WebCore::RenderBox::calcAbsoluteVerticalValues):
+        * rendering/RenderCanvas.cpp:
+        (WebCore::RenderCanvas::layout):
+        * rendering/RenderFlexibleBox.cpp:
+        (WebCore::RenderFlexibleBox::calcMinMaxWidth):
+        (WebCore::RenderFlexibleBox::layoutHorizontalBox):
+        (WebCore::RenderFlexibleBox::layoutVerticalBox):
+        (WebCore::RenderFlexibleBox::allowedChildFlex):
+        * rendering/RenderFlow.cpp:
+        (WebCore::RenderFlow::paintLines):
+        (WebCore::RenderFlow::lowestPosition):
+        (WebCore::RenderFlow::rightmostPosition):
+        (WebCore::RenderFlow::leftmostPosition):
+        (WebCore::RenderFlow::paintOutlineForLine):
+        * rendering/RenderImage.cpp:
+        (WebCore::RenderImage::imageChanged):
+        (WebCore::RenderImage::calcReplacedWidth):
+        (WebCore::RenderImage::calcReplacedHeight):
+        * rendering/RenderLayer.cpp:
+        (WebCore::RenderLayer::scrollRectToVisible):
+        (WebCore::RenderLayer::computeScrollDimensions):
+        (WebCore::RenderLayer::updateScrollInfoAfterLayout):
+        (WebCore::RenderLayer::absoluteBoundingBox):
+        (WebCore::Marquee::marqueeSpeed):
+        (WebCore::Marquee::computePosition):
+        (WebCore::Marquee::timerFired):
+        * rendering/RenderObject.cpp:
+        (WebCore::RenderObject::drawBorder):
+        (WebCore::RenderObject::paintBorderImage):
+        (WebCore::RenderObject::paintBorder):
+        (WebCore::RenderObject::repaintAfterLayoutIfNeeded):
+        * rendering/RenderTable.cpp:
+        (WebCore::RenderTable::calcWidth):
+        (WebCore::RenderTable::layout):
+        (WebCore::RenderTable::paintBoxDecorations):
+        * rendering/RenderTableCell.cpp:
+        (WebCore::RenderTableCell::paintBackgroundsBehindCell):
+        * rendering/RenderTableSection.cpp:
+        (WebCore::RenderTableSection::layoutRows):
+        (WebCore::RenderTableSection::lowestPosition):
+        (WebCore::RenderTableSection::rightmostPosition):
+        (WebCore::RenderTableSection::leftmostPosition):
+        * rendering/RenderText.cpp:
+        (WebCore::RenderText::caretRect):
+        (WebCore::RenderText::calcMinMaxWidth):
+        (WebCore::RenderText::minXPos):
+        (WebCore::RenderText::width):
+        (WebCore::RenderText::caretMinOffset):
+        (WebCore::RenderText::caretMaxOffset):
+        * rendering/bidi.cpp:
+        (WebCore::RenderBlock::computeHorizontalPositionsForLine):
+        (WebCore::RenderBlock::layoutInlineChildren):
+        (WebCore::RenderBlock::checkLinesForOverflow):
+        * rendering/render_form.cpp:
+        (WebCore::RenderLineEdit::setSelectionStart):
+        (WebCore::RenderLineEdit::setSelectionEnd):
+        (WebCore::RenderLineEdit::setSelectionRange):
+        (WebCore::RenderFieldset::layoutLegend):
+        (WebCore::RenderFieldset::paintBoxDecorations):
+        (WebCore::RenderSelect::layout):
+        (WebCore::RenderTextArea::calcMinMaxWidth):
+        (WebCore::RenderSlider::updateFromElement):
+        * rendering/render_frames.cpp:
+        (WebCore::RenderFrameSet::layout):
+        * rendering/render_line.cpp:
+        (WebCore::InlineFlowBox::placeBoxesHorizontally):
+        (WebCore::InlineFlowBox::verticallyAlignBoxes):
+        (WebCore::InlineFlowBox::adjustMaxAscentAndDescent):
+        (WebCore::InlineFlowBox::placeBoxesVertically):
+        (WebCore::InlineFlowBox::paintBackgroundAndBorder):
+        * rendering/render_line.h:
+        (WebCore::RootInlineBox::selectionHeight):
+        * rendering/render_list.cpp:
+        (WebCore::RenderListItem::positionListMarker):
+        * rendering/render_replaced.cpp:
+        (WebCore::RenderReplaced::shouldPaint):
+        * rendering/table_layout.cpp:
+        (WebCore::FixedTableLayout::calcMinMaxWidth):
+        (WebCore::AutoTableLayout::recalcColumn):
+        (WebCore::AutoTableLayout::calcMinMaxWidth):
+        (WebCore::AutoTableLayout::calcEffectiveWidth):
+        (WebCore::AutoTableLayout::layout):
+        Use min/max instead of kMin/kMax.
+
+2006-04-12  Darin Adler  <darin@apple.com>
+
+        Rubber-stamped by Anders.
+
         - get ready for some more de-KWQ-ing done by the renaming script in two ways
             1) stop using forwarding headers for things within WebCore
             2) remove a bit of unused stuff
index 1469e4b..3dd8734 100644 (file)
@@ -44,7 +44,7 @@
                        <Tool\r
                                Name="VCCLCompilerTool"\r
                                Optimization="0"\r
-                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\..&quot;;&quot;$(SolutionDir)\..\dom&quot;;&quot;$(SolutionDir)\..\bridge\win&quot;;&quot;$(SolutionDir)\..\bridge&quot;;&quot;$(SolutionDir)\..\editing&quot;;&quot;$(SolutionDir)\..\page&quot;;&quot;$(SolutionDir)\..\khtml&quot;;&quot;$(SolutionDir)\..\khtml\misc&quot;;&quot;$(SolutionDir)\..\khtml\html&quot;;&quot;$(SolutionDir)\..\..\icu\include&quot;;&quot;$(SolutionDir)\..\icu&quot;;&quot;$(SolutionDir)\..\kwq&quot;;&quot;$(SolutionDir)\..\platform\win&quot;;&quot;$(SolutionDir)\..\platform&quot;;&quot;$(SolutionDir)\..\platform\cairo\cairo\src&quot;;&quot;$(SolutionDir)\..\..\JavaScriptCore\os-win32&quot;;&quot;$(SolutionDir)\..\..\JavaScriptCore&quot;;&quot;$(SolutionDir)\..\ForwardingHeaders&quot;"\r
+                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\..&quot;;&quot;$(SolutionDir)\..\dom&quot;;&quot;$(SolutionDir)\..\bridge\win&quot;;&quot;$(SolutionDir)\..\bridge&quot;;&quot;$(SolutionDir)\..\editing&quot;;&quot;$(SolutionDir)\..\page&quot;;&quot;$(SolutionDir)\..\loader&quot;;&quot;$(SolutionDir)\..\khtml&quot;;&quot;$(SolutionDir)\..\khtml\misc&quot;;&quot;$(SolutionDir)\..\khtml\html&quot;;&quot;$(SolutionDir)\..\..\icu\include&quot;;&quot;$(SolutionDir)\..\icu&quot;;&quot;$(SolutionDir)\..\kwq&quot;;&quot;$(SolutionDir)\..\platform\win&quot;;&quot;$(SolutionDir)\..\platform&quot;;&quot;$(SolutionDir)\..\platform\cairo\cairo\src&quot;;&quot;$(SolutionDir)\..\..\JavaScriptCore\os-win32&quot;;&quot;$(SolutionDir)\..\..\JavaScriptCore&quot;;&quot;$(SolutionDir)\..\ForwardingHeaders&quot;"\r
                                PreprocessorDefinitions="WIN32;_WINDOWS;_DEBUG"\r
                                MinimalRebuild="true"\r
                                BasicRuntimeChecks="3"\r
                        />\r
                        <Tool\r
                                Name="VCCLCompilerTool"\r
-                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\..&quot;;&quot;$(SolutionDir)\..\dom&quot;;&quot;$(SolutionDir)\..\bridge\win&quot;;&quot;$(SolutionDir)\..\bridge&quot;;&quot;$(SolutionDir)\..\editing&quot;;&quot;$(SolutionDir)\..\page&quot;;&quot;$(SolutionDir)\..\khtml&quot;;&quot;$(SolutionDir)\..\khtml\misc&quot;;&quot;$(SolutionDir)\..\khtml\html&quot;;&quot;$(SolutionDir)\..\..\icu\include&quot;;&quot;$(SolutionDir)\..\icu&quot;;&quot;$(SolutionDir)\..\kwq&quot;;&quot;$(SolutionDir)\..\platform\win&quot;;&quot;$(SolutionDir)\..\platform&quot;;&quot;$(SolutionDir)\..\platform\cairo\cairo\src&quot;;&quot;$(SolutionDir)\..\..\JavaScriptCore\os-win32&quot;;&quot;$(SolutionDir)\..\..\JavaScriptCore&quot;;&quot;$(SolutionDir)\..\ForwardingHeaders&quot;"\r
+                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\..&quot;;&quot;$(SolutionDir)\..\dom&quot;;&quot;$(SolutionDir)\..\bridge\win&quot;;&quot;$(SolutionDir)\..\bridge&quot;;&quot;$(SolutionDir)\..\editing&quot;;&quot;$(SolutionDir)\..\page&quot;;&quot;$(SolutionDir)\..\loader&quot;;&quot;$(SolutionDir)\..\khtml&quot;;&quot;$(SolutionDir)\..\khtml\misc&quot;;&quot;$(SolutionDir)\..\khtml\html&quot;;&quot;$(SolutionDir)\..\..\icu\include&quot;;&quot;$(SolutionDir)\..\icu&quot;;&quot;$(SolutionDir)\..\kwq&quot;;&quot;$(SolutionDir)\..\platform\win&quot;;&quot;$(SolutionDir)\..\platform&quot;;&quot;$(SolutionDir)\..\platform\cairo\cairo\src&quot;;&quot;$(SolutionDir)\..\..\JavaScriptCore\os-win32&quot;;&quot;$(SolutionDir)\..\..\JavaScriptCore&quot;;&quot;$(SolutionDir)\..\ForwardingHeaders&quot;"\r
                                PreprocessorDefinitions="WIN32;_WINDOWS;NDEBUG"\r
                                MinimalRebuild="false"\r
                                RuntimeLibrary="2"\r
index 240edd3..3ebc518 100644 (file)
                                >\r
                        </File>\r
                        <File\r
-                               RelativePath="..\..\kwq\KWQDef.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
                                RelativePath="..\..\kwq\KWQEditCommand.h"\r
                                >\r
                        </File>\r
index 000f0f0..e824ad4 100644 (file)
                93F1992908245E59001E9ABC /* KWQCString.h in Headers */ = {isa = PBXBuildFile; fileRef = F587868302DE3B8601EA4122 /* KWQCString.h */; };
                93F1992E08245E59001E9ABC /* KWQComboBox.h in Headers */ = {isa = PBXBuildFile; fileRef = F587868202DE3B8601EA4122 /* KWQComboBox.h */; };
                93F1992F08245E59001E9ABC /* Cursor.h in Headers */ = {isa = PBXBuildFile; fileRef = F587868402DE3B8601EA4122 /* Cursor.h */; };
-               93F1993308245E59001E9ABC /* KWQDef.h in Headers */ = {isa = PBXBuildFile; fileRef = F58784DA02DE375901EA4122 /* KWQDef.h */; };
                93F1993908245E59001E9ABC /* KWQFileButton.h in Headers */ = {isa = PBXBuildFile; fileRef = 93CCF7D4033BD43C008635CE /* KWQFileButton.h */; };
                93F1994F08245E59001E9ABC /* KWQKHTMLSettings.h in Headers */ = {isa = PBXBuildFile; fileRef = F587863A02DE3A1401EA4122 /* KWQKHTMLSettings.h */; };
                93F1995008245E59001E9ABC /* KWQKIOGlobal.h in Headers */ = {isa = PBXBuildFile; fileRef = F587864902DE3A9A01EA4122 /* KWQKIOGlobal.h */; };
                F565AE8602ECA583018635CA /* WebCoreSettings.mm */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebCoreSettings.mm; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
                F58784D202DE375901EA4122 /* KWQComboBox.mm */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = KWQComboBox.mm; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
                F58784D502DE375901EA4122 /* KWQCString.cpp */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.cpp.cpp; path = KWQCString.cpp; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
-               F58784DA02DE375901EA4122 /* KWQDef.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = KWQDef.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
                F58784F002DE375901EA4122 /* CursorMac.mm */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = CursorMac.mm; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
                F58784FF02DE375901EA4122 /* JavaAppletWidget.mm */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = JavaAppletWidget.mm; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
                F587850302DE375901EA4122 /* KWQLoader.mm */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = KWQLoader.mm; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
                F523D15002DE4271018635CA /* other */ = {
                        isa = PBXGroup;
                        children = (
-                               F58784DA02DE375901EA4122 /* KWQDef.h */,
                                BEF7EEA005FF8F0D009717EE /* KWQEditCommand.h */,
                                BEF7EEA105FF8F0D009717EE /* KWQEditCommand.mm */,
                                93CCF7D4033BD43C008635CE /* KWQFileButton.h */,
                                93F1992908245E59001E9ABC /* KWQCString.h in Headers */,
                                93F1992E08245E59001E9ABC /* KWQComboBox.h in Headers */,
                                93F1992F08245E59001E9ABC /* Cursor.h in Headers */,
-                               93F1993308245E59001E9ABC /* KWQDef.h in Headers */,
                                93F1993908245E59001E9ABC /* KWQFileButton.h in Headers */,
                                93F1994F08245E59001E9ABC /* KWQKHTMLSettings.h in Headers */,
                                93F1995008245E59001E9ABC /* KWQKIOGlobal.h in Headers */,
index 4a1c17c..6fefa57 100644 (file)
@@ -77,6 +77,8 @@
 - (void *)pluginScriptableObject;
 @end
 
+using namespace std;
+
 using namespace KJS;
 using namespace Bindings;
 
@@ -2296,7 +2298,7 @@ NSAttributedString *FrameMac::attributedString(Node *_start, int startOffset, No
                             for (InlineTextBox* box = textObj->firstTextBox(); box; box = box->nextTextBox()) {
                                 int runStart = (start == -1) ? box->m_start : start;
                                 int runEnd = (end == -1) ? box->m_start + box->m_len : end;
-                                runEnd = kMin(runEnd, box->m_start + box->m_len);
+                                runEnd = min(runEnd, box->m_start + box->m_len);
                                 if (runStart >= box->m_start &&
                                     runStart < box->m_start + box->m_len) {
                                     if (box == textObj->firstTextBox() && box->m_start == runStart && runStart > 0)
index 545a41e..b2f041d 100644 (file)
 
 @class NSView;
 
+using namespace std;
 using namespace WebCore;
 using namespace HTMLNames;
 
+using KJS::BooleanType;
+using KJS::DateInstance;
 using KJS::ExecState;
+using KJS::GetterSetterType;
+using KJS::Identifier;
 using KJS::Interpreter;
 using KJS::JSLock;
 using KJS::JSObject;
+using KJS::JSType;
 using KJS::JSValue;
-using KJS::SavedProperties;
-using KJS::SavedBuiltins;
-using KJS::Window;
-using KJS::BooleanType;
-using KJS::StringType;
+using KJS::List;
+using KJS::NullType;
 using KJS::NumberType;
 using KJS::ObjectType;
-using KJS::UnspecifiedType;
-using KJS::UndefinedType;
-using KJS::NullType;
-using KJS::GetterSetterType;
+using KJS::SavedBuiltins;
+using KJS::SavedProperties;
+using KJS::StringType;
 using KJS::UString;
-using KJS::Identifier;
-using KJS::List;
-using KJS::JSType;
-using KJS::DateInstance;
+using KJS::UndefinedType;
+using KJS::UnspecifiedType;
+using KJS::Window;
 
 using KJS::Bindings::RootObject;
 
-using WebCore::RenderObject;
-
-NSString *WebCorePageCacheStateKey =            @"WebCorePageCacheState";
+NSString *WebCorePageCacheStateKey = @"WebCorePageCacheState";
 
 @interface WebCoreFrameBridge (WebCoreBridgeInternal)
 - (RootObject *)executionContextForView:(NSView *)aView;
@@ -939,9 +938,9 @@ static BOOL nowPrinting(WebCoreFrameBridge *self)
     
     // We need to give the part the opportunity to adjust the page height at each step.
     for (float i = 0; i < docHeight; i += currPageHeight) {
-        float proposedBottom = kMin(docHeight, i + printHeight);
+        float proposedBottom = min(docHeight, i + printHeight);
         m_frame->adjustPageHeight(&proposedBottom, i, proposedBottom, i);
-        currPageHeight = kMax(1.0f, proposedBottom - i);
+        currPageHeight = max(1.0f, proposedBottom - i);
         for (float j = 0; j < docWidth; j += printWidth) {
             NSValue* val = [NSValue valueWithRect: NSMakeRect(j, i, printWidth, currPageHeight)];
             [pages addObject: val];
index 958b216..9470145 100644 (file)
@@ -39,6 +39,8 @@
 #include "css_stylesheetimpl.h"
 #include "loader.h"
 
+using namespace std;
+
 namespace WebCore {
 
 using namespace HTMLNames;
@@ -3464,7 +3466,7 @@ void CSSStyleSelector::applyProperty(int id, CSSValue *value)
         if (!primitiveValue || primitiveValue->primitiveType() != CSSPrimitiveValue::CSS_NUMBER)
             return; // Error case.
         // Clamp opacity to the range 0-1
-        style->setOpacity(kMin(1.0, kMax(0.0, primitiveValue->getFloatValue(CSSPrimitiveValue::CSS_NUMBER))));
+        style->setOpacity(min(1.0, max(0.0, primitiveValue->getFloatValue(CSSPrimitiveValue::CSS_NUMBER))));
         return;
     case CSS_PROP__KHTML_BOX_ALIGN:
         HANDLE_INHERIT_AND_INITIAL(boxAlign, BoxAlign)
@@ -4066,7 +4068,7 @@ float CSSStyleSelector::getComputedSizeFromSpecifiedSize(bool isAbsoluteSize, fl
     if (zoomedSize < minLogicalSize && (specifiedSize >= minLogicalSize || !isAbsoluteSize))
         zoomedSize = minLogicalSize;
     
-    return kMax(zoomedSize, 1.0f);
+    return max(zoomedSize, 1.0f);
 }
 
 const int fontSizeTableMax = 16;
@@ -4126,8 +4128,8 @@ float CSSStyleSelector::fontSizeForKeyword(int keyword, bool quirksMode) const
     }
     
     // Value is outside the range of the table. Apply the scale factor instead.
-    float minLogicalSize = kMax(settings->minLogicalFontSize(), 1);
-    return kMax(fontSizeFactors[keyword - CSS_VAL_XX_SMALL]*mediumSize, minLogicalSize);
+    float minLogicalSize = max(settings->minLogicalFontSize(), 1);
+    return max(fontSizeFactors[keyword - CSS_VAL_XX_SMALL]*mediumSize, minLogicalSize);
 }
 
 float CSSStyleSelector::largerFontSize(float size, bool quirksMode) const
index 40b160f..94f5416 100644 (file)
@@ -86,6 +86,8 @@ using XBL::XBLBindingManager;
 #include "KSVGTimeScheduler.h"
 #endif
 
+using namespace std;
+
 namespace WebCore {
 
 using namespace EventNames;
@@ -1268,7 +1270,7 @@ int Document::minimumLayoutDelay()
     m_overMinimumLayoutThreshold = elapsed > cLayoutScheduleThreshold;
     
     // We'll want to schedule the timer to fire at the minimum layout threshold.
-    return kMax(0, cLayoutScheduleThreshold - elapsed);
+    return max(0, cLayoutScheduleThreshold - elapsed);
 }
 
 int Document::elapsedTime() const
@@ -2699,8 +2701,8 @@ void Document::addMarker(Node *node, DocumentMarker newMarker)
                 return;
             } else {
                 // marker and newMarker intersect or touch - merge them into newMarker
-                newMarker.startOffset = kMin(newMarker.startOffset, marker.startOffset);
-                newMarker.endOffset = kMax(newMarker.endOffset, marker.endOffset);
+                newMarker.startOffset = min(newMarker.startOffset, marker.startOffset);
+                newMarker.endOffset = max(newMarker.endOffset, marker.endOffset);
                 // remove old one, we'll add newMarker later
                 it = markers->remove(it);
                 // it points to the next marker to consider
index 794fffe..1a9a08c 100644 (file)
@@ -31,6 +31,8 @@
 #include "HTMLNames.h"
 #include "css_stylesheetimpl.h"
 
+using namespace std;
+
 namespace WebCore {
 
 using namespace HTMLNames;
@@ -369,7 +371,7 @@ void StyledElement::addCSSColor(MappedAttribute* attr, int id, const String &c)
                     colors[component] = (colors[component] << 4);
                     if (hex > 0) {
                         colors[component] += hex;
-                        maxDigit = kMin(maxDigit, numDigits);
+                        maxDigit = min(maxDigit, numDigits);
                     }
                     numDigits++;
                     pos++;
index ca04c2b..151b7d9 100644 (file)
@@ -48,6 +48,8 @@
 #include "XLinkNames.h"
 #endif
 
+using namespace std;
+
 namespace WebCore {
 
 using namespace HTMLNames;
@@ -147,7 +149,7 @@ public:
     
     int readOutBytes(char *outputBuffer, unsigned askedToRead) {
         unsigned bytesLeft = m_buffer.size() - m_currentOffset;
-        unsigned lenToCopy = kMin(askedToRead, bytesLeft);
+        unsigned lenToCopy = min(askedToRead, bytesLeft);
         if (lenToCopy) {
             memcpy(outputBuffer, m_buffer.data() + m_currentOffset, lenToCopy);
             m_currentOffset += lenToCopy;
index d7e0d39..22c1014 100644 (file)
@@ -500,7 +500,7 @@ void ApplyStyleCommand::applyRelativeFontStyleChange(CSSMutableStyleDeclaration
         
         CSSMutableStyleDeclaration* inlineStyleDecl = elem->getInlineStyleDecl();
         float currentFontSize = computedFontSize(node);
-        float desiredFontSize = kMax(MinimumFontSize, startingFontSizes.get(node) + adjustment);
+        float desiredFontSize = max(MinimumFontSize, startingFontSizes.get(node) + adjustment);
         RefPtr<CSSValue> value = inlineStyleDecl->getPropertyCSSValue(CSS_PROP_FONT_SIZE);
         if (value) {
             inlineStyleDecl->removeProperty(CSS_PROP_FONT_SIZE, true);
index 7257157..1631f35 100644 (file)
@@ -57,6 +57,8 @@
 #include "htmlediting.h"
 #include "visible_units.h"
 
+using namespace std;
+
 namespace WebCore {
 
 using namespace HTMLNames;
@@ -423,8 +425,8 @@ void CompositeEditCommand::deleteInsignificantText(Text *textNode, int start, in
         bool indicesIntersect = start <= gapEnd && end >= gapStart;
         int gapLen = gapEnd - gapStart;
         if (indicesIntersect && gapLen > 0) {
-            gapStart = kMax(gapStart, start);
-            gapEnd = kMin(gapEnd, end);
+            gapStart = max(gapStart, start);
+            gapEnd = min(gapEnd, end);
             if (!str)
                 str = textNode->string()->substring(start, end - start);
             // remove text in the gap
index 6fece05..baaa65f 100644 (file)
@@ -37,6 +37,8 @@
 #include "RenderTableCell.h"
 #include "RenderTableRow.h"
 
+using namespace std;
+
 namespace WebCore {
 
 using namespace HTMLNames;
@@ -218,7 +220,7 @@ bool TextIterator::handleTextNode()
         }
         int strLength = str.length();
         int end = (m_node == m_endContainer) ? m_endOffset : LONG_MAX;
-        int runEnd = kMin(strLength, end);
+        int runEnd = min(strLength, end);
 
         if (runStart >= runEnd)
             return true;
@@ -263,7 +265,7 @@ void TextIterator::handleTextBox()
     int end = (m_node == m_endContainer) ? m_endOffset : LONG_MAX;
     while (m_textBox) {
         int textBoxStart = m_textBox->m_start;
-        int runStart = kMax(textBoxStart, start);
+        int runStart = max(textBoxStart, start);
 
         // Check for collapsed space at the start of this run.
         InlineTextBox *firstTextBox = renderer->containsReversedText() ? m_sortedTextBoxes[0] : renderer->firstTextBox();
@@ -274,7 +276,7 @@ void TextIterator::handleTextBox()
             return;
         }
         int textBoxEnd = textBoxStart + m_textBox->m_len;
-        int runEnd = kMin(textBoxEnd, end);
+        int runEnd = min(textBoxEnd, end);
         
         // Determine what the next text box will be, but don't advance yet
         InlineTextBox *nextTextBox = 0;
@@ -829,7 +831,7 @@ DeprecatedString CharacterIterator::string(int numChars)
     DeprecatedString result;
     result.reserve(numChars);
     while (numChars > 0 && !atEnd()) {
-        int runSize = kMin(numChars, length());
+        int runSize = min(numChars, length());
         result.append(characters(), runSize);
         numChars -= runSize;
         advance(runSize);
@@ -1119,7 +1121,7 @@ PassRefPtr<Range> findPlainText(const Range *r, const String& s, bool forward, b
                     buffer.clear();
                 }
                 int available = it.length();
-                int runLength = kMin(needed, available);
+                int runLength = min(needed, available);
                 buffer.append(runLength, it.characters());
                 it.advance(runLength);
             }
index 965dc9c..815c285 100644 (file)
@@ -36,6 +36,8 @@
 #include "RenderObject.h"
 #include "RegularExpression.h"
 
+using namespace std;
+
 namespace WebCore {
 
 using namespace HTMLNames;
@@ -94,7 +96,7 @@ Position rangeCompliantEquivalent(const Position& pos)
     }
     
     if (node->offsetInCharacters())
-        return Position(node, kMin(node->maxOffset(), pos.offset()));
+        return Position(node, min(node->maxOffset(), pos.offset()));
     
     int maxCompliantOffset = node->childNodeCount();
     if (pos.offset() > maxCompliantOffset) {
index 68efd44..ab01852 100644 (file)
@@ -40,6 +40,8 @@
 #include "htmlediting.h"
 #include "visible_units.h"
 
+using namespace std;
+
 namespace WebCore {
 
 using namespace HTMLNames;
@@ -112,8 +114,8 @@ static DeprecatedString renderedText(const Node *node, const Range *range)
         if (endOffset < start)
             break;
         if (startOffset <= end) {
-            unsigned s = kMax(start, startOffset);
-            unsigned e = kMin(end, endOffset);
+            unsigned s = max(start, startOffset);
+            unsigned e = min(end, endOffset);
             result.append(str.mid(s, e-s));
             if (e == end) {
                 // now add in collapsed-away spaces if at the end of the line
@@ -123,7 +125,7 @@ static DeprecatedString renderedText(const Node *node, const Range *range)
                     // count the number of characters between the end of the
                     // current box and the start of the next box.
                     int collapsedStart = e;
-                    int collapsedPastEnd = kMin((unsigned)nextBox->m_start, endOffset + 1);
+                    int collapsedPastEnd = min((unsigned)nextBox->m_start, endOffset + 1);
                     bool addNextNonNBSP = true;
                     for (int i = collapsedStart; i < collapsedPastEnd; i++) {
                         if (str[i] == nonBreakingSpace) {
index e9f462d..4efd011 100644 (file)
@@ -568,7 +568,7 @@ VisiblePosition startOfParagraph(const VisiblePosition &c)
                 int i = static_cast<RenderText*>(r)->length();
                 int o = offset;
                 if (n == startNode && o < i)
-                    i = kMax(0, o);
+                    i = max(0, o);
                 while (--i >= 0)
                     if (text[i] == '\n')
                         return VisiblePosition(n, i + 1, DOWNSTREAM);
index 1e50719..4e898df 100644 (file)
@@ -255,9 +255,9 @@ ContainerNode* HTMLSelectElement::addChild(PassRefPtr<Node> newChild)
 void HTMLSelectElement::parseMappedAttribute(MappedAttribute *attr)
 {
     if (attr->name() == sizeAttr) {
-        m_size = kMax(attr->value().toInt(), 1);
+        m_size = max(attr->value().toInt(), 1);
     } else if (attr->name() == widthAttr) {
-        m_minwidth = kMax(attr->value().toInt(), 0);
+        m_minwidth = max(attr->value().toInt(), 0);
     } else if (attr->name() == multipleAttr) {
         m_multiple = (!attr->isNull());
     } else if (attr->name() == accesskeyAttr) {
index fc18532..27453c4 100644 (file)
@@ -46,6 +46,8 @@
 
 #define TOKENIZER_CHUNK_SIZE  4096
 
+using namespace std;
+
 namespace WebCore {
 
 using namespace HTMLNames;
@@ -512,7 +514,7 @@ HTMLTokenizer::State HTMLTokenizer::parseComment(SegmentedString &src, State sta
         scriptCode[ scriptCodeSize++ ] = *src;
 #if defined(TOKEN_DEBUG) && TOKEN_DEBUG > 1
         qDebug("comment is now: *%s*",
-               QConstString((QChar*)src.operator->(), kMin(16U, src.length())).deprecatedString().latin1());
+               QConstString((QChar*)src.operator->(), min(16U, src.length())).deprecatedString().latin1());
 #endif
 
         if (strict) {
@@ -687,7 +689,7 @@ HTMLTokenizer::State HTMLTokenizer::parseEntity(SegmentedString &src, QChar *&de
 
         case Hexadecimal:
         {
-            int ll = kMin(src.length(), 10-cBufferPos);
+            int ll = min(src.length(), 10-cBufferPos);
             while(ll--) {
                 QChar csrc(src->lower());
                 cc = csrc.cell();
@@ -706,7 +708,7 @@ HTMLTokenizer::State HTMLTokenizer::parseEntity(SegmentedString &src, QChar *&de
         }
         case Decimal:
         {
-            int ll = kMin(src.length(), 9-cBufferPos);
+            int ll = min(src.length(), 9-cBufferPos);
             while(ll--) {
                 cc = src->cell();
 
@@ -725,7 +727,7 @@ HTMLTokenizer::State HTMLTokenizer::parseEntity(SegmentedString &src, QChar *&de
         }
         case EntityName:
         {
-            int ll = kMin(src.length(), 9-cBufferPos);
+            int ll = min(src.length(), 9-cBufferPos);
             while(ll--) {
                 QChar csrc = *src;
                 cc = csrc.cell();
@@ -858,7 +860,7 @@ HTMLTokenizer::State HTMLTokenizer::parseTag(SegmentedString &src, State state)
             }
 
             bool finish = false;
-            unsigned int ll = kMin(src.length(), CBUFLEN-cBufferPos);
+            unsigned int ll = min(src.length(), CBUFLEN-cBufferPos);
             while(ll--) {
                 unsigned short curchar = src->unicode();
                 if(curchar <= ' ' || curchar == '>' ) {
@@ -931,7 +933,7 @@ HTMLTokenizer::State HTMLTokenizer::parseTag(SegmentedString &src, State state)
 #if defined(TOKEN_DEBUG) && TOKEN_DEBUG > 1
             qDebug("AttributeName");
 #endif
-            int ll = kMin(src.length(), CBUFLEN-cBufferPos);
+            int ll = min(src.length(), CBUFLEN-cBufferPos);
             while(ll--) {
                 unsigned short curchar = src->unicode();
                 if (curchar <= '>' && (curchar >= '=' || curchar <= ' ')) {
@@ -1645,7 +1647,7 @@ HTMLTokenizer::~HTMLTokenizer()
 
 void HTMLTokenizer::enlargeBuffer(int len)
 {
-    int newsize = kMax(size*2, size+len);
+    int newsize = max(size*2, size+len);
     int oldoffs = (dest - buffer);
 
     buffer = (QChar*)fastRealloc(buffer, newsize*sizeof(QChar));
@@ -1655,7 +1657,7 @@ void HTMLTokenizer::enlargeBuffer(int len)
 
 void HTMLTokenizer::enlargeScriptBuffer(int len)
 {
-    int newsize = kMax(scriptCodeMaxSize*2, scriptCodeMaxSize+len);
+    int newsize = max(scriptCodeMaxSize*2, scriptCodeMaxSize+len);
     scriptCode = (QChar*)fastRealloc(scriptCode, newsize*sizeof(QChar));
     scriptCodeMaxSize = newsize;
 }
index e6abf9d..71bdf38 100644 (file)
@@ -35,6 +35,8 @@
 #include "RenderImage.h"
 #include "HTMLNames.h"
 
+using namespace std;
+
 namespace WebCore {
 
 using namespace EventNames;
@@ -603,7 +605,7 @@ Path HTMLAreaElement::getRegion(int width, int height) const
         case Circle:
             if (m_coordsLen >= 3) {
                 Length radius = m_coords[2];
-                int r = kMin(radius.calcMinValue(width), radius.calcMinValue(height));
+                int r = min(radius.calcMinValue(width), radius.calcMinValue(height));
                 return Path(IntRect(m_coords[0].calcMinValue(width) - r, m_coords[1].calcMinValue(height) - r,
                     2 * r, 2 * r), Path::Ellipse);
             }
index 586ba5b..ce87d76 100644 (file)
@@ -422,7 +422,7 @@ void HTMLTableElement::parseMappedAttribute(MappedAttribute *attr)
             addCSSLength(attr, CSS_PROP_BORDER_SPACING, attr->value());
     } else if (attr->name() == cellpaddingAttr) {
         if (!attr->value().isEmpty())
-            padding = kMax( 0, attr->value().toInt() );
+            padding = max( 0, attr->value().toInt() );
         else
             padding = 1;
         if (renderer() && renderer()->isTable()) {
index a391189..3fdca22 100644 (file)
@@ -33,6 +33,8 @@
 #include "ksvgcssproperties.c"
 #include "ksvgcssvalues.c"
 
+using namespace std;
+
 namespace WebCore {
 
 typedef Value KDOMCSSValue;
@@ -375,9 +377,9 @@ CSSValue *CSSParser::parseSVGPaint()
         if(!validUnit(v, FInteger|FPercent, true))
             return 0;
         int b = (int) (v->fValue * (v->unit == CSSPrimitiveValue::CSS_PERCENTAGE ? 256./100. : 1.));
-        r = kMax(0, kMin(255, r));
-        g = kMax(0, kMin(255, g));
-        b = kMax(0, kMin(255, b));
+        r = max(0, min(255, r));
+        g = max(0, min(255, g));
+        b = max(0, min(255, b));
         
         return new SVGPaint(SVG_PAINTTYPE_RGBCOLOR, 0, String::sprintf("rgb(%d, %d, %d)", r, g, b).impl());
     }
@@ -417,9 +419,9 @@ CSSValue *CSSParser::parseSVGColor()
         if(!validUnit(v, FInteger|FPercent, true))
             return 0;
         int b = (int) (v->fValue * (v->unit == CSSPrimitiveValue::CSS_PERCENTAGE ? 256./100. : 1.));
-        r = kMax(0, kMin(255, r));
-        g = kMax(0, kMin(255, g));
-        b = kMax(0, kMin(255, b));
+        r = max(0, min(255, r));
+        g = max(0, min(255, g));
+        b = max(0, min(255, b));
         
         return new SVGColor(String::sprintf("rgb(%d, %d, %d)", r, g, b).impl());
     }
index 59dc74c..0dccf58 100644 (file)
@@ -196,10 +196,10 @@ IntSize QComboBox::sizeHint() const
                     renderer = itemRenderer;
                 }
                 float textWidth = [renderer floatWidthForRun:&run style:&style];
-                width = kMax(width, textWidth);
+                width = max(width, textWidth);
             } while (i != e);
         }
-        _width = kMax(static_cast<int>(ceilf(width)), dimensions()[minimumTextWidth]);
+        _width = max(static_cast<int>(ceilf(width)), dimensions()[minimumTextWidth]);
         _widthGood = true;
     }
     
diff --git a/WebCore/kwq/KWQDef.h b/WebCore/kwq/KWQDef.h
deleted file mode 100644 (file)
index 7f596b6..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Copyright (C) 2003, 2006 Apple Computer, Inc.  All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
- */
-
-#ifndef KWQDEF_H_
-#define KWQDEF_H_
-
-template<typename T> inline const T& kMin(const T& a, const T& b) { return a < b ? a : b; }
-template<typename T> inline const T& kMax(const T& a, const T& b) { return b < a ? a : b; }
-
-#endif
index c3768bf..d0e1cf0 100644 (file)
@@ -302,7 +302,7 @@ IntSize QListBox::sizeForNumberOfLines(int lines) const
                 WebCoreInitializeTextRun(&run, reinterpret_cast<const UniChar *>(s.unicode()), length, 0, length);
 
                 float textWidth = [(((*i).type == KWQListBoxGroupLabel) ? groupLabelRenderer : renderer) floatWidthForRun:&run style:&style];
-                width = kMax(width, textWidth);
+                width = max(width, textWidth);
                 
                 ++i;
             
index 6f7a6ef..dbf4983 100644 (file)
@@ -33,6 +33,7 @@
 #import "WebCoreWidgetHolder.h"
 #import "render_form.h"
 
+using namespace std;
 using namespace WebCore;
 
 @interface KWQSlider : NSSlider <WebCoreWidgetHolder>
@@ -242,7 +243,7 @@ IntSize QSlider::sizeHint() const
 
 void QSlider::setValue(double v)
 {
-    double val = kMax(m_minVal, kMin(v, m_maxVal));
+    double val = max(m_minVal, min(v, m_maxVal));
     
     KWQSlider* slider = (KWQSlider*)getView();
     [slider setDoubleValue: val];
index 3151478..2ff7762 100644 (file)
@@ -38,6 +38,8 @@
 #include "TransferJob.h"
 #include "loader.h"
 
+using namespace std;
+
 namespace WebCore {
 
 const int defaultCacheSize = 4096 * 1024;
@@ -438,7 +440,7 @@ void Cache::flush(bool force)
 void Cache::setSize(int bytes)
 {
     maxSize = bytes;
-    maxCacheable = kMax(maxSize / 128, minMaxCacheableObjectSize);
+    maxCacheable = max(maxSize / 128, minMaxCacheableObjectSize);
 
     // may be we need to clear parts of the cache
     flushCount = 0;
index 7ff2a6d..f5e6c9a 100644 (file)
@@ -78,6 +78,7 @@
 #include "SVGDocumentExtensions.h"
 #endif
 
+using namespace std;
 using namespace KJS;
 
 namespace WebCore {
@@ -2906,7 +2907,7 @@ void Frame::forceLayoutWithPageWidthRange(float minPageWidth, float maxPageWidth
         // implementation should not do this!
         int rightmostPos = root->rightmostPosition();
         if (rightmostPos > minPageWidth) {
-            pageW = kMin(rightmostPos, (int)ceilf(maxPageWidth));
+            pageW = min(rightmostPos, (int)ceilf(maxPageWidth));
             root->setWidth(pageW);
             root->setNeedsLayoutAndMinMaxRecalc();
             forceLayout();
index 9e738f6..01268ce 100644 (file)
@@ -26,8 +26,6 @@
 #ifndef KWQ_LIST_IMPL_H
 #define KWQ_LIST_IMPL_H
 
-#include "KWQDef.h"
-
 class KWQListNode;
 class DeprecatedPtrListImplIterator;
 
index fa2c961..31ae3bc 100644 (file)
 #include <stdio.h>
 #include <stdarg.h>
 #ifdef WIN32
-#include "Windows.h"
+#include <windows.h>
 #endif
 
+using namespace std;
 using namespace KJS;
 using namespace WebCore;
 
@@ -104,7 +105,7 @@ static inline int ucstrcmp( const DeprecatedString &as, const DeprecatedString &
         return 1;
     if ( b == 0 )
         return -1;
-    int l = kMin(as.length(), bs.length());
+    int l = min(as.length(), bs.length());
     while ( l-- && *a == *b )
         a++,b++;
     if ( l == -1 )
index 8165e11..a563b0f 100644 (file)
@@ -26,7 +26,6 @@
 #ifndef QSTRING_H_
 #define QSTRING_H_
 
-#include "KWQDef.h"
 #include <ctype.h>
 #include <unicode/uchar.h>
 #if __APPLE__
index 53f04e3..3d0482f 100644 (file)
@@ -26,7 +26,6 @@
 #ifndef KWQVALUELIST_H_
 #define KWQVALUELIST_H_
 
-#include "KWQDef.h"
 #include <kxmlcore/RefPtr.h>
 
 class DeprecatedValueListImplNode;
index 8484637..a8c2063 100644 (file)
@@ -460,10 +460,10 @@ void GraphicsContext::addRoundedRectClip(const IntRect& rect, const IntSize& top
 
     // Need sufficient width and height to contain these curves.  Sanity check our top/bottom
     // values and our width/height values to make sure the curves can all fit.
-    int requiredWidth = kMax(topLeft.width() + topRight.width(), bottomLeft.width() + bottomRight.width());
+    int requiredWidth = max(topLeft.width() + topRight.width(), bottomLeft.width() + bottomRight.width());
     if (requiredWidth > rect.width())
         return;
-    int requiredHeight = kMax(topLeft.height() + bottomLeft.height(), topRight.height() + bottomRight.height());
+    int requiredHeight = max(topLeft.height() + bottomLeft.height(), topRight.height() + bottomRight.height());
     if (requiredHeight > rect.height())
         return;
  
@@ -489,20 +489,20 @@ void GraphicsContext::addRoundedRectClip(const IntRect& rect, const IntSize& top
     // Now add five rects (one for each edge rect in between the rounded corners and one for the interior).
     CGContextAddRect(context, CGRectMake(rect.x() + topLeft.width(), rect.y(),
                                          rect.width() - topLeft.width() - topRight.width(),
-                                         kMax(topLeft.height(), topRight.height())));
+                                         max(topLeft.height(), topRight.height())));
     CGContextAddRect(context, CGRectMake(rect.x() + bottomLeft.width(), 
-                                         rect.bottom() - kMax(bottomLeft.height(), bottomRight.height()),
+                                         rect.bottom() - max(bottomLeft.height(), bottomRight.height()),
                                          rect.width() - bottomLeft.width() - bottomRight.width(),
-                                         kMax(bottomLeft.height(), bottomRight.height())));
+                                         max(bottomLeft.height(), bottomRight.height())));
     CGContextAddRect(context, CGRectMake(rect.x(), rect.y() + topLeft.height(),
-                                         kMax(topLeft.width(), bottomLeft.width()), rect.height() - topLeft.height() - bottomLeft.height()));
-    CGContextAddRect(context, CGRectMake(rect.right() - kMax(topRight.width(), bottomRight.width()),
+                                         max(topLeft.width(), bottomLeft.width()), rect.height() - topLeft.height() - bottomLeft.height()));
+    CGContextAddRect(context, CGRectMake(rect.right() - max(topRight.width(), bottomRight.width()),
                                          rect.y() + topRight.height(),
-                                         kMax(topRight.width(), bottomRight.width()), rect.height() - topRight.height() - bottomRight.height()));
-    CGContextAddRect(context, CGRectMake(rect.x() + kMax(topLeft.width(), bottomLeft.width()),
-                                         rect.y() + kMax(topLeft.height(), topRight.height()),
-                                         rect.width() - kMax(topLeft.width(), bottomLeft.width()) - kMax(topRight.width(), bottomRight.width()),
-                                         rect.height() - kMax(topLeft.height(), topRight.height()) - kMax(bottomLeft.height(), bottomRight.height())));
+                                         max(topRight.width(), bottomRight.width()), rect.height() - topRight.height() - bottomRight.height()));
+    CGContextAddRect(context, CGRectMake(rect.x() + max(topLeft.width(), bottomLeft.width()),
+                                         rect.y() + max(topLeft.height(), topRight.height()),
+                                         rect.width() - max(topLeft.width(), bottomLeft.width()) - max(topRight.width(), bottomRight.width()),
+                                         rect.height() - max(topLeft.height(), topRight.height()) - max(bottomLeft.height(), bottomRight.height())));
     CGContextClip(context);
 }
 
index 3c9b74f..d20c865 100644 (file)
@@ -37,6 +37,7 @@
 #import "render_replaced.h"
 #import <kxmlcore/Assertions.h>
 
+using namespace std;
 using namespace WebCore;
 using namespace EventNames;
 
@@ -621,8 +622,8 @@ static NSRange RangeOfParagraph(NSString *text, int paragraph)
     NSPoint initialLocalPoint = [self convertPoint:[event locationInWindow] fromView:nil];
     NSSize initialTextAreaSize = [textArea frame].size;
     
-    int minWidth = kMin((int)initialTextAreaSize.width, MinimumWidthWhileResizing);
-    int minHeight = kMin((int)initialTextAreaSize.height, MinimumHeightWhileResizing);
+    int minWidth = min((int)initialTextAreaSize.width, MinimumWidthWhileResizing);
+    int minHeight = min((int)initialTextAreaSize.height, MinimumHeightWhileResizing);
     
     BOOL handledIntrinsicMargins = NO;
     DOMCSSStyleDeclaration *oldComputedStyle = [[element ownerDocument] getComputedStyle:element :@""];
@@ -646,8 +647,8 @@ static NSRange RangeOfParagraph(NSString *text, int paragraph)
             // to drag the bottom-right corner to make the bottom-left corner move.
             // FIXME Radar 4118564: ideally we'd autoscroll the window as necessary to keep the point under
             // the cursor in view.
-            int newWidth = kMax(minWidth, (int)(initialTextAreaSize.width + (localPoint.x - initialLocalPoint.x)));
-            int newHeight = kMax(minHeight, (int)(initialTextAreaSize.height + (localPoint.y - initialLocalPoint.y)));
+            int newWidth = max(minWidth, (int)(initialTextAreaSize.width + (localPoint.x - initialLocalPoint.x)));
+            int newHeight = max(minHeight, (int)(initialTextAreaSize.height + (localPoint.y - initialLocalPoint.y)));
             [inlineStyle setWidth:[NSString stringWithFormat:@"%dpx", newWidth]];
             [inlineStyle setHeight:[NSString stringWithFormat:@"%dpx", newHeight]];
             
index 53ff841..8b57c93 100644 (file)
@@ -34,6 +34,8 @@
 #include "RenderArena.h"
 #include <kxmlcore/AlwaysInline.h>
 
+using namespace std;
+
 namespace WebCore {
 
 #ifndef NDEBUG
@@ -69,8 +71,8 @@ void InlineTextBox::operator delete(void* ptr, size_t sz)
 
 bool InlineTextBox::isSelected(int startPos, int endPos) const
 {
-    int sPos = kMax(startPos - m_start, 0);
-    int ePos = kMin(endPos - m_start, (int)m_len);
+    int sPos = max(startPos - m_start, 0);
+    int ePos = min(endPos - m_start, (int)m_len);
     return (sPos < ePos);
 }
 
@@ -99,8 +101,8 @@ RenderObject::SelectionState InlineTextBox::selectionState()
 
 IntRect InlineTextBox::selectionRect(int tx, int ty, int startPos, int endPos)
 {
-    int sPos = kMax(startPos - m_start, 0);
-    int ePos = kMin(endPos - m_start, (int)m_len);
+    int sPos = max(startPos - m_start, 0);
+    int ePos = min(endPos - m_start, (int)m_len);
     
     if (sPos >= ePos)
         return IntRect();
@@ -172,7 +174,7 @@ int InlineTextBox::placeEllipsisBox(bool ltr, int blockEdge, int ellipsisWidth,
                 // No characters should be rendered.  Set ourselves to full truncation and place the ellipsis at the min of our start
                 // and the ellipsis edge.
                 m_truncation = cFullTruncation;
-                return kMin(ellipsisX, m_x);
+                return min(ellipsisX, m_x);
             }
             
             // Set the truncation index on the text run.  The ellipsis needs to be placed just after the last visible character.
@@ -421,8 +423,8 @@ void InlineTextBox::selectionStartEnd(int& sPos, int& ePos)
             startPos = 0;
     }
 
-    sPos = kMax(startPos - m_start, 0);
-    ePos = kMin(endPos - m_start, (int)m_len);
+    sPos = max(startPos - m_start, 0);
+    ePos = min(endPos - m_start, (int)m_len);
 }
 
 void InlineTextBox::paintSelection(GraphicsContext* p, int tx, int ty, RenderStyle* style, const Font* f)
@@ -459,8 +461,8 @@ void InlineTextBox::paintSelection(GraphicsContext* p, int tx, int ty, RenderSty
 void InlineTextBox::paintMarkedTextBackground(GraphicsContext* p, int tx, int ty, RenderStyle* style, const Font* f, int startPos, int endPos)
 {
     int offset = m_start;
-    int sPos = kMax(startPos - offset, 0);
-    int ePos = kMin(endPos - offset, (int)m_len);
+    int sPos = max(startPos - offset, 0);
+    int ePos = min(endPos - offset, (int)m_len);
 
     if (sPos >= ePos)
         return;
@@ -528,11 +530,11 @@ void InlineTextBox::paintSpellingMarker(GraphicsContext* pt, int _tx, int _ty, D
         start = static_cast<RenderText*>(m_object)->width(m_start, paintStart - m_start, textPos(), m_firstLine);
     }
     if (paintEnd != marker.endOffset) {      // end points at the last char, not past it
-        paintEnd = kMin(paintEnd, marker.endOffset);
+        paintEnd = min(paintEnd, marker.endOffset);
         useWholeWidth = false;
     }
     if (m_truncation != cNoTruncation) {
-        paintEnd = kMin(paintEnd, (unsigned)m_truncation);
+        paintEnd = min(paintEnd, (unsigned)m_truncation);
         useWholeWidth = false;
     }
     if (!useWholeWidth) {
@@ -569,8 +571,8 @@ void InlineTextBox::paintTextMatchMarker(GraphicsContext* pt, int _tx, int _ty,
     int y = r->selectionTop();
     int h = r->selectionHeight();
     pt->addClip(IntRect(_tx + m_x, _ty + y, m_width, h));
-    int sPos = kMax(marker.startOffset - m_start, (unsigned)0);
-    int ePos = kMin(marker.endOffset - m_start, (unsigned)m_len);
+    int sPos = max(marker.startOffset - m_start, (unsigned)0);
+    int ePos = min(marker.endOffset - m_start, (unsigned)m_len);
     
     pt->drawHighlightForText(m_x + _tx, y + _ty, h, textObject()->tabWidth(), textPos(), 
                              textObject()->str->unicode(), textObject()->str->length(), m_start, m_len,
@@ -638,11 +640,11 @@ void InlineTextBox::paintMarkedTextUnderline(GraphicsContext* pt, int _tx, int _
         start = static_cast<RenderText*>(m_object)->width(m_start, paintStart - m_start, textPos(), m_firstLine);
     }
     if (paintEnd != underline.endOffset) {      // end points at the last char, not past it
-        paintEnd = kMin(paintEnd, (unsigned)underline.endOffset);
+        paintEnd = min(paintEnd, (unsigned)underline.endOffset);
         useWholeWidth = false;
     }
     if (m_truncation != cNoTruncation) {
-        paintEnd = kMin(paintEnd, (unsigned)m_truncation);
+        paintEnd = min(paintEnd, (unsigned)m_truncation);
         useWholeWidth = false;
     }
     if (!useWholeWidth) {
index b002ef0..7c05dc2 100644 (file)
@@ -37,6 +37,8 @@
 #include "RenderTheme.h"
 #include "KWQTextStream.h"
 
+using namespace std;
+
 namespace WebCore {
 
 using namespace HTMLNames;
@@ -360,7 +362,7 @@ IntRect RenderBlock::overflowRect(bool includeInterior) const
     if (!includeInterior && hasOverflowClip())
         return borderBox();
     int l = overflowLeft(includeInterior);
-    int t = kMin(overflowTop(includeInterior), -borderTopExtra());
+    int t = min(overflowTop(includeInterior), -borderTopExtra());
     return IntRect(l, t, overflowWidth(includeInterior) - 2*l, overflowHeight(includeInterior) + borderTopExtra() + borderBottomExtra() - 2*t);
 }
 
@@ -537,8 +539,8 @@ void RenderBlock::layoutBlock(bool relayoutChildren)
     positionListMarker();
 
     // Always ensure our overflow width/height are at least as large as our width/height.
-    m_overflowWidth = kMax(m_overflowWidth, m_width);
-    m_overflowHeight = kMax(m_overflowHeight, m_height);
+    m_overflowWidth = max(m_overflowWidth, m_width);
+    m_overflowHeight = max(m_overflowHeight, m_height);
 
     // Update our scroll information if we're overflow:auto/scroll/hidden now that we know if
     // we overflow or not.
@@ -749,8 +751,8 @@ void RenderBlock::collapseMargins(RenderObject* child, MarginInfo& marginInfo, i
     // For self-collapsing blocks, collapse our bottom margins into our
     // top to get new posTop and negTop values.
     if (child->isSelfCollapsingBlock()) {
-        posTop = kMax(posTop, child->maxBottomMargin(true));
-        negTop = kMax(negTop, child->maxBottomMargin(false));
+        posTop = max(posTop, child->maxBottomMargin(true));
+        negTop = max(negTop, child->maxBottomMargin(false));
     }
     
     // See if the top margin is quirky. We only care if this child has
@@ -762,8 +764,8 @@ void RenderBlock::collapseMargins(RenderObject* child, MarginInfo& marginInfo, i
         // block.  If it has larger margin values, then we need to update
         // our own maximal values.
         if (!style()->htmlHacks() || !marginInfo.quirkContainer() || !topQuirk) {
-            m_maxTopPosMargin = kMax(posTop, m_maxTopPosMargin);
-            m_maxTopNegMargin = kMax(negTop, m_maxTopNegMargin);
+            m_maxTopPosMargin = max(posTop, m_maxTopPosMargin);
+            m_maxTopNegMargin = max(negTop, m_maxTopNegMargin);
         }
 
         // The minute any of the margins involved isn't a quirk, don't
@@ -792,8 +794,8 @@ void RenderBlock::collapseMargins(RenderObject* child, MarginInfo& marginInfo, i
         // This child has no height.  We need to compute our
         // position before we collapse the child's margins together,
         // so that we can get an accurate position for the zero-height block.
-        int collapsedTopPos = kMax(marginInfo.posMargin(), child->maxTopMargin(true));
-        int collapsedTopNeg = kMax(marginInfo.negMargin(), child->maxTopMargin(false));
+        int collapsedTopPos = max(marginInfo.posMargin(), child->maxTopMargin(true));
+        int collapsedTopNeg = max(marginInfo.negMargin(), child->maxTopMargin(false));
         marginInfo.setMargin(collapsedTopPos, collapsedTopNeg);
         
         // Now collapse the child's margins together, which means examining our
@@ -818,7 +820,7 @@ void RenderBlock::collapseMargins(RenderObject* child, MarginInfo& marginInfo, i
              && (!style()->htmlHacks() || !marginInfo.quirkContainer() || !marginInfo.topQuirk()))) {
             // We're collapsing with a previous sibling's margins and not
             // with the top of the block.
-            m_height += kMax(marginInfo.posMargin(), posTop) - kMax(marginInfo.negMargin(), negTop);
+            m_height += max(marginInfo.posMargin(), posTop) - max(marginInfo.negMargin(), negTop);
             ypos = m_height;
         }
 
@@ -862,7 +864,7 @@ void RenderBlock::clearFloatsIfNeeded(RenderObject* child, MarginInfo& marginInf
             // For self-collapsing blocks that clear, they may end up collapsing
             // into the bottom of the parent block.  We simulate this behavior by
             // setting our positive margin value to compensate for the clear.
-            marginInfo.setPosMargin(kMax(0, child->yPos() - m_height));
+            marginInfo.setPosMargin(max(0, child->yPos() - m_height));
             marginInfo.setNegMargin(0);
             marginInfo.setSelfCollapsingBlockClearedFloat(true);
         }
@@ -900,7 +902,7 @@ int RenderBlock::estimateVerticalPosition(RenderObject* child, const MarginInfo&
     int yPosEstimate = m_height;
     if (!marginInfo.canCollapseWithTop()) {
         int childMarginTop = child->selfNeedsLayout() ? child->marginTop() : child->collapsedMarginTop();
-        yPosEstimate += kMax(marginInfo.margin(), childMarginTop);
+        yPosEstimate += max(marginInfo.margin(), childMarginTop);
     }
     return yPosEstimate;
 }
@@ -920,7 +922,7 @@ void RenderBlock::determineHorizontalPosition(RenderObject* child)
             if (style()->textAlign() != KHTML_CENTER && child->style()->marginLeft().type() != Auto) {
                 if (child->marginLeft() < 0)
                     leftOff += child->marginLeft();
-                chPos = kMax(chPos, leftOff); // Let the float sit in the child's margin if it can fit.
+                chPos = max(chPos, leftOff); // Let the float sit in the child's margin if it can fit.
             }
             else if (leftOff != xPos) {
                 // The object is shifting right. The object might be centered, so we need to
@@ -941,7 +943,7 @@ void RenderBlock::determineHorizontalPosition(RenderObject* child)
             if (style()->textAlign() != KHTML_CENTER && child->style()->marginRight().type() != Auto) {
                 if (child->marginRight() < 0)
                     rightOff -= child->marginRight();
-                chPos = kMin(chPos, rightOff - child->width()); // Let the float sit in the child's margin if it can fit.
+                chPos = min(chPos, rightOff - child->width()); // Let the float sit in the child's margin if it can fit.
             } else if (rightOff != xPos) {
                 // The object is shifting left. The object might be centered, so we need to
                 // recalculate our horizontal margins. Note that the containing block content
@@ -961,8 +963,8 @@ void RenderBlock::setCollapsedBottomMargin(const MarginInfo& marginInfo)
     if (marginInfo.canCollapseWithBottom() && !marginInfo.canCollapseWithTop()) {
         // Update our max pos/neg bottom margins, since we collapsed our bottom margins
         // with our children.
-        m_maxBottomPosMargin = kMax(m_maxBottomPosMargin, marginInfo.posMargin());
-        m_maxBottomNegMargin = kMax(m_maxBottomNegMargin, marginInfo.negMargin());
+        m_maxBottomPosMargin = max(m_maxBottomPosMargin, marginInfo.posMargin());
+        m_maxBottomNegMargin = max(m_maxBottomNegMargin, marginInfo.negMargin());
 
         if (!marginInfo.bottomQuirk())
             m_bottomMarginQuirk = false;
@@ -992,10 +994,10 @@ void RenderBlock::handleBottomOfBlock(int top, int bottom, MarginInfo& marginInf
 
     // Negative margins can cause our height to shrink below our minimal height (border/padding).
     // If this happens, ensure that the computed height is increased to the minimal height.
-    m_height = kMax(m_height, top + bottom);
+    m_height = max(m_height, top + bottom);
 
     // Always make sure our overflow height is at least our height.
-    m_overflowHeight = kMax(m_height, m_overflowHeight);
+    m_overflowHeight = max(m_height, m_overflowHeight);
 
     // Update our bottom collapsed margin info.
     setCollapsedBottomMargin(marginInfo);
@@ -1087,7 +1089,7 @@ void RenderBlock::layoutBlockChildren(bool relayoutChildren)
         determineHorizontalPosition(child);
 
         // Update our top overflow in case the child spills out the top of the block.
-        m_overflowTop = kMin(m_overflowTop, child->yPos() + child->overflowTop(false));
+        m_overflowTop = min(m_overflowTop, child->yPos() + child->overflowTop(false));
         
         // Update our height now that the child has been placed in the correct position.
         m_height += child->height();
@@ -1104,8 +1106,8 @@ void RenderBlock::layoutBlockChildren(bool relayoutChildren)
         addOverhangingFloats(static_cast<RenderBlock *>(child), -child->xPos(), -child->yPos());
 
         // See if this child has made our overflow need to grow.
-        m_overflowWidth = kMax(child->xPos() + child->overflowWidth(false), m_overflowWidth);
-        m_overflowLeft = kMin(child->xPos() + child->overflowLeft(false), m_overflowLeft);
+        m_overflowWidth = max(child->xPos() + child->overflowWidth(false), m_overflowWidth);
+        m_overflowLeft = min(child->xPos() + child->overflowLeft(false), m_overflowLeft);
         
         // Insert our compact into the block margin if we have one.
         insertCompactIfNeeded(child, compactInfo);
@@ -1652,8 +1654,8 @@ IntRect RenderBlock::fillVerticalSelectionGap(int lastTop, int lastLeft, int las
         return IntRect();
         
     // Get the selection offsets for the bottom of the gap
-    int left = blockX + kMax(lastLeft, leftSelectionOffset(rootBlock, bottomY));
-    int right = blockX + kMin(lastRight, rightSelectionOffset(rootBlock, bottomY));
+    int left = blockX + max(lastLeft, leftSelectionOffset(rootBlock, bottomY));
+    int right = blockX + min(lastRight, rightSelectionOffset(rootBlock, bottomY));
     int width = right - left;
     if (width <= 0)
         return IntRect();
@@ -1670,7 +1672,7 @@ IntRect RenderBlock::fillVerticalSelectionGap(int lastTop, int lastLeft, int las
 IntRect RenderBlock::fillLeftSelectionGap(RenderObject* selObj, int xPos, int yPos, int height, RenderBlock* rootBlock, int blockX, int blockY, int tx, int ty, const PaintInfo* i)
 {
     int top = yPos + ty;
-    int left = blockX + kMax(leftSelectionOffset(rootBlock, yPos), leftSelectionOffset(rootBlock, yPos + height));
+    int left = blockX + max(leftSelectionOffset(rootBlock, yPos), leftSelectionOffset(rootBlock, yPos + height));
     int width = tx + xPos - left;
     if (width <= 0)
         return IntRect();
@@ -1688,7 +1690,7 @@ IntRect RenderBlock::fillRightSelectionGap(RenderObject* selObj, int xPos, int y
 {
     int left = xPos + tx;
     int top = yPos + ty;
-    int right = blockX + kMin(rightSelectionOffset(rootBlock, yPos), rightSelectionOffset(rootBlock, yPos + height));
+    int right = blockX + min(rightSelectionOffset(rootBlock, yPos), rightSelectionOffset(rootBlock, yPos + height));
     int width = right - left;
     if (width <= 0)
         return IntRect();
@@ -1886,9 +1888,9 @@ void RenderBlock::positionNewFloats()
         int oldChildY = o->yPos();
         
         if ( o->style()->clear() & CLEFT )
-            y = kMax( leftBottom(), y );
+            y = max( leftBottom(), y );
         if ( o->style()->clear() & CRIGHT )
-            y = kMax( rightBottom(), y );
+            y = max( rightBottom(), y );
 
         if (o->style()->floating() == FLEFT)
         {
@@ -1897,7 +1899,7 @@ void RenderBlock::positionNewFloats()
             int fx = leftRelOffset(y,lo, false, &heightRemainingLeft);
             while (rightRelOffset(y,ro, false, &heightRemainingRight)-fx < fwidth)
             {
-                y += kMin( heightRemainingLeft, heightRemainingRight );
+                y += min( heightRemainingLeft, heightRemainingRight );
                 fx = leftRelOffset(y,lo, false, &heightRemainingLeft);
             }
             if (fx<0) fx=0;
@@ -1911,7 +1913,7 @@ void RenderBlock::positionNewFloats()
             int fx = rightRelOffset(y,ro, false, &heightRemainingRight);
             while (fx - leftRelOffset(y,lo, false, &heightRemainingLeft) < fwidth)
             {
-                y += kMin(heightRemainingLeft, heightRemainingRight);
+                y += min(heightRemainingLeft, heightRemainingRight);
                 fx = rightRelOffset(y,ro, false, &heightRemainingRight);
             }
             if (fx<f->width) fx=f->width;
@@ -2050,7 +2052,7 @@ RenderBlock::nearestFloatBottom(int height) const
     for ( ; (r = it.current()); ++it )
         if (r->endY>height && (r->endY<bottom || bottom==0))
             bottom=r->endY;
-    return kMax(bottom, height);
+    return max(bottom, height);
 }
 
 int
@@ -2099,7 +2101,7 @@ RenderBlock::lowestPosition(bool includeOverflowInterior, bool includeSelf) cons
         for ( ; (r = it.current()); ++it ) {
             if (!r->noPaint || r->node->layer()) {
                 int lp = r->startY + r->node->marginTop() + r->node->lowestPosition(false);
-                bottom = kMax(bottom, lp);
+                bottom = max(bottom, lp);
             }
         }
     }
@@ -2111,13 +2113,13 @@ RenderBlock::lowestPosition(bool includeOverflowInterior, bool includeSelf) cons
         DeprecatedPtrListIterator<RenderObject> it(*m_positionedObjects);
         for ( ; (r = it.current()); ++it ) {
             int lp = r->yPos() + r->lowestPosition(false);
-            bottom = kMax(bottom, lp);
+            bottom = max(bottom, lp);
         }
     }
 
     if (!includeSelf && lastLineBox()) {
         int lp = lastLineBox()->yPos() + lastLineBox()->height();
-        bottom = kMax(bottom, lp);
+        bottom = max(bottom, lp);
     }
     
     return bottom;
@@ -2137,7 +2139,7 @@ int RenderBlock::rightmostPosition(bool includeOverflowInterior, bool includeSel
         for ( ; (r = it.current()); ++it ) {
             if (!r->noPaint || r->node->layer()) {
                 int rp = r->left + r->node->marginLeft() + r->node->rightmostPosition(false);
-                right = kMax(right, rp);
+                right = max(right, rp);
             }
         }
     }
@@ -2147,14 +2149,14 @@ int RenderBlock::rightmostPosition(bool includeOverflowInterior, bool includeSel
         DeprecatedPtrListIterator<RenderObject> it(*m_positionedObjects);
         for ( ; (r = it.current()); ++it ) {
             int rp = r->xPos() + r->rightmostPosition(false);
-            right = kMax(right, rp);
+            right = max(right, rp);
         }
     }
 
     if (!includeSelf && firstLineBox()) {
         for (InlineRunBox* currBox = firstLineBox(); currBox; currBox = currBox->nextLineBox()) {
             int rp = currBox->xPos() + currBox->width();
-            right = kMax(right, rp);
+            right = max(right, rp);
         }
         // If this node is a root editable element, then the rightmostPosition should account for a caret at the end.
         if (node()->isContentEditable() && node() == node()->rootEditableElement() && style()->direction() == LTR)
@@ -2178,7 +2180,7 @@ int RenderBlock::leftmostPosition(bool includeOverflowInterior, bool includeSelf
         for ( ; (r = it.current()); ++it ) {
             if (!r->noPaint || r->node->layer()) {
                 int lp = r->left + r->node->marginLeft() + r->node->leftmostPosition(false);
-                left = kMin(left, lp);
+                left = min(left, lp);
             }
         }
     }
@@ -2188,13 +2190,13 @@ int RenderBlock::leftmostPosition(bool includeOverflowInterior, bool includeSelf
         DeprecatedPtrListIterator<RenderObject> it(*m_positionedObjects);
         for ( ; (r = it.current()); ++it ) {
             int lp = r->xPos() + r->leftmostPosition(false);
-            left = kMin(left, lp);
+            left = min(left, lp);
         }
     }
     
     if (!includeSelf && firstLineBox()) {
         for (InlineRunBox* currBox = firstLineBox(); currBox; currBox = currBox->nextLineBox())
-            left = kMin(left, (int)currBox->xPos());
+            left = min(left, (int)currBox->xPos());
     }
     
     return left;
@@ -2427,11 +2429,11 @@ int RenderBlock::getClearDelta(RenderObject *child)
     // to fit) and not all (we should be using nearestFloatBottom and looping).
     // Do not allow tables to wrap in quirks or even in almost strict mode 
     // (ebay on the PLT, finance.yahoo.com in the real world, versiontracker.com forces even almost strict mode not to work)
-    int result = clearSet ? kMax(0, bottom - child->yPos()) : 0;
+    int result = clearSet ? max(0, bottom - child->yPos()) : 0;
     if (!result && child->avoidsFloats() && child->style()->width().isFixed() && 
         child->minWidth() > lineWidth(child->yPos()) && child->minWidth() <= contentWidth() && 
         document()->inStrictMode())   
-        result = kMax(0, floatBottom() - child->yPos());
+        result = max(0, floatBottom() - child->yPos());
     return result;
 }
 
@@ -2674,7 +2676,7 @@ void RenderBlock::calcMinMaxWidth()
     if (childrenInline())
         calcInlineMinMaxWidth();
     else
-        calcBlockMinMaxWidth();
+        calcBlocminMaxWidth();
 
     if(m_maxWidth < m_minWidth) m_maxWidth = m_minWidth;
 
@@ -2690,18 +2692,18 @@ void RenderBlock::calcMinMaxWidth()
     if (isTableCell()) {
         Length w = static_cast<RenderTableCell*>(this)->styleOrColWidth();
         if (w.isFixed() && w.value() > 0)
-            m_maxWidth = kMax(m_minWidth, calcContentBoxWidth(w.value()));
+            m_maxWidth = max(m_minWidth, calcContentBoxWidth(w.value()));
     } else if (style()->width().isFixed() && style()->width().value() > 0)
         m_minWidth = m_maxWidth = calcContentBoxWidth(style()->width().value());
     
     if (style()->minWidth().isFixed() && style()->minWidth().value() > 0) {
-        m_maxWidth = kMax(m_maxWidth, calcContentBoxWidth(style()->minWidth().value()));
-        m_minWidth = kMax(m_minWidth, calcContentBoxWidth(style()->minWidth().value()));
+        m_maxWidth = max(m_maxWidth, calcContentBoxWidth(style()->minWidth().value()));
+        m_minWidth = max(m_minWidth, calcContentBoxWidth(style()->minWidth().value()));
     }
     
     if (style()->maxWidth().isFixed() && style()->maxWidth().value() != undefinedLength) {
-        m_maxWidth = kMin(m_maxWidth, calcContentBoxWidth(style()->maxWidth().value()));
-        m_minWidth = kMin(m_minWidth, calcContentBoxWidth(style()->maxWidth().value()));
+        m_maxWidth = min(m_maxWidth, calcContentBoxWidth(style()->maxWidth().value()));
+        m_minWidth = min(m_minWidth, calcContentBoxWidth(style()->maxWidth().value()));
     }
 
     int toAdd = 0;
@@ -2935,7 +2937,7 @@ void RenderBlock::calcInlineMinMaxWidth()
                     if (prevFloat &&
                         ((prevFloat->style()->floating() == FLEFT && (child->style()->clear() & CLEFT)) ||
                          (prevFloat->style()->floating() == FRIGHT && (child->style()->clear() & CRIGHT)))) {
-                        m_maxWidth = kMax(inlineMax, m_maxWidth);
+                        m_maxWidth = max(inlineMax, m_maxWidth);
                         inlineMax = 0;
                     }
                     prevFloat = child;
@@ -3065,14 +3067,14 @@ void RenderBlock::calcInlineMinMaxWidth()
     if (style()->collapseWhiteSpace())
         stripTrailingSpace(inlineMax, inlineMin, trailingSpaceChild);
     
-    m_minWidth = kMax(inlineMin, m_minWidth);
-    m_maxWidth = kMax(inlineMax, m_maxWidth);
+    m_minWidth = max(inlineMin, m_minWidth);
+    m_maxWidth = max(inlineMax, m_maxWidth);
 }
 
 // Use a very large value (in effect infinite).
 #define BLOCK_MAX_WIDTH 15000
 
-void RenderBlock::calcBlockMinMaxWidth()
+void RenderBlock::calcBlocminMaxWidth()
 {
     bool nowrap = style()->whiteSpace() == NOWRAP;
 
@@ -3088,11 +3090,11 @@ void RenderBlock::calcBlockMinMaxWidth()
         if (child->isFloating() || child->avoidsFloats()) {
             int floatTotalWidth = floatLeftWidth + floatRightWidth;
             if (child->style()->clear() & CLEFT) {
-                m_maxWidth = kMax(floatTotalWidth, m_maxWidth);
+                m_maxWidth = max(floatTotalWidth, m_maxWidth);
                 floatLeftWidth = 0;
             }
             if (child->style()->clear() & CRIGHT) {
-                m_maxWidth = kMax(floatTotalWidth, m_maxWidth);
+                m_maxWidth = max(floatTotalWidth, m_maxWidth);
                 floatRightWidth = 0;
             }
         }
@@ -3137,13 +3139,13 @@ void RenderBlock::calcBlockMinMaxWidth()
                 // Determine a left and right max value based off whether or not the floats can fit in the
                 // margins of the object.  For negative margins, we will attempt to overlap the float if the negative margin
                 // is smaller than the float width.
-                int maxLeft = marginLeft > 0 ? kMax(floatLeftWidth, marginLeft) : floatLeftWidth + marginLeft;
-                int maxRight = marginRight > 0 ? kMax(floatRightWidth, marginRight) : floatRightWidth + marginRight;
+                int maxLeft = marginLeft > 0 ? max(floatLeftWidth, marginLeft) : floatLeftWidth + marginLeft;
+                int maxRight = marginRight > 0 ? max(floatRightWidth, marginRight) : floatRightWidth + marginRight;
                 w = child->maxWidth() + maxLeft + maxRight;
-                w = kMax(w, floatLeftWidth + floatRightWidth);
+                w = max(w, floatLeftWidth + floatRightWidth);
             }
             else
-                m_maxWidth = kMax(floatLeftWidth + floatRightWidth, m_maxWidth);
+                m_maxWidth = max(floatLeftWidth + floatRightWidth, m_maxWidth);
             floatLeftWidth = floatRightWidth = 0;
         }
         
@@ -3182,10 +3184,10 @@ void RenderBlock::calcBlockMinMaxWidth()
     }
 
     // Always make sure these values are non-negative.
-    m_minWidth = kMax(0, m_minWidth);
-    m_maxWidth = kMax(0, m_maxWidth);
+    m_minWidth = max(0, m_minWidth);
+    m_maxWidth = max(0, m_maxWidth);
 
-    m_maxWidth = kMax(floatLeftWidth + floatRightWidth, m_maxWidth);
+    m_maxWidth = max(floatLeftWidth + floatRightWidth, m_maxWidth);
 }
 
 short RenderBlock::lineHeight(bool b, bool isRootLineBox) const
index fd8ae08..fb0e1fd 100644 (file)
@@ -200,7 +200,7 @@ public:
     
     virtual void calcMinMaxWidth();
     void calcInlineMinMaxWidth();
-    void calcBlockMinMaxWidth();
+    void calcBlocminMaxWidth();
 
     virtual int getBaselineOfFirstLineBox() const;
     virtual int getBaselineOfLastLineBox() const;
index dacbb30..59a6479 100644 (file)
@@ -41,6 +41,8 @@
 #include "RenderTheme.h"
 #include <assert.h>
 
+using namespace std;
+
 namespace WebCore {
 
 using namespace HTMLNames;
@@ -201,7 +203,7 @@ int RenderBox::calcBorderBoxWidth(int w) const
     int toAdd = borderLeft() + borderRight() + paddingLeft() + paddingRight();
     if (style()->boxSizing() == CONTENT_BOX)
         return w + toAdd;
-    return kMax(w, toAdd);
+    return max(w, toAdd);
 }
 
 int RenderBox::calcBorderBoxHeight(int h) const
@@ -209,21 +211,21 @@ int RenderBox::calcBorderBoxHeight(int h) const
     int toAdd = borderTop() + borderBottom() + paddingTop() + paddingBottom();
     if (style()->boxSizing() == CONTENT_BOX)
         return h + toAdd;
-    return kMax(h, toAdd);
+    return max(h, toAdd);
 }
 
 int RenderBox::calcContentBoxWidth(int w) const
 {
     if (style()->boxSizing() == BORDER_BOX)
         w -= (borderLeft() + borderRight() + paddingLeft() + paddingRight());
-    return kMax(0, w);
+    return max(0, w);
 }
 
 int RenderBox::calcContentBoxHeight(int h) const
 {
     if (style()->boxSizing() == BORDER_BOX)
         h -= (borderTop() + borderBottom() + paddingTop() + paddingBottom());
-    return kMax(0, h);
+    return max(0, h);
 }
 
 // Hit Testing
@@ -298,14 +300,14 @@ void RenderBox::paintRootBoxDecorations(PaintInfo& i, int _tx, int _ty)
     
     int bx = _tx - marginLeft();
     int by = _ty - marginTop();
-    int bw = kMax(w + marginLeft() + marginRight() + borderLeft() + borderRight(), rw);
-    int bh = kMax(h + marginTop() + marginBottom() + borderTop() + borderBottom(), rh);
+    int bw = max(w + marginLeft() + marginRight() + borderLeft() + borderRight(), rw);
+    int bh = max(h + marginTop() + marginBottom() + borderTop() + borderBottom(), rh);
 
     // CSS2 14.2:
     // " The background of the box generated by the root element covers the entire canvas."
     // hence, paint the background even in the margin areas (unlike for every other element!)
     // I just love these little inconsistencies .. :-( (Dirk)
-    int my = kMax(by, i.r.y());
+    int my = max(by, i.r.y());
 
     paintBackgrounds(i.p, bgColor, bgLayer, my, i.r.height(), bx, by, bw, bh);
 
@@ -325,12 +327,12 @@ void RenderBox::paintBoxDecorations(PaintInfo& i, int _tx, int _ty)
     int h = height() + borderTopExtra() + borderBottomExtra();
     _ty -= borderTopExtra();
 
-    int my = kMax(_ty, i.r.y());
+    int my = max(_ty, i.r.y());
     int mh;
     if (_ty < i.r.y())
-        mh = kMax(0, h - (i.r.y() - _ty));
+        mh = max(0, h - (i.r.y() - _ty));
     else
-        mh = kMin(i.r.height(), h);
+        mh = min(i.r.height(), h);
 
     // If we have a native theme appearance, paint that before painting our background.  
     // The theme will tell us whether or not we should also paint the CSS background.
@@ -923,7 +925,7 @@ void RenderBox::calcWidth()
             m_marginRight = mr.calcMinValue(cw);
             if (treatAsReplaced) {
                 m_width = w.calcValue(cw) + borderLeft() + borderRight() + paddingLeft() + paddingRight();
-                m_width = kMax(m_width, m_minWidth);
+                m_width = max(m_width, m_minWidth);
             }
             return;
         }
@@ -988,8 +990,8 @@ int RenderBox::calcWidthUsing(WidthType widthType, int cw, LengthType& lengthTyp
         if (cw) width = cw - marginLeft - marginRight;
         
         if (sizesToIntrinsicWidth(widthType)) {
-            width = kMax(width, m_minWidth);
-            width = kMin(width, m_maxWidth);
+            width = max(width, m_minWidth);
+            width = min(width, m_maxWidth);
         }
     }
     else
@@ -1089,7 +1091,7 @@ void RenderBox::calcHeight()
         bool inHorizontalBox = parent()->isFlexibleBox() && parent()->style()->boxOrient() == HORIZONTAL;
         bool stretching = parent()->style()->boxAlign() == BSTRETCH;
         bool treatAsReplaced = isReplaced() && !isInlineBlockOrInlineTable() && (!inHorizontalBox || !stretching);
-        bool checkMinMaxHeight = false;
+        bool checminMaxHeight = false;
         
         // The parent box is flexing us, so it has increased or decreased our height.  We have to
         // grab our cached flexible height.
@@ -1100,7 +1102,7 @@ void RenderBox::calcHeight()
             h = Length(calcReplacedHeight(), Fixed);
         else {
             h = style()->height();
-            checkMinMaxHeight = true;
+            checminMaxHeight = true;
         }
         
         // Block children of horizontal flexible boxes fill the height of the box.
@@ -1108,11 +1110,11 @@ void RenderBox::calcHeight()
             && parent()->isStretchingChildren()) {
             h = Length(parent()->contentHeight() - marginTop() - marginBottom() -
                        borderTop() - paddingTop() - borderBottom() - paddingBottom(), Fixed);
-            checkMinMaxHeight = false;
+            checminMaxHeight = false;
         }
 
         int height;
-        if (checkMinMaxHeight) {
+        if (checminMaxHeight) {
             height = calcHeightUsing(style()->height());
             if (height == -1)
                 height = m_height;
@@ -1120,8 +1122,8 @@ void RenderBox::calcHeight()
             int maxH = style()->maxHeight().value() == undefinedLength ? height : calcHeightUsing(style()->maxHeight());
             if (maxH == -1)
                 maxH = height;
-            height = kMin(maxH, height);
-            height = kMax(minH, height);
+            height = min(maxH, height);
+            height = max(minH, height);
         }
         else
             // The only times we don't check min/max height are when a fixed length has 
@@ -1136,7 +1138,7 @@ void RenderBox::calcHeight()
     if (style()->overflow() == OMARQUEE && m_layer && m_layer->marquee() && 
         m_layer->marquee()->isUnfurlMarquee() && !m_layer->marquee()->isHorizontal()) {
         m_layer->marquee()->setEnd(m_height);
-        m_height = kMin(m_height, m_layer->marquee()->unfurlPos());
+        m_height = min(m_height, m_layer->marquee()->unfurlPos());
     }
     
     // WinIE quirk: The <html> block always fills the entire canvas in quirks mode.  The <body> always fills the
@@ -1147,9 +1149,9 @@ void RenderBox::calcHeight()
         int margins = collapsedMarginTop() + collapsedMarginBottom();
         int visHeight = canvas()->view()->visibleHeight();
         if (isRoot())
-            m_height = kMax(m_height, visHeight - margins);
+            m_height = max(m_height, visHeight - margins);
         else
-            m_height = kMax(m_height, visHeight - 
+            m_height = max(m_height, visHeight - 
                             (margins + parent()->marginTop() + parent()->marginBottom() + 
                              parent()->borderTop() + parent()->borderBottom() +
                              parent()->paddingTop() + parent()->paddingBottom()));
@@ -1238,7 +1240,7 @@ int RenderBox::calcPercentageHeight(const Length& height)
             // box model.  This is essential for sizing inside
             // table cells using percentage heights.
             result -= (borderTop() + paddingTop() + borderBottom() + paddingBottom());
-            result = kMax(0, result);
+            result = max(0, result);
         }
     }
     return result;
@@ -1250,7 +1252,7 @@ int RenderBox::calcReplacedWidth() const
     int minW = calcReplacedWidthUsing(MinWidth);
     int maxW = style()->maxWidth().value() == undefinedLength ? width : calcReplacedWidthUsing(MaxWidth);
 
-    return kMax(minW, kMin(width, maxW));
+    return max(minW, min(width, maxW));
 }
 
 int RenderBox::calcReplacedWidthUsing(WidthType widthType) const
@@ -1283,7 +1285,7 @@ int RenderBox::calcReplacedHeight() const
     int minH = calcReplacedHeightUsing(MinHeight);
     int maxH = style()->maxHeight().value() == undefinedLength ? height : calcReplacedHeightUsing(MaxHeight);
 
-    return kMax(minH, kMin(height, maxH));
+    return max(minH, min(height, maxH));
 }
 
 int RenderBox::calcReplacedHeightUsing(HeightType heightType) const
@@ -1488,7 +1490,7 @@ void RenderBox::calcAbsoluteHorizontalValues(WidthType widthType, RenderObject*
         if (l == AUTO && w == AUTO && r != AUTO) {
             // From section 10.3.7 of the CSS2.1 specification.
             // "The shrink-to-fit width is: min(max(preferred minimum width, available width), preferred width)."
-            w = kMin(kMax(m_minWidth - pab, cw - (r + ml + mr + pab)), m_maxWidth - pab);
+            w = min(max(m_minWidth - pab, cw - (r + ml + mr + pab)), m_maxWidth - pab);
             l = cw - (r + w + ml + mr + pab);
         }
         else
@@ -1508,7 +1510,7 @@ void RenderBox::calcAbsoluteHorizontalValues(WidthType widthType, RenderObject*
         else if (l != AUTO && w == AUTO && r == AUTO) {
             // From section 10.3.7 of the CSS2.1 specification.
             // "The shrink-to-fit width is: min(max(preferred minimum width, available width), preferred width)."
-            w = kMin(kMax(m_minWidth - pab, cw - (l + ml + mr + pab)), m_maxWidth - pab);
+            w = min(max(m_minWidth - pab, cw - (l + ml + mr + pab)), m_maxWidth - pab);
             r = cw - (l + w + ml + mr + pab);
         }
         else
@@ -1714,7 +1716,7 @@ void RenderBox::calcAbsoluteVerticalValues(HeightType heightType, RenderObject*
     
     // Do not allow the height to be negative.  This can happen when someone specifies both top and bottom
     // but the containing block height is less than top, e.g., top:20px, bottom:0, containing block height 16.
-    ourHeight = kMax(0, ourHeight);
+    ourHeight = max(0, ourHeight);
     
     h = ourHeight;
     y = t + mt + cb->borderTop();
index a1b3bcc..2b9c9cb 100644 (file)
@@ -124,8 +124,8 @@ void RenderCanvas::layout()
     // ### we could maybe do the call below better and only pass true if the docsize changed.
     layoutPositionedObjects( true );
 
-    layer()->setHeight(kMax(doch, m_height));
-    layer()->setWidth(kMax(docw, m_width));
+    layer()->setHeight(max(doch, m_height));
+    layer()->setWidth(max(docw, m_width));
     
     setNeedsLayout(false);
 }
index ab3564e..c2691df 100644 (file)
@@ -25,7 +25,7 @@
 #include "config.h"
 #include "RenderFlexibleBox.h"
 
-using namespace WebCore;
+using namespace std;
 
 namespace WebCore {
 
@@ -217,13 +217,13 @@ void RenderFlexibleBox::calcMinMaxWidth()
         m_minWidth = m_maxWidth = calcContentBoxWidth(style()->width().value());
    
     if (style()->minWidth().isFixed() && style()->minWidth().value() > 0) {
-        m_maxWidth = kMax(m_maxWidth, calcContentBoxWidth(style()->minWidth().value()));
-        m_minWidth = kMax(m_minWidth, calcContentBoxWidth(style()->minWidth().value()));
+        m_maxWidth = max(m_maxWidth, calcContentBoxWidth(style()->minWidth().value()));
+        m_minWidth = max(m_minWidth, calcContentBoxWidth(style()->minWidth().value()));
     }
     
     if (style()->maxWidth().isFixed() && style()->maxWidth().value() != undefinedLength) {
-        m_maxWidth = kMin(m_maxWidth, calcContentBoxWidth(style()->maxWidth().value()));
-        m_minWidth = kMin(m_minWidth, calcContentBoxWidth(style()->maxWidth().value()));
+        m_maxWidth = min(m_maxWidth, calcContentBoxWidth(style()->maxWidth().value()));
+        m_minWidth = min(m_minWidth, calcContentBoxWidth(style()->maxWidth().value()));
     }
 
     int toAdd = borderLeft() + borderRight() + paddingLeft() + paddingRight();
@@ -406,16 +406,16 @@ void RenderFlexibleBox::layoutHorizontalBox(bool relayoutChildren)
                 int descent = (child->marginTop() + child->height() + child->marginBottom()) - ascent;
                 
                 // Update our maximum ascent.
-                maxAscent = kMax(maxAscent, ascent);
+                maxAscent = max(maxAscent, ascent);
                 
                 // Update our maximum descent.
-                maxDescent = kMax(maxDescent, descent);
+                maxDescent = max(maxDescent, descent);
                 
                 // Now update our height.
-                m_height = kMax(yPos + maxAscent + maxDescent, m_height);
+                m_height = max(yPos + maxAscent + maxDescent, m_height);
             }
             else
-                m_height = kMax(m_height, yPos + child->marginTop() + child->height() + child->marginBottom());
+                m_height = max(m_height, yPos + child->marginTop() + child->height() + child->marginBottom());
 
             child = iterator.next();
         }
@@ -470,7 +470,7 @@ void RenderFlexibleBox::layoutHorizontalBox(bool relayoutChildren)
             int childY = yPos;
             switch (style()->boxAlign()) {
                 case BCENTER:
-                    childY += child->marginTop() + kMax(0, (contentHeight() - (child->height() + child->marginTop() + child->marginBottom()))/2);
+                    childY += child->marginTop() + max(0, (contentHeight() - (child->height() + child->marginTop() + child->marginBottom()))/2);
                     break;
                 case BBASELINE: {
                     int ascent = child->marginTop() + child->getBaselineOfFirstLineBox();
@@ -488,8 +488,8 @@ void RenderFlexibleBox::layoutHorizontalBox(bool relayoutChildren)
             }
 
             placeChild(child, xPos, childY);
-            m_overflowHeight = kMax(m_overflowHeight, childY + child->overflowHeight(false));
-            m_overflowTop = kMin(m_overflowTop, child->yPos() + child->overflowTop(false));
+            m_overflowHeight = max(m_overflowHeight, childY + child->overflowHeight(false));
+            m_overflowTop = min(m_overflowTop, child->yPos() + child->overflowTop(false));
             
             xPos += child->width() + child->marginRight();
     
@@ -533,7 +533,7 @@ void RenderFlexibleBox::layoutHorizontalBox(bool relayoutChildren)
                         int allowedFlex = allowedChildFlex(child, expanding, i);
                         if (allowedFlex) {
                             int projectedFlex = (allowedFlex == INT_MAX) ? allowedFlex : (int)(allowedFlex * (totalFlex / child->style()->boxFlex()));
-                            spaceAvailableThisPass = expanding ? kMin(spaceAvailableThisPass, projectedFlex) : kMax(spaceAvailableThisPass, projectedFlex);
+                            spaceAvailableThisPass = expanding ? min(spaceAvailableThisPass, projectedFlex) : max(spaceAvailableThisPass, projectedFlex);
                         }
                         child = iterator.next();
                     }
@@ -641,14 +641,14 @@ void RenderFlexibleBox::layoutHorizontalBox(bool relayoutChildren)
     }
     
     if (child) {
-        m_overflowLeft = kMin(child->xPos() + child->overflowLeft(false), m_overflowLeft);
+        m_overflowLeft = min(child->xPos() + child->overflowLeft(false), m_overflowLeft);
 
         RenderObject* lastChild = child;
         while ((child = iterator.next())) {
             if (!child->isPositioned())
                 lastChild = child;
         }
-        m_overflowWidth = kMax(lastChild->xPos() + lastChild->overflowWidth(false), m_overflowWidth);
+        m_overflowWidth = max(lastChild->xPos() + lastChild->overflowWidth(false), m_overflowWidth);
     }
     
     // So that the calcHeight in layoutBlock() knows to relayout positioned objects because of
@@ -713,7 +713,7 @@ void RenderFlexibleBox::layoutVerticalBox(bool relayoutChildren)
                 }
                 child->layoutIfNeeded();
                 if (child->style()->height().isAuto() && child->isBlockFlow())
-                    maxLineCount = kMax(maxLineCount, static_cast<RenderBlock*>(child)->lineCount());
+                    maxLineCount = max(maxLineCount, static_cast<RenderBlock*>(child)->lineCount());
             }
             child = iterator.next();
         }
@@ -829,7 +829,7 @@ void RenderFlexibleBox::layoutVerticalBox(bool relayoutChildren)
             switch (style()->boxAlign()) {
                 case BCENTER:
                 case BBASELINE: // Baseline just maps to center for vertical boxes
-                    childX += child->marginLeft() + kMax(0, (contentWidth() - (child->width() + child->marginLeft() + child->marginRight()))/2);
+                    childX += child->marginLeft() + max(0, (contentWidth() - (child->width() + child->marginLeft() + child->marginRight()))/2);
                     break;
                 case BEND:
                     if (style()->direction() == RTL)
@@ -850,8 +850,8 @@ void RenderFlexibleBox::layoutVerticalBox(bool relayoutChildren)
             m_height += child->height() + child->marginBottom();
     
             // See if this child has made our overflow need to grow.
-            m_overflowWidth = kMax(child->xPos() + child->overflowWidth(false), m_overflowWidth);
-            m_overflowLeft = kMin(child->xPos() + child->overflowLeft(false), m_overflowLeft);
+            m_overflowWidth = max(child->xPos() + child->overflowWidth(false), m_overflowWidth);
+            m_overflowLeft = min(child->xPos() + child->overflowLeft(false), m_overflowLeft);
             
             child = iterator.next();
         }
@@ -910,7 +910,7 @@ void RenderFlexibleBox::layoutVerticalBox(bool relayoutChildren)
                         int allowedFlex = allowedChildFlex(child, expanding, i);
                         if (allowedFlex) {
                             int projectedFlex = (allowedFlex == INT_MAX) ? allowedFlex : (int)(allowedFlex * (totalFlex / child->style()->boxFlex()));
-                            spaceAvailableThisPass = expanding ? kMin(spaceAvailableThisPass, projectedFlex) : kMax(spaceAvailableThisPass, projectedFlex);
+                            spaceAvailableThisPass = expanding ? min(spaceAvailableThisPass, projectedFlex) : max(spaceAvailableThisPass, projectedFlex);
                         }
                         child = iterator.next();
                     }
@@ -1014,14 +1014,14 @@ void RenderFlexibleBox::layoutVerticalBox(bool relayoutChildren)
     }
     
     if (child) {
-        m_overflowTop = kMin(child->yPos() + child->overflowTop(false), m_overflowTop);
+        m_overflowTop = min(child->yPos() + child->overflowTop(false), m_overflowTop);
 
         RenderObject* lastChild = child;
         while ((child = iterator.next())) {
             if (!child->isPositioned())
                 lastChild = child;
         }
-        m_overflowHeight = kMax(lastChild->yPos() + lastChild->overflowHeight(false), m_overflowHeight);
+        m_overflowHeight = max(lastChild->yPos() + lastChild->overflowHeight(false), m_overflowHeight);
     }
 
     // So that the calcHeight in layoutBlock() knows to relayout positioned objects because of
@@ -1064,7 +1064,7 @@ int RenderFlexibleBox::allowedChildFlex(RenderObject* child, bool expanding, uns
                 maxW = child->minWidth();
             if (maxW == INT_MAX)
                 return maxW;
-            return kMax(0, maxW - w);
+            return max(0, maxW - w);
         } else {
             // FIXME: For now just handle fixed values.
             int maxH = INT_MAX;
@@ -1074,7 +1074,7 @@ int RenderFlexibleBox::allowedChildFlex(RenderObject* child, bool expanding, uns
                 maxH = child->style()->maxHeight().value();
             if (maxH == INT_MAX)
                 return maxH;
-            return kMax(0, maxH - h);
+            return max(0, maxH - h);
         }
     }
 
@@ -1089,13 +1089,13 @@ int RenderFlexibleBox::allowedChildFlex(RenderObject* child, bool expanding, uns
         else if (child->style()->minWidth().type() == MinIntrinsic)
             minW = child->minWidth();
             
-        int allowedShrinkage = kMin(0, minW - w);
+        int allowedShrinkage = min(0, minW - w);
         return allowedShrinkage;
     } else {
         if (child->style()->minHeight().isFixed()) {
             int minH = child->style()->minHeight().value();
             int h = child->contentHeight();
-            int allowedShrinkage = kMin(0, minH - h);
+            int allowedShrinkage = min(0, minH - h);
             return allowedShrinkage;
         }
     }
@@ -1114,6 +1114,4 @@ const char *RenderFlexibleBox::renderName() const
     return "RenderFlexibleBox";
 }
 
-
 } // namespace WebCore
-
index d003c71..2ce8f2a 100644 (file)
@@ -33,6 +33,8 @@
 #include "RenderCanvas.h"
 #include "RenderInline.h"
 
+using namespace std;
+
 namespace WebCore {
 
 using namespace HTMLNames;
@@ -396,7 +398,7 @@ void RenderFlow::paintLines(PaintInfo& i, int _tx, int _ty)
             }
         }
 
-        int top = kMin(curr->root()->topOverflow(), curr->root()->selectionTop()) - maximalOutlineSize(info.phase);
+        int top = min(curr->root()->topOverflow(), curr->root()->selectionTop()) - maximalOutlineSize(info.phase);
         int bottom = curr->root()->bottomOverflow() + maximalOutlineSize(info.phase);
         h = bottom - top;
         yPos = _ty + top;
@@ -525,7 +527,7 @@ RenderFlow::lowestPosition(bool includeOverflowInterior, bool includeSelf) const
     for (RenderObject *c = firstChild(); c; c = c->nextSibling()) {
         if (!c->isFloatingOrPositioned() && !c->isText() && !c->isInlineFlow()) {
             int lp = c->yPos() + c->lowestPosition(false);
-            bottom = kMax(bottom, lp);
+            bottom = max(bottom, lp);
         }
     }
     
@@ -546,7 +548,7 @@ int RenderFlow::rightmostPosition(bool includeOverflowInterior, bool includeSelf
     for (RenderObject *c = firstChild(); c; c = c->nextSibling()) {
         if (!c->isFloatingOrPositioned() && !c->isText() && !c->isInlineFlow()) {
             int rp = c->xPos() + c->rightmostPosition(false);
-            right = kMax(right, rp);
+            right = max(right, rp);
         }
     }
     
@@ -567,7 +569,7 @@ int RenderFlow::leftmostPosition(bool includeOverflowInterior, bool includeSelf)
     for (RenderObject *c = firstChild(); c; c = c->nextSibling()) {
         if (!c->isFloatingOrPositioned() && !c->isText() && !c->isInlineFlow()) {
             int lp = c->xPos() + c->leftmostPosition(false);
-            left = kMin(left, lp);
+            left = min(left, lp);
         }
     }
     
@@ -750,7 +752,7 @@ void RenderFlow::paintOutlineForLine(GraphicsContext* p, int tx, int ty, const I
         drawBorder(p,
                    l - ow,
                    t - ow,
-                   kMin(r+ow, (lastline.isEmpty() ? 1000000 : tx + lastline.x())),
+                   min(r+ow, (lastline.isEmpty() ? 1000000 : tx + lastline.x())),
                    t ,
                    BSTop, oc, style()->color(), os,
                    ow,
@@ -759,7 +761,7 @@ void RenderFlow::paintOutlineForLine(GraphicsContext* p, int tx, int ty, const I
     
     if (lastline.right() < thisline.right())
         drawBorder(p,
-                   kMax(lastline.isEmpty() ? -1000000 : tx + lastline.right(), l - ow),
+                   max(lastline.isEmpty() ? -1000000 : tx + lastline.right(), l - ow),
                    t - ow,
                    r + ow,
                    t ,
@@ -773,7 +775,7 @@ void RenderFlow::paintOutlineForLine(GraphicsContext* p, int tx, int ty, const I
         drawBorder(p,
                    l - ow,
                    b,
-                   kMin(r + ow, !nextline.isEmpty() ? tx + nextline.x() + 1 : 1000000),
+                   min(r + ow, !nextline.isEmpty() ? tx + nextline.x() + 1 : 1000000),
                    b + ow,
                    BSBottom, oc, style()->color(), os,
                    ow,
@@ -782,7 +784,7 @@ void RenderFlow::paintOutlineForLine(GraphicsContext* p, int tx, int ty, const I
     
     if (nextline.right() < thisline.right())
         drawBorder(p,
-                   kMax(!nextline.isEmpty() ? tx + nextline.right() : -1000000, l - ow),
+                   max(!nextline.isEmpty() ? tx + nextline.right() : -1000000, l - ow),
                    b,
                    r + ow,
                    b + ow,
index abd7fdf..9a3efdb 100644 (file)
@@ -35,6 +35,8 @@
 #include "HTMLNames.h"
 #include "RenderCanvas.h"
 
+using namespace std;
+
 namespace WebCore {
 
 using namespace HTMLNames;
@@ -102,8 +104,8 @@ void RenderImage::imageChanged(CachedImage* o)
         // we have an alt and the user meant it (its not a text we invented)
         if (!m_altText.isEmpty()) {
             const Font& font = style()->font();
-            iw = kMax(iw, kMin(font.width(m_altText.deprecatedString()), 1024));
-            ih = kMax(ih, kMin(font.height(), 256));
+            iw = max(iw, min(font.width(m_altText.deprecatedString()), 1024));
+            ih = max(ih, min(font.height(), 256));
         }
 
         if (iw != intrinsicWidth()) {
@@ -362,7 +364,7 @@ int RenderImage::calcReplacedWidth() const
     int minW = calcReplacedWidthUsing(MinWidth);
     int maxW = style()->maxWidth().value() == undefinedLength ? width : calcReplacedWidthUsing(MaxWidth);
 
-    return kMax(minW, kMin(width, maxW));
+    return max(minW, min(width, maxW));
 }
 
 int RenderImage::calcReplacedHeight() const
@@ -376,7 +378,7 @@ int RenderImage::calcReplacedHeight() const
     int minH = calcReplacedHeightUsing(MinHeight);
     int maxH = style()->maxHeight().value() == undefinedLength ? height : calcReplacedHeightUsing(MaxHeight);
 
-    return kMax(minH, kMin(height, maxH));
+    return max(minH, min(height, maxH));
 }
 
 int RenderImage::calcAspectRatioWidth() const
index 9d07fc8..35bef88 100644 (file)
@@ -69,6 +69,8 @@
 
 #define MIN_INTERSECT_FOR_REVEAL 32
 
+using namespace std;
+
 namespace WebCore {
 
 using namespace EventNames;
@@ -628,8 +630,8 @@ void RenderLayer::scrollRectToVisible(const IntRect &rect, const ScrollAlignment
         xOffset = r.x() - xPos();
         yOffset = r.y() - yPos();
         // Adjust offsets if they're outside of the allowable range.
-        xOffset = kMax(0, kMin(scrollWidth() - width(), xOffset));
-        yOffset = kMax(0, kMin(scrollHeight() - height(), yOffset));
+        xOffset = max(0, min(scrollWidth() - width(), xOffset));
+        yOffset = max(0, min(scrollHeight() - height(), yOffset));
         
         if (xOffset != scrollXOffset() || yOffset != scrollYOffset()) {
             int diffX = scrollXOffset();
@@ -654,8 +656,8 @@ void RenderLayer::scrollRectToVisible(const IntRect &rect, const ScrollAlignment
             xOffset = r.x();
             yOffset = r.y();
             // Adjust offsets if they're outside of the allowable range.
-            xOffset = kMax(0, kMin(view->contentsWidth(), xOffset));
-            yOffset = kMax(0, kMin(view->contentsHeight(), yOffset));
+            xOffset = max(0, min(view->contentsWidth(), xOffset));
+            yOffset = max(0, min(view->contentsHeight(), yOffset));
 
             if (m_object->document() && m_object->document()->ownerElement() && m_object->document()->ownerElement()->renderer()) {
                 view->setContentsPos(xOffset, yOffset);
@@ -907,15 +909,15 @@ void RenderLayer::computeScrollDimensions(bool* needHBar, bool* needVBar)
     int clientWidth = m_object->clientWidth();
     int clientHeight = m_object->clientHeight();
 
-    m_scrollLeftOverflow = ltr ? 0 : kMin(0, m_object->leftmostPosition(true, false) - m_object->borderLeft());
+    m_scrollLeftOverflow = ltr ? 0 : min(0, m_object->leftmostPosition(true, false) - m_object->borderLeft());
 
     int rightPos = ltr ?
                     m_object->rightmostPosition(true, false) - m_object->borderLeft() :
                     clientWidth - m_scrollLeftOverflow;
     int bottomPos = m_object->lowestPosition(true, false) - m_object->borderTop();
 
-    m_scrollWidth = kMax(rightPos, clientWidth);
-    m_scrollHeight = kMax(bottomPos, clientHeight);
+    m_scrollWidth = max(rightPos, clientWidth);
+    m_scrollHeight = max(bottomPos, clientHeight);
     
     m_scrollOriginX = ltr ? 0 : m_scrollWidth - clientWidth;
 
@@ -938,8 +940,8 @@ RenderLayer::updateScrollInfoAfterLayout()
     if (m_object->style()->overflow() != OMARQUEE) {
         // Layout may cause us to be in an invalid scroll position.  In this case we need
         // to pull our scroll offsets back to the max (or push them up to the min).
-        int newX = kMax(0, kMin(scrollXOffset(), scrollWidth() - m_object->clientWidth()));
-        int newY = kMax(0, kMin(m_scrollY, scrollHeight() - m_object->clientHeight()));
+        int newX = max(0, min(scrollXOffset(), scrollWidth() - m_object->clientWidth()));
+        int newY = max(0, min(m_scrollY, scrollHeight() - m_object->clientHeight()));
         if (newX != scrollXOffset() || newY != m_scrollY)
             scrollToOffset(newX, newY);
         // FIXME: At this point a scroll event fired, which could have deleted this layer.
@@ -1466,7 +1468,7 @@ IntRect RenderLayer::absoluteBoundingBox() const
         int bottom = inlineFlow->lastLineBox()->root()->bottomOverflow();
         int left = firstBox->xPos();
         for (InlineRunBox* curr = firstBox->nextLineBox(); curr; curr = curr->nextLineBox())
-            left = kMin(left, curr->xPos());
+            left = min(left, curr->xPos());
         result = IntRect(m_x + left, m_y + (top - renderer()->yPos()), width(), bottom - top);
     } else if (renderer()->isTableRow()) {
         // Our bounding box is just the union of all of our cells' border/overflow rects.
@@ -1759,7 +1761,7 @@ int Marquee::marqueeSpeed() const
     WebCore::Node* elt = m_layer->renderer()->element();
     if (elt && elt->hasTagName(marqueeTag)) {
         HTMLMarqueeElement* marqueeElt = static_cast<HTMLMarqueeElement*>(elt);
-        result = kMax(result, marqueeElt->minimumDelay());
+        result = max(result, marqueeElt->minimumDelay());
     }
     return result;
 }
@@ -1813,13 +1815,13 @@ int Marquee::computePosition(EMarqueeDirection dir, bool stopAtContentEdge)
         }
         if (dir == MRIGHT) {
             if (stopAtContentEdge)
-                return kMax(0, ltr ? (contentWidth - clientWidth) : (clientWidth - contentWidth));
+                return max(0, ltr ? (contentWidth - clientWidth) : (clientWidth - contentWidth));
             else
                 return ltr ? contentWidth : clientWidth;
         }
         else {
             if (stopAtContentEdge)
-                return kMin(0, ltr ? (contentWidth - clientWidth) : (clientWidth - contentWidth));
+                return min(0, ltr ? (contentWidth - clientWidth) : (clientWidth - contentWidth));
             else
                 return ltr ? -clientWidth : -contentWidth;
         }
@@ -1830,13 +1832,13 @@ int Marquee::computePosition(EMarqueeDirection dir, bool stopAtContentEdge)
         int clientHeight = m_layer->renderer()->clientHeight();
         if (dir == MUP) {
             if (stopAtContentEdge)
-                 return kMin(contentHeight - clientHeight, 0);
+                 return min(contentHeight - clientHeight, 0);
             else
                 return -clientHeight;
         }
         else {
             if (stopAtContentEdge)
-                return kMax(contentHeight - clientHeight, 0);
+                return max(contentHeight - clientHeight, 0);
             else 
                 return contentHeight;
         }
@@ -1998,14 +2000,14 @@ void Marquee::timerFired(Timer<Marquee>*)
         bool positive = range > 0;
         int clientSize = isUnfurlMarquee() ? abs(range) :
             (isHorizontal() ? m_layer->renderer()->clientWidth() : m_layer->renderer()->clientHeight());
-        int increment = kMax(1, abs(m_layer->renderer()->style()->marqueeIncrement().calcValue(clientSize)));
+        int increment = max(1, abs(m_layer->renderer()->style()->marqueeIncrement().calcValue(clientSize)));
         int currentPos = isUnfurlMarquee() ? m_unfurlPos : 
             (isHorizontal() ? m_layer->scrollXOffset() : m_layer->scrollYOffset());
         newPos =  currentPos + (addIncrement ? increment : -increment);
         if (positive)
-            newPos = kMin(newPos, endPoint);
+            newPos = min(newPos, endPoint);
         else
-            newPos = kMax(newPos, endPoint);
+            newPos = max(newPos, endPoint);
     }
 
     if (newPos == endPoint) {
index f78f558..0767947 100644 (file)
@@ -52,6 +52,8 @@
 #include "KWQWMatrix.h"
 #include "KWQTextStream.h"
 
+using namespace std;
+
 namespace WebCore {
 
 using namespace EventNames;
@@ -888,20 +890,20 @@ void RenderObject::drawBorder(GraphicsContext* p, int x1, int y1, int x2, int y2
           switch(s)
             {
             case BSTop:
-              drawBorder(p, x1+kMax((-adjbw1*2+1)/3,0), y1        , x2-kMax((-adjbw2*2+1)/3,0), y1 + third, s, c, textcolor, SOLID, adjbw1bigthird, adjbw2bigthird);
-              drawBorder(p, x1+kMax(( adjbw1*2+1)/3,0), y2 - third, x2-kMax(( adjbw2*2+1)/3,0), y2        , s, c, textcolor, SOLID, adjbw1bigthird, adjbw2bigthird);
+              drawBorder(p, x1+max((-adjbw1*2+1)/3,0), y1        , x2-max((-adjbw2*2+1)/3,0), y1 + third, s, c, textcolor, SOLID, adjbw1bigthird, adjbw2bigthird);
+              drawBorder(p, x1+max(( adjbw1*2+1)/3,0), y2 - third, x2-max(( adjbw2*2+1)/3,0), y2        , s, c, textcolor, SOLID, adjbw1bigthird, adjbw2bigthird);
               break;
             case BSLeft:
-              drawBorder(p, x1        , y1+kMax((-adjbw1*2+1)/3,0), x1+third, y2-kMax((-adjbw2*2+1)/3,0), s, c, textcolor, SOLID, adjbw1bigthird, adjbw2bigthird);
-              drawBorder(p, x2 - third, y1+kMax(( adjbw1*2+1)/3,0), x2      , y2-kMax(( adjbw2*2+1)/3,0), s, c, textcolor, SOLID, adjbw1bigthird, adjbw2bigthird);
+              drawBorder(p, x1        , y1+max((-adjbw1*2+1)/3,0), x1+third, y2-max((-adjbw2*2+1)/3,0), s, c, textcolor, SOLID, adjbw1bigthird, adjbw2bigthird);
+              drawBorder(p, x2 - third, y1+max(( adjbw1*2+1)/3,0), x2      , y2-max(( adjbw2*2+1)/3,0), s, c, textcolor, SOLID, adjbw1bigthird, adjbw2bigthird);
               break;
             case BSBottom:
-              drawBorder(p, x1+kMax(( adjbw1*2+1)/3,0), y1      , x2-kMax(( adjbw2*2+1)/3,0), y1+third, s, c, textcolor, SOLID, adjbw1bigthird, adjbw2bigthird);
-              drawBorder(p, x1+kMax((-adjbw1*2+1)/3,0), y2-third, x2-kMax((-adjbw2*2+1)/3,0), y2      , s, c, textcolor, SOLID, adjbw1bigthird, adjbw2bigthird);
+              drawBorder(p, x1+max(( adjbw1*2+1)/3,0), y1      , x2-max(( adjbw2*2+1)/3,0), y1+third, s, c, textcolor, SOLID, adjbw1bigthird, adjbw2bigthird);
+              drawBorder(p, x1+max((-adjbw1*2+1)/3,0), y2-third, x2-max((-adjbw2*2+1)/3,0), y2      , s, c, textcolor, SOLID, adjbw1bigthird, adjbw2bigthird);
               break;
             case BSRight:
-            drawBorder(p, x1      , y1+kMax(( adjbw1*2+1)/3,0), x1+third, y2-kMax(( adjbw2*2+1)/3,0), s, c, textcolor, SOLID, adjbw1bigthird, adjbw2bigthird);
-            drawBorder(p, x2-third, y1+kMax((-adjbw1*2+1)/3,0), x2      , y2-kMax((-adjbw2*2+1)/3,0), s, c, textcolor, SOLID, adjbw1bigthird, adjbw2bigthird);
+            drawBorder(p, x1      , y1+max(( adjbw1*2+1)/3,0), x1+third, y2-max(( adjbw2*2+1)/3,0), s, c, textcolor, SOLID, adjbw1bigthird, adjbw2bigthird);
+            drawBorder(p, x2-third, y1+max((-adjbw1*2+1)/3,0), x2      , y2-max((-adjbw2*2+1)/3,0), s, c, textcolor, SOLID, adjbw1bigthird, adjbw2bigthird);
               break;
             default:
               break;
@@ -938,20 +940,20 @@ void RenderObject::drawBorder(GraphicsContext* p, int x1, int y1, int x2, int y2
         switch (s)
         {
         case BSTop:
-            drawBorder(p, x1+kMax(-adjbw1  ,0)/2,  y1        , x2-kMax(-adjbw2,0)/2, (y1+y2+1)/2, s, c, textcolor, s1, adjbw1bighalf, adjbw2bighalf);
-            drawBorder(p, x1+kMax( adjbw1+1,0)/2, (y1+y2+1)/2, x2-kMax( adjbw2+1,0)/2,  y2        , s, c, textcolor, s2, adjbw1/2, adjbw2/2);
+            drawBorder(p, x1+max(-adjbw1  ,0)/2,  y1        , x2-max(-adjbw2,0)/2, (y1+y2+1)/2, s, c, textcolor, s1, adjbw1bighalf, adjbw2bighalf);
+            drawBorder(p, x1+max( adjbw1+1,0)/2, (y1+y2+1)/2, x2-max( adjbw2+1,0)/2,  y2        , s, c, textcolor, s2, adjbw1/2, adjbw2/2);
             break;
         case BSLeft:
-            drawBorder(p,  x1        , y1+kMax(-adjbw1  ,0)/2, (x1+x2+1)/2, y2-kMax(-adjbw2,0)/2, s, c, textcolor, s1, adjbw1bighalf, adjbw2bighalf);
-            drawBorder(p, (x1+x2+1)/2, y1+kMax( adjbw1+1,0)/2,  x2        , y2-kMax( adjbw2+1,0)/2, s, c, textcolor, s2, adjbw1/2, adjbw2/2);
+            drawBorder(p,  x1        , y1+max(-adjbw1  ,0)/2, (x1+x2+1)/2, y2-max(-adjbw2,0)/2, s, c, textcolor, s1, adjbw1bighalf, adjbw2bighalf);
+            drawBorder(p, (x1+x2+1)/2, y1+max( adjbw1+1,0)/2,  x2        , y2-max( adjbw2+1,0)/2, s, c, textcolor, s2, adjbw1/2, adjbw2/2);
             break;
         case BSBottom:
-            drawBorder(p, x1+kMax( adjbw1  ,0)/2,  y1        , x2-kMax( adjbw2,0)/2, (y1+y2+1)/2, s, c, textcolor, s2,  adjbw1bighalf, adjbw2bighalf);
-            drawBorder(p, x1+kMax(-adjbw1+1,0)/2, (y1+y2+1)/2, x2-kMax(-adjbw2+1,0)/2,  y2        , s, c, textcolor, s1, adjbw1/2, adjbw2/2);
+            drawBorder(p, x1+max( adjbw1  ,0)/2,  y1        , x2-max( adjbw2,0)/2, (y1+y2+1)/2, s, c, textcolor, s2,  adjbw1bighalf, adjbw2bighalf);
+            drawBorder(p, x1+max(-adjbw1+1,0)/2, (y1+y2+1)/2, x2-max(-adjbw2+1,0)/2,  y2        , s, c, textcolor, s1, adjbw1/2, adjbw2/2);
             break;
         case BSRight:
-            drawBorder(p,  x1        , y1+kMax( adjbw1  ,0)/2, (x1+x2+1)/2, y2-kMax( adjbw2,0)/2, s, c, textcolor, s2, adjbw1bighalf, adjbw2bighalf);
-            drawBorder(p, (x1+x2+1)/2, y1+kMax(-adjbw1+1,0)/2,  x2        , y2-kMax(-adjbw2+1,0)/2, s, c, textcolor, s1, adjbw1/2, adjbw2/2);
+            drawBorder(p,  x1        , y1+max( adjbw1  ,0)/2, (x1+x2+1)/2, y2-max( adjbw2,0)/2, s, c, textcolor, s2, adjbw1bighalf, adjbw2bighalf);
+            drawBorder(p, (x1+x2+1)/2, y1+max(-adjbw1+1,0)/2,  x2        , y2-max(-adjbw2+1,0)/2, s, c, textcolor, s1, adjbw1/2, adjbw2/2);
             break;
         }
         break;
@@ -978,31 +980,31 @@ void RenderObject::drawBorder(GraphicsContext* p, int x1, int y1, int x2, int y2
         switch(s) {
         case BSTop:
             quad.setPoints(4,
-                           x1+kMax(-adjbw1,0), y1,
-                           x1+kMax( adjbw1,0), y2,
-                           x2-kMax( adjbw2,0), y2,
-                           x2-kMax(-adjbw2,0), y1);
+                           x1+max(-adjbw1,0), y1,
+                           x1+max( adjbw1,0), y2,
+                           x2-max( adjbw2,0), y2,
+                           x2-max(-adjbw2,0), y1);
             break;
         case BSBottom:
             quad.setPoints(4,
-                           x1+kMax( adjbw1,0), y1,
-                           x1+kMax(-adjbw1,0), y2,
-                           x2-kMax(-adjbw2,0), y2,
-                           x2-kMax( adjbw2,0), y1);
+                           x1+max( adjbw1,0), y1,
+                           x1+max(-adjbw1,0), y2,
+                           x2-max(-adjbw2,0), y2,
+                           x2-max( adjbw2,0), y1);
             break;
         case BSLeft:
           quad.setPoints(4,
-                         x1, y1+kMax(-adjbw1,0),
-                         x1, y2-kMax(-adjbw2,0),
-                         x2, y2-kMax( adjbw2,0),
-                         x2, y1+kMax( adjbw1,0));
+                         x1, y1+max(-adjbw1,0),
+                         x1, y2-max(-adjbw2,0),
+                         x2, y2-max( adjbw2,0),
+                         x2, y1+max( adjbw1,0));
             break;
         case BSRight:
           quad.setPoints(4,
-                         x1, y1+kMax( adjbw1,0),
-                         x1, y2-kMax( adjbw2,0),
-                         x2, y2-kMax(-adjbw2,0),
-                         x2, y1+kMax(-adjbw1,0));
+                         x1, y1+max( adjbw1,0),
+                         x1, y2-max( adjbw2,0),
+                         x2, y2-max(-adjbw2,0),
+                         x2, y1+max(-adjbw1,0));
             break;
         }
         p->drawConvexPolygon(quad);
@@ -1030,10 +1032,10 @@ bool RenderObject::paintBorderImage(GraphicsContext* p, int _tx, int _ty, int w,
     int imageWidth = borderImage->image()->width();
     int imageHeight = borderImage->image()->height();
 
-    int topSlice = kMin(imageHeight, style->borderImage().m_slices.top.calcValue(borderImage->image()->height()));
-    int bottomSlice = kMin(imageHeight, style->borderImage().m_slices.bottom.calcValue(borderImage->image()->height()));
-    int leftSlice = kMin(imageWidth, style->borderImage().m_slices.left.calcValue(borderImage->image()->width()));    
-    int rightSlice = kMin(imageWidth, style->borderImage().m_slices.right.calcValue(borderImage->image()->width()));
+    int topSlice = min(imageHeight, style->borderImage().m_slices.top.calcValue(borderImage->image()->height()));
+    int bottomSlice = min(imageHeight, style->borderImage().m_slices.bottom.calcValue(borderImage->image()->height()));
+    int leftSlice = min(imageWidth, style->borderImage().m_slices.left.calcValue(borderImage->image()->width()));    
+    int rightSlice = min(imageWidth, style->borderImage().m_slices.right.calcValue(borderImage->image()->width()));
 
     EBorderImageRule hRule = style->borderImage().horizontalRule();
     EBorderImageRule vRule = style->borderImage().verticalRule();
@@ -1156,8 +1158,8 @@ void RenderObject::paintBorder(GraphicsContext* p, int _tx, int _ty, int w, int
     IntSize bottomRight = style->borderBottomRightRadius();
 
     if (style->hasBorderRadius()) {
-        int requiredWidth = kMax(topLeft.width() + topRight.width(), bottomLeft.width() + bottomRight.width());
-        int requiredHeight = kMax(topLeft.height() + bottomLeft.height(), topRight.height() + bottomRight.height());
+        int requiredWidth = max(topLeft.width() + topRight.width(), bottomLeft.width() + bottomRight.width());
+        int requiredHeight = max(topLeft.height() + bottomLeft.height(), topRight.height() + bottomRight.height());
         render_radii = (requiredWidth <= w && requiredHeight <= h);
     }
     
@@ -1438,15 +1440,15 @@ bool RenderObject::repaintAfterLayoutIfNeeded(const IntRect& oldBounds, const In
     int ow = style() ? style()->outlineSize() : 0;
     int width = abs(newBounds.width() - oldBounds.width());
     if (width)
-        c->repaintViewRectangle(IntRect(kMin(newBounds.x() + newBounds.width(), oldBounds.x() + oldBounds.width()) - borderRight() - ow,
+        c->repaintViewRectangle(IntRect(min(newBounds.x() + newBounds.width(), oldBounds.x() + oldBounds.width()) - borderRight() - ow,
             newBounds.y(),
             width + borderRight() + ow,
-            kMax(newBounds.height(), oldBounds.height())));
+            max(newBounds.height(), oldBounds.height())));
     int height = abs(newBounds.height() - oldBounds.height());
     if (height)
         c->repaintViewRectangle(IntRect(newBounds.x(),
-            kMin(newBounds.bottom(), oldBounds.bottom()) - borderBottom() - ow,
-            kMax(newBounds.width(), oldBounds.width()),
+            min(newBounds.bottom(), oldBounds.bottom()) - borderBottom() - ow,
+            max(newBounds.width(), oldBounds.width()),
             height + borderBottom() + ow));
     return false;
 }
index d3cb569..6ef6d4f 100644 (file)
@@ -36,6 +36,8 @@
 #include "HTMLNames.h"
 #include "KWQTextStream.h"
 
+using namespace std;
+
 namespace WebCore {
 
 using namespace HTMLNames;
@@ -212,13 +214,13 @@ void RenderTable::calcWidth()
             marginTotal += style()->marginRight().calcValue(availableWidth);
             
         // Subtract out our margins to get the available content width.
-        int availContentWidth = kMax(0, availableWidth - marginTotal);
+        int availContentWidth = max(0, availableWidth - marginTotal);
         
         // Ensure we aren't bigger than our max width or smaller than our min width.
-        m_width = kMin(availContentWidth, m_maxWidth);
+        m_width = min(availContentWidth, m_maxWidth);
     }
     
-    m_width = kMax(m_width, m_minWidth);
+    m_width = max(m_width, m_minWidth);
 
     // Finally, with our true width determined, compute our margins for real.
     m_marginRight = 0;
@@ -299,7 +301,7 @@ void RenderTable::layout()
         th = h.value() - (bpTop + bpBottom);  // Tables size as though CSS height includes border/padding.
     else if (h.isPercent())
         th = calcPercentageHeight(h);
-    th = kMax(0, th);
+    th = max(0, th);
 
     // layout rows
     if (th > calculatedHeight) {
@@ -353,8 +355,8 @@ void RenderTable::layout()
     if (checkForRepaint)
         repaintAfterLayoutIfNeeded(oldBounds, oldFullBounds);
     
-    m_overflowHeight = kMax(m_overflowHeight, m_height);
-    m_overflowWidth = kMax(m_overflowWidth, m_width);
+    m_overflowHeight = max(m_overflowHeight, m_height);
+    m_overflowWidth = max(m_overflowWidth, m_width);
 
     setNeedsLayout(false);
 }
@@ -432,12 +434,12 @@ void RenderTable::paintBoxDecorations(PaintInfo& i, int _tx, int _ty)
             _ty += captionHeight;
     }
 
-    int my = kMax(_ty, i.r.y());
+    int my = max(_ty, i.r.y());
     int mh;
     if (_ty < i.r.y())
-        mh= kMax(0, h - (i.r.y() - _ty));
+        mh= max(0, h - (i.r.y() - _ty));
     else
-        mh = kMin(i.r.height(), h);
+        mh = min(i.r.height(), h);
     
     paintBackground(i.p, style()->backgroundColor(), style()->backgroundLayers(), my, mh, _tx, _ty, w, h);
     
index 9d10c71..1c1b884 100644 (file)
@@ -33,6 +33,8 @@
 #include "HTMLNames.h"
 #include "KWQTextStream.h"
 
+using namespace std;
+
 namespace WebCore {
 
 using namespace HTMLNames;
@@ -709,8 +711,8 @@ void RenderTableCell::paintBackgroundsBehindCell(PaintInfo& i, int _tx, int _ty,
     int h = height() + borderTopExtra() + borderBottomExtra();
     _ty -= borderTopExtra();
     
-    int my = kMax(_ty, i.r.y());
-    int end = kMin(i.r.bottom(), _ty + h);
+    int my = max(_ty, i.r.y());
+    int end = min(i.r.bottom(), _ty + h);
     int mh = end - my;
     
     Color c = backgroundObject->style()->backgroundColor();
index 355fc5e..83e4c99 100644 (file)
@@ -34,6 +34,8 @@
 #include "HTMLNames.h"
 #include "KWQTextStream.h"
 
+using namespace std;
+
 namespace WebCore {
 
 using namespace HTMLNames;
@@ -390,10 +392,10 @@ int RenderTableSection::layoutRows(int toAdd)
             int rh = rowPos[1] - rowPos[0];
             for (int r = 0; r < totalRows; r++) {
                 if (totalPercent > 0 && grid[r].height.isPercent()) {
-                    int toAdd = kMin(dh, (totalHeight * grid[r].height.value() / 100) - rh);
+                    int toAdd = min(dh, (totalHeight * grid[r].height.value() / 100) - rh);
                     // If toAdd is negative, then we don't want to shrink the row (this bug
                     // affected Outlook Web Access).
-                    toAdd = kMax(0, toAdd);
+                    toAdd = max(0, toAdd);
                     add += toAdd;
                     dh -= toAdd;
                     totalPercent -= grid[r].height.value();
@@ -486,7 +488,7 @@ int RenderTableSection::layoutRows(int toAdd)
                 }
             }
             if (cellChildrenFlex) {
-                cell->setOverrideSize(kMax(0, 
+                cell->setOverrideSize(max(0, 
                                            rHeight - cell->borderTop() - cell->paddingTop() - 
                                                      cell->borderBottom() - cell->paddingBottom()));
                 cell->layoutIfNeeded();
@@ -559,7 +561,7 @@ int RenderTableSection::lowestPosition(bool includeOverflowInterior, bool includ
         for (RenderObject *cell = row->firstChild(); cell; cell = cell->nextSibling())
             if (cell->isTableCell()) {
                 int bp = cell->yPos() + cell->lowestPosition(false);
-                bottom = kMax(bottom, bp);
+                bottom = max(bottom, bp);
         }
     }
     
@@ -576,7 +578,7 @@ int RenderTableSection::rightmostPosition(bool includeOverflowInterior, bool inc
         for (RenderObject *cell = row->firstChild(); cell; cell = cell->nextSibling())
             if (cell->isTableCell()) {
                 int rp = cell->xPos() + cell->rightmostPosition(false);
-                right = kMax(right, rp);
+                right = max(right, rp);
         }
     }
     
@@ -593,7 +595,7 @@ int RenderTableSection::leftmostPosition(bool includeOverflowInterior, bool incl
         for (RenderObject *cell = row->firstChild(); cell; cell = cell->nextSibling())
             if (cell->isTableCell()) {
                 int lp = cell->xPos() + cell->leftmostPosition(false);
-                left = kMin(left, lp);
+                left = min(left, lp);
         }
     }
     
index 1039506..e6b888f 100644 (file)
@@ -35,6 +35,8 @@
 #include <kxmlcore/AlwaysInline.h>
 #include <unicode/ubrk.h>
 
+using namespace std;
+
 namespace WebCore {
 
 UBreakIterator* characterBreakIterator(const StringImpl* i)
@@ -416,7 +418,7 @@ IntRect RenderText::caretRect(int offset, EAffinity affinity, int *extraWidthToE
     RenderBlock *cb = containingBlock();
     int availableWidth = cb->lineWidth(top);
     if (style()->autoWrap())
-        left = kMin(left, absx + box->m_x + availableWidth - 1);
+        left = min(left, absx + box->m_x + availableWidth - 1);
     
     return IntRect(left, top, 1, height);
 }
@@ -718,8 +720,8 @@ void RenderText::calcMinMaxWidth(int leadWidth)
     if (needsWordSpacing && len > 1) 
         currMaxWidth += wordSpacing;
     
-    m_minWidth = kMax(currMinWidth, m_minWidth);
-    m_maxWidth = kMax(currMaxWidth, m_maxWidth);
+    m_minWidth = max(currMinWidth, m_minWidth);
+    m_maxWidth = max(currMaxWidth, m_maxWidth);
         
     if (!style()->autoWrap())
         m_minWidth = m_maxWidth;
@@ -750,7 +752,7 @@ int RenderText::minXPos() const
     if (!m_firstTextBox) return 0;
     int retval=6666666;
     for (InlineTextBox* box = firstTextBox(); box; box = box->nextTextBox())
-        retval = kMin(retval, (int)box->m_x);
+        retval = min(retval, (int)box->m_x);
     return retval;
 }
 
@@ -1018,7 +1020,7 @@ int RenderText::width() const
             maxx = s->m_x + s->m_width;
     }
 
-    return kMax(0, maxx-minx);
+    return max(0, maxx-minx);
 }
 
 IntRect RenderText::getAbsoluteRepaintRect()
@@ -1082,7 +1084,7 @@ int RenderText::caretMinOffset() const
         return 0;
     int minOffset = box->m_start;
     for (box = box->nextTextBox(); box; box = box->nextTextBox())
-        minOffset = kMin(minOffset, box->m_start);
+        minOffset = min(minOffset, box->m_start);
     return minOffset;
 }
 
@@ -1093,7 +1095,7 @@ int RenderText::caretMaxOffset() const
         return str->length();
     int maxOffset = box->m_start + box->m_len;
     for (box = box->prevTextBox(); box; box = box->prevTextBox())
-        maxOffset = kMax(maxOffset,box->m_start + box->m_len);
+        maxOffset = max(maxOffset,box->m_start + box->m_len);
     return maxOffset;
 }
 
index a593562..2720fc4 100644 (file)
@@ -33,6 +33,8 @@
 #include "break_lines.h"
 #include <kxmlcore/AlwaysInline.h>
 
+using namespace std;
+
 namespace WebCore {
 
 // an iterator which traverses all the objects within a block
@@ -869,7 +871,7 @@ void RenderBlock::computeHorizontalPositionsForLine(RootInlineBox* lineBox, Bidi
                 RenderStyle *style = r->obj->style();
                 if (style->autoWrap() && style->breakOnlyAfterWhiteSpace()) {
                     // shrink the box as needed to keep the line from overflowing the available width
-                    textWidth = kMin(effectiveWidth, availableWidth - totWidth);
+                    textWidth = min(effectiveWidth, availableWidth - totWidth);
                 }
             }
             r->box->setWidth(textWidth);
@@ -1569,7 +1571,7 @@ IntRect RenderBlock::layoutInlineChildren(bool relayoutChildren)
         if (startLine) {
             useRepaintRect = true;
             startLineBottom = startLine->bottomOverflow();
-            repaintRect.setY(kMin(m_height, startLine->topOverflow()));
+            repaintRect.setY(min(m_height, startLine->topOverflow()));
             RenderArena* arena = renderArena();
             RootInlineBox* box = startLine;
             while (box) {
@@ -1651,9 +1653,9 @@ IntRect RenderBlock::layoutInlineChildren(bool relayoutChildren)
             if (endLineMatched) {
                 // Note our current y-position for correct repainting when no lines move.  If no lines move, we still have to
                 // repaint up to the maximum of the bottom overflow of the old start line or the bottom overflow of the new last line.
-                int currYPos = kMax(startLineBottom, m_height);
+                int currYPos = max(startLineBottom, m_height);
                 if (lastRootBox())
-                    currYPos = kMax(currYPos, lastRootBox()->bottomOverflow());
+                    currYPos = max(currYPos, lastRootBox()->bottomOverflow());
                 
                 // Attach all the remaining lines, and then adjust their y-positions as needed.
                 for (RootInlineBox* line = endLine; line; line = line->nextRootBox())
@@ -1666,24 +1668,24 @@ IntRect RenderBlock::layoutInlineChildren(bool relayoutChildren)
                         line->adjustPosition(0, delta);
                 }
                 m_height = lastRootBox()->blockHeight();
-                m_overflowHeight = kMax(m_height, m_overflowHeight);
+                m_overflowHeight = max(m_height, m_overflowHeight);
                 int bottomOfLine = lastRootBox()->bottomOverflow();
                 if (bottomOfLine > m_height && bottomOfLine > m_overflowHeight)
                     m_overflowHeight = bottomOfLine;
                 if (delta)
-                    repaintRect.setHeight(kMax(m_overflowHeight-delta, m_overflowHeight) - repaintRect.y());
+                    repaintRect.setHeight(max(m_overflowHeight-delta, m_overflowHeight) - repaintRect.y());
                 else
                     repaintRect.setHeight(currYPos - repaintRect.y());
             }
             else {
                 // Delete all the remaining lines.
-                m_overflowHeight = kMax(m_height, m_overflowHeight);
+                m_overflowHeight = max(m_height, m_overflowHeight);
                 InlineRunBox* line = endLine;
                 RenderArena* arena = renderArena();
                 while (line) {
                     InlineRunBox* next = line->nextLineBox();
                     if (!next)
-                        repaintRect.setHeight(kMax(m_overflowHeight, line->bottomOverflow()) - repaintRect.y());
+                        repaintRect.setHeight(max(m_overflowHeight, line->bottomOverflow()) - repaintRect.y());
                     line->deleteLine(arena);
                     line = next;
                 }
@@ -1705,16 +1707,16 @@ IntRect RenderBlock::layoutInlineChildren(bool relayoutChildren)
     m_height += toAdd;
 
     // Always make sure this is at least our height.
-    m_overflowHeight = kMax(m_height, m_overflowHeight);
+    m_overflowHeight = max(m_height, m_overflowHeight);
     
     // See if any lines spill out of the block.  If so, we need to update our overflow width.
     checkLinesForOverflow();
 
     if (useRepaintRect) {
         repaintRect.setX(m_overflowLeft);
-        repaintRect.setWidth(kMax((int)m_width, m_overflowWidth) - m_overflowLeft);
+        repaintRect.setWidth(max((int)m_width, m_overflowWidth) - m_overflowLeft);
         if (repaintRect.height() == 0)
-            repaintRect.setHeight(kMax(oldLineBottom, m_overflowHeight) - repaintRect.y());
+            repaintRect.setHeight(max(oldLineBottom, m_overflowHeight) - repaintRect.y());
     }
 
     if (!firstLineBox() && element() && element()->isContentEditable() && element()->rootEditableElement() == element())
@@ -2504,10 +2506,10 @@ void RenderBlock::checkLinesForOverflow()
     // and factor that in somehow.
     m_overflowWidth = m_width;
     for (RootInlineBox* curr = firstRootBox(); curr; curr = curr->nextRootBox()) {
-        m_overflowLeft = kMin(curr->leftOverflow(), m_overflowLeft);
-        m_overflowTop = kMin(curr->topOverflow(), m_overflowTop);
-        m_overflowWidth = kMax(curr->rightOverflow(), m_overflowWidth);
-        m_overflowHeight = kMax(curr->bottomOverflow(), m_overflowHeight);
+        m_overflowLeft = min(curr->leftOverflow(), m_overflowLeft);
+        m_overflowTop = min(curr->topOverflow(), m_overflowTop);
+        m_overflowWidth = max(curr->rightOverflow(), m_overflowWidth);
+        m_overflowHeight = max(curr->bottomOverflow(), m_overflowHeight);
     }
 }
 
index 8ed7ea1..2b6d26e 100644 (file)
@@ -42,6 +42,8 @@
 #include "PlatformMouseEvent.h"
 #include "dom2_eventsimpl.h"
 
+using namespace std;
+
 namespace WebCore {
 
 using namespace EventNames;
@@ -321,15 +323,15 @@ int RenderLineEdit::selectionEnd()
 
 void RenderLineEdit::setSelectionStart(int start)
 {
-    int realStart = kMax(start, 0);
-    int length = kMax(selectionEnd() - realStart, 0);
+    int realStart = max(start, 0);
+    int length = max(selectionEnd() - realStart, 0);
     static_cast<QLineEdit *>(m_widget)->setSelection(realStart, length);
 }
 
 void RenderLineEdit::setSelectionEnd(int end)
 {
     int start = selectionStart();
-    int realEnd = kMax(end, 0);
+    int realEnd = max(end, 0);
     int length = realEnd - start;
     if (length < 0) {
         start = realEnd;
@@ -354,8 +356,8 @@ void RenderLineEdit::setEdited(bool x)
 
 void RenderLineEdit::setSelectionRange(int start, int end)
 {
-    int realStart = kMax(start, 0);
-    int length = kMax(end - realStart, 0);
+    int realStart = max(start, 0);
+    int length = max(end - realStart, 0);
     static_cast<QLineEdit *>(m_widget)->setSelection(realStart, length);
 }
 
@@ -379,8 +381,8 @@ RenderObject* RenderFieldset::layoutLegend(bool relayoutChildren)
             xPos = m_width - paddingRight() - borderRight() - legend->width() - legend->marginRight();
         int b = borderTop();
         int h = legend->height();
-        legend->setPos(xPos, kMax((b-h)/2, 0));
-        m_height = kMax(b,h) + paddingTop();
+        legend->setPos(xPos, max((b-h)/2, 0));
+        m_height = max(b,h) + paddingTop();
     }
     return legend;
 }
@@ -407,8 +409,8 @@ void RenderFieldset::paintBoxDecorations(PaintInfo& i, int _tx, int _ty)
     h -= yOff;
     _ty += yOff - borderTopExtra();
 
-    int my = kMax(_ty, i.r.y());
-    int end = kMin(i.r.bottom(),  _ty + h);
+    int my = max(_ty, i.r.y());
+    int end = min(i.r.bottom(),  _ty + h);
     int mh = end - my;
 
     paintBackground(i.p, style()->backgroundColor(), style()->backgroundLayers(), my, mh, _tx, _ty, w, h);
@@ -754,12 +756,12 @@ void RenderSelect::layout( )
 
         int size = m_size;
         // check if multiple and size was not given or invalid
-        // Internet Exploder sets size to kMin(number of elements, 4)
+        // Internet Exploder sets size to min(number of elements, 4)
         // Netscape seems to simply set it to "number of elements"
-        // the average of that is IMHO kMin(number of elements, 10)
+        // the average of that is IMHO min(number of elements, 10)
         // so I did that ;-)
         if(size < 1)
-            size = kMin(static_cast<QListBox*>(m_widget)->count(), 10U);
+            size = min(static_cast<QListBox*>(m_widget)->count(), 10U);
 
         // Let the widget tell us how big it wants to be.
         IntSize s(w->sizeForNumberOfLines(size));
@@ -935,7 +937,7 @@ void RenderTextArea::calcMinMaxWidth()
     KHTMLAssert( !minMaxKnown() );
 
     QTextEdit* w = static_cast<QTextEdit*>(m_widget);
-    IntSize size(w->sizeWithColumnsAndRows(kMax(element()->cols(), 1), kMax(element()->rows(), 1)));
+    IntSize size(w->sizeWithColumnsAndRows(max(element()->cols(), 1), max(element()->rows(), 1)));
 
     setIntrinsicWidth( size.width() );
     setIntrinsicHeight( size.height() );
@@ -1101,16 +1103,16 @@ void RenderSlider::calcMinMaxWidth()
 void RenderSlider::updateFromElement()
 {
     String value = element()->value();
-    const AtomicString& min = element()->getAttribute(minAttr);
-    const AtomicString& max = element()->getAttribute(maxAttr);
+    const AtomicString& minStr = element()->getAttribute(minAttr);
+    const AtomicString& maxStr = element()->getAttribute(maxAttr);
     const AtomicString& precision = element()->getAttribute(precisionAttr);
     
-    double minVal = min.isNull() ? 0.0 : min.deprecatedString().toDouble();
-    double maxVal = max.isNull() ? 100.0 : max.deprecatedString().toDouble();
-    minVal = kMin(minVal, maxVal); // Make sure the range is sane.
+    double minVal = minStr.isNull() ? 0.0 : minStr.deprecatedString().toDouble();
+    double maxVal = maxStr.isNull() ? 100.0 : maxStr.deprecatedString().toDouble();
+    minVal = min(minVal, maxVal); // Make sure the range is sane.
     
     double val = value.isNull() ? (maxVal + minVal)/2.0 : value.deprecatedString().toDouble();
-    val = kMax(minVal, kMin(val, maxVal)); // Make sure val is within min/max.
+    val = max(minVal, min(val, maxVal)); // Make sure val is within min/max.
     
     // Force integer value if not float.
     if (!equalIgnoringCase(precision, "float"))
index 9927b12..0618eba 100644 (file)
@@ -153,7 +153,7 @@ void RenderFrameSet::layout( )
                 // 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] = kMax(grid[i].value(), 0);
+                    gridLayout[i] = max(grid[i].value(), 0);
                     totalFixed += gridLayout[i];
                     countFixed++;
                 }
@@ -161,7 +161,7 @@ void RenderFrameSet::layout( )
                 // 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] = kMax(grid[i].calcValue(availableLen[k]), 0);
+                    gridLayout[i] = max(grid[i].calcValue(availableLen[k]), 0);
                     totalPercent += gridLayout[i];
                     countPercent++;
                 }
@@ -169,7 +169,7 @@ void RenderFrameSet::layout( )
                 // 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 += kMax(grid[i].value(), 1);
+                    totalRelative += max(grid[i].value(), 1);
                     countRelative++;
                 }            
             }
@@ -214,7 +214,7 @@ void RenderFrameSet::layout( )
 
                 for (int i = 0; i < gridLen; ++i) {
                     if (grid[i].isRelative()) {
-                        gridLayout[i] = (kMax(grid[i].value(), 1) * remainingRelative) / totalRelative;
+                        gridLayout[i] = (max(grid[i].value(), 1) * remainingRelative) / totalRelative;
                         remainingLen[k] -= gridLayout[i];
                         lastRelative = i;
                     }
index d7058e5..be401ac 100644 (file)
@@ -34,6 +34,8 @@
 #include "render_list.h"
 #include <assert.h>
 
+using namespace std;
+
 namespace WebCore {
     
 #ifndef NDEBUG
@@ -463,7 +465,7 @@ int InlineFlowBox::placeBoxesHorizontally(int x, int& leftPosition, int& rightPo
 {
     // Set our x position.
     setXPos(x);
-    leftPosition = kMin(x, leftPosition);
+    leftPosition = min(x, leftPosition);
 
     int startX = x;
     x += borderLeft() + paddingLeft();
@@ -481,12 +483,12 @@ int InlineFlowBox::placeBoxesHorizontally(int x, int& leftPosition, int& rightPo
             int shadowLeft = 0;
             int shadowRight = 0;
             for (ShadowData* shadow = rt->style()->textShadow(); shadow; shadow = shadow->next) {
-                shadowLeft = kMin(shadowLeft, shadow->x - shadow->blur);
-                shadowRight = kMax(shadowRight, shadow->x + shadow->blur);
+                shadowLeft = min(shadowLeft, shadow->x - shadow->blur);
+                shadowRight = max(shadowRight, shadow->x + shadow->blur);
             }
-            leftPosition = kMin(x + shadowLeft, leftPosition);
-            rightPosition = kMax(x + text->width() + shadowRight, rightPosition);
-            m_maxHorizontalShadow = kMax(kMax(shadowRight, -shadowLeft), m_maxHorizontalShadow);
+            leftPosition = min(x + shadowLeft, leftPosition);
+            rightPosition = max(x + text->width() + shadowRight, rightPosition);
+            m_maxHorizontalShadow = max(max(shadowRight, -shadowLeft), m_maxHorizontalShadow);
             x += text->width();
         } else {
             if (curr->object()->isPositioned()) {
@@ -512,8 +514,8 @@ int InlineFlowBox::placeBoxesHorizontally(int x, int& leftPosition, int& rightPo
             } else if (!curr->object()->isCompact() && (!curr->object()->isListMarker() || static_cast<RenderListMarker*>(curr->object())->isInside())) {
                 x += curr->object()->marginLeft();
                 curr->setXPos(x);
-                leftPosition = kMin(x, leftPosition);
-                rightPosition = kMax(x + curr->width(), rightPosition);
+                leftPosition = min(x, leftPosition);
+                rightPosition = max(x + curr->width(), rightPosition);
                 x += curr->width() + curr->object()->marginRight();
             }
         }
@@ -521,7 +523,7 @@ int InlineFlowBox::placeBoxesHorizontally(int x, int& leftPosition, int& rightPo
 
     x += borderRight() + paddingRight();
     setWidth(x-startX);
-    rightPosition = kMax(xPos() + width(), rightPosition);
+    rightPosition = max(xPos() + width(), rightPosition);
 
     return x;
 }
@@ -542,7 +544,7 @@ void InlineFlowBox::verticallyAlignBoxes(int& heightOfBlock)
     
     computeLogicalBoxHeights(maxPositionTop, maxPositionBottom, maxAscent, maxDescent, strictMode);
 
-    if (maxAscent + maxDescent < kMax(maxPositionTop, maxPositionBottom))
+    if (maxAscent + maxDescent < max(maxPositionTop, maxPositionBottom))
         adjustMaxAscentAndDescent(maxAscent, maxDescent, maxPositionTop, maxPositionBottom);
 
     int maxHeight = maxAscent + maxDescent;
@@ -580,7 +582,7 @@ void InlineFlowBox::adjustMaxAscentAndDescent(int& maxAscent, int& maxDescent,
                     maxAscent = curr->height() - maxDescent;
             }
 
-            if (maxAscent + maxDescent >= kMax(maxPositionTop, maxPositionBottom))
+            if (maxAscent + maxDescent >= max(maxPositionTop, maxPositionBottom))
                 break;
         }
 
@@ -678,8 +680,8 @@ void InlineFlowBox::placeBoxesVertically(int y, int maxHeight, int maxAscent, bo
             newY += curr->baseline() - newBaseline;
             newHeight = newBaseline + font.descent();
             for (ShadowData* shadow = curr->object()->style()->textShadow(); shadow; shadow = shadow->next) {
-                overflowTop = kMin(overflowTop, shadow->y - shadow->blur);
-                overflowBottom = kMax(overflowBottom, shadow->y + shadow->blur);
+                overflowTop = min(overflowTop, shadow->y - shadow->blur);
+                overflowBottom = max(overflowBottom, shadow->y + shadow->blur);
             }
             if (curr->isInlineFlowBox()) {
                 newHeight += curr->object()->borderTop() + curr->object()->paddingTop() +
@@ -700,10 +702,10 @@ void InlineFlowBox::placeBoxesVertically(int y, int maxHeight, int maxAscent, bo
         curr->setBaseline(newBaseline);
 
         if (childAffectsTopBottomPos) {
-            selectionTop = kMin(selectionTop, newY);
-            selectionBottom = kMax(selectionBottom, newY + newHeight);
-            topPosition = kMin(topPosition, newY + overflowTop);
-            bottomPosition = kMax(bottomPosition, newY + newHeight + overflowBottom);
+            selectionTop = min(selectionTop, newY);
+            selectionBottom = max(selectionBottom, newY + newHeight);
+            topPosition = min(topPosition, newY + overflowTop);
+            bottomPosition = max(bottomPosition, newY + newHeight + overflowBottom);
         }
     }
 
@@ -713,8 +715,8 @@ void InlineFlowBox::placeBoxesVertically(int y, int maxHeight, int maxAscent, bo
         setYPos(yPos() + baseline() - font.ascent());
         setBaseline(font.ascent());
         if (hasTextChildren() || strictMode) {
-            selectionTop = kMin(selectionTop, yPos());
-            selectionBottom = kMax(selectionBottom, yPos() + height());
+            selectionTop = min(selectionTop, yPos());
+            selectionBottom = max(selectionBottom, yPos() + height());
         }
     }
 }
@@ -856,12 +858,12 @@ void InlineFlowBox::paintBackgroundAndBorder(RenderObject::PaintInfo& i, int _tx
     int w = width();
     int h = height();
 
-    int my = kMax(_ty, i.r.y());
+    int my = max(_ty, i.r.y());
     int mh;
     if (_ty < i.r.y())
-        mh = kMax(0, h - (i.r.y() - _ty));
+        mh = max(0, h - (i.r.y() - _ty));
     else
-        mh = kMin(i.r.height(), h);
+        mh = min(i.r.height(), h);
 
     GraphicsContext* p = i.p;
     
index 746c7e4..3364422 100644 (file)
@@ -370,7 +370,7 @@ public:
 
     int selectionTop();
     int selectionBottom() { return m_selectionBottom; }
-    int selectionHeight() { return kMax(0, selectionBottom() - selectionTop()); }
+    int selectionHeight() { return max(0, selectionBottom() - selectionTop()); }
  
     InlineBox* closestLeafChildForXPos(int _x, int _tx);
 
index 17321fa..55ae142 100644 (file)
@@ -32,6 +32,8 @@
 #include "RenderCanvas.h"
 #include "html_listimpl.h"
 
+using namespace std;
+
 namespace WebCore {
 
 using namespace HTMLNames;
@@ -314,7 +316,7 @@ void RenderListItem::positionListMarker()
             m_marker->inlineBoxWrapper()->adjustPosition(markerXPos - markerOldX, 0);
             if (markerXPos < root->leftOverflow()) {
                 root->setHorizontalOverflowPositions(markerXPos, root->rightOverflow());
-                m_overflowLeft = kMin(markerXPos, m_overflowLeft);
+                m_overflowLeft = min(markerXPos, m_overflowLeft);
             }
         } else {
             int rightLineOffset = rightRelOffset(yOffset, rightOffset(yOffset));
@@ -322,7 +324,7 @@ void RenderListItem::positionListMarker()
             m_marker->inlineBoxWrapper()->adjustPosition(markerXPos - markerOldX, 0);
             if (markerXPos + m_marker->width() > root->rightOverflow()) {
                 root->setHorizontalOverflowPositions(root->leftOverflow(), markerXPos + m_marker->width());
-                m_overflowWidth = kMax(markerXPos + m_marker->width(), m_overflowLeft);
+                m_overflowWidth = max(markerXPos + m_marker->width(), m_overflowLeft);
             }
         }
     }
index b2cde6f..066eb12 100644 (file)
@@ -35,6 +35,8 @@
 #include "RenderCanvas.h"
 #include "dom2_eventsimpl.h"
 
+using namespace std;
+
 namespace WebCore {
 
 using namespace EventNames;
@@ -71,8 +73,8 @@ bool RenderReplaced::shouldPaint(PaintInfo& i, int& _tx, int& _ty)
     if (isSelected() && m_inlineBoxWrapper) {
         int selTop = _ty + m_inlineBoxWrapper->root()->selectionTop();
         int selBottom = _ty + selTop + m_inlineBoxWrapper->root()->selectionHeight();
-        top = kMin(selTop, top);
-        bottom = kMax(selBottom, bottom);
+        top = min(selTop, top);
+        bottom = max(selBottom, bottom);
     }
     
     int os = 2*maximalOutlineSize(i.phase);
index 6f1ba47..3b35f91 100644 (file)
  * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  * Boston, MA 02111-1307, USA.
  */
+
 #include "config.h"
 #include "table_layout.h"
+
 #include "RenderTable.h"
 #include "RenderTableCol.h"
 #include "RenderTableSection.h"
@@ -76,6 +78,8 @@ _____________________________________________________
 
 */
 
+using namespace std;
+
 namespace WebCore {
 
 FixedTableLayout::FixedTableLayout( RenderTable *table )
@@ -229,13 +233,13 @@ void FixedTableLayout::calcMinMaxWidth()
     // only need to calculate the minimum width as the sum of the
     // cols/cells with a fixed width.
     //
-    // The maximum width is kMax( minWidth, tableWidth ).
+    // The maximum width is max( minWidth, tableWidth ).
     int bs = table->bordersPaddingAndSpacing();
     
     int tableWidth = table->style()->width().isFixed() ? table->style()->width().value() - bs : 0;
     int mw = calcWidthArray( tableWidth ) + bs;
 
-    table->m_minWidth = kMax( mw, tableWidth );
+    table->m_minWidth = max( mw, tableWidth );
     table->m_maxWidth = table->m_minWidth;
 }
 
@@ -379,8 +383,8 @@ void AutoTableLayout::recalcColumn( int effCol )
                 if (cell && cell->colSpan() == 1) {
                     // A cell originates in this column.  Ensure we have
                     // a min/max width of at least 1px for this column now.
-                    l.minWidth = kMax(l.minWidth, 1);
-                    l.maxWidth = kMax(l.maxWidth, 1);
+                    l.minWidth = max(l.minWidth, 1);
+                    l.maxWidth = max(l.maxWidth, 1);
                     if (!cell->minMaxKnown())
                         cell->calcMinMaxWidth();
                     if (cell->minWidth() > l.minWidth)
@@ -428,8 +432,8 @@ void AutoTableLayout::recalcColumn( int effCol )
                     if (cell && (!effCol || section->cellAt(i, effCol-1).cell != cell)) {
                         // This spanning cell originates in this column.  Ensure we have
                         // a min/max width of at least 1px for this column now.
-                        l.minWidth = kMax(l.minWidth, 1);
-                        l.maxWidth = kMax(l.maxWidth, 1);
+                        l.minWidth = max(l.minWidth, 1);
+                        l.maxWidth = max(l.maxWidth, 1);
                         insertSpanCell( cell );
                     }
                     last = cell;
@@ -447,7 +451,7 @@ void AutoTableLayout::recalcColumn( int effCol )
         }
     }
 
-    l.maxWidth = kMax(l.maxWidth, l.minWidth);
+    l.maxWidth = max(l.maxWidth, l.minWidth);
 #ifdef DEBUG_LAYOUT
     qDebug("col %d, final min=%d, max=%d, width=%d(%d)", effCol, l.minWidth, l.maxWidth, l.width.value,  l.width.type );
 #endif
@@ -565,22 +569,22 @@ void AutoTableLayout::calcMinMaxWidth()
         minWidth += layoutStruct[i].effMinWidth;
         maxWidth += layoutStruct[i].effMaxWidth;
         if ( layoutStruct[i].effWidth.isPercent() ) {
-            int percent = kMin(layoutStruct[i].effWidth.value(), remainingPercent);
-            int pw = ( layoutStruct[i].effMaxWidth * 100) / kMax(percent, 1);
+            int percent = min(layoutStruct[i].effWidth.value(), remainingPercent);
+            int pw = ( layoutStruct[i].effMaxWidth * 100) / max(percent, 1);
             remainingPercent -= percent;
-            maxPercent = kMax( pw,  maxPercent );
+            maxPercent = max( pw,  maxPercent );
         } else {
             maxNonPercent += layoutStruct[i].effMaxWidth;
         }
     }
 
     if (shouldScaleColumns(table)) {
-        maxNonPercent = (maxNonPercent * 100 + 50) / kMax(remainingPercent, 1);
-        maxWidth = kMax( maxNonPercent,  maxWidth );
-        maxWidth = kMax( maxWidth, maxPercent );
+        maxNonPercent = (maxNonPercent * 100 + 50) / max(remainingPercent, 1);
+        maxWidth = max( maxNonPercent,  maxWidth );
+        maxWidth = max( maxWidth, maxPercent );
     }
 
-    maxWidth = kMax( maxWidth, spanMaxWidth );
+    maxWidth = max( maxWidth, spanMaxWidth );
     
     int bs = table->bordersPaddingAndSpacing();
     minWidth += bs;
@@ -588,7 +592,7 @@ void AutoTableLayout::calcMinMaxWidth()
 
     Length tw = table->style()->width();
     if ( tw.isFixed() && tw.value() > 0 ) {
-        minWidth = kMax(minWidth, tw.value());
+        minWidth = max(minWidth, tw.value());
         maxWidth = minWidth;
     }
 
@@ -693,11 +697,11 @@ int AutoTableLayout::calcEffectiveWidth()
                 // can't satify this condition, treat as variable
                 w = Length();
             } else {
-                int spanMax = kMax( maxWidth, cMaxWidth );
+                int spanMax = max( maxWidth, cMaxWidth );
 #ifdef DEBUG_LAYOUT
                 qDebug("    adjusting tMaxWidth (%d): spanMax=%d, value=%d, totalPercent=%d", tMaxWidth, spanMax, w.value, totalPercent );
 #endif
-                tMaxWidth = kMax( tMaxWidth, spanMax * 100 / w.value() );
+                tMaxWidth = max( tMaxWidth, spanMax * 100 / w.value() );
 
                 // all non percent columns in the span get percent vlaues to sum up correctly.
                 int percentMissing = w.value() - totalPercent;
@@ -732,7 +736,7 @@ int AutoTableLayout::calcEffectiveWidth()
                 qDebug("extending minWidth of cols %d-%d to %dpx currentMin=%d accroding to fixed sum %d", col, lastCol-1, cMinWidth, minWidth, fixedWidth );
 #endif
                 for ( unsigned int pos = col; fixedWidth > 0 && pos < lastCol; pos++ ) {
-                    int w = kMax( layoutStruct[pos].effMinWidth, cMinWidth * layoutStruct[pos].width.value() / fixedWidth );
+                    int w = max( layoutStruct[pos].effMinWidth, cMinWidth * layoutStruct[pos].width.value() / fixedWidth );
 #ifdef DEBUG_LAYOUT
                     qDebug("   col %d: min=%d, effMin=%d, new=%d", pos, layoutStruct[pos].effMinWidth, layoutStruct[pos].effMinWidth, w );
 #endif
@@ -751,7 +755,7 @@ int AutoTableLayout::calcEffectiveWidth()
                 // Give min to variable first, to fixed second, and to others third.
                 for ( unsigned int pos = col; maxw >= 0 && pos < lastCol; pos++ ) {
                     if ( layoutStruct[pos].width.isFixed() && haveAuto && fixedWidth <= cMinWidth ) {
-                        int w = kMax( layoutStruct[pos].effMinWidth, layoutStruct[pos].width.value() );
+                        int w = max( layoutStruct[pos].effMinWidth, layoutStruct[pos].width.value() );
                         fixedWidth -= layoutStruct[pos].width.value();
                         minw -= layoutStruct[pos].effMinWidth;
 #ifdef DEBUG_LAYOUT
@@ -765,8 +769,8 @@ int AutoTableLayout::calcEffectiveWidth()
 
                 for ( unsigned int pos = col; maxw >= 0 && pos < lastCol && minw < cMinWidth; pos++ ) {
                     if ( !(layoutStruct[pos].width.isFixed() && haveAuto && fixedWidth <= cMinWidth) ) {
-                        int w = kMax( layoutStruct[pos].effMinWidth, maxw ? (cMinWidth * layoutStruct[pos].effMaxWidth / maxw) : cMinWidth );
-                        w = kMin(layoutStruct[pos].effMinWidth+(cMinWidth-minw), w);
+                        int w = max( layoutStruct[pos].effMinWidth, maxw ? (cMinWidth * layoutStruct[pos].effMaxWidth / maxw) : cMinWidth );
+                        w = min(layoutStruct[pos].effMinWidth+(cMinWidth-minw), w);
                                                 
 #ifdef DEBUG_LAYOUT
                         qDebug("   col %d: min=%d, effMin=%d, new=%d", pos, layoutStruct[pos].effMinWidth, layoutStruct[pos].effMinWidth, w );
@@ -785,7 +789,7 @@ int AutoTableLayout::calcEffectiveWidth()
                 qDebug("extending maxWidth of cols %d-%d to %dpx", col, lastCol-1, cMaxWidth );
 #endif
                 for ( unsigned int pos = col; maxWidth >= 0 && pos < lastCol; pos++ ) {
-                    int w = kMax( layoutStruct[pos].effMaxWidth, maxWidth ? (cMaxWidth * layoutStruct[pos].effMaxWidth / maxWidth) : cMaxWidth );
+                    int w = max( layoutStruct[pos].effMaxWidth, maxWidth ? (cMaxWidth * layoutStruct[pos].effMaxWidth / maxWidth) : cMaxWidth );
 #ifdef DEBUG_LAYOUT
                     qDebug("   col %d: max=%d, effMax=%d, new=%d", pos, layoutStruct[pos].effMaxWidth, layoutStruct[pos].effMaxWidth, w );
 #endif
@@ -796,7 +800,7 @@ int AutoTableLayout::calcEffectiveWidth()
             }
         } else {
             for (unsigned int pos = col; pos < lastCol; pos++)
-                layoutStruct[pos].maxWidth = kMax(layoutStruct[pos].maxWidth, layoutStruct[pos].minWidth );
+                layoutStruct[pos].maxWidth = max(layoutStruct[pos].maxWidth, layoutStruct[pos].minWidth );
         }
     }
     effWidthDirty = false;
@@ -905,7 +909,7 @@ void AutoTableLayout::layout()
         for ( int i = 0; i < nEffCols; i++ ) {
             Length &width = layoutStruct[i].effWidth;
             if ( width.isPercent() ) {
-                int w = kMax(int(layoutStruct[i].effMinWidth), width.calcMinValue(tableWidth));
+                int w = max(int(layoutStruct[i].effMinWidth), width.calcMinValue(tableWidth));
                 available += layoutStruct[i].calcWidth - w;
                 layoutStruct[i].calcWidth = w;
             }
@@ -916,10 +920,10 @@ void AutoTableLayout::layout()
             for ( int i = nEffCols-1; i >= 0; i-- ) {
                 if ( layoutStruct[i].effWidth.isPercent() ) {
                     int w = layoutStruct[i].calcWidth;
-                    int reduction = kMin( w,  excess );
+                    int reduction = min( w,  excess );
                     // the lines below might look inconsistent, but that's the way it's handled in mozilla
                     excess -= reduction;
-                    int newWidth = kMax( int (layoutStruct[i].effMinWidth), w - reduction );
+                    int newWidth = max( int (layoutStruct[i].effMinWidth), w - reduction );
                     available += w - newWidth;
                     layoutStruct[i].calcWidth = newWidth;
                 }
@@ -963,7 +967,7 @@ void AutoTableLayout::layout()
         for ( int i = 0; i < nEffCols; i++ ) {
             Length &width = layoutStruct[i].effWidth;
             if ( width.isAuto() && totalAuto != 0 ) {
-                int w = kMax(int(layoutStruct[i].calcWidth), available * layoutStruct[i].effMaxWidth / totalAuto);
+                int w = max(int(layoutStruct[i].calcWidth), available * layoutStruct[i].effMaxWidth / totalAuto);
                 available -= w;
                 totalAuto -= layoutStruct[i].effMaxWidth;
                 layoutStruct[i].calcWidth = w;