ChangeLog-2007-10-14   [plain text]


2007-10-14  Eric Seidel  <eric@webkit.org>

        Reviewed by aroben.

        Remove senseless malloc from paintOutline
        No tests needed, no functional change.

        * rendering/RenderFlow.cpp:
        (WebCore::RenderFlow::paintOutline): remove unneeded malloc

2007-10-13  Eric Seidel  <eric@webkit.org>

        Reviewed by Mark Rowe.

        Fix SVGSVGElement::currentView() to not leak by using an OwnPtr.
        This fix is incompatible with changes eventually needed for supporting
        SVGSVGElement.currentView in the bindings (that needs a ref'd object)
        There are also several parser crashers in SVGViewSpec, but those will be fixed
        in my next patch.
        
        Leak fix only, no additional tests needed.

        * ksvg2/svg/SVGSVGElement.cpp:
        (WebCore::SVGSVGElement::currentView): call .get() and .set()
        * ksvg2/svg/SVGSVGElement.h: use OwnPtr

2007-10-13  Oliver Hunt  <oliver@apple.com>

        Reviewed by Maciej.

        Fixing a few testcases by enabling SVG_EXPERIMENTAL on windows, and making the
        required fixes and corrections.

        * WebCore.vcproj/WebCore.vcproj:
        * WebCore.vcproj/build-generated-files.sh:
        * bindings/scripts/CodeGeneratorJS.pm:
        * ksvg2/scripts/make_names.pl:
        * ksvg2/svg/SVGColor.cpp:
        (WebCore::SVGColor::colorFromRGBColorString):
        * page/DOMWindow.idl:
        * platform/graphics/svg/cg/SVGResourceFilterCg.cpp:
        * platform/win/WebCoreTextRenderer.cpp:

2007-10-12  Darin Adler  <darin@apple.com>

        Reviewed by Sam.

        - more float/int conversion (to try to get the old builbot up)

        * rendering/RenderSVGRoot.cpp:
        (WebCore::RenderSVGRoot::layout): Cast to int.
        (WebCore::RenderSVGRoot::applyContentTransforms): Ditto.
        (WebCore::RenderSVGRoot::nodeAtPoint): Ditto.

2007-10-12  Justin Garcia  <justin.garcia@apple.com>

        Reviewed by Harrison.
        
        <rdar://problem/5483370> GoogleDocs: Deleting cell text in a table row also removes any empty rows beneath the row being edited
        <rdar://problem/5482524> GoogleDocs: A hang occurs when applying list to selected table
        
        * editing/DeleteSelectionCommand.cpp:
        (WebCore::DeleteSelectionCommand::removePreviouslySelectedEmptyTableRows):
        * editing/InsertListCommand.cpp:
        (WebCore::InsertListCommand::modifyRange):
        (WebCore::InsertListCommand::doApply):

2007-10-12  Darin Adler  <darin@apple.com>

        - fix another float/int conversion

        * platform/graphics/svg/cg/SVGResourceMaskerCg.mm:
        (WebCore::SVGResourceMasker::applyMask): Explicitly cast to int.

2007-10-12  Darin Adler  <darin@apple.com>

        Reviewed by Oliver Hunt.

        - fix float/int conversions that cause warnings on older versions
          of gcc (like the version currently being used on the PowerPC
          buildbot slave)

        * rendering/RenderPath.cpp:
        (WebCore::RenderPath::paint): Explicitly cast to int.
        (WebCore::RenderPath::addFocusRingRects): Use enclosingIntRect
        to convert a FloatRect to an IntRect.
        * rendering/SVGRootInlineBox.cpp:
        (WebCore::SVGRootInlineBoxPaintWalker::chunkPortionCallback):
        Use 0 for the initial value of an int, rather than 0.0f.
        (WebCore::svgTextStyleForInlineTextBox): Explicitly cast to int.
        (WebCore::applyTextAnchorToTextChunk): Ditto.

2007-10-12  Oliver Hunt  <oliver@apple.com>

        Reviewed by Mark.

        Cast zoom factor to int as the original patch did.  This is necessary to appease some versions of gcc.

        * ksvg2/svg/SVGSVGElement.cpp:
        (WebCore::SVGSVGElement::setCurrentScale):

2007-10-12  Eric Seidel  <eric@webkit.org>

        Reviewed by Mark Rowe.

        Fix leaks in SVG code from feature-branch.

        * ksvg2/svg/SVGFEDiffuseLightingElement.cpp:
        (WebCore::SVGFEDiffuseLightingElement::filterEffect):
        * ksvg2/svg/SVGFEFloodElement.cpp:
        (WebCore::SVGFEFloodElement::filterEffect):
        * ksvg2/svg/SVGFESpecularLightingElement.cpp:
        (WebCore::SVGFESpecularLightingElement::filterEffect):
        * ksvg2/svg/SVGGradientElement.cpp:
        (WebCore::SVGGradientElement::buildStops):
        * ksvg2/svg/SVGStyledElement.cpp:
        (WebCore::SVGStyledElement::resolveStyle): always refs style
        * platform/graphics/cg/ImageBufferCG.cpp:
        (WebCore::ImageBuffer::create): fastFree buffer if CG Context creation fails

2007-10-12  Mark Rowe  <mrowe@apple.com>

        Windows, Gtk and Qt build fixes.  Add new files to projects.

        * WebCore.pro:
        * WebCore.vcproj/WebCore.vcproj:

=== Start merge of feature-branch 2007-10-12 ===

2007-10-11  Oliver Hunt  <oliver@apple.com>

        Reviewed by Sam.

        Bug 15469: feature branch has 100's of implicit double -> float conversions

        Re-enable -Wshorten-64-to-32, and make required code changes to make us build sanely again.
        
        * WebCore.xcodeproj/project.pbxproj:
        * bindings/js/JSSVGMatrixCustom.cpp:
        (WebCore::JSSVGMatrix::translate):
        (WebCore::JSSVGMatrix::scale):
        (WebCore::JSSVGMatrix::scaleNonUniform):
        (WebCore::JSSVGMatrix::rotate):
        (WebCore::JSSVGMatrix::skewX):
        (WebCore::JSSVGMatrix::skewY):
        * bindings/scripts/CodeGeneratorJS.pm:
        * bindings/scripts/CodeGeneratorObjC.pm:
        * ksvg2/css/SVGRenderStyle.cpp:
        (WebCore::SVGRenderStyle::cssPrimitiveToLength):
        * ksvg2/css/SVGRenderStyle.h:
        * ksvg2/svg/SVGAnimateMotionElement.cpp:
        (WebCore::SVGAnimateMotionElement::parseMappedAttribute):
        (WebCore::SVGAnimateMotionElement::updateAnimatedValue):
        (WebCore::parsePoint):
        (WebCore::SVGAnimateMotionElement::calculateFromAndToValues):
        * ksvg2/svg/SVGAnimationElement.cpp:
        (WebCore::SVGAnimationElement::parseKeyNumbers):
        (WebCore::parseKeySplines):
        * ksvg2/svg/SVGComponentTransferFunctionElement.cpp:
        (WebCore::SVGComponentTransferFunctionElement::SVGComponentTransferFunctionElement):
        (WebCore::SVGComponentTransferFunctionElement::parseMappedAttribute):
        * ksvg2/svg/SVGFECompositeElement.cpp:
        (WebCore::SVGFECompositeElement::SVGFECompositeElement):
        (WebCore::SVGFECompositeElement::parseMappedAttribute):
        * ksvg2/svg/SVGFEDiffuseLightingElement.cpp:
        (WebCore::SVGFEDiffuseLightingElement::SVGFEDiffuseLightingElement):
        (WebCore::SVGFEDiffuseLightingElement::parseMappedAttribute):
        * ksvg2/svg/SVGFEDisplacementMapElement.cpp:
        (WebCore::SVGFEDisplacementMapElement::SVGFEDisplacementMapElement):
        (WebCore::SVGFEDisplacementMapElement::parseMappedAttribute):
        * ksvg2/svg/SVGFEGaussianBlurElement.cpp:
        (WebCore::SVGFEGaussianBlurElement::SVGFEGaussianBlurElement):
        (WebCore::SVGFEGaussianBlurElement::parseMappedAttribute):
        * ksvg2/svg/SVGFELightElement.cpp:
        (WebCore::SVGFELightElement::SVGFELightElement):
        (WebCore::SVGFELightElement::parseMappedAttribute):
        * ksvg2/svg/SVGFEOffsetElement.cpp:
        (WebCore::SVGFEOffsetElement::SVGFEOffsetElement):
        (WebCore::SVGFEOffsetElement::parseMappedAttribute):
        * ksvg2/svg/SVGFESpecularLightingElement.cpp:
        (WebCore::SVGFESpecularLightingElement::SVGFESpecularLightingElement):
        (WebCore::SVGFESpecularLightingElement::parseMappedAttribute):
        * ksvg2/svg/SVGFETurbulenceElement.cpp:
        (WebCore::SVGFETurbulenceElement::SVGFETurbulenceElement):
        (WebCore::SVGFETurbulenceElement::parseMappedAttribute):
        * ksvg2/svg/SVGFitToViewBox.cpp:
        (WebCore::SVGFitToViewBox::parseMappedAttribute):
        * ksvg2/svg/SVGFitToViewBox.h:
        * ksvg2/svg/SVGLength.cpp:
        (WebCore::SVGLength::setValueAsString):
        (WebCore::SVGLength::PercentageOfViewport):
        * ksvg2/svg/SVGNumber.idl:
        * ksvg2/svg/SVGNumberList.cpp:
        (WebCore::SVGNumberList::parse):
        * ksvg2/svg/SVGNumberList.h:
        * ksvg2/svg/SVGParserUtilities.cpp:
        (WebCore::_parseNumber):
        (WebCore::parseNumber):
        (WebCore::pointsListFromSVGData):
        (WebCore::PathBuilder::svgMoveTo):
        (WebCore::PathBuilder::svgLineTo):
        (WebCore::PathBuilder::svgCurveToCubic):
        (WebCore::SVGPathSegListBuilder::svgMoveTo):
        (WebCore::SVGPathSegListBuilder::svgLineTo):
        (WebCore::SVGPathSegListBuilder::svgLineToHorizontal):
        (WebCore::SVGPathSegListBuilder::svgLineToVertical):
        (WebCore::SVGPathSegListBuilder::svgCurveToCubic):
        (WebCore::SVGPathSegListBuilder::svgCurveToCubicSmooth):
        (WebCore::SVGPathSegListBuilder::svgCurveToQuadratic):
        (WebCore::SVGPathSegListBuilder::svgCurveToQuadraticSmooth):
        (WebCore::SVGPathSegListBuilder::svgArcTo):
        * ksvg2/svg/SVGParserUtilities.h:
        * ksvg2/svg/SVGPathElement.cpp:
        (WebCore::SVGPathElement::SVGPathElement):
        * ksvg2/svg/SVGSVGElement.cpp:
        (WebCore::SVGSVGElement::pixelUnitToMillimeterX):
        (WebCore::SVGSVGElement::pixelUnitToMillimeterY):
        * ksvg2/svg/SVGSVGElement.h:
        * ksvg2/svg/SVGTransformDistance.cpp:
        (WebCore::SVGTransformDistance::addToSVGTransform):
        (WebCore::SVGTransformDistance::distance):
        * ksvg2/svg/SVGTransformDistance.h:
        * ksvg2/svg/SVGTransformable.cpp:
        (WebCore::SVGTransformable::parseTransformValue):
        * ksvg2/svg/SVGViewSpec.cpp:
        (WebCore::SVGViewSpec::parseViewSpec):
        * platform/graphics/svg/SVGResourceFilter.cpp:
        (WebCore::SVGResourceFilter::filterBBoxForItemBBox):
        * platform/graphics/svg/cg/CgSupport.cpp:
        (WebCore::applyStrokeStyleToContext):
        * platform/graphics/svg/cg/SVGPaintServerPatternCg.cpp:
        (WebCore::SVGPaintServerPattern::setup):
        * platform/graphics/svg/cg/SVGResourceFilterCg.mm:
        (WebCore::SVGResourceFilter::applyFilter):
        * platform/graphics/svg/filters/SVGFEComponentTransfer.h:
        (WebCore::SVGComponentTransferFunction::SVGComponentTransferFunction):
        * platform/graphics/svg/filters/SVGFEComposite.cpp:
        (WebCore::SVGFEComposite::SVGFEComposite):
        * platform/graphics/svg/filters/SVGFEConvolveMatrix.cpp:
        (WebCore::SVGFEConvolveMatrix::SVGFEConvolveMatrix):
        * platform/graphics/svg/filters/SVGFEDiffuseLighting.cpp:
        (WebCore::SVGFEDiffuseLighting::SVGFEDiffuseLighting):
        * platform/graphics/svg/filters/SVGFEFlood.cpp:
        (WebCore::SVGFEFlood::SVGFEFlood):
        * platform/graphics/svg/filters/SVGFEGaussianBlur.cpp:
        (WebCore::SVGFEGaussianBlur::SVGFEGaussianBlur):
        * platform/graphics/svg/filters/SVGFEMorphology.cpp:
        (WebCore::SVGFEMorphology::SVGFEMorphology):
        * platform/graphics/svg/filters/SVGFEOffset.cpp:
        (WebCore::SVGFEOffset::SVGFEOffset):
        * platform/graphics/svg/filters/SVGFESpecularLighting.cpp:
        (WebCore::SVGFESpecularLighting::SVGFESpecularLighting):
        * platform/graphics/svg/filters/SVGFETurbulence.cpp:
        (WebCore::SVGFETurbulence::SVGFETurbulence):
        * platform/graphics/svg/filters/cg/SVGFEColorMatrixCg.mm:
        (WebCore::SVGFEColorMatrix::getCIFilter):
        * platform/graphics/svg/filters/cg/SVGFEHelpersCg.mm:
        (WebCore::getVectorForChannel):
        (WebCore::getLightVectors):
        * platform/graphics/svg/filters/cg/SVGFEImageCg.mm:
        (WebCore::SVGFEImage::getCIFilter):
        * rendering/RenderPath.cpp:
        (WebCore::RenderPath::drawMarkersIfNeeded):
        * rendering/RenderSVGImage.cpp:
        (WebCore::RenderSVGImage::paint):
        * rendering/RenderSVGInlineText.cpp:
        (WebCore::RenderSVGInlineText::computeAbsoluteRectForRange):
        * rendering/RenderSVGRoot.cpp:
        (WebCore::RenderSVGRoot::applyContentTransforms):
        (WebCore::RenderSVGRoot::calcViewport):
        (WebCore::RenderSVGRoot::nodeAtPoint):
        * rendering/RenderSVGText.cpp:
        (WebCore::RenderSVGText::absoluteRects):
        (WebCore::RenderSVGText::relativeBBox):
        * rendering/RenderSVGTextPath.cpp:
        * rendering/SVGCharacterLayoutInfo.cpp:
        (WebCore::calculateBaselineShift):
        (WebCore::SVGCharacterLayoutInfo::SVGCharacterLayoutInfo):
        (WebCore::SVGCharacterLayoutInfo::processedChunk):
        (WebCore::SVGCharacterLayoutInfo::nextPathLayoutPointAndAngle):
        (WebCore::SVGCharacterLayoutInfo::addLayoutInformation):
        * rendering/SVGCharacterLayoutInfo.h:
        * rendering/SVGInlineTextBox.cpp:
        (WebCore::SVGInlineTextBox::calculateGlyphBoundaries):
        (WebCore::SVGInlineTextBoxClosestCharacterToPositionWalker::chunkPortionCallback):
        (WebCore::pathForDecoration):
        * rendering/SVGRenderTreeAsText.cpp:
        (WebCore::writeStyle):
        * rendering/SVGRootInlineBox.cpp:
        (WebCore::SVGRootInlineBoxPaintWalker::chunkPortionCallback):
        (WebCore::applyTextAnchorToTextChunk):
        (WebCore::SVGRootInlineBox::buildLayoutInformation):
        (WebCore::SVGRootInlineBox::buildLayoutInformationForTextBox):

2007-10-11  Andrew Wellington  <proton@wiretapped.net>

        Reviewed by Eric Seidel.

        Fix for http://bugs.webkit.org/show_bug.cgi?id=15076
        "deg2rad has multiple definitions"
        
        Use deg2rad, rad2deg, deg2grad, grad2deg, rad2grad, grad2rad
        from wtf where appropriate.
        
        No test cases as this doesn't change behaviour.
        
        Change based on original patch by Rob Buis.

        * ksvg2/svg/SVGAngle.cpp:
        (WebCore::SVGAngle::calculate):
        (WebCore::SVGAngle::convertToSpecifiedUnits):
        (WebCore::SVGAngle::todeg):
        (WebCore::SVGAngle::torad):
        * platform/graphics/AffineTransform.cpp:
        (WebCore::AffineTransform::rotateFromVector):
        (WebCore::AffineTransform::skewX):
        (WebCore::AffineTransform::skewY):
        * platform/graphics/cg/AffineTransformCG.cpp:
        (WebCore::AffineTransform::rotate):
        * platform/graphics/svg/filters/cg/SVGFEColorMatrixCg.mm:
        * platform/graphics/svg/filters/cg/SVGFEHelpersCg.h:
        * platform/graphics/svg/filters/cg/SVGFEHelpersCg.mm:
        * rendering/RenderPath.cpp:
        (WebCore::drawMarkerWithData):

2007-10-11  Nikolas Zimmermann  <zimmermann@kde.org>

        Reviewed by Oliver.

        Fixes: http://bugs.webkit.org/show_bug.cgi?id=6421 (<text> textLength attribute is not respected)
        Fixes: http://bugs.webkit.org/show_bug.cgi?id=6422 (<text> lengthAdjust attribute is not respected)

        Implement textLength and full lengthAdjust (both 'spacing' & 'spacingAndGlyphs' mode)
        for <text> & <tspan> & friends. <textPath> is still todo, as it's special.

        Also fix usage of cummulatedGlyphWidth/Height in SVGInlineTextBox, calculateGlyphBoundaries was
        supposed to be used in the distance calculations, to take per character transformations into account (ie. rotation).

        Fixes: svg/W3C-SVG-1.1/text-text-01-b.svg (complelty fixed the single W3C textLength testcase)
        Partly fixed: svg/batik/text/textOnPathSpaces.svg (kerning support missing)
        Partly fixed: svg/batik/text/textLayout.svg (word-letter spacing & textLength is todo)

        * ksvg2/svg/SVGTextContentElement.cpp:
        (WebCore::SVGTextContentElement::SVGTextContentElement):
        (WebCore::SVGTextContentElement::parseMappedAttribute):
        * rendering/SVGCharacterLayoutInfo.cpp:
        (WebCore::SVGCharacterLayoutInfo::nextPathLayoutPointAndAngle):
        * rendering/SVGCharacterLayoutInfo.h:
        (WebCore::SVGTextChunk::SVGTextChunk):
        (WebCore::SVGTextChunkWalker::operator()):
        * rendering/SVGInlineTextBox.cpp:
        (WebCore::SVGInlineTextBoxClosestCharacterToPositionWalker::chunkPortionCallback):
        (WebCore::SVGInlineTextBoxSelectionRectWalker::chunkPortionCallback):
        (WebCore::SVGInlineTextBox::svgCharacterHitsPosition):
        * rendering/SVGRootInlineBox.cpp:
        (WebCore::SVGRootInlineBoxPaintWalker::chunkPortionCallback):
        (WebCore::cummulatedWidthOrHeightOfTextChunk):
        (WebCore::cummulatedWidthOfTextChunk):
        (WebCore::cummulatedHeightOfTextChunk):
        (WebCore::applyTextAnchorToTextChunk):
        (WebCore::applyTextLengthCorrectionToTextChunk):
        (WebCore::SVGRootInlineBox::buildLayoutInformationForTextBox):
        (WebCore::SVGRootInlineBox::buildTextChunks):
        (WebCore::SVGRootInlineBox::layoutTextChunks):
        (WebCore::SVGRootInlineBox::walkTextChunks):

2007-10-11  Oliver Hunt  <oliver@apple.com>

        Reviewed by Niko.

        Fix for Bug 15468: Parsing of numbers and lists is too lenient in SVG

        Correct parsing of numbers, number lists, and length lists in SVG.

        * ksvg2/svg/SVGLength.cpp:
        (WebCore::SVGLength::setValueAsString):
        * ksvg2/svg/SVGLength.h:
        * ksvg2/svg/SVGLengthList.cpp:
        (WebCore::SVGLengthList::parse):
        * ksvg2/svg/SVGParserUtilities.cpp:
        (WebCore::parseNumber):

2007-10-11  Allan Sandfeld Jensen  <sandfeld@kde.org>
 
         Reviewed by Maciej and Eric.
 
         Implement CSS selector combinators nondeterministic matching. 
         Fixes http://bugs.webkit.org/show_bug.cgi?id=3428
 
         * css/CSSStyleSelector.cpp:
         (WebCore::CSSStyleSelector::matchRulesForList):
         (WebCore::CSSStyleSelector::checkSelector): Split the function and make the second part recursive
         (WebCore::CSSStyleSelector::checkOneSelector): Handle pseodo-elements rules and hoveractive quirks 
         here instead of in checkSelector.
         * css/CSSStyleSelector.h:
 
2007-10-10  Eric Seidel  <eric@webkit.org>

        Reviewed by Nikolas Zimmermann.
        
        Fix the SVG dom so that rect.x.baseVal = rect.x.baseVal like it should.
        http://bugs.webkit.org/show_bug.cgi?id=14150

        Test: svg/dom/animated-tearoff-equlity.xhtml

        * ksvg2/svg/SVGAnimatedTemplate.h:
        (WebCore::SVGAnimatedTypeWrapperKey::SVGAnimatedTypeWrapperKey):
        (WebCore::SVGAnimatedTypeWrapperKey::operator==):
        (WebCore::SVGAnimatedTypeWrapperKeyHash::hash):
        (WebCore::SVGAnimatedTypeWrapperKeyHash::equal):
        (WebCore::SVGAnimatedTypeWrapperKeyHashTraits::deletedValue):
        (WebCore::SVGAnimatedTypeWrapperKeyHashTraits::emptyValue):
        (WebCore::SVGAnimatedTemplate::~SVGAnimatedTemplate):
        (WebCore::SVGAnimatedTemplate::wrapperCache):
        (WebCore::SVGAnimatedTemplate::forgetWrapper):
        (WebCore::lookupOrCreateWrapper):
        * ksvg2/svg/SVGElement.h:

2007-10-10  Oliver Hunt  <oliver@apple.com>

        Reviewed by Maciej.

        Leopard build fix -- SVGDocument should not trty to make read/write properties read-only

        Remove those API definitions SVGDocument now inherits from Document

        * ksvg2/svg/SVGDocument.idl:

2007-10-10  Eric Seidel  <eric@webkit.org>

        Reviewed by Oliver.

        Make renderers pull localTransform instead of depending on DOM elements to push
        This allows for cleaner invalidation code, and makes writing animation easier.
        Also fixed a tiny bug in SVGRenderImage focus ring calculations while there
        
        Updated test results for svg/custom/focus-ring.svg

        * WebCore.xcodeproj/project.pbxproj:
        * ksvg2/svg/SVGAElement.cpp:
        (WebCore::SVGAElement::createRenderer):
        * ksvg2/svg/SVGAnimateMotionElement.cpp:
        (WebCore::SVGAnimateMotionElement::applyAnimatedValueToElement):
        * ksvg2/svg/SVGAnimateTransformElement.cpp:
        (WebCore::SVGAnimateTransformElement::applyAnimatedValueToElement):
        * ksvg2/svg/SVGClipPathElement.cpp:
        (WebCore::SVGClipPathElement::canvasResource):
        * ksvg2/svg/SVGElement.h:
        * ksvg2/svg/SVGGElement.cpp:
        (WebCore::SVGGElement::createRenderer):
        * ksvg2/svg/SVGImageElement.cpp:
        * ksvg2/svg/SVGLocatable.cpp:
        (WebCore::SVGLocatable::getCTM):
        (WebCore::SVGLocatable::getScreenCTM):
        * ksvg2/svg/SVGMarkerElement.cpp:
        (WebCore::SVGMarkerElement::canvasResource):
        (WebCore::SVGMarkerElement::notifyAttributeChange):
        * ksvg2/svg/SVGSVGElement.h:
        * ksvg2/svg/SVGStyledElement.cpp:
        (WebCore::SVGStyledElement::rendererIsNeeded):
        (WebCore::SVGStyledElement::notifyResourceParentIfExistant):
        * ksvg2/svg/SVGStyledElement.h:
        (WebCore::SVGStyledElement::style):
        * ksvg2/svg/SVGStyledTransformableElement.cpp:
        (WebCore::SVGStyledTransformableElement::animatedLocalTransform):
        (WebCore::SVGStyledTransformableElement::parseMappedAttribute):
        (WebCore::SVGStyledTransformableElement::notifyAttributeChange):
        (WebCore::SVGStyledTransformableElement::createRenderer):
        * ksvg2/svg/SVGStyledTransformableElement.h:
        (WebCore::SVGStyledTransformableElement::toPathData):
        * ksvg2/svg/SVGSwitchElement.cpp:
        (WebCore::SVGSwitchElement::createRenderer):
        * ksvg2/svg/SVGTRefElement.cpp:
        (WebCore::SVGTRefElement::updateReferencedText):
        * ksvg2/svg/SVGTextElement.cpp:
        (WebCore::SVGTextElement::parseMappedAttribute):
        (WebCore::SVGTextElement::animatedLocalTransform):
        * ksvg2/svg/SVGTextElement.h:
        * ksvg2/svg/SVGTextPathElement.cpp:
        * ksvg2/svg/SVGTextPathElement.h:
        * ksvg2/svg/SVGTransformable.cpp:
        (WebCore::SVGTransformable::getCTM):
        (WebCore::SVGTransformable::getScreenCTM):
        * ksvg2/svg/SVGTransformable.h:
        * ksvg2/svg/SVGUseElement.cpp:
        (WebCore::SVGUseElement::createRenderer):
        (WebCore::SVGUseElement::attachShadowTree):
        * platform/graphics/AffineTransform.h:
        (WebCore::AffineTransform::operator!=):
        * platform/graphics/svg/SVGResourceMarker.cpp:
        (WebCore::SVGResourceMarker::setMarker):
        * platform/graphics/svg/SVGResourceMarker.h:
        * rendering/RenderForeignObject.cpp:
        (WebCore::RenderForeignObject::calculateLocalTransform):
        (WebCore::RenderForeignObject::layout):
        * rendering/RenderForeignObject.h:
        (WebCore::RenderForeignObject::localTransform):
        * rendering/RenderObject.cpp:
        * rendering/RenderObject.h:
        * rendering/RenderPath.cpp:
        (WebCore::RenderPath::RenderPath):
        (WebCore::RenderPath::localTransform):
        (WebCore::RenderPath::calculateLocalTransform):
        (WebCore::RenderPath::layout):
        * rendering/RenderPath.h:
        * rendering/RenderSVGContainer.cpp:
        (WebCore::RenderSVGContainer::localTransform):
        (WebCore::RenderSVGContainer::calculateLocalTransform):
        (WebCore::RenderSVGContainer::layout):
        * rendering/RenderSVGContainer.h:
        * rendering/RenderSVGImage.h:
        (WebCore::RenderSVGImage::localTransform):
        * rendering/RenderSVGText.cpp:
        (WebCore::RenderSVGText::calculateLocalTransform):
        (WebCore::RenderSVGText::layout):
        * rendering/RenderSVGText.h:
        (WebCore::RenderSVGText::isSVGText):
        (WebCore::RenderSVGText::localTransform):
        * rendering/RenderSVGTextPath.cpp:
        (WebCore::RenderSVGTextPath::layoutPath):
        (WebCore::RenderSVGTextPath::startOffset):
        (WebCore::RenderSVGTextPath::exactAlignment):
        (WebCore::RenderSVGTextPath::stretchMethod):
        * rendering/RenderSVGTextPath.h:
        * rendering/RenderSVGTransformableContainer.cpp: Added.
        (WebCore::RenderSVGTransformableContainer::RenderSVGTransformableContainer):
        (WebCore::RenderSVGTransformableContainer::calculateLocalTransform):
        * rendering/RenderSVGTransformableContainer.h: Added.
        * rendering/RenderSVGViewportContainer.h:

2007-10-10  Oliver Hunt  <oliver@apple.com>

        Reviewed by Eric.

        Bug 15451: SVGStyledElement must unregister itself from Resources on detach
        
        Use a global hashtable to maintain the relationship between the
        various SVG resources and their clients, across dom updates, etc.

        * ksvg2/svg/SVGStyledElement.cpp:
        (WebCore::SVGStyledElement::detach):
        * ksvg2/svg/SVGStyledElement.h:
        * platform/graphics/svg/SVGPaintServer.h:
        * platform/graphics/svg/SVGResource.cpp:
        (WebCore::ResourceSet::ResourceSet):
        (WebCore::clientMap):
        (WebCore::SVGResource::~SVGResource):
        (WebCore::SVGResource::invalidate):
        (WebCore::SVGResource::removeClient):
        (WebCore::SVGResource::addClient):
        * platform/graphics/svg/SVGResource.h:
        (WebCore::):
        (WebCore::SVGResource::isPaintServer):
        (WebCore::SVGResource::isFilter):
        (WebCore::SVGResource::isClipper):
        (WebCore::SVGResource::isMarker):
        (WebCore::SVGResource::isMasker):
        * platform/graphics/svg/SVGResourceClipper.h:
        (WebCore::SVGResourceClipper::resourceType):
        * platform/graphics/svg/SVGResourceFilter.h:
        * platform/graphics/svg/SVGResourceMarker.h:
        * platform/graphics/svg/SVGResourceMasker.h:

2007-10-10  Mark Rowe  <mrowe@apple.com>

        Windows build fix after r26109.

        * WebCore.vcproj/WebCore.vcproj:

2007-10-10  Oliver Hunt  <oliver@apple.com>

        Reviewed by Eric.

        Fix Bug 15433: Filters do not repaint when base resources change/update

        SVGFEImage now actually responds to image updates, and triggers a repaint.

        * platform/graphics/svg/SVGResource.h:
        * platform/graphics/svg/filters/SVGFEImage.cpp:
        (WebCore::SVGFEImage::setCachedImage):
          Don't re-set the image lest we want to trigger infinite recursion.
        (WebCore::SVGFEImage::imageChanged):
          Image change means we need to tell our clients to repaint
        * platform/graphics/svg/filters/SVGFEImage.h:
        * rendering/SVGRenderSupport.cpp:
        (WebCore::prepareToRenderSVGContent):
          make sure that users of filters are registered.

2007-10-09  Eric Seidel  <eric@webkit.org>

        Reviewed by Alp.

        Track changes in r26109 to fix the Gtk+ build.

        * WebCore.pro:

2007-10-09  Alexey Proskuryakov  <ap@webkit.org>

        Reviewed by Anders.

        http://bugs.webkit.org/show_bug.cgi?id=15436
        Wrong node order for XPath reverse axes

        Test: fast/xpath/reverse-axes.html

        * xml/XPathStep.cpp:
        (WebCore::XPath::Step::nodesInAxis): Do not prematurely sort reverse
        axes. Generate preceding axis nodes in reversed document order.

2007-10-09  Alexey Proskuryakov  <ap@webkit.org>

        Reviewed by Mitz.

        http://bugs.webkit.org/show_bug.cgi?id=15437
        XPath substring-after function is broken

        Test: fast/xpath/substring-after.html

        * xml/XPathFunctions.cpp:
        (WebCore::XPath::FunSubstringAfter::evaluate): Fix it for real this time, hopefully.

2007-10-09  Rob Buis  <buis@kde.org>

        Reviewed by Eric.

        http://bugs.webkit.org/show_bug.cgi?id=15080
        <use> element not refresh after adding objects by script in referrer

        Update shadow tree when elements are added/removed from a tree
        that is referenced by a <use>.

        * ksvg2/svg/SVGStyledElement.cpp:
        (WebCore::SVGStyledElement::childrenChanged):
        * ksvg2/svg/SVGStyledElement.h:

2007-10-09  Rob Buis  <buis@kde.org>

        Reviewed by Maciej.

        http://bugs.webkit.org/show_bug.cgi?id=15088
        HTMLOptionElement.selected returns false when parent HTMLSelectElement is "display: none" until parent's .selectedIndex is accessed

        Make sure the list items are up to date when there is no renderer.

        * html/HTMLSelectElement.cpp:
        (WebCore::HTMLSelectElement::recalcStyle):

2007-10-08  Eric Seidel  <eric@webkit.org>

        Reviewed by Oliver.

        Build fix.  Fix circular build rule for CSS*.in files evident on clean build.

        * DerivedSources.make:
        * WebCore.xcodeproj/project.pbxproj:
        * ksvg2/css/CSSPropertyNames.in: Removed.
        * ksvg2/css/CSSValueKeywords.in: Removed.
        * ksvg2/css/SVGCSSPropertyNames.in: Copied from ksvg2/css/CSSPropertyNames.in.
        * ksvg2/css/SVGCSSValueKeywords.in: Copied from ksvg2/css/CSSValueKeywords.in.

2007-10-08  Eric Seidel  <eric@webkit.org>

        Reviewed by hyatt.

        Implement getComputedStyle support for SVG CSS values
        http://bugs.webkit.org/show_bug.cgi?id=15422
        
        This also unifies SVG and non-SVG CSS hash lookups. A unified hash
        solves correctness problems as well as offers improved speed.
        
        Test: svg/css/getComputedStyle-basic.xhtml

        * DerivedSources.make: unify SVG and non-SVG CSS hash files
        * WebCore.xcodeproj/project.pbxproj: remove old SVG CSS hash files
        * css/CSSComputedStyleDeclaration.cpp:
        (WebCore::):
        (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): call getPropertyCSSValue
        * css/CSSComputedStyleDeclaration.h: add getPropertyCSSValue
        * css/CSSGrammar.y:
        * css/CSSParser.cpp:
        (WebCore::CSSParser::parseValue):
        * css/CSSStyleDeclaration.cpp:
        (WebCore::propertyID):
        * css/CSSStyleSelector.cpp:
        (WebCore::CSSStyleSelector::applyProperty):
        * ksvg2/css/CSSPropertyNames.in: remove font-size-adjust
        * ksvg2/css/SVGCSSComputedStyleDeclaration.cpp: Added.
        (WebCore::CSSComputedStyleDeclaration::getSVGPropertyCSSValue): added.
        * ksvg2/css/SVGCSSParser.cpp:
        (WebCore::CSSParser::parseSVGValue):
        * ksvg2/css/SVGCSSStyleSelector.cpp:
        (WebCore::CSSStyleSelector::applySVGProperty):
        * ksvg2/scripts/cssmakeprops: Removed.
        * ksvg2/scripts/cssmakevalues: Removed.
        * ksvg2/svg/SVGAnimationElement.cpp:
        * ksvg2/svg/SVGStyledElement.cpp:
        (WebCore::mapAttributeToCSSProperty):
        (WebCore::SVGStyledElement::cssPropertyIdForSVGAttributeName): remove font-size-adjust

2007-10-08  Sam Weinig  <sam@webkit.org>

        Reviewed by Steve Falkenburg;

        Fix for <rdar://problem/5519698> CrashTracer: [USER] 47 crashes in Safari at com.apple.WebCore: WebCore::XMLTokenizer::lineNumber const + 9

        Test: fast/innerHTML/innerHTML-script-tag-crash.xhtml

        * dom/XMLTokenizer.cpp:
        (WebCore::XMLTokenizer::lineNumber): Return 1 when there is no context.
        (WebCore::XMLTokenizer::columnNumber): ditto.

2007-10-08  Alexey Proskuryakov  <ap@webkit.org>

        * platform/mac/FontPlatformDataMac.mm:
        (WebCore::FontPlatformData::setFont): Restored one of the -1 checks removed in
        the previous change - we do need to check m_font!

2007-10-08  Alexey Proskuryakov  <ap@webkit.org>

        Reviewed by Darin.

        http://bugs.webkit.org/show_bug.cgi?id=15397
        Layout tests freeze in HashTable::lookup

        Fixes a DRT freeze on PowerPC.

        * platform/mac/FontPlatformDataMac.mm:
        (WebCore::FontPlatformData::FontPlatformData): Don't ask for a size of a nil font,
        the result is undefined.
        (WebCore::FontPlatformData::setFont): Ditto. Also removed some checks for -1 that
        were not sufficient, and thus likely unnecessary,

2007-10-07  Nikolas Zimmermann  <zimmermann@kde.org>

        Reviewed by Eric.

        Fix some issues with rotation & baseline-shift, when spanning
        across <tspan> elements. Highlighted by the existing batik tests.

        * rendering/SVGCharacterLayoutInfo.cpp:
        (WebCore::SVGCharacterLayoutInfo::SVGCharacterLayoutInfo):
        (WebCore::SVGCharacterLayoutInfo::processedChunk):
        (WebCore::SVGChar::characterTransform):
        * rendering/SVGCharacterLayoutInfo.h:
        * rendering/SVGInlineTextBox.cpp:
        (WebCore::SVGInlineTextBox::calculateGlyphBoundaries):
        (WebCore::SVGInlineTextBox::paintCharacters):
        (WebCore::SVGInlineTextBox::paintDecoration):
        * rendering/SVGRootInlineBox.cpp:
        (WebCore::SVGRootInlineBox::buildLayoutInformationForTextBox):

2007-10-07  Mark Rowe  <mrowe@apple.com>

        Reviewed by Maciej.

        Bug 5122: Need an equivalent of Mozilla's DOMContentLoaded event
        http://bugs.webkit.org/show_bug.cgi?id=5122

        This is based on a patch by Daniel Peebles (pumpkingod@gmail.com).

        Test: http/tests/loading/DOMContentLoaded-event.html

        * dom/Document.cpp:
        (WebCore::Document::finishedParsing): Dispatch the DOMContentLoaded event when parsing completes.
        * dom/EventNames.h:  Add DOMContentLoaded to the list of events.

2007-10-07  Alexey Proskuryakov  <ap@webkit.org>

        Reviewed by Eric Seidel.

        http://bugs.webkit.org/show_bug.cgi?id=15368
        xsl:import fails when preceded by comment

        Test: fast/xsl/import-after-comment.xml

        * xml/XSLStyleSheet.cpp:
        (WebCore::XSLStyleSheet::loadChildSheets): It's OK for xsl:import to be preceded by
        non-element nodes.

2007-10-07  Vincent Ricard  <magic@magicninja.org>

        Reviewed by Maciej.  Landed by eseidel.

        http://bugs.webkit.org/show_bug.cgi?id=15062
        Implement document.compatMode

        Tests: fast/dom/compatMode-AlmostStrict.html
               fast/dom/compatMode-Compat.html
               fast/dom/compatMode-Strict.html

        * html/HTMLDocument.cpp:
        (WebCore::HTMLDocument::compatMode):
        * html/HTMLDocument.h:
        * html/HTMLDocument.idl:

2007-10-07  Sam Weinig  <sam@webkit.org>

        Reviewed by Darin & Nikolas.  Landed by eseidel.

        Patch for http://bugs.webkit.org/show_bug.cgi?id=14455
        Autogenerate the JS bindings for the StyleSheetList

        * DerivedSources.make:
        * WebCore.pro:
        * WebCore.vcproj/WebCore.vcproj:
        * WebCore.xcodeproj/project.pbxproj:
        * bindings/js/JSStyleSheetListCustom.cpp: Added.
        (WebCore::JSStyleSheetList::canGetItemsForName):
        (WebCore::JSStyleSheetList::nameGetter):
        * bindings/js/kjs_css.cpp:
        * bindings/js/kjs_css.h:
        * bindings/objc/DOMUtility.mm:
        * bindings/scripts/CodeGeneratorJS.pm:
        * css/StyleSheetList.cpp:
        (WebCore::StyleSheetList::StyleSheetList):
        (WebCore::StyleSheetList::documentDestroyed):
        (WebCore::StyleSheetList::getNamedItem):
        * css/StyleSheetList.h: Add Document member variable and
        getNamedItem function to accommodate the odd javascript 
        name getter functionality.
        * css/StyleSheetList.idl:
        * dom/Document.cpp:
        (WebCore::Document::Document):
        (WebCore::Document::~Document):
        * page/DOMWindow.idl: Add StyleSheetListConstructor

2007-10-07  Lars Naesbye Christensen  <lars@naesbye.dk>

        Reviewed by Eric Seidel.

        make CSS cell cursor more mac-like
        http://bugs.webkit.org/show_bug.cgi?id=15325

        * Resources/cellCursor.png:

2007-10-06  Eric Seidel  <eric@webkit.org>

        Reviewed by Oliver.
        
        SVG does not correctly handle onfocusin, onfocusout or onactivate
        http://bugs.webkit.org/show_bug.cgi?id=12573

        Test: svg/W3C-SVG-1.1/script-handle-02-b.svg

        * ksvg2/svg/SVGElement.cpp:
        (WebCore::SVGElement::parseMappedAttribute):
        * ksvg2/svg/svgattrs.in: add onfocusin, onfocusout and onactivate

2007-10-06  Nikolas Zimmermann  <zimmermann@kde.org>

        Reviewed by Oliver.

        Never pass null input images to CICrop filter.

        * platform/graphics/svg/filters/cg/SVGFEComponentTransferCg.mm:
        (WebCore::SVGFEComponentTransfer::getCIFilter):
        * platform/graphics/svg/filters/cg/SVGFEHelpersCg.h:

2007-10-06  Mark Rowe  <mrowe@apple.com>

        Reviewed by Alp Toker.

        Gtk+ build fix and minor code cleanup.

        * WebCore.pro:
        * platform/gtk/FontCacheGtk.cpp:
        (WebCore::FontCache::getLastResortFallbackFont):
        (WebCore::FontCache::fontExists):

2007-10-06  Alexey Proskuryakov  <ap@webkit.org>

        Reviewed by Mitz.

        http://bugs.webkit.org/show_bug.cgi?id=15380
        XPath: id('foo') doesn't resolve correctly

        Test: fast/xpath/id-simple.html

        * xml/XPathFunctions.cpp:
        (WebCore::XPath::FunId::evaluate): Fixed a logic error in id() parameter parsing.

2007-10-06  Alexey Proskuryakov  <ap@webkit.org>

        Reviewed by Darin.

        Patch for http://bugs.webkit.org/show_bug.cgi?id=13707
        REGRESSION: JavaScript exceptions on quotes.burntelectrons.org

        http://bugs.webkit.org/show_bug.cgi?id=12628
        document.body is not supported in XHTML documents

        http://bugs.webkit.org/show_bug.cgi?id=14213
        On page with MIME type application/xhtml+xml, cookie don't work

        Moved a bunch of methods and properties from HTMLDocument down into Document to make
        them available for all documents (xml, svg).
        What was kept in HTMLDocument:
        - some methods and properties that are not in HTML5 (yet?);
        - open/write/writeln/close, as they will need to be modified to work on XML documents, and aren't
        of much use for those anyway;
        - designMode, because its definition in HTML5 is incompatible with our implementation.

        Covered by existing tests.

        * bindings/js/JSDocumentCustom.cpp:
        (WebCore::JSDocument::location):
        (WebCore::JSDocument::setLocation):
        * bindings/js/JSHTMLDocumentCustom.cpp:
        * bindings/objc/PublicDOMInterfaces.h:
        * dom/Document.cpp:
        (WebCore::Document::setBody):
        (WebCore::Document::cookie):
        (WebCore::Document::setCookie):
        (WebCore::Document::lastModified):
        * dom/Document.h:
        (WebCore::Document::title):
        * dom/Document.idl:
        * html/HTMLDocument.cpp:
        * html/HTMLDocument.h:
        * html/HTMLDocument.idl:

2007-10-06  Eric Seidel  <eric@webkit.org>

        Reviewed by Oliver Hunt.

        RenderSVGContainer (<g>) should not repaint when its bounds change (unless it has a filter)
        http://bugs.webkit.org/show_bug.cgi?id=15388
        This makes the Sun Lively Kernel invalidate only what it should!
        
        No tests possible in DRT.

        * ksvg2/svg/SVGCircleElement.cpp:
        (WebCore::SVGCircleElement::notifyAttributeChange): replace call to rebuildRenderer
        * ksvg2/svg/SVGEllipseElement.cpp:
        (WebCore::SVGEllipseElement::notifyAttributeChange): replace call to rebuildRenderer
        * ksvg2/svg/SVGImageElement.cpp:
        (WebCore::SVGImageElement::notifyAttributeChange): replace call to rebuildRenderer
        (WebCore::SVGImageElement::hasRelativeValues): implemented
        * ksvg2/svg/SVGImageElement.h:
        * ksvg2/svg/SVGLineElement.cpp:
        (WebCore::SVGLineElement::notifyAttributeChange): replace call to rebuildRenderer
        * ksvg2/svg/SVGPathElement.cpp:
        (WebCore::SVGPathElement::notifyAttributeChange): replace call to rebuildRenderer
        * ksvg2/svg/SVGPolyElement.cpp:
        (WebCore::SVGPolyElement::notifyAttributeChange): replace call to rebuildRenderer
        * ksvg2/svg/SVGRectElement.cpp:
        (WebCore::SVGRectElement::notifyAttributeChange): replace call to rebuildRenderer
        * ksvg2/svg/SVGStyledElement.cpp:
        * ksvg2/svg/SVGStyledElement.h:
        (WebCore::SVGStyledElement::hasRelativeValues): default to true instead
        * ksvg2/svg/SVGStyledTransformableElement.cpp:
        (WebCore::SVGStyledTransformableElement::updateLocalTransform): don't layout if no change
        * ksvg2/svg/SVGStyledTransformableElement.h:
        * ksvg2/svg/SVGTransform.h:
        * rendering/RenderPath.cpp:
        (WebCore::RenderPath::layout):
        * rendering/RenderPath.h:
        * rendering/RenderSVGContainer.cpp:
        (WebCore::RenderSVGContainer::layout):
        (WebCore::RenderSVGContainer::selfWillPaint): return true if have a filter
        (WebCore::RenderSVGContainer::paint):
        * rendering/RenderSVGContainer.h:
        * rendering/RenderSVGHiddenContainer.cpp:
        (WebCore::RenderSVGHiddenContainer::layout):
        * rendering/RenderSVGRoot.cpp:
        (WebCore::RenderSVGRoot::layout):
        * rendering/RenderSVGViewportContainer.cpp:
        (WebCore::RenderSVGViewportContainer::layout):
        (WebCore::RenderSVGViewportContainer::calcViewport): use floats

2007-10-06  Rob Buis  <buis@kde.org>

        Reviewed by Eric.

        Use document() instead of ownerDocument() and a few other cleanups.

        * ksvg2/misc/SVGDocumentExtensions.cpp:
        (WebCore::SVGDocumentExtensions::mapInstanceToElement):
        * ksvg2/svg/SVGCircleElement.cpp:
        (WebCore::SVGCircleElement::notifyAttributeChange):
        * ksvg2/svg/SVGClipPathElement.cpp:
        (WebCore::SVGClipPathElement::notifyAttributeChange):
        * ksvg2/svg/SVGElementInstance.cpp:
        (WebCore::containsUseChildNode):
        * ksvg2/svg/SVGEllipseElement.cpp:
        (WebCore::SVGEllipseElement::notifyAttributeChange):
        * ksvg2/svg/SVGGradientElement.cpp:
        (WebCore::SVGGradientElement::notifyAttributeChange):
        * ksvg2/svg/SVGImageElement.cpp:
        (WebCore::SVGImageElement::notifyAttributeChange):
        * ksvg2/svg/SVGLineElement.cpp:
        (WebCore::SVGLineElement::notifyAttributeChange):
        * ksvg2/svg/SVGMarkerElement.cpp:
        (WebCore::SVGMarkerElement::notifyAttributeChange):
        * ksvg2/svg/SVGMaskElement.cpp:
        (WebCore::SVGMaskElement::notifyAttributeChange):
        * ksvg2/svg/SVGPathElement.cpp:
        (WebCore::SVGPathElement::notifyAttributeChange):
        * ksvg2/svg/SVGPatternElement.cpp:
        (WebCore::SVGPatternElement::notifyAttributeChange):
        * ksvg2/svg/SVGPolyElement.cpp:
        (WebCore::SVGPolyElement::notifyAttributeChange):
        * ksvg2/svg/SVGRectElement.cpp:
        (WebCore::SVGRectElement::notifyAttributeChange):
        * ksvg2/svg/SVGStopElement.cpp:
        (WebCore::SVGStopElement::notifyAttributeChange):

2007-10-05  Eric Seidel  <eric@webkit.org>

        Reviewed by Oliver Hunt.

        SVG invalidates way too much during layout()
        http://bugs.webkit.org/show_bug.cgi?id=14003

        * ksvg2/svg/SVGElement.cpp:
        (WebCore::SVGElement::ownerSVGElement): simplify if
        (WebCore::SVGElement::viewportElement): simplify if
        * rendering/RenderSVGContainer.cpp:
        (WebCore::RenderSVGContainer::layout): only layout children if parent changed
        * rendering/RenderSVGRoot.cpp:
        (WebCore::RenderSVGRoot::layout): only layout children when size changes
        * rendering/RenderSVGText.cpp:
        (WebCore::RenderSVGText::layout): hack to avoid bad RenderBlock::layout code
        * rendering/RenderSVGViewportContainer.cpp:
        (WebCore::RenderSVGViewportContainer::layout): don't use RenderSVGContainer::layout()

2007-10-05  Oliver Hunt  <oliver@apple.com>

        Reviewed by Eric.

        30%+ performance improvement for svg embedded in xhtml

        Relayout internal to SVG was incorrectly being propagated to
        the containing xhtml element, which subsequently resulted in
        a full paint of the SVG, rather than just the dirty regions.

        * rendering/RenderObject.cpp:
        (WebCore::objectIsRelayoutBoundary):
        (WebCore::RenderObject::markContainingBlocksForLayout):

2007-10-03  Eric Seidel  <eric@webkit.org>

        Reviewed by Maciej.
        
        http://bugs.webkit.org/show_bug.cgi?id=12310
        Remove static variables from removeAllChildren causing crash.
        removeAllChildren now iterates over the entire tree instead of recursing.
        Also (according to Maciej) a possible 1-2% speedboost on HTML iBench.

        Test: fast/images/svg-background-crash-on-refresh.html

        * WebCore.xcodeproj/project.pbxproj:
        * dom/ContainerNode.cpp:
        (WebCore::addChildNodesToDeletionQueue):
        (WebCore::ContainerNode::removeAllChildren): use new addChildNodesToDeletionQueue

2007-10-03  David Hyatt  <hyatt@apple.com>

        Land support for the CSS @font-face rule.  This patch allows custom fonts
        to be downloaded from the Web and rendered in Web pages.  Right now only
        TrueType fonts are supported.  Proprietary formats like .eot are not
        supported.

        Reviewed by Eric Seidel

        Many tests will be coming in a future landing.

        * WebCore.base.exp:
        Expose some more stuff for WebKit, caused by font restructuring.

        * WebCore.xcodeproj/project.pbxproj:
        Add all the new font face files.

        * css/CSSComputedStyleDeclaration.cpp:
        (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
        Make sure to ignore the 'src' property of @font-face rules.

        * css/CSSFontFace.cpp: Added.
        (WebCore::CSSFontFace::CSSFontFace):
        (WebCore::CSSFontFace::~CSSFontFace):
        (WebCore::CSSFontFace::isLoaded):
        (WebCore::CSSFontFace::isValid):
        (WebCore::CSSFontFace::addSource):
        (WebCore::CSSFontFace::fontLoaded):
        (WebCore::CSSFontFace::getFontData):
        * css/CSSFontFace.h: Added.
        A CSSFontFace is a composite object.  It consists of multiple font-face sources, where each source represents either a remote or local
        file in a @font-face rule's src list.

        * css/CSSFontFaceRule.cpp:
        (WebCore::CSSFontFaceRule::setDeclaration):
        (WebCore::CSSFontFaceRule::cssText):
        * css/CSSFontFaceRule.h:
        The implementation of the @font-face rule itself in the CSS sheet back end.
        
        * css/CSSFontFaceSource.cpp: Added.
        (WebCore::CSSFontFaceSource::CSSFontFaceSource):
        (WebCore::CSSFontFaceSource::~CSSFontFaceSource):
        (WebCore::CSSFontFaceSource::pruneTable):
        (WebCore::CSSFontFaceSource::isLoaded):
        (WebCore::CSSFontFaceSource::isValid):
        (WebCore::CSSFontFaceSource::fontLoaded):
        (WebCore::CSSFontFaceSource::getFontData):
        * css/CSSFontFaceSource.h: Added.
        (WebCore::CSSFontFaceSource::string):
        (WebCore::CSSFontFaceSource::setFontFace):
        A font face source represents a single remote or local font.  If it represents a remote font than it wraps a CachedFont.
        
        * css/CSSFontFaceSrcValue.cpp: Added.
        (WebCore::CSSFontFaceSrcValue::isSupportedFormat):
        (WebCore::CSSFontFaceSrcValue::cssText):
        * css/CSSFontFaceSrcValue.h: Added.
        (WebCore::CSSFontFaceSrcValue::m_isLocal):
        (WebCore::CSSFontFaceSrcValue::~CSSFontFaceSrcValue):
        (WebCore::CSSFontFaceSrcValue::resource):
        (WebCore::CSSFontFaceSrcValue::format):
        (WebCore::CSSFontFaceSrcValue::isLocal):
        (WebCore::CSSFontFaceSrcValue::setFormat):
        Used in parsing.  Represents the parsed form of the src value that can then be used to build up a CSSFontFace.

        * css/CSSFontSelector.cpp: Added.
        (WebCore::CSSFontSelector::CSSFontSelector):
        (WebCore::CSSFontSelector::~CSSFontSelector):
        (WebCore::CSSFontSelector::isEmpty):
        (WebCore::CSSFontSelector::docLoader):
        (WebCore::hashForFont):
        (WebCore::CSSFontSelector::addFontFaceRule):
        (WebCore::CSSFontSelector::fontLoaded):
        (WebCore::CSSFontSelector::getFontData):
        * css/CSSFontSelector.h: Added.
        The CSS font selector is the object that selects the correct font given a specified font family.  It builds up a database of CSSFontFaces that can then be handed
        back.

        * css/CSSGrammar.y:
        * css/CSSParser.cpp:
        (WebCore::CSSParser::parseValue):
        (WebCore::CSSParser::parseFontFaceSrc):
        (WebCore::CSSParser::createFontFaceRule):
        * css/CSSParser.h:
        Modify the CSS grammar to now understand @font-face rules.

        * css/CSSPropertyNames.in:
        Add the src property.

        * css/CSSStyleSelector.cpp:
        (WebCore::CSSStyleSelector::CSSStyleSelector):
        (WebCore::CSSStyleSelector::styleForElement):
        (WebCore::CSSStyleSelector::updateFont):
        (WebCore::CSSRuleSet::addRulesFromSheet):
        (WebCore::CSSStyleSelector::applyProperty):
        (WebCore::CSSStyleSelector::ensureFontSelector):
        * css/CSSStyleSelector.h:
        (WebCore::CSSStyleSelector::fontSelector):
        The style selector now creates a font selector object and feeds it the appropriate information when @font-face rules are encountered.
    
        * dom/Document.cpp:
        (WebCore::Document::recalcStyle):
        Patch the update method now that it takes a font selector argument.
    
        * loader/Cache.cpp:
        (WebCore::createResource):
        (WebCore::Cache::getStatistics):
        * loader/Cache.h:
        Teach the Cache about CachedFonts.

        * loader/CachedFont.cpp: Added.
        (WebCore::CachedFont::CachedFont):
        (WebCore::CachedFont::~CachedFont):
        (WebCore::CachedFont::ref):
        (WebCore::CachedFont::data):
        (WebCore::CachedFont::beginLoadIfNeeded):
        (WebCore::CachedFont::ensureCustomFontData):
        (WebCore::CachedFont::platformDataFromCustomData):
        (WebCore::CachedFont::allReferencesRemoved):
        (WebCore::CachedFont::checkNotify):
        (WebCore::CachedFont::error):
        * loader/CachedFont.h: Added.
        (WebCore::CachedFont::schedule):
        The implementation of CachedFont.  This represents the downloaded resource and has all the raw font data.

        * loader/CachedResource.h:
        (WebCore::CachedResource::):
        * loader/CachedResourceClient.h:
        (WebCore::CachedResourceClient::fontLoaded):
        Add a new fontLoaded method for clients of cached resources to track when fonts finish downloading.
    
        * loader/DocLoader.cpp:
        (WebCore::DocLoader::requestFont):
        * loader/DocLoader.h:
         Add the ability to request a font.

        * platform/Font.cpp:
        (WebCore::Font::operator==):
        (WebCore::Font::update):
        (WebCore::Font::drawText):
        * platform/Font.h:
        * platform/FontCache.cpp:
        (WebCore::FontCache::getFontData):
        * platform/FontCache.h:
        * platform/FontData.cpp:
        (WebCore::FontData::FontData):
        * platform/FontData.h:
        (WebCore::FontData::isCustomFont):
        (WebCore::FontData::isLoading):
        * platform/FontFallbackList.cpp:
        (WebCore::FontFallbackList::FontFallbackList):
        (WebCore::FontFallbackList::invalidate):
        (WebCore::FontFallbackList::fontDataAt):
        * platform/FontFallbackList.h:
        (WebCore::FontFallbackList::loadingCustomFonts):
        (WebCore::FontFallbackList::fontSelector):
        * platform/FontSelector.h: Added.
        (WebCore::FontSelector::~FontSelector):
        * platform/GlyphPageTreeNode.cpp:
        (WebCore::GlyphPageTreeNode::getRoot):
        (WebCore::GlyphPageTreeNode::pruneTreeCustomFontData):
        (WebCore::GlyphPageTreeNode::~GlyphPageTreeNode):
        (WebCore::GlyphPageTreeNode::initializePage):
        (WebCore::GlyphPageTreeNode::getChild):
        (WebCore::GlyphPageTreeNode::pruneCustomFontData):
        * platform/GlyphPageTreeNode.h:
        (WebCore::GlyphPageTreeNode::GlyphPageTreeNode):
        (WebCore::GlyphPageTreeNode::page):
        * platform/PopupMenuClient.h:
        * platform/mac/FontCacheMac.mm:
        (WebCore::FontCache::getFontDataForCharacters):
        (WebCore::FontCache::getLastResortFallbackFont):
        (WebCore::FontCache::fontExists):
        (WebCore::FontCache::createFontPlatformData):
        * platform/mac/FontCustomPlatformData.cpp: Added.
        (WebCore::FontCustomPlatformData::~FontCustomPlatformData):
        (WebCore::FontCustomPlatformData::fontPlatformData):
        (WebCore::createFontCustomPlatformData):
        * platform/mac/FontCustomPlatformData.h: Added.
        (WebCore::FontCustomPlatformData::FontCustomPlatformData):
        * platform/mac/FontDataMac.mm:
        (WebCore::initFontData):
        (WebCore::FontData::platformInit):
        (WebCore::FontData::smallCapsFontData):
        (WebCore::FontData::platformWidthForGlyph):
        (WebCore::FontData::checkShapesArabic):
        * platform/mac/FontMac.mm:
        (WebCore::initializeATSUStyle):
        (WebCore::Font::drawGlyphs):
        * platform/mac/FontPlatformData.h:
        (WebCore::FontPlatformData::FontPlatformData):
        (WebCore::FontPlatformData::hash):
        (WebCore::FontPlatformData::operator==):
        * platform/mac/FontPlatformDataMac.mm: Added.
        (WebCore::FontPlatformData::FontPlatformData):
        (WebCore::~FontPlatformData):
        (WebCore::FontPlatformData::setFont):
        * platform/mac/WebCoreSystemInterface.h:
        * platform/mac/WebCoreSystemInterface.mm:
        * platform/win/FontCacheWin.cpp:
        (WebCore::FontCache::getLastResortFallbackFont):
        (WebCore::FontCache::fontExists):
        * platform/win/FontCustomPlatformData.cpp: Added.
        (WebCore::FontCustomPlatformData::~FontCustomPlatformData):
        (WebCore::FontCustomPlatformData::fontPlatformData):
        (WebCore::getData):
        (WebCore::releaseData):
        (WebCore::getBytesWithOffset):
        (WebCore::createFontCustomPlatformData):
        * platform/win/FontCustomPlatformData.h: Added.
        (WebCore::FontCustomPlatformData::FontCustomPlatformData):
        * platform/win/FontDataWin.cpp:
        (WebCore::FontData::platformInit):
        (WebCore::FontData::platformDestroy):
        (WebCore::FontData::smallCapsFontData):
        (WebCore::FontData::containsCharacters):
        (WebCore::FontData::determinePitch):
        * platform/win/FontPlatformData.h:
        (WebCore::FontPlatformData::FontPlatformData):
        (WebCore::FontPlatformData::hash):
        (WebCore::FontPlatformData::operator==):
        * platform/win/FontPlatformDataWin.cpp:
        (WebCore::FontPlatformData::FontPlatformData):
        * platform/win/PopupMenuWin.cpp:
        (WebCore::PopupMenu::paint):
        Changes to platform to support rendering of custom fonts.  Too large to go into, but for ports, the relevant object to implement is
        FontCustomPlatformData (to get the data loaded into your native font format), and then you have to patch your other font objects to know
        how to use the font.

        * rendering/RenderListBox.cpp:
        (WebCore::RenderListBox::updateFromElement):
        (WebCore::RenderListBox::paintItemForeground):
        * rendering/RenderMenuList.cpp:
        (WebCore::RenderMenuList::fontSelector):
        * rendering/RenderMenuList.h:
        * rendering/RenderTextControl.cpp:
        (WebCore::RenderTextControl::fontSelector):
        * rendering/RenderTextControl.h:
        * rendering/RenderThemeMac.mm:
        (WebCore::RenderThemeMac::setFontFromControlSize):
        * rendering/RenderThemeSafari.cpp:
        (WebCore::RenderThemeSafari::setFontFromControlSize):
        Patches for update now taking a font selector argument.
    
2007-10-03  Rob Buis  <buis@kde.org>

        Reviewed by Eric.

        Remove unneeded code and other cleanups.

        * ksvg2/svg/SVGScriptElement.cpp:
        (WebCore::SVGScriptElement::parseMappedAttribute):
        * ksvg2/svg/SVGScriptElement.h:

2007-10-03  Rob Buis  <buis@kde.org>

        Reviewed by Maciej.

        http://bugs.webkit.org/show_bug.cgi?id=15260
        Any styles defined after <element> {<property>:%} style are ignored by Safari
    
        Add dummy rule to skip constructions like width: %.

        * css/CSSGrammar.y:

2007-10-03  Mark Rowe  <mrowe@apple.com>

        Reviewed by Lars.

        Get Gtk+ port building on the feature branch.

        * WebCore.pro:
        * ksvg2/svg/SVGSVGElement.cpp:
        * platform/graphics/svg/cairo/RenderPathCairo.cpp:
        (WebCore::RenderPath::strokeContains):
        * platform/graphics/svg/cairo/SVGPaintServerCairo.cpp:
        (WebCore::SVGPaintServer::draw):
        (WebCore::SVGPaintServer::renderPath):
        * platform/graphics/svg/cairo/SVGPaintServerSolidCairo.cpp:
        (WebCore::SVGPaintServerSolid::setup):
        * platform/graphics/svg/cairo/SVGResourceMaskerCairo.cpp:
        (WebCore::SVGResourceMasker::applyMask):
        * rendering/SVGCharacterLayoutInfo.cpp:
        * rendering/SVGInlineTextBox.cpp:
        * rendering/SVGRootInlineBox.cpp:

2007-10-02  Alexey Proskuryakov  <ap@webkit.org>

        Reviewed by Maciej.

        http://bugs.webkit.org/show_bug.cgi?id=15102
        XMLHttpRequests should dispatch a readystatechange event.

        Test: http/tests/xmlhttprequest/readystatechange.html

        * xml/XMLHttpRequest.cpp:
        (WebCore::XMLHttpRequest::callReadyStateChangeListener): Added readystatechange
        event support. Fixed the function to dispatch the same event to all listeners
        instead of creating a new copy for each one. Changed bubbling/cancelability of
        load and readystatechange events to match Firefox.

2007-10-02  Eric Seidel  <eric@webkit.org>

        Reviewed by Oliver Hunt.

        http://bugs.webkit.org/show_bug.cgi?id=13828
        Fixes svg/custom/rootmost-svg-xy-attrs.xhtml

        * WebCore.xcodeproj/project.pbxproj: fix warning about SVGDOM.h
        * ksvg2/svg/SVGSVGElement.cpp:
        (WebCore::SVGSVGElement::viewport): use new isOutermostSVG()
        (WebCore::SVGSVGElement::getCTM): use isOutermostSVG()
        (WebCore::SVGSVGElement::getScreenCTM): use isOutermostSVG()
        (WebCore::SVGSVGElement::createRenderer): use isOutermostSVG()
        (WebCore::SVGSVGElement::isOutermostSVG):
        * ksvg2/svg/SVGSVGElement.h: add isOutermostSVG
        * rendering/RenderSVGRoot.cpp:
        (WebCore::RenderSVGRoot::calcViewport): ignore x/y

2007-10-02  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Mitz.
        
        - Avoid uselessly serializing CSS property values on replacement for 10% CK DOM speedup
        http://bugs.webkit.org/show_bug.cgi?id=15340

        * css/CSSMutableStyleDeclaration.cpp:
        (WebCore::CSSMutableStyleDeclaration::removeProperty): Don't generate return value unless needed.
        (WebCore::CSSMutableStyleDeclaration::setProperty): Use the no-return version appropriately.
        * css/CSSMutableStyleDeclaration.h:
        (WebCore::CSSMutableStyleDeclaration::removeProperty): New version with no return value.

2007-10-02  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Oliver.

        - Use Vector<UChar> instead of DeprecatedString for innerHTML, for 35% speedup on CK DOM test
        http://bugs.webkit.org/show_bug.cgi?id=15339

        Rewrote both versions of createMarkup to build based on
        Vector<UChar> instead of String. Also other miscellaneous
        speedups (mainly content strings are now encoded in a way that
        doesn't take a function call per character, and switch is avoided).
        
        This also causes a functional change - we no longer escape '>' since this was unnecessary and it's faster
        to avoid testing for it. See updated test results.
        
        * editing/markup.cpp:
        (WebCore::appendString):
        (WebCore::appendAttributeValue):
        (WebCore::escapeContentText):
        (WebCore::appendEscapedContent):
        (WebCore::appendDeprecatedString):
        (WebCore::appendQuotedURLAttributeValue):
        (WebCore::stringValueForRange):
        (WebCore::ucharRange):
        (WebCore::appendUCharRange):
        (WebCore::appendNamespace):
        (WebCore::appendStartMarkup):
        (WebCore::getStartMarkup):
        (WebCore::appendEndMarkup):
        (WebCore::getEndMarkup):
        (WebCore::appendMarkup):
        (WebCore::joinMarkups):
        (WebCore::createMarkup):
        * editing/markup.h:
        * page/mac/WebCoreFrameBridge.mm:
        (-[WebCoreFrameBridge markupStringFromNode:nodes:]):
        (-[WebCoreFrameBridge markupStringFromRange:nodes:]):

2007-10-02  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Eric.
        
        - fixed "innerHTML updates layout every time (very bad if adding to it in a loop)"
        http://bugs.webkit.org/show_bug.cgi?id=15326
        (65% speedup on Celtic Kane JS 2007 DOM test)

        * editing/markup.cpp:
        (WebCore::createMarkup): The Node version of this function currently never uses
        the render tree, so don't bother to update layout. This is the version used for
        innerHTML.

2007-10-02  Nicholas Shanks  <webkit@nickshanks.com>

        Reviewed by eseidel & hyatt.

        Add support for CSS3 values 'start' and 'end' to text-align property.

        * css/cssparser.cpp:
        (WebCore::CSSParser::parseValue): allow start and end values
        * css/cssstyleselector.cpp:
        (WebCore::CSSStyleSelector::applyProperty): handle start and end values

2007-10-01  Oliver Hunt  <oliver@apple.com>

        Reviewed by Mark.

        Enable Experimental SVG features by default when building from Xcode

        * Configurations/WebCore.xcconfig:

2007-10-01  Eric Seidel  <eric@webkit.org>

        Reviewed by Oliver Hunt.

        This only affects Debug builds, and the ability to save SVGs as WebArchives
        neither are testable via DumpRenderTree.

        * Configurations/WebCore.xcconfig: change where Xcode looks for WebCore.exp
        * DerivedSources.make: adds SVG symbols to WebCore.exp when necessary
        * WebCore.SVG.exp: Added.
        * WebCore.exp: moved to WebCore.base.exp
        * WebCore.xcodeproj/project.pbxproj: updated to reflect moved files
        * bindings/objc/DOMSVGExecption.h: moved to DOMSVGException.h

2007-10-01  Eric Seidel  <eric@webkit.org>

        Reviewed by olliej.

        Make feature-branch build again with ENABLE_SVG_EXPERIMENTAL_FEATURES
        Needed a double -> float change to make the new filter types build.

        Build fix, no test cases.

        * ksvg2/svg/SVGComponentTransferFunctionElement.cpp:
        * ksvg2/svg/SVGComponentTransferFunctionElement.h:
        * ksvg2/svg/SVGFECompositeElement.cpp:
        * ksvg2/svg/SVGFECompositeElement.h:
        * ksvg2/svg/SVGFEDiffuseLightingElement.cpp:
        * ksvg2/svg/SVGFEDiffuseLightingElement.h:
        * ksvg2/svg/SVGFEDisplacementMapElement.cpp:
        * ksvg2/svg/SVGFEDisplacementMapElement.h:
        * ksvg2/svg/SVGFEGaussianBlurElement.cpp:
        * ksvg2/svg/SVGFEGaussianBlurElement.h:
        * ksvg2/svg/SVGFELightElement.cpp:
        * ksvg2/svg/SVGFELightElement.h:
        * ksvg2/svg/SVGFEOffsetElement.cpp:
        * ksvg2/svg/SVGFEOffsetElement.h:
        * ksvg2/svg/SVGFESpecularLightingElement.cpp:
        * ksvg2/svg/SVGFESpecularLightingElement.h:
        * ksvg2/svg/SVGFETurbulenceElement.cpp:
        * ksvg2/svg/SVGFETurbulenceElement.h:

2007-09-30  Julien  <julien.chaffraix@gmail.com>

        Reviewed by aroben & eseidel.

        fix http://bugs.webkit.org/show_bug.cgi?id=14898

        getAllResponseHeaders() separates each header with a CR LF according to the specification

        Test: http/tests/xmlhttprequest/xmlhttprequest-crlf-getAllResponseHeader.html

        * xml/XMLHttpRequest.cpp:
        (WebCore::XMLHttpRequest::getAllResponseHeaders):

2007-09-28  Eric Seidel  <eric@webkit.org>

        Reviewed by Sam Wenig.

        ASSERT when dragging <svg:image> with non-null prefix
        http://bugs.webkit.org/show_bug.cgi?id=15308

        * bindings/objc/DOM.mm:
        (WebCore::lookupElementClass): added
        (WebCore::elementClass): use new lookupElementClass function

2007-09-25  Eric Seidel  <eric@webkit.org>

        Reviewed by Mark Rowe.

        I managed to break the SVG build when fixing the --no-svg build for
        http://bugs.webkit.org/show_bug.cgi?id=15281
        This adds the appropriate DOMSVG headers to the copy headers phase
        (in fixing the no-svg build I mistakenly re-marked them project-only)

        * WebCore.xcodeproj/project.pbxproj:

2007-09-25  Eric Seidel  <eric@webkit.org>

        Reviewed by Rob Buis.

        Already tested by SVG/W3C-SVG-1.1/linking-a-07-t.svg

        * ksvg2/svg/SVGAElement.cpp:
        (WebCore::SVGAElement::defaultEventHandler): properly pass along target values

2007-09-22  Oliver Hunt  <oliver@apple.com>

        Reviewed by NOBODY (Build fix).

        * platform/graphics/svg/cg/SVGPaintServerGradientCg.cpp:
        (WebCore::SVGPaintServerGradient::teardown):
        (WebCore::SVGPaintServerGradient::renderPath):
        * rendering/SVGRootInlineBox.cpp:
        (WebCore::SVGRootInlineBoxPaintWalker::chunkPortionCallback):

2007-09-09  Nikolas Zimmermann  <zimmermann@kde.org>

        Reviewed by Oliver.

        Rework <pattern> support to take overflow & viewBox into account.
        Also fix all possible combinations of patternUnits/patternContentUnits, tested by several batik testcases.
        (Status: <mask>, <pattern>, <linearGradient>, <radialGradient>, <filter> regions work perfectly. <clipPath> is sill todo)

        While I'm at it, add a very helpful debugging tool "dumpCGOutputImage" and rename "dumpOutputImage" to "dumpCIOutputImage".
        Also fix possible null image buffer problems. (ie. large alloc)

        Fixes: http://bugs.webkit.org/show_bug.cgi?id=12221 (Webkit ToT fails to render this pattern example)

        * ksvg2/svg/PatternAttributes.h:
        (WebCore::PatternAttributes::PatternAttributes):
        (WebCore::PatternAttributes::x):
        (WebCore::PatternAttributes::y):
        (WebCore::PatternAttributes::width):
        (WebCore::PatternAttributes::height):
        (WebCore::PatternAttributes::setX):
        (WebCore::PatternAttributes::setY):
        (WebCore::PatternAttributes::setWidth):
        (WebCore::PatternAttributes::setHeight):
        * ksvg2/svg/SVGPatternElement.cpp:
        (WebCore::SVGPatternElement::buildPattern):
        (WebCore::SVGPatternElement::collectPatternProperties):
        * platform/graphics/svg/cg/SVGPaintServerGradientCg.cpp:
        (WebCore::SVGPaintServerGradient::setup):
        * platform/graphics/svg/cg/SVGPaintServerPatternCg.cpp:
        (WebCore::patternCallback):
        (WebCore::SVGPaintServerPattern::setup):
        * platform/graphics/svg/cg/SVGResourceFilterCg.mm:
        (WebCore::dumpCIOutputImage):
        (WebCore::dumpCGOutputImage):

2007-09-05  Nikolas Zimmermann  <zimmermann@kde.org>

        Reviewed by Oliver.

        Fix <mask> in userSpaceOnUse coordinates. Verified by new testcase taken from Batik.

        * ksvg2/svg/SVGMaskElement.cpp:
        (WebCore::SVGMaskElement::drawMaskerContent):

2007-09-03  Nikolas Zimmermann  <zimmermann@kde.org>

        Reviewed by Oliver.

        Rewrite text painting code path, to be based on "text chunks" instead of using the InlineBox* hierarchy.
        This allows us to reuse paint servers as long as possible - and to actually paint in the way didacted by the spec.

        This also implements advanced SVG text decorations (ie. stroked/filled decos with gradient/pattern).
        Fixes: http://bugs.webkit.org/show_bug.cgi?id=7200 (Gradient appears and disappears in SVG when text is off screen)

        Fixes paint server usage on text paths. (ie. styled text paths, with gradients/filters).

        * platform/graphics/svg/SVGPaintServer.h:
        * platform/graphics/svg/SVGPaintServerGradient.h:
        * platform/graphics/svg/cg/SVGPaintServerCg.cpp:
        (WebCore::SVGPaintServer::draw):
        (WebCore::SVGPaintServer::renderPath):
        (WebCore::SVGPaintServer::strokePath):
        (WebCore::SVGPaintServer::clipToStrokePath):
        (WebCore::SVGPaintServer::fillPath):
        (WebCore::SVGPaintServer::clipToFillPath):
        * platform/graphics/svg/cg/SVGPaintServerGradientCg.cpp:
        (WebCore::findTextRootObject):
        (WebCore::SVGPaintServerGradient::teardown):
        (WebCore::SVGPaintServerGradient::renderPath):
        (WebCore::SVGPaintServerGradient::handleBoundingBoxModeAndGradientTransformation):
        (WebCore::SVGPaintServerGradient::setup):
        * platform/graphics/svg/cg/SVGPaintServerSolidCg.cpp:
        (WebCore::SVGPaintServerSolid::setup):
        * platform/graphics/svg/qt/SVGPaintServerQt.cpp:
        (WebCore::SVGPaintServer::draw):
        (WebCore::SVGPaintServer::renderPath):
        * rendering/RenderSVGInlineText.cpp:
        * rendering/RenderSVGTSpan.cpp:
        * rendering/RenderSVGText.cpp:
        * rendering/RenderSVGTextPath.cpp:
        * rendering/SVGCharacterLayoutInfo.h:
        (WebCore::SVGTextChunkWalkerBase::~SVGTextChunkWalkerBase):
        (WebCore::SVGTextChunkWalker::SVGTextChunkWalker):
        (WebCore::SVGTextChunkWalker::operator()):
        (WebCore::SVGTextChunkWalker::start):
        (WebCore::SVGTextChunkWalker::end):
        (WebCore::SVGTextChunkWalker::setupFill):
        (WebCore::SVGTextChunkWalker::setupStroke):
        * rendering/SVGInlineFlowBox.h:
        * rendering/SVGInlineTextBox.cpp:
        (WebCore::SVGInlineTextBoxClosestCharacterToPositionWalker::SVGInlineTextBoxClosestCharacterToPositionWalker):
        (WebCore::SVGInlineTextBoxClosestCharacterToPositionWalker::chunkPortionCallback):
        (WebCore::SVGInlineTextBoxClosestCharacterToPositionWalker::character):
        (WebCore::SVGInlineTextBoxClosestCharacterToPositionWalker::offset):
        (WebCore::SVGInlineTextBoxSelectionRectWalker::SVGInlineTextBoxSelectionRectWalker):
        (WebCore::SVGInlineTextBoxSelectionRectWalker::chunkPortionCallback):
        (WebCore::SVGInlineTextBoxSelectionRectWalker::selectionRect):
        (WebCore::SVGInlineTextBox::closestCharacterToPosition):
        (WebCore::SVGInlineTextBox::selectionRect):
        (WebCore::SVGInlineTextBox::paintCharacters):
        (WebCore::SVGInlineTextBox::paintSelection):
        (WebCore::pathForDecoration):
        (WebCore::SVGInlineTextBox::paintDecoration):
        * rendering/SVGInlineTextBox.h:
        * rendering/SVGRenderSupport.cpp:
        (WebCore::prepareToRenderSVGContent):
        * rendering/SVGRenderSupport.h:
        * rendering/SVGRootInlineBox.cpp:
        (WebCore::SVGRootInlineBoxPaintWalker::SVGRootInlineBoxPaintWalker):
        (WebCore::SVGRootInlineBoxPaintWalker::~SVGRootInlineBoxPaintWalker):
        (WebCore::SVGRootInlineBoxPaintWalker::teardownFillPaintServer):
        (WebCore::SVGRootInlineBoxPaintWalker::teardownStrokePaintServer):
        (WebCore::SVGRootInlineBoxPaintWalker::chunkStartCallback):
        (WebCore::SVGRootInlineBoxPaintWalker::chunkEndCallback):
        (WebCore::SVGRootInlineBoxPaintWalker::chunkSetupFillCallback):
        (WebCore::SVGRootInlineBoxPaintWalker::chunkSetupStrokeCallback):
        (WebCore::SVGRootInlineBoxPaintWalker::chunkPortionCallback):
        (WebCore::SVGRootInlineBox::paint):
        (WebCore::SVGRootInlineBox::buildLayoutInformationForTextBox):
        (WebCore::addPaintServerToTextDecorationInfo):
        (WebCore::SVGRootInlineBox::retrievePaintServersForTextDecoration):
        (WebCore::SVGRootInlineBox::walkTextChunks):
        * rendering/SVGRootInlineBox.h:

2007-08-27  Nikolas Zimmermann  <zimmermann@kde.org>

        Reviewed by Mitz.

        Expose unitsPerEm() in Font classes.
        This is needed to implement SVG's advanced text decorations. We won't draw lines for text-decorations
        but fillable & strokable rectangles with a certain height, computed through unitsPerEm & font size.

        * platform/Font.cpp:
        (WebCore::Font::unitsPerEm):
        * platform/Font.h:
        * platform/FontData.h:
        (WebCore::FontData::unitsPerEm):
        * platform/gdk/FontDataGdk.cpp:
        (WebCore::FontData::platformInit):
        * platform/mac/FontDataMac.mm:
        (WebCore::FontData::platformInit):
        * platform/qt/FontDataQt.cpp:
        (WebCore::FontData::platformInit):
        * platform/win/FontDataWin.cpp:
        (WebCore::FontData::platformInit):
        * platform/wx/FontDataWx.cpp:
        (WebCore::FontData::platformInit):

2007-08-27  Oliver Hunt  <oliver@apple.com>

        Reviewed by NOBODY (Build fix).

        Initialise iterators to appease gcc

        * rendering/SVGInlineTextBox.cpp:
        (WebCore::SVGInlineTextBox::closestCharacterToPosition):

2007-08-22  Rob Buis  <buis@kde.org>

        Reviewed by Sam.

        http://bugs.webkit.org/show_bug.cgi?id=12059
        SVG colors have two separate parsing paths (one CSS and one SVGColor::setRGBColor)

        Reuse the css parser as much as possible in setRGBColor.

        * css/cssparser.cpp:
        (WebCore::CSSParser::parseColor):
        * css/cssparser.h:
        * editing/ApplyStyleCommand.cpp:
        (WebCore::StyleChange::checkForLegacyHTMLStyleChange):
        * html/CanvasGradient.cpp:
        (WebCore::CanvasGradient::addColorStop):
        * html/CanvasRenderingContext2D.cpp:
        (WebCore::CanvasRenderingContext2D::setShadow):
        (WebCore::CanvasRenderingContext2D::applyShadow):
        * html/CanvasStyle.cpp:
        (WebCore::CanvasStyle::applyStrokeColor):
        (WebCore::CanvasStyle::applyFillColor):
        * ksvg2/svg/SVGColor.cpp:
        (WebCore::SVGColor::colorFromRGBColorString):

2007-08-21  Nikolas Zimmermann  <zimmermann@kde.org>

        Reviewed by Oliver.

        Large SVG filter rework. Bring it back in a useable state.

        Fixes: http://bugs.webkit.org/show_bug.cgi?id=5527 (Filters need subregion support)
        Fixes: http://bugs.webkit.org/show_bug.cgi?id=5579 (WebKit+SVG renders full-filters-example incorrectly)
        Fixes: http://bugs.webkit.org/show_bug.cgi?id=5976 (filterUnits="userSpaceOnUse" is broken (breaking feTile test case))
        Fixes: http://bugs.webkit.org/show_bug.cgi?id=12064 (Need function for manual style-resolution for things like gradient stops)

        filters-blend-01-b.svg & filters-example-01-b.svg & filters-displace-01-b.svg & filters-diffuse-01-f.svg are fixed now.

        In detail:
        - flood-color & flood-opacity have been incorrectly resolved on the <feBlend> parent element!
        - sizing of filter region was truncated in some cases, as the bbox was used to resolve the needed filter region instead of the filter rect
        - add subregion support to all filter primitives (primitiveUnits & filterUnits handled in all cases)
        - WKDisplacmentMap.cikernel incorrectly flipped the y-axis.
        - Correctly specify default values for all filter primitives in ksvg2/svg!
        - Initialize all variables of the SVGFE* classes in platform/graphics/svg/filters.
        - Fix 'flood-color' initial value (was set to the _stop_ color initial value)
          -> both initial values were pointing to 'black' though, so it was no visible problem.
        - Parse 'lighting-color' css property, no more hacking in SVGFEDiffuseLighting.
          -> Correct it's initial from black to white value fixes SVG lighting filters!
        - Add diffuseConstant support to feDiffuseLighting filter.
        - Centralize manual style resolution (needed for stop-color, flood-color & flood-opacity, lighting-color)

        * ksvg2/css/SVGCSSParser.cpp:
        * ksvg2/css/SVGCSSStyleSelector.cpp:
        (WebCore::CSSStyleSelector::applySVGProperty):
        * ksvg2/css/SVGRenderStyle.h:
        * ksvg2/css/SVGRenderStyleDefs.cpp:
        (StyleMiscData::StyleMiscData):
        (StyleMiscData::operator==):
        * ksvg2/css/SVGRenderStyleDefs.h:
        * ksvg2/svg/SVGComponentTransferFunctionElement.cpp:
        (WebCore::SVGComponentTransferFunctionElement::SVGComponentTransferFunctionElement):
        * ksvg2/svg/SVGFEBlendElement.cpp:
        (WebCore::SVGFEBlendElement::SVGFEBlendElement):
        (WebCore::SVGFEBlendElement::filterEffect):
        * ksvg2/svg/SVGFEBlendElement.h:
        * ksvg2/svg/SVGFEColorMatrixElement.cpp:
        (WebCore::SVGFEColorMatrixElement::SVGFEColorMatrixElement):
        (WebCore::SVGFEColorMatrixElement::filterEffect):
        * ksvg2/svg/SVGFEColorMatrixElement.h:
        * ksvg2/svg/SVGFEComponentTransferElement.cpp:
        (WebCore::SVGFEComponentTransferElement::filterEffect):
        * ksvg2/svg/SVGFEComponentTransferElement.h:
        * ksvg2/svg/SVGFECompositeElement.cpp:
        (WebCore::SVGFECompositeElement::SVGFECompositeElement):
        (WebCore::SVGFECompositeElement::parseMappedAttribute):
        (WebCore::SVGFECompositeElement::filterEffect):
        * ksvg2/svg/SVGFECompositeElement.h:
        * ksvg2/svg/SVGFEDiffuseLightingElement.cpp:
        (WebCore::SVGFEDiffuseLightingElement::SVGFEDiffuseLightingElement):
        (WebCore::SVGFEDiffuseLightingElement::parseMappedAttribute):
        (WebCore::SVGFEDiffuseLightingElement::filterEffect):
        * ksvg2/svg/SVGFEDiffuseLightingElement.h:
        * ksvg2/svg/SVGFEDisplacementMapElement.cpp:
        (WebCore::SVGFEDisplacementMapElement::SVGFEDisplacementMapElement):
        (WebCore::SVGFEDisplacementMapElement::filterEffect):
        * ksvg2/svg/SVGFEDisplacementMapElement.h:
        * ksvg2/svg/SVGFEDistantLightElement.cpp:
        (WebCore::SVGFEDistantLightElement::SVGFEDistantLightElement):
        * ksvg2/svg/SVGFEDistantLightElement.h:
        * ksvg2/svg/SVGFEFloodElement.cpp:
        (WebCore::SVGFEFloodElement::filterEffect):
        * ksvg2/svg/SVGFEFloodElement.h:
        * ksvg2/svg/SVGFEFuncAElement.cpp:
        * ksvg2/svg/SVGFEFuncAElement.h:
        * ksvg2/svg/SVGFEFuncBElement.cpp:
        * ksvg2/svg/SVGFEFuncBElement.h:
        * ksvg2/svg/SVGFEFuncGElement.cpp:
        (WebCore::SVGFEFuncGElement::SVGFEFuncGElement):
        * ksvg2/svg/SVGFEFuncGElement.h:
        * ksvg2/svg/SVGFEFuncRElement.cpp:
        * ksvg2/svg/SVGFEFuncRElement.h:
        * ksvg2/svg/SVGFEGaussianBlurElement.cpp:
        (WebCore::SVGFEGaussianBlurElement::filterEffect):
        * ksvg2/svg/SVGFEGaussianBlurElement.h:
        * ksvg2/svg/SVGFEImageElement.cpp:
        (WebCore::SVGFEImageElement::notifyFinished):
        (WebCore::SVGFEImageElement::filterEffect):
        * ksvg2/svg/SVGFEImageElement.h:
        * ksvg2/svg/SVGFELightElement.cpp:
        (WebCore::SVGFELightElement::SVGFELightElement):
        * ksvg2/svg/SVGFELightElement.h:
        * ksvg2/svg/SVGFEMergeElement.cpp:
        (WebCore::SVGFEMergeElement::filterEffect):
        * ksvg2/svg/SVGFEMergeElement.h:
        * ksvg2/svg/SVGFEMergeNodeElement.cpp:
        * ksvg2/svg/SVGFEMergeNodeElement.h:
        * ksvg2/svg/SVGFEOffsetElement.cpp:
        (WebCore::SVGFEOffsetElement::filterEffect):
        * ksvg2/svg/SVGFEOffsetElement.h:
        * ksvg2/svg/SVGFEPointLightElement.h:
        * ksvg2/svg/SVGFESpecularLightingElement.cpp:
        (WebCore::SVGFESpecularLightingElement::SVGFESpecularLightingElement):
        (WebCore::SVGFESpecularLightingElement::parseMappedAttribute):
        (WebCore::SVGFESpecularLightingElement::filterEffect):
        (WebCore::SVGFESpecularLightingElement::updateLights):
        * ksvg2/svg/SVGFESpecularLightingElement.h:
        * ksvg2/svg/SVGFESpotLightElement.cpp:
        (WebCore::SVGFESpotLightElement::lightSource):
        * ksvg2/svg/SVGFESpotLightElement.h:
        * ksvg2/svg/SVGFETileElement.cpp:
        (WebCore::SVGFETileElement::filterEffect):
        * ksvg2/svg/SVGFETileElement.h:
        * ksvg2/svg/SVGFETurbulenceElement.cpp:
        (WebCore::SVGFETurbulenceElement::SVGFETurbulenceElement):
        (WebCore::SVGFETurbulenceElement::filterEffect):
        * ksvg2/svg/SVGFETurbulenceElement.h:
        * ksvg2/svg/SVGFilterElement.cpp:
        (WebCore::SVGFilterElement::canvasResource):
        * ksvg2/svg/SVGFilterElement.h:
        * ksvg2/svg/SVGFilterPrimitiveStandardAttributes.cpp:
        (WebCore::SVGFilterPrimitiveStandardAttributes::SVGFilterPrimitiveStandardAttributes):
        (WebCore::SVGFilterPrimitiveStandardAttributes::setStandardAttributes):
        * ksvg2/svg/SVGFilterPrimitiveStandardAttributes.h:
        * ksvg2/svg/SVGGradientElement.cpp:
        (WebCore::SVGGradientElement::buildStops):
        * ksvg2/svg/SVGStyledElement.cpp:
        (WebCore::SVGStyledElement::resolveStyle):
        * ksvg2/svg/SVGStyledElement.h:
        * platform/graphics/svg/SVGResourceFilter.cpp:
        (WebCore::SVGResourceFilter::addFilterEffect):
        (WebCore::SVGResourceFilter::filterBBoxForItemBBox):
        * platform/graphics/svg/SVGResourceFilter.h:
        (WebCore::SVGResourceFilter::xBoundingBoxMode):
        (WebCore::SVGResourceFilter::setXBoundingBoxMode):
        (WebCore::SVGResourceFilter::yBoundingBoxMode):
        (WebCore::SVGResourceFilter::setYBoundingBoxMode):
        * platform/graphics/svg/cg/SVGResourceFilterCg.mm:
        (WebCore::SVGResourceFilter::SVGResourceFilter):
        (WebCore::SVGResourceFilter::createFilterEffect):
        (WebCore::SVGResourceFilter::prepareFilter):
        (WebCore::dumpOutputImage):
        (WebCore::SVGResourceFilter::applyFilter):
        (WebCore::SVGResourceFilter::getCIFilterStack):
        (WebCore::SVGResourceFilter::imageForName):
        (WebCore::SVGResourceFilter::setImageForName):
        (WebCore::SVGResourceFilter::setOutputImage):
        (WebCore::alphaImageForImage):
        (WebCore::SVGResourceFilter::inputImage):
        * platform/graphics/svg/filters/SVGDistantLightSource.h:
        * platform/graphics/svg/filters/SVGFEBlend.cpp:
        (WebCore::SVGFEBlend::SVGFEBlend):
        * platform/graphics/svg/filters/SVGFEBlend.h:
        * platform/graphics/svg/filters/SVGFEColorMatrix.cpp:
        (WebCore::SVGFEColorMatrix::SVGFEColorMatrix):
        * platform/graphics/svg/filters/SVGFEColorMatrix.h:
        * platform/graphics/svg/filters/SVGFEComponentTransfer.cpp:
        (WebCore::SVGFEComponentTransfer::SVGFEComponentTransfer):
        * platform/graphics/svg/filters/SVGFEComponentTransfer.h:
        (WebCore::SVGComponentTransferFunction::SVGComponentTransferFunction):
        * platform/graphics/svg/filters/SVGFEComposite.cpp:
        (WebCore::SVGFEComposite::SVGFEComposite):
        * platform/graphics/svg/filters/SVGFEComposite.h:
        * platform/graphics/svg/filters/SVGFEConvolveMatrix.cpp:
        (WebCore::SVGFEConvolveMatrix::SVGFEConvolveMatrix):
        * platform/graphics/svg/filters/SVGFEConvolveMatrix.h:
        * platform/graphics/svg/filters/SVGFEDiffuseLighting.cpp:
        (WebCore::SVGFEDiffuseLighting::SVGFEDiffuseLighting):
        * platform/graphics/svg/filters/SVGFEDiffuseLighting.h:
        * platform/graphics/svg/filters/SVGFEDisplacementMap.cpp:
        (WebCore::SVGFEDisplacementMap::SVGFEDisplacementMap):
        * platform/graphics/svg/filters/SVGFEDisplacementMap.h:
        * platform/graphics/svg/filters/SVGFEFlood.cpp:
        (WebCore::SVGFEFlood::SVGFEFlood):
        * platform/graphics/svg/filters/SVGFEFlood.h:
        * platform/graphics/svg/filters/SVGFEGaussianBlur.cpp:
        (WebCore::SVGFEGaussianBlur::SVGFEGaussianBlur):
        * platform/graphics/svg/filters/SVGFEGaussianBlur.h:
        * platform/graphics/svg/filters/SVGFEImage.cpp:
        (WebCore::SVGFEImage::SVGFEImage):
        * platform/graphics/svg/filters/SVGFEImage.h:
        * platform/graphics/svg/filters/SVGFEMerge.cpp:
        * platform/graphics/svg/filters/SVGFEMerge.h:
        (WebCore::SVGFEMerge::SVGFEMerge):
        * platform/graphics/svg/filters/SVGFEMorphology.cpp:
        (WebCore::SVGFEMorphology::SVGFEMorphology):
        * platform/graphics/svg/filters/SVGFEMorphology.h:
        * platform/graphics/svg/filters/SVGFEOffset.cpp:
        (WebCore::SVGFEOffset::SVGFEOffset):
        * platform/graphics/svg/filters/SVGFEOffset.h:
        * platform/graphics/svg/filters/SVGFESpecularLighting.cpp:
        (WebCore::SVGFESpecularLighting::SVGFESpecularLighting):
        * platform/graphics/svg/filters/SVGFESpecularLighting.h:
        * platform/graphics/svg/filters/SVGFETile.h:
        (WebCore::SVGFETile::SVGFETile):
        * platform/graphics/svg/filters/SVGFETurbulence.cpp:
        (WebCore::SVGFETurbulence::SVGFETurbulence):
        * platform/graphics/svg/filters/SVGFETurbulence.h:
        * platform/graphics/svg/filters/SVGFilterEffect.cpp:
        (WebCore::SVGFilterEffect::SVGFilterEffect):
        (WebCore::SVGFilterEffect::primitiveBBoxForFilterBBox):
        (WebCore::SVGFilterEffect::filter):
        (WebCore::SVGFilterEffect::setFilter):
        * platform/graphics/svg/filters/SVGFilterEffect.h:
        (WebCore::SVGFilterEffect::xBoundingBoxMode):
        (WebCore::SVGFilterEffect::setXBoundingBoxMode):
        (WebCore::SVGFilterEffect::yBoundingBoxMode):
        (WebCore::SVGFilterEffect::setYBoundingBoxMode):
        (WebCore::SVGFilterEffect::widthBoundingBoxMode):
        (WebCore::SVGFilterEffect::setWidthBoundingBoxMode):
        (WebCore::SVGFilterEffect::heightBoundingBoxMode):
        (WebCore::SVGFilterEffect::setHeightBoundingBoxMode):
        * platform/graphics/svg/filters/SVGLightSource.cpp:
        * platform/graphics/svg/filters/SVGLightSource.h:
        * platform/graphics/svg/filters/SVGPointLightSource.h:
        (WebCore::SVGPointLightSource::SVGPointLightSource):
        * platform/graphics/svg/filters/SVGSpotLightSource.h:
        (WebCore::SVGSpotLightSource::SVGSpotLightSource):
        * platform/graphics/svg/filters/cg/SVGFEBlendCg.mm:
        (WebCore::SVGFEBlend::getCIFilter):
        * platform/graphics/svg/filters/cg/SVGFEColorMatrixCg.mm:
        (WebCore::SVGFEColorMatrix::getCIFilter):
        * platform/graphics/svg/filters/cg/SVGFEComponentTransferCg.mm:
        (WebCore::filterForComponentFunc):
        (WebCore::SVGFEComponentTransfer::getCIFilter):
        * platform/graphics/svg/filters/cg/SVGFECompositeCg.mm:
        (WebCore::SVGFEComposite::getCIFilter):
        * platform/graphics/svg/filters/cg/SVGFEDiffuseLightingCg.mm:
        (WebCore::SVGFEDiffuseLighting::getCIFilter):
        * platform/graphics/svg/filters/cg/SVGFEDisplacementMapCg.mm:
        (WebCore::SVGFEDisplacementMap::getCIFilter):
        * platform/graphics/svg/filters/cg/SVGFEFloodCg.mm:
        (WebCore::SVGFEFlood::getCIFilter):
        * platform/graphics/svg/filters/cg/SVGFEGaussianBlurCg.mm:
        (WebCore::SVGFEGaussianBlur::getCIFilter):
        * platform/graphics/svg/filters/cg/SVGFEHelpersCg.h:
        * platform/graphics/svg/filters/cg/SVGFEImageCg.mm:
        (WebCore::SVGFEImage::getCIFilter):
        * platform/graphics/svg/filters/cg/SVGFEMergeCg.mm:
        (WebCore::SVGFEMerge::getCIFilter):
        * platform/graphics/svg/filters/cg/SVGFEOffsetCg.mm:
        (WebCore::SVGFEOffset::getCIFilter):
        * platform/graphics/svg/filters/cg/SVGFESpecularLightingCg.mm:
        (WebCore::SVGFESpecularLighting::getCIFilter):
        * platform/graphics/svg/filters/cg/SVGFETileCg.mm:
        (WebCore::SVGFETile::getCIFilter):
        * platform/graphics/svg/filters/cg/SVGFilterEffectCg.mm:
        (WebCore::SVGFilterEffect::getCIFilter):
        * platform/graphics/svg/filters/cg/WKDiffuseLightingFilter.cikernel:
        * platform/graphics/svg/filters/cg/WKDisplacementMapFilter.cikernel:
        * platform/graphics/svg/filters/cg/WKSpotLightFilter.m:
        (-[WKSpotLightFilter outputImage]):
        * platform/graphics/svg/qt/SVGResourceFilterQt.cpp:
        (WebCore::SVGResourceFilter::createFilterEffect):

2007-08-20  Rob Buis  <buis@kde.org>

        Reviewed by Nikolas.

        http://bugs.webkit.org/show_bug.cgi?id=14924
        rotated rect with pattern draws incorrectly

        Use the bounding box before transformation.

        * platform/graphics/svg/cg/SVGPaintServerPatternCg.cpp:
        (WebCore::SVGPaintServerPattern::setup):

2007-08-19  Rob Buis  <buis@kde.org>

        Reviewed by Nikolas.

        http://bugs.webkit.org/show_bug.cgi?id=14926
        WebKit has 'em' length handling problems related to CSS properties

        Parse the properties in inline style attributes non-strict for SVG.

        * dom/StyledElement.cpp:
        (WebCore::StyledElement::createInlineStyleDecl):

2007-08-17  Rob Buis  <buis@kde.org>

        Reviewed by Oliver.

        http://bugs.webkit.org/show_bug.cgi?id=14927
        use element in SVG does not render after parent is displayed off and on

        Also detach the shadow tree when detaching the <use>.

        * ksvg2/svg/SVGUseElement.cpp:
        (WebCore::SVGUseElement::detach):
        * ksvg2/svg/SVGUseElement.h:

2007-08-10  Nikolas Zimmermann  <zimmermann@kde.org>

        Reviewed by Rob.

        Fixes: http://bugs.webkit.org/show_bug.cgi?id=14153

        Final, long-awaited RenderSVGContainer split. Make RenderSVGContainer really a simple
        container without special cases for inner <svg> elements or <marker>. Create a new
        RenderSVGViewportContainer class handling these cases now.

        * WebCore.xcodeproj/project.pbxproj:
        * ksvg2/svg/SVGMarkerElement.cpp:
        (WebCore::SVGMarkerElement::createRenderer):
        * ksvg2/svg/SVGSVGElement.cpp:
        (WebCore::SVGSVGElement::createRenderer):
        * ksvg2/svg/SVGSVGElement.h:
        * rendering/RenderSVGContainer.cpp:
        (WebCore::RenderSVGContainer::layout):
        (WebCore::RenderSVGContainer::applyContentTransforms):
        (WebCore::RenderSVGContainer::applyAdditionalTransforms):
        (WebCore::RenderSVGContainer::paint):
        (WebCore::RenderSVGContainer::viewportTransform):
        (WebCore::RenderSVGContainer::relativeBBox):
        (WebCore::RenderSVGContainer::nodeAtPoint):
        * rendering/RenderSVGContainer.h:
        * rendering/RenderSVGRoot.cpp:
        * rendering/RenderSVGViewportContainer.cpp: Added.
        (WebCore::RenderSVGViewportContainer::RenderSVGViewportContainer):
        (WebCore::RenderSVGViewportContainer::~RenderSVGViewportContainer):
        (WebCore::RenderSVGViewportContainer::layout):
        (WebCore::RenderSVGViewportContainer::paint):
        (WebCore::RenderSVGViewportContainer::applyContentTransforms):
        (WebCore::RenderSVGViewportContainer::applyAdditionalTransforms):
        (WebCore::RenderSVGViewportContainer::viewport):
        (WebCore::RenderSVGViewportContainer::calcViewport):
        (WebCore::RenderSVGViewportContainer::viewportTransform):
        (WebCore::RenderSVGViewportContainer::absoluteTransform):
        (WebCore::RenderSVGViewportContainer::nodeAtPoint):
        * rendering/RenderSVGViewportContainer.h: Added.
        (WebCore::RenderSVGViewportContainer::isSVGContainer):
        (WebCore::RenderSVGViewportContainer::renderName):

2007-08-10  Nikolas Zimmermann  <zimmermann@kde.org>

        Reviewed by Oliver & Rob.

        Fixes: http://bugs.webkit.org/show_bug.cgi?id=12501 (SVG Text fails to respect opacity, fill-opacity and stroke-opacity)
        Fixes: http://bugs.webkit.org/show_bug.cgi?id=14045 (Incorrect support for opacity, fill-opacity and stroke-opacity)

        Based on an older patch from Rob, this fixes SVG text opacity as well as group opacity for solid fills & gradients.
        The pattern changes are still missing a testcase (need to wait for Antoine Quint for that).

        * platform/graphics/svg/SVGResourceFilter.h:
        * platform/graphics/svg/cg/SVGPaintServerGradientCg.cpp:
        (WebCore::SVGPaintServerGradient::setup):
        * platform/graphics/svg/cg/SVGPaintServerPatternCg.cpp:
        (WebCore::SVGPaintServerPattern::setup):
        * platform/graphics/svg/cg/SVGPaintServerSolidCg.cpp:
        (WebCore::colorFromFloatComponents):
        (WebCore::SVGPaintServerSolid::setup):
        * platform/graphics/svg/cg/SVGResourceFilterCg.mm:
        (WebCore::SVGResourceFilter::SVGResourceFilter):
        (WebCore::SVGResourceFilter::prepareFilter):
        (WebCore::SVGResourceFilter::applyFilter):
        * rendering/RenderPath.cpp:
        (WebCore::RenderPath::paint):
        * rendering/RenderSVGContainer.cpp:
        (WebCore::RenderSVGContainer::paint):
        (WebCore::RenderSVGContainer::absoluteClippedOverflowRect):
        * rendering/RenderSVGImage.cpp:
        (WebCore::RenderSVGImage::paint):
        (WebCore::RenderSVGImage::absoluteClippedOverflowRect):
        * rendering/RenderSVGRoot.cpp:
        (WebCore::RenderSVGRoot::paint):
        * rendering/RenderSVGText.cpp:
        (WebCore::RenderSVGText::absoluteClippedOverflowRect):
        * rendering/SVGRenderSupport.cpp:
        (WebCore::prepareToRenderSVGContent):
        (WebCore::finishRenderSVGContent):
        * rendering/SVGRenderSupport.h:
        * rendering/SVGRootInlineBox.cpp:
        (WebCore::prepareTextRendering):
        (WebCore::SVGRootInlineBox::paint):
        (WebCore::SVGRootInlineBox::paintChildInlineFlowBox):

2007-08-08  Rob Buis  <buis@kde.org>

        Reviewed by Nikolas.

        http://bugs.webkit.org/show_bug.cgi?id=11909
        Regression: large SVG from Illustrator comes out blank

        Fix last issue with the Illustrator file by making relativeBBox
        calculation take into account viewBox.

        * rendering/RenderSVGContainer.cpp:
        (WebCore::RenderSVGContainer::relativeBBox):
        * rendering/RenderSVGRoot.cpp:
        (WebCore::RenderSVGRoot::relativeBBox):

2007-08-08  Nikolas Zimmermann  <zimmermann@kde.org>

        Reviewed by Oliver.

        Fixes: http://bugs.webkit.org/show_bug.cgi?id=14896 (SVG InlineText/Flow box sizes don't take rotated glyphs into account)

        Introduce new helper function calculateGlyphBoundaries, which takes into account any per-character transformation.
        This fixes box size calculations in svg/W3C-SVG-1.1/text-text-07-t.svg, svg/batik/text/textEffect3.svg (rotated glyphs)
        -> These strings can be properly selected now, just as well as text path elements.

        * rendering/SVGInlineTextBox.cpp:
        (WebCore::SVGInlineTextBox::calculateGlyphBoundaries):
        (WebCore::SVGInlineTextBox::closestCharacterToPosition):
        (WebCore::SVGInlineTextBox::nodeAtPoint):
        (WebCore::SVGInlineTextBox::selectionRect):
        * rendering/SVGInlineTextBox.h:
        * rendering/SVGRootInlineBox.cpp:
        (WebCore::SVGRootInlineBox::layoutInlineBoxes):

2007-08-08  Nikolas Zimmermann  <zimmermann@kde.org>

        Reviewed by Oliver.

        Fixes: http://bugs.webkit.org/show_bug.cgi?id=13909 (SVG text selection doesn't work with RTL text)

        Use drawHighlightForText() to draw the selection, instead of my home-brewn solution.
        Affected code in SVGRootInlineBox::paintSelectionForTextBox. Removed not anymore needed
        helper function cummulatedWidthOfSelectionRange.

        Dump all contained InlineTextBox(es) in SVGRenderTreeAsText, take into account multiple
        child text boxes in ie. a RenderSVGInlineText objects (which happens for RTL text and
        LTR text cases where newlines were involved - see changed testcase results.)
        This affects a lot of LTR tests which actually had more than one child text box, that
        wasn't taken properly into account before (in terms of selection, not rendering.)

        Fix selection for RTL text by taking box start offsets into account in closestCharacterToPosition()
        and by offering RTL text selection special cases in svgCharacterHitsPosition().

        Centralized the creation of a TextStyle object for text selection/painting in a new helper function
        svgTextStyleForInlineTextBox. Add new helper functions calculateGlyphWidth/calculateGlyphHeight to
        centralize these calculations -> use these new helpers everywhere to avoid code duplication.

        A single fix in bidi.cpp was needed to fix SVG's unicode-bidi/direction handling, to fix text-intro-02-b.svg.
        SVG didacts that the 'direction' attribute is ignored if unicode-bidi is set to 'normal' (default).
        Discussed with Mitz.

        * rendering/RenderSVGInlineText.cpp:
        (WebCore::RenderSVGInlineText::positionForCoordinates):
        * rendering/SVGInlineTextBox.cpp:
        (WebCore::SVGInlineTextBox::calculateGlyphWidth):
        (WebCore::SVGInlineTextBox::calculateGlyphHeight):
        (WebCore::SVGInlineTextBox::closestCharacterToPosition):
        (WebCore::SVGInlineTextBox::svgCharacterHitsPosition):
        (WebCore::SVGInlineTextBox::nodeAtPoint):
        (WebCore::SVGInlineTextBox::selectionRect):
        * rendering/SVGInlineTextBox.h:
        * rendering/SVGRenderTreeAsText.cpp:
        (WebCore::writeSVGInlineTextBox):
        (WebCore::writeSVGInlineText):
        * rendering/SVGRootInlineBox.cpp:
        (WebCore::cummulatedWidthOfInlineBoxCharacterRange): Take box start offset into account.
        (WebCore::svgTextStyleForInlineTextBox): New helper function.
        (WebCore::totalAdvanceOfInlineTextBox): Take box start offset into account.
        (WebCore::SVGRootInlineBox::buildLayoutInformationForTextBox): Ditto. (correctly calculate advance values in RTL mode!)
        (WebCore::SVGRootInlineBox::paintSelectionForTextBox): Use GraphicsContext drawHighlightForText() instead of self-made hacks.
        (WebCore::SVGRootInlineBox::paintCharacterRangeForTextBox): Use new helper function svgTextStyleForInlineTextBox.
        * rendering/SVGRootInlineBox.h:
        * rendering/bidi.cpp: Add special case for SVG.
        (WebCore::RenderBlock::layoutInlineChildren):

2007-07-30  Nikolas Zimmermann  <zimmermann@kde.org>

        Reviewed by Oliver & Rob.

        Enable SVG textPath selection. Actually build chunks for them instead of
        ignoring them - was easier than I thought. Respect per-character transformation
        when calculating the chunk boundaries for the selection rectangles. Also fixes
        selection rect drawing of rotated characters.

        Next thing todo is to unify the glyph size calculations, as per-glyph transformations
        are not respected when calculating flow box sizes in SVGRootInlineBox.
 
        * rendering/RenderObject.h:
        (WebCore::RenderObject::isSVGHiddenContainer):
        * rendering/RenderSVGHiddenContainer.h:
        (WebCore::RenderSVGHiddenContainer::isSVGHiddenContainer):
        * rendering/RenderSVGInlineText.cpp:
        (WebCore::isChildOfHiddenContainer):
        (WebCore::RenderSVGInlineText::selectionRect):
        (WebCore::RenderSVGInlineText::computeAbsoluteRectForRange):
        * rendering/SVGCharacterLayoutInfo.h:
        (WebCore::SVGTextChunk::SVGTextChunk):
        (WebCore::SVGTextChunkLayoutInfo::SVGTextChunkLayoutInfo):
        * rendering/SVGInlineTextBox.cpp:
        (WebCore::SVGInlineTextBox::selectionRect):
        * rendering/SVGRootInlineBox.cpp:
        (WebCore::applyTextAnchorToTextChunk):
        (WebCore::SVGRootInlineBox::buildTextChunks):

2007-07-25  Rob Buis  <buis@kde.org>

        Reviewed by Nikolas.

        http://bugs.webkit.org/show_bug.cgi?id=14312
        Removing an attribute has no effect on SVG

        Update the transform matrix also when transform attribute is empty.

        * ksvg2/svg/SVGStyledTransformableElement.cpp:
        (WebCore::SVGStyledTransformableElement::updateLocalTransform):

2007-07-26  Nikolas Zimmermann  <zimmermann@kde.org>

        Reviewed by Oliver.

        Unify absoluteRects() of RenderSVGTSpan & RenderSVGTextPath.
        The RenderSVGTextPath one was still using the old, wrong concept.

        * rendering/RenderSVGTSpan.cpp: Remove unused params tx, ty, while I'm at it.
        (WebCore::RenderSVGTSpan::absoluteRects):
        * rendering/RenderSVGTextPath.cpp:
        (WebCore::RenderSVGTextPath::absoluteRects):

2007-07-25  Nikolas Zimmermann  <zimmermann@kde.org>

        Reviewed by Sam.

        Let <textPath> be recognized within the ObjC bindings.
        Forgot to add that months ago.

        * bindings/objc/DOM.mm:
        (WebCore::createElementClassMap):
        * bindings/objc/DOMInternal.h:
        * bindings/objc/DOMSVG.h:

2007-07-25  Nikolas Zimmermann  <zimmermann@kde.org>

        Reviewed by Oliver.

        Fixes: http://bugs.webkit.org/show_bug.cgi?id=14065

        Fix all known bugs regarding to SVG text selection, when embedded in XHTML.
        Also fix inspecting <text> elements when embedded in XHTML. (WebInspector)

        Short story: selectionRect() & friends are special in terms of the "HTML parent translation".
        Caused by ie. CSS translation like "left: 50px; top: 50px" when <svg> is a child of a <div>.
        For non-textual objects like RenderPath, we can easily add a translation to a new coordinate
        space in RenderSVGRoot::applyContentTransformations() and we're done with it.

        Same for painting text, but text selection makes problems in this concept.
        We have to remove the 'html parent translation' from our selection rects that we return
        from RenderSVGText & RenderSVGInlineText. Hopefully all issues are fixed now.

        Long story:
        - RenderSVGRoot::nodeAtPoint didn't take the parent 'scroll offset' into account. We exited
          too early, because the overflow rect wasn't correctly sized. Fixed.
        - RenderSVGRoot::absoluteRects() can't return the absoluteClippedOverflowRect() as it includes
          the 'html parent translation', which needs to be removed, otherwhise the painted rects are off
          when inspecting with WebInspector. -> Pass down absoluteRects() call to it's children..
        - RenderSVGText::absoluteRects() can't use absoluteClippedOverflowRect() for the same reason.
        - Add RenderSVGInlineText::computeAbsoluteRectForRange() function - shared by absoluteRects() and
          selectionRect() - and remove the 'html parent translation' there by asking the RenderSVGRoot
          object for the correct offsets.

        This lead to nasty bugs showing that SVGInlineTextBox::selectionRect() wasn't actually returning
        correct rectangles. It couldn't work for text chunks the way it was implemented. Fixed by implementing
        it exactly the same way that closestCharacterToPosition() was done - could share more code later on.

        * rendering/RenderSVGInlineText.cpp:
        (WebCore::RenderSVGInlineText::absoluteRects):
        (WebCore::RenderSVGInlineText::selectionRect):
        (WebCore::RenderSVGInlineText::computeAbsoluteRectForRange):
        * rendering/RenderSVGInlineText.h:
        * rendering/RenderSVGRoot.cpp:
        (WebCore::RenderSVGRoot::absoluteRects):
        (WebCore::RenderSVGRoot::nodeAtPoint):
        * rendering/RenderSVGText.cpp:
        (WebCore::RenderSVGText::absoluteRects):
        * rendering/SVGCharacterLayoutInfo.h: Removed unused variable 'bool selected'
        * rendering/SVGInlineTextBox.cpp:
        (WebCore::SVGInlineTextBox::closestCharacterToPosition):
        (WebCore::SVGInlineTextBox::nodeAtPoint):
        (WebCore::SVGInlineTextBox::selectionRect):
        * rendering/SVGRootInlineBox.cpp: Add 'findSVGRootObject' helper function.
        (WebCore::findSVGRootObject):
        (WebCore::SVGRootInlineBox::buildLayoutInformationForTextBox):
        (WebCore::SVGRootInlineBox::paintSelectionForTextBox): Remove unused tx/ty parameters.
        (WebCore::SVGRootInlineBox::paintChildInlineTextBox):
        (WebCore::SVGRootInlineBox::paintCharacterRangeForTextBox):
        * rendering/SVGRootInlineBox.h:

2007-07-17  Nikolas Zimmermann  <zimmermann@kde.org>

        Build fix. Not reviewed.

        Rob forgot to land the changes to SVGResourceMarker in his last commit.

        * platform/graphics/svg/SVGResourceMarker.cpp:
        (WebCore::SVGResourceMarker::draw):

2007-07-17  Rob Buis  <buis@kde.org>

        Reviewed by Nikolas.

        http://bugs.webkit.org/show_bug.cgi?id=5996
        SVG <view> is unimplemented

        Implement <view> and refactor the code in the svg renderer container classes.

        * WebCore.xcodeproj/project.pbxproj:
        * ksvg2/svg/SVGDocument.cpp:
        (WebCore::SVGDocument::zoomAndPanEnabled): Take into account currentView for zoom/pan
        * ksvg2/svg/SVGDocument.h:
        * ksvg2/svg/SVGFEImageElement.cpp:
        (WebCore::SVGFEImageElement::parseMappedAttribute):
        * ksvg2/svg/SVGFitToViewBox.cpp:
        (WebCore::SVGFitToViewBox::parseViewBox):
        (WebCore::SVGFitToViewBox::parseMappedAttribute):
        * ksvg2/svg/SVGFitToViewBox.h:
        * ksvg2/svg/SVGImageElement.cpp:
        (WebCore::SVGImageElement::parseMappedAttribute):
        * ksvg2/svg/SVGLocatable.h:
        * ksvg2/svg/SVGMarkerElement.cpp:
        (WebCore::SVGMarkerElement::createRenderer):
        (WebCore::SVGMarkerElement::notifyAttributeChange):
        * ksvg2/svg/SVGPreserveAspectRatio.cpp:
        (WebCore::SVGPreserveAspectRatio::parsePreserveAspectRatio):
        * ksvg2/svg/SVGPreserveAspectRatio.h:
        * ksvg2/svg/SVGSVGElement.cpp:
        (WebCore::SVGSVGElement::SVGSVGElement):
        (WebCore::SVGSVGElement::currentView):
        (WebCore::SVGSVGElement::parseMappedAttribute):
        (WebCore::SVGSVGElement::createRenderer):
        (WebCore::SVGSVGElement::viewBoxToViewTransform):
        (WebCore::SVGSVGElement::inheritViewAttributes):
        * ksvg2/svg/SVGSVGElement.h:
        * ksvg2/svg/SVGTransformable.cpp:
        (WebCore::SVGTransformable::parseTransformAttribute):
        * ksvg2/svg/SVGTransformable.h:
        * ksvg2/svg/SVGViewElement.cpp:
        (WebCore::SVGViewElement::parseMappedAttribute):
        * ksvg2/svg/SVGViewElement.h:
        * ksvg2/svg/SVGViewSpec.cpp: Added.
        (WebCore::SVGViewSpec::SVGViewSpec):
        (WebCore::SVGViewSpec::~SVGViewSpec):
        (WebCore::SVGViewSpec::setTransform):
        (WebCore::SVGViewSpec::setViewBoxString):
        (WebCore::SVGViewSpec::setPreserveAspectRatioString):
        (WebCore::SVGViewSpec::setViewTargetString):
        (WebCore::SVGViewSpec::viewTarget):
        (WebCore::SVGViewSpec::contextElement):
        (WebCore::):
        (WebCore::SVGViewSpec::parseViewSpec):
        * ksvg2/svg/SVGViewSpec.h: Added.
        (WebCore::SVGViewSpec::transform):
        (WebCore::SVGViewSpec::viewTargetString):
        * ksvg2/svg/SVGZoomAndPan.cpp:
        (WebCore::SVGZoomAndPan::parseMappedAttribute):
        (WebCore::):
        (WebCore::SVGZoomAndPan::parseZoomAndPan):
        * ksvg2/svg/SVGZoomAndPan.h:
        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::gotoAnchor):
        * page/Frame.cpp:
        (WebCore::Frame::setZoomFactor): do not zoom when it is disabled
        * rendering/RenderSVGContainer.cpp:
        (WebCore::RenderSVGContainer::RenderSVGContainer):
        (WebCore::RenderSVGContainer::paint):
        (WebCore::RenderSVGContainer::viewportTransform):
        * rendering/RenderSVGContainer.h:
        * rendering/RenderSVGRoot.cpp:
        (WebCore::RenderSVGRoot::RenderSVGRoot):
        (WebCore::RenderSVGRoot::applyContentTransforms):
        (WebCore::RenderSVGRoot::paint):
        (WebCore::RenderSVGRoot::absoluteTransform):
        (WebCore::RenderSVGRoot::localTransform):
        * rendering/RenderSVGRoot.h:

2007-07-16  Nikolas Zimmermann  <zimmermann@kde.org>

        Reviewed by Rob.

        Fixes: http://bugs.webkit.org/show_bug.cgi?id=13611 (Crash in setAttributeNS setting href of SVG <use> to nonexistent symbol)
        Fixes: http://bugs.webkit.org/show_bug.cgi?id=14631 (<use> doesn't deep-expand <symbol> elements.)

        Rework <use> on <foreignObject> cases, to not just ignore these cases, but actually proceed and skip <fO> objects
        from the resulting cloned tree. This fixes parts of "treasure_map.svg" (no bug report availabe on that one, private "testcase").

        Fix assertion happening with <use> on <g> containing <symbol>. Introduce expandSymbolElementsInShadowTree()
        concept, just like it's done for <use> on <use>, to deep-replace all <symbol> elements by <svg>, as demanded
        by the spec. This only worked on <use> on <symbol> direct cases so far.

        Added testcase: svg/custom/use-on-g-containing-foreignObject-and-image.svg (testcase for treasure_map.svg)
                        svg/custom/use-on-disallowed-foreign-object-5.svg (<use> on <symbol> containg <foreignObject>)
                        svg/custom/use-on-disallowed-foreign-object-6.svg (<use> on <g> containing <svg> containing <foreignObject>)
                        svg/custom/use-on-disallowed-foreign-object-7.svg (<use> on <g> containing <symbol> containing <foreignObject>)
                        svg/custom/use-scripting-changes-to-nonexistant-href.svg

        * ksvg2/svg/SVGUseElement.cpp:
        (WebCore::isDisallowedElement):
        (WebCore::subtreeContainsDisallowedElement):
        (WebCore::SVGUseElement::buildPendingResource):
        (WebCore::SVGUseElement::buildInstanceTree):
        (WebCore::SVGUseElement::removeDisallowedElementsFromSubtree):
        (WebCore::SVGUseElement::buildShadowTree):
        (WebCore::SVGUseElement::expandUseElementsInShadowTree):
        (WebCore::SVGUseElement::expandSymbolElementsInShadowTree):
        * ksvg2/svg/SVGUseElement.h:

2007-07-15  Nikolas Zimmermann  <zimmermann@kde.org>

        Reviewed by Rob.

        Fix invisible-text-after-scrolling.xhtml regression. Scroll offset not
        taken into account properly. Also fix RenderSVGInlineText::selectionRect(),
        so that SVG text can be selected, when being embedded in XHTML.

        * rendering/RenderSVGInlineText.cpp:
        (WebCore::RenderSVGInlineText::selectionRect):
        * rendering/RenderSVGRoot.cpp:
        (WebCore::RenderSVGRoot::applyContentTransforms):

2007-07-15  Nikolas Zimmermann  <zimmermann@kde.org>

        Reviewed by Oliver.

        Fixes: http://bugs.webkit.org/show_bug.cgi?id=5940 (<svg> inside <body> incorrectly extends over top/bottom borders)
        Fixes: http://bugs.webkit.org/show_bug.cgi?id=14145 (RenderSVGContainer should not inherit from RenderContainer)

        Make RenderSVGContainer inherit from RenderObject directly, instead of RenderContainer.
        Itdoes a lot of things that we don't need for SVG, and by removing this inheritance
        we can finally fix the differences about SVG object positioning, as we don't need
        parent translation (tx/ty). Fixes SVG text rendering within XHTML.

        Fix requireLayer() function on RenderSVGRoot, as it can actually be a layer now.
        This change is based on Rob's patch at 5940 - fixing z-order indexing.

        Change RenderSVGRoot renderName() and update all layout tests, because of this change.
        
        Fix absoluteRects() function for RenderSVGInlineText & RenderSVGTSpan.
        Checked extensively using WebInspector, to assure all rects are correctly displayed.

        Testcases fixed: junk-data.svg, missing-xlink.svg hixie/013.xml (all regressions!)
        (junk-data.svg & missing-xlink.svg previously relied on SVG text painting out of <svg> overflow rect.
         Fix these testcases, as within this new RenderSVGContainer concept, that bug is now fixed, and breaks them)

        Testcases added: custom/absolute-sized-svg-in-xhtml.xhtml, custom/inline-svg-in-xhtml.xml (Mozilla XTech demo)

        * ksvg2/svg/SVGSVGElement.cpp:
        (WebCore::SVGSVGElement::parseMappedAttribute):
        * rendering/RenderObject.cpp:
        (WebCore::RenderObject::containingBlock):
        * rendering/RenderObject.h:
        (WebCore::RenderObject::isSVGRoot):
        * rendering/RenderPath.cpp:
        (WebCore::RenderPath::paint):
        (WebCore::RenderPath::addFocusRingRects):
        * rendering/RenderSVGContainer.cpp:
        (WebCore::RenderSVGContainer::RenderSVGContainer):
        (WebCore::RenderSVGContainer::canHaveChildren):
        (WebCore::RenderSVGContainer::addChild):
        (WebCore::RenderSVGContainer::removeChild):
        (WebCore::RenderSVGContainer::destroy):
        (WebCore::RenderSVGContainer::destroyLeftoverChildren):
        (WebCore::RenderSVGContainer::removeChildNode):
        (WebCore::RenderSVGContainer::appendChildNode):
        (WebCore::RenderSVGContainer::insertChildNode):
        (WebCore::RenderSVGContainer::layout):
        (WebCore::RenderSVGContainer::calcReplacedWidth):
        (WebCore::RenderSVGContainer::calcReplacedHeight):
        (WebCore::RenderSVGContainer::applyContentTransforms):
        (WebCore::RenderSVGContainer::paint):
        (WebCore::RenderSVGContainer::absoluteTransform):
        (WebCore::RenderSVGContainer::nodeAtPoint):
        * rendering/RenderSVGContainer.h:
        (WebCore::RenderSVGContainer::firstChild):
        (WebCore::RenderSVGContainer::lastChild):
        (WebCore::RenderSVGContainer::width):
        (WebCore::RenderSVGContainer::height):
        (WebCore::RenderSVGContainer::moveChildNode):
        (WebCore::RenderSVGContainer::calcPrefWidths):
        * rendering/RenderSVGHiddenContainer.cpp:
        (WebCore::RenderSVGHiddenContainer::RenderSVGHiddenContainer):
        (WebCore::RenderSVGHiddenContainer::paint):
        (WebCore::RenderSVGHiddenContainer::absoluteRects):
        (WebCore::RenderSVGHiddenContainer::relativeBBox):
        * rendering/RenderSVGHiddenContainer.h:
        * rendering/RenderSVGImage.cpp:
        (WebCore::RenderSVGImage::paint):
        * rendering/RenderSVGInline.cpp:
        (WebCore::RenderSVGInline::RenderSVGInline):
        * rendering/RenderSVGInlineText.cpp:
        (WebCore::RenderSVGInlineText::absoluteRects):
        * rendering/RenderSVGRoot.cpp:
        (WebCore::RenderSVGRoot::applyContentTransforms):
        (WebCore::RenderSVGRoot::paint):
        (WebCore::RenderSVGRoot::addFocusRingRects):
        * rendering/RenderSVGRoot.h:
        (WebCore::RenderSVGRoot::isSVGRoot):
        (WebCore::RenderSVGRoot::renderName):
        * rendering/RenderSVGTSpan.cpp:
        (WebCore::RenderSVGTSpan::RenderSVGTSpan):
        (WebCore::RenderSVGTSpan::absoluteRects):
        * rendering/RenderSVGTextPath.cpp:
        (WebCore::RenderSVGTextPath::absoluteRects):
        * rendering/RenderTreeAsText.cpp:
        (WebCore::write):
        * rendering/SVGRenderTreeAsText.cpp:
        (WebCore::operator<<):
        (WebCore::write):
        * rendering/SVGRenderTreeAsText.h:

2007-07-11  Nikolas Zimmermann  <zimmermann@kde.org>

        Reviewed by Sam.

        Remove all "SVGElement* m_context" parameters spread over SVG primitives
        (like SVGAngle, SVGPreserveAspectRatio, SVGTransformList, ...)

        This is all handled by the JS generation in the bindings now, leading
        to a faster static rendering codepaths, and easier handling of the dynamic
        parts like JS scripting. Remove the mystified genericContext() concept alltogether.

        * bindings/js/JSSVGMatrixCustom.cpp: Adapt to the context() change.
        (WebCore::JSSVGMatrix::multiply):
        (WebCore::JSSVGMatrix::inverse):
        (WebCore::JSSVGMatrix::translate):
        (WebCore::JSSVGMatrix::scale):
        (WebCore::JSSVGMatrix::scaleNonUniform):
        (WebCore::JSSVGMatrix::rotate):
        (WebCore::JSSVGMatrix::rotateFromVector):
        (WebCore::JSSVGMatrix::flipX):
        (WebCore::JSSVGMatrix::flipY):
        (WebCore::JSSVGMatrix::skewX):
        (WebCore::JSSVGMatrix::skewY):
        * bindings/js/JSSVGPODTypeWrapper.h: Remove all nAC() calls here!
        (WebCore::JSSVGPODTypeWrapperCreatorReadWrite::commitChange):
        (WebCore::JSSVGPODTypeWrapperCreatorForList::JSSVGPODTypeWrapperCreatorForList):
        (WebCore::JSSVGPODTypeWrapperCreatorForList::~JSSVGPODTypeWrapperCreatorForList):
        * bindings/js/JSSVGPathSegCustom.cpp: Adapt to the context() change.
        (WebCore::toJS):
        * bindings/js/JSSVGPathSegListCustom.cpp: Ditto.
        (WebCore::JSSVGPathSegList::clear):
        (WebCore::JSSVGPathSegList::initialize):
        (WebCore::JSSVGPathSegList::getItem):
        (WebCore::JSSVGPathSegList::insertItemBefore):
        (WebCore::JSSVGPathSegList::replaceItem):
        (WebCore::JSSVGPathSegList::removeItem):
        (WebCore::JSSVGPathSegList::appendItem):
        * bindings/js/JSSVGPointListCustom.cpp: Ditto.
        (WebCore::JSSVGPointList::clear):
        (WebCore::JSSVGPointList::initialize):
        (WebCore::JSSVGPointList::getItem):
        (WebCore::JSSVGPointList::insertItemBefore):
        (WebCore::JSSVGPointList::replaceItem):
        (WebCore::JSSVGPointList::removeItem):
        (WebCore::JSSVGPointList::appendItem): 
        * bindings/js/JSSVGTransformListCustom.cpp: Ditto.
        (WebCore::JSSVGTransformList::clear):
        (WebCore::JSSVGTransformList::initialize):
        (WebCore::JSSVGTransformList::getItem):
        (WebCore::JSSVGTransformList::insertItemBefore):
        (WebCore::JSSVGTransformList::replaceItem):
        (WebCore::JSSVGTransformList::removeItem):
        (WebCore::JSSVGTransformList::appendItem):
        * bindings/js/kjs_binding.h: Add new cacheSVGDOMObject, taking third parameter: context.
        (KJS::cacheSVGDOMObject):
        * bindings/scripts/CodeGeneratorJS.pm: Change generation to step aways from genericContext().
        * ksvg2/misc/SVGDocumentExtensions.h: Kill all genericContext() stuff.
        (WebCore::SVGDocumentExtensions::hasBaseValue):
        * ksvg2/svg/SVGAngle.cpp: Kill context parameter.
        (WebCore::SVGAngle::SVGAngle):
        * ksvg2/svg/SVGAngle.h: ditto.
        * ksvg2/svg/SVGFEImageElement.cpp: SVG classes don't get context params passed anymore.
        (WebCore::SVGFEImageElement::SVGFEImageElement):
        * ksvg2/svg/SVGFitToViewBox.cpp: Ditto.
        (WebCore::SVGFitToViewBox::SVGFitToViewBox):
        * ksvg2/svg/SVGGradientElement.cpp: Ditto.
        (WebCore::SVGGradientElement::SVGGradientElement):
        * ksvg2/svg/SVGImageElement.cpp: Ditto.
        (WebCore::SVGImageElement::SVGImageElement):
        * ksvg2/svg/SVGMarkerElement.cpp: Ditto.
        (WebCore::SVGMarkerElement::SVGMarkerElement):
        (WebCore::SVGMarkerElement::parseMappedAttribute):
        * ksvg2/svg/SVGPathElement.cpp: Ditto.
        (WebCore::SVGPathElement::pathSegList):
        * ksvg2/svg/SVGPathSegList.cpp: Kill context parameter.
        (WebCore::SVGPathSegList::SVGPathSegList):
        * ksvg2/svg/SVGPathSegList.h:
        * ksvg2/svg/SVGPatternElement.cpp: SVG classes don't get context params passed anymore.
        (WebCore::SVGPatternElement::SVGPatternElement):
        * ksvg2/svg/SVGPointList.cpp: Kill context parameter.
        (SVGPointList::SVGPointList):
        * ksvg2/svg/SVGPointList.h:
        * ksvg2/svg/SVGPolyElement.cpp: SVG classes don't get context params passed anymore.
        (WebCore::SVGPolyElement::points):
        * ksvg2/svg/SVGPreserveAspectRatio.cpp: Kill context parameter.
        (WebCore::SVGPreserveAspectRatio::SVGPreserveAspectRatio):
        (WebCore::SVGPreserveAspectRatio::setAlign):
        (WebCore::SVGPreserveAspectRatio::setMeetOrSlice):
        (WebCore::SVGPreserveAspectRatio::parsePreserveAspectRatio):
        * ksvg2/svg/SVGPreserveAspectRatio.h:
        * ksvg2/svg/SVGSVGElement.cpp: SVG classes don't get cntext params passed anymore.
        (WebCore::SVGSVGElement::createSVGAngle):
        * ksvg2/svg/SVGStyledTransformableElement.cpp: Ditto.
        (WebCore::SVGStyledTransformableElement::SVGStyledTransformableElement):
        * ksvg2/svg/SVGTextElement.cpp: Ditto.
        (WebCore::SVGTextElement::SVGTextElement):
        * ksvg2/svg/SVGTransformList.cpp: Kill context parameter.
        (SVGTransformList::SVGTransformList):
        * ksvg2/svg/SVGTransformList.h:

2007-07-10  Nikolas Zimmermann  <zimmermann@kde.org>

        Reviewed by Sam.

        Fixes: http://bugs.webkit.org/show_bug.cgi?id=11167.

        Recognize <textPath> in SVG JS bindings.
        Add JSSVGTextPathElement to JSSVGElementWrapperFactory.

        Add SVGException.idl just for the JS generation.
        Turn on all SVG JS constructors and add them to DOMWindow.idl.

        Testcase added: LayoutTests/svg/custom/js-svg-constructors.svg
    
        * DerivedSources.make: Add JSSVGException.h
        * WebCore.xcodeproj/project.pbxproj: Correct paths for DOM/JS*SVGTextPathElement
        * bindings/scripts/CodeGeneratorJS.pm: Forward port hash fix from trunk.
        * bindings/js/JSSVGElementWrapperFactory.cpp: Add JSSVGTextPathElement support
        * ksvg2/svg/SVGComponentTransferFunctionElement.idl:
        * ksvg2/svg/SVGTextPathElement.h:
        * ksvg2/svg/SVGException.h:
        * ksvg2/svg/SVGException.idl: Added.
        * ksvg2/svg/SVGFEBlendElement.idl:
        * ksvg2/svg/SVGFEColorMatrixElement.idl:
        * ksvg2/svg/SVGFECompositeElement.idl:
        * ksvg2/svg/SVGFEDisplacementMapElement.idl:
        * ksvg2/svg/SVGFETurbulenceElement.idl:
        * ksvg2/svg/SVGGradientElement.idl:
        * ksvg2/svg/SVGMarkerElement.idl:
        * ksvg2/svg/SVGTextContentElement.idl:
        * ksvg2/svg/SVGTextPathElement.idl:
        * page/DOMWindow.idl: Recognize new js svg constructors.

2007-06-28  Rob Buis  <buis@kde.org>

        Reviewed by Maciej.

        http://bugs.webkit.org/show_bug.cgi?id=14241
        SVG <image> with height or width less than 1 fails to render image

        Keep extra member vars to get width/height as floats for accurate
        calculations.

        * rendering/RenderSVGImage.cpp:
        (WebCore::RenderSVGImage::adjustRectsForAspectRatio):
        (WebCore::RenderSVGImage::paint):
        (WebCore::RenderSVGImage::calcWidth):
        (WebCore::RenderSVGImage::calcHeight):
        * rendering/RenderSVGImage.h:

2007-06-26  Rob Buis  <buis@kde.org>

        Reviewed by Maciej.

        http://bugs.webkit.org/show_bug.cgi?id=9976
        Fix negative width issue in Hixie's test

        Refuse to render zero or negative width/height.

        * rendering/RenderSVGContainer.cpp:
        (WebCore::RenderSVGContainer::paint):
        * rendering/RenderSVGRoot.cpp:
        (WebCore::RenderSVGRoot::paint):

2007-06-26  Rob Buis  <buis@kde.org>

        Reviewed by Maciej.

        http://bugs.webkit.org/show_bug.cgi?id=12062
        WebCore does not handle CSS-specified fill fallback correctly

        Implement fallback for fill and stroke.

        * ksvg2/css/SVGCSSParser.cpp:
        (WebCore::CSSParser::parseSVGValue):
        * ksvg2/svg/SVGPaint.cpp:
        (WebCore::SVGPaint::SVGPaint):
        * ksvg2/svg/SVGPaint.h:
        * platform/graphics/svg/SVGPaintServer.cpp:
        (WebCore::SVGPaintServer::fillPaintServer):
        (WebCore::SVGPaintServer::strokePaintServer):

2007-06-20  Rob Buis  <buis@kde.org>

        Reviewed by Eric.

        http://bugs.webkit.org/show_bug.cgi?id=14157
        Rotated shape has wrong gradient rendering

        Use the untransformed bbox in objectBoundingBoxMode. Also
        don't do objectBoundingBoxMode should the bbox width ort height
        be zero.

        * platform/graphics/svg/cg/SVGPaintServerGradientCg.cpp:
        (WebCore::SVGPaintServerGradient::teardown):
        (WebCore::SVGPaintServerGradient::renderPath):

2007-06-20  Nikolas Zimmermann  <zimmermann@kde.org>

        Reviewed by Eric & Oliver.

        Fixes: http://bugs.webkit.org/show_bug.cgi?id=14198

        Reeanble <foreignObject>. Explicitely disallow <use> on <foreignObject>
        as it may lead to bad problems. 

        While I'm at it disallow <use> on any non-svg element.

        * bindings/js/JSSVGElementWrapperFactory.cpp:
        * bindings/objc/DOM.mm:
        (WebCore::createElementClassMap):
        * ksvg2/svg/SVGForeignObjectElement.cpp:
        * ksvg2/svg/SVGForeignObjectElement.h:
        * ksvg2/svg/SVGForeignObjectElement.idl:
        * ksvg2/svg/SVGLocatable.cpp:
        (WebCore::SVGLocatable::nearestViewportElement):
        (WebCore::SVGLocatable::farthestViewportElement):
        * ksvg2/svg/SVGUseElement.cpp:
        (WebCore::SVGUseElement::buildPendingResource):
        * ksvg2/svg/svgtags.in:
        * rendering/RenderForeignObject.cpp:

2007-06-19  Rob Buis  <buis@kde.org>

        Reviewed by Oliver.

        http://bugs.webkit.org/show_bug.cgi?id=14144
        All tx/ty (parentX/parentY) usage should be removed from SVG renders
        http://bugs.webkit.org/show_bug.cgi?id=13981
        <br> prevents click handler from firing

        Fix the hit testing issues by making RenderSVGRoot take its m_x, m_y
        into account in the absolute transform.

        * rendering/RenderPath.cpp:
        (WebCore::RenderPath::absoluteRects):
        (WebCore::RenderPath::nodeAtPoint):
        * rendering/RenderSVGImage.cpp:
        (WebCore::RenderSVGImage::nodeAtPoint):
        * rendering/RenderSVGRoot.cpp:
        (WebCore::RenderSVGRoot::absoluteTransform):
        (WebCore::RenderSVGRoot::nodeAtPoint):

2007-06-16  Nikolas Zimmermann  <zimmermann@kde.org>

        Reviewed by Eric.

        Fixes: http://bugs.webkit.org/show_bug.cgi?id=14015 (SVGTransformList::initialize() has no effect)

        Fix SVGTransformList usage in SVG DOM exposed to JS.
        This also fixes SVG space invaders including most repainting issues. (still some unrelated ones left)

        This is basically the _same_ fix applied to SVGPointList some months ago. We just forgot
        to add JSSVGTransformListCustom when switching from SVGTransform* -> SVGTransform (POD type).

        * WebCore.xcodeproj/project.pbxproj:
        * bindings/js/JSSVGTransformListCustom.cpp: Added.
        (WebCore::JSSVGTransformList::clear):
        (WebCore::JSSVGTransformList::initialize):
        (WebCore::JSSVGTransformList::getItem):
        (WebCore::JSSVGTransformList::insertItemBefore):
        (WebCore::JSSVGTransformList::replaceItem):
        (WebCore::JSSVGTransformList::removeItem):
        (WebCore::JSSVGTransformList::appendItem):
        * ksvg2/svg/SVGCircleElement.cpp:
        (WebCore::SVGCircleElement::notifyAttributeChange):
        * ksvg2/svg/SVGEllipseElement.cpp:
        (WebCore::SVGEllipseElement::notifyAttributeChange):
        * ksvg2/svg/SVGGradientElement.cpp:
        (WebCore::SVGGradientElement::SVGGradientElement):
        * ksvg2/svg/SVGImageElement.cpp:
        (WebCore::SVGImageElement::notifyAttributeChange):
        * ksvg2/svg/SVGLineElement.cpp:
        (WebCore::SVGLineElement::notifyAttributeChange):
        * ksvg2/svg/SVGPathElement.cpp:
        (WebCore::SVGPathElement::notifyAttributeChange):
        * ksvg2/svg/SVGPatternElement.cpp:
        (WebCore::SVGPatternElement::SVGPatternElement):
        * ksvg2/svg/SVGPolyElement.cpp:
        (WebCore::SVGPolyElement::notifyAttributeChange):
        * ksvg2/svg/SVGRectElement.cpp:
        (WebCore::SVGRectElement::notifyAttributeChange):
        * ksvg2/svg/SVGStyledTransformableElement.cpp:
        (WebCore::SVGStyledTransformableElement::SVGStyledTransformableElement):
        (WebCore::SVGStyledTransformableElement::notifyAttributeChange):
        * ksvg2/svg/SVGStyledTransformableElement.h:
        * ksvg2/svg/SVGTextElement.cpp:
        (WebCore::SVGTextElement::SVGTextElement):
        * ksvg2/svg/SVGTransformList.cpp:
        (SVGTransformList::SVGTransformList):
        (SVGTransformList::context):
        * ksvg2/svg/SVGTransformList.h:
        * ksvg2/svg/SVGTransformList.idl:

2007-06-15  Nikolas Zimmermann  <zimmermann@kde.org>

        Reviewed by Eric.

        Fixes: http://bugs.webkit.org/show_bug.cgi?id=14155

        JSSVGMatrix was not working properly.
        "matrix.translate(10, 10)" actually altered 'matrix' instead of returning a
        new SVGMatrix object, as described in SVG 1.1 specification.

        * bindings/js/JSSVGMatrixCustom.cpp:
        (WebCore::JSSVGMatrix::multiply):
        (WebCore::JSSVGMatrix::inverse):
        (WebCore::JSSVGMatrix::translate):
        (WebCore::JSSVGMatrix::scale):
        (WebCore::JSSVGMatrix::scaleNonUniform):
        (WebCore::JSSVGMatrix::rotate):
        (WebCore::JSSVGMatrix::flipX):
        (WebCore::JSSVGMatrix::flipY):
        (WebCore::JSSVGMatrix::skewX):
        (WebCore::JSSVGMatrix::skewY):
        * ksvg2/svg/SVGMatrix.idl:

2007-06-15  Eric Seidel  <eric@webkit.org>

        Reviewed by Niko.

        Fix the release build.

        * rendering/SVGRootInlineBox.cpp:
        (WebCore::applyTextAnchorToTextChunk):

2007-06-15  Rob Buis  <buis@kde.org>

        Reviewed by Eric.

        http://bugs.webkit.org/show_bug.cgi?id=14051
        <svg:image> fails to position correctly when <svg> is inside an inline <div>

        Leave parent translation to the containers.

        * rendering/RenderSVGImage.cpp:
        (WebCore::RenderSVGImage::paint):

2007-06-15  Nikolas Zimmermann  <zimmermann@kde.org>

        Reviewed by Eric.

        Fixes: http://bugs.webkit.org/show_bug.cgi?id=13963

        Fix SVG space invaders. It actually highlighted a bad problem with our JSSVGPODTypeWrapper's.
        Introduce a new "2nd-level cache" for all readwrite POD properties. Subsequent calls to ie.
        myRect.x.baseVal.value don't create a new wrapper everytime, but are properly cached now.
        This leads to a massive reduction in created wrappers.

        * bindings/js/JSSVGMatrixCustom.cpp:
        (WebCore::JSSVGMatrix::inverse):
        (WebCore::JSSVGMatrix::rotateFromVector):
        * bindings/js/JSSVGPODTypeWrapper.h:
        (WebCore::JSSVGPODTypeWrapperCreatorReadWrite::JSSVGPODTypeWrapperCreatorReadWrite):
        (WebCore::JSSVGPODTypeWrapperCreatorReadWrite::~JSSVGPODTypeWrapperCreatorReadWrite):
        (WebCore::JSSVGPODTypeWrapperCreatorReadWrite::operator PODType):
        (WebCore::JSSVGPODTypeWrapperCreatorReadWrite::commitChange):
        (WebCore::JSSVGPODTypeWrapperCreatorReadOnly::JSSVGPODTypeWrapperCreatorReadOnly):
        (WebCore::JSSVGPODTypeWrapperCreatorReadOnly::~JSSVGPODTypeWrapperCreatorReadOnly):
        (WebCore::JSSVGPODTypeWrapperCreatorReadOnly::operator PODType):
        (WebCore::JSSVGPODTypeWrapperCreatorReadOnly::commitChange):
        (WebCore::JSSVGPODTypeWrapperCreatorForList::JSSVGPODTypeWrapperCreatorForList):
        (WebCore::JSSVGPODTypeWrapperCreatorForList::commitChange):
        (WebCore::PODTypeReadWriteHashInfo::PODTypeReadWriteHashInfo):
        (WebCore::PODTypeReadWriteHashInfo::operator==):
        (WebCore::PODTypeReadWriteHashInfoHash::hash):
        (WebCore::PODTypeReadWriteHashInfoHash::equal):
        (WebCore::PODTypeReadWriteHashInfoTraits::deletedValue):
        (WebCore::PODTypeReadWriteHashInfoTraits::emptyValue):
        (WebCore::JSSVGPODTypeWrapperCache::readWriteHashMap):
        (WebCore::JSSVGPODTypeWrapperCache::lookupOrCreateWrapper):
        (WebCore::JSSVGPODTypeWrapperCache::forgetWrapper):
        * bindings/js/JSSVGPointListCustom.cpp:
        (WebCore::JSSVGPointList::removeItem):
        * bindings/scripts/CodeGeneratorJS.pm:

2007-06-14  Eric Seidel  <eric@webkit.org>

        Reviewed by Niko.

        Text gradients are broken on feature branch
        http://bugs.webkit.org/show_bug.cgi?id=14142

        * rendering/SVGRenderSupport.cpp:
        (WebCore::prepareToRenderSVGContent):
        * rendering/SVGRootInlineBox.cpp:
        (WebCore::prepareTextRendering):
        (WebCore::SVGRootInlineBox::paint):
        (WebCore::SVGRootInlineBox::paintInlineBoxes):
        (WebCore::SVGRootInlineBox::paintChildInlineTextBox):
        (WebCore::SVGRootInlineBox::paintChildInlineFlowBox):
        * rendering/SVGRootInlineBox.h:

2007-06-14  Nikolas Zimmermann  <zimmermann@kde.org>

        Reviewed by Sam.

        Fixes: http://bugs.webkit.org/show_bug.cgi?id=11273

        Implement pixelUnitToMillimeterX(), pixelUnitToMillimeterY() in SVGSVGElement.
        Use cssPixelsPerInch, just like done in CSSPrimitiveValue & SVGLength.

        * ksvg2/svg/SVGSVGElement.cpp:
        (WebCore::SVGSVGElement::pixelUnitToMillimeterX):
        (WebCore::SVGSVGElement::pixelUnitToMillimeterY):

2007-06-14  Rob Buis  <buis@kde.org>

        Reviewed by Eric.

        http://bugs.webkit.org/show_bug.cgi?id=9752
        %-sizing of elements with a html parent is broken

        Calculate width/height for length percentages when embedded in xhtml.

        * ksvg2/svg/SVGLength.cpp:
        (WebCore::SVGLength::PercentageOfViewport):

2007-06-14  Rob Buis  <buis@kde.org>

        Build fix.

        * rendering/SVGCharacterLayoutInfo.cpp:

2007-06-14  Rob Buis  <buis@kde.org>

        Reviewed by Eric.

        http://bugs.webkit.org/show_bug.cgi?id=12207
        RenderSVGContainer should be split into multiple classes
        http://bugs.webkit.org/show_bug.cgi?id=14125
        KCanvasRenderingStyle should be removed

        Introduce the RenderSVGRoot class and kill the KCanvas enums.

        * WebCore.xcodeproj/project.pbxproj:
        * ksvg2/css/SVGRenderStyle.cpp:
        (WebCore::SVGRenderStyle::cssPrimitiveToLength):
        * ksvg2/css/SVGRenderStyle.h:
        * ksvg2/misc/KCanvasRenderingStyle.cpp: Removed.
        * ksvg2/misc/KCanvasRenderingStyle.h: Removed.
        * ksvg2/svg/SVGMarkerElement.cpp:
        (WebCore::SVGMarkerElement::createRenderer):
        (WebCore::SVGMarkerElement::notifyAttributeChange):
        * ksvg2/svg/SVGSVGElement.cpp:
        (WebCore::SVGSVGElement::createRenderer):
        * ksvg2/svg/SVGSVGElement.h:
        * platform/graphics/svg/SVGPaintServer.cpp:
        (WebCore::sharedSolidPaintServer):
        (WebCore::SVGPaintServer::fillPaintServer):
        (WebCore::SVGPaintServer::strokePaintServer):
        (WebCore::dashArrayFromRenderingStyle):
        * platform/graphics/svg/SVGPaintServer.h:
        * platform/graphics/svg/cg/CgSupport.cpp:
        (WebCore::applyStrokeStyleToContext):
        * platform/graphics/svg/cg/RenderPathCg.cpp:
        (WebCore::RenderPath::strokeContains):
        * rendering/RenderPath.cpp:
        (WebCore::RenderPath::fillContains):
        (WebCore::fillAndStrokePath):
        (WebCore::RenderPath::drawMarkersIfNeeded):
        * rendering/RenderSVGContainer.cpp:
        (WebCore::RenderSVGContainer::requiresLayer):
        (WebCore::RenderSVGContainer::layout):
        (WebCore::RenderSVGContainer::applyContentTransforms):
        (WebCore::RenderSVGContainer::paint):
        (WebCore::RenderSVGContainer::setAlign):
        (WebCore::RenderSVGContainer::align):
        (WebCore::RenderSVGContainer::viewportTransform):
        (WebCore::RenderSVGContainer::absoluteTransform):
        (WebCore::RenderSVGContainer::getAspectRatio):
        * rendering/RenderSVGContainer.h:
        * rendering/RenderSVGInlineText.cpp:
        * rendering/RenderSVGRoot.cpp: Added.
        (WebCore::RenderSVGRoot::RenderSVGRoot):
        (WebCore::RenderSVGRoot::~RenderSVGRoot):
        (WebCore::RenderSVGRoot::localTransform):
        (WebCore::RenderSVGRoot::setLocalTransform):
        (WebCore::RenderSVGRoot::requiresLayer):
        (WebCore::RenderSVGRoot::lineHeight):
        (WebCore::RenderSVGRoot::baselinePosition):
        (WebCore::RenderSVGRoot::layout):
        (WebCore::RenderSVGRoot::applyContentTransforms):
        (WebCore::RenderSVGRoot::paint):
        (WebCore::RenderSVGRoot::viewport):
        (WebCore::RenderSVGRoot::calcViewport):
        (WebCore::RenderSVGRoot::setViewBox):
        (WebCore::RenderSVGRoot::viewBox):
        (WebCore::RenderSVGRoot::setAlign):
        (WebCore::RenderSVGRoot::align):
        (WebCore::RenderSVGRoot::viewportTransform):
        (WebCore::RenderSVGRoot::absoluteClippedOverflowRect):
        (WebCore::RenderSVGRoot::addFocusRingRects):
        (WebCore::RenderSVGRoot::absoluteRects):
        (WebCore::RenderSVGRoot::absoluteTransform):
        (WebCore::RenderSVGRoot::fillContains):
        (WebCore::RenderSVGRoot::strokeContains):
        (WebCore::RenderSVGRoot::relativeBBox):
        (WebCore::RenderSVGRoot::setSlice):
        (WebCore::RenderSVGRoot::slice):
        (WebCore::RenderSVGRoot::getAspectRatio):
        (WebCore::RenderSVGRoot::nodeAtPoint):
        * rendering/RenderSVGRoot.h: Added.
        (WebCore::RenderSVGRoot::isSVGContainer):
        (WebCore::RenderSVGRoot::renderName):
        * rendering/RenderSVGTSpan.cpp:
        * rendering/RenderSVGText.cpp:
        (WebCore::RenderSVGText::relativeBBox):
        * rendering/SVGRenderTreeAsText.cpp:
        (WebCore::operator<<):
        (WebCore::writeStyle):
        * rendering/SVGRootInlineBox.cpp:
        (WebCore::SVGRootInlineBox::paint):
        (WebCore::SVGRootInlineBox::paintInlineBoxes):

2007-06-12  Nikolas Zimmermann  <zimmermann@kde.org>

        Reviewed by Eric.

        Fix regression: SVG images drawn in the wrong paint phase.

        * rendering/RenderSVGImage.cpp:
        (WebCore::RenderSVGImage::paint):

2007-06-11  Rob Buis  <buis@kde.org>

        Reviewed by weinig.

        http://bugs.webkit.org/show_bug.cgi?id=14064
        fill property is reported as type SVGColor

        Do the checks in the right order.

        * bindings/js/kjs_css.cpp:
        (KJS::toJS):

2007-06-07  Rob Buis  <buis@kde.org>

        Reviewed by Eric.

        http://bugs.webkit.org/show_bug.cgi?id=12122
        SVGPathElement should not inherit from SVGPathParser

        Use path builders for building Path and PathSegLists.

        * ksvg2/svg/SVGAnimateMotionElement.cpp:
        (WebCore::SVGAnimateMotionElement::parseMappedAttribute):
        * ksvg2/svg/SVGParserUtilities.cpp:
        (WebCore::pointsListFromSVGData):
        (WebCore::SVGPathParser::~SVGPathParser):
        (WebCore::SVGPathParser::svgLineToHorizontal):
        (WebCore::SVGPathParser::svgLineToVertical):
        (WebCore::SVGPathParser::svgCurveToCubicSmooth):
        (WebCore::SVGPathParser::svgCurveToQuadratic):
        (WebCore::SVGPathParser::svgCurveToQuadraticSmooth):
        (WebCore::SVGPathParser::svgArcTo):
        (WebCore::PathBuilder::build):
        (WebCore::PathBuilder::svgMoveTo):
        (WebCore::PathBuilder::svgLineTo):
        (WebCore::PathBuilder::svgCurveToCubic):
        (WebCore::PathBuilder::svgClosePath):
        (WebCore::pathFromSVGData):
        (WebCore::SVGPathSegListBuilder::build):
        (WebCore::SVGPathSegListBuilder::svgMoveTo):
        (WebCore::SVGPathSegListBuilder::svgLineTo):
        (WebCore::SVGPathSegListBuilder::svgLineToHorizontal):
        (WebCore::SVGPathSegListBuilder::svgLineToVertical):
        (WebCore::SVGPathSegListBuilder::svgCurveToCubic):
        (WebCore::SVGPathSegListBuilder::svgCurveToCubicSmooth):
        (WebCore::SVGPathSegListBuilder::svgCurveToQuadratic):
        (WebCore::SVGPathSegListBuilder::svgCurveToQuadraticSmooth):
        (WebCore::SVGPathSegListBuilder::svgArcTo):
        (WebCore::SVGPathSegListBuilder::svgClosePath):
        (WebCore::pathSegListFromSVGData):
        * ksvg2/svg/SVGParserUtilities.h:
        * ksvg2/svg/SVGPathElement.cpp:
        (WebCore::SVGPathElement::SVGPathElement):
        (WebCore::SVGPathElement::parseMappedAttribute):
        * ksvg2/svg/SVGPathElement.h:
        * ksvg2/svg/SVGPolyElement.cpp:
        (WebCore::SVGPolyElement::SVGPolyElement):
        (WebCore::SVGPolyElement::parseMappedAttribute):
        * ksvg2/svg/SVGPolyElement.h:

2007-06-06  Eric Seidel  <eric@webkit.org>

        Reviewed by olliej.

        Add support for tabbing between links in an SVG file
        Also add support for drawing a focus ring around focused svg content.
        http://bugs.webkit.org/show_bug.cgi?id=8823
        
        Layout test is blocked by http://bugs.webkit.org/show_bug.cgi?id=14027

        * css/svg.css:
        * ksvg2/svg/SVGAElement.cpp:
        (WebCore::SVGAElement::defaultEventHandler):
        (WebCore::SVGAElement::supportsFocus):
        (WebCore::SVGAElement::isFocusable):
        (WebCore::SVGAElement::isMouseFocusable):
        (WebCore::SVGAElement::isKeyboardFocusable):
        * ksvg2/svg/SVGAElement.h:

2007-06-06  Eric Seidel  <eric@webkit.org>

        Reviewed by olliej.

        Make SVG (mostly) support CSS outline property (and thus focus rings)
        http://bugs.webkit.org/show_bug.cgi?id=10849

        Test: svg/custom/focus-ring.svg

        * rendering/RenderPath.cpp:
        (WebCore::RenderPath::paint):
        (WebCore::RenderPath::addFocusRingRects):
        * rendering/RenderPath.h:
        * rendering/RenderSVGContainer.cpp:
        (WebCore::RenderSVGContainer::paint):
        (WebCore::RenderSVGContainer::addFocusRingRects):
        * rendering/RenderSVGContainer.h:
        * rendering/RenderSVGImage.cpp:
        (WebCore::RenderSVGImage::paint):
        (WebCore::RenderSVGImage::addFocusRingRects):
        * rendering/RenderSVGImage.h:

2007-06-06  Eric Seidel  <eric@webkit.org>

        Reviewed by weinig.
        
        Break out common SVG rendering logic into prepareToRenderSVGContent in SVGRenderSupport

        No test cases should be changed by this.

        * WebCore.xcodeproj/project.pbxproj:
        * rendering/RenderPath.cpp:
        (WebCore::fillAndStrokePath):
        (WebCore::RenderPath::paint):
        * rendering/RenderSVGContainer.cpp:
        (WebCore::RenderSVGContainer::RenderSVGContainer):
        (WebCore::RenderSVGContainer::requiresLayer):
        (WebCore::RenderSVGContainer::isOutermostSVG):
        (WebCore::RenderSVGContainer::layout):
        (WebCore::RenderSVGContainer::applyContentTransforms):
        (WebCore::RenderSVGContainer::paint):
        (WebCore::RenderSVGContainer::viewportTransform):
        (WebCore::RenderSVGContainer::absoluteTransform):
        * rendering/RenderSVGContainer.h:
        * rendering/RenderSVGImage.cpp:
        (WebCore::RenderSVGImage::paint):
        (WebCore::RenderSVGImage::translationForAttributes):
        * rendering/SVGRenderSupport.cpp: Added.
        (WebCore::prepareToRenderSVGContent):
        * rendering/SVGRenderSupport.h: Added.
        * rendering/SVGRootInlineBox.cpp:
        (WebCore::prepareTextRendering):
        (WebCore::SVGRootInlineBox::paint):
        (WebCore::SVGRootInlineBox::paintInlineBoxes):

2007-06-06  Rob Buis  <buis@kde.org>

        Reviewed by Eric.

        http://bugs.webkit.org/show_bug.cgi?id=13976
        getPresentationAttribute not implemented

        Implement getPresentationAttribute.

        * ksvg2/svg/SVGStylable.h:
        * ksvg2/svg/SVGStylable.idl:
        * ksvg2/svg/SVGStyledElement.cpp:
        (WebCore::SVGStyledElement::getPresentationAttribute):
        * ksvg2/svg/SVGStyledElement.h:

2007-06-06  Rob Buis  <buis@kde.org>

        Reviewed by olliej and eric.

        http://bugs.webkit.org/show_bug.cgi?id=12430
        SVG has two transform parsers when it should have one.

        Refactor SVGTransformable parser so SVGAnimateTransformElement can reuse it better.

        * ksvg2/svg/SVGAnimateTransformElement.cpp:
        (WebCore::SVGAnimateTransformElement::calculateFromAndToValues):
        * ksvg2/svg/SVGAnimateTransformElement.h:
        * ksvg2/svg/SVGTransformable.cpp:
        (WebCore::):
        (WebCore::SVGTransformable::parseTransformValue):
        (WebCore::SVGTransformable::parseTransformAttribute):
        * ksvg2/svg/SVGTransformable.h:

2007-06-05  Eric Seidel  <eric@webkit.org>

        Reviewed by olliej.

        Commit files missing from previous commit, oops!
        
        * platform/graphics/svg/SVGResourceMasker.cpp:
        (WebCore::SVGResourceMasker::SVGResourceMasker):
        (WebCore::SVGResourceMasker::invalidate):
        * platform/graphics/svg/SVGResourceMasker.h:
        * platform/graphics/svg/cg/SVGResourceMaskerCg.mm:
        (WebCore::SVGResourceMasker::applyMask):

2007-06-01  Eric Seidel  <eric@webkit.org>

        Reviewed by olliej.

        Add support for maskUnits and maskContentUnits
        http://bugs.webkit.org/show_bug.cgi?id=12568
        
        This is covered by the W3C tests (including mask-intro01)

        * ksvg2/svg/SVGMaskElement.cpp:
        (WebCore::SVGMaskElement::SVGMaskElement):
        (WebCore::SVGMaskElement::parseMappedAttribute):
        (WebCore::SVGMaskElement::drawMaskerContent):
        (WebCore::SVGMaskElement::canvasResource):
        (WebCore::SVGMaskElement::notifyAttributeChange):
        * ksvg2/svg/SVGMaskElement.h:
        * ksvg2/svg/SVGMaskElement.idl:
        * platform/graphics/svg/SVGResourceMasker.cpp:
        (WebCore::SVGResourceMasker::SVGResourceMasker):
        (WebCore::SVGResourceMasker::invalidate):
        * platform/graphics/svg/SVGResourceMasker.h:
        * platform/graphics/svg/cg/SVGResourceMaskerCg.mm:
        (WebCore::SVGResourceMasker::applyMask):

2007-06-01  Eric Seidel  <eric@webkit.org>

        Reviewed by lars.
        
        Cursor does not change to hand over links containing <use>
        http://bugs.webkit.org/show_bug.cgi?id=12630

        Test: manual-tests/svg-link-hover-use.svg

        * manual-tests/svg-link-hover-use.svg: Added.
        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::hitTest): use eventParentNode instead of parentNode

2007-06-01  Eric Seidel  <eric@webkit.org>

        Reviewed by olliej.

        SVG is not correctly respecting scroll during hit testing
        http://bugs.webkit.org/show_bug.cgi?id=13083

        Test: svg/custom/scroll-hit-test.svg

        * rendering/RenderPath.cpp:
        (WebCore::RenderPath::nodeAtPoint):
        * rendering/RenderSVGContainer.cpp:
        (WebCore::RenderSVGContainer::nodeAtPoint):

2007-06-01  Eric Seidel  <eric@webkit.org>

        Reviewed by hyatt.

        Fix for: http://bugs.webkit.org/show_bug.cgi?id=12187

        Tests: fast/dom/attribute-case-sensitivity.html, fast/dom/attribute-case-sensitivity2.xhtml

        * dom/Element.cpp:
        (WebCore::shouldIgnoreAttributeCase): check to make sure element is an HTMLElement
        (WebCore::Element::getAttribute):
        (WebCore::Element::setAttribute):
        (WebCore::Element::removeAttribute):
        (WebCore::Element::getAttributeNode):
        (WebCore::Element::hasAttribute):
        * dom/NamedAttrMap.cpp:
        (WebCore::shouldIgnoreAttributeCase):
        (WebCore::NamedAttrMap::getNamedItem):
        (WebCore::NamedAttrMap::removeNamedItem):

2007-05-31  Eric Seidel  <eric@webkit.org>

        Reviewed by Niko.

        Links are activated based on mouse down events instead of click events
        http://bugs.webkit.org/show_bug.cgi?id=12570
        
        Test: svg/custom/prevent-default.svg

        * html/HTMLAnchorElement.cpp: use MiddleButton and RightButton instead of 1 and 2
        (WebCore::HTMLAnchorElement::defaultEventHandler):
        * ksvg2/svg/SVGAElement.cpp:
        (WebCore::SVGAElement::defaultEventHandler): make it function more like the HTML side

2007-05-30  Rob Buis  <buis@kde.org>

        Reviewed by Darin.

        http://bugs.webkit.org/show_bug.cgi?id=11272
        Implement currentScale(), setCurrentScale() and currentTranslate() in SVGSVGElement

        Allow zooming and panning, thereby implementing the above methods.

        * ksvg2/svg/SVGDocument.cpp:
        (WebCore::SVGDocument::zoomAndPanEnabled):
        (WebCore::SVGDocument::startPan):
        (WebCore::SVGDocument::updatePan):
        * ksvg2/svg/SVGDocument.h:
        * ksvg2/svg/SVGSVGElement.cpp:
        (WebCore::SVGSVGElement::currentScale):
        (WebCore::SVGSVGElement::setCurrentScale):
        (WebCore::SVGSVGElement::currentTranslate):
        (WebCore::SVGSVGElement::setCurrentTranslate):
        * ksvg2/svg/SVGSVGElement.h:
        * page/EventHandler.cpp:
        (WebCore::EventHandler::EventHandler):
        (WebCore::EventHandler::handleMousePressEvent):
        (WebCore::EventHandler::handleMouseMoveEvent):
        (WebCore::EventHandler::handleMouseReleaseEvent):
        * page/EventHandler.h:
        * page/Frame.cpp:
        (WebCore::Frame::setZoomFactor):
        * rendering/RenderSVGContainer.cpp:
        (WebCore::RenderSVGContainer::layout):
        (WebCore::RenderSVGContainer::paint):
        (WebCore::RenderSVGContainer::absoluteTransform):

2007-05-30  Nikolas Zimmermann  <zimmermann@kde.org>

        Reviewed by Oliver.

        Fix regression: gradient on fill of text works again!

        * platform/graphics/svg/cg/SVGPaintServerGradientCg.cpp:
        (WebCore::SVGPaintServerGradient::teardown):

2007-05-29  Nikolas Zimmermann  <zimmermann@kde.org>

        Reviewed by Oliver.

        Fix "jumpy" selection by correcting the way svgCharacterHitsPosition works.
        I basically mixed up the "closest character to position" logic.

        * rendering/RenderSVGInlineText.cpp: Only call svgCharacterHitsPosition for the firstTextBox -> it handles all children anyway.
        (WebCore::RenderSVGInlineText::positionForCoordinates):
        * rendering/SVGInlineTextBox.cpp:
        (WebCore::SVGInlineTextBox::closestCharacterToPosition): Fix logic - was really broken!
        (WebCore::SVGInlineTextBox::svgCharacterHitsPosition):
        (WebCore::SVGInlineTextBox::nodeAtPoint): Do not use svgCharacterHitsPosition here - too accurate!
                                                  We don't want to loose the 'text' cursor if one is just between two characters.

2007-05-24  Nikolas Zimmermann  <zimmermann@kde.org>

        Reviewed by Oliver.

        Add new code path dumping SVG text engine specific layout test results.
        Finally the dumped results are actually accurate and respond to the
        rendered glyphs. This has never been correct so far.

        * rendering/RenderTreeAsText.cpp:
        (WebCore::quoteAndEscapeNonPrintables):
        (WebCore::write):
        * rendering/RenderTreeAsText.h:
        * rendering/SVGInlineTextBox.h:
        * rendering/SVGRenderTreeAsText.cpp:
        (WebCore::operator<<):
        (WebCore::containsInlineTextBox):
        (WebCore::writeSVGInlineText):
        (WebCore::write):
        * rendering/SVGRenderTreeAsText.h:
        * rendering/SVGRootInlineBox.cpp:
        (WebCore::topLeftPositionOfCharacterRange):
        (WebCore::cummulatedWidthOfInlineBoxCharacterRange):
        (WebCore::cummulatedHeightOfInlineBoxCharacterRange):
        (WebCore::SVGRootInlineBox::computePerCharacterLayoutInformation):
        * rendering/SVGRootInlineBox.h:

2007-05-20  Nikolas Zimmermann  <zimmermann@kde.org>

        Reviewed by Oliver.

        Fixes: http://bugs.webkit.org/show_bug.cgi?id=12698 (SVG text needs a special per-character layout mode.)

        Fixes: http://bugs.webkit.org/show_bug.cgi?id=6420 (<text> does not respect x,y offset lists)
        Fixes: http://bugs.webkit.org/show_bug.cgi?id=6425 (<textPath> element not implemented)
        Fixes: http://bugs.webkit.org/show_bug.cgi?id=6481 (text-anchor (vertical) does not work in SVG text elements)
        Fixes: http://bugs.webkit.org/show_bug.cgi?id=11941 (REGRESSION: Missing text stroke in svg/W3C-SVG-1.1/text-deco-01-b.svg)
        Fixes: http://bugs.webkit.org/show_bug.cgi?id=12376 (glyph rotation in text/tspan not implemented)
        Fixes: http://bugs.webkit.org/show_bug.cgi?id=12377 (multiple dx and dy attributes not respected in text and tspan elements)
        Fixes: http://bugs.webkit.org/show_bug.cgi?id=12574 (<text> does not handle baseline-shift correctly)

        Introduce new experimental SVG text engine - after 5+ months of hacking.

        Add textPath support, absolute positioned SVG characters, vertical text,
        text rotation, baseline-shift, text chunks spanning <tspan>'s etc.

        Check my Flickr page for screenshots: http://www.flickr.com/photos/43532360@N00 (a bit outdated)

        Fixes/Improvments:
        - animate-elem-40-t.svg (x/y lists respected on <text> now)
        - interact-cursor-01-f.svg (text-anchor correctly handled in <text><a> situations)
        - struct-frag-05-t.svg (ditto)
        - text-align-02-b.svg (baseline-shift recognized)
        - text-align-04-b.svg (textPath displayed)
        - text-align-05-b.svg (text-anchor & vertical text handled correctly)
        - text-align-06-b.svg (baseline-shift & vertical text handled correctly)
        - text-deco-01-b.svg (longstanding regression fixed for text-decoration)
        - text-path-01-b.svg (all textPaths are displayed correctly)
        - text-text-04-t.svg (all x/y/dx/dy list situations work fine now)
        - text-text-05-t.svg (ditto)
        - text-text-06-t.svg (ditto)
        - text-text-07-t.svg (rotation works fine now)
        - text-tspan-01-b.svg (per character placment works great in all situations)

        Most files using text-anchor show 0.5-1% differences because the shift offset calculation is more correct now.

        Regressions:    
        - Gradient on fill is broken (on stroke works) -> this is a regression (easy to fix soon)
          js-late-gradient-and-object-creation.svg & js-late-gradient-creation.svg & pservers-grad-08-b.svg & pservers-grad-11-b.svg are broken

        Complete list of missing things:
        - 'textLength' / 'lengthAdjust' properties on <text>/<tspan> not yet handled.
        - 'dominant-baseline / alignment-baseline missing (neither FF/Opera/Batik support this)
        - 'kerning' property ignored
        - 'glyph-orientation-vertical' / 'glyph-orientation-horizontal' not yet handled.
        - Hebrew text selection broken (discontinous selection doesn't work)
        - <textPath> doesn't yet participate in text selection
        - <textPath> 'text-anchor' handling is flawed
        - <textPath> doesn't yet handle 'method' / 'spacing' properties
        - 'letter-spacing' / 'word-spacing' is still handled in the "legacy" mode. That means it only works
          for simple cases -> won't work for textPath's for instance
        - SVG fonts (<altGlyph>, <font> ..... tons more)

        * DerivedSources.make: Add DOM/JSSVGTextPathElement.h to build
        * WebCore.xcodeproj/project.pbxproj: Add textPath related files to build
        * css/svg.css: Correct white-space default setting for textPath element
        * ksvg2/svg/SVGFEFloodElement.cpp: Missing include (experimental build was broken)
        * ksvg2/svg/SVGTSpanElement.cpp: Recognize textPath children.
        (WebCore::SVGTSpanElement::childShouldCreateRenderer):
        * ksvg2/svg/SVGTextElement.cpp: Ditto.
        (WebCore::SVGTextElement::childShouldCreateRenderer):
        * ksvg2/svg/SVGTextPathElement.cpp: Added.
        (WebCore::SVGTextPathElement::SVGTextPathElement):
        (WebCore::SVGTextPathElement::~SVGTextPathElement):
        (WebCore::SVGTextPathElement::parseMappedAttribute):
        (WebCore::SVGTextPathElement::createRenderer):
        (WebCore::SVGTextPathElement::childShouldCreateRenderer):
        (WebCore::SVGTextPathElement::insertedIntoDocument):
        (WebCore::SVGTextPathElement::buildPendingResource):
        (WebCore::SVGTextPathElement::attach):
        * ksvg2/svg/SVGTextPathElement.h: Added.
        (WebCore::):
        (WebCore::SVGTextPathElement::rendererIsNeeded):
        (WebCore::SVGTextPathElement::contextElement):
        * ksvg2/svg/SVGTextPathElement.idl: Added.
        * ksvg2/svg/svgtags.in: Add textPath tag.
        * rendering/InlineTextBox.cpp: Make two methods non static to share with SVG.
        (WebCore::correctedTextColor):
        (WebCore::updateGraphicsContext):
        * rendering/InlineTextBox.h:
        * rendering/RenderSVGInlineText.cpp: Special positionForCoordinates() implementation. Stub caretRect() for SVG.
        (WebCore::RenderSVGInlineText::selectionRect):
        (WebCore::RenderSVGInlineText::caretRect):
        (WebCore::RenderSVGInlineText::positionForCoordinates):
        * rendering/RenderSVGInlineText.h:
        * rendering/RenderSVGTextPath.cpp: Added.
        (WebCore::RenderSVGTextPath::RenderSVGTextPath):
        (WebCore::RenderSVGTextPath::layoutPath):
        (WebCore::RenderSVGTextPath::setLayoutPath):
        (WebCore::RenderSVGTextPath::startOffset):
        (WebCore::RenderSVGTextPath::setStartOffset):
        (WebCore::RenderSVGTextPath::exactAlignment):
        (WebCore::RenderSVGTextPath::setExactAlignment):
        (WebCore::RenderSVGTextPath::stretchMethod):
        (WebCore::RenderSVGTextPath::setStretchMethod):
        (WebCore::RenderSVGTextPath::absoluteRects):
        * rendering/RenderSVGTextPath.h: Added.
        (WebCore::RenderSVGTextPath::renderName):
        * rendering/RenderText.cpp: Fix indention and use StringImpl::empty() instead of creating an empty string manually.
        (WebCore::RenderText::setTextInternal):
        * rendering/RootInlineBox.h: Add virtual no-op computePerCharacterLayoutInformation().
        (WebCore::RootInlineBox::computePerCharacterLayoutInformation):
        * rendering/SVGCharacterLayoutInfo.cpp: Added.
        (WebCore::calculateBaselineShift):
        (WebCore::SVGCharacterLayoutInfo::SVGCharacterLayoutInfo):
        (WebCore::SVGCharacterLayoutInfo::xValueAvailable):
        (WebCore::SVGCharacterLayoutInfo::yValueAvailable):
        (WebCore::SVGCharacterLayoutInfo::dxValueAvailable):
        (WebCore::SVGCharacterLayoutInfo::dyValueAvailable):
        (WebCore::SVGCharacterLayoutInfo::angleValueAvailable):
        (WebCore::SVGCharacterLayoutInfo::baselineShiftValueAvailable):
        (WebCore::SVGCharacterLayoutInfo::xValueNext):
        (WebCore::SVGCharacterLayoutInfo::yValueNext):
        (WebCore::SVGCharacterLayoutInfo::dxValueNext):
        (WebCore::SVGCharacterLayoutInfo::dyValueNext):
        (WebCore::SVGCharacterLayoutInfo::angleValueNext):
        (WebCore::SVGCharacterLayoutInfo::baselineShiftValueNext):
        (WebCore::SVGCharacterLayoutInfo::processedSingleCharacter):
        (WebCore::SVGCharacterLayoutInfo::processedChunk):
        (WebCore::SVGCharacterLayoutInfo::nextPathLayoutPointAndAngle):
        (WebCore::SVGCharacterLayoutInfo::inPathLayout):
        (WebCore::SVGCharacterLayoutInfo::setInPathLayout):
        (WebCore::SVGCharacterLayoutInfo::addLayoutInformation):
        (WebCore::SVGCharacterLayoutInfo::addStackContent):
        (WebCore::SVGCharacterLayoutInfo::xStackWalk):
        (WebCore::SVGCharacterLayoutInfo::yStackWalk):
        (WebCore::SVGCharacterLayoutInfo::dxStackWalk):
        (WebCore::SVGCharacterLayoutInfo::dyStackWalk):
        (WebCore::SVGCharacterLayoutInfo::angleStackWalk):
        (WebCore::SVGCharacterLayoutInfo::baselineShiftStackWalk):
        * rendering/SVGCharacterLayoutInfo.h: Added.
        (WebCore::PositionedVector::Type):
        (WebCore::PositionedVector::position):
        (WebCore::PositionedVector::advance):
        (WebCore::PositionedVector::valueAtCurrentPosition):
        (WebCore::SVGCharacterLayoutInfo::):
        (WebCore::SVGInlineBoxCharacterRange::SVGInlineBoxCharacterRange):
        (WebCore::SVGInlineBoxCharacterRange::isOpen):
        (WebCore::SVGInlineBoxCharacterRange::isClosed):
        (WebCore::SVGTextChunk::SVGTextChunk):
        (WebCore::SVGTextChunkLayoutInfo::SVGTextChunkLayoutInfo):
        * rendering/SVGInlineFlowBox.cpp: Make all methods no-ops when using the new text engine.
        (WebCore::SVGInlineFlowBox::paint):
        (WebCore::SVGInlineFlowBox::placeBoxesHorizontally):
        (WebCore::SVGInlineFlowBox::verticallyAlignBoxes):
        * rendering/SVGInlineFlowBox.h:
        * rendering/SVGInlineTextBox.cpp: Add new text selection / character hit detection related code.
        (WebCore::SVGInlineTextBox::SVGInlineTextBox):
        (WebCore::SVGInlineTextBox::selectionTop):
        (WebCore::SVGInlineTextBox::svgRootInlineBox):
        (WebCore::SVGInlineTextBox::closestCharacterToPosition):
        (WebCore::SVGInlineTextBox::svgCharacterHitsPosition):
        (WebCore::SVGInlineTextBox::offsetForPosition):
        (WebCore::SVGInlineTextBox::positionForOffset):
        (WebCore::SVGInlineTextBox::nodeAtPoint):
        (WebCore::SVGInlineTextBox::selectionRect):
        * rendering/SVGInlineTextBox.h:
        * rendering/SVGRootInlineBox.cpp: The heart of the new text engine lives here.
        (WebCore::prepareTextRendering):
        (WebCore::isVerticalWritingMode):
        (WebCore::SVGRootInlineBox::paint):
        (WebCore::SVGRootInlineBox::placeBoxesHorizontally):
        (WebCore::SVGRootInlineBox::verticallyAlignBoxes):
        (WebCore::SVGRootInlineBox::cummulatedWidthOfSelectionRange):
        (WebCore::cummulatedWidthOfInlineBoxCharacterRange):
        (WebCore::cummulatedWidthOfTextChunk):
        (WebCore::cummulatedHeightOfTextChunk):
        (WebCore::applyTextAnchorToTextChunk):
        (WebCore::SVGRootInlineBox::computePerCharacterLayoutInformation):
        (WebCore::totalAdvanceOfInlineTextBox):
        (WebCore::totalAdvanceOfInlineBox):
        (WebCore::SVGRootInlineBox::buildLayoutInformation):
        (WebCore::SVGRootInlineBox::layoutInlineBoxes):
        (WebCore::SVGRootInlineBox::buildLayoutInformationForTextBox):
        (WebCore::SVGRootInlineBox::buildTextChunks):
        (WebCore::SVGRootInlineBox::svgTextChunks):
        (WebCore::SVGRootInlineBox::layoutTextChunks):
        (WebCore::SVGRootInlineBox::paintSelectionForTextBox):
        (WebCore::SVGRootInlineBox::paintInlineBoxes):
        (WebCore::SVGRootInlineBox::paintCharacterRangeForTextBox):
        * rendering/SVGRootInlineBox.h:
        * rendering/bidi.cpp: Call the new computePerCharacterLayoutInformation() method.
        (WebCore::RenderBlock::layoutInlineChildren):

2007-05-10  Eric Seidel  <eric@webkit.org>

        Reviewed by olliej.

        http://bugs.webkit.org/show_bug.cgi?id=11931
        PathCG fails to hit on unclosed sub-paths

        Test: svg/custom/hit-test-unclosed-subpaths.svg

        * platform/graphics/cg/PathCG.cpp:
        (WebCore::copyClosingSubpathsApplierFunction):
        (WebCore::copyCGPathClosingSubpaths):
        (WebCore::Path::contains): use new copy & close function

=== End merge of feature-branch 2007-10-12 ===

2007-10-11  Jon Honeycutt  <jhoneycutt@apple.com>

        Reviewed by Anders.

        Handle a race condition that could arise if a plugin was loaded while it
        was scheduled to be freed: check whether the timer that schedules
        library frees is active in PluginPackageWin::load().

        * plugins/win/PluginPackageWin.cpp:
        (WebCore::PluginPackageWin::freeLibrarySoon): Added assertions
        (WebCore::PluginPackageWin::freeLibraryTimerFired): Added assertion
        (WebCore::PluginPackageWin::load): If we are scheduled to free this
        library, cancel the timer, and don't call LoadLibrary

2007-10-11  Justin Garcia  <justin.garcia@apple.com>

        Reviewed by Harrison.

        <rdar://problem/5483567> REGRESSION (Tiger only): Pasting words copied from TextEdit in Mail adds extra newline
        
        * editing/ReplaceSelectionCommand.cpp:
        (WebCore::ReplaceSelectionCommand::removeUnrenderedTextNodesAtEnds): Added.
        We would like to insert the fragment as-is if possible, but AppKit on Tiger
        creates fragments from RTF data that have carriage returns and spaces at the
        beginning and end, and those need to be removed since they'll interfere with 
        paragraph merging.
        (WebCore::ReplaceSelectionCommand::doApply):
        * editing/ReplaceSelectionCommand.h:

2007-10-10  Justin Garcia  <justin.garcia@apple.com>

        Reviewed by Maciej.
        
        <rdar://problem/5521237> Pasting a word copied from TextEdit after a regular, breaking space, adds a leading newline
        
        * editing/CompositeEditCommand.cpp:
        (WebCore::CompositeEditCommand::prepareWhitespaceAtPositionForSplit):
        Fixed a typo.

2007-10-10  Jon Honeycutt  <jhoneycutt@apple.com>

        Reviewed by Darin.

        <rdar://5530519> REGRESSION (303-310A18): Crash when closing tab with
        pdf file (Reader 7 only)

        Reader 7 subclasses its parent window, so posting a WM_DESTROY to this
        window puts us in plugin code. When the plugin forwards the message
        back to the original window proc, and we free the plugin library from
        there, we will jump back to code we just freed when we return, so delay 
        calling FreeLibrary at least until the next message loop

        * plugins/win/PluginPackageWin.cpp:
        (WebCore::PluginPackageWin::freeLibrarySoon): Start a timer to free the
        plugin library
        (WebCore::PluginPackageWin::freeLibraryTimerFired): Free the library
        (WebCore::PluginPackageWin::PluginPackageWin): Initialize the timer that
        will free this library
        (WebCore::PluginPackageWin::unloadWithoutShutdown): Call
        freeLibrarySoon()
        * plugins/win/PluginPackageWin.h: Added m_freeLibraryTimer

2007-10-11  Ada Chan  <adachan@apple.com>

        <rdar://problem/5534421> 
        Switched to using wkGetDefaultHTTPCookieStorage() and removed some cookie-related
        methods we no longer need in ResourceHandle.
        
        <rdar://problem/5244261> "Never" cookie policy was ignored on windows
        Need to set the cookie accept policy on each CFURLRequest.
        
        Reviewed by Oliver.

        * platform/network/ResourceHandle.h:
        * platform/network/cf/ResourceHandleCFNet.cpp:
        (WebCore::makeFinalRequest):
        * platform/network/cf/ResourceRequestCFNet.cpp:
        (WebCore::ResourceRequest::doUpdatePlatformRequest):
        * platform/network/win/CookieJarWin.cpp:
        (WebCore::setCookies):
        (WebCore::cookies):
        (WebCore::cookiesEnabled):

2007-10-11  Mark Rowe  <mrowe@apple.com>

        Reviewed by Tim Hatcher.

        Fix for <rdar://problem/5488678>.  Disable debugging symbols in production builds for 10.4
        PowerPC to prevent a huge STABS section from being generated.

        * Configurations/Base.xcconfig:

2007-10-11  Lars Knoll  <lars@trolltech.com>

        Reviewed by Erik Seidel and Simon.

        Ensure that setting innerHTML on an element doesn't do
        weird things with the document.
        Fixes most issues with http://bugs.webkit.org/show_bug.cgi?id=15456

        Test: fast/innerHTML/innerHTML-changing-document-properties.xhtml

        * dom/XMLTokenizer.cpp:
        (WebCore::XMLTokenizer::write):
        (WebCore::XMLTokenizer::startDocument):
        (WebCore::XMLTokenizer::end):
        (WebCore::):

2007-10-10  George Staikos  <staikos@kde.org>

        Reviewed by Adam Roben.

        Fix Qt build on Win32 with VS2005.

        * loader/FTPDirectoryDocument.cpp:
        (WebCore::processFileDateString):
        * loader/FTPDirectoryParser.cpp:
        (WebCore::parseOneFTPLine):

2007-10-10  Alice Liu  <alice.liu@apple.com>

        Reviewed by Geoff Garen.

        Fixed <rdar://5464402> Crash when running fast/frames/onload-remove-iframe-crash.html in DRT
        createFrame() now returns a RefPtr instead of a raw Frame pointer. 
        Making this change improves the way we handle frames on Windows webkit. 

        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::loadSubframe):
        * loader/FrameLoaderClient.h:
        * platform/graphics/svg/SVGImageEmptyClients.h:
        (WebCore::SVGEmptyFrameLoaderClient::createFrame):

2007-10-10  Simon Hausmann  <hausmann@kde.org>

        Reviewed by Lars.

        Fix compilation using gcc 4.3. Header files have been reorganized and as a result some extra
        includes are needed for INT_MAX, std::auto_ptr and the like.

        WARNING: NO TEST CASES ADDED OR CHANGED

        * bridge/AXObjectCache.h:
        * ksvg2/misc/SVGDocumentExtensions.h:
        * platform/Base64.cpp:
        * platform/graphics/svg/SVGPaintServerPattern.h:
        * platform/graphics/svg/SVGResourceMasker.h:

2007-10-08  Sam Weinig  <sam@webkit.org>

        Reviewed by Steve Falkenburg.

        Fix for <rdar://problem/5519698> CrashTracer: [USER] 47 crashes in Safari at com.apple.WebCore: WebCore::XMLTokenizer::lineNumber const + 9

        Test: fast/innerHTML/innerHTML-script-tag-crash.xhtml

        * dom/XMLTokenizer.cpp:
        (WebCore::XMLTokenizer::lineNumber): Return 1 when there is no context.
        (WebCore::XMLTokenizer::columnNumber): ditto.

2007-10-08  Adam Roben  <aroben@apple.com>

        Fix Bug 15305: Crash when dragging an image when "load images automatically" preference is off

        http://bugs.webkit.org/show_bug.cgi?id=15305
        <rdar://problem/5524774>

        Reviewed by Eric Seidel.

        No test possible: to reproduce this you have to change a WebKit
        preference and reload the page. See
        http://bugs.webkit.org/show_bug.cgi?id=15414

        * platform/win/ClipboardWin.cpp:
        (WebCore::createGlobalImageFileDescriptor): ASSERT that we have an
        image and that it has a SharedBuffer.
        (WebCore::writeImageToDataObject): The fix: null-check imageBuffer.

2007-10-05  Geoffrey Garen  <ggaren@apple.com>

        Reviewed by Sam Weinig.
        
        New fix for <rdar://problem/5522487> REGRESSION: With JavaScript 
        disabled, any page load causes a crash in PropertyMap::put
        
        Explicitly remove the "document" property from the window. The old 
        solution would leave a stale "document" property around after JavaScript
        was re-enabled.

        The architecture for disabling JavaScript could use some consolidation. 
        It seems wrong that a script proxy even exists when JavaScript is 
        disabled. It also seems wrong that so many individual call sites are 
        responsible for checking whether JavaScript is enabled. I've filed a 
        bug about this: http://bugs.webkit.org/show_bug.cgi?id=15385.

        * bindings/js/kjs_proxy.cpp:
        (WebCore::KJSProxy::clearDocumentWrapper):
        * bindings/js/kjs_proxy.h:
        * page/Frame.cpp:
        (WebCore::Frame::setDocument):

2007-10-05  Jon Honeycutt  <jhoneycutt@apple.com>

        Reviewed by Anders.

        <rdar://5520913> Ticketmaster.com doesn't display correctly (Flash
        related?)

        The plugin is requesting files that don't exist on the server, and
        we are passing the 404 error page to the plugin. This change cancels the
        stream if the response code indicates a failure.

        This is a port of the safari / mac code.

        * loader/win/NetscapePlugInStreamLoaderWin.cpp:
        (WebCore::NetscapePlugInStreamLoader::didReceiveResponse): If the
        response code indicates a failure, cancel the stream

2007-10-05  Geoffrey Garen  <ggaren@apple.com>

        Reviewed by Sam Weinig.
        
        Fixed <rdar://problem/5522487> REGRESSION: With JavaScript disabled, 
        any page load causes a crash in PropertyMap::put
        
        The problem was that we were using JavaScript when JavaScript was
        disabled. The architecture for disabling JavaScript could use some
        consolidation, but this is the simplest, safest change for now.
        
        Currently passing layout tests still pass.

        * bindings/js/kjs_proxy.cpp:
        (WebCore::KJSProxy::updateDocumentWrapper):

2007-10-04  Beth Dakin  <bdakin@apple.com>

        Reviewed by John Sullivan.

        Fix for <rdar://problem/5441823> REGRESSION (r25142, Tiger only): 
        Vertical scroll bar not redrawn properly when going back in history 
        (15033)

        This fix if-defs r25142 to be Leopard-only since it causes 
        correctness issues on Tiger and does not seem to have any 
        performance impact on Tiger either.

        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::transitionToCommitted):

2007-10-05  Ada Chan  <adachan@apple.com>

        <rdar://problem/5436617> Favicons sometimes don't show up even when they are
        in the database
        - A client can try to retain an icon for a page before the database is actually
        opened.  Since isOpened() is not a requirement to retain an icon, remove the check
        for that.  Instead, we'll check to make sure whether this database is enabled
        before proceeding.

        Reviewed by Brady.

        * loader/icon/IconDatabase.cpp:
        (WebCore::IconDatabase::retainIconForPageURL):
        (WebCore::IconDatabase::releaseIconForPageURL): only check isOpen() before we
        schedule for a sync.

2007-10-05  Lars Knoll  <lars@trolltech.com>

        Reviewed by olliej.

        fix a hang in editing/selection/extend-by-word-002.html

        * platform/qt/TextBreakIteratorQt.cpp:
        (WebCore::CharBreakIteratorQt::next):
        (WebCore::characterBreakIterator):

2007-10-04  Mark Rowe  <mrowe@apple.com>

        Reviewed by Oliver.

        Switch to default level of debugging symbols to resolve <rdar://problem/5488678>.
        The "full" level appears to offer no observable benefits even though the documentation
        suggests it be used for dead code stripping.  This should also decrease link times.

        * Configurations/Base.xcconfig:

2007-10-04  Adele Peterson  <adele@apple.com>

        Reviewed by Darin.

        WebCore part of fix for <rdar://problem/5369017> REGRESSION: Can't tab to webview that doesn't have editable content

        * page/FocusController.h: Added FocusDirection argument.
        * page/FocusController.cpp: (WebCore::FocusController::setInitialFocus):
          Use FocusDirection argument instead of key modifiers to send direction to advanceFocus.
        * WebCore.exp: Updated symbol.

2007-10-04  Kevin Decker  <kdecker@apple.com>

        Reviewed by John.
        
        <rdar://problems/5516309>
        
        * page/FrameView.cpp:
        (WebCore::FrameView::updateControlTints): Avoid the expense of updating tints on controls for the
        empty-window case since this can take a significant amount of time even on windows that have no
        content at all. Note this fix specifically optimizes the empty window/tab case; for a more broad
        fix John wrote up rdar://problem/5521050.

2007-10-04  Darin Adler  <darin@apple.com>

        * page/Frame.h: Put functions into categories to indicate other classes
        we'd like to move them into in the future. Just organizational -- no code
        change.

2007-10-04  Lars Knoll  <lars@trolltech.com>

        Reviewed by maciej.

        fix a crash in the FrameLoader that can happen under certain
        conditions in the Qt port.

        Test: fast/loader/iframe-crash-on-missing-image.xhtml

        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::receivedMainResourceError):

2007-10-03  Alp Toker  <alp@atoker.com>

        Reviewed by Adam.

        http://bugs.webkit.org/show_bug.cgi?id=14726
        [gtk] API design. Mapping the WebView delegates to signals.

        Change the API namespace of the Gtk+ port from 'WebKitGtk' to 'WebKit'.

        * WebCore.pro:

2007-10-03  Alp Toker  <alp@atoker.com>

        Reviewed by Eric.

        http://bugs.webkit.org/show_bug.cgi?id=14129
        [CAIRO] Support the canvas element

        Add a new canvas implementation using Cairo for rendering.

        * html/CanvasGradient.cpp:
        (WebCore::CanvasGradient::CanvasGradient):
        (WebCore::CanvasGradient::~CanvasGradient):
        (WebCore::CanvasGradient::addColorStop):
        (WebCore::CanvasGradient::platformShading):
        * html/CanvasGradient.h:
        * html/CanvasRenderingContext2D.cpp:
        (WebCore::CanvasRenderingContext2D::setFillStyle):
        (WebCore::CanvasRenderingContext2D::fill):
        (WebCore::CanvasRenderingContext2D::stroke):
        (WebCore::CanvasRenderingContext2D::fillRect):
        (WebCore::CanvasRenderingContext2D::drawImage):
        (WebCore::CanvasRenderingContext2D::applyStrokePattern):
        * html/CanvasStyle.cpp:
        (WebCore::CanvasStyle::applyStrokeColor):
        * html/HTMLCanvasElement.cpp:
        (WebCore::HTMLCanvasElement::~HTMLCanvasElement):
        (WebCore::HTMLCanvasElement::reset):
        (WebCore::HTMLCanvasElement::paint):
        (WebCore::HTMLCanvasElement::createDrawingContext):
        (WebCore::HTMLCanvasElement::createPlatformImage):
        * html/HTMLCanvasElement.h:

2007-10-03  Lars Knoll  <lars@trolltech.com>

        Signed off by olliej.

        move WebKitQt to WebKit/qt for consistency with the other ports.

        WARNING: NO TEST CASES ADDED OR CHANGED

        * WebCore.pro:

2007-10-02  Sam Weinig  <sam@webkit.org>

        Reviewed by Oliver and Adam.

        Patch for <rdar://problem/5506968> Fail to DnD local file with non-ascii character in path from desktop to Safari (can open it with file menu)

        Use CoreFoundation to do the conversion from path to URL, as the Windows API was not
        correctly converting to UTF-8 and we know CFURL will.

        * platform/win/ClipboardUtilitiesWin.cpp:
        (WebCore::urlFromPath):
        (WebCore::getURL):

2007-10-02  Tristan O'Tierney  <tristan@apple.com>

        Reviewed by Darin Adler.

        <rdar://problem/5511842> REGRESSION: Webkit stops responding while loading Apple Store Canada page (15304)
        
        Included the NSSynchronousURLConnection_PrivateMode mode, in addition to the default run loop modes
        as an acceptable mode when using performSelectorOnMainThread with our syncronous url callbacks.

        * platform/network/mac/ResourceHandleMac.mm:
        (-[WebCoreResourceHandleAsDelegate connection:willCacheResponse:]):
        Added NSSynchronousURLConnection_PrivateMode to the list of accepted modes.

2007-10-02  Darin Adler  <darin@apple.com>

        Reviewed by Adam.

        - add support for GDI objects to OwnPtr; I plan to use this
          to fix some GDI handle leaks

        * css/CSSGrammar.y: Change parser to avoid macro that conflicts
        with macro defined in Windows system headers: FLOAT. This is needed
        because OwnPtr.h will now include <windows.h>.
        * css/CSSParser.cpp: (WebCore::CSSParser::lex): Ditto.
        * css/tokenizer.flex: Ditto.

        * platform/win/CursorWin.cpp: (WebCore::Cursor::Cursor):
        Use OwnPtr for a few HBITMAP objects as a test case.

        * platform/win/COMPtr.h: (COMPtr::COMPtr): Fix so that we can use
        Query with other COMPtr. Before this would not compile if it was
        ever instantiated.

2007-10-02  Steve Falkenburg  <sfalken@apple.com>

        Reviewed by Adam, Ada.

        Fix leak of GDI handle when we call MLANG.

        * platform/win/FontCacheWin.cpp:
        (WebCore::FontCache::getFontDataForCharacters):

2007-10-02  Lars Knoll  <lars@trolltech.com>

        Reviewed by Olliej.

        The cookies() method should only return the value of the
        cookie, not additional info such as the expiration date.

        * platform/qt/CookieJarQt.cpp:
        (WebCore::cookies):

2007-10-01  Lars Knoll  <lars@trolltech.com>

        Reviewed by Eric.

        Fix a wrong extension mapping in the MIMETypeRegistry and identify about: url's as frames in the FrameLoaderClient.

        * platform/qt/MIMETypeRegistryQt.cpp:
        (WebCore::):

2007-10-01  Justin Garcia  <justin.garcia@apple.com>

        Reviewed by Harrison.

        <rdar://problem/5516183> REGRESSION: Creating a ToDo on an incoming message fails
        
        Rolling out r25721.

        * editing/ReplaceSelectionCommand.cpp:
        (WebCore::ReplaceSelectionCommand::doApply):
        * editing/ReplaceSelectionCommand.h:

2007-10-01  Beth Dakin  <bdakin@apple.com>

        Reviewed by Adam.

        Fix for <rdar://problem/5515426> NetNewsWire 3 crashes at launch in 
        WebCore::FrameView::layout (other repro scenarios too)

        The new call to updateWidget() that we added to FrameView::layout() 
        can destroy the RenderPartObject. And so we were crashing on the 
        subsequent call to updateWidgetPosition(). This patch fixes that by 
        checking to make sure the RenderPartObject is still in the HashSet 
        after updateWidget(). Because m_widgetUpdateSet can be modified 
        during the call to updateWidget(), we need it to be intact while we 
        are iterating through the copy, so we cannot use the HashSet::swap 
        call we were using before. This patch instead uses a Vector to 
        iterate through the HashSet data and calls clear() on the HashSet 
        at the end.

        * page/FrameView.cpp:
        (WebCore::FrameView::layout):

2007-10-01  Eli Fidler  <eli@staikos.net>

        Reviewed by George Staikos.

        Switch bogus assert to a conditional and return.  This case happens
        when a widget is hidden.

        * platform/qt/WidgetQt.cpp:
        (WebCore::Widget::invalidateRect):

2007-09-30  Darin Adler  <darin@apple.com>

        Reviewed by Maciej.

        - tone down the assertion I asked Harrison to include in his fix for
          <rdar://problem/5511128>; it's OK to re-ref and deref the document
          as long as you do so after the children are done being destroyed

        No effect on release builds. Assertion change only.

        Besides the changes listed below, renamed m_hasDeleted flag to
        m_deletionHasBegun.

        * dom/ContainerNode.cpp: (WebCore::ContainerNode::removeAllChildren):
        Added code to set the m_deletionHasBegun flag and some assertions
        that test its state.

        * dom/Document.h: Removed m_hasDeleted -- we now use m_deletionHasBegun
        in the base class TreeShared.
        * dom/Document.cpp:
        (WebCore::Document::Document): Removed initialization of m_hasDeleted.
        (WebCore::Document::removedLastRef): Added code to clear
        m_inRemovedLastRefFunction if we end up deciding not to delete this.

        * platform/Shared.h:
        (WebCore::TreeShared::TreeShared): Added m_deletionHasBegun in addition to
        m_inRemovedLastRefFunction (formerly named m_hasRemovedLastRef).
        (WebCore::TreeShared::~TreeShared): Assert that m_deletionHasBegun is true.
        (WebCore::TreeShared::ref): Assert neither flag is true.
        (WebCore::TreeShared::deref): Ditto.
        (WebCore::TreeShared::hasOneRef): Ditto.
        (WebCore::TreeShared::removedLastRef): Made private. Added code to
        set m_hasDeleted to true. Also removed cast; since this class template
        has a virtual destructor, we don't need to cast before calling delete.

2007-09-29  Holger Hans Peter Freyther  <zecke@selfish.org>

        Reviewed by Mark.

        -Fix http://bugs.webkit.org/show_bug.cgi?id=13226.
        Remove Bakefiles from svn.

        * Projects/gdk/webcore-gdk.bkl: Removed.
        * Projects/wx/webcore-wx.bkl: Removed.
        * WebCoreSources.bkl: Removed.
        * webcore-base.bkl: Removed.

2007-09-28  Jan Michael Alonzo  <jmalonzo@unpluggable.com>

        Reviewed by Mark.

        -Fix http://bugs.webkit.org/show_bug.cgi?id=15254.

        * platform/gtk/RenderThemeGtk.cpp:
        (WebCore::RenderThemeGtk::determineState):
            - Apply state if control is readonly
            - Added state GTK_STATE_SELECTED of object is checked
            - Apply GTK_STATE_ACTIVE if RenderObject isFocused()
        (WebCore::RenderThemeGtk::paintTextField):
        (WebCore::RenderThemeGtk::gtkEntry):
            - Implemented theme-aware text field based on gtk/gtkentry.c implementation

2007-09-29  Holger Hans Peter Freyther  <zecke@selfish.org>

        Reviewed by Eric.

        Build fix for Mac Gtk+ and Qt builds. In revision 25798 changing
        XSLTProcessor.cpp was forgotten.

        * xml/XSLTProcessor.cpp: Use PLATFORM(MAC) instead of PLATFORM(DARWIN)

2007-09-29  Adam Roben  <aroben@apple.com>

        Fix <rdar://4965715> Horizontal scrollwheel scrolling moves in opposite direction on Vista

        Reviewed by Sam.

        No regression test possible.

        * platform/win/WheelEventWin.cpp:
        (WebCore::PlatformWheelEvent::PlatformWheelEvent): Use a negative
        delta when scrolling right to match EventHandler's expectations (which
        are based on AppKit).

2007-09-28  Kevin Decker  <kdecker@apple.com>

        Reviewed by Mark Rowe

        Build fix for Mac Gtk+ and Qt builds.
        
        * xml/XSLStyleSheet.cpp: Use PLATFORM(MAC) instead of PLATFORM(DARWIN)
        * xml/XSLTExtensions.cpp: Ditto.

2007-09-28  David Harrison  <harrison@apple.com>

        Reviewed by Darin Adler.

        <rdar://problem/5511128> Crash closing or reloading this SVG

        * dom/ContainerNode.cpp:
        (WebCore::dispatchChildInsertionEvents):
        (WebCore::dispatchChildRemovalEvents):
        Use DocPtr instead of RefPtr, since these events are dispatched
        when the Document is being being torn down by removedLastRef().

        * dom/DocPtr.h:
        (WebCore::DocPtr::DocPtr):
        Fix longstanding typo in template so that the DocPtr(DocPtr) constructor can be used.

        * dom/Document.cpp:
        (WebCore::Document::Document):
        (WebCore::Document::removedLastRef):
        * dom/Document.h:
        (WebCore::Document::selfOnlyRef):
        (WebCore::Document::selfOnlyDeref):
        * platform/Shared.h:
        (WebCore::Shared::Shared):
        (WebCore::Shared::ref):
        (WebCore::Shared::deref):
        (WebCore::Shared::hasOneRef):
        (WebCore::TreeShared::TreeShared):
        (WebCore::TreeShared::ref):
        (WebCore::TreeShared::deref):
        (WebCore::TreeShared::hasOneRef):
        (WebCore::TreeShared::refCount):
        Add debug-only checks for a document being ref-counted while being deleted.

2007-09-27  Kevin McCullough  <kmccullough@apple.com>

        Reviewed by Darin.

        - <rdar://5261371> Nothing downloaded when exporting bookmarks from iGoogle web history

        Function for use by WebKit. Currently used only on Windows.

        * platform/network/ResourceResponse.cpp:
        (WebCore::ResourceResponse::isAttachment):
        * platform/network/ResourceResponse.h:

2007-09-27  Mitz Pettel  <mitz@webkit.org>

        Reviewed by Dave Hyatt.

        - fix http://bugs.webkit.org/show_bug.cgi?id=15262
          REGRESSION: Margin-top:18px is pushing down the multiple select list box outside the div.

        Reflected in existing tests.

        * css/html4.css: Changed listboxes to use border-box sizing, to match Firefox,
        WinIE and apparently also Safari 2.

2007-09-27  Kevin Decker  <kdecker@apple.com>

        <rdar://problem/5493093>
    
        Rubber stamped by John Sullivan.
        
        * WebCore.order: Added.
        * WebCore.xcodeproj/project.pbxproj:  We're changing from using an order file built by another team to using one
         we actually check into our project repository. Linker settings for Symbol Ordering Flags have been updated
         accordingly.
         
2007-09-27  Antti Koivisto  <antti@apple.com>

        Reviewed by Geoff.
        
        Fix for <rdar://problem/5499125>
        REGRESSION (r21367): After launching Kidzui beta, a webview frame fails to appear in its main window
        
        If window object properties were modified when it had initial empty document (synchronously after 
        window.open() for example) those modifications were lost when the real document was switched in.
        
        Match Firefox behavior where window properties are not cleared if the inital document and the loaded one
        have matching security domains.

        Tests: fast/dom/Window/window-early-properties.html
               http/tests/security/window-properties-clear-domain.html
               http/tests/security/window-properties-clear-port.html
               http/tests/security/window-properties-pass.html

        * WebCore.exp:
        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::FrameLoader):
        (WebCore::FrameLoader::init):
        (WebCore::FrameLoader::clear):
        (WebCore::FrameLoader::isSecureTransition):
        (WebCore::FrameLoader::begin):
        * loader/FrameLoader.h:
        If we are transitioning from initial empty document to the final one, do a domain security check
        between old security policy URL and new URL. If that passes don't clear script proxy and script objects.
        
        * bindings/js/kjs_proxy.cpp:
        (WebCore::KJSProxy::updateDocumentWrapper):
        * bindings/js/kjs_proxy.h:
        * page/Frame.cpp:
        (WebCore::Frame::setDocument):
        Since we don't always clear window properties anymore, we need to update the document property to point to
        the newly created one. 
        
2007-09-27  Kevin Decker  <kdecker@apple.com>

        Reviewed by Darin.

        <rdar://problem/5493093>
        
        * WebCore.xcodeproj/project.pbxproj: Removed libxslt from statically linked frameworks.
        * platform/mac/SoftLinking.h: Formatting tweakes, added SOFT_LINK_LIBRARY, and if'def for 
        PLATFORM(DARWIN)
        * xml/XSLStyleSheet.cpp: Soft-linked libxslt.
        * xml/XSLTExtensions.cpp: Removed the call to xsltGenericError, and added a FIXME comment stating
        that it might be helpful to push any errors from xmlXPathNewValueTree up to the Javascript Console. 
        * xml/XSLTProcessor.cpp: Soft-linked libxslt.
        
2007-09-27  Adele Peterson  <adele@apple.com>

        Reviewed by Brady.

        Fix for <rdar://problem/5453350> REGRESSION (r18541, Tiger only): Refreshing a cached https page does not reload CSS and JavaScript resources
        http://bugs.webkit.org/show_bug.cgi?id=15121

        * loader/FrameLoader.cpp: (WebCore::FrameLoader::addExtraFieldsToRequest): Now sets the cache policy to ReloadIgnoringCacheData.  Without setting the cache policy,
        the default policy in this case was ReturnCacheDataElseLoad.  If we're in a situation where the resource is in the cache, we want to make sure to avoid loading from the cache in this case.

2007-09-27  Timothy Hatcher  <timothy@apple.com>

        Reviewed by Darin.

        <rdar://problem/5199546> CrashTracer: [REGRESSION] 8216 crashes in Safari at com.apple.WebCore: WebCore::ResourceHandle::client const + 6

        On Tiger NSURLConnection can sometimes call the connection:willCacheResponse: delegate method on
        a secondary thread instead of the main thread. This was never an issue before, since the implementation 
        of this method was very simple and thread safe.

        The fix is to block during connection:willCacheResponse: and perform the work on the main thread.
        We need to block since this delegate method needs to return a result. If we are already on the
        main thread (which sometimes we are), the method does nothing different. If we are on a secondary
        thread, we make a mutable dictionary to hold all the arguments and later the result object.
        Then performSelectorOnMainThread:withObject: using the _callConnectionWillCacheResponseWithInfo:
        selector. This new method just pulls the arguments out for the dictionary and calls the real
        connection:willCacheResponse: delegate method (this time on the main thread). The result is stored
        in the dictionary, and when performSelectorOnMainThread:withObject: finishes the result is pulled
        out and returned.

        * platform/network/mac/ResourceHandleMac.mm:
        (-[WebCoreResourceHandleAsDelegate _callConnectionWillCacheResponseWithInfo:]):
        (-[WebCoreResourceHandleAsDelegate connection:willCacheResponse:]):

2007-09-27  David Hyatt  <hyatt@apple.com>

        Update to reflect the minimal WebKitSystemInterface changes required
        to support @font-face.

        Reviewed by john

        * platform/mac/FontDataMac.mm:
        (WebCore::FontData::platformInit):
        (WebCore::FontData::platformWidthForGlyph):
        * platform/mac/WebCoreSystemInterface.h:
        * platform/mac/WebCoreSystemInterface.mm:

2007-09-26  Darin Adler  <darin@apple.com>

        - fix Windows build

        * platform/win/ClipboardWin.cpp:
        (WebCore::writeURL): Add a check for empty URL. Remove the check for invalid URL.
        (WebCore::ClipboardWin::setData): Remove the check for invalid URL.
        * plugins/win/PluginViewWin.cpp:
        (WebCore::PluginViewWin::start): Check for empty URL instead of invalid URL.
        (WebCore::PluginViewWin::load): Same here.

2007-09-26  Darin Adler  <darin@apple.com>

        Reviewed by John Sullivan.

        - fix <rdar://problem/5491054> REGRESSION (Mail, plain-text only): Nothing happens
          when you click on rdar://<num>&<num> links (or AOL links in Safari)

        Remove the non-useful concept of a "malformed"/"invalid" URL.

        There are URLs we can parse, and others we can't, but that's not sufficient to
        determine if we should try to work with the URL. It's entirely possible that
        a so-called "malformed" URL will work just fine if it's passed to the right
        software.

        * platform/KURL.h: Removed isMalformed() and isValid().

        * loader/Cache.cpp: (WebCore::Cache::requestResource): Removed unneeded check
        if the URL is valid. But do check for an empty URL just to guarantee we don't
        trip up with a null string. It's possible we can remove this empty URL check
        later, but it's less risky to leave the empty string behavior alone for now.

        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::urlSelected): Removed unneeded check if the URL is valid.
        Back on 2007-07-08, we realized that we needed to allow empty URLs. But we also
        need to allow other URLs here. This is the code path from the Mail case.
        (WebCore::FrameLoader::submitForm): Replaced URL validity check with a check
        for an empty URL (same reasoning as for requestResource above).

        * page/InspectorController.cpp: (WebCore::InspectorResource::type):
        * rendering/RenderObject.cpp: (WebCore::RenderObject::addPDFURLRect):
        Removed unneeded check for an invalid URL. In both of these cases it's definitely
        safe to allow event an empty URL.

2007-09-26  George Staikos  <staikos@kde.org>

        Reviewed by John Sullivan.

        Only highlight the applicable portion of the text run for a search
        highlight.  No way to make a testcase for this presently.

        * rendering/InlineTextBox.cpp:
        (WebCore::InlineTextBox::paintTextMatchMarker):

2007-09-25  David Kilzer  <ddkilzer@webkit.org>

        Reviewed by Adam.

        - Fix http://bugs.webkit.org/show_bug.cgi?id=14885
          LGPL'ed files contain incorrect FSF address

        * LICENSE-LGPL-2:
        * LICENSE-LGPL-2.1:
        * WebCorePrefix.h:
        * bindings/js/JSCanvasRenderingContext2DCustom.cpp:
        * bindings/js/JSDOMWindowCustom.cpp:
        * bindings/js/JSDocumentCustom.cpp:
        * bindings/js/JSHTMLCollectionCustom.cpp:
        * bindings/js/JSHTMLElementWrapperFactory.cpp:
        * bindings/js/JSHTMLElementWrapperFactory.h:
        * bindings/js/JSHTMLInputElementBase.cpp:
        * bindings/js/JSHTMLInputElementBase.h:
        * bindings/js/JSHTMLOptionElementConstructor.cpp:
        * bindings/js/JSHTMLOptionElementConstructor.h:
        * bindings/js/JSHTMLOptionsCollectionCustom.cpp:
        * bindings/js/JSHTMLSelectElementCustom.cpp:
        * bindings/js/JSNodeFilterCondition.cpp:
        * bindings/js/JSNodeFilterCondition.h:
        * bindings/js/JSNodeIteratorCustom.cpp:
        * bindings/js/JSSVGElementWrapperFactory.cpp:
        * bindings/js/JSSVGElementWrapperFactory.h:
        * bindings/js/JSSVGMatrixCustom.cpp:
        * bindings/js/JSSVGPathSegCustom.cpp:
        * bindings/js/JSSVGPathSegListCustom.cpp:
        * bindings/js/JSSVGPointListCustom.cpp:
        * bindings/js/JSTreeWalkerCustom.cpp:
        * bindings/js/JSXMLHttpRequest.cpp:
        * bindings/js/JSXMLHttpRequest.h:
        * bindings/js/kjs_binding.cpp:
        * bindings/js/kjs_binding.h:
        * bindings/js/kjs_css.cpp:
        * bindings/js/kjs_css.h:
        * bindings/js/kjs_dom.cpp:
        * bindings/js/kjs_dom.h:
        * bindings/js/kjs_events.cpp:
        * bindings/js/kjs_events.h:
        * bindings/js/kjs_html.cpp:
        * bindings/js/kjs_html.h:
        * bindings/js/kjs_navigator.cpp:
        * bindings/js/kjs_navigator.h:
        * bindings/js/kjs_proxy.cpp:
        * bindings/js/kjs_proxy.h:
        * bindings/js/kjs_window.cpp:
        * bindings/js/kjs_window.h:
        * bindings/objc/DOMImplementationFront.cpp:
        * bindings/objc/DOMImplementationFront.h:
        * bindings/scripts/CodeGenerator.pm:
        * bindings/scripts/CodeGeneratorJS.pm:
        * bindings/scripts/CodeGeneratorObjC.pm:
        * bindings/scripts/IDLParser.pm:
        * bindings/scripts/IDLStructure.pm:
        * bindings/scripts/generate-bindings.pl:
        * config.h:
        * css/CSSBorderImageValue.cpp:
        * css/CSSBorderImageValue.h:
        * css/CSSCharsetRule.cpp:
        * css/CSSCharsetRule.h:
        * css/CSSCharsetRule.idl:
        * css/CSSComputedStyleDeclaration.cpp:
        * css/CSSComputedStyleDeclaration.h:
        * css/CSSCursorImageValue.cpp:
        * css/CSSCursorImageValue.h:
        * css/CSSFontFaceRule.cpp:
        * css/CSSFontFaceRule.h:
        * css/CSSFontFaceRule.idl:
        * css/CSSGrammar.y:
        * css/CSSHelper.cpp:
        * css/CSSHelper.h:
        * css/CSSImageValue.cpp:
        * css/CSSImageValue.h:
        * css/CSSImportRule.cpp:
        * css/CSSImportRule.h:
        * css/CSSImportRule.idl:
        * css/CSSInheritedValue.cpp:
        * css/CSSInheritedValue.h:
        * css/CSSInitialValue.cpp:
        * css/CSSInitialValue.h:
        * css/CSSMediaRule.cpp:
        * css/CSSMediaRule.h:
        * css/CSSMediaRule.idl:
        * css/CSSMutableStyleDeclaration.cpp:
        * css/CSSMutableStyleDeclaration.h:
        * css/CSSNamespace.h:
        * css/CSSPageRule.cpp:
        * css/CSSPageRule.h:
        * css/CSSPageRule.idl:
        * css/CSSParser.cpp:
        * css/CSSParser.h:
        * css/CSSPrimitiveValue.cpp:
        * css/CSSPrimitiveValue.h:
        * css/CSSPrimitiveValue.idl:
        * css/CSSProperty.cpp:
        * css/CSSProperty.h:
        * css/CSSQuirkPrimitiveValue.h:
        * css/CSSRule.cpp:
        * css/CSSRule.h:
        * css/CSSRule.idl:
        * css/CSSRuleList.cpp:
        * css/CSSRuleList.h:
        * css/CSSSelector.cpp:
        * css/CSSSelector.h:
        * css/CSSStyleDeclaration.cpp:
        * css/CSSStyleDeclaration.h:
        * css/CSSStyleDeclaration.idl:
        * css/CSSStyleRule.cpp:
        * css/CSSStyleRule.h:
        * css/CSSStyleRule.idl:
        * css/CSSStyleSelector.cpp:
        * css/CSSStyleSelector.h:
        * css/CSSStyleSheet.cpp:
        * css/CSSStyleSheet.h:
        * css/CSSStyleSheet.idl:
        * css/CSSUnknownRule.h:
        * css/CSSUnknownRule.idl:
        * css/CSSValue.h:
        * css/CSSValue.idl:
        * css/CSSValueList.cpp:
        * css/CSSValueList.h:
        * css/Counter.h:
        * css/Counter.idl:
        * css/DashboardRegion.h:
        * css/FontFamilyValue.cpp:
        * css/FontFamilyValue.h:
        * css/FontValue.cpp:
        * css/FontValue.h:
        * css/MediaFeatureNames.cpp:
        * css/MediaFeatureNames.h:
        * css/MediaList.cpp:
        * css/MediaList.h:
        * css/Pair.h:
        * css/RGBColor.idl:
        * css/Rect.h:
        * css/Rect.idl:
        * css/ShadowValue.cpp:
        * css/ShadowValue.h:
        * css/StyleBase.cpp:
        * css/StyleBase.h:
        * css/StyleList.cpp:
        * css/StyleList.h:
        * css/StyleSheet.cpp:
        * css/StyleSheet.h:
        * css/StyleSheet.idl:
        * css/StyleSheetList.cpp:
        * css/StyleSheetList.h:
        * css/StyleSheetList.idl:
        * css/html4.css:
        * css/make-css-file-arrays.pl:
        * css/makegrammar.pl:
        * css/makeprop.pl:
        * css/maketokenizer:
        * css/makevalues.pl:
        * css/quirks.css:
        * dom/AtomicStringList.h:
        * dom/Attr.cpp:
        * dom/Attr.h:
        * dom/Attr.idl:
        * dom/Attribute.cpp:
        * dom/Attribute.h:
        * dom/BeforeUnloadEvent.cpp:
        * dom/BeforeUnloadEvent.h:
        * dom/CDATASection.cpp:
        * dom/CDATASection.h:
        * dom/CDATASection.idl:
        * dom/CSSMappedAttributeDeclaration.cpp:
        * dom/CSSMappedAttributeDeclaration.h:
        * dom/CharacterData.cpp:
        * dom/CharacterData.h:
        * dom/CharacterData.idl:
        * dom/ChildNodeList.cpp:
        * dom/ChildNodeList.h:
        * dom/Clipboard.h:
        * dom/ClipboardEvent.cpp:
        * dom/ClipboardEvent.h:
        * dom/Comment.cpp:
        * dom/Comment.h:
        * dom/Comment.idl:
        * dom/ContainerNode.cpp:
        * dom/ContainerNode.h:
        * dom/DOMImplementation.cpp:
        * dom/DOMImplementation.h:
        * dom/DOMImplementation.idl:
        * dom/DocPtr.h:
        * dom/Document.cpp:
        * dom/Document.h:
        * dom/Document.idl:
        * dom/DocumentFragment.cpp:
        * dom/DocumentFragment.h:
        * dom/DocumentFragment.idl:
        * dom/DocumentMarker.h:
        * dom/DocumentType.cpp:
        * dom/DocumentType.h:
        * dom/DocumentType.idl:
        * dom/EditingText.cpp:
        * dom/EditingText.h:
        * dom/Element.cpp:
        * dom/Element.h:
        * dom/Element.idl:
        * dom/Entity.cpp:
        * dom/Entity.h:
        * dom/Entity.idl:
        * dom/EntityReference.cpp:
        * dom/EntityReference.h:
        * dom/EntityReference.idl:
        * dom/Event.cpp:
        * dom/Event.h:
        * dom/Event.idl:
        * dom/EventListener.h:
        * dom/EventListener.idl:
        * dom/EventNames.cpp:
        * dom/EventNames.h:
        * dom/EventTarget.idl:
        * dom/EventTargetNode.cpp:
        * dom/EventTargetNode.h:
        * dom/ExceptionCode.h:
        * dom/KeyboardEvent.cpp:
        * dom/KeyboardEvent.h:
        * dom/KeyboardEvent.idl:
        * dom/MappedAttribute.cpp:
        * dom/MappedAttribute.h:
        * dom/MappedAttributeEntry.h:
        * dom/MouseEvent.cpp:
        * dom/MouseEvent.h:
        * dom/MouseEvent.idl:
        * dom/MouseRelatedEvent.cpp:
        * dom/MouseRelatedEvent.h:
        * dom/MutationEvent.cpp:
        * dom/MutationEvent.h:
        * dom/MutationEvent.idl:
        * dom/NameNodeList.cpp:
        * dom/NameNodeList.h:
        * dom/NamedAttrMap.cpp:
        * dom/NamedAttrMap.h:
        * dom/NamedMappedAttrMap.cpp:
        * dom/NamedMappedAttrMap.h:
        * dom/NamedNodeMap.h:
        * dom/NamedNodeMap.idl:
        * dom/Node.cpp:
        * dom/Node.h:
        * dom/Node.idl:
        * dom/NodeFilter.cpp:
        * dom/NodeFilter.h:
        * dom/NodeFilter.idl:
        * dom/NodeFilterCondition.cpp:
        * dom/NodeFilterCondition.h:
        * dom/NodeIterator.cpp:
        * dom/NodeIterator.h:
        * dom/NodeIterator.idl:
        * dom/NodeList.cpp:
        * dom/NodeList.h:
        * dom/NodeList.idl:
        * dom/Notation.cpp:
        * dom/Notation.h:
        * dom/Notation.idl:
        * dom/ProcessingInstruction.cpp:
        * dom/ProcessingInstruction.h:
        * dom/ProcessingInstruction.idl:
        * dom/QualifiedName.cpp:
        * dom/QualifiedName.h:
        * dom/Range.cpp:
        * dom/Range.h:
        * dom/Range.idl:
        * dom/RangeException.h:
        * dom/RangeException.idl:
        * dom/RegisteredEventListener.cpp:
        * dom/RegisteredEventListener.h:
        * dom/StyleElement.cpp:
        * dom/StyleElement.h:
        * dom/StyledElement.cpp:
        * dom/StyledElement.h:
        * dom/Text.cpp:
        * dom/Text.h:
        * dom/Text.idl:
        * dom/Tokenizer.h:
        * dom/Traversal.cpp:
        * dom/Traversal.h:
        * dom/TreeWalker.cpp:
        * dom/TreeWalker.h:
        * dom/TreeWalker.idl:
        * dom/UIEvent.cpp:
        * dom/UIEvent.h:
        * dom/UIEvent.idl:
        * dom/UIEventWithKeyState.cpp:
        * dom/UIEventWithKeyState.h:
        * dom/WheelEvent.cpp:
        * dom/WheelEvent.h:
        * dom/WheelEvent.idl:
        * dom/XMLTokenizer.cpp:
        * dom/XMLTokenizer.h:
        * html/FormDataList.cpp:
        * html/FormDataList.h:
        * html/HTMLAnchorElement.cpp:
        * html/HTMLAnchorElement.h:
        * html/HTMLAnchorElement.idl:
        * html/HTMLAppletElement.cpp:
        * html/HTMLAppletElement.h:
        * html/HTMLAppletElement.idl:
        * html/HTMLAreaElement.cpp:
        * html/HTMLAreaElement.h:
        * html/HTMLAreaElement.idl:
        * html/HTMLBRElement.cpp:
        * html/HTMLBRElement.h:
        * html/HTMLBRElement.idl:
        * html/HTMLBaseElement.cpp:
        * html/HTMLBaseElement.h:
        * html/HTMLBaseElement.idl:
        * html/HTMLBaseFontElement.cpp:
        * html/HTMLBaseFontElement.h:
        * html/HTMLBaseFontElement.idl:
        * html/HTMLBlockquoteElement.cpp:
        * html/HTMLBlockquoteElement.h:
        * html/HTMLBlockquoteElement.idl:
        * html/HTMLBodyElement.cpp:
        * html/HTMLBodyElement.h:
        * html/HTMLBodyElement.idl:
        * html/HTMLButtonElement.cpp:
        * html/HTMLButtonElement.h:
        * html/HTMLButtonElement.idl:
        * html/HTMLCollection.cpp:
        * html/HTMLCollection.h:
        * html/HTMLCollection.idl:
        * html/HTMLDListElement.cpp:
        * html/HTMLDListElement.h:
        * html/HTMLDListElement.idl:
        * html/HTMLDirectoryElement.cpp:
        * html/HTMLDirectoryElement.h:
        * html/HTMLDirectoryElement.idl:
        * html/HTMLDivElement.cpp:
        * html/HTMLDivElement.h:
        * html/HTMLDivElement.idl:
        * html/HTMLDocument.cpp:
        * html/HTMLDocument.h:
        * html/HTMLDocument.idl:
        * html/HTMLElement.cpp:
        * html/HTMLElement.h:
        * html/HTMLElement.idl:
        * html/HTMLElementFactory.cpp:
        * html/HTMLElementFactory.h:
        * html/HTMLEmbedElement.cpp:
        * html/HTMLEmbedElement.h:
        * html/HTMLEmbedElement.idl:
        * html/HTMLEntityNames.gperf:
        * html/HTMLFieldSetElement.cpp:
        * html/HTMLFieldSetElement.h:
        * html/HTMLFieldSetElement.idl:
        * html/HTMLFontElement.cpp:
        * html/HTMLFontElement.h:
        * html/HTMLFontElement.idl:
        * html/HTMLFormCollection.cpp:
        * html/HTMLFormCollection.h:
        * html/HTMLFormElement.cpp:
        * html/HTMLFormElement.h:
        * html/HTMLFormElement.idl:
        * html/HTMLFrameElement.cpp:
        * html/HTMLFrameElement.h:
        * html/HTMLFrameElement.idl:
        * html/HTMLFrameElementBase.cpp:
        * html/HTMLFrameElementBase.h:
        * html/HTMLFrameOwnerElement.cpp:
        * html/HTMLFrameOwnerElement.h:
        * html/HTMLFrameSetElement.cpp:
        * html/HTMLFrameSetElement.h:
        * html/HTMLFrameSetElement.idl:
        * html/HTMLGenericFormElement.cpp:
        * html/HTMLGenericFormElement.h:
        * html/HTMLHRElement.cpp:
        * html/HTMLHRElement.h:
        * html/HTMLHRElement.idl:
        * html/HTMLHeadElement.cpp:
        * html/HTMLHeadElement.h:
        * html/HTMLHeadElement.idl:
        * html/HTMLHeadingElement.cpp:
        * html/HTMLHeadingElement.h:
        * html/HTMLHeadingElement.idl:
        * html/HTMLHtmlElement.cpp:
        * html/HTMLHtmlElement.h:
        * html/HTMLHtmlElement.idl:
        * html/HTMLIFrameElement.cpp:
        * html/HTMLIFrameElement.h:
        * html/HTMLIFrameElement.idl:
        * html/HTMLImageElement.cpp:
        * html/HTMLImageElement.h:
        * html/HTMLImageElement.idl:
        * html/HTMLImageLoader.cpp:
        * html/HTMLImageLoader.h:
        * html/HTMLInputElement.cpp:
        * html/HTMLInputElement.h:
        * html/HTMLInputElement.idl:
        * html/HTMLIsIndexElement.cpp:
        * html/HTMLIsIndexElement.h:
        * html/HTMLIsIndexElement.idl:
        * html/HTMLKeygenElement.cpp:
        * html/HTMLKeygenElement.h:
        * html/HTMLLIElement.cpp:
        * html/HTMLLIElement.h:
        * html/HTMLLIElement.idl:
        * html/HTMLLabelElement.cpp:
        * html/HTMLLabelElement.h:
        * html/HTMLLabelElement.idl:
        * html/HTMLLegendElement.cpp:
        * html/HTMLLegendElement.h:
        * html/HTMLLegendElement.idl:
        * html/HTMLLinkElement.cpp:
        * html/HTMLLinkElement.h:
        * html/HTMLLinkElement.idl:
        * html/HTMLMapElement.cpp:
        * html/HTMLMapElement.h:
        * html/HTMLMapElement.idl:
        * html/HTMLMarqueeElement.cpp:
        * html/HTMLMarqueeElement.h:
        * html/HTMLMarqueeElement.idl:
        * html/HTMLMenuElement.cpp:
        * html/HTMLMenuElement.h:
        * html/HTMLMenuElement.idl:
        * html/HTMLMetaElement.cpp:
        * html/HTMLMetaElement.h:
        * html/HTMLMetaElement.idl:
        * html/HTMLModElement.cpp:
        * html/HTMLModElement.h:
        * html/HTMLModElement.idl:
        * html/HTMLNameCollection.cpp:
        * html/HTMLNameCollection.h:
        * html/HTMLOListElement.cpp:
        * html/HTMLOListElement.h:
        * html/HTMLOListElement.idl:
        * html/HTMLObjectElement.cpp:
        * html/HTMLObjectElement.h:
        * html/HTMLObjectElement.idl:
        * html/HTMLOptGroupElement.cpp:
        * html/HTMLOptGroupElement.h:
        * html/HTMLOptGroupElement.idl:
        * html/HTMLOptionElement.cpp:
        * html/HTMLOptionElement.h:
        * html/HTMLOptionElement.idl:
        * html/HTMLOptionsCollection.cpp:
        * html/HTMLOptionsCollection.h:
        * html/HTMLOptionsCollection.idl:
        * html/HTMLParagraphElement.cpp:
        * html/HTMLParagraphElement.h:
        * html/HTMLParagraphElement.idl:
        * html/HTMLParamElement.cpp:
        * html/HTMLParamElement.h:
        * html/HTMLParamElement.idl:
        * html/HTMLParser.cpp:
        * html/HTMLParser.h:
        * html/HTMLPlugInElement.cpp:
        * html/HTMLPlugInElement.h:
        * html/HTMLPreElement.cpp:
        * html/HTMLPreElement.h:
        * html/HTMLPreElement.idl:
        * html/HTMLQuoteElement.cpp:
        * html/HTMLQuoteElement.h:
        * html/HTMLQuoteElement.idl:
        * html/HTMLScriptElement.cpp:
        * html/HTMLScriptElement.h:
        * html/HTMLScriptElement.idl:
        * html/HTMLSelectElement.cpp:
        * html/HTMLSelectElement.h:
        * html/HTMLSelectElement.idl:
        * html/HTMLStyleElement.cpp:
        * html/HTMLStyleElement.h:
        * html/HTMLStyleElement.idl:
        * html/HTMLTableCaptionElement.cpp:
        * html/HTMLTableCaptionElement.h:
        * html/HTMLTableCaptionElement.idl:
        * html/HTMLTableCellElement.cpp:
        * html/HTMLTableCellElement.h:
        * html/HTMLTableCellElement.idl:
        * html/HTMLTableColElement.cpp:
        * html/HTMLTableColElement.h:
        * html/HTMLTableColElement.idl:
        * html/HTMLTableElement.cpp:
        * html/HTMLTableElement.h:
        * html/HTMLTableElement.idl:
        * html/HTMLTablePartElement.cpp:
        * html/HTMLTablePartElement.h:
        * html/HTMLTableRowElement.cpp:
        * html/HTMLTableRowElement.h:
        * html/HTMLTableRowElement.idl:
        * html/HTMLTableSectionElement.cpp:
        * html/HTMLTableSectionElement.h:
        * html/HTMLTableSectionElement.idl:
        * html/HTMLTextAreaElement.cpp:
        * html/HTMLTextAreaElement.h:
        * html/HTMLTextAreaElement.idl:
        * html/HTMLTitleElement.cpp:
        * html/HTMLTitleElement.h:
        * html/HTMLTitleElement.idl:
        * html/HTMLTokenizer.cpp:
        * html/HTMLTokenizer.h:
        * html/HTMLUListElement.cpp:
        * html/HTMLUListElement.h:
        * html/HTMLUListElement.idl:
        * ksvg2/css/SVGCSSParser.cpp:
        * ksvg2/css/SVGCSSStyleSelector.cpp:
        * ksvg2/css/SVGRenderStyle.cpp:
        * ksvg2/css/SVGRenderStyle.h:
        * ksvg2/css/SVGRenderStyleDefs.cpp:
        * ksvg2/css/SVGRenderStyleDefs.h:
        * ksvg2/events/JSSVGLazyEventListener.cpp:
        * ksvg2/events/JSSVGLazyEventListener.h:
        * ksvg2/events/SVGZoomEvent.cpp:
        * ksvg2/events/SVGZoomEvent.h:
        * ksvg2/misc/KCanvasRenderingStyle.cpp:
        * ksvg2/misc/KCanvasRenderingStyle.h:
        * ksvg2/misc/PointerEventsHitRules.cpp:
        * ksvg2/misc/PointerEventsHitRules.h:
        * ksvg2/misc/SVGDocumentExtensions.cpp:
        * ksvg2/misc/SVGDocumentExtensions.h:
        * ksvg2/misc/SVGImageLoader.cpp:
        * ksvg2/misc/SVGImageLoader.h:
        * ksvg2/misc/SVGTimer.cpp:
        * ksvg2/misc/SVGTimer.h:
        * ksvg2/misc/TimeScheduler.cpp:
        * ksvg2/misc/TimeScheduler.h:
        * ksvg2/scripts/cssmakeprops:
        * ksvg2/scripts/cssmakevalues:
        * ksvg2/svg/ColorDistance.cpp:
        * ksvg2/svg/ColorDistance.h:
        * ksvg2/svg/GradientAttributes.h:
        * ksvg2/svg/LinearGradientAttributes.h:
        * ksvg2/svg/PatternAttributes.h:
        * ksvg2/svg/RadialGradientAttributes.h:
        * ksvg2/svg/SVGAElement.cpp:
        * ksvg2/svg/SVGAElement.h:
        * ksvg2/svg/SVGAngle.cpp:
        * ksvg2/svg/SVGAngle.h:
        * ksvg2/svg/SVGAngle.idl:
        * ksvg2/svg/SVGAnimateColorElement.cpp:
        * ksvg2/svg/SVGAnimateColorElement.h:
        * ksvg2/svg/SVGAnimateElement.cpp:
        * ksvg2/svg/SVGAnimateElement.h:
        * ksvg2/svg/SVGAnimateMotionElement.cpp:
        * ksvg2/svg/SVGAnimateMotionElement.h:
        * ksvg2/svg/SVGAnimateTransformElement.cpp:
        * ksvg2/svg/SVGAnimateTransformElement.h:
        * ksvg2/svg/SVGAnimatedPathData.cpp:
        * ksvg2/svg/SVGAnimatedPathData.h:
        * ksvg2/svg/SVGAnimatedPoints.cpp:
        * ksvg2/svg/SVGAnimatedPoints.h:
        * ksvg2/svg/SVGAnimatedTemplate.h:
        * ksvg2/svg/SVGAnimationElement.cpp:
        * ksvg2/svg/SVGAnimationElement.h:
        * ksvg2/svg/SVGCircleElement.cpp:
        * ksvg2/svg/SVGCircleElement.h:
        * ksvg2/svg/SVGClipPathElement.cpp:
        * ksvg2/svg/SVGClipPathElement.h:
        * ksvg2/svg/SVGColor.cpp:
        * ksvg2/svg/SVGColor.h:
        * ksvg2/svg/SVGColor.idl:
        * ksvg2/svg/SVGComponentTransferFunctionElement.cpp:
        * ksvg2/svg/SVGComponentTransferFunctionElement.h:
        * ksvg2/svg/SVGCursorElement.cpp:
        * ksvg2/svg/SVGCursorElement.h:
        * ksvg2/svg/SVGDefsElement.cpp:
        * ksvg2/svg/SVGDefsElement.h:
        * ksvg2/svg/SVGDescElement.cpp:
        * ksvg2/svg/SVGDescElement.h:
        * ksvg2/svg/SVGDocument.cpp:
        * ksvg2/svg/SVGDocument.h:
        * ksvg2/svg/SVGDocument.idl:
        * ksvg2/svg/SVGElement.cpp:
        * ksvg2/svg/SVGElement.h:
        * ksvg2/svg/SVGElement.idl:
        * ksvg2/svg/SVGElementInstance.cpp:
        * ksvg2/svg/SVGElementInstance.h:
        * ksvg2/svg/SVGElementInstanceList.cpp:
        * ksvg2/svg/SVGElementInstanceList.h:
        * ksvg2/svg/SVGEllipseElement.cpp:
        * ksvg2/svg/SVGEllipseElement.h:
        * ksvg2/svg/SVGException.h:
        * ksvg2/svg/SVGExternalResourcesRequired.cpp:
        * ksvg2/svg/SVGExternalResourcesRequired.h:
        * ksvg2/svg/SVGFEBlendElement.cpp:
        * ksvg2/svg/SVGFEBlendElement.h:
        * ksvg2/svg/SVGFEColorMatrixElement.cpp:
        * ksvg2/svg/SVGFEColorMatrixElement.h:
        * ksvg2/svg/SVGFEComponentTransferElement.cpp:
        * ksvg2/svg/SVGFEComponentTransferElement.h:
        * ksvg2/svg/SVGFECompositeElement.cpp:
        * ksvg2/svg/SVGFECompositeElement.h:
        * ksvg2/svg/SVGFEDiffuseLightingElement.cpp:
        * ksvg2/svg/SVGFEDiffuseLightingElement.h:
        * ksvg2/svg/SVGFEDisplacementMapElement.cpp:
        * ksvg2/svg/SVGFEDisplacementMapElement.h:
        * ksvg2/svg/SVGFEDistantLightElement.cpp:
        * ksvg2/svg/SVGFEDistantLightElement.h:
        * ksvg2/svg/SVGFEFloodElement.cpp:
        * ksvg2/svg/SVGFEFloodElement.h:
        * ksvg2/svg/SVGFEFuncAElement.cpp:
        * ksvg2/svg/SVGFEFuncAElement.h:
        * ksvg2/svg/SVGFEFuncBElement.cpp:
        * ksvg2/svg/SVGFEFuncBElement.h:
        * ksvg2/svg/SVGFEFuncGElement.cpp:
        * ksvg2/svg/SVGFEFuncGElement.h:
        * ksvg2/svg/SVGFEFuncRElement.cpp:
        * ksvg2/svg/SVGFEFuncRElement.h:
        * ksvg2/svg/SVGFEGaussianBlurElement.cpp:
        * ksvg2/svg/SVGFEGaussianBlurElement.h:
        * ksvg2/svg/SVGFEImageElement.cpp:
        * ksvg2/svg/SVGFEImageElement.h:
        * ksvg2/svg/SVGFELightElement.cpp:
        * ksvg2/svg/SVGFELightElement.h:
        * ksvg2/svg/SVGFEMergeElement.cpp:
        * ksvg2/svg/SVGFEMergeElement.h:
        * ksvg2/svg/SVGFEMergeNodeElement.cpp:
        * ksvg2/svg/SVGFEMergeNodeElement.h:
        * ksvg2/svg/SVGFEOffsetElement.cpp:
        * ksvg2/svg/SVGFEOffsetElement.h:
        * ksvg2/svg/SVGFEPointLightElement.cpp:
        * ksvg2/svg/SVGFEPointLightElement.h:
        * ksvg2/svg/SVGFESpecularLightingElement.cpp:
        * ksvg2/svg/SVGFESpecularLightingElement.h:
        * ksvg2/svg/SVGFESpotLightElement.cpp:
        * ksvg2/svg/SVGFESpotLightElement.h:
        * ksvg2/svg/SVGFETileElement.cpp:
        * ksvg2/svg/SVGFETileElement.h:
        * ksvg2/svg/SVGFETurbulenceElement.cpp:
        * ksvg2/svg/SVGFETurbulenceElement.h:
        * ksvg2/svg/SVGFilterElement.cpp:
        * ksvg2/svg/SVGFilterElement.h:
        * ksvg2/svg/SVGFilterPrimitiveStandardAttributes.cpp:
        * ksvg2/svg/SVGFilterPrimitiveStandardAttributes.h:
        * ksvg2/svg/SVGFitToViewBox.cpp:
        * ksvg2/svg/SVGFitToViewBox.h:
        * ksvg2/svg/SVGForeignObjectElement.cpp:
        * ksvg2/svg/SVGForeignObjectElement.h:
        * ksvg2/svg/SVGGElement.cpp:
        * ksvg2/svg/SVGGElement.h:
        * ksvg2/svg/SVGGradientElement.cpp:
        * ksvg2/svg/SVGGradientElement.h:
        * ksvg2/svg/SVGImageElement.cpp:
        * ksvg2/svg/SVGImageElement.h:
        * ksvg2/svg/SVGLangSpace.cpp:
        * ksvg2/svg/SVGLangSpace.h:
        * ksvg2/svg/SVGLength.cpp:
        * ksvg2/svg/SVGLength.h:
        * ksvg2/svg/SVGLength.idl:
        * ksvg2/svg/SVGLengthList.cpp:
        * ksvg2/svg/SVGLengthList.h:
        * ksvg2/svg/SVGLineElement.cpp:
        * ksvg2/svg/SVGLineElement.h:
        * ksvg2/svg/SVGLinearGradientElement.cpp:
        * ksvg2/svg/SVGLinearGradientElement.h:
        * ksvg2/svg/SVGList.h:
        * ksvg2/svg/SVGListTraits.h:
        * ksvg2/svg/SVGLocatable.cpp:
        * ksvg2/svg/SVGLocatable.h:
        * ksvg2/svg/SVGMPathElement.cpp:
        * ksvg2/svg/SVGMPathElement.h:
        * ksvg2/svg/SVGMarkerElement.cpp:
        * ksvg2/svg/SVGMarkerElement.h:
        * ksvg2/svg/SVGMaskElement.cpp:
        * ksvg2/svg/SVGMaskElement.h:
        * ksvg2/svg/SVGMatrix.idl:
        * ksvg2/svg/SVGMetadataElement.cpp:
        * ksvg2/svg/SVGMetadataElement.h:
        * ksvg2/svg/SVGMetadataElement.idl:
        * ksvg2/svg/SVGNumber.idl:
        * ksvg2/svg/SVGNumberList.cpp:
        * ksvg2/svg/SVGNumberList.h:
        * ksvg2/svg/SVGPaint.cpp:
        * ksvg2/svg/SVGPaint.h:
        * ksvg2/svg/SVGParserUtilities.cpp:
        * ksvg2/svg/SVGParserUtilities.h:
        * ksvg2/svg/SVGPathElement.cpp:
        * ksvg2/svg/SVGPathElement.h:
        * ksvg2/svg/SVGPathSeg.h:
        * ksvg2/svg/SVGPathSegArc.cpp:
        * ksvg2/svg/SVGPathSegArc.h:
        * ksvg2/svg/SVGPathSegClosePath.cpp:
        * ksvg2/svg/SVGPathSegClosePath.h:
        * ksvg2/svg/SVGPathSegCurvetoCubic.cpp:
        * ksvg2/svg/SVGPathSegCurvetoCubic.h:
        * ksvg2/svg/SVGPathSegCurvetoCubicSmooth.cpp:
        * ksvg2/svg/SVGPathSegCurvetoCubicSmooth.h:
        * ksvg2/svg/SVGPathSegCurvetoQuadratic.cpp:
        * ksvg2/svg/SVGPathSegCurvetoQuadratic.h:
        * ksvg2/svg/SVGPathSegCurvetoQuadraticSmooth.cpp:
        * ksvg2/svg/SVGPathSegCurvetoQuadraticSmooth.h:
        * ksvg2/svg/SVGPathSegLineto.cpp:
        * ksvg2/svg/SVGPathSegLineto.h:
        * ksvg2/svg/SVGPathSegLinetoHorizontal.cpp:
        * ksvg2/svg/SVGPathSegLinetoHorizontal.h:
        * ksvg2/svg/SVGPathSegLinetoVertical.cpp:
        * ksvg2/svg/SVGPathSegLinetoVertical.h:
        * ksvg2/svg/SVGPathSegList.cpp:
        * ksvg2/svg/SVGPathSegList.h:
        * ksvg2/svg/SVGPathSegMoveto.cpp:
        * ksvg2/svg/SVGPathSegMoveto.h:
        * ksvg2/svg/SVGPatternElement.cpp:
        * ksvg2/svg/SVGPatternElement.h:
        * ksvg2/svg/SVGPoint.idl:
        * ksvg2/svg/SVGPointList.cpp:
        * ksvg2/svg/SVGPointList.h:
        * ksvg2/svg/SVGPolyElement.cpp:
        * ksvg2/svg/SVGPolyElement.h:
        * ksvg2/svg/SVGPolygonElement.cpp:
        * ksvg2/svg/SVGPolygonElement.h:
        * ksvg2/svg/SVGPolylineElement.cpp:
        * ksvg2/svg/SVGPolylineElement.h:
        * ksvg2/svg/SVGPreserveAspectRatio.cpp:
        * ksvg2/svg/SVGPreserveAspectRatio.h:
        * ksvg2/svg/SVGRadialGradientElement.cpp:
        * ksvg2/svg/SVGRadialGradientElement.h:
        * ksvg2/svg/SVGRect.idl:
        * ksvg2/svg/SVGRectElement.cpp:
        * ksvg2/svg/SVGRectElement.h:
        * ksvg2/svg/SVGRenderingIntent.h:
        * ksvg2/svg/SVGSVGElement.cpp:
        * ksvg2/svg/SVGSVGElement.h:
        * ksvg2/svg/SVGSVGElement.idl:
        * ksvg2/svg/SVGScriptElement.cpp:
        * ksvg2/svg/SVGScriptElement.h:
        * ksvg2/svg/SVGSetElement.cpp:
        * ksvg2/svg/SVGSetElement.h:
        * ksvg2/svg/SVGStopElement.cpp:
        * ksvg2/svg/SVGStopElement.h:
        * ksvg2/svg/SVGStringList.cpp:
        * ksvg2/svg/SVGStringList.h:
        * ksvg2/svg/SVGStylable.cpp:
        * ksvg2/svg/SVGStylable.h:
        * ksvg2/svg/SVGStyleElement.cpp:
        * ksvg2/svg/SVGStyleElement.h:
        * ksvg2/svg/SVGStyledElement.cpp:
        * ksvg2/svg/SVGStyledElement.h:
        * ksvg2/svg/SVGStyledLocatableElement.cpp:
        * ksvg2/svg/SVGStyledLocatableElement.h:
        * ksvg2/svg/SVGStyledTransformableElement.cpp:
        * ksvg2/svg/SVGStyledTransformableElement.h:
        * ksvg2/svg/SVGSwitchElement.cpp:
        * ksvg2/svg/SVGSwitchElement.h:
        * ksvg2/svg/SVGSymbolElement.cpp:
        * ksvg2/svg/SVGSymbolElement.h:
        * ksvg2/svg/SVGTRefElement.cpp:
        * ksvg2/svg/SVGTRefElement.h:
        * ksvg2/svg/SVGTSpanElement.cpp:
        * ksvg2/svg/SVGTSpanElement.h:
        * ksvg2/svg/SVGTests.cpp:
        * ksvg2/svg/SVGTests.h:
        * ksvg2/svg/SVGTextContentElement.cpp:
        * ksvg2/svg/SVGTextContentElement.h:
        * ksvg2/svg/SVGTextElement.cpp:
        * ksvg2/svg/SVGTextElement.h:
        * ksvg2/svg/SVGTextPositioningElement.cpp:
        * ksvg2/svg/SVGTextPositioningElement.h:
        * ksvg2/svg/SVGTitleElement.cpp:
        * ksvg2/svg/SVGTitleElement.h:
        * ksvg2/svg/SVGTransform.cpp:
        * ksvg2/svg/SVGTransform.h:
        * ksvg2/svg/SVGTransform.idl:
        * ksvg2/svg/SVGTransformDistance.cpp:
        * ksvg2/svg/SVGTransformDistance.h:
        * ksvg2/svg/SVGTransformList.cpp:
        * ksvg2/svg/SVGTransformList.h:
        * ksvg2/svg/SVGTransformable.cpp:
        * ksvg2/svg/SVGTransformable.h:
        * ksvg2/svg/SVGURIReference.cpp:
        * ksvg2/svg/SVGURIReference.h:
        * ksvg2/svg/SVGUnitTypes.h:
        * ksvg2/svg/SVGUseElement.cpp:
        * ksvg2/svg/SVGUseElement.h:
        * ksvg2/svg/SVGViewElement.cpp:
        * ksvg2/svg/SVGViewElement.h:
        * ksvg2/svg/SVGZoomAndPan.cpp:
        * ksvg2/svg/SVGZoomAndPan.h:
        * loader/Cache.cpp:
        * loader/Cache.h:
        * loader/CachedCSSStyleSheet.cpp:
        * loader/CachedCSSStyleSheet.h:
        * loader/CachedImage.cpp:
        * loader/CachedImage.h:
        * loader/CachedResource.cpp:
        * loader/CachedResource.h:
        * loader/CachedResourceClient.h:
        * loader/CachedResourceClientWalker.cpp:
        * loader/CachedResourceClientWalker.h:
        * loader/CachedScript.cpp:
        * loader/CachedScript.h:
        * loader/CachedXBLDocument.cpp:
        * loader/CachedXBLDocument.h:
        * loader/CachedXSLStyleSheet.cpp:
        * loader/CachedXSLStyleSheet.h:
        * loader/DocLoader.cpp:
        * loader/DocLoader.h:
        * loader/FTPDirectoryParser.cpp:
        * loader/FTPDirectoryParser.h:
        * loader/Request.cpp:
        * loader/Request.h:
        * loader/TextResourceDecoder.cpp:
        * loader/TextResourceDecoder.h:
        * loader/loader.cpp:
        * loader/loader.h:
        * page/Chrome.cpp:
        * page/Chrome.h:
        * page/ChromeClient.h:
        * page/Frame.cpp:
        * page/Frame.h:
        * page/FramePrivate.h:
        * page/FrameTree.cpp:
        * page/FrameTree.h:
        * page/FrameView.cpp:
        * page/FrameView.h:
        * page/MouseEventWithHitTestResults.cpp:
        * page/MouseEventWithHitTestResults.h:
        * page/Page.cpp:
        * page/Page.h:
        * page/Plugin.h:
        * page/mac/ChromeMac.mm:
        * platform/Arena.cpp:
        * platform/Arena.h:
        * platform/AtomicString.cpp:
        * platform/AtomicString.h:
        * platform/AtomicStringImpl.h:
        * platform/BidiContext.cpp:
        * platform/BidiContext.h:
        * platform/BidiResolver.h:
        * platform/Font.cpp:
        * platform/Font.h:
        * platform/FontData.h:
        * platform/FontDescription.h:
        * platform/FontFallbackList.h:
        * platform/PlatformString.h:
        * platform/PopupMenu.h:
        * platform/PopupMenuClient.h:
        * platform/SearchPopupMenu.h:
        * platform/SegmentedString.cpp:
        * platform/SegmentedString.h:
        * platform/Shared.h:
        * platform/StaticConstructors.h:
        * platform/String.cpp:
        * platform/StringHash.h:
        * platform/StringImpl.cpp:
        * platform/StringImpl.h:
        * platform/TextBreakIterator.h:
        * platform/TextBreakIteratorICU.cpp:
        * platform/TextBreakIteratorInternalICU.h:
        * platform/TextStyle.h:
        * platform/UnicodeRange.cpp:
        * platform/UnicodeRange.h:
        * platform/cf/StringCF.cpp:
        * platform/cf/StringImplCF.cpp:
        * platform/graphics/FloatPoint3D.cpp:
        * platform/graphics/FloatPoint3D.h:
        * platform/graphics/Icon.h:
        * platform/graphics/IntSizeHash.h:
        * platform/graphics/PathTraversalState.cpp:
        * platform/graphics/cairo/CairoPath.h:
        * platform/graphics/cairo/PathCairo.cpp:
        * platform/graphics/mac/IconMac.mm:
        * platform/graphics/qt/IconQt.cpp:
        * platform/graphics/svg/SVGResourceFilter.cpp:
        * platform/graphics/svg/SVGResourceFilter.h:
        * platform/graphics/svg/cg/SVGPaintServerCg.cpp:
        * platform/graphics/svg/cg/SVGPaintServerGradientCg.cpp:
        * platform/graphics/svg/cg/SVGPaintServerPatternCg.cpp:
        * platform/graphics/svg/cg/SVGPaintServerSolidCg.cpp:
        * platform/graphics/svg/filters/SVGDistantLightSource.h:
        * platform/graphics/svg/filters/SVGFEBlend.cpp:
        * platform/graphics/svg/filters/SVGFEBlend.h:
        * platform/graphics/svg/filters/SVGFEColorMatrix.cpp:
        * platform/graphics/svg/filters/SVGFEColorMatrix.h:
        * platform/graphics/svg/filters/SVGFEComponentTransfer.cpp:
        * platform/graphics/svg/filters/SVGFEComponentTransfer.h:
        * platform/graphics/svg/filters/SVGFEComposite.cpp:
        * platform/graphics/svg/filters/SVGFEComposite.h:
        * platform/graphics/svg/filters/SVGFEConvolveMatrix.cpp:
        * platform/graphics/svg/filters/SVGFEConvolveMatrix.h:
        * platform/graphics/svg/filters/SVGFEDiffuseLighting.cpp:
        * platform/graphics/svg/filters/SVGFEDiffuseLighting.h:
        * platform/graphics/svg/filters/SVGFEDisplacementMap.cpp:
        * platform/graphics/svg/filters/SVGFEDisplacementMap.h:
        * platform/graphics/svg/filters/SVGFEFlood.cpp:
        * platform/graphics/svg/filters/SVGFEFlood.h:
        * platform/graphics/svg/filters/SVGFEGaussianBlur.cpp:
        * platform/graphics/svg/filters/SVGFEGaussianBlur.h:
        * platform/graphics/svg/filters/SVGFEImage.cpp:
        * platform/graphics/svg/filters/SVGFEImage.h:
        * platform/graphics/svg/filters/SVGFEMerge.cpp:
        * platform/graphics/svg/filters/SVGFEMerge.h:
        * platform/graphics/svg/filters/SVGFEMorphology.cpp:
        * platform/graphics/svg/filters/SVGFEMorphology.h:
        * platform/graphics/svg/filters/SVGFEOffset.cpp:
        * platform/graphics/svg/filters/SVGFEOffset.h:
        * platform/graphics/svg/filters/SVGFESpecularLighting.cpp:
        * platform/graphics/svg/filters/SVGFESpecularLighting.h:
        * platform/graphics/svg/filters/SVGFETile.h:
        * platform/graphics/svg/filters/SVGFETurbulence.cpp:
        * platform/graphics/svg/filters/SVGFETurbulence.h:
        * platform/graphics/svg/filters/SVGFilterEffect.cpp:
        * platform/graphics/svg/filters/SVGFilterEffect.h:
        * platform/graphics/svg/filters/SVGLightSource.cpp:
        * platform/graphics/svg/filters/SVGLightSource.h:
        * platform/graphics/svg/filters/SVGPointLightSource.h:
        * platform/graphics/svg/filters/SVGSpotLightSource.h:
        * platform/graphics/svg/filters/cg/SVGFEBlendCg.mm:
        * platform/graphics/svg/filters/cg/SVGFEColorMatrixCg.mm:
        * platform/graphics/svg/filters/cg/SVGFEComponentTransferCg.mm:
        * platform/graphics/svg/filters/cg/SVGFECompositeCg.mm:
        * platform/graphics/svg/filters/cg/SVGFEDiffuseLightingCg.mm:
        * platform/graphics/svg/filters/cg/SVGFEDisplacementMapCg.mm:
        * platform/graphics/svg/filters/cg/SVGFEFloodCg.mm:
        * platform/graphics/svg/filters/cg/SVGFEGaussianBlurCg.mm:
        * platform/graphics/svg/filters/cg/SVGFEHelpersCg.h:
        * platform/graphics/svg/filters/cg/SVGFEHelpersCg.mm:
        * platform/graphics/svg/filters/cg/SVGFEImageCg.mm:
        * platform/graphics/svg/filters/cg/SVGFEMergeCg.mm:
        * platform/graphics/svg/filters/cg/SVGFEOffsetCg.mm:
        * platform/graphics/svg/filters/cg/SVGFESpecularLightingCg.mm:
        * platform/graphics/svg/filters/cg/SVGFETileCg.mm:
        * platform/graphics/svg/filters/cg/SVGFilterEffectCg.mm:
        * platform/graphics/svg/qt/RenderPathQt.cpp:
        * platform/graphics/svg/qt/SVGPaintServerGradientQt.cpp:
        * platform/graphics/svg/qt/SVGPaintServerLinearGradientQt.cpp:
        * platform/graphics/svg/qt/SVGPaintServerPatternQt.cpp:
        * platform/graphics/svg/qt/SVGPaintServerQt.cpp:
        * platform/graphics/svg/qt/SVGPaintServerRadialGradientQt.cpp:
        * platform/graphics/svg/qt/SVGPaintServerSolidQt.cpp:
        * platform/graphics/svg/qt/SVGResourceClipperQt.cpp:
        * platform/graphics/svg/qt/SVGResourceFilterQt.cpp:
        * platform/graphics/svg/qt/SVGResourceMaskerQt.cpp:
        * platform/graphics/win/IconWin.cpp:
        * platform/gtk/FontPlatformData.h:
        * platform/gtk/FontPlatformDataGtk.cpp:
        * platform/gtk/PopupMenuGtk.cpp:
        * platform/gtk/RenderThemeGtk.cpp:
        * platform/gtk/RenderThemeGtk.h:
        * platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
        * platform/image-decoders/png/PNGImageDecoder.cpp:
        * platform/mac/FontMac.mm:
        * platform/mac/FontPlatformData.h:
        * platform/mac/LocalCurrentGraphicsContext.h:
        * platform/mac/LocalCurrentGraphicsContext.mm:
        * platform/mac/PopupMenuMac.mm:
        * platform/mac/SearchPopupMenuMac.mm:
        * platform/mac/StringImplMac.mm:
        * platform/mac/StringMac.mm:
        * platform/mac/TextBreakIteratorInternalICUMac.mm:
        * platform/network/FormData.cpp:
        * platform/network/FormData.h:
        * platform/qt/FileChooserQt.cpp:
        * platform/qt/FontQt.cpp:
        * platform/qt/MenuEventProxy.h:
        * platform/qt/PlugInInfoStoreQt.cpp:
        * platform/qt/PopupMenuQt.cpp:
        * platform/qt/QWebPopup.cpp:
        * platform/qt/QWebPopup.h:
        * platform/qt/RenderThemeQt.cpp:
        * platform/qt/RenderThemeQt.h:
        * platform/qt/SearchPopupMenuQt.cpp:
        * platform/qt/TextBreakIteratorQt.cpp:
        * platform/qt/WheelEventQt.cpp:
        * platform/win/FontPlatformData.h:
        * platform/win/FontPlatformDataWin.cpp:
        * platform/win/PopupMenuWin.cpp:
        * platform/win/SearchPopupMenuWin.cpp:
        * platform/win/TextBreakIteratorInternalICUWin.cpp:
        * rendering/AutoTableLayout.cpp:
        * rendering/AutoTableLayout.h:
        * rendering/CounterNode.cpp:
        * rendering/CounterNode.h:
        * rendering/DataRef.h:
        * rendering/EllipsisBox.cpp:
        * rendering/EllipsisBox.h:
        * rendering/FixedTableLayout.cpp:
        * rendering/FixedTableLayout.h:
        * rendering/GapRects.h:
        * rendering/HitTestRequest.h:
        * rendering/HitTestResult.cpp:
        * rendering/HitTestResult.h:
        * rendering/InlineBox.cpp:
        * rendering/InlineBox.h:
        * rendering/InlineFlowBox.cpp:
        * rendering/InlineFlowBox.h:
        * rendering/InlineRunBox.h:
        * rendering/InlineTextBox.cpp:
        * rendering/InlineTextBox.h:
        * rendering/Length.h:
        * rendering/ListMarkerBox.cpp:
        * rendering/ListMarkerBox.h:
        * rendering/RenderApplet.cpp:
        * rendering/RenderApplet.h:
        * rendering/RenderArena.cpp:
        * rendering/RenderArena.h:
        * rendering/RenderBR.cpp:
        * rendering/RenderBR.h:
        * rendering/RenderBlock.cpp:
        * rendering/RenderBlock.h:
        * rendering/RenderBox.cpp:
        * rendering/RenderBox.h:
        * rendering/RenderButton.cpp:
        * rendering/RenderButton.h:
        * rendering/RenderContainer.cpp:
        * rendering/RenderContainer.h:
        * rendering/RenderCounter.cpp:
        * rendering/RenderCounter.h:
        * rendering/RenderFieldset.cpp:
        * rendering/RenderFieldset.h:
        * rendering/RenderFileUploadControl.cpp:
        * rendering/RenderFileUploadControl.h:
        * rendering/RenderFlexibleBox.cpp:
        * rendering/RenderFlexibleBox.h:
        * rendering/RenderFlow.cpp:
        * rendering/RenderFlow.h:
        * rendering/RenderForeignObject.cpp:
        * rendering/RenderForeignObject.h:
        * rendering/RenderFrame.cpp:
        * rendering/RenderFrame.h:
        * rendering/RenderFrameSet.cpp:
        * rendering/RenderFrameSet.h:
        * rendering/RenderImage.cpp:
        * rendering/RenderImage.h:
        * rendering/RenderInline.cpp:
        * rendering/RenderInline.h:
        * rendering/RenderLayer.cpp:
        * rendering/RenderLayer.h:
        * rendering/RenderLegend.cpp:
        * rendering/RenderLegend.h:
        * rendering/RenderListItem.cpp:
        * rendering/RenderListItem.h:
        * rendering/RenderListMarker.cpp:
        * rendering/RenderListMarker.h:
        * rendering/RenderMenuList.cpp:
        * rendering/RenderMenuList.h:
        * rendering/RenderObject.cpp:
        * rendering/RenderObject.h:
        * rendering/RenderPart.cpp:
        * rendering/RenderPart.h:
        * rendering/RenderPartObject.cpp:
        * rendering/RenderPartObject.h:
        * rendering/RenderPath.cpp:
        * rendering/RenderPath.h:
        * rendering/RenderReplaced.cpp:
        * rendering/RenderReplaced.h:
        * rendering/RenderSVGBlock.cpp:
        * rendering/RenderSVGBlock.h:
        * rendering/RenderSVGContainer.cpp:
        * rendering/RenderSVGContainer.h:
        * rendering/RenderSVGGradientStop.cpp:
        * rendering/RenderSVGGradientStop.h:
        * rendering/RenderSVGHiddenContainer.cpp:
        * rendering/RenderSVGHiddenContainer.h:
        * rendering/RenderSVGImage.cpp:
        * rendering/RenderSVGImage.h:
        * rendering/RenderSVGInline.cpp:
        * rendering/RenderSVGInline.h:
        * rendering/RenderSVGInlineText.cpp:
        * rendering/RenderSVGInlineText.h:
        * rendering/RenderSVGTSpan.cpp:
        * rendering/RenderSVGTSpan.h:
        * rendering/RenderSVGText.cpp:
        * rendering/RenderSVGText.h:
        * rendering/RenderSlider.cpp:
        * rendering/RenderSlider.h:
        * rendering/RenderStyle.cpp:
        * rendering/RenderStyle.h:
        * rendering/RenderTable.cpp:
        * rendering/RenderTable.h:
        * rendering/RenderTableCell.cpp:
        * rendering/RenderTableCell.h:
        * rendering/RenderTableCol.cpp:
        * rendering/RenderTableCol.h:
        * rendering/RenderTableRow.cpp:
        * rendering/RenderTableRow.h:
        * rendering/RenderTableSection.cpp:
        * rendering/RenderTableSection.h:
        * rendering/RenderText.cpp:
        * rendering/RenderText.h:
        * rendering/RenderTextControl.cpp:
        * rendering/RenderTextControl.h:
        * rendering/RenderTextFragment.cpp:
        * rendering/RenderTextFragment.h:
        * rendering/RenderTheme.cpp:
        * rendering/RenderTheme.h:
        * rendering/RenderThemeMac.h:
        * rendering/RenderThemeMac.mm:
        * rendering/RenderThemeSafari.cpp:
        * rendering/RenderThemeSafari.h:
        * rendering/RenderThemeWin.cpp:
        * rendering/RenderThemeWin.h:
        * rendering/RenderView.cpp:
        * rendering/RenderView.h:
        * rendering/RenderWidget.cpp:
        * rendering/RenderWidget.h:
        * rendering/RootInlineBox.cpp:
        * rendering/RootInlineBox.h:
        * rendering/SVGInlineFlowBox.cpp:
        * rendering/SVGInlineFlowBox.h:
        * rendering/SVGInlineTextBox.cpp:
        * rendering/SVGInlineTextBox.h:
        * rendering/SVGRootInlineBox.cpp:
        * rendering/SVGRootInlineBox.h:
        * rendering/TableLayout.h:
        * rendering/bidi.cpp:
        * rendering/bidi.h:
        * rendering/break_lines.cpp:
        * rendering/break_lines.h:
        * xml/DOMParser.cpp:
        * xml/DOMParser.h:
        * xml/DOMParser.idl:
        * xml/XMLHttpRequest.cpp:
        * xml/XMLHttpRequest.h:
        * xml/XMLSerializer.cpp:
        * xml/XMLSerializer.h:
        * xml/XMLSerializer.idl:
        * xml/XPathEvaluator.idl:
        * xml/XPathExpression.idl:
        * xml/XPathNSResolver.idl:
        * xml/XPathResult.idl:
        * xml/XSLImportRule.cpp:
        * xml/XSLImportRule.h:
        * xml/XSLStyleSheet.cpp:
        * xml/XSLStyleSheet.h:
        * xml/XSLTProcessor.cpp:
        * xml/XSLTProcessor.h:

2007-09-25  Darin Adler  <darin@apple.com>

        Reviewed by Harrison.

        - fix <rdar://problem/5503225> CrashTracer: [USER] 2 crashes in Dashcode
          at com.apple.WebCore: WebCore::Frame::document const + 0

        * page/FrameView.cpp: (WebCore::FrameView::updateControlTints):
        Added null check.

2007-09-25  Beth Dakin  <bdakin@apple.com>

        Reviewed by Darin.

        Fixes http://bugs.webkit.org/show_bug.cgi?id=15282 r25726 caused 
        plugins/mouse-events.html to fail

        * page/FrameView.cpp:
        (WebCore::FrameView::layout): We need to call 
        updateWidgetPosition() after updating each widget.

2007-09-25  Anders Carlsson  <andersca@apple.com>

        Build fix.
        
        * page/Chrome.cpp:
        (WebCore::PageGroupLoadDeferrer::PageGroupLoadDeferrer):

2007-09-25  Anders Carlsson  <andersca@apple.com>

        Reviewed by Geoff.

        <rdar://problem/5283916>
        JavaScript timers may be firing while JavaScript alerts are displayed.
        
        Pause JavaScript timeouts while calling UI delegate methods that might show dialogs.
        
        * page/Chrome.cpp:
        (WebCore::PageGroupLoadDeferrer::PageGroupLoadDeferrer):
        (WebCore::PageGroupLoadDeferrer::~PageGroupLoadDeferrer):

2007-09-26  Holger Hans Peter Freyther  <zecke@selfish.org>

        Reviewed by Anders.

        Implement PopupMenu using GtkMenu.

        * platform/PopupMenu.h:
        * platform/gtk/PopupMenuGtk.cpp:
        (WebCore::PopupMenu::PopupMenu):
        (WebCore::PopupMenu::~PopupMenu):
        (WebCore::PopupMenu::show):
        (WebCore::PopupMenu::hide):
        (WebCore::PopupMenu::updateFromElement):
        (WebCore::PopupMenu::itemWritingDirectionIsNatural):
        (WebCore::PopupMenu::menuItemActivated):
        (WebCore::PopupMenu::menuUnmapped):
        (WebCore::PopupMenu::menuPositionFunction):
        (WebCore::PopupMenu::menuRemoveItem):

2007-09-23  Holger Hans Peter Freyther  <zecke@selfish.org>

        Rubber stamped by Mark.

        Obey the Coding-Style and move the asterisk to the
        left to be part of the type.

        * platform/gtk/RenderThemeGtk.h:

2007-09-25  Beth Dakin  <bdakin@apple.com>

        Reviewed by Darin.

        Fix for <rdar://problem/5466459> CrashTracer: [USER] 1 crash in 
        NetNewsWire at com.apple.WebCore: WebCore::bidiNext + 485 (15241)

        Mitz discovered that this crash appeared because r25128 made it 
        possible for RenderPartObject::updateWidget() to be called during 
        layout. updateWidget() can, through a series of calls, cause an 
        attach/detach to happen, which is very bad in the middle of a 
        layout and is what led to this crash. This patch fixes that by 
        having the FrameView keep track of a queue of RenderPartObjects 
        that need to call updateWidget(), and it goes through the queue 
        calling updateWidget() as soon as layout is done.

        * page/FrameView.cpp: We only want to call updateWidget() if we are 
        not in a nested layout. Unfortunately, the existing variables on 
        FrameViewPrivate do not have exactly the information that we need, 
        so I added nestedLayoutCount.
        (WebCore::FrameViewPrivate::reset): Reset nestedLayoutCount.
        (WebCore::FrameView::layout): Increment nestedLayoutCount once we 
        have gotten through all of the early returns. Call updateWidget() 
        after layout is nestedLayoutCount is 1 and there are widgets to 
        update. Decrement nestedLayoutCount at the end.
        (WebCore::FrameView::addWidgetToUpdate):
        (WebCore::FrameView::removeWidgetToUpdate):
        * page/FrameView.h:
        * rendering/RenderPartObject.cpp:
        (WebCore::RenderPartObject::~RenderPartObject): Remove this from 
        the FrameView's update set.
        (WebCore::RenderPartObject::layout): Instead of calling 
        updateWidget() immediately, add this to the update widget set on 
        FrameView.
        * rendering/RenderPartObject.h:

2007-09-25  David Kilzer  <ddkilzer@webkit.org>

        Reviewed by Mark Rowe.

        - fix http://bugs.webkit.org/show_bug.cgi?id=15275
          SVG dependency on WebCore/dom/XMLTokenizer.cpp

        * dom/XMLTokenizer.cpp: Moved #include "SVGStyleElement.h" into #if ENABLE(SVG).

2007-09-25  Justin Garcia  <justin.garcia@apple.com>

        Reviewed by Darin.

        <rdar://problem/5483567> 
        REGRESSION (Tiger only, workaround in AppKit on Leopard): Pasting words copied from TextEdit in Mail adds extra newline
        
        * editing/ReplaceSelectionCommand.cpp:
        (WebCore::ReplaceSelectionCommand::removeUnrenderedNodes): Added.
        (WebCore::ReplaceSelectionCommand::doApply): Call removeUnrenderedNodes
        to prevent unrendered spaces from interfering with paragraph merging.
        * editing/ReplaceSelectionCommand.h:

2007-09-24  Steve Falkenburg  <sfalken@apple.com>

        Reviewed by Darin.

        - fix <rdar://problem/5502513>

        * platform/win/FontCacheWin.cpp:
        (WebCore::FontCache::getFontLinkInterface):
        Roll back this file; the old code leaked a global COM object, but that's
        no big deal and the new code caused a crash on quit.

2007-09-24  Anders Carlsson  <andersca@apple.com>

        Reviewed by Adam.

        <rdar://problem/5494608>
        Seed: Safari will follow links in Flash movies without clicking.

        Make sure to handle mouseover and mouseout so the plug-in can track when the mouse is over it.
                
        * plugins/win/PluginViewWin.cpp:
        (WebCore::PluginViewWin::handleMouseEvent):

2007-09-24  Mike Fenton  <mike@staikos.net>

        Reviewed by George Staikos.

        Switch to using a QImage instead of a QPixmap to make transparency work.

        * html/CanvasRenderingContext2D.cpp:
        (WebCore::CanvasRenderingContext2D::drawImage):
        * html/HTMLCanvasElement.cpp:
        (WebCore::HTMLCanvasElement::paint):
        (WebCore::HTMLCanvasElement::createDrawingContext):
        (WebCore::HTMLCanvasElement::createPlatformImage):
        * html/HTMLCanvasElement.h:

2007-09-21  Kevin McCullough  <kmccullough@apple.com>

        Reviewed by Sam.

        - Updated project files to not use Edit and Continue for Debug Information since it doesn't work and breaks some functionality.

        * WebCore.vcproj/WebCore.vcproj:

2007-09-24  Brady Eidson  <beidson@apple.com>

        Reviewed by John Sullivan

        * loader/icon/IconDatabase.cpp:
        (WebCore::IconDatabase::iconForPageURL): Assert the page url is non-null

2007-09-20  Holger Hans Peter Freyther  <zecke@selfish.org>

        Rubber stamped by Adam.

        Renamed files from *Gdk to *Gtk (see #14732) using the
        work of Juan A. Suarez Romero as a base.

        GDK -> GTK

        * Projects/gdk/webcore-gdk.bkl:
        * WebCore.pro:
        * WebCoreSources.bkl:
        * loader/gdk: Removed.
        * loader/gdk/DocumentLoaderGdk.cpp: Removed.
        * loader/gtk: Added.
        * loader/gtk/DocumentLoaderGdk.cpp: Removed.
        * loader/gtk/DocumentLoaderGtk.cpp: Added.
        * page/FrameView.cpp:
        * page/FrameView.h:
        * page/gdk: Removed.
        * page/gdk/DragControllerGdk.cpp: Removed.
        * page/gdk/EventHandlerGdk.cpp: Removed.
        * page/gdk/FrameGdk.cpp: Removed.
        * page/gtk: Added.
        * page/gtk/DragControllerGdk.cpp: Removed.
        * page/gtk/DragControllerGtk.cpp: Added.
        * page/gtk/EventHandlerGdk.cpp: Removed.
        * page/gtk/EventHandlerGtk.cpp: Added.
        (WebCore::EventHandler::createDraggingClipboard):
        * page/gtk/FrameGdk.cpp: Removed.
        * page/gtk/FrameGtk.cpp: Added.
        * platform/ContextMenuItem.h:
        * platform/Cursor.h:
        * platform/DragData.h:
        * platform/DragImage.h:
        * platform/FontData.h:
        * platform/NotImplemented.h:
        * platform/PlatformKeyboardEvent.h:
        * platform/PlatformMenuDescription.h:
        * platform/PlatformMouseEvent.h:
        * platform/PlatformWheelEvent.h:
        * platform/ScrollView.h:
        * platform/Widget.h:
        * platform/gdk: Removed.
        * platform/gdk/ClipboardGdk.cpp: Removed.
        * platform/gdk/ClipboardGdk.h: Removed.
        * platform/gdk/ContextMenuGdk.cpp: Removed.
        * platform/gdk/ContextMenuItemGdk.cpp: Removed.
        * platform/gdk/CookieJarGdk.cpp: Removed.
        * platform/gdk/CursorGdk.cpp: Removed.
        * platform/gdk/DragDataGdk.cpp: Removed.
        * platform/gdk/DragImageGdk.cpp: Removed.
        * platform/gdk/FileChooserGdk.cpp: Removed.
        * platform/gdk/FileSystemGdk.cpp: Removed.
        * platform/gdk/FontCacheGdk.cpp: Removed.
        * platform/gdk/FontDataGdk.cpp: Removed.
        * platform/gdk/FontGdk.cpp: Removed.
        * platform/gdk/FontPlatformData.h: Removed.
        * platform/gdk/FontPlatformDataGdk.cpp: Removed.
        * platform/gdk/GlyphPageTreeNodeGdk.cpp: Removed.
        * platform/gdk/KeyEventGdk.cpp: Removed.
        * platform/gdk/KeyboardCodes.h: Removed.
        * platform/gdk/LocalizedStringsGdk.cpp: Removed.
        * platform/gdk/LoggingGdk.cpp: Removed.
        * platform/gdk/MIMETypeRegistryGdk.cpp: Removed.
        * platform/gdk/MouseEventGdk.cpp: Removed.
        * platform/gdk/PasteboardGdk.cpp: Removed.
        * platform/gdk/PlatformScreenGdk.cpp: Removed.
        * platform/gdk/PlatformScrollBar.h: Removed.
        * platform/gdk/PlatformScrollBarGdk.cpp: Removed.
        * platform/gdk/PopupMenuGdk.cpp: Removed.
        * platform/gdk/RenderThemeGdk.cpp: Removed.
        * platform/gdk/RenderThemeGdk.h: Removed.
        * platform/gdk/ScrollViewGdk.cpp: Removed.
        * platform/gdk/SearchPopupMenuGdk.cpp: Removed.
        * platform/gdk/SharedTimerLinux.cpp: Removed.
        * platform/gdk/SoundGdk.cpp: Removed.
        * platform/gdk/SystemTimeLinux.cpp: Removed.
        * platform/gdk/TemporaryLinkStubs.cpp: Removed.
        * platform/gdk/WheelEventGdk.cpp: Removed.
        * platform/gdk/WidgetGdk.cpp: Removed.
        * platform/graphics/GraphicsContext.h:
        * platform/graphics/cairo/GraphicsContextCairo.cpp:
        (WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate):
        (WebCore::GraphicsContext::setPlatformFont):
        * platform/graphics/gdk: Removed.
        * platform/graphics/gdk/IconGdk.cpp: Removed.
        * platform/graphics/gdk/ImageGdk.cpp: Removed.
        * platform/graphics/gtk: Added.
        * platform/graphics/gtk/IconGdk.cpp: Removed.
        * platform/graphics/gtk/IconGtk.cpp: Added.
        * platform/graphics/gtk/ImageGdk.cpp: Removed.
        * platform/graphics/gtk/ImageGtk.cpp: Added.
        * platform/gtk: Added.
        * platform/gtk/ClipboardGdk.cpp: Removed.
        * platform/gtk/ClipboardGdk.h: Removed.
        * platform/gtk/ClipboardGtk.cpp: Added.
        (WebCore::ClipboardGtk::ClipboardGtk):
        (WebCore::ClipboardGtk::~ClipboardGtk):
        (WebCore::ClipboardGtk::clearData):
        (WebCore::ClipboardGtk::clearAllData):
        (WebCore::ClipboardGtk::getData):
        (WebCore::ClipboardGtk::setData):
        (WebCore::ClipboardGtk::types):
        (WebCore::ClipboardGtk::dragLocation):
        (WebCore::ClipboardGtk::dragImage):
        (WebCore::ClipboardGtk::setDragImage):
        (WebCore::ClipboardGtk::dragImageElement):
        (WebCore::ClipboardGtk::setDragImageElement):
        (WebCore::ClipboardGtk::createDragImage):
        (WebCore::ClipboardGtk::declareAndWriteDragImage):
        (WebCore::ClipboardGtk::writeURL):
        (WebCore::ClipboardGtk::writeRange):
        (WebCore::ClipboardGtk::hasData):
        * platform/gtk/ClipboardGtk.h: Added.
        * platform/gtk/ContextMenuGdk.cpp: Removed.
        * platform/gtk/ContextMenuGtk.cpp: Added.
        * platform/gtk/ContextMenuItemGdk.cpp: Removed.
        * platform/gtk/ContextMenuItemGtk.cpp: Added.
        * platform/gtk/CookieJarGdk.cpp: Removed.
        * platform/gtk/CookieJarGtk.cpp: Added.
        * platform/gtk/CursorGdk.cpp: Removed.
        * platform/gtk/CursorGtk.cpp: Added.
        * platform/gtk/DragDataGdk.cpp: Removed.
        * platform/gtk/DragDataGtk.cpp: Added.
        * platform/gtk/DragImageGdk.cpp: Removed.
        * platform/gtk/DragImageGtk.cpp: Added.
        * platform/gtk/FileChooserGdk.cpp: Removed.
        * platform/gtk/FileChooserGtk.cpp: Added.
        * platform/gtk/FileSystemGdk.cpp: Removed.
        * platform/gtk/FileSystemGtk.cpp: Added.
        * platform/gtk/FontCacheGdk.cpp: Removed.
        * platform/gtk/FontCacheGtk.cpp: Added.
        * platform/gtk/FontDataGdk.cpp: Removed.
        * platform/gtk/FontDataGtk.cpp: Added.
        * platform/gtk/FontGdk.cpp: Removed.
        * platform/gtk/FontGtk.cpp: Added.
        * platform/gtk/FontPlatformDataGdk.cpp: Removed.
        * platform/gtk/FontPlatformDataGtk.cpp: Added.
        * platform/gtk/GlyphPageTreeNodeGdk.cpp: Removed.
        * platform/gtk/GlyphPageTreeNodeGtk.cpp: Added.
        * platform/gtk/KeyEventGdk.cpp: Removed.
        * platform/gtk/KeyEventGtk.cpp: Added.
        * platform/gtk/LocalizedStringsGdk.cpp: Removed.
        * platform/gtk/LocalizedStringsGtk.cpp: Added.
        * platform/gtk/LoggingGdk.cpp: Removed.
        * platform/gtk/LoggingGtk.cpp: Added.
        * platform/gtk/MIMETypeRegistryGdk.cpp: Removed.
        * platform/gtk/MIMETypeRegistryGtk.cpp: Added.
        * platform/gtk/MouseEventGdk.cpp: Removed.
        * platform/gtk/MouseEventGtk.cpp: Added.
        * platform/gtk/PasteboardGdk.cpp: Removed.
        * platform/gtk/PasteboardGtk.cpp: Added.
        * platform/gtk/PlatformScreenGdk.cpp: Removed.
        * platform/gtk/PlatformScreenGtk.cpp: Added.
        * platform/gtk/PlatformScrollBarGdk.cpp: Removed.
        * platform/gtk/PlatformScrollBarGtk.cpp: Added.
        * platform/gtk/PopupMenuGdk.cpp: Removed.
        * platform/gtk/PopupMenuGtk.cpp: Added.
        * platform/gtk/RenderThemeGdk.cpp: Removed.
        * platform/gtk/RenderThemeGdk.h: Removed.
        * platform/gtk/RenderThemeGtk.cpp: Added.
        (WebCore::theme):
        (WebCore::RenderThemeGtk::RenderThemeGtk):
        (WebCore::RenderThemeGtk::close):
        (WebCore::RenderThemeGtk::addIntrinsicMargins):
        (WebCore::RenderThemeGtk::supportsFocus):
        (WebCore::RenderThemeGtk::determineState):
        (WebCore::RenderThemeGtk::determineShadow):
        (WebCore::RenderThemeGtk::getThemeData):
        (WebCore::RenderThemeGtk::setCheckboxSize):
        (WebCore::RenderThemeGtk::paintCheckbox):
        (WebCore::RenderThemeGtk::setRadioSize):
        (WebCore::RenderThemeGtk::paintRadio):
        (WebCore::RenderThemeGtk::paintButton):
        (WebCore::RenderThemeGtk::adjustTextFieldStyle):
        (WebCore::RenderThemeGtk::paintTextField):
        (WebCore::RenderThemeGtk::paintTextArea):
        (WebCore::RenderThemeGtk::adjustButtonStyle):
        (WebCore::RenderThemeGtk::systemFont):
        (WebCore::RenderThemeGtk::gtkButton):
        (WebCore::RenderThemeGtk::gtkCheckbox):
        (WebCore::RenderThemeGtk::gtkRadioButton):
        (WebCore::RenderThemeGtk::gtkWindowContainer):
        * platform/gtk/RenderThemeGtk.h: Added.
        * platform/gtk/ScrollViewGdk.cpp: Removed.
        * platform/gtk/ScrollViewGtk.cpp: Added.
        * platform/gtk/SearchPopupMenuGdk.cpp: Removed.
        * platform/gtk/SearchPopupMenuGtk.cpp: Added.
        * platform/gtk/SoundGdk.cpp: Removed.
        * platform/gtk/SoundGtk.cpp: Added.
        * platform/gtk/WheelEventGdk.cpp: Removed.
        * platform/gtk/WheelEventGtk.cpp: Added.
        * platform/gtk/WidgetGdk.cpp: Removed.
        * platform/gtk/WidgetGtk.cpp: Added.
        * platform/network/ResourceHandle.h:

2007-09-23  Rob Buis  <buis@kde.org>

        Reviewed by Hyatt.

        http://bugs.webkit.org/show_bug.cgi?id=15025
        Background repeat css property is not inherited from parent if unspecified

        Don't let invalid url specification in background shorthand make
        the entire shorthand invalid.

        * css/CSSParser.cpp:
        (WebCore::CSSParser::parseBackgroundImage):
        (WebCore::CSSParser::parseBackgroundProperty):
        * css/CSSParser.h:

2007-09-22  Adam Roben  <aroben@apple.com>

        Fix Bug 15251: REGRESSION: <input type=range> doesn't respond to form.reset() or setting input.value

        http://bugs.webkit.org/show_bug.cgi?id=15251
        <rdar://5498169>

        Reviewed by Maciej.

        Test: fast/forms/range-reset.html

        * html/HTMLInputElement.cpp:
        (WebCore::HTMLInputElement::storesValueSeparateFromAttribute): <input
        type=range> should be storing its value separately from the value
        attribute, as do all of our variable-input input types.

2007-09-21  Mark Rowe  <mrowe@apple.com>

        Build fix for non-Mac platforms after r25697.
        
        Rename Frame::cleanupPlatformScriptObjects to Frame::clearPlatformScriptObjects.

        * bridge/win/FrameWin.cpp:
        * page/gdk/FrameGdk.cpp:
        * page/qt/FrameQt.cpp:
        * platform/wx/TemporaryLinkStubs.cpp:

2007-09-21  Adele Peterson  <adele@apple.com>

        Reviewed by Sam.

        Fix for <rdar://problem/5497357> REGRESSION: Safari doesn't show the month days on AirFrance reservation page

        Test: fast/dom/HTMLSelectElement/options-collection-set-string-length.html

        * bindings/js/JSHTMLOptionsCollectionCustom.cpp: (WebCore::JSHTMLOptionsCollection::setLength):
          Convert the value to a number.  We already have code here to check if the value is not a number.
          This matches other browsers, which allow a string value to be used to set the length.

2007-09-21  Timothy Hatcher  <timothy@apple.com>

        Reviewed by Darin.

        <rdar://problem/5491013> REGRESSION: -[WebView windowScriptObject] returns a dummy object or nil if a page hasn't loaded

        Calling -[WebView windowScriptObject] before the page loads would give you nil. This behavior didn't match Tiger.
        The API behavior in Tiger let you get the window script object once and keep ahold of it as long as you needed it.
        The window object would remain valid even after page loads. This change restores the Tiger behavior.

        <rdar://problem/5495790> NULL dereference crash beneath Bindings::RootObject::interpreter when saving Dashcode document

        The changes to WebScriptObject's _isSafeScript call also fixed the crash in Dashcode.

        * bindings/objc/WebScriptObject.mm:
        (-[WebScriptObject _setOriginRootObject:andRootObject:]): New method used to update the the root objects,
        so the WebScriptObject can still be used after a page load.
        (-[WebScriptObject _isSafeScript]): Call [self _rootObject] instead of accessing the data member directly.
        DOMNode has an override for the _rootObject method, and it can return 0 when _private->_rootObject
        is non-zero. We would return YES here when it wasn't safe and later crash with my modified layout tests.
        Checking _rootObject first prevents other calls sites from needing to check for a valid root object,
        this fixed the Dashcode crash.
        (-[WebScriptObject _imp]): Ditto.

        * bindings/objc/WebScriptObjectPrivate.h: Add _setOriginRootObject:andRootObject:.

        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::clear): Call the renamed clearScriptObjects function.
        (WebCore::FrameLoader::dispatchWindowObjectAvailable): Some gratuitous code cleanup.

        * page/Frame.cpp:
        (WebCore::Frame::clearScriptObjects): Renamed cleanupScriptObject to clearScriptObjects.
        Call clearPlatformScriptObjects last so m_bindingRootObject is already NULL.
        (WebCore::Frame::windowScriptNPObject): Hold a JSLock before accessing the window. This
        change is unrelated to the bug, but should be fixed.

        * page/mac/FrameMac.mm:
        (WebCore::Frame::windowScriptObject): Return a script object even if the interpreter is NULL.
        This resotres the Tiger behavior of always being able to access the window object.
        (WebCore::Frame::clearPlatformScriptObjects): Keep the window script object around, and update
        the root objects for the window script object.

        * page/Frame.h: Rename cleanupScriptObject to clearScriptObjects.
        * page/FramePrivate.h: Use a RetainPtr for m_windowScriptObject.

2007-09-21  Mike Fenton  <mike@staikos.net>

        Reviewed by George Staikos.

        Fix styled pen support by not clobbering QPen properties.

        * html/CanvasStyle.cpp:
        (WebCore::CanvasStyle::applyStrokeColor):
        (WebCore::CanvasStyle::applyFillColor):

2007-09-21  Oliver Hunt  <oliver@apple.com>

        Reviewed by Tristan and Darin

        http://bugs.webkit.org/show_bug.cgi?id=15239
        <rdar://problem/5491955> REGRESSION (r25547): With Hanin IME, one cannot input characters into forms (15239)
        
        This problem was caused by the setComposition method failing to clear
        the composition markers in the presence of an empty string.  This would 
        result in the caret being locked within the 0 length bounds of the "composition"
        and so preventing basic keyboard interaction.

        * editing/Editor.cpp:
        (WebCore::Editor::setComposition):

2007-09-21  Adele Peterson  <adele@apple.com>

        Reviewed by Tristan.

        Fix for <rdar://problem/5497346> "Check spelling when I click Send" crashes on stationery messages every time

        No test. I wasn't able to find a way to get this to occur with Safari or DumpRenderTree.

        * editing/Editor.cpp: (WebCore::Editor::advanceToNextMisspelling): Updated comment.
        * editing/htmlediting.cpp:
        (WebCore::firstEditablePositionAfterPositionInRoot): Only return the root position if its editable.
        (WebCore::maxDeepOffset): Added nil check & assert.

2007-09-21  Anders Carlsson  <andersca@apple.com>

        Reviewed by Steve.

        <rdar://problem/5404339>
        Site redirects continuosly, starving UI thread, causing app to hang.
        
        Use GetQueueStatus to see if there are input messages in the queue that aren't being processed.
        If so, use a low-priority timer instead of PostMessage.
        
        * platform/win/SharedTimerWin.cpp:
        (WebCore::setSharedTimerFireTime):

2007-09-22  Darin Adler  <darin@apple.com>

        Reviewed by Anders.

        - add QueryInterface capabilities to COMPtr

        * platform/win/COMPtr.h:
        (COMPtr::COMPtr): Added constructor that takes a Query tag and
        does an appropriate QueryInterface.
        (COMPtr::query): Added function to do a queryInterface.
        (COMPtr::copyQueryInterfaceRef): Added private helper used by
        both of the above. Note that when the query fails you get a 0,
        which is the same thing you get if a 0 pointer is passed in.

        * platform/win/FontCacheWin.cpp:
        (WebCore::FontCache::getFontLinkInterface): Convert to using
        the new query as a test case. Also eliminate the unnecessary
        second global variable and use COMPtr objects rather than just
        leaking references.

        * platform/win/WCDataObject.h: Removed unneeded include and
        using statements.

2007-09-21  Anders Carlsson  <andersca@apple.com>

        Reviewed by Adam.

        <rdar://problem/5494790>
        clicking any link in the Flash regions at bananarepublic.com results in bad page

        Don't replace the frame contents, the Mac version doesn't do this.
        
        * plugins/win/PluginViewWin.cpp:
        (WebCore::PluginViewWin::performRequest):

2007-09-21  Anders Carlsson  <andersca@apple.com>

        Reviewed by Darin.

        <rdar://problem/5496700>
        Repro crash loading http://www.tivo.com/whatistivo/tivohd/index.html

        Don't continue if the plug-in cancelled the stream.
                
        * loader/win/NetscapePlugInStreamLoaderWin.cpp:
        (WebCore::NetscapePlugInStreamLoader::didReceiveResponse):

2007-09-21  Kevin Decker  <kdecker@apple.com>

        * platform/mac/SoftLinking.h: Build fix; added necessary #imports. 

2007-09-21  Kevin Decker  <kdecker@apple.com>

        Reviewed by Darin Adler.

        * WebCore.xcodeproj/project.pbxproj: Added SoftLinking.h to the project.
        * platform/mac/SoftLinking.h: Contains a new macro; useful in helping to lazily load frameworks.

2007-09-20  Ada Chan  <adachan@apple.com>

        <rdar://problem/5477240> Regression: Footer is too high in print preview
        Make computePageRectsForFrame() return the height of the page adjusted for margins.

        Reviewed by Steve.

        * bridge/win/FrameWin.cpp:
        (WebCore::computePageRectsForFrame):
        * bridge/win/FrameWin.h:

2007-09-19  Kevin McCullough  <kmccullough@apple.com>

        Reviewed by Hyatt.

        - <rdar://problem/5101991> Avril Lavigne music player comes up in a window with scrollbars
        - Implementing missing scrollbar functionality to allow turning off scrollbars correctly.

        * platform/ScrollView.h:
        * platform/win/ScrollViewWin.cpp:
        (WebCore::ScrollView::ScrollViewPrivate::setAllowsScrolling):
        (WebCore::ScrollView::ScrollViewPrivate::allowsScrolling):
        (WebCore::ScrollView::updateScrollbars):
        (WebCore::ScrollView::setAllowsScrolling):
        (WebCore::ScrollView::allowsScrolling):

2007-09-20  Brady Eidson  <beidson@apple.com>

        Reviewed by Dave Hyatt

        <rdar://problem/5245981> - No favicon shows up for cnet.com
        
        CNet's favicon has two images in it - a 32x32 white square, and a 16x16 image that is their actual icon
        Till now on Windows we've always gone straight for the first image in an icon for the favicon, now we
        actually do proper size matching

        * platform/graphics/BitmapImage.h:

        * platform/graphics/Image.h:
        (WebCore::Image::getHBITMAPOfSize): 
        (WebCore::Image::drawFrameMatchingSourceSize): Search through the frames of the image for the correct size

        * platform/graphics/win/ImageWin.cpp:
        (WebCore::BitmapImage::getHBITMAP):
        (WebCore::BitmapImage::getHBITMAPOfSize):
        (WebCore::BitmapImage::drawFrameMatchingSourceSize):

2007-09-20  Steve Falkenburg  <sfalken@apple.com>

        Reviewed by Brady.

        Call ascii() instead of utf8() from debug logging code to avoid threading
        issues associated w/ converting to UTF8.

        * loader/icon/IconDatabase.cpp:
        (WebCore::makeAllDirectories):
        (WebCore::IconDatabase::retainIconForPageURL):
        (WebCore::IconDatabase::releaseIconForPageURL):
        (WebCore::IconDatabase::setIconDataForIconURL):
        (WebCore::IconDatabase::setIconURLForPageURL):
        (WebCore::IconDatabase::loadDecisionForIconURL):
        (WebCore::IconDatabase::getOrCreatePageURLRecord):
        (WebCore::IconDatabase::iconDatabaseSyncThread):
        (WebCore::IconDatabase::performOpenInitialization):
        (WebCore::IconDatabase::checkIntegrity):
        (WebCore::IconDatabase::performURLImport):
        (WebCore::IconDatabase::readFromDatabase):
        (WebCore::IconDatabase::writeToDatabase):
        (WebCore::readySQLStatement):
        (WebCore::IconDatabase::setIconURLForPageURLInSQLDatabase):
        (WebCore::IconDatabase::setIconIDForPageURLInSQLDatabase):
        (WebCore::IconDatabase::removePageURLFromSQLDatabase):
        (WebCore::IconDatabase::getIconIDForIconURLFromSQLDatabase):
        (WebCore::IconDatabase::addIconURLToSQLDatabase):
        (WebCore::IconDatabase::getImageDataForIconURLFromSQLDatabase):
        (WebCore::IconDatabase::removeIconFromSQLDatabase):
        (WebCore::IconDatabase::writeIconSnapshotToSQLDatabase):

2007-09-20  Mike Fenton  <mike@staikos.net>

        Reviewed by George Staikos.

        Implement gradients and more of canvas for Qt.  Style changes and some
        of the stroking fixes by George.

        * html/CanvasGradient.cpp:
        (WebCore::CanvasGradient::CanvasGradient):
        (WebCore::CanvasGradient::~CanvasGradient):
        (WebCore::CanvasGradient::addColorStop):
        (WebCore::CanvasGradient::platformShading):
        * html/CanvasGradient.h:
        * html/CanvasRenderingContext2D.cpp:
        (WebCore::CanvasRenderingContext2D::fill):
        (WebCore::CanvasRenderingContext2D::stroke):
        (WebCore::CanvasRenderingContext2D::fillRect):
        (WebCore::CanvasRenderingContext2D::applyFillPattern):

2007-09-20  Rob Buis  <buis@kde.org>

        Reviewed by Mitz.

        http://bugs.webkit.org/show_bug.cgi?id=15235
        Options can not be removed from a Select element with OptGroup's using JavaScript
        <rdar://problem/5494123>

        Remove HTMLOptionElement children against the proper parent node.

        * html/HTMLSelectElement.cpp:
        (WebCore::HTMLSelectElement::remove):

2007-09-19  John Sullivan  <sullivan@apple.com>

        Reviewed by Darin Adler.
        
        - WebCore part of speculative fix for <rdar://problem/5490627>, about crashes constructing a
          String using the values filled in by checkSpellingOfString()

        * editing/Editor.cpp:
        (WebCore::findFirstMisspellingInRange):
        initialize out parameters the way we do elsewhere; add many assertions for improper results
        from checkSpellingOfString(); don't create a String at all until we've checked all the ways
        that checkSpellingOfString() results could indicate invalid string, even the unexpected ones;
        as an optimization, don't construct a String at all when looping through to mark all instances.

2007-09-18  Holger Hans Peter Freyther  <zecke@selfish.org>

        Reviewed by Adam.

        There is no need to have FTPDirectoryDocument stubs. We can
        compile FTPDirectoryDocument.cpp and FTPDirectoryTokenizer.cpp
        instead.

        * WebCore.pro:
        * platform/gdk/TemporaryLinkStubs.cpp:
        * platform/qt/TemporaryLinkStubs.cpp:

2007-09-18  Holger Hans Peter Freyther  <zecke@selfish.org>

        Reviewed by Adam.

        Remove includes that are not needed.

        * platform/gdk/TemporaryLinkStubs.cpp:

2007-09-18  Holger Hans Peter Freyther  <zecke@selfish.org>

        Reviewed by Adam.

        Move the Pasteboard stubs to PasteboardGdk.cpp.

        * WebCore.pro:
        * platform/gdk/PasteboardGdk.cpp: Added.
        (WebCore::Pasteboard::generalPasteboard):
        (WebCore::Pasteboard::writeSelection):
        (WebCore::Pasteboard::writeURL):
        (WebCore::Pasteboard::writeImage):
        (WebCore::Pasteboard::clear):
        (WebCore::Pasteboard::canSmartReplace):
        (WebCore::Pasteboard::documentFragment):
        (WebCore::Pasteboard::plainText):
        (WebCore::Pasteboard::Pasteboard):
        * platform/gdk/TemporaryLinkStubs.cpp:

2007-09-18  Holger Hans Peter Freyther  <zecke@selfish.org>

        Reviewed by Adam.

        Move the Icon stubs to IconGdk.cpp

        * WebCore.pro:
        * platform/gdk/TemporaryLinkStubs.cpp:
        * platform/graphics/gdk/IconGdk.cpp: Added.
        (WebCore::Icon::Icon):
        (WebCore::Icon::~Icon):
        (WebCore::Icon::newIconForFile):

2007-09-18  Holger Hans Peter Freyther  <zecke@selfish.org>

        Reviewed by Adam.

        Move the Font stubs to FontGdk.cpp

        * platform/gdk/FontGdk.cpp:
        (WebCore::Font::drawComplexText):
        (WebCore::Font::floatWidthForComplexText):
        (WebCore::Font::offsetForPositionForComplexText):
        (WebCore::Font::selectionRectForComplexText):
        * platform/gdk/TemporaryLinkStubs.cpp:

2007-09-18  Holger Hans Peter Freyther  <zecke@selfish.org>

        Reviewed by Adam.

        Move the SearchPopupMenu stubs to SearchPopupMenuGdk.cpp

        * WebCore.pro:
        * platform/gdk/SearchPopupMenuGdk.cpp: Added.
        (WebCore::SearchPopupMenu::SearchPopupMenu):
        (WebCore::SearchPopupMenu::saveRecentSearches):
        (WebCore::SearchPopupMenu::loadRecentSearches):
        (WebCore::SearchPopupMenu::enabled):
        * platform/gdk/TemporaryLinkStubs.cpp:

2007-09-18  Holger Hans Peter Freyther  <zecke@selfish.org>

        Reviewed by Adam.

        Move the ContextMenu and ContextMenuItem stubs to
        ContextMenuGdk.cpp and ContextMenuItemGdk.cpp.

        * WebCore.pro:
        * platform/gdk/ContextMenuGdk.cpp: Added.
        (WebCore::ContextMenu::ContextMenu):
        (WebCore::ContextMenu::~ContextMenu):
        (WebCore::ContextMenu::appendItem):
        (WebCore::ContextMenu::setPlatformDescription):
        (WebCore::ContextMenu::platformDescription):
        (WebCore::ContextMenu::releasePlatformDescription):
        * platform/gdk/ContextMenuItemGdk.cpp: Added.
        (WebCore::ContextMenuItem::ContextMenuItem):
        (WebCore::ContextMenuItem::~ContextMenuItem):
        (WebCore::ContextMenuItem::releasePlatformDescription):
        (WebCore::ContextMenuItem::type):
        (WebCore::ContextMenuItem::setType):
        (WebCore::ContextMenuItem::action):
        (WebCore::ContextMenuItem::setAction):
        (WebCore::ContextMenuItem::title):
        (WebCore::ContextMenuItem::setTitle):
        (WebCore::ContextMenuItem::platformSubMenu):
        (WebCore::ContextMenuItem::setSubMenu):
        (WebCore::ContextMenuItem::setChecked):
        * platform/gdk/TemporaryLinkStubs.cpp:

2007-09-18  Holger Hans Peter Freyther  <zecke@selfish.org>

        Reviewed by Adam.

        Implement the WebCore::fileSize function using g_stat.

        * platform/gdk/FileSystemGdk.cpp:
        (WebCore::fileSize):
        * platform/gdk/TemporaryLinkStubs.cpp:

2007-09-18  Holger Hans Peter Freyther  <zecke@selfish.org>

        Reviewed by Adam.

        Move the ResourceHandle stubs from TemporaryLinkStubs
        to the ResourceHandleCurl.cpp file. This affects the
        Gtk+ and wx port as they share the curl implementation.


        * platform/gdk/TemporaryLinkStubs.cpp:
        * platform/network/curl/ResourceHandleCurl.cpp:
        (WebCore::ResourceHandle::willLoadFromCache):
        (WebCore::ResourceHandle::loadsBlocked):
        * platform/wx/TemporaryLinkStubs.cpp:

2007-09-17  Holger Hans Peter Freyther  <zecke@selfish.org>

        Reviewed by Mark.

        Take http://bugs.webkit.org/show_bug.cgi?id=15221 into account
        and change the variable names from nameSystem to systemName and
        change the name of the function to stringByAdoptingFileSystemRepresentation.

        * platform/gdk/FileChooserGdk.cpp:
        (WebCore::stringByAdoptingFileSystemRepresentation):
        (WebCore::FileChooser::basenameForWidth):

2007-09-19  Sam Weinig  <sam@webkit.org>

        Reviewed by Geoff Garen.

        Fix <rdar://problem/5492141> Assertion in isdigit() on windows Safari

        Test: fast/css/hexColor-isDigit-assert.html

        * platform/DeprecatedString.cpp:
        (WebCore::isCharacterAllowedInBase): Check that the character is ascii 
        to avoid an assertions on Windows.

2007-09-19  Anders Carlsson  <andersca@apple.com>

        Reviewed by Geoff.

        <rdar://problem/5489879>
        Combination of real player with high connection quality in selecting player makes Safari quit.
        
        Prevent the Real Player plug-in from calling the window proc recursively.
        
        * plugins/win/PluginViewWin.cpp:
        (WebCore::PluginViewWin::wndProc):
        (WebCore::PluginViewWin::setNPWindowRect):
        (WebCore::PluginViewWin::determineQuirks):
        (WebCore::PluginViewWin::PluginViewWin):
        * plugins/win/PluginViewWin.h:
        (WebCore::):

2007-09-18  Adele Peterson  <adele@apple.com>

        Reviewed by Maciej.

        Fix for <rdar://problem/5472062> -webkit-user-select: none makes selection difficult
        and for <rdar://problem/5472056> REGRESSION: Cannot type into edit fields on a form (sccsheriff.org)

        Tests:

        This fix has a few steps:
        1) Removes the ignore value for the -webkit-user-select property.  We now decide when to prevent selection from starting by calling canStartSelection on the node.
        2) Implements canStartSelection which returns false for all elements that used to have -webkit-user-select:ignore set, true for content editable nodes, 
           and walks up the tree to ask the parent before allowing selection to be started on any other nodes.
        3) We used to disallow selection from starting within -webkit-user-select:none blocks, but now we only use canStartSelection for that.  This will allow easy selections
           in cases like iChat where there's a mix of selectable and non-selectable content.
        4) Makes -webkit-user-select inherited.  After removing the "ignore" value, -webkit-user-select would behave like it was inherited anyways since we already allowed the text value to override the none value.


        * css/html4.css: Removed all usage of -webkit-user-select: ignore.  This is now handled internally with canStartSelection().
          Now -webkit-user-select won't be unintentionally overridden by nodes that don't want to allow selection to be started, but do want to honor the -webkit-user-select to
          determine whether or not selection is allowed at all.

        * editing/SelectionController.cpp: (WebCore::SelectionController::selectAll):
          Don't try to determine whether selection is allowed inside the root node here.  VisiblePosition and Selection creation will keep Selection endpoints out of -webkit-user-select:none regions.
        
        * dom/Node.h:
        * dom/Node.cpp: (WebCore::Node::canStartSelection): Added. Always allows selection to be started in a content editable node.  If there's a parent, ask the parent if starting a selection is allowed.
          If there's no parent, default to allowing selection.
        * html/HTMLAnchorElement.h:
        * html/HTMLAnchorElement.cpp: (WebCore::HTMLAnchorElement::canStartSelection): Added. If its not a link, then calls the base class. Disallows selection for non-editable links.
          Allows selection for editable links.
          This logic used to be done in CSSStyleSelector by changing the user-select property.
        * html/HTMLButtonElement.h: (WebCore::HTMLButtonElement::canStartSelection): Added. Disallows selection from starting in buttons.
        * html/HTMLImageElement.h: (WebCore::HTMLImageElement::canStartSelection): Added. Disallows selection from starting in images.
        * html/HTMLInputElement.h:
        * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::canStartSelection): Added. Disallows selection from anything that's not a text field.  Text fields call up to the base class.
          When they're editable, text controls will always be selectable because of the case for content editable content. Otherwise, they'll respect their parent element's decision about starting a selection. 
        * html/HTMLSelectElement.h: (WebCore::HTMLSelectElement::canStartSelection): Added. Disallows selection from starting in popup buttons.

        * page/EventHandler.cpp:
        (WebCore::EventHandler::selectClosestWordFromMouseEvent): Use canMouseDownStartSelect instead of the ambiguously named shouldSelect().
        (WebCore::EventHandler::handleMousePressEventTripleClick): ditto.
        (WebCore::EventHandler::handleMousePressEventSingleClick): ditto.
        (WebCore::EventHandler::updateSelectionForMouseDrag): Use canMouseDragExtendSelect.
        (WebCore::EventHandler::selectCursor): Paint an ibeam in any region that allows you to click to create a selection.
        (WebCore::EventHandler::canMouseDownStartSelect): Now fires the selectStart event, and calls canStartSelection instead of checking the user-select property.
        (WebCore::EventHandler::canMouseDragExtendSelect): This is identical to canMouseDownStartSelect because of 12823, even though it seems strange that we would fire the selectStart event here.
        * page/EventHandler.h:
        * page/FocusController.cpp: (WebCore::clearSelectionIfNeeded): Calls canStartSelection instead of checking the user-select property to decide when to prevent selection creation. 
        * rendering/RenderObject.cpp: (WebCore::RenderObject::draggableNode): ditto.
        * rendering/RenderObject.h: Removed helper methods that are no longer needed.

        * rendering/RenderStyle.h: Made userSelect inherited.  After removing the "ignore" value, -webkit-user-select would behave like it was inherited 
          anyways since we already allowed the text value to override the none value.
          Removed the SELECT_AUTO and SELECT_IGNORE values since they're no longer used.
        (WebCore::):
        (WebCore::RenderStyle::userSelect):
        (WebCore::RenderStyle::setUserSelect):
        (WebCore::RenderStyle::initialUserSelect):
        * rendering/RenderStyle.cpp:
        (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
        (WebCore::StyleRareNonInheritedData::operator==):
        (WebCore::StyleRareInheritedData::StyleRareInheritedData):
        (WebCore::StyleRareInheritedData::operator==):
        (WebCore::RenderStyle::diff):

        * css/CSSComputedStyleDeclaration.cpp: (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): Remove case for SELECT_AUTO and SELECT_IGNORE
        * css/CSSStyleSelector.cpp:
        (WebCore::CSSStyleSelector::adjustRenderStyle):  Remove adjustment for links.  This is now handled in HTMLAnchorElement::canStartSelection.
        (WebCore::CSSStyleSelector::applyProperty): Map CSS_VAL_AUTO to SELECT_TEXT.  Remove CSS_VAL_IGNORE.

2007-09-18  Timothy Hatcher  <timothy@apple.com>

        Reviewed by Darin.

        <rdar://problem/5478250> REGRESSION: After pasting text copied from Mail subject and typing return, the cursor disappears because of negative left margin

        When pasting text from the Mail subject line, the RTF pasteboard contains text that has a first line negative indent along with a
        paragraph indent that has a counteracting positive indent. This results in the first line being flush left justified, and the remaining
        wrapped lines being indented. When this is converted to a DOM fragment, AppKit makes a block element with a margin-left and a negative
        text-indent that matches the RTF. So far this is all correct behavior.

        When this content is pasted on the line of an existing paragraph that has content, ReplaceSelectionCommand will decided to merge the paragraphs.
        This will convert the block element to a style span that has all inherited style properties. These inherited properties will still contain block
        properties that have no affect on inline elements. These block properties will hang around on the style span and will get cloned to new block
        elements if the user hit return on that line. The new block elements would then have the text-indent but not the margin-left, so the text would be
        hidden off the left edge of the page.

        In the end, we should never hang on to block-only properties in our style spans. This cuts out meaningless properties and prevents properties
        from magically affecting blocks later if the style is cloned for a new block element during a future editing operation.

        * editing/ReplaceSelectionCommand.cpp:
        (WebCore::ReplaceSelectionCommand::removeRedundantStyles): Remove any inherited block properties that are now in the span's style.
        * editing/markup.cpp:
        (WebCore::createMarkup): Ditto.

2007-09-18  Dave Hyatt  <hyatt@apple.com>

        Land a UnicodeRange helper class (ported from Mozilla) that we are going to use to prepare for making
        language-sensitive fallback choices for fonts.

        Reviewed by olliej

        * WebCore.vcproj/WebCore.vcproj:
        * platform/UnicodeRange.cpp: Added.
        (WebCore::):
        (WebCore::findCharUnicodeRange):
        (WebCore::langGroupFromUnicodeRange):
        * platform/UnicodeRange.h: Added.

2007-09-18  Dave Hyatt  <hyatt@apple.com>

        Fix a bug in my previous patch.  Make sure to select the old font back into the HDC and to also release the HDC.
       
        Reviewed by aroben

        * platform/win/FontCacheWin.cpp:
        (WebCore::FontCache::getFontDataForCharacters):

2007-09-18  Sam Weinig  <sam@webkit.org>

        Reviewed by Darin.

        Patch for <rdar://problem/5488478> Safari crashes when passing null to Range.insertNode()

        Test: fast/dom/Range-insertNode-crash.html

        * dom/Range.cpp:
        (WebCore::Range::insertNode): Null check the passed in node to insert.

2007-09-18  Mike Fenton  <mike@staikos.net>

        Reviewed by George Staikos.

        Retain the pen properties when changing one aspect of the pen.

        * html/CanvasStyle.cpp:
        (WebCore::CanvasStyle::applyStrokeColor):

2007-09-18  Mike Fenton  <mike@staikos.net>

        Reviewed by George Staikos.

        Make <canvas> work in more cases by restarting the painter after we
        finish painting, and restoring the pen and opacity.

        * html/HTMLCanvasElement.cpp:
        (WebCore::HTMLCanvasElement::paint):

2007-09-18  Mitz Pettel  <mitz@webkit.org>

        Reviewed by Darin.

        - fix http://bugs.webkit.org/show_bug.cgi?id=15169
          Freeze on Google maps using the "Dig a hole" tool
          <rdar://problem/5477414>

        Test: fast/dom/CSSStyleDeclaration-empty-string-property.html

        * bindings/js/JSCSSStyleDeclarationCustom.cpp:
        (WebCore::cssPropertyName): Added an early return if the property name
        is the empty string, thus avoiding a loop that is not prepared for that
        case.

2007-09-19  Darin Adler <darin@apple.com>

        Reviewed by Adam.

        - fix <rdar://problem/5415734> <select> draws incorrectly if size of menu options
          is changed after it pops up once

        * platform/win/PopupMenuWin.cpp:
        (WebCore::PopupMenu::PopupMenu): Removed unnecessary initialization of IntRect.
        (WebCore::PopupMenu::show): Check that the clientRect is empty instead of checking
        the entire windowRect -- this fixes a bug where we pop up a tiny 2-pixel high black
        box when you click on an empty menu.
        (WebCore::PopupMenu::visibleItems): Base the number of items on the client rect
        instead of the window rect. Rounding down means this would have worked anyway, but
        it's more correct to do it this way.
        (WebCore::PopupMenu::paint): Deallocate the bitmap so it gets reallocated if it
        has the wrong width or height (or if GetObject returns false, which should not
        happen in practice).

2007-09-18  David Harrison  <harrison@apple.com>

        Reviewed by Darin.

        <rdar://problem/5486974> REGRESSION(r25373): 1/4 second to doubleclick word in GMail when using Kotoeri IM, also slow in other IMs (15163)

        Updated tests:
        * fast/dom/Window/window-xy-properties-expected.txt:
        * fast/dom/plugin-attributes-enumeration-expected.txt:
        * fast/events/onerror-bubbling-expected.txt:
        * fast/events/related-target-expected.txt:
        * fast/forms/select-namedItem-expected.txt:
        * fast/table/incomplete-table-in-fragment-2-expected.txt:
        * fast/table/incomplete-table-in-fragment-hang-expected.txt:
        * fast/table/large-rowspan-crash-expected.txt:
        * plugins/embed-attributes-setting-expected.txt:

        * editing/TextIterator.cpp:
        (WebCore::TextIterator::shouldRepresentNodeOffsetZero):
        Avoid VisiblePosition check if the current node is a descendant
        of the start container and the start offset was 0. In that case
        we already had enough context to correctly decide whether to emit
        a newline after a preceding block. We chose not to emit
        (m_haveEmitted is false), so don't second guess that.
            
        (WebCore::TextIterator::exitNode):
        Changed some comments.

2007-09-17  Geoffrey Garen  <ggaren@apple.com>

        Reviewed by Darin Adler.

        Speculative fix for <rdar://problem/5479443> REGRESSION: Hang due to 
        infinite JS recursion on close @ engadget.com (onunload-based ad)
        
        If page is NULL, shouldInterruptScript now returns true, so you can't 
        get stuck in a state in which a script executes forever without putting 
        up a UI to ask if it should stop.

        * bindings/js/kjs_binding.cpp:
        (KJS::ScriptInterpreter::shouldInterruptScript):

2007-09-17  Dave Hyatt  <hyatt@apple.com>

        Fix for bug 14743, missing glyphs on many international sites because of MLang's tiny cache.
        
        Bypass Mlang's cache entirely.  Get the mapped font from MLang, obtain the font name, and then feed
        the name back into our own system so that it gets created and cached again without MLang being involved.
        Then free up the font obtained from MLang immediately so that its cache just remains empty.
           
        Reviewed by aroben

        * platform/FontData.h:
        (WebCore::FontData::isSystemFont):
        * platform/win/FontCacheWin.cpp:
        (WebCore::FontCache::getFontDataForCharacters):
        * platform/win/FontDataWin.cpp:
        (WebCore::FontData::platformInit):
        (WebCore::FontData::platformDestroy):
        * platform/win/UniscribeController.cpp:
        (WebCore::UniscribeController::shapeAndPlaceItem):
        
2007-09-17  Adam Roben  <aroben@apple.com>

        Fix <rdar://5423441> Should get focus ring color from SafariTheme

        Reviewed by Hyatt.

        No regression test possible.

        * WebCore.vcproj/WebCore.vcproj: Added ColorSafari.cpp.
        * platform/graphics/win/ColorSafari.cpp: Added.
        (WebCore::makeRGBAFromCGColor): Added.
        (WebCore::focusRingColor): Added. Gets the focus ring color from
        SafariTheme if SafariTheme has support for it.
        (WebCore::setFocusRingColorChangeFunction): Added.
        * platform/win/TemporaryLinkStubs.cpp: Removed focus ring color
        functions.

2007-09-17  Anders Carlsson  <andersca@apple.com>

        Fix Windows build.

        * WebCore.vcproj/WebCore.vcproj:
        * loader/NetscapePlugInStreamLoader.h:

2007-09-17  Anders Carlsson  <andersca@apple.com>

        Fix Mac build.
        
        * loader/NetscapePlugInStreamLoader.cpp:
        * loader/NetscapePlugInStreamLoader.h:
        * loader/win/NetscapePlugInStreamLoaderWin.cpp: Copied from loader/NetscapePlugInStreamLoader.cpp.

2007-09-17  Anders Carlsson  <andersca@apple.com>

        Reviewed by Adam.

        <rdar://problem/5483346>
        crash at vw.com WebCore::PluginViewWin::disconnectStream.
        
        The following events would lead to this crash:
        
        1. a plug-in stream finishes loading and calls NPP_DestroyStream.
        2. the DestroyStream handler calls NPN_Evaluate, submitting a form through JavaScript.
        3. A new page is going to be loaded and DocumentLoader::stopLoading is called.
        4. DocumentLoader::stopLoading will stop all loader, including the one that is done loading!
        
        The fix is to port NetscapePluginStreamLoader over from the Mac code and use it instead. This fixes the crash
        because it disassociates the stream loader with the document loader _before_ calling NPP_DestroyStream, whereas
        SubresourceLoader does this _after_ calling NPP_DestroyStream. 
        
        * loader/NetscapePlugInStreamLoader.cpp:
        (WebCore::NetscapePlugInStreamLoader::NetscapePlugInStreamLoader):
        (WebCore::NetscapePlugInStreamLoader::~NetscapePlugInStreamLoader):
        (WebCore::NetscapePlugInStreamLoader::create):
        (WebCore::NetscapePlugInStreamLoader::isDone):
        (WebCore::NetscapePlugInStreamLoader::releaseResources):
        (WebCore::NetscapePlugInStreamLoader::didReceiveResponse):
        (WebCore::NetscapePlugInStreamLoader::didReceiveData):
        (WebCore::NetscapePlugInStreamLoader::didFinishLoading):
        (WebCore::NetscapePlugInStreamLoader::didFail):
        (WebCore::NetscapePlugInStreamLoader::didCancel):
        * loader/NetscapePlugInStreamLoader.h:
        (WebCore::NetscapePlugInStreamLoaderClient::didFinishLoading):
        * plugins/win/PluginStreamWin.cpp:
        (WebCore::PluginStreamWin::start):
        (WebCore::PluginStreamWin::didReceiveResponse):
        (WebCore::PluginStreamWin::didReceiveData):
        (WebCore::PluginStreamWin::didFail):
        (WebCore::PluginStreamWin::didFinishLoading):
        * plugins/win/PluginStreamWin.h:
        * plugins/win/PluginViewWin.cpp:
        (WebCore::PluginViewWin::load):

2007-09-17  Anders Carlsson  <andersca@apple.com>

        Reviewed by Adam.

        <rdar://problem/5483839>
        Crash loading http://www.microsoft.com if Silverlight 1.0 is installed.
        
        Work around a problem in our NPRuntime implementation by never unloading the silverlight plug-in dll.
        
        * plugins/win/PluginViewWin.cpp:
        (WebCore::PluginViewWin::~PluginViewWin):
        (WebCore::PluginViewWin::determineQuirks):
        * plugins/win/PluginViewWin.h:
        (WebCore::):

2007-09-17  Brady Eidson  <beidson@apple.com>

        Reviewed by John Sullivan

        Fix for http://bugs.webkit.org/show_bug.cgi?id=15178
        and
        <rdar://problem/5474001>

        The stress test proves that this was an overzealous ASSERT.  It is very possible to mark an icon
        for addition to the on-disk database and then mark it for removal before it is ever written out.  
        This is not an error and was already handled gracefully

        * loader/icon/IconDatabase.cpp:
        (WebCore::IconDatabase::removeIconFromSQLDatabase): Don't ASSERT of log if the icon wasn't on disk

2007-09-17  Brady Eidson  <beidson@apple.com>

        Reviewed by Oliver

        <rdar://problem/5487048> - ASSERT in stress test in IconDatabase

        If a PageURLRecord went away, it never clears its URL from the IconRecord it retained.

        * loader/icon/PageURLRecord.cpp:
        (WebCore::PageURLRecord::~PageURLRecord): Set the icon record to 0, clearing the page url
        * loader/icon/PageURLRecord.h: Add the destructor

2007-09-17  Antti Koivisto  <antti@apple.com>

        Reviewed by Darin.
        
        Fix <rdar://problem/5480050>
        Leopard9A551 with Dashcode 112: Dashcode crash when dragging image into canvas.
        
        If @import stylesheet was modified through CSS DOM style selector would not get updated. This
        could lead to crashes.

        Test: fast/css/import-style-update.html

        * css/CSSStyleSheet.cpp:
        (WebCore::CSSStyleSheet::styleSheetChanged):

2007-09-17  Anders Carlsson  <andersca@apple.com>

        Reviewed by Adam.

        <rdar://problem/5421997>
        http://bugs.webkit.org/show_bug.cgi?id=14247
        Display problem with Flash - image does not stop changing
        
        Port the manual load code over from the Mac version.

        * plugins/win/PluginDatabaseWin.cpp:
        (WebCore::PluginDatabaseWin::createPluginView):
        * plugins/win/PluginDatabaseWin.h:
        Add load manually parameter.
        
        * plugins/win/PluginStreamWin.cpp:
        (WebCore::PluginStreamWin::stop):
        If we're loading manually, cancel the main resource load.
         
        (WebCore::PluginStreamWin::destroyStream):
        Don't disconnect the stream if we're loading manually.
        
        * plugins/win/PluginViewWin.cpp:
        (WebCore::PluginViewWin::setFrameGeometry):
        Always call updateWindow()
        
        (WebCore::PluginViewWin::PluginViewWin):
        Initialize loadManually.
        
        (WebCore::PluginViewWin::init):
        Don't set the width and height of the window here since it will make the plug-in HWND show briefly
        before it's been positioned.
        
        (WebCore::PluginViewWin::didReceiveResponse):
        Create the manual stream.
        
        (WebCore::PluginViewWin::didReceiveData):
        (WebCore::PluginViewWin::didFinishLoading):
        (WebCore::PluginViewWin::didFail):
        Call through to the manual stream.
        
        * plugins/win/PluginViewWin.h:

2007-09-16  Sam Weinig  <sam@webkit.org>

        Reviewed by Maciej.

        Fix for http://bugs.webkit.org/show_bug.cgi?id=14693
        document.width/height doesn't force layout

        Test: fast/dom/document-width-height-force-layout.html

        * html/HTMLDocument.cpp:
        (WebCore::HTMLDocument::width): Force layout.
        (WebCore::HTMLDocument::height): ditto.
        * html/HTMLDocument.h:

2007-09-15  Holger Hans Peter Freyther  <zecke@selfish.org>

        Reviewed by Mark.

        Convert the filenames from WebCore::String to the filesystem encoding
        and vice versa using g_filename_{from,to}_utf8 functions. Also add the needed NULL
        checks for the return values where glib and gtk+ can return NULL.

        * platform/gdk/FileChooserGdk.cpp:
        (WebCore::convertToStringByAdoptingTheFilesystemRepresentation):
        (WebCore::FileChooser::openFileChooser):
        (WebCore::FileChooser::basenameForWidth):

2007-09-15  Holger Hans Peter Freyther  <zecke@selfish.org>

        Reviewed by Mark.

        Use the new WebCore::String::fromUTF8 function to create
        the labels.

        * platform/gdk/LocalizedStringsGdk.cpp:
        (WebCore::submitButtonDefaultLabel):
        (WebCore::inputElementAltText):
        (WebCore::resetButtonDefaultLabel):
        (WebCore::searchableIndexIntroduction):
        (WebCore::fileButtonChooseFileLabel):
        (WebCore::fileButtonNoFileSelectedLabel):
        (WebCore::contextMenuItemTagOpenLinkInNewWindow):
        (WebCore::contextMenuItemTagDownloadLinkToDisk):
        (WebCore::contextMenuItemTagCopyLinkToClipboard):
        (WebCore::contextMenuItemTagOpenImageInNewWindow):
        (WebCore::contextMenuItemTagDownloadImageToDisk):
        (WebCore::contextMenuItemTagCopyImageToClipboard):
        (WebCore::contextMenuItemTagOpenFrameInNewWindow):
        (WebCore::contextMenuItemTagCopy):
        (WebCore::contextMenuItemTagGoBack):
        (WebCore::contextMenuItemTagGoForward):
        (WebCore::contextMenuItemTagStop):
        (WebCore::contextMenuItemTagReload):
        (WebCore::contextMenuItemTagCut):
        (WebCore::contextMenuItemTagPaste):
        (WebCore::contextMenuItemTagNoGuessesFound):
        (WebCore::contextMenuItemTagIgnoreSpelling):
        (WebCore::contextMenuItemTagLearnSpelling):
        (WebCore::contextMenuItemTagSearchWeb):
        (WebCore::contextMenuItemTagLookUpInDictionary):
        (WebCore::contextMenuItemTagOpenLink):
        (WebCore::contextMenuItemTagIgnoreGrammar):
        (WebCore::contextMenuItemTagSpellingMenu):
        (WebCore::contextMenuItemTagShowSpellingPanel):
        (WebCore::contextMenuItemTagCheckSpelling):
        (WebCore::contextMenuItemTagCheckSpellingWhileTyping):
        (WebCore::contextMenuItemTagCheckGrammarWithSpelling):
        (WebCore::contextMenuItemTagFontMenu):
        (WebCore::contextMenuItemTagBold):
        (WebCore::contextMenuItemTagItalic):
        (WebCore::contextMenuItemTagUnderline):
        (WebCore::contextMenuItemTagOutline):
        (WebCore::contextMenuItemTagWritingDirectionMenu):
        (WebCore::contextMenuItemTagDefaultDirection):
        (WebCore::contextMenuItemTagLeftToRight):
        (WebCore::contextMenuItemTagRightToLeft):
        (WebCore::contextMenuItemTagInspectElement):
        (WebCore::searchMenuNoRecentSearchesText):
        (WebCore::searchMenuRecentSearchesText):
        (WebCore::searchMenuClearRecentSearchesText):

2007-09-15  Holger Hans Peter Freyther  <zecke@selfish.org>

        Reviewed by Mark.

        Add WebCore::String::fromUTF8 to convert from UTF-8
        to a WebCore::String. This is meant to be used by
        the Gtk+ port and the signature and implementation
        is similiar to the one of DeprecatedString.

        * platform/PlatformString.h:
        * platform/String.cpp:
        (WebCore::String::fromUTF8):

2007-09-13  Holger Hans Peter Freyther  <zecke@selfish.org>

        Reviewed by Anders.

        Implement the fileExists and deleteFile functions
        using glib.

        * WebCore.pro:
        * platform/gdk/FileSystemGdk.cpp: Added.
        (WebCore::fileExists):
        * platform/gdk/TemporaryLinkStubs.cpp:

2007-09-16  David Harrison  <harrison@apple.com>

        Reviewed by Darin.

        <rdar://problem/5472125> REGRESSION (9A535-9A548): No VO cursor shown when navigating in a mail message body

        The problem was that the visible units code was mishandling non-editable content, generating null
        VisiblePositions instead of the actual boundary VisiblePositions.
        
        Updated tests:
        * fast/dom/Window/window-xy-properties-expected.txt:
        * fast/dom/plugin-attributes-enumeration-expected.txt:
        * fast/events/onerror-bubbling-expected.txt:
        * fast/events/related-target-expected.txt:
        * fast/forms/select-namedItem-expected.txt:
        * fast/table/incomplete-table-in-fragment-2-expected.txt:
        * fast/table/incomplete-table-in-fragment-hang-expected.txt:
        * fast/table/large-rowspan-crash-expected.txt:
        * plugins/embed-attributes-setting-expected.txt:
       
        Source Changes:
        * editing/VisiblePosition.cpp:
        (WebCore::VisiblePosition::next):
        (WebCore::VisiblePosition::previous):
        (WebCore::VisiblePosition::honorEditableBoundaryAtOrBefore):
        (WebCore::VisiblePosition::honorEditableBoundaryAtOrAfter):
        Rename firstEditablePositionAtOrAfter to honorEditableBoundaryAtOrAfter.
        Rename firstEditablePositionAtOrBefore to honorEditableBoundaryAtOrBefore.
        Changed these two functions to handle non-editable positions.
        
        * editing/VisiblePosition.h:
        * editing/visible_units.cpp:
        (WebCore::previousWordPosition):
        (WebCore::nextWordPosition):
        (WebCore::positionAvoidingFirstPositionInTable):
        (WebCore::startPositionForLine):
        (WebCore::startOfLine):
        (WebCore::endOfLine):
        (WebCore::previousSentencePosition):
        (WebCore::nextSentencePosition):
        Rename firstEditablePositionAtOrAfter to honorEditableBoundaryAtOrAfter.
        Rename firstEditablePositionAtOrBefore to honorEditableBoundaryAtOrBefore.
        Also, startOfLine() now calls positionAvoidingFirstPositionInTable() in the empty block early return case.
        positionAvoidingFirstPositionInTable() was the logic startOfLine() used in the normal case. Now in a reusable function.

2007-09-14  Oliver Hunt  <oliver@apple.com>

        Reviewed by Adam.

        Mac doesn't have any kind of not implemented macro, so we'll actually implement
        fileSize.

        * platform/mac/FileSystemMac.mm:
        (WebCore::fileSize):

2007-09-14  Timothy Hatcher  <timothy@apple.com>

        Initialize m_dialogArguments to 0. Fixes the newly crashing layout tests.

        * bindings/js/kjs_window.cpp:
        (KJS::WindowPrivate::WindowPrivate):

2007-09-14  Oliver Hunt  <oliver@apple.com>

        Reviewed by Brady, John H.

        <rdar://problem/5483632> File system operation wrappers are unimplemented on windows
        
        Implement Windows versions of fileExists and deleteFile. 
        Also corrects fileSize to use a 64-bit version of stat.

        * platform/win/FileSystemWin.cpp:
        (WebCore::fileSize):  
          Renamed argument to be more consistent with others.
          And converted to _stat32i64 to allow 64-bit filesizes
        (WebCore::fileExists):
        (WebCore::deleteFile):
        * platform/win/TemporaryLinkStubs.cpp:

2007-09-14  Oliver Hunt  <oliver@apple.com>

        Reviewed by Sam and Geoff.

        <rdar://problem/5333272> Cannot upload files when path contains 
        non-ascii/multibyte characters

        We can't use _stat to determine file size on Windows as it may not 
        correctly handle multibyte characters, so we have to use _wstat.
        
        In deference to the fact that we may one day use the FormDataStreamCFNet.cpp
        on Mac i've wrapped the call to _wstat with a generic fileSize
        method in FileSystem.h

        * WebCore.vcproj/WebCore.vcproj:
        * platform/FileSystem.h:
        * platform/network/cf/FormDataStreamCFNet.cpp:
        * platform/win/FileSystemWin.cpp: Added.
        (WebCore::setHTTPBody):
        * platform/gdk/TemporaryLinkStubs.cpp:
        * platform/mac/FileSystemMac.mm:
        (WebCore::fileSize):
        * platform/qt/TemporaryLinkStubs.cpp:

2007-09-14  Timothy Hatcher  <timothy@apple.com>

        Reviewed by Sam.

        <rdar://problem/5472970> REGRESSION (r24276): TinyMCE popups show an empty window with no content

        Accessing the document of a window before the load finished would cause the window
        object to hold onto the initial empty document, and never switch over to the real document
        once the load finished. This regression was caused by r24276 which added a check to prevent
        clearing the window object when the load finished. The absence of this clear allowed the
        dialogArguments set with showModalDialog to persist on the window after the load. However,
        not clearing the window would keep other properties (and the empty document object) around.

        So the fix is to store away the dialog arguments that were passed to showModalDialog and
        put them back on the window object in the dialogArguments property each time
        the window is cleared.

        * bindings/js/kjs_window.cpp:
        (KJS::createWindow): No longer put dialogArguments on the window here.
        (KJS::showModalDialog): Put dialogArguments on the window and call
        setDialogArgumentsAndReturnValueSlot to remember the arguments.
        (KJS::Window::clear): Put m_dialogArguments back on the window as dialogArguments.
        (KJS::WindowFunc::callAsFunction): Call the new setDialogArgumentsAndReturnValue.
        (KJS::Window::setDialogArgumentsAndReturnValue): Store the arguments in m_dialogArguments.
        * bindings/js/kjs_window.h: Rename setReturnValueSlot to setDialogArgumentsAndReturnValueSlot.
        * manual-tests/modal-dialog-arguments.html: Confirmed that this test still passes.

        Reverted r24276 which was all the changes in FrameLoader.cpp and FrameLoader.h.

        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::FrameLoader): Remove m_shouldClearWindowProperties.
        (WebCore::FrameLoader::createWindow): Remove the call to setShouldClearWindowProperties.
        (WebCore::FrameLoader::clear): No longer check m_shouldClearWindowProperties, clear the
        window whenever clearWindowProperties is set.
        (WebCore::FrameLoader::begin): Remove m_shouldClearWindowProperties.
        (WebCore::FrameLoader::open): Ditto.
        * loader/FrameLoader.h: Remove m_shouldClearWindowProperties.

2007-09-14  Brady Eidson  <beidson@apple.com>

        How about a build fix that works on *all* platforms?

        * platform/Threading.h:
        (WebCore::initializeThreading):

2007-09-14  Brady Eidson  <beidson@apple.com>

        Roll out my previous build fix and just make the stupid thing inline
        (I knew there was something easier but oh boy, no coffee yet... weinig?)

2007-09-14  Brady Eidson  <beidson@apple.com>

        Rubberstamped by Mark Rowe

        Add the logging channel I just created to the initialize list on Mac

        * platform/mac/LoggingMac.mm:
        (WebCore::InitializeLoggingChannelsIfNecessary):

2007-09-14  Brady Eidson  <beidson@apple.com>

        Build fix

        That method can't go in the header, apparently

        * platform/Threading.h:
        * platform/gdk/TemporaryLinkStubs.cpp:
        (WebCore::initializeThreading):
        * platform/mac/Threading.mm:
        (WebCore::initializeThreading):
        * platform/qt/TemporaryLinkStubs.cpp:
        (WebCore::initializeThreading):

2007-09-14  Brady Eidson  <beidson@apple.com>

        Reviewed by Darin

        -Add callOnMainThread() implementation to Windows

        * WebCore.vcproj/WebCore.vcproj:
        
        * loader/icon/IconDatabase.cpp:
        (WebCore::IconDatabase::open): Call initializeThreading() from the main thread before kicking off the secondary thread
        
        * platform/Logging.cpp: Added Threading logging channel
        (WebCore::):
        * platform/Logging.h: Ditto
        
        * platform/Threading.h:
        (WebCore::initializeThreading): Added - only needs Windows impl for now
        * platform/win/ThreadingWin.cpp: Added.
        (WebCore::callFunctionsOnMainThread): Calls each function currently in the main-thread queue
        (WebCore::ThreadingWindowWndProc):
        (WebCore::initializeThreading): Creates a message-only window to use for callOnMainThread()
        (WebCore::callOnMainThread): Queues the function to be called and posts a message to the threading
          window such that the function-call-queue can be addressed
        
        * platform/win/TemporaryLinkStubs.cpp:
        (WebCore::signedPublicKeyAndChallengeString):
        
2007-09-14  Anders Carlsson  <andersca@apple.com>

        Reviewed by Adam.

        <rdar://problem/5316743>
        Safari does not handle filename parameter of content-disposition
        
        Use CFURLResponseCopySuggestedFilename instead of our own hand-rolled implementation. 
        
        While we do return the correct filename in all cases I've tried, using CFNetwork is better because
        it might handle corner cases that we don't.
        
        * platform/network/cf/ResourceResponseCFNet.cpp:
        (WebCore::ResourceResponse::doUpdateResourceResponse):
        
2007-09-14  Geoffrey Garen  <ggaren@apple.com>

        Reviewed by Adam Roben.

        Fixed http://bugs.webkit.org/show_bug.cgi?id=15209
        Sometimes removing an iframe from the DOM does not remove its frame 
        from the page

        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::requestFrame): Use the contentFrame pointer
        directly instead of searching for a frame by the frame element's name, 
        because the frame element's name may have changed. (Another reason to do
        this is that it's just plain more straight-forward and efficient.)

2007-09-14  Darin Adler  <darin@apple.com>

        Reviewed by Mitz and Kevin Decker.

        - fix http://bugs.webkit.org/show_bug.cgi?id=15197
          <rdar://problem/5478271> REGRESSION: Some Yahoo text entry fields
          render as lines rather than text entry boxes

        Test: fast/forms/textarea-rows-cols.html

        * html/HTMLTextAreaElement.cpp:
        (WebCore::HTMLTextAreaElement::HTMLTextAreaElement): Use constants for the default number
        of rows and columns.
        (WebCore::HTMLTextAreaElement::parseMappedAttribute): If rows/cols attribute has a value
        that's missing, non-numeric, or zero, then use the default value. Also check for the
        case where the effective value of the attribute isn't changing.

2007-09-14  Sven Herzberg  <sven@imendio.com>

        Reviewed by George.

        Don't maintain obsolete code, fixes:
        http://bugs.webkit.org/show_bug.cgi?id=15215

        * platform/gdk/FontPlatformData.cpp: remove static
        FontPlatformData::list() (isn't used at any place)

2007-09-14  Sven Herzberg  <sven@imendio.com>

        Reviewed by Adam Roben.

        Don't use fontconfig types if necessary, fixes:
        http://bugs.webkit.org/show_bug.cgi?id=15203

        * platform/gdk/FontPlatformData.cpp: don't use an FcBool to store the
        initialized state, use a plain c++ bool instead

2007-09-13  Brady Eidson  <beidson@apple.com>

        Reviewed by Maciej

        <rdar://problem/5480437> - No site icon at launch and related error messages

        The error message was actually indicative of a larger bug that might've resulted in icons getting
        improperly pruned because they were never added to the set of retained page URLs.

        To solve the no-icon-at-launch problem, we send the "didReceiveIcon:" delegate call for every page 
        load that has an icon, whether the icon comes in from network, from disk, or was already in ram

        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::startIconLoader): Always send the didReceiveIcon delegate call when an icon's 
          image data is known

        * loader/icon/IconDatabase.cpp:
        (WebCore::IconDatabase::retainIconForPageURL): Much more accurately track the set of retained pages by
          adding them when their retain count moves from 0 to 1

        * loader/icon/PageURLRecord.h:
        (WebCore::PageURLRecord::retain): Correctly distinguish the "retain count just went from 0 to 1" case
          in the return value

2007-09-13  Brady Eidson  <beidson@apple.com>

        Rubberstamped by Geoff and Maciej

        Fix MSVC build warning due to out of range data in a char array

        * loader/icon/IconDatabase.cpp:
        (WebCore::IconDatabase::defaultIcon): The buffer is now unsigned data

        * platform/SharedBuffer.cpp:
        (WebCore::SharedBuffer::SharedBuffer): Add the "unsigned char*" c'tor
        * platform/SharedBuffer.h:

2007-09-13  Darin Adler  <darin@apple.com>

        Reviewed by Oliver.

        - fix <rdar://problem/5470457> REGRESSION: Input method inline hole is mishandled in text
          <input> elements with maxlength limit

        * editing/Editor.h: Moved MarkedTextUnderline here and renamed it CompositionUnderline.
        Moved the rest of the marked text API here and used the term that will be more familiar
        to those on platforms other than Macintosh, "composition". This helps prevent confusion
        with the other kinds of mark -- the emacs "mark" and spelling/grammar marks. Also
        cleaned up the conditionals a bit for the Macintosh-specific parts of this header.

        * editing/Editor.cpp:
        (WebCore::Editor::Editor): Updated for name change.
        (WebCore::Editor::clear): Added. To be called by FrameLoader::clear().
        (WebCore::Editor::insertTextWithoutSendingTextEvent): Removed code to make inserted
        text replace the marked text range -- we now deal with this explicitly by not
        calling this function to replace marked text. Also removed unneeded code that was
        specific to the use of this to replace the marked text.
        (WebCore::Editor::selectComposition): Renamed from selectMarkedText. Updated since
        the composition range is not stored as a Range.
        (WebCore::Editor::confirmComposition): Added. To be called when changing a composition
        into actual text. Unlike the old code path, deletes the composition first, then inserts
        the text, triggering the normal insertion code path and events. This is helpful because
        it means the inserted text will be truncated by the <input> element, for example.
        (WebCore::Editor::confirmCompositionWithoutDisturbingSelection): Added.
        (WebCore::Editor::setComposition): Added. To be called when changing the composition.
        Takes parameters for the underlines and selection. Unlike the old code path, this passes
        a flag down that indicates the inserted text is part of a composition. This is helpful
        because we don't send the event that will cause the <input> element to do truncation.
        It's also a better API for future improvements to our input method handling.
        (WebCore::Editor::revealSelectionAfterEditingOperation): Updated for name change.
        (WebCore::Editor::setIgnoreCompositionSelectionChange): Ditto.
        (WebCore::Editor::compositionRange): Added. Needed now that the composition is not
        stored as a Range.
        (WebCore::Editor::getCompositionSelection): Added.

        * editing/TypingCommand.h:
        * editing/TypingCommand.cpp: (WebCore::TypingCommand::insertText):
        Added an insertedTextIsComposition parameter, and don't send the BeforeTextInsertedEvent
        if it's true.

        * loader/FrameLoader.cpp: (WebCore::FrameLoader::clear): Replaced the Macintosh-specific
        call to setMarkedTextRange with a call to the new Editor::clear().

        * page/Frame.h:
        * page/Frame.cpp:
        * page/FramePrivate.h:
        * page/mac/FrameMac.mm:
        Removed the marked text code. It was streamlined and moved to Editor, except for the
        Mac-specific code, which was moved into WebKit.

        * page/mac/WebCoreFrameBridge.h:
        * page/mac/WebCoreFrameBridge.mm: Removed some now-unneeded marked text code.
        (-[WebCoreFrameBridge markedTextNSRange]): Updated for name/API change.

        * rendering/InlineTextBox.h:
        * rendering/InlineTextBox.cpp:
        (WebCore::InlineTextBox::paint): Updated marked text code for name changes, and also
        streamlined the code a bit for the case where there is no composition.
        (WebCore::InlineTextBox::paintCompositionBackground): Name change.
        (WebCore::InlineTextBox::paintCompositionUnderline): Ditto.

        * rendering/RenderTextControl.h:
        * rendering/RenderTextControl.cpp:
        (WebCore::RenderTextControl::finishText): Added. Helper function shared by the
        (WebCore::RenderTextControl::text):
        (WebCore::getNextSoftBreak):
        (WebCore::RenderTextControl::textWithHardLineBreaks):

        * platform/CharacterNames.h: Added newlineCharacter.

        * dom/Range.h: Remove the now-unneeded version of toString that converts <br>
        elements into newlines.
        * dom/Range.cpp:
        (WebCore::Range::toString): Changed this to use a Vector<UChar> instead of
        a String so it will not have pathological reallocation performance, and removed
        the <br> feature.
        (WebCore::Range::pastEndNode): Made this return 0 when there is no start node.
        This bit of extra robustness guarantees you can't do a null dereference if the
        start node is 0 and the end node is not. Not sure this case really exists.

        * page/ContextMenuController.cpp: (ContextMenuController::contextMenuItemSelected):
        Removed a semi-bogus use of Range::toString(true). The right function to use here
        is plainText().

        * bridge/EditorClient.h: Removed obsolete markedTextAbandoned function.

        * WebCore.exp: Updated for above changes. 

2007-09-13  Anders Carlsson  <andersca@apple.com>

        Reviewed by Adam and Geoff.

        <rdar://problem/5304000>
        Windows Safari doesn't always call NPP_SetWindow() for NPAPI plugins.
        
        This does two things:
        
        1. Makes sure that the plug-in get the correct initial size.
        
        2. Always updates the size of the HWND, even if the widget size didn't change. This is because
        the widget size can be different before the HWND has been created.
        
        * plugins/win/PluginDatabaseWin.cpp:
        (WebCore::PluginDatabaseWin::createPluginView):
        * plugins/win/PluginDatabaseWin.h:
        * plugins/win/PluginViewWin.cpp:
        (WebCore::PluginViewWin::setFrameGeometry):
        (WebCore::PluginViewWin::PluginViewWin):
        * plugins/win/PluginViewWin.h:

2007-09-13  Kevin McCullough  <kmccullough@apple.com>

        Reviewed by Geof, Sam, Adam, Hyatt, Darin.

        - <rdar://problem/5480234> JS setTimeout function requires a second argument
        - Removed check for number of arguments in setTimeout to behave like other browsers.
        - Added layoutTest setTimeout-no-arguments.html

        * bindings/js/kjs_window.cpp:
        (KJS::WindowFunc::callAsFunction):

2007-09-13   Dave Hyatt  <hyatt@apple.com>

        Some minor Windows font improvements before I make the larger changes.
        
        Reviewed by aroben, weinig

        * platform/win/FontCacheWin.cpp:
        (WebCore::FontCache::getFontDataForCharacters):
        Don't use the currently selected font in the HDC when passing priority code pages to MLANG.  Make
        sure to use ACP code pages instead so that there won't be any confusion regarding traditional vs.
        simplified chinese, etc.

        * platform/win/FontDataWin.cpp:
        (WebCore::FontData::containsCharacters):
        Rewrite containsCharacters so that it isn't glyph-dependent (since CG doesn't shape, this call is
        rejecting fonts that it shouldn't).  Re-implement this method in terms of MLang and use code page
        testing.
        
        * platform/win/UniscribeController.cpp:
        (WebCore::UniscribeController::itemizeShapeAndPlace):
        Add some comments to explain the additional item in the items array.
       
        (WebCore::UniscribeController::shape):
        Fix up the missing glyph check when doing uniscribe shaping.  Only wgDefault matters as far as doing
        font fallback.
        
2007-09-13  kuchhal  <kuchhal@yahoo.com>

        Reviewed, tweaked and landed by Anders.

        <rdar://problem/5461153> 
        http://bugs.webkit.org/show_bug.cgi?id=15143
        Crash seen on Windows
        
        Null check frame before calling Frame::settings.
        
        * loader/PluginDocument.cpp:
        (WebCore::PluginTokenizer::writeRawData):

2007-09-12  Holger Hans Peter Freyther  <zecke@selfish.org>

        Reviewed by Mark.

        Implement the FileChooser for the WebKit/Gtk+ port by using
        the GtkFileChooserDialog and g_path_get_basename to get the
        basename for the current filename.


        * WebCore.pro:
        * platform/gdk/FileChooserGdk.cpp: Added.
        (WebCore::FileChooser::FileChooser):
        (WebCore::FileChooser::~FileChooser):
        (WebCore::FileChooser::openFileChooser):
        (WebCore::FileChooser::basenameForWidth):
        * platform/gdk/TemporaryLinkStubs.cpp:

2007-09-12  Holger Hans Peter Freyther  <zecke@selfish.org>

        Reviewed by Mark.

        Move the "string" functions from the TemporaryLinkStubs.cpp
        to LocalizedStringsGdk.cpp and implement them using the text
        from the win port and glib-i18n (gettext).

        * platform/gdk/LocalizedStringsGdk.cpp: Added.
        (WebCore::submitButtonDefaultLabel):
        (WebCore::inputElementAltText):
        (WebCore::resetButtonDefaultLabel):
        (WebCore::searchableIndexIntroduction):
        (WebCore::fileButtonChooseFileLabel):
        (WebCore::fileButtonNoFileSelectedLabel):
        (WebCore::contextMenuItemTagOpenLinkInNewWindow):
        (WebCore::contextMenuItemTagDownloadLinkToDisk):
        (WebCore::contextMenuItemTagCopyLinkToClipboard):
        (WebCore::contextMenuItemTagOpenImageInNewWindow):
        (WebCore::contextMenuItemTagDownloadImageToDisk):
        (WebCore::contextMenuItemTagCopyImageToClipboard):
        (WebCore::contextMenuItemTagOpenFrameInNewWindow):
        (WebCore::contextMenuItemTagCopy):
        (WebCore::contextMenuItemTagGoBack):
        (WebCore::contextMenuItemTagGoForward):
        (WebCore::contextMenuItemTagStop):
        (WebCore::contextMenuItemTagReload):
        (WebCore::contextMenuItemTagCut):
        (WebCore::contextMenuItemTagPaste):
        (WebCore::contextMenuItemTagNoGuessesFound):
        (WebCore::contextMenuItemTagIgnoreSpelling):
        (WebCore::contextMenuItemTagLearnSpelling):
        (WebCore::contextMenuItemTagSearchWeb):
        (WebCore::contextMenuItemTagLookUpInDictionary):
        (WebCore::contextMenuItemTagOpenLink):
        (WebCore::contextMenuItemTagIgnoreGrammar):
        (WebCore::contextMenuItemTagSpellingMenu):
        (WebCore::contextMenuItemTagShowSpellingPanel):
        (WebCore::contextMenuItemTagCheckSpelling):
        (WebCore::contextMenuItemTagCheckSpellingWhileTyping):
        (WebCore::contextMenuItemTagCheckGrammarWithSpelling):
        (WebCore::contextMenuItemTagFontMenu):
        (WebCore::contextMenuItemTagBold):
        (WebCore::contextMenuItemTagItalic):
        (WebCore::contextMenuItemTagUnderline):
        (WebCore::contextMenuItemTagOutline):
        (WebCore::contextMenuItemTagWritingDirectionMenu):
        (WebCore::contextMenuItemTagDefaultDirection):
        (WebCore::contextMenuItemTagLeftToRight):
        (WebCore::contextMenuItemTagRightToLeft):
        (WebCore::contextMenuItemTagInspectElement):
        (WebCore::searchMenuNoRecentSearchesText):
        (WebCore::searchMenuRecentSearchesText):
        (WebCore::searchMenuClearRecentSearchesText):
        (WebCore::unknownFileSizeText):
        * platform/gdk/TemporaryLinkStubs.cpp:

2007-09-10  Holger Hans Peter Freyther  <zecke@selfish.org>

        Reviewed by Mark.

        EventHandlerGdk::createDraggingClipboard must succeed otherwise an
        ASSERT is hit. Add Clipboard stubs for the Gdk/Gtk+ port and
        instantiate ClipboardGdk from the EventHandlerGdk to make the ASSERT
        go away. In contrast to the Windows and Mac port this clipboard is not
        inheriting CachedResourceClient. This was proposed by Oliver.

        * WebCore.pro:
        * page/gdk/EventHandlerGdk.cpp:
        * platform/gdk/ClipboardGdk.cpp: Added.
        (WebCore::ClipboardGdk::ClipboardGdk):
        (WebCore::ClipboardGdk::~ClipboardGdk):
        (WebCore::ClipboardGdk::clearData):
        (WebCore::ClipboardGdk::clearAllData):
        (WebCore::ClipboardGdk::getData):
        (WebCore::ClipboardGdk::setData):
        (WebCore::ClipboardGdk::types):
        (WebCore::ClipboardGdk::dragLocation):
        (WebCore::ClipboardGdk::dragImage):
        (WebCore::ClipboardGdk::setDragImage):
        (WebCore::ClipboardGdk::dragImageElement):
        (WebCore::ClipboardGdk::setDragImageElement):
        (WebCore::ClipboardGdk::createDragImage):
        (WebCore::ClipboardGdk::declareAndWriteDragImage):
        (WebCore::ClipboardGdk::writeURL):
        (WebCore::ClipboardGdk::writeRange):
        (WebCore::ClipboardGdk::hasData):
        * platform/gdk/ClipboardGdk.h: Added.

2007-09-12  Oliver Hunt  <oliver@apple.com>

        Reviewed by Adam.

        Corrections missed in previous revision

        * platform/Cursor.h:
        * platform/win/CursorWin.cpp:
        (WebCore::loadCursorByName):

2007-09-12  Oliver Hunt  <oliver@apple.com>

        Reviewed by Adam.

        Fixing 
            <rdar://problem/5018591> Windows doesn't have a standard vertical text cursor
            <rdar://problem/5224996> Add zoom in and zoom out cursors

        Added SharedCursor for CursorWin so we can correctly track lifetime of custom/image
        based cursors, such as the vertical text and zooming cursors.

        * platform/Cursor.h:
        (WebCore::SharedCursor::SharedCursor):
        (WebCore::SharedCursor::~SharedCursor):
        (WebCore::SharedCursor::nativeCursor):
        * platform/win/CursorWin.cpp:
        (WebCore::Cursor::Cursor):
        (WebCore::loadCursorByName):
        (WebCore::loadSharedCursor):
        (WebCore::pointerCursor):
        (WebCore::crossCursor):
        (WebCore::handCursor):
        (WebCore::iBeamCursor):
        (WebCore::waitCursor):
        (WebCore::helpCursor):
        (WebCore::eastResizeCursor):
        (WebCore::northResizeCursor):
        (WebCore::northEastResizeCursor):
        (WebCore::northWestResizeCursor):
        (WebCore::southResizeCursor):
        (WebCore::southEastResizeCursor):
        (WebCore::southWestResizeCursor):
        (WebCore::westResizeCursor):
        (WebCore::northSouthResizeCursor):
        (WebCore::eastWestResizeCursor):
        (WebCore::northEastSouthWestResizeCursor):
        (WebCore::northWestSouthEastResizeCursor):
        (WebCore::columnResizeCursor):
        (WebCore::rowResizeCursor):
        (WebCore::moveCursor):
        (WebCore::verticalTextCursor):
        (WebCore::progressCursor):
        (WebCore::notAllowedCursor):
        (WebCore::zoomInCursor):
        (WebCore::zoomOutCursor):
        * platform/win/WidgetWin.cpp:
        (WebCore::Widget::setCursor):

2007-09-12  Brady Eidson  <beidson@apple.com>

        Reviewed by Geoff Garen

        <rdar://problem/5478577> - Further improve cold launch time with Icon Database changes

        * loader/icon/IconDatabase.cpp:
        (WebCore::IconDatabase::open): Store the directory and full path for later usage and access in the API, respectively
          Move the makeAllDirectories() call to the background thread.
        (WebCore::IconDatabase::IconDatabase): Don't set up the timer here...
        (WebCore::IconDatabase::scheduleOrDeferSyncTimer): Create the timer on demand
        (WebCore::IconDatabase::iconDatabaseSyncThread): makeAllDirectories() here where it's not as expensive
        (WebCore::IconDatabase::cleanupSyncThread): Cleanup the directory as well as full path

        * loader/icon/IconDatabase.h: m_syncTimer becomes an OwnPtr, and we add the database directory
          as a member to set it on the main thread and act with it on the background thread

2007-09-12  Justin Garcia  <justin.garcia@apple.com>

        Reviewed by Tristan.

        <rdar://problem/5469868> 
        GoogleDocs: A hang occurs when applying list styling to a selection in a <table>
        
        When list insertion moves selected paragraphs into list items, it relies on 
        the selection preservation code inside moveParagraphs to iterate over the 
        selected paragraphs.  If a selection is ever restored incorrectly (before
        the original, or inside the original) list insertion will go into an infinite loop.
        
        In this hang, a table was selected and the selection preservation code incorrectly
        restored a selection, placing it inside the table.
        
        The bug was that a TextIterator, when being used for selection preservation, must
        emit a character between every VisiblePosition in the Range used to create the
        iterator.
        
        * editing/TextIterator.cpp:
        (WebCore::TextIterator::TextIterator): Renamed the boolean that we use for 
        selection preservation.  It used to be m_emitForReplacedElements because
        we believed that replaced elements were the only case where TextIterators
        should have emitted differently when used for selection preservation.
        (WebCore::TextIterator::handleReplacedElement): Ditto.
        (WebCore::TextIterator::shouldRepresentNodeOffsetZero): Represent the 
        position before block tables, but only if we are emitting for selection 
        preservation.
        (WebCore::TextIterator::shouldEmitSpaceBeforeAndAfterNode): We should emit 
        a space before and after block tables if we are emitting for selection 
        preservation (because we have VisiblePositions before and after them).
        (WebCore::TextIterator::handleNonTextNode): Use a renamed variable.
        * editing/TextIterator.h: Made shouldEmitSpaceBeforeAndAfterNode a member
        function, because whether or not we emit spaces before and after a block
        table depends we're emitting for selection preservation.

2007-09-12  Beth Dakin  <bdakin@apple.com>

        Reviewed by Hyatt.

        Fix for <rdar://problem/5464998> REGRESSION (9A543): Using Sort 
        options takes you back to search screen on zappos.com

        The current mechanism for preserving form elements across removes 
        did not work in the case where the input was moved by the parser to 
        be out of scope of the form. This fixes that problem by having the 
        parser keep track of the preserve boolean rather than the current 
        form element.

        * dom/Tokenizer.h:
        (WebCore::Tokenizer::isHTMLTokenizer): New function.
        * html/HTMLFormElement.cpp:
        (WebCore::HTMLFormElement::HTMLFormElement): Get rid of 
        m_preserveAcrossRemove.
        * html/HTMLFormElement.h:
        (WebCore::HTMLFormElement::isMalformed): Get rid of 
        m_preserveAcrossRemove.
        * html/HTMLGenericFormElement.cpp:
        (WebCore::HTMLGenericFormElement::removedFromTree): Ask the parser 
        if it is currently handling residual style rather than asking the 
        form if it wants to preserveAcrossRemove.
        * html/HTMLParser.cpp:
        (WebCore::HTMLParser::HTMLParser): New boolean to initialize.
        (WebCore::HTMLParser::handleResidualStyleCloseTagAcrossBlocks): Set 
        m_handlingResidualStyleAcrossBlocks to true at the beginning and 
        false at the end.
        * html/HTMLParser.h:
        (WebCore::HTMLParser::isHandlingResidualStyleAcrossBlocks):
        * html/HTMLTokenizer.h:
        (WebCore::HTMLTokenizer::isHTMLTokenizer):
        (WebCore::HTMLTokenizer::htmlParser):

2007-09-12  George Staikos  <staikos@kde.org>

        Fix compilation in some configurations for patch I reviewed and missed
        this option on.

        * platform/qt/CursorQt.cpp:
        (WebCore::Cursor::Cursor):

2007-09-12  Brady Eidson  <beidson@apple.com>

        Reviewed by Tim Hatcher and Kevin Decker

        <rdar://problem/5367045> - Launch time regression due to accessing resource from a different bundle

        When the default icon was moved from WebKit to WebCore, we had to access an entirely new bundle on launch which
        measurably increased time during launch accessing the disk.

        Instead of moving it back to the WebKit bundle, lets make launch time even faster by compiling in the icon.

        * Resources/urlIcon.tiff: Removed.

        * WebCore.xcodeproj/project.pbxproj: Removed urlIcon.tiff

        * loader/icon/IconDatabase.cpp:
        (WebCore::IconDatabase::defaultIcon): Compile in the icon data here.

2007-09-12  Adam Roben  <aroben@apple.com>

        Always specify that slider thumbs are small when painting with SafariTheme

        This is the only size we support.

        Reviewed by Sam.

        * rendering/RenderThemeSafari.cpp:
        (WebCore::RenderThemeSafari::paintSliderThumb):

2007-09-12  Brady Eidson  <beidson@apple.com>

        Reviewed by Darin

        <rdar://problem/5474753> - ASSERT in IconDatabase ReadySQLStatement

        * loader/icon/IconDatabase.cpp:
        (WebCore::readySQLStatement): This is a LOG_ERROR situation, not really an ASSERT situation

2007-09-12  Adam Roben  <aroben@apple.com>

        Don't ask SafariTheme to draw focus rings around text controls

        We do this ourselves.

        Reviewed by Oliver.

        * rendering/RenderThemeSafari.cpp:

2007-09-11  Brady Eidson  <beidson@apple.com>

        Reviewed by Darin

        <rdar://problem/5475639> and http://bugs.webkit.org/show_bug.cgi?id=15185 -
        Prevent two WebKits from fighting over the database schema in the future in case it ever changes again

        By telling the "older schema" WebKit to simply close itself and not bother to do any icon related stuff
        if the database schema is newer, we prevent the possibility of an older webkit run side-by-side with a newer
        WebKit causing icon database issues.

        * loader/icon/IconDatabase.cpp:
        (WebCore::IconDatabase::defaultDatabaseFilename): Rev the icon database filename to be "WebpageIcons.db"  The name is
          more appropriate for what is actually stored in the file, and since we're already not converting v5 to v6 icons, 
          making this leap now makes sense and gives us a good "future-proof" baseline
        (WebCore::isValidDatabase): Change the validity check to be "less then" instead of "not equal to" - the
          "greater than" case is now handled in performOpenInitialization()
        (WebCore::IconDatabase::performOpenInitialization): If the schema version is greater than the current, then
          close the database as to not conflict with the newer version.  Also noted that the integrity check failure 
          should actually close the sql database, not the icondatabase
        (WebCore::IconDatabase::syncThreadMainLoop): If termination has already been requested, skip straight to cleanup
        (WebCore::IconDatabase::cleanupSyncThread): More correctly set the "sync thread running" flag to false here,
          as the thread can now decide to exit on its own

2007-09-12  Mike Fenton <mike@staikos.net>

        Reviewed by George Staikos.

        Patch from Mike Fenton to allow custom cursors.

        * platform/qt/CursorQt.cpp:

2007-09-11  Kevin Decker <kdecker@apple.com>

        Reviewed by Oliver Hunt.

        Fixed: <rdar://problem/5472402> crash due to infinite recursion in expandUseElementsInShadowTree on SVG from wikipedia

        * ksvg2/svg/SVGUseElement.cpp: Added SVG_EXPERIMENTAL #ifdef for expandUseElementsInShadowTree().
        (WebCore::SVGUseElement::buildPendingResource): Ditto.
        (WebCore::SVGUseElement::associateInstancesWithShadowTreeElements): Tweaked an ASSERT to not fire on non-experimental builds.
        * ksvg2/svg/SVGUseElement.h: Added SVG_EXPERIMENTAL #ifdef for expandUseElementsInShadowTree().

2007-09-11  Brady Eidson  <beidson@apple.com>

        Reviewed by Maciej

        Fix for <rdar://problem/5473046> - Crash when resetting all icons

        Originally I'd written the "reset all icons" to be synchronous on the main thread, but it
        was decided that it should be async since it involved I/O.  Turns out it needs to be... both!
        Synchronous removal of all in-memory records of icons, and then continue and clean up the 
        on-disk database on the background thread.

        Also, it turns out that resetting all the page url retain counts should *not* be part of 
        "reset all icons" because it breaks various contracts the API makes about maintaining retain counts.

        The problem that occured here was removing all the icons, then all the history items that were 
        removed as part of "Reset Safari..." would try to release their icon, but their icon doesn't exist
        anymore.

        We get around this by simply leaving the in-memory page url records and retain counts alone - they
        are still wiped from disk.

        * loader/icon/IconDatabase.cpp:
        (WebCore::IconDatabase::removeAllIcons): Clear in-memory records of all icons then tell the thread to
          wipe the on-disk tables
        (WebCore::IconDatabase::removeAllIconsOnThread): Only do the disk cleanup - in-memory maintenance is
          handled on the main thread
        (WebCore::IconDatabase::cleanupSyncThread): Now that it's possible for new "icons to be written to disk"
          to appear while on-disk deleting is occuring, let the cleanup procedure perform 1 final write *after*
          it does the remove all icons
        * loader/icon/IconDatabase.h: Removed unused lock and condition

        * loader/icon/PageURLRecord.cpp:
        (WebCore::PageURLRecord::setIconRecord): Allow setting a NULL icon record, so a PageURLRecord can be
          cleared as part of removeAllIcons()

2007-09-11  Tristan O'Tierney  <tristan@apple.com>

        Reviewed by David Harrison.
        
        <rdar://problem/5467203> CrashTracer: [USER] 1 crash in Mail at <unknown binary>: WebCore::Range::startContainer const

        * editing/SelectionController.cpp:
        (WebCore::SelectionController::addRange):
        (WebCore::SelectionController::setSelectedRange):
        Added a check to make sure the passed in Range* value is not null
        before performing operations on it.

2007-09-11  Justin Garcia  <justin.garcia@apple.com>

        Reviewed by Maciej.
        
        <rdar://problem/5458246> 
        GoogleDocs: A hang occurs when applying list styling to selection that contains a <HR>
        
        List insertion moves selected paragraphs into list items, and relies on the selection
        preservation code inside moveParagraphs to iterate over the selected paragraphs.
        When list insertion would try to listify a paragraph that came after a list item 
        containing an <hr>, the selection preservation code would set an incorrect ending 
        selection because of a TextIterator bug, and we would try to listify the same 
        paragraph over and over.
        
        * editing/CompositeEditCommand.cpp:
        (WebCore::CompositeEditCommand::moveParagraphs): Pass range compliant equivalents to
        the Range constructor here.  The position [hr, 0] is not a valid DOM Range endpoint 
        for example.
        * editing/TextIterator.cpp:
        (WebCore::shouldEmitSpaceForNode): Added.
        (WebCore::TextIterator::handleNonTextNode): Emit a space to represent a horizontal rule,
        since it has VisiblePositions before and after it, but only for TextIterators used for
        selection preservation, so innerText will be unaffected.

2007-09-11  Ada Chan  <adachan@apple.com>

        <rdar://problem/5472130> Support NTLM authentication via CFNetwork.

        Reviewed by Darin.

        * platform/network/ProtectionSpace.h:
        (WebCore::):
        * platform/network/cf/AuthenticationCF.cpp:
        (WebCore::createCF):
        (WebCore::core):

2007-09-11  Darin Adler  <darin@apple.com>

        Rubber-stamped by Dave Harrison.

        - fixed pasteboard types here to match WebKit and use constants instead of
          WebKitSystemInterface

        * platform/mac/PasteboardMac.mm: Use constants for all pasteboard type strings.

        * platform/mac/WebCoreSystemInterface.h: Removed wkCreateURLPasteboardFlavorTypeName
        and wkCreateURLNPasteboardFlavorTypeName.

2007-09-11  Sven Herzberg  <sven@imendio.com>

        Reviewed by Mark.

        Remove unnecessary fields in FontPlatformData
        http://bugs.webkit.org/show_bug.cgi?id=15177

        * platform/gdk/FontDataGdk.cpp: removed the destroy code of the fields
        that have been removed
        * platform/gdk/FontPlatformData.h: removed m_fontFace, m_fontMatrix
        and m_options; hask on m_scaledFont
        * platform/gdk/FontPlatformDataGdk.cpp: simplified setFont() by using
        m_scaledFont only; turned the former struct members into local
        variables

2007-09-11  George Staikos  <staikos@kde.org>

        Reviewed by Anders.

        Work around gcc bug with some old gcc versions.

        * platform/qt/WidgetQt.cpp:
        (WebCore::Widget::convertToContainingWindow):
        (WebCore::Widget::convertFromContainingWindow):

2007-09-10  Mitz Pettel  <mitz@webkit.org>

        Reviewed by Maciej Stachowiak.

        - fix http://bugs.webkit.org/show_bug.cgi?id=15157
          Image defined in background-position: top center gets unexpectedly truncated
          <rdar://problem/5469095>

        Test: fast/repaint/body-background-image.html

        * rendering/RenderBox.cpp:
        (WebCore::RenderBox::imageChanged): Refined the logic for when the root takes
        over painting the background, to match paintBoxDecorations(). In particular,
        if the root has defined a background, the body should paint its own background.

2007-09-10  David Harrison  <harrison@apple.com>

        Reviewed by Kevin and Tristan.

        Tests added:
        * editing/pasteboard/paste-into-anchor-text.html: Added.
        * editing/pasteboard/paste-table-cells.html: Added.

        Source changes:
        * editing/CompositeEditCommand.cpp:
        (WebCore::CompositeEditCommand::positionAvoidingSpecialElementBoundary):
        Nil check enclosingAnchor.
        
        * editing/ReplaceSelectionCommand.cpp:
        (WebCore::ReplaceSelectionCommand::removeNodeAndPruneAncestors):
        New. Keeps m_firstNodeInserted and m_lastLeafInserted updated.
        
        (WebCore::ReplaceSelectionCommand::negateStyleRulesThatAffectAppearance):
        Added a comment.
        
        (WebCore::ReplaceSelectionCommand::removeRedundantStyles):
        Let ReplaceSelectionCommand::removeNodeAndPruneAncestors() update the nodes.
         
        (WebCore::ReplaceSelectionCommand::doApply):
        Pass originalVisPosBeforeEndBR to shouldRemoveEndBR()
        
        (WebCore::ReplaceSelectionCommand::shouldRemoveEndBR):
        Don't remove the br if nothing was inserted.
        
        * editing/ReplaceSelectionCommand.h:
        Add VisiblePosition parameter to shouldRemoveEndBR()
        
        * editing/markup.cpp:
        (WebCore::createMarkup):
        Wrap orphan tr element with a table element, just like we were doing
        for tobody elements.

2007-09-10  David Kilzer  <ddkilzer@apple.com>

        Rubberstamped by Kevin Decker.

        No test required since there is no change in functionality.

        * history/BackForwardList.cpp:
        (WebCore::BackForwardList::BackForwardList): Fix misspelling of DefaultCapacitiy to DefaultCapacity.

2007-09-10  Mitz Pettel  <mitz@webkit.org>

        Reviewed by Adele Peterson.

        - fix http://bugs.webkit.org/show_bug.cgi?id=15156
          REGRESSION (r24594-r24668): The bottom of styled <select> button text is clipped out
          <rdar://problem/5464301>

        Test: fast/forms/menulist-clip.html

        * rendering/RenderMenuList.cpp:
        (WebCore::RenderMenuList::controlClipRect): Use correct coordinates for
        the inner block's content rect.

2007-09-10  Brady Eidson  <beidson@apple.com>

        Reviewed by Darin, Sam, Oliver, Geoff, probably others - what a fun one to review!

        <rdar://problem/5471641> - URLs get the wrong icon

        Turns out sqlite3_reset() doesn't clear bindings, so previously bound icons were being
        written out for pages without icons.  Easy fix!

        * loader/icon/IconDatabase.cpp:
        (WebCore::IconDatabase::writeIconSnapshotToSQLDatabase): For null icons, manually
          bind NULL - otherwise, the previously bound icon will be written out to disk

        * loader/icon/SQLStatement.cpp:
        (WebCore::SQLStatement::bindNull): Access to sqlite3_bind_null
        * loader/icon/SQLStatement.h:

2007-09-10  Anders Carlsson  <andersca@apple.com>

        Reviewed by Oliver and Darin.

        <rdar://problem/5468613>
        Using shockwave pages first time after plugin install crashed safari in PluginPing.
        
        Only restore the window proc if the plugin didn't override it.
        
        * plugins/win/PluginViewWin.cpp:
        (WebCore::PluginViewWin::stop):

2007-09-10  Justin Garcia  <justin.garcia@apple.com>

        Reviewed by Darin.

        <rdar://problem/5467405> 
        Revert back behavior of -webkit-user-select to fix widget selection problems
        
        Rolled out r25086 and r25057.  I will be re-opening:
        <rdar://problem/5333725> -webkit-user-select: none makes selection difficult
        Which we will either to defer or fix by introducing a new value of -webkit-user-select.
        <rdar://problem/5370059> REGRESSION: Cannot type into edit fields on a form (sccsheriff.org)
        Which we will either defer or fix with Adele's patch that doesn't involve making 
        -webkit-user-select inherited.

        * css/CSSComputedStyleDeclaration.cpp:
        (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
        * css/CSSStyleSelector.cpp:
        (WebCore::CSSStyleSelector::adjustRenderStyle):
        (WebCore::CSSStyleSelector::applyProperty):
        * editing/SelectionController.cpp:
        (WebCore::SelectionController::selectAll):
        * page/EventHandler.cpp:
        (WebCore::EventHandler::selectClosestWordFromMouseEvent):
        (WebCore::EventHandler::handleMousePressEventTripleClick):
        (WebCore::EventHandler::handleMousePressEventSingleClick):
        (WebCore::EventHandler::updateSelectionForMouseDrag):
        (WebCore::EventHandler::selectCursor):
        (WebCore::EventHandler::canMouseDownStartSelect):
        * page/EventHandler.h:
        * rendering/RenderObject.cpp:
        (WebCore::selectStartNode):
        (WebCore::RenderObject::canSelect):
        (WebCore::RenderObject::shouldSelect):
        (WebCore::RenderObject::draggableNode):
        * rendering/RenderObject.h:
        * rendering/RenderStyle.cpp:
        (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
        (WebCore::StyleRareNonInheritedData::operator==):
        (WebCore::StyleRareInheritedData::StyleRareInheritedData):
        (WebCore::StyleRareInheritedData::operator==):
        (WebCore::RenderStyle::diff):
        * rendering/RenderStyle.h:
        (WebCore::):
        (WebCore::RenderStyle::userSelect):
        (WebCore::RenderStyle::setUserSelect):
        (WebCore::RenderStyle::initialUserSelect):

2007-09-10  Antti Koivisto  <antti@apple.com>

        Reviewed by Kevin.

        Fix <rdar://problem/5444866>
        REGRESSION: missing text in Acrobat "Getting Started" screen due to change in load ordering of large resources
        
        Make external scripts loaded using file: wait until all style sheet loads have completed before executing. 
        Fixes a class of problems where there is a dependency between script and stylesheet and results would effectively 
        get randomized based on which order the resources arrived. In Tiger file loads were effectively serialized by
        lower level components, which is why this regressed. 

        Test: http/tests/local/stylesheet-and-script-load-order.html

        * dom/Document.cpp:
        (WebCore::Document::removePendingSheet):
        * dom/Tokenizer.h:
        (WebCore::Tokenizer::executeScriptsWaitingForStylesheets):
        * html/HTMLTokenizer.cpp:
        (WebCore::HTMLTokenizer::HTMLTokenizer):
        (WebCore::HTMLTokenizer::begin):
        (WebCore::HTMLTokenizer::executeScriptsWaitingForStylesheets):
        (WebCore::HTMLTokenizer::notifyFinished):
        * html/HTMLTokenizer.h:

2007-09-08  David Smith  <catfish.man@gmail.com>

        Reviewed by Maciej Stachowiak.
        
        http://bugs.webkit.org/show_bug.cgi?id=15148
        Bug 15148: Poor performance on crazy DOM raytracer
        
        Switch data structures to avoid quadratic behavior.

        * rendering/RenderBlock.cpp:
        (WebCore::RenderBlock::layoutPositionedObjects): Update for ListHashSet
        (WebCore::RenderBlock::markPositionedObjectsForLayout): Update for ListHashSet
        (WebCore::RenderBlock::insertPositionedObject): Use ListHashSet to avoid expensive uniqueing
        (WebCore::RenderBlock::removePositionedObject): Update for ListHashSet
        (WebCore::RenderBlock::removePositionedObjects): Update for ListHashSet
        (WebCore::RenderBlock::lowestPosition): Update for ListHashSet
        (WebCore::RenderBlock::rightmostPosition): Update for ListHashSet
        (WebCore::RenderBlock::leftmostPosition): Update for ListHashSet
        (WebCore::RenderBlock::rightBottom): Update for ListHashSet
        * rendering/RenderBlock.h: Change m_positionedObjects from DeprecatedPtrList to ListHashSet

2007-09-09  Brady Eidson <beidson@apple.com>

        Rubberstamped by Darin

        pthread_main_np() is a Darwin thing, not a Mac thing

        * loader/icon/IconDatabase.cpp:
        (WebCore::IconDatabase::IconDatabase):

2007-09-09  Holger Hans Peter Freyther  <zecke@selfish.org>

        Build fix for Gtk+ by adding WebCore::callOnMainThread to the TemporaryLinkStubs.

        * platform/gdk/TemporaryLinkStubs.cpp:
        (WebCore::callOnMainThread):

2007-09-08  George Staikos  <staikos@kde.org>

        Reviewed by Olliej.

        Separate out and implement FileSystem functions,  and stub out the
        icondatabase function for future implementation.

        * WebCore.pro:
        * platform/qt/FileSystemQt.cpp: Added.
        (WebCore::fileExists):
        (WebCore::deleteFile):
        * platform/qt/TemporaryLinkStubs.cpp:
        * platform/qt/ThreadingQt.cpp: Added.
        (WebCore::callOnMainThread):

2007-09-08  Mark Rowe  <mrowe@apple.com>

        Build fix for when ENABLE(ICONDATABASE) is not set.

        * loader/icon/IconDatabaseNone.cpp:
        (WebCore::IconDatabase::~IconDatabase):

2007-09-08  Mark Rowe  <mrowe@apple.com>

        More fixes for the Qt and Gtk builds.

        * WebCore.pro: Update for file changes.
        * loader/icon/IconDatabase.cpp: Include errno.h for EDEADLK.
        * loader/icon/PageURLRecord.h:

2007-09-08  Justin Garcia  <justin.garcia@apple.com>

        Backing my change back in without the changes to VisiblePosition::next 
        and previous that weren't necessary to fix the bug and were causing some
        layout test failures.  Most of the failures appeared to be fixes but I
        want more time to investigate and have to move to on to another task.

        * editing/Selection.cpp:
        (WebCore::Selection::validate):
        * editing/visible_units.cpp:
        (WebCore::endOfWord):

2007-09-08  Brady Eidson  <beidson@apple.com>

        Reviewed by Mark Rowe

        Fix the _NSAutoreleaseNoPool() errors on launch - We were using NSFileManager on the secondary
        thread with no NSAutoreleasePool in place

        * loader/icon/IconDatabase.cpp:
        (WebCore::IconDatabase::iconDatabaseSyncThread):

2007-09-08  Sam Weinig  <sam@webkit.org>

        Add fix to the correct file.

        * loader/icon/SQLDatabase.h:
        * loader/icon/SQLStatement.h:

2007-09-08  Sam Weinig  <sam@webkit.org>

        Fix Windows build.

        * loader/icon/SQLStatement.h: Disable boolean conversion warning.

2007-09-08  Brady Eidson  <beidson@apple.com>

        Build fix for non-Mac platforms that use Icon Database

        * loader/icon/IconDatabase.cpp:
        (WebCore::IconDatabase::IconDatabase): Apparently only Mac has the beauty that is pthread_main_np()

2007-09-08  Mark Rowe  <mrowe@apple.com>

        Build fix.

        * WebCore.xcodeproj/project.pbxproj: Headers used up in WebKit need to be be "private" rather than "project".

2007-09-08  Brady Eidson  <beidson@apple.com>

        Reviewed by Darin

        <rdar://problem/5434431> - Asynchronous Icon Database

        The IconDatabase API was originally designed to be fully asynchronous - if an icon wasn't read in from disk
        when you asked for it, you would be notified when it was.

        Safari 2 did writes on a background thread, but reads blocked the main thread.

        The current WebCore implementation using SQLite attempted to get rid of the background thread by defering expensive 
        writes via timers, but falls short in moderate to extreme usage cases

        Time to make the IconDatabase live up to it's fully asynchronous destiny.

        This should -
        - Make the browser instantly usable while converting Safari 2 icons in the background occurs
        - Remedy any UI slowness/blocking when on slow network home directories
        - Remedy random UI slowness, pauses, and stutters do to random I/O occurring at the exact wrong time or under heavy
          disk usage from swapping or other apps on the system
        - Allow certain long-running procedures to be interruptible (Safari 2 import, reading icons in from disk when trying to quit, etc)

        This will have a noticeable effect on current Safari 2 and Safari 3 beta browsers, including icons not appearing in bookmarks, history,
        or the location field the first time they're asked for, as current released Safari's don't properly listen for these async notifations.  
        The second time such a menu or view is brought up, the icon should be there.

        Additionally this includes a SQLite schema change which will be a lot more efficient but will result in the loss of current SQLite icons.
        Converting from Safari 2 style icons will still work.

        WebCore, welcome to multi-threadedness

        * WebCore.exp:
        * WebCore.xcodeproj/project.pbxproj:
        * WebCore.vcproj/WebCore.vcproj:

        * loader/DocumentLoader.cpp:
        (WebCore::DocumentLoader::iconLoadDecisionAvailable): Called when an Icon becomes available that was requested by this 
          DocumentLoader (to support the webView:didReceiveIcon: delegate call in WebKit)
        * loader/DocumentLoader.h:

        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::iconLoadDecisionAvailable): Called from the DocumentLoaders who get notified - if the FrameLoader 
          ends up not caring because the WebView has transitioned to a new page, nothing occurs.  Otherwise, the FrameLoader possibly
          starts it Icon Loader and possibly sends the webView:didReceiveIcon: delegate call
        (WebCore::FrameLoader::startIconLoader): Instead of "Yes, load the icon now" or "No, don't load it" there is a third possibility -
          "You might be asked to load your icon later."  Add supporting logic for receiving this state, and being called a second time
          when the load decision is finally available.
        * loader/FrameLoader.h:

        * loader/FrameLoaderClient.h: Added "registerForIconNotification" which is a way to tell WebViews "The icon you are interested in might
          become available via the generic WebIconDatabaseDidAddIconNotification instead of a targeted delegate call"
          A WebView can then receive the generic notification and pass on it's own targeted delegate call.

        * loader/icon/IconDataCache.cpp: Removed.
        * loader/icon/IconDataCache.h: Removed.

        * loader/icon/IconDatabase.cpp:
        (WebCore::urlForLogging): Cut a URL down in length for sane logging and debugging
        (WebCore::defaultClient): Return the default, empty IconDatabaseClient incase the API doesn't set one.

        Following block of methods are for the Main thread's usage -
        (WebCore::IconDatabase::setClient):
        (WebCore::makeAllDirectories): Small optimization that checks to see if the entire path exists already, and doesn't try to loop
          through each patch component if the full path is already present
        (WebCore::IconDatabase::open): Makes all directories to the target path and kicks off the background thread - nothing more.
        (WebCore::IconDatabase::close): Signals the thread to quit and waits for it to do so
        (WebCore::IconDatabase::removeAllIcons): Purge the icon database
        (WebCore::IconDatabase::iconForPageURL):
        (WebCore::IconDatabase::readIconForPageURLFromDisk):
        (WebCore::IconDatabase::iconURLForPageURL):
        (WebCore::IconDatabase::defaultIcon):
        (WebCore::IconDatabase::retainIconForPageURL):
        (WebCore::IconDatabase::releaseIconForPageURL):
        (WebCore::IconDatabase::setIconDataForIconURL):
        (WebCore::IconDatabase::setIconURLForPageURL):
        (WebCore::IconDatabase::loadDecisionForIconURL): Determine if an icon loader should load now.  If the decision is "maybe later", then
          mark the DocumentLoader to be notified later when the final decision is available.
        (WebCore::IconDatabase::iconDataKnownForIconURL): Determine if the actual image data has been read from disk (or set from the loader) for 
          icon URL in question
        (WebCore::IconDatabase::setEnabled):
        (WebCore::IconDatabase::isEnabled):
        (WebCore::IconDatabase::setPrivateBrowsingEnabled):
        (WebCore::IconDatabase::isPrivateBrowsingEnabled):
        (WebCore::IconDatabase::delayDatabaseCleanup): Restore this method from a year ago, as asynchronous pruning of icons can now occur on a 
          background thread.
        (WebCore::IconDatabase::allowDatabaseCleanup):
        (WebCore::IconDatabase::checkIntegrityBeforeOpening):
        (WebCore::IconDatabase::pageURLMappingCount):
        (WebCore::IconDatabase::retainedPageURLCount):
        (WebCore::IconDatabase::iconRecordCount):
        (WebCore::IconDatabase::iconRecordCountWithData):
        (WebCore::IconDatabase::IconDatabase):
        (WebCore::IconDatabase::~IconDatabase):
        (WebCore::IconDatabase::notifyPendingLoadDecisions): Tell all the registered DocumentLoaders "Hey, we've read in all URL mappings from disk,
          so check to see if you are interested in any of them"
        (WebCore::IconDatabase::notifyPendingLoadDecisionsInternal):
        (WebCore::IconDatabase::wakeSyncThread): Wake the sync thread, if it is idle
        (WebCore::IconDatabase::scheduleOrDeferSyncTimer): Even though we're on a background thread, we still defer writing out to disk during
          periods of high activity
        (WebCore::IconDatabase::syncTimerFired): Call wakeSyncThread()

        Following block of methods may be used by either thread -
        (WebCore::IconDatabase::isOpen):
        (WebCore::IconDatabase::databasePath):
        (WebCore::IconDatabase::defaultDatabaseFilename):
        (WebCore::IconDatabase::getOrCreateIconRecord):
        (WebCore::IconDatabase::getOrCreatePageURLRecord):

        Following block of methods are used by the secondary thread only -
        (WebCore::IconDatabase::importIconURLForPageURL): For the Safari 2 import procedure - write a URL mapping directly out to disk
        (WebCore::IconDatabase::importIconDataForIconURL): For the Safari 2 import procedure - write an Icon directly out to disk
        (WebCore::IconDatabase::shouldStopThreadActivity): To check and see if the thread should stop what it is doing now to do something
          more important (such as quit, or delete all icons)
        (WebCore::IconDatabase::iconDatabaseSyncThreadStart):
        (WebCore::IconDatabase::iconDatabaseSyncThread): Entry point for the background thread
        (WebCore::databaseVersionNumber):
        (WebCore::isValidDatabase):
        (WebCore::createDatabaseTables):
        (WebCore::IconDatabase::performOpenInitialization): Open and validate the SQLite database, making sure it's schema jives with what
          is expected
        (WebCore::IconDatabase::checkIntegrity):
        (WebCore::IconDatabase::performURLImport): Import all the Page URL -> Icon URL mappings from the database.  Done "1st thing" on startup,
          this is necessary to be able to give the loader decisions about whether or not it should load icons from the network
        (WebCore::IconDatabase::syncThreadMainLoop): Main loop - sleeps until woken up, then does a read cycle and a write cycle until both cycles
          do no work - then it goes back to sleep.
        (WebCore::IconDatabase::readFromDatabase): Reads icons from the database that clients are waiting on
        (WebCore::IconDatabase::writeToDatabase): Writes any changes page -> icon url mappings to disk, as well as any new image data that has 
          been received from the loader
        (WebCore::IconDatabase::pruneUnretainedIcons): Done only once, and only after the first write to the database, this procedure removes all
          icons and page URLs from disk that haven't been retained by any client.  Note that the prune can be delayed by utilizing delayDatabaseCleanup()
        (WebCore::IconDatabase::checkForDanglingPageURLs): Usually part of the prune procedure, prunes any pages who point to icons that no longer exist 
          in the database
        (WebCore::IconDatabase::removeAllIconsOnThread): Completely purge both the on-disk and in memory records of all icons
        (WebCore::IconDatabase::deleteAllPreparedStatements): Part of removeAllIcons and the thread cleanup procedure
        (WebCore::IconDatabase::cleanupSyncThread): Write out any last remaining writes to disk, close the database, and then end the thread
        (WebCore::IconDatabase::imported): Checks the DB to see if the Safari 2 import has occured
        (WebCore::IconDatabase::setImported): Sets the "Safari 2 imported" flag
        (WebCore::readySQLStatement):
        (WebCore::IconDatabase::setIconURLForPageURLInSQLDatabase): This and the following "SQLDatabase" suffixed methods are pretty self explanatory
        (WebCore::IconDatabase::setIconIDForPageURLInSQLDatabase):
        (WebCore::IconDatabase::removePageURLFromSQLDatabase):
        (WebCore::IconDatabase::getIconIDForIconURLFromSQLDatabase):
        (WebCore::IconDatabase::addIconURLToSQLDatabase):
        (WebCore::IconDatabase::getImageDataForIconURLFromSQLDatabase):
        (WebCore::IconDatabase::removeIconFromSQLDatabase):
        (WebCore::IconDatabase::writeIconSnapshotToSQLDatabase):
        * loader/icon/IconDatabase.h:

        * loader/icon/IconDatabaseClient.h: Added.
        (WebCore::IconDatabaseClient::~IconDatabaseClient):
        (WebCore::IconDatabaseClient::performImport): Perform the Safari 2 import, implemented by WebKit
        (WebCore::IconDatabaseClient::dispatchDidRemoveAllIcons): Send the API notification
        (WebCore::IconDatabaseClient::dispatchDidAddIconForPageURL): Ditto

        * loader/icon/IconDatabaseNone.cpp: Best attempt to keep non icon-DB platforms building
        (WebCore::IconDatabase::defaultDatabaseFilename):
        (WebCore::IconDatabase::readIconForPageURLFromDisk):
        (WebCore::IconDatabase::loadDecisionForIconURL):
        (WebCore::IconDatabase::iconDataKnownForIconURL):
        (WebCore::IconDatabase::setIconURLForPageURL):
        (WebCore::IconDatabase::isEnabled):
        (WebCore::IconDatabase::delayDatabaseCleanup):
        (WebCore::IconDatabase::allowDatabaseCleanup):
        (WebCore::IconDatabase::setClient):

        * loader/icon/IconRecord.cpp: Added.
        (WebCore::IconRecord::IconRecord): IconRecord used to be "IconDataCache" - it is merely a container for the url, timestamp, and image for a site icon.
          It is Shared, and therefore ref counted - PageURLRecords are the owning containers.  This is a tricky way to track how many page urls are retaining 
          an IconRecord and therefore tracking when we should try to get rid of one.
        (WebCore::IconRecord::~IconRecord):
        (WebCore::IconRecord::image):
        (WebCore::IconRecord::setImageData):
        (WebCore::IconRecord::loadImageFromResource):
        (WebCore::IconRecord::imageDataStatus): Return whether the image data hasn't been read yet, exists in memory, or is absent (site with no icon)
        (WebCore::IconRecord::snapshot): Returns a snapshot of the icon's data - url, timestamp, and image data - to be written to disk
        * loader/icon/IconRecord.h: Added.
        (WebCore::IconSnapshot::IconSnapshot):
        (WebCore::IconRecord::getTimestamp):
        (WebCore::IconRecord::setTimestamp):
        (WebCore::IconRecord::iconURL):
        (WebCore::IconRecord::retainingPageURLs):

        * loader/icon/PageURLRecord.cpp: Added.
        (WebCore::PageURLRecord::PageURLRecord): PageURLRecord is fundamentally a pairing of a Page URL to an Icon.  It has manual ref counting for the sake
          of "retainIconForPageURL" and "releaseIconForPageURL", and can provide a quick snapshot of it's Page URL -> Icon URL mapping for writing to
          the database
        (WebCore::PageURLRecord::setIconRecord):
        (WebCore::PageURLRecord::snapshot):
        * loader/icon/PageURLRecord.h: Added.
        (WebCore::PageURLSnapshot::PageURLSnapshot):
        (WebCore::PageURLRecord::url):
        (WebCore::PageURLRecord::PageURLRecord::iconRecord):
        (WebCore::PageURLRecord::retain):
        (WebCore::PageURLRecord::release):
        (WebCore::PageURLRecord::retainCount):

        * platform/SharedBuffer.cpp:
        (WebCore::SharedBuffer::copy): Added a deep copy method for the purposes of handing icon data across the thread boundary into the icon database
        * platform/SharedBuffer.h:

        * platform/graphics/svg/SVGImageEmptyClients.h:
        (WebCore::SVGEmptyFrameLoaderClient::registerForIconNotification):

        * platform/win/TemporaryLinkStubs.cpp:
        (WebCore::callOnMainThread): Only other IconDatabase utilizing platform - keep their build going

2007-09-07  David Kilzer  <ddkilzer@apple.com>

        Reviewed by Timothy Hatcher.

        Housekeeping.  No test required.

        * bindings/objc/WebScriptObjectInternal.h: Removed unused file.
        * bindings/objc/WebScriptObjectPrivate.h: Updated copyright statement.

2007-09-07  Justin Garcia  <justin.garcia@apple.com>
        
        Rolling out my changes from r25421 while I investigate the layout test failures
        they caused.
        
        * editing/Selection.cpp:
        (WebCore::Selection::validate):
        * editing/VisiblePosition.cpp:
        (WebCore::VisiblePosition::next):
        (WebCore::VisiblePosition::previous):
        (WebCore::VisiblePosition::lastEditablePositionAtOrBefore):
        (WebCore::VisiblePosition::firstEditablePositionAtOrAfter):
        * editing/VisiblePosition.h:
        * editing/visible_units.cpp:
        (WebCore::endOfWord):
        (WebCore::previousWordPosition):
        (WebCore::nextWordPosition):
        (WebCore::startOfLine):
        (WebCore::endOfLine):
        (WebCore::previousSentencePosition):
        (WebCore::nextSentencePosition):

2007-09-05  Geoffrey Garen  <ggaren@apple.com>

        Reviewed by Darin Adler, Maciej Stachowiak, Mark Rowe, Tim Hatcher.
        
        Fixed <rdar://problem/5326009> Make non-browser WebKit clients have no 
        memory cache, or a very tiny one

        Added a client callback to notify WebKit when the first navigation has
        taken place. "Navigation" here means a transition from one page to 
        another that ends up in the back/forward list.
        
        WebKit Mac uses this notification to grow its cache model under certain
        circumstances.
        
        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::addBackForwardItemClippedAtTarget):
        * loader/FrameLoaderClient.h:

        * platform/graphics/svg/SVGImageEmptyClients.h:
        (WebCore::SVGEmptyFrameLoaderClient::didPerformFirstNavigation): Ah, 
        SVGEmptyFrameLoaderClient, my old friend. 

2007-09-07  Adele Peterson  <adele@apple.com>

        Reviewed by Dave Harrison.

        Fix for <rdar://problem/5428427> Wrong characters are re-converted after doing reconversion with Kotoeri

        Revert change for<rdar://problem/5279521> and add nil checks for the result of TextIterator::rangeFromLocationAndLength
        TextIterator::exitNode shouldn't require the m_lastTextNode to be true, but we can't change that without making the logic in _web_attributedStringFromRange match.
        We'll get that for free when we switch to use TextIterator in _web_attributedStringFromRange.

        * editing/ApplyStyleCommand.cpp: (WebCore::ApplyStyleCommand::applyBlockStyle): Added nil checks.
        * editing/IndentOutdentCommand.cpp: (WebCore::IndentOutdentCommand::indentRegion): ditto.
        * editing/TextIterator.cpp: (WebCore::TextIterator::exitNode): Re-added check for m_lastTextNode before emitting newline.

2007-09-07  Ada Chan  <adachan@apple.com>

        <rdar://problem/5395928> Need to be able to handle context menu item selection by index
        
        Reviewed by Beth.

        * platform/ContextMenu.h: Added method to retrieve context menu item by index
        * platform/win/ContextMenuWin.cpp:
        (WebCore::ContextMenu::ContextMenu): call setPlatformDescription() since that will handle
        adding the MNS_NOTIFYBYPOS style to the context menu.
        (WebCore::contextMenuItemByIdOrPosition): helper method so we don't have to duplicate code
        between itemWithAction() and itemAtIndex().
        (WebCore::ContextMenu::itemWithAction):
        (WebCore::ContextMenu::itemAtIndex):
        (WebCore::ContextMenu::setPlatformDescription): add MNS_NOTIFYBYPOS style to the context menu
        so we will get notified by menu position through WM_MENUCOMMAND when the item is selected.

2007-09-07  Justin Garcia  <justin.garcia@apple.com>

        Reviewed by Darin.
        
        <rdar://problem/5057506> Double-clicking after ToDo content doesn't select the paragraph break
        
        * editing/Selection.cpp:
        (WebCore::Selection::validate):
        Moved the code that moves across a paragraph boundary
        when expanding selections by word granularity from
        endOfWord to here.
        In the word and paragraph granularity cases, if the 
        end of the selection is at the end of the last paragraph 
        in the last cell of a block table, expand it so that 
        it ends at the start of the paragraph after the table, 
        instead of just after the table, so that ToDo content 
        gets the same double/tripled click behavior that normal 
        paragraphs get (added two testcases).
        When expanding the selection to include paragraph
        breaks, pass VisiblePosition::next true so that it
        doesn't change editability.
        * editing/VisiblePosition.cpp:
        (WebCore::VisiblePosition::next): Renamed the bool because it's now also
        used to keep non-editable positions non-editable.
        (WebCore::VisiblePosition::previous): Ditto.
        (WebCore::VisiblePosition::lastPositionWithSameEditabilityAtOrBefore):
        Renamed this function and made it also work with non-editable positions.
        (WebCore::VisiblePosition::firstPositionWithSameEditabilityAtOrAfter):
        Ditto.
        * editing/VisiblePosition.h:
        * editing/visible_units.cpp:
        (WebCore::endOfWord): Called the renamed function.
        (WebCore::previousWordPosition): Ditto.
        (WebCore::nextWordPosition): Ditto.
        (WebCore::startOfLine): Ditto.
        (WebCore::endOfLine): Ditto.
        (WebCore::previousSentencePosition): Ditto.
        (WebCore::nextSentencePosition): Ditto.

2007-09-07  Brady Eidson  <beidson@apple.com>

        Reviewed by Sam

        <rdar://problem/5089241> - ASSERT and other funky effects in IconLoader with large 404 pages

        There were two problems:
        1 - I originally didn't expect SubresourceLoader to keep pulling in data after it received a 404 response,
            but if the server sends back a complex 404 page, the loader did just that.  That could result in the 
            IconLoader "finishing" twice
        2 - In this case, the long messy 404 page would be committed to the database as image data.  This would 
            result in wasted space on disk, wasted space in RAM, and wasting processor time trying to parse 50k+
            of HTML as image data

        Fix is two parts - 1, monitor the "m_loadIsInProgress" flag and 2, make ::finishLoading() take an actual 
        SharedBuffer argument that is what should be committed to the database so the ResourceHandle is unnecessary

        * loader/icon/IconLoader.cpp:
        (WebCore::IconLoader::didReceiveResponse): If the response is not valid, commit null data 
        (WebCore::IconLoader::didFail): If we've already finished loading once (the 404 response), don't
          finish again!
        (WebCore::IconLoader::didFinishLoading): Ditto
        (WebCore::IconLoader::finishLoading): Take a SharedBuffer argumnt as the actual data to commit
        * loader/icon/IconLoader.h: Add a SharedBuffer arg to ::finishLoading()

2007-09-07  Brady Eidson  <beidson@apple.com>

        Reviewed by Darin

        Inline the in-header definitions for non-Mac platforms

        * platform/AutodrainedPool.h:
        (WebCore::AutodrainedPool::AutodrainedPool):
        (WebCore::AutodrainedPool::~AutodrainedPool):
        (WebCore::AutodrainedPool::cycle):

2007-09-07  Brady Eidson  <beidson@apple.com>

        Reviewed by Darin

        Add some AutoreleasePool and Threading utilities in preparation for the multi-threaded
        fix for <rdar://problem/5434431>

        AutodrainedPool wraps an NSAutoreleasePool and tracks a "cycle" count.  This allows clients
        in WebCore to simply call ::cycle() and after a preset number of iterations the pool will drain
        and recreate the underlying NSAutoreleasePool
   
        Threading utilities include C++ wrappers for pthread mutexes and conditions, as well as a generic
        "callOnMainThread()" function for any non-main thread to use.

        * platform/AutodrainedPool.h: Added.  
        (WebCore::AutodrainedPool::AutodrainedPool): Empty implementations for all non-mac platforms
        (WebCore::AutodrainedPool::~AutodrainedPool): ditto
        (WebCore::AutodrainedPool::cycle): ditto
        * platform/mac/AutodrainedPool.mm: Added.
        (WebCore::AutodrainedPool::AutodrainedPool): 
        (WebCore::AutodrainedPool::~AutodrainedPool):
        (WebCore::AutodrainedPool::cycle): Keep track of number of cycles, and drain/recreate the pool if the
          cycle limit is hit

        * platform/Threading.h: Added.
        (WebCore::Mutex::Mutex): C++ wrapper for pthread_mutex
        (WebCore::Mutex::~Mutex):
        (WebCore::Mutex::lock):
        (WebCore::Mutex::tryLock):
        (WebCore::Mutex::unlock):
        (WebCore::MutexLocker::MutexLocker): Handles automatically locking/unlocking a Mutex (for early returns
          from a function, for example)
        (WebCore::MutexLocker::~MutexLocker):
        (WebCore::ThreadCondition::ThreadCondition): C++ wrapper for pthread_condition
        (WebCore::ThreadCondition::~ThreadCondition):
        (WebCore::ThreadCondition::wait):
        (WebCore::ThreadCondition::signal):
        (WebCore::ThreadCondition::broadcast):
        * platform/mac/Threading.mm: Added.
        (-[WebCoreFunctionWrapper initWithFunction:]): Obj-C implementation of "callOnMainThread"
        (-[WebCoreFunctionWrapper _call]):
        (WebCore::callOnMainThread):

2007-09-07  George Staikos  <staikos@kde.org>

        Fix typo.

        * loader/ProgressTracker.h:
        (WebCore::ProgressTracker::totalPageAndResourceBytesToLoad):

2007-09-07  Qing Zhao  <qing@staikos.net>

        Reviewed by Anders and George.

        Add accessors for these two variables.

        * loader/ProgressTracker.h:
        (WebCore::ProgressTracker::totalPageAndResourseBytesToLoad):
        (WebCore::ProgressTracker::totalBytesReceived):

2007-09-06  Tristan O'Tierney  <tristan@apple.com>

        Reviewed by Maciej Stachowiak.
        
        <rdar://problem/5333496> Back button stopped working on sfgate.com (14957)
        
        This fix is specifically targted to address sfgate.com and reuters.com with minimal
        impact to other areas of the frameloader.  It does not cause any regression tests to fail.
        I've added two layout tests: One to detect this particular bug, and one to address
        a secondary issue: if an iframe navigation occurs during onload by a timeout an
        additional history item is added, similarly to firefox.  We tried to match firefox
        more than IE with this fix but did gain a little bit of IE compatability.

        Tests: http/tests/navigation/onload-navigation-iframe-timeout.html
               http/tests/navigation/onload-navigation-iframe.html

        * dom/Document.h:
        (WebCore::Document::processingLoadEvent):
        Return the m_processingLoadEvent boolean so FrameLoader knows
        that the document is in the middle of calling <body onload>
        
        * html/HTMLFrameOwnerElement.cpp:
        (WebCore::HTMLFrameOwnerElement::HTMLFrameOwnerElement):
        * html/HTMLFrameOwnerElement.h:
        (WebCore::HTMLFrameOwnerElement::createdByParser):
        (WebCore::HTMLFrameOwnerElement::setCreatedByParser):
        Added support for a new member variable of frame elements: m_createdByParser.
        This lets us specifically target the fix to only iframes created via JS
        and not in-document.
        
        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::FrameLoader):
        Initialize m_navigationDuringLoad to false
        
        (WebCore::FrameLoader::provisionalLoadStarted):
        Determine if the load we're about to start is occuring during
        an onload.
        
        (WebCore::FrameLoader::updateHistoryForStandardLoad):
        If the current frameloader is for a child frame, and the navigation is occuring
        during an onload update the current history item rather than adding a new one.
        
        * loader/FrameLoader.h:
        Added a new member variable, m_navigationDuringLoad to track
        the navigation status during the on load, rather than trying to determine
        the status after (which is nearly impossible due to a new runloop spin).

2007-09-06  David Kilzer  <ddkilzer@apple.com>

        Reviewed by Darin.

        The implementation of BackForwardList::clearPageCache() was removed in r21793.
        It's now safe to remove it from the header.

        * history/BackForwardList.h: Removed clearPageCache().

2007-09-06  Anders Carlsson  <andersca@apple.com>

        Reviewed by Ada.

        <rdar://problem/5457844>
        Crash when using mouse wheel with plug-ins disabled.

        Null check the widget.

        * page/EventHandler.cpp:
        (WebCore::EventHandler::handleWheelEvent):

2007-09-06  Anders Carlsson  <andersca@apple.com>

        Reviewed by Mitz.

        Small tweak.
        
        * plugins/win/PluginStreamWin.cpp:
        (WebCore::PluginStreamWin::startStream):

2007-09-06  Anders Carlsson  <andersca@apple.com>

        Reviewed by Adam and Steve.

        <rdar://problem/5459321>
        ADOBE: Safari 3 on Windows is passing bogus values in stream->headers in NPP_NewStream, causing Flash Player to crash.
        
        Serialize the headers into a stream and pass it to NPP_NewStream in stream->headers.
        
        * plugins/win/PluginStreamWin.cpp:
        (WebCore::PluginStreamWin::startStream):
        * plugins/win/PluginStreamWin.h:

2007-09-06  Darin Adler  <darin@apple.com>

        Reviewed by Hyatt.

        - fix http://bugs.webkit.org/show_bug.cgi?id=15153
          REGRESSION: Assertion failure in FrameView::scheduleRelayout() (m_frame->view() == this)

        Back out the willRemove() part of the previous patch.
        It was incorrect and not needed to fix the bug anyway.

        * dom/Document.cpp: (WebCore::Document::detach): Remove willRemove().

        * loader/FrameLoader.cpp: (WebCore::FrameLoader::clear): Put the willRemove() call
        back here where it was originally before the previous fix.

        * history/CachedPage.cpp: (WebCore::CachedPage::clear):
        * page/Frame.cpp:
        (WebCore::Frame::setView):
        (WebCore::Frame::setDocument):
        Added FIXMEs about the fact that we call detach() on the document but not willRemove().

2007-09-05  Timothy Hatcher  <timothy@apple.com>

        Reviewed by Darin.

        Changed the blocked exception log message to match AppKit's blocked exception message.

        * platform/mac/BlockExceptions.mm:
        (ReportBlockedObjCException):

2007-09-06  Darin Adler  <darin@apple.com>

        Reviewed by Hyatt.

        - <rdar://problem/5457865> REGRESSION (9A527): Safari crashes when opening a page
          that immediately redirects to a PDF

        I don't know how to make an automated test that trips over this.

        The immediate cause of this regression was making a back/forward list entry in
        this case. Earlier, the quick redirect would not results in a separate entry.
        That's possibly a bug too, but it's better to fix the crash first.

        The page cache was putting the document into a strange state: Still attached but
        with the renderer set to 0. There was no good reason to do this, so got rid of it.
        Moved the responsibility to the caller of not calling detach() when moving into
        the page cache. This is more of a frame loader thing than a document thing.

        * dom/Document.cpp: (WebCore::Document::detach): Added assertions that this is
        only called on a document that's attached and not in the page cache. Also moved
        the call to willRemove in here, so that callers can't make the mistake of not
        calling that function. Removed the incorrectly-positioned code that made this
        function do less if it was called on a document in the page cache.

        * history/CachedPage.cpp: (WebCore::CachedPage::clear): Removed the code to handle
        a document with a renderer of 0. There was no need to put the document into this
        state. Any document in the page cache will always be "attached".

        * loader/FrameLoader.cpp: (WebCore::FrameLoader::clear): Added a check to prevent
        from calling an unnecessary cancelParsing() on a document that's in the page cache
        and guard the call to detach() with a check of attached(), like all other calls to
        detach() on DOM objects.

        * page/Frame.cpp:
        (WebCore::Frame::setView): Added a missing check of attached(), like all other
        calls to detach() on DOM objects. Also added code to not call detach() on the
        document when it's in the page cache.
        (WebCore::Frame::setDocument): This call site already had the attached() check,
        but was missing the page cache check.

2007-09-05  David Harrison  <harrison@apple.com>

        Reviewed by Darin.

        Follow up on my fix for <rdar://problem/5306171>.
        My first patch (r25373) broke svg/custom/stroke-width-click.svg.

        * editing/TextIterator.cpp:
        (WebCore::TextIterator::shouldRepresentNodeOffsetZero):
        Add currPos.isNotNull() check because positions in non-html content (like svg)
        do not have visible positions, and we don't want to emit for them either.

2007-09-06  Mitz Pettel  <mitz@webkit.org>

        Reviewed by Adam Roben.

        - fix http://bugs.webkit.org/show_bug.cgi?id=14685
          <rdar://problem/5349755> text-align affects <select> button but not its drop-down menu

        * platform/PlatformString.h:
        (WebCore::String::defaultWritingDirection):
        * platform/StringImpl.cpp:
        (WebCore::StringImpl::defaultWritingDirection): Moved textDirectionForParagraph()
        from RenderMenuList.cpp here.
        * platform/StringImpl.h:
        * platform/win/PopupMenuWin.cpp:
        (WebCore::PopupMenu::itemWritingDirectionIsNatural): Changed to return 'true'.
        (WebCore::PopupMenu::paint): Changed to use natural directionality for menu
        items.
        * rendering/RenderMenuList.cpp:
        (WebCore::RenderMenuList::adjustInnerStyle): Use defaultWritingDirection.

2007-09-06  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Oliver Hunt.

        - fixed <rdar://problem/5455457> REGRESSION (9A527-9A535): Colloquy crash on launch in WebCoreScriptDebugger initWithDelegate (with announce.js plug-in installed)

        * page/mac/FrameMac.mm:
        (WebCore::Frame::windowScriptObject): Ensure that -[WebView
        windowScriptObject] and -[WebFrame windowObject] return null until
        the windowScriptObjectAvailable: delegate method is sent.

2007-09-05  David Harrison  <harrison@apple.com>

        Reviewed by Kevin Decker.

        <rdar://problem/5306171> Mail: The first return after an attachment in multipart/mixed message is lost

        Test added: editing/selection/toString-1.html
        
        Source changes:
        * editing/TextIterator.cpp:
        (WebCore::TextIterator::shouldRepresentNodeOffsetZero):
        - Remove outdated and erroneous check for m_lastTextNode.
        - Fix VisiblePosition check to look for line diff. Simple position diff gives the
        wrong answer when the start is table/0 and the current is the first position
        inside the content of the table.

2007-09-04  Marvin Decker  <marv.decker@gmail.com>

        Reviewed by Maciej Stachowiak.

        http://bugs.webkit.org/show_bug.cgi?id=15072
        Bug 15072: Fix ImageDecoder.cpp to not copy incoming data

        Change ImageDecoder::setData to take a SharedBuffer*.

        * platform/graphics/cairo/ImageSourceCairo.cpp:
        (WebCore::ImageSource::setData):
        * platform/image-decoders/ImageDecoder.h:
        (WebCore::RGBA32Buffer::bytes):
        (WebCore::RGBA32Buffer::height):
        (WebCore::ImageDecoder::setData):
        * platform/image-decoders/gif/GIFImageDecoder.cpp:
        (WebCore::GIFImageDecoder::setData):
        (WebCore::GIFImageDecoder::frameCount):
        (WebCore::GIFImageDecoder::decode):
        (WebCore::GIFImageDecoder::decodingHalted):
        (WebCore::GIFImageDecoder::initFrameBuffer):
        * platform/image-decoders/gif/GIFImageDecoder.h:
        * platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
        (WebCore::JPEGImageDecoder::setData):
        (WebCore::JPEGImageDecoder::decode):
        * platform/image-decoders/jpeg/JPEGImageDecoder.h:
        * platform/image-decoders/png/PNGImageDecoder.cpp:
        (WebCore::PNGImageDecoder::setData):
        (WebCore::PNGImageDecoder::decode):
        (WebCore::PNGImageDecoder::headerAvailable):
        (WebCore::PNGImageDecoder::rowAvailable):
        * platform/image-decoders/png/PNGImageDecoder.h:

2007-09-04  David Hyatt  <hyatt@apple.com>

        Fix for <rdar://problem/5271213>, resizing iChat window is slower than in
        Tiger. This patch implements a fast scaling mode that can be used by
        WebViews, e.g., during window resizing.

        Reviewed by John Sullivan

        * WebCore.exp:
        * WebCore.xcodeproj/project.pbxproj:
        * page/Frame.cpp:
        (WebCore::FramePrivate::FramePrivate):
        * page/Page.cpp:
        (WebCore::Page::Page):
        (WebCore::Page::inLowQualityImageInterpolationMode):
        (WebCore::Page::setInLowQualityImageInterpolationMode):
        * page/Page.h:
        * platform/graphics/GraphicsContext.cpp:
        (WebCore::GraphicsContext::drawImage):
        * platform/graphics/GraphicsContext.h:
        (WebCore::GraphicsContext::setUseLowQualityImageInterpolation):
        (WebCore::GraphicsContext::useLowQualityImageInterpolation):
        * platform/graphics/cg/GraphicsContextCG.cpp:
        (WebCore::GraphicsContext::setUseLowQualityImageInterpolation):
        (WebCore::GraphicsContext::useLowQualityImageInterpolation):
        * rendering/RenderImage.cpp:
        (WebCore::RenderImage::paint):

2007-09-04  Brady Eidson  <beidson@apple.com>

        Reviewed by Adam

        Some SQLite tweaks for debugging
        -In debug builds, track the thread that opened the database and enforce that any statements
         that operate on the SQLDatabase do so from the thread that opened it
        -Track whether or not a transaction is in progress for the SQLDatabase to find cases where
         someone opens a new transaction while there is still one outstanding (a SQLite logic error)

        * loader/icon/SQLDatabase.cpp:
        (WebCore::SQLDatabase::SQLDatabase): 
        (WebCore::SQLDatabase::open): Track the opening thread.  Also, return false if the DB failed to
          open instead of trying to run a PRAGMA on it!
        (WebCore::SQLDatabase::close): Reset the opening thread
        * loader/icon/SQLDatabase.h:
        (WebCore::SQLDatabase::transactionInProgress): 
        (WebCore::SQLDatabase::sqlite3Handle): For access to the raw sqlite3* handle to do a thread
          safety check

        * loader/icon/SQLStatement.cpp:
        (WebCore::SQLStatement::prepare): Use the new sqlite3Handle accessor
        (WebCore::SQLStatement::step): Ditto

        * loader/icon/SQLTransaction.cpp:
        (WebCore::SQLTransaction::SQLTransaction): Removed the c'tor form that could automatically
          begin the transaction - never used and shouldn't be in practice!
        (WebCore::SQLTransaction::begin): Maintain the transaction-in-progress flag on the DB
        (WebCore::SQLTransaction::commit): Ditto
        (WebCore::SQLTransaction::rollback): Ditto
        * loader/icon/SQLTransaction.h:

2007-09-04  David Harrison  <harrison@apple.com>

        Reviewed by Maciej and John.

        <rdar://problem/5452675> CrashTracer: [USER] 10 crashes in Mail at com.apple.WebCore: WebCore::Node::nodeIndex const + 6

        * editing/InsertParagraphSeparatorCommand.cpp:
        (WebCore::InsertParagraphSeparatorCommand::doApply):
        Adjust pos to pos.downstream() after the refNode is calculated, but before the insertion. Doing it earlier
        undid the logic of positionAvoidingSpecialElementBoundary(). The downstream is still needed just to set the
        ending selection.

2007-09-04  Antti Koivisto  <antti@apple.com>

        Reviewed by Maciej.
        
        Fix <rdar://problem/5452112>
        REGRESSION: Initially focused textfield on www.mac.com login page has no insertion point, and doesn't accept typed characters
        
        Use updateLayoutIgnorePendingStylesheets() instead of updateLayout(). We need to have rendering to set input focus.

        Test: fast/forms/focus-style-pending.html

        * dom/Element.cpp:
        (WebCore::Element::focus):

2007-09-04  Girish Ramakrishnan  <girish@trolltech.com>

        Reviewed by Simon.

        Fixed Qt build on Windows

        * html/HTMLFormElement.cpp:
        (WebCore::pathGetFilename):

2007-09-03  David Harrison  <harrison@apple.com>

        Reviewed by Kevin Decker.

        <rdar://problem/5456785> REGRESSION (r15963-r15970): Heading text not placed in VoiceOver Item Chooser (15132)

        * bridge/mac/WebCoreAXObject.mm:
        (-[WebCoreAXObject title]):
        For headings, return the text under the element instead of nil.

2007-08-20  Oleg Sukhodolsky <son.two@gmail.com>

        Reviewed by Mark.

        WebKitQt/WebCoreSupport should not be added to INCLUDEPATH for gdk-port

        * WebCore.pro:

2007-09-03  Mark Rowe  <mrowe@apple.com>

        Reviewed by Tim Hatcher.

        <rdar://problem/5452164> Production build with in symbols directory has no debug info

        Enable debug symbol generation on all build configurations.  Production builds are stripped
        of symbols by Xcode during deployment post-processing.

        * Configurations/Base.xcconfig:
        * WebCore.xcodeproj/project.pbxproj:

2007-09-02  Brady Eidson  <beidson@apple.com>

        Reviewed by John Sullivan and Mark Rowe

        Groundwork for support for monitoring IconDatabase in-memory statistics

        * WebCore.exp:
        * loader/icon/IconDatabase.cpp:
        (WebCore::IconDatabase::pageURLMappingCount): Stub for now
        (WebCore::IconDatabase::retainedPageURLCount): Ditto
        (WebCore::IconDatabase::iconRecordCount): Ditto
        (WebCore::IconDatabase::iconRecordCountWithData): Ditto
        * loader/icon/IconDatabase.h:

2007-09-02  Mark Rowe  <mrowe@apple.com>

        Reviewed by Antti.

        <rdar://problem/5454704> WebKit seems to get too-narrow widths for "Monotype Corsiva", so lays out incorrectly

        * platform/mac/FontDataMac.mm:
        (WebCore::FontData::determinePitch): Work around NSFont incorrectly reporting Monotype Corsiva as fixed pitch.

2007-09-01  Darin Adler  <darin@apple.com>

        - rolled out fix for bug 12988 because it broke getElementById in a layout test
          I'm working on a new fix.

        * dom/Document.cpp: Rolled out.

2007-09-01  Oliver Hunt  <oliver@apple.com>

        Reviewed by Sam.

        <rdar://problem/5344848> IME is incorrectly used for key events when on non-editable regions

        Adding a new EditorClient method so it is possible to inform WebKit of focus changes.
        Also added new virtual method Node::shouldUseInputMethod to allow us to trivially check
        whether an input method should be used when processing input for the currently focused
        Node.

        * bridge/EditorClient.h:
        * dom/Node.cpp:
        (WebCore::Node::shouldUseInputMethod):
        * dom/Node.h:
        * html/HTMLInputElement.cpp:
        (WebCore::HTMLInputElement::shouldUseInputMethod):
        * html/HTMLInputElement.h:
        * html/HTMLTextAreaElement.cpp:
        (WebCore::HTMLTextAreaElement::shouldUseInputMethod):
        * html/HTMLTextAreaElement.h:
        * page/FocusController.cpp:
        (WebCore::FocusController::setFocusedNode):
        * platform/graphics/svg/SVGImageEmptyClients.h:
        (WebCore::SVGEmptyEditorClient::setInputMethodState):

2007-09-01  Rob Buis  <buis@kde.org>

        Reviewed by Darin.

        http://bugs.webkit.org/show_bug.cgi?id=12988
        First element (in document order) is not returned when other duplicate ID-ed elements were created first

        Reset the element id cache when id's are added or removed and there
        are duplicates for that id.

        Tests: fast/dom/duplicate-ids-document-order.html

        * dom/Document.cpp:
        (WebCore::Document::getElementById):
        (WebCore::Document::addElementById):
        (WebCore::Document::removeElementById):

2007-09-01  Rob Buis  <buis@kde.org>

        Reviewed by Darin.

        http://bugs.webkit.org/show_bug.cgi?id=15083
        Some symbols in WebKit do not need to be exported

        Do not export these symbols.

        * dom/QualifiedName.cpp:
        (WebCore::hashComponents):
        * dom/XMLTokenizer.cpp:
        (WebCore::toString):
        (WebCore::getTokenizer):
        * history/HistoryItem.cpp:
        (WebCore::defaultNotifyHistoryItemChanged):
        * platform/Arena.cpp:
        (WebCore::CeilingLog2):
        * platform/graphics/Color.cpp:
        (WebCore::calcHue):
        * platform/graphics/Path.cpp:
        (WebCore::pathLengthApplierFunction):
        * platform/graphics/cg/PathCG.cpp:
        (WebCore::CGPathToCFStringApplierFunction):
        (WebCore::CFStringFromCGPath):
        * rendering/RenderText.cpp:
        (WebCore::isSpaceAccordingToStyle):

2007-08-31  Alice Liu  <alice.liu@apple.com>

        Reviewed by Tim Hatcher.

        Fixed <rdar://problem/5420682> Mail crashes at WebCore::InsertLineBreakCommand::doApply() after dropping a selected image over container's close box

        * editing/DeleteButtonController.cpp:
        (WebCore::DeleteButtonController::show):
        Factored out the code in ::show() that created and styled the elements of the Deletion UI

        (WebCore::DeleteButtonController::createDeletionUI):
        Neglecting to move the append of the deletionUI elements into the same clause that handles the creation
        of them ended up creating multiple elements at were repeatedly appended to the target, resulting in a 
        bloated table deletion UI which was slow to show and hide. 

        * editing/DeleteButtonController.h:
        (WebCore::DeleteButtonController::enabled):
        Restore this function to how it used to be pre-r25305, sans asserts

        * editing/EditCommand.cpp:
        Add disable/enable sandwich when undoing/redoing commands too
        (WebCore::EditCommand::unapply):
        (WebCore::EditCommand::reapply):

2007-08-31  Antti Koivisto  <antti@apple.com>

        Reviewed by Anders.

        Fix <rdar://problem/5452943>
        REGRESSION (r25283): Reproducible crash in HTMLObjectElement::getInstance under guard malloc
        
        Calling updateLayoutIgnorePendingStylesheets() may do arbitrary things to render tree so
        no RenderObjects can be cached over it.

        * html/HTMLEmbedElement.cpp:
        (WebCore::findWidgetRenderer):
        (WebCore::HTMLEmbedElement::getInstance):
        * html/HTMLObjectElement.cpp:
        (WebCore::HTMLObjectElement::getInstance):

2007-08-31  Anders Carlsson  <andersca@apple.com>

        Reviewed by Mitz.

        <rdar://problem/5443936>
        Crash after QT movie completes playback at apple.com/imac
        
        If the plug-in or one of its children have focus, set it to NULL to prevent the web view window from getting the focus, 
        which can cause a layout to happen while in HTMLObjectElement::detach. (This is what we do on the Mac).
        
        * plugins/win/PluginViewWin.cpp:
        (WebCore::PluginViewWin::setParent):

2007-08-30  Adele Peterson  <adele@apple.com>

        Reviewed by Justin.

        Fix for <rdar://problem/5450600> REGRESSION: can't paste in textfield if its in a body that has user-select:none set (affects widgets)

        Test: editing/pasteboard/paste-plaintext-user-select-none.html

        * editing/ReplaceSelectionCommand.cpp: (WebCore::ReplacementFragment::insertFragmentForTestRendering):
          Copy the user-select style from the current selection node and apply it so it is considered during the test rendering.
          This is important since we recently changed user-select to be inherited.  When we consider valid VisiblePositions for the test rendering,
          we need to have the correct user-select value that will actually be used for the real insertion.

2007-08-31  Anders Carlsson  <andersca@apple.com>

        Reviewed by Oliver.

        <rdar://problem/5423939>
        http://bugs.webkit.org/show_bug.cgi?id=15013
        ASSERTION FAILED !m_inDestructor in WebCore::Shared<WebCore::PluginStreamWin>::ref() on Windows
        
        Protect the stream in case it's destroyed by the plug-in.
        
        * plugins/win/PluginStreamWin.cpp:
        (WebCore::PluginStreamWin::didReceiveData):

a2007-08-31  Darin Adler  <darin@apple.com>

        Reviewed by Anders.

        - http://bugs.webkit.org/show_bug.cgi?id=15122

        * editing/htmlediting.cpp: (WebCore::avoidIntersectionWithNode):
        Change assertion so that it only fires when actually modifying the selection.
        This isn't nearly as helpful, because the old assertion could catch potential
        problems in more cases, but it's not obvious how to do better.

2007-08-30  Oliver Hunt  <oliver@apple.com>

        Reviewed by Adam.
        
        <rdar://problem/5430772> REGRESSION(303-310A5) list items do not show with mouse over on istweb.apple.com/quack.apple.com
        
        VC++ treats bitfields as signed members, so Node::m_styleChange would be
        sign extended if it was assigned the value FullStyleChange.  This caused
        style recalculation to stop propagating.  
        
        We work around this VC++ oddity by storing the enum as an unsigned, and
        casting back to StyleChangeType in the getter.
                
        Test: fast/css/hover-affects-child.html

        * dom/Node.h:
        (WebCore::Node::styleChangeType):

2007-08-29  Justin Garcia  <justin.garcia@apple.com>

        Reviewed by Darin.

        <rdar://problem/5368833> 
        REGRESSION: Pasting a triple-clicked line of quoted text at the top of a message adds an extra, quoted line

        * editing/CompositeEditCommand.cpp:
        (WebCore::CompositeEditCommand::insertParagraphSeparator): Added an option for
        using a plain div to hold the new paragraph, instead of a clone of the previous
        block.
        * editing/CompositeEditCommand.h:
        * editing/InsertParagraphSeparatorCommand.cpp: Ditto.
        (WebCore::InsertParagraphSeparatorCommand::InsertParagraphSeparatorCommand): Ditto.
        (WebCore::InsertParagraphSeparatorCommand::doApply): Ditto.
        * editing/InsertParagraphSeparatorCommand.h:
        * editing/ReplaceSelectionCommand.cpp:
        (WebCore::ReplaceSelectionCommand::doApply): Use a default block element when creating
        new paragraphs, so that empty paragraphs don't contain the block style of the previous
        one.
        Don't expand collapsed brs at the end of inserted content, this was the root of the bug.
        We'd copy <blockquote>hello<br></blockquote><br class="Apple-interchange-newline">
        and get an extra paragraph.  The removed code used to make sure that if the copied 
        selection ends with a paragraph break that is represented in the copied markup by a 
        regular br (not an interchange newline br), that that paragraph break appears in the 
        pasted content, but shouldMergeEnd, which was introduced after this code was written, 
        now takes care of that.
        (WebCore::ReplaceSelectionCommand::shouldRemoveEndBR): Inserted content should always
        displace placeholder brs, even if that inserted content ends with a br.
        * editing/markup.cpp:
        (WebCore::needInterchangeNewlineAfter): This code failed to add an interchange newline
        if the user copied <div>hello</div><br>, only don't add an interchange newline when
        copying ^hello<br>^<br>, because then the copied paragraph break will already be 
        represented in the copied markup by a br.
        (WebCore::createMarkup):

2007-08-30  David Harrison  <harrison@apple.com>

        Reviewed by Darin.

        <rdar://problem/5423900> Seed: safari crashes on submit feedback page in -[WebCoreAXObject isAttachment]

        * bridge/mac/WebCoreAXObject.mm:
        (-[WebCoreAXObject isAttachment]):
        Add nil check since element could be detached.

2007-08-30  Mitz Pettel  <mitz@webkit.org>

        Reviewed by Dave Hyatt.

        - fix http://bugs.webkit.org/show_bug.cgi?id=13282
          <rdar://problem/5126392> REGRESSION (NativePopUp): Rightmost character cut off in pop-up menu

        * rendering/RenderMenuList.cpp:
        (WebCore::RenderMenuList::updateOptionsWidth): When measuring option text, use
        the same WebCore run rounding behavior that is used to draw it in the popup button.

2007-08-30  Riku Voipio  <riku.voipio@iki.fi>

        Reviewed by Dave Kilzer.

        Better ARM defines.

        * platform/DeprecatedString.h: Update comments to reflect the
        change and update test to fit changes to Platform.h.

2007-08-30  Darin Adler  <darin@apple.com>

        Reviewed by Tim Hatcher.

        - fix http://bugs.webkig.org/show_bug.cgi?id=14981
          DEBUG builds of WebKit hang videwing Yahoo! Mail messages
          with ~5 MB text attachment

        * rendering/InlineFlowBox.cpp: (WebCore::InlineFlowBox::checkConsistency):
        * rendering/RenderFlow.cpp: (WebCore::RenderFlow::checkConsistency):
        * rendering/RenderText.cpp: (WebCore::RenderText::checkConsistency):
        Put the actual consistency check inside an ifdef. If you need it you can
        turn it on. There's still some function call overhead in builds that don't
        have NDEBUG defined, but that's worth it so we can turn this on and off
        without recompiling the world.

        - small code style improvement to recently changed function

        * editing/TextIterator.cpp: (WebCore::plainTextToMallocAllocatedBuffer):
        Use a typedef and make_pair to make the code dealing with the pair simpler to read.

2007-08-30  Simon Hausmann  <hausmann@kde.org>

        Reviewed by Zack.

        Fix Qt/Gdk build. gcc on Linux at least doesn't like initializing
        variables between jumps with goto ("jump to label foo crosses
        initialization of bar").

        * editing/TextIterator.cpp:
        (WebCore::plainTextToMallocAllocatedBuffer):

2007-08-30  Darin Adler  <darin@apple.com>

        Reviewed by Antti.
 
        - fix <rdar://problem/5423270> CrashTracer: [USER] 1 crash in Safari at com.apple.WebCore:
          WebCore::plainTextToMallocAllocatedBuffer + 762

        * editing/TextIterator.cpp: (WebCore::plainTextToMallocAllocatedBuffer):
        Check for a malloc failure and exit the function if it failed.

2007-08-29  Anders Carlsson  <andersca@apple.com>

        Reviewed by Oliver.

        <rdar://problem/5404329>
        Plugin content starves WM_TIMER events on UI thread (affects idle behavior of app) on http://www.vincent-vella.com/, http://www.sagmeister.com/
        
        Add a tiny delay to invalidation timer to prevent it from starving other timers.
        
        * plugins/win/PluginViewWin.cpp:
        (WebCore::PluginViewWin::invalidateRect):

2007-08-29  Darin Adler  <darin@apple.com>

        Reviewed by Adele.

        * editing/htmlediting.cpp: (WebCore::avoidIntersectionWithNode):
        Fix an assert that was firing for me all the time when doing editing operations.

2007-08-29  Anders Carlsson <andersca@apple.com>

        Reviewed by Adam.

        <rdar://problem/5386098>
        Repro hang with some Flash plugin content (http://dougmccune.com/blog/2007/07/25/coming-to-flexcamp-at-adobe/)
        
        In some cases, Flash ends up starving the main loop by sending a lot of WM_USER + 1 messages. Throttle these
        messages so they won't end up hanging the web browser.
        
        * plugins/win/PluginViewWin.cpp:
        (WebCore::PluginMessageThrottlerWin::PluginMessageThrottlerWin):
        (WebCore::PluginMessageThrottlerWin::~PluginMessageThrottlerWin):
        (WebCore::PluginMessageThrottlerWin::appendMessage):
        (WebCore::PluginMessageThrottlerWin::messageThrottleTimerFired):
        (WebCore::PluginMessageThrottlerWin::allocateMessage):
        (WebCore::PluginMessageThrottlerWin::isInlineMessage):
        (WebCore::PluginMessageThrottlerWin::freeMessage):
        (WebCore::PluginViewWndProc):
        (WebCore::PluginViewWin::wndProc):
        (WebCore::PluginViewWin::determineQuirks):
        * plugins/win/PluginViewWin.h:
        (WebCore::):
        (WebCore::PluginViewWin::pluginWndProc):

2007-08-29  Beth Dakin  <bdakin@apple.com>

        Reviewed by Hyatt.

        Fix for <rdar://problem/5436800> REGRESSION: PLT is 1.5% slower due 
        to r24593 and r25098

        In r25098, we only called setCreatedByParser for XML! This patch 
        calls it for HTML too, and takes care of the performance 
        regression.

        * html/HTMLElementFactory.cpp:
        (WebCore::styleConstructor):

2007-08-29  Antti Koivisto  <antti@apple.com>

        Reviewed by Mitz.
        
        Fix <rdar://problem/5425951>
        REGRESSION: change to updateLayoutIgnorePendingStylesheets causes SAP Portal page to render wrong
        
        If new nodes have been added or style recalc has been done with style sheets still pending, some nodes 
        may not have had their real style calculated yet. Normally this state gets cleaned when style sheets arrive 
        but in updateLayoutIgnorePendingStylesheets() we need to do full style recalc to get up-to-date style immediatly.
        
        Added a document flag to track if there are any nodes that did not have their real style calculated due to
        pending stylesheets.

        Test: fast/dynamic/style-access-late-stylesheet-load.html

        * css/CSSStyleSelector.cpp:
        (WebCore::CSSStyleSelector::styleForElement):
        * dom/Document.cpp:
        (WebCore::Document::Document):
        (WebCore::Document::recalcStyle):
        (WebCore::Document::updateLayoutIgnorePendingStylesheets):
        * dom/Document.h:
        (WebCore::Document::setHasNodesWithPlaceholderStyle):

2007-08-29  Alice Liu  <alice.liu@apple.com>

        Reviewed by Maciej.

        We disable the DeleteButton UI before applying any editing commands.
        This patch simply moves those disable/enable calls to a more correct place, closer to the actual application of the editing command. 

        * editing/EditCommand.cpp:
        (WebCore::EditCommand::apply):
        (WebCore::applyCommand):

2007-08-28  Alice Liu  <alice.liu@apple.com>

        fixed <rdar://problem/5420682> Mail crashes at WebCore::InsertLineBreakCommand::doApply() 
                                       after dropping a selected image over container's close box

        Reviewed by Darin and Maciej.

        * editing/DeleteButtonController.cpp:
        (WebCore::DeleteButtonController::show):
        (WebCore::DeleteButtonController::hide):
        * editing/DeleteButtonController.h:
        (WebCore::DeleteButtonController::enabled):
        General changes made to DeleteButtonController: when hiding, it's not necessary to clear out 
        the m_containerElement and m_target, especially since to fix this bug we need to keep 
        their values around.  It's sufficient to just detach the container from target.

        * editing/EditCommand.cpp:
        (WebCore::EditCommand::EditCommand):
        Move the selection out of the deletion UI since we don't want to expose the deletion UI to any editing.

        * editing/Editor.cpp:
        (WebCore::Editor::rangeForPoint):
        Move the range out of the deletion UI since we don't want to expose the deletion UI to any editing.

        * editing/htmlediting.cpp:
        * editing/htmlediting.h:
        (WebCore::avoidIntersectionWithNode):
        Moved function that operates on Range from markup.cpp to here
        Added new implementation for function that operates on Selection

        * editing/markup.cpp:
        (WebCore::createMarkup):
        Moved function out of this file to htmlediting.cpp, and renamed to avoidIntersectionWithNode

2007-08-29  David Hyatt  <hyatt@apple.com>

        Fix for 5441281, remove our dependency on cursor rects and drag margins
        in AppKit for a large performance boost on the PLT and iBench.

        Reviewed by darin

        * platform/mac/WidgetMac.mm:
        (WebCore::safeRemoveFromSuperview):
        (WebCore::Widget::addToSuperview):
        Suppress the resetting of drag margins when views are added and removed.

        (WebCore::Widget::setCursor):
        Just use NSCursor's set method to immediately set the cursor.  We no longer
        rely on NSScrollView/NSClipView setDocumentCursor, since that is implemented
        using cursor rects.

2007-08-29  Rick  <rick@writhe.org.uk>

        Reviewed by Tim Hatcher.

        Fix http://bugs.webkit.org/show_bug.cgi?id=14853
        Bug 14853: Incorrect implementation of ArrayImpl's equality operator

        * platform/ArrayImpl.cpp:
        (WebCore::ArrayImpl::operator==):
        Fixed typo so that correct variable is used in equality comparison.

2007-08-29  Peter Kasting  <zerodpx@gmail.com>

        Reviewed by Maciej.

        - fix http://bugs.webkit.org/show_bug.cgi?id=15096
        Move the GIF frame duration minimum check into the various
        ImageSource*.cpp backends and use the same values as
        ImageSourceCG.cpp.

        * platform/graphics/cairo/ImageSourceCairo.cpp:
        (WebCore::ImageSource::frameDurationAtIndex):
        * platform/graphics/qt/ImageSourceQt.cpp:
        (WebCore::ImageSource::frameDurationAtIndex):
        * platform/image-decoders/gif/GIFImageReader.cpp:
        (GIFImageReader::read):

2007-08-29  Peter Kasting  <zerodpx@gmail.com>

        Reviewed by Maciej.

        - fix http://bugs.webkit.org/show_bug.cgi?id=15097
        Make PNGImageDecoder.cpp size its frame buffer vector in its
        constructor, so it never throws decoded image data away no matter
        what order its functions are called in.

        * platform/image-decoders/png/PNGImageDecoder.cpp:
        (WebCore::PNGImageDecoder::PNGImageDecoder):
        (WebCore::PNGImageDecoder::frameBufferAtIndex):
        (WebCore::PNGImageDecoder::decode):
        (WebCore::PNGImageDecoder::rowAvailable):
        (WebCore::PNGImageDecoder::pngComplete):

2007-08-29  Peter Kasting  <zerodpx@gmail.com>

        Reviewed by Maciej.

        - fix http://bugs.webkit.org/show_bug.cgi?id=15104
        Don't double-compensate for sizeof(unsigned) when making a buffer
        overflow check in the GIF decoder.  Now interlaced GIFs don't
        sometimes get nothing/garbage in some of the bottom rows.

        * platform/image-decoders/gif/GIFImageDecoder.cpp:
        (WebCore::GIFImageDecoder::haveDecodedRow):

2007-08-28  Sam Weinig  <sam@webkit.org>

        Reviewed by Darin.

        Update fix landed in r25249 to account for XMLHttpRequest, which can also be EventTargets.

        Tests: http/tests/security/listener/xss-XMLHttpRequest-addEventListener.html
               http/tests/security/listener/xss-XMLHttpRequest-shortcut.html

        * bindings/js/JSXMLHttpRequest.cpp:
        (KJS::JSXMLHttpRequest::putValueProperty): Use the Window object associated with document's frame, not the active Window.
        (KJS::JSXMLHttpRequestPrototypeFunction::callAsFunction): ditto
        * xml/XMLHttpRequest.h:
        (WebCore::XMLHttpRequest::document): Expose Document member so bindings can access the correct frame.

2007-08-28  Anders Carlsson  <andersca@apple.com>

        Reviewed by Darin.

        <rdar://problem/5424866> Bottom portion of any Web Clip widget appears transparent

        Restore the previous behavior, creating plug-ins on attach, for WebKit plug-ins. Netscape plug-ins
        are still created during the first layout.
        
        * html/HTMLEmbedElement.cpp:
        (WebCore::HTMLEmbedElement::getInstance):
        Only call layout if the renderer doesn't have a widget.
        
        * html/HTMLObjectElement.cpp:
        (WebCore::HTMLObjectElement::getInstance):
        Likewise.
        
        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::shouldUsePlugin):
        Update for enum change.
        
        * loader/FrameLoaderTypes.h:
        Add ObjectContentNetscapePlugin and ObjectContentOtherPlugin.
        
        * page/mac/WebCoreFrameBridge.h:
        Get rid of the enum here, we can use the one in FrameLoaderTypes.h
        
        * rendering/RenderPartObject.cpp:
        (WebCore::RenderPartObject::updateWidget):
        Only create the plug-in if it's not a Netscape plug-in.
        
        (WebCore::RenderPartObject::layout):
        Fix indentation.
        
2007-08-28  David Harrison  <harrison@apple.com>

        Reviewed by Darin.

        <rdar://problem/5415006> Command Left in a To Do causes caret to disappear

        The selection was ending up inside non-editable content at the To Do Options
        arrow image, rather then at the editable position just to the left of that image.
        The problem was that startPositionForLine looked only at line boxes, and there
        is no linebox for the editable position at the far left of a To Do, which is
        a table. Addressed by having startPositionForLine use table offset 0 instead
        of the first VisiblePosition inside the table.
        
        Found and fixed the similar case with option-left (move by word position).
        
        Test cases:
        * editing/selection/mixed-editability-8.html: Added.
        * editing/selection/mixed-editability-9.html: Added.

        Source changes:
        * editing/SelectionController.cpp:
        (WebCore::SelectionController::modifyMovingLeftBackward):
        
        * editing/VisiblePosition.cpp:
        (WebCore::VisiblePosition::next):
        (WebCore::VisiblePosition::previous):
        (WebCore::VisiblePosition::stayInEditableContentLeft):
        (WebCore::VisiblePosition::stayInEditableContentRight):
        Factored stayInEditableContentLeft() and stayInEditableContentRight()
        out of previous() and next().
        
        * editing/VisiblePosition.h:
        Declare stayInEditableContentLeft() and stayInEditableContentRight().

        * editing/visible_units.cpp:
        (WebCore::previousWordPosition):
        (WebCore::nextWordPosition):
        (WebCore::startOfLine):
        (WebCore::endOfLine):
        (WebCore::previousSentencePosition):
        (WebCore::nextSentencePosition):
        Call stayInEditableContentLeft() or stayInEditableContentRight(), as 
        appropriate, so prevent crossing from editable content into
        uneditable content.
        
        (WebCore::startPositionForLine):
        Use table offset 0 instead of the first VisiblePosition in the table.
        
2007-08-28  Mark Rowe  <mrowe@apple.com>

        Reviewed by Darin Adler.

        <rdar://problem/5443453> Decreasing history expiration time from 1 year to 1 week can lead to long hang while icon database syncs

        Perform the sync inside a SQLite transaction.  This drops the time taken for the sync from over 90s to under half a second in the
        extreme case of over 90,000 URLs being pruned.

        * loader/icon/IconDatabase.cpp:
        (WebCore::IconDatabase::syncDatabase):

2007-08-28  Mark Rowe  <mrowe@apple.com>

        Reviewed by Darin Adler.

        <rdar://problem/5437983> Loading history containing 100,000 entries adds 20s to Safari's startup

        Add a new constructor for HistoryItem that initializes the alternate title.  This prevents WebHistoryItem
        in WebKit from having explicitly set the display title, which triggers a history item changed notification
        to be posted, for each history item loaded.

        * WebCore.exp:
        * history/HistoryItem.cpp:
        (WebCore::HistoryItem::HistoryItem):
        * history/HistoryItem.h:

2007-08-28  Anders Carlsson  <andersca@apple.com>

        Reviewed by Darin.

        <rdar://problem/5298296> XMLHttpRequest readyState 3 & responseText buffer issues
        
        Add a shouldContentSniff flag to ResourceLoader and ResourceHandle and have XMLHttpRequest 
        pass in false when creating its subresource loader.
        
        * WebCore.exp:
        * loader/MainResourceLoader.cpp:
        (WebCore::MainResourceLoader::MainResourceLoader):
        (WebCore::MainResourceLoader::loadNow):
        * loader/ResourceLoader.cpp:
        (WebCore::ResourceLoader::ResourceLoader):
        (WebCore::ResourceLoader::load):
        * loader/ResourceLoader.h:
        * loader/SubresourceLoader.cpp:
        (WebCore::SubresourceLoader::SubresourceLoader):
        (WebCore::SubresourceLoader::create):
        * loader/SubresourceLoader.h:
        * loader/mac/NetscapePlugInStreamLoaderMac.mm:
        (WebCore::NetscapePlugInStreamLoader::NetscapePlugInStreamLoader):
        * platform/mac/WebCoreSystemInterface.h:
        * platform/mac/WebCoreSystemInterface.mm:
        * platform/network/ResourceHandle.cpp:
        (WebCore::ResourceHandle::ResourceHandle):
        (WebCore::ResourceHandle::create):
        * platform/network/ResourceHandle.h:
        * platform/network/ResourceHandleInternal.h:
        (WebCore::ResourceHandleInternal::ResourceHandleInternal):
        * platform/network/mac/ResourceHandleMac.mm:
        (WebCore::ResourceHandle::start):
        * xml/XMLHttpRequest.cpp:
        (WebCore::XMLHttpRequest::send):

2007-08-27  Steve Falkenburg  <sfalken@apple.com>

        Added getter for committedFirstRealDocumentLoad.
        
        Reviewed by Maciej.

        * loader/FrameLoader.h: Added committedFirstRealDocumentLoad.
        (WebCore::FrameLoader::committedFirstRealDocumentLoad): Added.

2007-08-27  Antti Koivisto  <antti@apple.com>

        Reviewed by Maciej.
        
        Fix <rdar://problem/5433144>
        REGRESSION: Unable to click "Select" link at Expedia for car rentals
        
        javascript: URLs need special handling when serializing. Escaping them like
        normal attribute values can do bad things. Try hard to not escape anything,
        escape quote characters only if really necessary. Try to match Firefox.

        Test: fast/innerHTML/javascript-url.html

        * editing/markup.cpp:
        (WebCore::urlAttributeToQuotedString):
        (WebCore::startMarkup):

2007-08-27  David Hyatt  <hyatt@apple.com>

        Fix for 5441224, micro-optimizations to improve the PLT by 1%.

        Reviewed by Darin

        * css/CSSStyleSelector.cpp:
        (WebCore::CSSStyleSelector::canShareStyleWithElement):
        * platform/mac/FontMac.mm:
        (WebCore::Font::drawGlyphs):
        * rendering/RenderInline.cpp:
        (WebCore::RenderInline::requiresLayer):
        * rendering/RenderObject.cpp:
        (WebCore::RenderObject::isBody):
        * rendering/RenderObject.h:
        (WebCore::RenderObject::renderArena):
        (WebCore::RenderObject::isRoot):

2007-08-27  Mitz Pettel  <mitz@webkit.org>

        Reviewed by Darin.

        - fix http://bugs.webkit.org/show_bug.cgi?id=15091
          Crash in RenderBlock::skipWhitespace during layout <rdar://problem/5439631> 

        Test: fast/replaced/applet-disabled-positioned.html

        * html/HTMLAppletElement.cpp:
        (WebCore::HTMLAppletElement::createRenderer): Changed to call
        RenderObject::createObject(), which accounts for style.

2007-08-26  Antti Koivisto  <antti@apple.com>

        Reviewed by Darin.
        
        Fix for <rdar://problem/5433726>
        Mail crash at WebCore::Frame::styleForSelectionStart() when deleting a selection in a HTML message (http://www.yahoo.com/)

        Test: editing/style/temporary-span-crash.html

        * page/Frame.cpp:
        (WebCore::Frame::styleForSelectionStart):
        Temporary span created here might not have renderer if document has style sheet that makes it display:none.
        Set display:inline explicitly in spans style attribute. This temporary span does not need to get its display 
        value from actual document style sheets. Null check the renderer too to be sure.


2007-08-24  Sam Weinig  <sam@webkit.org>

        Reviewed by Adele.

        Fix for <rdar://problem/5426142>

        Use the EventTarget's frame when creating the EventListener.

        Tests: http/tests/security/listener/xss-JSTargetNode-onclick-addEventListener.html
               http/tests/security/listener/xss-JSTargetNode-onclick-shortcut.html
               http/tests/security/listener/xss-window-onclick-addEventListener.html
               http/tests/security/listener/xss-window-onclick-shortcut.html

        * bindings/js/JSEventTargetNode.cpp:
        (WebCore::JSEventTargetNode::setListener):
        (WebCore::JSEventTargetNodePrototypeFunction::callAsFunction):
        * bindings/js/kjs_window.cpp:
        (KJS::WindowFunc::callAsFunction):

2007-08-25  Mitz Pettel  <mitz@webkit.org>

        Reviewed by Sam Weinig.

        - fix http://bugs.webkit.org/show_bug.cgi?id=15077
          REGRESSION: Cannot drag selected text out of a background window

        * manual-tests/drag-out-of-background-window.html: Added.
        * page/EventHandler.cpp:
        (WebCore::EventHandler::eventMayStartDrag): Added missing coordinate
        conversion.

2007-08-25  Rob Buis  <buis@kde.org>

        Reviewed by Darin.

        http://bugs.webkit.org/show_bug.cgi?id=14848
        DOM table rules are not updated when changed

        On a dynamic rules attr change, mark the table cells and
        their ancestors (up to and including the table tag) as
        changed.

        Tests: fast/table/rules-attr-dynchange1.html
               fast/table/rules-attr-dynchange2.html

        * html/HTMLTableElement.cpp:
        (WebCore::isTableCellAncestor):
        (WebCore::setTableCellsChanged):
        (WebCore::HTMLTableElement::parseMappedAttribute):

2007-08-25  Adele Peterson  <adele@apple.com>

        Reviewed by Mitz.

        Fix for http://bugs.webkit.org/show_bug.cgi?id=15073
        <rdar://problem/5426557> REGRESSION: Can no longer drag text from textareas
        
        Test: fast/forms/drag-out-of-textarea.html

        * rendering/RenderTextControl.cpp: (WebCore::RenderTextControlInnerBlock::nodeAtPoint):
          Only restricts hit testing if the placeholder text is visible.
        * rendering/RenderTextControl.h: (WebCore::RenderTextControl::placeholderIsVisible): Added. 

2007-08-25  Peter Kasting <zerodpx@gmail.org>

        Reviewed by Sam Weinig.

        Part 2 of http://bugs.webkit.org/show_bug.cgi?id=14967.
        Eliminate all remaining implicit conversions of wtf::Vector<T> to T*.  Where code was
        previously checking that the Vector's data pointer was non-NULL, check !Vector::isEmpty()
        instead.

        * bindings/js/kjs_navigator.cpp:
        (KJS::PluginBase::cachePluginDataIfNecessary):
        * loader/mac/LoaderNSURLExtras.m:
        (suggestedFilenameWithMIMEType):
        * page/FrameView.cpp:
        (WebCore::FrameView::~FrameView):
        (WebCore::FrameView::pauseScheduledEvents):
        (WebCore::FrameView::resumeScheduledEvents):
        (WebCore::FrameView::dispatchScheduledEvents):
        * platform/mac/PlugInInfoStoreMac.mm:
        (WebCore::PlugInInfoStore::createPluginInfoForPluginAtIndex):

2007-08-25  Mitz Pettel  <mitz@webkit.org>

        Rubber-stamped by Adam Roben

        - remove unused file

        * platform/win/MouseEventWin.cpp: Removed.

2007-08-25  Jasper Bryant-Greene  <m@ni.ac.nz>

        Reviewed by Oliver Hunt.

        Set paintingDisabled to true in Cairo's GraphicsContext constructor
        when passed a null PlatformGraphicsContext.

        * platform/graphics/cairo/GraphicsContextCairo.cpp:
        (WebCore::GraphicsContext::GraphicsContext):

2007-08-25  Mitz Pettel  <mitz@webkit.org>

        Reviewed by Dave Hyatt.

        - fix http://bugs.webkit.org/show_bug.cgi?id=15056
          REGRESSION (r21472): Digg Podcasts Episodes Render "Digg" counter incorrectly

        Covered by fast/parser/residual-style-close-across-n-blocks.html

        * html/HTMLParser.cpp:
        (WebCore::HTMLParser::handleResidualStyleCloseTagAcrossBlocks): If the
        residual style was closed before anything else in the block (so it does
        not apply to anything inside the block) avoid creating an empty element for
        it inside the block.

2007-08-25  Mitz Pettel  <mitz@webkit.org>

        Reviewed by Dave Hyatt.

        - fix http://bugs.webkit.org/show_bug.cgi?id=14972
          Moving cursor down in contentEditable section fails if styled line-height:1em

        Test: editing/selection/move-by-line-003.html

        * rendering/RenderText.cpp:
        (WebCore::RenderText::positionForCoordinates): Changed hit testing so that each
        line is tested for hits between its overflow top and the next line's overflow top.
        This matches RenderBlock::positionForCoordinates.

2007-08-25  Mitz Pettel  <mitz@webkit.org>

        Reviewed by Justin.

        - fix http://bugs.webkit.org/show_bug.cgi?id=14792
          <rdar://problem/5367763> REGRESSION: Copy inserts carriage return in middle of selection

        Test: editing/pasteboard/newlines-around-floating-or-positioned.html

        * editing/TextIterator.cpp:
        (WebCore::shouldEmitNewlinesBeforeAndAfterNode): Do not emit newlines around
        floating or positioned blocks. This behavior seems to match WinIE's.

2007-08-23  Justin Garcia  <justin.garcia@apple.com>

        Reviewed by Darin.
        
        <rdar://problem/5432254> GoogleDocs: A hang occurs when applying list style to selected table
        
        * editing/DeleteSelectionCommand.cpp:
        (WebCore::DeleteSelectionCommand::handleGeneralDelete): If the position
        that marked the start of the range to delete has been removed from the
        document, and it was inside the node that holds the position that marks
        the end of the range to delete, don't remove any children of that node,
        because we don't know how many to remove.  For example, if the end is
        [a, 5] and the start was in some descendant of a and was removed, don't
        remove any of the children of a.  We will now refuse to remove some content
        incorrectly, but that's less dangerous than removing content incorrectly.
        Long term we need to update these positions as we remove content from the 
        document, but that seems like a more risky change.  Added a testcase.
        * editing/InsertListCommand.cpp:
        (WebCore::InsertListCommand::modifyRange): If the end of the selection to 
        modify is just after a table, and if the start of the selection is inside 
        that table, the last paragraph that we'll want modify is the last one inside 
        the table, not the paragraph that contains the table itself. Adjust 
        startOfLastParagraph here to avoid infinite recursion.

2007-08-24  Anders Carlsson  <andersca@apple.com>

        Reviewed by Geoff.

        <rdar://problem/5430165>
        REGRESSION: Dynamically loaded images fail to load

        * html/HTMLImageLoader.cpp:
        (WebCore::HTMLImageLoader::HTMLImageLoader):
        Initialize the m_elementIsProtected member.

        (WebCore::HTMLImageLoader::~HTMLImageLoader):
        Assert that the element is not protected.
        
        (WebCore::HTMLImageLoader::setLoadingImage):
        If the image is not null, protect the element. Otherwise, unprotect it.
        
        (WebCore::HTMLImageLoader::dispatchLoadEvent):
        Unprotect the element here.

        (WebCore::HTMLImageLoader::protectElement):
        (WebCore::HTMLImageLoader::unprotectElement):
        New methods which protect and unprotect the element.
        
        * html/HTMLImageLoader.h:

2007-08-24  Kevin McCullough  <kmccullough@apple.com>

        - Updated ChangeLog

2007-08-24  Beth Dakin  <bdakin@apple.com>

        Reviewed by Hyatt and Adele.

        Fix for <rdar://problem/5417203> Google Gmail 1.0 widget - unread 
        count is missing

        * rendering/FixedTableLayout.cpp:
        (WebCore::FixedTableLayout::calcWidthArray): Calc pref widths for 
        our cells, if needed.

2007-08-24  Kevin McCullough  <kmccullough@apple.com>

        Reviewed by Darin.

        <rdar://problem/5437038> 1 credential object leaked for each call to credentialWithUser:password:persistence
        - Use initWithUser instead of credentialWithUser because credentialWithUser leaks.

        * platform/network/mac/AuthenticationMac.mm:
        (WebCore::mac):
        * platform/network/mac/ResourceHandleMac.mm:
        (-[WebCoreResourceHandleAsDelegate connection:didReceiveAuthenticationChallenge:]):
        (-[WebCoreSynchronousLoader connection:didReceiveAuthenticationChallenge:]):

2007-08-24  Jon Honeycutt  <jhoneycutt@apple.com>

        Reviewed by Darin.

        <rdar://problem/5433236> Print preview of empty txt file crashes Safari
        Fix: Adjust computePageRectsForFrame to always return at least one 
        page rect, even if document height is zero.

        * WebCore.vcproj/WebCore.vcproj:
        * bridge/win/FrameWin.h: Added Vector& parameter to 
        computePagesRectsForFrame; changed its return type to void.
        * bridge/win/FrameWin.cpp:
        (WebCore::computePageRectsForFrame): Reordered the loop that inserts
        rects into the vector.

2007-08-24  Antti Koivisto  <antti@apple.com>

        Reviewed by Oliver

        Fix <rdar://problem/5393758>
        Crash in WebCore::FontData::platformInit
        
        Null check glyph page. 
        
        If font has somehow failed to initialize it is possible to have null glyph page. Based on
        crash dumps this seems to occasionally happen when running Mail under guard malloc. 
        
        No test case, I don't know how to get to this state.

        * platform/FontData.cpp:
        (WebCore::FontData::FontData):
        * platform/mac/FontDataMac.mm:
        (WebCore::FontData::platformInit):

2007-08-24  George Wright  <george.wright@collabora.co.uk>

        Reviewed by Oliver.

        http://bugs.webkit.org/show_bug.cgi?id=15071
        [cairo] SVG skews are incorrect

        Fix Cairo implementation of AffineTransform::shear so that shearing is
        done in the correct direction.

        * platform/graphics/cairo/AffineTransformCairo.cpp:
        (WebCore::AffineTransform::shear):

2007-08-23  Anders Carlsson  <andersca@apple.com>

        Reviewed by Steve.

        If necessary, re-set the window proc after each call to NPP_SetWindow. This is to ensure that
        our window proc is always run even if a plug-in subclasses the window and replaces the window proc.
        
        Also, make sure that the default window proc is of type ASCII so we can eliminate the 
        * plugins/win/PluginViewWin.cpp:
        (WebCore::registerPluginView):
        (WebCore::PluginViewWndProc):
        (WebCore::PluginViewWin::setNPWindowRect):
        (WebCore::PluginViewWin::stop):
        (WebCore::PluginViewWin::determineQuirks):
        (WebCore::PluginViewWin::PluginViewWin):
        (WebCore::PluginViewWin::init):
        * plugins/win/PluginViewWin.h:
        (WebCore::):
        (WebCore::PluginViewWin::pluginWndProc):

2007-08-23  Justin Garcia  <justin.garcia@apple.com>

        Reviewed by Adele.

        <rdar://problem/5156801> REGRESSION: Crash at DeleteSelectionCommand::doApply() when deleting table content

        * editing/DeleteSelectionCommand.cpp:
        (WebCore::DeleteSelectionCommand::handleGeneralDelete): Use a RefPtr
        for node.  If the node to be removed contains the selection, and if
        the next node to be removed (nextNode) is inside the deletion UI,
        removing node will remove nextNode from the document.  nextNode is
        a RefPtr, but node isn't and when nextNode falls out of scope the node
        that node points to will be destroyed and we'll end up using a stale pointer.
        Long term we should probably just disable the deletion UI before editing 
        operations because the undo of the removal of node in the situation 
        described above relies on the presence of the deletion UI, but it isn't 
        present because its added and removed in a non-undoable way.

2007-08-23  Mitz Pettel  <mitz@webkit.org>

        Reviewed by Darin.

        - fix http://bugs.webkit.org/show_bug.cgi?id=14899
          !d->m_view->needsLayout() in Frame::paint() (Causes assert)

        WebKit copies the width and height attributes of an <embed> to its
        nearest <object> ancestor. This used to be done in updateWidget(), but
        that could lead to the document being dirty right after layout and
        before painting. The patch moves the copying of the attributes to when
        the <embed> is inserted into the document or its attributes change.

        * html/HTMLEmbedElement.cpp:
        (WebCore::HTMLEmbedElement::insertedIntoDocument):
        (WebCore::HTMLEmbedElement::attributeChanged):
        * html/HTMLEmbedElement.h:
        * manual-tests/bugzilla-14899.html: Added.
        * rendering/RenderPartObject.cpp:
        (WebCore::RenderPartObject::updateWidget):

2007-08-22  Anders Carlsson  <andersca@apple.com>

        Reviewed by Darin and Oliver.

        <rdar://problem/5422410>
        http://bugs.webkit.org/show_bug.cgi?id=15019
        REGRESSION (r25124-r25140): New posts and hot topics won't show at mobile01.com

        Remove the call to checkCallImplicitClose(). Calling it in loadPlugin is bad for two reasons:
        
        1. It could cause onload to be dispatched even when the page has subresources that are still
        loading, such as images.
        
        2. Now that loadPlugin is called during layout, it could cause onload to be dispatched during
        layout, which can execute javascript and do pretty much anything while the render tree is in an
        inconsistent state.
        
        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::loadPlugin):

2007-08-22  Anders Carlsson  <andersca@apple.com>

        Reviewed by Adam.

        <rdar://problem/5430584>
        http://bugs.webkit.org/show_bug.cgi?id=15053        
        WebKit does not check Windows Registry HKEY_CURRENT_USER for NPAPI plugin locations
        
        * plugins/win/PluginDatabaseWin.cpp:
        (WebCore::addPluginsFromRegistry):
        (WebCore::PluginDatabaseWin::getPluginsInPaths):

2007-08-22  Justin Garcia  <justin.garcia@apple.com>

        Reviewed by Adam.
        
        <rdar://problem/5418891> CrashTracer: [USER] 1 crash in Mail at -[WebViewEditor webView:shouldInsertText:replacingDOMRange:givenAction:]

        * editing/BreakBlockquoteCommand.cpp:
        (WebCore::BreakBlockquoteCommand::doApply): We're reusing the topBlockquote
        variable.  Null it out first.  If there is no new topBlockquote and we don't null
        it out first, we'll assume that there was a new one and crash.

2007-08-22  Kevin McCullough  <kmccullough@apple.com>

        Reviewed by Adele.

        - rdar:5423067 Reapplyingthe change but only when the text area is in focus.

        * html/HTMLTextAreaElement.cpp:
        (WebCore::HTMLTextAreaElement::setValue):

2007-08-21  David Hyatt  <hyatt@apple.com>

        Fix for <rdar://problem/5249757> Painting of JPGs in WebKit is too slow.

        Use a new Leopard API for fast tiling of images.  We only use this API
        when the whole image is being tiled and when the current CGImageRef to tile
        has a size that matches the size of the whole image.

        We can optimize border-image in the future by adding a cache of the 9
        sub-images.

        Reviewed by darin

        * platform/graphics/cg/ImageCG.cpp:
        (WebCore::Image::drawPattern):

2007-08-22  Kevin McCullough  <kmccullough@apple.com>

        - Rolling back since I need to update some layouttests this change breaks.

        * html/HTMLTextAreaElement.cpp:
        (WebCore::HTMLTextAreaElement::setValue):

2007-08-21  Kevin McCullough  <kmccullough@apple.com>

        Reviewed by Geof, Adam, Hyatt, Maciej and Oliver.

        - In order to match the behavior of the other major browsers, selection is moved to the end of the text value when a change occurs to the contents of a text area instead of remembering the location of the selection.
        - <rdar://problem/5423067> gmail is super annoying when trying to add a new name to the TO, CC or BCC fields

        * html/HTMLTextAreaElement.cpp:
        (WebCore::HTMLTextAreaElement::setValue):

2007-08-21  Adam Roben  <aroben@apple.com>

        Build fix for Mac

        Keep FrameView::layoutIfNeededRecursive Windows- and Gtk-only for now
        (sadly). This will have to wait until we merge ScrollView and FrameView.

        Reviewed by NOBODY.

        * page/FrameView.cpp:
        * page/FrameView.h:

2007-08-21  Adam Roben  <aroben@apple.com>

        Fix an ASSERT when using Find in Page

        Reviewed by Darin.

        No test possible.

        * bridge/win/FrameWin.cpp:
        (WebCore::imageFromSelection): Make sure to update layout before
        painting so we don't hit an ASSERT in painting code (Frame::selectionImage
        in FrameMac.mm does this as well).

2007-08-21  Adam Roben  <aroben@apple.com>

        Made FrameView::layoutIfNeededRecursive available to all platforms

        Currently it's only used on Gtk+ and Windows.

        Reviewed by Darin.

        * page/FrameView.cpp: Removed #ifdef.
        * page/FrameView.h: Ditto.

2007-08-21  Adele Peterson  <adele@apple.com>

        Build fix for release build.

        * rendering/AutoTableLayout.cpp:
        (WebCore::AutoTableLayout::calcEffectiveWidth):
        (WebCore::AutoTableLayout::layout):

2007-08-21  Mitz Pettel  <mitz@webkit.org>

        Reviewed by Darin.

        - fix http://bugs.webkit.org/show_bug.cgi?id=15010
          <rdar://problem/5423956> REGRESSION (r25000-r25065): Table rendering broken by a recent nightly

        Test: fast/table/max-width-integer-overflow.html

        Avoid integer overflows when dealing with maximum widths by
        1) using floating point arithmetic when summing or multiplying column max widths
        2) capping max widths at INT_MAX / 2

        * rendering/AutoTableLayout.cpp:
        (WebCore::AutoTableLayout::calcPrefWidths):
        (WebCore::AutoTableLayout::calcEffectiveWidth):
        (WebCore::AutoTableLayout::layout):

2007-08-20  John Sullivan  <sullivan@apple.com>

        Reviewed by Adam Roben

        WebCore part of fix for: 
        <rdar://problem/5417777> WebKit focus ring color no longer matches system focus rings
        
        Adele wrote the first version of this patch. No test cases added because I made sure the 
        layout tests are unaffected. Two additional bug fixes were made in passing, but neither 
        of them had any effect on any known real-world case, and both were too difficult to write 
        test cases for to be worthwhile.

        * WebCore.exp:
        added symbols for these new functions so WebKit can call them
        
        * WebCore.xcodeproj/project.pbxproj:
        updated for new file
        
        * platform/graphics/mac/ColorMac.h: Added.
        New file to hold the increasing amount of Mac-specific color stuff.
        
        * platform/graphics/Color.h:
        removed #if PLATFORM(MAC) code, which is now in ColorMac.h
        
        * platform/graphics/mac/ColorMac.mm:
        (WebCore::makeRGBAFromNSColor):
        new static function to convert an NSColor object to an RGBA32 struct
        (WebCore::colorFromNSColor):
        new public function to convert an NSColor object to a WebCore-style Color object
        (WebCore::focusRingColor):
        Uses (cached) systemFocusRingColor instead of hardwired values, unless usesTestModeFocusRingColor is true,
        in which case it uses the old hardwired color
        (WebCore::usesTestModeFocusRingColor):
        returns value of global var
        (WebCore::setUsesTestModeFocusRingColor):
        sets value of global var
        (+[WebCoreControlTintObserver controlTintDidChange]):
        Uses [NSColor keyboardFocusIndicatorColor] to set systemFocusRingColor; don't compile if COLORMATCH_EVERYTHING
        is set since we don't know what it would take to satisfy this state.

        * bindings/objc/DOMRGBColor.mm:
        now includes ColorMac.h to account for moved declarations
        * bridge/mac/WebCoreAXObject.mm:
        ditto
        
        * page/mac/FrameMac.mm:
        (WebCore::convertAttributesToUnderlines):
        now uses new colorFromNSColor. The old code was swapping G & B, but it didn't matter in practice because
        this function is only used to convert the color of an input manager's marked text underline, which is always black
        
        * page/mac/WebCoreFrameBridge.mm:
        (-[WebCoreFrameBridge setBaseBackgroundColor:]):
        now uses new colorFromNSColor. The old code was swapping G & B, but it didn't matter in practice because
        this function is only called with a grayscale color perhaps containing an alpha value
                
        * rendering/RenderView.cpp:
        (WebCore::RenderView::paintBoxDecorations):
        just updated a comment

2007-08-20  Mitz Pettel  <mitz@webkit.org>

        Reviewed by Dave Hyatt.

        - fix http://bugs.webkit.org/show_bug.cgi?id=15023
          REGRESSION (r21113-r21143): JavaScript tooltip rendering bug

        Test: fast/repaint/layer-visibility.html

        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::setHasVisibleContent): Cache the layer's
        rects when it changes to visible.

2007-08-20  Kevin Decker <kdecker@apple.com>

        Reviewed by Anders.

        Fixed: <rdar://problem/5325262> REGRESSION (Tiger-Leopard): PictureTalk plug-in doesn't work

        The problem was that this particular plug-in handles "text/ptf", but WebCore wasn't giving the plug-in a chance to load
        any type with "text/"

        * dom/DOMImplementation.cpp:
        (WebCore::DOMImplementation::createDocument): Allow plug-ins to once again use "text/" MIME types, but only if the MIME
        type is not "text/plain". Disallowing plug-ins to use text/plain prevents plug-ins from hijacking a fundamental type 
        that the browser is expected to handle, and also serves as an optimization to prevent loading the plug-in database in 
        the common case.

2007-08-20  Adam Roben  <aroben@apple.com>

        Remove workarounds for <rdar://problem/5386894> now that it's been fixed

        Reviewed by Darin.

        Tests: fast/loader/local-svg-parsed-as-svg.svg
               fast/loader/local-xhtml-parsed-as-xhtml.xhtml

        * platform/network/cf/ResourceResponseCFNet.cpp:
        (WebCore::ResourceResponse::doUpdateResourceResponse): Removed hackish
        workaround.

2007-08-20  Anders Carlsson  <andersca@apple.com>

        Reviewed by Adam.

        <rdar://problem/5412988>
        Crash when visiting http://www.rockonflash.com/blog/?p=58
        
        * plugins/win/PluginViewWin.cpp:
        (WebCore::PluginViewWin::updateWindow):
        Just return if the plugin view hasn't been inserted in the hierarchy yet.

2007-08-20  Holger Hans Peter Freyther  <zecke@selfish.org>

        Reviewed by Zack.

        Do not define svg as ImageMIMEType if we can use ksvg2.

        * platform/MIMETypeRegistry.cpp:
        (WebCore::initialiseSupportedImageMIMETypes):

2007-08-19  Adam Roben  <aroben@apple.com>

        Gtk+ build fix.

        * platform/gdk/TemporaryLinkStubs.cpp: Removed const.

2007-08-19  Adam Roben  <aroben@apple.com>

        Fix <rdar://5395835> REGRESSION (r24527): Context menu for edit fields is missing "Font & Writing Direction"

        The problem was that ContextMenuItem::setSubMenu was just copying the
        HMENU from the ContextMenu passed in on Windows, but that HMENU was
        later getting destroyed when the ContextMenu went out of scope.

        I added a new ContextMenu::releasePlatformDescription method that is
        used in setSubMenu instead. I think an ultimately better design would
        be for setSubMenu to take ownership of the ContextMenu that's passed in
        (as should insertItem and appendItem), but I decided to be conservative
        and just make the changes needed to fix the bug.

        Reviewed by Darin.

        No test possible.

        * platform/ContextMenu.h: Added releasePlatformDescription.
        * platform/gdk/TemporaryLinkStubs.cpp: Added stub implementation.
        * platform/mac/ContextMenuMac.mm:
        (WebCore::ContextMenu::releasePlatformDescription): Implemented, though
        it's never called on this platform.
        * platform/qt/ContextMenuQt.cpp:
        (WebCore::ContextMenu::releasePlatformDescription): Ditto.
        * platform/win/ContextMenuItemWin.cpp:
        (WebCore::ContextMenuItem::setSubMenu): Call releasePlatformDescription
        since we need to take ownership of the HMENU.
        * platform/win/ContextMenuWin.cpp:
        (WebCore::ContextMenu::releasePlatformDescription): Implemented.

2007-08-18  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Darin.

        - fixed <rdar://problem/5198272> REGRESSION: PLT 1.5% slower due to r21367 (change to start frames with empty documents)
        
        There were three main cuases of extra time due to creating the initial empty document:
        
        1) Creating an extra WebHTMLView and swapping it for a new one for each frame created.
        2) Parsing the minimal markup for the initial document's contents.
        3) Clearing the Window object an extra time and dispatching the corresponding delegate method.
        
        The WebCore part of the fixes addresses 2 and 3.
        
        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::init): Don't parse "<html><body>" for the initial
        empty document; it turns out not to be needed.
        (WebCore::FrameLoader::dispatchWindowObjectAvailable): Don't 
        dispatch the delegate if we haven't created a ScriptInterpreter yet.
        * bindings/js/kjs_proxy.cpp:
        (WebCore::KJSProxy::initScriptIfNeeded): Dispatch the window object
        delegate when we first create the interpreter, since that is now done
        lazily.
        * loader/FrameLoader.h:
        (WebCore::FrameLoader::committingFirstRealLoad): Helper for WebKit
        to know when to reuse a WebHTMLView.

2007-08-19  Mitz Pettel  <mitz@webkit.org>

        Reviewed by Adam Roben.

        - fix http://bugs.webkit.org/show_bug.cgi?id=15008
          ASSERTION FAILED: !firstLineBox() == !lastLineBox() setting content on image

        Test: fast/images/text-content-crash-2.html

        * html/HTMLImageLoader.cpp:
        (WebCore::HTMLImageLoader::setImage): Added a check that the renderer is an
        image.
        (WebCore::HTMLImageLoader::updateFromElement): Ditto.
        (WebCore::HTMLImageLoader::notifyFinished): Ditto.

2007-08-17  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Darin.

        - WebCore part of fix to scrollbar suppression hack for Leopard

        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::transitionToCommitted): Suppress scrollbars earlier, so it happens
        before any potential view swap.

2007-08-17  Antti Koivisto  <antti@apple.com>

        Reviewed by Hyatt.
        
        Fix <rdar://problem/5403773>
        CrashTracer: [USER] 88 crashes in Safari at com.apple.WebCore: WebCore::RenderTableSection::paint + 846

        * rendering/RenderBlock.cpp:
        (WebCore::RenderBlock::removePositionedObjects):
        
        Fix crash in http://www.infobae.com/interior/home.html
        Positioned objects removed from m_positionedObjects would in some cases not get added back to any 
        positioned objects list. Adding objects happens in block layout but since layout was not invalidated 
        correctly in removePositionedObjects() it would not get invoked. As a result some positioned objects 
        would stay in layout dirty state leading to crashes and other bad things.
        
        * rendering/RenderTableSection.cpp:
        (WebCore::RenderTableSection::paint):
        
        Add needLayout() guard to eliminate this class of crashes from release builds. 
        Assert commented out for now since one existing layout test can't handle it.

2007-08-17  Kevin Decker <kdecker@apple.com>

        Code change by Darin, landed and reviewed by me.

        Fixed: <rdar://problem/5252836> Adobe Help Viewer: Japanese characters in the Help Tree structure are shown as garbage
        Added fast/encoding/namespace-tolerance.html test.

        * loader/TextResourceDecoder.cpp:
        (WebCore::TextResourceDecoder::checkForHeadCharset): Slightly loosen the charset decoder heuristic by tweaking it
        to ignore namespaces. This restores compatibility to documents which (1) use namespace prefixes on HTML elements
        (2) specify a non-latin charset and (3) contain non-latin characters.
        
        Added fast/encoding/namespace-tolerance.html test.
        
2007-08-17  Anders Carlsson  <andersca@apple.com>

        Reviewed by Dave Hyatt.
        
        <rdar://problem/5379040>
        REGRESSION (Tiger-Leopard): ADOBE: Safari calls NPP_SetWindow with bad values sometimes

        Instantiate plug-ins during the first layout instead of doing so when creating the renderer.
        This ensures that the plug-in widget will have a correct initial size.
        
        * html/HTMLEmbedElement.cpp:
        (WebCore::HTMLEmbedElement::getInstance):
        Force a layout if the plug-in doesn't have an instance.
        
        (WebCore::HTMLEmbedElement::attach):
        Pass true to updateWidget, causing it to only create a widget if it won't be a plug-in.
        
        * html/HTMLIFrameElement.cpp:        
        (WebCore::HTMLIFrameElement::attach):
        Pass false to updateWidget, this will only create subframes anyway.
        
        * html/HTMLObjectElement.cpp:
        (WebCore::HTMLObjectElement::getInstance):
        Force a layout if the plug-in doesn't have an instance.
        
        (WebCore::HTMLObjectElement::attach):
        Pass true to updateWidget, causing it to only create a widget if it won't be a plug-in.
        
        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::loadPlugin):
        Get the size from the renderer and pass it to the client.
        
        * loader/FrameLoaderClient.h:
        * page/mac/WebCoreFrameBridge.h:
        * platform/graphics/svg/SVGImageEmptyClients.h:
        (WebCore::SVGEmptyFrameLoaderClient::createPlugin):
        Update declarations.
        
        * rendering/RenderPart.cpp:
        (WebCore::RenderPart::setWidget):
        No need to mark the renderer as dirty here.
        
        * rendering/RenderPartObject.h:
        * rendering/RenderPartObject.cpp:
        (WebCore::RenderPartObject::updateWidget):
        Add a parameter, onlyCreateNonPlugins. If this is true the widget 
        will only be created if it's not a plug-in.
        
        (WebCore::RenderPartObject::layout):
        Call updateWidget here if m_widget is 0, causing the plug-in to be instantiated.
        
2007-08-17  Oliver Hunt  <oliver@apple.com>

        Reviewed by Maciej.

        http://bugs.webkit.org/show_bug.cgi?id=14189
        <rdar://problem/5319511> REPRODUCIBLE CRASH: Canvas createPattern(canvas, ...) crashes on Windows (14189)

        Ensure that we actually retain the CG pattern correctly.

        Credit to Henry Mason <hmason@mac.com> for finding the cause of this.

        * html/CanvasPattern.cpp:
        (WebCore::CanvasPattern::~CanvasPattern):
        (WebCore::CanvasPattern::createPattern):
        * html/CanvasPattern.h:
        (WebCore::CanvasPattern::platformImage):

2007-08-16  Geoffrey Garen  <ggaren@apple.com>

        Build fix. (Maybe?)
        
        * loader/Cache.cpp:
        (WebCore::Cache::pruneLiveResources):
        (WebCore::Cache::pruneDeadResources):

2007-08-16  Justin Garcia  <justin.garcia@apple.com>

        Reviewed by Harrison.

        <rdar://problem/5378473> 
        REGRESSION: Undoing a deletion that is part of an open typing command fails to reinsert the caret
        
        We recently made Undo of a series of deletes select all of the 
        characters that were deleted, not just the most recently deleted
        character.  But the code that did this set a new starting selection 
        after every delete, even those that were part of an open typing 
        command that started with character insertions or forward deletes, 
        operations that when undone, remove the starting selection being 
        set from the document.
        
        After this change we only set a new starting selection if the open typing
        command was opened by a backward delete. The new behavior matches TextEdit.  
        We don't do something similar or forward deletes because TextEdit opens 
        and closes a new typing command on forward delete (added a FIXME about this).

        * editing/TypingCommand.cpp:
        (WebCore::TypingCommand::TypingCommand): Initialize 
        m_openedByBackwardDelete.
        (WebCore::TypingCommand::forwardDeleteKeyPressed): Added a FIXME about
        how in TextEdit, forward deletes open and close a new typing command.
        (WebCore::TypingCommand::doApply): Set m_openedByBackwardDelete
        appropriately.
        (WebCore::TypingCommand::deleteKeyPressed): Only set the starting
        selection if this delete is the first one in an open typing command
        or one in a series of deletes that opened the typing command.
        * editing/TypingCommand.h: Added m_openedByBackwardDelete.

2007-08-13  Geoffrey Garen  <ggaren@apple.com>

        Reviewed by Dave Hyatt.
        
        Tweaked the cache eviction model to better balance between live and 
        dead resources.
        
        For the sake of avoiding evictions during the PLT, the old model 
        required the sum of dead and live resources to grow to twice the cache 
        capacity before evicting, and would then evict dead or live down to 0 
        if necessary. This was a too-high high water mark, which would nullify 
        much of the value of eviction, and a too-low low water mark, which 
        would nullify much of the value of the LRU-SP strategy.
        
        This patch changes the model in 3 ways.
        
        1. The new model for dead resources is a flexible window with a fixed 
        minimum and maximum. The dead resource window is big when live resource 
        pressure is small, and vice versa. This has the immediate advantage of
        cutting the high water mark by up to 50%. It also enables the following
        tunable optimizations in future patches:
            a. A dead resource limit of 0 for clients who want that. (Just set
            the fixed maximum to 0.)
            b. A much higher low water mark. (Just set the fixed minimum to, 
            say, 25% of the cache's capacity.)
            c. A much lower high water mark for users who browse simple pages
            in one tab. (Just set the fixed maximum to, say, 50% of the cache's
            capacity.)
        
        I plan to make the changes that actually take advantage of these 
        tunable optimizations in another check-in.

        The new model won't hurt the PLT because it will notice the PLT's low
        live resource size, and up the dead resource capacity in response. For
        the same reason, the new model should establish a good balance in 
        real-world use.
        
        2. Live resource eviction is now based on size(), not encodedSize().
        So, a page with lots of large, encoded images will start evicting 
        resources, if necessary, even before all the images paint. This allows 
        you to more accurately stipulate an exact high water mark.
        
        3. When pruning, prune to a small percentage below capacity, to avoid
        just having to prune again immediately.

        Layout tests pass. PLT shows no regression.

        * history/PageCache.cpp:
        (WebCore::PageCache::releaseAutoreleasedPagesNow): Updated for rename.

        * loader/Cache.cpp: Implemented the algorithm explained above.
        * loader/Cache.h: Removed explicit tracking of decoded data size, since
        it was unused.

        * loader/CachedResource.cpp: ditto on tracking of decoded data size

2007-08-16  Darin Adler  <darin@apple.com>

        Reviewed by Tim Hatcher.

        - fix <rdar://problem/5415029> In Mail, a crash occurs at WebCore::Node::isDescendantOf()
          when attempting to delete a selection in a table

        The bug was caused by createMarkup trying to operate on a range that
        has an endpoint in the delete button DOM, because it removes that DOM
        during its operation! Still working on a regression test -- it's hard
        to make the kind of bad selection that's needed with the DOM, so I might
        have to use the eventSender.

        * editing/DeleteButtonController.h: Made some of the identifiers private.
        We can make them public if we need to use them. Added a getter function
        for the container element so we can figure out if a given node is inside
        the DOM added for the delete button.

        * editing/markup.cpp:
        (WebCore::moveEndpointsBeforeNode): Added. General purpose helper function
        that moves endpoints of a range to before a given node -- we do this before
        removing the delete button, so the endpoint is where the delete button was,
        rather than having an endpoint that's not in the document.
        (WebCore::createMarkup): Always return empty string, not null string.
        Get the document by calling ownerDocument on the range rather than getting
        the document of the commonAncestorContainer. That's because we need to
        get at the delete button before calling commonAncestorContainer. Call
        moveEndpointsBeforeNode to move the range endpoints out of the delete
        button interface before calling disable() which will remove it from the
        DOM if it's in there. Added an early return for the case where commonAncestor
        is non-0. If this happens, we would crash later because pastEndNode would
        not be in the tree. This change alone would prevent the crash, but we'd get
        bad markup, so we need the moveEndpointsBeforeNode fix. Added null checks
        for the frame to the range version as in the single-node version so this
        won't crash immediately on documents that are not in a frame. For the
        single-node version, added a check if a ndoe of 0 and a node inside the
        delete button user interface, and return the empty string for those cases.

2007-08-16  Justin Garcia  <justin.garcia@apple.com>

        Reviewed by Maciej.
        
        <rdar://problem/5378847> After creating and removing a ToDo, the caret disappears as soon as I start to type
        
        * editing/InsertTextCommand.cpp:
        (WebCore::InsertTextCommand::input): A whitespace text node inserted by Mail
        when a ToDo is removed is completely removed by deleteInsignificantWhitespace,
        and since it contains the text insertion position, insertion fails.
        Save the position before the node where text insertion will occur,
        and if that node is removed, use the saved position for insertion.

2007-08-16  Darin Adler  <darin@apple.com>

        Reviewed by Adele.

        - fix <rdar://problem/5413488> REGRESSION: every DOM element is about 40
          bytes bigger because it has a Timer

        Moved the timer to the document from the element.

        * dom/Document.h: Made frame() inline. Added updateFocusApperanceSoon(),
        cancelFocusAppearanceUpdate(), m_updateFocusAppearanceTimer,
        clearXMLVersion(), and updateFocusAppearanceTimerFired(). Also made
        everything that was previously protected be private instead.
        * dom/Document.cpp:
        (WebCore::Document::Document): Initialize m_updateFocusAppearanceTimer.
        (WebCore::Document::updateFocusAppearanceSoon): Added. Starts timer.
        (WebCore::Document::cancelFocusAppearanceUpdate): Added. Stops timer.
        (WebCore::Document::updateFocusAppearanceTimerFired): Added. If the
        focused node is a focusable element, then calls
        updateFocusAppearance(false) on it.

        * dom/Element.h: Removed default value of the boolean parameter to
        updateFocusAppareance. Removed needsFocusAppearanceUpdate(),
        setNeedsFocusAppearanceUpdate(), updateFocusAppearanceTimerFired(),
        stopUpdateFocusAppearanceTimer(), m_updateFocusAppearanceTimer, and
        m_needsFocusAppearanceUpdate. Added
        updateFocusAppearanceSoonAfterAttach() and cancelFocusAppearanceUpdate().
        * dom/Element.cpp:
        (WebCore::ElementRareData::ElementRareData): Added initializer for
        m_needsFocusAppearanceUpdateSoonAfterAttach.
        (WebCore::Element::Element): Removed initializers for
        m_updateFocusAppearanceTimer and m_needsFocusAppearanceUpdate.
        (WebCore::Element::attach): Updated code that starts the focus
        appearance timer to instead call updateFocusAppearanceSoon() on the
        document.
        (WebCore::Element::detach): Replaced call to
        stopUpdateFocusAppearanceTimer with call to cancelFocusAppearanceUpdate.
        (WebCore::Element::focus): Added check for node that's already focused,
        to match the logic that's in the derived classes. This makes it safe for
        us to remove the override in the derived classes. Also replaced the code
        that called setNeedsFocusAppearanceUpdate(true) with code to set the
        rare data flag m_needsFocusAppearanceUpdateSoonAfterAttach and added a
        call to cancelFocusAppearanceUpdate() in the case where there's no focus
        appearance update.
        (WebCore::Element::blur): Replaced call to
        stopUpdateFocusAppearanceTimer with call to cancelFocusAppearanceUpdate.
        (WebCore::Element::cancelFocusAppearanceUpdate): Added. Sets
        m_needsFocusAppearanceUpdateSoonAfterAttach to false, and then calls
        cancelFocusAppearanceUpdate() on the document, but only if the element
        is the focused node of the document.

        * html/HTMLDocument.cpp:
        (WebCore::HTMLDocument::HTMLDocument): Replaced code that sets
        m_xmlVersion directly with a call to a new inline clearXMLVersion()
        function.
        (WebCore::HTMLDocument::setCookie): Replaced use of m_policyBaseURL with
        policyBaseURL().
        (WebCore::HTMLDocument::createTokenizer): Replaced uses of m_frame with
        frame().
        (WebCore::HTMLDocument::determineParseMode): Replaced code that sets
        pMode and hMode directly with calls to setParseMode and setHTMLMode.
        Replaced use of m_styleSelector with styleSelector().

        * html/HTMLInputElement.h: Removed now-unneed override of focus().
        Removed default value of the boolean parameter to updateFocusAppareance.
        * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::updateFocusAppearance):
        Pass the restorePreviousSelection boolean through -- while it's ignored,
        it no longer has a default value.

        * html/HTMLTextAreaElement.h: Removed now-unneed override of focus().
        Removed default value of the boolean parameter to updateFocusAppareance.
        * html/HTMLTextAreaElement.cpp: Ditto.

        * WebCore.exp: Removed the Document::frame() symbol, since it's now inline.

2007-08-15  Antti Koivisto  <antti@apple.com>

        Reviewed by Maciej.
        
        Fix <rdar://problem/5388936>
        Crash while setting display:none for a table cell with selection
        
        Super class destroy() could (through some selection code in removeChild()) trigger section recalc 
        in middle of RenderTableCell::destroy(), cleaning section dirty bit. This would later crash in 
        layout since cell grid would still have refence to the dead cell.
        
        Ensure table sections are dirty when leaving destroy method.
        
        I can't figure out tests for row and section changes but they look like
        they could crash in similar way as cell.

        * rendering/RenderTableCell.cpp:
        (WebCore::RenderTableCell::destroy):
        * rendering/RenderTableRow.cpp:
        (WebCore::RenderTableRow::destroy):
        * rendering/RenderTableSection.cpp:
        (WebCore::RenderTableSection::destroy):

2007-08-15  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Geoff.

        <rdar://problem/5389696> leak of 32-byte NSData object (and more?) in WebIconDatabase code path with each refresh of http://www.apple.com
        
        * platform/graphics/BitmapImage.h: Use RetainPtr for m_nsImage and m_tiffRep
        * platform/graphics/mac/ImageMac.mm:
        (WebCore::BitmapImage::initPlatformData): No need to do anything now
        (WebCore::BitmapImage::invalidatePlatformData): Simplify
        (WebCore::BitmapImage::getTIFFRepresentation): Use RetainPtr to avoid leaks
        (WebCore::BitmapImage::getNSImage): Use RetainPtr to avoid leaks

2007-08-15  Darin Adler  <darin@apple.com>

        Reviewed by Anders.

        - fix <rdar://problem/5094895> REGRESSION (r19094): JavaScript timers don't
          work inside showModalDialog; caret also doesn't blink

        * platform/Timer.h: Added fireTimersInNestedEventLoop.
        * platform/Timer.cpp:
        (WebCore::TimerBase::fireTimers): Added code to exit if the timersReadyToFire
        is cleared. This indicates that someone fired the timers in the nested event
        loop, so we should not fire any more timers ourselves.
        (WebCore::TimerBase::fireTimersInNestedEventLoop): Added. Sets timersReadyToFire
        to 0 so we won't return early and do nothing if the shared timer first. Then
        calls updateSharedTimer() so the shared timer will get scheduled as needed based
        on any pending timers.

        * page/Chrome.cpp: (WebCore::Chrome::runModal): Call
        fireTimersInNestedEventLoop before calling runModal on the client.

        * manual-tests/modal-dialog.html: Added a test that uses a timeout.
        * manual-tests/show-modal-dialog-test.html: Fixed a typo.

2007-08-15  Justin Garcia  <justin.garcia@apple.com>

        Reviewed by Darin.
        
        http://bugs.webkit.org/show_bug.cgi?id=14971
        REGRESSION: cannot select reporter's e-mail in bugzilla

        * page/EventHandler.cpp:
        (WebCore::EventHandler::canMouseDragExtendSelect): Allow drag-selecting inside
        a -webkit-user-select:ignore region.

2007-08-15  Beth Dakin  <bdakin@apple.com>

        Reviewed by Hyatt.

        Rolling back in. I made a silly mistake in XMLTokenizer that caused 
        this patch to crash SVG tests. It's fixed now!

        Refactor of change for <rdar://problem/5404899> REGRESSION: Mail 
        crash in WebCore::FontFallbackList::fontDataAt() after dragging 
        image into text multiple times

        The original fix that I made last night prevents the pending style 
        sheet count from being incremented until the element is in the 
        document. This fix prevents the style sheet from loading at all 
        until it is in the document.

        Here is the fix.
        * dom/StyleElement.cpp:
        (WebCore::StyleElement::insertedIntoDocument): Call process.
        (WebCore::StyleElement::removedFromDocument): This can be reverted 
        to its original state before my patch last night.
        (WebCore::StyleElement::process): childrenChanged is now called 
        process. Return early if your not in the document.
        (WebCore::StyleElement::createSheet): Revert change from last 
        night. The inDocument check is now in caller childrenChanged.
        * dom/StyleElement.h: insertedIntoDocument() must now accept an 
        element in addition to a document.

        This is an optimization to prevent calling updateStyleSelector() 
        too frequently.
        * dom/XMLTokenizer.cpp:
        (WebCore::XMLTokenizer::startElementNs):
        * html/HTMLStyleElement.cpp:
        (WebCore::HTMLStyleElement::HTMLStyleElement):
        (WebCore::HTMLStyleElement::finishedParsing):
        (WebCore::HTMLStyleElement::insertedIntoDocument):
        (WebCore::HTMLStyleElement::childrenChanged):
        (WebCore::HTMLStyleElement::sheetLoaded):
        * html/HTMLStyleElement.h:
        * ksvg2/svg/SVGStyleElement.cpp:
        (WebCore::SVGStyleElement::SVGStyleElement):
        (WebCore::SVGStyleElement::finishedParsing):
        (WebCore::SVGStyleElement::insertedIntoDocument):
        (WebCore::SVGStyleElement::childrenChanged):
        (WebCore::SVGStyleElement::sheetLoaded):
        * ksvg2/svg/SVGStyleElement.h:
        (WebCore::SVGStyleElement::setCreatedByParser):

        This is a name change. Document::stylesheetLoaded() 
        is now Document::removePendingSheet()
        * dom/Document.cpp:
        (WebCore::Document::removePendingSheet):
        * dom/Document.h:
        * dom/ProcessingInstruction.cpp:
        (WebCore::ProcessingInstruction::sheetLoaded):
        * html/HTMLLinkElement.cpp:
        (WebCore::HTMLLinkElement::~HTMLLinkElement):
        (WebCore::HTMLLinkElement::setDisabledState):
        (WebCore::HTMLLinkElement::process):
        (WebCore::HTMLLinkElement::sheetLoaded):
        * page/Frame.cpp:
        (WebCore::UserStyleSheetLoader::~UserStyleSheetLoader):
        (WebCore::UserStyleSheetLoader::setCSSStyleSheet):

        This is another name change. closeRenderer() is now 
        finishedParsing()
        * dom/Node.h:
        (WebCore::Node::finishedParsing):
        * dom/XMLTokenizer.cpp:
        (WebCore::XMLTokenizer::endElementNs):
        (WebCore::):
        * html/HTMLAppletElement.cpp:
        (WebCore::HTMLAppletElement::finishedParsing):
        * html/HTMLAppletElement.h:
        * html/HTMLGenericFormElement.cpp:
        (WebCore::HTMLFormControlElementWithState::finishedParsing):
        * html/HTMLGenericFormElement.h:
        * html/HTMLObjectElement.cpp:
        (WebCore::HTMLObjectElement::finishedParsing):
        * html/HTMLObjectElement.h:
        * html/HTMLParser.cpp:
        (WebCore::HTMLParser::insertNode):
        (WebCore::HTMLParser::popOneBlockCommon):
        * html/HTMLScriptElement.cpp:
        (WebCore::HTMLScriptElement::finishedParsing):
        * html/HTMLScriptElement.h:
        (WebCore::HTMLStyleElement::setCreatedByParser):
        * ksvg2/svg/SVGAnimationElement.cpp:
        (WebCore::SVGAnimationElement::finishedParsing):
        * ksvg2/svg/SVGAnimationElement.h:
        * ksvg2/svg/SVGElement.cpp:
        (WebCore::SVGElement::finishedParsing):
        * ksvg2/svg/SVGElement.h:

2007-08-15  David Harrison  <harrison@apple.com>

        Reviewed by Antti Koivisto.

        <rdar://problem/5411803> Bumpercar crashes when loading a partial URL (FrameLoader::receivedMainResourceError())

        * loader/MainResourceLoader.cpp:
        (WebCore::MainResourceLoader::receivedError):
        Nil check for the FrameLoader.

2007-08-14  Steve Falkenburg  <sfalken@apple.com>

        <rdar://problem/5411482> Windows user agent language always returns "en"
        
        Implement defaultLanguage().

        Reviewed by Oliver.

        * WebCore.vcproj/WebCore.vcproj: Added Language.cpp.
        * platform/win/Language.cpp: Added.
        (WebCore::localeInfo): Added.
        (WebCore::defaultLanguage): Added.
        * platform/win/TemporaryLinkStubs.cpp: Remove defaultLanguage stub.

2007-08-14  Sam Weinig  <sam@webkit.org>

        Reviewed by Geoff and Oliver.

        Fix for <rdar://problem/5267870>
        Mangleme: Reproducible assertion failure in -[WebCoreFrameBridge installInFrame:]

        - Change embed/plugin code path to detach the frame on willRemove instead of detach.
          This matches what frame and iframe do.

        Test: http/tests/misc/embedCrasher.html

        * html/HTMLPlugInElement.cpp:
        (WebCore::HTMLPlugInElement::willRemove):
        * html/HTMLPlugInElement.h:

2007-08-14  Adele Peterson  <adele@apple.com>

        Reviewed by Maciej.

        Fix for <rdar://problem/5370059> REGRESSION: Cannot type into edit fields on a form (sccsheriff.org)

        This change makes -webkit-user-select an inherited css property.  For "user-select: none" we were already 
        acting like it was an inheritable property, where we let user-select:text on the children override its parent's user-select:none.
        By making user-select really inherited (instead of inherited for some values), we eliminate the need for crawling up the tree to see 
        if an ancestor has user-select ignore set.

        * page/EventHandler.cpp: (WebCore::EventHandler::canMouseDownStartSelect):
          Now that user-select is inherited, you don't need to walk up the render tree looking for ancestors with user-select:ignore set.

        * css/CSSStyleSelector.cpp: Eliminate SELECT_AUTO.
        (WebCore::CSSStyleSelector::adjustRenderStyle):
        (WebCore::CSSStyleSelector::applyProperty):
        * css/CSSComputedStyleDeclaration.cpp: (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):

        * rendering/RenderStyle.h:
        (WebCore::): Eliminate SELECT_AUTO.  Make userSelect inherited.
        (WebCore::RenderStyle::userSelect):
        (WebCore::RenderStyle::setUserSelect):
        (WebCore::RenderStyle::initialUserSelect):
        * rendering/RenderStyle.cpp:
        (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
        (WebCore::StyleRareNonInheritedData::operator==):
        (WebCore::StyleRareInheritedData::StyleRareInheritedData):
        (WebCore::StyleRareInheritedData::operator==):
        (WebCore::RenderStyle::diff):

2007-08-15  Peter Kasting  <zerodpx@gmail.org>

        Reviewed by Darin.
        
        http://bugs.webkit.org/show_bug.cgi?id=14967 part 1 - Eliminate most implicit
        conversions of wtf::Vector<T> to T* by explicitly calling .data()

        * html/HTMLSelectElement.cpp:
        (WebCore::HTMLSelectElement::saveState):
        * platform/KURL.cpp:
        (WebCore::KURL::KURL):
        (WebCore::KURL::init):
        (WebCore::KURL::decode_string):
        (WebCore::KURL::parse):
        (WebCore::KURL::encode_string):
        * platform/cf/KURLCFNet.cpp:
        (WebCore::KURL::KURL):
        * platform/mac/KURLMac.mm:
        (WebCore::KURL::KURL):
        * rendering/RenderFrameSet.cpp:
        (WebCore::RenderFrameSet::layOutAxis):

2007-08-14  Ricci Adams  <iccir@apple.com>

        Reviewed by Darin, Hyatt.

        - fix <rdar://problem/5407795> -apple-line-clamp should never display less than one line

        * rendering/RenderFlexibleBox.cpp:(WebCore::RenderFlexibleBox::layoutVerticalBox): Use
        max to make sure it never computes a minimum of less than one line.

2007-08-14  Brady Eidson  <beidson@apple.com>

        Reviewed by Darin, John, Maciej, Oliver, and Tim

        <rdar://problem/5394708> - Crash on launch with corrupt icon database

        The main part of the fix is to not disable SQLite's default level of protection - to leave the sync options at their normal,
        mostly safe levels.  

        But in case lightning strikes at the exact right moment and someone ends up with a corrupt database, add some support code to
        detect that condition and recover from it.  

        This is mainly accomplished by exposing the "PRAGMA integrity_check;" facilities of sqlite through IconDatabase SPI as well as
        running that integrity check if a journal file is detected at launch (a strong indication that the last quit was not clean).
        There's also a method exposed to allow clients to tell the icon database "I suspect something bad happened, please check integrity"

        * loader/icon/IconDatabase.cpp:
        (WebCore::IconDatabase::checkIntegrityBeforeOpening): Allow clients to suggest an integrity check
        (WebCore::IconDatabase::open): Add a check to see if the journal file for the database exists.  If it does, run the integrity
          check.  Also run the check if a client has suggested it to be necessary.
          If the integrity-check fails, we sadly have to destroy the database and recreate from scratch.
          Also - quite importantly - do not adjust the default sync preferences for the SQLDatabase.  They were an optimization that 
          might have been valid at one time but no longer affects any benchmarks we care about.
        (WebCore::IconDatabase::checkIntegrity): Perform the SQLite integrity_check pragma
        * loader/icon/IconDatabase.h:

        * loader/icon/IconDatabaseNone.cpp:
        (WebCore::IconDatabase::checkIntegrity): Keep IconDatabaseNone users building
        (WebCore::IconDatabase::checkIntegrityBeforeOpening): Ditto

        * loader/icon/SQLDatabase.cpp:
        (WebCore::SQLDatabase::open): Make a copy of the path string so we don't accidentally mutate anyone else's string on ::close()

        * platform/FileSystem.h: Added. Begin a long-needed platform file system abstraction
        * platform/mac/FileSystemMac.mm: Added.
        (WebCore::fileExists): Check if a file exists
        (WebCore::deleteFile): Delete a file

        * platform/gdk/TemporaryLinkStubs.cpp:
        (WebCore::fileExists):
        (WebCore::deleteFile):
        * platform/qt/TemporaryLinkStubs.cpp:
        (WebCore::fileExists):
        (WebCore::deleteFile):
        * platform/win/TemporaryLinkStubs.cpp:
        (WebCore::fileExists):
        (WebCore::deleteFile):

        * WebCore.exp:
        * WebCore.xcodeproj/project.pbxproj:

2007-08-14  Jon Honeycutt  <jhoneycutt@apple.com>

        Reviewed by Steve.

        Build fix for Windows.

        * html/HTMLFormElement.cpp:

2007-08-14  George Staikos  <staikos@kde.org>

        Only connect the menu signal once.

        * platform/qt/ContextMenuQt.cpp:
        (WebCore::ContextMenu::ContextMenu):
        (WebCore::ContextMenu::insertItem):

2007-08-14  Justin Garcia  <justin.garcia@apple.com>

        Reviewed by Tim.

        <rdar://problem/5408255> REGRESSION: In Mail, clicking the containing element's UI closebox doesn't delete element

        * editing/DeleteButtonController.cpp:
        (WebCore::DeleteButtonController::show): Use -webkit-user-select:ignore for
        the deletion UI.

2007-08-14  Antti Koivisto  <antti@apple.com>

        Reviewed by Darin.
        
        Fix <rdar://problem/5143183>
        Air Mail postmark shows up wrong in Firefox due to use of CSS background-position-x/y
        
        Safari was using non-standard background-position-x/y properties when serializing style, both normal 
        and computed. As a result Safari generated CSS would not render correctly in Firefox. 
        
        Use standard background-position property instead.

        * css/CSSComputedStyleDeclaration.cpp:
        (WebCore::):
        * css/CSSMutableStyleDeclaration.cpp:
        (WebCore::CSSMutableStyleDeclaration::cssText):

2007-08-14  Sam Weinig  <sam@webkit.org>

        Reviewed by Brady and Dr. Harrison.

        Fix typo.  'whitespace' property is spelled 'white-space'.

        * page/inspector/inspector.css:

2007-08-13  Beth Dakin  <bdakin@apple.com>

        Reviewed by Maciej.

        Fix for <rdar://problem/5404899> REGRESSION: Mail crash in 
        WebCore::FontFallbackList::fontDataAt() after dragging image into 
        text multiple times

        We were crashing because style information was not up-to-date. This 
        patch fixes the problem in two ways:

        Style information was not up to date at the time of the crash 
        because the document thought there was still a pending style sheet. 
        The pending style sheet counter was incremented when a call to 
        cloneNode from Mail cloned a style node with an imported style 
        sheet. Because Mail disables the cache, the style sheet did not 
        load immediately for the cloned node, and we do not check again to 
        see if it has loaded in time to decrement the pending style sheet 
        counter before the crash point. The fix here is only to increment 
        the pending style sheet counter for elements that are already in 
        the document.
        * dom/StyleElement.cpp:
        (WebCore::StyleElement::insertedIntoDocument): If we have a CSS 
        style sheet that is currently loading, increment the pending style 
        sheet counter. This should keep the counter accurate in the case 
        where a style node is cloned and then immediately inserted into the 
        document.
        (WebCore::StyleElement::removedFromDocument): If we have a CSS 
        style sheet that is currently loading, decrement the pending style 
        sheet count. This is required to keep the correct balance, given 
        the change above.
        (WebCore::StyleElement::createSheet): Only addPendingSheet() and 
        checkLoaded() if we are in the document.

        Here is Darin's original fix. It seems worth keeping this fix too. 
        Font style information should not cause a crash if there are still 
        pending style sheets. This is good belt-and-suspenders in case 
        there is another way to run into this bug with a wacky timing 
        issue.
        * css/CSSStyleSelector.cpp:
        (WebCore::CSSStyleSelector::styleForElement): Update the font.

2007-08-13  Alexey Proskuryakov  <ap@webkit.org>

        Reviewed by Darin.

        http://bugs.webkit.org/show_bug.cgi?id=14635
        rdar://problem/5340188
        Uploading file with non-ASCII character in path fails

        File upload cannot be tested in DumpRenderTree.

        * html/HTMLFormElement.cpp:
        (WebCore::pathGetFilename): A cross-platform helper that extracts a file name from a path.
        (WebCore::HTMLFormElement::formData): Use the above helper instead of code that doesn't
        work on Windows.

2007-08-13  Alexey Proskuryakov  <ap@webkit.org>

        Reviewed by Darin.

        http://bugs.webkit.org/show_bug.cgi?id=14951
        REGRESSION: page interpreted as UTF-8 because of stray <?xml> after <head>

        Test: fast/encoding/misplaced-xml-declaration.html

        * loader/TextResourceDecoder.cpp:
        (WebCore::TextResourceDecoder::checkForHeadCharset): Only honor XML declaration
        at the very beginning of the file.

2007-08-13  Oliver Hunt  <oliver@apple.com>

        rs=sam

        Correct accidentally modified code.

        * platform/mac/FontDataMac.mm:
        (WebCore::FontData::platformInit):

2007-08-13  Adele Peterson  <adele@apple.com>

        Reviewed by Brady.

        Fix for http://bugs.webkit.org/show_bug.cgi?id=14746
        <rdar://problem/5401041> REGRESSION: Form state not saved for forms that submit via HTTPS even if they do not contain a password field

        * loader/FrameLoader.cpp: (WebCore::FrameLoader::saveDocumentState): Restore our old behavior that will save form state for secure forms.
          This will also match Firefox behavior.

        * dom/Document.cpp: Removed secureFormAdded(), secureFormRemoved(), hasSecureForm() which are no longer used.
        * dom/Document.h:
        * html/HTMLFormElement.cpp:
        (WebCore::HTMLFormElement::attach):
        (WebCore::HTMLFormElement::parseMappedAttribute):

2007-08-13  Oliver Hunt  <oliver@apple.com>

        Reviewed by Maciej.

        <rdar://problem/5386183> REGRESSION (9A504-9A508): Underline of inline hole is too thin 
        on Japanese DotMac page
        
        Hack the line metrics for the Hiragino font families so that they always allow space for
        the marked text underline.
        
        * platform/mac/FontDataMac.mm:
        (WebCore::FontData::platformInit):

2007-08-13  David Hyatt  <hyatt@apple.com>

        Reviewed by aroben
 
        <rdar://problem/5400446> messed up content on calendar.yahoo.com and my.yahoo.com

        Fix some more bad assumptions about <html> being the first child of the document now that we
        properly support HTML5's model (where a comment node preceding <html> will in fact be its sibling).

        * html/HTMLParser.cpp:
        (WebCore::HTMLParser::handleError):
        (WebCore::HTMLParser::createHead):

2007-08-13  Justin Garcia  <justin.garcia@apple.com>

        Reviewed by Darin.
        
        <rdar://problem/5333725> -webkit-user-select: none makes selection difficult
        
        Let users create selections if they mouse down in a -webkit-user-select:none
        region, just (continue to) disallow selection endpoints in those regions, and
        don't paint those regions as selected if they are fully enclosed by a selection. 
        For example, in xxyyyxx where x is -webkit-user-select:none, a user can mouse down
        between the first two xs and drag across yyy to the second two xs to create a 
        selection xx^yyy^xx.
        
        * editing/SelectionController.cpp:
        (WebCore::SelectionController::selectAll): Allow selectAll inside a root
        that has -webkit-user-select:none, because it may contain content that
        is selectable (VisiblePosition and Selection creation will keep Selection
        endpoints out of -webkit-user-select:none regions).
        * page/EventHandler.cpp:
        (WebCore::EventHandler::selectClosestWordFromMouseEvent): Use canMouseDownStartSelect
        instead of the ambiguously named shouldSelect().
        (WebCore::EventHandler::handleMousePressEventTripleClick): Ditto.
        (WebCore::EventHandler::handleMousePressEventSingleClick): Ditto.
        (WebCore::EventHandler::updateSelectionForMouseDrag): Use canMouseDragExtendSelect.
        (WebCore::EventHandler::selectCursor): Paint an ibeam in -webkit-user-select:none regions,
        because you can click in those regions to create a selection.
        (WebCore::EventHandler::canMouseDownStartSelect): Now fires the selectStart event, and
        returns true in -webkit-user-select: none regions.
        (WebCore::EventHandler::canMouseDragExtendSelect): This is identical to 
        canMouseDownStartSelect because of 12823, even though it seems strange that we would fire 
        the selectStart event here.
        * page/EventHandler.h:
        * rendering/RenderObject.cpp:
        (WebCore::RenderObject::draggableNode): Only -webkit-user-select:ignore regions will
        prevent selection creation.
        * rendering/RenderObject.h:

2007-08-13  Anders Carlsson  <andersca@apple.com>

        Reviewed by Maciej.

        <rdar://problem/5360748>
        REGRESSION (r21002-r21003): Flash widget sniffer doesn't work (affects iWeb)

        Don't check whether the document is being parsed or not, because the node list
        could be accessed after the document has finished parsing.
        
        * dom/Node.cpp:
        (WebCore::Node::registerNodeList):

2007-08-13  Lars Knoll  <lars@trolltech.com>

        Reviewed by Simon.

        no need to update regions that are not visible on the webpage.

        * platform/qt/ScrollViewQt.cpp:
        (WebCore::ScrollView::updateContents):

2007-08-12  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Darin and Sam.
        
        <rdar://problem/5395213> cross-domain access to individual components of location object should be denied.

        * bindings/js/kjs_window.cpp:
        (KJS::Location::put): Add the appropriate cross-domain access checks.

2007-08-12  Darin Adler  <darin@apple.com>

        Reviewed by John Sullivan.

        - fix <rdar://problem/5403724> REGRESSION: text inputs are not scrolled to make inline input visible (14912)

        * editing/Editor.h: Made setIgnoreMarkedTextSelectionChange no longer inline.
        It now has a side effect of revealing the selection when you set it to false.
        Added private revealSelectionAfterEditingOperation helper.
        * editing/Editor.cpp:
        (WebCore::Editor::deleteRange): Calls revealSelectionAfterEditingOperation instead
        of calling m_frame->revealSelection directly.
        (WebCore::Editor::replaceSelectionWithFragment): Ditto.
        (WebCore::Editor::insertOrderedList): Ditto.
        (WebCore::Editor::insertUnorderedList): Ditto.
        (WebCore::Editor::increaseSelectionListLevel): Ditto.
        (WebCore::Editor::increaseSelectionListLevelOrdered): Ditto.
        (WebCore::Editor::increaseSelectionListLevelUnordered): Ditto.
        (WebCore::Editor::decreaseSelectionListLevel): Ditto.
        (WebCore::Editor::insertLineBreak): Ditto.
        (WebCore::Editor::insertParagraphSeparator): Ditto.
        (WebCore::Editor::replaceMarkedText): Ditto.
        (WebCore::Editor::revealSelectionAfterEditingOperation): Added. Calls revealSelection,
        unless we are in the ignoreMarkedTextSelectionChange state. If we are in that state,
        we're in the middle of a composite editing operation and we shouldn't try to scroll
        to reveal the selection until the operation is done.
        (WebCore::Editor::setIgnoreMarkedTextSelectionChange): Made no longer inline. If
        changing the state from true to false, then calls revealSelectionAfterEditingOperation.

        * WebCore.exp: Add new entry point for no-longer-inline setter function.

2007-08-12  Geoffrey Garen  <ggaren@apple.com>

        Reviewed by Maciej Stachowiak, Dave Hyatt.
        
        Changed the dead resource LRU-SP algorithm to measure an object's
        total size, not just its encoded size. This will allow us to make 
        better decisions about what data to evict when the cache is small. For 
        example, the PLT can now run with a 16MB cache without fully evicting
        any resources.
        
        (Previously, we had assumed that decoded size would be an OK estimate
        of encoded size, but that is not true of GIF, whose decoded size can be 
        orders of magnitude greater than its encoded size.)
        
        Subtly, destroying a resource's decoded data now increases its recency 
        by moving it to the head of a smaller LRU list. This is slightly odd,
        but, since all resources get the same treatment, it shouldn't hurt 
        the eviction algorithm.

        * history/PageCache.cpp:
        (WebCore::PageCache::releaseAutoreleasedPagesNow): Make sure that a
        dead resource eviction doesn't happen until we've released all of our
        dead pages. Otherwise, the cache will make terrible decisions about 
        what to evict because all of our dead resources will seem live.

        * loader/Cache.cpp:
        (WebCore::Cache::Cache):
        (WebCore::Cache::pruneLiveResources):
        (WebCore::Cache::pruneDeadResources): Removed call to 
        removeFromLiveDecodedResourcesList because this happens automatically
        now as a part of the process of changing the resource's decoded size.
        (WebCore::Cache::lruListFor): *** The key change. *** Compute the 
        appropriate LRU list based on total size, not encoded size.
        (WebCore::Cache::dumpLRULists): Added debug logging function to help
        visualize the cache.

        * loader/Cache.h:
        (WebCore::Cache::setDeadResourcePruneEnabled):
        (WebCore::Cache::deadResourcePruneEnabled):

        * loader/CachedImage.cpp: Moved decoded size tracking code from here
        up into the base class. Currently, only CachedImage has a use for that
        functionality, but other subclasses might need it in the future, and
        the base class is already responsible for similar code related to 
        encoded size tracking.
        (WebCore::CachedImage::decodedSizeChanged):
        * loader/CachedImage.h:

        * loader/CachedResource.cpp:
        (WebCore::CachedResource::CachedResource):
        (WebCore::CachedResource::setDecodedSize): Move us in the LRU-SP list
        just like setEncodedSize does, since decoded size counts now, too.
        (WebCore::CachedResource::setEncodedSize): Changed slightly to match
        the style of setDecodedSize.

        * loader/CachedResource.h:
        (WebCore::CachedResource::decodedSize):

2007-08-11  Mitz Pettel  <mitz@webkit.org>

        Reviewed by Darin.

        - fix http://bugs.webkit.org/show_bug.cgi?id=13670
          <rdar://problem/5399619> Table misrender when one of the TDs has width=100%

        Tests: fast/table/100-percent-cell-width.html
               fast/table/percent-widths-stretch.html

        * rendering/AutoTableLayout.cpp:
        (WebCore::AutoTableLayout::calcPrefWidths): Changed the value used instead of
        0% to avoid division by zero from 1% to less than 0.01%. Removed code that
        added 0.5px to non-percent widths when calculating the scaling factor. The
        latter change is covered by the percent-widths-stretch test, where the new
        results match both WinIE 7 and Firefox 3.

2007-08-11  Darin Adler  <darin@apple.com>

        Reviewed by Antti.

        - fix <rdar://problem/5266535> REGRESSION: <img> inside <map> no longer allowed in strict mode
          (breaks chemicalelements.com)

        Test: fast/parser/strict-img-in-map.html

        * html/HTMLMapElement.cpp: (WebCore::HTMLMapElement::checkDTD): Removed FIXME saying this
        code is strange, since this code matches the HTML 4 specification almost exactly. Made
        <img> elements allowed even in strict mode and added small comments to clarify what comes
        from the DTD and what is non-standard.

2007-08-11  Holger Hans Peter Freyther  <zecke@selfish.org>

        Reviewed by Anders.

        Implement passing events to a subframe. The code is copied from
        the windows port and passSubframeEventToSubframe was removed as it
        is not called and it is not avilable in the windows port as well.

        * page/gdk/EventHandlerGdk.cpp:
        (WebCore::EventHandler::passMousePressEventToSubframe):
        (WebCore::EventHandler::passMouseMoveEventToSubframe):
        (WebCore::EventHandler::passMouseReleaseEventToSubframe):

2007-08-11  Holger Hans Peter Freyther  <zecke@selfish.org>

        Reviewed by Lars.

        GdkEventKey::string is not supposed to be used. The length
        of this string is zero for non ascii characters. Use the
        gdk_unicode_to_keyval to convert the keyval to a UChar and construct
        a String. This change makes it possible to input non ascii
        characters.

        * platform/gdk/KeyEventGdk.cpp:
        (WebCore::keyIdentifierForGdkKeyCode):
        (WebCore::singleCharacterString):
        (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):

2007-08-11  Andrew Wellington  <proton@wiretapped.net>

        Reviewed by Mark Rowe.
        
        Fix http://bugs.webkit.org/show_bug.cgi?id=14645
        getPropertyValue should be case insensitive
        
        When we get the propertyID for a given string we convert to lowercase.
        
        This also applies to setProperty, removeProperty and others.
        
        * css/CSSStyleDeclaration.cpp:
        (WebCore::propertyID):

2007-08-11  Mark Rowe  <mrowe@apple.com>

        Build fix.  Change "#ifdef PLATFORM(GDK)" to "#if PLATFORM(GDK)".

        * page/FrameView.cpp:
        * page/FrameView.h:

2007-08-11  Holger Hans Peter Freyther  <zecke@selfish.org>

        Reviewed by Adam.

        Copy the WebFrame::layoutIfNeededRecursive method of the windows port
        to FrameView to be used by the Gtk+ port. Simplify the implementation due
        moving it to the FrameView class.

        Implement the ScrollView::children() method for the Gtk+ port and make it
        available to the FrameView as children() is used within the layoutIfNeededRecursive method.

        * page/FrameView.cpp:
        (WebCore::FrameView::layoutIfNeededRecursive):
        * page/FrameView.h:
        * platform/ScrollView.h:
        * platform/gdk/ScrollViewGdk.cpp:

2007-08-11  Holger Hans Peter Freyther  <zecke@selfish.org>

        Reviewed by Adam.

        To fix text selection make the PlatformMouseEvent set the pressed
        button even when moving the mouse.
        
        Add building of the WebKit::DragClient stubs as they are needed to
        make text selection work.

        * WebCore.pro:
        * platform/gdk/MouseEventGdk.cpp:
        (WebCore::PlatformMouseEvent::PlatformMouseEvent):

2007-08-10  Anders Carlsson  <andersca@apple.com>

        Reviewed by Darin and Maciej.

        <rdar://problem/5360748>
        REGRESSION(r21002-r21003) Flash widget sniffer doesn't work
        
        Add a per-document NodeList counter. When parsing, only call notifyNodeListsChildrenChanged
        if the document has node lists. Also, make sure to reset the cache when the node list count has 
        been 0 and a new node list is registered to avoid any stale cache information.
        
        * dom/ContainerNode.cpp:
        (WebCore::ContainerNode::addChild):
        * dom/Document.cpp:
        (WebCore::Document::Document):
        * dom/Document.h:
        (WebCore::Document::addNodeList):
        (WebCore::Document::removeNodeList):
        (WebCore::Document::hasNodeLists):
        * dom/Node.cpp:
        (WebCore::Node::registerNodeList):
        (WebCore::Node::unregisterNodeList):

2007-08-10  Timothy Hatcher  <timothy@apple.com>

        Reviewed by Adam.

        <rdar://problem/5394449> Stop using some Carbon UI APIs for 64 bit

        Disable NPObject use in 64-bit on Mac OS X.

        * Configurations/WebCore.xcconfig: Add a framework search path to the sub-framworks of Carbon.
        * WebCore.xcodeproj/project.pbxproj: Filter out the Frame::windowScriptNPObject() symbol in 64-bit.
        * bindings/objc/DOM.mm:
        (-[DOMElement _NPObject]): Return null in 64-bit.
        * config.h: Set WTF_USE_NPOBJECT to 0 in 64-bit Mac OS X.
        * page/Frame.cpp:
        (WebCore::Frame::cleanupScriptObjects): Add more #if USE(NPOBJECT) blocks where needed.
        * page/Frame.h: Ditto.
        * page/mac/FrameMac.mm:
        (WebCore::Frame::createScriptInstanceForWidget): Ditto.
        * page/mac/WebCoreFrameBridge.h: Ditto.
        * page/mac/WebCoreFrameBridge.mm: Ditto.

2007-08-10  Mitz Pettel  <mitz@webkit.org>

        Reviewed by Justin.

        - fix <rdar://problem/5397344> http://bugs.webkit.org/show_bug.cgi?id=14911
          REGRESSION: Clicking in pasted text doesn't position the insertion point correctly

        Test: editing/selection/inline-closest-leaf-child.html

        * rendering/RootInlineBox.cpp:
        (WebCore::RootInlineBox::closestLeafChildForXPos): Return the last leaf if
        it's the closest match, or if no other leaf matches (for example if all
        leaves are list markers or non-editable where editable is required).

2007-08-10  Anders Carlsson  <andersca@apple.com>

        Reviewed by Geoff.

        <rdar://problem/5390568> 
        REGRESSION: -[WebFrame loadHTMLString:baseURL:] leaks the data source.
        
        Revert the fix for <rdar://problem/5133420> which caused us to not cancel 
        substitute data loads. It's better to remove the assertion in the WebKit layer.
        
        * loader/ResourceLoader.cpp:
        (WebCore::ResourceLoader::didCancel):

2007-08-10  Sam Weinig  <sam@webkit.org>

        Rubber-stamped by Adam Roben.

        Fix Windows, Qt and Gtk build.

        * WebCore.pro:
        * WebCore.vcproj/WebCore.vcproj:

2007-08-09  Sam Weinig  <sam@webkit.org>

        Reviewed by Maciej.

        Fix for <rdar://problem/5395618>

        Use checkNodeSecurity when setting the 'src' or 'location' attribute of an
        iframe or frame element.  

        * WebCore.xcodeproj/project.pbxproj:
        * bindings/js/JSAttrCustom.cpp: Added.
        (WebCore::JSAttr::setValue): Call checkNodeSecurity for attributes with a current iframe or frame
        ownerElement when setting src to a javascript: URL.
        * bindings/js/JSElementCustom.cpp: Added.
        (WebCore::allowSettingSrcToJavascriptURL):
        (WebCore::JSElement::setAttribute): Call checkNodeSecurity when element is a frame or iframe and 
        setting he src attribute to a javascript: URL.
        (WebCore::JSElement::setAttributeNode): Ditto.
        (WebCore::JSElement::setAttributeNS): Ditto.
        (WebCore::JSElement::setAttributeNodeNS): Ditto.
        * bindings/js/JSHTMLFrameElementCustom.cpp: Added.
        (WebCore::allowSettingJavascriptURL):
        (WebCore::JSHTMLFrameElement::setSrc): Call checkNodeSecurity when setting to a javascript: URL.
        (WebCore::JSHTMLFrameElement::setLocation): Ditto.
        * bindings/js/JSHTMLIFrameElementCustom.cpp: Added.
        (WebCore::JSHTMLIFrameElement::setSrc): Call checkNodeSecurity when setting to a javascript: URL.
        * bindings/scripts/CodeGeneratorJS.pm: Add support for [CustomGetter] and [CustomSetter]
        * dom/Attr.idl:
        * dom/Element.idl:
        * html/HTMLFrameElement.idl:
        * html/HTMLIFrameElement.idl:

2007-08-10  Holger Hans Peter Freyther  <zecke@selfish.org>

        Reviewed by Anders.

        Make the containingWindow a GtkContainer and make use of the
        GtkWidget::window instead of the GtkLayout::bin_window.

        * platform/Widget.h:
        * platform/gdk/PlatformScreenGdk.cpp:
        (WebCore::screenDepth):
        * platform/gdk/ScrollViewGdk.cpp:
        (WebCore::ScrollView::updateContents):
        (WebCore::ScrollView::update):
        * platform/gdk/WidgetGdk.cpp:
        (WebCore::Widget::setContainingWindow):
        (WebCore::Widget::setCursor):

2007-08-10  Simon Hausmann  <hausmann@kde.org>

        Reviewed by Lars.

        Revert r24699 as it broke timers. The precision of QTime::toTime_t() is just seconds, which is not good enough. Revert back
        to the old implementation and use the simple implementation of currentTime() from win/ for the Qt/Windows build (fingers crossed :)

        * WebCore.pro:
        * platform/qt/SystemTimeQt.cpp:
        (WebCore::currentTime):

2007-08-10  Simon Hausmann  <hausmann@kde.org>

        Reviewed by Lars.

        Recognize .htm as valid extension for text/html.

        * platform/qt/MIMETypeRegistryQt.cpp:
        (WebCore::):

2007-08-10  Lars Knoll  <lars@trolltech.com>

        Reviewed by Simon.

        remove an assertion that leads to crashes. The whole design of WidgetQt and ScrollViewQt needs to be reevaluated soon anyways.

        * platform/qt/ScrollViewQt.cpp:

2007-08-10  Mark Rowe  <mrowe@apple.com>

        Fix the Mac build.

        * ForwardingHeaders/bindings/runtime_object.h: Added.

2007-08-10  Simon Hausmann  <hausmann@kde.org>

        Reviewed by Lars.

        Make sure -fno-strict-aliasing is also added for mkspecs like linux-g++-64.

        * WebCore.pro:

2007-08-10  Simon Hausmann  <hausmann@kde.org>

        Reviewed by Lars.

        Enable JavaScript bindings for HTML Object/Applet elements in the Qt port.

        * WebCore.pro:
        * bindings/js/kjs_dom.cpp:
        * html/HTMLAppletElement.h:
        * html/HTMLEmbedElement.h:
        * page/qt/FrameQt.cpp:
        (WebCore::Frame::createScriptInstanceForWidget):

2007-08-10  Mitz Pettel  <mitz@webkit.org>

        Reviewed by Dave Hyatt.

        - fix http://bugs.webkit.org/show_bug.cgi?id=14798
          Incorrect bidi reordering of neutrals and digits after RTL embed
          and other bugs in the bidi algorithm.

        Test: fast/text/international/bidi-neutral-run.html

        Fixed several bugs in resolving the embedding level of runs of neutral
        characters. Changed the logic to rely on the eor direction only for
        the number types, and otherwise consider the last strong type.

        * platform/BidiContext.h:
        (WebCore::BidiContext::BidiContext): Added an ASSERT.
        * platform/BidiResolver.h:
        (WebCore::::embed):
        (WebCore::::createBidiRunsForLine):
        * platform/graphics/GraphicsContext.cpp:
        (WebCore::TextRunIterator::atEnd): Changed to return true instead of
        crashing when called on the empty iterator.

2007-08-09  Mark Rowe  <mrowe@apple.com>

        Reviewed by Antti.

        <rdar://problem/5400709> Versioning in debug and release builds should include minor and tiny version before +

        * Configurations/Version.xcconfig:
        * WebCore.xcodeproj/project.pbxproj: Add a shell script phase to make to dependency between
        Version.xcconfig and Info.plist explicit to Xcode.

2007-08-09  Mitz Pettel  <mitz@webkit.org>

        Reviewed by Justin Garcia.

        - fix http://bugs.webkit.org/show_bug.cgi?id=14347
          REGRESSION (r21291): Initiating a drag near the edge of a selection deselects it

        Test: editing/selection/contains-boundaries.html

        * editing/SelectionController.cpp:
        (WebCore::SelectionController::contains): Changed to return true for the
        selection boundaries too.

2007-08-09  Mitz Pettel  <mitz@webkit.org>

        Reviewed by Dave Hyatt.

        - fix http://bugs.webkit.org/show_bug.cgi?id=14742
          Document::recalcStyle(Force) called for every updateStyleIgnorePendingStylesheets while waiting for stylesheets
          <rdar://problem/5376306>

        updateStyleSelector() is normally called when something changes that factors
        into the style selector. However, updateLayoutIgnorePendingStylesheets() calls it for
        a different reason, namely to account for all the preceding changes that were ignored
        because of the early return in updateStyleSelector(). After that, the early return
        can no longer occur, so changes are accounted for as they happen, and
        updateLayoutIgnorePendingStylesheets() does not need to call updateStyleSelector()
        again.

        * dom/Document.cpp:
        (WebCore::Document::updateLayoutIgnorePendingStylesheets): Call updateStyleSelector()
        only before the first layout.

2007-08-09  Mitz Pettel  <mitz@webkit.org>

        Reviewed by Adam Roben.

        - fix http://bugs.webkit.org/show_bug.cgi?id=14362
          Opening a select list always highlights first element in list

        * platform/win/PopupMenuWin.cpp:
        (WebCore::PopupWndProc): Track the mouse only inside the popup.

2007-08-09  Mitz Pettel  <mitz@webkit.org>

        Reviewed by Dave Hyatt.

        - fix http://bugs.webkit.org/show_bug.cgi?id=14875
          Textarea with nowrap - left/right nav, Up/down nav both hide text

        Test: fast/layers/scroll-rect-to-visible.html

        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::scrollRectToVisible): Account for borders and scroll bars.

2007-08-09  Geoffrey Garen  <ggaren@apple.com>

        Reviewed by Dave Hyatt.
        
        Refactored live decoded resource eviction to be more modular / 
        encapsulated. 
        
        This fixes one known place where we forgot to hook into the live 
        decoded eviction mechanism -- canvas. There might be other, unknown 
        places. In a canvas test page, which I broke off from the Safari 
        pageout test, I saw an RPRVT reduction of ~10MB.
        
        A few renames:
        - "m_lastLiveAccessTime" => "m_lastDecodedAccessTime" because the data
        point we're recording is access to the resource in decoded form.
        
        - "liveResourceAccessed" => "didAccessDecodedData" for the same reason.

        - "pruneAllResources" => "pruneDeadResources" because this function 
        does not prune live resources.
        
        And the fix:
        Instead of updating cache metadata at the call site whenver drawing an 
        image, just have an image notify its observer whenever it draws. The 
        observer, which is a CachedResource, can then update the metadata.
        
        * loader/Cache.cpp: Renames
        * loader/Cache.h: Removed stale declarations, updated comments
        * loader/CachedImage.cpp:
        (WebCore::CachedImage::didDraw): Implemented didDraw to update cache
        metadata whenever our image draws.
        * loader/CachedImage.h: Grouped parts of the ImageObserver interface.
        * loader/CachedResource.cpp:
        (WebCore::CachedResource::CachedResource):
        (WebCore::CachedResource::deref):
        (WebCore::CachedResource::didAccessDecodedData): Made this function
        slightly more modular by allowing the caller to provide a time stamp.
        In theory, not all CachedResources will necessarily want to use the 
        current paint time stamp.
        * platform/graphics/cg/ImageCG.cpp:
        (WebCore::BitmapImage::draw): Notify our observer that we drew.
        (WebCore::Image::drawPattern): ditto
        * platform/graphics/cg/PDFDocumentImage.cpp:
        (WebCore::PDFDocumentImage::draw): ditto
        * platform/graphics/svg/SVGImage.cpp:
        (WebCore::SVGImage::draw): ditto
        
        Removed old code at image drawing call sites:
        
        * rendering/RenderBox.cpp:
        (WebCore::RenderBox::paintBackgroundExtended):
        * rendering/RenderImage.cpp:
        (WebCore::RenderImage::paint):
        * rendering/RenderListMarker.cpp:
        (WebCore::RenderListMarker::paint):
        * rendering/RenderObject.cpp:
        (WebCore::RenderObject::paintBorderImage):

2007-08-10  Holger Hans Peter Freyther  <zecke@selfish.org>

        Reviewed by Adam.

        Move the various *ClientGdk.{h,cpp} away from the WebCore directory as
        of http://bugs.webkit.org/show_bug.cgi?id=14727.

        * WebCore.pro:
        * platform/gdk/TemporaryLinkStubs.cpp:

2007-08-09  Anders Carlsson  <andersca@apple.com>

        Reviewed by Maciej.

        <rdar://problem/5400029> iframes with an image src rarely load image
        
        Don't try to shrink standalone images in subframes. The resize event is not 
        sent for subframes which screws up the shrink-to-fit logic.
        
        * loader/ImageDocument.cpp:
        (WebCore::ImageDocument::createDocumentStructure):
        (WebCore::ImageDocument::imageChanged):
        (WebCore::ImageDocument::shouldShrinkToFit):
        * loader/ImageDocument.h:

2007-08-10  Holger Hans Peter Freyther  <zecke@selfish.org>

        Reviewed by Adam.

        Implement FrameLoaderClientGdk::createFrame mostly by copying
        the windows implementation. A method similiar to WebFrame::loadURLIntoChild
        was not introduced instead we have a simplified version similiar to the
        one of the Qt port.

        Remove building of WebKit/gtk/webkitgtkframedata.{cpp,h}.

        * WebCore.pro:
        * loader/gdk/FrameLoaderClientGdk.cpp:
        (WebCore::FrameLoaderClientGdk::createFrame):

2007-08-10  Holger Hans Peter Freyther  <zecke@selfish.org>

        Reviewed by Adam.

        Use the ScrollView/Widget design of the Windows port to only use one
        native window for the whole page. This will make it possible to implement
        FrameLoaderClientGdk::createFrame.

        In contrast to the windows port the ScrollBars are GtkWidgets. To paint them
        at the right position we need to position them correctly. To not scroll the
        ScrollBar's belonging to the ScrollView a ScrollViewScrollbar is introduced with
        a different geometryChanged method.

        To allow the Gtk+ way of scrolling the ScrollView allows to get GtkAdjustments
        set. In this case no ScrollViewScrollbar will be created.


        * platform/ScrollView.h:
        * platform/Widget.h:
        * platform/gdk/PlatformScreenGdk.cpp:
        (WebCore::screenDepth):
        * platform/gdk/PlatformScrollBar.h:
        * platform/gdk/PlatformScrollBarGdk.cpp:
        (PlatformScrollbar::PlatformScrollbar):
        (PlatformScrollbar::~PlatformScrollbar):
        (PlatformScrollbar::setRect):
        (PlatformScrollbar::geometryChanged):
        * platform/gdk/ScrollViewGdk.cpp:
        (WebCore::ScrollView::ScrollViewPrivate::ScrollViewPrivate):
        (WebCore::ScrollView::ScrollViewPrivate::~ScrollViewPrivate):
        (WebCore::ScrollViewScrollbar::ScrollViewScrollbar):
        (WebCore::ScrollViewScrollbar::geometryChanged):
        (WebCore::ScrollView::ScrollViewPrivate::setHasHorizontalScrollbar):
        (WebCore::ScrollView::ScrollViewPrivate::setHasVerticalScrollbar):
        (WebCore::ScrollView::ScrollViewPrivate::scrollBackingStore):
        (WebCore::ScrollView::ScrollViewPrivate::adjustmentChanged):
        (WebCore::ScrollView::ScrollViewPrivate::valueChanged):
        (WebCore::ScrollView::ScrollViewPrivate::windowClipRect):
        (WebCore::ScrollView::setGtkAdjustments):
        (WebCore::ScrollView::updateContents):
        (WebCore::ScrollView::update):
        (WebCore::ScrollView::visibleWidth):
        (WebCore::ScrollView::resizeContents):
        (WebCore::ScrollView::contentsX):
        (WebCore::ScrollView::scrollOffset):
        (WebCore::ScrollView::maximumScroll):
        (WebCore::ScrollView::scrollBy):
        (WebCore::ScrollView::suppressScrollbars):
        (WebCore::ScrollView::setHScrollbarMode):
        (WebCore::ScrollView::setVScrollbarMode):
        (WebCore::ScrollView::setScrollbarsMode):
        (WebCore::ScrollView::setFrameGeometry):
        (WebCore::ScrollView::addChild):
        (WebCore::ScrollView::removeChild):
        (WebCore::ScrollView::scrollRectIntoViewRecursively):
        (WebCore::ScrollView::wheelEvent):
        (WebCore::ScrollView::updateScrollbars):
        (WebCore::ScrollView::windowToContents):
        (WebCore::ScrollView::contentsToWindow):
        (WebCore::ScrollView::scrollbarUnderMouse):
        (WebCore::ScrollView::convertChildToSelf):
        (WebCore::ScrollView::convertSelfToChild):
        (WebCore::ScrollView::paint):
        (WebCore::ScrollView::geometryChanged):
        (WebCore::ScrollView::scroll):
        (WebCore::ScrollView::addToDirtyRegion):
        (WebCore::ScrollView::scrollBackingStore):
        (WebCore::ScrollView::updateBackingStore):
        * platform/gdk/WidgetGdk.cpp:
        (WebCore::WidgetPrivate::gdkDrawable):
        (WebCore::Widget::Widget):
        (WebCore::Widget::setContainingWindow):
        (WebCore::Widget::containingWindow):
        (WebCore::Widget::frameGeometry):
        (WebCore::Widget::setFrameGeometry):
        (WebCore::Widget::setParent):
        (WebCore::Widget::parent):
        (WebCore::Widget::setCursor):
        (WebCore::Widget::show):
        (WebCore::Widget::hide):
        (WebCore::Widget::removeFromParent):
        (WebCore::Widget::paint):
        (WebCore::Widget::invalidate):
        (WebCore::Widget::invalidateRect):
        (WebCore::Widget::convertToContainingWindow):
        (WebCore::Widget::convertFromContainingWindow):
        (WebCore::Widget::convertChildToSelf):
        (WebCore::Widget::convertSelfToChild):
        (WebCore::Widget::suppressInvalidation):
        (WebCore::Widget::setSuppressInvalidation):

2007-08-09  Adele Peterson  <adele@apple.com>

        Fix by Brady, reviewed by me.

        Fix for <rdar://problem/5380697> connection:willSendRequest:redirectResponse: is called on every NSURLConnection

        * platform/network/mac/ResourceHandleMac.mm: (-[WebCoreResourceHandleAsDelegate connection:willSendRequest:redirectResponse:]):
          Work around a behavior change in CFNetwork where willSendRequest gets called more often by returning early.

2007-08-09  Darin Adler  <darin@apple.com>

        Reviewed by Antti.

        - fix <rdar://problem/4889753> REGRESSION: Selection doesn't continue with drag selecting
          when autoscrolling vertically (in Notes as well as Safari)

        The bug doesn't happen inside DumpRenderTree, so I was unable to make an automated
        regression test.

        * manual-tests/autoscroll-when-outside-window.html: Added.

        * rendering/RenderLayer.cpp: (WebCore::RenderLayer::autoscroll): Removed unneeded null
        check for the layer's renderer and the document, neither of which can be null. Call
        the new updateSelectionForMouseDrag instead of doing selection updating here.

        * page/EventHandler.h:
        * page/EventHandler.cpp:
        (WebCore::EventHandler::handleMouseDraggedEvent): Refactored most of the logic
        about updating the selection into updateSelectionForMouseDrag.
        (WebCore::EventHandler::updateSelectionForMouseDrag): Added. The public version of
        this function takes no parameters, and is for use from auto-scrolling code. The
        private version of this function takes node and point parameters and contains the
        shared code, including everything from updateSelectionForMouseDragOverPosition.
        Aside from the code motion, variable name changes, and sharing more code, this
        differs from the old code in RenderLayer::autoscroll in the following ways:

          1) The old code did hit testing only in the layer that was auto-scrolling,
             and the new code instead starts the hit testing at the root layer, which is
             better because it's the same thing we do for mouse moved events. Further,
             the code to do this by calling convertToLayerCoords had a bug  because the
             x and y variables were uninitialized.
          2) The old code passed false for active to HitTestRequest, which was wrong.
             The new code passes true. This flag needs to be true for hit testing done
             while the mouse is down and false for hit testing done while the mouse is up.
          3) The old code did not have the SVG-specific logic to match the mouse moved case.
          4) The old code wouldn't do any selection updating if the return value from hitTest
             was false, which is incorrect. The new code ignores the return value as it should.

2007-08-08  Beth Dakin  <bdakin@apple.com>

        Reviewed by Geoff Garen.

        Fx for <rdar://problem/5286443>, http://bugs.webkit.org/
        show_bug.cgi?id=14268 REGRESSION: Radio buttons don't stay selected 
        due to unclosed <label> tags

        This patch maintains the behavior that allows <label> tags to nest. 
        This matches WinIE, and appears to match the spec, since the spec 
        does not explicitly say that they cannot nest. It fixes the bug 
        instead by calling setDefaultHandled() in two places it should have 
        been called anyway. This keeps the appropriate button checked as 
        the event bubbles.

        * html/HTMLInputElement.cpp:
        (WebCore::HTMLInputElement::postDispatchEventHandler):
        * html/HTMLLabelElement.cpp:
        (WebCore::HTMLLabelElement::defaultEventHandler):

2007-08-08  Justin Garcia  <justin.garcia@apple.com>

        Reviewed by Oliver.

        <rdar://problem/5387578> Crash at ReplaceSelectionCommand::doApply() when pasting just after table cell content
        
        ReplaceSelectionCommand::doApply() inserts a line break before insertion
        to prevent block nesting.  InsertLineBreakCommand::doApply was accidently
        destroying a text node when it removed insignificant whitespace and then
        setting a nil endingSelection().

        * editing/InsertLineBreakCommand.cpp:
        (WebCore::InsertLineBreakCommand::doApply): If insignificant whitespace
        removal removes textNode from the document, insert a text node containing
        the non-breaking space we were attempting to insert and then insert it
        at the position that the removed textNode occupied.

2007-08-08  Geoffrey Garen  <ggaren@apple.com>

        Reviewed by Maciej Stachowiak.

        Added a thrash check to live decoded resource eviction.
        
        Here's the strategy: Stamp every image with its paint time. Don't evict 
        a live decoded resource until another resource paints with a reasonably
        (1 second) larger time stamp. 
        
        If no other resource paints, or another resource paints, but very soon 
        after the resource in question, the resource in question is very likely 
        to paint again soon. In fact, it's probably still on screen. So we 
        leave it alone. (Previously, we evicted it on a timer, but that would 
        evict a resource that was still on screen, hurting speed without 
        helping memory use.)

        In theory, this algorithm allows a single large resource or closely 
        related set of resources to linger in the live decoded cache even 
        though the cache is over its limit. However, that can only happen as 
        long as no other resource ever paints again, which guarantees an 
        absolute cap on cache memory usage from then on. Also, the resources 
        will only linger as long as they remain live. Upon going dead, they 
        will flush. Also, these circumstances are so rare that they are almost 
        impossible to encounter in the wild. So don't sweat it.
        
        Stop evicting if the next resource painted too recently:
        
        * loader/Cache.cpp:
        (WebCore::Cache::pruneLiveResources):
        * loader/CachedResource.cpp:
        (WebCore::CachedResource::CachedResource):
        (WebCore::CachedResource::liveResourceAccessed):
        * loader/CachedResource.h:

        Track the paint time stamp in Frame. We do this to give a consistent
        stamp to all resources painted in a single paint operation (in case the
        operation takes a significant amount of time), and to avoid excessive 
        calls to system time functions, which hurt the PLT:

        * page/Frame.cpp:
        (WebCore::Frame::paint):
        * page/Frame.h:
        (WebCore::Frame::currentPaintTimeStamp):

2007-08-08  Sam Weinig  <sam@webkit.org>

        Reviewed by Adam Roben.

        Update project file to reflect the moving of character-sets.txt
        and make-charset-table.pl to platform/mac a while ago.

        * WebCore.xcodeproj/project.pbxproj:

2007-08-08  Justin Garcia  <justin.garcia@apple.com>

        Reviewed by Harrison.

        <rdar://problem/5390681> WebKit asserts when deleting To Do content selected with a double-click
        
        * dom/Position.cpp:
        (WebCore::Position::trailingWhitespacePosition): Use VisiblePosition::characterAfter
        to look for a trailing space.  The old code would incorrectly return a position before
        a non-editable space if it had a collapsed space before it.

2007-08-08  Sam Weinig  <sam@webkit.org>

        Reviewed by Brady.

        Make protocol and host compares case-insensitive.

        * bindings/js/kjs_window.cpp:
        (KJS::Window::isSafeScript):
        * dom/Document.cpp:
        (WebCore::Document::initSecurityPolicyURL):
        * platform/DeprecatedString.cpp:
        (WebCore::equalIgnoringCase):
        * platform/DeprecatedString.h:
        (WebCore::equalIgnoringCase):

2007-08-08  Justin Garcia  <justin.garcia@apple.com>

        Reviewed by Harrison.

        <rdar://problem/5390681> WebKit asserts when deleting To Do content selected with a double-click

        * dom/Position.cpp:
        (WebCore::Position::leadingWhitespacePosition): Added checks to prevent expansion across editable an boundary.
        (WebCore::Position::trailingWhitespacePosition): Ditto.

2007-08-08  Adele Peterson  <adele@apple.com>

        Reviewed by John.

        Fix for <rdar://problem/5393798> 100% reproducible crash in WebCore::Scrollbar::setValue

        * page/EventHandler.cpp: (WebCore::EventHandler::handleMousePressEvent):
          If the hit testing originally determined the event was in a scrollbar, 
          refetch the MouseEventWithHitTestResults in case the scrollbar widget was destroyed when the mouse event was handled.

2007-08-08  Sam Weinig  <sam@webkit.org>

        Reviewed by Geoff Garen.

        Fix for <rdar://problem/5354635>

        Match Firefox's model for data: URLs by not allowing them script access
        to any frames other then itself.

        * bindings/js/kjs_window.cpp:
        (KJS::Window::isSafeScript):
        * dom/Document.cpp:
        (WebCore::Document::initSecurityPolicyURL):

2007-08-08  Darin Adler  <darin@apple.com>

        Reviewed by Kevin Decker.

        - fix for <rdar://problem/5390708> CrashTracer: [USER] 27 crashes in Safari at
          com.apple.WebCore: WTF::HashMap<etc>::set + 68, beneath pruneUnretainedIconsAtStartup

        * loader/icon/IconDatabase.cpp: (WebCore::IconDatabase::pruneUnretainedIconsOnStartup):
        Eliminate an unnecessary HashMap from the implementation; we can just use the
        m_pageURLToRetainCount map directly. This simplifies the code and allows us to handle
        the empty string, which otherwise poses a problem for HashMap.

2007-08-08  Antti Koivisto  <antti@apple.com>

        Reviewed by Darin.
        
        Fix for <rdar://problem/5391576>
        Malformed table innerHTML causes Safari to crash in HTMLParser::handleError (14894)
        
        Add null checks to protect against 
        
        e.innerHTML = "<tr>text</tr>";
        
        type cases. Normal assumptions about document tree structure don't hold when parsing 
        fragments. Results don't match Firefox in all cases. It seems to have some sort of 
        anything-goes fragment parsing mode.
        
        * html/HTMLParser.cpp:
        (WebCore::HTMLParser::handleError):

2007-08-07  Kevin McCullough  <kmccullough@apple.com>

        Reviewed by Maciej and Hyatt.

        - <rdar://problem/4976879> REGRESSION: Safari doesn't work with Zimbra enhanced login.
        - Reverting a previous change, and modifying how documents are created so that we better match other browsers behavior with respect to namespaceURIs.

        * WebCore.xcodeproj/project.pbxproj:
        * dom/DOMImplementation.cpp:
        (WebCore::DOMImplementation::createDocument):
        * dom/Document.cpp:
        (WebCore::Document::Document):
        (WebCore::Document::createElement):
        * dom/Document.h:
        * html/HTMLDocument.cpp:
        (WebCore::HTMLDocument::createElement):
        * html/HTMLDocument.h:

2007-08-08  Cameron Zwarich  <cwzwarich@uwaterloo.ca>

        Reviewed and landed by Brady

        Fixes <http://bugs.webkit.org/show_bug.cgi?id=13422>

        Bug 13422: REGRESSION: Page reload loses page position

        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::updateHistoryForReload):

2007-08-08  Holger Hans Peter Freyther  <zecke@selfish.org>

        Reviewed by Niko.

        Be paranoid and disconnect from the signal before going away.

        * platform/gdk/PlatformScrollBarGdk.cpp:
        (PlatformScrollbar::~PlatformScrollbar):

2007-08-08  Holger Hans Peter Freyther  <zecke@selfish.org>

        Reviewed by Niko.

        Use GraphicsContext::translatePoint in RenderThemeGdk to paint at the
        right position.
        This is needed as the Gtk+ theming code does not know about the translation
        of the GraphicsContext.

        * platform/gdk/RenderThemeGdk.cpp:
        (WebCore::RenderThemeGdk::paintCheckbox):
        (WebCore::RenderThemeGdk::paintRadio):
        (WebCore::RenderThemeGdk::paintButton):

2007-08-08  Holger Hans Peter Freyther  <zecke@selfish.org>

        Reviewed by Niko.

        Implement Widget::paint for the Gtk port. This is needed to paint
        Widgets in z-order. The original GdkEventExpose is stored within the
        GraphicsContext and then used to draw the children. This is similiar
        to gtk_container_propagate_expose but we try to honor the GraphicsConntext
        translation.

        * platform/gdk/WidgetGdk.cpp:
        (WebCore::Widget::paint):
        * platform/graphics/GraphicsContext.h:
        * platform/graphics/cairo/GraphicsContextCairo.cpp:
        (WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate):
        (WebCore::GraphicsContext::setGdkExposeEvent):
        (WebCore::GraphicsContext::gdkExposeEvent):
        (WebCore::GraphicsContext::gdkDrawable):
        (WebCore::GraphicsContext::translatePoint):

2007-08-08  Holger Hans Peter Freyther  <zecke@selfish.org>

        Reviewed by Oliver Hunt.

        Implement PlatformScrollbar by calling ScrollBar::setValue from 
        gtkValueChange connected to the value-changed signal of the
        GtkAdjustment.
        Update 'value' of the GtkAdjustment in updateThumbPosition and
        set upper, page-increment, step-increment and page_size in
        updateThumbProportion.

        This is from bug http://bugs.webkit.org/show_bug.cgi?id=14795.

        * platform/gdk/PlatformScrollBar.h:
        * platform/gdk/PlatformScrollBarGdk.cpp:
        (PlatformScrollbar::PlatformScrollbar):
        (PlatformScrollbar::updateThumbPosition):
        (PlatformScrollbar::updateThumbProportion):
        (PlatformScrollbar::gtkValueChanged):

2007-08-07  Geoffrey Garen  <ggaren@apple.com>

        Reviewed by Maciej Stachowiak. Based on earlier review from Dave Hyatt.

        First chunk of work for <rdar://problem/5326009> Make non-browser 
        WebKit clients have no memory cache, or a very tiny one
        
        Layout tests pass.
        
        Removed decodedSizeWillChange mechanism because my last patch to
        change the live resources list to a strict LRU model made that code
        vestigial.
        
        Renamed "liveResourcesList" and related stuff => 
        "liveDecodedResourcesList" because only live resources with decoded 
        data are kept in the list.

        * loader/CachedImage.cpp:
        (WebCore::CachedImage::decodedSizeChanged): Only add ourselves to the
        list if we're live, our decoded size has grown, and we're not in the 
        list already. (Otherwise, either we're not live, we're not decoded,
        or we're already in the list.)

        * loader/CachedResource.cpp:
        (WebCore::CachedResource::liveResourceAccessed): Only re-insert
        ourselves into the list if we're already there. (In theory, this should
        be always, but it's a little more clear to check.)

2007-08-08  Holger Hans Peter Freyther  <zecke@selfish.org>

        Reviewed by Adam.

        Kill class FrameGdk and move the stubs to page/gdk/FrameGdk.cpp and the
        remainings into WebKitGtkFrame.
        The DRT functionality of class FrameGdk is currently lost.

        * WebCore.pro:
        * loader/gdk/FrameLoaderClientGdk.cpp:
        * loader/gdk/FrameLoaderClientGdk.h:
        * page/gdk/FrameGdk.cpp: Renamed from WebCore/platform/gdk/FrameGdk.cpp.
        (WebCore::Frame::issueTransposeCommand):
        (WebCore::Frame::cleanupPlatformScriptObjects):
        (WebCore::Frame::dragImageForSelection):
        (WebCore::Frame::dashboardRegionsChanged):
        * platform/gdk/FrameGdk.h: Removed.
        * platform/gdk/TemporaryLinkStubs.cpp: Removed Frame stub, added the loadResourceIntoArray stub
        * platform/gdk/WidgetGdk.cpp:

2007-08-08  Holger Hans Peter Freyther  <zecke@selfish.org>

        Reviewed by Adam.

        Remove the event handling code and move it to WebKit/gtk/Api/webkitgtkpage.cpp

        * platform/gdk/FrameGdk.cpp:
        * platform/gdk/FrameGdk.h:

2007-08-07  Holger Hans Peter Freyther  <zecke@selfish.org>

        Reviewed by Niko.

        Switch from the generic union GdkEvent to the specific struct GdkEvent*. This is needed
        to make WebKitGtkPage handle the events by reimplementing the default handlers in the near
        future.

        * platform/PlatformKeyboardEvent.h:
        * platform/PlatformMouseEvent.h:
        * platform/PlatformWheelEvent.h:
        * platform/gdk/FrameGdk.cpp:
        (WebCore::FrameGdk::handleGdkEvent):
        * platform/gdk/KeyEventGdk.cpp:
        (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
        * platform/gdk/MouseEventGdk.cpp:
        (WebCore::PlatformMouseEvent::PlatformMouseEvent):
        * platform/gdk/WheelEventGdk.cpp:
        (WebCore::PlatformWheelEvent::PlatformWheelEvent):

2007-08-07  George Staikos  <staikos@kde.org>

        Some QStyles don't handle negative maximum well (crash)

        * platform/qt/PlatformScrollBarQt.cpp:
        (WebCore::PlatformScrollbar::paint):

2007-08-07  Antti Koivisto  <antti@apple.com>

        Reviewed by Hyatt.

        Fix <rdar://problem/5102553>
        Mail spins trying to display or edit a specific long plain text message in WebCore::TimerBase::...

        Calling removeLeftoverAnonymousBoxes() from RenderBlock::addChildToFlow() made adding children
        O(n^2) in simple cases (repeated <div><div></div></div> for example).
        
        I couldn't find any limited fix so here is a more complete one. It removes iterating/recursing 
        removeLeftoverAnonymousBoxes() method altogether. Instead of hunting around wildly, just get 
        rid of anonymous boxes with block children when they occur.

        * rendering/RenderBlock.cpp:
        (WebCore::RenderBlock::addChildToFlow):
        * rendering/RenderButton.h:
        (WebCore::RenderButton::removeLeftoverAnonymousBlock):
        * rendering/RenderContainer.cpp:
        (WebCore::RenderContainer::removeLeftoverAnonymousBlock):
        * rendering/RenderContainer.h:
        * rendering/RenderObject.cpp:
        (WebCore::RenderObject::handleDynamicFloatPositionChange):
        (WebCore::RenderObject::removeLeftoverAnonymousBlock):
        * rendering/RenderObject.h:
        * rendering/RenderTextControl.h:
        (WebCore::RenderTextControl::removeLeftoverAnonymousBlock):

2007-08-06  Sam Weinig  <sam@webkit.org>

        Reviewed by Maciej.

        Fix for <rdar://problem/5354689>

        - Use document variable to determine permissions instead
          of traversing the frame tree. 

        * bindings/js/kjs_window.cpp:
        (KJS::Window::isSafeScript):
        * dom/Document.cpp:
        (WebCore::Document::Document):
        (WebCore::Document::initSecurityPolicyURL):
        * dom/Document.h:
        (WebCore::Document::securityPolicyURL):
        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::setOpener): We must re-initialize the
        safeScript URL when setting the opener because the opener was
        not known at Document construction.

2007-08-06  David Hyatt  <hyatt@apple.com>

        Make sure to clear out the parent of the ellipsis box so that it doesn't
        trigger the consistency check for line boxes.

        Reviewed by darin

        * ChangeLog:
        * rendering/RootInlineBox.cpp:
        (WebCore::RootInlineBox::detachEllipsisBox):

2007-08-06  David Hyatt  <hyatt@apple.com>

        Back out fix for <rdar://problem/5366582> and replace it with the correct
        fix.  Make sure to delete the line box tree before splitting an inline flow
        into a continuation.  The added layout test for the original checkin covers
        the problem.

        Reviewed by beth

        * rendering/RenderBlock.cpp:
        (WebCore::RenderBlock::makeChildrenNonInline):
        Back out fix.

        * rendering/RenderFlow.cpp:
        (WebCore::RenderFlow::destroy):
        Back out fix.

        * rendering/RenderInline.cpp:
        (WebCore::RenderInline::splitFlow):
        Here's the new fix.

2007-08-06  Geoffrey Garen  <ggaren@apple.com>

        Reviewed by Darin Adler.
        
        Touching a file to force a re-build.

2007-08-06  Darin Adler  <darin@apple.com>

        - fix release build

        * rendering/RenderText.h: (WebCore::RenderText::checkConsistency):
        Add missing const.

2007-08-06  Darin Adler  <darin@apple.com>

        Reviewed by Maciej.

        - fix <rdar://problem/5366582> crash on it.eurosport.yahoo.com page

        Test: fast/dynamic/inline-to-block-crash.html

        I added some consistency checks for the line box tree, which helped me figure out
        what was going on with this bug pretty quickly.

        * rendering/RenderBlock.cpp: (WebCore::RenderBlock::makeChildrenNonInline):
        This is the actual fix. If the block needs layout, then don't try to delete the line
        box tree because it's going to be rebuilt as part of layout. More importantly, the
        child list in the tree is no good, so we will crash if we try to delete here.

        * rendering/RenderFlow.cpp: (WebCore::RenderFlow::destroy):
        Here's a second fix. We have the same issue in the code that handles anonymous
        blocks -- if it's already running as part of layout, we can't walk through the
        already partly destroyed line box tree. This crashed in one of the layout tests.

        * rendering/InlineBox.h: Made more fields private, since I wanted to do a bit more
        work in setters. Made setNextOnLine() and setPrevOnLine() assert that the box has a
        parent. Made parent() assert that the parent is good. Also removed the unused
        isChildOfParent() function.
        * rendering/InlineBox.cpp: (WebCore::InlineBox::~InlineBox): At destruction time, if
        we are still attached to a parent, tag that parent as having a "bad" child list.

        * rendering/InlineFlowBox.h: Added m_reasonForBadChildList, checkConsistency(),
        setHasBadChildList(), and hasBadChildList(). Also changed firstChild() and lastChild() so
        they call checkConsistency() and made all the fields private instead of protected.
        * rendering/InlineFlowBox.cpp:
        (WebCore::InlineFlowBox::addToLine): Added consistency checks before and after adding a
        box to the line. Also checked that next and prev start out as 0. Changed manipulation of
        next and prev to use accessor functions.
        (WebCore::InlineFlowBox::removeChild): Added consistency checks before and after removing
        the box from the line.
        (WebCore::InlineFlowBox::deleteLine): Use firstChild() instead of getting at m_firstChild
        directly so we get a consistency check. Also set the parent to 0 before destroying so that
        the assertion in ~InlineBox will work properly.
        (WebCore::InlineFlowBox::extractLine): Ditto.
        (WebCore::InlineFlowBox::attachLine): Ditto.
        (WebCore::InlineFlowBox::adjustPosition): Ditto.
        (WebCore::InlineFlowBox::checkConsistency): Added. Checks consistency of the child list by
        looking at the parent, next, and prev pointers. Also asserts that we are not yet in the
        "bad" child list state, which happens if one of our children is destroyed without removing
        it from our list; that's normal, but once it happens we can't look at our child list again.

        * rendering/InlineTextBox.h:
        * rendering/InlineTextBox.cpp: Remove unnneeded destroy/new/delete functions -- these are
        inherited from the InlineBox base class and don't need to be defined again.

        * rendering/RenderFlow.h:
        * rendering/RenderFlow.cpp:
        (WebCore::RenderFlow::~RenderFlow): Assert that there are no children to confirm that we
        didn't leak something.
        (WebCore::RenderFlow::extractLineBox): Added consistency checks before and after removing
        a run of boxes from the list.
        (WebCore::RenderFlow::attachLineBox): Added consistency checks before and after adding
        a box to the list.
        (WebCore::RenderFlow::removeLineBox): Added consistency checks before and after removing
        a box from the list.
        (WebCore::RenderFlow::createInlineBox): Added consistency checks before and after adding
        a box to the list.
        (WebCore::RenderFlow::checkConsistency): Added.

        * rendering/RenderText.h:
        * rendering/RenderText.cpp:
        (WebCore::RenderText::~RenderText): Assert that there are no children to confirm that we
        didn't leak something.
        (WebCore::RenderText::extractTextBox): Added consistency checks before and after removing
        a run of boxes from the list.
        (WebCore::RenderText::attachTextBox): Added consistency checks before and after adding
        a box to the list.
        (WebCore::RenderText::removeTextBox): Added consistency checks before and after removing
        a box from the list.
        (WebCore::RenderText::deleteTextBoxes): Added code to call setHasBadChildList since this
        destroys line boxes without informing the parent.
        (WebCore::RenderText::checkConsistency): Added.

2007-08-06  Adele Peterson  <adele@apple.com>

        Reviewed by Darin.

        Fix for <rdar://problem/5382483> REGRESSION: <select> element's text is clipped when a CSS line-height is specified

        Don't honor line-height for styled popup buttons.  We already don't honor line-height for unstyled popups
        and since IE and FF don't honor it at all for popups, we shouldn't either.

        * rendering/RenderThemeMac.mm: (WebCore::RenderThemeMac::adjustMenuListButtonStyle):
        * rendering/RenderThemeSafari.cpp: (WebCore::RenderThemeSafari::adjustMenuListButtonStyle):

2007-08-06  Antti  <antti@apple.com>

        Reviewed by Darin.

        Fix <rdar://problem/5378214>
        Mail crashes at RenderLayer::paintLayer() when dragging a selection over To Do text
        
        ObjC interface does not guarantee that Document::updateRendering() gets called after
        modification are made to document. This can lead to situation where paint()
        is invoked with document still dirty which can then crash in number of interesting ways.
        
        - add hasChangedChild() as needsLayout() condition. layout() will then call recalcStyle() 
          catching most cases and making sure document is not dirty when entering painting.
        - protect recalcStyle() and layout() from being executed during painting. There are some
          cases needsLayout() protection does not cover.
        
        No layout test, these states are very hard or impossible to reach using Javascript interface
        (which generally guarantees that updateRendering() is done right after execution).

        * dom/Document.cpp:
        (WebCore::Document::recalcStyle):
        * page/Frame.cpp:
        (WebCore::Frame::paint):
        (WebCore::Frame::setPaintRestriction):
        (WebCore::Frame::isPainting):
        (WebCore::FramePrivate::FramePrivate):
        * page/Frame.h:
        * page/FramePrivate.h:
        * page/FrameView.cpp:
        (WebCore::FrameView::layout):
        (WebCore::FrameView::needsLayout):

2007-08-05  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Darin Adler.
        
        <rdar://problem/5369110> CrashTracer: [USER] reproducible crash opening particular mail messages

        * platform/network/mac/ResourceHandleMac.mm:
        (-[WebCoreResourceHandleAsDelegate connection:willSendRequest:redirectResponse:]): Make sure to retain
        self for the body of this method. Otherwise, the willSendRequest could trigger events which will
        cancel the connection, and we access ivars after this point.
        (-[WebCoreSynchronousLoader connection:willSendRequest:redirectResponse:]): retain and release
        in the right order.

2007-08-04  Adam Roben  <aroben@apple.com>

        Another workaround for <rdar://problem/5386894>

        Reviewed by Sam.

        This fixed ~150 failing tests.

        * platform/network/cf/ResourceResponseCFNet.cpp:
        (WebCore::ResourceResponse::doUpdateResourceResponse): Hardcode the
        MIME type for .svg files as well.

2007-08-04  Adam Roben  <aroben@apple.com>

        Workaround for <rdar://problem/5386894> CFURLResponseGetMIMEType returns "text/html" for local .xhtml and .xml files

        Reviewed by Sam.

        This fixes ~350 failing tests.

        * platform/network/cf/ResourceResponseCFNet.cpp:
        (WebCore::ResourceResponse::doUpdateResourceResponse): Use a workaround
        identical to the one in ResourceResponseMac.mm, but include .xml files
        as well.

2007-08-04  David Kilzer  <ddkilzer@webkit.org>

        Reviewed by Oliver.

        - fix for http://bugs.webkit.org/show_bug.cgi?id=14882
          <rdar://problem/5386550> REGRESSION (r24866): text/plain documents are always downloaded

        The supportedNonImageMimeTypes list is used to determine which MIME types may be viewed
        within the web browser (e.g., plug-ins add their own MIME types to the list during
        initialization), so we must add "text/plain" and "text/" back to the list.  Since
        this change would then break DOMImplementation::isTextMIMEType(), that method was reverted
        to its original form and MIMETypeRegistry::shouldTreatAsText() was removed.

        * dom/DOMImplementation.cpp:
        (WebCore::DOMImplementation::isTextMIMEType): Revert to previous version.
        * platform/MIMETypeRegistry.cpp:
        (WebCore::initialiseSupportedNonImageMimeTypes): Added back "text/plain" and "text/" to the list.
        (WebCore::MIMETypeRegistry::shouldTreatAsText): Removed.
        * platform/MIMETypeRegistry.h:

2007-08-03  Brady Eidson  <beidson@apple.com>

        Reviewed by Oliver

        Fix for http://bugs.webkit.org/show_bug.cgi?id=14824 and <rdar://problem/5372989>

        Two issues - 
        1 - The WebCore MIMEType registry was designed assuming the list of types would never change
            That is false, as WebKit has API and SPI calls which directly mutate the MIMETypeRegistry
        2 - DOMImplementation didn't consult the registry for any MIMEType that started with "text/", 
            instead maintaining it's own hard coded rules

        * dom/DOMImplementation.cpp:
        (WebCore::DOMImplementation::isTextMIMEType): For now, call through to the MIMETypeRegistry
          until we decided a different fate for this function

        * platform/MIMETypeRegistry.cpp:
        (WebCore::initialiseSupportedNonImageMimeTypes):  "SupportedNonImageMIMETypes" is really a misnomer for 
          "MIMETypes we should show as HTML" but that line has slowly been blurred since Tiger.  In an attempt
          to start to unblur it, remove "text/" and "text/plain"
        (WebCore::MIMETypeRegistry::shouldTreatAsText):  The decision is very close to the old DOMImplementation 
          method, except we don't automatically hand off "text/" types as true if they are in the set of supported
          MIMETypes
        (WebCore::MIMETypeRegistry::getSupportedImageMIMETypes): Non-const (can be changed!)
        (WebCore::MIMETypeRegistry::getSupportedImageResourceMIMETypes): Non-const (can be changed!)
        (WebCore::MIMETypeRegistry::getSupportedNonImageMIMETypes): Non-const (can be changed!)
        * platform/MIMETypeRegistry.h:

2007-08-03  Adele Peterson  <adele@apple.com>

        Reviewed by Adam.

        Fix for <rdar://problem/5345862> CrashTracer: [USER] 4 crashes in Safari at com.apple.WebCore: WebCore::Frame::isContentEditable const + 10

        Couldn't reproduce the problem, but a nil check for the frame should fix this.

        * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::adjustRenderStyle):

2007-08-03  Anders Carlsson  <andersca@apple.com>

        Reviewed by Oliver.

        <rdar://problem/5383286>
        XMLHTTPRequest does not return 401 when user cancels authentication dialog (affects .Mac)
        
        * loader/ResourceLoader.h:
        Make receivedCancellation virtual.
        
        * loader/SubresourceLoader.cpp:
        (WebCore::SubresourceLoader::receivedCancellation):
        Call SubresourceLoaderClient::receivedCancellation.
        
        * xml/XMLHttpRequest.cpp:
        (WebCore::XMLHttpRequest::receivedCancellation):
        Save the failure response.

2007-08-03  Anders Carlsson  <andersca@apple.com>

        Reviewed by Geoff.

        <rdar://problem/5374393> 
        Image change on disk not noticed by WebView; -[WebCache setDisabled:] used to cause a reload every time
        
        This is essentially a better fix for the crash in <rdar://problem/5362783>.
        
        * loader/DocLoader.cpp:
        (WebCore::DocLoader::requestResource):
        If the resource already exists in the m_docResources map, remove it and disassociate it from the doc loader.

2007-08-03  Oliver Hunt  <oliver@apple.com>

        Reviewed by Geoff.

        <rdar://problem/5375190> Mail crashed in WebCore::CachedImage::imageSize() const when viewing a particular message

        Fix the uncached load path to confirm that the type of resource being 
        returned actually matches the type that was requested.

        Also make sure we never create a resource in the Cache for invalid urls.

        * loader/Cache.cpp:
        (WebCore::Cache::requestResource):
        * loader/DocLoader.cpp:
        (WebCore::DocLoader::requestResource):

2007-08-03  Mitz Pettel  <mitz@webkit.org>

        Reviewed by Adele.

        - fix http://bugs.webkit.org/show_bug.cgi?id=14879
          REGRESSION: First item in select (pop-up menu) is displayed even if another item was selected via JavaScript

        Test: fast/forms/menulist-deselect-update.html

        * html/HTMLOptionElement.cpp:
        (WebCore::HTMLOptionElement::setSelected): Reordered to allow setSelectedIndex() to call setChanged().

2007-08-03  Anders Carlsson  <andersca@apple.com>

        Reviewed by Darin.

        <rdar://problem/5286444>
        http://bugs.webkit.org/show_bug.cgi?id=14269
        REGRESSION: Gmail links stop working after computer sleep
        
        Add a PowerNotifier object that takes care of resetting and firing the shared timer when coming
        back from sleep.
        
        * platform/mac/SharedTimerMac.cpp:
        (-[PowerNotifier init]):
        (-[PowerNotifier didWake:]):
        (WebCore::setSharedTimerFireTime):

2007-08-04  Mark Rowe  <mrowe@apple.com>

        Windows build fix.

        * rendering/RenderTextControl.cpp: Don't use the same name for two arguments.

2007-08-03  Mitz Pettel  <mitz@webkit.org>

        Reviewed by Darin.

        - fix http://bugs.webkit.org/show_bug.cgi?id=14653
          REGRESSION (r23994): No caret is drawn after clicking a search field's placeholder text
          <rdar://problem/5383841>

        Test: fast/forms/search-click-in-placeholder.html

        Defined a subclass of RenderBlock that never hit-tests children for use in
        text controls. This avoids returning placeholder text as the hit node.
        Since text controls cannot contain inline elements, there is no harm in
        doing that unconditionally, and not just in the case that the field is
        showing placeholder text.

        * rendering/RenderTextControl.cpp:
        (WebCore::RenderTextControlInnerBlock::RenderTextControlInnerBlock):
        (WebCore::RenderTextControlInnerBlock::~RenderTextControlInnerBlock):
        (WebCore::RenderTextControlInnerBlock::nodeAtPoint):
        (WebCore::RenderTextControl::createSubtreeIfNeeded):

2007-08-02  Oliver Hunt  <oliver@apple.com>

        Reviewed by Geoff

        Fix for <rdar://problem/5369332> Xcode crashes while selecting a hyperlink within a AppleScript dictionary (WebCore::Font::drawGlyphBuffer)

        There were many places where we were not correctly retaining/releasing the
        NSFont object stored in the C++ PlatformFontData object, this resulted in
        the GC incorrectly collecting the NSFont.

        This patch fixes the problem by prevent direct modification of the PlatformFontData
        font pointer, allowing us to enforce correct CFRetain/Release behaviour.

        * platform/FontData.h:
        (WebCore::FontData::getNSFont):
        * platform/mac/FontCacheMac.mm:
        (WebCore::FontCache::getFontDataForCharacters):
        (WebCore::FontCache::createFontPlatformData):
        * platform/mac/FontDataMac.mm:
        (WebCore::initFontData):
        (WebCore::FontData::platformInit):
        (WebCore::FontData::platformDestroy):
        (WebCore::FontData::smallCapsFontData):
        (WebCore::FontData::containsCharacters):
        (WebCore::FontData::determinePitch):
        (WebCore::FontData::platformWidthForGlyph):
        (WebCore::FontData::checkShapesArabic):
        * platform/mac/FontMac.mm:
        (WebCore::initializeATSUStyle):
        (WebCore::overrideLayoutOperation):
        (WebCore::Font::drawGlyphs):
        * platform/mac/FontPlatformData.h:
        (WebCore::FontPlatformData::FontPlatformData):
        (WebCore::FontPlatformData::~FontPlatformData):
        (WebCore::FontPlatformData::hash):
        (WebCore::FontPlatformData::operator==):
        (WebCore::FontPlatformData::font):
        (WebCore::FontPlatformData::setFont):

2007-08-03  Antti Koivisto  <antti@apple.com>

        Oops, this change wasn't supposed to be commited.

        * page/mac/WebCoreFrameBridge.mm:
        (-[WebCoreFrameBridge setBaseBackgroundColor:]):

2007-08-02  Antti Koivisto  <antti@apple.com>

        Reviewed by Darin.

        <rdar://problem/5355951>
        plainText() fragments TCMalloc heap badly on large pages
        
        also likely fixes some cases of
        <rdar://problem/5335382>
        CrashTracer: [REGRESSION] 73 crashes in Safari at com.apple.WebCore: WebCore::DeprecatedStringData::increaseUnicodeSize + 52
        
        If you load http://dscoder.com/test.txt with WebKit build with TCMalloc and system malloc you see that
        Safari RPRVT with TCMalloc is 118.8MB
        Safari RPRVT with system malloc is 69.7MB
        
        Difference is almost entirely caused by heap fragmentation from a full document plainText() call (for indexing purposes).
        
        The patch helps in two ways:
        - construct plainText string in pieces to avoid O(n^2) reallocs
        - allocate buffers using system malloc so they can be returned back to OS and don't fragment and grow TCMalloc heap
    
        This shrinks http://dscoder.com/test.txt RPRVT to 79.0MB and makes full document plainText() take 50ms instead of 500ms.
        The benefits are not limited to extreme cases, web pages above ~200kB can show substantial improvement in RPRVT.

        * editing/TextIterator.cpp:
        (WebCore::plainTextToMallocAllocatedBuffer):
        (WebCore::plainText):
        * editing/TextIterator.h:
        * page/mac/WebCoreFrameBridge.mm:
        (-[WebCoreFrameBridge selectedString]):
        (-[WebCoreFrameBridge stringForRange:]):

2007-08-02  David Hyatt  <hyatt@apple.com>

        Fix for 5374437, allow comment nodes to be the child of a document.
        Refine the check to always make a root element to check documentElement()
        rather than firstChild(), since a comment node could be present as the
        firstChild() now.

        Reviewed by Tim Hatcher

        * html/HTMLDocument.cpp:
        (WebCore::HTMLDocument::childAllowed):
        * html/HTMLParser.cpp:
        (WebCore::HTMLParser::finished):

2007-08-02  Antti Koivisto  <antti@apple.com>

        Reviewed by Darin.
        
        <rdar://problem/5228138>
        REGRESSION(Leopard): test failures: tests that test Georgian numbering

        Fix to Georgian number tables to get CSS2.1 test results right. Font has relevant characters now 
        which revealed that results were actually wrong. 

        * rendering/RenderListMarker.cpp:
        (WebCore::toGeorgian):

2007-08-02  Ada Chan  <adachan@apple.com>

        Reviewed by Steve.

        <rdar://problem/5079175> Added parameters headerHeight and footerHeight to 
        computePageRectsForFrame() so we can account for the header and footer when
        calculating page heights for this frame.

        * bridge/win/FrameWin.cpp:
        (WebCore::computePageRectsForFrame):
        * bridge/win/FrameWin.h:

2007-08-02  Alice Liu  <alice.liu@apple.com>

        Reviewed by Kevin McCullough.

        fixed <rdar://problem/5310312> REGRESSION: javascript is mis-escaped at http://labs.zarate.org/passwd causing bookmarklet to break
        
        * WebCore.exp:
        expose some calls for WebKit to call. 
        * manual-tests/JavaScript-bookmarklets.html: Added.

2007-08-01  Adam Treat  <treat@kde.org>

        Reviewed by George Staikos.

        Add an interface to manage global history for clients

        * WebCore.pro:
        * platform/qt/TemporaryLinkStubs.cpp:

2007-08-01  Adam Treat  <treat@kde.org>

        Reviewed by George Staikos.

        Do not call update or paint from inside a paint event.

        * platform/qt/ScrollViewQt.cpp:
        (WebCore::ScrollView::updateContents):
        * platform/qt/WidgetQt.cpp:
        (WebCore::Widget::invalidateRect):

2007-08-01  Timothy Hatcher  <timothy@apple.com>

        Reviewed by Justin.

        <rdar://problem/5376156> Mail crash in DeleteButtonController::hide() when dropping selected image on DIV's border

        Add the container element back so the selection can not touch the deletion UI nodes. The container
        has style to prevent user selection, user drag and user modification.

        * editing/DeleteButtonController.cpp:
        (WebCore::DeleteButtonController::show): Make the container node, and append the button and outline elements.
        (WebCore::DeleteButtonController::hide): Remove the container elements and null out the other nodes.
        * editing/DeleteButtonController.h:

2007-08-01  Steve Falkenburg  <sfalken@apple.com>

        Build mod: Fix sln to match configs in vcproj.
        
        Reviewed by Adam.

        * WebCore.vcproj/WebCore.make:

2007-07-31  David Harrison  <harrison@apple.com>

        Reviewed by Justin.

        <rdar://problem/5362659> CrashTracer: [USER] 11 crashes in Mail at WebCore::InsertLineBreakCommand::doApply()

        The problem was that deleting with the X control leaves the selection inside the fragment that was deleted.

        * editing/DeleteButtonController.cpp:
        (WebCore::DeleteButtonController::deleteTarget):
        Because the deletion UI only appears when the selection is entirely
        within the target, we unconditionally update the selection to be
        a caret where the target had been.

2007-07-31  Adele Peterson  <adele@apple.com>

        Reviewed by Hyatt.

         Fix for <rdar://problem/5339395> REGRESSION:http://sudokucraving.com does not render grid correctly

        * rendering/RenderTextControl.h: (WebCore::RenderTextControl::hasControlClip): Clip for search fields.
        * rendering/RenderTextControl.cpp:
        (WebCore::RenderTextControl::controlClipRect): Added a control clip so the search field's cancel button and magnifier glass
         never draw outside the control's bounds.
        (WebCore::RenderTextControl::calcPrefWidths): Only include the inner box's padding when calculating the min/max width without using calcContentBoxWidth.
         Our old behavior was causing that inner padding to get counted twice.  Also, no need to add in the border
         for an inner box that can't be controlled from outside this class.
        * rendering/RenderMenuList.cpp: (WebCore::RenderMenuList::calcPrefWidths): ditto.

2007-07-31  Anders Carlsson  <andersca@apple.com>

        Reviewed by Geoff.

        Speculative fix for <rdar://problem/5359695> 
        REGRESSION (Tiger Beta): Multiple crashes in WebCore::Widget::getView() const + 6
                
        * page/EventHandler.cpp:
        (WebCore::EventHandler::updateDragAndDrop):
        Null check the frame view.

2007-07-31  Timothy Hatcher  <timothy@apple.com>

        Reviewed by Oliver and Beth.

        <rdar://problem/5211271> ADOBE Leopard 9A410: At the first Launching InDesign after deactivate, EULA page gets blanked.

        Rename needsAcrobatFrameReloadingQuirk to needsAdobeFrameReloadingQuirk, since this now applies to more Adobe applications.

        * WebCore.exp:
        * page/Settings.cpp:
        (WebCore::Settings::Settings):
        (WebCore::Settings::setNeedsAdobeFrameReloadingQuirk):
        * page/Settings.h:
        (WebCore::Settings::needsAcrobatFrameReloadingQuirk):

2007-07-31  Matt Perry  <mpComplete@gmail.com>

        Reviewed by Brady and Darin, tweaked by Brady, landed by Brady

        Fix for http://bugs.webkit.org/show_bug.cgi?id=14757 and <rdar://problem/5364692>
        HTMLTokenizer::processingData implementation is incorrect

        * html/HTMLTokenizer.cpp:
        (WebCore::HTMLTokenizer::processingData): Made it also return true if the HTMLTokenizer was inside the write() call.
        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::FrameLoader):
        (WebCore::FrameLoader::checkLoadCompleteTimerFired):
        (WebCore::FrameLoader::scheduleCheckLoadComplete):
        (WebCore::FrameLoader::stopForUserCancel): Changed a call to checkLoadComplete to be asynchronous, since
        stopForUserCancel can be called while parsing.
        * loader/FrameLoader.h:

2007-07-31  Anders Carlsson  <andersca@apple.com>

        Reviewed by Geoff.

        <rdar://problem/5371582>
        REGRESSION: PLT .5% slower due to r24451 (copying HTMLCollection objects)
        
        Make the hash maps store CollectionInfo pointers to reduce amount of copying when
        inserting/rehashing etc.
        
        * dom/Document.cpp:
        (WebCore::Document::~Document):
        (WebCore::Document::nameCollectionInfo):
        * dom/Document.h:

2007-07-31  Sam Weinig  <sam@webkit.org>

        Reviewed by Mitz.

        Fix for http://bugs.webkit.org/show_bug.cgi?id=14825
        Non-integer hsl() colours are ignored

        * css/CSSParser.cpp:
        (WebCore::CSSParser::parseHSLParameters): Parse hue as a Number,
        not an Integer. 

2007-07-30  Justin Garcia  <justin.garcia@apple.com>

        Reviewed by Darin.

        <rdar://problem/5369009> Crash due to infinite recursion in moveParagraphs on delete
        
        After the delete, we moved content into the previous block, and a style
        rule turned a style span in the moved content into a block, throwing
        moveParagraphs into infinite recursion, as it continually tried and failed
        to get the style span into the same paragraph as the content just before it.
        
        Added a method to ReplaceSelectionCommand to keep inserted style spans 
        from turning into blocks because of style rules.  Will add code to prevent
        other kinds of content from changing appearance because of style rules,
        post-Leopard (5371536). Also added a bool to ReplaceSelectionCommand's 
        constructor to guard against infinite recursion.

        * editing/CompositeEditCommand.cpp:
        (WebCore::CompositeEditCommand::moveParagraphs):
        * editing/JSEditor.cpp:
        * editing/ReplaceSelectionCommand.cpp:
        (WebCore::ReplaceSelectionCommand::ReplaceSelectionCommand):
        (WebCore::ReplaceSelectionCommand::negateStyleRulesThatEffectAppearance):
        (WebCore::ReplaceSelectionCommand::doApply):
        * editing/ReplaceSelectionCommand.h:

2007-07-30  Anders Carlsson  <andersca@apple.com>

        Reviewed by Brady.

        <rdar://problem/5371515>
        BitmapImage::getTIFFRepresentation() bug results in favicons not working at many sites

        Don't bail out if a single frame is invalid.
        
        * platform/graphics/mac/ImageMac.mm:
        (WebCore::BitmapImage::getTIFFRepresentation):

2007-07-30  Adele Peterson  <adele@apple.com>

        Reviewed by Darin.

        Fix for <rdar://problem/5274937> Safari 3 breaks Missing Sync's WebKit code by crashing

        * loader/MainResourceLoader.cpp: (WebCore::MainResourceLoader::continueAfterContentPolicy): Nil check for the FrameLoader.

2007-07-30  Anders Carlsson  <andersca@apple.com>

        Reviewed by Darin.

        <rdar://problem/5370710> 
        REGRESSION: After switching from Bookmark view, the Find Banner won't appear while displaying a PDF file

        Add a hasHTMLView to FrameLoaderClient. This is only useful for clients who can show different views for different
        MIME types and URL schemes.
        
        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::transitionToCommitted):
        Call delegate methods here if the current view is not a HTML view.
        
        * loader/FrameLoaderClient.h:
        (WebCore::FrameLoaderClient::hasHTMLView):

2007-07-30  Sam Weinig  <sam@webkit.org>

        Reviewed by Maciej.

        Fix for <rdar://problem/5363896>
        REGRESSION: Setting document.domain does not override port-based cross-frame security checks -- breaks SAP NetWeaver

        Updates the results for:
            http/tests/security/cross-frame-access-port-explicit-domain.html
            http/tests/security/cross-frame-access-protocol-explicit-domain.html

        * bindings/js/kjs_window.cpp:
        (KJS::createWindow): Use the new setDomainInternal method.
        (KJS::Window::isSafeScript): Don't set check the port or protocol 
        if both documents have explicitly set document.domain in the DOM
        and the those domains are equal.
        * dom/Document.cpp:
        (WebCore::Document::Document):
        (WebCore::Document::setDomain): Remove force parameter and change 
        all calls that relied on it use the new setDomainInternal method
        which does the same thing.
        (WebCore::Document::setDomainInternal): 
        * dom/Document.h: Add new m_domainWasSetInDOM variable and accessor.
        (WebCore::Document::domainWasSetInDOM):
        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::checkCallImplicitClose): Use the new setDomainInternal method. 

2007-07-30  Justin Garcia  <justin.garcia@apple.com>

        Reviewed by Tristan.
        
        <rdar://problem/5098931> Attachments are lost when they are moved into a ToDo after a delete
        
        Added an editor client method for asking whether or not it is
        OK to merge content after a delete.

        * bridge/EditorClient.h:
        * editing/DeleteSelectionCommand.cpp:
        (WebCore::DeleteSelectionCommand::mergeParagraphs): Ask if the 
        merge is allowed.
        * platform/gdk/EditorClientGdk.cpp: 
        (WebCore::EditorClientGdk::shouldMoveRangeAfterDelete): Added a method stub.
        * platform/gdk/EditorClientGdk.h:
        * platform/graphics/svg/SVGImageEmptyClients.h: 
        (WebCore::SVGEmptyEditorClient::shouldMoveRangeAfterDelete): Ditto.

2007-07-30  Alexey Proskuryakov  <ap@webkit.org>

        Reviewed by Anders.

        <rdar://problem/5352526>
        http://bugs.webkit.org/show_bug.cgi?id=14704
        REGRESSION: sync XMLHttpRequest.send() raises an exception for failed authentication

        Test: http/tests/xmlhttprequest/failed-auth.html

        * platform/network/mac/ResourceHandleMac.mm:
        (WebCore::ResourceHandle::loadResourceSynchronously): Make the fake response better match the real one
        in case of failed authentication. Unfortunately, NSURLConnection doesn't give us the real response.

        * xml/XMLHttpRequest.cpp:
        (WebCore::XMLHttpRequest::send): If the response has an HTTP code in it, then the error wasn't
        a network one, and an exception shouldn't be raised.

2007-07-30  Anders Carlsson  <andersca@apple.com>

        Reviewed by Darin.

        <rdar://problem/4942372> REGRESSION: Anchor links in Mail don't work anymore
        
        Make it possible for KURL to handle addig fragments to non-hierarchical URLs
        such as mailto: and cid:.
    
        * platform/KURL.cpp:
        (WebCore::KURL::init):
        If the base URL is not hierarchical but the relative URL is a fragment, then 
        allow parsing it.
        
        (WebCore::KURL::parse):
        If the URL is not hierarchical, set the fragment start and end positions correctly.

2007-07-30  Simon Hausmann  <hausmann@kde.org>

        Reviewed by Lars.

        On Windows make sure the dll also ends up in $$OUTPUT_DIR/bin, so that QtLauncher can find it.

        * WebCore.pro:

2007-07-30  Simon Hausmann  <hausmann@kde.org>

        Reviewed by Lars.

        Removed the __BUILDING_QT ifdef in JSStringRef.h and changed UChar for the Qt build to use wchar_t on Windows.

        * platform/TextEncoding.cpp:
        (WebCore::TextEncoding::encode):

2007-07-30  Simon Hausmann  <hausmann@kde.org>

        Reviewed by Lars.

        Don't link against libxml/libxslt unless we really need it.

        * WebCore.pro:

2007-07-29  Tristan O'Tierney  <tristan@apple.com>

        Reviewed by Oliver Hunt.

        <rdar://problem/5369282> REGRESSION: DOMHTMLInput throwing exception due to missing _isEdited method

        * bindings/objc/DOMHTML.mm:
        (-[DOMHTMLInputElement _isEdited]):
        (-[DOMHTMLTextAreaElement _isEdited]):
        * bindings/objc/DOMPrivate.h:
        Renamed _isUserEdited to _isEdited.

2007-07-29  Adam Treat  <treat@kde.org>

        Reviewed by George Staikos.

        Correctly set the update rect for the scrollbars when they are invalidated.
        Do not paint entire page for each scroll delta.  Cache the dirty regions
        when webkit calls ScrollView::updateContents as webkit expects the paint
        routine to use the dirty regions bounding rect.

        These changes greatly reduce the cpu load as we are no longer painting the
        entire page for each 1px scroll :P

        * platform/qt/ScrollViewQt.cpp:
        (WebCore::ScrollView::ScrollViewPrivate::scrollBackingStore):
        (WebCore::ScrollView::updateContents):
        (WebCore::ScrollView::paint):
        * platform/qt/WidgetQt.cpp:
        (WebCore::Widget::invalidateRect):

2007-07-29  Adele Peterson  <adele@apple.com>

        Reviewed by John.

        WebCore part of fix for <rdar://problem/5102522> REGRESSION: Can't tab to webview that doesn't have editable content (affects Safari, preview pane in Mail)

        * WebCore.exp:
        * page/FocusController.cpp:
        (WebCore::FocusController::setInitialFocus): Added.
        (WebCore::FocusController::advanceFocus): Don't give the focus back to the chrome if this is the initial focus.
        * page/FocusController.h:

2007-07-29  Adam Treat  <treat@kde.org>

        Reviewed by Alexey Proskuryakov.

        WebCore::Widget::setParent should be virtual.
        It is reimplemented in ScrollViewQt for instance.

        * platform/Widget.h:

2007-07-29  Alp Toker  <alp.toker@collabora.co.uk>

        Reviewed by bdash.

        http://bugs.webkit.org/show_bug.cgi?id=14711 (revisited)
        RenderThemeGdk's buttons are state-agnostic (pressed, hovered)

        Generalize shadow state into a function.
        use a GtkHBox to work around a theme bug (thanks to Nigel Tao).

        * platform/gdk/RenderThemeGdk.cpp:
        (WebCore::RenderThemeGdk::determineShadow):
        (WebCore::RenderThemeGdk::paintCheckbox):
        (WebCore::RenderThemeGdk::paintRadio):
        (WebCore::RenderThemeGdk::paintButton):
        (WebCore::RenderThemeGdk::gtkWindowContainer):
        * platform/gdk/RenderThemeGdk.h:

2007-07-27  Adele Peterson  <adele@apple.com>

        Reviewed by Darin. 

        Temporary fix for Windows to prevent crashing on all frame pages.  Darin
        is working on a more permanent fix.

        * loader/FrameLoader.cpp:

2007-07-27  Adam Treat  <treat@kde.org>

        Reviewed by David Hyatt.

        Fix crash when using QtWebKit canvas support.

        * ChangeLog:
        * html/HTMLCanvasElement.cpp:
        (WebCore::HTMLCanvasElement::reset):

2007-07-27  Darin Adler  <darin@apple.com>

        * rendering/RenderLayer.cpp: Rolled out accidentally-checked-in code.

2007-07-27  Darin Adler  <darin@apple.com>

        Reviewed by John Sullivan.

        - fix <rdar://problem/5261393> In Mail the plain text alternatives to messages with attachments show weird little OBJ thingies

        The "weird little thingies" are U+FFFC characters. It's good to render them as zero-width, the way we do
        with control characters -- helps Mail and doesn't hurt web browsing.

        Test: fast/text/zero-width-characters.html

        * platform/CharacterNames.h: Add names for leftToRightMark, rightToLeftMark, and objectReplacementCharacter.
        * platform/GlyphPageTreeNode.cpp: (WebCore::GlyphPageTreeNode::initializePage): Give objectReplacementCharacter
        zero width in the same way we do it for the various other characters.

2007-07-27  Lars Knoll <lars@trolltech.com>

        Reviewed by Zack

        Enable XSLT support for the gtk port.

        * WebCore.pro:

2007-07-27  Zack Rusin  <zack@kde.org>

        Reviewed by Zack and Lars.

        Premature end after finishing parsing is a fatal error.

        * dom/XMLTokenizer.cpp:
        (WebCore::XMLTokenizer::end):

2007-07-27  Lars Knoll  <lars@trolltech.com>

        Reviewed by Zack and Lars.

        Simplify conversions that go from a QStringRef to a WebCore::String to not use a temporary QString.

        * dom/XMLTokenizer.cpp:
        (WebCore::):

2007-07-27  Zack Rusin  <zack@kde.org>

        Reviewed by Zack and Lars.

        Fix entity handling in the main document content (attributes still broken)

        * dom/XMLTokenizer.cpp:
        (WebCore::):

2007-07-27  Lars Knoll  <lars@trolltech.com>

        Reviewed by Zack and Lars.

        Correctly convert a null QString into a null WebCore::String. Add a String(const QStringRef&) constructor so that we can avoid converting QStringRef via QString to WebCore::String.

        * dom/XMLTokenizer.cpp:
        (WebCore::):
        * platform/PlatformString.h:
        * platform/qt/StringQt.cpp:
        (WebCore::String::String):

2007-07-27  Zack Rusin  <zack@kde.org>

        Reviewed by Zack and Lars.

        Parse version and encoding of the xml document.

        * dom/XMLTokenizer.cpp:
        (WebCore::XMLTokenizer::write):

2007-07-27  Zack Rusin  <zack@kde.org>

        Reviewed by Zack and Lars.

        Correctly or semi-correctly parse the public and system id.

        Patch from Lars.

        * dom/XMLTokenizer.cpp:
        (WebCore::):

2007-07-27  Zack Rusin  <zack@kde.org>

        Reviewed by Zack and Lars.

        Fix uri parsing for attributes.

        * dom/XMLTokenizer.cpp:
        (WebCore::):

2007-07-27  Zack Rusin  <zack@kde.org>

        Reviewed by Zack and Lars.

        Fixing qualified name parsing - from Lars.

        * dom/XMLTokenizer.cpp:
        (WebCore::XMLTokenizer::insertErrorMessageBlock):
        (WebCore::):

2007-07-27  Zack Rusin  <zack@kde.org>

        Reviewed by Zack and Lars.

        Parse dtd's

        * dom/XMLTokenizer.cpp:
        (WebCore::XMLTokenizer::resumeParsing):
        (WebCore::):
        * dom/XMLTokenizer.h:

2007-07-27  Zack Rusin  <zack@kde.org>

        Reviewed by Zack and Lars.

        Implement error handling.

        Add our copyrights

        * dom/XMLTokenizer.cpp:
        (WebCore::XMLTokenizer::handleError):
        (WebCore::XMLTokenizer::end):
        (WebCore::):
        * dom/XMLTokenizer.h:

2007-07-27  Zack Rusin  <zack@kde.org>

        Reviewed by Zack and Lars.

        Making the stylesheets work (plus everything else basically)

        * dom/XMLTokenizer.cpp:
        (WebCore::XMLTokenizer::write):
        (WebCore::XMLTokenizer::insertErrorMessageBlock):
        (WebCore::):
        * dom/XMLTokenizer.h:

2007-07-27  Zack Rusin  <zack@kde.org>

        Reviewed by Zack and Lars.

        Remove the libxml dependency when not compiling with XSLT.

        Just ifdefing, displaying xml doesn't work.

        * WebCore.pro:
        * dom/XMLTokenizer.cpp:
        (WebCore::XMLTokenizer::XMLTokenizer):
        (WebCore::XMLTokenizer::write):
        (WebCore::XMLTokenizer::startElementNs):
        (WebCore::XMLTokenizer::enterText):
        (WebCore::XMLTokenizer::exitText):
        (WebCore::XMLTokenizer::initializeParserContext):
        (WebCore::XMLTokenizer::end):
        (WebCore::XMLTokenizer::lineNumber):
        (WebCore::XMLTokenizer::columnNumber):
        (WebCore::XMLTokenizer::stopParsing):
        (WebCore::XMLTokenizer::resumeParsing):
        (WebCore::):
        * dom/XMLTokenizer.h:

2007-07-27  Simon Hausmann  <hausmann@kde.org>

        Reviewed by Zack.

        Work around bug in the moc when used as preprocessor for generating the bindings. -DFOO=1 is needed instead of -DFOO
        to make the <hash>if FOO conditional match.

        * WebCore.pro:

2007-07-27  Patrick Hanna  <phanna@email.unc.edu>

        Reviewed by Darin Adler.

        Change PluginBase::refresh to be static and update PluginsFunc::callAsFunction accordingly. Now we no longer
        allocate an instance of a JSObject subclass on the stack which could lead to a crash during garbage collection.

        * bindings/js/kjs_navigator.cpp:
        (KJS::PluginsFunc::callAsFunction):

2007-07-27  Simon Hausmann  <hausmann@kde.org>

        Done with and reviewed by Lars and Zack.

        Fix snprintf hack for the Qt/Windows build with mingw-gcc. MingW has snprintf, so we don't need this helper function.

        * page/FrameTree.cpp:
        * platform/DeprecatedString.cpp:
        (WebCore::DeprecatedString::format):
        * platform/String.cpp:
        (WebCore::String::format):

2007-07-27  Simon Hausmann  <hausmann@kde.org>

        Done with and reviewed by Lars and Zack.

        Make the DocTypeStrings.cpp generation work with MingW. Cleaned it up to be a regular extra compiler at the same time.

        * WebCore.pro:

2007-07-27  Simon Hausmann  <hausmann@kde.org>

        Done with and reviewed by Lars and Zack.

        MingW build fixes: Do the "OBJECTS_TRAILING_SLASH" trick not only for win32-msvc but for all win32 mkspecs. Added LIB/INCLUDE hack from Qt to make us pick up 3rdparty libraries such as libxml from these environment variables.

        * WebCore.pro:

2007-07-27  Simon Hausmann  <hausmann@kde.org>

        Done with and reviewed by Lars and Zack.

        Use $(MOVE) instead of mv to eliminated the shell dependency and replaced the long shell line to call bison and modify the css grammar file with a few lines of portable perl code.

        * WebCore.pro:
        * css/makegrammar.pl: Added.

2007-07-27  Simon Hausmann  <hausmann@kde.org>

        Done with and reviewed by Lars and Zack.

        On make install on Windows copy the dll into the bin dir.

        * WebCore.pro:

2007-07-27  Simon Hausmann  <hausmann@kde.org>

        Done with and reviewed by Lars and Zack.

        Link in libxml and libxslt on Windows.

        * WebCore.pro:

2007-07-27  Simon Hausmann  <hausmann@kde.org>

        Done with and reviewed by Lars and Zack.

        Temporarily disable the ICO support for the Qt build on Windows.

        * WebCore.pro:
        * platform/graphics/qt/ImageDecoderQt.cpp:

2007-07-27  Simon Hausmann  <hausmann@kde.org>

        Done with and reviewed by Lars and Zack.

        Fix evaluation with ActiveState Perl 5.6. Somehow it tried to treat nameEntries as array.

        * bindings/scripts/CodeGeneratorJS.pm:

2007-07-27  Simon Hausmann  <hausmann@kde.org>

        Done with and reviewed by Lars and Zack.

        Fix compilation with MSVC in the Qt build (missing header files).

        * loader/icon/IconDatabaseNone.cpp:
        * platform/graphics/svg/SVGImage.cpp:

2007-07-27  Simon Hausmann  <hausmann@kde.org>

        Done with and reviewed by Lars and Zack.

        Disable the favicon database on Windows for now, to eliminate the sqlite dependency.

        * WebCore.pro:

2007-07-27  Simon Hausmann  <hausmann@kde.org>

        Done with and reviewed by Lars and Zack.

        Added custom preprocessor support to make_names.pl and use the moc for it in the Qt build.

        * WebCore.pro:
        * ksvg2/scripts/make_names.pl:

2007-07-27  Simon Hausmann  <hausmann@kde.org>

        Done with and reviewed by Lars and Zack.

        Disable the batch mode for nmake to work around the clash of Node.c and Node.cpp both mapping to Node.obj

        * WebCore.pro:

2007-07-27  Simon Hausmann  <hausmann@kde.org>

        Done with and reviewed by Lars and Zack.

        Fix compilation under Windows (removed sys/time.h dependency, use Qt instead).

        * platform/qt/SystemTimeQt.cpp:

2007-07-27  Simon Hausmann  <hausmann@kde.org>

        Done with and reviewed by Lars and Zack.

        Fix compilation on Windows.

        * platform/graphics/qt/PathQt.cpp:

2007-07-27  Simon Hausmann  <hausmann@kde.org>

        Done with and reviewed by Lars and Zack.

        Fix generation of ColorData.c on Windows.

        * WebCore.pro:

2007-07-27  Simon Hausmann  <hausmann@kde.org>

        Done with and reviewed by Lars and Zack.

        Fix compilation under Qt/Windows.

        * loader/icon/IconDatabase.cpp:
        (WebCore::IconDatabase::open):

2007-07-27  Simon Hausmann  <hausmann@kde.org>

        Done with and reviewed by Lars and Zack.

        Changed extendedAttributes to be a variable instead of a hash directly. Required to work with ActiveState perl.

        * bindings/scripts/IDLStructure.pm:

2007-07-27  Simon Hausmann  <hausmann@kde.org>

        Done with and reviewed by Lars and Zack.

        Fix header guard generation for CSSGrammar.h under Windows

        * WebCore.pro:

2007-07-27  Simon Hausmann  <hausmann@kde.org>

        Done with and reviewed by Lars and Zack.

        Fix build with moc as preprocessor. Don't rely the preprocessor preserving whitespace at the beginning of lines.

        * bindings/scripts/IDLParser.pm:

2007-07-27  Simon Hausmann  <hausmann@kde.org>

        Done with and reviewed by Lars and Zack.

        Make make-css-file-arrays.pl work on Windows by not calling /usr/bin/gcc as preprocessor for the Qt build.

        * WebCore.pro:
        * css/make-css-file-arrays.pl:

2007-07-27  Simon Hausmann  <hausmann@kde.org>

        Done with and reviewed by Lars and Zack.

        More gperf commandline fixes for Windows.

        * WebCore.pro:

2007-07-27  Simon Hausmann  <hausmann@kde.org>

        Done with and reviewed by Lars and Zack.

        More quoting fixes for perl under Windows.

        * WebCore.pro:

2007-07-27  Simon Hausmann  <hausmann@kde.org>

        Done with and reviewed by Lars and Zack.

        Fix command quoting under Windows

        * WebCore.pro:

2007-07-27  Simon Hausmann  <hausmann@kde.org>

        Done with and reviewed by Lars and Zack.

        Fix cssmakeprops and cssmakevalue scripts to work on Windows without cygwin perl. Avoid inplace substitutions and direct invocation of /bin/sh. Also call gperf with arguments that GnuWin32's gperf understands.

        * ksvg2/scripts/cssmakeprops:
        * ksvg2/scripts/cssmakevalues:

2007-07-27  Simon Hausmann  <hausmann@kde.org>

        Done with and reviewed by Lars and Zack.

        Beautiful hacks to make more of the extra compiler magic work under Windows outside of cygwin.

        * WebCore.pro:

2007-07-27  Simon Hausmann  <hausmann@kde.org>

        Done with and reviewed by Lars and Zack.

        Correctly propagate the custom preprocessor option through the idl parser and the codegenerator.

        * bindings/scripts/CodeGenerator.pm:
        * bindings/scripts/generate-bindings.pl:

2007-07-27  Simon Hausmann  <hausmann@kde.org>

        Done with and reviewed by Lars and Zack.

        When constructing the absolute path when searching for IDL files in the list of search paths don't prepend a slash if $SOURCEROOT as environment variable is not set. In the Qt build we pass absolute search paths already and we don't set SOURCEROOT. Under Unix that gives a double slash for the directory which works fine, under Windows we get /c:\webkit\foo which of course does not work.

        * bindings/scripts/CodeGenerator.pm:

2007-07-27  Simon Hausmann  <hausmann@kde.org>

        Done with and reviewed by Lars and Zack.

        Relax the regular expression that tries to find constant declarations in the IDL source to not require leading whitespace. This makes it work with preprocessors that happen to eliminate leading whitespace.

        * bindings/scripts/IDLParser.pm:

2007-07-27  Simon Hausmann  <hausmann@kde.org>

        Done with and reviewed by Lars and Zack.

        Try to use the moc as preprocessor for the IDL bindings generator

        * WebCore.pro:

2007-07-27  Simon Hausmann  <hausmann@kde.org>

        Done with and reviewed by Lars and Zack.

        Make it possible to specify the preprocessor the bindings generator uses instead of hardcoding /usr/bin/gcc (which is of course no option on Windows). Also try to use a more portable and Windows friendly way of opening the reading pipe to the preprocessor.

        * bindings/scripts/IDLParser.pm:
        * bindings/scripts/generate-bindings.pl:

2007-07-27  Simon Hausmann  <hausmann@kde.org>

        Done with and reviewed by Lars and Zack.

        Don't use stdout redirection for make_names.pl as it doesn't work under Windows perl (outside cygwin).

        * ksvg2/scripts/make_names.pl:

2007-07-27  Simon Hausmann  <hausmann@kde.org>

        Done with and reviewed by Lars and Zack.

        Fix DocTypeStrings.cpp generation to work on Windows with cmd.exe

        * WebCore.pro:

2007-07-27  Simon Hausmann  <hausmann@kde.org>

        Reviewed by Lars.

        Work around aliasing bugs in WebCore by compiling with -fno-strict-aliasing for gcc builds for now.

        * WebCore.pro:

2007-07-27  Simon Hausmann  <hausmann@kde.org>

        Reviewed by Lars.

        Use -Wreturn-type only when compiling with g++

        * WebCore.pro:

2007-07-27  Simon Hausmann  <hausmann@kde.org>

        Reviewed by Zack.

        Don't use pkg-config on Windows for the Qt build

        * WebCore.pro:

2007-07-27  Simon Hausmann  <hausmann@kde.org>

        Reviewed by Zack.

        Fix compilation with MSVC.

        * platform/graphics/qt/ImageDecoderQt.cpp:

2007-07-26  Tristan O'Tierney  <tristan@apple.com>

        Reviewed by Anders Carlsson.

        <rdar://problem/5350019> REGRESSION: Pages on milliyet.com are added to Back list when visited, causing Back button to just reload

        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::continueFragmentScrollAfterNavigationPolicy):
        If the policy action is FrameLoadTypeRedirectLockHistory, don't add the frame load url to the history.

2007-07-26  Anders Carlsson  <andersca@apple.com>

        Reviewed by Geoff.

        Add a FIXME about caching pages with plug-ins that have outstanding NPObjects.
        
        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::canCachePage):

2007-07-26  David Hyatt  <hyatt@apple.com>

        FIx for <rdar://problem/5289721> CrashTracer: [REGRESSION] 2658 crashes in Safari at com.apple.WebCore: WebCore::RenderInline::height const + 16

        Adding a null check for now and an assert.  We don't know how/why this
        bug happens, but hopefully the assert will help people to reproduce.

        Reviewed by kevin

        * rendering/RenderInline.cpp:
        (WebCore::RenderInline::height):

2007-07-26  Anders Carlsson  <andersca@apple.com>

        Reviewed by Oliver.

        <rdar://problem/5362783>
        In Mail, a crash occurs at WTF::fastMalloc() when attempting to create a new HTML message from http://nytimes.com/
        
        If the cache is disabled and there is already a resource with the given URL, return it instead of creating a new one.
        
        * loader/DocLoader.cpp:
        (WebCore::DocLoader::requestResource):

2007-07-26  Adele Peterson  <adele@apple.com>

        Reviewed by Geoff. 

        Build fix.

        * platform/network/cf/ResourceRequest.h:

2007-07-26  Anders Carlsson  <andersca@apple.com>

        Reviewed by John Sullivan.

        <rdar://problem/5349389> 
        Some frame load delegate methods not called when loading a page from the BF cache
        
        These calls were moved to FrameLoader::begin, which is never called for pages loaded
        from the BF cache. This happened in revision 24490.
         
        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::transitionToCommitted):
        Call delegate methods if the load is from the BF cache.

2007-07-26  Kevin McCullough  <kmccullough@apple.com>

        Reviewed by Darin, Geoff and Sam.

        - <rdar://problem/5150461> Resizing the window larger than the screen causes no resize.
        - We now better match the behavior of other browsers.

        * bindings/js/kjs_window.cpp:
        (KJS::constrainToVisible):
        (KJS::WindowFunc::callAsFunction):

2007-07-26  Tristan O'Tierney  <tristan@apple.com>

        Reviewed by Adele Peterson.
        
        <rdar://problem/5359921> WebCore should maintain a dirty flag for confirmation on unsaved changes

        * bindings/objc/DOMHTML.mm:
        (-[DOMHTMLInputElement _isUserEdited]):
        (-[DOMHTMLTextAreaElement _isUserEdited]):
        Renamed _isEdited to _isUserEdited since the functionality is now different
        
        * bindings/objc/DOMPrivate.h:
        Renamed _isEdited to _isUserEdited.
        
        * rendering/RenderTextControl.cpp:
        (WebCore::RenderTextControl::RenderTextControl):
        Defaulted m_userEdited to false
        
        (WebCore::RenderTextControl::updateFromElement):
        Set m_userEdited to false, since the change wasn't triggered first by an edit
        
        (WebCore::RenderTextControl::subtreeHasChanged):
        Set m_userEdited to true, since it has been touched by the user
        
        * rendering/RenderTextControl.h:
        (WebCore::RenderTextControl::isUserEdited):
        (WebCore::RenderTextControl::setUserEdited):
        Added two new methods to set/return the userEdited boolean value.
        
2007-07-26  Geoffrey Garen  <ggaren@apple.com>

        Reviewed by Beth Dakin.

        Fixed NULL-dereference crash seen on buildbot.
        
        No bug filed because this is a part of <rdar://problem/5241167>.

        * history/PageCache.h:
        (WebCore::PageCache::get): NULL-check HistoryItems passed to get()
        and remove(), to match the old semantics of HashMap. For clarity,
        ASSERT that add() is not called with NULL arguments.

2007-07-26  Anders Carlsson  <andersca@apple.com>

        Reviewed by Oliver Hunt.

        <rdar://problem/5361106> Crash in user style sheet when loading webpage

        Null check m_frame.
        
        * dom/Document.cpp:
        (WebCore::Document::stylesheetLoaded):

2007-07-26  Geoffrey Garen  <ggaren@apple.com>

        Used `svn merge -r24646:24645' to revert project changes I accidentally
        checked in.

        * WebCore.xcodeproj/project.pbxproj:

2007-07-26  Geoffrey Garen  <ggaren@apple.com>

        Reviewed by Darin Adler.

        Fixed <rdar://problem/5241167> REGRESSION: PLT 1% slower due to r21793 
        (global page cache cap)
        
        I just measured a .1%-.2% regression in PLT average, but a .4% win in 
        PLT fastest run, so I think this regression is licked.

        Surprisingly, the combination of wtf data structures I originally used 
        for PageCache turned out to be too slow, so I reworked PageCache to use
        a hand-crafted linked list for LRU tracking (instead of ListHashSet), 
        to store its CachedPages in the HistoryItems to which they corresponded 
        (instead of using a HashMap), and to ref/deref HistoryItems manually
        (instead of using RefPtr, which would ref once for every reference in 
        the linked list).

        * history/HistoryItem.h: Added data members for PageCache data. Made
        PageCache a friend so it could access them. Ideally (from an 
        encapsulation perspective), we would store this data an independent 
        structure, but that's just too slow.

        * history/PageCache.cpp: Added a hand-crafted linked list for LRU 
        tracking.
        (WebCore::PageCache::PageCache):
        (WebCore::PageCache::add): Adopt the HistoryItem's ref when it's added.
        (WebCore::PageCache::remove): deref() the Historyitem when it's 
        removed.
        (WebCore::PageCache::prune):
        (WebCore::PageCache::addToLRUList):
        (WebCore::PageCache::removeFromLRUList):

        * history/PageCache.h:
        (WebCore::PageCache::get): Inlined just in case.

2007-07-26  Adam Treat  <treat@kde.org>

        Reviewed by George Staikos.

        Launch the context menu in the right place.

        * platform/qt/ContextMenuQt.cpp:
        (WebCore::ContextMenu::setPlatformDescription):

2007-07-25  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Mark.

        - follow-up to previous change to avoid assertion failures in debug
        
        * xml/XMLHttpRequest.cpp:
        (WebCore::XMLHttpRequest::getResponseText): hold JSLock when needed
        (WebCore::XMLHttpRequest::open): ditto
        (WebCore::XMLHttpRequest::didFinishLoading): ditto
        (WebCore::XMLHttpRequest::didReceiveData): ditto
        * xml/XMLHttpRequest.h:

2007-07-25  Anders Carlsson  <andersca@apple.com>

        Reviewed by Darin.

        <rdar://problem/5327912> 
        iDisk: Web iDisk & main iDisk appear blank
        
        Prepend any remaining text that scripts might have written.
        
        * html/HTMLTokenizer.cpp:
        (WebCore::HTMLTokenizer::scriptExecution):

2007-07-25  Kevin McCullough  <kmccullough@apple.com>

        Reviewed by Tim, Darin, Oliver.

        - <rdar://problem/5329440> REGRESSION: Clicking links with the feed:// protocol in Safari 3 does nothing
        - Check for file:// urls when clicking links, not block all schemes that are treated as local.

        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::load):

2007-07-25  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Darin.

        - fixed <rdar://problem/5300291> Optimize GC to reclaim big, temporary objects (like XMLHttpRequest.responseXML) quickly
        
        With this plus related JavaScriptCore changes, a number of XMLHttpRequest situations that
        result in huge data sets are addressed, including a single huge responseXML on an XMR done
        repeatedly, or accessing responseText repeatedly during loading of a single large XHR.
        
        In addition to the GC changes in JavaScriptCore, I changed responseText to be stored as a
        KJS::UString instead of a WebCore::String so that the JavaScript responseText value can
        share the buffer (indeed multiple intermediate responseTexts can share its buffer).

        
        First of all, here's some manual test cases that will each blow out the process VM without this fix,
        but will settle into decent steady state with.
        
        * manual-tests/memory: Added.
        * manual-tests/memory/MessageUidsAlreadyDownloaded2: Added.
        * manual-tests/memory/string-growth.html: Added.
        * manual-tests/memory/xhr-multiple-requests-responseText.html: Added.
        * manual-tests/memory/xhr-multiple-requests-responseXML.html: Added.
        * manual-tests/memory/xhr-multiple-requests.html: Added.
        * manual-tests/memory/xhr-repeated-string-access.xml: Added.

        And here's the actual code changes:
        
        * WebCore.xcodeproj/project.pbxproj:
        * bindings/js/JSDocumentCustom.cpp:
        (WebCore::toJS): Record extra cost if the document is frameless (counting the nodes
        doesn't make a measurable performance difference here in any case I could find)
        * bindings/js/JSXMLHttpRequest.cpp:
        (KJS::JSXMLHttpRequest::getValueProperty): Adjust for the fact that ressponseText
        is now stored as a UString.
        * bindings/js/kjs_binding.cpp:
        (KJS::jsOwnedStringOrNull): New helper.
        * bindings/js/kjs_binding.h:
        * xml/XMLHttpRequest.cpp:
        (WebCore::XMLHttpRequest::getResponseText): It's a UString!
        (WebCore::XMLHttpRequest::getResponseXML): handle the fact that m_responseText
        is a UString.
        (WebCore::XMLHttpRequest::XMLHttpRequest): ditto.
        (WebCore::XMLHttpRequest::abort): call dropProtection
        (WebCore::XMLHttpRequest::didFinishLoading): call dropProtection
        (WebCore::XMLHttpRequest::dropProtection): after removing our GC protection,
        report extra cost of this XHR's responseText buffer.
        * xml/XMLHttpRequest.h:

2007-07-25  Timothy Hatcher  <timothy@apple.com>

        Reviewed by Brady.

        <rdar://problem/4796657> table deletion outline does not always follow the table size as editing occurs inside

        Change the outline element to position itself automaticlly using the top, left, bottom and right CSS properties.
        This made the container element redundant, so it has been removed. Now the outline element and the delete button
        both get appended to the target element and positioned based on that container element. This removes the need
        to update the width and height when the target contents changed.

        * editing/DeleteButtonController.cpp:
        (WebCore::DeleteButtonController::show): Change the style properties and remove the container element.
        (WebCore::DeleteButtonController::hide): Remove the button and outline from the target element.
        * editing/DeleteButtonController.h: Removed updateOutlineStyle, respondToChangedContents and m_containerElement.
        * editing/Editor.cpp:
        (WebCore::Editor::respondToChangedContents): Remove the call to DeleteButtonController respondToChangedContents.

2007-07-25  Anders Carlsson  <andersca@apple.com>

        Reviewed by Darin.

        <rdar://problem/5344471>
        CrashTracer: [USER] 1 crash in Mail at WebCore::PluginTokenizer::writeRawData(char const*, int)
        
        Make sure to layout so we'll have a renderer. Also null-check the renderer for extra safety.
        
        * loader/PluginDocument.cpp:
        (WebCore::PluginTokenizer::writeRawData):

2007-07-25  Marvin Decker  <marv.decker@gmail.com>

        Reviewed by Maciej, Darin.

        - http://bugs.webkit.org/show_bug.cgi?id=14030

        Add ResourceHandle::setClient to resolve some messiness with handle
        releasing. Clear the client when ResourceLoader is going to release
        the handle to prevent crashes in the case where somebody still holds a
        reference (this doesn't seem to currently happen in practice). Add
        NULL-checking for ResourceHandle implementations using the client.

        * loader/ResourceLoader.cpp:
        (WebCore::ResourceLoader::releaseResources):
        * platform/network/ResourceHandle.cpp:
        (WebCore::ResourceHandle::fireBlockedFailure):
        (WebCore::ResourceHandle::setClient):
        * platform/network/ResourceHandle.h:
        * platform/network/cf/ResourceHandleCFNet.cpp:
        (WebCore::willSendRequest):
        (WebCore::didReceiveResponse):
        (WebCore::didReceiveData):
        (WebCore::didFinishLoading):
        (WebCore::didFail):
        (WebCore::willCacheResponse):
        (WebCore::ResourceHandle::didReceiveAuthenticationChallenge):
        (WebCore::ResourceHandle::receivedCancellation):
        * platform/network/mac/ResourceHandleMac.mm:
        (WebCore::ResourceHandle::didReceiveAuthenticationChallenge):
        (WebCore::ResourceHandle::didCancelAuthenticationChallenge):
        (WebCore::ResourceHandle::receivedCancellation):
        (-[WebCoreResourceHandleAsDelegate connection:willSendRequest:redirectResponse:]):
        (-[WebCoreResourceHandleAsDelegate connection:didReceiveResponse:]):
        (-[WebCoreResourceHandleAsDelegate connection:didReceiveData:lengthReceived:]):
        (-[WebCoreResourceHandleAsDelegate connection:willStopBufferingData:]):
        (-[WebCoreResourceHandleAsDelegate connectionDidFinishLoading:]):
        (-[WebCoreResourceHandleAsDelegate connection:didFailWithError:]):
        (-[WebCoreResourceHandleAsDelegate connection:willCacheResponse:]):

2007-07-25  Maxime Britto  <mbritto@pleyo.com>

        Reviewed by Darin.

        - fix http://bugs.webkit.org/show_bug.cgi?id=11756
          REGRESSION: link targeting a frame in another window does not work
          <rdar://problem/5286420>

        Test: http/tests/navigation/target-frame-from-window.html

        Fix a typo error to really compare the present domain to the domain of the parent of the targeted frame.

        * loader/FrameLoader.cpp: (WebCore::FrameLoader::canTarget):

2007-07-25  Mitz Pettel  <mitz@webkit.org>

        Reviewed by Darin.

        - fix http://bugs.webkit.org/show_bug.cgi?id=14758
          REGRESSION: Repeated text after line break on facebook.com

        Test: fast/text/reset-emptyRun.html

        * platform/BidiResolver.h:
        (WebCore::::deleteRuns): Re-add a line that was removed for no reason at all
        during refactoring in r24485.
        * rendering/bidi.cpp:
        (WebCore::BidiState::deleteRuns): Ditto.

2007-07-24  Oliver Hunt  <oliver@apple.com>

        Reviewed by Adam and Justin.

        <rdar://problem/5141779> WebView editableDOMRangeForPoint: & moveDragCaretToPoint: returns last position in DOMText range

        Remove bridge implementation for editableDOMRangeForPoint: and moveDragCaretToPoint:. 
        Now use cross-platform code Editor::rangeForPoint and DragController::placeDragCaret instead.
        This required lifting local code from DragController.cpp into the shared methods
        Frame::visiblePositionForPoint and Frame::documentAtPoint.

        * WebCore.exp:
        * editing/Editor.cpp:
        (WebCore::Editor::rangeForPoint):
        * editing/Editor.h:
        * page/DragController.cpp:
        (WebCore::DragController::dragEnded):
        (WebCore::DragController::performDrag):
        (WebCore::DragController::dragEnteredOrUpdated):
        (WebCore::DragController::tryDocumentDrag):
        (WebCore::DragController::operationForLoad):
        (WebCore::setSelectionToDragCaret):
        (WebCore::DragController::concludeDrag):
        (WebCore::DragController::placeDragCaret):
        * page/DragController.h:
        * page/Frame.cpp:
        (WebCore::Frame::visiblePositionForPoint):
        (WebCore::Frame::documentAtPoint):
        * page/Frame.h:
        * page/mac/WebCoreFrameBridge.h:
        * page/mac/WebCoreFrameBridge.mm:

2007-07-24  Sam Weinig  <sam@webkit.org>

        Rubber-stamped by Adam Roben.

        Remove unused .strip files.

        * WebCore.xcodeproj/project.pbxproj:

2007-07-24  Adele Peterson  <adele@apple.com>

        Reviewed by Hyatt.

        Fix for <rdar://problem/5308492> Computed width for elements with box-sizing: border-box is not equal to the width set in the CSS

        Test: fast/css/getComputedStyle-border-box.html

        * css/CSSComputedStyleDeclaration.cpp: (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
          For the width and height properties, when you get the value from the renderer, use the renderer's box sizing value to determine the size.

2007-07-24  Anders Carlsson  <andersca@apple.com>

        Reviewed by Kevin Decker.

        <rdar://problem/5355781>
        REGRESSION: reproducible crash in CoreFoundation!CFRunLoopFinished on Flash pages
        
        Null check the loader.
        
        * plugins/win/PluginStreamWin.cpp:
        (WebCore::PluginStreamWin::start):

2007-07-24  Adele Peterson  <adele@apple.com>

        Reviewed by Hyatt and Adam.

        Fix for <rdar://problem/5130590> REGRESSION: style="width:1px" on <select> element no longer hides the element

        Removed hack that forced large padding on popup buttons.  Now we put that padding in the inner block, so that
        the specified width will be honored.

        * rendering/RenderMenuList.cpp:
        (WebCore::RenderMenuList::adjustInnerStyle): Set the padding on the inner block based on the metrics provided by the theme.
        (WebCore::RenderMenuList::controlClipRect): Clip to the intersection of the inner content box and the outer content box.
         This will leave room for the arrows which sit in the inner box padding, and if the inner box ever spills out of the outer box, 
         that will get clipped too.
        (WebCore::RenderMenuList::calcPrefWidths):  Add in the inner box's padding and border to the pref widths.

        * rendering/RenderThemeMac.mm:
        (WebCore::RenderThemeMac::paintMenuList): Only inflate the rect for the shadow if the rect is big enough to fit the whole control.
         Also, on Leopard, the NSCell will draw outside of a small rect, so add a clip for that case.
        (WebCore::RenderThemeMac::paintMenuListButton): Restrict font scale to make sure the arrows will actually fit in the bounds vertically.
         Don't draw the arrows if they won't fit horizontally.  Reset padding.  Since WinIE doesn't honor padding for popups, its not critical to
         support padding at this time.
        (WebCore::RenderThemeMac::adjustMenuListStyle): Don't set the padding here.  Instead, we're going to set the padding on the inner block of the select.
        (WebCore::RenderThemeMac::adjustMenuListButtonStyle): ditto.
        (WebCore::RenderThemeMac::popupInternalPaddingLeft): Added.  Provides internal padding values for RenderMenuList.
        (WebCore::RenderThemeMac::popupInternalPaddingRight): ditto.
        (WebCore::RenderThemeMac::popupInternalPaddingTop): ditto.
        (WebCore::RenderThemeMac::popupInternalPaddingBottom): ditto.
        * rendering/RenderThemeMac.h:

        * rendering/RenderThemeSafari.cpp:  The same changes that were made to RenderThemeMac were made here, with variations for the arrow differences.
          This code should be refactored and shared, but now did not seem like the right time to do that refactoring.
        (WebCore::RenderThemeSafari::paintMenuList):
        (WebCore::RenderThemeSafari::paintMenuListButton):
        (WebCore::RenderThemeSafari::adjustMenuListStyle):
        (WebCore::RenderThemeSafari::popupInternalPaddingLeft):
        (WebCore::RenderThemeSafari::popupInternalPaddingRight):
        (WebCore::RenderThemeSafari::popupInternalPaddingTop):
        (WebCore::RenderThemeSafari::popupInternalPaddingBottom):
        (WebCore::RenderThemeSafari::adjustMenuListButtonStyle):
        * rendering/RenderThemeSafari.h:

        * rendering/RenderTheme.h: Added to provide internal padding values for RenderMenuList.
        (WebCore::RenderTheme::popupInternalPaddingLeft):
        (WebCore::RenderTheme::popupInternalPaddingRight):
        (WebCore::RenderTheme::popupInternalPaddingTop):
        (WebCore::RenderTheme::popupInternalPaddingBottom):

2007-07-24  Lars Knoll  <lars@trolltech.com>

        Reviewed by Adam Roben & David Kilzer.

        replace the makeprop and makevalues shell scripts by equivalent perl versions. This is required to remove the last shell dependency when building QtWebKit on Windows.

        * DerivedSources.make:
        * WebCore.pro:
        * WebCore.xcodeproj/project.pbxproj:
        * css/makeprop: Added.
        * css/makeprop.pl: Removed.
        * css/makevalues: Added.
        * css/makevalues.pl: Removed.

2007-07-24  Beth Dakin  <bdakin@apple.com>

        Reviewed by Darin.

        Fix for http://bugs.webkit.org/show_bug.cgi?id=14714 REGRESSION: 
        ASSERTION FAILED: i < size() in Vector.h:401 on negative -webkit-
        column-width
        - and -
        http://bugs.webkit.org/show_bug.cgi?id=14718 REGRESSION: ASSERTION 
        FAILED: i < size() in Vector.h:401 on zero -webkit-column-count

        * rendering/RenderBlock.cpp:
        (WebCore::RenderBlock::calcColumnWidth): Make 1 the minimum value 
        for column-width and column-count. Since the spec does not address 
        what to do with negative values for these properties, we are 
        patching the rendering code instead of the parser.

2007-07-24  Anders Carlsson  <andersca@apple.com>

        Reviewed by Steve.
        
        <rdar://problem/5355403>
        REGRESSION: 303A2 does not display pdf files with AdobeReader 8.1
        
        Close the file before handing off the file name to the plug-in.
        
        * plugins/win/PluginStreamWin.cpp:
        (WebCore::PluginStreamWin::destroyStream):

2007-07-24  Alp Toker  <alp.toker@collabora.co.uk>

        Reviewed by Adam.

        http://bugs.webkit.org/show_bug.cgi?id=14711
        RenderThemeGdk's buttons are state-agnostic (pressed, hovered)

        Remove unnecessary label from widget instances.
        Render check and radio widgets correctly.
        Determine the widget state and render it appropriately.

        * platform/gdk/RenderThemeGdk.cpp:
        (WebCore::RenderThemeGdk::determineState):
        (WebCore::RenderThemeGdk::paintCheckbox):
        (WebCore::RenderThemeGdk::paintRadio):
        (WebCore::RenderThemeGdk::paintButton):
        (WebCore::RenderThemeGdk::gtkButton):
        (WebCore::RenderThemeGdk::gtkCheckbox):
        (WebCore::RenderThemeGdk::gtkRadioButton):
        * platform/gdk/RenderThemeGdk.h:

2007-07-24  Mark Rowe  <mrowe@apple.com>

        Reviewed by Antti.

        <rdar://problem/5356666> NSMenuItem's seen leaking on buildbot

        * platform/mac/ContextMenuItemMac.mm:
        (WebCore::ContextMenuItem::releasePlatformDescription): Transfer ownership from the RetainPtr's CF-based retain
        count to the Foundation retain count so that callers of releasePlatformDescription can use -[NSObject release]
        to dispose of it in a manner that won't leak under Obj-C GC.
        * platform/mac/ContextMenuMac.mm:
        (WebCore::ContextMenu::appendItem): Release platformItem as we were transferred its ownership by releasePlatformDescription.
        (WebCore::ContextMenu::insertItem): ditto.

2007-07-24  Mitz Pettel  <mitz@webkit.org>

        Reviewed by Darin.

        - fix http://bugs.webkit.org/show_bug.cgi?id=14684
          Hebrew text in Safari chrome is reversed (LTR instead of RTL)

        Test: fast/text/drawBidiText.html

        * WebCore.pro:
        * WebCore.vcproj/WebCore.vcproj:
        * WebCore.xcodeproj/project.pbxproj:
        * WebCoreSources.bkl:
        * manual-tests/chrome-bidi-text.html: Added.
        * manual-tests/resources/chrome-bidi-text-window.html: Added.
        * platform/BidiReorderCharacters.cpp: Removed.
        * platform/BidiReorderCharacters.h: Removed.
        * platform/BidiResolver.h:
        (WebCore::BidiCharacterRun::start): Added accessor method.
        (WebCore::BidiCharacterRun::stop): Ditto.
        (WebCore::BidiCharacterRun::level): Ditto.
        (WebCore::BidiCharacterRun::next): Ditto.
        (WebCore::::appendRun): Added default implementation.
        * platform/TextStyle.h:
        (WebCore::TextStyle::setDirectionalOverride): Added accessor method.
        * platform/graphics/GraphicsContext.cpp:
        (WebCore::TextRunIterator::TextRunIterator): Added. A BidiResolver-
        compliant iterator over the characters in a TextRun.
        (WebCore::TextRunIterator::offset):
        (WebCore::TextRunIterator::increment):
        (WebCore::TextRunIterator::atEnd):
        (WebCore::TextRunIterator::current):
        (WebCore::TextRunIterator::direction):
        (WebCore::TextRunIterator::operator==):
        (WebCore::TextRunIterator::operator!=):
        (WebCore::GraphicsContext::drawBidiText): Added. Applies the Unicode
        Bidi Algorithm to the text and draws the resulting unidirectional runs
        in the right order and with the right directionality.
        * platform/graphics/GraphicsContext.h:
        * platform/win/PopupMenuWin.cpp:
        (WebCore::PopupMenu::paint): Replaced the use of a character buffer
        and BidiReorderCharacters with calling to drawBidiText(). Removed special
        handling of '-webkit-rtl-ordering:visual' because that CSS property is an
        implementation detail of WebCore's visual Hebrew support, and the UA stylesheet
        sets it to 'logical' for this form control. Authors can specify the ordering
        using the 'direction' and 'unicode-bidi' properties.
        * platform/win/WebCoreTextRenderer.cpp:
        (WebCore::isOneLeftToRightRun): Added. Checks if the text consists of
        a single left-to-right run, in which case it requires no bidi processing.
        (WebCore::doDrawTextAtPoint): Changed to call drawBidiText if the text
        is not entirely left-to-right.
        * rendering/RenderFileUploadControl.cpp:
        (WebCore::RenderFileUploadControl::paintObject): Replaced the use of a
        character buffer in BidiReorderCharacters with calling to drawBidiText().
        Removed special handling of '-webkit-rtl-ordering:visual' for the same reason
        stated above.
        * rendering/RenderListBox.cpp:
        (WebCore::RenderListBox::paintItemForeground): Ditto. Also changed the
        run-rounding modes used when drawing to match those used when measuring.

2007-07-23  Oliver Hunt  <oliver@apple.com>

        Reviewed by Steve.

        Windows build fix, remove superfluous !

        * page/EventHandler.cpp:
        (WebCore::EventHandler::keyEvent):

2007-07-23  Adam Roben  <aroben@apple.com>

        Add an assignment operator for BString that takes a BSTR

        Reviewed by Geoff and Oliver.

        * platform/win/BString.cpp:
        (WebCore::BString::operator=):
        * platform/win/BString.h:

2007-07-23  Justin Garcia  <justin.garcia@apple.com>

        Reviewed by Geoff.
        
        <rdar://problem/5354455> Word selection when right-clicking can be confusing (14728)

        * page/EventHandler.cpp:
        (WebCore::EventHandler::sendContextMenuEvent): In non-editable content,
        only do word selection over text.  In editable content, we will continue
        to select images, line breaks and other elements on right-clicks, to match 
        TextEdit.  For now, in editable content, we'll live with the cases where 
        positionForPoint creates selections that aren't underneath the mouse.  These
        aren't regressions because we've always done word selection on right clicks
        in editable content.

2007-07-23  Anders Carlsson  <andersca@apple.com>

        Reviewed by Oliver.

        <rdar://problem/5335354>
        REGRESSION(r21359-r21368): Can't edit inside RTEF editable region
        
        If Document::open is called and there's a pending load that has not yet started,
        that load should be cancelled.
        
        * dom/Document.cpp:
        (WebCore::Document::open):

2007-07-23  Timothy Hatcher  <timothy@apple.com>

        Reviewed by Hyatt.

        <rdar://problem/5242145> REGRESSION: Clicking on symbol in documentation often doesn't scroll to symbol

        A renderer for the anchor wasn't always available at the time parsing finished. So we need
        to bail out of gotoAnchor if stylesheets are pending and remember to call gotoAnchor later
        once all of the pending stylesheets load.

        * dom/Document.cpp:
        (WebCore::Document::Document): Initialize m_gotoAnchorNeededAfterStylesheetsLoad to false.
        (WebCore::Document::stylesheetLoaded): If we have no more pending stylesheets, call gotoAnchor if needed.
        * dom/Document.h:
        (WebCore::Document::gotoAnchorNeededAfterStylesheetsLoad): New method.
        (WebCore::Document::setGotoAnchorNeededAfterStylesheetsLoad): Ditto.
        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::gotoAnchor): Bail early if the document still has pending stylesheets.
        * loader/FrameLoader.h: Make gotoAnchor() public.

2007-07-23  John Sullivan  <sullivan@apple.com>

        Reviewed by Darin
        
        - fixed <rdar://problem/5327887> Printing Mail note (or Safari page) with misspelled word prints red underline

        * rendering/InlineTextBox.cpp:
        (WebCore::InlineTextBox::paintSpellingOrGrammarMarker):
        When printing, bail out without doing any work. Also moved a couple of lines down below another early
        bailout since they were pointless above it.

2007-07-23  Oliver Hunt  <oliver@apple.com>

        Reviewed by Darin.
        
        <rdar://problem/5353577> WebKit key event behaviour needs to better match other browsers keyevent behaviour
        <rdar://problem/5352152> REGRESSION (24399-24479): Pressing Enter in a search field at apple.com no longer starts a search with Korean IM
        <rdar://problem/5352649> WebKit should send keyDown event on autorepeat keyDowns
        http://bugs.webkit.org/show_bug.cgi?id=14690

        Perform Input Method call first so that our behaviour is determined by whether or not 
        the input method has actually handle the event, rather than by making guesses based 
        on the existences of marked text.  This fixes issues with IMs that have side effects
        even on events they do not handle.

        Refactored the code in order to improve clarity given the hoisting required by performing
        the IM call earlier.

        * page/EventHandler.cpp:
        (WebCore::EventHandler::keyEvent):

2007-07-23  Anders Carlsson  <andersca@apple.com>

        Reviewed by Darin.

        <rdar://problem/5045711> 
        http://bugs.webkit.org/show_bug.cgi?id=12938
        Google calendar settings page crashes
        
        Move handling of checked radio buttons to a new class, HTMLFormElement::CheckedRadioButtons. 
        Each <form> element has an instance of this class. For radio buttons without a containing 
        form, the document has an instance of HTMLFormElement::CheckedRadioButtons where the
        state of those radio buttons will be stored.
        be stored.
        
        This also fixes another bug where removing a checked radio button that does not have a
        containing form would not remove the radio button from the checked radio buttons map,
        which could lead to a crash due to a dangling pointer.
        
        * dom/Document.cpp:
        (WebCore::Document::~Document):
        * dom/Document.h:
        (WebCore::Document::checkedRadioButtons):
        * html/HTMLFormElement.cpp:
        (WebCore::HTMLFormElement::registerFormElement):
        (WebCore::HTMLFormElement::removeFormElement):
        (WebCore::HTMLFormElement::CheckedRadioButtons::didCheckButton):
        (WebCore::HTMLFormElement::CheckedRadioButtons::checkedButtonForGroup):
        (WebCore::HTMLFormElement::CheckedRadioButtons::removeButtonIfChecked):
        * html/HTMLFormElement.h:
        (WebCore::HTMLFormElement::checkedRadioButtons):
        * html/HTMLGenericFormElement.cpp:
        (WebCore::HTMLGenericFormElement::insertedIntoTree):
        * html/HTMLInputElement.cpp:
        (WebCore::HTMLInputElement::~HTMLInputElement):
        (WebCore::checkedRadioButtons):
        (WebCore::HTMLInputElement::isKeyboardFocusable):
        (WebCore::HTMLInputElement::setInputType):
        (WebCore::HTMLInputElement::parseMappedAttribute):
        (WebCore::HTMLInputElement::setChecked):
        (WebCore::HTMLInputElement::preDispatchEventHandler):
        (WebCore::HTMLInputElement::willMoveToNewOwnerDocument):
        * manual-tests/remove-form-node-with-radio-buttons-crash.html: Added.

2007-07-23  David Hyatt  <hyatt@apple.com>

        Fix for 5350587, hang in iExploder text 8101.  The code that painted outlines for continuations was buggy
        in that it assumed the chain was always inline-block-inline, but this is only true for the innermost chained
        continuation.  To make this more robust, we always just use the inline's containing block's containing block,
        which should be guaranteed to enclose all renderers in the continuation chain.  In addition, there is now a
        null check (to guarantee no more hangs) and an assert (to check if we hit this situation again where the block
        used to paint does not properly enclose the continuation chain).

        Reviewed by beth

        fast/inline/outline-continuation.html

        * rendering/RenderBlock.cpp:
        (WebCore::RenderBlock::paintContinuationOutlines):
        * rendering/InlineFlowBox.cpp:
        (WebCore::RenderInline::paint):

2007-07-22  Holger Hans Peter Freyther  <zecke@selfish.org>

        Reviewed by Adam.

        WARNING: NO TEST CASES ADDED OR CHANGED

        Add the WebKit/Gtk API to the buildsystem, ask qmake to create a
        pkg-config file and install headers and libraries.

        Start to emit signals from FrameLoaderClientGdk, hide the kit Frame
        inside the the FrameLoaderClientGdk.

        Move ChromeClientGdk to WebKit/gtk/WebCoreSupport

        * WebCore.pro:
        * loader/gdk/FrameLoaderClientGdk.cpp:
        * loader/gdk/FrameLoaderClientGdk.h:
        * platform/gdk/ChromeClientGdk.h: Removed.
        * platform/gdk/FrameGdk.cpp: Remove code not belonging here
        * platform/gdk/FrameGdk.h:
        * platform/gdk/ScrollViewGdk.cpp: The gdkDrawable won't exist at that time and it is fine
        * platform/gdk/TemporaryLinkStubs.cpp: Removed ChromeClientGdk stubs

2007-07-22  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Adam.

        <rdar://problem/5353174> REGRESSION: 1% JavaScript performance regression fro Window refactoring (14717)
        http://bugs.webkit.org/show_bug.cgi?id=14717
        
        * bindings/js/kjs_window.cpp:
        * bindings/js/kjs_window.h:
        (KJS::Window::impl): inlined
        * page/DOMWindow.cpp:
        * page/DOMWindow.h:
        (WebCore::DOMWindow::frame): inlined

2007-07-22  Darin Adler  <darin@apple.com>

        * platform/ContextMenu.cpp: Added missing include.

2007-07-22  Sam Weinig  <sam@webkit.org>

        Reviewed by Darin.

        Fix for http://bugs.webkit.org/show_bug.cgi?id=14682
        REGRESSION(24285-24399): alerts do not appear at W3C RTL test page

        Test: fast/dom/Window/window-function-name-getter-precedence.html

        * bindings/js/JSDOMWindowCustom.cpp:
        (WebCore::JSDOMWindow::customGetOwnPropertySlot): Make sure to return functions
        before the custom name getter.

2007-07-22  Darin Adler  <darin@apple.com>

        Reviewed by Adam.

        - fix <rdar://problem/5353263> ContextMenuItem and ContextMenu objects leaking (seen on buildbot)

        * platform/ContextMenu.cpp:
        (WebCore::separatorItem): Return an auto_ptr instead of a raw pointer, since this function
        creates an object that's the caller's responsibility to delete.
        (WebCore::createAndAppendFontSubMenu): Create the context menu on the stack, not the heap,
        since setSubMenu does not take ownership, and hence the objects were leaking.
        (WebCore::createAndAppendSpellingAndGrammarSubMenu): Ditto.
        (WebCore::createAndAppendSpellingSubMenu): Ditto.
        (WebCore::createAndAppendSpeechSubMenu): Ditto.
        (WebCore::createAndAppendWritingDirectionSubMenu): Ditto.

2007-07-22  Darin Adler  <darin@apple.com>

        Reviewed by Kevin Decker.

        - fix <rdar://problem/5126394> REGRESSION: Crash after clicking back button in test application (13250)
          http://bugs.webkit.org/show_bug.cgi?id=13250

        * bindings/objc/WebScriptObject.mm:
        (_didExecute): Removed unnecessary check for isValid() since the _rootObject method already
        takes care of that check.
        (-[WebScriptObject _imp]): Made this return 0 if there is not a valid rootObject.
        (-[WebScriptObject _isSafeScript]): Made this always return false if there is not a valid
        rootObject, eliminating the need to check _rootObject for nil if the code is checking _isSafeScript.
        (-[WebScriptObject callWebScriptMethod:withArguments:]): Removed check of _rootObject, since it's
        immediately followed by a check of _isSafeScript. Removed awkward conversion of name from NSString *
        to KJS::Identifier and did it using WebCore::String instead -- makes it clear that there's no
        arbitrary JavaScript execution after _isSafeScript and before _imp, so we don't need to null-check
        the _imp pointer. Added a second check of _isSafeScript after calling get to get the function
        object, since arbitrary changes could occur in there, including navigation to a new frame.
        This also takes care of null checking the second call to _imp.
        (-[WebScriptObject evaluateWebScript:]): Removed check of _rootObject, since it's
        immediately followed by a check of _isSafeScript. Removed awkward conversion of script from NSString *
        to KJS::Identifier and did it using WebCore::String instead -- makes it clear that there's no
        arbitrary JavaScript execution after _isSafeScript and before _imp, so we don't need to null-check
        the _imp pointer.
        (-[WebScriptObject setValue:forKey:]): Removed check of _rootObject, since it's
        immediately followed by a check of _isSafeScript. Removed awkward conversion of key from NSString *
        to KJS::Identifier and did it using WebCore::String instead -- makes it clear that there's no
        arbitrary JavaScript execution after _isSafeScript and before _imp, so we don't need to null-check
        the _imp pointer.
        (-[WebScriptObject valueForKey:]): Ditto.
        (-[WebScriptObject removeWebScriptKey:]): Ditto.
        (-[WebScriptObject stringRepresentation]): Removed check of _rootObject, since it's
        immediately followed by a check of _isSafeScript. Removed unnecessary local variable
        and const_cast from the call to the _imp method.
        (-[WebScriptObject webScriptValueAtIndex:]): Removed check of _rootObject, since it's
        immediately followed by a check of _isSafeScript.
        (-[WebScriptObject setWebScriptValueAtIndex:value:]): Ditto.
        (-[WebScriptObject JSObject]): Ditto.

2007-07-22  Darin Adler  <darin@apple.com>

        Reviewed by Anders Carlsson and John Sullivan.

        - speculative fix for <rdar://problem/5337500> CrashTracer: [USER] 4 crashes in Mail
          at WebCore::HTMLImageElement::isURLAttribute(WebCore::Attribute*) const

        * editing/markup.cpp: Added AttributeChange class.
        (WebCore::completeURLs): Changed function so that all the URL completion is done in
        a separate pass after finding all the URL attributes. This is safer, since actually
        applying an attribute change could have any arbitrary effect on the document; it's
        tricky to iterate a document while it's being modified and we don't have the checks
        here that would be needed to make that work in pathological cases.

2007-07-18  Darin Adler  <darin@apple.com>

        Reviewed by Adam.

        - fix <rdar://problem/5350604> REGRESSION: Crash in inspector controller code after
          clicking back button in test application (14337)

        * page/InspectorController.cpp: (WebCore::InspectorController::addScriptResource):
        Replace an assertion that was firing with some code that at least doesn't immediately crash.

2007-07-22  Darin Adler  <darin@apple.com>

        Reviewed by Anders.

        - improve the fix for <rdar://problem/5298816> Crash redirecting message,
          in -[SharedBufferData initWithSharedBuffer:]; fixes a crash seen on the buildbot

        * loader/DocLoader.cpp: (WebCore::DocLoader::~DocLoader): Call setDocLoader(0) on all
        the resources so they don't try to use a stale DocLoader pointer later.

2007-07-21  Mitz Pettel  <mitz@webkit.org>

        Reviewed by Sam Weinig.

        - fixed typos and markup in the following manual tests

        * manual-tests/accidental-strict-mode.html:
        * manual-tests/caretScrolling.html:
        * manual-tests/close-on-closedWindow.html:

2007-07-21  Sam Weinig  <sam@webkit.org>

        Reviewed by Mitz.

        Patch for <rdar://problem/5352013>
        The computed style for background-position is wrong for the initial value

        - Set the initial value for background-position-x and background-position-y (and
          therefore background-position) to 0% instead of 0px.

        * rendering/RenderStyle.cpp:
        (WebCore::BackgroundLayer::BackgroundLayer):
        * rendering/RenderStyle.h:
        (WebCore::RenderStyle::initialBackgroundXPosition):
        (WebCore::RenderStyle::initialBackgroundYPosition):

2007-07-20  Brady Eidson  <beidson@apple.com>

        Reviewed by Adele and Andersca

        <rdar://problem/5336105> - WebBackForwardList created from scratch is unusable (always leads to crash)

        * WebCore.exp: Export the BackForwardList c'tor so WebKit can create one explicitly

2007-07-20  Sam Weinig  <sam@webkit.org>

        Reviewed by Beth Dakin.

        Fix for <rdar://problem/5351901>
        Computed value of border-position should return a CSSValueList, not a CSSPrimitiveValue

        - Return a space separated CSSValueList for background-position
          instead of a CSSPrimitiveValue (string type).
        - Remove the "else if (renderer)" case as it never returns a different
          value than just calling length.value().
        - Make background-position-x and background-position-y behave like
          background-position.  Fix case of initial value return 'auto' instead
          of 0.

        Test: fast/css/getComputedStyle-background-position.html

        * css/CSSComputedStyleDeclaration.cpp:
        (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):

2007-07-20  Geoffrey Garen  <ggaren@apple.com>

        Build fix for non-Mac platforms.
        
        * bindings/js/GCController.cpp:

2007-07-20  Anders Carlsson  <andersca@apple.com>

        Reviewed by Darin.

        If the style sheet requested is a user style sheet, don't store it in the DocLoader's resource map;
        user style sheets can outlive their doc loaders.

        * loader/DocLoader.cpp:
        (WebCore::DocLoader::requestCSSStyleSheet):

2007-07-20  Justin Garcia  <justin.garcia@apple.com>

        Reviewed by Darin.

        <rdar://problem/5109817> Ctrl-click on word in non-editable text doesn't select it
        
        * bridge/EditorClient.h: Removed a client method for enabling/disabling
        word selection on right clicks.
        * editing/Editor.cpp: Ditto.
        * editing/Editor.h:
        * page/EventHandler.cpp:
        (WebCore::EventHandler::sendContextMenuEvent): Select the
        word underneath the mouse regardless of whether its editable.

2007-07-20  Ada Chan  <adachan@apple.com>

        Reviewed by Darin and Adam.

        <rdar://problem/5338385> Fixed infinite loop in ScrollView::scrollRectIntoViewRecursively().
        Also removed an unused local variable.

        * platform/win/ScrollViewWin.cpp:
        (WebCore::ScrollView::scrollRectIntoViewRecursively):

2007-07-21  Antti  <antti@apple.com>

        Reviewed by Darin.
        
        Fix <rdar://problem/5305788>
        REGRESSION: Safari sometimes loads IE-specific stylesheet on www.apaema.org
        
        Pick the preferred style sheet set based on document order even if the sheet is still loading. Previously 
        the set was chosen based on which stylesheet happened to arrive first. Just fix the problem at hand 
        and resist urge to start refactoring this function.

        * dom/Document.cpp:
        (WebCore::Document::recalcStyleSelector):

2007-07-20  Sam Weinig  <sam@webkit.org>

        Reviewed by Darin.

        Fix for <rdar://problem/5351252>
        Computed value for -webkit-background-size and border-spacing
        should be space separated CSSValueLists.

        * css/CSSComputedStyleDeclaration.cpp:
        (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):

2007-07-20  Geoffrey Garen  <ggaren@apple.com>

        Suggested by Darin Adler.
        
        Slight tweak to my last commit: changed gcController() to return a 
        reference instead of a pointer.

2007-07-20  Geoffrey Garen  <ggaren@apple.com>

        Reviewed by Darin Adler.
        
        Fixed http://bugs.webkit.org/show_bug.cgi?id=12900 Page tear-down 
        forces garbage collection once per frame

        Also fixed <rdar://problem/5286989> GC on window close does not always 
        bring the JS object count down to 0
        
        Implemented a 0-delay GC timer in WebCore. Instead of forcing GC
        immediately, code that thinks it has created a lot of garbage starts
        the timer. This has two advantages: 

        1) Multiple GCs can coalesce. In my pathological test case, this 
        improves performance by an order of magnitude. 
        
        2) Conservative marking is less likely to keep alive important dead
        objects, like the window object, because the stack is small and free of
        JS processing when the timer fires.

        Added GCController.h/.cpp, sometimes blindly:
        * WebCore.pro:
        * WebCore.vcproj/WebCore.vcproj:
        * WebCore.xcodeproj/project.pbxproj:
        * WebCoreSources.bkl:

        Added singleton that implements GC on a 0-delay timer:
        * bindings/js/GCController.h: Added.
        * bindings/js/GCController.cpp: Added.
        
        Changed Collector::collect() calls below to call to the singleton:
        * bindings/js/kjs_proxy.cpp:
        (WebCore::KJSProxy::~KJSProxy):
        * bindings/js/kjs_window.cpp:
        (KJS::Window::clear):
        * history/CachedPage.cpp:
        (WebCore::CachedPage::clear):
        
        * page/Frame.cpp:
        (WebCore::Frame::~Frame): Removed previous slightly hackish attempt to
        avoid conservative marking of the window object.

2007-07-20  Anders Carlsson  <andersca@apple.com>
    
        Reviewed by Darin.

        <rdar://problem/5298816> Crash redirecting message, in -[SharedBufferData initWithSharedBuffer:]
        
        Have cached resources keep track of what DocLoader they belong to. This is so that they can remove themselves
        from the DocLoader's resource map when they're destroyed when the cache is disabled.
        
        * html/HTMLImageLoader.cpp:
        (WebCore::HTMLImageLoader::updateFromElement):
        * loader/Cache.cpp:
        (WebCore::Cache::requestResource):
        * loader/CachedResource.cpp:
        (WebCore::CachedResource::CachedResource):
        (WebCore::CachedResource::~CachedResource):
        * loader/CachedResource.h:
        (WebCore::CachedResource::setDocLoader):

2007-07-20  Brady Eidson  <beidson@apple.com>

        Reviewed by Darin

        <rdar://problem/5153021> and http://bugs.webkit.org/show_bug.cgi?id=13364

        The issue here was that if a document in a subframe was loaded from a URL, but then a script did 
        document.open or document.write during parsing, we would overwrite the document's url and baseurl 
        with the parent frame's url.  WRONG!

        * dom/Document.cpp:
        (WebCore::Document::open): Only set the url and baseURL in document.open if they are still empty or about:blank

2007-07-20  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Oliver.

        <rdar://problem/5326303> REGRESSION: blur event fires upon navigating away from a page with focused element


        
        The proximate cause was the recent change to keep focus on the
        WebHTMLView when switching views. But the reason this happend was
        that didCommitLoadForFrame got called at a time when the new view
        was in place, but the old document was still there. This was a
        longstanding problem with the delegate, and fixing it cleans it
        up.

        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::begin): Don't send dispatchWindowObjectAvailable if
        caller asked not to (this is to allow order of delegates to be the same).
        (WebCore::FrameLoader::transitionToCommitted): Don't emit didCommitLoadForFrame here.
        (WebCore::FrameLoader::receivedFirstData): Instead do it here, after calling begin(),
        so the new document is set up.
        * loader/FrameLoader.h: Add new optional parameter to begin().

2007-07-20  Sam Weinig  <sam@webkit.org>

        Reviewed by Beth Dakin.

        Update for fix for http://bugs.webkit.org/show_bug.cgi?id=14646
        <rdar://problem/5340449>

        - Return a CSSValueList instead of CSSValue (with a Pair type) for
          computed values of border radii.
        - Add ability to CSSValueList to print out a space separated list
          instead of a comma.
        - Add border radii to list of computed styles that we create and can
          iterate over.

        * css/CSSComputedStyleDeclaration.cpp:
        (WebCore::):
        (WebCore::getBorderRadiusCornerValue):
        * css/CSSValueList.cpp:
        (WebCore::CSSValueList::CSSValueList):
        (WebCore::CSSValueList::cssText):
        * css/CSSValueList.h:

2007-07-20  Mitz Pettel  <mitz@webkit.org>

        Reviewed by Darin.

        - http://bugs.webkit.org/show_bug.cgi?id=14626
          Make bidiReorderCharacters independent of RenderBlock

        No layout test possible because there is no change in functionality.

        This patch generalizes RenderBlock's implementation of the Unicode Bidi Algorithm
        in the form of the BidiResolver class template. An instance of a BidiResolver class
        can generate a sequence of runs with corresponding level and override attributes,
        given a range specified by start and end iterators. The iterators can optionally
        call back to the BidiResolver instance to push or pop explicit embedding levels.

        The patch replaces BidiState with a specialization of BidiResolver that uses
        BidiIterators and generates BidiRuns. It also eliminates some of the file statics
        in bidi.cpp, instead relying on BidiResolver data members.

        The patch makes the BidiContext part of BidiStatus, thus making BidiStatus the
        entire state that needs to be saved and restored in order to restart the bidi
        algorithm at a given point. Previously, you had to keep and pass around two
        separate structures, namely the BidiContext and the BidiStatus.

        bidiReorderCharacters is implemented without relying on render objects, using
        a BidiResolver specialization that uses simple character buffer iterators and
        simple run structures.

        * WebCore.pro:
        * WebCore.vcproj/WebCore.vcproj:
        * WebCore.xcodeproj/project.pbxproj:
        * WebCoreSources.bkl:
        * platform/BidiContext.cpp: Added.
        (WebCore::operator==):
        * platform/BidiContext.h: Added.
        (WebCore::BidiContext::BidiContext):
        (WebCore::BidiContext::ref):
        (WebCore::BidiContext::deref):
        (WebCore::BidiContext::parent):
        (WebCore::BidiContext::level):
        (WebCore::BidiContext::dir):
        (WebCore::BidiContext::override):
        * platform/BidiReorderCharacters.cpp: Added.
        (WebCore::CharacterBufferIterator::CharacterBufferIterator):
        (WebCore::CharacterBufferIterator::offset):
        (WebCore::CharacterBufferIterator::increment):
        (WebCore::CharacterBufferIterator::atEnd):
        (WebCore::CharacterBufferIterator::current):
        (WebCore::CharacterBufferIterator::direction):
        (WebCore::CharacterBufferIterator::operator==):
        (WebCore::CharacterBufferIterator::operator!=):
        (WebCore::::appendRun):
        (WebCore::bidiReorderCharacters):
        * platform/BidiReorderCharacters.h: Added.
        * platform/BidiResolver.h: Added.
        (WebCore::BidiStatus::BidiStatus):
        (WebCore::operator==):
        (WebCore::operator!=):
        (WebCore::BidiCharacterRun::BidiCharacterRun):
        (WebCore::BidiCharacterRun::reversed):
        (WebCore::BidiCharacterRun::dirOverride):
        (WebCore::BidiCharacterRun::next):
        (WebCore::BidiResolver::):
        (WebCore::BidiResolver::context):
        (WebCore::BidiResolver::setContext):
        (WebCore::BidiResolver::setLastDir):
        (WebCore::BidiResolver::setLastStrongDir):
        (WebCore::BidiResolver::setEorDir):
        (WebCore::BidiResolver::dir):
        (WebCore::BidiResolver::setDir):
        (WebCore::BidiResolver::status):
        (WebCore::BidiResolver::setStatus):
        (WebCore::BidiResolver::adjustEmbedding):
        (WebCore::BidiResolver::setAdjustEmbedding):
        (WebCore::BidiResolver::firstRun):
        (WebCore::BidiResolver::lastRun):
        (WebCore::BidiResolver::runCount):
        (WebCore::::embed):
        (WebCore::::deleteRuns):
        (WebCore::::reverseRuns):
        (WebCore::::createBidiRunsForLine):
        * platform/win/PopupMenuWin.cpp:
        (WebCore::PopupMenu::paint):
        * rendering/RenderBlock.h:
        * rendering/RenderFileUploadControl.cpp:
        (WebCore::RenderFileUploadControl::paintObject):
        * rendering/RenderListBox.cpp:
        (WebCore::RenderListBox::paintItemForeground):
        * rendering/RootInlineBox.cpp:
        (WebCore::RootInlineBox::childRemoved):
        (WebCore::RootInlineBox::lineBreakBidiStatus):
        (WebCore::RootInlineBox::setLineBreakInfo):
        * rendering/RootInlineBox.h:
        (WebCore::RootInlineBox::RootInlineBox):
        * rendering/bidi.cpp:
        (WebCore::BidiIterator::BidiIterator):
        (WebCore::BidiState::deleteRuns):
        (WebCore::operator==):
        (WebCore::operator!=):
        (WebCore::bidiNext):
        (WebCore::bidiFirst):
        (WebCore::BidiState::addRun):
        (WebCore::appendRunsForObject):
        (WebCore::BidiState::appendRun):
        (WebCore::RenderBlock::constructLine):
        (WebCore::RenderBlock::computeHorizontalPositionsForLine):
        (WebCore::RenderBlock::computeVerticalPositionsForLine):
        (WebCore::RenderBlock::bidiReorderLine):
        (WebCore::buildCompactRuns):
        (WebCore::RenderBlock::layoutInlineChildren):
        (WebCore::RenderBlock::determineStartPosition):
        (WebCore::RenderBlock::determineEndPosition):
        (WebCore::RenderBlock::matchedEndLine):
        (WebCore::RenderBlock::skipWhitespace):
        * rendering/bidi.h:
        (WebCore::BidiRun::BidiRun):
        (WebCore::BidiRun::next):

2007-07-20  Darin Adler  <darin@apple.com>

        Reviewed by John Sullivan.

        - fix for <rdar://problem/5331723> <rdar://problem/5331723> Safari gives error
          103 for URLs that Adobe Lightroom's Preview feature produces, with ":1" in the hostname

        Test: fast/loader/file-URL-with-port-number.html

        * platform/network/ResourceHandle.cpp: (WebCore::ResourceHandle::portAllowed):
        Don't do any port blocking for file URLs.

2007-07-20  Mitz Pettel  <mitz@webkit.org>

        Reviewed by Darin.

        - fix http://bugs.webkit.org/show_bug.cgi?id=14689
          REGRESSION (3.0.2-TOT): <select> menu items have incorrect background color

        * manual-tests/item-background.html: Added.
        * platform/PopupMenuClient.h:
        * platform/graphics/Color.cpp:
        (WebCore::blendComponent): Renamed the static method blend() to this.
        (WebCore::Color::blend): Added. Compositing (in "normal" or "source over"
        blend mode) B.blend(C) over A is equivalent to compositing C over the
        result of compositing B over A.
        (WebCore::Color::blendWithWhite): Changed for the above rename.
        * platform/graphics/Color.h:
        * platform/win/PopupMenuWin.cpp:
        (WebCore::PopupMenu::paint): Changed to use itemBackgroundColor().
        * rendering/RenderMenuList.cpp:
        (WebCore::RenderMenuList::itemBackgroundColor): Added. Returns the color
        that would result from overlaying the item's background color over the
        menu's background color over solid white. Note that clientStyle() cannot
        be used for the menu's background color, since background color is not
        inherited by the inner block (the regression resulted from changing
        clientStyle() to return the inner block's style), and that the color
        returned from this method is guaranteed to be opaque.
        * rendering/RenderMenuList.h:
        * rendering/RenderTextControl.cpp:
        (WebCore::RenderTextControl::itemBackgroundColor): Added.
        * rendering/RenderTextControl.h:

2007-07-20  Rob Buis  <buis@kde.org>

        Reviewed by Darin.

        http://bugs.webkit.org/show_bug.cgi?id=14642
        REGRESSION(r24064-24096): Reflection type effect in canvas tag broke

        Do not stop the fill/stroke operation when encountering an empty path.

        * html/CanvasRenderingContext2D.cpp:
        (WebCore::CanvasRenderingContext2D::fill):
        (WebCore::CanvasRenderingContext2D::stroke):

2007-07-20  Lars Knoll  <lars@trolltech.com>

        Reviewed by Simon.

        Remove some files that are not used anymore.

        * platform/qt/FontCacheQt.cpp: Removed.
        * platform/qt/FontDataQt.cpp: Removed.
        * platform/qt/FontPlatformData.h: Removed.
        * platform/qt/FontPlatformDataQt.cpp: Removed.
        * platform/qt/GlyphPageTreeNodeQt.cpp: Removed.

2007-07-20  Lars Knoll  <lars@trolltech.com>

        Reviewed by Simon.

        use the correct font for spaces.

        * platform/qt/FontQt.cpp:
        (WebCore::generateComponents):

2007-07-20  Lars Knoll  <lars@trolltech.com>

        Reviewed by Simon.

        spaces where not correctly taken into account for both offsetForPosition and selectionRectForText. Because of that selections sort of worked in LTR text, but completely failed in RTL.

        * platform/qt/FontQt.cpp:
        (WebCore::TextRunComponent::isSpace):
        (WebCore::TextRunComponent::TextRunComponent):
        (WebCore::generateComponents):
        (WebCore::Font::drawText):
        (WebCore::Font::offsetForPosition):
        (WebCore::Font::selectionRectForText):

2007-07-20  Lars Knoll  <lars@trolltech.com>

        Reviewed by Simon.

        fix up some smaller issues in selection handling. It's still not perfect and selections in mixed rtl/ltr text are still broken, but it's getting there.

        * platform/qt/FontQt.cpp:
        (WebCore::Font::offsetForPosition):
        (WebCore::cursorToX):
        (WebCore::Font::selectionRectForText):

2007-07-20  Lars Knoll  <lars@trolltech.com>

        Reviewed by Simon.

        make offsetForPosition and selectionRectForText work correctly with small caps.

        * platform/qt/FontQt.cpp:
        (WebCore::Font::offsetForPosition):
        (WebCore::cursorToX):
        (WebCore::Font::selectionRectForText):

2007-07-20  Lars Knoll  <lars@trolltech.com>

        Reviewed by Simon.

        clip the drawn text correctly when needed.

        * platform/qt/FontQt.cpp:
        (WebCore::Font::drawText):

2007-07-20  Lars Knoll  <lars@trolltech.com>

        Reviewed by Simon.

        Fix offsetForPosition and selectionRectForText methods.

        * platform/qt/FontQt.cpp:
        (WebCore::Font::offsetForPosition):
        (WebCore::cursorToX):
        (WebCore::Font::selectionRectForText):

2007-07-20  Lars Knoll  <lars@trolltech.com>

        Reviewed by Simon.

        fix BiDi text rendering.

        * platform/qt/FontQt.cpp:
        (WebCore::TextRunComponent::TextRunComponent):
        (WebCore::generateComponents):
        (WebCore::Font::drawText):

2007-07-20  Mark Rowe  <mrowe@apple.com>

        Reviewed by Maciej.

        Move FTPDirectoryTokenizer::m_templateDocumentData to be a function-scoped static
        to avoid creating a global initializer.  This fixes the build for x86_64.

        * loader/FTPDirectoryDocument.cpp:
        (WebCore::FTPDirectoryTokenizer::loadDocumentTemplate):

2007-07-19  Geoffrey Garen  <ggaren@apple.com>

        Reviewed by Maciej Stachowiak.
        
        Fixed <rdar://problem/5347849> Cache eviction of live decoded data is 
        thrash-y
        
        The solution here is to evict live decoded data based on a strict LRU
        model. This should work well as a "scrolling window."

        With this patch, I see a substantial reduction in CPU while scrolling
        through a page with large images on a low memory system. Layout tests
        pass.

        * loader/Cache.h: Changed from a size-based vector of LRU lists to a
        single LRU list in order to implement strict LRU.
        
        * loader/CachedResource.h: Removed tracking of access count, since that
        was the old cache eviction model.

2007-07-19  Oliver Hunt  <oliver@apple.com>

        Reviewed by Maciej.

        <rdar://problem/5076807> REGRESSION: Can't undo conversion of inline text (by hitting ESC)
        <rdar://problem/5346167> DOM key events triggered during IME composition differ in webkit/mac vs all windows browsers

        We now basically match the behaviour of IE/Windows. This means that during composition keydown and autorepeat
        keys generate keydown events with a keyCode of 229, which correlates to the windows VK_PROCESSKEY message.
        keyup events are generated with the keyCode of the actual key that was pressed.

        The only difference is on the first keydown of a composition, in which IE will use keyCode == 229, and we will
        send an event with the keyCode for the actual key that was pressed.

        * page/EventHandler.cpp:
        (WebCore::EventHandler::keyEvent):
        * platform/PlatformKeyboardEvent.h:
        (WebCore::PlatformKeyboardEvent::setWindowsKeyCode):

2007-07-19  Brady Eidson  <beidson@apple.com>

        Reviewed by Sam

        <rdar://problem/5134929> REGRESSION: Colon detected as delimiting an empty port is stripped

        The fix for this was in KURL::parse() which had a slightly changed rule that would strip the colon if there
        was no port.

        An additional canonicalization fix was made in window.location.host to match the expected behavior of leaving
        the colon in place - before this fix, if the colon was there but no port was there, we'd see the port as 0.

        * bindings/js/kjs_window.cpp:
        (KJS::Location::put): Call setHostAndPort instead of setHost and setPort seperately

        * manual-tests/location-host-canonicalization.html: Added.

        * platform/KURL.cpp:
        (WebCore::KURL::setHostAndPort): Set the host and port as one string component then reparse the URL
        (WebCore::KURL::parse): Change one line to consider the empty colon as part of the host name
        * platform/KURL.h:

2007-07-19  Anders Carlsson  <andersca@apple.com>

        Reviewed by Adam.

        <rdar://problem/5288617>
        Crash playing a very large QuickTime movie in Safari
        
        <rdar://problem/5271174>
        http://bugs.webkit.org/show_bug.cgi?id=14148
        LEAK: Serious memory consumption and leak when loading QT movies.
        
        Don't keep plugin stream data in memory since some plugin resources (like QT movies)
        can be really big. If a plug-in wants data in a file, create a file and write data to it 
        as it's coming from the wire, instead of using a big buffer.
        
        * loader/ResourceLoader.cpp:
        (WebCore::ResourceLoader::ResourceLoader):
        (WebCore::ResourceLoader::addData):
        (WebCore::ResourceLoader::willStopBufferingData):
        * loader/ResourceLoader.h:
        (WebCore::ResourceLoader::setShouldBufferData):
        * plugins/win/PluginStreamWin.cpp:
        (WebCore::PluginStreamWin::PluginStreamWin):
        (WebCore::PluginStreamWin::start):
        (WebCore::PluginStreamWin::startStream):
        (WebCore::PluginStreamWin::destroyStream):
        (WebCore::PluginStreamWin::didReceiveData):
        (WebCore::PluginStreamWin::didFinishLoading):
        * plugins/win/PluginStreamWin.h:

2007-07-19  Geoffrey Garen  <ggaren@apple.com>

        Reviewed by Darin Adler.
        
        Fixed <rdar://problem/5348384> Restore old return value behavior of 
        stringByEvaluatingJavaScriptFromString
        
        Return an empty string unless you have a string, boolean, or number
        result.

        * WebCore.xcodeproj/project.pbxproj:
        * page/mac/WebCoreFrameBridge.mm:
        (-[WebCoreFrameBridge stringByEvaluatingJavaScriptFromString:forceUserGesture:]):

2007-07-19  Darin Adler  <darin@apple.com>

        Reviewed by Alexey.

        - fix http://bugs.webkit.org/show_bug.cgi?id=14666
          remove unused xxx-encodings.txt for all platforms other than Mac

        * platform/gdk/gdk-encodings.txt: Removed.
        * platform/win/win-encodings.txt: Removed.
        * platform/wx/wx-encodings.txt: Removed.

        * platform/character-sets.txt: Moved into mac subdirectory since it's only used for Mac; at some
        point I hope to remove it completely.
        * platform/make-charset-table.pl: Ditto.
        * platform/mac/character-sets.txt: Copied from platform/character-sets.txt.
        * platform/mac/make-charset-table.pl: Copied from platform/make-charset-table.pl.

        * DerivedSources.make: Moved CharsetData.cpp into the MACOS section.
        Changed the build rule to use Mac-specific paths for everything and got rid of
        make variables.

        * WebCore.vcproj/build-generated-files.sh: Removed code to set ENCODINGS_FILE and ENCODINGS_PREFIX.
        * WebCore.xcodeproj/project.pbxproj: Ditto.
        * make-generated-sources.sh: Ditto.

        * Projects/gdk/webcore-gdk.bkl: Removed code to pass gdk-encodings.txt to make-generated-sources.sh.
        * Projects/wx/webcore-wx.bkl: Ditto, but for wx-encodings.txt.

2007-07-19  Antti  <antti@apple.com>

        Reviewed by Darin.

        Fix <rdar://problem/5257371>
        Dashcode Client crash when clicking on placemarks in Maps widget in WebCore::DeprecatedPtrListImpl::addIterator
        
        FlexibleBoxes should never have inline children. Don't move children out from last remaining anonymous block.

        * rendering/RenderBlock.cpp:
        (WebCore::RenderBlock::removeChild): real fix
        * rendering/RenderFlexibleBox.cpp:
        (WebCore::RenderFlexibleBox::layoutVerticalBox): just to be sure, this is checked elsewhere too

2007-07-19  Anders Carlsson  <andersca@apple.com>

        Reviewed by Darin.

        <rdar://problem/5322268>
        Safari Crash at http://www.exlibrisgroup.com/sfx_openurl.htm
        
        Add a real copy constructor and assignment operator for CollectionInfo
        so that the vectors in the cache maps will be copied correctly.
        
        * html/HTMLCollection.cpp:
        (WebCore::HTMLCollection::CollectionInfo::CollectionInfo):
        (WebCore::HTMLCollection::CollectionInfo::swap):
        * html/HTMLCollection.h:
        (WebCore::HTMLCollection::CollectionInfo::operator=):
        (WebCore::HTMLCollection::CollectionInfo::copyCacheMap):

2007-07-19  David Hyatt  <hyatt@apple.com>

        Fix for 5237574, Colloquy main view does not size correctly.  Make
        sure to reset the baseilne when calculating a row's height/baseline, so
        that old values don't stick around.

        Reviewed by Tim Hatcher

        * rendering/RenderTableSection.cpp:
        (WebCore::RenderTableSection::calcRowHeight):

2007-07-19  Antti  <antti@apple.com>

        Reviewed by John.
        
        Fix <rdar://problem/5346697>
        REGRESSION(r23773): Visibile children on invisible layer are not painted (fast/layers/layer-visibility.html fails)
        
        Test m_hasVisibleContent instead of renderer()->style()->visibility(). 
        This takes children into account too.

        Regression spotted by Mitz.

        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::paintLayer):

2007-07-18  Oliver Hunt  <oliver@apple.com>

        Rubber stamped by maciej

        Rollout patch from r24437.

        * page/EventHandler.cpp:
        (WebCore::EventHandler::keyEvent):

2007-07-18  Oliver Hunt  <oliver@apple.com>

        Reviewed by Kevin M.

        Fix for <rdar://problem/5346167> DOM key events triggered during
                IME composition differ in webkit/mac vs all windows browsers

        We no longer send DOM key events during IME composition.  This behaviour 
        matches the behaviour of WebKit/Win.

        * page/EventHandler.cpp:
        (WebCore::EventHandler::keyEvent):

2007-07-18  Sam Weinig  <sam@webkit.org>

        Reviewed by Oliver.

        Fix for http://bugs.webkit.org/show_bug.cgi?id=14646
        WebKit border radius properties are unavailable via JavaScript

        Test: fast/dom/getComputedStyle-borderRadius.html

        * css/CSSComputedStyleDeclaration.cpp:
        (WebCore::getBorderRadiusCornerValue): Helper function that returns a single value if
        width and the height of the corner radius are equal, and otherwise a pair.
        (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):

2007-07-18  Anders Carlsson  <andersca@apple.com>

        Reviewed by Darin.

        <rdar://problem/5262136> Double form repost alert going forward on britishairways.com
        
        When checking if the request has changed and a new policy callback needs to be sent, 
        ignore the request headers. NSURLConnection in Leopard will always call willSendRequest,
        with a request that was different from the one passed to -[NSURLConnection connectionWithRequest:]
        (a few Accept headers are added).

        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::checkNavigationPolicy):
        * platform/network/ResourceRequestBase.cpp:
        (WebCore::equalIgnoringHeaderFields):
        (WebCore::operator==):
        * platform/network/ResourceRequestBase.h:

2007-07-18  Anders Carlsson  <andersca@apple.com>

        Reviewed by Darin.

        <rdar://problem/5340098>
        http://bugs.webkit.org/show_bug.cgi?id=13366
        REGRESSION (r10935): AOL beta music player doesn't play

        The AOL beta music player has a typo, causing it to create an <embed"> element inside of
        an <object> element
        Because of this, it will not be treated as an embed tag, so its name will not be added
        to the document's named item map. Furthermore, since the <object> contains a child that
        is not a <param>, the object's name won't be added either.
        
        The (somewhat ugly) fix is to add <object> to the named map only if it has <param> or
        unknown elements as children.
        
        * html/HTMLObjectElement.cpp:
        (WebCore::HTMLObjectElement::updateDocNamedItem):

2007-07-18  Timothy Hatcher  <timothy@apple.com>

        Reviewed by Adam.

        <rdar://problem/5343767> Should have a way to disable the Web Inspector

        This change facilitates the ability to turn the Web Inspector on and off.

        Makes the InspectorClient be required to create a new Page. This also means that
        InspectorController will never be NULL. Adds a new function on Page to test
        if the inspector is enabled.

        * WebCore.exp: New symbol for the Page constructor.
        * WebCore.pro: Add InspectorClientGdk.cpp.
        * WebCoreSources.bkl: ditto.
        * html/HTMLDocument.cpp:
        (WebCore::HTMLDocument::createTokenizer):
        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::detachFromParent): Don't null check the InspectorCOntroller.
        (WebCore::FrameLoader::dispatchDidCommitLoad): Ditto.
        (WebCore::FrameLoader::dispatchAssignIdentifierToInitialRequest): Ditto.
        (WebCore::FrameLoader::dispatchWillSendRequest): Ditto.
        (WebCore::FrameLoader::dispatchDidReceiveResponse): Ditto.
        (WebCore::FrameLoader::dispatchDidReceiveContentLength): Ditto.
        (WebCore::FrameLoader::dispatchDidFinishLoading): Ditto.
        (WebCore::FrameLoader::dispatchDidLoadResourceFromMemoryCache): Ditto.
        * page/ContextMenuController.cpp:
        (WebCore::ContextMenuController::handleContextMenuEvent): Ask the InspectorController if it is enabled.
        (WebCore::ContextMenuController::contextMenuItemSelected): Ditto.
        * page/InspectorController.cpp:
        (WebCore::InspectorController::enabled): Ask the Page's settings if developer extras are enabled.
        (WebCore::InspectorController::inspect): Check if the InspectorController is enabled.
        (WebCore::InspectorController::focusNode): Ditto.
        (WebCore::InspectorController::highlight): Ditto.
        (WebCore::InspectorController::hideHighlight): Ditto.
        (WebCore::InspectorController::addMessageToConsole): Ditto.
        (WebCore::InspectorController::attachWindow): Ditto.
        (WebCore::InspectorController::detachWindow): Ditto.
        (WebCore::InspectorController::windowScriptObjectAvailable): Ditto.
        (WebCore::InspectorController::didCommitLoad): Ditto.
        (WebCore::InspectorController::frameDetachedFromParent): Ditto.
        (WebCore::InspectorController::didLoadResourceFromMemoryCache): Ditto.
        (WebCore::InspectorController::identifierForInitialRequest): Ditto.
        (WebCore::InspectorController::willSendRequest): Ditto.
        (WebCore::InspectorController::didReceiveResponse): Ditto.
        (WebCore::InspectorController::didReceiveContentLength): Ditto.
        (WebCore::InspectorController::didFinishLoading): Ditto.
        (WebCore::InspectorController::didFailLoading): Ditto.
        * page/InspectorController.h:
        * page/Page.cpp:
        (WebCore::Page::Page): Require an InspectorClient.
        (WebCore::Page::~Page): Always call pageDestroyed on the InspectorController.
        (WebCore::Page::inspectorEnabled): Check the WebCore settings if the developer extras are enabled.
        * page/Page.h:
        * page/gdk/InspectorClientGdk.cpp: Added.
        (WebCore::InspectorClientGdk::inspectorDestroyed): Empty stub calling notImplemented.
        (WebCore::InspectorClientGdk::createPage): Ditto.
        (WebCore::InspectorClientGdk::showWindow): Ditto.
        (WebCore::InspectorClientGdk::closeWindow): Ditto.
        (WebCore::InspectorClientGdk::attachWindow): Ditto.
        (WebCore::InspectorClientGdk::detachWindow): Ditto.
        (WebCore::InspectorClientGdk::highlight): Ditto.
        (WebCore::InspectorClientGdk::hideHighlight): Ditto.
        (WebCore::InspectorClientGdk::inspectedURLChanged): Ditto.
        * page/gdk/InspectorClientGdk.h: Added.
        * platform/graphics/svg/SVGImage.cpp:
        (WebCore::SVGImage::dataChanged): Pass in a dummy InspectorClient.
        * platform/graphics/svg/SVGImageEmptyClients.h:
        (WebCore::SVGEmptyInspectorClient::~SVGEmptyInspectorClient): Empty dummy implementation.
        (WebCore::SVGEmptyInspectorClient::inspectorDestroyed): Ditto.
        (WebCore::SVGEmptyInspectorClient::createPage): Ditto.
        (WebCore::SVGEmptyInspectorClient::showWindow): Ditto.
        (WebCore::SVGEmptyInspectorClient::closeWindow): Ditto.
        (WebCore::SVGEmptyInspectorClient::attachWindow): Ditto.
        (WebCore::SVGEmptyInspectorClient::detachWindow): Ditto.
        (WebCore::SVGEmptyInspectorClient::highlight): Ditto.
        (WebCore::SVGEmptyInspectorClient::hideHighlight): Ditto.
        (WebCore::SVGEmptyInspectorClient::inspectedURLChanged): Ditto.

2007-07-18  Anders Carlsson  <andersca@apple.com>

        Make some headers private instead of project.
        
        * WebCore.xcodeproj/project.pbxproj:

2007-07-18  John Sullivan  <sullivan@apple.com>

        Reviewed by Maciej and Kevin Decker

        - fixed <rdar://problem/5315926> REGRESSION: ~.4% PLT regression from r23949 (canonicalization change)

        * loader/mac/LoaderNSURLExtras.m:
        (canonicalURL):
        Rolled out the fix for 5249730 that caused this regression. 5249730 is addressed a different way now.

2007-07-18  Sam Weinig  <sam@webkit.org>

        Build fix.

        * WebCore.xcodeproj/project.pbxproj:
        * loader/gdk/FrameLoaderClientGdk.cpp:
        (WebCore::FrameLoaderClientGdk::objectContentType):
        * platform/graphics/win/ImageWin.cpp:
        * platform/network/cf/ResourceResponseCFNet.cpp:
        * platform/win/ClipboardWin.cpp:
        (WebCore::createGlobalImageFileDescriptor):

2007-07-18  Sam Weinig  <sam@webkit.org>

        Rubber-stamped by Adam Roben.

        Rename MimeTypeRegistry to MIMETypeRegistry and xmlhttprequest to XMLHttpRequest

        * WebCore.exp:
        * WebCore.pro:
        * WebCore.vcproj/WebCore.vcproj:
        * bindings/js/JSXMLHttpRequest.cpp:
        * bindings/js/kjs_binding.cpp:
        * bindings/js/kjs_dom.cpp:
        * dom/Document.cpp:
        * html/HTMLFormElement.cpp:
        (WebCore::HTMLFormElement::formData):
        * html/HTMLObjectElement.cpp:
        (WebCore::HTMLObjectElement::containsJavaApplet):
        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::requestObject):
        * loader/mac/LoaderNSURLExtras.m:
        (suggestedFilenameWithMIMEType):
        * platform/MIMETypeRegistry.cpp: Copied from platform/MimeTypeRegistry.cpp.
        (WebCore::initialiseSupportedImageMIMETypes):
        (WebCore::initialiseMIMETypeRegistry):
        (WebCore::MIMETypeRegistry::getMIMETypeForPath):
        (WebCore::MIMETypeRegistry::isSupportedImageMIMEType):
        (WebCore::MIMETypeRegistry::isSupportedImageResourceMIMEType):
        (WebCore::MIMETypeRegistry::isSupportedNonImageMIMEType):
        (WebCore::MIMETypeRegistry::isJavaAppletMIMEType):
        (WebCore::MIMETypeRegistry::getSupportedImageMIMETypes):
        (WebCore::MIMETypeRegistry::getSupportedImageResourceMIMETypes):
        (WebCore::MIMETypeRegistry::getSupportedNonImageMIMETypes):
        * platform/MIMETypeRegistry.h: Copied from platform/MimeTypeRegistry.h.
        * platform/MimeTypeRegistry.cpp: Removed.
        * platform/MimeTypeRegistry.h: Removed.
        * platform/gdk/MIMETypeRegistryGdk.cpp: Copied from platform/gdk/MimeTypeRegistryGdk.cpp.
        (WebCore::MIMETypeRegistry::getMIMETypeForExtension):
        * platform/gdk/MimeTypeRegistryGdk.cpp: Removed.
        * platform/graphics/BitmapImage.cpp:
        * platform/graphics/Image.cpp:
        (WebCore::Image::supportsType):
        * platform/mac/DragDataMac.mm:
        * platform/mac/MIMETypeRegistryMac.mm: Copied from platform/mac/MimeTypeRegistryMac.mm.
        (WebCore::MIMETypeRegistry::getMIMETypeForExtension):
        (WebCore::MIMETypeRegistry::getExtensionsForMIMEType):
        (WebCore::MIMETypeRegistry::getPreferredExtensionForMIMEType):
        * platform/mac/MimeTypeRegistryMac.mm: Removed.
        * platform/mac/PasteboardMac.mm:
        (WebCore::Pasteboard::writeImage):
        * platform/qt/MIMETypeRegistryQt.cpp: Copied from platform/qt/MimeTypeRegistryQt.cpp.
        (WebCore::MIMETypeRegistry::getMIMETypeForExtension):
        * platform/qt/MimeTypeRegistryQt.cpp: Removed.
        * platform/win/MIMETypeRegistryWin.cpp: Copied from platform/win/MimeTypeRegistryWin.cpp.
        (WebCore::MIMETypeRegistry::getPreferredExtensionForMIMEType):
        (WebCore::MIMETypeRegistry::getMIMETypeForExtension):
        * platform/win/MimeTypeRegistryWin.cpp: Removed.
        * rendering/RenderPartObject.cpp:
        (WebCore::RenderPartObject::updateWidget):
        * xml/xmlhttprequest.cpp: Removed.
        * xml/xmlhttprequest.h: Removed.
        * xml/XMLHttpRequest.cpp: Copied from xml/xmlhttprequest.cpp.
        * xml/XMLHttpRequest.h: Copied from xml/xmlhttprequest.h.

2007-07-18  Sam Weinig  <sam@webkit.org>

        Rubber-stamped by Adam Roben.

        Rename csshelper.h, csshelper.cpp, cssparser.h, cssparser.cpp,
        cssstyleselector.h, and cssstyleselector.cpp to be CamelCase.

        * WebCore.pro:
        * WebCore.vcproj/WebCore.vcproj:
        * bindings/objc/DOM.mm:
        * bindings/objc/DOMHTML.mm:
        * css/CSSGrammar.y:
        * css/CSSMediaRule.cpp:
        * css/CSSMutableStyleDeclaration.cpp:
        * css/CSSPrimitiveValue.cpp:
        * css/CSSStyleSheet.cpp:
        * css/MediaList.cpp:
        * css/MediaQueryExp.cpp:
        * css/csshelper.cpp: Removed.
        * css/csshelper.h: Removed.
        * css/CSSHelper.cpp: Copied from css/csshelper.cpp.
        * css/CSSHelper.h: Copied from css/csshelper.h.
        * css/cssparser.cpp: Removed.
        * css/cssparser.h: Removed.
        * css/CSSParser.cpp: Copied from css/cssparser.cpp.
        * css/CSSParser.h: Copied from css/cssparser.h.
        * css/cssstyleselector.cpp: Removed.
        * css/cssstyleselector.h: Removed.
        * css/CSSStyleSelector.cpp: Copied from css/cssstyleselector.cpp.
        * css/CSSStyleSelector.h: Copied from css/cssstyleselector.h.
        * dom/Document.cpp:
        * dom/Element.cpp:
        * dom/StyledElement.cpp:
        * editing/ApplyStyleCommand.cpp:
        * editing/markup.cpp:
        * html/CanvasGradient.cpp:
        * html/CanvasRenderingContext2D.cpp:
        * html/CanvasStyle.cpp:
        * html/HTMLAnchorElement.cpp:
        * html/HTMLBaseElement.cpp:
        * html/HTMLBodyElement.cpp:
        * html/HTMLDocument.cpp:
        * html/HTMLEmbedElement.cpp:
        * html/HTMLFormElement.cpp:
        * html/HTMLFrameElementBase.cpp:
        * html/HTMLImageElement.cpp:
        * html/HTMLImageLoader.cpp:
        * html/HTMLLinkElement.cpp:
        * html/HTMLObjectElement.cpp:
        * html/HTMLOptGroupElement.cpp:
        * html/HTMLOptionElement.cpp:
        * html/HTMLSelectElement.cpp:
        * html/HTMLTableElement.cpp:
        * html/HTMLTablePartElement.cpp:
        * html/HTMLTokenizer.cpp:
        * ksvg2/css/SVGCSSParser.cpp:
        * ksvg2/css/SVGCSSStyleSelector.cpp:
        * ksvg2/svg/SVGAElement.cpp:
        * ksvg2/svg/SVGClipPathElement.cpp:
        * ksvg2/svg/SVGGradientElement.cpp:
        * ksvg2/svg/SVGLength.cpp:
        * ksvg2/svg/SVGMaskElement.cpp:
        * ksvg2/svg/SVGStyledElement.cpp:
        * ksvg2/svg/SVGUseElement.cpp:
        * page/DOMWindow.cpp:
        * page/mac/FrameMac.mm:
        * page/mac/WebCoreFrameBridge.mm:
        * rendering/HitTestResult.cpp:
        * rendering/RenderObject.cpp:
        * rendering/RenderStyle.cpp:
        * rendering/RenderThemeMac.mm:

2007-07-18  Brady Eidson  <beidson@apple.com>

        Rubberstamped by Adam

        * platform/win/SharedBufferWin.cpp:
        (WebCore::SharedBuffer::createWithContentsOfFile): Correct license on this newly checked in file from yesterday

2007-07-18  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Oliver.

        - fixed <rdar://problem/5340603> REGRESSION: javascript being written to the screen in Safari

        Test Case: fast/tokenizer/badscript.html
        
        * html/HTMLTokenizer.cpp:
        (WebCore::HTMLTokenizer::parseTag): Don't apply our self-closing
        <script> quirk in cases where the / appears in a mangled attribtue
        value.

2007-07-17  Peter Kasting  <zerodpx@gmail.com>

        Reviewed by Hyatt.

        http://bugs.webkit.org/show_bug.cgi?id=13618
        Don't set link targets to "_blank" on middle-click; rely on the policy
        delegate to do the right thing.

        * html/HTMLAnchorElement.cpp:
        (WebCore::HTMLAnchorElement::defaultEventHandler):

2007-07-17  Oliver Hunt  <oliver@apple.com>

        Reviewed by Maciej.

        Fix for <rdar://problem/4799967> Safari and other WebKit 
        apps sometimes crash in WebCore::FontData::platformInit

        Always retain/release our font handle, instead of only retaining
        in the presence of GC.

        * platform/mac/FontPlatformData.h:
        (WebCore::FontPlatformData::FontPlatformData):
        (WebCore::FontPlatformData::~FontPlatformData):

2007-07-17  Sam Weinig  <sam@webkit.org>

        Reviewed by Geoff Garen.

        Fix for <rdar://problem/5333957>
                http://bugs.webkit.org/show_bug.cgi?id=14610

        Original patch by Feng Qian.

        - Clear the selection object when disconnecting a frame.

        Test: http/tests/security/cross-frame-access-selection.html

        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::clear):
        * page/DOMWindow.cpp:
        (WebCore::DOMWindow::disconnectFrame):
        (WebCore::DOMWindow::clear):
        * page/DOMWindow.h:
        * page/Frame.cpp:
        (WebCore::Frame::clearScriptProxy):
        (WebCore::Frame::clearDOMWindow):
        * page/Frame.h:

2007-07-17  Oliver Hunt  <oliver@apple.com>

        Reviewed by Sam.

        Fix for <rdar://problem/5154518> REGRESSION: Hitting return does
        nothing in ruby terminal at http://tryruby.hobix.com/

        Calling event.preventDefault() during a keydown event should not 
        prevent the keypress event from firing.

        * WebCore.xcodeproj/project.pbxproj:
        * page/EventHandler.cpp:
        (WebCore::EventHandler::keyEvent):
        (WebCore::EventHandler::defaultKeyboardEventHandler):

2007-07-17  Anders Carlsson  <andersca@apple.com>

        Reviewed by Geoff.

        <rdar://problem/4993463> 
        http://bugs.webkit.org/show_bug.cgi?id=12732
        REGRESSION: Comments fields on ircimages not showing up in nightly

        Postpone setting the frame name to just right before we request the frame. Otherwise, 
        two calls to FrameTree::uniqueChildName will return the same frame name and in that case only
        one Frame object will actually be created and multiple iframe elements will refer to it.
        
        * html/HTMLFrameElementBase.cpp:
        (WebCore::HTMLFrameElementBase::openURL):
        (WebCore::HTMLFrameElementBase::setNameAndOpenURL):
        (WebCore::HTMLFrameElementBase::setNameAndOpenURLCallback):
        (WebCore::HTMLFrameElementBase::insertedIntoDocument):
        (WebCore::HTMLFrameElementBase::attach):
        * html/HTMLFrameElementBase.h:

2007-07-17  Brady Eidson  <beidson@apple.com>

        Reviewed by Steve

        Required for <rdar://problem/4516185> - FTP Directory Listings

        * WebCore.vcproj/WebCore.vcproj: Added SharedBufferWin
        
        * platform/SharedBuffer.cpp: Windows doesn't get the default empty resource anymore
        * platform/win/SharedBufferWin.cpp: Added.
        (WebCore::SharedBuffer::createWithContentsOfFile):

2007-07-17  Brady Eidson  <beidson@apple.com>

        Reviewed by Tim Hatcher

        Tweak the class names we give to the icon table cell to make it easier to style

        * loader/FTPDirectoryDocument.cpp:
          (WebCore::FTPDirectoryTokenizer::appendEntry): The the table cell a "IconCell" class name and
          either a "FileType" or "DirectoryType" class name depending on the type

2007-07-17  Holger Hans Peter Freyther  <zecke@selfish.org>

        Reviewed by NOBODY.

        Build fix after r24366 add an additional ResourceRequest parameter to
        the download method.

        * loader/gdk/FrameLoaderClientGdk.cpp:
        (WebCore::FrameLoaderClientGdk::download):
        * loader/gdk/FrameLoaderClientGdk.h:

2007-07-17  Adam Roben  <aroben@apple.com>

        Fix Bug 14324: Cannot remove/customize the "Inspect Element" contextual menu item
        http://bugs.webkit.org/show_bug.cgi?id=14324

        Reviewed by Tim.

        No regression test possible.

        * page/ContextMenuController.cpp:
        (WebCore::ContextMenuController::handleContextMenuEvent): Add the
        Inspect Element item to the menu before passing it to the
        ContextMenuClient so that the UI delegate has a chance to
        modify/remove the item.

2007-07-17  Adam Roben  <aroben@apple.com>

        Remove ContextMenuClient::shouldIncludeInspectElementItem

        Reviewed by Tim.

        No regression test possible.

        * page/ContextMenuClient.h:
        * page/ContextMenuController.cpp:
        (WebCore::ContextMenuController::handleContextMenuEvent): Use Settings
        to determine whether to include the Inspect Element item.
        * page/gdk/ContextMenuClientGdk.cpp:
        * page/gdk/ContextMenuClientGdk.h:
        * platform/graphics/svg/SVGImageEmptyClients.h:

2007-07-17  Adam Roben  <aroben@apple.com>

        Initialize ContextMenuController::m_page

        Somehow this variable had never been initialized before.

        Reviewed by Tim.

        * page/ContextMenuController.cpp:
        (WebCore::ContextMenuController::ContextMenuController):
        * page/ContextMenuController.h:
        * page/Page.cpp:
        (WebCore::Page::Page):

2007-07-17  Adam Roben  <aroben@apple.com>

        Add Settings::developerExtrasEnabled

        Reviewed by Tim.

        * WebCore.exp:
        * page/Settings.cpp:
        * page/Settings.h:

2007-07-17  Justin Garcia  <justin.garcia@apple.com>

        Reviewed by Antti.

        <rdar://problem/5206311> 
        Whitespace can't be removed when editing text pasted into from web page
        
        The whitespace comes from table rows that aren't being removed after they are
        emptied out during a deletion.

        * editing/DeleteSelectionCommand.cpp:
        (WebCore::isTableCell):
        (WebCore::isTableRow):
        (WebCore::isTableCellEmpty):
        (WebCore::isTableRowEmpty):
        (WebCore::DeleteSelectionCommand::initializePositionData): Remember the table
        rows that contained the start and end of the selection.
        (WebCore::DeleteSelectionCommand::removePreviouslySelectedEmptyTableRows):
        Remove table rows that come before the end of the selection
        that was removed (except for the row that contained the start of the selection
        and any before that).
        Remove table rows that are come after the start of the selection
        that was removed (except for the row that contained the end of the selection
        and any after that).
        (WebCore::DeleteSelectionCommand::doApply): Call the new function.
        * editing/DeleteSelectionCommand.h:

2007-07-17  Geoffrey Garen  <ggaren@apple.com>

        Reviewed by Kevin Decker.

        Removed ASSERT that was breaking the pageout test. It's trivial to
        reproduce this ASSERT when navigating between pages that change their
        names, but nothing bad seems to happen.

        * page/Page.cpp:
        (WebCore::Page::goToItem):

2007-07-17  Geoffrey Garen  <ggaren@apple.com>

        Build fix.
        
        * plugins/win/PluginViewWin.cpp: Pass false for lockHistory like we
        do elsewhere.

2007-07-17  Holger Hans Peter Freyther  <zecke@selfish.org>

        Reviewed by Maciej.

        Implement the callback responsible for handling HTTP headers. This
        callback gets called for every header.
        We will add these headers to our ResourceResponse and on the 'end-of-header'
        indicator we will update the ResourceResponse and dispatch it.

        This patch adds various set methods to ResourceResponse. This improves
        the readability of the headerCallback and avoids storing a CURL handle inside
        the ResourceResponse which would be needed to implement ResourceResponse::doUpdateResourceResponse

        Add a destructor for ResourceHandleManager which would free the resources and remove
        a unused variable.

        * platform/network/ResourceHandleInternal.h:
        (WebCore::ResourceHandleInternal::ResourceHandleInternal):
        * platform/network/ResourceResponse.cpp:
        (WebCore::ResourceResponse::setUrl):
        (WebCore::ResourceResponse::setMimeType):
        (WebCore::ResourceResponse::setExpectedContentLength):
        (WebCore::ResourceResponse::setTextEncodingName):
        (WebCore::ResourceResponse::setSuggestedFilename):
        * platform/network/ResourceResponse.h:
        * platform/network/curl/ResourceHandleCurl.cpp:
        (WebCore::ResourceHandleInternal::~ResourceHandleInternal):
        * platform/network/curl/ResourceHandleManager.cpp:
        (WebCore::ResourceHandleManager::~ResourceHandleManager):
        (WebCore::ResourceHandleManager::sharedInstance):
        (WebCore::headerCallback):
        * platform/network/curl/ResourceHandleManager.h:

2007-07-17  Sam Weinig  <sam@webkit.org>

        Reviewed by Adam Roben.

        Convert JS undefined to the empty string when calling alert, confirm, and prompt. 

        Test: fast/dom/Window/alert-undefined.html

        * page/DOMWindow.idl:

2007-07-17  Geoffrey Garen  <ggaren@apple.com>

        Reviewed by Kevin McCulough.

        Fixed failing layout test.
        
        Renamed "FrameLoadTypeInternal" to "FrameLoadTypeRedirectWithLockedHistory".
        This is almost certainly not a correct name for the original intent
        of this load type, but it's a correct name for its current behavior.
        
        (WebCore::FrameLoader::updateHistoryForRedirectWithLockedHistory):
        When history is supposed to be locked, and no current history item
        exists, only add a new history item if you're the top-level frame.
        
        This rule, combined with the rule that setting iframe.src should not
        create a history item, is pretty hackish. On the other hand, it
        matches WinIE and doesn't cause any test regressions. So I'm OK with
        it as a short-term solution until the solution described in 
        <rdar://problem/5339292> can be implemented.

2007-07-17  Tristan O'Tierney  <tristan@apple.com>

        Reviewed by Maciej Stachowiak.

        <rdar://problem/5294691> Source of file is misrepresented if downloaded by typing in URL in Safari address bar

        * loader/FrameLoaderClient.h:
        * loader/MainResourceLoader.cpp:        
        (WebCore::MainResourceLoader::continueAfterContentPolicy):
        Added an extra request parameter, initialRequest, to the download() method
        by passing up the resource handle's request.
        
        * platform/graphics/svg/SVGImageEmptyClients.h:
        (WebCore::SVGEmptyFrameLoaderClient::download):
        Added an extra parameter to the empty SVG download method.
        
2007-07-17  Antti  <antti@apple.com>

        Reviewed by home-bradee.

        <rdar://problem/5336372>
        Icon database uses too much memory
        
        XRaying Safari startup memory consumption revealed that icon database is eating quite
        a bit of RAM if Icon.db is large (which it probably is if it has been in use for a while, 
        mine used for getting figures below was 2.6MB). 
        
        Note that the wins are less impressive with smaller Icon.db.
        
        This patch addresses three separate issues
        
        - SQLite fails to free the memory used by temporary tables. Icon database uses a temporary table
          on startup for pruning unused page urls. This wastes around 1MB. Addressed by rewriting
          pruning so it does not need a temporary table. The new method is also quite a bit faster speeding
          up Safari launch time by around 100ms
        - SQLite has it's own memory cache limited by default to 3MB. Icon database does not really need that much.
          Dropped the cache size to 300kB saving ~1MB on startup. 
          Smaller cache slows down startup by ~30ms (more than compensated by faster pruning above)
        - Don't populate m_pageURLToIconURLMap with all urls from database on startup, instead let it get populated
          when urls are accessed (user opens history menu for example). This shouldn't have any real performance impact 
          as the accesses are icon loads that need to hit the database anyway. This saves ~700kB.
          
        All in all with this Icon.db these changes reduce allocated memory by around 2.7MB on startup. Release build
        Safari RPRVT (empty start page) goes from 12.4MB to 10.4MB (TCMalloc pooling probably explaining why the win 
        looks bit smaller here).

        * loader/icon/IconDatabase.cpp:
        (WebCore::IconDatabase::IconDatabase):
        (WebCore::IconDatabase::open):
        (WebCore::IconDatabase::deleteAllPreparedStatements):
        (WebCore::IconDatabase::retainIconForPageURL):
        (WebCore::IconDatabase::releaseIconForPageURL):
        (WebCore::IconDatabase::establishIconIDForIconURL):
        (WebCore::IconDatabase::pruneUnretainedIconsOnStartup):
        * loader/icon/IconDatabase.h:

2007-07-17  Darin Adler  <darin@apple.com>

        Reviewed by Mitz.

        - fix http://bugs.webkit.org/show_bug.cgi?id=14569
          Repro crash due to saved state not being cleared when select and textarea elements
          are adopted by another document

        Test: fast/forms/saved-state-adoptNode-crash.html

        * dom/Document.h:
        (WebCore::Document::registerFormElementWithState): Updated parameter type to be
        HTMLFormControlElementWithState.
        (WebCore::Document::unregisterFormElementWithState): Ditto.
        Also removed isFormElementRegistered function and changed the type of the
        m_formElementsWithState ListHashSet.
        * dom/Document.cpp: (WebCore::Document::formElementsState): Updated to use new type,
        for set contents and to use new saveState() function and only save state for elements
        that return true.

        * html/HTMLGenericFormElement.h: Added HTMLFormControlElementWithState class,
        derived from HTMLGenericFormElement, and moved down all the behavior related to
        saving form control element state. Also removed the unnecessary default parameter
        to the HTMLGenericFormElement constructor.
        * html/HTMLGenericFormElement.cpp:
        (WebCore::HTMLFormControlElementWithState::HTMLFormControlElementWithState): Added.
        Calls registerFormElementWithState.
        (WebCore::HTMLFormControlElementWithState::~HTMLFormControlElementWithState): Added.
        Calls unregisterFormElementWithState.
        (WebCore::HTMLFormControlElementWithState::willMoveToNewOwnerDocument): Added.
        Calls unregisterFormElementWithState.
        (WebCore::HTMLFormControlElementWithState::didMoveToNewOwnerDocument): Added.
        Calls registerFormElementWithState.
        (WebCore::HTMLFormControlElementWithState::closeRenderer): Moved to this class from
        the base class.

        * html/HTMLInputElement.h: Updated the base class name and overrode saveState instead
        of stateValue.
        * html/HTMLInputElement.cpp: Updated the base class name.
        (WebCore::HTMLInputElement::init): Removed the call to registerFormElementWithState.
        (WebCore::HTMLInputElement::~HTMLInputElement): Removed the call to
        unregisterFormElementWithState. Also changed the code to only call the
        unregisterForDidRestoreFromCacheCallback function for type PASSWORD (consistency
        and efficiency).
        (WebCore::HTMLInputElement::setInputType): Removed calls to registerFormElementWithState
        and unregisterFormElementWithState; we now let the element stay registered and simply
        don't save or restore state for password fields.
        (WebCore::HTMLInputElement::saveState): Updated function name and signature to replace
        the old stateValue function. Returns false for password fields.
        (WebCore::HTMLInputElement::willMoveToNewOwnerDocument): Removed the call to
        unregisterFormElementWithState.
        (WebCore::HTMLInputElement::didMoveToNewOwnerDocument): Removed the call to
        registerFormElementWithState.

        * html/HTMLSelectElement.h: Updated the base class name and overrode saveState instead
        of stateValue.
        * html/HTMLSelectElement.cpp: Updated the base class name.
        (WebCore::HTMLSelectElement::HTMLSelectElement): Removed the call to
        registerFormElementWithState.
        (WebCore::HTMLSelectElement::~HTMLSelectElement): Removed the call to
        unregisterFormElementWithState.
        (WebCore::HTMLSelectElement::saveState): Updated function name and signature to
        replace the old stateValue function.
        (WebCore::HTMLSelectElement::setLength): Updated to use document() instead of
        ownerDocument(); the latter is just a slower virtual-function way of doing the
        same thing in all cases except for Document and XPathNamespace.

        * html/HTMLTextAreaElement.h: Update the base class name, overrode saveState instead
        of stateValue, and removed the now-unnecessary explicit destructor.
        * html/HTMLTextAreaElement.cpp: Updated the base class name.
        (WebCore::HTMLTextAreaElement::HTMLTextAreaElement): Removed the call to
        registerFormElementWithState.
        (WebCore::HTMLTextAreaElement::saveState): Updated function name and signature to replace
        the old stateValue function.

2007-07-17  Sam Weinig  <sam@webkit.org>

        Reviewed by Darin.

        - Make HTMLFrameOwnerElement::contentWindow() return a DOMWindow instead of a Frame
        - Remove the unnecessary hack in HTMLFrameElement.idl and HTMLIFrameElement.idl that
          converted from Frame to Window now that it is not necessary.
        - Remove now unused [NullCheck] extended attribute from CodeGeneratorJS.pm.

        * bindings/scripts/CodeGeneratorJS.pm:
        * html/HTMLDocument.idl:
        * html/HTMLFrameElement.idl:
        * html/HTMLFrameOwnerElement.cpp:
        (WebCore::HTMLFrameOwnerElement::contentWindow):
        * html/HTMLFrameOwnerElement.h:
        * html/HTMLIFrameElement.idl:

2007-07-16  Sam Weinig  <sam@webkit.org>

        Reviewed by Adam Roben.

        Move self, opener, parent, top, window, and frames from kjs_window
        to DOMWindow and auto-generate the bindings for them.

        * bindings/js/kjs_window.cpp:
        (KJS::Window::getValueProperty):
        * bindings/js/kjs_window.h:
        (KJS::Window::):
        * page/DOMWindow.cpp:
        (WebCore::DOMWindow::self):
        (WebCore::DOMWindow::opener):
        (WebCore::DOMWindow::parent):
        (WebCore::DOMWindow::top):
        * page/DOMWindow.h:
        (WebCore::DOMWindow::window):
        (WebCore::DOMWindow::frames):
        * page/DOMWindow.idl:

2007-07-16  Geoffrey Garen  <ggaren@apple.com>

        Reviewed by Sam Weinig.
        
        Fixed <rdar://problem/5334483> REGRESSION: JavaScript-induced 
        window.open loads not added to back/forward list
        
        I did an audit of our history rules in loading and tried to establish
        some sane uniformity.
        
        The uniform rule is:
            - HTTP redirects and HTTP redirects simulated by <meta http-equiv>
            add a history item if and only if the redirect takes > 1 second.
            - Other navigations, including JavaScript navigations, always
            add a history item, except for location.replace navigations.

        In the future, we'll want to refine the second case to be more like the
        first. I've filed <rdar://problem/5339292> about that.

        * bindings/js/JSHTMLDocumentCustom.cpp:
        (WebCore::JSHTMLDocument::setLocation): Don't pass 'true' for 
        userGesture unconditionally. userGesture is used to determine popup 
        blocking, not history item creation.

        * bindings/js/kjs_window.cpp: Pass 'false' for lockHistory in all loads
        except location.replace, which intends to lock history.

        * loader/FrameLoader.cpp: Distinguish between lockHistory and 
        userGesture. The former determines whether a new history item gets
        created. The latter determines whether JavaScript can open popup
        windows. Start passing these variables in functions that used to
        swallow or conflate them.
        
        (WebCore::FrameLoader::requestFrame): Pass 'true' for lockHistory here
        because that's usually correct when setting the 'src' attribute of a
        child frame, and we want to avoid regressing <rdar://problem/4921797>.

        (WebCore::FrameLoader::load): Use the lockHistory variable to determine
        whether to start a history-creating load. Using userGesture for this
        purpose is wrong, as explained above.

        * loader/FrameLoader.h: Renamed one variant of scheduleRedirection to
        scheduleHTTPRedirection because the behavior there of measuring elapsed
        time is specific to the HTTP redirection case.

        * page/ContextMenuController.cpp:
        (WebCore::ContextMenuController::contextMenuItemSelected): lockHistory
        can always be false here because this navigation is never the result of
        a redirection.

2007-07-16  Sam Weinig  <sam@webkit.org>

        Reviewed by Adam and Maciej.

        Move the frameElement attribute from kjs_window to DOMWindow and
        auto-generate the bindings for it. 

        * bindings/js/kjs_window.cpp:
        (KJS::Window::getValueProperty):
        * bindings/js/kjs_window.h:
        (KJS::Window::):
        * bindings/scripts/CodeGeneratorJS.pm:
        * page/DOMWindow.cpp:
        (WebCore::DOMWindow::frameElement):
        (WebCore::DOMWindow::devicePixelRatio):
        * page/DOMWindow.h:
        * page/DOMWindow.idl:

2007-07-16  Sam Weinig  <sam@webkit.org>

        Reviewed by Adam.

        Move more functions from kjs_window to DOMWindow and auto-generate
        the bindings for them.

        * bindings/js/kjs_window.cpp:
        (KJS::WindowFunc::callAsFunction):
        * bindings/js/kjs_window.h:
        (KJS::Window::):
        * page/DOMWindow.cpp:
        (WebCore::DOMWindow::print):
        (WebCore::DOMWindow::stop):
        (WebCore::DOMWindow::alert):
        (WebCore::DOMWindow::confirm):
        (WebCore::DOMWindow::prompt):
        (WebCore::DOMWindow::find):
        * page/DOMWindow.h:
        * page/DOMWindow.idl:

2007-07-17  Mark Rowe  <mrowe@apple.com>

        Gdk build fix.

        * platform/gdk/ChromeClientGdk.h:

2007-07-16  Brady Eidson  <beidson@apple.com>

        Reviewed by Adam

        Begin the arduous task of localizing FTP directory listings while removing a global initializer!

        * loader/FTPDirectoryDocument.cpp:
        (WebCore::processFilesizeString):

        * page/mac/WebCoreViewFactory.h:

        * platform/LocalizedStrings.h:

        * platform/gdk/TemporaryLinkStubs.cpp:
        (WebCore::unknownFileSizeText):

        * platform/mac/LocalizedStringsMac.mm:
        (WebCore::unknownFileSizeText):

        * platform/qt/Localizations.cpp:
        (WebCore::unknownFileSizeText):

2007-07-16  Sam Weinig  <sam@webkit.org>

        Reviewed by Oliver.

        Remove more redundant isSafeScript checks.

        * bindings/js/kjs_window.cpp:
        (KJS::Window::getOwnPropertySlot):

2007-07-16  Sam Weinig  <sam@webkit.org>

        Reviewed by Oliver.

        Turn off -Wshorten-64-to-32 warning for 64-bit builds.

        * Configurations/Base.xcconfig:

2007-07-16  Anders Carlsson  <andersca@apple.com>

        Reviewed by Oliver.

        <rdar://problem/5336276>
        ASSERT(cs->accessCount() > 0) when instantiating widget templates in DashCode

        If the cache is disabled, accessCount will always be 0. Account for this in the assert.
        
        * html/HTMLTokenizer.cpp:
        (WebCore::HTMLTokenizer::reset):
        (WebCore::HTMLTokenizer::notifyFinished):

2007-07-16  Brady Eidson  <beidson@apple.com>

        Reviewed by Darin.

        Append FTP row entries to the first TBODY instead of the TABLE element itself, 
        as many TABLE elements end up with an implicit TBODY and that's where most people would
        expect it to be added.

        * html/HTMLTableElement.h:
        (WebCore::HTMLTableElement::firstTBody): Added this accessor

        * loader/FTPDirectoryDocument.cpp:
        (WebCore::FTPDirectoryTokenizer::appendEntry): Add to the first tbody if it exists

2007-07-16  Justin Garcia  <justin.garcia@apple.com>

        Reviewed by Adele.

        <rdar://problem/5240265> 
        REGRESSION: Clicking a <button> clears the selection in contenteditable areas

        * page/FocusController.cpp:
        (WebCore::clearSelectionIfNeeded): Don't clear the selection if
        the mouse press that caused the focus shift occurred in 
        a -webkit-user-select: ignore region.

2007-07-16  David Hyatt  <hyatt@apple.com>

        Fix for 5335829, avoid creating a pathological # of FontData objects
        on Windows.  The MLang service actually caches and reuses HFONTs, which
        means it is safe to use our FontPlatformData -> FontData cache.

        Reviewed by olliej

        * platform/win/FontCacheWin.cpp:
        (WebCore::FontCache::getFontDataForCharacters):

2007-07-16  Adam Roben  <aroben@apple.com>

        Added a manual test to test calling window.print on a subframe.

        Reviewed by Darin.

        * manual-tests/resources/print-subframe.html: Added.
        * manual-tests/window-print-subframe.html: Added.

2007-07-16  Adam Roben  <aroben@apple.com>

        Replace Frame::print with Chrome::print

        This also adds a Frame* parameter to Chrome::print and
        ChromeClient::print so that it knows which Frame to print.

        Reviewed by Darin.

        All tests pass.

        * bindings/js/kjs_window.cpp:
        (KJS::WindowFunc::callAsFunction): Call Chrome::print.
        * editing/JSEditor.cpp: Ditto.

        * bridge/win/FrameWin.cpp: Removed Frame::print.
        * page/Frame.h: Ditto.
        * page/mac/FrameMac.mm: Ditto.
        * page/qt/FrameQt.cpp: Ditto.
        * platform/gdk/FrameGdk.cpp: Ditto.
        * page/mac/WebCoreFrameBridge.h: Removed -print.

        * page/Chrome.cpp: Added Frame* parameter to Chrome::print and pass it
        up to the ChromeClient.
        * page/Chrome.h: Ditto.
        * page/ChromeClient.h: Ditto.
        * platform/gdk/TemporaryLinkStubs.cpp: Ditto.
        * platform/graphics/svg/SVGImageEmptyClients.h: Ditto.

2007-07-16  Adele Peterson  <adele@apple.com>

        Reviewed by Brady.

        Fix for <rdar://problem/5321490> REGRESSION: visibility:hidden property doesn't hide parts of file input element and listbox
        http://bugs.webkit.org/show_bug.cgi?id=14565

        Tests:
        fast/forms/hidden-input-file.html
        fast/forms/hidden-listbox.html

        * rendering/RenderFileUploadControl.cpp: (WebCore::RenderFileUploadControl::paintObject):
        Only paint if the control is supposed to be visible.
        * rendering/RenderListBox.cpp: (WebCore::RenderListBox::paintObject):
        ditto.  We already had checks to prevent drawing the text that considered the option's style too, but if visibility: hidden
        was just set on the listbox then a lot of extra work was being done, and the scrollbar was drawing too.  This change fixes that.

2007-07-16  David Hyatt  <hyatt@apple.com>

        Fix for Radar 5338081, text-shadow should be reset on form controls so that
        it doesn't inherit in when set e.g., on the <body>.

        Reviewed by beth

        * css/html4.css:

2007-07-16  Holger Hans Peter Freyther  <zecke@selfish.org>

        Reviewed by Niko.

        FrameView, PlatformScrollbar and changes to the way we draw

        Fix the lifetime of PlatformScrollbar, use a default width and
        height and fix drawing of the PlatformScrollbar and other widgets
        the following way: FrameGdk handles the expose events of the Frame
        and will make the frame redraw and now it will draw the childrent of
        the FrameView as well. This approach has the issue of honoring the
        z-order of elements inside the RenderTree. Honoring the z-order will
        be a bit more work

        Widget can now handle Widget::setGtkWidget call where the GtkWidget
        has not yet a GdkWindow allocated. We will lazily set the GdkDrawable.

        In preparation of honoring the z-order of the RenderTree for RenderWidgets
        it is started to store native objects inside the GraphicsContext. Doing this
        nicely eliminates the need of RenderThemeGdk to do any drawing to a temporary
        GdkPixmap. This should fix themes with rounded buttons.

        ScrollView implement add- and removeChild to get a working PlatformScrollbar


        * platform/Widget.h:
        * platform/gdk/FrameGdk.cpp:
        (frame_gdk_expose_child): Will send the expose to all children
        (WebCore::FrameGdk::handleGdkEvent): Painting changes, move to mouseMoved
        * platform/gdk/PlatformScreenGdk.cpp:
        (WebCore::screenDepth): gdkDrawable
        * platform/gdk/PlatformScrollBarGdk.cpp:
        (PlatformScrollbar::PlatformScrollbar): Fix ownership
        (PlatformScrollbar::~PlatformScrollbar): Fix ownership
        (PlatformScrollbar::paint): Widget::paint will do the right thing soon
        * platform/gdk/RenderThemeGdk.cpp: No need for using a GdkPixmap, draw directly
        (WebCore::RenderThemeGdk::paintCheckbox): No need for using a GdkPixmap, draw directly
        (WebCore::RenderThemeGdk::paintRadio): No need for using a GdkPixmap, draw directly
        (WebCore::RenderThemeGdk::paintButton): No need for using a GdkPixmap, draw directly
        * platform/gdk/RenderThemeGdk.h: remove the copyContext call
        * platform/gdk/ScrollViewGdk.cpp: gdkDrawable
        (WebCore::ScrollView::updateView): gdkDrawable
        (WebCore::ScrollView::update): clear the area to fix repainting issues
        (WebCore::ScrollView::setGtkWidget): gdkDrawable
        (WebCore::ScrollView::addChild): implement
        (WebCore::ScrollView::removeChild): implement
        * platform/gdk/TemporaryLinkStubs.cpp: Not needed header removed
        * platform/gdk/WidgetGdk.cpp:
        (WebCore::Widget::gdkDrawable): Renamed from drawable
        (WebCore::Widget::setGtkWidget): use gdkDrawable
        (WebCore::Widget::setCursor): gdkDrawable
        (WebCore::Widget::show): gdkDrawable
        (WebCore::Widget::hide): gdkDrawable
        * platform/graphics/GraphicsContext.h: Allow to set the GdkDrawable, e.g. used inside a expose event
        * platform/graphics/cairo/GraphicsContextCairo.cpp:
        (WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate):
        (WebCore::GraphicsContext::setGdkDrawable):
        (WebCore::GraphicsContext::gdkDrawable):

2007-07-16  Holger Hans Peter Freyther  <zecke@selfish.org>

        Reviewed by Maciej.

        Lazily update the scrollbars (e.g. on loading a page) to
        generate less expose events, which will lead to laying out less often
         and will fix http://bugs.webkit.org/show_bug.cgi?id=14020.

        * platform/gdk/ScrollViewGdk.cpp:
        (WebCore::ScrollView::ScrollViewPrivate::ScrollViewPrivate):
        (WebCore::ScrollView::update):
        (WebCore::ScrollView::resizeContents):
        (WebCore::ScrollView::updateScrollbars):

2007-07-16  Rob Buis  <buis@kde.org>

        Reviewed by Maciej.

        http://bugs.webkit.org/show_bug.cgi?id=14462
        non empty <style> element doesn't work

        Return an empty sheet for empty <style> elements
        instead of a null sheet. Clean up StyleElement a bit.

        * dom/StyleElement.cpp:
        (WebCore::StyleElement::StyleElement):
        (WebCore::StyleElement::sheet):
        (WebCore::StyleElement::childrenChanged):
        (WebCore::StyleElement::createSheet):
        * dom/StyleElement.h:
        (WebCore::StyleElement::setLoading):
        * html/HTMLStyleElement.cpp:
        (WebCore::HTMLStyleElement::HTMLStyleElement):
        (WebCore::HTMLStyleElement::sheet):
        * html/HTMLStyleElement.h:
        (WebCore::HTMLStyleElement::setLoading):
        * ksvg2/svg/SVGStyleElement.cpp:
        (WebCore::SVGStyleElement::sheet):
        (WebCore::SVGStyleElement::sheetLoaded):
        * ksvg2/svg/SVGStyleElement.h:

2007-07-15  Oliver Hunt  <oliver@apple.com>

        Reviewed by Adam.

        Fix for fix for <rdar://problem/5336602> REGRESSION: tab characters
                        cannot be entered into text fields
                        http://bugs.webkit.org/show_bug.cgi?id=14032

        Need to use UChar not char.

        * html/HTMLInputElement.cpp:
        (WebCore::HTMLInputElement::constrainValue):

2007-07-15  Sam Weinig  <sam@webkit.org>

        Reviewed by Geoff Garen.

        Remove redundant calls to isSafeScript()

        * bindings/js/JSDOMWindowCustom.cpp:
        (WebCore::JSDOMWindow::customPut):
        * bindings/js/kjs_window.cpp:
        (KJS::Window::put):

2007-07-15  Geoffrey Garen  <ggaren@apple.com>

        Reviewed by Maciej Stachowiak.
        
        Removed incorrect error log, seen while running layout tests.
        
        Perhaps at some point FrameLoadTypeInteral had a specific meaning
        that prevented it from being used in non-child frame, non-redirect
        situations. However, that meaning has been lost and nobody remembers
        how to get it back.
        
        We currently use FrameLoadTypeInternal for any load that is not
        initiated by a user gesture, so it's trivial to produce this error
        log, even though nothing has gone wrong.

        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::updateHistoryForInternalLoad):

2007-07-15  Oliver Hunt  <oliver@apple.com>

        Reviewed by Maciej

        Fix for <rdar://problem/5336602> REGRESSION: tab characters cannot be entered into text fields
                http://bugs.webkit.org/show_bug.cgi?id=14032

        constrainValue attempted to block control characters from being inserted 
        by a simple less than ' ' check, which prevent tab characters from being
        inserted.  This patch adds an additional check to allow the tab character 
        again

        * html/HTMLInputElement.cpp:
        (WebCore::HTMLInputElement::constrainValue):

2007-07-14  Brady Eidson  <beidson@apple.com>

        Third shot at blind Qt/GDK build fix

        * platform/gdk/TemporaryLinkStubs.cpp:
        (FTPDirectoryDocument::createTokenizer):
        * platform/qt/TemporaryLinkStubs.cpp:
        (FTPDirectoryDocument::createTokenizer):

2007-07-14  Brady Eidson  <beidson@apple.com>

        Reviewed by Sam

        Windows build fix

        * WebCore.vcproj/WebCore.vcproj:

2007-07-14  Sam Weinig  <sam@webkit.org>

        Fix Tiger build.

        * config.h:

2007-07-14  Brady Eidson  <beidson@apple.com>

        Blind attempt at (hopefully) fixing the Qt and GDK builds

        * platform/gdk/TemporaryLinkStubs.cpp:
        (FTPDirectoryDocument::FTPDirectoryDocument):
        * platform/qt/TemporaryLinkStubs.cpp:
        (FTPDirectoryDocument::FTPDirectoryDocument):

2007-07-14  Brady Eidson  <beidson@apple.com>

        Reviewed by Sam Weinig

        Initial check-in for <rdar://problem/3154486> - Supporting FTP directory listings in the browser

        Development has taken place on both Leopard and Windows (windows enabling patch will follow shortly)
        Support will only exist on platforms whose network layers (ie, ResourceHandle) support piping the raw
        FTP Directory data into the engine.  

        This is known to include Leopard, Windows, and CURL based platforms - probably others
        Known incompatible platforms include Tiger.

        The FTP listing page is built in HTML.  An external HTML document can be provided as a template for the 
        directory listing.  This document is parsed, and expected to have a <table> with a certain class in it.
        As FTP directory listings come in, each entry is added to this table as a row.

        If no HTML template is provided to work with, a very basic empty document is hard coded that contains only 
        this special table.

        Upgrades to the look and feel of the directory listings can take place largely in this HTML template which,
        admittedly, is conspicuously absent in this initial checkin

        * WebCore.exp: New Settings symbols for WebKit
        * WebCore.xcodeproj/project.pbxproj:

        * config.h: If BUILDING_ON_TIGER, disable FTP directory listing support

        * dom/DOMImplementation.cpp:
        (WebCore::DOMImplementation::createDocument): Create an FTPDirectoryDocument if the mime type is 
          "application/x-ftp-directory"

        * loader/FTPDirectoryDocument.cpp: Added.
        (WebCore::FTPDirectoryTokenizer::isWaitingForScripts):
        (WebCore::FTPDirectoryTokenizer::checkBuffer):
        (WebCore::FTPDirectoryTokenizer::FTPDirectoryTokenizer): Building on HTML tokenizer, this facilitates 
          parsing FTP Directory listings in the engine
        (WebCore::FTPDirectoryTokenizer::appendEntry): Add a table row for a directory listing to the document
        (WebCore::FTPDirectoryTokenizer::createTDForFilename): Create the TD for the filename with the anchor in it

        (WebCore::processFilesizeString): Prettify the filesize
        (WebCore::wasLastDayOfMonth):
        (WebCore::processFileDateString): Prettify the date
        (WebCore::FTPDirectoryTokenizer::parseAndAppendOneLine):
        (WebCore::FTPDirectoryTokenizer::loadDocumentTemplate): Loads the HTML template that FTP directory listings
          can build on top of
        (WebCore::FTPDirectoryTokenizer::createBasicDocument): Creates a most basic document (body and one table) to
          append the rows to in case the document template is not loaded and parsed
        (WebCore::FTPDirectoryTokenizer::write): Add the FTP listing to the buffer and parse entries out of it
        (WebCore::FTPDirectoryTokenizer::finish): 

        (WebCore::FTPDirectoryDocument::FTPDirectoryDocument): Special document-type for FTP directory listings
        (WebCore::FTPDirectoryDocument::createTokenizer):
        * loader/FTPDirectoryDocument.h: Added.
        (WebCore::FTPDirectoryDocument::isImageDocument):
        
        * loader/FTPDirectoryParser.cpp: Added.
        (WebCore::parseOneFTPLine): Adapted from ParseFTPList.cpp from Firefox - parses most known
          FTP directory listing styles into discrete FTP directory entries
        * loader/FTPDirectoryParser.h: Added.
        (WebCore::ListState::ListState): Maintains FTP Parser state
        (WebCore::ListResult::ListResult): Represents one FTP directory listing
        (WebCore::ListResult::clear):

        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::checkContentPolicy): If the Settings say to bypass the policy check for 
          "application/x-ftp-directory", skip it.  This will allow people to test this feature even if their 
          browser/WebKit app would otherwise not allow it

        * page/Settings.cpp:
        (WebCore::Settings::Settings):
        (WebCore::Settings::setFTPDirectoryTemplatePath): Set the path to the FTP listing document template
        (WebCore::Settings::setForceFTPDirectoryListings): Set to bypass the policy delegate check for mime type
          "application/x-ftp-directory"
        * page/Settings.h:
        (WebCore::Settings::ftpDirectoryTemplatePath):
        (WebCore::Settings::forceFTPDirectoryListings):

        * platform/Logging.cpp: Add an "LogFTP" logging channel
        * platform/Logging.h:
        * platform/mac/LoggingMac.mm:
        (WebCore::InitializeLoggingChannelsIfNecessary):

        * platform/MimeTypeRegistry.cpp:
        (WebCore::initialiseSupportedNonImageMimeTypes): Add "application/x-ftp-directory"

        * platform/SharedBuffer.cpp:
        (WebCore::SharedBuffer::createWithContentsOfFile): Stub for now
        * platform/SharedBuffer.h:

        * platform/mac/SharedBufferMac.mm:
        (WebCore::SharedBuffer::createWithContentsOfFile): Load contents of the file into an NSData, then
          wrap that NSData

2007-07-14  Alexey Proskuryakov  <ap@webkit.org>

        Reviewed by Darin.

        http://bugs.webkit.org/show_bug.cgi?id=14618
        REGRESSION(13464): drivehq.com login form doesn't work

        Test: http/tests/misc/post-submit-button.html

        * html/HTMLInputElement.cpp:
        (WebCore::HTMLInputElement::appendFormData): Append a submit even if its value is empty.

2007-07-13  Oliver Hunt  <oliver@apple.com>

        Reviewed by Sam.

        Fix for 
            <rdar://problem/5335265> REGRESSION: WebCore::DragController crashes if WebDragSourceActionDHTML cleared
            http://bugs.webkit.org/show_bug.cgi?id=13652

        Reorder logic for drag initiation: we can always preflight the clipboard, regardless as to whether 
        we are performing any dhtml drag handling    

        * page/EventHandler.cpp:
        (WebCore::EventHandler::handleDrag):

2007-07-13  Matt Lilek  <pewtermoose@gmail.com>

        Reviewed by Tim Hatcher.

        Bug 14401: Semi-regression: Can no longer copy anything from the inspector
        http://bugs.webkit.org/show_bug.cgi?id=14401

        * page/inspector/inspector.css:

2007-07-13  Beth Dakin  <bdakin@apple.com>

        Reviewed by Hyatt.

        Fix for <rdar://problem/5304742> A hang occurs when attempting to 
        display web clip banner at http://www.signonsandiego.com/sports/
        chargers/index.html

        Here is the actual fix. 
        * rendering/RenderInline.cpp:
        (WebCore::RenderInline::absoluteRects): Set topLevel to 
        false when we recurse to get our children's absoluteRects.
        * rendering/RenderInline.h: New boolean parameter 
        topLevel that defaults to true.
        * rendering/RenderObject.cpp:
        (WebCore::RenderObject::absoluteRects):
        * rendering/RenderObject.h:

        And these are just other implementations/declarations of this 
        (virtual) function that have to add the parameter. No behavior 
        change here.
        * rendering/RenderPath.cpp:
        (WebCore::RenderPath::absoluteRects):
        * rendering/RenderPath.h:
        * rendering/RenderSVGContainer.cpp:
        (WebCore::RenderSVGContainer::absoluteRects):
        * rendering/RenderSVGContainer.h:
        * rendering/RenderSVGHiddenContainer.cpp:
        (WebCore::RenderSVGHiddenContainer::absoluteRects):
        * rendering/RenderSVGHiddenContainer.h:
        * rendering/RenderSVGImage.cpp:
        (WebCore::RenderSVGImage::absoluteRects):
        * rendering/RenderSVGImage.h:
        * rendering/RenderSVGInlineText.cpp:
        (WebCore::RenderSVGInlineText::absoluteRects):
        * rendering/RenderSVGInlineText.h:
        * rendering/RenderSVGTSpan.cpp:
        (WebCore::RenderSVGTSpan::absoluteRects):
        * rendering/RenderSVGTSpan.h:
        * rendering/RenderSVGText.cpp:
        (WebCore::RenderSVGText::absoluteRects):
        * rendering/RenderSVGText.h:
        * rendering/RenderText.cpp:
        (WebCore::RenderText::absoluteRects):
        * rendering/RenderText.h:
        * rendering/RenderView.cpp:
        (WebCore::RenderView::absoluteRects):
        * rendering/RenderView.h:

2007-07-13  Mitz Pettel  <mitz@webkit.org>

        Reviewed by Hyatt.

        - fix http://bugs.webkit.org/show_bug.cgi?id=13438 <rdar://problem/5153030>
              Run rounding makes word-break:break-all/word not functional

        Test: fast/text/word-break-run-rounding.html

        * rendering/RenderText.cpp:
        (WebCore::RenderText::calcPrefWidths): Update the maximum width only on word
        boundaries to avoid rounding errors.
        * rendering/bidi.cpp:
        (WebCore::RenderBlock::findNextLineBreak): Integrated breakAll with the
        midWordBreak/wrapW mechanism. Also made the wrapW upper bound more accurate
        by resetting it when tmpW is committed.

2007-07-13  Sam Weinig  <sam@webkit.org>

        Reviewed by Geoff Garen.

        Patch for <rdar://problem/5318394>
        http site can read/write content of https site in same domain

        Add protocol and port checks in isSafeScript.

        * bindings/js/kjs_window.cpp:
        (KJS::Window::isSafeScript):

2007-07-13  Anders Carlsson  <andersca@apple.com>

        Reviewed by Mitz Pettel.

        <rdar://problem/5298870> 
        REGRESSION: In Yahoo Mail modal dialog, OK and Cancel buttons do not work, and descriptive text is missing (14327)
        
        http://bugs.webkit.org/show_bug.cgi?id=14327
        REGRESSION (r21367): dialogArguments not set in window generated by showModalDialog

        When creating popup windows/dialogs, prevent the window properties from being cleared by the initial frame load.
        
        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::FrameLoader):
        (WebCore::FrameLoader::createWindow):
        (WebCore::FrameLoader::clear):
        (WebCore::FrameLoader::begin):
        (WebCore::FrameLoader::open):
        * loader/FrameLoader.h:
        (WebCore::FrameLoader::setShouldClearWindowProperties):
        * manual-tests/modal-dialog-arguments.html: Added.

2007-07-13  Steve Falkenburg  <sfalken@apple.com>

        Update ResourceError related code to account for changes in CF interfaces.

        Reviewed by Darin, Ada.

        * platform/network/ResourceError.h: Change Mac conditionals to CF to share more code.
        * platform/network/cf/ResourceErrorCF.cpp:
        (WebCore::ResourceError::ResourceError): Modified based on CFErrorRef changes
        (WebCore::ResourceError::unpackPlatformError): Ported from ResourceErrorMac.mm.
        (WebCore::ResourceError::operator CFErrorRef): Ported from ResourceErrorMac.mm.
        (WebCore::ResourceError::operator CFStreamError): Modified based on CFErrorRef changes.

2007-07-13  Antti Koivisto  <antti@apple.com>

        Reviewed by Adele.
        
        Fix <rdar://problem/5192256>
        click() in onchange handler causes another change event (causes hang at http://forums.whirlpool.net.au/)
        
        Guard against generating a simulated event from within a simulated event in the same node. Try to
        match Firefox behavior.

        * dom/EventTargetNode.cpp:
        (WebCore::EventTargetNode::dispatchSimulatedMouseEvent):
        (WebCore::EventTargetNode::dispatchSimulatedClick):
        * dom/Node.cpp:
        (WebCore::Node::Node):
        * dom/Node.h:

2007-07-13  Antti Koivisto  <antti@apple.com>

        Reviewed by Darin.
        
        Fix <rdar://problem/5333387>
        Combination of selection and click() on checkbox crashes
        
        Ensure there is no pending style update before doing synchronous paint. Under certain
        circumstances this ends up doing style recalc in middle of paint() which may
        for example tear down the rendering tree being painted, with bad results.

        * dom/ContainerNode.cpp:
        (WebCore::ContainerNode::setActive):

2007-07-13  Antti Koivisto  <antti@apple.com>

        Reviewed by Adele.
        
        Fix <rdar://problem/5333365>
        Calling click() is very slow
        
        There is a 100ms delay in ContainerNode::setActive() to do an activation effect. It is used for
        simulated mouse activations (using keyboard for example). However, it shouldn't be done when calling from javascript 
        (through click() interface) since it hangs script execution.

        * html/HTMLElement.cpp:
        (WebCore::HTMLElement::click):

2007-07-13  Mitz Pettel  <mitz@webkit.org>

        Reviewed by Dave Hyatt.

        - fix http://bugs.webkit.org/show_bug.cgi?id=13873
          Incomplete repaint of replaced element's box shadow

        Tests: fast/repaint/box-shadow-h.html
               fast/repaint/box-shadow-v.html

        * rendering/RenderHTMLCanvas.cpp:
        (WebCore::RenderHTMLCanvas::layout): Added a call to adjustOverflowForBoxShadow().
        * rendering/RenderImage.cpp:
        (WebCore::RenderImage::layout): Ditto.
        * rendering/RenderPartObject.cpp:
        (WebCore::RenderPartObject::layout): Ditto.
        * rendering/RenderReplaced.cpp:
        (WebCore::RenderReplaced::RenderReplaced): Initialize m_hasOverflow.
        (WebCore::RenderReplaced::~RenderReplaced): Added. Removes this object from the
        overflow rect map if it has overflow.
        (WebCore::RenderReplaced::shouldPaint): Account for overflow.
        (WebCore::RenderReplaced::adjustOverflowForBoxShadow): Added. Creates or
        removes an entry for this object in the global overflow rect map.
        (WebCore::RenderReplaced::overflowHeight): Added.
        (WebCore::RenderReplaced::overflowWidth): Added.
        (WebCore::RenderReplaced::overflowLeft): Added.
        (WebCore::RenderReplaced::overflowTop): Added.
        (WebCore::RenderReplaced::overflowRect): Added.
        * rendering/RenderReplaced.h:

2007-07-13  Mitz Pettel  <mitz@webkit.org>

        Reviewed by Dave Hyatt.

        - fix http://bugs.webkit.org/show_bug.cgi?id=14395
          When a <p> is inside <li> two <BR>s are rendered

        Test: fast/lists/marker-before-empty-inline.html

        * rendering/RenderBlock.h:
        * rendering/RenderListItem.cpp:
        (WebCore::getParentOfFirstLineBox): Changed to skip empty inline flows that
        do not actually generate any line boxes. Limited the nested lists quirk to
        the case where the list is a child of the list item, to match Firefox.
        * rendering/bidi.cpp:
        (WebCore::requiresLineBox): Added. Factored out of skipWhitespace.
        (WebCore::RenderBlock::generatesLineBoxesForInlineChild): Added. Checkes
        whether the child or any of its siblings following it will generate a line
        box in the flow.
        (WebCore::RenderBlock::skipWhitespace):

2007-07-13  Holger Hans Peter Freyther  <zecke@selfish.org>

        Reviewed by Alexey.

        Move HTTP methods to parse Content-Type from xmlhttprequest.cpp
        which is LGPL to HTTPParsers.cpp. As both files were written by the
        same author and the advice to move them came from him I think this move
        is what is meant to be done.

        Move filenameFromHTTPContentDisposition to HTTPParsers as well. This parse
        function uses Vector<String>::split and doesn't honor quoting. This needs
        to be fixed in later versions.

        http://bugs.webkit.org/show_bug.cgi?id=5954 and http://bugs.webkit.org/show_bug.cgi?id=14059
        benefit from this change.

        * platform/network/HTTPParsers.cpp:
        (WebCore::filenameFromHTTPContentDisposition):
        (WebCore::extractMIMETypeFromMediaType):
        (WebCore::extractCharsetFromMediaType):
        * platform/network/HTTPParsers.h:
        * platform/network/cf/ResourceResponseCFNet.cpp:
        * xml/xmlhttprequest.cpp:
        (WebCore::XMLHttpRequest::responseMIMEType):
        (WebCore::XMLHttpRequest::didReceiveResponse):

2007-07-13  Mark Rowe  <mrowe@apple.com>

        Reviewed by Mitz.

        Build fix.  Stub out ChromeClientGdk::print and SVGEmptyChromeClient::print.

        * platform/gdk/ChromeClientGdk.h:
        * platform/gdk/TemporaryLinkStubs.cpp:
        (ChromeClientGdk::print):
        * platform/graphics/svg/SVGImageEmptyClients.h:
        (WebCore::SVGEmptyChromeClient::print):

2007-07-12  Alice Liu  <alice.liu@apple.com>

        Reviewed by Maciej and Steve.

        fixed <rdar://4982432> window.print() needs to be implemented

        * bridge/win/FrameWin.cpp:
        (WebCore::Frame::print):
        * page/Chrome.cpp:
        (WebCore::Chrome::print):
        * page/Chrome.h:
        * page/ChromeClient.h:
        * platform/win/TemporaryLinkStubs.cpp:

2007-07-11  Justin Garcia  <justin.garcia@apple.com>

        Reviewed by Harrison.
        
        <rdar://problem/5300379> Mail hung on option-delete
        
        We were starting backward iteration at [container, 0] and
        emitting for container over and over.

        * editing/TextIterator.cpp:
        (WebCore::SimplifiedBackwardsTextIterator::advance): Don't 
        emit characters for a node if we're starting iteration at 
        [container, 0].  Don't emit characters for exiting containers
        if we've already done so.

2007-07-12  Kevin Decker  <kdecker@apple.com>

        Reviewed by Mark Rowe.

        <rdar://problem/5039463> find a good gray that works well for full frame plug-ins; consistent look for plugins

        * loader/PluginDocument.cpp:
        (WebCore::PluginTokenizer::createDocumentStructure): Changed values to a darker gray, per request from the HI team.

2007-07-11  Sam Weinig  <sam@webkit.org>

        Reviewed by Maciej.

        Patch for <rdar://problem/5329841>
        Calling window.closed on a closed window causes Safari to crash

        - Replaces the Frame member variable in KJS::Window for more appropriate DOMWindow
        - Adds additional new null checks as necessary
        - Removes bogus toBoolean method
        - Removes unused scheduleClose method

        Test: fast/dom/Window/window-closed-crash.html

        * bindings/js/JSCustomXPathNSResolver.cpp:
        (WebCore::JSCustomXPathNSResolver::create):
        * bindings/js/JSDOMWindowCustom.cpp:
        (WebCore::JSDOMWindow::customGetOwnPropertySlot):
        (WebCore::JSDOMWindow::customPut):
        * bindings/js/JSXMLHttpRequest.cpp:
        (KJS::JSXMLHttpRequestPrototypeFunction::callAsFunction):
        * bindings/js/kjs_events.cpp:
        (WebCore::JSAbstractEventListener::handleEvent):
        (WebCore::JSLazyEventListener::parseCode):
        * bindings/js/kjs_window.cpp:
        (KJS::Window::Window):
        (KJS::Window::impl):
        (KJS::Window::interpreter):
        (KJS::Window::location):
        (KJS::Window::find):
        (KJS::allowPopUp):
        (KJS::createWindow):
        (KJS::canShowModalDialog):
        (KJS::canShowModalDialogNow):
        (KJS::showModalDialog):
        (KJS::Window::getValueProperty):
        (KJS::Window::childFrameGetter):
        (KJS::Window::indexGetter):
        (KJS::Window::namedItemGetter):
        (KJS::Window::getOwnPropertySlot):
        (KJS::Window::put):
        (KJS::Window::isSafeScript):
        (KJS::Window::setListener):
        (KJS::Window::getListener):
        (KJS::Window::clear):
        (KJS::WindowFunc::callAsFunction):
        (KJS::Window::updateLayout):
        (KJS::ScheduledAction::execute):
        (KJS::Window::disconnectFrame):
        (KJS::Location::put):
        (KJS::LocationFunc::callAsFunction):
        * bindings/js/kjs_window.h:
        * page/mac/WebCoreFrameBridge.mm:
        (updateRenderingForBindings):

2007-07-12  Mark Rowe  <mrowe@apple.com>

        Reviewed by Ada.

        <rdar://problem/5329877> REGRESSION: Document::setTransformSource leaks an xmlDocPtr if called more than once per document

        * dom/Document.cpp:
        (WebCore::Document::setTransformSource): Free any existing m_transformSource before overwriting it, rather than simply leaking it.
        * dom/Document.h:

2007-07-12  Holger Hans Peter Freyther  <zecke@selfish.org>

        Reviewed by Mark Rowe.

        Fix compilation of the CURL backend after the removing of accessors from ResourceHandle in r24202

        * platform/network/curl/ResourceHandleManager.cpp:
        (WebCore::ResourceHandleManager::setupPOST):
        (WebCore::ResourceHandleManager::startJob):

2007-07-12  Mark Rowe  <mrowe@apple.com>

        Reviewed by Darin.

        <rdar://problem/5327189> Logic error in DeprecatedString::to{,U}Int{,64} can lead to reading past end of buffer

        The fix for reading past the end of the buffer is to verify we are not at the end of the string before checking
        for a leading '+' character.  Rather than fixing the logic error in four nearly-identical functions I chose to
        extract the common functionality into the toIntegralType helper function which the four functions call through to.

        * platform/DeprecatedString.cpp:
        (WebCore::isCharacterAllowedInBase):
        (WebCore::toIntegralType):
        (WebCore::DeprecatedString::toInt):
        (WebCore::DeprecatedString::toInt64):
        (WebCore::DeprecatedString::toUInt):
        (WebCore::DeprecatedString::toUInt64):

2007-07-12  George Staikos  <staikos@kde.org>

        Reviewed by Alexey.

        Remove unused variables and fix rendering of comoboxes.

        * platform/graphics/qt/ImageQt.cpp:
        (WebCore::BitmapImage::draw):
        * platform/qt/RenderThemeQt.cpp:
        (WebCore::RenderThemeQt::paintMenuList):

2007-07-11  Oliver Hunt  <oliver@apple.com>

        Reviewed by Maciej

        Fix for <rdar://problem/5329712> GMail crash when trying to compose new message

        * platform/win/FontDataWin.cpp:
        (WebCore::FontData::containsCharacters):

2007-07-11  Alexey Proskuryakov  <ap@webkit.org>

        Reviewed by Darin.

        http://bugs.webkit.org/show_bug.cgi?id=14584
        XMLHttpRequest treats null login/password incorrectly

        Test: http/tests/xmlhttprequest/null-auth.php

        * xml/xmlhttprequest.cpp:
        (WebCore::XMLHttpRequest::open):
        * xml/xmlhttprequest.h:
        Split the open() method into three to distinguish between missing and null credentials.

        * bindings/js/JSXMLHttpRequest.cpp:
        (KJS::JSXMLHttpRequestPrototypeFunction::callAsFunction): Call the appropriate open().

2007-07-11  Oliver Hunt  <oliver@apple.com>

        Build fix for windows

        * page/Frame.cpp:
        (WebCore::Frame::firstRectForRange):

2007-07-11  Oliver Hunt  <oliver@apple.com>

        Reviewed by Maciej.

        Fix <rdar://problem/5329481> Character range rect code for IME support needs to be crossplatform

        Move -[WebCoreFrameBridge firstRectForDOMRange:] to Frame::firstRectForRange

        * page/Frame.cpp:
        (WebCore::Frame::firstRectForRange):
        * page/Frame.h:
        * page/mac/WebCoreFrameBridge.mm:
        (-[WebCoreFrameBridge firstRectForDOMRange:]):

2007-07-11  Steve Falkenburg  <sfalken@apple.com>

        Static analysis build fix.
        
        Only specify /analyze (PREfast) if it is available.
        Prevents entire project from rebuilding each time.        

        Reviewed by Hyatt.

        * WebCore.vcproj/WebCore.vcproj:

2007-07-11  George Staikos  <staikos@kde.org>

        Reviewed by Olliej.

        Make comboboxes update when the current item is changed.

        * platform/qt/PopupMenuQt.cpp:
        (WebCore::PopupMenu::updateFromElement):
        * platform/qt/QWebPopup.cpp:
        (WebCore::QWebPopup::activeChanged):

2007-07-11  George Staikos  <staikos@kde.org>

        Reviewed by Brady.

        Add a destructor to cleanup the SQL handle.

        * loader/icon/SQLDatabase.h:
        (WebCore::SQLDatabase::~SQLDatabase):

2007-07-11  Holger Hans Peter Freyther  <zecke@selfish.org>

        Reviewed by Darin.

        As of http://bugs.webkit.org/show_bug.cgi?id=14527 move the
        WebCore/ForwardingHeader/JavaScriptCore to JavaScriptCore

        * ForwardingHeaders/JavaScriptCore: Removed.
        * ForwardingHeaders/JavaScriptCore/APICast.h: Removed.
        * ForwardingHeaders/JavaScriptCore/JSBase.h: Removed.
        * ForwardingHeaders/JavaScriptCore/JSContextRef.h: Removed.
        * ForwardingHeaders/JavaScriptCore/JSLock.h: Removed.
        * ForwardingHeaders/JavaScriptCore/JSObjectRef.h: Removed.
        * ForwardingHeaders/JavaScriptCore/JSStringRef.h: Removed.
        * ForwardingHeaders/JavaScriptCore/JSStringRefCF.h: Removed.
        * ForwardingHeaders/JavaScriptCore/JSValueRef.h: Removed.
        * ForwardingHeaders/JavaScriptCore/JavaScriptCore.h: Removed.

2007-07-11  Anders Carlsson  <andersca@apple.com>

        Fix build.
        
        * platform/network/cf/ResourceHandleCFNet.cpp:
        (WebCore::willSendRequest):
        (WebCore::didReceiveResponse):
        (WebCore::didReceiveData):
        (WebCore::didFinishLoading):
        (WebCore::didFail):
        (WebCore::didReceiveChallenge):

2007-07-11  George Staikos  <staikos@kde.org>

        Repair the build.

        * platform/network/qt/ResourceHandleQt.cpp:
        (WebCore::ResourceHandle::start):

2007-07-11  Adele Peterson  <adele@apple.com>

        Reviewed by Darin.

        Fix for <rdar://problem/5230188> REGRESSION: Active/inactive marked text is not distinguished in textfields and textareas

        We were previously trying to leave room for 1px of space between the text and the underline.
        This change removes that requirement so that if we don't have room for the extra space, we still draw the thick underline
        touching the text.

        * rendering/InlineTextBox.cpp: (WebCore::InlineTextBox::paintMarkedTextUnderline):

2007-07-11  Anders Carlsson  <andersca@apple.com>

        Reviewed by Darin and Geoff.

        <rdar://problem/5313508>
        REGRESSION (Leopard): http/tests/xmlhttprequest/basic-auth.html hangs
        
        Leopard Foundation now ignores credentials passed in as part of the URL so we need to pass them ourselves.
        
        For the asynchronous case, we simply keep track of the URL and if it has a user name and password, we
        pass those if we're asked to authenticate.
                
        For the synchronous case, implement a new connection delegate and run it in a separate mode so 
        no other sources will fire.

        * platform/network/mac/ResourceHandleMac.mm:
        (WebCore::ResourceHandle::loadResourceSynchronously):
        (-[WebCoreResourceHandleAsDelegate dealloc]):
        (-[WebCoreResourceHandleAsDelegate connection:willSendRequest:redirectResponse:]):
        (-[WebCoreResourceHandleAsDelegate connection:didReceiveAuthenticationChallenge:]):
        (-[WebCoreSynchronousLoader _isDone]):
        (-[WebCoreSynchronousLoader dealloc]):
        (-[WebCoreSynchronousLoader connection:willSendRequest:redirectResponse:]):
        (-[WebCoreSynchronousLoader connection:didReceiveAuthenticationChallenge:]):
        (-[WebCoreSynchronousLoader connection:didReceiveResponse:]):
        (-[WebCoreSynchronousLoader connection:didReceiveData:]):
        (-[WebCoreSynchronousLoader connectionDidFinishLoading:]):
        (-[WebCoreSynchronousLoader connection:didFailWithError:]):
        (-[WebCoreSynchronousLoader _data]):
        (-[WebCoreSynchronousLoader _response]):
        (-[WebCoreSynchronousLoader _error]):
        (+[WebCoreSynchronousLoader loadRequest:returningResponse:error:]):

2007-07-11  Darin Adler  <darin@apple.com>

        Reviewed by Sam Weinig.

        - fix <rdar://problem/5315265> REGRESSION: Leopard launch time -
          there are about 190 stats of icudt36b files during launch

        * platform/TextEncodingRegistry.cpp: (WebCore::atomicCanonicalTextEncodingName):
        Add a special case for the empty string so we don't load the extended text
        encodings just so we can return 0 for that case.

2007-07-11  Anders Carlsson  <andersca@apple.com>

        Reviewed by Darin.

        Remove a bunch of unneeded accessors from ResourceHandle.
        
        * loader/icon/IconLoader.cpp:
        (WebCore::IconLoader::didReceiveResponse):
        (WebCore::IconLoader::didFail):
        (WebCore::IconLoader::didFinishLoading):
        * platform/network/ResourceHandle.cpp:
        * platform/network/ResourceHandle.h:

2007-07-09  Justin Garcia  <justin.garcia@apple.com>

        Reviewed by Darin.
        
        <rdar://problem/5234383> REGRESSION: Sentence breaker method returning entire document length
        
        The functions for moving the caret to the next/previous sentence boundary
        were in many cases moving to the beginning/end of the document.  The functions that 
        should move the caret to an equivalent position in the next/previous sentence behaved
        like the aforementioned functions ought to.  Put the code from the second two functions
        in the first and made sure that the second two are properly FIXMEd.  They're rarely 
        used (filed 5323691).
        
        * editing/SelectionController.cpp:
        (WebCore::SelectionController::modify): Added an option for sentenceBoundary granularity,
        so that we can test the functions that were broken from JS.
        * editing/visible_units.cpp:
        (WebCore::startOfSentence): Removed the FIXME about 5234383.
        (WebCore::endSentenceBoundary): Make this function do what nextSentencePositionBoundary
        current does.
        (WebCore::endOfSentence): Removed the FIXME about 5234383.
        (WebCore::previousSentencePosition): Removed an incorrect FIXME.
        (WebCore::nextSentencePositionBoundary): Tweaked FIXME.  This function is
        identical, not close to endSentenceBoundary.
        (WebCore::nextSentencePosition): Removed an incorrect FIXME.

2007-07-11  Rob Buis  <buis@kde.org>

        Reviewed by Darin.

        http://bugs.webkit.org/show_bug.cgi?id=14453
        REGRESSION: www.nzherald.co.nz almost all the formating is gone
 
        Be less strict for the hex color definition.

        * css/CSSGrammar.y:
        * css/cssparser.cpp:
        (WebCore::CSSParser::lex):
        (WebCore::CSSParser::text):
        * css/tokenizer.flex:

2007-07-11  Rob Buis  <buis@kde.org>

        Reviewed by Oliver.

        Forgot to commit this as part of commit r24146. Now we are sure
        createElement creates elements in the xhtml namespace only.

        * ksvg2/svg/SVGDocument.cpp:
        * ksvg2/svg/SVGDocument.h:

2007-07-10  Sam Weinig  <sam@webkit.org>

        Reviewed by Oliver.

        Move more attributes from the pure JS bindings in KJS::Window
        to the implementation in DOMWindow and autogenerate the new bindings

        Test: fast/dom/Window/get-set-properties.html

        * bindings/js/JSDOMWindowCustom.cpp:
        (WebCore::JSDOMWindow::customGetOwnPropertySlot): Change to use propHashTable in
        JSDOMWindow instead of KJS::Window
        * bindings/js/kjs_window.cpp:
        (KJS::Window::getValueProperty):
        (KJS::Window::put):
        * bindings/js/kjs_window.h:
        (KJS::Window::):
        * bindings/scripts/CodeGeneratorJS.pm: Cleanup getValueProperty and put generation
        to reduce code duplication. 
        * page/DOMWindow.cpp:
        (WebCore::DOMWindow::closed):
        (WebCore::DOMWindow::length):
        (WebCore::DOMWindow::name):
        (WebCore::DOMWindow::setName):
        (WebCore::DOMWindow::status):
        (WebCore::DOMWindow::setStatus):
        (WebCore::DOMWindow::defaultStatus):
        (WebCore::DOMWindow::setDefaultStatus):
        * page/DOMWindow.h:
        (WebCore::DOMWindow::defaultstatus):
        (WebCore::DOMWindow::setDefaultstatus):
        * page/DOMWindow.idl:

2007-07-10  Sam Weinig  <sam@webkit.org>

        Reviewed by Geoff.

        Fix for <rdar://problem/5326791> XSS vulnerability: ability to set window.defaultStatus,
        window.defaultstatus and window.status cross domains

        Test: http/tests/security/cross-frame-access-put.html

        * bindings/js/kjs_window.cpp:
        (KJS::Window::put): Adds isSafeScript check for defaultStatus,
        defaultstatus and status cases.

2007-07-10  Sam Weinig  <sam@webkit.org>

        Fix build for BuildBot.

        * page/DOMWindow.cpp:
        (WebCore::DOMWindow::outerHeight):
        (WebCore::DOMWindow::outerWidth):
        (WebCore::DOMWindow::screenX):
        (WebCore::DOMWindow::screenY):

2007-07-10  Brady Eidson  <beidson@apple.com>

        Reviewed by Sam

        <rdar://problem/5326653> - REGRESSION: [WebBackForwardList forwardListCount] might return incorrect result

        No layout test because this is an API issue that can't be tested in DRT or the browser

        * history/BackForwardList.cpp:
        (WebCore::BackForwardList::forwardListCount): If the index is NoCurrentItemIndex, return 0

2007-07-10  Sam Weinig  <sam@webkit.org>

        Reviewed by Darin.

        Move more readonly attributes from pure JS bindings in KJS::Window
        to the implementation in DOMWindow and autogenerate the new bindings.

        * bindings/js/kjs_window.cpp:
        (KJS::Window::getValueProperty):  Sort the hashmap comment into categories
        to make further migration easier.
        * bindings/js/kjs_window.h: Sort the enum into categories to make further
        migration easier.
        (KJS::Window::):
        * page/DOMWindow.cpp: Add new methods.
        (WebCore::DOMWindow::focus):
        (WebCore::DOMWindow::blur):
        (WebCore::DOMWindow::offscreenBuffering):
        (WebCore::DOMWindow::outerHeight):
        (WebCore::DOMWindow::outerWidth):
        (WebCore::DOMWindow::innerHeight):
        (WebCore::DOMWindow::innerWidth):
        (WebCore::DOMWindow::screenX):
        (WebCore::DOMWindow::screenY):
        (WebCore::DOMWindow::scrollX):
        (WebCore::DOMWindow::scrollY):
        (WebCore::DOMWindow::getComputedStyle):
        (WebCore::DOMWindow::getMatchedCSSRules): Add null Document assertion.
        (WebCore::DOMWindow::devicePixelRatio): Add null Frame and Page checks.
        * page/DOMWindow.h:
        (WebCore::DOMWindow::screenLeft):
        (WebCore::DOMWindow::screenTop):
        (WebCore::DOMWindow::pageXOffset):
        (WebCore::DOMWindow::pageYOffset):
        * page/DOMWindow.idl:

2007-07-10  Oliver Hunt  <oliver@apple.com>

        Reviewed by Maciej.

        Fix for <rdar://problem/5326417> Editor::unmarkText needs to be crossplatform

        Missed this in earlier patch to make text marking platform independent.

        * editing/Editor.cpp:
        (WebCore::Editor::unmarkText):
           Add platform independent impl
        * editing/mac/EditorMac.mm:
           Remove the old mac path.

2007-07-10  Geoffrey Garen  <ggaren@apple.com>

        Reviewed by Tim Hatcher.

        Added a Page counter. This helped me while investigating 
        <rdar://problem/5314463> 40MB of WebKit memory still allocated after 
        closing large email in Mail

        * WebCore.xcodeproj/project.pbxproj:
        * page/Page.cpp:
        (WebCore::):
        (WebCore::PageCounter::~PageCounter):
        (WebCore::Page::Page):
        (WebCore::Page::~Page):

2007-07-10  Timothy Hatcher  <timothy@apple.com>

        Reviewed by Geoff.

        <rdar://problem/5326126> InspectorResource holds onto more data than it needs

        Reduces the fixed size of InspectorResource from 630 bytes to 224 bytes. Now
        selectively pick out parts of the ResourceRequest and ResourceResponse objects
        for the info needed and store that directly in InspectorResource.

        The ResourceRequest and ResourceResponse objects hold a reference to the original
        NSURL object, so almost double the data was being kept around. So the struct size
        reduction is just the tip of the ice burg on what this really saves.

        In a test of 100,000 XMLHTTPRequests using a 85 byte long data URL, I see ~21 MB less
        RSIZE compared to Safari running without this change.

        * page/InspectorController.cpp:
        (WebCore::InspectorResource::InspectorResource):
        (WebCore::InspectorResource::type):
        (WebCore::addSourceToFrame):
        (WebCore::scriptObjectForRequest):
        (WebCore::scriptObjectForResponse):
        (WebCore::InspectorController::addScriptResource):
        (WebCore::InspectorController::addAndUpdateScriptResource):
        (WebCore::updateResourceRequest):
        (WebCore::updateResourceResponse):
        (WebCore::InspectorController::updateScriptResourceRequest):
        (WebCore::InspectorController::updateScriptResourceResponse):
        (WebCore::InspectorController::didLoadResourceFromMemoryCache):
        (WebCore::InspectorController::identifierForInitialRequest):
        (WebCore::InspectorController::willSendRequest):
        (WebCore::InspectorController::didReceiveResponse):
        (WebCore::InspectorController::didFailLoading):
        * page/InspectorController.h:

2007-07-10  Darin Adler  <darin@apple.com>

        Reviewed by Brady.

        - fix crash introduced by my patch for 5318732, only seen in release builds

        * page/Page.cpp: (WebCore::Page::~Page): Added a missing null check.

2007-07-10  Andrea Cavalli  <amc82@cam.ac.uk>

        Reviewed by George Staikos.

        Fixed render theme for text field.

        * platform/qt/RenderThemeQt.cpp:
        (WebCore::RenderThemeQt::paintTextField):

2007-07-10  Qing Zhao  <qing@staikos.net>

        Reviewed by George Staikos.

        Draw focus rings for nodes that are not rendered by QStyle.

        * platform/graphics/qt/GraphicsContextQt.cpp:
        (WebCore::focusRingColor):
        (WebCore::GraphicsContext::drawFocusRing):
        * platform/qt/RenderThemeQt.cpp:
        (WebCore::RenderThemeQt::supportsFocusRing):
        (WebCore::RenderThemeQt::supportsFocus):

2007-07-10  Nikolas Zimmermann  <zimmermann@kde.org>

        Reviewed by Geoff.

        Fix 'unsigned int' overflow in CodeGeneratorJS.pm.
        This fixes hashing of "SVG_FEBLEND_MODE_NORMAL". Its hashvalue exceeded 2^32, which
        is no problem in perl but in the cpp code. Emulate C/C++ behaviour by using "% 2^32" in
        the perl code. Testcase available in feature-branch soon (js-svg-constructors.svg).

        * bindings/scripts/CodeGeneratorJS.pm:

2007-07-10  Geoffrey Garen  <ggaren@apple.com>

        Reviewed by Maciej Stachowiak.

        Disabled Arena recycling in RenderArena. PLT shows no regression 
        (possibly a small speedup), and this can reduce allocated memory in 
        WebKit clients by about 120K (4K per Arena * 30 Arenas).
        
        I happened upon this optimization while investigating 
        <rdar://problem/5314463> WebKit hangs on to 40MB RAM after closing 
        large email in Mail (appears to be render tree arena allocator), 
        although I don't think it will come close to fixing that bug 
        completely.

        * rendering/RenderArena.cpp:
        (WebCore::RenderArena::~RenderArena): Use FinishArenaPool, which frees
        the ArenaPool's Arenas immediately.

2007-07-10  Mitz Pettel  <mitz@webkit.org>

        Reviewed by Hyatt.

        - fix http://bugs.webkit.org/show_bug.cgi?id=14449
          REGRESSION (r14345-r14375): Absolutely positioned image does not scale to containing element's height

        Test: fast/replaced/absolute-position-percentage-height.html

        * rendering/RenderBox.cpp:
        (WebCore::RenderBox::calcReplacedHeightUsing): For positioned elements, evaluate
        the percentage with respect to the container's final height.

2007-07-10  Brady Eidson  <beidson@apple.com>

        Reviewed by Mark Rowe

        Add 64-bit integer converters to our string classes for future work

        * platform/DeprecatedString.cpp:
        (WebCore::DeprecatedString::toInt64):
        (WebCore::DeprecatedString::toUInt64):
        * platform/DeprecatedString.h:

        * platform/PlatformString.h:
        * platform/String.cpp:
        (WebCore::String::toInt64):
        (WebCore::String::toUInt64):

        * platform/StringImpl.cpp:
        (WebCore::StringImpl::toInt64):
        (WebCore::StringImpl::toUInt64):
        * platform/StringImpl.h:

2007-07-10  Darin Adler  <darin@apple.com>

        Reviewed by Anders.

        - fix <rdar://problem/5318732> REGRESSION: In Mail, a crash occurs when attempting to send
          a HTML based message (nytimes.com, washingtonpost.com, latimes.com)

        Did an audit of calls to get the inspector and most other uses of Page* and added null
        checks since Frame* can outlast its Page*.

        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::createWindow): Added null check.
        (WebCore::FrameLoader::loadSubframe): Ditto.
        (WebCore::FrameLoader::load): Ditto.
        (WebCore::FrameLoader::transitionToCommitted): Ditto.
        (WebCore::FrameLoader::checkLoadCompleteForThisFrame): Ditto.
        (WebCore::FrameLoader::continueLoadAfterWillSubmitForm): Ditto.
        (WebCore::FrameLoader::addExtraFieldsToRequest): Ditto.
        (WebCore::FrameLoader::loadResourceSynchronously): Ditto.
        (WebCore::FrameLoader::continueLoadAfterNavigationPolicy): Ditto.
        (WebCore::FrameLoader::requestFromDelegate): Ditto.
        (WebCore::FrameLoader::canGoBackOrForward): Ditto.
        (WebCore::FrameLoader::getHistoryLength): Ditto.
        (WebCore::FrameLoader::historyURL): Ditto.
        (WebCore::FrameLoader::cachePageForHistoryItem): Ditto.
        (WebCore::FrameLoader::addBackForwardItemClippedAtTarget): Ditto.
        (WebCore::FrameLoader::goToItem): Ditto.
        (WebCore::FrameLoader::dispatchWindowObjectAvailable): Ditto.
        (WebCore::FrameLoader::dispatchDidCommitLoad): Ditto.
        (WebCore::FrameLoader::dispatchAssignIdentifierToInitialRequest): Ditto.
        (WebCore::FrameLoader::dispatchWillSendRequest): Ditto.
        (WebCore::FrameLoader::dispatchDidReceiveResponse): Ditto.
        (WebCore::FrameLoader::dispatchDidReceiveContentLength): Ditto.
        (WebCore::FrameLoader::dispatchDidFinishLoading): Ditto.
        (WebCore::FrameLoader::dispatchDidLoadResourceFromMemoryCache): Ditto.

        * page/ContextMenuController.h:
        * page/ContextMenuController.cpp:
        (WebCore::ContextMenuController::ContextMenuController): Removed unneeded and
        unused Page* parameter.
        (WebCore::openNewWindow): Added null check.
        (WebCore::ContextMenuController::contextMenuItemSelected): Ditto.

        * page/InspectorController.h:
        (WebCore::InspectorController::pageDestroyed): Added. Since this object is
        owned by the Page and has a back-pointer to it, it needs an explicit disconnect.
        There's already a higher-level one, but this is more reliable than that.
        * page/InspectorController.cpp:
        (WebCore::InspectorController::windowScriptObjectAvailable): Added null check.
        (WebCore::InspectorController::windowUnloading): Ditto.

        * page/Page.cpp:
        (WebCore::Page::Page): Updated for change in parameters of ContextMenuController 
        constructor.
        (WebCore::Page::~Page): Added call to InspectorController pageDestroyed().

        * page/Chrome.cpp: Updated includes.
        * page/DragController.cpp: Ditto.

2007-07-10  Adam Treat  <adam@staikos.net>

        Reviewed by George Staikos.

        Bring scroll wheel out of Ludicrous Speed.

        * platform/qt/WheelEventQt.cpp:
        (WebCore::PlatformWheelEvent::PlatformWheelEvent):

2007-07-09  Geoffrey Garen  <ggaren@apple.com>

        Reviewed by Maciej Stachowiak.

        Fixed http://bugs.webkit.org/show_bug.cgi?id=13241 | <rdar://problem/5126396>
        onload fires before content is finished loading (woot.com)
        
        * dom/Document.cpp:
        (WebCore::Document::close): Try to go through the normal "Am I done loading?"
        machinery before dispatching the load event. As the comment indicates, 
        we can't do this in all cases, so the fix isn't perfect. However, a perfect 
        solution would require much riskier sweeping changes to the loader, which 
        are best left for later, I think.

        * xml/XSLTProcessor.cpp:
        (WebCore::XSLTProcessor::createDocumentFromSource): Removed a slightly
        worse solution to the same problem.

2007-07-10  Rob Buis  <buis@kde.org>

        Reviewed by Maciej.

        http://bugs.webkit.org/show_bug.cgi?id=8007
        createElement() and XHTML (A dynamically created table not rendered as such)

        Follow the HTML5 rules of making the name lowercase and then
        creating the element in the xhtml namespace.

        * dom/Document.cpp:
        (WebCore::Document::createElement):
        * dom/Document.h:
        * html/HTMLDocument.cpp:
        * html/HTMLDocument.h:

2007-07-09  Qing Zhao  <qing@staikos.net>

        Reviewed by George Staikos.

        Add qt context menu support.

        * WebCore.pro:
        * platform/ContextMenu.h:
        * platform/ContextMenuItem.h:
        (WebCore::PlatformMenuItemDescriptionType::PlatformMenuItemDescriptionType):
        * platform/qt/ContextMenuItemQt.cpp:
        (WebCore::ContextMenuItem::ContextMenuItem):
        (WebCore::ContextMenuItem::~ContextMenuItem):
        (WebCore::ContextMenuItem::releasePlatformDescription):
        (WebCore::ContextMenuItem::type):
        (WebCore::ContextMenuItem::setType):
        (WebCore::ContextMenuItem::action):
        (WebCore::ContextMenuItem::setAction):
        (WebCore::ContextMenuItem::title):
        (WebCore::ContextMenuItem::setTitle):
        (WebCore::ContextMenuItem::platformSubMenu):
        (WebCore::ContextMenuItem::setSubMenu):
        (WebCore::ContextMenuItem::setChecked):
        (WebCore::ContextMenuItem::setEnabled):
        (WebCore::ContextMenuItem::enabled):
        * platform/qt/ContextMenuQt.cpp:
        (WebCore::ContextMenu::ContextMenu):
        (WebCore::ContextMenu::~ContextMenu):
        (WebCore::ContextMenu::appendItem):
        (WebCore::ContextMenu::itemCount):
        (WebCore::ContextMenu::insertItem):
        (WebCore::ContextMenu::setPlatformDescription):
        (WebCore::ContextMenu::platformDescription):

2007-07-09  Anders Carlsson  <andersca@apple.com>

        Build fix.
        
        * plugins/win/PluginViewWin.cpp:
        (WebCore::PluginViewWin::performRequest):

2007-07-09  Anders Carlsson  <andersca@apple.com>

        Reviewed by Geoff.

        Get rid of the node argument in our various script execution functions.
        
        * bindings/js/kjs_proxy.cpp:
        (WebCore::KJSProxy::evaluate):
        * bindings/js/kjs_proxy.h:
        * bindings/js/kjs_window.cpp:
        (KJS::ScheduledAction::execute):
        * dom/XMLTokenizer.cpp:
        (WebCore::XMLTokenizer::endElementNs):
        (WebCore::XMLTokenizer::notifyFinished):
        * html/HTMLScriptElement.cpp:
        (WebCore::HTMLScriptElement::evaluateScript):
        * html/HTMLTokenizer.cpp:
        (WebCore::HTMLTokenizer::scriptExecution):
        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::changeLocation):
        (WebCore::FrameLoader::urlSelected):
        (WebCore::FrameLoader::submitForm):
        (WebCore::FrameLoader::replaceContentsWithScriptResult):
        (WebCore::FrameLoader::executeScript):
        * loader/FrameLoader.h:
        * page/mac/WebCoreFrameBridge.mm:
        (-[WebCoreFrameBridge stringByEvaluatingJavaScriptFromString:forceUserGesture:]):
        (-[WebCoreFrameBridge aeDescByEvaluatingJavaScriptFromString:]):

2007-07-09  Justin Garcia  <justin.garcia@apple.com>

        Rolling the fix for 5290534 back in now that 5310404 has been fixed in Mail.

        * editing/DeleteSelectionCommand.cpp:
        (WebCore::DeleteSelectionCommand::handleGeneralDelete):

2007-07-09  Geoffrey Garen  <ggaren@apple.com>

        Reviewed by Anders Carlsson.

        A little more FrameLoader cleanup while working on <rdar://problem/5126396>.
        
        Rename: "checkEmitLoadEvent" => "checkCallImplicitClose" because the function
        doesn't emit the load event; it just calls implicitClose.
        
        Rename: "m_wasLoadEventEmitted" => "m_didCallImplicitClose" because the variable
        tracks whether implicitClose was called.

        * dom/Document.cpp:
        (WebCore::Document::implicitClose): Turned 12 lines of code into 6, adding ASSERT.
        * loader/FrameLoader.h: Removed bogus declaration of non-existent emitLoadEvent().

2007-07-09  Justin Garcia  <justin.garcia@apple.com>

        Reviewed by John.
        
        REGRESSION: Crash when deleting table content in Leopard Mail

        * editing/DeleteSelectionCommand.cpp:
        (WebCore::DeleteSelectionCommand::handleGeneralDelete): Use a RefPtr
        for the next node to delete, in case it is destroyed when the
        current node is deleted.  In the crash reported in the radar, we
        crash because the next node is the div that holds the delete button
        and it's destroyed when the node that contains the selection is removed.

2007-07-09  Adam Treat  <adam@staikos.net>

        Reviewed by George Staikos.

        Convert QWebFrame from a QFrame to a pure QObject to eliminate all
        traces of widgets.

        * page/qt/EventHandlerQt.cpp:
        (WebCore::EventHandler::passSubframeEventToSubframe):
        * platform/ScrollView.h:
        * platform/Widget.h:
        * platform/qt/PlatformScrollBarQt.cpp:
        (WebCore::PlatformScrollbar::handleMouseMoveEvent):
        (WebCore::PlatformScrollbar::handleMousePressEvent):
        (WebCore::PlatformScrollbar::handleMouseReleaseEvent):
        * platform/qt/PopupMenuQt.cpp:
        (WebCore::PopupMenu::show):
        * platform/qt/ScrollViewQt.cpp:
        (WebCore::ScrollView::ScrollViewPrivate::ScrollViewPrivate):
        (WebCore::ScrollView::ScrollViewPrivate::scrollBackingStore):
        (WebCore::ScrollView::ScrollViewPrivate::windowClipRect):
        (WebCore::ScrollView::updateContents):
        (WebCore::ScrollView::update):
        (WebCore::ScrollView::geometryChanged):
        (WebCore::ScrollView::windowToContents):
        (WebCore::ScrollView::contentsToWindow):
        (WebCore::ScrollView::convertChildToSelf):
        (WebCore::ScrollView::convertSelfToChild):
        (WebCore::ScrollView::scrollbarUnderMouse):
        (WebCore::ScrollView::addChild):
        (WebCore::ScrollView::paint):
        * platform/qt/WidgetQt.cpp:
        (WebCore::WidgetPrivate::WidgetPrivate):
        (WebCore::WidgetPrivate::~WidgetPrivate):
        (WebCore::WidgetPrivate::setGeometry):
        (WebCore::WidgetPrivate::geometry):
        (WebCore::Widget::frameGeometry):
        (WebCore::Widget::setFocus):
        (WebCore::Widget::setCursor):
        (WebCore::Widget::show):
        (WebCore::Widget::hide):
        (WebCore::Widget::qwebframe):
        (WebCore::Widget::setQWebFrame):
        (WebCore::Widget::qwidget):
        (WebCore::Widget::setQWidget):
        (WebCore::Widget::setFrameGeometry):
        (WebCore::Widget::isEnabled):
        (WebCore::Widget::setEnabled):
        (WebCore::Widget::setIsSelected):
        (WebCore::Widget::invalidate):
        (WebCore::Widget::invalidateRect):
        (WebCore::Widget::removeFromParent):
        (WebCore::Widget::geometryChanged):
        (WebCore::Widget::convertToContainingWindow):
        (WebCore::Widget::convertFromContainingWindow):
        (WebCore::Widget::convertChildToSelf):
        (WebCore::Widget::convertSelfToChild):
        (WebCore::Widget::containingWindow):

2007-07-09  Anders Carlsson  <andersca@apple.com>

        Reviewed by Oliver.

        Add DocumentLoader::isLoadingMainResource.

        * WebCore.exp:

2007-07-09  John Sullivan  <sullivan@apple.com>

        Reviewed by Darin

        * WebCore.exp:
        * WebCore.xcodeproj/project.pbxproj:
        exported String::createCFString, needed for <rdar://problem/5320208>

2007-07-09  Mitz Pettel  <mitz@webkit.org>

        Reviewed by Maciej.

        Test case for the bug below, which is http://bugs.webkit.org/show_bug.cgi?id=14207

        * manual-tests/flash-unload-tab.html: Added.

2007-07-09  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Oliver.

        <rdar://problem/5295734> Repro crash closing tab/window @ maps.google.com in
        WTF::HashSet<KJS::RuntimeObjectImp*, WTF::PtrHash<KJS::RuntimeObjectImp*>,
        WTF::HashTraits<KJS::RuntimeObjectImp*> >::add + 11
        
        Automated test case is not possible. Did not bother with manual test this time.

        * bindings/js/kjs_dom.cpp:
        (WebCore::getRuntimeObject): Check that runtime root isn't null, as well as instance;
        this should cover the case where the plugin is already shut down and onunload time.

2007-07-08  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Sam.

        - fixed <rdar://problem/5220706> REGRESSION (TOT): repro crash in -[WebView(WebViewInternal) _addObject:forIdentifier:] [14425]
        http://bugs.webkit.org/show_bug.cgi?id=14425

        * bindings/js/kjs_window.cpp:
        (KJS::createWindow): No longer take an immediate argument - always do immediate loads
        on a newly created Window. Also, do a load of "" to make sure that the right info makes
        it to the app.
        (KJS::showModalDialog): Updated for above.
        (KJS::WindowFunc::callAsFunction): Updated for above.
        * dom/Document.cpp:
        (WebCore::Document::shouldBeAllowedToLoadLocalResources): If our URL is about:blank,
        we're allowed if our opener is (since the opener must have written the contents).
        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::changeLocation): Add a variant which takes a KURL, which it
        expects to be pre-completed. This is to avoid completing "" to the opener URL.
        (WebCore::FrameLoader::urlSelected): Allow loading empty URLs.
        * loader/FrameLoader.h:
        
        Test case is manual only, since it takes particular app behavior to reproduce:
        
        * manual-tests/new-window-subresource-crash.html: Added.

2007-07-08  Mitz Pettel  <mitz@webkit.org>

        Reviewed by Maciej.

        - fix leaks introduced in r24099

        * dom/Element.cpp:
        (WebCore::Element::~Element): Do not delete the cached computed style here.
        (WebCore::Element::detach): Delete the computed style here instead.
        (WebCore::Element::computedStyle): Removed a redundant ref() which was
        causing the leak. Changed to return 0 if the element is not attached,
        because in that case there is currently no way to tell when to delete the computed
        style.

2007-07-08  Mitz Pettel  <mitz@webkit.org>

        Reviewed by Darin.

        - fix http://bugs.webkit.org/show_bug.cgi?id=12384
          getComputedStyle with td.style.display='none' reports '' for all properties except display

        Test: fast/css/computed-style-without-renderer.html

        Implement rich computed style for elements that do not have a renderer.

        * css/CSSComputedStyleDeclaration.cpp:
        (WebCore::getPositionOffsetValue): Changed to take a RenderStyle instead of
        a RenderObject.
        (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): Changed to
        use the computed style returned by the node instead of going through the
        renderer. Changed properties that compute by measuring the renderer to
        fall back on returning the length from the RenderStyle if a renderer does
        not exist.
        (WebCore::CSSComputedStyleDeclaration::length): Changed to return the number
        of properties we can compute even if the element has no renderer.
        (WebCore::CSSComputedStyleDeclaration::copyInheritableProperties): Changed
        to use the computed style returned by the node instead of going through the
        renderer.
        * dom/Element.cpp:
        (WebCore::ElementRareData::ElementRareData): Added a computed style member,
        used to cache computed style for elements that do not have a renderer.
        (WebCore::ElementRareData::resetComputedStyle): Added.
        (WebCore::Element::~Element): Delete the cached computed style.
        (WebCore::Element::recalcStyle): Added code to delete the cached computed
        style when necessary.
        (WebCore::Element::computedStyle): Added. Returns the style used in rendering
        the element, if available. Otherwise uses the style selector to compute style
        for the element.
        * dom/Element.h:
        * dom/Node.cpp:
        (WebCore::Node::computedStyle): Added. This method returns either the style
        used in rendering the node, or the style that would be used if the node
        had a renderer.
        * dom/Node.h:

2007-07-08  Mitz Pettel  <mitz@webkit.org>

        Reviewed by Darin.

        - fix http://bugs.webkit.org/show_bug.cgi?id=14544
          Scroll wheel events are ignored when the cursor is over an iframe's border

        * page/mac/EventHandlerMac.mm:
        (WebCore::EventHandler::passWheelEventToWidget): Changed to return false if
        the event coordinates are not inside the widget's NSView hierarchy.

2007-07-08  Rob Buis  <buis@kde.org>

        Reviewed by Mitz.

        http://bugs.webkit.org/show_bug.cgi?id=10752
        The inspector should not respond to Make Text Smaller/Bigger commands

        Use the -webkit-text-size-adjust property to ignore text sizing        
        and do not take the zoom factor into account for line height when
        -webkit-text-size-adjust is set to none.

        * css/cssstyleselector.cpp:
        (WebCore::CSSStyleSelector::applyProperty):
        * page/inspector/inspector.css:

2007-07-08  Darin Adler  <darin@apple.com>

        Reviewed by Maciej.

        - fix <rdar://problem/5318994> Integer overflow in WebCore's Base64.cpp:base64Encode

        * platform/Base64.cpp:
        (WebCore::base64Encode): Check against a maximum size.
        (WebCore::base64Decode): Ditto.

2007-07-08  Darin Adler  <darin@apple.com>

        Reviewed by Maciej.

        - fix <rdar://problem/5124665> WebCore secondary-thread assertion should use linked-on-or-after check instead of building on Tiger check

        * platform/ThreadCheck.h: Renamed _WebCoreThreadViolationCheck to reportThreadViolation
        since it's in the WebCore namespace and also we shouldn't use leading underscores since
        those are reserved for the compiler and standard library. Added a new function named
        setDefaultThreadViolationBehavior and an enum for the parameter. Removed the
        threadViolationIsException parameter from WebCoreReportThreadViolation since we use
        a global variable for it now. Got rid of the unnecessary use of do while (0) in the
        WebCoreThreadViolationCheck macro -- since it's only a single function call it's already
        a statement and doesn't need to be turned into one with the do while (0) trick.

        * platform/mac/ThreadCheck.mm:
        (WebCore::readThreadViolationBehaviorFromUserDefaults): Moved the code to read from
        NSUserDefaults into this helper function. Changed it to use stringForKey instead of
        objectForKey so we don't get a "method not found" if someone puts something other than
        a string in there. Updated to use the new globals.
        (WebCore::setDefaultThreadViolationBehavior): Added.
        (WebCore::reportThreadViolation): Simplified, now that most of the work is in the
        readThreadViolationBehaviorFromUserDefaults function.
        (WebCoreReportThreadViolation): Changed to use a global variable instead of parameter
        to determine how to report a violation. Added LogOnFirstThreadViolation, which will
        log only once for each function that violates.

        * WebCore.exp: Updated for above changes.

2007-07-08  Mitz Pettel  <mitz@webkit.org>

        Reviewed by Darin.

        - fix http://bugs.webkit.org/show_bug.cgi?id=14221
          Repro crash (ASSERTION FAILED: oldText in RenderBlock::updateFirstLetter() during relayout of :before content with first-letter style)

        Test: fast/css-generated-content/before-with-first-letter.html

        * rendering/RenderContainer.cpp:
        (WebCore::RenderContainer::updateBeforeAfterContentForContainer): If a child
        of the existing 'before' container is not text, do not assume that it is an
        image, since it can also be an inline wrapping a first-letter. In that case,
        do not update its style (so in particular, keep it a FIRST_LETTER type style)
        and leave it to updateFirstLetter() to take care of.

2007-07-07  Sam Weinig  <sam@webkit.org>

        Reviewed by Oliver Hunt.

        Bailout early in Window::put() if attribute is readonly to avoid
        extra calls to isSafeScript().

        * bindings/js/kjs_window.cpp:
        (KJS::Window::put):

2007-07-07  Darin Adler  <darin@apple.com>

        Reviewed by Oliver Hunt.

        - fix <rdar://problem/5292364> REGRESSION: ZX Spectrum 3.0 widget - graphic anomalies in widget window frame

        Updated Dashboard quirk so it affects fill, stroke, and clip, rather than just stroke.

        Test: fast/canvas/fill-stroke-clip-reset-path.html

        * html/CanvasRenderingContext2D.h: Added clearPathForDashboardBackwardCompatibilityMode.
        * html/CanvasRenderingContext2D.cpp:
        (WebCore::CanvasRenderingContext2D::clearPathForDashboardBackwardCompatibilityMode): Added.
        (WebCore::CanvasRenderingContext2D::fill): Call the new function.
        (WebCore::CanvasRenderingContext2D::stroke): Replaced in-line code with a call to the new function.
        (WebCore::CanvasRenderingContext2D::clip): Call the new function.

2007-07-07  Rob Buis  <buis@kde.org>

        Reviewed and tweaked by Darin.

        http://bugs.webkit.org/show_bug.cgi?id=8994
        Canvas doesn't reset on resize

        Also reset the rendering context when resetting the canvas.

        * html/HTMLCanvasElement.cpp:
        (WebCore::HTMLCanvasElement::reset):
        (WebCore::HTMLCanvasElement::drawingContext):

2007-07-07  Alexey Proskuryakov  <ap@webkit.org>

        Reviewed by Maciej.

        http://bugs.webkit.org/show_bug.cgi?id=14525
        Support exslt:node-set()

        Test: fast/xsl/exslt-node-set.xml

        * xml/XSLTExtensions.cpp: Added.
        (WebCore::exsltNodeSetFunction): A copy of exslt:node-set() implementation
        from libexslt 1.1.11 (shipped with Tiger).
        (WebCore::registerXSLTExtensions): This function registers any WebCore-provided
        extensions on a context. Currently, the only extension is exslt:node-set().
        * xml/XSLTExtensions.h: Added.

        * xml/XSLTProcessor.cpp:
        (WebCore::XSLTProcessor::transformToString):
        Register extensions when creating a context.

        * WebCore.pro:
        * WebCore.vcproj/WebCore.vcproj:
        * WebCore.xcodeproj/project.pbxproj:
        * WebCoreSources.bkl:
        Add XSLTExtensions.{h,cpp} to projects.

2007-07-06  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Oliver.

        - fixed <rdar://problem/5133420> ASSERT in WebDocumentLoaderMac::decreaseLoadCount() un-discarding Gmail message
        
        test case: fast/loader/early-load-cancel.html

        * loader/ResourceLoader.cpp:
        (WebCore::ResourceLoader::didCancel): Don't send cancel-related client callbacks
        if we never even sent willSendRequest because we were deferred.

2007-07-06  Oliver Hunt  <oliver@apple.com>

        Reviewed by Maciej.

        Pulled a number of methods from WebKit and WebCoreFrameBridge into 
        C++ objects.

        * WebCore.exp:
        * WebCore.xcodeproj/project.pbxproj:
        * editing/Editor.cpp:
        (WebCore::Editor::replaceMarkedText):
            From -[WebCoreFrameBridge replaceMarkedTextWithText:]
        * editing/Editor.h:
        * page/Frame.cpp:
        (WebCore::Frame::setMarkedTextRange):
            Pulled platform independent logic from Mac specific implementation
        (WebCore::Frame::selectRangeInMarkedText):
            Converted from -[WebHTMLView _selectRangeInMarkedText:]
        * page/Frame.h:
        * page/mac/FrameMac.mm:
        (WebCore::Frame::setMarkedTextRange):
            Now only does Mac specific logic when manipulating initial
            NSAttributedString
        * page/mac/WebCoreFrameBridge.h:
        * page/mac/WebCoreFrameBridge.mm:
            Removed -[WebCoreFrameBridge replaceMarkedTextWithText:]

2007-07-06  Mitz Pettel  <mitz@webkit.org>

        Reviewed by Darin.

        - fix http://bugs.webkit.org/show_bug.cgi?id=14545
          REGRESSION (r21854-r21869): Repro crash in RenderBlock::updateFirstLetter @ nola.com/rose/

        Test: fast/css/first-letter-capitalized.html

        * rendering/RenderBlock.cpp:
        (WebCore::RenderBlock::updateFirstLetter): Moved the call to setFirstLetter
        further down so that the first letter is not destroyed if a text transform
        is applied to the remaining text fragment when it is add to the render tree.
        * rendering/RenderText.cpp:
        (WebCore::RenderText::previousCharacter): Factored out of setTextInternal.
        (WebCore::RenderText::setTextInternal): Changed to call previousCharacter().
        * rendering/RenderText.h:
        * rendering/RenderTextFragment.cpp:
        (WebCore::RenderTextFragment::previousCharacter): Override to return the
        character in the original string before the start of the fragment. 
        * rendering/RenderTextFragment.h:

2007-07-06  Mitz Pettel  <mitz@webkit.org>

        Reviewed by Beth.

        - fix http://bugs.webkit.org/show_bug.cgi?id=14536
          Unnecessary layout done when mousing down in text field

        No test possible because there is no change in functionality.

        * rendering/RenderTextControl.cpp:
        (WebCore::RenderTextControl::setStyle): Reset the height and the width in
        the old style to avoid getting a layout hint as a result of having mutated
        the old style during layout.
        (WebCore::RenderTextControl::layout): Update children's layout if an inner
        block's dimensions should change. This need for layout was previously masked
        by the bug.

2007-07-06  Brady Eidson  <beidson@apple.com>

        Fix builds that use IconDatabaseNone.cpp - better, this time

        * loader/icon/IconDatabaseNone.cpp:
        (WebCore::IconDatabase::isOpen):

2007-07-06  Brady Eidson  <beidson@apple.com>

        Fix builds that use IconDatabaseNone.cpp

        * loader/icon/IconDatabaseNone.cpp:
        (WebCore::IconDatabase::databasePath): 

2007-07-06  John Sullivan  <sullivan@apple.com>

        Reviewed by Brady
        
        - WebCore part of fix for: 
          <rdar://problem/5310739> Time Machine shouldn't back up WebKit's icon database files
        
        * loader/icon/IconDatabase.h:
        * loader/icon/IconDatabase.cpp:
        (WebCore::IconDatabase::isOpen): 
        made this method const (necessary to make IconDatabase::databasePath const)
        (WebCore::IconDatabase::databasePath): 
        new method, returns SQLDatabase's path if open, otherwise empty string
        
        * loader/icon/SQLDatabase.cpp:
        (WebCore::SQLDatabase::open):
        don't append a null character to the m_path ivar. The appended null character was making the path()
        method return a String with a trailing null, which is bad. However, there were no callers to the
        path() method until now. Instead of appending a null character to the ivar, use charactersWithNullTermination()
        instead of characters() when opening the database.
        
        * loader/icon/SQLDatabase.h:
        (WebCore::SQLDatabase::isOpen):
        made this method const (necessary to make IconDatabase::databasePath const)
        (WebCore::SQLDatabase::path):
        made this method const (not required for these changes, but seemed worth doing at the same time)

        * WebCore.exp:
        added symbol for IconDatabase::databasePath

2007-07-06  George Staikos  <staikos@kde.org>

        No real functional change - just move the localizations out and
        stick some placeholder text in.

        * platform/qt/Localizations.cpp: Added.
        (WebCore::submitButtonDefaultLabel):
        (WebCore::inputElementAltText):
        (WebCore::resetButtonDefaultLabel):
        (WebCore::defaultLanguage):
        (WebCore::searchableIndexIntroduction):
        (WebCore::fileButtonChooseFileLabel):
        (WebCore::fileButtonNoFileSelectedLabel):
        (WebCore::contextMenuItemTagOpenLinkInNewWindow):
        (WebCore::contextMenuItemTagDownloadLinkToDisk):
        (WebCore::contextMenuItemTagCopyLinkToClipboard):
        (WebCore::contextMenuItemTagOpenImageInNewWindow):
        (WebCore::contextMenuItemTagDownloadImageToDisk):
        (WebCore::contextMenuItemTagCopyImageToClipboard):
        (WebCore::contextMenuItemTagOpenFrameInNewWindow):
        (WebCore::contextMenuItemTagCopy):
        (WebCore::contextMenuItemTagGoBack):
        (WebCore::contextMenuItemTagGoForward):
        (WebCore::contextMenuItemTagStop):
        (WebCore::contextMenuItemTagReload):
        (WebCore::contextMenuItemTagCut):
        (WebCore::contextMenuItemTagPaste):
        (WebCore::contextMenuItemTagNoGuessesFound):
        (WebCore::contextMenuItemTagIgnoreSpelling):
        (WebCore::contextMenuItemTagLearnSpelling):
        (WebCore::contextMenuItemTagSearchWeb):
        (WebCore::contextMenuItemTagLookUpInDictionary):
        (WebCore::contextMenuItemTagOpenLink):
        (WebCore::contextMenuItemTagIgnoreGrammar):
        (WebCore::contextMenuItemTagSpellingMenu):
        (WebCore::contextMenuItemTagShowSpellingPanel):
        (WebCore::contextMenuItemTagCheckSpelling):
        (WebCore::contextMenuItemTagCheckSpellingWhileTyping):
        (WebCore::contextMenuItemTagCheckGrammarWithSpelling):
        (WebCore::contextMenuItemTagFontMenu):
        (WebCore::contextMenuItemTagBold):
        (WebCore::contextMenuItemTagItalic):
        (WebCore::contextMenuItemTagUnderline):
        (WebCore::contextMenuItemTagOutline):
        (WebCore::contextMenuItemTagWritingDirectionMenu):
        (WebCore::contextMenuItemTagDefaultDirection):
        (WebCore::contextMenuItemTagLeftToRight):
        (WebCore::contextMenuItemTagRightToLeft):
        (WebCore::contextMenuItemTagInspectElement):
        (WebCore::searchMenuNoRecentSearchesText):
        (WebCore::searchMenuRecentSearchesText):
        (WebCore::searchMenuClearRecentSearchesText):
        (WebCore::AXWebAreaText):
        (WebCore::AXLinkText):
        (WebCore::AXListMarkerText):
        (WebCore::AXImageMapText):
        (WebCore::AXHeadingText):
        * platform/qt/TemporaryLinkStubs.cpp:

2007-07-06  Geoffrey Garen  <ggaren@apple.com>

        Reviewed by Anders Carlsson.

        A little more FrameLoader cleanup while working on <rdar://problem/5126396>.
        
        Moved url() and URL() methods next to each other to highlight their subtlety.

        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::url):
        * loader/FrameLoader.h:

2007-07-06  Geoffrey Garen  <ggaren@apple.com>

        Reviewed by Anders Carlsson.

        A little FrameLoader cleanup while working on <rdar://problem/5126396>.
        
        Renamed endIfNotLoading() to endIfNotLoadingMainResource() because "loading"
        and "loadingMainResource" have distinct meanings and this function
        honors the latter.

        (WebCore::FrameLoader::endIfNotLoadingMainResource): Protect after the
        early return to avoid ref count churn.
        * loader/FrameLoader.h:
        (WebCore::FrameLoader::isLoadingMainResource): Inlined this function.

2007-07-06  Adam Treat  <adam@staikos.net>

        Reviewed by George Staikos.

        Convert QWebFrame to a QFrame from a scroll area.

        * page/qt/EventHandlerQt.cpp:
        (WebCore::EventHandler::passSubframeEventToSubframe):
        (WebCore::EventHandler::passWheelEventToWidget):
        (WebCore::EventHandler::createDraggingClipboard):
        (WebCore::EventHandler::passMousePressEventToScrollbar):
        * platform/ScrollView.h:
        * platform/Widget.h:
        * platform/qt/PlatformScrollBar.h:
        * platform/qt/PlatformScrollBarQt.cpp:
        (WebCore::PlatformScrollbar::setRect):
        (WebCore::PlatformScrollbar::frameGeometry):
        (WebCore::PlatformScrollbar::setFrameGeometry):
        (WebCore::PlatformScrollbar::handleMouseMoveEvent):
        (WebCore::PlatformScrollbar::handleMousePressEvent):
        (WebCore::PlatformScrollbar::handleMouseReleaseEvent):
        * platform/qt/ScrollViewQt.cpp:
        (WebCore::ScrollView::ScrollViewPrivate::ScrollViewPrivate):
        (WebCore::ScrollView::ScrollViewPrivate::~ScrollViewPrivate):
        (WebCore::ScrollView::ScrollViewPrivate::setHasHorizontalScrollbar):
        (WebCore::ScrollView::ScrollViewPrivate::setHasVerticalScrollbar):
        (WebCore::ScrollView::ScrollViewPrivate::valueChanged):
        (WebCore::ScrollView::ScrollViewPrivate::scrollBackingStore):
        (WebCore::ScrollView::ScrollViewPrivate::windowClipRect):
        (WebCore::ScrollView::ScrollView):
        (WebCore::ScrollView::~ScrollView):
        (WebCore::ScrollView::setScrollArea):
        (WebCore::ScrollView::horizontalScrollBar):
        (WebCore::ScrollView::verticalScrollBar):
        (WebCore::ScrollView::updateContents):
        (WebCore::ScrollView::update):
        (WebCore::ScrollView::visibleWidth):
        (WebCore::ScrollView::visibleHeight):
        (WebCore::ScrollView::visibleContentRect):
        (WebCore::ScrollView::setContentsPos):
        (WebCore::ScrollView::resizeContents):
        (WebCore::ScrollView::setFrameGeometry):
        (WebCore::ScrollView::geometryChanged):
        (WebCore::ScrollView::contentsX):
        (WebCore::ScrollView::contentsY):
        (WebCore::ScrollView::contentsWidth):
        (WebCore::ScrollView::contentsHeight):
        (WebCore::ScrollView::windowToContents):
        (WebCore::ScrollView::contentsToWindow):
        (WebCore::ScrollView::scrollOffset):
        (WebCore::ScrollView::maximumScroll):
        (WebCore::ScrollView::scrollBy):
        (WebCore::ScrollView::scrollRectIntoViewRecursively):
        (WebCore::ScrollView::hScrollbarMode):
        (WebCore::ScrollView::vScrollbarMode):
        (WebCore::ScrollView::suppressScrollbars):
        (WebCore::ScrollView::setHScrollbarMode):
        (WebCore::ScrollView::setVScrollbarMode):
        (WebCore::ScrollView::setScrollbarsMode):
        (WebCore::ScrollView::setStaticBackground):
        (WebCore::ScrollView::inWindow):
        (WebCore::ScrollView::updateScrollbars):
        (WebCore::ScrollView::scrollbarUnderMouse):
        (WebCore::ScrollView::addChild):
        (WebCore::ScrollView::removeChild):
        (WebCore::ScrollView::paint):
        (WebCore::ScrollView::wheelEvent):
        (WebCore::ScrollView::scroll):
        (WebCore::ScrollView::windowResizerRect):
        (WebCore::ScrollView::resizerOverlapsContent):
        (WebCore::ScrollView::adjustOverlappingScrollbarCount):
        (WebCore::ScrollView::setParent):
        (WebCore::ScrollView::addToDirtyRegion):
        (WebCore::ScrollView::scrollBackingStore):
        (WebCore::ScrollView::updateBackingStore):
        * platform/qt/WidgetQt.cpp:
        (WebCore::WidgetPrivate::canvas):
        (WebCore::WidgetPrivate::setGeometry):
        (WebCore::WidgetPrivate::geometry):
        (WebCore::Widget::setQWidget):
        (WebCore::Widget::paint):
        (WebCore::Widget::originalGeometry):
        (WebCore::Widget::geometryChanged):

2007-07-06  Anders Carlsson  <andersca@apple.com>

        Reviewed by Mitz.

        <rdar://problem/5280532> 
        REGRESSION: Can't access nested embed by document.name if object is not immediate parent
        
        Traverse up the tree looking for an object element.
        
        * html/HTMLEmbedElement.cpp:
        (WebCore::HTMLEmbedElement::getInstance):

2007-07-06  George Staikos  <staikos@kde.org>

        Qt build fix: Don't clobber qmake variables that are already set.

        * WebCore.pro:

2007-07-05  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Antti.

        - <rdar://problem/5311093> JavaScriptCore fails to build with strict-aliasing warnings

        * platform/StringHash.h:
        (WTF::): Adapt to newer way to do storage types.

2007-07-06  Bernhard Rosenkraenzer  <bero@arklinux.org>

        Reviewed by Sam.

        Fix for http://bugs.webkit.org/show_bug.cgi?id=13985
        Bug 13985: WebCore/rendering/RenderTable.cpp fails to compile with gcc 4.2.x

        * rendering/RenderTable.cpp:
        (WebKit::RenderTable::calcBorderLeft)
        (WebKit::RenderTable::calcBorderRight)

2007-07-06  Maxime Britto  <mbritto@pleyo.com>

        Reviewed by Maciej.

        Fix http://bugs.webkit.org/show_bug.cgi?id=13038
        Bug 13038: ASSERTION FAILED: item->target().isEmpty() || m_mainFrame->tree()->find(item->target()) == m_mainFrame

        Modify an ASSERT in goToItem related to going back/forward in history.  We don't need to check the frameset if the target is _blank.
        The attached test case is a manual one since it relies on having pages opened in tabs in Safari.

        * manual-tests/goBack-blank-tab-page.html: Added.
        * manual-tests/resources/before-go-back.html: Added.
        * manual-tests/resources/will-go-back.html: Added.
        * page/Page.cpp:
        (WebCore::Page::goToItem):

2007-07-06  Mitz Pettel  <mitz@webkit.org>

        Reviewed by Maciej.

        - fix http://bugs.webkit.org/show_bug.cgi?id=14400
          Assertion failure (SHOULD NEVER BE REACHED) going back on YouTube

        Test: fast/forms/button-state-restore.html

        * dom/Document.h:
        (WebCore::Document::isFormElementRegistered): Added.
        * html/HTMLGenericFormElement.cpp:
        (WebCore::HTMLGenericFormElement::closeRenderer): Restore saved form
        element state only if the element is registered with the document to
        have its state saved.

2007-07-06  Mitz Pettel  <mitz@webkit.org>

        Reviewed by Maciej.

        - fix http://bugs.webkit.org/show_bug.cgi?id=14487
          Incomplete repaint of background and border of boxes with -webkit-border-fit:lines

        Test: fast/repaint/border-fit-lines.html

        * rendering/RenderObject.cpp:
        (WebCore::RenderObject::repaintAfterLayoutIfNeeded): Do a full repaint if
        -webkit-border-fit:lines was specified.

2007-07-06  Tony Chang  <idealisms@gmail.com>

        Reviewed by Maciej.

        http://bugs.webkit.org/show_bug.cgi?id=14516
        Bug 14516: crash loading multipart/x-mixed-replace data on windows safari

        NULL check m_resourceData to prevent a crash in Safari on Windows.

        * loader/ResourceLoader.cpp:
        (WebCore::ResourceLoader::clearResourceData):

2007-07-06  Jungshik Shin  <jungshik.shin@gmail.com>

        Reviewed by Alexey.

        - Add UTF-32 encoding support 
          http://bugs.webkit.org/show_bug.cgi?id=13415

        Test:
         - fast/encoding/utf-32-big-endian-bom.html
         - fast/encoding/utf-32-big-endian-nobom.xml
         - fast/encoding/utf-32-little-endian-bom.html
         - fast/encoding/utf-32-little-endian-nobom.xml

        * loader/TextResourceDecoder.cpp:
        (WebCore::TextResourceDecoder::checkForBOM):
        (WebCore::TextResourceDecoder::checkForHeadCharset):
        * platform/TextDecoder.cpp:
        (WebCore::TextDecoder::checkForBOM):
        * platform/TextDecoder.h:
        * platform/TextEncoding.cpp:
        (WebCore::UTF32BigEndianEncoding):
        (WebCore::UTF32LittleEndianEncoding):
        * platform/TextEncoding.h:

2007-07-06  Holger Hans Peter Freyther  <zecke@selfish.org>

        Reviewed by Maciej.

        Start implementening RenderThemeGdk/Gtk using GtkStyle. The approach is
        to allocate one native control for each widget type. And use margins, spacing,
        style properties from the Widget. And for drawing use GtkStyle on the rect supplied.

        This should allow nice integration and be relative resource friendly. Mozilla is using
        a similiar approach. They seem to share the GdkPixmap among several operations and this
        will be an obvious candidate for improvements. Create a normally big enough GdkPixmap and
        use that for drawing and then set clip regions for cairo to make sure to not go beyond the
        width and height.

        The next steps will be to introduce states for the widgets, add more widgets, handle focus,
        and various other style attributes, honor the size and margin and use that to propagate this
        back to RenderStyle*.

        * platform/gdk/RenderThemeGdk.cpp:
        (WebCore::RenderThemeGdk::RenderThemeGdk):
        (WebCore::RenderThemeGdk::setCheckboxSize):
        (WebCore::RenderThemeGdk::paintCheckbox):
        (WebCore::RenderThemeGdk::setRadioSize):
        (WebCore::RenderThemeGdk::paintRadio):
        (WebCore::RenderThemeGdk::paintButton):
        (WebCore::RenderThemeGdk::copyToContext):
        (WebCore::RenderThemeGdk::gtkButton):
        (WebCore::RenderThemeGdk::gtkCheckbox):
        (WebCore::RenderThemeGdk::gtkRadioButton):
        (WebCore::RenderThemeGdk::gtkWindowContainer):
        * platform/gdk/RenderThemeGdk.h:

2007-07-06  Rob Buis  <buis@kde.org>

        Reviewed by Adam.

        http://bugs.webkit.org/show_bug.cgi?id=14442
        Adding a stop with value 1.0 to a gradient that has already been used has no effect

        Implement start and end stop handling differently so they are not
        in the color stop array.

        * html/CanvasGradient.cpp:
        (WebCore::compareStops):
        (WebCore::CanvasGradient::getColor):
        (WebCore::CanvasGradient::findStop):

2007-07-06  Adam Roben  <aroben@apple.com>

        Fix <rdar://problem/5301994> Garbled text still showing on some sites

        Replace calls to GetGlyphIndices with wkGetGlyphs.

        Reviewed by Alice.

        * platform/win/GlyphPageTreeNodeWin.cpp:
        (WebCore::GlyphPage::fill): Use wkGetGlyphs.
        * platform/win/FontDataWin.cpp:
        (WebCore::FontData::containsCharacters):

2007-07-06  Matt Lilek  <pewtermoose@gmail.com>

        Not reviewed - Windows build fix.

        * bridge/win/FrameWin.cpp:
        (WebCore::imageFromSelection):

2007-07-06  George Staikos  <staikos@kde.org>

        Reviewed by Maciej.

        Switch USE(ICONDATABASE) to ENABLE(ICONDATABASE) and activate the
        flag via the .pro file

        * WebCore.pro:
        * loader/icon/IconDatabase.h:

2007-07-05  John Sullivan  <sullivan@apple.com>

        Reviewed by Adam

        - WebCore part of fix for <rdar://problem/5315033>

        * rendering/RenderObject.h:
        replaced PaintRestrictionSelectionOnlyWhiteText with PaintRestrictionSelectionOnlyBlackText
        (WebCore::RenderObject::PaintInfo::PaintInfo):
        replaced forceWhiteText with forceBlackText

        * rendering/RenderObject.cpp:
        (WebCore::RenderObject::addLineBoxRects):
        added a useSelectionHeight parameter, which defaults to false; this method is unimplemented
        at this level so this has no effect.

        * rendering/RenderText.h:
        * rendering/RenderText.cpp:
        (WebCore::RenderText::addLineBoxRects):
        added a useSelectionHeight parameter, which defaults to false. If true, use the vertical position
        and height returned by selectionRect rather than replacing it with the more tight-fitting position
        and height of the line box.

        * dom/Range.h:
        * dom/Range.cpp:
        (WebCore::Range::addLineBoxRects):
        added a useSelectionHeight parameter, which defaults to false. Passes this along to RenderObject.        

        * page/Frame.h:
        renamed parameter to selectionImage
        * page/Frame.cpp:
        (WebCore::Frame::selectionTextRects):
        pass true for addLineBoxRects new useSelectionHeight parameter, so the rects returned by this new
        method will match the height that the selection would be painted here
        (WebCore::Frame::paint):
        updated for white->black name changes
        
        * page/mac/FrameMac.mm:
        (WebCore::Frame::selectionImage):
        updated for white->black name changes
        
        * rendering/InlineFlowBox.cpp:
        (WebCore::InlineFlowBox::paintTextDecorations):
        updated for white->black name changes

        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::paintLayer):
        updated for white->black name changes

        * rendering/InlineTextBox.cpp:
        (WebCore::InlineTextBox::paint):
        updated for white->black name changes, and actually use black instead of white. This was the goal
        of all the name changes.

2007-07-05  Anders Carlsson  <andersca@apple.com>

        Reviewed by Oliver.

        Fix layout test failures.
        
        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::commitProvisionalLoad):
        Don't make a representation if we're creating the initial document.

2007-07-05  Alp Toker  <alp.toker@collabora.co.uk>

        Fix Bug 14388: Input in text fields limited to 1024 characters
        http://bugs.webkit.org/show_bug.cgi?id=14388

        Slightly modified by Adam Roben.

        Reviewed by Adele.

        Tests: fast/forms/input-implicit-length-limit.html
               fast/forms/input-maxlength.html

        * html/HTMLInputElement.cpp: Bump limit to 524288.
        (WebCore::HTMLInputElement::init):
        (WebCore::HTMLInputElement::parseMappedAttribute):
        * html/HTMLInputElement.h:

2007-07-05  Anders Carlsson  <andersca@apple.com>

        Build fix.
        
        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::init):

2007-07-05  Sam Weinig  <sam@webkit.org>

        Reviewed by Geoff.

        Add focus, blur and close functions to DOMWindow implementation class
        and move bindings from Window to JSDOMWindow.

        * bindings/js/JSDOMWindowCustom.cpp:
        (WebCore::JSDOMWindow::customGetOwnPropertySlot):
        * bindings/js/kjs_window.cpp:
        (KJS::Window::getOwnPropertySlot):
        (KJS::WindowFunc::callAsFunction):
        * bindings/js/kjs_window.h:
        (KJS::Window::):
        * bindings/scripts/CodeGeneratorJS.pm: Move prototype function declaration from
        the implementation to the header.
        * page/DOMWindow.cpp:
        (WebCore::DOMWindow::focus):
        (WebCore::DOMWindow::blur):
        (WebCore::DOMWindow::close):
        * page/DOMWindow.h:
        * page/DOMWindow.idl:

2007-07-05  Justin Garcia  <justin.garcia@apple.com>

        Reviewed by Harrison.

        <rdar://problem/5279521> REGRESSION: In Mail, a crash occurs at WebCore::Range::startPosition() when attempting to apply alignment to selected image/text in message body

        * editing/TextIterator.cpp:
        (WebCore::TextIterator::exitNode): Previously emitted content shouldn't have
        to come from a text node in order to emit a '\n' as we exit block containers.

2007-07-05  Anders Carlsson  <andersca@apple.com>

        Reviewed by Geoff.

        <rdar://problem/5315284> REGRESSION: Leopard Launch Time - plugins are being accessed at startup.

        Set a response that has a MIME type of "text/html" on the document loader so WebKit won't refresh the 
        plugin database looking for a plug-in that can handle the document's MIME type (which will be null anyway).
                 
        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::init):

2007-07-05  Anders Carlsson  <andersca@apple.com>

        Reviewed by Oliver.

        <rdar://problem/5106788>
        WebKit loads user style sheets too late as seen in Mail (breaks DataDetectors; Mail flashes wrong font)

        Let the document know when the user style sheet is loading so that it try not to display anything
        until the user style sheet has finished loading.
        
        * page/Frame.cpp:
        (WebCore::UserStyleSheetLoader::UserStyleSheetLoader):
        (WebCore::UserStyleSheetLoader::~UserStyleSheetLoader):
        (WebCore::UserStyleSheetLoader::setCSSStyleSheet):
        (WebCore::Frame::setUserStyleSheetLocation):

2007-07-05  Sam Weinig  <sam@webkit.org>

        Reviewed by Darin.

        Move JSDOMWindow overriding getOwnPropertySlot logic from KJS::Window
        up into JSDOMWindow.  No change in functionality so no testcase required. 

        * bindings/js/JSDOMWindowCustom.cpp:
        (WebCore::JSDOMWindow::customGetOwnPropertySlot):
        * bindings/js/kjs_window.cpp:
        (KJS::Window::getOwnPropertySlot):
        * bindings/js/kjs_window.h:

2007-07-05  Mitz Pettel  <mitz@webkit.org>

        Reviewed and Landed by Sam.

        - fix bug 14465 for window.showModalDialog

        * bindings/js/kjs_window.cpp:
        (KJS::parseModalDialogFeatures):
        (KJS::showModalDialog):

2007-07-05  Sam Weinig  <sam@webkit.org>

        Reviewed by Mitz.

        Patch for http://bugs.webkit.org/show_bug.cgi?id=14465
        window.open() uses the literal "undefined" as the URL

        * bindings/js/kjs_window.cpp:
        (KJS::WindowFunc::callAsFunction): add checks for undefined and null values when setting the url.
        * manual-tests/open-url-undefined.html: Added.

2007-07-05  Holger Hans Peter Freyther  <zecke@selfish.org>

        Reviewed by Rob Buis.

        Rework FontData and FontPlatformData for the Gdk work to make valgrind
        happy.

        Move destroying of FontConfig and Cairo objects held in FontPlatformData
        to FontData::platformDestroy. The ownership of these objects is held by
        FontData. This is following the Mac and Qt port at least.

        Currently it is possible that FontPlatformData will not create cairo resources
        in this case at least make sure the variables are initialized to 0.
        Initialize x,y of the cairo_glyph_t with zero to avoid extents.x_advance depending
        on subtracing with not defined values.

        FontPlatformData::hash. Using FontDescription is a bad idea as we don't have a clue
        about how it is packed, if holes are present, etc. The FcPattern and the m_fontMatrix
        should be good enough to describe the Font. All other objects are created using these
        variables

        Replace C-style casts with C++ casts, in this case reinterpret_cast.

        * platform/gdk/FontDataGdk.cpp:
        (WebCore::FontData::platformInit): Don't assert
        (WebCore::FontData::platformDestroy): Take over ownership
        (WebCore::FontData::platformWidthForGlyph): initialize
        (WebCore::FontData::setFont): be paranoid and assert
        * platform/gdk/FontPlatformData.h:
        (WebCore::FontPlatformData::FontPlatformData): Initialize everything
        (WebCore::FontPlatformData::hash): make valgrind happy and don't use m_fontDescription
        * platform/gdk/FontPlatformDataGdk.cpp:
        (WebCore::FontPlatformData::FontPlatformData):
        (WebCore::FontPlatformData::~FontPlatformData): FontData::platformDestroy will do this
        (WebCore::FontPlatformData::list): Don't use C-style casts.
        (WebCore::FontPlatformData::setFont): m_fontFace, m_fontMatrix, m_options might not be initialized
        (WebCore::FontPlatformData::operator==): Don't use C-style casts.

2007-07-05  Alp Toker  <alp.toker@collabora.co.uk>

        Reviewed by Mark Rowe.

        http://bugs.webkit.org/show_bug.cgi?id=14445
        GraphicsContextCairo code style cleanup

        Follow the cr naming convention for cairo_t*.
        Remove trailing whitespace.
        Replace C casts with C++ casts.
        Avoid needless casts.

        * platform/graphics/cairo/GraphicsContextCairo.cpp:
        (WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate):
        (WebCore::GraphicsContextPlatformPrivate::~GraphicsContextPlatformPrivate):
        (WebCore::GraphicsContext::GraphicsContext):
        (WebCore::GraphicsContext::platformContext):
        (WebCore::GraphicsContext::savePlatformState):
        (WebCore::GraphicsContext::restorePlatformState):
        (WebCore::GraphicsContext::drawRect):
        (WebCore::adjustLineToPixelBoundaries):
        (WebCore::GraphicsContext::drawLine):
        (WebCore::GraphicsContext::drawEllipse):
        (WebCore::GraphicsContext::strokeArc): Save/restore the graphics state.
        (WebCore::GraphicsContext::drawConvexPolygon):
        (WebCore::GraphicsContext::fillRect):
        (WebCore::GraphicsContext::clip):
        (WebCore::GraphicsContext::drawFocusRing):
        (WebCore::GraphicsContext::roundToDevicePixels):
        (WebCore::GraphicsContext::translate):
        (WebCore::GraphicsContext::origin):
        (WebCore::GraphicsContext::setPlatformStrokeThickness):
        (WebCore::GraphicsContext::setPlatformStrokeStyle):
        (WebCore::GraphicsContext::setPlatformFont):
        (WebCore::GraphicsContext::concatCTM):
        (WebCore::GraphicsContext::addInnerRoundedRectClip):
        (WebCore::GraphicsContext::beginTransparencyLayer):
        (WebCore::GraphicsContext::endTransparencyLayer):
        (WebCore::GraphicsContext::clearRect):
        (WebCore::GraphicsContext::setLineCap):
        (WebCore::GraphicsContext::setLineJoin):
        (WebCore::GraphicsContext::setMiterLimit):
        (WebCore::GraphicsContext::setCompositeOperation):
        (WebCore::GraphicsContext::beginPath):
        (WebCore::GraphicsContext::addPath):
        (WebCore::GraphicsContext::rotate):
        (WebCore::GraphicsContext::scale):
        * platform/graphics/cairo/ImageBufferCairo.cpp:
        (WebCore::ImageBuffer::ImageBuffer):
        * platform/graphics/cairo/ImageCairo.cpp: Avoid the confusing ctxt/context naming scheme.
        (WebCore::BitmapImage::draw):
        (WebCore::Image::drawPattern):

2007-07-05  Alp Toker  <alp.toker@collabora.co.uk>

        Reviewed by Mark Rowe.

        http://bugs.webkit.org/show_bug.cgi?id=14531
        Cairo SVGImage::nativeImageForCurrentFrame() has no return

        Return the Cairo surface from the frame cache.

        Also add a fall-through else macro with notImplemented() so that future
        ports do not make the same mistake.

        * platform/graphics/svg/SVGImage.cpp:
        (WebCore::SVGImage::nativeImageForCurrentFrame):

2007-07-05  Alp Toker  <alp.toker@collabora.co.uk>

        Reviewed by Mark Rowe.

        http://bugs.webkit.org/show_bug.cgi?id=14513
        Cairo animated GIF support is broken

        Implement ImageSource::frameIsCompleteAtIndex() to enable animated GIFs.

        * platform/graphics/cairo/ImageSourceCairo.cpp:
        (WebCore::ImageSource::frameIsCompleteAtIndex):

2007-07-04  Matt Perry  <mpComplete@gmail.com>

        Reviewed by Adam.

        Fix for http://bugs.webkit.org/show_bug.cgi?id=13400
        Bug 13400: REGRESSION (r20809-20814): No back entry created for navigations created by assigning to document.location
        <rdar://problem/5153025>

        Treat userGesture as always true for setLocation, forcing a back/forward
        entry to be created.

        * bindings/js/JSHTMLDocumentCustom.cpp:
        (WebCore::JSHTMLDocument::setLocation):

2007-07-04  Adam Roben  <aroben@apple.com>

        Restore MouseEventWithHitTestResults::targetNode's old behavior

        Reviewed by Mark.

        Fixes fast/images/imagemap-case and fast/replace/image-map.

        * page/MouseEventWithHitTestResults.cpp:
        (WebCore::MouseEventWithHitTestResults::targetNode): Use the inner
        node, not the inner non-shared node.

2007-07-04  Adam Roben  <aroben@apple.com>

        Mac, Qt, and Gdk build fixes.

        * page/EventHandler.h:
        * page/gdk/EventHandlerGdk.cpp:
        * page/mac/EventHandlerMac.mm:
        (WebCore::EventHandler::passSubframeEventToSubframe):
        * page/qt/EventHandlerQt.cpp:

2007-07-04  Adam Roben  <aroben@apple.com>

        Fix the Qt/Gdk builds.

        * page/gdk/EventHandlerGdk.cpp:
        * page/qt/EventHandlerQt.cpp:

2007-07-04  Adam Roben  <aroben@apple.com>

        Move tooltip logic down into WebCore so that it can be shared cross-platform

        Reviewed by Sam.

        * page/Chrome.cpp:
        (WebCore::Chrome::setToolTip): Added.
        * page/Chrome.h:
        * page/ChromeClient.h:
        * page/EventHandler.cpp:
        (WebCore::EventHandler::mouseMoved): Call Chrome::setToolTip.
        * platform/graphics/svg/SVGImageEmptyClients.h:

        Added stubs for Gdk:

        * platform/gdk/ChromeClientGdk.h:
        * platform/gdk/TemporaryLinkStubs.cpp:
        (ChromeClientGdk::setToolTip):

2007-07-04  Adam Roben  <aroben@apple.com>

        Add Settings::showsURLsInToolTips

        Reviewed by Sam.

        * WebCore.exp:
        * page/Settings.cpp:
        (WebCore::Settings::Settings):
        * page/Settings.h:

2007-07-04  Adam Roben  <aroben@apple.com>

        Move logic for calling mouseDidMoveOverElement into WebCore

        Reviewed by Sam.

        * page/EventHandler.cpp:
        (WebCore::EventHandler::mouseMoved): Added. Calls Chrome::mouseDidMoveOverElement.
        (WebCore::EventHandler::handleMouseMoveEvent): Now takes an optional
        HitTestResult* parameter which is used to communicate to the caller the
        node the mouse is over.
        * page/EventHandler.h:
        * page/mac/EventHandlerMac.mm:
        (WebCore::EventHandler::mouseMoved): Changed to call the overloaded
        mouseMoved().
        (WebCore::EventHandler::passMouseMoveEventToSubframe): Pass hoveredNode
        through to the subframe so we can get the deepest node hovered, not
        just the node's parent frame.
        * page/win/EventHandlerWin.cpp:
        (WebCore::EventHandler::passMouseMoveEventToSubframe): Ditto.

2007-07-04  Adam Roben  <aroben@apple.com>

        Add Chrome::mouseDidMoveOverElement

        This does the work of calling up to the ChromeClient (which will call
        the UI delegate).

        Reviewed by Sam.

        * page/Chrome.cpp:
        (WebCore::Chrome::mouseDidMoveOverElement): Added.
        * page/Chrome.h:
        * page/ChromeClient.h:
        * platform/graphics/svg/SVGImageEmptyClients.h: Updated for change to
        ChromeClient.
        * platform/gdk/ChromeClientGdk.h:
        * platform/gdk/TemporaryLinkStubs.cpp:
        (ChromeClientGdk::mouseDidMoveOverElement):

2007-07-04  Adam Roben  <aroben@apple.com>

        Changed PlatformMouseEvent to store the modifier flags of the event

        Reviewed by Sam.

        * platform/PlatformMouseEvent.h:
        (WebCore::PlatformMouseEvent::PlatformMouseEvent):
        * platform/mac/PlatformMouseEventMac.mm:
        (WebCore::PlatformMouseEvent::PlatformMouseEvent):
        * platform/win/PlatformMouseEventWin.cpp:
        (WebCore::PlatformMouseEvent::PlatformMouseEvent):

2007-07-04  Adam Roben  <aroben@apple.com>

        Add HitTestResult::setToNonShadowAncestor

        Reviewed by Sam.

        * page/EventHandler.cpp:
        (WebCore::EventHandler::hitTestResultAtPoint): Moved logic into
        HitTestResult::setToNonShadowAncestor.
        * rendering/HitTestResult.cpp:
        (WebCore::HitTestResult::setToNonShadowAncestor):
        * rendering/HitTestResult.h:

2007-07-04  Adam Roben  <aroben@apple.com>

        Change MouseEventWithHitTestResults to hold onto a HitTestResult

        Reviewed by Sam.

        * dom/Document.cpp:
        (WebCore::Document::prepareMouseEvent):
        * page/MouseEventWithHitTestResults.cpp:
        (WebCore::MouseEventWithHitTestResults::MouseEventWithHitTestResults):
        (WebCore::MouseEventWithHitTestResults::targetNode):
        (WebCore::MouseEventWithHitTestResults::localPoint):
        (WebCore::MouseEventWithHitTestResults::scrollbar):
        * page/MouseEventWithHitTestResults.h:
        (WebCore::MouseEventWithHitTestResults::event):
        (WebCore::MouseEventWithHitTestResults::hitTestResult):

2007-07-04  Matt Lilek  <pewtermoose@gmail.com>

        Not reviewed, gdk build fix.

        * platform/gdk/FrameGdk.cpp:

2007-07-05  Antti Koivisto  <antti@apple.com>

        Reviewed by John.
        
        Fix Repro crash due to infinite recursion in HTMLParser::handleError @ youos.com
        <rdar://problem/5237811>
        
        It is possible to add table parts (thead etc) without table ancestor to a document fragment. If a new table element
        was added to such a part, as in
        
        div.innerHTML = '<tbody><table>';
        
        the parser error handling code would try to pop the previous table as normal. However since
        the table does not actually exist nothing would happen and parser would go to infinite recursion.
        
        Solution here is to pop table parts one by one when handling the error inside a fragment instead of trying to pop
        the table straight away (as it might not exist).

        * html/HTMLParser.cpp:
        (WebCore::HTMLParser::handleError):

2007-07-04  Qing Zhao  <qing@staikos.net>

        Reviewed by George Staikos.

        Draw menulist (comboboxes) without text overlap on the button.

        * platform/qt/RenderThemeQt.cpp:
        (WebCore::RenderThemeQt::setPopupPadding):

2007-07-04  George Staikos  <staikos@kde.org>

        Compile

        * page/qt/FrameQt.cpp:
        * WebCore.pro:

2007-07-04  Sam Weinig  <sam@webkit.org>

        Reviewed by Mitz.

        Patch for http://bugs.webkit.org/show_bug.cgi?id=14504
        REGRESSION (r23573): Amazon Book Excerpt can not be viewed in recent nightly

        - Made it possible (again) to shadow window properties with local variable names.

        Test: fast/dom/Window/window-property-shadowing.html

        * bindings/js/JSDOMWindowCustom.cpp:
        (WebCore::JSDOMWindow::customPut):
        * bindings/js/kjs_window.cpp:
        (KJS::Window::put):
        * bindings/scripts/CodeGeneratorJS.pm:
        * page/DOMWindow.idl:

2007-07-03  Alice Liu  <alice.liu@apple.com>

        Reviewed by Adam.

        Fixed <rdar://problem/5225119> support smart pasting on Windows

        * WebCore.vcproj/WebCore.vcproj:
        * WebCore.xcodeproj/project.pbxproj:
            Added new files
        * editing/SmartReplace.cpp: Added.
        (WebCore::isCharacterSmartReplaceExempt):
            Added non-CF implementation placeholder
        * editing/SmartReplace.h: Added.
        * editing/SmartReplaceCF.cpp: Added.
        (WebCore::getSmartSet):
        (WebCore::isCharacterSmartReplaceExempt):
            Added new implementation

        * bridge/win/FrameWin.cpp:
        * page/Frame.h:
        * page/mac/FrameMac.mm:
            Removed old declaration and implementation

        * editing/ReplaceSelectionCommand.cpp:
        (WebCore::ReplaceSelectionCommand::doApply):
            Changed to call the new function instead of old

        * page/mac/WebCoreFrameBridge.h:
        * page/mac/WebCoreFrameBridge.mm:
            Removed old declaration and implementation
        (-[WebCoreFrameBridge smartInsertForString:replacingRange:beforeString:afterString:]):
            Changed to call the new function instead of old

        * platform/win/PasteboardWin.cpp:
        (WebCore::Pasteboard::Pasteboard):
            Register new clipboard format
        (WebCore::Pasteboard::writeSelection):
            Set data for smartpaste format on clipboard
        (WebCore::Pasteboard::canSmartReplace):
            Added non-stub implementation

2007-07-04  Qing Zhao  <qing@staikos.net>

        Reviewed by George Staikos.

        Similar to the PlatformScrollbar fixes, adjust the painter to make the
        styler draw all subcontrols, and in this case the focus rect, in the
        proper location

        * platform/qt/RenderThemeQt.cpp:
        (WebCore::RenderThemeQt::paintMenuList):

2007-07-04  Mitz Pettel  <mitz@webkit.org>

        Reviewed by Maciej.

        - fix http://bugs.webkit.org/show_bug.cgi?id=14495
          REGRESSION: Wrong cursor is displayed during drag and drop when text is selected
          <rdar://problem/5312384>

        No test possible because DumpRenderTree cannot query the current cursor.

        * page/EventHandler.cpp:
        (WebCore::EventHandler::selectCursor): Changed into a member function and
        added that if the last mouse down event could not have started a
        selection, then the cursor should not change to an I-beam unconditionally.
        (WebCore::EventHandler::handleMouseMoveEvent):
        * page/EventHandler.h:

2007-07-04  Holger Hans Peter Freyther  <zecke@selfish.org>

        Reviewed by Rob Buis.

        A little progress in tracking dependencies.

        * WebCore.pro: Add DEPENDPATH for the Gdk port.

2007-07-03  Darin Adler  <darin@apple.com>

        Reviewed by Tim Hatcher.

        - fix <rdar://problem/5221297> Font family name in the cssText for a DOMCSSStyleDeclaration needs quotes

        Test: editing/style/font-family-with-space.html

        * css/FontFamilyValue.cpp:
        (WebCore::isValidCSSIdentifier): Added. Implements the same rule that the CSS lexer does.
        (WebCore::quoteStringIfNeeded): Changed to call isValidCSSIdentifier instead of just
        checking for a leading "#" character.
        * editing/markup.cpp:
        (WebCore::escapeTextForMarkup): Changed to take a String parameter for better efficiency.
        (WebCore::renderedText): Changed to return a String for better efficiency.
        (WebCore::addNamespace): Updated to pass String to escapeTextForMarkup.
        (WebCore::startMarkup): Updated to pass String to escapeTextForMarkup. Added missing call
        to escapeTextForMarkup in the special case for the style property.
        (WebCore::createMarkup): Changed from single quotes to double quotes and also added missing
        call to escapeTextForMarkup in two special cases for the style property.

2007-07-03  Sam Weinig  <sam@webkit.org>

        Reviewed by Darin.

        Twelfth round of fixes for implicit 64-32 bit conversion errors.
        <rdar://problem/5292262>

        - Add casts and accompanying FIXMEs to avoid remaining compiler errors.

        * WebCore.xcodeproj/project.pbxproj:
        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::opened):
        (WebCore::FrameLoader::sendRemainingDelegateMessages):
        * loader/FrameLoader.h:
        * loader/ResourceLoader.cpp:
        (WebCore::ResourceLoader::didReceiveData):
        * platform/network/mac/ResourceHandleMac.mm:
        (-[WebCoreResourceHandleAsDelegate connection:didReceiveData:lengthReceived:]):
        (-[WebCoreResourceHandleAsDelegate connection:willStopBufferingData:]):
        * platform/network/mac/ResourceResponseMac.mm:
        (WebCore::ResourceResponse::nsURLResponse):

2007-07-03  Anders Carlsson  <andersca@apple.com>

        Reviewed by Adam.

        <rdar://problem/5093862>
        Nothing shown in plugin area when trying to play content using the DivX plugin
        
        Defer calling SetWindow for the DivX plugin, just like we do with the WMP plugin.
                
        * plugins/win/PluginViewWin.cpp:
        (WebCore::PluginViewWin::determineQuirks):

2007-07-03  Sam Weinig  <sam@webkit.org>

        Reviewed by Brady Eidson.

        Ninth round of fixes for implicit 64-32 bit conversion errors.
        <rdar://problem/5292262>

        - Fix function signature to use unsigned long instead of unsigned long long.

        * loader/ProgressTracker.cpp:
        (WebCore::ProgressTracker::completeProgress):
        * loader/ProgressTracker.h:

2007-07-03  Sam Weinig  <sam@webkit.org>

        Reviewed by Oliver.

        Eighth round of fixes for implicit 64-32 bit conversion errors.
        <rdar://problem/5292262>

        - Convert SVG implementation files to use floats instead of doubles
          to match the spec/IDLs.

        * bindings/scripts/CodeGeneratorJS.pm:
        * ksvg2/svg/SVGAngle.cpp:
        * ksvg2/svg/SVGAnimatedTemplate.h:
        * ksvg2/svg/SVGAnimationElement.cpp:
        (WebCore::SVGAnimationElement::getEndTime):
        (WebCore::SVGAnimationElement::getStartTime):
        (WebCore::SVGAnimationElement::getCurrentTime):
        (WebCore::SVGAnimationElement::getSimpleDuration):
        * ksvg2/svg/SVGAnimationElement.h:
        * ksvg2/svg/SVGFitToViewBox.cpp:
        (WebCore::SVGFitToViewBox::parseViewBox):
        * ksvg2/svg/SVGLength.cpp:
        (WebCore::SVGLength::setValueAsString):
        * ksvg2/svg/SVGLinearGradientElement.cpp:
        (WebCore::SVGLinearGradientElement::buildGradient):
        * ksvg2/svg/SVGMatrix.idl:
        * ksvg2/svg/SVGNumber.idl:
        * ksvg2/svg/SVGParserUtilities.cpp:
        (WebCore::SVGPathParser::parseSVG):
        (WebCore::SVGPathParser::calculateArc):
        (WebCore::SVGPathParser::svgLineToHorizontal):
        (WebCore::SVGPathParser::svgLineToVertical):
        (WebCore::SVGPathParser::svgCurveToCubicSmooth):
        (WebCore::SVGPathParser::svgCurveToQuadratic):
        (WebCore::SVGPathParser::svgCurveToQuadraticSmooth):
        (WebCore::SVGPathParser::svgArcTo):
        * ksvg2/svg/SVGParserUtilities.h:
        * ksvg2/svg/SVGPathElement.cpp:
        (WebCore::SVGPathElement::SVGPathElement):
        (WebCore::SVGPathElement::getTotalLength):
        (WebCore::SVGPathElement::getPointAtLength):
        (WebCore::SVGPathElement::getPathSegAtLength):
        (WebCore::SVGPathElement::createSVGPathSegMovetoAbs):
        (WebCore::SVGPathElement::createSVGPathSegMovetoRel):
        (WebCore::SVGPathElement::createSVGPathSegLinetoAbs):
        (WebCore::SVGPathElement::createSVGPathSegLinetoRel):
        (WebCore::SVGPathElement::createSVGPathSegCurvetoCubicAbs):
        (WebCore::SVGPathElement::createSVGPathSegCurvetoCubicRel):
        (WebCore::SVGPathElement::createSVGPathSegCurvetoQuadraticAbs):
        (WebCore::SVGPathElement::createSVGPathSegCurvetoQuadraticRel):
        (WebCore::SVGPathElement::createSVGPathSegArcAbs):
        (WebCore::SVGPathElement::createSVGPathSegArcRel):
        (WebCore::SVGPathElement::createSVGPathSegLinetoHorizontalAbs):
        (WebCore::SVGPathElement::createSVGPathSegLinetoHorizontalRel):
        (WebCore::SVGPathElement::createSVGPathSegLinetoVerticalAbs):
        (WebCore::SVGPathElement::createSVGPathSegLinetoVerticalRel):
        (WebCore::SVGPathElement::createSVGPathSegCurvetoCubicSmoothAbs):
        (WebCore::SVGPathElement::createSVGPathSegCurvetoCubicSmoothRel):
        (WebCore::SVGPathElement::createSVGPathSegCurvetoQuadraticSmoothAbs):
        (WebCore::SVGPathElement::createSVGPathSegCurvetoQuadraticSmoothRel):
        (WebCore::SVGPathElement::svgMoveTo):
        (WebCore::SVGPathElement::svgLineTo):
        (WebCore::SVGPathElement::svgLineToHorizontal):
        (WebCore::SVGPathElement::svgLineToVertical):
        (WebCore::SVGPathElement::svgCurveToCubic):
        (WebCore::SVGPathElement::svgCurveToCubicSmooth):
        (WebCore::SVGPathElement::svgCurveToQuadratic):
        (WebCore::SVGPathElement::svgCurveToQuadraticSmooth):
        (WebCore::SVGPathElement::svgArcTo):
        (WebCore::SVGPathElement::parseMappedAttribute):
        * ksvg2/svg/SVGPathElement.h:
        * ksvg2/svg/SVGPathSegArc.cpp:
        (WebCore::SVGPathSegArcAbs::SVGPathSegArcAbs):
        (WebCore::SVGPathSegArcAbs::setX):
        (WebCore::SVGPathSegArcAbs::x):
        (WebCore::SVGPathSegArcAbs::setY):
        (WebCore::SVGPathSegArcAbs::y):
        (WebCore::SVGPathSegArcAbs::setR1):
        (WebCore::SVGPathSegArcAbs::r1):
        (WebCore::SVGPathSegArcAbs::setR2):
        (WebCore::SVGPathSegArcAbs::r2):
        (WebCore::SVGPathSegArcAbs::setAngle):
        (WebCore::SVGPathSegArcAbs::angle):
        (WebCore::SVGPathSegArcRel::SVGPathSegArcRel):
        (WebCore::SVGPathSegArcRel::setX):
        (WebCore::SVGPathSegArcRel::x):
        (WebCore::SVGPathSegArcRel::setY):
        (WebCore::SVGPathSegArcRel::y):
        (WebCore::SVGPathSegArcRel::setR1):
        (WebCore::SVGPathSegArcRel::r1):
        (WebCore::SVGPathSegArcRel::setR2):
        (WebCore::SVGPathSegArcRel::r2):
        (WebCore::SVGPathSegArcRel::setAngle):
        (WebCore::SVGPathSegArcRel::angle):
        * ksvg2/svg/SVGPathSegArc.h:
        * ksvg2/svg/SVGPathSegCurvetoCubic.cpp:
        (WebCore::SVGPathSegCurvetoCubicAbs::SVGPathSegCurvetoCubicAbs):
        (WebCore::SVGPathSegCurvetoCubicAbs::setX):
        (WebCore::SVGPathSegCurvetoCubicAbs::x):
        (WebCore::SVGPathSegCurvetoCubicAbs::setY):
        (WebCore::SVGPathSegCurvetoCubicAbs::y):
        (WebCore::SVGPathSegCurvetoCubicAbs::setX1):
        (WebCore::SVGPathSegCurvetoCubicAbs::x1):
        (WebCore::SVGPathSegCurvetoCubicAbs::setY1):
        (WebCore::SVGPathSegCurvetoCubicAbs::y1):
        (WebCore::SVGPathSegCurvetoCubicAbs::setX2):
        (WebCore::SVGPathSegCurvetoCubicAbs::x2):
        (WebCore::SVGPathSegCurvetoCubicAbs::setY2):
        (WebCore::SVGPathSegCurvetoCubicAbs::y2):
        (WebCore::SVGPathSegCurvetoCubicRel::SVGPathSegCurvetoCubicRel):
        (WebCore::SVGPathSegCurvetoCubicRel::setX):
        (WebCore::SVGPathSegCurvetoCubicRel::x):
        (WebCore::SVGPathSegCurvetoCubicRel::setY):
        (WebCore::SVGPathSegCurvetoCubicRel::y):
        (WebCore::SVGPathSegCurvetoCubicRel::setX1):
        (WebCore::SVGPathSegCurvetoCubicRel::x1):
        (WebCore::SVGPathSegCurvetoCubicRel::setY1):
        (WebCore::SVGPathSegCurvetoCubicRel::y1):
        (WebCore::SVGPathSegCurvetoCubicRel::setX2):
        (WebCore::SVGPathSegCurvetoCubicRel::x2):
        (WebCore::SVGPathSegCurvetoCubicRel::setY2):
        (WebCore::SVGPathSegCurvetoCubicRel::y2):
        * ksvg2/svg/SVGPathSegCurvetoCubic.h:
        * ksvg2/svg/SVGPathSegCurvetoCubicSmooth.cpp:
        (WebCore::SVGPathSegCurvetoCubicSmoothAbs::SVGPathSegCurvetoCubicSmoothAbs):
        (WebCore::SVGPathSegCurvetoCubicSmoothAbs::setX):
        (WebCore::SVGPathSegCurvetoCubicSmoothAbs::x):
        (WebCore::SVGPathSegCurvetoCubicSmoothAbs::setY):
        (WebCore::SVGPathSegCurvetoCubicSmoothAbs::y):
        (WebCore::SVGPathSegCurvetoCubicSmoothAbs::setX2):
        (WebCore::SVGPathSegCurvetoCubicSmoothAbs::x2):
        (WebCore::SVGPathSegCurvetoCubicSmoothAbs::setY2):
        (WebCore::SVGPathSegCurvetoCubicSmoothAbs::y2):
        (WebCore::SVGPathSegCurvetoCubicSmoothRel::SVGPathSegCurvetoCubicSmoothRel):
        (WebCore::SVGPathSegCurvetoCubicSmoothRel::setX):
        (WebCore::SVGPathSegCurvetoCubicSmoothRel::x):
        (WebCore::SVGPathSegCurvetoCubicSmoothRel::setY):
        (WebCore::SVGPathSegCurvetoCubicSmoothRel::y):
        (WebCore::SVGPathSegCurvetoCubicSmoothRel::setX2):
        (WebCore::SVGPathSegCurvetoCubicSmoothRel::x2):
        (WebCore::SVGPathSegCurvetoCubicSmoothRel::setY2):
        (WebCore::SVGPathSegCurvetoCubicSmoothRel::y2):
        * ksvg2/svg/SVGPathSegCurvetoCubicSmooth.h:
        * ksvg2/svg/SVGPathSegCurvetoQuadratic.cpp:
        (WebCore::SVGPathSegCurvetoQuadraticAbs::SVGPathSegCurvetoQuadraticAbs):
        (WebCore::SVGPathSegCurvetoQuadraticAbs::setX):
        (WebCore::SVGPathSegCurvetoQuadraticAbs::x):
        (WebCore::SVGPathSegCurvetoQuadraticAbs::setY):
        (WebCore::SVGPathSegCurvetoQuadraticAbs::y):
        (WebCore::SVGPathSegCurvetoQuadraticAbs::setX1):
        (WebCore::SVGPathSegCurvetoQuadraticAbs::x1):
        (WebCore::SVGPathSegCurvetoQuadraticAbs::setY1):
        (WebCore::SVGPathSegCurvetoQuadraticAbs::y1):
        (WebCore::SVGPathSegCurvetoQuadraticRel::SVGPathSegCurvetoQuadraticRel):
        (WebCore::SVGPathSegCurvetoQuadraticRel::setX):
        (WebCore::SVGPathSegCurvetoQuadraticRel::x):
        (WebCore::SVGPathSegCurvetoQuadraticRel::setY):
        (WebCore::SVGPathSegCurvetoQuadraticRel::y):
        (WebCore::SVGPathSegCurvetoQuadraticRel::setX1):
        (WebCore::SVGPathSegCurvetoQuadraticRel::x1):
        (WebCore::SVGPathSegCurvetoQuadraticRel::setY1):
        (WebCore::SVGPathSegCurvetoQuadraticRel::y1):
        * ksvg2/svg/SVGPathSegCurvetoQuadratic.h:
        (WebCore::SVGPathSegCurvetoQuadraticRel::toString):
        * ksvg2/svg/SVGPathSegCurvetoQuadraticSmooth.cpp:
        (WebCore::SVGPathSegCurvetoQuadraticSmoothAbs::SVGPathSegCurvetoQuadraticSmoothAbs):
        (WebCore::SVGPathSegCurvetoQuadraticSmoothAbs::setX):
        (WebCore::SVGPathSegCurvetoQuadraticSmoothAbs::x):
        (WebCore::SVGPathSegCurvetoQuadraticSmoothAbs::setY):
        (WebCore::SVGPathSegCurvetoQuadraticSmoothAbs::y):
        (WebCore::SVGPathSegCurvetoQuadraticSmoothRel::SVGPathSegCurvetoQuadraticSmoothRel):
        (WebCore::SVGPathSegCurvetoQuadraticSmoothRel::setX):
        (WebCore::SVGPathSegCurvetoQuadraticSmoothRel::x):
        (WebCore::SVGPathSegCurvetoQuadraticSmoothRel::setY):
        (WebCore::SVGPathSegCurvetoQuadraticSmoothRel::y):
        * ksvg2/svg/SVGPathSegCurvetoQuadraticSmooth.h:
        * ksvg2/svg/SVGPathSegLineto.cpp:
        (WebCore::SVGPathSegLinetoAbs::SVGPathSegLinetoAbs):
        (WebCore::SVGPathSegLinetoAbs::setX):
        (WebCore::SVGPathSegLinetoAbs::x):
        (WebCore::SVGPathSegLinetoAbs::setY):
        (WebCore::SVGPathSegLinetoAbs::y):
        (WebCore::SVGPathSegLinetoRel::SVGPathSegLinetoRel):
        (WebCore::SVGPathSegLinetoRel::setX):
        (WebCore::SVGPathSegLinetoRel::x):
        (WebCore::SVGPathSegLinetoRel::setY):
        (WebCore::SVGPathSegLinetoRel::y):
        * ksvg2/svg/SVGPathSegLineto.h:
        * ksvg2/svg/SVGPathSegLinetoHorizontal.cpp:
        (WebCore::SVGPathSegLinetoHorizontalAbs::SVGPathSegLinetoHorizontalAbs):
        (WebCore::SVGPathSegLinetoHorizontalAbs::setX):
        (WebCore::SVGPathSegLinetoHorizontalAbs::x):
        (WebCore::SVGPathSegLinetoHorizontalRel::SVGPathSegLinetoHorizontalRel):
        (WebCore::SVGPathSegLinetoHorizontalRel::setX):
        (WebCore::SVGPathSegLinetoHorizontalRel::x):
        * ksvg2/svg/SVGPathSegLinetoHorizontal.h:
        * ksvg2/svg/SVGPathSegLinetoVertical.cpp:
        (WebCore::SVGPathSegLinetoVerticalAbs::SVGPathSegLinetoVerticalAbs):
        (WebCore::SVGPathSegLinetoVerticalAbs::setY):
        (WebCore::SVGPathSegLinetoVerticalAbs::y):
        (WebCore::SVGPathSegLinetoVerticalRel::SVGPathSegLinetoVerticalRel):
        (WebCore::SVGPathSegLinetoVerticalRel::setY):
        (WebCore::SVGPathSegLinetoVerticalRel::y):
        * ksvg2/svg/SVGPathSegLinetoVertical.h:
        * ksvg2/svg/SVGPathSegList.cpp:
        (WebCore::SVGPathSegList::getPathSegAtLength):
        * ksvg2/svg/SVGPathSegList.h:
        * ksvg2/svg/SVGPathSegMoveto.cpp:
        (WebCore::SVGPathSegMovetoAbs::SVGPathSegMovetoAbs):
        (WebCore::SVGPathSegMovetoAbs::setX):
        (WebCore::SVGPathSegMovetoAbs::x):
        (WebCore::SVGPathSegMovetoAbs::setY):
        (WebCore::SVGPathSegMovetoAbs::y):
        (WebCore::SVGPathSegMovetoRel::SVGPathSegMovetoRel):
        (WebCore::SVGPathSegMovetoRel::setX):
        (WebCore::SVGPathSegMovetoRel::x):
        (WebCore::SVGPathSegMovetoRel::setY):
        (WebCore::SVGPathSegMovetoRel::y):
        * ksvg2/svg/SVGPathSegMoveto.h:
        * ksvg2/svg/SVGPolyElement.cpp:
        (WebCore::SVGPolyElement::svgPolyTo):
        * ksvg2/svg/SVGRadialGradientElement.cpp:
        (WebCore::SVGRadialGradientElement::buildGradient):
        * ksvg2/svg/SVGSVGElement.cpp:
        (WebCore::SVGSVGElement::viewport):
        (WebCore::SVGSVGElement::getCurrentTime):
        * ksvg2/svg/SVGStopElement.cpp:
        (WebCore::SVGStopElement::SVGStopElement):
        (WebCore::SVGStopElement::parseMappedAttribute):
        * ksvg2/svg/SVGStopElement.h:
        * ksvg2/svg/SVGTransform.cpp:
        (SVGTransform::translate):
        (SVGTransform::scale):
        * ksvg2/svg/SVGTransformDistance.cpp:
        (WebCore::SVGTransformDistance::addToSVGTransform):
        (WebCore::SVGTransformDistance::distance):
        * ksvg2/svg/SVGTransformable.cpp:
        (WebCore::SVGTransformable::parseTransformAttribute):

2007-07-03  Anders Carlsson  <andersca@apple.com>

        Reviewed by Darin.

        <rdar://problem/5289718>
        http://bugs.webkit.org/show_bug.cgi?id=14437
        CrashTracer: [REGRESSION] 76 crashes in Safari at com.apple.WebCore: WebCore::Frame::settings const + 6 (14437)
        
        Based on a patch from Maxime Britto.
        
        * page/mac/WebCoreFrameBridge.mm:
        (-[WebCoreFrameBridge stringByEvaluatingJavaScriptFromString:forceUserGesture:]):
        If the script caused the frame to go away, return nil. This can only happen if a plugin in a subframe destroys
        its frame.

        (-[WebCoreFrameBridge aeDescByEvaluatingJavaScriptFromString:]):
        ASSERT that this is only called on the main frame.

2007-07-03  John Sullivan  <sullivan@apple.com>

        Written by Darin, reviewed by me
        
        - fixed <rdar://problem/5249730> REGRESSION (Leopard, around 9A464): Safari opens the same local 
          documents more than once due to canonicalization change

        * loader/mac/LoaderNSURLExtras.m:
        (canonicalURL):
        pass URL through KURL so we get KURL's version of canonicalization as well as
        NSURLProtocol's version of canonicalization

2007-07-03  Sam Weinig  <sam@webkit.org>

        Reviewed by Darin.

        Seventh round of fixes for implicit 64-32 bit conversion errors.
        <rdar://problem/5292262>

        - Adds more narrowPrecision functions to FloatPoint, FloatSize and FloatRect.
        - Changes over more implicit conversions to use new functions.

        * bindings/js/kjs_window.cpp:
        (KJS::WindowFunc::callAsFunction):
        * platform/graphics/FloatPoint.cpp:
        (WebCore::FloatPoint::matrixTransform):
        (WebCore::FloatPoint::narrowPrecision):
        * platform/graphics/FloatPoint.h:
        * platform/graphics/FloatRect.cpp:
        (WebCore::FloatRect::narrowPrecision):
        * platform/graphics/FloatRect.h:
        * platform/graphics/FloatSize.cpp:
        (WebCore::FloatSize::narrowPrecision):
        * platform/graphics/FloatSize.h:
        * platform/graphics/Path.cpp:
        (WebCore::Path::createRoundedRectangle):
        (WebCore::Path::createRectangle):
        (WebCore::Path::createEllipse):
        * platform/graphics/mac/ColorMac.mm:
        (WebCore::nsColor):
        * platform/graphics/mac/IconMac.mm:
        (WebCore::Icon::paint):
        * platform/graphics/svg/cg/CgSupport.cpp:
        (WebCore::applyStrokeStyleToContext):
        * platform/graphics/svg/cg/SVGPaintServerGradientCg.cpp:
        (WebCore::CGShadingRefForRadialGradient):
        (WebCore::SVGPaintServerGradient::updateQuartzGradientStopsCache):
        (WebCore::SVGPaintServerGradient::handleBoundingBoxModeAndGradientTransformation):
        * platform/graphics/svg/cg/SVGResourceMaskerCg.mm:
        (WebCore::applyLuminanceToAlphaFilter):
        (WebCore::applyExpandAlphatoGrayscaleFilter):
        (WebCore::transformImageIntoGrayscaleMask):
        * platform/mac/WebCoreTextRenderer.mm:
        (WebCoreDrawTextAtPoint):
        * rendering/RenderPath.cpp:
        (WebCore::RenderPath::mapAbsolutePointToLocal):
        * rendering/RenderSVGContainer.cpp:
        (WebCore::RenderSVGContainer::calcViewport):
        * rendering/RenderSVGImage.cpp:
        (WebCore::RenderSVGImage::nodeAtPoint):
        * rendering/RenderSVGText.cpp:
        (WebCore::RenderSVGText::relativeBBox):

2007-07-03  Anders Carlsson  <andersca@apple.com>

        Reviewed by Adam.

        <rdar://problem/5261523>
        Crash playing MP11 on cnbc.com
        
        The WMP Netscape plugin still creates a window even when windowless mode is turned on. Work around this by
        always removing the "windowlessvideo" parameter before passing it to the plugin.
        According to http://msdn2.microsoft.com/en-us/library/bb249373.aspx, "The windowlessVideo property is not 
        supported for Netscape Navigator. Setting a value for this property in Navigator may yield unexpected results."
        
        * plugins/win/PluginViewWin.cpp:
        (WebCore::PluginViewWndProc):
        (WebCore::PluginViewWin::paint):
        (WebCore::PluginViewWin::invalidateRect):
        (WebCore::PluginViewWin::determineQuirks):
        (WebCore::PluginViewWin::setParameters):
        (WebCore::PluginViewWin::PluginViewWin):
        (WebCore::PluginViewWin::init):
        * plugins/win/PluginViewWin.h:
        (WebCore::):

2007-07-03  Qing Zhao  <qing@staikos.net>

        Reviewed by George Staikos.

        Only draw sunken state for appropriate widgets. Not, for example, for
        lineedits.

        * platform/qt/RenderThemeQt.cpp:
        (WebCore::RenderThemeQt::applyTheme):

2007-07-03  Antti Koivisto  <antti@apple.com>

        Reviewed by Maciej.
        
        REGRESSION: misplaced selection ring remains after link is no longer focused.
        <rdar://problem/5205580>
        
        Fix placement of selection ring when part of the ring is in a different layer.

        * rendering/RenderFlow.cpp:
        (WebCore::RenderFlow::addFocusRingRects): Get coordinates right when moving to a different layer.
        * rendering/RenderObject.cpp:
        (WebCore::RenderObject::setStyle): 
        Don't reset state variables when not necessary.  When repaint() was called at the end of setSyle() it would
        get repaint rects wrong in some cases.

2007-07-03  Antti Koivisto  <antti@apple.com>

        Reviewed by Maciej.

        Blind fix for CrashTracer: [USER] 25 crashes in Safari at com.apple.WebCore: WebCore::Frame::document const + 6
        <rdar://problem/5263939>
        
        No one has managed to reproduce this but it looks like null check is needed here. There are plausible ways
        m_frame could be null for a live FrameView object.

        * page/FrameView.cpp:
        (WebCore::FrameView::needsLayout):

2007-07-02  Oliver Hunt  <oliver@apple.com>

        Reviewed by Darin.

        Fix for <rdar://problem/5098378> single-pixel image optimization needs to be rewritten to not depend on floating point bitmap
        Tested by fast/replaced/image-solid-color-with-alpha.html

        Switch from float to byte based bitmap when pulling the color from 1x1 pixel images so
        that we can use the single pixel image optimisation in WebKit/win.

        * platform/graphics/cg/ImageCG.cpp:
        (WebCore::BitmapImage::checkForSolidColor):

2007-07-02  Adam Roben  <aroben@apple.com>

        Fix Bug 14498: RenderContainer::positionForCoordinates contains an order of operations error
        http://bugs.webkit.org/show_bug.cgi?id=14498

        There were two bugs:
        1) xPos/yPos were flipped
        2) + binds tighter than ?:, so the order of operations was incorrect

        Reviewed by Darin.

        Test: fast/inline-block/14498-positionForCoordinates.html

        * rendering/RenderContainer.cpp:
        (WebCore::RenderContainer::positionForCoordinates):

2007-07-02  Darin Adler  <darin@apple.com>

        Reviewed by Kevin Decker and Tim Hatcher.

        - fix <rdar://problem/5307906> some classes need finalize methods because
          of non-trivial work done in dealloc methods

        * bindings/objc/DOMRGBColor.mm:
        (+[DOMRGBColor initialize]): Added. Tells finalizer to run on main thread,
        which is needed because we are sharing a CFDictionary here with no locking.

        * bridge/mac/WebCoreAXObject.mm:
        (+[WebCoreAXObject initialize]): Added. Tells finalizer to run on main thread.
        (-[WebCoreAXObject finalize]): Added. Calls detach.

        * WebCore.xcodeproj/project.pbxproj: Let Xcode do what it wants to do.

2007-07-02  Sam Weinig  <sam@webkit.org>

        Reviewed by Darin.

        Sixth round of fixes for implicit 64-32 bit conversion errors.
        <rdar://problem/5292262>

        Use new narrowPrecisionToFloat() and narrowPrecisionToCGFloat() where
        appropriate.

        * html/CanvasRenderingContext2D.cpp:
        (WebCore::CanvasRenderingContext2D::setShadow):
        (WebCore::CanvasRenderingContext2D::applyShadow):
        * html/CanvasStyle.cpp:
        (WebCore::CanvasStyle::applyStrokeColor):
        (WebCore::CanvasStyle::applyFillColor):
        * ksvg2/svg/SVGAngle.cpp:
        * ksvg2/svg/SVGAnimationElement.cpp:
        (WebCore::SVGAnimationElement::parseKeyNumbers):
        (WebCore::parseKeySplines):
        (WebCore::SVGAnimationElement::handleTimerEvent):
        (WebCore::SVGAnimationElement::updateAnimatedValueForElapsedSeconds):
        * ksvg2/svg/SVGPatternElement.cpp:
        (WebCore::SVGPatternElement::buildPattern):
        * ksvg2/svg/SVGRadialGradientElement.cpp:
        (WebCore::SVGRadialGradientElement::buildGradient):
        * platform/graphics/cg/AffineTransformCG.cpp:
        (WebCore::AffineTransform::AffineTransform):
        (WebCore::AffineTransform::setMatrix):
        (WebCore::AffineTransform::map):
        (WebCore::AffineTransform::setA):
        (WebCore::AffineTransform::setB):
        (WebCore::AffineTransform::setC):
        (WebCore::AffineTransform::setD):
        (WebCore::AffineTransform::setE):
        (WebCore::AffineTransform::setF):
        (WebCore::AffineTransform::scale):
        (WebCore::AffineTransform::rotate):
        (WebCore::AffineTransform::translate):
        (WebCore::AffineTransform::shear):

2007-07-02  John Sullivan  <sullivan@apple.com>

        * page/mac/WebCoreFrameBridge.mm:
        (-[WebCoreFrameBridge getAllResourceDatas:andResponses:]):
        added a comment

2007-07-02  Sam Weinig  <sam@webkit.org>

        Rubberstamped by Darin.

        Rename FloatConversionUtilities.h to FloatConversion.h.
        Fix Win32 build.

        * WebCore.vcproj/WebCore.vcproj:
        * WebCore.xcodeproj/project.pbxproj:
        * platform/DeprecatedString.cpp:
        * platform/FloatConversion.h: Copied from platform/FloatConversionUtilities.h.
        * platform/FloatConversionUtilities.h: Removed.
        * platform/StringImpl.cpp:

2007-07-02  Sam Weinig  <sam@webkit.org>

        Reviewed by Darin.

        Fifth round of fixes for implicit 64-32 bit conversion errors.
        <rdar://problem/5292262>

        Add toFloat() method to string classes and use it where appropriate.

        * WebCore.xcodeproj/project.pbxproj:
        * css/cssparser.cpp:
        (WebCore::CSSParser::lex):
        * ksvg2/svg/SVGAngle.cpp:
        (WebCore::SVGAngle::setValueAsString):
        * platform/AtomicString.h:
        (WebCore::AtomicString::toFloat):
        * platform/DeprecatedString.cpp:
        (WebCore::DeprecatedString::toFloat):
        * platform/DeprecatedString.h:
        * platform/FloatConversionUtilities.h: Added.
        (WebCore::narrowPrecisionToFloat):
        (WebCore::narrowPrecisionToCGFloat):
        * platform/PlatformString.h:
        * platform/String.cpp:
        (WebCore::String::toFloat):
        * platform/StringImpl.cpp:
        (WebCore::StringImpl::toFloat):
        * platform/StringImpl.h:

2007-07-02  Sam Weinig  <sam@webkit.org>

        Reviewed by Kevin McCullough.

        Fourth round of fixes for implicit 64-32 bit conversion errors.
        <rdar://problem/5292262>

        Use new piDouble and piFloat constants instead of M_PI.

        * html/CanvasRenderingContext2D.cpp:
        (WebCore::CanvasRenderingContext2D::rotate):
        * ksvg2/svg/SVGParserUtilities.cpp:
        (WebCore::SVGPathParser::calculateArc):
        * platform/graphics/Path.cpp:
        (WebCore::pathLengthApplierFunction):
        (WebCore::Path::createEllipse):
        * platform/graphics/cg/GraphicsContextCG.cpp:
        (WebCore::GraphicsContext::drawEllipse):
        (WebCore::GraphicsContext::strokeArc):
        * platform/graphics/cg/PDFDocumentImage.cpp:
        (WebCore::PDFDocumentImage::setCurrentPage):
        * platform/graphics/svg/filters/cg/SVGFEHelpersCg.h:
        * rendering/RenderPath.cpp:
        (WebCore::drawMarkerWithData):

2007-07-01  Adam Roben  <aroben@apple.com>

        Clarify/fix {Shadow,BorderImage}ParseContext's memory management

        Prefast emitted warnings that drew my attention to
        {Shadow,BorderImage}ParseContext::failed().  It turned out that these
        methods were actually correct, but rather confusing. "failed" really
        meant "abort and clean up" rather than "did you fail?", which was
        unclear. However, once I figured that out, the "and clean up" part was
        still a bit confusing, because all failed() did was to set a flag that
        would later cause the ParseContext's members to be deleted in the
        destructor. To clear this up, I've gotten rid of the failed() method
        altogether. It always returned false, so I've replaced all calls to
        it with the value false.

        I also noticed that the lifetime management of the ParseContexts'
        members was in all cases confusing, and in some cases wrong. The
        m_border{Top,Right,Bottom,Left} members of BorderImageParseContext
        were leaked whenever a border-image property was successfully parsed.
        I fixed that by holding these members in OwnPtrs. The
        CSSPrimitiveValue members of {Shadow,BorderImage}ParseContext, which
        inherit from Shared, were being explicitly deleted, which is not a
        safe way to manage the lifetime of objects that inherit from Shared.
        To fix this, I put those members inside RefPtrs. These two changes
        allowed me to remove the destructors entirely.

        Reviewed by Darin.

        All regression tests pass.

        * css/cssparser.cpp:
        (WebCore::ShadowParseContext::commitValue): Use .release() to avoid
        ref-count churn.
        (WebCore::ShadowParseContext::commitLength): Use a RefPtr for the new
        value to avoid a leak.
        (WebCore::CSSParser::parseShadow): Use 'false' instead of
        'context.failed()', and use .release() to avoid ref-count churn.
        (WebCore::BorderImageParseContext::commitWidth): Updated to use
        OwnPtr.
        (WebCore::CSSParser::parseBorderImage): Use 'false' instead of
        'context.failed'.

2007-07-01  Anders Carlsson  <andersca@apple.com>

        Reviewed by John Sullivan.

        <rdar://problem/5297146>
        Crash in Mail at WebCore::Frame::setUserStyleSheetLocation (reproducible w/ particular message)
        
        * loader/Cache.cpp:
        (WebCore::Cache::requestResource):
        Only insert the resource in the LRU list if the cache is enabled.
        
        (WebCore::Cache::insertInLRUList):
        (WebCore::Cache::resourceAccessed):
        Assert that the resource is in the cache.

2007-07-01  Darin Adler  <darin@apple.com>

        * css/tokenizer.flex: Rolled out the fix for 14453.
        The layout test wasn't passing. We'll try again.

2007-07-01  Adam Roben  <aroben@apple.com>

        Fix a crash in ~PluginViewWin()

        This crash was introduced in r23827.

        Reviewed by Anders.

        Fixes dom/html/level2/html/HTMLAnchorElement01.html

        * plugins/win/PluginViewWin.cpp:
        (WebCore::PluginViewWin::~PluginViewWin): Allow m_plugin to be null.

2007-07-01  Rob Buis  <buis@kde.org>

        Reviewed by Darin.

        http://bugs.webkit.org/show_bug.cgi?id=14453
        REGRESSION: www.nzherald.co.nz almost all the formating is gone
 
        * css/tokenizer.flex: Allow hex colors with 2, 4, or 5 hex digits.

2007-07-01  Sam Weinig  <sam@webkit.org>

        Reviewed by Oliver.

        Third round of implicit 64-32 bit conversion errors fixes.
        <rdar://problem/5292262>

        - Use new CSSPrimitiveValue::getDoubleValue() and CSSPrimitiveValue::getIntValue()
          methods instead of CSSPrimitiveValue::getFloatValue() where appropriate.

        * css/CSSPrimitiveValue.cpp:
        (WebCore::CSSPrimitiveValue::computeLengthInt):
        (WebCore::CSSPrimitiveValue::computeLengthIntForLength):
        (WebCore::CSSPrimitiveValue::computeLengthShort):
        (WebCore::CSSPrimitiveValue::computeLengthFloat):
        (WebCore::CSSPrimitiveValue::computeLengthDouble):
        (WebCore::CSSPrimitiveValue::getDoubleValue):
        * css/CSSPrimitiveValue.h:
        (WebCore::CSSPrimitiveValue::getDoubleValue):
        (WebCore::CSSPrimitiveValue::getFloatValue):
        (WebCore::CSSPrimitiveValue::getIntValue):
        * css/Counter.h:
        (WebCore::Counter::listStyleNumber):
        * css/MediaQueryEvaluator.cpp:
        (WebCore::parseAspectRatio):
        * css/cssparser.cpp:
        (WebCore::BorderImageParseContext::commitBorderImage):
        * css/cssstyleselector.cpp:
        (WebCore::convertToLength):
        (WebCore::applyCounterList):
        (WebCore::CSSStyleSelector::applyProperty):
        (WebCore::CSSStyleSelector::mapBackgroundSize):
        (WebCore::CSSStyleSelector::mapBackgroundXPosition):
        (WebCore::CSSStyleSelector::mapBackgroundYPosition):
        * html/HTMLTableElement.cpp:
        (WebCore::HTMLTableElement::parseMappedAttribute):
        * ksvg2/css/SVGCSSStyleSelector.cpp:
        (WebCore::CSSStyleSelector::applySVGProperty):
        * ksvg2/misc/KCanvasRenderingStyle.cpp:
        (WebCore::KSVGPainterFactory::cssPrimitiveToLength):
        (WebCore::KSVGPainterFactory::dashArrayFromRenderingStyle):

2007-07-01  Pamela Greene  <pamg.bugs@gmail.com>

        Reviewed by Darin.

        Fix for <http://bugs.webkit.org/show_bug.cgi?id=14320>
        Bug 14320: <canvas> gradient stops at identical offsets are applied in the wrong order
        <rdar://problem/5290084>

        Use std::stable_sort() instead of qsort() to sort gradient stops.
        Adjust the comparison function accordingly.

        * html/CanvasGradient.cpp:
        (WebCore::compareStops):
        (WebCore::CanvasGradient::findStop):

2007-07-01  Holger Hans Peter Freyther  <zecke@selfish.org>

        Reviewed by Darin.

        m_usesPageCache was not initialized. As the b/f cache is only
        implemented in the Mac port and WebView.mm is taking care of calling
        Settings::setUsesPageCache I decided to make it false by default.

        * page/Settings.cpp:
        (WebCore::Settings::Settings): m_usesPageCache was not initialized

2007-07-01  Holger Hans Peter Freyther  <zecke@selfish.org>

        Reviewed by Darin.

        Inherited- and NonInheritedFlags is a bit field. But for comparsion
        the other part of the union _iflags/_niflags is used for comparions.
        This will compare 5 uninitialized bits of _iflags and 22 of _niflags.
        Make sure the unused bits have a specified value.

        * ksvg2/css/SVGRenderStyle.h:
        (WebCore::SVGRenderStyle::setBitDefaults): Make sure the unused bits
        have a value as well.

2007-06-30  Adam Roben  <aroben@apple.com>

        Compile WebCore with /W4 on Windows

        Some more warnings were disabled globally, including assignment within
        a conditional, unused variable, and various warnings related to
        inability to instantiate opaque structs.

        In addition, the "unreachable code" warning was turned off for
        CSSGrammar.cpp and XPathGrammar.cpp.

        Reviewed by Oliver.

        * WebCore.vcproj/WebCore.vcproj:

2007-06-29  Adam Roben  <aroben@apple.com>

        Give CString an equality operator to fix a bug in HTMLFormElement::formData

        The bug was spotted by MSVC /W4. The problem was that we were comparing
        a CString to a char* using ==, but CString had no equality operator.
        The result was that the CString was being cast to a const char* and a
        pointer comparison was being done, which would (essentially) always
        return false.

        There are two parts to the fix: get rid of CString's const char*
        casting operator, and add an equality operator. Previous uses of the
        casting operator have been changed to use CString::data().

        Test: http/misc/isindex-formdata.html

        Reviewed by Oliver.

        * dom/XMLTokenizer.cpp:
        (WebCore::parseXMLDocumentFragment):
        * html/HTMLDocument.cpp:
        (WebCore::HTMLDocument::determineParseMode):
        * html/HTMLFormElement.cpp:
        (WebCore::HTMLFormElement::formData):
        * loader/TextResourceDecoder.cpp:
        (WebCore::TextResourceDecoder::checkForCSSCharset):
        * platform/CString.cpp:
        (WebCore::operator==):
        * platform/CString.h:
        * platform/KURL.cpp:
        (WebCore::encodeRelativeString):
        * platform/StringImpl.cpp:
        (WebCore::StringImpl::toDouble):
        * platform/network/cf/FormDataStreamCFNet.cpp:
        (WebCore::setHTTPBody):
        * platform/network/mac/FormDataStreamMac.mm:
        (WebCore::setHTTPBody):
        * platform/win/ClipboardUtilitiesWin.cpp:
        (WebCore::markupToCF_HTML):
        * plugins/win/PluginPackageWin.cpp:
        (WebCore::splitString):
        * plugins/win/PluginStreamWin.cpp:
        (WebCore::PluginStreamWin::startStream):
        (WebCore::PluginStreamWin::destroyStream):
        (WebCore::PluginStreamWin::sendJavaScriptStream):
        (WebCore::PluginStreamWin::didFinishLoading):
        * plugins/win/PluginViewWin.cpp:
        (WebCore::PluginViewWin::start):
        (WebCore::createUTF8String):
        (WebCore::PluginViewWin::userAgent):
        * xml/XSLStyleSheet.cpp:
        (WebCore::XSLStyleSheet::locateStylesheetSubResource):
        * xml/XSLTProcessor.cpp:
        (WebCore::xsltParamArrayFromParameterMap):

2007-06-29  Adam Roben  <aroben@apple.com>

        Initialize two variables that MSVC /W4 isn't smart enough to realize always get initialized

        Reviewed by John.

        * editing/Editor.cpp:
        (WebCore::Editor::advanceToNextMisspelling):
        * html/HTMLParser.cpp:

2007-06-29  Adam Roben  <aroben@apple.com>

        Fix some possibly unitialized variables found by MSVC /W4

        Reviewed by John.

        * rendering/bidi.cpp:
        (WebCore::RenderBlock::layoutInlineChildren):

2007-06-29  Adam Roben  <aroben@apple.com>

        Remove bogus cast found by MSVC /W4

        Reviewed by John and Oliver.

        * ksvg2/css/SVGCSSParser.cpp:
        (WebCore::CSSParser::parseSVGValue):

2007-06-29  Adam Roben  <aroben@apple.com>

        Remove unused local functions uncovered by MSVC /W4

        Reviewed by John and Oliver.

        * platform/win/SearchPopupMenuWin.cpp:
        * rendering/RenderText.cpp:

2007-06-29  Adam Roben  <aroben@apple.com>

        Don't take the address of temporary values to appease MSVC /W4

        Reviewed by Oliver.

        No regression test possible.

        * platform/win/PopupMenuWin.cpp:
        (WebCore::PopupMenu::invalidateItem):
        (WebCore::PopupMenu::valueChanged):
        (WebCore::PopupWndProc):
        * platform/win/ScrollViewWin.cpp:
        (WebCore::ScrollView::ScrollViewPrivate::scrollBackingStore):
        * platform/win/UniscribeController.cpp:
        (WebCore::UniscribeController::shapeAndPlaceItem):
        * platform/win/WidgetWin.cpp:
        (WebCore::Widget::invalidateRect):

2007-06-29  Adam Roben  <aroben@apple.com>

        Make an int -> UINT conversion explicit that MSVC /W4 complains about

        Reviewed by John and Oliver.

        No regression test possible.

        * platform/win/SoundWin.cpp:

2007-06-29  Adam Roben  <aroben@apple.com>

        Remove unreachable code uncovered by MSVC /W4

        Reviewed by Oliver.

        No regression test possible.

        * html/CanvasRenderingContext2D.cpp:
        (WebCore::CanvasRenderingContext2D::createPattern):
        * html/HTMLAnchorElement.cpp:
        (WebCore::HTMLAnchorElement::isLiveLink):
        * html/HTMLElement.cpp:
        (WebCore::HTMLElement::contentEditable):
        * platform/DeprecatedString.cpp:
        (WebCore::allocateHandle):
        (WebCore::freeHandle):
        * plugins/win/npapi.cpp:
        (pluginViewForInstance):
        * rendering/RenderImage.cpp:
        (WebCore::RenderImage::isWidthSpecified):
        (WebCore::RenderImage::isHeightSpecified):
        * rendering/RenderTheme.cpp:
        (WebCore::RenderTheme::isControlStyled):

2007-06-29  John Sullivan  <sullivan@apple.com>

        Reviewed by Oliver Hunt.
        
        - WebCore support for accessing the set of rectangles that encompass the selected text
        
        * page/Frame.h:
        * page/Frame.cpp:
        (WebCore::Frame::selectionTextRects):
        new function, fills in a passed Vector with the line box rects that represent the selected range

        * rendering/RenderText.cpp:
        (WebCore::RenderText::addLineBoxRects):
        fixed off-by-one bug involving use of the confusing function InlineTextBox::end()

        * WebCore.exp:
        exported symbol for this new function

2007-06-29  Justin Garcia  <justin.garcia@apple.com>

        Reviewed by Harrison.
        
        <rdar://problem/5299513> REGRESSION: In Mail, a crash occurs when attempting to undo a newly created To Do
        
        Rolled out a change made in r23787.
        
        * editing/DeleteSelectionCommand.cpp:
        (WebCore::DeleteSelectionCommand::handleGeneralDelete):

2007-06-29  Geoffrey Garen  <ggaren@apple.com>

        Reviewed by Darin Adler, Anders Carlsson.
        
        Fixed <rdar://problem/5303567> REGRESSION: XMLHttpRequest.responseXML 
        returns NULL if response MIME type is not XML -- breaks Wikipedia widget
        
        The spec says that responseXML must return null for any HTTP response
        with a non-XML MIME type. Technically, that leaves non-HTTP responses
        free to do whatever they want.

        * xml/xmlhttprequest.cpp:
        (WebCore::XMLHttpRequest::getResponseXML): Only return null for non-XML
        MIME types if the response was HTTP.

2007-06-29  Sam Weinig  <sam@webkit.org>

        Reviewed by Darin.

        Second pass at fixing implicit 64-32 bit conversion errors.
        <rdar://problem/5292262>

        - Use new JSValue::toFloat() method instead of toNumber() where
          appropriate.

        * bindings/js/JSCanvasRenderingContext2DCustom.cpp:
        (WebCore::JSCanvasRenderingContext2D::setFillColor):
        (WebCore::JSCanvasRenderingContext2D::setStrokeColor):
        (WebCore::JSCanvasRenderingContext2D::strokeRect):
        (WebCore::JSCanvasRenderingContext2D::drawImage):
        (WebCore::JSCanvasRenderingContext2D::drawImageFromRect):
        (WebCore::JSCanvasRenderingContext2D::setShadow):
        * bindings/js/JSHTMLSelectElementCustom.cpp:
        (WebCore::JSHTMLSelectElement::remove):
        * bindings/js/JSSVGMatrixCustom.cpp:
        (WebCore::JSSVGMatrix::rotateFromVector):
        * bindings/js/kjs_events.cpp:
        (KJS::JSClipboardPrototypeFunction::callAsFunction):
        * bindings/scripts/CodeGeneratorJS.pm:
        * ksvg2/svg/SVGScriptElement.cpp:
        (WebCore::SVGScriptElement::executeScript):

2007-06-29  Adele Peterson  <adele@apple.com>

        Rolling out fix for <rdar://problem/5301322> since it broke layout tests.

        * html/HTMLInputElement.h:
        * html/HTMLTextAreaElement.h:

2007-06-29  Geoffrey Garen  <ggaren@apple.com>

        Reviewed by Oliver Hunt.

        Fixed <rdar://problem/4962298> REGRESSION: Synchronous XHR for missing 
        local file throws exception -- breaks Wikipedia widget

        * WebCore.xcodeproj/project.pbxproj:
        * xml/xmlhttprequest.cpp:
        (WebCore::XMLHttpRequest::send): Don't throw exceptions for local files.

2007-06-29  Ada Chan  <adachan@apple.com>

        Reviewed by Adam.

        Fixed a previous fix to a signed/unsigned mismatch.

        * plugins/win/PluginPackageWin.cpp:
        (WebCore::splitString):

2007-06-29  Adele Peterson  <adele@apple.com>

        Reviewed by Ada and Kevin McCullough.

        Fix for <rdar://problem/5301322> REGRESSION: Select All selects the whole page when used in readonly textareas

        Implemented canSelectAll and selectAll for text fields and textareas, since they're special cases even when they're not editable.

        Tests:
        fast/forms/input-readonly-select-all.html
        fast/forms/textarea-readonly-select-all.html

        * html/HTMLInputElement.h:
        (WebCore::HTMLInputElement::canSelectAll):
        (WebCore::HTMLInputElement::selectAll):
        * html/HTMLTextAreaElement.h:
        (WebCore::HTMLTextAreaElement::canSelectAll):
        (WebCore::HTMLTextAreaElement::selectAll):

2007-06-29  Adam Roben  <aroben@apple.com>

        Build fix

        This is what happens when you test your patch on two OSs and then
        commit from the wrong one.

        * rendering/RenderTextControl.cpp:
        (WebCore::RenderTextControl::valueChanged):
        (WebCore::RenderTextControl::itemText):
        (WebCore::RenderTextControl::itemIsSeparator):

2007-06-29  Adam Roben  <aroben@apple.com>

        Start compiling WebCore with /W3 under MSVC

        One warning was globally disabled: implicit conversion of int to bool.

        Reviewed by Darin.

        * WebCore.vcproj/WebCore.vcproj:

2007-06-29  Adam Roben  <aroben@apple.com>

        Turn DeprecatedStringData's copy constructor into a static method to appease MSVC /W3

        DeprecatedStringData now has no public copy constructor. The single
        call to the old one has been replaced with a call to the new
        DeprecatedStringData::createAndAdopt static method.

        Reviewed by Darin.

        All regression tests pass.

        * platform/DeprecatedString.cpp:
        (WebCore::DeprecatedStringData::createAndAdopt):
        (WebCore::DeprecatedStringData::adopt):
        (WebCore::DeprecatedString::detachIfInternal):
        * platform/DeprecatedString.h:

2007-06-29  Adam Roben  <aroben@apple.com>

        Fix more signed/unsigned mismatches uncovered by MSVC /W3

        Reviewed by John.

        No regression tests possible.

        * platform/network/cf/ResourceResponseCFNet.cpp:
        (WebCore::filenameHasSaneExtension):
        * platform/win/FontDataWin.cpp:
        (WebCore::FontData::containsCharacters):
        * platform/win/PlatformScrollBarSafari.cpp:
        (WebCore::):
        * platform/win/UniscribeController.cpp:
        (WebCore::UniscribeController::advance):
        (WebCore::UniscribeController::shapeAndPlaceItem):
        * platform/win/WebCoreTextRenderer.cpp:
        (WebCore::doDrawTextAtPoint):
        * plugins/win/PluginDatabaseWin.cpp:
        (WebCore::parseVersionString):
        * plugins/win/PluginPackageWin.cpp:
        (WebCore::splitString):
        * plugins/win/PluginViewWin.cpp:
        (WebCore::freeStringArray):
        (WebCore::PluginViewWin::invalidateTimerFired):

2007-06-29  Adam Roben  <aroben@apple.com>

        Change PopupMenuClient::listSize to return an int to appease warnings from MSVC /W3

        Reviewed by John.

        No regression test possible.

        * html/HTMLSelectElement.cpp:
        (WebCore::HTMLSelectElement::menuListDefaultEventHandler):
        * platform/PopupMenuClient.h:
        * platform/win/PopupMenuWin.cpp:
        (WebCore::PopupMenu::calculatePositionAndSize):
        (WebCore::PopupMenu::focusFirst):
        (WebCore::PopupMenu::focusLast):
        (WebCore::PopupMenu::down):
        (WebCore::PopupMenu::up):
        (WebCore::PopupMenu::paint):
        * rendering/RenderMenuList.cpp:
        * rendering/RenderMenuList.h:
        * rendering/RenderTextControl.cpp:
        * rendering/RenderTextControl.h:

2007-06-29  Adam Roben  <aroben@apple.com>

        Fix two typos spotted by MSVC /W3

        Both typos were a semicolon following the condition of an if. This
        would cause the intended body of the if to always execute.

        Unfortunately neither of these fixes are testable.
        BackForwardList::goForward is only called from WebBackForwardList, and
        the createDragImageFromImage bug would only manifest itself when
        CreateCompatibleDC failed.

        Reviewed by Mark.

        * history/BackForwardList.cpp:
        (WebCore::BackForwardList::goForward):
        * platform/win/DragImageWin.cpp:
        (WebCore::createDragImageFromImage):

2007-06-29  Adam Treat  <adam@staikos.net>

        Reviewed by george Staikos.

        Support horizontal and vertical scroll, and set the right units.

        * platform/qt/WheelEventQt.cpp:
        (WebCore::PlatformWheelEvent::PlatformWheelEvent):

2007-06-28  Adam Roben  <aroben@apple.com>

        Get WebCore compiling with /W2 on Windows

        Reviewed by Steve.

        No regression tests affected.

        * WebCore.vcproj/WebCore.vcproj: Turn the warning level up to 2, and
        disable two warnings: implicit int <=> float conversion, and class vs.
        struct inconsistency.
        * dom/CharacterData.cpp:
        (WebCore::CharacterData::deleteData): Cast to int before negating.
        * loader/Cache.cpp:
        (WebCore::Cache::remove): Ditto.
        * platform/graphics/Path.cpp:
        (WebCore::pathLengthApplierFunction): Consistently use floats.
        * platform/graphics/cg/GraphicsContextCG.cpp:
        (WebCore::GraphicsContext::drawEllipse): Ditto.
        * platform/win/GraphicsContextWin.cpp:
        (WebCore::GraphicsContext::drawLineForMisspellingOrBadGrammar): Ditto.

2007-06-28  Geoffrey Garen  <ggaren@apple.com>

        Reviewed by Maciej Stachowiak.
        
        Fixed <rdar://problem/5299005> DOM timers fire without a local autorelease 
        pool => pathologically high high water mark
        
        I couldn't measure any performance problems with iBench HTML or PLT.

        * WebCore.xcodeproj/project.pbxproj: Changed .cpp file to be ObjC++.
        * platform/mac/SharedTimerMac.cpp:
        (WebCore::timerFired): Added autorelease pool.

2007-06-28  Mitz Pettel  <mitz@webkit.org>

        Reviewed by Beth.

        - fix http://bugs.webkit.org/show_bug.cgi?id=14118
          ASSERTION FAILED: !needsLayout() seen again

        Test: fast/dynamic/recursive-layout.html

        * page/FrameView.cpp:
        (WebCore::FrameView::layout): Removed the midLayout guards around
        the calls to invalidateSelection() and updateWidgetPositions(). Those
        calls may dirty the layout, but in that case they also update it, so
        they should be allowed to do it. Added an ASSERT to make sure that when
        they return, the root is not marked for layout.

2007-06-28  Sam Weinig  <sam@webkit.org>

        Rubberstamped by Adam Roben.

        Roll out r23861.  It caused the buildbot to fail on intel.

        * page/Page.cpp:
        (WebCore::Page::goToItem):

2007-06-26  Maxime Britto  <mbritto@pleyo.com>

        Reviewed by Geoff.

        Patch for http://bugs.webkit.org/show_bug.cgi?id=13038
        ASSERTION FAILED: item->target().isEmpty() || m_mainFrame->tree()->find(item->target()) == m_mainFrame

        Modification of an ASSERT on goToItem related to go back/forward in
        history.Don't need to check the frameset if the target is _blank.

         * page/Page.cpp:
         (WebCore::Page::goToItem):

2007-06-28  Anders Carlsson  <andersca@apple.com>

        Reviewed by Oliver.

        <rdar://problem/5234139>
        <object> with PNG src rendered as image document.
        
        Complete the URL before passing it to the frame loader client.
        
        * html/HTMLObjectElement.cpp:
        (WebCore::HTMLObjectElement::isImageType):

2007-06-28  Rob Buis  <buis@kde.org>

        Reviewed by Maciej.

        http://bugs.webkit.org/show_bug.cgi?id=14373
        CSS1: selectors (classes and IDs) cannot start with a dash or with a digit

        Make sure the id selector validates against the CSS2.1 identfier
        definition, not the hexcolor/HASH definition.

        * css/CSSGrammar.y:
        * css/cssparser.cpp:
        (WebCore::CSSParser::lex):
        (WebCore::CSSParser::text):
        * css/tokenizer.flex:

2007-06-28  Simon Hausmann  <hausmann@kde.org>

        Reviewed by Zack.

        Implemented PasteboardQt::writeSelection to copy the selected text into the Clipboard as well as PasteboardQt::plainText to retrieve plain text from the clipboard for pasting for example into form fields.

        * platform/qt/PasteboardQt.cpp:
        (WebCore::Pasteboard::writeSelection):

2007-06-28  Antti Koivisto  <antti@apple.com>

        Reviewed by Mitz.
        
        Fix http://bugs.webkit.org/show_bug.cgi?id=14332
        Bug 14332: REGRESSION (r21145): <td> width ignored
        <rdar://problem/5290123>
        
        Cells in table with non-zero cellpadding are not considered empty.

        * rendering/AutoTableLayout.cpp:
        (WebCore::AutoTableLayout::recalcColumn):

2007-06-28  Adam Roben  <aroben@apple.com>

        Fix <rdar://problem/5300455> Prefast: typo in RenderBlock::paintObject

        Reviewed by Hyatt.

        No layout test possible, as this bug didn't have any effect since
        "bool & bool" has the same value as "bool && bool"

        * rendering/RenderBlock.cpp:
        (WebCore::RenderBlock::paintObject): Changed & to &&.

2007-06-28  Adam Roben  <aroben@apple.com>

        Fix <rdar://problem/5300443> word-break and -webkit-user-modify allow any value

        The bug was caused by two typos found by prefast.

        Reviewed by Hyatt.

        * css/cssparser.cpp:
        (WebCore::CSSParser::parseValue): Fixed typos.

2007-06-20  Matt Perry  <mpComplete@gmail.com>

        Reviewed by Adam.

        - Fix http://bugs.webkit.org/show_bug.cgi?id=14251:
          onchange handler for select controls doesn't fire when changing via keyboard

        * html/HTMLSelectElement.cpp:
        (WebCore::HTMLSelectElement::menuListDefaultEventHandler): Got rid of
        a call to saveLastSelection in the "Enter" key handler for select
        controls that was preventing onchange from firing.

2007-06-27  Sam Weinig  <sam@webkit.org>

        Fix Gdk, Qt, and Win32 builds.

        * WebCore.pro:
        * WebCore.vcproj/WebCore.vcproj:

2007-06-27  Sam Weinig  <sam@webkit.org>

        Reviewed by Geoff.

        Patch for http://bugs.webkit.org/show_bug.cgi?id=14319
        Move the Selection object out of the JS bindings

        - Renames JS Object Selection to DOMSelection to avoid a name
          conflict.

        * DerivedSources.make:
        * WebCore.xcodeproj/project.pbxproj:
        * bindings/js/kjs_window.cpp:
        (KJS::WindowPrivate::WindowPrivate):
        (KJS::Window::mark):
        (KJS::Window::clearHelperObjectProperties):
        (KJS::WindowFunc::callAsFunction):
        (KJS::Window::disconnectFrame):
        * bindings/js/kjs_window.h:
        (KJS::Window::):
        * page/DOMSelection.cpp: Added.
        (WebCore::DOMSelection::DOMSelection):
        (WebCore::DOMSelection::frame):
        (WebCore::DOMSelection::disconnectFrame):
        (WebCore::DOMSelection::anchorNode):
        (WebCore::DOMSelection::baseNode):
        (WebCore::DOMSelection::anchorOffset):
        (WebCore::DOMSelection::baseOffset):
        (WebCore::DOMSelection::focusNode):
        (WebCore::DOMSelection::extentNode):
        (WebCore::DOMSelection::focusOffset):
        (WebCore::DOMSelection::extentOffset):
        (WebCore::DOMSelection::isCollapsed):
        (WebCore::DOMSelection::type):
        (WebCore::DOMSelection::rangeCount):
        (WebCore::DOMSelection::collapse):
        (WebCore::DOMSelection::collapseToEnd):
        (WebCore::DOMSelection::collapseToStart):
        (WebCore::DOMSelection::empty):
        (WebCore::DOMSelection::setBaseAndExtent):
        (WebCore::DOMSelection::setPosition):
        (WebCore::DOMSelection::modify):
        (WebCore::DOMSelection::getRangeAt):
        (WebCore::DOMSelection::removeAllRanges):
        (WebCore::DOMSelection::addRange):
        (WebCore::DOMSelection::toString):
        * page/DOMSelection.h: Added.
        * page/DOMSelection.idl: Added.
        * page/DOMWindow.cpp:
        (WebCore::DOMWindow::disconnectFrame):
        (WebCore::DOMWindow::getSelection):
        * page/DOMWindow.h:
        * page/DOMWindow.idl:

2007-06-27  Sam Weinig  <sam@webkit.org>

        Reviewed by Maciej.

        2nd patch for http://bugs.webkit.org/show_bug.cgi?id=14111
        Autogenerate Event JS binding

        - Cleanup kjs_events

        * bindings/js/kjs_events.cpp:
        (WebCore::JSAbstractEventListener::JSAbstractEventListener):
        (WebCore::JSAbstractEventListener::handleEvent):
        (WebCore::JSAbstractEventListener::isHTMLEventListener):
        (WebCore::JSUnprotectedEventListener::JSUnprotectedEventListener):
        (WebCore::JSUnprotectedEventListener::~JSUnprotectedEventListener):
        (WebCore::JSUnprotectedEventListener::listenerObj):
        (WebCore::JSUnprotectedEventListener::windowObj):
        (WebCore::JSUnprotectedEventListener::clearWindowObj):
        (WebCore::JSUnprotectedEventListener::mark):
        (WebCore::JSEventListener::JSEventListener):
        (WebCore::JSEventListener::~JSEventListener):
        (WebCore::JSEventListener::listenerObj):
        (WebCore::JSEventListener::windowObj):
        (WebCore::JSEventListener::clearWindowObj):
        (WebCore::JSLazyEventListener::JSLazyEventListener):
        (WebCore::JSLazyEventListener::listenerObj):
        (WebCore::JSLazyEventListener::parseCode):
        (WebCore::getNodeEventListener):
        (WebCore::JSClipboard::JSClipboard):
        (WebCore::JSClipboard::getValueProperty):
        (WebCore::JSClipboard::putValueProperty):
        (WebCore::JSClipboardPrototypeFunction::callAsFunction):
        (WebCore::toJS):
        (WebCore::toClipboard):
        * bindings/js/kjs_events.h:
        (WebCore::JSClipboard::classInfo):
        (WebCore::JSClipboard::impl):
        * bindings/js/kjs_window.h:
        * ksvg2/events/JSSVGLazyEventListener.h:

2007-06-27  Sam Weinig  <sam@webkit.org>

        Reviewed by Adam Roben.

        Patch for http://bugs.webkit.org/show_bug.cgi?id=12045
        Crash under gmalloc at WTF::RefPtr<WebCore::HTMLSliderThumbElement>::operator->
        <rdar://problem/5286670>

        Test: fast/forms/thumbslider-no-parent-slider.html
        Test: fast/forms/thumbslider-crash.html

        * rendering/RenderObject.h:
        (WebCore::RenderObject::isSlider):
        * rendering/RenderSlider.h:
        (WebCore::RenderSlider::isSlider):
        * rendering/RenderTheme.cpp:
        (WebCore::RenderTheme::paint): Only paint thumbslider
        if the parent renderer is a RenderSlider.
        * rendering/RenderThemeMac.mm:
        (WebCore::RenderThemeMac::paintSliderThumb):
        * rendering/RenderThemeSafari.cpp:
        (WebCore::RenderThemeSafari::paintSliderThumb):

2007-06-27  George Staikos  <staikos@kde.org>

        Make Qt builds link when XSLT is turned off.

        * WebCore.pro:

2007-06-27  Steve Falkenburg  <sfalken@apple.com>

        Turn on static code analysis (Windows only).

        Affects only folks that have Visual Studio Team Suite installed,
        or who have replaced their compiler with the version shipping in the
        Vista SDK.
        
        Reviewed by Oliver.

        * WebCore.vcproj/WebCore.vcproj:

2007-06-27  George Staikos  <staikos@kde.org>

        Remove old commented out files that no-longer exist.

        * WebCore.pro:

2007-06-27  Justin Garcia  <justin.garcia@apple.com>

        Reviewed by John.

        <rdar://problem/5247341> REGRESSION: Pasting sometimes leaves out trailing newline
        
        Pasting with a trailing interchange newline doesn't work when pasting
        into an empty line.  Code that handles removing brs at the insertion
        position tries to also handle trailing interchange newlines by re-using
        those brs and fails.  Removed that code and handle all interchange
        newlines with code later in doApply().

        * editing/ReplaceSelectionCommand.cpp:
        (WebCore::ReplaceSelectionCommand::doApply): Don't try to re-use the
        endBR when there's a trailing interchange newline.
        
2007-06-27  Anders Carlsson  <andersca@apple.com>

        Reviewed by Oliver.

        <rdar://problem/5253950>
        When Shockwave plugin has been loaded, exiting crashes Safari
        
        Add a "load count" for plugin packages. When the load count is zero, unload the plugin.
        
        * plugins/win/PluginPackageWin.cpp:
        (WebCore::PluginPackageWin::PluginPackageWin):
        (WebCore::PluginPackageWin::load):
        (WebCore::PluginPackageWin::unload):
        (WebCore::PluginPackageWin::unloadWithoutShutdown):
        * plugins/win/PluginPackageWin.h:
        
        * plugins/win/PluginViewWin.cpp:
        (WebCore::PluginViewWin::~PluginViewWin):
        Make sure to unload the plugin package and clear any references to plugin script objects.

2007-06-27  George Staikos  <staikos@kde.org>

        This was succeeding compile by luck.  Setup dependencies properly.

        * WebCore.pro:

2007-06-27  Justin Garcia  <justin.garcia@apple.com>

        Reviewed by John.

        <rdar://problem/4580583> Breaking blockquoted list should not automatically renumber the second list
        
        When a quoted numbered list is broken in half, it's cloned
        to make the second list. That second list needs its start attribute
        set so that the numbers of the list items in it will be preserved.

        * editing/BreakBlockquoteCommand.cpp:
        (WebCore::BreakBlockquoteCommand::doApply): Set the start attribute
        of a cloned list to be the original number of the first list item in it.

2007-06-27  Alexey Proskuryakov  <ap@webkit.org>

        Reviewed by Geoff.

        http://bugs.webkit.org/show_bug.cgi?id=14413
        GIF animation throttling is different from MSIE

        * platform/graphics/cg/ImageSourceCG.cpp:
        (WebCore::ImageSource::frameDurationAtIndex):
        Change the cut-off value to 50ms to match MSIE.

2007-06-27  Sam Weinig  <sam@webkit.org>

        Reviewed by Darin.

        First pass at fixing implicit 64-32 bit conversion errors.
        <rdar://problem/5292262>

        - Add 'f' suffix where necessary.

        * bridge/mac/WebCoreAXObject.mm:
        (-[WebCoreAXObject accessibilityAttributeValue:forParameter:]):
        * css/csshelper.h:
        * css/cssstyleselector.cpp:
        (WebCore::):
        (WebCore::CSSStyleSelector::largerFontSize):
        (WebCore::CSSStyleSelector::smallerFontSize):
        * html/CanvasGradient.cpp:
        (WebCore::CanvasGradient::addColorStop):
        * html/CanvasPattern.cpp:
        (WebCore::CanvasPattern::createPattern):
        * ksvg2/css/SVGCSSStyleSelector.cpp:
        (WebCore::CSSStyleSelector::applySVGProperty):
        * ksvg2/css/SVGRenderStyle.h:
        * ksvg2/events/SVGZoomEvent.cpp:
        (WebCore::SVGZoomEvent::SVGZoomEvent):
        * ksvg2/svg/SVGLength.cpp:
        (WebCore::SVGLength::SVGLength):
        (WebCore::SVGLength::value):
        (WebCore::SVGLength::setValue):
        (WebCore::SVGLength::valueAsPercentage):
        (WebCore::SVGLength::PercentageOfViewport):
        * ksvg2/svg/SVGSVGElement.cpp:
        (WebCore::SVGSVGElement::pixelUnitToMillimeterX):
        (WebCore::SVGSVGElement::pixelUnitToMillimeterY):
        (WebCore::SVGSVGElement::getScreenCTM):
        * ksvg2/svg/SVGTextContentElement.cpp:
        (WebCore::SVGTextContentElement::getComputedTextLength):
        (WebCore::SVGTextContentElement::getSubStringLength):
        (WebCore::SVGTextContentElement::getRotationOfChar):
        * ksvg2/svg/SVGTransformDistance.cpp:
        (WebCore::SVGTransformDistance::SVGTransformDistance):
        (WebCore::SVGTransformDistance::distance):
        * page/InspectorController.cpp:
        (WebCore::InspectorResource::InspectorResource):
        * platform/graphics/FloatPoint3D.cpp:
        (WebCore::FloatPoint3D::normalize):
        * platform/graphics/Path.cpp:
        (WebCore::pathLengthApplierFunction):
        (WebCore::Path::createRoundedRectangle):
        * platform/graphics/cg/GraphicsContextCG.cpp:
        (WebCore::GraphicsContext::drawLine):
        (WebCore::GraphicsContext::strokeArc):
        * platform/graphics/cg/ImageCG.cpp:
        (WebCore::FrameData::clear):
        * platform/graphics/cg/ImageSourceCG.cpp:
        (WebCore::ImageSource::frameDurationAtIndex):
        * platform/graphics/cg/PDFDocumentImage.cpp:
        (WebCore::PDFDocumentImage::setCurrentPage):
        * platform/graphics/svg/SVGPaintServerPattern.cpp:
        (WebCore::SVGPaintServerPattern::externalRepresentation):
        * platform/graphics/svg/SVGPaintServerRadialGradient.cpp:
        (WebCore::SVGPaintServerRadialGradient::SVGPaintServerRadialGradient):
        * platform/graphics/svg/cg/SVGPaintServerGradientCg.cpp:
        (WebCore::cgGradientCallback):
        (WebCore::CGShadingRefForRadialGradient):
        (WebCore::SVGPaintServerGradient::updateQuartzGradientStopsCache):
        * platform/mac/FontDataMac.mm:
        (WebCore::webFallbackFontFamily):
        * platform/mac/PopupMenuMac.mm:
        (WebCore::PopupMenu::show):
        * rendering/InlineFlowBox.cpp:
        (WebCore::InlineFlowBox::placeBoxesHorizontally):
        * rendering/RenderSlider.cpp:
        (WebCore::RenderSlider::setValueForPosition):
        (WebCore::RenderSlider::setPositionFromValue):

2007-06-27  Alexey Proskuryakov  <ap@webkit.org>

        Reviewed by Geoff.

        http://bugs.webkit.org/show_bug.cgi?id=14288
        XMLHttpRequest doesn't use a correct content type for file:// URLs

        Test: fast/dom/xmlhttprequest-html-response-encoding.html

        * xml/xmlhttprequest.cpp:
        (WebCore::XMLHttpRequest::responseMIMEType): Use MIME type provided by
        the network layer, since it provides it even for non-HTTP responses.

2007-06-26  Alp Toker  <alp.toker@collabora.co.uk>

        Reviewed by Sam Weinig.

        http://bugs.webkit.org/show_bug.cgi?id=14061
        Implement more of FrameLoaderClientGdk

        Make FrameLoaderClientGdk work properly when the MIME type is set.

        * loader/gdk/FrameLoaderClientGdk.cpp:
        (WebCore::FrameLoaderClientGdk::objectContentType):
        (WebCore::FrameLoaderClientGdk::canShowMIMEType):

2007-06-26  Alp Toker  <alp.toker@collabora.co.uk>

        Reviewed by Maciej.

        http://bugs.webkit.org/show_bug.cgi?id=14058
        Gdk font backend cleanup

        * platform/FontData.h: Remove obsolete function.
        * platform/gdk/FontDataGdk.cpp:
        (WebCore::FontData::containsCharacters): Lock/unlock only once.
        (WebCore::FontData::platformWidthForGlyph): Remove needless cast.
        * platform/gdk/FontPlatformData.h: Remove obsolete function.
        * platform/gdk/FontPlatformDataGdk.cpp:
        (WebCore::FontPlatformData::FontPlatformData): Pass the actual size,
        not the pixel size.
        (WebCore::FontPlatformData::~FontPlatformData): Free m_fontMatrix.
        * platform/gdk/GlyphPageTreeNodeGdk.cpp:
        (WebCore::GlyphPage::fill): Lock/unlock only once.

2007-06-26  Mitz Pettel  <mitz@webkit.org>

        Reviewed by Hyatt.

        - fix http://bugs.webkit.org/show_bug.cgi?id=14406
          <colgroup>'s borders are ignored when it has <col> children

        Covered by existing tests.

        * rendering/RenderTableCell.cpp:
        (WebCore::RenderTableCell::collapsedLeftBorder):
        (WebCore::RenderTableCell::collapsedRightBorder):
        (WebCore::RenderTableCell::collapsedTopBorder):
        (WebCore::RenderTableCell::collapsedBottomBorder):

2007-06-26  Mitz Pettel  <mitz@webkit.org>

        Reviewed by Oliver.

        - fix http://bugs.webkit.org/show_bug.cgi?id=14329
          REGRESSION: TEXTAREA - cannot drag-and-drop text at en.wikipedia.org/

        Test: fast/repaint/text-selection-rect-in-overflow-2.html

        * rendering/RenderObject.cpp:
        (WebCore::RenderObject::computeAbsoluteRepaintRect): Added code to account
        for overflow scroll and columns.
        * rendering/RenderText.cpp:
        (WebCore::RenderText::selectionRect): Adjust for columns only in the
        non-clipped case, since RenderObject::absolutePosition() does not.

2007-06-26  Mitz Pettel  <mitz@webkit.org>

        Reviewed by Sam.

        - http://bugs.webkit.org/show_bug.cgi?id=14415
          Remove the unused method RenderObject::setTable()

        * rendering/RenderObject.h:

2007-06-26  MorganL  <morganl.webkit@yahoo.com>

        Reviewed by Maciej.

        Implement http://bugs.webkit.org/show_bug.cgi?id=14225
        Bug 14225: Make it possible to define platform-specific ResourceRequest without #ifdefs

        This change moves the bulk of ResourceRequest into a base class named
        ResourceRequestBase with all platform-specific bits pushed into
        ResourceRequest.  This allows ports to easily add new members to a
        ResourceRequest without having to #ifdef the code that is shared
        between ports.

        * WebCore.exp:
        * WebCore.pro:
        * WebCore.vcproj/WebCore.vcproj:
        * WebCore.xcodeproj/project.pbxproj:
        * platform/network/ResourceRequest.cpp: Removed.
        * platform/network/ResourceRequest.h: Removed.
        * platform/network/ResourceRequestBase.cpp: Added.
        (WebCore::ResourceRequestBase::asResourceRequest):
        (WebCore::ResourceRequestBase::isEmpty):
        (WebCore::ResourceRequestBase::isNull):
        (WebCore::ResourceRequestBase::url):
        (WebCore::ResourceRequestBase::setURL):
        (WebCore::ResourceRequestBase::cachePolicy):
        (WebCore::ResourceRequestBase::setCachePolicy):
        (WebCore::ResourceRequestBase::timeoutInterval):
        (WebCore::ResourceRequestBase::setTimeoutInterval):
        (WebCore::ResourceRequestBase::mainDocumentURL):
        (WebCore::ResourceRequestBase::setMainDocumentURL):
        (WebCore::ResourceRequestBase::httpMethod):
        (WebCore::ResourceRequestBase::setHTTPMethod):
        (WebCore::ResourceRequestBase::httpHeaderFields):
        (WebCore::ResourceRequestBase::httpHeaderField):
        (WebCore::ResourceRequestBase::setHTTPHeaderField):
        (WebCore::ResourceRequestBase::httpBody):
        (WebCore::ResourceRequestBase::setHTTPBody):
        (WebCore::ResourceRequestBase::allowHTTPCookies):
        (WebCore::ResourceRequestBase::setAllowHTTPCookies):
        (WebCore::ResourceRequestBase::addHTTPHeaderField):
        (WebCore::ResourceRequestBase::addHTTPHeaderFields):
        (WebCore::operator==):
        (WebCore::ResourceRequestBase::isConditional):
        (WebCore::ResourceRequestBase::updatePlatformRequest):
        (WebCore::ResourceRequestBase::updateResourceRequest):
        * platform/network/ResourceRequestBase.h: Added.
        (WebCore::):
        (WebCore::ResourceRequestBase::httpContentType):
        (WebCore::ResourceRequestBase::setHTTPContentType):
        (WebCore::ResourceRequestBase::httpReferrer):
        (WebCore::ResourceRequestBase::setHTTPReferrer):
        (WebCore::ResourceRequestBase::clearHTTPReferrer):
        (WebCore::ResourceRequestBase::httpUserAgent):
        (WebCore::ResourceRequestBase::setHTTPUserAgent):
        (WebCore::ResourceRequestBase::httpAccept):
        (WebCore::ResourceRequestBase::setHTTPAccept):
        (WebCore::ResourceRequestBase::ResourceRequestBase):
        (WebCore::operator!=):
        * platform/network/cf/ResourceRequest.h: Added.
        (WebCore::ResourceRequest::ResourceRequest):
        * platform/network/curl/ResourceRequest.h: Added.
        (WebCore::ResourceRequest::ResourceRequest):
        (WebCore::ResourceRequest::doUpdatePlatformRequest):
        (WebCore::ResourceRequest::doUpdateResourceRequest):
        * platform/network/mac/ResourceRequest.h: Added.
        (WebCore::ResourceRequest::ResourceRequest):
        * platform/network/qt/ResourceRequest.h: Added.
        (WebCore::ResourceRequest::ResourceRequest):
        (WebCore::ResourceRequest::doUpdatePlatformRequest):
        (WebCore::ResourceRequest::doUpdateResourceRequest):

2007-06-26  Adam Roben  <aroben@apple.com>

        Add ChangeLog entries from the Windows merge.

        Reviewed by Maciej.

        * ChangeLog:

2007-06-26  Sam Weinig  <sam@webkit.org>

        Reviewed by Maciej.

        Make sure not to enumerate the toString() function.
        <rdar://problem/5297118>

        * bindings/js/kjs_window.cpp:
        * bindings/scripts/CodeGeneratorJS.pm: Add support for [DontEnum].
        * html/HTMLAnchorElement.idl:

2007-06-26  Alp Toker  <alp.toker@collabora.co.uk>

        Reviewed by Mitz, landed by Anders.

        http://bugs.webkit.org/show_bug.cgi?id=14421
        Implement GraphicsContext::clearRect()

        * platform/graphics/cairo/GraphicsContextCairo.cpp:
        (WebCore::GraphicsContext::clearRect):

2007-06-26  Alp Toker  <alp.toker@collabora.co.uk>

        Reviewed and landed by Anders.

        http://bugs.webkit.org/show_bug.cgi?id=14416
        Content does not render fully in some cases

        Fix mismatched calls to cairo_save/restore due to an early method return.

        * platform/graphics/cairo/GraphicsContextCairo.cpp:
        (WebCore::GraphicsContext::drawLine):

2007-06-26  Tristan O'Tierney  <tristan@apple.com>

        Reviewed by John Sullivan.

        Added two accessor functions for <rdar://problem/4119138>

        * bindings/objc/DOMHTML.mm:
        (-[DOMHTMLInputElement _isEdited]):
        (-[DOMHTMLTextAreaElement _isEdited]):
        Added an accessor to the isEdited value of a DOM node's render object

        * bindings/objc/DOMPrivate.h:
        Added header definitions for _isEdited

2007-06-26  Sam Weinig  <sam@webkit.org>

        Fix Win32 build.

        * WebCore.vcproj/WebCore.vcproj:

2007-06-26  Sam Weinig  <sam@webkit.org>

        Fix Qt and Gdk builds.

        * WebCore.pro:

2007-06-26  Sam Weinig  <sam@webkit.org>

        Reviewed by Geoff.

        Patch for http://bugs.webkit.org/show_bug.cgi?id=14111
        Autogenerate Event JS binding

        - Moves the dataTransfer method into MouseEvent where it should be.

        * WebCore.xcodeproj/project.pbxproj:
        * bindings/js/JSEventCustom.cpp: Added.
        (WebCore::JSEvent::clipboardData):
        (WebCore::toJS):
        * bindings/js/JSEventTargetNode.cpp:
        * bindings/js/JSXMLHttpRequest.cpp:
        * bindings/js/kjs_events.cpp:
        * bindings/js/kjs_events.h:
        * bindings/objc/DOMUtility.mm:
        (KJS::createDOMWrapper):
        * bindings/scripts/CodeGeneratorJS.pm:
        * dom/Event.h:
        (WebCore::Event::returnValue):
        (WebCore::Event::setReturnValue):
        (WebCore::Event::clipboardData):
        * dom/Event.idl:
        * dom/MouseEvent.h:
        (WebCore::MouseEvent::dataTransfer):
        * dom/MouseEvent.idl:

2007-06-26  Timothy Hatcher  <timothy@apple.com>

        Reviewed by Mark Rowe.

        Follow up fix for: Bug 14385: Web Inspector's computed style doesn't show implicitly set properties
        http://bugs.webkit.org/show_bug.cgi?id=14385

        Correctly remember the "Show implicit properties" setting as you switch nodes.

        * page/inspector/ResourcePanel.js:

2007-06-26  Justin Garcia  <justin.garcia@apple.com>

        Reviewed by John.

        <rdar://problem/5290534> Crash at RenderTextControl::calcHeight() after deleting text in a search field
        
        Editing removed a node that was part of a search field's internal
        structure that should not be removed.

        * editing/DeleteSelectionCommand.cpp:
        (WebCore::DeleteSelectionCommand::handleGeneralDelete): If the
        selection to delete ends at [container, x], where x is the number
        of children in container, don't remove container.  Special case
        code elsewhere in this function will remove it if necessary.

2007-06-25  Sam Weinig  <sam@webkit.org>

        Reviewed by Maciej.

        Patch for http://bugs.webkit.org/show_bug.cgi?id=11315
        Mutating document.constructor.prototype mutates Object.prototype

        Test: fast/js/constructor.html

        * bindings/scripts/CodeGeneratorJS.pm: add constructor attribute to
        classes with constructors.  It is an non-enumeratable, non-deletable,
        readonly attribute.

2007-06-26  George Staikos  <staikos@kde.org>

        Repair the OS X build.

        * WebCore.exp:

2007-06-26  Adam Treat  <adam@staikos.net>

        Reviewed by Adam Roben.

        Make the SQLite icon database optional.

        * loader/icon/IconDatabase.cpp:
        (WebCore::IconDatabase::isOpen):
        (WebCore::IconDatabase::isPrivateBrowsingEnabled):
        (WebCore::IconDatabase::enabled):
        * loader/icon/IconDatabase.h:

2007-06-25  Sam Weinig  <sam@webkit.org>

        Reviewed by Adam Roben.

        Patch for http://bugs.webkit.org/show_bug.cgi?id=14369
        HTML syntax highlighting colors and DOM tree colors should be the same

        * css/view-source.css:
        * page/inspector/ResourcePanel.js:
        * page/inspector/inspector.css:
        * page/inspector/inspector.js:
        * page/inspector/utilities.js:

2007-06-25  Adam Roben  <aroben@apple.com>

        Fix Bug 14402: Main resource of http://www.apple.com/safari/ is called "www.apple.com" instead of "safari"
        http://bugs.webkit.org/show_bug.cgi?id=14402

        The solution was to make KURL::lastPathComponent ignore trailing
        slashes, which is what -[NSURL lastPathComponent] does, too.

        Reviewed by Oliver.

        * platform/KURL.cpp:
        (WebCore::KURL::lastPathComponent):

2007-06-25  Sam Weinig  <sam@webkit.org>

        Reviewed by Adam Roben.

        Patch for http://bugs.webkit.org/show_bug.cgi?id=14257
        Web Inspector lists favicon.ico as "other" instead of "image"

        * page/InspectorController.cpp:
        (WebCore::InspectorResource::type):

2007-06-25  Adele Peterson  <adele@apple.com>

        Reviewed by Hyatt.

        Fix for <rdar://problem/5286410> Scrollbar and resize corner for overflow area is not hidden with style "visibility: hidden;"
        http://bugs.webkit.org/show_bug.cgi?id=14297

        Test: fast/overflow/hidden-scrollbar-resize.html

        * rendering/RenderLayer.cpp: (WebCore::RenderLayer::paintLayer):
        Updated our shouldPaint check to consider visibility.

2007-06-25  Oliver Hunt  <oliver@apple.com>

        Reviewed by Darin.

        <rdar://problem/5293444> REGRESSION: Dragging plain text into a styled text region does not acquire the correct style info

        Fixing logic error in DragController

        * manual-tests/drop-text-acquires-style.html: Added.
        * page/DragController.cpp:
        (WebCore::documentFragmentFromDragData):

2007-06-25  Sam Weinig  <sam@webkit.org>

        Reviewed by Adam Roben.

        Annotate prototypes by adding "Prototype" subtitle.

        * page/inspector/ResourcePanel.js:

2007-06-25  George Staikos  <staikos@kde.org>

        Reviewed by Zack.

        Start to add proxy and SSL support to WebKitQt.  Proxying works.

        * platform/network/ResourceHandleInternal.h:
        (WebCore::ResourceHandleInternal::ResourceHandleInternal):
        * platform/network/qt/ResourceHandleQt.cpp:
        (WebCore::ResourceHandle::start):

2007-06-25  Alp Toker  <alp.toker@collabora.co.uk>

        Reviewed by Adam Roben.

        http://bugs.webkit.org/show_bug.cgi?id=14386
        Gdk build fix

        * WebCore.pro: Fix gtk/gdk typo.

2007-06-25  Timothy Hatcher  <timothy@apple.com>

        Reviewed by Anders.

        Bug 14385: Web Inspector's computed style doesn't show implicitly set properties
        http://bugs.webkit.org/show_bug.cgi?id=14385

        Add a toggle to show implict computed properties.

        * page/inspector/ResourcePanel.js:
        * page/inspector/inspector.css:
        * page/inspector/inspector.js:

2007-06-25  Alp Toker  <alp.toker@collabora.co.uk>

        Reviewed by Mark.

        http://bugs.webkit.org/show_bug.cgi?id=13975
        Use system-provided libjpeg and libpng

        * WebCore.pro: Remove bundled libjpeg and libpng sources.
        * platform/image-decoders/jpeg: Remove sources.
        * platform/image-decoders/png: Remove sources.

2007-06-25  Mitz Pettel  <mitz@webkit.org>

        Reviewed by Darin.

        - fix http://bugs.webkit.org/show_bug.cgi?id=14202
          Table caption renders too narrow sometimes

        Test: fast/table/caption-relayout.html

        * rendering/RenderTable.cpp:
        (WebCore::RenderTable::layout): Mark the caption for layout if the table
        width changed.

2007-06-25  Mitz Pettel  <mitz@webkit.org>

        Reviewed by Darin.

        - fix http://bugs.webkit.org/show_bug.cgi?id=14245
          Underline painted under <br>, not repainted properly

        Test: fast/inline/br-text-decoration.html

        * platform/graphics/cg/GraphicsContextCG.cpp:
        (WebCore::GraphicsContext::drawLineForText): Added an early return if the line width
        is zero. Also changed the line stroke to a rect fill, so that lines with length shorter
        than their thickness paint correctly.

2007-06-25  Mitz Pettel  <mitz@webkit.org>

        Reviewed by Maciej.

        - fix http://bugs.webkit.org/show_bug.cgi?id=14341
          rules="none" ignored in certain cases

        Covered by existing tests.

        * html/HTMLTableElement.cpp:
        (WebCore::HTMLTableElement::getSharedCellDecl):

2007-06-24  Sam Weinig  <sam@webkit.org>

        Reviewed by Mitz.

        Patch for http://bugs.webkit.org/show_bug.cgi?id=14379
        Anchor elements show up as their href in the properties pane, not HTMLAnchorElement

        * page/inspector/ResourcePanel.js: make sure not to call an overriden
        toString() by using Object.prototype.toString.call().

2007-06-24  Adam Roben  <aroben@apple.com>

        Fix http://bugs.webkit.org/show_bug.cgi?id=14374
        Bug 14374: Computed Style section should be expanded by default

        Reviewed by Sam.

        No regression test possible.

        * page/inspector/ResourcePanel.js: Expand all style sections.

2007-06-24  Adam Roben  <aroben@apple.com>

        Unify the style of enums in the Inspector JS

        All our enums are now represented by an object with a property for
        each enum value.

        Reviewed by Sam.

        No regression test possible.

        * page/inspector/ConsolePanel.js:
        * page/inspector/Resource.js:
        * page/inspector/ResourcePanel.js:
        * page/inspector/inspector.js:

2007-06-23  Sam Weinig  <sam@webkit.org>

        Reviewed by Mitz.

        Patch for http://bugs.webkit.org/show_bug.cgi?id=14321
        getComputedStyle(...).zIndex returns string "normal"

        Test: fast/css/getComputedStyle-zIndex-auto.html

        * css/CSSComputedStyleDeclaration.cpp:
        (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): Return 'auto' instead of 'normal'.

2007-06-24  Matt Lilek  <pewtermoose@gmail.com>

        Reviewed by Tim Hatcher.

        Bug 14265: Cannot resize columns in webinspector
        http://bugs.webkit.org/show_bug.cgi?id=14265

        * page/inspector/inspector.css:
        * page/inspector/inspector.html:
        * page/inspector/inspector.js:

2007-06-23  Adam Roben  <aroben@apple.com>

        Silence a build warning about not finding `num-cpus`

        Reviewed by Mark Rowe.

        * WebCore.vcproj/build-generated-files.sh: Look for num-cpus in its new
        location.

2007-06-22  Anders Carlsson  <andersca@apple.com>

        Reviewed by Darin.

        * plugins/win/PluginStreamWin.cpp:
        (WebCore::PluginStreamWin::didFinishLoading):
        No need to fetch the size from resourceData.

2007-06-22  Anders Carlsson  <andersca@apple.com>

        Reviewed by Darin.

        <rdar://problem/5288617>
        Crash playing a very large QuickTime movie inside Safari.

        Get rid of m_completeDeliveryData and use the loader's resource data instead. This reduces the memory usage for 
        plug-ins which loads large files and use a transfer mode of NP_ASFILE or NP_ASFILEONLY.
        
        * plugins/win/PluginStreamWin.cpp:
        (WebCore::PluginStreamWin::PluginStreamWin):
        (WebCore::PluginStreamWin::~PluginStreamWin):
        (WebCore::PluginStreamWin::didReceiveData):
        (WebCore::PluginStreamWin::didFinishLoading):
        * plugins/win/PluginStreamWin.h:

2007-06-22  Beth Dakin  <bdakin@apple.com>

        Reviewed by Oliver and Darin.

        Fix for <rdar://problem/5266999> Loading page from MangleMe fuzz 
        tester crashes in RenderTableRow::addChild (giant ROWSPAN)

        We already have code that tries to prevent allocating too-large 
        rowspans. The rowspan in this test, however, was small enough that 
        we thought it was okay in that code, even though clearly it was 
        still too large. I did a bunch of testing in Firefox, and it seems 
        that they set a hard limit on the maximum rowspan right in the DOM 
        -- 8k. So that is what this patch implements. 

        * html/HTMLTableCellElement.cpp:
        (WebCore::HTMLTableCellElement::parseMappedAttribute):

2007-06-22  Justin Garcia  <justin.garcia@apple.com>

        Reviewed by Darin.
        
        <rdar://problem/5272440> Adding To Do via Note received in e-mail adds newlines on delete
        
        Deletion inserts a placeholder after it removes full paragraphs if
        one doesn't already exist.  The code that looked for a pre-existing
        placeholder didn't work because of a bug in enclosingNodeOfType.

        * editing/htmlediting.cpp:
        (WebCore::enclosingNodeOfType): We start looking at node->parentNode(),
        but don't go above an editing root.

2007-06-22  Anders Carlsson  <andersca@apple.com>

        Reviewed by Maciej and Geoff.

        <rdar://problem/5244734>
        WebKit shouldn't send delegate resource load methods for the user stylesheet (doing so causes assertions in Safari)
        
        Add a sendResourceLoadCallbacks argument to the ResourceLoader and only send resource load callbacks if it's true. Make it so that
        loading the user style sheet creates a resource loader with sendResourceLoadCallbacks set to false (done by adding a sendResourceLoadCallbacks 
        argument to a bunch of classes).
        
        * loader/Cache.cpp:
        (WebCore::createResource):
        (WebCore::Cache::requestResource):
        * loader/Cache.h:
        * loader/CachedCSSStyleSheet.cpp:
        (WebCore::CachedCSSStyleSheet::CachedCSSStyleSheet):
        * loader/CachedCSSStyleSheet.h:
        * loader/CachedResource.cpp:
        (WebCore::CachedResource::CachedResource):
        * loader/CachedResource.h:
        (WebCore::CachedResource::sendResourceLoadCallbacks):
        * loader/DocLoader.cpp:
        (WebCore::DocLoader::requestCSSStyleSheet):
        (WebCore::DocLoader::requestResource):
        (WebCore::DocLoader::checkCacheObjectStatus):
        * loader/DocLoader.h:
        * loader/MainResourceLoader.cpp:
        (WebCore::MainResourceLoader::MainResourceLoader):
        * loader/Request.cpp:
        (WebCore::Request::Request):
        * loader/Request.h:
        (WebCore::Request::sendResourceLoadCallbacks):
        * loader/ResourceLoader.cpp:
        (WebCore::ResourceLoader::ResourceLoader):
        (WebCore::ResourceLoader::willSendRequest):
        (WebCore::ResourceLoader::didReceiveResponse):
        (WebCore::ResourceLoader::didReceiveData):
        (WebCore::ResourceLoader::didFinishLoadingOnePart):
        (WebCore::ResourceLoader::didFail):
        (WebCore::ResourceLoader::didCancel):
        * loader/ResourceLoader.h:
        (WebCore::ResourceLoader::sendResourceLoadCallbacks):
        * loader/SubresourceLoader.cpp:
        (WebCore::SubresourceLoader::SubresourceLoader):
        (WebCore::SubresourceLoader::create):
        * loader/SubresourceLoader.h:
        * loader/loader.cpp:
        (WebCore::Loader::load):
        (WebCore::Loader::servePendingRequests):
        * loader/loader.h:
        * loader/mac/NetscapePlugInStreamLoaderMac.mm:
        (WebCore::NetscapePlugInStreamLoader::NetscapePlugInStreamLoader):

2007-06-21  Richard Connamacher  <rich@indieimage.com>

        Reviewed by Tim Hatcher.

        Bug 14305: Web Inspector marks local files with server-side compression tip
        http://bugs.webkit.org/show_bug.cgi?id=14305

        * page/inspector/Resource.js:
        (WebInspector.Resource._shouldCompress): Prevent server-side compression tip
        from being given to local files

2007-06-21  Mark Rowe  <mrowe@apple.com>

        Reviewed by Darin.

        Fix for <rdar://problem/5266928> REGRESSION: crash/assert failure beneath RenderFrameSet::layOutAxis when loading

        * platform/StringImpl.cpp:
        (WebCore::StringImpl::toLengthArray): Simplify whitespace before checking for an empty string.  This avoids returning
        a length of zero when the string is collapsed to empty by whitespace simplification.

2007-06-21  Dave Hyatt  <hyatt@apple.com>

        Fix for <rdar://problem/5286978>, large font sizes crash Windows.
        
        Limit the maximum font size to 1,000,000 to avoid crashes and issues with platforms that
        start failing to do anything useful if the font size is too big.
        
        Reviewed by olliej

        * css/cssstyleselector.cpp:
        (WebCore::CSSStyleSelector::getComputedSizeFromSpecifiedSize):
        
2007-06-21  Andrew Wellington  <proton@wiretapped.net>

        Reviewed by Timothy.

        Stop shift+scroll wheel performing a horizontal scroll in Web Inspector

        * page/inspector/inspector.css: Set body margin to 0

2007-06-21  Adam Treat  <adam@staikos.net>

        Reviewed by George Staikos.

        Implement the default resources on Qt.

        * platform/graphics/BitmapImage.h:
        * platform/graphics/Image.h:
        * platform/graphics/qt/ImageQt.cpp:
        (WebCore::Image::loadPlatformResource):
        (WebCore::BitmapImage::BitmapImage):
        (WebCore::BitmapImage::initPlatformData):
        (WebCore::BitmapImage::invalidatePlatformData):
        (WebCore::BitmapImage::getPixmap):
        * platform/qt/TemporaryLinkStubs.cpp:

2007-06-21  Oliver Hunt  <oliver@apple.com>

        Reviewed by Darin.

        Use RetainPtr for holding currentEvent.  This removes explicit HardRetain/Release calls
        and makes reference handling simpler in advance of IME refactoring.

        * WebCore.xcodeproj/project.pbxproj:
        * page/mac/EventHandlerMac.mm:
        (WebCore::currentEvent):
        (WebCore::EventHandler::currentNSEvent):
        (WebCore::EventHandler::wheelEvent):
        (WebCore::EventHandler::keyEvent):
        (WebCore::lastEventIsMouseUp):
        (WebCore::EventHandler::passMouseDownEventToWidget):
        (WebCore::EventHandler::eventLoopHandleMouseDragged):
        (WebCore::EventHandler::eventLoopHandleMouseUp):
        (WebCore::EventHandler::passSubframeEventToSubframe):
        (WebCore::EventHandler::passWheelEventToWidget):
        (WebCore::EventHandler::mouseDown):
        (WebCore::EventHandler::mouseDragged):
        (WebCore::EventHandler::mouseUp):
        (WebCore::EventHandler::mouseMoved):

2007-06-21  George Staikos  <staikos@kde.org>

        Reviewed by George & Marius.

        Patch by me, revision by Marius, minor rev by me.  Adds rendered
        and stylable scrollbars.

        * page/qt/EventHandlerQt.cpp:
        (WebCore::EventHandler::passMousePressEventToScrollbar):
        * platform/Widget.h:
        * platform/qt/PlatformScrollBar.h:
        (WebCore::PlatformScrollbar::isWidget):
        * platform/qt/PlatformScrollBarQt.cpp:
        (WebCore::PlatformScrollbar::PlatformScrollbar):
        (WebCore::PlatformScrollbar::~PlatformScrollbar):
        (WebCore::PlatformScrollbar::updateThumbPosition):
        (WebCore::PlatformScrollbar::updateThumbProportion):
        (WebCore::PlatformScrollbar::width):
        (WebCore::PlatformScrollbar::height):
        (WebCore::PlatformScrollbar::setRect):
        (WebCore::PlatformScrollbar::isEnabled):
        (WebCore::PlatformScrollbar::setEnabled):
        (WebCore::PlatformScrollbar::paint):
        (WebCore::PlatformScrollbar::thumbPosition):
        (WebCore::PlatformScrollbar::thumbLength):
        (WebCore::PlatformScrollbar::trackLength):
        (WebCore::PlatformScrollbar::handleMouseMoveEvent):
        (WebCore::PlatformScrollbar::handleMouseOutEvent):
        (WebCore::PlatformScrollbar::handleMousePressEvent):
        (WebCore::PlatformScrollbar::handleMouseReleaseEvent):
        (WebCore::PlatformScrollbar::startTimerIfNeeded):
        (WebCore::PlatformScrollbar::stopTimerIfNeeded):
        (WebCore::PlatformScrollbar::autoscrollPressedPart):
        (WebCore::PlatformScrollbar::autoscrollTimerFired):
        (WebCore::PlatformScrollbar::pressedPartScrollDirection):
        (WebCore::PlatformScrollbar::pressedPartScrollGranularity):
        (WebCore::PlatformScrollbar::thumbUnderMouse):
        (WebCore::PlatformScrollbar::horizontalScrollbarHeight):
        (WebCore::PlatformScrollbar::verticalScrollbarWidth):
        (WebCore::PlatformScrollbar::windowClipRect):
        * platform/qt/ScrollViewQt.cpp:
        (WebCore::ScrollView::addChild):
        (WebCore::ScrollView::removeChild):
        * platform/qt/WidgetQt.cpp:
        (WebCore::WidgetPrivate::WidgetPrivate):
        (WebCore::Widget::setQWidget):
        (WebCore::Widget::invalidate):
        (WebCore::Widget::invalidateRect):
        (WebCore::Widget::setParent):
        (WebCore::Widget::parent):

2007-06-21  Geoffrey Garen  <ggaren@apple.com>

        Reviewed by Dave Hyatt.
        
        Fixed <rdar://problem/4977124> | http://bugs.webkit.org/show_bug.cgi?id=12646
        REGRESSION: RapidWeaver's "Hello" HTML page doesn't display any DHTML 
        effects when clicking on its links (12646)
        
        I'm rolling our r7703 for these reasons:

        1. It broke RapidWeaver.
        
        2. WebKit is now orders of magnitude faster when handling deep nesting
        (5 seconds vs 3 minutes on my MBP in this particular case).

        3. Firefox, IE, and HTML5 all allow nested heading tags.
        
        4. Hyatt said so.

        * html/HTMLParser.cpp:
        (WebCore::HTMLParser::parseToken):

2007-06-21  Sam Weinig  <sam@webkit.org>

        Reviewed by Tim Hatcher.

        http://bugs.webkit.org/show_bug.cgi?id=14260
        ASSERTION FAILED: m_mainResource->loader == loader going back in history on any page

        Remove assert for now as it is causing the back button to not
        work in debug builds.

        * page/InspectorController.cpp:
        (WebCore::InspectorController::didCommitLoad):

2007-06-21  Lars Knoll <lars@trolltech.com>

        Remove some debug output.

        * platform/qt/FontQt.cpp:
        (WebCore::generateComponents):
        (WebCore::Font::width):

2007-06-21  George Staikos  <staikos@kde.org>

        Repair Qt/Mac OS X build.

        * WebCore.pro:

2007-06-21  Alexey Proskuryakov  <ap@webkit.org>

        Reviewed by Anders.

        http://bugs.webkit.org/show_bug.cgi?id=13905
        REGRESSION: A Chinese dictionary widget has a problem with XMLHttpRequest response encoding

        Tiger WebKit accidentally looked at HTML Http-Equiv META to determine the response encoding
        (regardless of the actual response MIME type). This was corrected a while ago to match other 
        browsers and the draft XHR spec.

        Now restoring this functionality for "text/html", with spec editor's blessing.

        * xml/xmlhttprequest.cpp:
        (WebCore::XMLHttpRequest::responseMIMEType):
        (WebCore::XMLHttpRequest::responseIsXML):
        (WebCore::XMLHttpRequest::didReceiveData):
        * xml/xmlhttprequest.h:

2007-06-21  Andrew Wellington  <proton@wiretapped.net>

        Mac build fix.

        * platform/Font.h:

2007-06-21  Lars Knoll  <lars@trolltech.com>

        Reviewed by Simon.

        another small fix for letter spacing

        * platform/qt/FontQt.cpp:
        (WebCore::generateComponents):

2007-06-21  Lars Knoll  <lars@trolltech.com>

        Reviewed by Simon.

        fix word-spacing

        * platform/qt/FontQt.cpp:
        (WebCore::generateComponents):
        (WebCore::Font::width):

2007-06-21  Lars Knoll  <lars@trolltech.com>

        Reviewed by Simon.

        fix letterspacing and small caps.

        * platform/Font.h:
        * platform/graphics/qt/GraphicsContextQt.cpp:
        (WebCore::GraphicsContext::setPlatformFont):
        * platform/qt/FileChooserQt.cpp:
        * platform/qt/FontQt.cpp:
        (WebCore::TextRunComponent::TextRunComponent):
        (WebCore::Font::Font):
        (WebCore::Font::operator=):
        (WebCore::Font::update):
        (WebCore::generateComponents):
        (WebCore::Font::selectionRectForText):
        * platform/qt/RenderThemeQt.cpp:

2007-06-21  Lars Knoll  <lars@trolltech.com>

        Reviewed by Simon.

        store the metrics and space width in the Font object

        * platform/Font.h:
        * platform/qt/FontQt.cpp:
        (WebCore::Font::Font):
        (WebCore::Font::drawText):
        (WebCore::Font::width):
        (WebCore::Font::isFixedPitch):
        (WebCore::Font::ascent):
        (WebCore::Font::descent):
        (WebCore::Font::lineSpacing):

2007-06-21  Lars Knoll  <lars@trolltech.com>

        Reviewed by Simon.

        simplify some codepaths

        * platform/qt/FontQt.cpp:
        (WebCore::Font::drawText):
        (WebCore::Font::width):

2007-06-21  Lars Knoll  <lars@trolltech.com>

        Reviewed by Simon.

        fix copyright header

        * platform/qt/FontQt.cpp:

2007-06-21  Lars Knoll  <lars@trolltech.com>

        Reviewed by Simon.

        correctly load fonts when a list of font families is given

        * platform/qt/FontQt.cpp:
        (WebCore::Font::Font):

2007-06-21  Lars Knoll  <lars@trolltech.com>

        Reviewed by Simon.

        fix some more of the font support

        * platform/qt/FontQt.cpp:
        (WebCore::Font::drawText):
        (WebCore::Font::width):

2007-06-21  Lars Knoll  <lars@trolltech.com>

        Reviewed by Simon.

        Compile fixes

        * platform/Font.h:
        (WebCore::Font::isRoundingHackCharacter):
        * platform/qt/FontQt.cpp:
        (WebCore::Font::drawText):

2007-06-21  Lars Knoll  <lars@trolltech.com>

        Reviewed by Simon.

        Some more work on the implementation of FontQt.

        * platform/qt/FontQt.cpp:
        (WebCore::Font::Font):
        (WebCore::Font::~Font):
        (WebCore::Font::operator=):

2007-06-21  Lars Knoll  <lars@trolltech.com>

        Reviewed by Simon.

        Started work on the new font infrastructure for the Qt port.

        * WebCore.pro:
        * editing/Editor.cpp:
        (WebCore::Editor::fontForSelection):
        * platform/Font.h:
        (WebCore::Font::treatAsSpace):
        (WebCore::Font::treatAsZeroWidthSpace):
        (WebCore::Font::isRoundingHackCharacter):
        * platform/qt/FontQt.cpp:
        (WebCore::Font::operator QFont):
        * platform/qt/TemporaryLinkStubs.cpp:

2007-06-21  Adam Roben  <aroben@apple.com>

        More Gdk build fixes.

        * page/gdk/ContextMenuClientGdk.cpp:
        (WebCore::ContextMenuClientGdk::shouldIncludeInspectElementItem):
        * page/gdk/ContextMenuClientGdk.h:
        * platform/gdk/TemporaryLinkStubs.cpp:

2007-06-21  Adam Roben  <aroben@apple.com>

        Speculative Gdk build fix.

        * page/InspectorController.h: Only include the JS headers we really
        need to avoid pulling in ones like JSStringRefCF.h.

2007-06-20  Adam Roben  <aroben@apple.com>

        Speculative Gdk build fix.

        * WebCore.pro: Don't try to build WebKitQt/Plugins on Gdk.

2007-06-20  Adam Roben  <aroben@apple.com>

        Windows build fix.

        * WebCore.vcproj/WebCore.vcproj: Include ForwardingHeaders after
        everything but $WebKitLibrariesDir so that we will pick up
        JavaScriptCore headers directly.

2007-06-15  George Staikos  <staikos@kde.org>

        Add missing symbol.

        * platform/qt/TemporaryLinkStubs.cpp:
        (WebCore::contextMenuItemTagInspectElement):

2007-06-20  Steve Falkenburg  <sfalken@apple.com>

        Reviewed by Maciej, Anders.
        
        <rdar://problem/5283789> Crash after dismissing JavaScript alert at end of test on http://lcamtuf.coredump.cx/ierace/

        Keep a reference to the Page (via the main frame) for the
        load deferred pages.
        
        Reference is held via the frame since Page isn't refcounted.

        * page/Chrome.cpp:
        (WebCore::PageGroupLoadDeferrer::PageGroupLoadDeferrer):
        (WebCore::PageGroupLoadDeferrer::~PageGroupLoadDeferrer):

2007-06-15  Adam Treat <adam@staikos.net>

        Reviewed by George Staikos.

        Add ICO support to the Qt build.

        * WebCore.pro:
        * platform/graphics/qt/ImageDecoderQt.cpp:
        (Q_IMPORT_PLUGIN):

2007-06-15  George Staikos  <staikos@kde.org>

        Fixing Qt build.

        * ForwardingHeaders/JavaScriptCore/APICast.h: Added.
        * WebCore.pro:
        * page/InspectorController.h:

2007-06-20  Adam Roben  <aroben@apple.com>

        More speculative Qt/Gdk build fixes.

        * WebCore.pro: Add new files.

2007-06-20  Adam Roben  <aroben@apple.com>

        Speculative Qt/Gdk build fix.

        Added forwarding headers for JavaScriptCore. We may eventually move
        InspectorController off of the JSC API, but for now this is the
        quickest way to a working build.

        * ForwardingHeaders/JavaScriptCore/JSBase.h: Added.
        * ForwardingHeaders/JavaScriptCore/JSContextRef.h: Added.
        * ForwardingHeaders/JavaScriptCore/JSObjectRef.h: Added.
        * ForwardingHeaders/JavaScriptCore/JSStringRef.h: Added.
        * ForwardingHeaders/JavaScriptCore/JSStringRefCF.h: Added.
        * ForwardingHeaders/JavaScriptCore/JSValueRef.h: Added.
        * ForwardingHeaders/JavaScriptCore/JavaScriptCore.h: Added.

2007-06-20  Sam Weinig  <sam@webkit.org>

        Rubber stamped by Adam Roben.

        Add licenses.

        * page/inspector/ConsolePanel.js:
        * page/inspector/NetworkPanel.js:
        * page/inspector/Resource.js:
        * page/inspector/ResourceCategory.js:
        * page/inspector/ResourcePanel.js:

2007-06-20  Mark Rowe  <mrowe@apple.com>

        Reviewed by Adam.

        * WebCore.exp: Export InspectorController::inspect so WebKit can see it.

2007-06-20  Geoffrey Garen  <ggaren@apple.com>

        Reviewed by Adele Peterson, Oliver Hunt, Anders Carlsson.

        Fixed <rdar://problem/5222911> Leopard9A446 : VitalSource Bookshelf 4.5: 
        Crashes when you click on sign in (stringByEvaluatingJavaScriptFromString 
        returning nil instead of "")

        I'm basically rolling out the change for <rdar://problem/4782422> because
        my testing shows that it was backwards.
        
        * html/HTMLElement.cpp:
        (dumpInnerHTML): New debug-only function to work around gdb being 
        perpetually suck-tastic.

        * page/mac/WebCoreFrameBridge.mm:
        (-[WebCoreFrameBridge stringByEvaluatingJavaScriptFromString:forceUserGesture:]):
        
        Return "", not nil. This function never used to return nil, so let's not
        start now. I've filed <rdar://problem/5283271> to cover the documentation bug,

2007-06-20  Adam Roben  <aroben@apple.com>

        Addressed some of Geoff's comments.

        * page/ContextMenuController.cpp:
        (WebCore::ContextMenuController::handleContextMenuEvent): Added a
        FIXME.
        * platform/ContextMenu.cpp:
        (WebCore::ContextMenu::addInspectElementItem): Null-check
        frame->page().

2007-06-20  Adam Roben  <aroben@apple.com>

        Fix crash in fast/dom/dir-no-body.html

        Reviewed by Mark.

        * html/HTMLDocument.cpp:
        (WebCore::HTMLDocument::createTokenizer): Don't assume we have a
        Frame, since we won't if someone creates an HTMLDocument from JS.

2007-06-20  Adam Roben  <aroben@apple.com>

        Land the new Inspector.

        Co-written with Tim Hatcher.

        Reviewed by Anders, Adele, Hyatt, and Sam.

        No regression tests possible.

        Add a new InspectorController that is in charge of the Inspector. It
        has an InspectorClient that controls the Inspector's window and node
        highlight.

        * page/InspectorClient.h: Added.
        (WebCore::InspectorClient::~InspectorClient):
        * page/InspectorController.cpp: Added.
        (WebCore::ConsoleMessage::ConsoleMessage):
        (WebCore::InspectorResource::): Represents a single resource that the
        Inspector knows about.
        (WebCore::InspectorResource::InspectorResource):
        (WebCore::InspectorResource::~InspectorResource):
        (WebCore::InspectorResource::type):
        (WebCore::InspectorResource::setScriptObject):
        (WebCore::addSourceToFrame): Callback available from JS.
        (WebCore::getResourceDocumentNode): Ditto.
        (WebCore::highlightDOMNode): Ditto.
        (WebCore::hideDOMNodeHighlight): Ditto.
        (WebCore::loaded): Ditto.
        (WebCore::unloading): Ditto.
        (WebCore::attach): Ditto.
        (WebCore::detach): Ditto.
        (WebCore::log): Ditto.
        (WebCore::search): Ditto.
        (WebCore::inspectedWindow): Ditto.
        (WebCore::InspectorController::InspectorController):
        (WebCore::InspectorController::~InspectorController):
        (WebCore::InspectorController::inspect): Called by
        ContextMenuController to inspect a node.
        (WebCore::InspectorController::focusNode):
        (WebCore::InspectorController::highlight):
        (WebCore::InspectorController::hideHighlight):
        (WebCore::InspectorController::windowVisible):
        (WebCore::InspectorController::setWindowVisible):
        (WebCore::InspectorController::addMessageToConsole):
        (WebCore::InspectorController::attachWindow):
        (WebCore::InspectorController::detachWindow):
        (WebCore::InspectorController::windowScriptObjectAvailable):
        (WebCore::InspectorController::scriptObjectReady):
        (WebCore::InspectorController::windowUnloading):
        (WebCore::addHeaders): Static helper function.
        (WebCore::objectForRequest): Ditto.
        (WebCore::objectForResponse): Ditto.
        (WebCore::InspectorController::addScriptResource):
        (WebCore::InspectorController::addAndUpdateScriptResource):
        (WebCore::InspectorController::removeScriptResource):
        (WebCore::InspectorController::updateScriptResource):
        (WebCore::InspectorController::populateScriptResources):
        (WebCore::InspectorController::addScriptConsoleMessage):
        (WebCore::callClearFunction): Static helper function.
        (WebCore::InspectorController::clearScriptResources):
        (WebCore::InspectorController::clearScriptConsoleMessages):
        (WebCore::InspectorController::clearNetworkTimeline):
        (WebCore::InspectorController::pruneResources):
        (WebCore::InspectorController::didCommitLoad): Callback from
        FrameLoader.
        (WebCore::InspectorController::frameDetachedFromParent): Ditto.
        (WebCore::InspectorController::addResource): Ditto.
        (WebCore::InspectorController::removeResource): Ditto.
        (WebCore::InspectorController::didLoadResourceFromMemoryCache): Ditto.
        (WebCore::InspectorController::identifierForInitialRequest): Ditto.
        (WebCore::InspectorController::willSendRequest): Ditto.
        (WebCore::InspectorController::didReceiveResponse): Ditto.
        (WebCore::InspectorController::didReceiveContentLength): Ditto.
        (WebCore::InspectorController::didFinishLoading): Ditto.
        (WebCore::InspectorController::didFailLoading): Ditto.
        * page/InspectorController.h: Added.
        (WebCore::InspectorController::inspectedPage):
        (WebCore::InspectorController::scriptContext):
        (WebCore::InspectorController::setScriptContext):
        (WebCore::InspectorController::resources):
        (WebCore::InspectorController::removeAllResources):

        Add the JavaScript that defines most of the behavior of the Inspector.
        
        * page/inspector/ConsolePanel.js: Added.
        * page/inspector/NetworkPanel.js: Added.
        * page/inspector/Resource.js: Added.
        * page/inspector/ResourceCategory.js: Added.
        * page/inspector/ResourcePanel.js: Added.
        * page/inspector/inspector.js: Added.
        * page/inspector/treeoutline.js: Renamed from WebKit/WebInspector/webInspector/treeoutline.js.
        * page/inspector/utilities.js: Added.

        Add the Inspector's CSS and HTML.

        * page/inspector/inspector.css: Added.
        * page/inspector/inspector.html: Added.

        Hang the InspectorController off of Page. We only create an
        InspectorController if an InspectorClient is given to the Page.

        * page/Page.cpp:
        (WebCore::Page::Page):
        * page/Page.h:
        (WebCore::Page::inspectorController):

        Use FrameLoader to notify the InspectorController of resource loads.

        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::begin):
        (WebCore::FrameLoader::transitionToCommitted):
        (WebCore::FrameLoader::continueLoadAfterWillSubmitForm):
        (WebCore::FrameLoader::detachFromParent):
        (WebCore::FrameLoader::assignIdentifierToInitialRequest):
        (WebCore::FrameLoader::willSendRequest):
        (WebCore::FrameLoader::didReceiveResponse):
        (WebCore::FrameLoader::didReceiveData):
        (WebCore::FrameLoader::sendRemainingDelegateMessages):
        (WebCore::FrameLoader::requestFromDelegate):
        (WebCore::FrameLoader::didFinishLoad):
        (WebCore::FrameLoader::dispatchWindowObjectAvailable):
        (WebCore::FrameLoader::dispatchDidCommitLoad):
        (WebCore::FrameLoader::dispatchAssignIdentifierToInitialRequest):
        (WebCore::FrameLoader::dispatchWillSendRequest):
        (WebCore::FrameLoader::dispatchDidReceiveResponse):
        (WebCore::FrameLoader::dispatchDidReceiveContentLength):
        (WebCore::FrameLoader::dispatchDidFinishLoading):
        (WebCore::FrameLoader::dispatchDidLoadResourceFromMemoryCache):
        * loader/FrameLoader.h:

        Send console messages to the InspectorController.

        * page/Chrome.cpp:
        (WebCore::Chrome::addMessageToConsole): Send all console messages to
        the InspectorController.
        * page/Chrome.h: Add a new MessageLevel and MessageSource that are
        used in the Inspector JS.

        Report HTML errors when the Inspector window is open.
        We don't report errors when the window is closed because we don't want
        to slow down the HTMLTokenizer.

        * html/HTMLDocument.cpp:
        (WebCore::HTMLDocument::createTokenizer):
        * html/HTMLParser.cpp:
        (WebCore::HTMLParser::HTMLParser):
        * html/HTMLParser.h:
        * html/HTMLTokenizer.cpp:
        (WebCore::HTMLTokenizer::HTMLTokenizer):
        * html/HTMLTokenizer.h:

        Append the "Inspect Element" context menu item after passing the
        context menu to the ContextMenuClient. This work used to be done in
        WebKit.

        * page/ContextMenuClient.h:
        * page/ContextMenuController.cpp:
        (WebCore::ContextMenuController::handleContextMenuEvent): Add the
        "Inspect Element" item.
        (WebCore::ContextMenuController::contextMenuItemSelected): Handle the
        "Inspect Element" item.
        * platform/ContextMenu.cpp:
        (WebCore::ContextMenu::addInspectElementItem):
        (WebCore::ContextMenu::checkOrEnableIfNeeded): Updated for "Inspect
        Element" item.
        * platform/ContextMenu.h:
        * platform/ContextMenuItem.h:
        (WebCore::): Add ContextMenuItemTagInspectElement.
        * platform/graphics/svg/SVGImageEmptyClients.h:
        * page/mac/WebCoreViewFactory.h: Add the "Inspect Element" localized
        string.
        * platform/LocalizedStrings.h: Ditto.
        * platform/mac/LocalizedStringsMac.mm:
        (WebCore::contextMenuItemTagInspectElement): Ditto.

        Miscellaneous changes:

        * css/view-source.css: Add message bubble styles.
        * loader/DocumentLoader.h: Add a frame getter.
        * platform/win/ScrollViewWin.cpp:
        (WebCore::ScrollView::updateScrollbars): Respect
        Frame::prohibitsScrolling.

        Add new images needed for the Inspector.

        * page/inspector/Images/attachedShadow.png: Added.
        * page/inspector/Images/bottomShadow.png: Added.
        * page/inspector/Images/breadcrumbBackground.png: Added.
        * page/inspector/Images/checker.png: Added.
        * page/inspector/Images/console.png: Added.
        * page/inspector/Images/darkShadow.png: Added.
        * page/inspector/Images/disclosureDownPressed.png: Added.
        * page/inspector/Images/disclosureRightDown.png: Added.
        * page/inspector/Images/disclosureRightPressed.png: Added.
        * page/inspector/Images/document.png: Added.
        * page/inspector/Images/domViewButton.png: Added.
        * page/inspector/Images/domViewButtonSelected.png: Added.
        * page/inspector/Images/downTriangle.png: Added.
        * page/inspector/Images/errorIcon.png: Added.
        * page/inspector/Images/errorMediumIcon.png: Added.
        * page/inspector/Images/folder.png: Added.
        * page/inspector/Images/goArrow.png: Added.
        * page/inspector/Images/gradient.png: Added.
        * page/inspector/Images/gradientHighlight.png: Added.
        * page/inspector/Images/gradientHighlightBottom.png: Added.
        * page/inspector/Images/hideStatusWidget.png: Added.
        * page/inspector/Images/hideStatusWidgetPressed.png: Added.
        * page/inspector/Images/network.png: Added.
        * page/inspector/Images/paneBottomGrow.png: Added.
        * page/inspector/Images/paneBottomGrowActive.png: Added.
        * page/inspector/Images/paneGrowHandleLine.png: Added.
        * page/inspector/Images/paneHeader.png: Added.
        * page/inspector/Images/paneHeaderActive.png: Added.
        * page/inspector/Images/plainDocument.png: Added.
        * page/inspector/Images/popupArrows.png: Added.
        * page/inspector/Images/rightTriangle.png: Added.
        * page/inspector/Images/segment.png: Added.
        * page/inspector/Images/segmentEnd.png: Added.
        * page/inspector/Images/segmentHover.png: Added.
        * page/inspector/Images/segmentHoverEnd.png: Added.
        * page/inspector/Images/segmentSelected.png: Added.
        * page/inspector/Images/segmentSelectedEnd.png: Added.
        * page/inspector/Images/showStatusWidget.png: Added.
        * page/inspector/Images/showStatusWidgetPressed.png: Added.
        * page/inspector/Images/sidbarItemBackground.png: Added.
        * page/inspector/Images/sidebarActionWidget.png: Added.
        * page/inspector/Images/sidebarActionWidgetPressed.png: Added.
        * page/inspector/Images/sidebarAttachWidget.png: Added.
        * page/inspector/Images/sidebarAttachWidgetPressed.png: Added.
        * page/inspector/Images/sidebarDetachWidget.png: Added.
        * page/inspector/Images/sidebarDetachWidgetPressed.png: Added.
        * page/inspector/Images/sidebarResizeWidget.png: Added.
        * page/inspector/Images/sidebarSelection.png: Added.
        * page/inspector/Images/sidebarSelectionBlurred.png: Added.
        * page/inspector/Images/sidebarSelectionBlurredTall.png: Added.
        * page/inspector/Images/sidebarSelectionGray.png: Added.
        * page/inspector/Images/sidebarSelectionGrayTall.png: Added.
        * page/inspector/Images/sidebarSelectionTall.png: Added.
        * page/inspector/Images/sidebarStatusAreaBackground.png: Added.
        * page/inspector/Images/sourceViewButton.png: Added.
        * page/inspector/Images/sourceViewButtonSelected.png: Added.
        * page/inspector/Images/splitviewDimple.png: Added.
        * page/inspector/Images/splitviewDividerBackground.png: Added.
        * page/inspector/Images/tab.png: Added.
        * page/inspector/Images/tabSelected.png: Added.
        * page/inspector/Images/timelinePillBlue.png: Added.
        * page/inspector/Images/timelinePillGray.png: Added.
        * page/inspector/Images/timelinePillGreen.png: Added.
        * page/inspector/Images/timelinePillOrange.png: Added.
        * page/inspector/Images/timelinePillPurple.png: Added.
        * page/inspector/Images/timelinePillRed.png: Added.
        * page/inspector/Images/timelinePillYellow.png: Added.
        * page/inspector/Images/tipBalloon.png: Added.
        * page/inspector/Images/tipBalloonBottom.png: Added.
        * page/inspector/Images/tipIcon.png: Added.
        * page/inspector/Images/tipIconPressed.png: Added.
        * page/inspector/Images/toggleDown.png: Added.
        * page/inspector/Images/toggleUp.png: Added.
        * page/inspector/Images/toolbarBackground.png: Added.
        * page/inspector/Images/toolbarBackgroundInactive.png: Added.
        * page/inspector/Images/toolbarButton.png: Added.
        * page/inspector/Images/toolbarButtonInactive.png: Added.
        * page/inspector/Images/toolbarButtonPressed.png: Added.
        * page/inspector/Images/toolbarButtonPressedInactive.png: Added.
        * page/inspector/Images/toolbarSplitButtonDivider.png: Added.
        * page/inspector/Images/toolbarSplitButtonDividerInactive.png: Added.
        * page/inspector/Images/treeDownTriangleBlack.png: Added.
        * page/inspector/Images/treeDownTriangleWhite.png: Added.
        * page/inspector/Images/treeLeftTriangleBlack.png: Added.
        * page/inspector/Images/treeRightTriangleBlack.png: Added.
        * page/inspector/Images/treeRightTriangleWhite.png: Added.
        * page/inspector/Images/warningIcon.png: Added.
        * page/inspector/Images/warningMediumIcon.png: Added.
        * page/inspector/Images/warningsErrors.png: Added.

        Build-fu:

        * WebCore.exp: Added new symbols.
        * WebCore.xcodeproj/project.pbxproj: Added new source files and
        resources.
        * WebCore.vcproj/WebCore.vcproj: Ditto, and copy the resources to
        $WebKitOutputDir.

        Windows build fixes:

        * history/HistoryItem.h: ResourceRequest is a struct.
        * loader/FrameLoaderClient.h: Ditto.

2007-06-20  Mitz Pettel  <mitz@webkit.org>

        Reviewed by Beth.

        - fix http://bugs.webkit.org/show_bug.cgi?id=14056
          REGRESSION (r21113-21143): TR background not repainted via style class change

        Test: fast/repaint/table-row.html

        * rendering/RenderTableRow.cpp:
        (WebCore::RenderTableRow::layout): Added a repaint to make up for the case where the
        table row also needs layout, so it doesn't get a repaint in setStyle().

2007-06-20  Mitz Pettel  <mitz@webkit.org>

        Reviewed by Adele.

        - fix http://bugs.webkit.org/show_bug.cgi?id=14040
          Top and bottom border images flipped when using -webkit-border-image when border end up tiled

        Test: fast/borders/border-image-01.html

        Correctly account for the fact that "pattern space" is flipped.

        * platform/graphics/Image.cpp: (WebCore::Image::drawTiled):
        * platform/graphics/cg/ImageCG.cpp:
        (WebCore::Image::drawPatternCallback):
        (WebCore::Image::drawPattern):

2007-06-20  Anders Carlsson  <andersca@apple.com>

        Reviewed by Darin.

        <rdar://problem/5245555> REGRESSION: HTTP header injection in XMLHttpRequest.setRequestHeader
        
        Check for either '\r' or '\n' in the header value.
        
        * xml/xmlhttprequest.cpp:
        (WebCore::isValidHeaderValue):

2007-06-20  Patti Hoa  <patti@apple.com>

        Reviewed by Geoffrey Garen.

        <rdar://problem/4882527> VO should speak URL of image links that lack tags
        Add additional change from review
        
        * bridge/mac/WebCoreAXObject.mm:
        (-[WebCoreAXObject accessibilityAttributeValue:]):
        Check if the element has imgTag before asking for its url
        
2007-06-20  Patti Hoa  <patti@apple.com>

        Reviewed by Tristan O'Tierney.

        <rdar://problem/4882527> VO should speak URL of image links that lack tags
        
        * bridge/mac/WebCoreAXObject.mm:
        (-[WebCoreAXObject accessibilityAttributeNames]):
        (-[WebCoreAXObject accessibilityAttributeValue:]):
        Return the url of images.

2007-06-19  Anders Carlsson  <andersca@apple.com>

        Reviewed by Kevin Decker.

        <rdar://problem/5266289> REGRESSION (Safari 3 Beta 1): Incoming iChat messages are delayed
        
        Add a new m_deferMainResourceDataLoad that can be used to control whether a data load should be deferred using a timer or not.
        
        * loader/DocumentLoader.cpp:
        (WebCore::DocumentLoader::DocumentLoader):
        * loader/DocumentLoader.h:
        (WebCore::DocumentLoader::deferMainResourceDataLoad):
        * loader/MainResourceLoader.cpp:
        (WebCore::MainResourceLoader::handleDataLoadSoon):
        (WebCore::MainResourceLoader::loadNow):
        (WebCore::MainResourceLoader::setDefersLoading):

2007-06-19  Patti Hoa <patti@apple.com>

        Reviewed by Justin Garcia.
        
        <rdar://problem/5237325> Incorrect AXLeftLineTextMarkerRangeForTextMarker/AXPreviousLineStartTextMarkerForTextMarker for non-editable text
        
        * editing/visible_units.cpp:
        (WebCore::startPositionForLine):
        (WebCore::startOfLine):
        (WebCore::endPositionForLine):
        (WebCore::endOfLine):
        Break down the line routines to allow another try to ask for start/end of line if the returned position is not valid.
        An example would be when lineStart/lineEnd at different line than the input position.
        This can happen if the input position is before the space character at the end of a soft-wrapped non-editable line, 
        specifically a line without webkit-line-break:after-white-space style.

2007-06-19  Patti Hoa  <patti@apple.com>

        Reviewed by Justin Garcia.
        
        <rdar://problem/3992645> VO view bounds misplaced when reading text after a line wrap
        
        * bridge/mac/WebCoreAXObject.mm:
        (-[WebCoreAXObject doAXBoundsForTextMarkerRange:]):
        Improve the accuracy of the bounds for a given range
        
2007-06-19  Anders Carlsson  <andersca@apple.com>

        Reviewed by Darin.

        <rdar://problem/5130630>
        XPath fails LayoutTests on Windows
        
        * xml/XPathPredicate.cpp:
        Include MathExtras.h here so we get a version of fmod that works around a bug in the Microsoft CRT.
        
        * xml/XPathValue.cpp:
        (WebCore::XPath::Value::toNumber):
        Instead of using NAN, which isn't really the NaN value on Windows, use numeric_limits.
        
2007-06-19  Geoffrey Garen  <ggaren@apple.com>

        Reviewed by Darin Adler.

        Fixed cross-frame access. <rdar://problem/5251309>. 

        * bindings/js/kjs_window.cpp:
        (KJS::Window::getValueProperty):
        * bindings/scripts/CodeGeneratorJS.pm:
        * page/DOMWindow.idl:

2007-06-19  Anders Carlsson  <andersca@apple.com>

        Build fix.
        
        * platform/win/PopupMenuWin.cpp:

2007-06-19  Lars Knoll <lars@trolltech.com>

        Reviewed by Zack

        Implement these methods correctly.

        * platform/qt/PlatformScreenQt.cpp:
        (WebCore::screenRect):
        (WebCore::screenAvailableRect):

2007-06-19  Sam Weinig  <sam@webkit.org>

        Reviewed by Geoff.

        Patch for http://bugs.webkit.org/show_bug.cgi?id=14226
        Move the History object out of the JS bindings

        - Autogenerate JSHistory.

        * DerivedSources.make:
        * WebCore.pro:
        * WebCore.vcproj/WebCore.vcproj:
        * WebCore.xcodeproj/project.pbxproj:
        * bindings/js/kjs_window.cpp:
        (KJS::WindowPrivate::WindowPrivate):
        (KJS::Window::mark):
        (KJS::Window::getValueProperty):
        (KJS::Window::clearHelperObjectProperties):
        (KJS::Window::disconnectFrame):
        * bindings/js/kjs_window.h:
        (KJS::Window::):
        * bridge/GlobalHistory.h: Copied from WebCore/bridge/History.h.
        * bridge/History.h: Removed.
        * bridge/mac/GlobalHistoryMac.mm: Copied from WebCore/bridge/mac/HistoryMac.mm.
        * bridge/mac/HistoryMac.mm: Removed.
        * bridge/win/GlobalHistoryWin.cpp: Copied from WebCore/bridge/win/HistoryWin.cpp.
        * bridge/win/HistoryWin.cpp: Removed.
        * css/cssstyleselector.cpp:
        * page/DOMWindow.cpp:
        (WebCore::DOMWindow::disconnectFrame):
        (WebCore::DOMWindow::history):
        * page/DOMWindow.h:
        * page/DOMWindow.idl:
        * page/History.cpp: Added.
        (WebCore::History::History):
        (WebCore::History::frame):
        (WebCore::History::disconnectFrame):
        (WebCore::History::length):
        (WebCore::History::back):
        (WebCore::History::forward):
        (WebCore::History::go):
        * page/History.h: Added.
        * page/History.idl: Added.
        * platform/gdk/TemporaryLinkStubs.cpp:
        * platform/qt/TemporaryLinkStubs.cpp:
        * platform/wx/TemporaryLinkStubs.cpp:

2007-06-18  Sam Weinig  <sam@webkit.org>

        Qt build fix.

        * platform/qt/PlatformScreenQt.cpp:
        (WebCore::screenDepth):
        (WebCore::screenDepthPerComponent):
        (WebCore::screenIsMonochrome):
        (WebCore::screenRect):
        (WebCore::screenAvailableRect):

2007-06-18  Sam Weinig  <sam@webkit.org>

        Reviewed by Beth.

        Fix build and update licenses. 

        * WebCore.xcodeproj/project.pbxproj:
        * page/BarInfo.cpp:
        * page/BarInfo.h:
        * page/BarInfo.idl:
        * page/Screen.cpp:
        (WebCore::Screen::height):
        (WebCore::Screen::width):
        (WebCore::Screen::colorDepth):
        (WebCore::Screen::pixelDepth):
        (WebCore::Screen::availLeft):
        (WebCore::Screen::availTop):
        (WebCore::Screen::availHeight):
        (WebCore::Screen::availWidth):
        * page/Screen.h:
        * page/Screen.idl:

2007-06-18  Anders Carlsson  <andersca@apple.com>

        Reviewed by John Sullivan.

        <rdar://problem/5277008> Assertion in [LocationChangeHandler finishedLoadingFrame:]
        
        Don't send any frame load callbacks if the document load hasn't been
        committed for real.
        
        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::checkLoadCompleteForThisFrame):

2007-06-18  Sam Weinig  <sam@webkit.org>

        Reviewed by Geoff.

        Patch for http://bugs.webkit.org/show_bug.cgi?id=14193
        Move the Screen object out of the JS bindings

        - Renames Screen.h to PlatformScreen.h to accommodate new class.
        - Autogenerates JSScreen.

        * DerivedSources.make:
        * WebCore.pro:
        * WebCore.vcproj/WebCore.vcproj:
        * WebCore.xcodeproj/project.pbxproj:
        * bindings/js/kjs_window.cpp:
        (KJS::WindowPrivate::WindowPrivate):
        (KJS::Window::mark):
        (KJS::Window::getValueProperty):
        (KJS::Window::clearHelperObjectProperties):
        * bindings/js/kjs_window.h:
        (KJS::Window::):
        * css/MediaQueryEvaluator.cpp:
        * page/DOMWindow.cpp:
        (WebCore::DOMWindow::DOMWindow):
        (WebCore::DOMWindow::~DOMWindow):
        (WebCore::DOMWindow::frame):
        (WebCore::DOMWindow::disconnectFrame):
        (WebCore::DOMWindow::screen):
        * page/DOMWindow.h:
        * page/DOMWindow.idl:
        * page/Screen.cpp: Added.
        (WebCore::Screen::Screen):
        (WebCore::Screen::disconnectFrame):
        (WebCore::Screen::height):
        (WebCore::Screen::width):
        (WebCore::Screen::colorDepth):
        (WebCore::Screen::pixelDepth):
        (WebCore::Screen::availLeft):
        (WebCore::Screen::availTop):
        (WebCore::Screen::availHeight):
        (WebCore::Screen::availWidth):
        * page/Screen.h: Added.
        * page/Screen.idl: Added.
        * page/mac/WebCoreFrameBridge.mm:
        * platform/PlatformScreen.h: Copied from WebCore/platform/Screen.h.
        * platform/Screen.h: Removed.
        * platform/gdk/PlatformScreenGdk.cpp: Copied from WebCore/platform/gdk/ScreenGdk.cpp.
        * platform/gdk/ScreenGdk.cpp: Removed.
        * platform/mac/PlatformMouseEventMac.mm:
        * platform/mac/PlatformScreenMac.mm: Copied from WebCore/platform/mac/ScreenMac.mm.
        * platform/mac/ScreenMac.mm: Removed.
        * platform/qt/PlatformScreenQt.cpp: Added.
        (WebCore::WebCore::screenDepth):
        (WebCore::WebCore::screenDepthPerComponent):
        (WebCore::WebCore::screenIsMonochrome):
        (WebCore::WebCore::screenRect):
        (WebCore::WebCore::screenAvailableRect):
        * platform/qt/TemporaryLinkStubs.cpp:
        * platform/win/PlatformScreenWin.cpp: Copied from WebCore/platform/win/ScreenWin.cpp.
        * platform/win/ScreenWin.cpp: Removed.
        * rendering/RenderObject.cpp:

2007-06-18  Sam Weinig  <sam@webkit.org>

        Reviewed by Geoff.

        Patch for http://bugs.webkit.org/show_bug.cgi?id=14211
        Move the BarInfo object out of the JS bindings

        * DerivedSources.make:
        * WebCore.pro:
        * WebCore.vcproj/WebCore.vcproj:
        * WebCore.xcodeproj/project.pbxproj:
        * bindings/js/kjs_window.cpp:
        (KJS::WindowPrivate::WindowPrivate):
        (KJS::Window::mark):
        (KJS::Window::getValueProperty):
        (KJS::Window::clearHelperObjectProperties):
        (KJS::Window::disconnectFrame):
        * bindings/js/kjs_window.h:
        (KJS::Window::):
        * page/BarInfo.cpp: Added.
        (WebCore::BarInfo::BarInfo):
        (WebCore::BarInfo::disconnectFrame):
        (WebCore::BarInfo::visible):
        * page/BarInfo.h: Added.
        (WebCore::BarInfo::):
        * page/BarInfo.idl: Added.
        * page/DOMWindow.cpp:
        (WebCore::DOMWindow::~DOMWindow):
        (WebCore::DOMWindow::disconnectFrame):
        (WebCore::DOMWindow::locationbar):
        (WebCore::DOMWindow::menubar):
        (WebCore::DOMWindow::personalbar):
        (WebCore::DOMWindow::scrollbars):
        (WebCore::DOMWindow::statusbar):
        (WebCore::DOMWindow::toolbar):
        * page/DOMWindow.h:
        * page/DOMWindow.idl:

2007-06-18  Sam Weinig  <sam@webkit.org>

        Reviewed by Darin.

        Remove the FrameArray class and instead make window.frames another
        self-reference for window (like window.window, window.self, etc).
        This is what Firefox and what the HTML5 dictates.

        * bindings/js/kjs_window.cpp:
        (KJS::WindowPrivate::WindowPrivate):
        (KJS::Window::mark):
        (KJS::Window::getValueProperty):
        (KJS::Window::clearHelperObjectProperties):
        (KJS::Window::disconnectFrame):
        * bindings/js/kjs_window.h:

2007-06-18  Mitz Pettel  <mitz@webkit.org>

        Reviewed by Adele.

        - fix http://bugs.webkit.org/show_bug.cgi?id=13413
          Failed assertion in RenderTextControl::setSelectionRange in Google Spreadsheets

        Test: fast/forms/input-zero-height-focus.html

        * rendering/RenderTextControl.cpp:
        (WebCore::RenderTextControl::setSelectionRange): Avoid setting the
        selection in a zero-height text control.

2007-06-18  Alp Toker  <alp.toker@collabora.co.uk>

        Reviewed by Sam Weinig.

        http://bugs.webkit.org/show_bug.cgi?id=14052
        Implement SoundGdk

        * WebCore.pro:
        * platform/gdk/SoundGdk.cpp: Added.
        (WebCore::systemBeep):
        * platform/gdk/TemporaryLinkStubs.cpp:
        (WebCore::systemBeep):

2007-06-18  Dave Hyatt  <hyatt@apple.com>

        Add support for horizontal mouse wheeling on Windows.
        
        Reviewed by aroben

        * platform/PlatformWheelEvent.h:
        * platform/win/WheelEventWin.cpp:
        (WebCore::PlatformWheelEvent::PlatformWheelEvent):

2007-06-17  Sam Weinig  <sam@webkit.org>

        Win32 build fix.

        * WebCore.vcproj/WebCore.vcproj:

2007-06-15  David Hyatt  <hyatt@apple.com>

        Fix for bugzilla bugs 14183 and 14184, 'repeat' regressed in border-image
        because of a botched 'round' support removal.  Also update for a change in
        the spec that has the second stretch/round/repeat keyword match the first
        if omitted.
        
        Reviewed by olliej

        * css/cssparser.cpp:
        (WebCore::BorderImageParseContext::commitBorderImage):
        * platform/graphics/Image.cpp:
        (WebCore::Image::drawTiled):
        * platform/graphics/Image.h:
        (WebCore::Image::):

2007-06-15  Sam Weinig  <sam@webkit.org>

        Reviewed by Darin.

        Patch for http://bugs.webkit.org/show_bug.cgi?id=14053
        Autogenerate JS binding for Rect

        - Renames RectImpl to Rect, DOMStyleSheetList to JSStyleSheetList 
          and DOMRGBColor to JSRGBColor
        - Moves JSStyleSheetList and JSRGBColor into the WebCore namespace.

        * DerivedSources.make:
        * WebCore.pro:
        * WebCore.xcodeproj/project.pbxproj:
        * bindings/js/kjs_css.cpp:
        (WebCore::):
        (WebCore::JSStyleSheetList::JSStyleSheetList):
        (WebCore::JSStyleSheetList::~JSStyleSheetList):
        (WebCore::JSStyleSheetList::getValueProperty):
        (WebCore::JSStyleSheetList::indexGetter):
        (WebCore::JSStyleSheetList::nameGetter):
        (WebCore::JSStyleSheetList::getOwnPropertySlot):
        (WebCore::toJS):
        (WebCore::JSStyleSheetListFunc::callAsFunction):
        (WebCore::JSRGBColor::JSRGBColor):
        (WebCore::JSRGBColor::~JSRGBColor):
        (WebCore::JSRGBColor::getOwnPropertySlot):
        (WebCore::JSRGBColor::getValueProperty):
        (WebCore::getJSRGBColor):
        * bindings/js/kjs_css.h:
        (WebCore::JSStyleSheetList::classInfo):
        (WebCore::JSStyleSheetList::):
        (WebCore::JSStyleSheetList::impl):
        (WebCore::JSRGBColor::classInfo):
        (WebCore::JSRGBColor::):
        (WebCore::JSRGBColor::impl):
        * bindings/objc/DOMUtility.mm:
        (KJS::createDOMWrapper):
        * bindings/scripts/CodeGeneratorJS.pm:
        * bindings/scripts/CodeGeneratorObjC.pm:
        * css/CSSBorderImageValue.cpp:
        (WebCore::CSSBorderImageValue::CSSBorderImageValue):
        * css/CSSBorderImageValue.h:
        * css/CSSPrimitiveValue.cpp:
        (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
        (WebCore::CSSPrimitiveValue::cssText):
        * css/CSSPrimitiveValue.h:
        (WebCore::CSSPrimitiveValue::getRectValue):
        (WebCore::CSSPrimitiveValue::):
        * css/DashboardRegion.h:
        * css/Rect.h: Copied from css/RectImpl.h.
        (WebCore::Rect::~Rect):
        (WebCore::Rect::top):
        (WebCore::Rect::right):
        (WebCore::Rect::bottom):
        (WebCore::Rect::left):
        (WebCore::Rect::setTop):
        (WebCore::Rect::setRight):
        (WebCore::Rect::setBottom):
        (WebCore::Rect::setLeft):
        * css/Rect.idl:
        * css/RectImpl.h: Removed.
        * css/cssparser.cpp:
        (WebCore::CSSParser::parseShape):
        (WebCore::BorderImageParseContext::commitBorderImage):
        * css/cssstyleselector.cpp:
        (WebCore::CSSStyleSelector::applyProperty):
        * page/DOMWindow.idl:

2007-06-14  George Staikos  <staikos@kde.org>

        Reviewed by Lars.

        Implement missing tab support and a slight refactor.

        * platform/qt/PlatformKeyboardEventQt.cpp:
        (WebCore::keyIdentifierForQtKeyCode):
        (WebCore::windowsKeyCodeForKeyEvent):
        (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):

2007-06-14  Dave Hyatt  <hyatt@apple.com>

        Fix for Bugzilla bug 14806, missing text for bold/italic fonts in non-English Windows installs.
        
        This patch adds an additional step after the lookup by full name fails.  It will then look up
        a PostScript name in a (localized full name) -> (PostScript name) cache.  If the name is not
        found, then the font's name table is obtained and searched for a PostScript name (and the
        result is cached).
        
        If lookup on PostScript name fails too, then we now properly fall back to the next font in the
        list (so text should never be missing).

        Reviewed by Darin (thoroughly reviewed, super reviewed even)

        * platform/win/FontCacheWin.cpp:
        * platform/win/FontPlatformDataWin.cpp:

2007-06-14  Anders Carlsson  <andersca@apple.com>

        Reviewed by Geoff.

        Add Frame::cleanupScriptObjectsForPlugin which will invalidate the root object
        for a given plug-in.

        * WebCore.exp:
        * page/Frame.cpp:
        (WebCore::Frame::cleanupScriptObjectsForPlugin):
        * page/Frame.h:

2007-06-14  Anders Carlsson  <andersca@apple.com>

        Reviewed by Geoff.

        <rdar://problem/5211677>
        -[WebPreferences setJavaEnabled:] only disables java inside <applet>, not <object>
        
        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::requestObject):
        If the object is a Java MIME type and Java is disabled, don't load the plug-in.
        
        * platform/MimeTypeRegistry.cpp:
        (WebCore::MimeTypeRegistry::isJavaAppletMIMEType):
        Clean this up and add another applet MIME type.

2007-06-14  George Staikos  <staikos@kde.org>

        Reviewed by Lars.

        Implement the file chooser for Qt.

        * platform/qt/FileChooserQt.cpp:
        (WebCore::FileChooser::openFileChooser):
        (WebCore::FileChooser::basenameForWidth):

2007-06-14  George Staikos  <staikos@kde.org>

        Reviewed by Lars.

        Add missing initialization of pointer.

        * platform/qt/ContextMenuQt.cpp:
        (WebCore::ContextMenu::ContextMenu):

2007-06-14  Anders Carlsson  <andersca@apple.com>

        Reviewed by Mitz.

        <rdar://problem/5244948>
        Safari keeps on complaining about slow script playing NBC TV video (14133)

        http://bugs.webkit.org/show_bug.cgi?id=14133
        Runaway JavaScript timer fires when spinning around in Google Maps street view

        Make sure to start and stop the timeout checker around calls to JS.

        * bindings/objc/WebScriptObject.mm:
        (-[WebScriptObject callWebScriptMethod:withArguments:]):
        (-[WebScriptObject evaluateWebScript:]):

2007-06-14  George Staikos  <staikos@kde.org>

        Reviewed by Maciej.

        Keypress causes typeahead crash on empty selects due to modulo 0.

        * html/HTMLSelectElement.cpp:
        (WebCore::HTMLSelectElement::typeAheadFind):

2007-06-13  George Staikos  <staikos@kde.org>

        Reviewed by Lars.

        Compile without self-linking.

        * WebCore.pro:

2007-06-13  Darin Adler  <darin@apple.com>

        Reviewed by Kevin Decker.

        - fix <rdar://problem/5264923> Safari frequently "stalls" beneath
          +[NSFont fontWithName:size:] while loading a web page (searching on disk for the font)

        * platform/mac/WebFontCache.mm:
        (+[WebFontCache internalFontWithFamily:traits:size:]): Renamed from fontWithFamily.
        Took out the auto-activation code.
        (+[WebFontCache fontWithFamily:traits:size:]): Added. Calls internalFontWithFamily,
        then calls NSFont to trigger activation if that returned nil, then calls
        internalFontWithFamily again.

2007-06-13  Anders Carlsson  <andersca@apple.com>

        Reviewed by Geoff.

        Pass the root object to methods that end up creating new ObjcInstance objects.
        
        * bindings/objc/WebScriptObject.mm:
        (listFromNSArray):
        (-[WebScriptObject callWebScriptMethod:withArguments:]):
        (-[WebScriptObject evaluateWebScript:]):
        (-[WebScriptObject setValue:forKey:]):
        (-[WebScriptObject valueForKey:]):
        (-[WebScriptObject removeWebScriptKey:]):
        (-[WebScriptObject setWebScriptValueAtIndex:value:]):

2007-06-13  Anders Carlsson  <andersca@apple.com>

        Reviewed by Darin.

        <rdar://problem/5267992>
        Make sure an alert doesn't allow loading to continue inside a script.
        
        Make sure to defer all loads where it's possible for a second main loop to be running.
        
        * page/Chrome.cpp:
        (WebCore::Chrome::runModal):
        (WebCore::Chrome::runBeforeUnloadConfirmPanel):
        (WebCore::Chrome::runJavaScriptAlert):
        (WebCore::Chrome::runJavaScriptConfirm):
        (WebCore::Chrome::runJavaScriptPrompt):
        (WebCore::PageGroupLoadDeferrer::PageGroupLoadDeferrer):
        (WebCore::PageGroupLoadDeferrer::~PageGroupLoadDeferrer):
        
        * platform/network/cf/ResourceHandleCFNet.cpp:
        (WebCore::ResourceHandle::setDefersLoading):
        Implement this.

2007-06-13  Alp Toker  <alp.toker@collabora.co.uk>

        Reviewed by Rob.

        http://bugs.webkit.org/show_bug.cgi?id=14060
        Cairo SVG support

        * WebCore.pro: Add new files to the build.
        * platform/graphics/svg/SVGPaintServerPattern.h:
        * platform/graphics/svg/SVGPaintServerSolid.h:
        * platform/graphics/svg/cairo: Added.
        * platform/graphics/svg/cairo/RenderPathCairo.cpp: Added.
        (WebCore::RenderPath::strokeContains):
        (WebCore::RenderPath::strokeBBox):
        * platform/graphics/svg/cairo/SVGPaintServerCairo.cpp: Added.
        (WebCore::SVGPaintServer::draw):
        (WebCore::SVGPaintServer::teardown):
        (WebCore::SVGPaintServer::renderPath):
        * platform/graphics/svg/cairo/SVGPaintServerGradientCairo.cpp: Added.
        (WebCore::SVGPaintServerGradient::setup):
        * platform/graphics/svg/cairo/SVGPaintServerPatternCairo.cpp: Added.
        (WebCore::SVGPaintServerPattern::setup):
        * platform/graphics/svg/cairo/SVGPaintServerSolidCairo.cpp: Added.
        (WebCore::SVGPaintServerSolid::setup):
        * platform/graphics/svg/cairo/SVGResourceClipperCairo.cpp: Added.
        (WebCore::SVGResourceClipper::applyClip):
        * platform/graphics/svg/cairo/SVGResourceMaskerCairo.cpp: Added.
        (WebCore::SVGResourceMasker::applyMask):

2007-06-13  Simon Hausmann  <hausmann@kde.org>

        Reviewed by Lars.

        Added a make install target that installs the Qt port and renamed
        WebKitQt to QtWebKit

        * WebCore.pro:

2007-06-13  Adam Roben  <aroben@apple.com>

        Fix one more BITMAPINFO/BITMAPINFOHEADER typo.

        Rubberstamped by Oliver.

        * platform/win/DragImageWin.cpp:
        (WebCore::allocImage):

2007-06-12  Oliver Hunt  <oliver@apple.com>

        Reviewed by Darin.

        Use correct size for BITMAPINFOHEADER -- whoops.

        * platform/win/CursorWin.cpp:
        (WebCore::Cursor::Cursor):
        * platform/win/PasteboardWin.cpp:
        (WebCore::Pasteboard::writeImage):

2007-06-12  Sam Weinig  <sam@webkit.org>

        Reviewed by Oliver.

        Patch for http://bugs.webkit.org/show_bug.cgi?id=14109
        Cleanup JSEvent and JSClipboard in preperation for autogeneration

        * bindings/js/kjs_events.cpp:
        (KJS::DOMEvent::DOMEvent):
        (KJS::DOMEvent::getValueProperty):
        (KJS::DOMEvent::put):
        (KJS::DOMEvent::putValueProperty):
        (KJS::DOMEventPrototypeFunction::callAsFunction):
        (KJS::toJS):
        (KJS::toEvent):
        (KJS::):
        (KJS::JSClipboard::JSClipboard):
        (KJS::JSClipboard::~JSClipboard):
        (KJS::JSClipboard::getOwnPropertySlot):
        (KJS::JSClipboard::getValueProperty):
        (KJS::JSClipboard::put):
        (KJS::JSClipboard::putValueProperty):
        (KJS::JSClipboardPrototypeFunction::callAsFunction):
        (KJS::toClipboard):
        * bindings/js/kjs_events.h:
        (KJS::DOMEvent::):
        (KJS::DOMEvent::impl):
        (KJS::JSClipboard::impl):
        * dom/ClipboardEvent.h:
        * dom/Event.h:
        (WebCore::Event::srcElement):
        (WebCore::Event::returnValue):
        (WebCore::Event::clipboardData):
        (WebCore::Event::dataTransfer):
        (WebCore::Event::clipboard):
        * dom/MouseEvent.h:

2007-06-13  Lars Knoll <lars@trolltech.com>

        Reviewed by Niko.

        Small cleanup

        * platform/qt/PlugInInfoStoreQt.cpp:
        (WebCore::PlugInInfoStore::supportsMIMEType):

2007-06-13  Lars Knoll <lars@trolltech.com>

        Reviewed by Niko

        Implement the parts required for the JS bridge
        to know about the plugins.

        * WebCore.pro:
        * platform/qt/PlugInInfoStoreQt.cpp: Added.
        (WebCore::PlugInInfoStore::createPluginInfoForPluginAtIndex):
        (WebCore::PlugInInfoStore::pluginCount):
        (WebCore::PlugInInfoStore::supportsMIMEType):
        (WebCore::refreshPlugins):
        * platform/qt/TemporaryLinkStubs.cpp:

=== Merged the following changes from branches/WindowsMerge ===

2007-06-09  Sam Weinig  <sam@webkit.org>

        Build fix.

        * WebCore.vcproj/WebCore.vcproj:

2007-06-08  Anders Carlsson  <andersca@apple.com>

        Reviewed by Adam.

        If both the old and new WMP plugins are present, remove the old one
        so we won't end up choosing it.
        
        * plugins/win/PluginDatabaseWin.cpp:
        (WebCore::PluginDatabaseWin::getPluginsInPaths):

2007-06-08  David Hyatt  <hyatt@apple.com>

        Update licenses/copyrights for WebCoreWin.

        Reviewed by mccullough

        * WebCorePrefix.cpp:
        * bridge/win/FrameWin.cpp:
        * bridge/win/FrameWin.h:
        * bridge/win/HistoryWin.cpp:
        * bridge/win/PageWin.cpp:
        * page/win/EventHandlerWin.cpp:
        * platform/graphics/cg/ColorCG.cpp:
        * platform/graphics/cg/GraphicsContextPlatformPrivate.h:
        * platform/graphics/svg/cg/SVGResourceFilterCg.cpp:
        * platform/graphics/svg/cg/SVGResourceMaskerCg.cpp:
        * platform/graphics/win/IconWin.cpp:
        * platform/graphics/win/ImageWin.cpp:
        * platform/network/cf/FormDataStreamCFNet.cpp:
        * platform/network/cf/FormDataStreamCFNet.h:
        * platform/network/cf/ResourceHandleCFNet.cpp:
        * platform/network/cf/ResourceRequestCFNet.cpp:
        * platform/network/cf/ResourceResponseCFNet.cpp:
        * platform/network/win/CookieJarWin.cpp:
        * platform/network/win/ResourceHandleWin.cpp:
        * platform/network/win/ResourceHandleWin.h:
        * platform/win/BString.cpp:
        * platform/win/BString.h:
        * platform/win/ClipboardWin.h:
        * platform/win/ContextMenuWin.cpp:
        * platform/win/CursorWin.cpp:
        * platform/win/EditorWin.cpp:
        * platform/win/FontCacheWin.cpp:
        * platform/win/FontDataWin.cpp:
        * platform/win/FontPlatformData.h:
        * platform/win/FontPlatformDataWin.cpp:
        * platform/win/FontWin.cpp:
        * platform/win/GlyphPageTreeNodeWin.cpp:
        * platform/win/GraphicsContextWin.cpp:
        * platform/win/KeyEventWin.cpp:
        * platform/win/MimeTypeRegistryWin.cpp:
        * platform/win/NotImplemented.h:
        * platform/win/PlatformMouseEventWin.cpp:
        * platform/win/PlatformScrollBar.h:
        * platform/win/PlatformScrollBarWin.cpp:
        * platform/win/PopupMenuWin.cpp:
        * platform/win/ScreenWin.cpp:
        * platform/win/ScrollViewWin.cpp:
        * platform/win/SearchPopupMenuWin.cpp:
        * platform/win/SoundWin.cpp:
        * platform/win/TemporaryLinkStubs.cpp:
        * platform/win/TextBoundariesWin.cpp:
        * platform/win/WebCoreHistory.cpp:
        * platform/win/WebCoreHistory.h:
        * platform/win/WebCoreSystemInterface.cpp:
        * platform/win/WebCoreSystemInterface.h:
        * platform/win/WheelEventWin.cpp:
        * platform/win/WidgetWin.cpp:
        * plugins/win/PlugInInfoStoreWin.cpp:
        * plugins/win/PluginDatabaseWin.cpp:
        * plugins/win/PluginDatabaseWin.h:
        * plugins/win/PluginDebug.h:
        * plugins/win/PluginPackageWin.cpp:
        * plugins/win/PluginPackageWin.h:
        * plugins/win/PluginStreamWin.cpp:
        * plugins/win/PluginStreamWin.h:
        * plugins/win/PluginViewWin.cpp:
        * plugins/win/PluginViewWin.h:
        * plugins/win/npapi.cpp:
        * plugins/win/npfunctions.h:
        * rendering/RenderThemeSafari.cpp:
        * rendering/RenderThemeSafari.h:
        * rendering/RenderThemeWin.h:

2007-06-07  Sam Weinig  <sam@webkit.org>

        Fix build.

        * WebCore.vcproj/WebCore.vcproj:

2007-06-07  Anders Carlsson  <andersca@apple.com>

        Reviewed by Steve.

        <rdar://problem/5252902>
        Shockwave plug-in content crashes.
        
        Add a new quirk for plug-ins that need their WNDPROCs to be ASCII. If someone uses SetWindowLongA to set the WNDPROC to an ASCII one
        and the previous one was an Unicode one, the value returned from SetWindowLongA (the old WNDPROC) will not be a function pointer, but instead
        a special value. The Win32 API CallWndProc knows that when it encounters a special value it must convert the message to Unicode. Shockwave 
        does not use CallWndProc but instead treats the WNDPROC as a function.
        
        * plugins/win/PluginViewWin.cpp:
        (WebCore::PluginViewWndProc):
        (WebCore::PluginViewWin::determineQuirks):
        (WebCore::PluginViewWin::init):
        * plugins/win/PluginViewWin.h:
        (WebCore::):
        (WebCore::PluginViewWin::quirks):

2007-06-07  Sam Weinig  <sam@webkit.org>

        Build fix for the build fix.

        * WebCore.vcproj/WebCore.vcproj:

2007-06-07  Sam Weinig  <sam@webkit.org>

        Build fix.

        * WebCore.vcproj/WebCore.vcproj:

2007-06-06  Sam Weinig  <sam@webkit.org>

        Build fix.

        * WebCore.vcproj/WebCore.vcproj:

2007-06-03  Steve Falkenburg  <sfalken@apple.com>

        Reviewed by Oliver.

        Update to last fix.
        Invalidate a list of rects rather than unioning them.

        * plugins/win/PluginViewWin.cpp:
        (WebCore::PluginViewWin::invalidateTimerFired):
        (WebCore::PluginViewWin::invalidateRect):
        * plugins/win/PluginViewWin.h:

2007-06-03  Steve Falkenburg  <sfalken@apple.com>

        Reviewed by Oliver.

        <rdar://problem/5245016> 100A89+WebKit.dll: Can't select text in page location field at kids.yahoo.com
        
        Delay invalidates for windowless Flash to prevent Flash WM_PAINT and WM_USER+1 messages from
        starving other HWNDs.
        
        This code defers the invalidate through a WebCore::Timer.  We could have used a Windows ::SetTimer
        to further lessen CPU load, but this would have the additional risk of negatively impacting Flash
        performance, since WebCore::Timer is set up to be more responsive than ::SetTimer.