2007-10-14 Eric Seidel 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 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 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 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 Reviewed by Harrison. GoogleDocs: Deleting cell text in a table row also removes any empty rows beneath the row being edited 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 - fix another float/int conversion * platform/graphics/svg/cg/SVGResourceMaskerCg.mm: (WebCore::SVGResourceMasker::applyMask): Explicitly cast to int. 2007-10-12 Darin Adler 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 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 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 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 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 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 Reviewed by Oliver. Fixes: http://bugs.webkit.org/show_bug.cgi?id=6421 ( textLength attribute is not respected) Fixes: http://bugs.webkit.org/show_bug.cgi?id=6422 ( lengthAdjust attribute is not respected) Implement textLength and full lengthAdjust (both 'spacing' & 'spacingAndGlyphs' mode) for & & friends. 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 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 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 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 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 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 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 Windows build fix after r26109. * WebCore.vcproj/WebCore.vcproj: 2007-10-10 Oliver Hunt 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 Reviewed by Alp. Track changes in r26109 to fix the Gtk+ build. * WebCore.pro: 2007-10-09 Alexey Proskuryakov 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 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 Reviewed by Eric. http://bugs.webkit.org/show_bug.cgi?id=15080 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 . * ksvg2/svg/SVGStyledElement.cpp: (WebCore::SVGStyledElement::childrenChanged): * ksvg2/svg/SVGStyledElement.h: 2007-10-09 Rob Buis 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 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 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 Reviewed by Steve Falkenburg; Fix for 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 * 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 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 Reviewed by Eric. Fix some issues with rotation & baseline-shift, when spanning across 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 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 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 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 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 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 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 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 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 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 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 Reviewed by Oliver Hunt. RenderSVGContainer () 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 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 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 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 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 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 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 Reviewed by Maciej. http://bugs.webkit.org/show_bug.cgi?id=15260 Any styles defined after {:%} style are ignored by Safari Add dummy rule to skip constructions like width: %. * css/CSSGrammar.y: 2007-10-03 Mark Rowe 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 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 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 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 Reviewed by Oliver. - Use Vector 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 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 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 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 Reviewed by Mark. Enable Experimental SVG features by default when building from Xcode * Configurations/WebCore.xcconfig: 2007-10-01 Eric Seidel 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 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 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 Reviewed by Sam Wenig. ASSERT when dragging 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 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 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 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 Reviewed by Oliver. Rework support to take overflow & viewBox into account. Also fix all possible combinations of patternUnits/patternContentUnits, tested by several batik testcases. (Status: , , , , regions work perfectly. 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 Reviewed by Oliver. Fix in userSpaceOnUse coordinates. Verified by new testcase taken from Batik. * ksvg2/svg/SVGMaskElement.cpp: (WebCore::SVGMaskElement::drawMaskerContent): 2007-09-03 Nikolas Zimmermann 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 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 Reviewed by NOBODY (Build fix). Initialise iterators to appease gcc * rendering/SVGInlineTextBox.cpp: (WebCore::SVGInlineTextBox::closestCharacterToPosition): 2007-08-22 Rob Buis 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 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 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 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 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 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 . * ksvg2/svg/SVGUseElement.cpp: (WebCore::SVGUseElement::detach): * ksvg2/svg/SVGUseElement.h: 2007-08-10 Nikolas Zimmermann 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 elements or . 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 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 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 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 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 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 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 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 Reviewed by Sam. Let 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 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 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 is a child of a
. 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 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 Reviewed by Nikolas. http://bugs.webkit.org/show_bug.cgi?id=5996 SVG is unimplemented Implement 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 Reviewed by Rob. Fixes: http://bugs.webkit.org/show_bug.cgi?id=13611 (Crash in setAttributeNS setting href of SVG to nonexistent symbol) Fixes: http://bugs.webkit.org/show_bug.cgi?id=14631 ( doesn't deep-expand elements.) Rework on cases, to not just ignore these cases, but actually proceed and skip 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 on containing . Introduce expandSymbolElementsInShadowTree() concept, just like it's done for on , to deep-replace all elements by , as demanded by the spec. This only worked on on 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 ( on containg ) svg/custom/use-on-disallowed-foreign-object-6.svg ( on containing containing ) svg/custom/use-on-disallowed-foreign-object-7.svg ( on containing containing ) 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 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 Reviewed by Oliver. Fixes: http://bugs.webkit.org/show_bug.cgi?id=5940 ( inside 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 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 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 Reviewed by Sam. Fixes: http://bugs.webkit.org/show_bug.cgi?id=11167. Recognize 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 Reviewed by Maciej. http://bugs.webkit.org/show_bug.cgi?id=14241 SVG 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 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 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 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 Reviewed by Eric & Oliver. Fixes: http://bugs.webkit.org/show_bug.cgi?id=14198 Reeanble . Explicitely disallow on as it may lead to bad problems. While I'm at it disallow 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 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
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 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 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 Reviewed by Niko. Fix the release build. * rendering/SVGRootInlineBox.cpp: (WebCore::applyTextAnchorToTextChunk): 2007-06-15 Rob Buis Reviewed by Eric. http://bugs.webkit.org/show_bug.cgi?id=14051 fails to position correctly when is inside an inline
Leave parent translation to the containers. * rendering/RenderSVGImage.cpp: (WebCore::RenderSVGImage::paint): 2007-06-15 Nikolas Zimmermann 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 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 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 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 Build fix. * rendering/SVGCharacterLayoutInfo.cpp: 2007-06-14 Rob Buis 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 Reviewed by Eric. Fix regression: SVG images drawn in the wrong paint phase. * rendering/RenderSVGImage.cpp: (WebCore::RenderSVGImage::paint): 2007-06-11 Rob Buis 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 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 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 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 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 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 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 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 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 Reviewed by lars. Cursor does not change to hand over links containing 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 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 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 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 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 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 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 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 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 ( does not respect x,y offset lists) Fixes: http://bugs.webkit.org/show_bug.cgi?id=6425 ( 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 ( 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 '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 now) - interact-cursor-01-f.svg (text-anchor correctly handled in 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 / 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) - doesn't yet participate in text selection - 'text-anchor' handling is flawed - 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 (, ..... 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 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 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 Reviewed by Harrison. 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 Reviewed by Maciej. 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 Reviewed by Darin. 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 Switched to using wkGetDefaultHTTPCookieStorage() and removed some cookie-related methods we no longer need in ResourceHandle. "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 Reviewed by Tim Hatcher. Fix for . 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 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 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 Reviewed by Geoff Garen. Fixed 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 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 Reviewed by Steve Falkenburg. Fix for 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 Fix Bug 15305: Crash when dragging an image when "load images automatically" preference is off http://bugs.webkit.org/show_bug.cgi?id=15305 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 Reviewed by Sam Weinig. New fix for 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 Reviewed by Anders. 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 Reviewed by Sam Weinig. Fixed 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 Reviewed by John Sullivan. Fix for 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 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 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 Reviewed by Oliver. Switch to default level of debugging symbols to resolve . 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 Reviewed by Darin. WebCore part of fix for 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 Reviewed by John. * 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 * 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 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 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 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 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 Reviewed by Oliver and Adam. Patch for 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 Reviewed by Darin Adler. 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 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 . * 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 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 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 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 Reviewed by Harrison. 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 Reviewed by Adam. Fix for 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 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 Reviewed by Maciej. - tone down the assertion I asked Harrison to include in his fix for ; 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 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 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 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 Fix 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 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 Reviewed by Darin Adler. 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 Reviewed by Darin. - 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 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 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 Reviewed by Geoff. Fix for 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 Reviewed by Darin. * 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 Reviewed by Brady. Fix for 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 Reviewed by Darin. 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 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 - 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 Reviewed by John Sullivan. - fix REGRESSION (Mail, plain-text only): Nothing happens when you click on rdar://& 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 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 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 Reviewed by Harrison. - fix 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 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 Build fix. * page/Chrome.cpp: (WebCore::PageGroupLoadDeferrer::PageGroupLoadDeferrer): 2007-09-25 Anders Carlsson Reviewed by Geoff. 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 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 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 Reviewed by Darin. Fix for 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 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 Reviewed by Darin. 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 Reviewed by Darin. - fix * 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 Reviewed by Adam. 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 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 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 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 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 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 Fix Bug 15251: REGRESSION: doesn't respond to form.reset() or setting input.value http://bugs.webkit.org/show_bug.cgi?id=15251 Reviewed by Maciej. Test: fast/forms/range-reset.html * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::storesValueSeparateFromAttribute): should be storing its value separately from the value attribute, as do all of our variable-input input types. 2007-09-21 Mark Rowe 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 Reviewed by Sam. Fix for 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 Reviewed by Darin. 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. 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 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 Reviewed by Tristan and Darin http://bugs.webkit.org/show_bug.cgi?id=15239 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 Reviewed by Tristan. Fix for "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 Reviewed by Steve. 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 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 Reviewed by Adam. 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 Reviewed by Darin. 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 * platform/mac/SoftLinking.h: Build fix; added necessary #imports. 2007-09-21 Kevin Decker 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 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 Reviewed by Hyatt. - 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 Reviewed by Dave Hyatt - 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 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 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 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 Remove HTMLOptionElement children against the proper parent node. * html/HTMLSelectElement.cpp: (WebCore::HTMLSelectElement::remove): 2007-09-19 John Sullivan Reviewed by Darin Adler. - WebCore part of speculative fix for , 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 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 Reviewed by Adam. Remove includes that are not needed. * platform/gdk/TemporaryLinkStubs.cpp: 2007-09-18 Holger Hans Peter Freyther 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 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 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 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 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 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 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 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 Reviewed by Geoff Garen. Fix 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 Reviewed by Geoff. 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 Reviewed by Maciej. Fix for -webkit-user-select: none makes selection difficult and for 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 Reviewed by Darin. 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 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 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 Reviewed by Darin. Patch for 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 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 Reviewed by George Staikos. Make 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 Reviewed by Darin. - fix http://bugs.webkit.org/show_bug.cgi?id=15169 Freeze on Google maps using the "Dig a hole" tool 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 Reviewed by Adam. - fix 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 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 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
elements into newlines. * dom/Range.cpp: (WebCore::Range::toString): Changed this to use a Vector instead of a String so it will not have pathological reallocation performance, and removed the
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 Reviewed by Adam and Geoff. 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 Reviewed by Geof, Sam, Adam, Hyatt, Darin. - 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 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 Reviewed, tweaked and landed by Anders. 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 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 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 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 Reviewed by Adam. Corrections missed in previous revision * platform/Cursor.h: * platform/win/CursorWin.cpp: (WebCore::loadCursorByName): 2007-09-12 Oliver Hunt Reviewed by Adam. Fixing Windows doesn't have a standard vertical text cursor 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 Reviewed by Geoff Garen - 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 Reviewed by Tristan. GoogleDocs: A hang occurs when applying list styling to a selection in a 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 Reviewed by Hyatt. Fix for 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 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 Reviewed by Tim Hatcher and Kevin Decker - 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 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 Reviewed by Darin - 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 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 Reviewed by Darin 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 Reviewed by George Staikos. Patch from Mike Fenton to allow custom cursors. * platform/qt/CursorQt.cpp: 2007-09-11 Kevin Decker Reviewed by Oliver Hunt. Fixed: 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 Reviewed by Maciej Fix for - 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 Reviewed by David Harrison. CrashTracer: [USER] 1 crash in Mail at : 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 Reviewed by Maciej. GoogleDocs: A hang occurs when applying list styling to selection that contains a
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
, 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 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 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 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 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 Reviewed by Maciej Stachowiak. - fix http://bugs.webkit.org/show_bug.cgi?id=15157 Image defined in background-position: top center gets unexpectedly truncated 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 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 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 Reviewed by Adele Peterson. - fix http://bugs.webkit.org/show_bug.cgi?id=15156 REGRESSION (r24594-r24668): The bottom of styled 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 Reviewed by Oliver Hunt. - fixed 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 Reviewed by Kevin Decker. 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 Brett Wilson 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 Fix for , 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 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 Reviewed by Maciej and John. 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 Reviewed by Maciej. Fix 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 Reviewed by Simon. Fixed Qt build on Windows * html/HTMLFormElement.cpp: (WebCore::pathGetFilename): 2007-09-03 David Harrison Reviewed by Kevin Decker. 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 Reviewed by Mark. WebKitQt/WebCoreSupport should not be added to INCLUDEPATH for gdk-port * WebCore.pro: 2007-09-03 Mark Rowe Reviewed by Tim Hatcher. 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 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 Reviewed by Antti. 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 - 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 Reviewed by Sam. 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 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 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 Reviewed by Tim Hatcher. Fixed 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 Reviewed by Anders. Fix 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 Reviewed by Mitz. 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 Reviewed by Justin. Fix for 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 Reviewed by Oliver. http://bugs.webkit.org/show_bug.cgi?id=15013 ASSERTION FAILED !m_inDestructor in WebCore::Shared::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 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 Reviewed by Adam. 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 Reviewed by Darin. 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
hello

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
hello

, only don't add an interchange newline when copying ^hello
^
, because then the copied paragraph break will already be represented in the copied markup by a br. (WebCore::createMarkup): 2007-08-30 David Harrison Reviewed by Darin. 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 Reviewed by Dave Hyatt. - fix http://bugs.webkit.org/show_bug.cgi?id=13282 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 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 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 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 Reviewed by Antti. - fix 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 Reviewed by Oliver. 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 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 Reviewed by Adam. 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 Reviewed by Hyatt. Fix for 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 Reviewed by Mitz. Fix 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 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 fixed 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 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 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 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 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 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 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 Reviewed by Darin. 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 Reviewed by Darin. 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 Reviewed by Darin Adler. 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 Reviewed by Darin Adler. 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 Reviewed by Darin. 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 Added getter for committedFirstRealDocumentLoad. Reviewed by Maciej. * loader/FrameLoader.h: Added committedFirstRealDocumentLoad. (WebCore::FrameLoader::committedFirstRealDocumentLoad): Added. 2007-08-27 Antti Koivisto Reviewed by Maciej. Fix 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 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 Reviewed by Darin. - fix http://bugs.webkit.org/show_bug.cgi?id=15091 Crash in RenderBlock::skipWhitespace during layout 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 Reviewed by Darin. Fix for 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 Reviewed by Adele. Fix for 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 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 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 Reviewed by Mitz. Fix for http://bugs.webkit.org/show_bug.cgi?id=15073 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 Reviewed by Sam Weinig. Part 2 of http://bugs.webkit.org/show_bug.cgi?id=14967. Eliminate all remaining implicit conversions of wtf::Vector 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 Rubber-stamped by Adam Roben - remove unused file * platform/win/MouseEventWin.cpp: Removed. 2007-08-25 Jasper Bryant-Greene 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 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 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 Reviewed by Justin. - fix http://bugs.webkit.org/show_bug.cgi?id=14792 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 Reviewed by Darin. 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 Reviewed by Geoff. 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 - Updated ChangeLog 2007-08-24 Beth Dakin Reviewed by Hyatt and Adele. Fix for 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 Reviewed by Darin. 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 Reviewed by Darin. 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 Reviewed by Oliver Fix 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 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 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 Reviewed by Adele. 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 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 to its nearest 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 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 Reviewed by Darin and Oliver. 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 Reviewed by Adam. 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 Reviewed by Adam. 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 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 Fix for 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 - Rolling back since I need to update some layouttests this change breaks. * html/HTMLTextAreaElement.cpp: (WebCore::HTMLTextAreaElement::setValue): 2007-08-21 Kevin McCullough 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. - 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 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 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 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 Build fix for release build. * rendering/AutoTableLayout.cpp: (WebCore::AutoTableLayout::calcEffectiveWidth): (WebCore::AutoTableLayout::layout): 2007-08-21 Mitz Pettel Reviewed by Darin. - fix http://bugs.webkit.org/show_bug.cgi?id=15010 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 Reviewed by Adam Roben WebCore part of fix for: 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 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 Reviewed by Anders. Fixed: 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 Remove workarounds for 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 Reviewed by Adam. 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 Reviewed by Zack. Do not define svg as ImageMIMEType if we can use ksvg2. * platform/MIMETypeRegistry.cpp: (WebCore::initialiseSupportedImageMIMETypes): 2007-08-19 Adam Roben Gtk+ build fix. * platform/gdk/TemporaryLinkStubs.cpp: Removed const. 2007-08-19 Adam Roben Fix 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 Reviewed by Darin. - fixed 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 "" 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 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 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 Reviewed by Hyatt. Fix 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 Code change by Darin, landed and reviewed by me. Fixed: 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 Reviewed by Dave Hyatt. 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 Reviewed by Maciej. http://bugs.webkit.org/show_bug.cgi?id=14189 REPRODUCIBLE CRASH: Canvas createPattern(canvas, ...) crashes on Windows (14189) Ensure that we actually retain the CG pattern correctly. Credit to Henry Mason 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 Build fix. (Maybe?) * loader/Cache.cpp: (WebCore::Cache::pruneLiveResources): (WebCore::Cache::pruneDeadResources): 2007-08-16 Justin Garcia Reviewed by Harrison. 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 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 Reviewed by Tim Hatcher. - fix 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 Reviewed by Maciej. 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 Reviewed by Adele. - fix 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 Reviewed by Maciej. Fix 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 Reviewed by Geoff. 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 Reviewed by Anders. - fix 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 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 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 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 Reviewed by Antti Koivisto. 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 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 Reviewed by Geoff and Oliver. Fix for 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 Reviewed by Maciej. Fix for 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 Reviewed by Darin. http://bugs.webkit.org/show_bug.cgi?id=14967 part 1 - Eliminate most implicit conversions of wtf::Vector 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 Reviewed by Darin, Hyatt. - fix -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 Reviewed by Darin, John, Maciej, Oliver, and Tim - 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 Reviewed by Steve. Build fix for Windows. * html/HTMLFormElement.cpp: 2007-08-14 George Staikos Only connect the menu signal once. * platform/qt/ContextMenuQt.cpp: (WebCore::ContextMenu::ContextMenu): (WebCore::ContextMenu::insertItem): 2007-08-14 Justin Garcia Reviewed by Tim. 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 Reviewed by Darin. Fix 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 Reviewed by Brady and Dr. Harrison. Fix typo. 'whitespace' property is spelled 'white-space'. * page/inspector/inspector.css: 2007-08-13 Beth Dakin Reviewed by Maciej. Fix for 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 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 Reviewed by Darin. http://bugs.webkit.org/show_bug.cgi?id=14951 REGRESSION: page interpreted as UTF-8 because of stray after 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 rs=sam Correct accidentally modified code. * platform/mac/FontDataMac.mm: (WebCore::FontData::platformInit): 2007-08-13 Adele Peterson Reviewed by Brady. Fix for http://bugs.webkit.org/show_bug.cgi?id=14746 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 Reviewed by Maciej. 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 Reviewed by aroben messed up content on calendar.yahoo.com and my.yahoo.com Fix some more bad assumptions about being the first child of the document now that we properly support HTML5's model (where a comment node preceding will in fact be its sibling). * html/HTMLParser.cpp: (WebCore::HTMLParser::handleError): (WebCore::HTMLParser::createHead): 2007-08-13 Justin Garcia Reviewed by Darin. -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 Reviewed by Maciej. 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 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 Reviewed by Darin and Sam. 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 Reviewed by John Sullivan. - fix 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 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 Reviewed by Darin. - fix http://bugs.webkit.org/show_bug.cgi?id=13670 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 Reviewed by Antti. - fix REGRESSION: inside 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 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 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 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 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 Build fix. Change "#ifdef PLATFORM(GDK)" to "#if PLATFORM(GDK)". * page/FrameView.cpp: * page/FrameView.h: 2007-08-11 Holger Hans Peter Freyther 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 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 Reviewed by Darin and Maciej. 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 Reviewed by Adam. 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 Reviewed by Justin. - fix 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 Reviewed by Geoff. REGRESSION: -[WebFrame loadHTMLString:baseURL:] leaks the data source. Revert the fix for 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 Rubber-stamped by Adam Roben. Fix Windows, Qt and Gtk build. * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: 2007-08-09 Sam Weinig Reviewed by Maciej. Fix for 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 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 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 Reviewed by Lars. Recognize .htm as valid extension for text/html. * platform/qt/MIMETypeRegistryQt.cpp: (WebCore::): 2007-08-10 Lars Knoll 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 Fix the Mac build. * ForwardingHeaders/bindings/runtime_object.h: Added. 2007-08-10 Simon Hausmann Reviewed by Lars. Make sure -fno-strict-aliasing is also added for mkspecs like linux-g++-64. * WebCore.pro: 2007-08-10 Simon Hausmann 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 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 Reviewed by Antti. 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 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 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 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 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 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 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 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 Reviewed by Maciej. 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 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 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 Fix by Brady, reviewed by me. Fix for 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 Reviewed by Antti. - fix 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 Reviewed by Geoff Garen. Fx for , http://bugs.webkit.org/ show_bug.cgi?id=14268 REGRESSION: Radio buttons don't stay selected due to unclosed
text"; 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 Reviewed by Maciej and Hyatt. - 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 Reviewed and landed by Brady Fixes Bug 13422: REGRESSION: Page reload loses page position * loader/FrameLoader.cpp: (WebCore::FrameLoader::updateHistoryForReload): 2007-08-08 Holger Hans Peter Freyther 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 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 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 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 Reviewed by Maciej Stachowiak. Based on earlier review from Dave Hyatt. First chunk of work for 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 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 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 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 Some QStyles don't handle negative maximum well (crash) * platform/qt/PlatformScrollBarQt.cpp: (WebCore::PlatformScrollbar::paint): 2007-08-07 Antti Koivisto Reviewed by Hyatt. Fix 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
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 Reviewed by Maciej. Fix for - 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 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 Back out fix for 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 Reviewed by Darin Adler. Touching a file to force a re-build. 2007-08-06 Darin Adler - fix release build * rendering/RenderText.h: (WebCore::RenderText::checkConsistency): Add missing const. 2007-08-06 Darin Adler Reviewed by Maciej. - fix 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 Reviewed by Darin. Fix for REGRESSION: 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 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 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 Reviewed by Steve. 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 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 Reviewed by Antti. 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 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 Reviewed by Steve. Windows build fix, remove superfluous ! * page/EventHandler.cpp: (WebCore::EventHandler::keyEvent): 2007-07-23 Adam Roben 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 Reviewed by Geoff. 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 Reviewed by Oliver. 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 Reviewed by Hyatt. 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 Reviewed by Darin - fixed 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 Reviewed by Darin. WebKit key event behaviour needs to better match other browsers keyevent behaviour REGRESSION (24399-24479): Pressing Enter in a search field at apple.com no longer starts a search with Korean IM 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 Reviewed by Darin. 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
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 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 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 Reviewed by Adam. 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 * platform/ContextMenu.cpp: Added missing include. 2007-07-22 Sam Weinig 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 Reviewed by Adam. - fix 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 Reviewed by Kevin Decker. - fix 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 Reviewed by Anders Carlsson and John Sullivan. - speculative fix for 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 Reviewed by Adam. - fix 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 Reviewed by Anders. - improve the fix for 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 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 Reviewed by Mitz. Patch for 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 Reviewed by Adele and Andersca - 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 Reviewed by Beth Dakin. Fix for 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 Build fix for non-Mac platforms. * bindings/js/GCController.cpp: 2007-07-20 Anders Carlsson 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 Reviewed by Darin. 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 Reviewed by Darin and Adam. Fixed infinite loop in ScrollView::scrollRectIntoViewRecursively(). Also removed an unused local variable. * platform/win/ScrollViewWin.cpp: (WebCore::ScrollView::scrollRectIntoViewRecursively): 2007-07-21 Antti Reviewed by Darin. Fix 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 Reviewed by Darin. Fix for 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 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 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 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 Reviewed by Darin. 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 Reviewed by Darin 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 Reviewed by Oliver. 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 Reviewed by Beth Dakin. Update for fix for http://bugs.webkit.org/show_bug.cgi?id=14646 - 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 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 Reviewed by John Sullivan. - fix for 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 Reviewed by Darin. - fix http://bugs.webkit.org/show_bug.cgi?id=14689 REGRESSION (3.0.2-TOT):