961b65bdc632daf461f2b9ce535c15396a1d1fa6
[WebKit-https.git] / WebCore / ChangeLog
1 2007-10-12  Darin Adler  <darin@apple.com>
2
3         - fix another float/int conversion
4
5         * platform/graphics/svg/cg/SVGResourceMaskerCg.mm:
6         (WebCore::SVGResourceMasker::applyMask): Explicitly cast to int.
7
8 2007-10-12  Darin Adler  <darin@apple.com>
9
10         Reviewed by Oliver Hunt.
11
12         - fix float/int conversions that cause warnings on older versions
13           of gcc (like the version currently being used on the PowerPC
14           buildbot slave)
15
16         * rendering/RenderPath.cpp:
17         (WebCore::RenderPath::paint): Explicitly cast to int.
18         (WebCore::RenderPath::addFocusRingRects): Use enclosingIntRect
19         to convert a FloatRect to an IntRect.
20         * rendering/SVGRootInlineBox.cpp:
21         (WebCore::SVGRootInlineBoxPaintWalker::chunkPortionCallback):
22         Use 0 for the initial value of an int, rather than 0.0f.
23         (WebCore::svgTextStyleForInlineTextBox): Explicitly cast to int.
24         (WebCore::applyTextAnchorToTextChunk): Ditto.
25
26 2007-10-12  Oliver Hunt  <oliver@apple.com>
27
28         Reviewed by Mark.
29
30         Cast zoom factor to int as the original patch did.  This is necessary to appease some versions of gcc.
31
32         * ksvg2/svg/SVGSVGElement.cpp:
33         (WebCore::SVGSVGElement::setCurrentScale):
34
35 2007-10-12  Eric Seidel  <eric@webkit.org>
36
37         Reviewed by Mark Rowe.
38
39         Fix leaks in SVG code from feature-branch.
40
41         * ksvg2/svg/SVGFEDiffuseLightingElement.cpp:
42         (WebCore::SVGFEDiffuseLightingElement::filterEffect):
43         * ksvg2/svg/SVGFEFloodElement.cpp:
44         (WebCore::SVGFEFloodElement::filterEffect):
45         * ksvg2/svg/SVGFESpecularLightingElement.cpp:
46         (WebCore::SVGFESpecularLightingElement::filterEffect):
47         * ksvg2/svg/SVGGradientElement.cpp:
48         (WebCore::SVGGradientElement::buildStops):
49         * ksvg2/svg/SVGStyledElement.cpp:
50         (WebCore::SVGStyledElement::resolveStyle): always refs style
51         * platform/graphics/cg/ImageBufferCG.cpp:
52         (WebCore::ImageBuffer::create): fastFree buffer if CG Context creation fails
53
54 2007-10-12  Mark Rowe  <mrowe@apple.com>
55
56         Windows, Gtk and Qt build fixes.  Add new files to projects.
57
58         * WebCore.pro:
59         * WebCore.vcproj/WebCore.vcproj:
60
61 === Start merge of feature-branch 2007-10-12 ===
62
63 2007-10-11  Oliver Hunt  <oliver@apple.com>
64
65         Reviewed by Sam.
66
67         Bug 15469: feature branch has 100's of implicit double -> float conversions
68
69         Re-enable -Wshorten-64-to-32, and make required code changes to make us build sanely again.
70         
71         * WebCore.xcodeproj/project.pbxproj:
72         * bindings/js/JSSVGMatrixCustom.cpp:
73         (WebCore::JSSVGMatrix::translate):
74         (WebCore::JSSVGMatrix::scale):
75         (WebCore::JSSVGMatrix::scaleNonUniform):
76         (WebCore::JSSVGMatrix::rotate):
77         (WebCore::JSSVGMatrix::skewX):
78         (WebCore::JSSVGMatrix::skewY):
79         * bindings/scripts/CodeGeneratorJS.pm:
80         * bindings/scripts/CodeGeneratorObjC.pm:
81         * ksvg2/css/SVGRenderStyle.cpp:
82         (WebCore::SVGRenderStyle::cssPrimitiveToLength):
83         * ksvg2/css/SVGRenderStyle.h:
84         * ksvg2/svg/SVGAnimateMotionElement.cpp:
85         (WebCore::SVGAnimateMotionElement::parseMappedAttribute):
86         (WebCore::SVGAnimateMotionElement::updateAnimatedValue):
87         (WebCore::parsePoint):
88         (WebCore::SVGAnimateMotionElement::calculateFromAndToValues):
89         * ksvg2/svg/SVGAnimationElement.cpp:
90         (WebCore::SVGAnimationElement::parseKeyNumbers):
91         (WebCore::parseKeySplines):
92         * ksvg2/svg/SVGComponentTransferFunctionElement.cpp:
93         (WebCore::SVGComponentTransferFunctionElement::SVGComponentTransferFunctionElement):
94         (WebCore::SVGComponentTransferFunctionElement::parseMappedAttribute):
95         * ksvg2/svg/SVGFECompositeElement.cpp:
96         (WebCore::SVGFECompositeElement::SVGFECompositeElement):
97         (WebCore::SVGFECompositeElement::parseMappedAttribute):
98         * ksvg2/svg/SVGFEDiffuseLightingElement.cpp:
99         (WebCore::SVGFEDiffuseLightingElement::SVGFEDiffuseLightingElement):
100         (WebCore::SVGFEDiffuseLightingElement::parseMappedAttribute):
101         * ksvg2/svg/SVGFEDisplacementMapElement.cpp:
102         (WebCore::SVGFEDisplacementMapElement::SVGFEDisplacementMapElement):
103         (WebCore::SVGFEDisplacementMapElement::parseMappedAttribute):
104         * ksvg2/svg/SVGFEGaussianBlurElement.cpp:
105         (WebCore::SVGFEGaussianBlurElement::SVGFEGaussianBlurElement):
106         (WebCore::SVGFEGaussianBlurElement::parseMappedAttribute):
107         * ksvg2/svg/SVGFELightElement.cpp:
108         (WebCore::SVGFELightElement::SVGFELightElement):
109         (WebCore::SVGFELightElement::parseMappedAttribute):
110         * ksvg2/svg/SVGFEOffsetElement.cpp:
111         (WebCore::SVGFEOffsetElement::SVGFEOffsetElement):
112         (WebCore::SVGFEOffsetElement::parseMappedAttribute):
113         * ksvg2/svg/SVGFESpecularLightingElement.cpp:
114         (WebCore::SVGFESpecularLightingElement::SVGFESpecularLightingElement):
115         (WebCore::SVGFESpecularLightingElement::parseMappedAttribute):
116         * ksvg2/svg/SVGFETurbulenceElement.cpp:
117         (WebCore::SVGFETurbulenceElement::SVGFETurbulenceElement):
118         (WebCore::SVGFETurbulenceElement::parseMappedAttribute):
119         * ksvg2/svg/SVGFitToViewBox.cpp:
120         (WebCore::SVGFitToViewBox::parseMappedAttribute):
121         * ksvg2/svg/SVGFitToViewBox.h:
122         * ksvg2/svg/SVGLength.cpp:
123         (WebCore::SVGLength::setValueAsString):
124         (WebCore::SVGLength::PercentageOfViewport):
125         * ksvg2/svg/SVGNumber.idl:
126         * ksvg2/svg/SVGNumberList.cpp:
127         (WebCore::SVGNumberList::parse):
128         * ksvg2/svg/SVGNumberList.h:
129         * ksvg2/svg/SVGParserUtilities.cpp:
130         (WebCore::_parseNumber):
131         (WebCore::parseNumber):
132         (WebCore::pointsListFromSVGData):
133         (WebCore::PathBuilder::svgMoveTo):
134         (WebCore::PathBuilder::svgLineTo):
135         (WebCore::PathBuilder::svgCurveToCubic):
136         (WebCore::SVGPathSegListBuilder::svgMoveTo):
137         (WebCore::SVGPathSegListBuilder::svgLineTo):
138         (WebCore::SVGPathSegListBuilder::svgLineToHorizontal):
139         (WebCore::SVGPathSegListBuilder::svgLineToVertical):
140         (WebCore::SVGPathSegListBuilder::svgCurveToCubic):
141         (WebCore::SVGPathSegListBuilder::svgCurveToCubicSmooth):
142         (WebCore::SVGPathSegListBuilder::svgCurveToQuadratic):
143         (WebCore::SVGPathSegListBuilder::svgCurveToQuadraticSmooth):
144         (WebCore::SVGPathSegListBuilder::svgArcTo):
145         * ksvg2/svg/SVGParserUtilities.h:
146         * ksvg2/svg/SVGPathElement.cpp:
147         (WebCore::SVGPathElement::SVGPathElement):
148         * ksvg2/svg/SVGSVGElement.cpp:
149         (WebCore::SVGSVGElement::pixelUnitToMillimeterX):
150         (WebCore::SVGSVGElement::pixelUnitToMillimeterY):
151         * ksvg2/svg/SVGSVGElement.h:
152         * ksvg2/svg/SVGTransformDistance.cpp:
153         (WebCore::SVGTransformDistance::addToSVGTransform):
154         (WebCore::SVGTransformDistance::distance):
155         * ksvg2/svg/SVGTransformDistance.h:
156         * ksvg2/svg/SVGTransformable.cpp:
157         (WebCore::SVGTransformable::parseTransformValue):
158         * ksvg2/svg/SVGViewSpec.cpp:
159         (WebCore::SVGViewSpec::parseViewSpec):
160         * platform/graphics/svg/SVGResourceFilter.cpp:
161         (WebCore::SVGResourceFilter::filterBBoxForItemBBox):
162         * platform/graphics/svg/cg/CgSupport.cpp:
163         (WebCore::applyStrokeStyleToContext):
164         * platform/graphics/svg/cg/SVGPaintServerPatternCg.cpp:
165         (WebCore::SVGPaintServerPattern::setup):
166         * platform/graphics/svg/cg/SVGResourceFilterCg.mm:
167         (WebCore::SVGResourceFilter::applyFilter):
168         * platform/graphics/svg/filters/SVGFEComponentTransfer.h:
169         (WebCore::SVGComponentTransferFunction::SVGComponentTransferFunction):
170         * platform/graphics/svg/filters/SVGFEComposite.cpp:
171         (WebCore::SVGFEComposite::SVGFEComposite):
172         * platform/graphics/svg/filters/SVGFEConvolveMatrix.cpp:
173         (WebCore::SVGFEConvolveMatrix::SVGFEConvolveMatrix):
174         * platform/graphics/svg/filters/SVGFEDiffuseLighting.cpp:
175         (WebCore::SVGFEDiffuseLighting::SVGFEDiffuseLighting):
176         * platform/graphics/svg/filters/SVGFEFlood.cpp:
177         (WebCore::SVGFEFlood::SVGFEFlood):
178         * platform/graphics/svg/filters/SVGFEGaussianBlur.cpp:
179         (WebCore::SVGFEGaussianBlur::SVGFEGaussianBlur):
180         * platform/graphics/svg/filters/SVGFEMorphology.cpp:
181         (WebCore::SVGFEMorphology::SVGFEMorphology):
182         * platform/graphics/svg/filters/SVGFEOffset.cpp:
183         (WebCore::SVGFEOffset::SVGFEOffset):
184         * platform/graphics/svg/filters/SVGFESpecularLighting.cpp:
185         (WebCore::SVGFESpecularLighting::SVGFESpecularLighting):
186         * platform/graphics/svg/filters/SVGFETurbulence.cpp:
187         (WebCore::SVGFETurbulence::SVGFETurbulence):
188         * platform/graphics/svg/filters/cg/SVGFEColorMatrixCg.mm:
189         (WebCore::SVGFEColorMatrix::getCIFilter):
190         * platform/graphics/svg/filters/cg/SVGFEHelpersCg.mm:
191         (WebCore::getVectorForChannel):
192         (WebCore::getLightVectors):
193         * platform/graphics/svg/filters/cg/SVGFEImageCg.mm:
194         (WebCore::SVGFEImage::getCIFilter):
195         * rendering/RenderPath.cpp:
196         (WebCore::RenderPath::drawMarkersIfNeeded):
197         * rendering/RenderSVGImage.cpp:
198         (WebCore::RenderSVGImage::paint):
199         * rendering/RenderSVGInlineText.cpp:
200         (WebCore::RenderSVGInlineText::computeAbsoluteRectForRange):
201         * rendering/RenderSVGRoot.cpp:
202         (WebCore::RenderSVGRoot::applyContentTransforms):
203         (WebCore::RenderSVGRoot::calcViewport):
204         (WebCore::RenderSVGRoot::nodeAtPoint):
205         * rendering/RenderSVGText.cpp:
206         (WebCore::RenderSVGText::absoluteRects):
207         (WebCore::RenderSVGText::relativeBBox):
208         * rendering/RenderSVGTextPath.cpp:
209         * rendering/SVGCharacterLayoutInfo.cpp:
210         (WebCore::calculateBaselineShift):
211         (WebCore::SVGCharacterLayoutInfo::SVGCharacterLayoutInfo):
212         (WebCore::SVGCharacterLayoutInfo::processedChunk):
213         (WebCore::SVGCharacterLayoutInfo::nextPathLayoutPointAndAngle):
214         (WebCore::SVGCharacterLayoutInfo::addLayoutInformation):
215         * rendering/SVGCharacterLayoutInfo.h:
216         * rendering/SVGInlineTextBox.cpp:
217         (WebCore::SVGInlineTextBox::calculateGlyphBoundaries):
218         (WebCore::SVGInlineTextBoxClosestCharacterToPositionWalker::chunkPortionCallback):
219         (WebCore::pathForDecoration):
220         * rendering/SVGRenderTreeAsText.cpp:
221         (WebCore::writeStyle):
222         * rendering/SVGRootInlineBox.cpp:
223         (WebCore::SVGRootInlineBoxPaintWalker::chunkPortionCallback):
224         (WebCore::applyTextAnchorToTextChunk):
225         (WebCore::SVGRootInlineBox::buildLayoutInformation):
226         (WebCore::SVGRootInlineBox::buildLayoutInformationForTextBox):
227
228 2007-10-11  Andrew Wellington  <proton@wiretapped.net>
229
230         Reviewed by Eric Seidel.
231
232         Fix for http://bugs.webkit.org/show_bug.cgi?id=15076
233         "deg2rad has multiple definitions"
234         
235         Use deg2rad, rad2deg, deg2grad, grad2deg, rad2grad, grad2rad
236         from wtf where appropriate.
237         
238         No test cases as this doesn't change behaviour.
239         
240         Change based on original patch by Rob Buis.
241
242         * ksvg2/svg/SVGAngle.cpp:
243         (WebCore::SVGAngle::calculate):
244         (WebCore::SVGAngle::convertToSpecifiedUnits):
245         (WebCore::SVGAngle::todeg):
246         (WebCore::SVGAngle::torad):
247         * platform/graphics/AffineTransform.cpp:
248         (WebCore::AffineTransform::rotateFromVector):
249         (WebCore::AffineTransform::skewX):
250         (WebCore::AffineTransform::skewY):
251         * platform/graphics/cg/AffineTransformCG.cpp:
252         (WebCore::AffineTransform::rotate):
253         * platform/graphics/svg/filters/cg/SVGFEColorMatrixCg.mm:
254         * platform/graphics/svg/filters/cg/SVGFEHelpersCg.h:
255         * platform/graphics/svg/filters/cg/SVGFEHelpersCg.mm:
256         * rendering/RenderPath.cpp:
257         (WebCore::drawMarkerWithData):
258
259 2007-10-11  Nikolas Zimmermann  <zimmermann@kde.org>
260
261         Reviewed by Oliver.
262
263         Fixes: http://bugs.webkit.org/show_bug.cgi?id=6421 (<text> textLength attribute is not respected)
264         Fixes: http://bugs.webkit.org/show_bug.cgi?id=6422 (<text> lengthAdjust attribute is not respected)
265
266         Implement textLength and full lengthAdjust (both 'spacing' & 'spacingAndGlyphs' mode)
267         for <text> & <tspan> & friends. <textPath> is still todo, as it's special.
268
269         Also fix usage of cummulatedGlyphWidth/Height in SVGInlineTextBox, calculateGlyphBoundaries was
270         supposed to be used in the distance calculations, to take per character transformations into account (ie. rotation).
271
272         Fixes: svg/W3C-SVG-1.1/text-text-01-b.svg (complelty fixed the single W3C textLength testcase)
273         Partly fixed: svg/batik/text/textOnPathSpaces.svg (kerning support missing)
274         Partly fixed: svg/batik/text/textLayout.svg (word-letter spacing & textLength is todo)
275
276         * ksvg2/svg/SVGTextContentElement.cpp:
277         (WebCore::SVGTextContentElement::SVGTextContentElement):
278         (WebCore::SVGTextContentElement::parseMappedAttribute):
279         * rendering/SVGCharacterLayoutInfo.cpp:
280         (WebCore::SVGCharacterLayoutInfo::nextPathLayoutPointAndAngle):
281         * rendering/SVGCharacterLayoutInfo.h:
282         (WebCore::SVGTextChunk::SVGTextChunk):
283         (WebCore::SVGTextChunkWalker::operator()):
284         * rendering/SVGInlineTextBox.cpp:
285         (WebCore::SVGInlineTextBoxClosestCharacterToPositionWalker::chunkPortionCallback):
286         (WebCore::SVGInlineTextBoxSelectionRectWalker::chunkPortionCallback):
287         (WebCore::SVGInlineTextBox::svgCharacterHitsPosition):
288         * rendering/SVGRootInlineBox.cpp:
289         (WebCore::SVGRootInlineBoxPaintWalker::chunkPortionCallback):
290         (WebCore::cummulatedWidthOrHeightOfTextChunk):
291         (WebCore::cummulatedWidthOfTextChunk):
292         (WebCore::cummulatedHeightOfTextChunk):
293         (WebCore::applyTextAnchorToTextChunk):
294         (WebCore::applyTextLengthCorrectionToTextChunk):
295         (WebCore::SVGRootInlineBox::buildLayoutInformationForTextBox):
296         (WebCore::SVGRootInlineBox::buildTextChunks):
297         (WebCore::SVGRootInlineBox::layoutTextChunks):
298         (WebCore::SVGRootInlineBox::walkTextChunks):
299
300 2007-10-11  Oliver Hunt  <oliver@apple.com>
301
302         Reviewed by Niko.
303
304         Fix for Bug 15468: Parsing of numbers and lists is too lenient in SVG
305
306         Correct parsing of numbers, number lists, and length lists in SVG.
307
308         * ksvg2/svg/SVGLength.cpp:
309         (WebCore::SVGLength::setValueAsString):
310         * ksvg2/svg/SVGLength.h:
311         * ksvg2/svg/SVGLengthList.cpp:
312         (WebCore::SVGLengthList::parse):
313         * ksvg2/svg/SVGParserUtilities.cpp:
314         (WebCore::parseNumber):
315
316 2007-10-11  Allan Sandfeld Jensen  <sandfeld@kde.org>
317  
318          Reviewed by Maciej and Eric.
319  
320          Implement CSS selector combinators nondeterministic matching. 
321          Fixes http://bugs.webkit.org/show_bug.cgi?id=3428
322  
323          * css/CSSStyleSelector.cpp:
324          (WebCore::CSSStyleSelector::matchRulesForList):
325          (WebCore::CSSStyleSelector::checkSelector): Split the function and make the second part recursive
326          (WebCore::CSSStyleSelector::checkOneSelector): Handle pseodo-elements rules and hoveractive quirks 
327          here instead of in checkSelector.
328          * css/CSSStyleSelector.h:
329  
330 2007-10-10  Eric Seidel  <eric@webkit.org>
331
332         Reviewed by Nikolas Zimmermann.
333         
334         Fix the SVG dom so that rect.x.baseVal = rect.x.baseVal like it should.
335         http://bugs.webkit.org/show_bug.cgi?id=14150
336
337         Test: svg/dom/animated-tearoff-equlity.xhtml
338
339         * ksvg2/svg/SVGAnimatedTemplate.h:
340         (WebCore::SVGAnimatedTypeWrapperKey::SVGAnimatedTypeWrapperKey):
341         (WebCore::SVGAnimatedTypeWrapperKey::operator==):
342         (WebCore::SVGAnimatedTypeWrapperKeyHash::hash):
343         (WebCore::SVGAnimatedTypeWrapperKeyHash::equal):
344         (WebCore::SVGAnimatedTypeWrapperKeyHashTraits::deletedValue):
345         (WebCore::SVGAnimatedTypeWrapperKeyHashTraits::emptyValue):
346         (WebCore::SVGAnimatedTemplate::~SVGAnimatedTemplate):
347         (WebCore::SVGAnimatedTemplate::wrapperCache):
348         (WebCore::SVGAnimatedTemplate::forgetWrapper):
349         (WebCore::lookupOrCreateWrapper):
350         * ksvg2/svg/SVGElement.h:
351
352 2007-10-10  Oliver Hunt  <oliver@apple.com>
353
354         Reviewed by Maciej.
355
356         Leopard build fix -- SVGDocument should not trty to make read/write properties read-only
357
358         Remove those API definitions SVGDocument now inherits from Document
359
360         * ksvg2/svg/SVGDocument.idl:
361
362 2007-10-10  Eric Seidel  <eric@webkit.org>
363
364         Reviewed by Oliver.
365
366         Make renderers pull localTransform instead of depending on DOM elements to push
367         This allows for cleaner invalidation code, and makes writing animation easier.
368         Also fixed a tiny bug in SVGRenderImage focus ring calculations while there
369         
370         Updated test results for svg/custom/focus-ring.svg
371
372         * WebCore.xcodeproj/project.pbxproj:
373         * ksvg2/svg/SVGAElement.cpp:
374         (WebCore::SVGAElement::createRenderer):
375         * ksvg2/svg/SVGAnimateMotionElement.cpp:
376         (WebCore::SVGAnimateMotionElement::applyAnimatedValueToElement):
377         * ksvg2/svg/SVGAnimateTransformElement.cpp:
378         (WebCore::SVGAnimateTransformElement::applyAnimatedValueToElement):
379         * ksvg2/svg/SVGClipPathElement.cpp:
380         (WebCore::SVGClipPathElement::canvasResource):
381         * ksvg2/svg/SVGElement.h:
382         * ksvg2/svg/SVGGElement.cpp:
383         (WebCore::SVGGElement::createRenderer):
384         * ksvg2/svg/SVGImageElement.cpp:
385         * ksvg2/svg/SVGLocatable.cpp:
386         (WebCore::SVGLocatable::getCTM):
387         (WebCore::SVGLocatable::getScreenCTM):
388         * ksvg2/svg/SVGMarkerElement.cpp:
389         (WebCore::SVGMarkerElement::canvasResource):
390         (WebCore::SVGMarkerElement::notifyAttributeChange):
391         * ksvg2/svg/SVGSVGElement.h:
392         * ksvg2/svg/SVGStyledElement.cpp:
393         (WebCore::SVGStyledElement::rendererIsNeeded):
394         (WebCore::SVGStyledElement::notifyResourceParentIfExistant):
395         * ksvg2/svg/SVGStyledElement.h:
396         (WebCore::SVGStyledElement::style):
397         * ksvg2/svg/SVGStyledTransformableElement.cpp:
398         (WebCore::SVGStyledTransformableElement::animatedLocalTransform):
399         (WebCore::SVGStyledTransformableElement::parseMappedAttribute):
400         (WebCore::SVGStyledTransformableElement::notifyAttributeChange):
401         (WebCore::SVGStyledTransformableElement::createRenderer):
402         * ksvg2/svg/SVGStyledTransformableElement.h:
403         (WebCore::SVGStyledTransformableElement::toPathData):
404         * ksvg2/svg/SVGSwitchElement.cpp:
405         (WebCore::SVGSwitchElement::createRenderer):
406         * ksvg2/svg/SVGTRefElement.cpp:
407         (WebCore::SVGTRefElement::updateReferencedText):
408         * ksvg2/svg/SVGTextElement.cpp:
409         (WebCore::SVGTextElement::parseMappedAttribute):
410         (WebCore::SVGTextElement::animatedLocalTransform):
411         * ksvg2/svg/SVGTextElement.h:
412         * ksvg2/svg/SVGTextPathElement.cpp:
413         * ksvg2/svg/SVGTextPathElement.h:
414         * ksvg2/svg/SVGTransformable.cpp:
415         (WebCore::SVGTransformable::getCTM):
416         (WebCore::SVGTransformable::getScreenCTM):
417         * ksvg2/svg/SVGTransformable.h:
418         * ksvg2/svg/SVGUseElement.cpp:
419         (WebCore::SVGUseElement::createRenderer):
420         (WebCore::SVGUseElement::attachShadowTree):
421         * platform/graphics/AffineTransform.h:
422         (WebCore::AffineTransform::operator!=):
423         * platform/graphics/svg/SVGResourceMarker.cpp:
424         (WebCore::SVGResourceMarker::setMarker):
425         * platform/graphics/svg/SVGResourceMarker.h:
426         * rendering/RenderForeignObject.cpp:
427         (WebCore::RenderForeignObject::calculateLocalTransform):
428         (WebCore::RenderForeignObject::layout):
429         * rendering/RenderForeignObject.h:
430         (WebCore::RenderForeignObject::localTransform):
431         * rendering/RenderObject.cpp:
432         * rendering/RenderObject.h:
433         * rendering/RenderPath.cpp:
434         (WebCore::RenderPath::RenderPath):
435         (WebCore::RenderPath::localTransform):
436         (WebCore::RenderPath::calculateLocalTransform):
437         (WebCore::RenderPath::layout):
438         * rendering/RenderPath.h:
439         * rendering/RenderSVGContainer.cpp:
440         (WebCore::RenderSVGContainer::localTransform):
441         (WebCore::RenderSVGContainer::calculateLocalTransform):
442         (WebCore::RenderSVGContainer::layout):
443         * rendering/RenderSVGContainer.h:
444         * rendering/RenderSVGImage.h:
445         (WebCore::RenderSVGImage::localTransform):
446         * rendering/RenderSVGText.cpp:
447         (WebCore::RenderSVGText::calculateLocalTransform):
448         (WebCore::RenderSVGText::layout):
449         * rendering/RenderSVGText.h:
450         (WebCore::RenderSVGText::isSVGText):
451         (WebCore::RenderSVGText::localTransform):
452         * rendering/RenderSVGTextPath.cpp:
453         (WebCore::RenderSVGTextPath::layoutPath):
454         (WebCore::RenderSVGTextPath::startOffset):
455         (WebCore::RenderSVGTextPath::exactAlignment):
456         (WebCore::RenderSVGTextPath::stretchMethod):
457         * rendering/RenderSVGTextPath.h:
458         * rendering/RenderSVGTransformableContainer.cpp: Added.
459         (WebCore::RenderSVGTransformableContainer::RenderSVGTransformableContainer):
460         (WebCore::RenderSVGTransformableContainer::calculateLocalTransform):
461         * rendering/RenderSVGTransformableContainer.h: Added.
462         * rendering/RenderSVGViewportContainer.h:
463
464 2007-10-10  Oliver Hunt  <oliver@apple.com>
465
466         Reviewed by Eric.
467
468         Bug 15451: SVGStyledElement must unregister itself from Resources on detach
469         
470         Use a global hashtable to maintain the relationship between the
471         various SVG resources and their clients, across dom updates, etc.
472
473         * ksvg2/svg/SVGStyledElement.cpp:
474         (WebCore::SVGStyledElement::detach):
475         * ksvg2/svg/SVGStyledElement.h:
476         * platform/graphics/svg/SVGPaintServer.h:
477         * platform/graphics/svg/SVGResource.cpp:
478         (WebCore::ResourceSet::ResourceSet):
479         (WebCore::clientMap):
480         (WebCore::SVGResource::~SVGResource):
481         (WebCore::SVGResource::invalidate):
482         (WebCore::SVGResource::removeClient):
483         (WebCore::SVGResource::addClient):
484         * platform/graphics/svg/SVGResource.h:
485         (WebCore::):
486         (WebCore::SVGResource::isPaintServer):
487         (WebCore::SVGResource::isFilter):
488         (WebCore::SVGResource::isClipper):
489         (WebCore::SVGResource::isMarker):
490         (WebCore::SVGResource::isMasker):
491         * platform/graphics/svg/SVGResourceClipper.h:
492         (WebCore::SVGResourceClipper::resourceType):
493         * platform/graphics/svg/SVGResourceFilter.h:
494         * platform/graphics/svg/SVGResourceMarker.h:
495         * platform/graphics/svg/SVGResourceMasker.h:
496
497 2007-10-10  Mark Rowe  <mrowe@apple.com>
498
499         Windows build fix after r26109.
500
501         * WebCore.vcproj/WebCore.vcproj:
502
503 2007-10-10  Oliver Hunt  <oliver@apple.com>
504
505         Reviewed by Eric.
506
507         Fix Bug 15433: Filters do not repaint when base resources change/update
508
509         SVGFEImage now actually responds to image updates, and triggers a repaint.
510
511         * platform/graphics/svg/SVGResource.h:
512         * platform/graphics/svg/filters/SVGFEImage.cpp:
513         (WebCore::SVGFEImage::setCachedImage):
514           Don't re-set the image lest we want to trigger infinite recursion.
515         (WebCore::SVGFEImage::imageChanged):
516           Image change means we need to tell our clients to repaint
517         * platform/graphics/svg/filters/SVGFEImage.h:
518         * rendering/SVGRenderSupport.cpp:
519         (WebCore::prepareToRenderSVGContent):
520           make sure that users of filters are registered.
521
522 2007-10-09  Eric Seidel  <eric@webkit.org>
523
524         Reviewed by Alp.
525
526         Track changes in r26109 to fix the Gtk+ build.
527
528         * WebCore.pro:
529
530 2007-10-09  Alexey Proskuryakov  <ap@webkit.org>
531
532         Reviewed by Anders.
533
534         http://bugs.webkit.org/show_bug.cgi?id=15436
535         Wrong node order for XPath reverse axes
536
537         Test: fast/xpath/reverse-axes.html
538
539         * xml/XPathStep.cpp:
540         (WebCore::XPath::Step::nodesInAxis): Do not prematurely sort reverse
541         axes. Generate preceding axis nodes in reversed document order.
542
543 2007-10-09  Alexey Proskuryakov  <ap@webkit.org>
544
545         Reviewed by Mitz.
546
547         http://bugs.webkit.org/show_bug.cgi?id=15437
548         XPath substring-after function is broken
549
550         Test: fast/xpath/substring-after.html
551
552         * xml/XPathFunctions.cpp:
553         (WebCore::XPath::FunSubstringAfter::evaluate): Fix it for real this time, hopefully.
554
555 2007-10-09  Rob Buis  <buis@kde.org>
556
557         Reviewed by Eric.
558
559         http://bugs.webkit.org/show_bug.cgi?id=15080
560         <use> element not refresh after adding objects by script in referrer
561
562         Update shadow tree when elements are added/removed from a tree
563         that is referenced by a <use>.
564
565         * ksvg2/svg/SVGStyledElement.cpp:
566         (WebCore::SVGStyledElement::childrenChanged):
567         * ksvg2/svg/SVGStyledElement.h:
568
569 2007-10-09  Rob Buis  <buis@kde.org>
570
571         Reviewed by Maciej.
572
573         http://bugs.webkit.org/show_bug.cgi?id=15088
574         HTMLOptionElement.selected returns false when parent HTMLSelectElement is "display: none" until parent's .selectedIndex is accessed
575
576         Make sure the list items are up to date when there is no renderer.
577
578         * html/HTMLSelectElement.cpp:
579         (WebCore::HTMLSelectElement::recalcStyle):
580
581 2007-10-08  Eric Seidel  <eric@webkit.org>
582
583         Reviewed by Oliver.
584
585         Build fix.  Fix circular build rule for CSS*.in files evident on clean build.
586
587         * DerivedSources.make:
588         * WebCore.xcodeproj/project.pbxproj:
589         * ksvg2/css/CSSPropertyNames.in: Removed.
590         * ksvg2/css/CSSValueKeywords.in: Removed.
591         * ksvg2/css/SVGCSSPropertyNames.in: Copied from ksvg2/css/CSSPropertyNames.in.
592         * ksvg2/css/SVGCSSValueKeywords.in: Copied from ksvg2/css/CSSValueKeywords.in.
593
594 2007-10-08  Eric Seidel  <eric@webkit.org>
595
596         Reviewed by hyatt.
597
598         Implement getComputedStyle support for SVG CSS values
599         http://bugs.webkit.org/show_bug.cgi?id=15422
600         
601         This also unifies SVG and non-SVG CSS hash lookups. A unified hash
602         solves correctness problems as well as offers improved speed.
603         
604         Test: svg/css/getComputedStyle-basic.xhtml
605
606         * DerivedSources.make: unify SVG and non-SVG CSS hash files
607         * WebCore.xcodeproj/project.pbxproj: remove old SVG CSS hash files
608         * css/CSSComputedStyleDeclaration.cpp:
609         (WebCore::):
610         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): call getPropertyCSSValue
611         * css/CSSComputedStyleDeclaration.h: add getPropertyCSSValue
612         * css/CSSGrammar.y:
613         * css/CSSParser.cpp:
614         (WebCore::CSSParser::parseValue):
615         * css/CSSStyleDeclaration.cpp:
616         (WebCore::propertyID):
617         * css/CSSStyleSelector.cpp:
618         (WebCore::CSSStyleSelector::applyProperty):
619         * ksvg2/css/CSSPropertyNames.in: remove font-size-adjust
620         * ksvg2/css/SVGCSSComputedStyleDeclaration.cpp: Added.
621         (WebCore::CSSComputedStyleDeclaration::getSVGPropertyCSSValue): added.
622         * ksvg2/css/SVGCSSParser.cpp:
623         (WebCore::CSSParser::parseSVGValue):
624         * ksvg2/css/SVGCSSStyleSelector.cpp:
625         (WebCore::CSSStyleSelector::applySVGProperty):
626         * ksvg2/scripts/cssmakeprops: Removed.
627         * ksvg2/scripts/cssmakevalues: Removed.
628         * ksvg2/svg/SVGAnimationElement.cpp:
629         * ksvg2/svg/SVGStyledElement.cpp:
630         (WebCore::mapAttributeToCSSProperty):
631         (WebCore::SVGStyledElement::cssPropertyIdForSVGAttributeName): remove font-size-adjust
632
633 2007-10-08  Sam Weinig  <sam@webkit.org>
634
635         Reviewed by Steve Falkenburg;
636
637         Fix for <rdar://problem/5519698> CrashTracer: [USER] 47 crashes in Safari at com.apple.WebCore: WebCore::XMLTokenizer::lineNumber const + 9
638
639         Test: fast/innerHTML/innerHTML-script-tag-crash.xhtml
640
641         * dom/XMLTokenizer.cpp:
642         (WebCore::XMLTokenizer::lineNumber): Return 1 when there is no context.
643         (WebCore::XMLTokenizer::columnNumber): ditto.
644
645 2007-10-08  Alexey Proskuryakov  <ap@webkit.org>
646
647         * platform/mac/FontPlatformDataMac.mm:
648         (WebCore::FontPlatformData::setFont): Restored one of the -1 checks removed in
649         the previous change - we do need to check m_font!
650
651 2007-10-08  Alexey Proskuryakov  <ap@webkit.org>
652
653         Reviewed by Darin.
654
655         http://bugs.webkit.org/show_bug.cgi?id=15397
656         Layout tests freeze in HashTable::lookup
657
658         Fixes a DRT freeze on PowerPC.
659
660         * platform/mac/FontPlatformDataMac.mm:
661         (WebCore::FontPlatformData::FontPlatformData): Don't ask for a size of a nil font,
662         the result is undefined.
663         (WebCore::FontPlatformData::setFont): Ditto. Also removed some checks for -1 that
664         were not sufficient, and thus likely unnecessary,
665
666 2007-10-07  Nikolas Zimmermann  <zimmermann@kde.org>
667
668         Reviewed by Eric.
669
670         Fix some issues with rotation & baseline-shift, when spanning
671         across <tspan> elements. Highlighted by the existing batik tests.
672
673         * rendering/SVGCharacterLayoutInfo.cpp:
674         (WebCore::SVGCharacterLayoutInfo::SVGCharacterLayoutInfo):
675         (WebCore::SVGCharacterLayoutInfo::processedChunk):
676         (WebCore::SVGChar::characterTransform):
677         * rendering/SVGCharacterLayoutInfo.h:
678         * rendering/SVGInlineTextBox.cpp:
679         (WebCore::SVGInlineTextBox::calculateGlyphBoundaries):
680         (WebCore::SVGInlineTextBox::paintCharacters):
681         (WebCore::SVGInlineTextBox::paintDecoration):
682         * rendering/SVGRootInlineBox.cpp:
683         (WebCore::SVGRootInlineBox::buildLayoutInformationForTextBox):
684
685 2007-10-07  Mark Rowe  <mrowe@apple.com>
686
687         Reviewed by Maciej.
688
689         Bug 5122: Need an equivalent of Mozilla's DOMContentLoaded event
690         http://bugs.webkit.org/show_bug.cgi?id=5122
691
692         This is based on a patch by Daniel Peebles (pumpkingod@gmail.com).
693
694         Test: http/tests/loading/DOMContentLoaded-event.html
695
696         * dom/Document.cpp:
697         (WebCore::Document::finishedParsing): Dispatch the DOMContentLoaded event when parsing completes.
698         * dom/EventNames.h:  Add DOMContentLoaded to the list of events.
699
700 2007-10-07  Alexey Proskuryakov  <ap@webkit.org>
701
702         Reviewed by Eric Seidel.
703
704         http://bugs.webkit.org/show_bug.cgi?id=15368
705         xsl:import fails when preceded by comment
706
707         Test: fast/xsl/import-after-comment.xml
708
709         * xml/XSLStyleSheet.cpp:
710         (WebCore::XSLStyleSheet::loadChildSheets): It's OK for xsl:import to be preceded by
711         non-element nodes.
712
713 2007-10-07  Vincent Ricard  <magic@magicninja.org>
714
715         Reviewed by Maciej.  Landed by eseidel.
716
717         http://bugs.webkit.org/show_bug.cgi?id=15062
718         Implement document.compatMode
719
720         Tests: fast/dom/compatMode-AlmostStrict.html
721                fast/dom/compatMode-Compat.html
722                fast/dom/compatMode-Strict.html
723
724         * html/HTMLDocument.cpp:
725         (WebCore::HTMLDocument::compatMode):
726         * html/HTMLDocument.h:
727         * html/HTMLDocument.idl:
728
729 2007-10-07  Sam Weinig  <sam@webkit.org>
730
731         Reviewed by Darin & Nikolas.  Landed by eseidel.
732
733         Patch for http://bugs.webkit.org/show_bug.cgi?id=14455
734         Autogenerate the JS bindings for the StyleSheetList
735
736         * DerivedSources.make:
737         * WebCore.pro:
738         * WebCore.vcproj/WebCore.vcproj:
739         * WebCore.xcodeproj/project.pbxproj:
740         * bindings/js/JSStyleSheetListCustom.cpp: Added.
741         (WebCore::JSStyleSheetList::canGetItemsForName):
742         (WebCore::JSStyleSheetList::nameGetter):
743         * bindings/js/kjs_css.cpp:
744         * bindings/js/kjs_css.h:
745         * bindings/objc/DOMUtility.mm:
746         * bindings/scripts/CodeGeneratorJS.pm:
747         * css/StyleSheetList.cpp:
748         (WebCore::StyleSheetList::StyleSheetList):
749         (WebCore::StyleSheetList::documentDestroyed):
750         (WebCore::StyleSheetList::getNamedItem):
751         * css/StyleSheetList.h: Add Document member variable and
752         getNamedItem function to accommodate the odd javascript 
753         name getter functionality.
754         * css/StyleSheetList.idl:
755         * dom/Document.cpp:
756         (WebCore::Document::Document):
757         (WebCore::Document::~Document):
758         * page/DOMWindow.idl: Add StyleSheetListConstructor
759
760 2007-10-07  Lars Naesbye Christensen  <lars@naesbye.dk>
761
762         Reviewed by Eric Seidel.
763
764         make CSS cell cursor more mac-like
765         http://bugs.webkit.org/show_bug.cgi?id=15325
766
767         * Resources/cellCursor.png:
768
769 2007-10-06  Eric Seidel  <eric@webkit.org>
770
771         Reviewed by Oliver.
772         
773         SVG does not correctly handle onfocusin, onfocusout or onactivate
774         http://bugs.webkit.org/show_bug.cgi?id=12573
775
776         Test: svg/W3C-SVG-1.1/script-handle-02-b.svg
777
778         * ksvg2/svg/SVGElement.cpp:
779         (WebCore::SVGElement::parseMappedAttribute):
780         * ksvg2/svg/svgattrs.in: add onfocusin, onfocusout and onactivate
781
782 2007-10-06  Nikolas Zimmermann  <zimmermann@kde.org>
783
784         Reviewed by Oliver.
785
786         Never pass null input images to CICrop filter.
787
788         * platform/graphics/svg/filters/cg/SVGFEComponentTransferCg.mm:
789         (WebCore::SVGFEComponentTransfer::getCIFilter):
790         * platform/graphics/svg/filters/cg/SVGFEHelpersCg.h:
791
792 2007-10-06  Mark Rowe  <mrowe@apple.com>
793
794         Reviewed by Alp Toker.
795
796         Gtk+ build fix and minor code cleanup.
797
798         * WebCore.pro:
799         * platform/gtk/FontCacheGtk.cpp:
800         (WebCore::FontCache::getLastResortFallbackFont):
801         (WebCore::FontCache::fontExists):
802
803 2007-10-06  Alexey Proskuryakov  <ap@webkit.org>
804
805         Reviewed by Mitz.
806
807         http://bugs.webkit.org/show_bug.cgi?id=15380
808         XPath: id('foo') doesn't resolve correctly
809
810         Test: fast/xpath/id-simple.html
811
812         * xml/XPathFunctions.cpp:
813         (WebCore::XPath::FunId::evaluate): Fixed a logic error in id() parameter parsing.
814
815 2007-10-06  Alexey Proskuryakov  <ap@webkit.org>
816
817         Reviewed by Darin.
818
819         Patch for http://bugs.webkit.org/show_bug.cgi?id=13707
820         REGRESSION: JavaScript exceptions on quotes.burntelectrons.org
821
822         http://bugs.webkit.org/show_bug.cgi?id=12628
823         document.body is not supported in XHTML documents
824
825         http://bugs.webkit.org/show_bug.cgi?id=14213
826         On page with MIME type application/xhtml+xml, cookie don't work
827
828         Moved a bunch of methods and properties from HTMLDocument down into Document to make
829         them available for all documents (xml, svg).
830         What was kept in HTMLDocument:
831         - some methods and properties that are not in HTML5 (yet?);
832         - open/write/writeln/close, as they will need to be modified to work on XML documents, and aren't
833         of much use for those anyway;
834         - designMode, because its definition in HTML5 is incompatible with our implementation.
835
836         Covered by existing tests.
837
838         * bindings/js/JSDocumentCustom.cpp:
839         (WebCore::JSDocument::location):
840         (WebCore::JSDocument::setLocation):
841         * bindings/js/JSHTMLDocumentCustom.cpp:
842         * bindings/objc/PublicDOMInterfaces.h:
843         * dom/Document.cpp:
844         (WebCore::Document::setBody):
845         (WebCore::Document::cookie):
846         (WebCore::Document::setCookie):
847         (WebCore::Document::lastModified):
848         * dom/Document.h:
849         (WebCore::Document::title):
850         * dom/Document.idl:
851         * html/HTMLDocument.cpp:
852         * html/HTMLDocument.h:
853         * html/HTMLDocument.idl:
854
855 2007-10-06  Eric Seidel  <eric@webkit.org>
856
857         Reviewed by Oliver Hunt.
858
859         RenderSVGContainer (<g>) should not repaint when its bounds change (unless it has a filter)
860         http://bugs.webkit.org/show_bug.cgi?id=15388
861         This makes the Sun Lively Kernel invalidate only what it should!
862         
863         No tests possible in DRT.
864
865         * ksvg2/svg/SVGCircleElement.cpp:
866         (WebCore::SVGCircleElement::notifyAttributeChange): replace call to rebuildRenderer
867         * ksvg2/svg/SVGEllipseElement.cpp:
868         (WebCore::SVGEllipseElement::notifyAttributeChange): replace call to rebuildRenderer
869         * ksvg2/svg/SVGImageElement.cpp:
870         (WebCore::SVGImageElement::notifyAttributeChange): replace call to rebuildRenderer
871         (WebCore::SVGImageElement::hasRelativeValues): implemented
872         * ksvg2/svg/SVGImageElement.h:
873         * ksvg2/svg/SVGLineElement.cpp:
874         (WebCore::SVGLineElement::notifyAttributeChange): replace call to rebuildRenderer
875         * ksvg2/svg/SVGPathElement.cpp:
876         (WebCore::SVGPathElement::notifyAttributeChange): replace call to rebuildRenderer
877         * ksvg2/svg/SVGPolyElement.cpp:
878         (WebCore::SVGPolyElement::notifyAttributeChange): replace call to rebuildRenderer
879         * ksvg2/svg/SVGRectElement.cpp:
880         (WebCore::SVGRectElement::notifyAttributeChange): replace call to rebuildRenderer
881         * ksvg2/svg/SVGStyledElement.cpp:
882         * ksvg2/svg/SVGStyledElement.h:
883         (WebCore::SVGStyledElement::hasRelativeValues): default to true instead
884         * ksvg2/svg/SVGStyledTransformableElement.cpp:
885         (WebCore::SVGStyledTransformableElement::updateLocalTransform): don't layout if no change
886         * ksvg2/svg/SVGStyledTransformableElement.h:
887         * ksvg2/svg/SVGTransform.h:
888         * rendering/RenderPath.cpp:
889         (WebCore::RenderPath::layout):
890         * rendering/RenderPath.h:
891         * rendering/RenderSVGContainer.cpp:
892         (WebCore::RenderSVGContainer::layout):
893         (WebCore::RenderSVGContainer::selfWillPaint): return true if have a filter
894         (WebCore::RenderSVGContainer::paint):
895         * rendering/RenderSVGContainer.h:
896         * rendering/RenderSVGHiddenContainer.cpp:
897         (WebCore::RenderSVGHiddenContainer::layout):
898         * rendering/RenderSVGRoot.cpp:
899         (WebCore::RenderSVGRoot::layout):
900         * rendering/RenderSVGViewportContainer.cpp:
901         (WebCore::RenderSVGViewportContainer::layout):
902         (WebCore::RenderSVGViewportContainer::calcViewport): use floats
903
904 2007-10-06  Rob Buis  <buis@kde.org>
905
906         Reviewed by Eric.
907
908         Use document() instead of ownerDocument() and a few other cleanups.
909
910         * ksvg2/misc/SVGDocumentExtensions.cpp:
911         (WebCore::SVGDocumentExtensions::mapInstanceToElement):
912         * ksvg2/svg/SVGCircleElement.cpp:
913         (WebCore::SVGCircleElement::notifyAttributeChange):
914         * ksvg2/svg/SVGClipPathElement.cpp:
915         (WebCore::SVGClipPathElement::notifyAttributeChange):
916         * ksvg2/svg/SVGElementInstance.cpp:
917         (WebCore::containsUseChildNode):
918         * ksvg2/svg/SVGEllipseElement.cpp:
919         (WebCore::SVGEllipseElement::notifyAttributeChange):
920         * ksvg2/svg/SVGGradientElement.cpp:
921         (WebCore::SVGGradientElement::notifyAttributeChange):
922         * ksvg2/svg/SVGImageElement.cpp:
923         (WebCore::SVGImageElement::notifyAttributeChange):
924         * ksvg2/svg/SVGLineElement.cpp:
925         (WebCore::SVGLineElement::notifyAttributeChange):
926         * ksvg2/svg/SVGMarkerElement.cpp:
927         (WebCore::SVGMarkerElement::notifyAttributeChange):
928         * ksvg2/svg/SVGMaskElement.cpp:
929         (WebCore::SVGMaskElement::notifyAttributeChange):
930         * ksvg2/svg/SVGPathElement.cpp:
931         (WebCore::SVGPathElement::notifyAttributeChange):
932         * ksvg2/svg/SVGPatternElement.cpp:
933         (WebCore::SVGPatternElement::notifyAttributeChange):
934         * ksvg2/svg/SVGPolyElement.cpp:
935         (WebCore::SVGPolyElement::notifyAttributeChange):
936         * ksvg2/svg/SVGRectElement.cpp:
937         (WebCore::SVGRectElement::notifyAttributeChange):
938         * ksvg2/svg/SVGStopElement.cpp:
939         (WebCore::SVGStopElement::notifyAttributeChange):
940
941 2007-10-05  Eric Seidel  <eric@webkit.org>
942
943         Reviewed by Oliver Hunt.
944
945         SVG invalidates way too much during layout()
946         http://bugs.webkit.org/show_bug.cgi?id=14003
947
948         * ksvg2/svg/SVGElement.cpp:
949         (WebCore::SVGElement::ownerSVGElement): simplify if
950         (WebCore::SVGElement::viewportElement): simplify if
951         * rendering/RenderSVGContainer.cpp:
952         (WebCore::RenderSVGContainer::layout): only layout children if parent changed
953         * rendering/RenderSVGRoot.cpp:
954         (WebCore::RenderSVGRoot::layout): only layout children when size changes
955         * rendering/RenderSVGText.cpp:
956         (WebCore::RenderSVGText::layout): hack to avoid bad RenderBlock::layout code
957         * rendering/RenderSVGViewportContainer.cpp:
958         (WebCore::RenderSVGViewportContainer::layout): don't use RenderSVGContainer::layout()
959
960 2007-10-05  Oliver Hunt  <oliver@apple.com>
961
962         Reviewed by Eric.
963
964         30%+ performance improvement for svg embedded in xhtml
965
966         Relayout internal to SVG was incorrectly being propagated to
967         the containing xhtml element, which subsequently resulted in
968         a full paint of the SVG, rather than just the dirty regions.
969
970         * rendering/RenderObject.cpp:
971         (WebCore::objectIsRelayoutBoundary):
972         (WebCore::RenderObject::markContainingBlocksForLayout):
973
974 2007-10-03  Eric Seidel  <eric@webkit.org>
975
976         Reviewed by Maciej.
977         
978         http://bugs.webkit.org/show_bug.cgi?id=12310
979         Remove static variables from removeAllChildren causing crash.
980         removeAllChildren now iterates over the entire tree instead of recursing.
981         Also (according to Maciej) a possible 1-2% speedboost on HTML iBench.
982
983         Test: fast/images/svg-background-crash-on-refresh.html
984
985         * WebCore.xcodeproj/project.pbxproj:
986         * dom/ContainerNode.cpp:
987         (WebCore::addChildNodesToDeletionQueue):
988         (WebCore::ContainerNode::removeAllChildren): use new addChildNodesToDeletionQueue
989
990 2007-10-03  David Hyatt  <hyatt@apple.com>
991
992         Land support for the CSS @font-face rule.  This patch allows custom fonts
993         to be downloaded from the Web and rendered in Web pages.  Right now only
994         TrueType fonts are supported.  Proprietary formats like .eot are not
995         supported.
996
997         Reviewed by Eric Seidel
998
999         Many tests will be coming in a future landing.
1000
1001         * WebCore.base.exp:
1002         Expose some more stuff for WebKit, caused by font restructuring.
1003
1004         * WebCore.xcodeproj/project.pbxproj:
1005         Add all the new font face files.
1006
1007         * css/CSSComputedStyleDeclaration.cpp:
1008         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
1009         Make sure to ignore the 'src' property of @font-face rules.
1010
1011         * css/CSSFontFace.cpp: Added.
1012         (WebCore::CSSFontFace::CSSFontFace):
1013         (WebCore::CSSFontFace::~CSSFontFace):
1014         (WebCore::CSSFontFace::isLoaded):
1015         (WebCore::CSSFontFace::isValid):
1016         (WebCore::CSSFontFace::addSource):
1017         (WebCore::CSSFontFace::fontLoaded):
1018         (WebCore::CSSFontFace::getFontData):
1019         * css/CSSFontFace.h: Added.
1020         A CSSFontFace is a composite object.  It consists of multiple font-face sources, where each source represents either a remote or local
1021         file in a @font-face rule's src list.
1022
1023         * css/CSSFontFaceRule.cpp:
1024         (WebCore::CSSFontFaceRule::setDeclaration):
1025         (WebCore::CSSFontFaceRule::cssText):
1026         * css/CSSFontFaceRule.h:
1027         The implementation of the @font-face rule itself in the CSS sheet back end.
1028         
1029         * css/CSSFontFaceSource.cpp: Added.
1030         (WebCore::CSSFontFaceSource::CSSFontFaceSource):
1031         (WebCore::CSSFontFaceSource::~CSSFontFaceSource):
1032         (WebCore::CSSFontFaceSource::pruneTable):
1033         (WebCore::CSSFontFaceSource::isLoaded):
1034         (WebCore::CSSFontFaceSource::isValid):
1035         (WebCore::CSSFontFaceSource::fontLoaded):
1036         (WebCore::CSSFontFaceSource::getFontData):
1037         * css/CSSFontFaceSource.h: Added.
1038         (WebCore::CSSFontFaceSource::string):
1039         (WebCore::CSSFontFaceSource::setFontFace):
1040         A font face source represents a single remote or local font.  If it represents a remote font than it wraps a CachedFont.
1041         
1042         * css/CSSFontFaceSrcValue.cpp: Added.
1043         (WebCore::CSSFontFaceSrcValue::isSupportedFormat):
1044         (WebCore::CSSFontFaceSrcValue::cssText):
1045         * css/CSSFontFaceSrcValue.h: Added.
1046         (WebCore::CSSFontFaceSrcValue::m_isLocal):
1047         (WebCore::CSSFontFaceSrcValue::~CSSFontFaceSrcValue):
1048         (WebCore::CSSFontFaceSrcValue::resource):
1049         (WebCore::CSSFontFaceSrcValue::format):
1050         (WebCore::CSSFontFaceSrcValue::isLocal):
1051         (WebCore::CSSFontFaceSrcValue::setFormat):
1052         Used in parsing.  Represents the parsed form of the src value that can then be used to build up a CSSFontFace.
1053
1054         * css/CSSFontSelector.cpp: Added.
1055         (WebCore::CSSFontSelector::CSSFontSelector):
1056         (WebCore::CSSFontSelector::~CSSFontSelector):
1057         (WebCore::CSSFontSelector::isEmpty):
1058         (WebCore::CSSFontSelector::docLoader):
1059         (WebCore::hashForFont):
1060         (WebCore::CSSFontSelector::addFontFaceRule):
1061         (WebCore::CSSFontSelector::fontLoaded):
1062         (WebCore::CSSFontSelector::getFontData):
1063         * css/CSSFontSelector.h: Added.
1064         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
1065         back.
1066
1067         * css/CSSGrammar.y:
1068         * css/CSSParser.cpp:
1069         (WebCore::CSSParser::parseValue):
1070         (WebCore::CSSParser::parseFontFaceSrc):
1071         (WebCore::CSSParser::createFontFaceRule):
1072         * css/CSSParser.h:
1073         Modify the CSS grammar to now understand @font-face rules.
1074
1075         * css/CSSPropertyNames.in:
1076         Add the src property.
1077
1078         * css/CSSStyleSelector.cpp:
1079         (WebCore::CSSStyleSelector::CSSStyleSelector):
1080         (WebCore::CSSStyleSelector::styleForElement):
1081         (WebCore::CSSStyleSelector::updateFont):
1082         (WebCore::CSSRuleSet::addRulesFromSheet):
1083         (WebCore::CSSStyleSelector::applyProperty):
1084         (WebCore::CSSStyleSelector::ensureFontSelector):
1085         * css/CSSStyleSelector.h:
1086         (WebCore::CSSStyleSelector::fontSelector):
1087         The style selector now creates a font selector object and feeds it the appropriate information when @font-face rules are encountered.
1088     
1089         * dom/Document.cpp:
1090         (WebCore::Document::recalcStyle):
1091         Patch the update method now that it takes a font selector argument.
1092     
1093         * loader/Cache.cpp:
1094         (WebCore::createResource):
1095         (WebCore::Cache::getStatistics):
1096         * loader/Cache.h:
1097         Teach the Cache about CachedFonts.
1098
1099         * loader/CachedFont.cpp: Added.
1100         (WebCore::CachedFont::CachedFont):
1101         (WebCore::CachedFont::~CachedFont):
1102         (WebCore::CachedFont::ref):
1103         (WebCore::CachedFont::data):
1104         (WebCore::CachedFont::beginLoadIfNeeded):
1105         (WebCore::CachedFont::ensureCustomFontData):
1106         (WebCore::CachedFont::platformDataFromCustomData):
1107         (WebCore::CachedFont::allReferencesRemoved):
1108         (WebCore::CachedFont::checkNotify):
1109         (WebCore::CachedFont::error):
1110         * loader/CachedFont.h: Added.
1111         (WebCore::CachedFont::schedule):
1112         The implementation of CachedFont.  This represents the downloaded resource and has all the raw font data.
1113
1114         * loader/CachedResource.h:
1115         (WebCore::CachedResource::):
1116         * loader/CachedResourceClient.h:
1117         (WebCore::CachedResourceClient::fontLoaded):
1118         Add a new fontLoaded method for clients of cached resources to track when fonts finish downloading.
1119     
1120         * loader/DocLoader.cpp:
1121         (WebCore::DocLoader::requestFont):
1122         * loader/DocLoader.h:
1123          Add the ability to request a font.
1124
1125         * platform/Font.cpp:
1126         (WebCore::Font::operator==):
1127         (WebCore::Font::update):
1128         (WebCore::Font::drawText):
1129         * platform/Font.h:
1130         * platform/FontCache.cpp:
1131         (WebCore::FontCache::getFontData):
1132         * platform/FontCache.h:
1133         * platform/FontData.cpp:
1134         (WebCore::FontData::FontData):
1135         * platform/FontData.h:
1136         (WebCore::FontData::isCustomFont):
1137         (WebCore::FontData::isLoading):
1138         * platform/FontFallbackList.cpp:
1139         (WebCore::FontFallbackList::FontFallbackList):
1140         (WebCore::FontFallbackList::invalidate):
1141         (WebCore::FontFallbackList::fontDataAt):
1142         * platform/FontFallbackList.h:
1143         (WebCore::FontFallbackList::loadingCustomFonts):
1144         (WebCore::FontFallbackList::fontSelector):
1145         * platform/FontSelector.h: Added.
1146         (WebCore::FontSelector::~FontSelector):
1147         * platform/GlyphPageTreeNode.cpp:
1148         (WebCore::GlyphPageTreeNode::getRoot):
1149         (WebCore::GlyphPageTreeNode::pruneTreeCustomFontData):
1150         (WebCore::GlyphPageTreeNode::~GlyphPageTreeNode):
1151         (WebCore::GlyphPageTreeNode::initializePage):
1152         (WebCore::GlyphPageTreeNode::getChild):
1153         (WebCore::GlyphPageTreeNode::pruneCustomFontData):
1154         * platform/GlyphPageTreeNode.h:
1155         (WebCore::GlyphPageTreeNode::GlyphPageTreeNode):
1156         (WebCore::GlyphPageTreeNode::page):
1157         * platform/PopupMenuClient.h:
1158         * platform/mac/FontCacheMac.mm:
1159         (WebCore::FontCache::getFontDataForCharacters):
1160         (WebCore::FontCache::getLastResortFallbackFont):
1161         (WebCore::FontCache::fontExists):
1162         (WebCore::FontCache::createFontPlatformData):
1163         * platform/mac/FontCustomPlatformData.cpp: Added.
1164         (WebCore::FontCustomPlatformData::~FontCustomPlatformData):
1165         (WebCore::FontCustomPlatformData::fontPlatformData):
1166         (WebCore::createFontCustomPlatformData):
1167         * platform/mac/FontCustomPlatformData.h: Added.
1168         (WebCore::FontCustomPlatformData::FontCustomPlatformData):
1169         * platform/mac/FontDataMac.mm:
1170         (WebCore::initFontData):
1171         (WebCore::FontData::platformInit):
1172         (WebCore::FontData::smallCapsFontData):
1173         (WebCore::FontData::platformWidthForGlyph):
1174         (WebCore::FontData::checkShapesArabic):
1175         * platform/mac/FontMac.mm:
1176         (WebCore::initializeATSUStyle):
1177         (WebCore::Font::drawGlyphs):
1178         * platform/mac/FontPlatformData.h:
1179         (WebCore::FontPlatformData::FontPlatformData):
1180         (WebCore::FontPlatformData::hash):
1181         (WebCore::FontPlatformData::operator==):
1182         * platform/mac/FontPlatformDataMac.mm: Added.
1183         (WebCore::FontPlatformData::FontPlatformData):
1184         (WebCore::~FontPlatformData):
1185         (WebCore::FontPlatformData::setFont):
1186         * platform/mac/WebCoreSystemInterface.h:
1187         * platform/mac/WebCoreSystemInterface.mm:
1188         * platform/win/FontCacheWin.cpp:
1189         (WebCore::FontCache::getLastResortFallbackFont):
1190         (WebCore::FontCache::fontExists):
1191         * platform/win/FontCustomPlatformData.cpp: Added.
1192         (WebCore::FontCustomPlatformData::~FontCustomPlatformData):
1193         (WebCore::FontCustomPlatformData::fontPlatformData):
1194         (WebCore::getData):
1195         (WebCore::releaseData):
1196         (WebCore::getBytesWithOffset):
1197         (WebCore::createFontCustomPlatformData):
1198         * platform/win/FontCustomPlatformData.h: Added.
1199         (WebCore::FontCustomPlatformData::FontCustomPlatformData):
1200         * platform/win/FontDataWin.cpp:
1201         (WebCore::FontData::platformInit):
1202         (WebCore::FontData::platformDestroy):
1203         (WebCore::FontData::smallCapsFontData):
1204         (WebCore::FontData::containsCharacters):
1205         (WebCore::FontData::determinePitch):
1206         * platform/win/FontPlatformData.h:
1207         (WebCore::FontPlatformData::FontPlatformData):
1208         (WebCore::FontPlatformData::hash):
1209         (WebCore::FontPlatformData::operator==):
1210         * platform/win/FontPlatformDataWin.cpp:
1211         (WebCore::FontPlatformData::FontPlatformData):
1212         * platform/win/PopupMenuWin.cpp:
1213         (WebCore::PopupMenu::paint):
1214         Changes to platform to support rendering of custom fonts.  Too large to go into, but for ports, the relevant object to implement is
1215         FontCustomPlatformData (to get the data loaded into your native font format), and then you have to patch your other font objects to know
1216         how to use the font.
1217
1218         * rendering/RenderListBox.cpp:
1219         (WebCore::RenderListBox::updateFromElement):
1220         (WebCore::RenderListBox::paintItemForeground):
1221         * rendering/RenderMenuList.cpp:
1222         (WebCore::RenderMenuList::fontSelector):
1223         * rendering/RenderMenuList.h:
1224         * rendering/RenderTextControl.cpp:
1225         (WebCore::RenderTextControl::fontSelector):
1226         * rendering/RenderTextControl.h:
1227         * rendering/RenderThemeMac.mm:
1228         (WebCore::RenderThemeMac::setFontFromControlSize):
1229         * rendering/RenderThemeSafari.cpp:
1230         (WebCore::RenderThemeSafari::setFontFromControlSize):
1231         Patches for update now taking a font selector argument.
1232     
1233 2007-10-03  Rob Buis  <buis@kde.org>
1234
1235         Reviewed by Eric.
1236
1237         Remove unneeded code and other cleanups.
1238
1239         * ksvg2/svg/SVGScriptElement.cpp:
1240         (WebCore::SVGScriptElement::parseMappedAttribute):
1241         * ksvg2/svg/SVGScriptElement.h:
1242
1243 2007-10-03  Rob Buis  <buis@kde.org>
1244
1245         Reviewed by Maciej.
1246
1247         http://bugs.webkit.org/show_bug.cgi?id=15260
1248         Any styles defined after <element> {<property>:%} style are ignored by Safari
1249     
1250         Add dummy rule to skip constructions like width: %.
1251
1252         * css/CSSGrammar.y:
1253
1254 2007-10-03  Mark Rowe  <mrowe@apple.com>
1255
1256         Reviewed by Lars.
1257
1258         Get Gtk+ port building on the feature branch.
1259
1260         * WebCore.pro:
1261         * ksvg2/svg/SVGSVGElement.cpp:
1262         * platform/graphics/svg/cairo/RenderPathCairo.cpp:
1263         (WebCore::RenderPath::strokeContains):
1264         * platform/graphics/svg/cairo/SVGPaintServerCairo.cpp:
1265         (WebCore::SVGPaintServer::draw):
1266         (WebCore::SVGPaintServer::renderPath):
1267         * platform/graphics/svg/cairo/SVGPaintServerSolidCairo.cpp:
1268         (WebCore::SVGPaintServerSolid::setup):
1269         * platform/graphics/svg/cairo/SVGResourceMaskerCairo.cpp:
1270         (WebCore::SVGResourceMasker::applyMask):
1271         * rendering/SVGCharacterLayoutInfo.cpp:
1272         * rendering/SVGInlineTextBox.cpp:
1273         * rendering/SVGRootInlineBox.cpp:
1274
1275 2007-10-02  Alexey Proskuryakov  <ap@webkit.org>
1276
1277         Reviewed by Maciej.
1278
1279         http://bugs.webkit.org/show_bug.cgi?id=15102
1280         XMLHttpRequests should dispatch a readystatechange event.
1281
1282         Test: http/tests/xmlhttprequest/readystatechange.html
1283
1284         * xml/XMLHttpRequest.cpp:
1285         (WebCore::XMLHttpRequest::callReadyStateChangeListener): Added readystatechange
1286         event support. Fixed the function to dispatch the same event to all listeners
1287         instead of creating a new copy for each one. Changed bubbling/cancelability of
1288         load and readystatechange events to match Firefox.
1289
1290 2007-10-02  Eric Seidel  <eric@webkit.org>
1291
1292         Reviewed by Oliver Hunt.
1293
1294         http://bugs.webkit.org/show_bug.cgi?id=13828
1295         Fixes svg/custom/rootmost-svg-xy-attrs.xhtml
1296
1297         * WebCore.xcodeproj/project.pbxproj: fix warning about SVGDOM.h
1298         * ksvg2/svg/SVGSVGElement.cpp:
1299         (WebCore::SVGSVGElement::viewport): use new isOutermostSVG()
1300         (WebCore::SVGSVGElement::getCTM): use isOutermostSVG()
1301         (WebCore::SVGSVGElement::getScreenCTM): use isOutermostSVG()
1302         (WebCore::SVGSVGElement::createRenderer): use isOutermostSVG()
1303         (WebCore::SVGSVGElement::isOutermostSVG):
1304         * ksvg2/svg/SVGSVGElement.h: add isOutermostSVG
1305         * rendering/RenderSVGRoot.cpp:
1306         (WebCore::RenderSVGRoot::calcViewport): ignore x/y
1307
1308 2007-10-02  Maciej Stachowiak  <mjs@apple.com>
1309
1310         Reviewed by Mitz.
1311         
1312         - Avoid uselessly serializing CSS property values on replacement for 10% CK DOM speedup
1313         http://bugs.webkit.org/show_bug.cgi?id=15340
1314
1315         * css/CSSMutableStyleDeclaration.cpp:
1316         (WebCore::CSSMutableStyleDeclaration::removeProperty): Don't generate return value unless needed.
1317         (WebCore::CSSMutableStyleDeclaration::setProperty): Use the no-return version appropriately.
1318         * css/CSSMutableStyleDeclaration.h:
1319         (WebCore::CSSMutableStyleDeclaration::removeProperty): New version with no return value.
1320
1321 2007-10-02  Maciej Stachowiak  <mjs@apple.com>
1322
1323         Reviewed by Oliver.
1324
1325         - Use Vector<UChar> instead of DeprecatedString for innerHTML, for 35% speedup on CK DOM test
1326         http://bugs.webkit.org/show_bug.cgi?id=15339
1327
1328         Rewrote both versions of createMarkup to build based on
1329         Vector<UChar> instead of String. Also other miscellaneous
1330         speedups (mainly content strings are now encoded in a way that
1331         doesn't take a function call per character, and switch is avoided).
1332         
1333         This also causes a functional change - we no longer escape '>' since this was unnecessary and it's faster
1334         to avoid testing for it. See updated test results.
1335         
1336         * editing/markup.cpp:
1337         (WebCore::appendString):
1338         (WebCore::appendAttributeValue):
1339         (WebCore::escapeContentText):
1340         (WebCore::appendEscapedContent):
1341         (WebCore::appendDeprecatedString):
1342         (WebCore::appendQuotedURLAttributeValue):
1343         (WebCore::stringValueForRange):
1344         (WebCore::ucharRange):
1345         (WebCore::appendUCharRange):
1346         (WebCore::appendNamespace):
1347         (WebCore::appendStartMarkup):
1348         (WebCore::getStartMarkup):
1349         (WebCore::appendEndMarkup):
1350         (WebCore::getEndMarkup):
1351         (WebCore::appendMarkup):
1352         (WebCore::joinMarkups):
1353         (WebCore::createMarkup):
1354         * editing/markup.h:
1355         * page/mac/WebCoreFrameBridge.mm:
1356         (-[WebCoreFrameBridge markupStringFromNode:nodes:]):
1357         (-[WebCoreFrameBridge markupStringFromRange:nodes:]):
1358
1359 2007-10-02  Maciej Stachowiak  <mjs@apple.com>
1360
1361         Reviewed by Eric.
1362         
1363         - fixed "innerHTML updates layout every time (very bad if adding to it in a loop)"
1364         http://bugs.webkit.org/show_bug.cgi?id=15326
1365         (65% speedup on Celtic Kane JS 2007 DOM test)
1366
1367         * editing/markup.cpp:
1368         (WebCore::createMarkup): The Node version of this function currently never uses
1369         the render tree, so don't bother to update layout. This is the version used for
1370         innerHTML.
1371
1372 2007-10-02  Nicholas Shanks  <webkit@nickshanks.com>
1373
1374         Reviewed by eseidel & hyatt.
1375
1376         Add support for CSS3 values 'start' and 'end' to text-align property.
1377
1378         * css/cssparser.cpp:
1379         (WebCore::CSSParser::parseValue): allow start and end values
1380         * css/cssstyleselector.cpp:
1381         (WebCore::CSSStyleSelector::applyProperty): handle start and end values
1382
1383 2007-10-01  Oliver Hunt  <oliver@apple.com>
1384
1385         Reviewed by Mark.
1386
1387         Enable Experimental SVG features by default when building from Xcode
1388
1389         * Configurations/WebCore.xcconfig:
1390
1391 2007-10-01  Eric Seidel  <eric@webkit.org>
1392
1393         Reviewed by Oliver Hunt.
1394
1395         This only affects Debug builds, and the ability to save SVGs as WebArchives
1396         neither are testable via DumpRenderTree.
1397
1398         * Configurations/WebCore.xcconfig: change where Xcode looks for WebCore.exp
1399         * DerivedSources.make: adds SVG symbols to WebCore.exp when necessary
1400         * WebCore.SVG.exp: Added.
1401         * WebCore.exp: moved to WebCore.base.exp
1402         * WebCore.xcodeproj/project.pbxproj: updated to reflect moved files
1403         * bindings/objc/DOMSVGExecption.h: moved to DOMSVGException.h
1404
1405 2007-10-01  Eric Seidel  <eric@webkit.org>
1406
1407         Reviewed by olliej.
1408
1409         Make feature-branch build again with ENABLE_SVG_EXPERIMENTAL_FEATURES
1410         Needed a double -> float change to make the new filter types build.
1411
1412         Build fix, no test cases.
1413
1414         * ksvg2/svg/SVGComponentTransferFunctionElement.cpp:
1415         * ksvg2/svg/SVGComponentTransferFunctionElement.h:
1416         * ksvg2/svg/SVGFECompositeElement.cpp:
1417         * ksvg2/svg/SVGFECompositeElement.h:
1418         * ksvg2/svg/SVGFEDiffuseLightingElement.cpp:
1419         * ksvg2/svg/SVGFEDiffuseLightingElement.h:
1420         * ksvg2/svg/SVGFEDisplacementMapElement.cpp:
1421         * ksvg2/svg/SVGFEDisplacementMapElement.h:
1422         * ksvg2/svg/SVGFEGaussianBlurElement.cpp:
1423         * ksvg2/svg/SVGFEGaussianBlurElement.h:
1424         * ksvg2/svg/SVGFELightElement.cpp:
1425         * ksvg2/svg/SVGFELightElement.h:
1426         * ksvg2/svg/SVGFEOffsetElement.cpp:
1427         * ksvg2/svg/SVGFEOffsetElement.h:
1428         * ksvg2/svg/SVGFESpecularLightingElement.cpp:
1429         * ksvg2/svg/SVGFESpecularLightingElement.h:
1430         * ksvg2/svg/SVGFETurbulenceElement.cpp:
1431         * ksvg2/svg/SVGFETurbulenceElement.h:
1432
1433 2007-09-30  Julien  <julien.chaffraix@gmail.com>
1434
1435         Reviewed by aroben & eseidel.
1436
1437         fix http://bugs.webkit.org/show_bug.cgi?id=14898
1438
1439         getAllResponseHeaders() separates each header with a CR LF according to the specification
1440
1441         Test: http/tests/xmlhttprequest/xmlhttprequest-crlf-getAllResponseHeader.html
1442
1443         * xml/XMLHttpRequest.cpp:
1444         (WebCore::XMLHttpRequest::getAllResponseHeaders):
1445
1446 2007-09-28  Eric Seidel  <eric@webkit.org>
1447
1448         Reviewed by Sam Wenig.
1449
1450         ASSERT when dragging <svg:image> with non-null prefix
1451         http://bugs.webkit.org/show_bug.cgi?id=15308
1452
1453         * bindings/objc/DOM.mm:
1454         (WebCore::lookupElementClass): added
1455         (WebCore::elementClass): use new lookupElementClass function
1456
1457 2007-09-25  Eric Seidel  <eric@webkit.org>
1458
1459         Reviewed by Mark Rowe.
1460
1461         I managed to break the SVG build when fixing the --no-svg build for
1462         http://bugs.webkit.org/show_bug.cgi?id=15281
1463         This adds the appropriate DOMSVG headers to the copy headers phase
1464         (in fixing the no-svg build I mistakenly re-marked them project-only)
1465
1466         * WebCore.xcodeproj/project.pbxproj:
1467
1468 2007-09-25  Eric Seidel  <eric@webkit.org>
1469
1470         Reviewed by Rob Buis.
1471
1472         Already tested by SVG/W3C-SVG-1.1/linking-a-07-t.svg
1473
1474         * ksvg2/svg/SVGAElement.cpp:
1475         (WebCore::SVGAElement::defaultEventHandler): properly pass along target values
1476
1477 2007-09-22  Oliver Hunt  <oliver@apple.com>
1478
1479         Reviewed by NOBODY (Build fix).
1480
1481         * platform/graphics/svg/cg/SVGPaintServerGradientCg.cpp:
1482         (WebCore::SVGPaintServerGradient::teardown):
1483         (WebCore::SVGPaintServerGradient::renderPath):
1484         * rendering/SVGRootInlineBox.cpp:
1485         (WebCore::SVGRootInlineBoxPaintWalker::chunkPortionCallback):
1486
1487 2007-09-09  Nikolas Zimmermann  <zimmermann@kde.org>
1488
1489         Reviewed by Oliver.
1490
1491         Rework <pattern> support to take overflow & viewBox into account.
1492         Also fix all possible combinations of patternUnits/patternContentUnits, tested by several batik testcases.
1493         (Status: <mask>, <pattern>, <linearGradient>, <radialGradient>, <filter> regions work perfectly. <clipPath> is sill todo)
1494
1495         While I'm at it, add a very helpful debugging tool "dumpCGOutputImage" and rename "dumpOutputImage" to "dumpCIOutputImage".
1496         Also fix possible null image buffer problems. (ie. large alloc)
1497
1498         Fixes: http://bugs.webkit.org/show_bug.cgi?id=12221 (Webkit ToT fails to render this pattern example)
1499
1500         * ksvg2/svg/PatternAttributes.h:
1501         (WebCore::PatternAttributes::PatternAttributes):
1502         (WebCore::PatternAttributes::x):
1503         (WebCore::PatternAttributes::y):
1504         (WebCore::PatternAttributes::width):
1505         (WebCore::PatternAttributes::height):
1506         (WebCore::PatternAttributes::setX):
1507         (WebCore::PatternAttributes::setY):
1508         (WebCore::PatternAttributes::setWidth):
1509         (WebCore::PatternAttributes::setHeight):
1510         * ksvg2/svg/SVGPatternElement.cpp:
1511         (WebCore::SVGPatternElement::buildPattern):
1512         (WebCore::SVGPatternElement::collectPatternProperties):
1513         * platform/graphics/svg/cg/SVGPaintServerGradientCg.cpp:
1514         (WebCore::SVGPaintServerGradient::setup):
1515         * platform/graphics/svg/cg/SVGPaintServerPatternCg.cpp:
1516         (WebCore::patternCallback):
1517         (WebCore::SVGPaintServerPattern::setup):
1518         * platform/graphics/svg/cg/SVGResourceFilterCg.mm:
1519         (WebCore::dumpCIOutputImage):
1520         (WebCore::dumpCGOutputImage):
1521
1522 2007-09-05  Nikolas Zimmermann  <zimmermann@kde.org>
1523
1524         Reviewed by Oliver.
1525
1526         Fix <mask> in userSpaceOnUse coordinates. Verified by new testcase taken from Batik.
1527
1528         * ksvg2/svg/SVGMaskElement.cpp:
1529         (WebCore::SVGMaskElement::drawMaskerContent):
1530
1531 2007-09-03  Nikolas Zimmermann  <zimmermann@kde.org>
1532
1533         Reviewed by Oliver.
1534
1535         Rewrite text painting code path, to be based on "text chunks" instead of using the InlineBox* hierarchy.
1536         This allows us to reuse paint servers as long as possible - and to actually paint in the way didacted by the spec.
1537
1538         This also implements advanced SVG text decorations (ie. stroked/filled decos with gradient/pattern).
1539         Fixes: http://bugs.webkit.org/show_bug.cgi?id=7200 (Gradient appears and disappears in SVG when text is off screen)
1540
1541         Fixes paint server usage on text paths. (ie. styled text paths, with gradients/filters).
1542
1543         * platform/graphics/svg/SVGPaintServer.h:
1544         * platform/graphics/svg/SVGPaintServerGradient.h:
1545         * platform/graphics/svg/cg/SVGPaintServerCg.cpp:
1546         (WebCore::SVGPaintServer::draw):
1547         (WebCore::SVGPaintServer::renderPath):
1548         (WebCore::SVGPaintServer::strokePath):
1549         (WebCore::SVGPaintServer::clipToStrokePath):
1550         (WebCore::SVGPaintServer::fillPath):
1551         (WebCore::SVGPaintServer::clipToFillPath):
1552         * platform/graphics/svg/cg/SVGPaintServerGradientCg.cpp:
1553         (WebCore::findTextRootObject):
1554         (WebCore::SVGPaintServerGradient::teardown):
1555         (WebCore::SVGPaintServerGradient::renderPath):
1556         (WebCore::SVGPaintServerGradient::handleBoundingBoxModeAndGradientTransformation):
1557         (WebCore::SVGPaintServerGradient::setup):
1558         * platform/graphics/svg/cg/SVGPaintServerSolidCg.cpp:
1559         (WebCore::SVGPaintServerSolid::setup):
1560         * platform/graphics/svg/qt/SVGPaintServerQt.cpp:
1561         (WebCore::SVGPaintServer::draw):
1562         (WebCore::SVGPaintServer::renderPath):
1563         * rendering/RenderSVGInlineText.cpp:
1564         * rendering/RenderSVGTSpan.cpp:
1565         * rendering/RenderSVGText.cpp:
1566         * rendering/RenderSVGTextPath.cpp:
1567         * rendering/SVGCharacterLayoutInfo.h:
1568         (WebCore::SVGTextChunkWalkerBase::~SVGTextChunkWalkerBase):
1569         (WebCore::SVGTextChunkWalker::SVGTextChunkWalker):
1570         (WebCore::SVGTextChunkWalker::operator()):
1571         (WebCore::SVGTextChunkWalker::start):
1572         (WebCore::SVGTextChunkWalker::end):
1573         (WebCore::SVGTextChunkWalker::setupFill):
1574         (WebCore::SVGTextChunkWalker::setupStroke):
1575         * rendering/SVGInlineFlowBox.h:
1576         * rendering/SVGInlineTextBox.cpp:
1577         (WebCore::SVGInlineTextBoxClosestCharacterToPositionWalker::SVGInlineTextBoxClosestCharacterToPositionWalker):
1578         (WebCore::SVGInlineTextBoxClosestCharacterToPositionWalker::chunkPortionCallback):
1579         (WebCore::SVGInlineTextBoxClosestCharacterToPositionWalker::character):
1580         (WebCore::SVGInlineTextBoxClosestCharacterToPositionWalker::offset):
1581         (WebCore::SVGInlineTextBoxSelectionRectWalker::SVGInlineTextBoxSelectionRectWalker):
1582         (WebCore::SVGInlineTextBoxSelectionRectWalker::chunkPortionCallback):
1583         (WebCore::SVGInlineTextBoxSelectionRectWalker::selectionRect):
1584         (WebCore::SVGInlineTextBox::closestCharacterToPosition):
1585         (WebCore::SVGInlineTextBox::selectionRect):
1586         (WebCore::SVGInlineTextBox::paintCharacters):
1587         (WebCore::SVGInlineTextBox::paintSelection):
1588         (WebCore::pathForDecoration):
1589         (WebCore::SVGInlineTextBox::paintDecoration):
1590         * rendering/SVGInlineTextBox.h:
1591         * rendering/SVGRenderSupport.cpp:
1592         (WebCore::prepareToRenderSVGContent):
1593         * rendering/SVGRenderSupport.h:
1594         * rendering/SVGRootInlineBox.cpp:
1595         (WebCore::SVGRootInlineBoxPaintWalker::SVGRootInlineBoxPaintWalker):
1596         (WebCore::SVGRootInlineBoxPaintWalker::~SVGRootInlineBoxPaintWalker):
1597         (WebCore::SVGRootInlineBoxPaintWalker::teardownFillPaintServer):
1598         (WebCore::SVGRootInlineBoxPaintWalker::teardownStrokePaintServer):
1599         (WebCore::SVGRootInlineBoxPaintWalker::chunkStartCallback):
1600         (WebCore::SVGRootInlineBoxPaintWalker::chunkEndCallback):
1601         (WebCore::SVGRootInlineBoxPaintWalker::chunkSetupFillCallback):
1602         (WebCore::SVGRootInlineBoxPaintWalker::chunkSetupStrokeCallback):
1603         (WebCore::SVGRootInlineBoxPaintWalker::chunkPortionCallback):
1604         (WebCore::SVGRootInlineBox::paint):
1605         (WebCore::SVGRootInlineBox::buildLayoutInformationForTextBox):
1606         (WebCore::addPaintServerToTextDecorationInfo):
1607         (WebCore::SVGRootInlineBox::retrievePaintServersForTextDecoration):
1608         (WebCore::SVGRootInlineBox::walkTextChunks):
1609         * rendering/SVGRootInlineBox.h:
1610
1611 2007-08-27  Nikolas Zimmermann  <zimmermann@kde.org>
1612
1613         Reviewed by Mitz.
1614
1615         Expose unitsPerEm() in Font classes.
1616         This is needed to implement SVG's advanced text decorations. We won't draw lines for text-decorations
1617         but fillable & strokable rectangles with a certain height, computed through unitsPerEm & font size.
1618
1619         * platform/Font.cpp:
1620         (WebCore::Font::unitsPerEm):
1621         * platform/Font.h:
1622         * platform/FontData.h:
1623         (WebCore::FontData::unitsPerEm):
1624         * platform/gdk/FontDataGdk.cpp:
1625         (WebCore::FontData::platformInit):
1626         * platform/mac/FontDataMac.mm:
1627         (WebCore::FontData::platformInit):
1628         * platform/qt/FontDataQt.cpp:
1629         (WebCore::FontData::platformInit):
1630         * platform/win/FontDataWin.cpp:
1631         (WebCore::FontData::platformInit):
1632         * platform/wx/FontDataWx.cpp:
1633         (WebCore::FontData::platformInit):
1634
1635 2007-08-27  Oliver Hunt  <oliver@apple.com>
1636
1637         Reviewed by NOBODY (Build fix).
1638
1639         Initialise iterators to appease gcc
1640
1641         * rendering/SVGInlineTextBox.cpp:
1642         (WebCore::SVGInlineTextBox::closestCharacterToPosition):
1643
1644 2007-08-22  Rob Buis  <buis@kde.org>
1645
1646         Reviewed by Sam.
1647
1648         http://bugs.webkit.org/show_bug.cgi?id=12059
1649         SVG colors have two separate parsing paths (one CSS and one SVGColor::setRGBColor)
1650
1651         Reuse the css parser as much as possible in setRGBColor.
1652
1653         * css/cssparser.cpp:
1654         (WebCore::CSSParser::parseColor):
1655         * css/cssparser.h:
1656         * editing/ApplyStyleCommand.cpp:
1657         (WebCore::StyleChange::checkForLegacyHTMLStyleChange):
1658         * html/CanvasGradient.cpp:
1659         (WebCore::CanvasGradient::addColorStop):
1660         * html/CanvasRenderingContext2D.cpp:
1661         (WebCore::CanvasRenderingContext2D::setShadow):
1662         (WebCore::CanvasRenderingContext2D::applyShadow):
1663         * html/CanvasStyle.cpp:
1664         (WebCore::CanvasStyle::applyStrokeColor):
1665         (WebCore::CanvasStyle::applyFillColor):
1666         * ksvg2/svg/SVGColor.cpp:
1667         (WebCore::SVGColor::colorFromRGBColorString):
1668
1669 2007-08-21  Nikolas Zimmermann  <zimmermann@kde.org>
1670
1671         Reviewed by Oliver.
1672
1673         Large SVG filter rework. Bring it back in a useable state.
1674
1675         Fixes: http://bugs.webkit.org/show_bug.cgi?id=5527 (Filters need subregion support)
1676         Fixes: http://bugs.webkit.org/show_bug.cgi?id=5579 (WebKit+SVG renders full-filters-example incorrectly)
1677         Fixes: http://bugs.webkit.org/show_bug.cgi?id=5976 (filterUnits="userSpaceOnUse" is broken (breaking feTile test case))
1678         Fixes: http://bugs.webkit.org/show_bug.cgi?id=12064 (Need function for manual style-resolution for things like gradient stops)
1679
1680         filters-blend-01-b.svg & filters-example-01-b.svg & filters-displace-01-b.svg & filters-diffuse-01-f.svg are fixed now.
1681
1682         In detail:
1683         - flood-color & flood-opacity have been incorrectly resolved on the <feBlend> parent element!
1684         - 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
1685         - add subregion support to all filter primitives (primitiveUnits & filterUnits handled in all cases)
1686         - WKDisplacmentMap.cikernel incorrectly flipped the y-axis.
1687         - Correctly specify default values for all filter primitives in ksvg2/svg!
1688         - Initialize all variables of the SVGFE* classes in platform/graphics/svg/filters.
1689         - Fix 'flood-color' initial value (was set to the _stop_ color initial value)
1690           -> both initial values were pointing to 'black' though, so it was no visible problem.
1691         - Parse 'lighting-color' css property, no more hacking in SVGFEDiffuseLighting.
1692           -> Correct it's initial from black to white value fixes SVG lighting filters!
1693         - Add diffuseConstant support to feDiffuseLighting filter.
1694         - Centralize manual style resolution (needed for stop-color, flood-color & flood-opacity, lighting-color)
1695
1696         * ksvg2/css/SVGCSSParser.cpp:
1697         * ksvg2/css/SVGCSSStyleSelector.cpp:
1698         (WebCore::CSSStyleSelector::applySVGProperty):
1699         * ksvg2/css/SVGRenderStyle.h:
1700         * ksvg2/css/SVGRenderStyleDefs.cpp:
1701         (StyleMiscData::StyleMiscData):
1702         (StyleMiscData::operator==):
1703         * ksvg2/css/SVGRenderStyleDefs.h:
1704         * ksvg2/svg/SVGComponentTransferFunctionElement.cpp:
1705         (WebCore::SVGComponentTransferFunctionElement::SVGComponentTransferFunctionElement):
1706         * ksvg2/svg/SVGFEBlendElement.cpp:
1707         (WebCore::SVGFEBlendElement::SVGFEBlendElement):
1708         (WebCore::SVGFEBlendElement::filterEffect):
1709         * ksvg2/svg/SVGFEBlendElement.h:
1710         * ksvg2/svg/SVGFEColorMatrixElement.cpp:
1711         (WebCore::SVGFEColorMatrixElement::SVGFEColorMatrixElement):
1712         (WebCore::SVGFEColorMatrixElement::filterEffect):
1713         * ksvg2/svg/SVGFEColorMatrixElement.h:
1714         * ksvg2/svg/SVGFEComponentTransferElement.cpp:
1715         (WebCore::SVGFEComponentTransferElement::filterEffect):
1716         * ksvg2/svg/SVGFEComponentTransferElement.h:
1717         * ksvg2/svg/SVGFECompositeElement.cpp:
1718         (WebCore::SVGFECompositeElement::SVGFECompositeElement):
1719         (WebCore::SVGFECompositeElement::parseMappedAttribute):
1720         (WebCore::SVGFECompositeElement::filterEffect):
1721         * ksvg2/svg/SVGFECompositeElement.h:
1722         * ksvg2/svg/SVGFEDiffuseLightingElement.cpp:
1723         (WebCore::SVGFEDiffuseLightingElement::SVGFEDiffuseLightingElement):
1724         (WebCore::SVGFEDiffuseLightingElement::parseMappedAttribute):
1725         (WebCore::SVGFEDiffuseLightingElement::filterEffect):
1726         * ksvg2/svg/SVGFEDiffuseLightingElement.h:
1727         * ksvg2/svg/SVGFEDisplacementMapElement.cpp:
1728         (WebCore::SVGFEDisplacementMapElement::SVGFEDisplacementMapElement):
1729         (WebCore::SVGFEDisplacementMapElement::filterEffect):
1730         * ksvg2/svg/SVGFEDisplacementMapElement.h:
1731         * ksvg2/svg/SVGFEDistantLightElement.cpp:
1732         (WebCore::SVGFEDistantLightElement::SVGFEDistantLightElement):
1733         * ksvg2/svg/SVGFEDistantLightElement.h:
1734         * ksvg2/svg/SVGFEFloodElement.cpp:
1735         (WebCore::SVGFEFloodElement::filterEffect):
1736         * ksvg2/svg/SVGFEFloodElement.h:
1737         * ksvg2/svg/SVGFEFuncAElement.cpp:
1738         * ksvg2/svg/SVGFEFuncAElement.h:
1739         * ksvg2/svg/SVGFEFuncBElement.cpp:
1740         * ksvg2/svg/SVGFEFuncBElement.h:
1741         * ksvg2/svg/SVGFEFuncGElement.cpp:
1742         (WebCore::SVGFEFuncGElement::SVGFEFuncGElement):
1743         * ksvg2/svg/SVGFEFuncGElement.h:
1744         * ksvg2/svg/SVGFEFuncRElement.cpp:
1745         * ksvg2/svg/SVGFEFuncRElement.h:
1746         * ksvg2/svg/SVGFEGaussianBlurElement.cpp:
1747         (WebCore::SVGFEGaussianBlurElement::filterEffect):
1748         * ksvg2/svg/SVGFEGaussianBlurElement.h:
1749         * ksvg2/svg/SVGFEImageElement.cpp:
1750         (WebCore::SVGFEImageElement::notifyFinished):
1751         (WebCore::SVGFEImageElement::filterEffect):
1752         * ksvg2/svg/SVGFEImageElement.h:
1753         * ksvg2/svg/SVGFELightElement.cpp:
1754         (WebCore::SVGFELightElement::SVGFELightElement):
1755         * ksvg2/svg/SVGFELightElement.h:
1756         * ksvg2/svg/SVGFEMergeElement.cpp:
1757         (WebCore::SVGFEMergeElement::filterEffect):
1758         * ksvg2/svg/SVGFEMergeElement.h:
1759         * ksvg2/svg/SVGFEMergeNodeElement.cpp:
1760         * ksvg2/svg/SVGFEMergeNodeElement.h:
1761         * ksvg2/svg/SVGFEOffsetElement.cpp:
1762         (WebCore::SVGFEOffsetElement::filterEffect):
1763         * ksvg2/svg/SVGFEOffsetElement.h:
1764         * ksvg2/svg/SVGFEPointLightElement.h:
1765         * ksvg2/svg/SVGFESpecularLightingElement.cpp:
1766         (WebCore::SVGFESpecularLightingElement::SVGFESpecularLightingElement):
1767         (WebCore::SVGFESpecularLightingElement::parseMappedAttribute):
1768         (WebCore::SVGFESpecularLightingElement::filterEffect):
1769         (WebCore::SVGFESpecularLightingElement::updateLights):
1770         * ksvg2/svg/SVGFESpecularLightingElement.h:
1771         * ksvg2/svg/SVGFESpotLightElement.cpp:
1772         (WebCore::SVGFESpotLightElement::lightSource):
1773         * ksvg2/svg/SVGFESpotLightElement.h:
1774         * ksvg2/svg/SVGFETileElement.cpp:
1775         (WebCore::SVGFETileElement::filterEffect):
1776         * ksvg2/svg/SVGFETileElement.h:
1777         * ksvg2/svg/SVGFETurbulenceElement.cpp:
1778         (WebCore::SVGFETurbulenceElement::SVGFETurbulenceElement):
1779         (WebCore::SVGFETurbulenceElement::filterEffect):
1780         * ksvg2/svg/SVGFETurbulenceElement.h:
1781         * ksvg2/svg/SVGFilterElement.cpp:
1782         (WebCore::SVGFilterElement::canvasResource):
1783         * ksvg2/svg/SVGFilterElement.h:
1784         * ksvg2/svg/SVGFilterPrimitiveStandardAttributes.cpp:
1785         (WebCore::SVGFilterPrimitiveStandardAttributes::SVGFilterPrimitiveStandardAttributes):
1786         (WebCore::SVGFilterPrimitiveStandardAttributes::setStandardAttributes):
1787         * ksvg2/svg/SVGFilterPrimitiveStandardAttributes.h:
1788         * ksvg2/svg/SVGGradientElement.cpp:
1789         (WebCore::SVGGradientElement::buildStops):
1790         * ksvg2/svg/SVGStyledElement.cpp:
1791         (WebCore::SVGStyledElement::resolveStyle):
1792         * ksvg2/svg/SVGStyledElement.h:
1793         * platform/graphics/svg/SVGResourceFilter.cpp:
1794         (WebCore::SVGResourceFilter::addFilterEffect):
1795         (WebCore::SVGResourceFilter::filterBBoxForItemBBox):
1796         * platform/graphics/svg/SVGResourceFilter.h:
1797         (WebCore::SVGResourceFilter::xBoundingBoxMode):
1798         (WebCore::SVGResourceFilter::setXBoundingBoxMode):
1799         (WebCore::SVGResourceFilter::yBoundingBoxMode):
1800         (WebCore::SVGResourceFilter::setYBoundingBoxMode):
1801         * platform/graphics/svg/cg/SVGResourceFilterCg.mm:
1802         (WebCore::SVGResourceFilter::SVGResourceFilter):
1803         (WebCore::SVGResourceFilter::createFilterEffect):
1804         (WebCore::SVGResourceFilter::prepareFilter):
1805         (WebCore::dumpOutputImage):
1806         (WebCore::SVGResourceFilter::applyFilter):
1807         (WebCore::SVGResourceFilter::getCIFilterStack):
1808         (WebCore::SVGResourceFilter::imageForName):
1809         (WebCore::SVGResourceFilter::setImageForName):
1810         (WebCore::SVGResourceFilter::setOutputImage):
1811         (WebCore::alphaImageForImage):
1812         (WebCore::SVGResourceFilter::inputImage):
1813         * platform/graphics/svg/filters/SVGDistantLightSource.h:
1814         * platform/graphics/svg/filters/SVGFEBlend.cpp:
1815         (WebCore::SVGFEBlend::SVGFEBlend):
1816         * platform/graphics/svg/filters/SVGFEBlend.h:
1817         * platform/graphics/svg/filters/SVGFEColorMatrix.cpp:
1818         (WebCore::SVGFEColorMatrix::SVGFEColorMatrix):
1819         * platform/graphics/svg/filters/SVGFEColorMatrix.h:
1820         * platform/graphics/svg/filters/SVGFEComponentTransfer.cpp:
1821         (WebCore::SVGFEComponentTransfer::SVGFEComponentTransfer):
1822         * platform/graphics/svg/filters/SVGFEComponentTransfer.h:
1823         (WebCore::SVGComponentTransferFunction::SVGComponentTransferFunction):
1824         * platform/graphics/svg/filters/SVGFEComposite.cpp:
1825         (WebCore::SVGFEComposite::SVGFEComposite):
1826         * platform/graphics/svg/filters/SVGFEComposite.h:
1827         * platform/graphics/svg/filters/SVGFEConvolveMatrix.cpp:
1828         (WebCore::SVGFEConvolveMatrix::SVGFEConvolveMatrix):
1829         * platform/graphics/svg/filters/SVGFEConvolveMatrix.h:
1830         * platform/graphics/svg/filters/SVGFEDiffuseLighting.cpp:
1831         (WebCore::SVGFEDiffuseLighting::SVGFEDiffuseLighting):
1832         * platform/graphics/svg/filters/SVGFEDiffuseLighting.h:
1833         * platform/graphics/svg/filters/SVGFEDisplacementMap.cpp:
1834         (WebCore::SVGFEDisplacementMap::SVGFEDisplacementMap):
1835         * platform/graphics/svg/filters/SVGFEDisplacementMap.h:
1836         * platform/graphics/svg/filters/SVGFEFlood.cpp:
1837         (WebCore::SVGFEFlood::SVGFEFlood):
1838         * platform/graphics/svg/filters/SVGFEFlood.h:
1839         * platform/graphics/svg/filters/SVGFEGaussianBlur.cpp:
1840         (WebCore::SVGFEGaussianBlur::SVGFEGaussianBlur):
1841         * platform/graphics/svg/filters/SVGFEGaussianBlur.h:
1842         * platform/graphics/svg/filters/SVGFEImage.cpp:
1843         (WebCore::SVGFEImage::SVGFEImage):
1844         * platform/graphics/svg/filters/SVGFEImage.h:
1845         * platform/graphics/svg/filters/SVGFEMerge.cpp:
1846         * platform/graphics/svg/filters/SVGFEMerge.h:
1847         (WebCore::SVGFEMerge::SVGFEMerge):
1848         * platform/graphics/svg/filters/SVGFEMorphology.cpp:
1849         (WebCore::SVGFEMorphology::SVGFEMorphology):
1850         * platform/graphics/svg/filters/SVGFEMorphology.h:
1851         * platform/graphics/svg/filters/SVGFEOffset.cpp:
1852         (WebCore::SVGFEOffset::SVGFEOffset):
1853         * platform/graphics/svg/filters/SVGFEOffset.h:
1854         * platform/graphics/svg/filters/SVGFESpecularLighting.cpp:
1855         (WebCore::SVGFESpecularLighting::SVGFESpecularLighting):
1856         * platform/graphics/svg/filters/SVGFESpecularLighting.h:
1857         * platform/graphics/svg/filters/SVGFETile.h:
1858         (WebCore::SVGFETile::SVGFETile):
1859         * platform/graphics/svg/filters/SVGFETurbulence.cpp:
1860         (WebCore::SVGFETurbulence::SVGFETurbulence):
1861         * platform/graphics/svg/filters/SVGFETurbulence.h:
1862         * platform/graphics/svg/filters/SVGFilterEffect.cpp:
1863         (WebCore::SVGFilterEffect::SVGFilterEffect):
1864         (WebCore::SVGFilterEffect::primitiveBBoxForFilterBBox):
1865         (WebCore::SVGFilterEffect::filter):
1866         (WebCore::SVGFilterEffect::setFilter):
1867         * platform/graphics/svg/filters/SVGFilterEffect.h:
1868         (WebCore::SVGFilterEffect::xBoundingBoxMode):
1869         (WebCore::SVGFilterEffect::setXBoundingBoxMode):
1870         (WebCore::SVGFilterEffect::yBoundingBoxMode):
1871         (WebCore::SVGFilterEffect::setYBoundingBoxMode):
1872         (WebCore::SVGFilterEffect::widthBoundingBoxMode):
1873         (WebCore::SVGFilterEffect::setWidthBoundingBoxMode):
1874         (WebCore::SVGFilterEffect::heightBoundingBoxMode):
1875         (WebCore::SVGFilterEffect::setHeightBoundingBoxMode):
1876         * platform/graphics/svg/filters/SVGLightSource.cpp:
1877         * platform/graphics/svg/filters/SVGLightSource.h:
1878         * platform/graphics/svg/filters/SVGPointLightSource.h:
1879         (WebCore::SVGPointLightSource::SVGPointLightSource):
1880         * platform/graphics/svg/filters/SVGSpotLightSource.h:
1881         (WebCore::SVGSpotLightSource::SVGSpotLightSource):
1882         * platform/graphics/svg/filters/cg/SVGFEBlendCg.mm:
1883         (WebCore::SVGFEBlend::getCIFilter):
1884         * platform/graphics/svg/filters/cg/SVGFEColorMatrixCg.mm:
1885         (WebCore::SVGFEColorMatrix::getCIFilter):
1886         * platform/graphics/svg/filters/cg/SVGFEComponentTransferCg.mm:
1887         (WebCore::filterForComponentFunc):
1888         (WebCore::SVGFEComponentTransfer::getCIFilter):
1889         * platform/graphics/svg/filters/cg/SVGFECompositeCg.mm:
1890         (WebCore::SVGFEComposite::getCIFilter):
1891         * platform/graphics/svg/filters/cg/SVGFEDiffuseLightingCg.mm:
1892         (WebCore::SVGFEDiffuseLighting::getCIFilter):
1893         * platform/graphics/svg/filters/cg/SVGFEDisplacementMapCg.mm:
1894         (WebCore::SVGFEDisplacementMap::getCIFilter):
1895         * platform/graphics/svg/filters/cg/SVGFEFloodCg.mm:
1896         (WebCore::SVGFEFlood::getCIFilter):
1897         * platform/graphics/svg/filters/cg/SVGFEGaussianBlurCg.mm:
1898         (WebCore::SVGFEGaussianBlur::getCIFilter):
1899         * platform/graphics/svg/filters/cg/SVGFEHelpersCg.h:
1900         * platform/graphics/svg/filters/cg/SVGFEImageCg.mm:
1901         (WebCore::SVGFEImage::getCIFilter):
1902         * platform/graphics/svg/filters/cg/SVGFEMergeCg.mm:
1903         (WebCore::SVGFEMerge::getCIFilter):
1904         * platform/graphics/svg/filters/cg/SVGFEOffsetCg.mm:
1905         (WebCore::SVGFEOffset::getCIFilter):
1906         * platform/graphics/svg/filters/cg/SVGFESpecularLightingCg.mm:
1907         (WebCore::SVGFESpecularLighting::getCIFilter):
1908         * platform/graphics/svg/filters/cg/SVGFETileCg.mm:
1909         (WebCore::SVGFETile::getCIFilter):
1910         * platform/graphics/svg/filters/cg/SVGFilterEffectCg.mm:
1911         (WebCore::SVGFilterEffect::getCIFilter):
1912         * platform/graphics/svg/filters/cg/WKDiffuseLightingFilter.cikernel:
1913         * platform/graphics/svg/filters/cg/WKDisplacementMapFilter.cikernel:
1914         * platform/graphics/svg/filters/cg/WKSpotLightFilter.m:
1915         (-[WKSpotLightFilter outputImage]):
1916         * platform/graphics/svg/qt/SVGResourceFilterQt.cpp:
1917         (WebCore::SVGResourceFilter::createFilterEffect):
1918
1919 2007-08-20  Rob Buis  <buis@kde.org>
1920
1921         Reviewed by Nikolas.
1922
1923         http://bugs.webkit.org/show_bug.cgi?id=14924
1924         rotated rect with pattern draws incorrectly
1925
1926         Use the bounding box before transformation.
1927
1928         * platform/graphics/svg/cg/SVGPaintServerPatternCg.cpp:
1929         (WebCore::SVGPaintServerPattern::setup):
1930
1931 2007-08-19  Rob Buis  <buis@kde.org>
1932
1933         Reviewed by Nikolas.
1934
1935         http://bugs.webkit.org/show_bug.cgi?id=14926
1936         WebKit has 'em' length handling problems related to CSS properties
1937
1938         Parse the properties in inline style attributes non-strict for SVG.
1939
1940         * dom/StyledElement.cpp:
1941         (WebCore::StyledElement::createInlineStyleDecl):
1942
1943 2007-08-17  Rob Buis  <buis@kde.org>
1944
1945         Reviewed by Oliver.
1946
1947         http://bugs.webkit.org/show_bug.cgi?id=14927
1948         use element in SVG does not render after parent is displayed off and on
1949
1950         Also detach the shadow tree when detaching the <use>.
1951
1952         * ksvg2/svg/SVGUseElement.cpp:
1953         (WebCore::SVGUseElement::detach):
1954         * ksvg2/svg/SVGUseElement.h:
1955
1956 2007-08-10  Nikolas Zimmermann  <zimmermann@kde.org>
1957
1958         Reviewed by Rob.
1959
1960         Fixes: http://bugs.webkit.org/show_bug.cgi?id=14153
1961
1962         Final, long-awaited RenderSVGContainer split. Make RenderSVGContainer really a simple
1963         container without special cases for inner <svg> elements or <marker>. Create a new
1964         RenderSVGViewportContainer class handling these cases now.
1965
1966         * WebCore.xcodeproj/project.pbxproj:
1967         * ksvg2/svg/SVGMarkerElement.cpp:
1968         (WebCore::SVGMarkerElement::createRenderer):
1969         * ksvg2/svg/SVGSVGElement.cpp:
1970         (WebCore::SVGSVGElement::createRenderer):
1971         * ksvg2/svg/SVGSVGElement.h:
1972         * rendering/RenderSVGContainer.cpp:
1973         (WebCore::RenderSVGContainer::layout):
1974         (WebCore::RenderSVGContainer::applyContentTransforms):
1975         (WebCore::RenderSVGContainer::applyAdditionalTransforms):
1976         (WebCore::RenderSVGContainer::paint):
1977         (WebCore::RenderSVGContainer::viewportTransform):
1978         (WebCore::RenderSVGContainer::relativeBBox):
1979         (WebCore::RenderSVGContainer::nodeAtPoint):
1980         * rendering/RenderSVGContainer.h:
1981         * rendering/RenderSVGRoot.cpp:
1982         * rendering/RenderSVGViewportContainer.cpp: Added.
1983         (WebCore::RenderSVGViewportContainer::RenderSVGViewportContainer):
1984         (WebCore::RenderSVGViewportContainer::~RenderSVGViewportContainer):
1985         (WebCore::RenderSVGViewportContainer::layout):
1986         (WebCore::RenderSVGViewportContainer::paint):
1987         (WebCore::RenderSVGViewportContainer::applyContentTransforms):
1988         (WebCore::RenderSVGViewportContainer::applyAdditionalTransforms):
1989         (WebCore::RenderSVGViewportContainer::viewport):
1990         (WebCore::RenderSVGViewportContainer::calcViewport):
1991         (WebCore::RenderSVGViewportContainer::viewportTransform):
1992         (WebCore::RenderSVGViewportContainer::absoluteTransform):
1993         (WebCore::RenderSVGViewportContainer::nodeAtPoint):
1994         * rendering/RenderSVGViewportContainer.h: Added.
1995         (WebCore::RenderSVGViewportContainer::isSVGContainer):
1996         (WebCore::RenderSVGViewportContainer::renderName):
1997
1998 2007-08-10  Nikolas Zimmermann  <zimmermann@kde.org>
1999
2000         Reviewed by Oliver & Rob.
2001
2002         Fixes: http://bugs.webkit.org/show_bug.cgi?id=12501 (SVG Text fails to respect opacity, fill-opacity and stroke-opacity)
2003         Fixes: http://bugs.webkit.org/show_bug.cgi?id=14045 (Incorrect support for opacity, fill-opacity and stroke-opacity)
2004
2005         Based on an older patch from Rob, this fixes SVG text opacity as well as group opacity for solid fills & gradients.
2006         The pattern changes are still missing a testcase (need to wait for Antoine Quint for that).
2007
2008         * platform/graphics/svg/SVGResourceFilter.h:
2009         * platform/graphics/svg/cg/SVGPaintServerGradientCg.cpp:
2010         (WebCore::SVGPaintServerGradient::setup):
2011         * platform/graphics/svg/cg/SVGPaintServerPatternCg.cpp:
2012         (WebCore::SVGPaintServerPattern::setup):
2013         * platform/graphics/svg/cg/SVGPaintServerSolidCg.cpp:
2014         (WebCore::colorFromFloatComponents):
2015         (WebCore::SVGPaintServerSolid::setup):
2016         * platform/graphics/svg/cg/SVGResourceFilterCg.mm:
2017         (WebCore::SVGResourceFilter::SVGResourceFilter):
2018         (WebCore::SVGResourceFilter::prepareFilter):
2019         (WebCore::SVGResourceFilter::applyFilter):
2020         * rendering/RenderPath.cpp:
2021         (WebCore::RenderPath::paint):
2022         * rendering/RenderSVGContainer.cpp:
2023         (WebCore::RenderSVGContainer::paint):
2024         (WebCore::RenderSVGContainer::absoluteClippedOverflowRect):
2025         * rendering/RenderSVGImage.cpp:
2026         (WebCore::RenderSVGImage::paint):
2027         (WebCore::RenderSVGImage::absoluteClippedOverflowRect):
2028         * rendering/RenderSVGRoot.cpp:
2029         (WebCore::RenderSVGRoot::paint):
2030         * rendering/RenderSVGText.cpp:
2031         (WebCore::RenderSVGText::absoluteClippedOverflowRect):
2032         * rendering/SVGRenderSupport.cpp:
2033         (WebCore::prepareToRenderSVGContent):
2034         (WebCore::finishRenderSVGContent):
2035         * rendering/SVGRenderSupport.h:
2036         * rendering/SVGRootInlineBox.cpp:
2037         (WebCore::prepareTextRendering):
2038         (WebCore::SVGRootInlineBox::paint):
2039         (WebCore::SVGRootInlineBox::paintChildInlineFlowBox):
2040
2041 2007-08-08  Rob Buis  <buis@kde.org>
2042
2043         Reviewed by Nikolas.
2044
2045         http://bugs.webkit.org/show_bug.cgi?id=11909
2046         Regression: large SVG from Illustrator comes out blank
2047
2048         Fix last issue with the Illustrator file by making relativeBBox
2049         calculation take into account viewBox.
2050
2051         * rendering/RenderSVGContainer.cpp:
2052         (WebCore::RenderSVGContainer::relativeBBox):
2053         * rendering/RenderSVGRoot.cpp:
2054         (WebCore::RenderSVGRoot::relativeBBox):
2055
2056 2007-08-08  Nikolas Zimmermann  <zimmermann@kde.org>
2057
2058         Reviewed by Oliver.
2059
2060         Fixes: http://bugs.webkit.org/show_bug.cgi?id=14896 (SVG InlineText/Flow box sizes don't take rotated glyphs into account)
2061
2062         Introduce new helper function calculateGlyphBoundaries, which takes into account any per-character transformation.
2063         This fixes box size calculations in svg/W3C-SVG-1.1/text-text-07-t.svg, svg/batik/text/textEffect3.svg (rotated glyphs)
2064         -> These strings can be properly selected now, just as well as text path elements.
2065
2066         * rendering/SVGInlineTextBox.cpp:
2067         (WebCore::SVGInlineTextBox::calculateGlyphBoundaries):
2068         (WebCore::SVGInlineTextBox::closestCharacterToPosition):
2069         (WebCore::SVGInlineTextBox::nodeAtPoint):
2070         (WebCore::SVGInlineTextBox::selectionRect):
2071         * rendering/SVGInlineTextBox.h:
2072         * rendering/SVGRootInlineBox.cpp:
2073         (WebCore::SVGRootInlineBox::layoutInlineBoxes):
2074
2075 2007-08-08  Nikolas Zimmermann  <zimmermann@kde.org>
2076
2077         Reviewed by Oliver.
2078
2079         Fixes: http://bugs.webkit.org/show_bug.cgi?id=13909 (SVG text selection doesn't work with RTL text)
2080
2081         Use drawHighlightForText() to draw the selection, instead of my home-brewn solution.
2082         Affected code in SVGRootInlineBox::paintSelectionForTextBox. Removed not anymore needed
2083         helper function cummulatedWidthOfSelectionRange.
2084
2085         Dump all contained InlineTextBox(es) in SVGRenderTreeAsText, take into account multiple
2086         child text boxes in ie. a RenderSVGInlineText objects (which happens for RTL text and
2087         LTR text cases where newlines were involved - see changed testcase results.)
2088         This affects a lot of LTR tests which actually had more than one child text box, that
2089         wasn't taken properly into account before (in terms of selection, not rendering.)
2090
2091         Fix selection for RTL text by taking box start offsets into account in closestCharacterToPosition()
2092         and by offering RTL text selection special cases in svgCharacterHitsPosition().
2093
2094         Centralized the creation of a TextStyle object for text selection/painting in a new helper function
2095         svgTextStyleForInlineTextBox. Add new helper functions calculateGlyphWidth/calculateGlyphHeight to
2096         centralize these calculations -> use these new helpers everywhere to avoid code duplication.
2097
2098         A single fix in bidi.cpp was needed to fix SVG's unicode-bidi/direction handling, to fix text-intro-02-b.svg.
2099         SVG didacts that the 'direction' attribute is ignored if unicode-bidi is set to 'normal' (default).
2100         Discussed with Mitz.
2101
2102         * rendering/RenderSVGInlineText.cpp:
2103         (WebCore::RenderSVGInlineText::positionForCoordinates):
2104         * rendering/SVGInlineTextBox.cpp:
2105         (WebCore::SVGInlineTextBox::calculateGlyphWidth):
2106         (WebCore::SVGInlineTextBox::calculateGlyphHeight):
2107         (WebCore::SVGInlineTextBox::closestCharacterToPosition):
2108         (WebCore::SVGInlineTextBox::svgCharacterHitsPosition):
2109         (WebCore::SVGInlineTextBox::nodeAtPoint):
2110         (WebCore::SVGInlineTextBox::selectionRect):
2111         * rendering/SVGInlineTextBox.h:
2112         * rendering/SVGRenderTreeAsText.cpp:
2113         (WebCore::writeSVGInlineTextBox):
2114         (WebCore::writeSVGInlineText):
2115         * rendering/SVGRootInlineBox.cpp:
2116         (WebCore::cummulatedWidthOfInlineBoxCharacterRange): Take box start offset into account.
2117         (WebCore::svgTextStyleForInlineTextBox): New helper function.
2118         (WebCore::totalAdvanceOfInlineTextBox): Take box start offset into account.
2119         (WebCore::SVGRootInlineBox::buildLayoutInformationForTextBox): Ditto. (correctly calculate advance values in RTL mode!)
2120         (WebCore::SVGRootInlineBox::paintSelectionForTextBox): Use GraphicsContext drawHighlightForText() instead of self-made hacks.
2121         (WebCore::SVGRootInlineBox::paintCharacterRangeForTextBox): Use new helper function svgTextStyleForInlineTextBox.
2122         * rendering/SVGRootInlineBox.h:
2123         * rendering/bidi.cpp: Add special case for SVG.
2124         (WebCore::RenderBlock::layoutInlineChildren):
2125
2126 2007-07-30  Nikolas Zimmermann  <zimmermann@kde.org>
2127
2128         Reviewed by Oliver & Rob.
2129
2130         Enable SVG textPath selection. Actually build chunks for them instead of
2131         ignoring them - was easier than I thought. Respect per-character transformation
2132         when calculating the chunk boundaries for the selection rectangles. Also fixes
2133         selection rect drawing of rotated characters.
2134
2135         Next thing todo is to unify the glyph size calculations, as per-glyph transformations
2136         are not respected when calculating flow box sizes in SVGRootInlineBox.
2137  
2138         * rendering/RenderObject.h:
2139         (WebCore::RenderObject::isSVGHiddenContainer):
2140         * rendering/RenderSVGHiddenContainer.h:
2141         (WebCore::RenderSVGHiddenContainer::isSVGHiddenContainer):
2142         * rendering/RenderSVGInlineText.cpp:
2143         (WebCore::isChildOfHiddenContainer):
2144         (WebCore::RenderSVGInlineText::selectionRect):
2145         (WebCore::RenderSVGInlineText::computeAbsoluteRectForRange):
2146         * rendering/SVGCharacterLayoutInfo.h:
2147         (WebCore::SVGTextChunk::SVGTextChunk):
2148         (WebCore::SVGTextChunkLayoutInfo::SVGTextChunkLayoutInfo):
2149         * rendering/SVGInlineTextBox.cpp:
2150         (WebCore::SVGInlineTextBox::selectionRect):
2151         * rendering/SVGRootInlineBox.cpp:
2152         (WebCore::applyTextAnchorToTextChunk):
2153         (WebCore::SVGRootInlineBox::buildTextChunks):
2154
2155 2007-07-25  Rob Buis  <buis@kde.org>
2156
2157         Reviewed by Nikolas.
2158
2159         http://bugs.webkit.org/show_bug.cgi?id=14312
2160         Removing an attribute has no effect on SVG
2161
2162         Update the transform matrix also when transform attribute is empty.
2163
2164         * ksvg2/svg/SVGStyledTransformableElement.cpp:
2165         (WebCore::SVGStyledTransformableElement::updateLocalTransform):
2166
2167 2007-07-26  Nikolas Zimmermann  <zimmermann@kde.org>
2168
2169         Reviewed by Oliver.
2170
2171         Unify absoluteRects() of RenderSVGTSpan & RenderSVGTextPath.
2172         The RenderSVGTextPath one was still using the old, wrong concept.
2173
2174         * rendering/RenderSVGTSpan.cpp: Remove unused params tx, ty, while I'm at it.
2175         (WebCore::RenderSVGTSpan::absoluteRects):
2176         * rendering/RenderSVGTextPath.cpp:
2177         (WebCore::RenderSVGTextPath::absoluteRects):
2178
2179 2007-07-25  Nikolas Zimmermann  <zimmermann@kde.org>
2180
2181         Reviewed by Sam.
2182
2183         Let <textPath> be recognized within the ObjC bindings.
2184         Forgot to add that months ago.
2185
2186         * bindings/objc/DOM.mm:
2187         (WebCore::createElementClassMap):
2188         * bindings/objc/DOMInternal.h:
2189         * bindings/objc/DOMSVG.h:
2190
2191 2007-07-25  Nikolas Zimmermann  <zimmermann@kde.org>
2192
2193         Reviewed by Oliver.
2194
2195         Fixes: http://bugs.webkit.org/show_bug.cgi?id=14065
2196
2197         Fix all known bugs regarding to SVG text selection, when embedded in XHTML.
2198         Also fix inspecting <text> elements when embedded in XHTML. (WebInspector)
2199
2200         Short story: selectionRect() & friends are special in terms of the "HTML parent translation".
2201         Caused by ie. CSS translation like "left: 50px; top: 50px" when <svg> is a child of a <div>.
2202         For non-textual objects like RenderPath, we can easily add a translation to a new coordinate
2203         space in RenderSVGRoot::applyContentTransformations() and we're done with it.
2204
2205         Same for painting text, but text selection makes problems in this concept.
2206         We have to remove the 'html parent translation' from our selection rects that we return
2207         from RenderSVGText & RenderSVGInlineText. Hopefully all issues are fixed now.
2208
2209         Long story:
2210         - RenderSVGRoot::nodeAtPoint didn't take the parent 'scroll offset' into account. We exited
2211           too early, because the overflow rect wasn't correctly sized. Fixed.
2212         - RenderSVGRoot::absoluteRects() can't return the absoluteClippedOverflowRect() as it includes
2213           the 'html parent translation', which needs to be removed, otherwhise the painted rects are off
2214           when inspecting with WebInspector. -> Pass down absoluteRects() call to it's children..
2215         - RenderSVGText::absoluteRects() can't use absoluteClippedOverflowRect() for the same reason.
2216         - Add RenderSVGInlineText::computeAbsoluteRectForRange() function - shared by absoluteRects() and
2217           selectionRect() - and remove the 'html parent translation' there by asking the RenderSVGRoot
2218           object for the correct offsets.
2219
2220         This lead to nasty bugs showing that SVGInlineTextBox::selectionRect() wasn't actually returning
2221         correct rectangles. It couldn't work for text chunks the way it was implemented. Fixed by implementing
2222         it exactly the same way that closestCharacterToPosition() was done - could share more code later on.
2223
2224         * rendering/RenderSVGInlineText.cpp:
2225         (WebCore::RenderSVGInlineText::absoluteRects):
2226         (WebCore::RenderSVGInlineText::selectionRect):
2227         (WebCore::RenderSVGInlineText::computeAbsoluteRectForRange):
2228         * rendering/RenderSVGInlineText.h:
2229         * rendering/RenderSVGRoot.cpp:
2230         (WebCore::RenderSVGRoot::absoluteRects):
2231         (WebCore::RenderSVGRoot::nodeAtPoint):
2232         * rendering/RenderSVGText.cpp:
2233         (WebCore::RenderSVGText::absoluteRects):
2234         * rendering/SVGCharacterLayoutInfo.h: Removed unused variable 'bool selected'
2235         * rendering/SVGInlineTextBox.cpp:
2236         (WebCore::SVGInlineTextBox::closestCharacterToPosition):
2237         (WebCore::SVGInlineTextBox::nodeAtPoint):
2238         (WebCore::SVGInlineTextBox::selectionRect):
2239         * rendering/SVGRootInlineBox.cpp: Add 'findSVGRootObject' helper function.
2240         (WebCore::findSVGRootObject):
2241         (WebCore::SVGRootInlineBox::buildLayoutInformationForTextBox):
2242         (WebCore::SVGRootInlineBox::paintSelectionForTextBox): Remove unused tx/ty parameters.
2243         (WebCore::SVGRootInlineBox::paintChildInlineTextBox):
2244         (WebCore::SVGRootInlineBox::paintCharacterRangeForTextBox):
2245         * rendering/SVGRootInlineBox.h:
2246
2247 2007-07-17  Nikolas Zimmermann  <zimmermann@kde.org>
2248
2249         Build fix. Not reviewed.
2250
2251         Rob forgot to land the changes to SVGResourceMarker in his last commit.
2252
2253         * platform/graphics/svg/SVGResourceMarker.cpp:
2254         (WebCore::SVGResourceMarker::draw):
2255
2256 2007-07-17  Rob Buis  <buis@kde.org>
2257
2258         Reviewed by Nikolas.
2259
2260         http://bugs.webkit.org/show_bug.cgi?id=5996
2261         SVG <view> is unimplemented
2262
2263         Implement <view> and refactor the code in the svg renderer container classes.
2264
2265         * WebCore.xcodeproj/project.pbxproj:
2266         * ksvg2/svg/SVGDocument.cpp:
2267         (WebCore::SVGDocument::zoomAndPanEnabled): Take into account currentView for zoom/pan
2268         * ksvg2/svg/SVGDocument.h:
2269         * ksvg2/svg/SVGFEImageElement.cpp:
2270         (WebCore::SVGFEImageElement::parseMappedAttribute):
2271         * ksvg2/svg/SVGFitToViewBox.cpp:
2272         (WebCore::SVGFitToViewBox::parseViewBox):
2273         (WebCore::SVGFitToViewBox::parseMappedAttribute):
2274         * ksvg2/svg/SVGFitToViewBox.h:
2275         * ksvg2/svg/SVGImageElement.cpp:
2276         (WebCore::SVGImageElement::parseMappedAttribute):
2277         * ksvg2/svg/SVGLocatable.h:
2278         * ksvg2/svg/SVGMarkerElement.cpp:
2279         (WebCore::SVGMarkerElement::createRenderer):
2280         (WebCore::SVGMarkerElement::notifyAttributeChange):
2281         * ksvg2/svg/SVGPreserveAspectRatio.cpp:
2282         (WebCore::SVGPreserveAspectRatio::parsePreserveAspectRatio):
2283         * ksvg2/svg/SVGPreserveAspectRatio.h:
2284         * ksvg2/svg/SVGSVGElement.cpp:
2285         (WebCore::SVGSVGElement::SVGSVGElement):
2286         (WebCore::SVGSVGElement::currentView):
2287         (WebCore::SVGSVGElement::parseMappedAttribute):
2288         (WebCore::SVGSVGElement::createRenderer):
2289         (WebCore::SVGSVGElement::viewBoxToViewTransform):
2290         (WebCore::SVGSVGElement::inheritViewAttributes):
2291         * ksvg2/svg/SVGSVGElement.h:
2292         * ksvg2/svg/SVGTransformable.cpp:
2293         (WebCore::SVGTransformable::parseTransformAttribute):
2294         * ksvg2/svg/SVGTransformable.h:
2295         * ksvg2/svg/SVGViewElement.cpp:
2296         (WebCore::SVGViewElement::parseMappedAttribute):
2297         * ksvg2/svg/SVGViewElement.h:
2298         * ksvg2/svg/SVGViewSpec.cpp: Added.
2299         (WebCore::SVGViewSpec::SVGViewSpec):
2300         (WebCore::SVGViewSpec::~SVGViewSpec):
2301         (WebCore::SVGViewSpec::setTransform):
2302         (WebCore::SVGViewSpec::setViewBoxString):
2303         (WebCore::SVGViewSpec::setPreserveAspectRatioString):
2304         (WebCore::SVGViewSpec::setViewTargetString):
2305         (WebCore::SVGViewSpec::viewTarget):
2306         (WebCore::SVGViewSpec::contextElement):
2307         (WebCore::):
2308         (WebCore::SVGViewSpec::parseViewSpec):
2309         * ksvg2/svg/SVGViewSpec.h: Added.
2310         (WebCore::SVGViewSpec::transform):
2311         (WebCore::SVGViewSpec::viewTargetString):
2312         * ksvg2/svg/SVGZoomAndPan.cpp:
2313         (WebCore::SVGZoomAndPan::parseMappedAttribute):
2314         (WebCore::):
2315         (WebCore::SVGZoomAndPan::parseZoomAndPan):
2316         * ksvg2/svg/SVGZoomAndPan.h:
2317         * loader/FrameLoader.cpp:
2318         (WebCore::FrameLoader::gotoAnchor):
2319         * page/Frame.cpp:
2320         (WebCore::Frame::setZoomFactor): do not zoom when it is disabled
2321         * rendering/RenderSVGContainer.cpp:
2322         (WebCore::RenderSVGContainer::RenderSVGContainer):
2323         (WebCore::RenderSVGContainer::paint):
2324         (WebCore::RenderSVGContainer::viewportTransform):
2325         * rendering/RenderSVGContainer.h:
2326         * rendering/RenderSVGRoot.cpp:
2327         (WebCore::RenderSVGRoot::RenderSVGRoot):
2328         (WebCore::RenderSVGRoot::applyContentTransforms):
2329         (WebCore::RenderSVGRoot::paint):
2330         (WebCore::RenderSVGRoot::absoluteTransform):
2331         (WebCore::RenderSVGRoot::localTransform):
2332         * rendering/RenderSVGRoot.h:
2333
2334 2007-07-16  Nikolas Zimmermann  <zimmermann@kde.org>
2335
2336         Reviewed by Rob.
2337
2338         Fixes: http://bugs.webkit.org/show_bug.cgi?id=13611 (Crash in setAttributeNS setting href of SVG <use> to nonexistent symbol)
2339         Fixes: http://bugs.webkit.org/show_bug.cgi?id=14631 (<use> doesn't deep-expand <symbol> elements.)
2340
2341         Rework <use> on <foreignObject> cases, to not just ignore these cases, but actually proceed and skip <fO> objects
2342         from the resulting cloned tree. This fixes parts of "treasure_map.svg" (no bug report availabe on that one, private "testcase").
2343
2344         Fix assertion happening with <use> on <g> containing <symbol>. Introduce expandSymbolElementsInShadowTree()
2345         concept, just like it's done for <use> on <use>, to deep-replace all <symbol> elements by <svg>, as demanded
2346         by the spec. This only worked on <use> on <symbol> direct cases so far.
2347
2348         Added testcase: svg/custom/use-on-g-containing-foreignObject-and-image.svg (testcase for treasure_map.svg)
2349                         svg/custom/use-on-disallowed-foreign-object-5.svg (<use> on <symbol> containg <foreignObject>)
2350                         svg/custom/use-on-disallowed-foreign-object-6.svg (<use> on <g> containing <svg> containing <foreignObject>)
2351                         svg/custom/use-on-disallowed-foreign-object-7.svg (<use> on <g> containing <symbol> containing <foreignObject>)
2352                         svg/custom/use-scripting-changes-to-nonexistant-href.svg
2353
2354         * ksvg2/svg/SVGUseElement.cpp:
2355         (WebCore::isDisallowedElement):
2356         (WebCore::subtreeContainsDisallowedElement):
2357         (WebCore::SVGUseElement::buildPendingResource):
2358         (WebCore::SVGUseElement::buildInstanceTree):
2359         (WebCore::SVGUseElement::removeDisallowedElementsFromSubtree):
2360         (WebCore::SVGUseElement::buildShadowTree):
2361         (WebCore::SVGUseElement::expandUseElementsInShadowTree):
2362         (WebCore::SVGUseElement::expandSymbolElementsInShadowTree):
2363         * ksvg2/svg/SVGUseElement.h:
2364
2365 2007-07-15  Nikolas Zimmermann  <zimmermann@kde.org>
2366
2367         Reviewed by Rob.
2368
2369         Fix invisible-text-after-scrolling.xhtml regression. Scroll offset not
2370         taken into account properly. Also fix RenderSVGInlineText::selectionRect(),
2371         so that SVG text can be selected, when being embedded in XHTML.
2372
2373         * rendering/RenderSVGInlineText.cpp:
2374         (WebCore::RenderSVGInlineText::selectionRect):
2375         * rendering/RenderSVGRoot.cpp:
2376         (WebCore::RenderSVGRoot::applyContentTransforms):
2377
2378 2007-07-15  Nikolas Zimmermann  <zimmermann@kde.org>
2379
2380         Reviewed by Oliver.
2381
2382         Fixes: http://bugs.webkit.org/show_bug.cgi?id=5940 (<svg> inside <body> incorrectly extends over top/bottom borders)
2383         Fixes: http://bugs.webkit.org/show_bug.cgi?id=14145 (RenderSVGContainer should not inherit from RenderContainer)
2384
2385         Make RenderSVGContainer inherit from RenderObject directly, instead of RenderContainer.
2386         Itdoes a lot of things that we don't need for SVG, and by removing this inheritance
2387         we can finally fix the differences about SVG object positioning, as we don't need
2388         parent translation (tx/ty). Fixes SVG text rendering within XHTML.
2389
2390         Fix requireLayer() function on RenderSVGRoot, as it can actually be a layer now.
2391         This change is based on Rob's patch at 5940 - fixing z-order indexing.
2392
2393         Change RenderSVGRoot renderName() and update all layout tests, because of this change.
2394         
2395         Fix absoluteRects() function for RenderSVGInlineText & RenderSVGTSpan.
2396         Checked extensively using WebInspector, to assure all rects are correctly displayed.
2397
2398         Testcases fixed: junk-data.svg, missing-xlink.svg hixie/013.xml (all regressions!)
2399         (junk-data.svg & missing-xlink.svg previously relied on SVG text painting out of <svg> overflow rect.
2400          Fix these testcases, as within this new RenderSVGContainer concept, that bug is now fixed, and breaks them)
2401
2402         Testcases added: custom/absolute-sized-svg-in-xhtml.xhtml, custom/inline-svg-in-xhtml.xml (Mozilla XTech demo)
2403
2404         * ksvg2/svg/SVGSVGElement.cpp:
2405         (WebCore::SVGSVGElement::parseMappedAttribute):
2406         * rendering/RenderObject.cpp:
2407         (WebCore::RenderObject::containingBlock):
2408         * rendering/RenderObject.h:
2409         (WebCore::RenderObject::isSVGRoot):
2410         * rendering/RenderPath.cpp:
2411         (WebCore::RenderPath::paint):
2412         (WebCore::RenderPath::addFocusRingRects):
2413         * rendering/RenderSVGContainer.cpp:
2414         (WebCore::RenderSVGContainer::RenderSVGContainer):
2415         (WebCore::RenderSVGContainer::canHaveChildren):
2416         (WebCore::RenderSVGContainer::addChild):
2417         (WebCore::RenderSVGContainer::removeChild):
2418         (WebCore::RenderSVGContainer::destroy):
2419         (WebCore::RenderSVGContainer::destroyLeftoverChildren):
2420         (WebCore::RenderSVGContainer::removeChildNode):
2421         (WebCore::RenderSVGContainer::appendChildNode):
2422         (WebCore::RenderSVGContainer::insertChildNode):
2423         (WebCore::RenderSVGContainer::layout):
2424         (WebCore::RenderSVGContainer::calcReplacedWidth):
2425         (WebCore::RenderSVGContainer::calcReplacedHeight):
2426         (WebCore::RenderSVGContainer::applyContentTransforms):
2427         (WebCore::RenderSVGContainer::paint):
2428         (WebCore::RenderSVGContainer::absoluteTransform):
2429         (WebCore::RenderSVGContainer::nodeAtPoint):
2430         * rendering/RenderSVGContainer.h:
2431         (WebCore::RenderSVGContainer::firstChild):
2432         (WebCore::RenderSVGContainer::lastChild):
2433         (WebCore::RenderSVGContainer::width):
2434         (WebCore::RenderSVGContainer::height):
2435         (WebCore::RenderSVGContainer::moveChildNode):
2436         (WebCore::RenderSVGContainer::calcPrefWidths):
2437         * rendering/RenderSVGHiddenContainer.cpp:
2438         (WebCore::RenderSVGHiddenContainer::RenderSVGHiddenContainer):
2439         (WebCore::RenderSVGHiddenContainer::paint):
2440         (WebCore::RenderSVGHiddenContainer::absoluteRects):
2441         (WebCore::RenderSVGHiddenContainer::relativeBBox):
2442         * rendering/RenderSVGHiddenContainer.h:
2443         * rendering/RenderSVGImage.cpp:
2444         (WebCore::RenderSVGImage::paint):
2445         * rendering/RenderSVGInline.cpp:
2446         (WebCore::RenderSVGInline::RenderSVGInline):
2447         * rendering/RenderSVGInlineText.cpp:
2448         (WebCore::RenderSVGInlineText::absoluteRects):
2449         * rendering/RenderSVGRoot.cpp:
2450         (WebCore::RenderSVGRoot::applyContentTransforms):
2451         (WebCore::RenderSVGRoot::paint):
2452         (WebCore::RenderSVGRoot::addFocusRingRects):
2453         * rendering/RenderSVGRoot.h:
2454         (WebCore::RenderSVGRoot::isSVGRoot):
2455         (WebCore::RenderSVGRoot::renderName):
2456         * rendering/RenderSVGTSpan.cpp:
2457         (WebCore::RenderSVGTSpan::RenderSVGTSpan):
2458         (WebCore::RenderSVGTSpan::absoluteRects):
2459         * rendering/RenderSVGTextPath.cpp:
2460         (WebCore::RenderSVGTextPath::absoluteRects):
2461         * rendering/RenderTreeAsText.cpp:
2462         (WebCore::write):
2463         * rendering/SVGRenderTreeAsText.cpp:
2464         (WebCore::operator<<):
2465         (WebCore::write):
2466         * rendering/SVGRenderTreeAsText.h:
2467
2468 2007-07-11  Nikolas Zimmermann  <zimmermann@kde.org>
2469
2470         Reviewed by Sam.
2471
2472         Remove all "SVGElement* m_context" parameters spread over SVG primitives
2473         (like SVGAngle, SVGPreserveAspectRatio, SVGTransformList, ...)
2474
2475         This is all handled by the JS generation in the bindings now, leading
2476         to a faster static rendering codepaths, and easier handling of the dynamic
2477         parts like JS scripting. Remove the mystified genericContext() concept alltogether.
2478
2479         * bindings/js/JSSVGMatrixCustom.cpp: Adapt to the context() change.
2480         (WebCore::JSSVGMatrix::multiply):
2481         (WebCore::JSSVGMatrix::inverse):
2482         (WebCore::JSSVGMatrix::translate):
2483         (WebCore::JSSVGMatrix::scale):
2484         (WebCore::JSSVGMatrix::scaleNonUniform):
2485         (WebCore::JSSVGMatrix::rotate):
2486         (WebCore::JSSVGMatrix::rotateFromVector):
2487         (WebCore::JSSVGMatrix::flipX):
2488         (WebCore::JSSVGMatrix::flipY):
2489         (WebCore::JSSVGMatrix::skewX):
2490         (WebCore::JSSVGMatrix::skewY):
2491         * bindings/js/JSSVGPODTypeWrapper.h: Remove all nAC() calls here!
2492         (WebCore::JSSVGPODTypeWrapperCreatorReadWrite::commitChange):
2493         (WebCore::JSSVGPODTypeWrapperCreatorForList::JSSVGPODTypeWrapperCreatorForList):
2494         (WebCore::JSSVGPODTypeWrapperCreatorForList::~JSSVGPODTypeWrapperCreatorForList):
2495         * bindings/js/JSSVGPathSegCustom.cpp: Adapt to the context() change.
2496         (WebCore::toJS):
2497         * bindings/js/JSSVGPathSegListCustom.cpp: Ditto.
2498         (WebCore::JSSVGPathSegList::clear):
2499         (WebCore::JSSVGPathSegList::initialize):
2500         (WebCore::JSSVGPathSegList::getItem):
2501         (WebCore::JSSVGPathSegList::insertItemBefore):
2502         (WebCore::JSSVGPathSegList::replaceItem):
2503         (WebCore::JSSVGPathSegList::removeItem):
2504         (WebCore::JSSVGPathSegList::appendItem):
2505         * bindings/js/JSSVGPointListCustom.cpp: Ditto.
2506         (WebCore::JSSVGPointList::clear):
2507         (WebCore::JSSVGPointList::initialize):
2508         (WebCore::JSSVGPointList::getItem):
2509         (WebCore::JSSVGPointList::insertItemBefore):
2510         (WebCore::JSSVGPointList::replaceItem):
2511         (WebCore::JSSVGPointList::removeItem):
2512         (WebCore::JSSVGPointList::appendItem): 
2513         * bindings/js/JSSVGTransformListCustom.cpp: Ditto.
2514         (WebCore::JSSVGTransformList::clear):
2515         (WebCore::JSSVGTransformList::initialize):
2516         (WebCore::JSSVGTransformList::getItem):
2517         (WebCore::JSSVGTransformList::insertItemBefore):
2518         (WebCore::JSSVGTransformList::replaceItem):
2519         (WebCore::JSSVGTransformList::removeItem):
2520         (WebCore::JSSVGTransformList::appendItem):
2521         * bindings/js/kjs_binding.h: Add new cacheSVGDOMObject, taking third parameter: context.
2522         (KJS::cacheSVGDOMObject):
2523         * bindings/scripts/CodeGeneratorJS.pm: Change generation to step aways from genericContext().
2524         * ksvg2/misc/SVGDocumentExtensions.h: Kill all genericContext() stuff.
2525         (WebCore::SVGDocumentExtensions::hasBaseValue):
2526         * ksvg2/svg/SVGAngle.cpp: Kill context parameter.
2527         (WebCore::SVGAngle::SVGAngle):
2528         * ksvg2/svg/SVGAngle.h: ditto.
2529         * ksvg2/svg/SVGFEImageElement.cpp: SVG classes don't get context params passed anymore.
2530         (WebCore::SVGFEImageElement::SVGFEImageElement):
2531         * ksvg2/svg/SVGFitToViewBox.cpp: Ditto.
2532         (WebCore::SVGFitToViewBox::SVGFitToViewBox):
2533         * ksvg2/svg/SVGGradientElement.cpp: Ditto.
2534         (WebCore::SVGGradientElement::SVGGradientElement):
2535         * ksvg2/svg/SVGImageElement.cpp: Ditto.
2536         (WebCore::SVGImageElement::SVGImageElement):
2537         * ksvg2/svg/SVGMarkerElement.cpp: Ditto.
2538         (WebCore::SVGMarkerElement::SVGMarkerElement):
2539         (WebCore::SVGMarkerElement::parseMappedAttribute):
2540         * ksvg2/svg/SVGPathElement.cpp: Ditto.
2541         (WebCore::SVGPathElement::pathSegList):
2542         * ksvg2/svg/SVGPathSegList.cpp: Kill context parameter.
2543         (WebCore::SVGPathSegList::SVGPathSegList):
2544         * ksvg2/svg/SVGPathSegList.h:
2545         * ksvg2/svg/SVGPatternElement.cpp: SVG classes don't get context params passed anymore.
2546         (WebCore::SVGPatternElement::SVGPatternElement):
2547         * ksvg2/svg/SVGPointList.cpp: Kill context parameter.
2548         (SVGPointList::SVGPointList):
2549         * ksvg2/svg/SVGPointList.h:
2550         * ksvg2/svg/SVGPolyElement.cpp: SVG classes don't get context params passed anymore.
2551         (WebCore::SVGPolyElement::points):
2552         * ksvg2/svg/SVGPreserveAspectRatio.cpp: Kill context parameter.
2553         (WebCore::SVGPreserveAspectRatio::SVGPreserveAspectRatio):
2554         (WebCore::SVGPreserveAspectRatio::setAlign):
2555         (WebCore::SVGPreserveAspectRatio::setMeetOrSlice):
2556         (WebCore::SVGPreserveAspectRatio::parsePreserveAspectRatio):
2557         * ksvg2/svg/SVGPreserveAspectRatio.h:
2558         * ksvg2/svg/SVGSVGElement.cpp: SVG classes don't get cntext params passed anymore.
2559         (WebCore::SVGSVGElement::createSVGAngle):
2560         * ksvg2/svg/SVGStyledTransformableElement.cpp: Ditto.
2561         (WebCore::SVGStyledTransformableElement::SVGStyledTransformableElement):
2562         * ksvg2/svg/SVGTextElement.cpp: Ditto.
2563         (WebCore::SVGTextElement::SVGTextElement):
2564         * ksvg2/svg/SVGTransformList.cpp: Kill context parameter.
2565         (SVGTransformList::SVGTransformList):
2566         * ksvg2/svg/SVGTransformList.h:
2567
2568 2007-07-10  Nikolas Zimmermann  <zimmermann@kde.org>
2569
2570         Reviewed by Sam.
2571
2572         Fixes: http://bugs.webkit.org/show_bug.cgi?id=11167.
2573
2574         Recognize <textPath> in SVG JS bindings.
2575         Add JSSVGTextPathElement to JSSVGElementWrapperFactory.
2576
2577         Add SVGException.idl just for the JS generation.
2578         Turn on all SVG JS constructors and add them to DOMWindow.idl.
2579
2580         Testcase added: LayoutTests/svg/custom/js-svg-constructors.svg
2581     
2582         * DerivedSources.make: Add JSSVGException.h
2583         * WebCore.xcodeproj/project.pbxproj: Correct paths for DOM/JS*SVGTextPathElement
2584         * bindings/scripts/CodeGeneratorJS.pm: Forward port hash fix from trunk.
2585         * bindings/js/JSSVGElementWrapperFactory.cpp: Add JSSVGTextPathElement support
2586         * ksvg2/svg/SVGComponentTransferFunctionElement.idl:
2587         * ksvg2/svg/SVGTextPathElement.h:
2588         * ksvg2/svg/SVGException.h:
2589         * ksvg2/svg/SVGException.idl: Added.
2590         * ksvg2/svg/SVGFEBlendElement.idl:
2591         * ksvg2/svg/SVGFEColorMatrixElement.idl:
2592         * ksvg2/svg/SVGFECompositeElement.idl:
2593         * ksvg2/svg/SVGFEDisplacementMapElement.idl:
2594         * ksvg2/svg/SVGFETurbulenceElement.idl:
2595         * ksvg2/svg/SVGGradientElement.idl:
2596         * ksvg2/svg/SVGMarkerElement.idl:
2597         * ksvg2/svg/SVGTextContentElement.idl:
2598         * ksvg2/svg/SVGTextPathElement.idl:
2599         * page/DOMWindow.idl: Recognize new js svg constructors.
2600
2601 2007-06-28  Rob Buis  <buis@kde.org>
2602
2603         Reviewed by Maciej.
2604
2605         http://bugs.webkit.org/show_bug.cgi?id=14241
2606         SVG <image> with height or width less than 1 fails to render image
2607
2608         Keep extra member vars to get width/height as floats for accurate
2609         calculations.
2610
2611         * rendering/RenderSVGImage.cpp:
2612         (WebCore::RenderSVGImage::adjustRectsForAspectRatio):
2613         (WebCore::RenderSVGImage::paint):
2614         (WebCore::RenderSVGImage::calcWidth):
2615         (WebCore::RenderSVGImage::calcHeight):
2616         * rendering/RenderSVGImage.h:
2617
2618 2007-06-26  Rob Buis  <buis@kde.org>
2619
2620         Reviewed by Maciej.
2621
2622         http://bugs.webkit.org/show_bug.cgi?id=9976
2623         Fix negative width issue in Hixie's test
2624
2625         Refuse to render zero or negative width/height.
2626
2627         * rendering/RenderSVGContainer.cpp:
2628         (WebCore::RenderSVGContainer::paint):
2629         * rendering/RenderSVGRoot.cpp:
2630         (WebCore::RenderSVGRoot::paint):
2631
2632 2007-06-26  Rob Buis  <buis@kde.org>
2633
2634         Reviewed by Maciej.
2635
2636         http://bugs.webkit.org/show_bug.cgi?id=12062
2637         WebCore does not handle CSS-specified fill fallback correctly
2638
2639         Implement fallback for fill and stroke.
2640
2641         * ksvg2/css/SVGCSSParser.cpp:
2642         (WebCore::CSSParser::parseSVGValue):
2643         * ksvg2/svg/SVGPaint.cpp:
2644         (WebCore::SVGPaint::SVGPaint):
2645         * ksvg2/svg/SVGPaint.h:
2646         * platform/graphics/svg/SVGPaintServer.cpp:
2647         (WebCore::SVGPaintServer::fillPaintServer):
2648         (WebCore::SVGPaintServer::strokePaintServer):
2649
2650 2007-06-20  Rob Buis  <buis@kde.org>
2651
2652         Reviewed by Eric.
2653
2654         http://bugs.webkit.org/show_bug.cgi?id=14157
2655         Rotated shape has wrong gradient rendering
2656
2657         Use the untransformed bbox in objectBoundingBoxMode. Also
2658         don't do objectBoundingBoxMode should the bbox width ort height
2659         be zero.
2660
2661         * platform/graphics/svg/cg/SVGPaintServerGradientCg.cpp:
2662         (WebCore::SVGPaintServerGradient::teardown):
2663         (WebCore::SVGPaintServerGradient::renderPath):
2664
2665 2007-06-20  Nikolas Zimmermann  <zimmermann@kde.org>
2666
2667         Reviewed by Eric & Oliver.
2668
2669         Fixes: http://bugs.webkit.org/show_bug.cgi?id=14198
2670
2671         Reeanble <foreignObject>. Explicitely disallow <use> on <foreignObject>
2672         as it may lead to bad problems. 
2673
2674         While I'm at it disallow <use> on any non-svg element.
2675
2676         * bindings/js/JSSVGElementWrapperFactory.cpp:
2677         * bindings/objc/DOM.mm:
2678         (WebCore::createElementClassMap):
2679         * ksvg2/svg/SVGForeignObjectElement.cpp:
2680         * ksvg2/svg/SVGForeignObjectElement.h:
2681         * ksvg2/svg/SVGForeignObjectElement.idl:
2682         * ksvg2/svg/SVGLocatable.cpp:
2683         (WebCore::SVGLocatable::nearestViewportElement):
2684         (WebCore::SVGLocatable::farthestViewportElement):
2685         * ksvg2/svg/SVGUseElement.cpp:
2686         (WebCore::SVGUseElement::buildPendingResource):
2687         * ksvg2/svg/svgtags.in:
2688         * rendering/RenderForeignObject.cpp:
2689
2690 2007-06-19  Rob Buis  <buis@kde.org>
2691
2692         Reviewed by Oliver.
2693
2694         http://bugs.webkit.org/show_bug.cgi?id=14144
2695         All tx/ty (parentX/parentY) usage should be removed from SVG renders
2696         http://bugs.webkit.org/show_bug.cgi?id=13981
2697         <br> prevents click handler from firing
2698
2699         Fix the hit testing issues by making RenderSVGRoot take its m_x, m_y
2700         into account in the absolute transform.
2701
2702         * rendering/RenderPath.cpp:
2703         (WebCore::RenderPath::absoluteRects):
2704         (WebCore::RenderPath::nodeAtPoint):
2705         * rendering/RenderSVGImage.cpp:
2706         (WebCore::RenderSVGImage::nodeAtPoint):
2707         * rendering/RenderSVGRoot.cpp:
2708         (WebCore::RenderSVGRoot::absoluteTransform):
2709         (WebCore::RenderSVGRoot::nodeAtPoint):
2710
2711 2007-06-16  Nikolas Zimmermann  <zimmermann@kde.org>
2712
2713         Reviewed by Eric.
2714
2715         Fixes: http://bugs.webkit.org/show_bug.cgi?id=14015 (SVGTransformList::initialize() has no effect)
2716
2717         Fix SVGTransformList usage in SVG DOM exposed to JS.
2718         This also fixes SVG space invaders including most repainting issues. (still some unrelated ones left)
2719
2720         This is basically the _same_ fix applied to SVGPointList some months ago. We just forgot
2721         to add JSSVGTransformListCustom when switching from SVGTransform* -> SVGTransform (POD type).
2722
2723         * WebCore.xcodeproj/project.pbxproj:
2724         * bindings/js/JSSVGTransformListCustom.cpp: Added.
2725         (WebCore::JSSVGTransformList::clear):
2726         (WebCore::JSSVGTransformList::initialize):
2727         (WebCore::JSSVGTransformList::getItem):
2728         (WebCore::JSSVGTransformList::insertItemBefore):
2729         (WebCore::JSSVGTransformList::replaceItem):
2730         (WebCore::JSSVGTransformList::removeItem):
2731         (WebCore::JSSVGTransformList::appendItem):
2732         * ksvg2/svg/SVGCircleElement.cpp:
2733         (WebCore::SVGCircleElement::notifyAttributeChange):
2734         * ksvg2/svg/SVGEllipseElement.cpp:
2735         (WebCore::SVGEllipseElement::notifyAttributeChange):
2736         * ksvg2/svg/SVGGradientElement.cpp:
2737         (WebCore::SVGGradientElement::SVGGradientElement):
2738         * ksvg2/svg/SVGImageElement.cpp:
2739         (WebCore::SVGImageElement::notifyAttributeChange):
2740         * ksvg2/svg/SVGLineElement.cpp:
2741         (WebCore::SVGLineElement::notifyAttributeChange):
2742         * ksvg2/svg/SVGPathElement.cpp:
2743         (WebCore::SVGPathElement::notifyAttributeChange):
2744         * ksvg2/svg/SVGPatternElement.cpp:
2745         (WebCore::SVGPatternElement::SVGPatternElement):
2746         * ksvg2/svg/SVGPolyElement.cpp:
2747         (WebCore::SVGPolyElement::notifyAttributeChange):
2748         * ksvg2/svg/SVGRectElement.cpp:
2749         (WebCore::SVGRectElement::notifyAttributeChange):
2750         * ksvg2/svg/SVGStyledTransformableElement.cpp:
2751         (WebCore::SVGStyledTransformableElement::SVGStyledTransformableElement):
2752         (WebCore::SVGStyledTransformableElement::notifyAttributeChange):
2753         * ksvg2/svg/SVGStyledTransformableElement.h:
2754         * ksvg2/svg/SVGTextElement.cpp:
2755         (WebCore::SVGTextElement::SVGTextElement):
2756         * ksvg2/svg/SVGTransformList.cpp:
2757         (SVGTransformList::SVGTransformList):
2758         (SVGTransformList::context):
2759         * ksvg2/svg/SVGTransformList.h:
2760         * ksvg2/svg/SVGTransformList.idl:
2761
2762 2007-06-15  Nikolas Zimmermann  <zimmermann@kde.org>
2763
2764         Reviewed by Eric.
2765
2766         Fixes: http://bugs.webkit.org/show_bug.cgi?id=14155
2767
2768         JSSVGMatrix was not working properly.
2769         "matrix.translate(10, 10)" actually altered 'matrix' instead of returning a
2770         new SVGMatrix object, as described in SVG 1.1 specification.
2771
2772         * bindings/js/JSSVGMatrixCustom.cpp:
2773         (WebCore::JSSVGMatrix::multiply):
2774         (WebCore::JSSVGMatrix::inverse):
2775         (WebCore::JSSVGMatrix::translate):
2776         (WebCore::JSSVGMatrix::scale):
2777         (WebCore::JSSVGMatrix::scaleNonUniform):
2778         (WebCore::JSSVGMatrix::rotate):
2779         (WebCore::JSSVGMatrix::flipX):
2780         (WebCore::JSSVGMatrix::flipY):
2781         (WebCore::JSSVGMatrix::skewX):
2782         (WebCore::JSSVGMatrix::skewY):
2783         * ksvg2/svg/SVGMatrix.idl:
2784
2785 2007-06-15  Eric Seidel  <eric@webkit.org>
2786
2787         Reviewed by Niko.
2788
2789         Fix the release build.
2790
2791         * rendering/SVGRootInlineBox.cpp:
2792         (WebCore::applyTextAnchorToTextChunk):
2793
2794 2007-06-15  Rob Buis  <buis@kde.org>
2795
2796         Reviewed by Eric.
2797
2798         http://bugs.webkit.org/show_bug.cgi?id=14051
2799         <svg:image> fails to position correctly when <svg> is inside an inline <div>
2800
2801         Leave parent translation to the containers.
2802
2803         * rendering/RenderSVGImage.cpp:
2804         (WebCore::RenderSVGImage::paint):
2805
2806 2007-06-15  Nikolas Zimmermann  <zimmermann@kde.org>
2807
2808         Reviewed by Eric.
2809
2810         Fixes: http://bugs.webkit.org/show_bug.cgi?id=13963
2811
2812         Fix SVG space invaders. It actually highlighted a bad problem with our JSSVGPODTypeWrapper's.
2813         Introduce a new "2nd-level cache" for all readwrite POD properties. Subsequent calls to ie.
2814         myRect.x.baseVal.value don't create a new wrapper everytime, but are properly cached now.
2815         This leads to a massive reduction in created wrappers.
2816
2817         * bindings/js/JSSVGMatrixCustom.cpp:
2818         (WebCore::JSSVGMatrix::inverse):
2819         (WebCore::JSSVGMatrix::rotateFromVector):
2820         * bindings/js/JSSVGPODTypeWrapper.h:
2821         (WebCore::JSSVGPODTypeWrapperCreatorReadWrite::JSSVGPODTypeWrapperCreatorReadWrite):
2822         (WebCore::JSSVGPODTypeWrapperCreatorReadWrite::~JSSVGPODTypeWrapperCreatorReadWrite):
2823         (WebCore::JSSVGPODTypeWrapperCreatorReadWrite::operator PODType):
2824         (WebCore::JSSVGPODTypeWrapperCreatorReadWrite::commitChange):
2825         (WebCore::JSSVGPODTypeWrapperCreatorReadOnly::JSSVGPODTypeWrapperCreatorReadOnly):
2826         (WebCore::JSSVGPODTypeWrapperCreatorReadOnly::~JSSVGPODTypeWrapperCreatorReadOnly):
2827         (WebCore::JSSVGPODTypeWrapperCreatorReadOnly::operator PODType):
2828         (WebCore::JSSVGPODTypeWrapperCreatorReadOnly::commitChange):
2829         (WebCore::JSSVGPODTypeWrapperCreatorForList::JSSVGPODTypeWrapperCreatorForList):
2830         (WebCore::JSSVGPODTypeWrapperCreatorForList::commitChange):
2831         (WebCore::PODTypeReadWriteHashInfo::PODTypeReadWriteHashInfo):
2832         (WebCore::PODTypeReadWriteHashInfo::operator==):
2833         (WebCore::PODTypeReadWriteHashInfoHash::hash):
2834         (WebCore::PODTypeReadWriteHashInfoHash::equal):
2835         (WebCore::PODTypeReadWriteHashInfoTraits::deletedValue):
2836         (WebCore::PODTypeReadWriteHashInfoTraits::emptyValue):
2837         (WebCore::JSSVGPODTypeWrapperCache::readWriteHashMap):
2838         (WebCore::JSSVGPODTypeWrapperCache::lookupOrCreateWrapper):
2839         (WebCore::JSSVGPODTypeWrapperCache::forgetWrapper):
2840         * bindings/js/JSSVGPointListCustom.cpp:
2841         (WebCore::JSSVGPointList::removeItem):
2842         * bindings/scripts/CodeGeneratorJS.pm:
2843
2844 2007-06-14  Eric Seidel  <eric@webkit.org>
2845
2846         Reviewed by Niko.
2847
2848         Text gradients are broken on feature branch
2849         http://bugs.webkit.org/show_bug.cgi?id=14142
2850
2851         * rendering/SVGRenderSupport.cpp:
2852         (WebCore::prepareToRenderSVGContent):
2853         * rendering/SVGRootInlineBox.cpp:
2854         (WebCore::prepareTextRendering):
2855         (WebCore::SVGRootInlineBox::paint):
2856         (WebCore::SVGRootInlineBox::paintInlineBoxes):
2857         (WebCore::SVGRootInlineBox::paintChildInlineTextBox):
2858         (WebCore::SVGRootInlineBox::paintChildInlineFlowBox):
2859         * rendering/SVGRootInlineBox.h:
2860
2861 2007-06-14  Nikolas Zimmermann  <zimmermann@kde.org>
2862
2863         Reviewed by Sam.
2864
2865         Fixes: http://bugs.webkit.org/show_bug.cgi?id=11273
2866
2867         Implement pixelUnitToMillimeterX(), pixelUnitToMillimeterY() in SVGSVGElement.
2868         Use cssPixelsPerInch, just like done in CSSPrimitiveValue & SVGLength.
2869
2870         * ksvg2/svg/SVGSVGElement.cpp:
2871         (WebCore::SVGSVGElement::pixelUnitToMillimeterX):
2872         (WebCore::SVGSVGElement::pixelUnitToMillimeterY):
2873
2874 2007-06-14  Rob Buis  <buis@kde.org>
2875
2876         Reviewed by Eric.
2877
2878         http://bugs.webkit.org/show_bug.cgi?id=9752
2879         %-sizing of elements with a html parent is broken
2880
2881         Calculate width/height for length percentages when embedded in xhtml.
2882
2883         * ksvg2/svg/SVGLength.cpp:
2884         (WebCore::SVGLength::PercentageOfViewport):
2885
2886 2007-06-14  Rob Buis  <buis@kde.org>
2887
2888         Build fix.
2889
2890         * rendering/SVGCharacterLayoutInfo.cpp:
2891
2892 2007-06-14  Rob Buis  <buis@kde.org>
2893
2894         Reviewed by Eric.
2895
2896         http://bugs.webkit.org/show_bug.cgi?id=12207
2897         RenderSVGContainer should be split into multiple classes
2898         http://bugs.webkit.org/show_bug.cgi?id=14125
2899         KCanvasRenderingStyle should be removed
2900
2901         Introduce the RenderSVGRoot class and kill the KCanvas enums.
2902
2903         * WebCore.xcodeproj/project.pbxproj:
2904         * ksvg2/css/SVGRenderStyle.cpp:
2905         (WebCore::SVGRenderStyle::cssPrimitiveToLength):
2906         * ksvg2/css/SVGRenderStyle.h:
2907         * ksvg2/misc/KCanvasRenderingStyle.cpp: Removed.
2908         * ksvg2/misc/KCanvasRenderingStyle.h: Removed.
2909         * ksvg2/svg/SVGMarkerElement.cpp:
2910         (WebCore::SVGMarkerElement::createRenderer):
2911         (WebCore::SVGMarkerElement::notifyAttributeChange):
2912         * ksvg2/svg/SVGSVGElement.cpp:
2913         (WebCore::SVGSVGElement::createRenderer):
2914         * ksvg2/svg/SVGSVGElement.h:
2915         * platform/graphics/svg/SVGPaintServer.cpp:
2916         (WebCore::sharedSolidPaintServer):
2917         (WebCore::SVGPaintServer::fillPaintServer):
2918         (WebCore::SVGPaintServer::strokePaintServer):
2919         (WebCore::dashArrayFromRenderingStyle):
2920         * platform/graphics/svg/SVGPaintServer.h:
2921         * platform/graphics/svg/cg/CgSupport.cpp:
2922         (WebCore::applyStrokeStyleToContext):
2923         * platform/graphics/svg/cg/RenderPathCg.cpp:
2924         (WebCore::RenderPath::strokeContains):
2925         * rendering/RenderPath.cpp:
2926         (WebCore::RenderPath::fillContains):
2927         (WebCore::fillAndStrokePath):
2928         (WebCore::RenderPath::drawMarkersIfNeeded):
2929         * rendering/RenderSVGContainer.cpp:
2930         (WebCore::RenderSVGContainer::requiresLayer):
2931         (WebCore::RenderSVGContainer::layout):
2932         (WebCore::RenderSVGContainer::applyContentTransforms):
2933         (WebCore::RenderSVGContainer::paint):
2934         (WebCore::RenderSVGContainer::setAlign):
2935         (WebCore::RenderSVGContainer::align):
2936         (WebCore::RenderSVGContainer::viewportTransform):
2937         (WebCore::RenderSVGContainer::absoluteTransform):
2938         (WebCore::RenderSVGContainer::getAspectRatio):
2939         * rendering/RenderSVGContainer.h:
2940         * rendering/RenderSVGInlineText.cpp:
2941         * rendering/RenderSVGRoot.cpp: Added.
2942         (WebCore::RenderSVGRoot::RenderSVGRoot):
2943         (WebCore::RenderSVGRoot::~RenderSVGRoot):
2944         (WebCore::RenderSVGRoot::localTransform):
2945         (WebCore::RenderSVGRoot::setLocalTransform):
2946         (WebCore::RenderSVGRoot::requiresLayer):
2947         (WebCore::RenderSVGRoot::lineHeight):
2948         (WebCore::RenderSVGRoot::baselinePosition):
2949         (WebCore::RenderSVGRoot::layout):
2950         (WebCore::RenderSVGRoot::applyContentTransforms):
2951         (WebCore::RenderSVGRoot::paint):
2952         (WebCore::RenderSVGRoot::viewport):
2953         (WebCore::RenderSVGRoot::calcViewport):
2954         (WebCore::RenderSVGRoot::setViewBox):
2955         (WebCore::RenderSVGRoot::viewBox):
2956         (WebCore::RenderSVGRoot::setAlign):
2957         (WebCore::RenderSVGRoot::align):
2958         (WebCore::RenderSVGRoot::viewportTransform):
2959         (WebCore::RenderSVGRoot::absoluteClippedOverflowRect):
2960         (WebCore::RenderSVGRoot::addFocusRingRects):
2961         (WebCore::RenderSVGRoot::absoluteRects):
2962         (WebCore::RenderSVGRoot::absoluteTransform):
2963         (WebCore::RenderSVGRoot::fillContains):
2964         (WebCore::RenderSVGRoot::strokeContains):
2965         (WebCore::RenderSVGRoot::relativeBBox):
2966         (WebCore::RenderSVGRoot::setSlice):
2967         (WebCore::RenderSVGRoot::slice):
2968         (WebCore::RenderSVGRoot::getAspectRatio):
2969         (WebCore::RenderSVGRoot::nodeAtPoint):
2970         * rendering/RenderSVGRoot.h: Added.
2971         (WebCore::RenderSVGRoot::isSVGContainer):
2972         (WebCore::RenderSVGRoot::renderName):
2973         * rendering/RenderSVGTSpan.cpp:
2974         * rendering/RenderSVGText.cpp:
2975         (WebCore::RenderSVGText::relativeBBox):
2976         * rendering/SVGRenderTreeAsText.cpp:
2977         (WebCore::operator<<):
2978         (WebCore::writeStyle):
2979         * rendering/SVGRootInlineBox.cpp:
2980         (WebCore::SVGRootInlineBox::paint):
2981         (WebCore::SVGRootInlineBox::paintInlineBoxes):
2982
2983 2007-06-12  Nikolas Zimmermann  <zimmermann@kde.org>
2984
2985         Reviewed by Eric.
2986
2987         Fix regression: SVG images drawn in the wrong paint phase.
2988
2989         * rendering/RenderSVGImage.cpp:
2990         (WebCore::RenderSVGImage::paint):
2991
2992 2007-06-11  Rob Buis  <buis@kde.org>
2993
2994         Reviewed by weinig.
2995
2996         http://bugs.webkit.org/show_bug.cgi?id=14064
2997         fill property is reported as type SVGColor
2998
2999         Do the checks in the right order.
3000
3001         * bindings/js/kjs_css.cpp:
3002         (KJS::toJS):
3003
3004 2007-06-07  Rob Buis  <buis@kde.org>
3005
3006         Reviewed by Eric.
3007
3008         http://bugs.webkit.org/show_bug.cgi?id=12122
3009         SVGPathElement should not inherit from SVGPathParser
3010
3011         Use path builders for building Path and PathSegLists.
3012
3013         * ksvg2/svg/SVGAnimateMotionElement.cpp:
3014         (WebCore::SVGAnimateMotionElement::parseMappedAttribute):
3015         * ksvg2/svg/SVGParserUtilities.cpp:
3016         (WebCore::pointsListFromSVGData):
3017         (WebCore::SVGPathParser::~SVGPathParser):
3018         (WebCore::SVGPathParser::svgLineToHorizontal):
3019         (WebCore::SVGPathParser::svgLineToVertical):
3020         (WebCore::SVGPathParser::svgCurveToCubicSmooth):
3021         (WebCore::SVGPathParser::svgCurveToQuadratic):
3022         (WebCore::SVGPathParser::svgCurveToQuadraticSmooth):
3023         (WebCore::SVGPathParser::svgArcTo):
3024         (WebCore::PathBuilder::build):
3025         (WebCore::PathBuilder::svgMoveTo):
3026         (WebCore::PathBuilder::svgLineTo):
3027         (WebCore::PathBuilder::svgCurveToCubic):
3028         (WebCore::PathBuilder::svgClosePath):
3029         (WebCore::pathFromSVGData):
3030         (WebCore::SVGPathSegListBuilder::build):
3031         (WebCore::SVGPathSegListBuilder::svgMoveTo):
3032         (WebCore::SVGPathSegListBuilder::svgLineTo):
3033         (WebCore::SVGPathSegListBuilder::svgLineToHorizontal):
3034         (WebCore::SVGPathSegListBuilder::svgLineToVertical):
3035         (WebCore::SVGPathSegListBuilder::svgCurveToCubic):
3036         (WebCore::SVGPathSegListBuilder::svgCurveToCubicSmooth):
3037         (WebCore::SVGPathSegListBuilder::svgCurveToQuadratic):
3038         (WebCore::SVGPathSegListBuilder::svgCurveToQuadraticSmooth):
3039         (WebCore::SVGPathSegListBuilder::svgArcTo):
3040         (WebCore::SVGPathSegListBuilder::svgClosePath):
3041         (WebCore::pathSegListFromSVGData):
3042         * ksvg2/svg/SVGParserUtilities.h:
3043         * ksvg2/svg/SVGPathElement.cpp:
3044         (WebCore::SVGPathElement::SVGPathElement):
3045         (WebCore::SVGPathElement::parseMappedAttribute):
3046         * ksvg2/svg/SVGPathElement.h:
3047         * ksvg2/svg/SVGPolyElement.cpp:
3048         (WebCore::SVGPolyElement::SVGPolyElement):
3049         (WebCore::SVGPolyElement::parseMappedAttribute):
3050         * ksvg2/svg/SVGPolyElement.h:
3051
3052 2007-06-06  Eric Seidel  <eric@webkit.org>
3053
3054         Reviewed by olliej.
3055
3056         Add support for tabbing between links in an SVG file
3057         Also add support for drawing a focus ring around focused svg content.
3058         http://bugs.webkit.org/show_bug.cgi?id=8823
3059         
3060         Layout test is blocked by http://bugs.webkit.org/show_bug.cgi?id=14027
3061
3062         * css/svg.css:
3063         * ksvg2/svg/SVGAElement.cpp:
3064         (WebCore::SVGAElement::defaultEventHandler):
3065         (WebCore::SVGAElement::supportsFocus):
3066         (WebCore::SVGAElement::isFocusable):
3067         (WebCore::SVGAElement::isMouseFocusable):
3068         (WebCore::SVGAElement::isKeyboardFocusable):
3069         * ksvg2/svg/SVGAElement.h:
3070
3071 2007-06-06  Eric Seidel  <eric@webkit.org>
3072
3073         Reviewed by olliej.
3074
3075         Make SVG (mostly) support CSS outline property (and thus focus rings)
3076         http://bugs.webkit.org/show_bug.cgi?id=10849
3077
3078         Test: svg/custom/focus-ring.svg
3079
3080         * rendering/RenderPath.cpp:
3081         (WebCore::RenderPath::paint):
3082         (WebCore::RenderPath::addFocusRingRects):
3083         * rendering/RenderPath.h:
3084         * rendering/RenderSVGContainer.cpp:
3085         (WebCore::RenderSVGContainer::paint):
3086         (WebCore::RenderSVGContainer::addFocusRingRects):
3087         * rendering/RenderSVGContainer.h:
3088         * rendering/RenderSVGImage.cpp:
3089         (WebCore::RenderSVGImage::paint):
3090         (WebCore::RenderSVGImage::addFocusRingRects):
3091         * rendering/RenderSVGImage.h:
3092
3093 2007-06-06  Eric Seidel  <eric@webkit.org>
3094
3095         Reviewed by weinig.
3096         
3097         Break out common SVG rendering logic into prepareToRenderSVGContent in SVGRenderSupport
3098
3099         No test cases should be changed by this.
3100
3101         * WebCore.xcodeproj/project.pbxproj:
3102         * rendering/RenderPath.cpp:
3103         (WebCore::fillAndStrokePath):
3104         (WebCore::RenderPath::paint):
3105         * rendering/RenderSVGContainer.cpp:
3106         (WebCore::RenderSVGContainer::RenderSVGContainer):
3107         (WebCore::RenderSVGContainer::requiresLayer):
3108         (WebCore::RenderSVGContainer::isOutermostSVG):
3109         (WebCore::RenderSVGContainer::layout):
3110         (WebCore::RenderSVGContainer::applyContentTransforms):
3111         (WebCore::RenderSVGContainer::paint):
3112         (WebCore::RenderSVGContainer::viewportTransform):
3113         (WebCore::RenderSVGContainer::absoluteTransform):
3114         * rendering/RenderSVGContainer.h:
3115         * rendering/RenderSVGImage.cpp:
3116         (WebCore::RenderSVGImage::paint):
3117         (WebCore::RenderSVGImage::translationForAttributes):
3118         * rendering/SVGRenderSupport.cpp: Added.
3119         (WebCore::prepareToRenderSVGContent):
3120         * rendering/SVGRenderSupport.h: Added.
3121         * rendering/SVGRootInlineBox.cpp:
3122         (WebCore::prepareTextRendering):
3123         (WebCore::SVGRootInlineBox::paint):
3124         (WebCore::SVGRootInlineBox::paintInlineBoxes):
3125
3126 2007-06-06  Rob Buis  <buis@kde.org>
3127
3128         Reviewed by Eric.
3129
3130         http://bugs.webkit.org/show_bug.cgi?id=13976
3131         getPresentationAttribute not implemented
3132
3133         Implement getPresentationAttribute.
3134
3135         * ksvg2/svg/SVGStylable.h:
3136         * ksvg2/svg/SVGStylable.idl:
3137         * ksvg2/svg/SVGStyledElement.cpp:
3138         (WebCore::SVGStyledElement::getPresentationAttribute):
3139         * ksvg2/svg/SVGStyledElement.h:
3140
3141 2007-06-06  Rob Buis  <buis@kde.org>
3142
3143         Reviewed by olliej and eric.
3144
3145         http://bugs.webkit.org/show_bug.cgi?id=12430
3146         SVG has two transform parsers when it should have one.
3147
3148         Refactor SVGTransformable parser so SVGAnimateTransformElement can reuse it better.
3149
3150         * ksvg2/svg/SVGAnimateTransformElement.cpp:
3151         (WebCore::SVGAnimateTransformElement::calculateFromAndToValues):
3152         * ksvg2/svg/SVGAnimateTransformElement.h:
3153         * ksvg2/svg/SVGTransformable.cpp:
3154         (WebCore::):
3155         (WebCore::SVGTransformable::parseTransformValue):
3156         (WebCore::SVGTransformable::parseTransformAttribute):
3157         * ksvg2/svg/SVGTransformable.h:
3158
3159 2007-06-05  Eric Seidel  <eric@webkit.org>
3160
3161         Reviewed by olliej.
3162
3163         Commit files missing from previous commit, oops!
3164         
3165         * platform/graphics/svg/SVGResourceMasker.cpp:
3166         (WebCore::SVGResourceMasker::SVGResourceMasker):
3167         (WebCore::SVGResourceMasker::invalidate):
3168         * platform/graphics/svg/SVGResourceMasker.h:
3169         * platform/graphics/svg/cg/SVGResourceMaskerCg.mm:
3170         (WebCore::SVGResourceMasker::applyMask):
3171
3172 2007-06-01  Eric Seidel  <eric@webkit.org>
3173
3174         Reviewed by olliej.
3175
3176         Add support for maskUnits and maskContentUnits
3177         http://bugs.webkit.org/show_bug.cgi?id=12568
3178         
3179         This is covered by the W3C tests (including mask-intro01)
3180
3181         * ksvg2/svg/SVGMaskElement.cpp:
3182         (WebCore::SVGMaskElement::SVGMaskElement):
3183         (WebCore::SVGMaskElement::parseMappedAttribute):
3184         (WebCore::SVGMaskElement::drawMaskerContent):
3185         (WebCore::SVGMaskElement::canvasResource):
3186         (WebCore::SVGMaskElement::notifyAttributeChange):
3187         * ksvg2/svg/SVGMaskElement.h:
3188         * ksvg2/svg/SVGMaskElement.idl:
3189         * platform/graphics/svg/SVGResourceMasker.cpp:
3190         (WebCore::SVGResourceMasker::SVGResourceMasker):
3191         (WebCore::SVGResourceMasker::invalidate):
3192         * platform/graphics/svg/SVGResourceMasker.h:
3193         * platform/graphics/svg/cg/SVGResourceMaskerCg.mm:
3194         (WebCore::SVGResourceMasker::applyMask):
3195
3196 2007-06-01  Eric Seidel  <eric@webkit.org>
3197
3198         Reviewed by lars.
3199         
3200         Cursor does not change to hand over links containing <use>
3201         http://bugs.webkit.org/show_bug.cgi?id=12630
3202
3203         Test: manual-tests/svg-link-hover-use.svg
3204
3205         * manual-tests/svg-link-hover-use.svg: Added.
3206         * rendering/RenderLayer.cpp:
3207         (WebCore::RenderLayer::hitTest): use eventParentNode instead of parentNode
3208
3209 2007-06-01  Eric Seidel  <eric@webkit.org>
3210
3211         Reviewed by olliej.
3212
3213         SVG is not correctly respecting scroll during hit testing
3214         http://bugs.webkit.org/show_bug.cgi?id=13083
3215
3216         Test: svg/custom/scroll-hit-test.svg
3217
3218         * rendering/RenderPath.cpp:
3219         (WebCore::RenderPath::nodeAtPoint):
3220         * rendering/RenderSVGContainer.cpp:
3221         (WebCore::RenderSVGContainer::nodeAtPoint):
3222
3223 2007-06-01  Eric Seidel  <eric@webkit.org>
3224
3225         Reviewed by hyatt.
3226
3227         Fix for: http://bugs.webkit.org/show_bug.cgi?id=12187
3228
3229         Tests: fast/dom/attribute-case-sensitivity.html, fast/dom/attribute-case-sensitivity2.xhtml
3230
3231         * dom/Element.cpp:
3232         (WebCore::shouldIgnoreAttributeCase): check to make sure element is an HTMLElement
3233         (WebCore::Element::getAttribute):
3234         (WebCore::Element::setAttribute):
3235         (WebCore::Element::removeAttribute):
3236         (WebCore::Element::getAttributeNode):
3237         (WebCore::Element::hasAttribute):
3238         * dom/NamedAttrMap.cpp:
3239         (WebCore::shouldIgnoreAttributeCase):
3240         (WebCore::NamedAttrMap::getNamedItem):
3241         (WebCore::NamedAttrMap::removeNamedItem):
3242
3243 2007-05-31  Eric Seidel  <eric@webkit.org>
3244
3245         Reviewed by Niko.
3246
3247         Links are activated based on mouse down events instead of click events
3248         http://bugs.webkit.org/show_bug.cgi?id=12570
3249         
3250         Test: svg/custom/prevent-default.svg
3251
3252         * html/HTMLAnchorElement.cpp: use MiddleButton and RightButton instead of 1 and 2
3253         (WebCore::HTMLAnchorElement::defaultEventHandler):
3254         * ksvg2/svg/SVGAElement.cpp:
3255         (WebCore::SVGAElement::defaultEventHandler): make it function more like the HTML side
3256
3257 2007-05-30  Rob Buis  <buis@kde.org>
3258
3259         Reviewed by Darin.
3260
3261         http://bugs.webkit.org/show_bug.cgi?id=11272
3262         Implement currentScale(), setCurrentScale() and currentTranslate() in SVGSVGElement
3263
3264         Allow zooming and panning, thereby implementing the above methods.
3265
3266         * ksvg2/svg/SVGDocument.cpp:
3267         (WebCore::SVGDocument::zoomAndPanEnabled):
3268         (WebCore::SVGDocument::startPan):
3269         (WebCore::SVGDocument::updatePan):
3270         * ksvg2/svg/SVGDocument.h:
3271         * ksvg2/svg/SVGSVGElement.cpp:
3272         (WebCore::SVGSVGElement::currentScale):
3273         (WebCore::SVGSVGElement::setCurrentScale):
3274         (WebCore::SVGSVGElement::currentTranslate):
3275         (WebCore::SVGSVGElement::setCurrentTranslate):
3276         * ksvg2/svg/SVGSVGElement.h:
3277         * page/EventHandler.cpp:
3278         (WebCore::EventHandler::EventHandler):
3279         (WebCore::EventHandler::handleMousePressEvent):
3280         (WebCore::EventHandler::handleMouseMoveEvent):
3281         (WebCore::EventHandler::handleMouseReleaseEvent):
3282         * page/EventHandler.h:
3283         * page/Frame.cpp:
3284         (WebCore::Frame::setZoomFactor):
3285         * rendering/RenderSVGContainer.cpp:
3286         (WebCore::RenderSVGContainer::layout):
3287         (WebCore::RenderSVGContainer::paint):
3288         (WebCore::RenderSVGContainer::absoluteTransform):
3289
3290 2007-05-30  Nikolas Zimmermann  <zimmermann@kde.org>
3291
3292         Reviewed by Oliver.
3293
3294         Fix regression: gradient on fill of text works again!
3295
3296         * platform/graphics/svg/cg/SVGPaintServerGradientCg.cpp:
3297         (WebCore::SVGPaintServerGradient::teardown):
3298
3299 2007-05-29  Nikolas Zimmermann  <zimmermann@kde.org>
3300
3301         Reviewed by Oliver.
3302
3303         Fix "jumpy" selection by correcting the way svgCharacterHitsPosition works.
3304         I basically mixed up the "closest character to position" logic.
3305
3306         * rendering/RenderSVGInlineText.cpp: Only call svgCharacterHitsPosition for the firstTextBox -> it handles all children anyway.
3307         (WebCore::RenderSVGInlineText::positionForCoordinates):
3308         * rendering/SVGInlineTextBox.cpp:
3309         (WebCore::SVGInlineTextBox::closestCharacterToPosition): Fix logic - was really broken!
3310         (WebCore::SVGInlineTextBox::svgCharacterHitsPosition):
3311         (WebCore::SVGInlineTextBox::nodeAtPoint): Do not use svgCharacterHitsPosition here - too accurate!
3312                                                   We don't want to loose the 'text' cursor if one is just between two characters.
3313
3314 2007-05-24  Nikolas Zimmermann  <zimmermann@kde.org>
3315
3316         Reviewed by Oliver.
3317
3318         Add new code path dumping SVG text engine specific layout test results.
3319         Finally the dumped results are actually accurate and respond to the
3320         rendered glyphs. This has never been correct so far.
3321
3322         * rendering/RenderTreeAsText.cpp:
3323         (WebCore::quoteAndEscapeNonPrintables):
3324         (WebCore::write):
3325         * rendering/RenderTreeAsText.h:
3326         * rendering/SVGInlineTextBox.h:
3327         * rendering/SVGRenderTreeAsText.cpp:
3328         (WebCore::operator<<):
3329         (WebCore::containsInlineTextBox):
3330         (WebCore::writeSVGInlineText):
3331         (WebCore::write):
3332         * rendering/SVGRenderTreeAsText.h:
3333         * rendering/SVGRootInlineBox.cpp:
3334         (WebCore::topLeftPositionOfCharacterRange):
3335         (WebCore::cummulatedWidthOfInlineBoxCharacterRange):
3336         (WebCore::cummulatedHeightOfInlineBoxCharacterRange):
3337         (WebCore::SVGRootInlineBox::computePerCharacterLayoutInformation):
3338         * rendering/SVGRootInlineBox.h:
3339
3340 2007-05-20  Nikolas Zimmermann  <zimmermann@kde.org>
3341
3342         Reviewed by Oliver.
3343
3344         Fixes: http://bugs.webkit.org/show_bug.cgi?id=12698 (SVG text needs a special per-character layout mode.)
3345
3346         Fixes: http://bugs.webkit.org/show_bug.cgi?id=6420 (<text> does not respect x,y offset lists)
3347         Fixes: http://bugs.webkit.org/show_bug.cgi?id=6425 (<textPath> element not implemented)
3348         Fixes: http://bugs.webkit.org/show_bug.cgi?id=6481 (text-anchor (vertical) does not work in SVG text elements)
3349         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)
3350         Fixes: http://bugs.webkit.org/show_bug.cgi?id=12376 (glyph rotation in text/tspan not implemented)
3351         Fixes: http://bugs.webkit.org/show_bug.cgi?id=12377 (multiple dx and dy attributes not respected in text and tspan elements)
3352         Fixes: http://bugs.webkit.org/show_bug.cgi?id=12574 (<text> does not handle baseline-shift correctly)
3353
3354         Introduce new experimental SVG text engine - after 5+ months of hacking.
3355
3356         Add textPath support, absolute positioned SVG characters, vertical text,
3357         text rotation, baseline-shift, text chunks spanning <tspan>'s etc.
3358
3359         Check my Flickr page for screenshots: http://www.flickr.com/photos/43532360@N00 (a bit outdated)
3360
3361         Fixes/Improvments:
3362         - animate-elem-40-t.svg (x/y lists respected on <text> now)
3363         - interact-cursor-01-f.svg (text-anchor correctly handled in <text><a> situations)
3364         - struct-frag-05-t.svg (ditto)
3365         - text-align-02-b.svg (baseline-shift recognized)
3366         - text-align-04-b.svg (textPath displayed)
3367         - text-align-05-b.svg (text-anchor & vertical text handled correctly)
3368         - text-align-06-b.svg (baseline-shift & vertical text handled correctly)
3369         - text-deco-01-b.svg (longstanding regression fixed for text-decoration)
3370         - text-path-01-b.svg (all textPaths are displayed correctly)
3371         - text-text-04-t.svg (all x/y/dx/dy list situations work fine now)
3372         - text-text-05-t.svg (ditto)
3373         - text-text-06-t.svg (ditto)
3374         - text-text-07-t.svg (rotation works fine now)
3375         - text-tspan-01-b.svg (per character placment works great in all situations)
3376
3377         Most files using text-anchor show 0.5-1% differences because the shift offset calculation is more correct now.
3378
3379         Regressions:    
3380         - Gradient on fill is broken (on stroke works) -> this is a regression (easy to fix soon)
3381           js-late-gradient-and-object-creation.svg & js-late-gradient-creation.svg & pservers-grad-08-b.svg & pservers-grad-11-b.svg are broken
3382
3383         Complete list of missing things:
3384         - 'textLength' / 'lengthAdjust' properties on <text>/<tspan> not yet handled.
3385         - 'dominant-baseline / alignment-baseline missing (neither FF/Opera/Batik support this)
3386         - 'kerning' property ignored
3387         - 'glyph-orientation-vertical' / 'glyph-orientation-horizontal' not yet handled.
3388         - Hebrew text selection broken (discontinous selection doesn't work)
3389         - <textPath> doesn't yet participate in text selection
3390         - <textPath> 'text-anchor' handling is flawed
3391         - <textPath> doesn't yet handle 'method' / 'spacing' properties
3392         - 'letter-spacing' / 'word-spacing' is still handled in the "legacy" mode. That means it only works
3393           for simple cases -> won't work for textPath's for instance
3394         - SVG fonts (<altGlyph>, <font> ..... tons more)
3395
3396         * DerivedSources.make: Add DOM/JSSVGTextPathElement.h to build
3397         * WebCore.xcodeproj/project.pbxproj: Add textPath related files to build
3398         * css/svg.css: Correct white-space default setting for textPath element
3399         * ksvg2/svg/SVGFEFloodElement.cpp: Missing include (experimental build was broken)
3400         * ksvg2/svg/SVGTSpanElement.cpp: Recognize textPath children.
3401         (WebCore::SVGTSpanElement::childShouldCreateRenderer):
3402         * ksvg2/svg/SVGTextElement.cpp: Ditto.
3403         (WebCore::SVGTextElement::childShouldCreateRenderer):
3404         * ksvg2/svg/SVGTextPathElement.cpp: Added.
3405         (WebCore::SVGTextPathElement::SVGTextPathElement):
3406         (WebCore::SVGTextPathElement::~SVGTextPathElement):
3407         (WebCore::SVGTextPathElement::parseMappedAttribute):
3408         (WebCore::SVGTextPathElement::createRenderer):
3409         (WebCore::SVGTextPathElement::childShouldCreateRenderer):
3410         (WebCore::SVGTextPathElement::insertedIntoDocument):
3411         (WebCore::SVGTextPathElement::buildPendingResource):
3412         (WebCore::SVGTextPathElement::attach):
3413         * ksvg2/svg/SVGTextPathElement.h: Added.
3414         (WebCore::):
3415         (WebCore::SVGTextPathElement::rendererIsNeeded):
3416         (WebCore::SVGTextPathElement::contextElement):
3417         * ksvg2/svg/SVGTextPathElement.idl: Added.
3418         * ksvg2/svg/svgtags.in: Add textPath tag.
3419         * rendering/InlineTextBox.cpp: Make two methods non static to share with SVG.
3420         (WebCore::correctedTextColor):
3421         (WebCore::updateGraphicsContext):
3422         * rendering/InlineTextBox.h:
3423         * rendering/RenderSVGInlineText.cpp: Special positionForCoordinates() implementation. Stub caretRect() for SVG.
3424         (WebCore::RenderSVGInlineText::selectionRect):
3425         (WebCore::RenderSVGInlineText::caretRect):
3426         (WebCore::RenderSVGInlineText::positionForCoordinates):
3427         * rendering/RenderSVGInlineText.h:
3428         * rendering/RenderSVGTextPath.cpp: Added.
3429         (WebCore::RenderSVGTextPath::RenderSVGTextPath):
3430         (WebCore::RenderSVGTextPath::layoutPath):
3431         (WebCore::RenderSVGTextPath::setLayoutPath):
3432         (WebCore::RenderSVGTextPath::startOffset):
3433         (WebCore::RenderSVGTextPath::setStartOffset):
3434         (WebCore::RenderSVGTextPath::exactAlignment):
3435         (WebCore::RenderSVGTextPath::setExactAlignment):
3436         (WebCore::RenderSVGTextPath::stretchMethod):
3437         (WebCore::RenderSVGTextPath::setStretchMethod):
3438         (WebCore::RenderSVGTextPath::absoluteRects):
3439         * rendering/RenderSVGTextPath.h: Added.
3440         (WebCore::RenderSVGTextPath::renderName):
3441         * rendering/RenderText.cpp: Fix indention and use StringImpl::empty() instead of creating an empty string manually.
3442         (WebCore::RenderText::setTextInternal):
3443         * rendering/RootInlineBox.h: Add virtual no-op computePerCharacterLayoutInformation().
3444         (WebCore::RootInlineBox::computePerCharacterLayoutInformation):
3445         * rendering/SVGCharacterLayoutInfo.cpp: Added.
3446         (WebCore::calculateBaselineShift):
3447         (WebCore::SVGCharacterLayoutInfo::SVGCharacterLayoutInfo):
3448         (WebCore::SVGCharacterLayoutInfo::xValueAvailable):
3449         (WebCore::SVGCharacterLayoutInfo::yValueAvailable):
3450         (WebCore::SVGCharacterLayoutInfo::dxValueAvailable):
3451         (WebCore::SVGCharacterLayoutInfo::dyValueAvailable):
3452         (WebCore::SVGCharacterLayoutInfo::angleValueAvailable):
3453         (WebCore::SVGCharacterLayoutInfo::baselineShiftValueAvailable):
3454         (WebCore::SVGCharacterLayoutInfo::xValueNext):
3455         (WebCore::SVGCharacterLayoutInfo::yValueNext):
3456         (WebCore::SVGCharacterLayoutInfo::dxValueNext):
3457         (WebCore::SVGCharacterLayoutInfo::dyValueNext):
3458         (WebCore::SVGCharacterLayoutInfo::angleValueNext):
3459         (WebCore::SVGCharacterLayoutInfo::baselineShiftValueNext):
3460         (WebCore::SVGCharacterLayoutInfo::processedSingleCharacter):
3461         (WebCore::SVGCharacterLayoutInfo::processedChunk):
3462         (WebCore::SVGCharacterLayoutInfo::nextPathLayoutPointAndAngle):
3463         (WebCore::SVGCharacterLayoutInfo::inPathLayout):
3464         (WebCore::SVGCharacterLayoutInfo::setInPathLayout):
3465         (WebCore::SVGCharacterLayoutInfo::addLayoutInformation):
3466         (WebCore::SVGCharacterLayoutInfo::addStackContent):
3467         (WebCore::SVGCharacterLayoutInfo::xStackWalk):
3468         (WebCore::SVGCharacterLayoutInfo::yStackWalk):
3469         (WebCore::SVGCharacterLayoutInfo::dxStackWalk):
3470         (WebCore::SVGCharacterLayoutInfo::dyStackWalk):
3471         (WebCore::SVGCharacterLayoutInfo::angleStackWalk):
3472         (WebCore::SVGCharacterLayoutInfo::baselineShiftStackWalk):
3473         * rendering/SVGCharacterLayoutInfo.h: Added.
3474         (WebCore::PositionedVector::Type):
3475         (WebCore::PositionedVector::position):
3476         (WebCore::PositionedVector::advance):
3477         (WebCore::PositionedVector::valueAtCurrentPosition):
3478         (WebCore::SVGCharacterLayoutInfo::):
3479         (WebCore::SVGInlineBoxCharacterRange::SVGInlineBoxCharacterRange):
3480         (WebCore::SVGInlineBoxCharacterRange::isOpen):
3481         (WebCore::SVGInlineBoxCharacterRange::isClosed):
3482         (WebCore::SVGTextChunk::SVGTextChunk):
3483         (WebCore::SVGTextChunkLayoutInfo::SVGTextChunkLayoutInfo):
3484         * rendering/SVGInlineFlowBox.cpp: Make all methods no-ops when using the new text engine.
3485         (WebCore::SVGInlineFlowBox::paint):
3486         (WebCore::SVGInlineFlowBox::placeBoxesHorizontally):
3487         (WebCore::SVGInlineFlowBox::verticallyAlignBoxes):
3488         * rendering/SVGInlineFlowBox.h:
3489         * rendering/SVGInlineTextBox.cpp: Add new text selection / character hit detection related code.
3490         (WebCore::SVGInlineTextBox::SVGInlineTextBox):
3491         (WebCore::SVGInlineTextBox::selectionTop):
3492         (WebCore::SVGInlineTextBox::svgRootInlineBox):
3493         (WebCore::SVGInlineTextBox::closestCharacterToPosition):
3494         (WebCore::SVGInlineTextBox::svgCharacterHitsPosition):
3495         (WebCore::SVGInlineTextBox::offsetForPosition):
3496         (WebCore::SVGInlineTextBox::positionForOffset):
3497         (WebCore::SVGInlineTextBox::nodeAtPoint):
3498         (WebCore::SVGInlineTextBox::selectionRect):
3499         * rendering/SVGInlineTextBox.h:
3500         * rendering/SVGRootInlineBox.cpp: The heart of the new text engine lives here.
3501         (WebCore::prepareTextRendering):
3502         (WebCore::isVerticalWritingMode):
3503         (WebCore::SVGRootInlineBox::paint):
3504         (WebCore::SVGRootInlineBox::placeBoxesHorizontally):
3505         (WebCore::SVGRootInlineBox::verticallyAlignBoxes):
3506         (WebCore::SVGRootInlineBox::cummulatedWidthOfSelectionRange):
3507         (WebCore::cummulatedWidthOfInlineBoxCharacterRange):
3508         (WebCore::cummulatedWidthOfTextChunk):
3509         (WebCore::cummulatedHeightOfTextChunk):
3510         (WebCore::applyTextAnchorToTextChunk):
3511         (WebCore::SVGRootInlineBox::computePerCharacterLayoutInformation):
3512         (WebCore::totalAdvanceOfInlineTextBox):
3513         (WebCore::totalAdvanceOfInlineBox):
3514         (WebCore::SVGRootInlineBox::buildLayoutInformation):
3515         (WebCore::SVGRootInlineBox::layoutInlineBoxes):
3516         (WebCore::SVGRootInlineBox::buildLayoutInformationForTextBox):
3517         (WebCore::SVGRootInlineBox::buildTextChunks):
3518         (WebCore::SVGRootInlineBox::svgTextChunks):
3519         (WebCore::SVGRootInlineBox::layoutTextChunks):
3520         (WebCore::SVGRootInlineBox::paintSelectionForTextBox):
3521         (WebCore::SVGRootInlineBox::paintInlineBoxes):
3522         (WebCore::SVGRootInlineBox::paintCharacterRangeForTextBox):
3523         * rendering/SVGRootInlineBox.h:
3524         * rendering/bidi.cpp: Call the new computePerCharacterLayoutInformation() method.
3525         (WebCore::RenderBlock::layoutInlineChildren):
3526
3527 2007-05-10  Eric Seidel  <eric@webkit.org>
3528
3529         Reviewed by olliej.
3530
3531         http://bugs.webkit.org/show_bug.cgi?id=11931
3532         PathCG fails to hit on unclosed sub-paths
3533
3534         Test: svg/custom/hit-test-unclosed-subpaths.svg
3535
3536         * platform/graphics/cg/PathCG.cpp:
3537         (WebCore::copyClosingSubpathsApplierFunction):
3538         (WebCore::copyCGPathClosingSubpaths):
3539         (WebCore::Path::contains): use new copy & close function
3540
3541 === End merge of feature-branch 2007-10-12 ===
3542
3543 2007-10-11  Jon Honeycutt  <jhoneycutt@apple.com>
3544
3545         Reviewed by Anders.
3546
3547         Handle a race condition that could arise if a plugin was loaded while it
3548         was scheduled to be freed: check whether the timer that schedules
3549         library frees is active in PluginPackageWin::load().
3550
3551         * plugins/win/PluginPackageWin.cpp:
3552         (WebCore::PluginPackageWin::freeLibrarySoon): Added assertions
3553         (WebCore::PluginPackageWin::freeLibraryTimerFired): Added assertion
3554         (WebCore::PluginPackageWin::load): If we are scheduled to free this
3555         library, cancel the timer, and don't call LoadLibrary
3556
3557 2007-10-11  Justin Garcia  <justin.garcia@apple.com>
3558
3559         Reviewed by Harrison.
3560
3561         <rdar://problem/5483567> REGRESSION (Tiger only): Pasting words copied from TextEdit in Mail adds extra newline
3562         
3563         * editing/ReplaceSelectionCommand.cpp:
3564         (WebCore::ReplaceSelectionCommand::removeUnrenderedTextNodesAtEnds): Added.
3565         We would like to insert the fragment as-is if possible, but AppKit on Tiger
3566         creates fragments from RTF data that have carriage returns and spaces at the
3567         beginning and end, and those need to be removed since they'll interfere with 
3568         paragraph merging.
3569         (WebCore::ReplaceSelectionCommand::doApply):
3570         * editing/ReplaceSelectionCommand.h:
3571
3572 2007-10-10  Justin Garcia  <justin.garcia@apple.com>
3573
3574         Reviewed by Maciej.
3575         
3576         <rdar://problem/5521237> Pasting a word copied from TextEdit after a regular, breaking space, adds a leading newline
3577         
3578         * editing/CompositeEditCommand.cpp:
3579         (WebCore::CompositeEditCommand::prepareWhitespaceAtPositionForSplit):
3580         Fixed a typo.
3581
3582 2007-10-10  Jon Honeycutt  <jhoneycutt@apple.com>
3583
3584         Reviewed by Darin.
3585
3586         <rdar://5530519> REGRESSION (303-310A18): Crash when closing tab with
3587         pdf file (Reader 7 only)
3588
3589         Reader 7 subclasses its parent window, so posting a WM_DESTROY to this
3590         window puts us in plugin code. When the plugin forwards the message
3591         back to the original window proc, and we free the plugin library from
3592         there, we will jump back to code we just freed when we return, so delay 
3593         calling FreeLibrary at least until the next message loop
3594
3595         * plugins/win/PluginPackageWin.cpp:
3596         (WebCore::PluginPackageWin::freeLibrarySoon): Start a timer to free the
3597         plugin library
3598         (WebCore::PluginPackageWin::freeLibraryTimerFired): Free the library
3599         (WebCore::PluginPackageWin::PluginPackageWin): Initialize the timer that
3600         will free this library
3601         (WebCore::PluginPackageWin::unloadWithoutShutdown): Call
3602         freeLibrarySoon()
3603         * plugins/win/PluginPackageWin.h: Added m_freeLibraryTimer
3604
3605 2007-10-11  Ada Chan  <adachan@apple.com>
3606
3607         <rdar://problem/5534421> 
3608         Switched to using wkGetDefaultHTTPCookieStorage() and removed some cookie-related
3609         methods we no longer need in ResourceHandle.
3610         
3611         <rdar://problem/5244261> "Never" cookie policy was ignored on windows
3612         Need to set the cookie accept policy on each CFURLRequest.
3613         
3614         Reviewed by Oliver.
3615
3616         * platform/network/ResourceHandle.h:
3617         * platform/network/cf/ResourceHandleCFNet.cpp:
3618         (WebCore::makeFinalRequest):
3619         * platform/network/cf/ResourceRequestCFNet.cpp:
3620         (WebCore::ResourceRequest::doUpdatePlatformRequest):
3621         * platform/network/win/CookieJarWin.cpp:
3622         (WebCore::setCookies):
3623         (WebCore::cookies):
3624         (WebCore::cookiesEnabled):
3625
3626 2007-10-11  Mark Rowe  <mrowe@apple.com>
3627
3628         Reviewed by Tim Hatcher.
3629
3630         Fix for <rdar://problem/5488678>.  Disable debugging symbols in production builds for 10.4
3631         PowerPC to prevent a huge STABS section from being generated.
3632
3633         * Configurations/Base.xcconfig:
3634
3635 2007-10-11  Lars Knoll  <lars@trolltech.com>
3636
3637         Reviewed by Erik Seidel and Simon.
3638
3639         Ensure that setting innerHTML on an element doesn't do
3640         weird things with the document.
3641         Fixes most issues with http://bugs.webkit.org/show_bug.cgi?id=15456
3642
3643         Test: fast/innerHTML/innerHTML-changing-document-properties.xhtml
3644
3645         * dom/XMLTokenizer.cpp:
3646         (WebCore::XMLTokenizer::write):
3647         (WebCore::XMLTokenizer::startDocument):
3648         (WebCore::XMLTokenizer::end):
3649         (WebCore::):
3650
3651 2007-10-10  George Staikos  <staikos@kde.org>
3652
3653         Reviewed by Adam Roben.
3654
3655         Fix Qt build on Win32 with VS2005.
3656
3657         * loader/FTPDirectoryDocument.cpp:
3658         (WebCore::processFileDateString):
3659         * loader/FTPDirectoryParser.cpp:
3660         (WebCore::parseOneFTPLine):
3661
3662 2007-10-10  Alice Liu  <alice.liu@apple.com>
3663
3664         Reviewed by Geoff Garen.
3665
3666         Fixed <rdar://5464402> Crash when running fast/frames/onload-remove-iframe-crash.html in DRT
3667         createFrame() now returns a RefPtr instead of a raw Frame pointer. 
3668         Making this change improves the way we handle frames on Windows webkit. 
3669
3670         * loader/FrameLoader.cpp:
3671         (WebCore::FrameLoader::loadSubframe):
3672         * loader/FrameLoaderClient.h:
3673         * platform/graphics/svg/SVGImageEmptyClients.h:
3674         (WebCore::SVGEmptyFrameLoaderClient::createFrame):
3675
3676 2007-10-10  Simon Hausmann  <hausmann@kde.org>
3677
3678         Reviewed by Lars.
3679
3680         Fix compilation using gcc 4.3. Header files have been reorganized and as a result some extra
3681         includes are needed for INT_MAX, std::auto_ptr and the like.
3682
3683         WARNING: NO TEST CASES ADDED OR CHANGED
3684
3685         * bridge/AXObjectCache.h:
3686         * ksvg2/misc/SVGDocumentExtensions.h:
3687         * platform/Base64.cpp:
3688         * platform/graphics/svg/SVGPaintServerPattern.h:
3689         * platform/graphics/svg/SVGResourceMasker.h:
3690
3691 2007-10-08  Sam Weinig  <sam@webkit.org>
3692
3693         Reviewed by Steve Falkenburg.
3694
3695         Fix for <rdar://problem/5519698> CrashTracer: [USER] 47 crashes in Safari at com.apple.WebCore: WebCore::XMLTokenizer::lineNumber const + 9
3696
3697         Test: fast/innerHTML/innerHTML-script-tag-crash.xhtml
3698
3699         * dom/XMLTokenizer.cpp:
3700         (WebCore::XMLTokenizer::lineNumber): Return 1 when there is no context.
3701         (WebCore::XMLTokenizer::columnNumber): ditto.
3702
3703 2007-10-08  Adam Roben  <aroben@apple.com>
3704
3705         Fix Bug 15305: Crash when dragging an image when "load images automatically" preference is off
3706
3707         http://bugs.webkit.org/show_bug.cgi?id=15305
3708         <rdar://problem/5524774>
3709
3710         Reviewed by Eric Seidel.
3711
3712         No test possible: to reproduce this you have to change a WebKit
3713         preference and reload the page. See
3714         http://bugs.webkit.org/show_bug.cgi?id=15414
3715
3716         * platform/win/ClipboardWin.cpp:
3717         (WebCore::createGlobalImageFileDescriptor): ASSERT that we have an
3718         image and that it has a SharedBuffer.
3719         (WebCore::writeImageToDataObject): The fix: null-check imageBuffer.
3720
3721 2007-10-05  Geoffrey Garen  <ggaren@apple.com>
3722
3723         Reviewed by Sam Weinig.
3724         
3725         New fix for <rdar://problem/5522487> REGRESSION: With JavaScript 
3726         disabled, any page load causes a crash in PropertyMap::put
3727         
3728         Explicitly remove the "document" property from the window. The old 
3729         solution would leave a stale "document" property around after JavaScript
3730         was re-enabled.
3731
3732         The architecture for disabling JavaScript could use some consolidation. 
3733         It seems wrong that a script proxy even exists when JavaScript is 
3734         disabled. It also seems wrong that so many individual call sites are 
3735         responsible for checking whether JavaScript is enabled. I've filed a 
3736         bug about this: http://bugs.webkit.org/show_bug.cgi?id=15385.
3737
3738         * bindings/js/kjs_proxy.cpp:
3739         (WebCore::KJSProxy::clearDocumentWrapper):
3740         * bindings/js/kjs_proxy.h:
3741         * page/Frame.cpp:
3742         (WebCore::Frame::setDocument):
3743
3744 2007-10-05  Jon Honeycutt  <jhoneycutt@apple.com>
3745
3746         Reviewed by Anders.
3747
3748         <rdar://5520913> Ticketmaster.com doesn't display correctly (Flash
3749         related?)
3750
3751         The plugin is requesting files that don't exist on the server, and
3752         we are passing the 404 error page to the plugin. This change cancels the
3753         stream if the response code indicates a failure.
3754
3755         This is a port of the safari / mac code.
3756
3757         * loader/win/NetscapePlugInStreamLoaderWin.cpp:
3758         (WebCore::NetscapePlugInStreamLoader::didReceiveResponse): If the
3759         response code indicates a failure, cancel the stream
3760
3761 2007-10-05  Geoffrey Garen  <ggaren@apple.com>
3762
3763         Reviewed by Sam Weinig.
3764         
3765         Fixed <rdar://problem/5522487> REGRESSION: With JavaScript disabled, 
3766         any page load causes a crash in PropertyMap::put
3767         
3768         The problem was that we were using JavaScript when JavaScript was
3769         disabled. The architecture for disabling JavaScript could use some
3770         consolidation, but this is the simplest, safest change for now.
3771         
3772         Currently passing layout tests still pass.
3773
3774         * bindings/js/kjs_proxy.cpp:
3775         (WebCore::KJSProxy::updateDocumentWrapper):
3776
3777 2007-10-04  Beth Dakin  <bdakin@apple.com>
3778
3779         Reviewed by John Sullivan.
3780
3781         Fix for <rdar://problem/5441823> REGRESSION (r25142, Tiger only): 
3782         Vertical scroll bar not redrawn properly when going back in history 
3783         (15033)
3784
3785         This fix if-defs r25142 to be Leopard-only since it causes 
3786         correctness issues on Tiger and does not seem to have any 
3787         performance impact on Tiger either.
3788
3789         * loader/FrameLoader.cpp:
3790         (WebCore::FrameLoader::transitionToCommitted):
3791
3792 2007-10-05  Ada Chan  <adachan@apple.com>
3793
3794         <rdar://problem/5436617> Favicons sometimes don't show up even when they are
3795         in the database
3796         - A client can try to retain an icon for a page before the database is actually
3797         opened.  Since isOpened() is not a requirement to retain an icon, remove the check
3798         for that.  Instead, we'll check to make sure whether this database is enabled
3799         before proceeding.
3800
3801         Reviewed by Brady.
3802
3803         * loader/icon/IconDatabase.cpp:
3804         (WebCore::IconDatabase::retainIconForPageURL):
3805         (WebCore::IconDatabase::releaseIconForPageURL): only check isOpen() before we
3806         schedule for a sync.
3807
3808 2007-10-05  Lars Knoll  <lars@trolltech.com>
3809
3810         Reviewed by olliej.
3811
3812         fix a hang in editing/selection/extend-by-word-002.html
3813
3814         * platform/qt/TextBreakIteratorQt.cpp:
3815         (WebCore::CharBreakIteratorQt::next):
3816         (WebCore::characterBreakIterator):
3817
3818 2007-10-04  Mark Rowe  <mrowe@apple.com>
3819
3820         Reviewed by Oliver.
3821
3822         Switch to default level of debugging symbols to resolve <rdar://problem/5488678>.
3823         The "full" level appears to offer no observable benefits even though the documentation
3824         suggests it be used for dead code stripping.  This should also decrease link times.
3825
3826         * Configurations/Base.xcconfig:
3827
3828 2007-10-04  Adele Peterson  <adele@apple.com>
3829
3830         Reviewed by Darin.
3831
3832         WebCore part of fix for <rdar://problem/5369017> REGRESSION: Can't tab to webview that doesn't have editable content
3833
3834         * page/FocusController.h: Added FocusDirection argument.
3835         * page/FocusController.cpp: (WebCore::FocusController::setInitialFocus):
3836           Use FocusDirection argument instead of key modifiers to send direction to advanceFocus.
3837         * WebCore.exp: Updated symbol.
3838
3839 2007-10-04  Kevin Decker  <kdecker@apple.com>
3840
3841         Reviewed by John.
3842         
3843         <rdar://problems/5516309>
3844         
3845         * page/FrameView.cpp:
3846         (WebCore::FrameView::updateControlTints): Avoid the expense of updating tints on controls for the
3847         empty-window case since this can take a significant amount of time even on windows that have no
3848         content at all. Note this fix specifically optimizes the empty window/tab case; for a more broad
3849         fix John wrote up rdar://problem/5521050.
3850
3851 2007-10-04  Darin Adler  <darin@apple.com>
3852
3853         * page/Frame.h: Put functions into categories to indicate other classes
3854         we'd like to move them into in the future. Just organizational -- no code
3855         change.
3856
3857 2007-10-04  Lars Knoll  <lars@trolltech.com>
3858
3859         Reviewed by maciej.
3860
3861         fix a crash in the FrameLoader that can happen under certain
3862         conditions in the Qt port.
3863
3864         Test: fast/loader/iframe-crash-on-missing-image.xhtml
3865
3866         * loader/FrameLoader.cpp:
3867         (WebCore::FrameLoader::receivedMainResourceError):
3868
3869 2007-10-03  Alp Toker  <alp@atoker.com>
3870
3871         Reviewed by Adam.
3872
3873         http://bugs.webkit.org/show_bug.cgi?id=14726
3874         [gtk] API design. Mapping the WebView delegates to signals.
3875
3876         Change the API namespace of the Gtk+ port from 'WebKitGtk' to 'WebKit'.
3877
3878         * WebCore.pro:
3879
3880 2007-10-03  Alp Toker  <alp@atoker.com>
3881
3882         Reviewed by Eric.
3883
3884         http://bugs.webkit.org/show_bug.cgi?id=14129
3885         [CAIRO] Support the canvas element
3886
3887         Add a new canvas implementation using Cairo for rendering.
3888
3889         * html/CanvasGradient.cpp:
3890         (WebCore::CanvasGradient::CanvasGradient):
3891         (WebCore::CanvasGradient::~CanvasGradient):
3892         (WebCore::CanvasGradient::addColorStop):
3893         (WebCore::CanvasGradient::platformShading):
3894         * html/CanvasGradient.h:
3895         * html/CanvasRenderingContext2D.cpp:
3896         (WebCore::CanvasRenderingContext2D::setFillStyle):
3897         (WebCore::CanvasRenderingContext2D::fill):
3898         (WebCore::CanvasRenderingContext2D::stroke):
3899         (WebCore::CanvasRenderingContext2D::fillRect):
3900         (WebCore::CanvasRenderingContext2D::drawImage):
3901         (WebCore::CanvasRenderingContext2D::applyStrokePattern):
3902         * html/CanvasStyle.cpp:
3903         (WebCore::CanvasStyle::applyStrokeColor):
3904         * html/HTMLCanvasElement.cpp:
3905         (WebCore::HTMLCanvasElement::~HTMLCanvasElement):
3906         (WebCore::HTMLCanvasElement::reset):
3907         (WebCore::HTMLCanvasElement::paint):
3908         (WebCore::HTMLCanvasElement::createDrawingContext):
3909         (WebCore::HTMLCanvasElement::createPlatformImage):
3910         * html/HTMLCanvasElement.h:
3911
3912 2007-10-03  Lars Knoll  <lars@trolltech.com>
3913
3914         Signed off by olliej.
3915
3916         move WebKitQt to WebKit/qt for consistency with the other ports.
3917
3918         WARNING: NO TEST CASES ADDED OR CHANGED
3919
3920         * WebCore.pro:
3921
3922 2007-10-02  Sam Weinig  <sam@webkit.org>
3923
3924         Reviewed by Oliver and Adam.
3925
3926         Patch for <rdar://problem/5506968> Fail to DnD local file with non-ascii character in path from desktop to Safari (can open it with file menu)
3927
3928         Use CoreFoundation to do the conversion from path to URL, as the Windows API was not
3929         correctly converting to UTF-8 and we know CFURL will.
3930
3931         * platform/win/ClipboardUtilitiesWin.cpp:
3932         (WebCore::urlFromPath):
3933         (WebCore::getURL):
3934
3935 2007-10-02  Tristan O'Tierney  <tristan@apple.com>
3936
3937         Reviewed by Darin Adler.
3938
3939         <rdar://problem/5511842> REGRESSION: Webkit stops responding while loading Apple Store Canada page (15304)
3940         
3941         Included the NSSynchronousURLConnection_PrivateMode mode, in addition to the default run loop modes
3942         as an acceptable mode when using performSelectorOnMainThread with our syncronous url callbacks.
3943
3944         * platform/network/mac/ResourceHandleMac.mm:
3945         (-[WebCoreResourceHandleAsDelegate connection:willCacheResponse:]):
3946         Added NSSynchronousURLConnection_PrivateMode to the list of accepted modes.
3947
3948 2007-10-02  Darin Adler  <darin@apple.com>
3949
3950         Reviewed by Adam.
3951
3952         - add support for GDI objects to OwnPtr; I plan to use this
3953           to fix some GDI handle leaks
3954
3955         * css/CSSGrammar.y: Change parser to avoid macro that conflicts
3956         with macro defined in Windows system headers: FLOAT. This is needed
3957         because OwnPtr.h will now include <windows.h>.
3958         * css/CSSParser.cpp: (WebCore::CSSParser::lex): Ditto.
3959         * css/tokenizer.flex: Ditto.
3960
3961         * platform/win/CursorWin.cpp: (WebCore::Cursor::Cursor):
3962         Use OwnPtr for a few HBITMAP objects as a test case.
3963
3964         * platform/win/COMPtr.h: (COMPtr::COMPtr): Fix so that we can use
3965         Query with other COMPtr. Before this would not compile if it was
3966         ever instantiated.
3967
3968 2007-10-02  Steve Falkenburg  <sfalken@apple.com>
3969
3970         Reviewed by Adam, Ada.
3971
3972         Fix leak of GDI handle when we call MLANG.
3973
3974         * platform/win/FontCacheWin.cpp:
3975         (WebCore::FontCache::getFontDataForCharacters):
3976
3977 2007-10-02  Lars Knoll  <lars@trolltech.com>
3978
3979         Reviewed by Olliej.
3980
3981         The cookies() method should only return the value of the
3982         cookie, not additional info such as the expiration date.
3983
3984         * platform/qt/CookieJarQt.cpp:
3985         (WebCore::cookies):
3986
3987 2007-10-01  Lars Knoll  <lars@trolltech.com>
3988
3989         Reviewed by Eric.
3990
3991         Fix a wrong extension mapping in the MIMETypeRegistry and identify about: url's as frames in the FrameLoaderClient.
3992
3993         * platform/qt/MIMETypeRegistryQt.cpp:
3994         (WebCore::):
3995
3996 2007-10-01  Justin Garcia  <justin.garcia@apple.com>
3997
3998         Reviewed by Harrison.
3999
4000         <rdar://problem/5516183> REGRESSION: Creating a ToDo on an incoming message fails
4001         
4002         Rolling out r25721.
4003
4004         * editing/ReplaceSelectionCommand.cpp:
4005         (WebCore::ReplaceSelectionCommand::doApply):
4006         * editing/ReplaceSelectionCommand.h:
4007
4008 2007-10-01  Beth Dakin  <bdakin@apple.com>
4009
4010         Reviewed by Adam.
4011
4012         Fix for <rdar://problem/5515426> NetNewsWire 3 crashes at launch in 
4013         WebCore::FrameView::layout (other repro scenarios too)
4014
4015         The new call to updateWidget() that we added to FrameView::layout() 
4016         can destroy the RenderPartObject. And so we were crashing on the 
4017         subsequent call to updateWidgetPosition(). This patch fixes that by 
4018         checking to make sure the RenderPartObject is still in the HashSet 
4019         after updateWidget(). Because m_widgetUpdateSet can be modified 
4020         during the call to updateWidget(), we need it to be intact while we 
4021         are iterating through the copy, so we cannot use the HashSet::swap 
4022         call we were using before. This patch instead uses a Vector to 
4023         iterate through the HashSet data and calls clear() on the HashSet 
4024         at the end.
4025
4026         * page/FrameView.cpp:
4027         (WebCore::FrameView::layout):
4028
4029 2007-10-01  Eli Fidler  <eli@staikos.net>
4030
4031         Reviewed by George Staikos.
4032
4033         Switch bogus assert to a conditional and return.  This case happens
4034         when a widget is hidden.
4035
4036         * platform/qt/WidgetQt.cpp:
4037         (WebCore::Widget::invalidateRect):
4038
4039 2007-09-30  Darin Adler  <darin@apple.com>
4040
4041         Reviewed by Maciej.
4042
4043         - tone down the assertion I asked Harrison to include in his fix for
4044           <rdar://problem/5511128>; it's OK to re-ref and deref the document
4045           as long as you do so after the children are done being destroyed
4046
4047         No effect on release builds. Assertion change only.
4048
4049         Besides the changes listed below, renamed m_hasDeleted flag to
4050         m_deletionHasBegun.
4051
4052         * dom/ContainerNode.cpp: (WebCore::ContainerNode::removeAllChildren):
4053         Added code to set the m_deletionHasBegun flag and some assertions
4054         that test its state.
4055
4056         * dom/Document.h: Removed m_hasDeleted -- we now use m_deletionHasBegun
4057         in the base class TreeShared.
4058         * dom/Document.cpp:
4059         (WebCore::Document::Document): Removed initialization of m_hasDeleted.
4060         (WebCore::Document::removedLastRef): Added code to clear
4061         m_inRemovedLastRefFunction if we end up deciding not to delete this.
4062
4063         * platform/Shared.h:
4064         (WebCore::TreeShared::TreeShared): Added m_deletionHasBegun in addition to
4065         m_inRemovedLastRefFunction (formerly named m_hasRemovedLastRef).
4066         (WebCore::TreeShared::~TreeShared): Assert that m_deletionHasBegun is true.
4067         (WebCore::TreeShared::ref): Assert neither flag is true.
4068         (WebCore::TreeShared::deref): Ditto.
4069         (WebCore::TreeShared::hasOneRef): Ditto.
4070         (WebCore::TreeShared::removedLastRef): Made private. Added code to
4071         set m_hasDeleted to true. Also removed cast; since this class template
4072         has a virtual destructor, we don't need to cast before calling delete.
4073
4074 2007-09-29  Holger Hans Peter Freyther  <zecke@selfish.org>
4075
4076         Reviewed by Mark.
4077
4078         -Fix http://bugs.webkit.org/show_bug.cgi?id=13226.
4079         Remove Bakefiles from svn.
4080
4081         * Projects/gdk/webcore-gdk.bkl: Removed.
4082         * Projects/wx/webcore-wx.bkl: Removed.
4083         * WebCoreSources.bkl: Removed.
4084         * webcore-base.bkl: Removed.
4085
4086 2007-09-28  Jan Michael Alonzo  <jmalonzo@unpluggable.com>
4087
4088         Reviewed by Mark.
4089
4090         -Fix http://bugs.webkit.org/show_bug.cgi?id=15254.
4091
4092         * platform/gtk/RenderThemeGtk.cpp:
4093         (WebCore::RenderThemeGtk::determineState):
4094             - Apply state if control is readonly
4095             - Added state GTK_STATE_SELECTED of object is checked
4096             - Apply GTK_STATE_ACTIVE if RenderObject isFocused()
4097         (WebCore::RenderThemeGtk::paintTextField):
4098         (WebCore::RenderThemeGtk::gtkEntry):
4099             - Implemented theme-aware text field based on gtk/gtkentry.c implementation
4100
4101 2007-09-29  Holger Hans Peter Freyther  <zecke@selfish.org>
4102
4103         Reviewed by Eric.
4104
4105         Build fix for Mac Gtk+ and Qt builds. In revision 25798 changing
4106         XSLTProcessor.cpp was forgotten.
4107
4108         * xml/XSLTProcessor.cpp: Use PLATFORM(MAC) instead of PLATFORM(DARWIN)
4109
4110 2007-09-29  Adam Roben  <aroben@apple.com>
4111
4112         Fix <rdar://4965715> Horizontal scrollwheel scrolling moves in opposite direction on Vista
4113
4114         Reviewed by Sam.
4115
4116         No regression test possible.
4117
4118         * platform/win/WheelEventWin.cpp:
4119         (WebCore::PlatformWheelEvent::PlatformWheelEvent): Use a negative
4120         delta when scrolling right to match EventHandler's expectations (which
4121         are based on AppKit).
4122
4123 2007-09-28  Kevin Decker  <kdecker@apple.com>
4124
4125         Reviewed by Mark Rowe
4126
4127         Build fix for Mac Gtk+ and Qt builds.
4128         
4129         * xml/XSLStyleSheet.cpp: Use PLATFORM(MAC) instead of PLATFORM(DARWIN)
4130         * xml/XSLTExtensions.cpp: Ditto.
4131
4132 2007-09-28  David Harrison  <harrison@apple.com>
4133
4134         Reviewed by Darin Adler.
4135
4136         <rdar://problem/5511128> Crash closing or reloading this SVG
4137
4138         * dom/ContainerNode.cpp:
4139         (WebCore::dispatchChildInsertionEvents):
4140         (WebCore::dispatchChildRemovalEvents):
4141         Use DocPtr instead of RefPtr, since these events are dispatched
4142         when the Document is being being torn down by removedLastRef().
4143
4144         * dom/DocPtr.h:
4145         (WebCore::DocPtr::DocPtr):
4146         Fix longstanding typo in template so that the DocPtr(DocPtr) constructor can be used.
4147
4148         * dom/Document.cpp:
4149         (WebCore::Document::Document):
4150         (WebCore::Document::removedLastRef):
4151         * dom/Document.h:
4152         (WebCore::Document::selfOnlyRef):
4153         (WebCore::Document::selfOnlyDeref):
4154         * platform/Shared.h:
4155         (WebCore::Shared::Shared):
4156         (WebCore::Shared::ref):
4157         (WebCore::Shared::deref):
4158         (WebCore::Shared::hasOneRef):
4159         (WebCore::TreeShared::TreeShared):
4160         (WebCore::TreeShared::ref):
4161         (WebCore::TreeShared::deref):
4162         (WebCore::TreeShared::hasOneRef):
4163         (WebCore::TreeShared::refCount):
4164         Add debug-only checks for a document being ref-counted while being deleted.
4165
4166 2007-09-27  Kevin McCullough  <kmccullough@apple.com>
4167
4168         Reviewed by Darin.
4169
4170         - <rdar://5261371> Nothing downloaded when exporting bookmarks from iGoogle web history
4171
4172         Function for use by WebKit. Currently used only on Windows.
4173
4174         * platform/network/ResourceResponse.cpp:
4175         (WebCore::ResourceResponse::isAttachment):
4176         * platform/network/ResourceResponse.h:
4177
4178 2007-09-27  Mitz Pettel  <mitz@webkit.org>
4179
4180         Reviewed by Dave Hyatt.
4181
4182         - fix http://bugs.webkit.org/show_bug.cgi?id=15262
4183           REGRESSION: Margin-top:18px is pushing down the multiple select list box outside the div.
4184