2011-01-07 Adam Barth <abarth@webkit.org>
[WebKit-https.git] / Source / WebCore / ChangeLog-2007-10-14
1 2007-10-14  Eric Seidel  <eric@webkit.org>
2
3         Reviewed by aroben.
4
5         Remove senseless malloc from paintOutline
6         No tests needed, no functional change.
7
8         * rendering/RenderFlow.cpp:
9         (WebCore::RenderFlow::paintOutline): remove unneeded malloc
10
11 2007-10-13  Eric Seidel  <eric@webkit.org>
12
13         Reviewed by Mark Rowe.
14
15         Fix SVGSVGElement::currentView() to not leak by using an OwnPtr.
16         This fix is incompatible with changes eventually needed for supporting
17         SVGSVGElement.currentView in the bindings (that needs a ref'd object)
18         There are also several parser crashers in SVGViewSpec, but those will be fixed
19         in my next patch.
20         
21         Leak fix only, no additional tests needed.
22
23         * ksvg2/svg/SVGSVGElement.cpp:
24         (WebCore::SVGSVGElement::currentView): call .get() and .set()
25         * ksvg2/svg/SVGSVGElement.h: use OwnPtr
26
27 2007-10-13  Oliver Hunt  <oliver@apple.com>
28
29         Reviewed by Maciej.
30
31         Fixing a few testcases by enabling SVG_EXPERIMENTAL on windows, and making the
32         required fixes and corrections.
33
34         * WebCore.vcproj/WebCore.vcproj:
35         * WebCore.vcproj/build-generated-files.sh:
36         * bindings/scripts/CodeGeneratorJS.pm:
37         * ksvg2/scripts/make_names.pl:
38         * ksvg2/svg/SVGColor.cpp:
39         (WebCore::SVGColor::colorFromRGBColorString):
40         * page/DOMWindow.idl:
41         * platform/graphics/svg/cg/SVGResourceFilterCg.cpp:
42         * platform/win/WebCoreTextRenderer.cpp:
43
44 2007-10-12  Darin Adler  <darin@apple.com>
45
46         Reviewed by Sam.
47
48         - more float/int conversion (to try to get the old builbot up)
49
50         * rendering/RenderSVGRoot.cpp:
51         (WebCore::RenderSVGRoot::layout): Cast to int.
52         (WebCore::RenderSVGRoot::applyContentTransforms): Ditto.
53         (WebCore::RenderSVGRoot::nodeAtPoint): Ditto.
54
55 2007-10-12  Justin Garcia  <justin.garcia@apple.com>
56
57         Reviewed by Harrison.
58         
59         <rdar://problem/5483370> GoogleDocs: Deleting cell text in a table row also removes any empty rows beneath the row being edited
60         <rdar://problem/5482524> GoogleDocs: A hang occurs when applying list to selected table
61         
62         * editing/DeleteSelectionCommand.cpp:
63         (WebCore::DeleteSelectionCommand::removePreviouslySelectedEmptyTableRows):
64         * editing/InsertListCommand.cpp:
65         (WebCore::InsertListCommand::modifyRange):
66         (WebCore::InsertListCommand::doApply):
67
68 2007-10-12  Darin Adler  <darin@apple.com>
69
70         - fix another float/int conversion
71
72         * platform/graphics/svg/cg/SVGResourceMaskerCg.mm:
73         (WebCore::SVGResourceMasker::applyMask): Explicitly cast to int.
74
75 2007-10-12  Darin Adler  <darin@apple.com>
76
77         Reviewed by Oliver Hunt.
78
79         - fix float/int conversions that cause warnings on older versions
80           of gcc (like the version currently being used on the PowerPC
81           buildbot slave)
82
83         * rendering/RenderPath.cpp:
84         (WebCore::RenderPath::paint): Explicitly cast to int.
85         (WebCore::RenderPath::addFocusRingRects): Use enclosingIntRect
86         to convert a FloatRect to an IntRect.
87         * rendering/SVGRootInlineBox.cpp:
88         (WebCore::SVGRootInlineBoxPaintWalker::chunkPortionCallback):
89         Use 0 for the initial value of an int, rather than 0.0f.
90         (WebCore::svgTextStyleForInlineTextBox): Explicitly cast to int.
91         (WebCore::applyTextAnchorToTextChunk): Ditto.
92
93 2007-10-12  Oliver Hunt  <oliver@apple.com>
94
95         Reviewed by Mark.
96
97         Cast zoom factor to int as the original patch did.  This is necessary to appease some versions of gcc.
98
99         * ksvg2/svg/SVGSVGElement.cpp:
100         (WebCore::SVGSVGElement::setCurrentScale):
101
102 2007-10-12  Eric Seidel  <eric@webkit.org>
103
104         Reviewed by Mark Rowe.
105
106         Fix leaks in SVG code from feature-branch.
107
108         * ksvg2/svg/SVGFEDiffuseLightingElement.cpp:
109         (WebCore::SVGFEDiffuseLightingElement::filterEffect):
110         * ksvg2/svg/SVGFEFloodElement.cpp:
111         (WebCore::SVGFEFloodElement::filterEffect):
112         * ksvg2/svg/SVGFESpecularLightingElement.cpp:
113         (WebCore::SVGFESpecularLightingElement::filterEffect):
114         * ksvg2/svg/SVGGradientElement.cpp:
115         (WebCore::SVGGradientElement::buildStops):
116         * ksvg2/svg/SVGStyledElement.cpp:
117         (WebCore::SVGStyledElement::resolveStyle): always refs style
118         * platform/graphics/cg/ImageBufferCG.cpp:
119         (WebCore::ImageBuffer::create): fastFree buffer if CG Context creation fails
120
121 2007-10-12  Mark Rowe  <mrowe@apple.com>
122
123         Windows, Gtk and Qt build fixes.  Add new files to projects.
124
125         * WebCore.pro:
126         * WebCore.vcproj/WebCore.vcproj:
127
128 === Start merge of feature-branch 2007-10-12 ===
129
130 2007-10-11  Oliver Hunt  <oliver@apple.com>
131
132         Reviewed by Sam.
133
134         Bug 15469: feature branch has 100's of implicit double -> float conversions
135
136         Re-enable -Wshorten-64-to-32, and make required code changes to make us build sanely again.
137         
138         * WebCore.xcodeproj/project.pbxproj:
139         * bindings/js/JSSVGMatrixCustom.cpp:
140         (WebCore::JSSVGMatrix::translate):
141         (WebCore::JSSVGMatrix::scale):
142         (WebCore::JSSVGMatrix::scaleNonUniform):
143         (WebCore::JSSVGMatrix::rotate):
144         (WebCore::JSSVGMatrix::skewX):
145         (WebCore::JSSVGMatrix::skewY):
146         * bindings/scripts/CodeGeneratorJS.pm:
147         * bindings/scripts/CodeGeneratorObjC.pm:
148         * ksvg2/css/SVGRenderStyle.cpp:
149         (WebCore::SVGRenderStyle::cssPrimitiveToLength):
150         * ksvg2/css/SVGRenderStyle.h:
151         * ksvg2/svg/SVGAnimateMotionElement.cpp:
152         (WebCore::SVGAnimateMotionElement::parseMappedAttribute):
153         (WebCore::SVGAnimateMotionElement::updateAnimatedValue):
154         (WebCore::parsePoint):
155         (WebCore::SVGAnimateMotionElement::calculateFromAndToValues):
156         * ksvg2/svg/SVGAnimationElement.cpp:
157         (WebCore::SVGAnimationElement::parseKeyNumbers):
158         (WebCore::parseKeySplines):
159         * ksvg2/svg/SVGComponentTransferFunctionElement.cpp:
160         (WebCore::SVGComponentTransferFunctionElement::SVGComponentTransferFunctionElement):
161         (WebCore::SVGComponentTransferFunctionElement::parseMappedAttribute):
162         * ksvg2/svg/SVGFECompositeElement.cpp:
163         (WebCore::SVGFECompositeElement::SVGFECompositeElement):
164         (WebCore::SVGFECompositeElement::parseMappedAttribute):
165         * ksvg2/svg/SVGFEDiffuseLightingElement.cpp:
166         (WebCore::SVGFEDiffuseLightingElement::SVGFEDiffuseLightingElement):
167         (WebCore::SVGFEDiffuseLightingElement::parseMappedAttribute):
168         * ksvg2/svg/SVGFEDisplacementMapElement.cpp:
169         (WebCore::SVGFEDisplacementMapElement::SVGFEDisplacementMapElement):
170         (WebCore::SVGFEDisplacementMapElement::parseMappedAttribute):
171         * ksvg2/svg/SVGFEGaussianBlurElement.cpp:
172         (WebCore::SVGFEGaussianBlurElement::SVGFEGaussianBlurElement):
173         (WebCore::SVGFEGaussianBlurElement::parseMappedAttribute):
174         * ksvg2/svg/SVGFELightElement.cpp:
175         (WebCore::SVGFELightElement::SVGFELightElement):
176         (WebCore::SVGFELightElement::parseMappedAttribute):
177         * ksvg2/svg/SVGFEOffsetElement.cpp:
178         (WebCore::SVGFEOffsetElement::SVGFEOffsetElement):
179         (WebCore::SVGFEOffsetElement::parseMappedAttribute):
180         * ksvg2/svg/SVGFESpecularLightingElement.cpp:
181         (WebCore::SVGFESpecularLightingElement::SVGFESpecularLightingElement):
182         (WebCore::SVGFESpecularLightingElement::parseMappedAttribute):
183         * ksvg2/svg/SVGFETurbulenceElement.cpp:
184         (WebCore::SVGFETurbulenceElement::SVGFETurbulenceElement):
185         (WebCore::SVGFETurbulenceElement::parseMappedAttribute):
186         * ksvg2/svg/SVGFitToViewBox.cpp:
187         (WebCore::SVGFitToViewBox::parseMappedAttribute):
188         * ksvg2/svg/SVGFitToViewBox.h:
189         * ksvg2/svg/SVGLength.cpp:
190         (WebCore::SVGLength::setValueAsString):
191         (WebCore::SVGLength::PercentageOfViewport):
192         * ksvg2/svg/SVGNumber.idl:
193         * ksvg2/svg/SVGNumberList.cpp:
194         (WebCore::SVGNumberList::parse):
195         * ksvg2/svg/SVGNumberList.h:
196         * ksvg2/svg/SVGParserUtilities.cpp:
197         (WebCore::_parseNumber):
198         (WebCore::parseNumber):
199         (WebCore::pointsListFromSVGData):
200         (WebCore::PathBuilder::svgMoveTo):
201         (WebCore::PathBuilder::svgLineTo):
202         (WebCore::PathBuilder::svgCurveToCubic):
203         (WebCore::SVGPathSegListBuilder::svgMoveTo):
204         (WebCore::SVGPathSegListBuilder::svgLineTo):
205         (WebCore::SVGPathSegListBuilder::svgLineToHorizontal):
206         (WebCore::SVGPathSegListBuilder::svgLineToVertical):
207         (WebCore::SVGPathSegListBuilder::svgCurveToCubic):
208         (WebCore::SVGPathSegListBuilder::svgCurveToCubicSmooth):
209         (WebCore::SVGPathSegListBuilder::svgCurveToQuadratic):
210         (WebCore::SVGPathSegListBuilder::svgCurveToQuadraticSmooth):
211         (WebCore::SVGPathSegListBuilder::svgArcTo):
212         * ksvg2/svg/SVGParserUtilities.h:
213         * ksvg2/svg/SVGPathElement.cpp:
214         (WebCore::SVGPathElement::SVGPathElement):
215         * ksvg2/svg/SVGSVGElement.cpp:
216         (WebCore::SVGSVGElement::pixelUnitToMillimeterX):
217         (WebCore::SVGSVGElement::pixelUnitToMillimeterY):
218         * ksvg2/svg/SVGSVGElement.h:
219         * ksvg2/svg/SVGTransformDistance.cpp:
220         (WebCore::SVGTransformDistance::addToSVGTransform):
221         (WebCore::SVGTransformDistance::distance):
222         * ksvg2/svg/SVGTransformDistance.h:
223         * ksvg2/svg/SVGTransformable.cpp:
224         (WebCore::SVGTransformable::parseTransformValue):
225         * ksvg2/svg/SVGViewSpec.cpp:
226         (WebCore::SVGViewSpec::parseViewSpec):
227         * platform/graphics/svg/SVGResourceFilter.cpp:
228         (WebCore::SVGResourceFilter::filterBBoxForItemBBox):
229         * platform/graphics/svg/cg/CgSupport.cpp:
230         (WebCore::applyStrokeStyleToContext):
231         * platform/graphics/svg/cg/SVGPaintServerPatternCg.cpp:
232         (WebCore::SVGPaintServerPattern::setup):
233         * platform/graphics/svg/cg/SVGResourceFilterCg.mm:
234         (WebCore::SVGResourceFilter::applyFilter):
235         * platform/graphics/svg/filters/SVGFEComponentTransfer.h:
236         (WebCore::SVGComponentTransferFunction::SVGComponentTransferFunction):
237         * platform/graphics/svg/filters/SVGFEComposite.cpp:
238         (WebCore::SVGFEComposite::SVGFEComposite):
239         * platform/graphics/svg/filters/SVGFEConvolveMatrix.cpp:
240         (WebCore::SVGFEConvolveMatrix::SVGFEConvolveMatrix):
241         * platform/graphics/svg/filters/SVGFEDiffuseLighting.cpp:
242         (WebCore::SVGFEDiffuseLighting::SVGFEDiffuseLighting):
243         * platform/graphics/svg/filters/SVGFEFlood.cpp:
244         (WebCore::SVGFEFlood::SVGFEFlood):
245         * platform/graphics/svg/filters/SVGFEGaussianBlur.cpp:
246         (WebCore::SVGFEGaussianBlur::SVGFEGaussianBlur):
247         * platform/graphics/svg/filters/SVGFEMorphology.cpp:
248         (WebCore::SVGFEMorphology::SVGFEMorphology):
249         * platform/graphics/svg/filters/SVGFEOffset.cpp:
250         (WebCore::SVGFEOffset::SVGFEOffset):
251         * platform/graphics/svg/filters/SVGFESpecularLighting.cpp:
252         (WebCore::SVGFESpecularLighting::SVGFESpecularLighting):
253         * platform/graphics/svg/filters/SVGFETurbulence.cpp:
254         (WebCore::SVGFETurbulence::SVGFETurbulence):
255         * platform/graphics/svg/filters/cg/SVGFEColorMatrixCg.mm:
256         (WebCore::SVGFEColorMatrix::getCIFilter):
257         * platform/graphics/svg/filters/cg/SVGFEHelpersCg.mm:
258         (WebCore::getVectorForChannel):
259         (WebCore::getLightVectors):
260         * platform/graphics/svg/filters/cg/SVGFEImageCg.mm:
261         (WebCore::SVGFEImage::getCIFilter):
262         * rendering/RenderPath.cpp:
263         (WebCore::RenderPath::drawMarkersIfNeeded):
264         * rendering/RenderSVGImage.cpp:
265         (WebCore::RenderSVGImage::paint):
266         * rendering/RenderSVGInlineText.cpp:
267         (WebCore::RenderSVGInlineText::computeAbsoluteRectForRange):
268         * rendering/RenderSVGRoot.cpp:
269         (WebCore::RenderSVGRoot::applyContentTransforms):
270         (WebCore::RenderSVGRoot::calcViewport):
271         (WebCore::RenderSVGRoot::nodeAtPoint):
272         * rendering/RenderSVGText.cpp:
273         (WebCore::RenderSVGText::absoluteRects):
274         (WebCore::RenderSVGText::relativeBBox):
275         * rendering/RenderSVGTextPath.cpp:
276         * rendering/SVGCharacterLayoutInfo.cpp:
277         (WebCore::calculateBaselineShift):
278         (WebCore::SVGCharacterLayoutInfo::SVGCharacterLayoutInfo):
279         (WebCore::SVGCharacterLayoutInfo::processedChunk):
280         (WebCore::SVGCharacterLayoutInfo::nextPathLayoutPointAndAngle):
281         (WebCore::SVGCharacterLayoutInfo::addLayoutInformation):
282         * rendering/SVGCharacterLayoutInfo.h:
283         * rendering/SVGInlineTextBox.cpp:
284         (WebCore::SVGInlineTextBox::calculateGlyphBoundaries):
285         (WebCore::SVGInlineTextBoxClosestCharacterToPositionWalker::chunkPortionCallback):
286         (WebCore::pathForDecoration):
287         * rendering/SVGRenderTreeAsText.cpp:
288         (WebCore::writeStyle):
289         * rendering/SVGRootInlineBox.cpp:
290         (WebCore::SVGRootInlineBoxPaintWalker::chunkPortionCallback):
291         (WebCore::applyTextAnchorToTextChunk):
292         (WebCore::SVGRootInlineBox::buildLayoutInformation):
293         (WebCore::SVGRootInlineBox::buildLayoutInformationForTextBox):
294
295 2007-10-11  Andrew Wellington  <proton@wiretapped.net>
296
297         Reviewed by Eric Seidel.
298
299         Fix for http://bugs.webkit.org/show_bug.cgi?id=15076
300         "deg2rad has multiple definitions"
301         
302         Use deg2rad, rad2deg, deg2grad, grad2deg, rad2grad, grad2rad
303         from wtf where appropriate.
304         
305         No test cases as this doesn't change behaviour.
306         
307         Change based on original patch by Rob Buis.
308
309         * ksvg2/svg/SVGAngle.cpp:
310         (WebCore::SVGAngle::calculate):
311         (WebCore::SVGAngle::convertToSpecifiedUnits):
312         (WebCore::SVGAngle::todeg):
313         (WebCore::SVGAngle::torad):
314         * platform/graphics/AffineTransform.cpp:
315         (WebCore::AffineTransform::rotateFromVector):
316         (WebCore::AffineTransform::skewX):
317         (WebCore::AffineTransform::skewY):
318         * platform/graphics/cg/AffineTransformCG.cpp:
319         (WebCore::AffineTransform::rotate):
320         * platform/graphics/svg/filters/cg/SVGFEColorMatrixCg.mm:
321         * platform/graphics/svg/filters/cg/SVGFEHelpersCg.h:
322         * platform/graphics/svg/filters/cg/SVGFEHelpersCg.mm:
323         * rendering/RenderPath.cpp:
324         (WebCore::drawMarkerWithData):
325
326 2007-10-11  Nikolas Zimmermann  <zimmermann@kde.org>
327
328         Reviewed by Oliver.
329
330         Fixes: http://bugs.webkit.org/show_bug.cgi?id=6421 (<text> textLength attribute is not respected)
331         Fixes: http://bugs.webkit.org/show_bug.cgi?id=6422 (<text> lengthAdjust attribute is not respected)
332
333         Implement textLength and full lengthAdjust (both 'spacing' & 'spacingAndGlyphs' mode)
334         for <text> & <tspan> & friends. <textPath> is still todo, as it's special.
335
336         Also fix usage of cummulatedGlyphWidth/Height in SVGInlineTextBox, calculateGlyphBoundaries was
337         supposed to be used in the distance calculations, to take per character transformations into account (ie. rotation).
338
339         Fixes: svg/W3C-SVG-1.1/text-text-01-b.svg (complelty fixed the single W3C textLength testcase)
340         Partly fixed: svg/batik/text/textOnPathSpaces.svg (kerning support missing)
341         Partly fixed: svg/batik/text/textLayout.svg (word-letter spacing & textLength is todo)
342
343         * ksvg2/svg/SVGTextContentElement.cpp:
344         (WebCore::SVGTextContentElement::SVGTextContentElement):
345         (WebCore::SVGTextContentElement::parseMappedAttribute):
346         * rendering/SVGCharacterLayoutInfo.cpp:
347         (WebCore::SVGCharacterLayoutInfo::nextPathLayoutPointAndAngle):
348         * rendering/SVGCharacterLayoutInfo.h:
349         (WebCore::SVGTextChunk::SVGTextChunk):
350         (WebCore::SVGTextChunkWalker::operator()):
351         * rendering/SVGInlineTextBox.cpp:
352         (WebCore::SVGInlineTextBoxClosestCharacterToPositionWalker::chunkPortionCallback):
353         (WebCore::SVGInlineTextBoxSelectionRectWalker::chunkPortionCallback):
354         (WebCore::SVGInlineTextBox::svgCharacterHitsPosition):
355         * rendering/SVGRootInlineBox.cpp:
356         (WebCore::SVGRootInlineBoxPaintWalker::chunkPortionCallback):
357         (WebCore::cummulatedWidthOrHeightOfTextChunk):
358         (WebCore::cummulatedWidthOfTextChunk):
359         (WebCore::cummulatedHeightOfTextChunk):
360         (WebCore::applyTextAnchorToTextChunk):
361         (WebCore::applyTextLengthCorrectionToTextChunk):
362         (WebCore::SVGRootInlineBox::buildLayoutInformationForTextBox):
363         (WebCore::SVGRootInlineBox::buildTextChunks):
364         (WebCore::SVGRootInlineBox::layoutTextChunks):
365         (WebCore::SVGRootInlineBox::walkTextChunks):
366
367 2007-10-11  Oliver Hunt  <oliver@apple.com>
368
369         Reviewed by Niko.
370
371         Fix for Bug 15468: Parsing of numbers and lists is too lenient in SVG
372
373         Correct parsing of numbers, number lists, and length lists in SVG.
374
375         * ksvg2/svg/SVGLength.cpp:
376         (WebCore::SVGLength::setValueAsString):
377         * ksvg2/svg/SVGLength.h:
378         * ksvg2/svg/SVGLengthList.cpp:
379         (WebCore::SVGLengthList::parse):
380         * ksvg2/svg/SVGParserUtilities.cpp:
381         (WebCore::parseNumber):
382
383 2007-10-11  Allan Sandfeld Jensen  <sandfeld@kde.org>
384  
385          Reviewed by Maciej and Eric.
386  
387          Implement CSS selector combinators nondeterministic matching. 
388          Fixes http://bugs.webkit.org/show_bug.cgi?id=3428
389  
390          * css/CSSStyleSelector.cpp:
391          (WebCore::CSSStyleSelector::matchRulesForList):
392          (WebCore::CSSStyleSelector::checkSelector): Split the function and make the second part recursive
393          (WebCore::CSSStyleSelector::checkOneSelector): Handle pseodo-elements rules and hoveractive quirks 
394          here instead of in checkSelector.
395          * css/CSSStyleSelector.h:
396  
397 2007-10-10  Eric Seidel  <eric@webkit.org>
398
399         Reviewed by Nikolas Zimmermann.
400         
401         Fix the SVG dom so that rect.x.baseVal = rect.x.baseVal like it should.
402         http://bugs.webkit.org/show_bug.cgi?id=14150
403
404         Test: svg/dom/animated-tearoff-equlity.xhtml
405
406         * ksvg2/svg/SVGAnimatedTemplate.h:
407         (WebCore::SVGAnimatedTypeWrapperKey::SVGAnimatedTypeWrapperKey):
408         (WebCore::SVGAnimatedTypeWrapperKey::operator==):
409         (WebCore::SVGAnimatedTypeWrapperKeyHash::hash):
410         (WebCore::SVGAnimatedTypeWrapperKeyHash::equal):
411         (WebCore::SVGAnimatedTypeWrapperKeyHashTraits::deletedValue):
412         (WebCore::SVGAnimatedTypeWrapperKeyHashTraits::emptyValue):
413         (WebCore::SVGAnimatedTemplate::~SVGAnimatedTemplate):
414         (WebCore::SVGAnimatedTemplate::wrapperCache):
415         (WebCore::SVGAnimatedTemplate::forgetWrapper):
416         (WebCore::lookupOrCreateWrapper):
417         * ksvg2/svg/SVGElement.h:
418
419 2007-10-10  Oliver Hunt  <oliver@apple.com>
420
421         Reviewed by Maciej.
422
423         Leopard build fix -- SVGDocument should not trty to make read/write properties read-only
424
425         Remove those API definitions SVGDocument now inherits from Document
426
427         * ksvg2/svg/SVGDocument.idl:
428
429 2007-10-10  Eric Seidel  <eric@webkit.org>
430
431         Reviewed by Oliver.
432
433         Make renderers pull localTransform instead of depending on DOM elements to push
434         This allows for cleaner invalidation code, and makes writing animation easier.
435         Also fixed a tiny bug in SVGRenderImage focus ring calculations while there
436         
437         Updated test results for svg/custom/focus-ring.svg
438
439         * WebCore.xcodeproj/project.pbxproj:
440         * ksvg2/svg/SVGAElement.cpp:
441         (WebCore::SVGAElement::createRenderer):
442         * ksvg2/svg/SVGAnimateMotionElement.cpp:
443         (WebCore::SVGAnimateMotionElement::applyAnimatedValueToElement):
444         * ksvg2/svg/SVGAnimateTransformElement.cpp:
445         (WebCore::SVGAnimateTransformElement::applyAnimatedValueToElement):
446         * ksvg2/svg/SVGClipPathElement.cpp:
447         (WebCore::SVGClipPathElement::canvasResource):
448         * ksvg2/svg/SVGElement.h:
449         * ksvg2/svg/SVGGElement.cpp:
450         (WebCore::SVGGElement::createRenderer):
451         * ksvg2/svg/SVGImageElement.cpp:
452         * ksvg2/svg/SVGLocatable.cpp:
453         (WebCore::SVGLocatable::getCTM):
454         (WebCore::SVGLocatable::getScreenCTM):
455         * ksvg2/svg/SVGMarkerElement.cpp:
456         (WebCore::SVGMarkerElement::canvasResource):
457         (WebCore::SVGMarkerElement::notifyAttributeChange):
458         * ksvg2/svg/SVGSVGElement.h:
459         * ksvg2/svg/SVGStyledElement.cpp:
460         (WebCore::SVGStyledElement::rendererIsNeeded):
461         (WebCore::SVGStyledElement::notifyResourceParentIfExistant):
462         * ksvg2/svg/SVGStyledElement.h:
463         (WebCore::SVGStyledElement::style):
464         * ksvg2/svg/SVGStyledTransformableElement.cpp:
465         (WebCore::SVGStyledTransformableElement::animatedLocalTransform):
466         (WebCore::SVGStyledTransformableElement::parseMappedAttribute):
467         (WebCore::SVGStyledTransformableElement::notifyAttributeChange):
468         (WebCore::SVGStyledTransformableElement::createRenderer):
469         * ksvg2/svg/SVGStyledTransformableElement.h:
470         (WebCore::SVGStyledTransformableElement::toPathData):
471         * ksvg2/svg/SVGSwitchElement.cpp:
472         (WebCore::SVGSwitchElement::createRenderer):
473         * ksvg2/svg/SVGTRefElement.cpp:
474         (WebCore::SVGTRefElement::updateReferencedText):
475         * ksvg2/svg/SVGTextElement.cpp:
476         (WebCore::SVGTextElement::parseMappedAttribute):
477         (WebCore::SVGTextElement::animatedLocalTransform):
478         * ksvg2/svg/SVGTextElement.h:
479         * ksvg2/svg/SVGTextPathElement.cpp:
480         * ksvg2/svg/SVGTextPathElement.h:
481         * ksvg2/svg/SVGTransformable.cpp:
482         (WebCore::SVGTransformable::getCTM):
483         (WebCore::SVGTransformable::getScreenCTM):
484         * ksvg2/svg/SVGTransformable.h:
485         * ksvg2/svg/SVGUseElement.cpp:
486         (WebCore::SVGUseElement::createRenderer):
487         (WebCore::SVGUseElement::attachShadowTree):
488         * platform/graphics/AffineTransform.h:
489         (WebCore::AffineTransform::operator!=):
490         * platform/graphics/svg/SVGResourceMarker.cpp:
491         (WebCore::SVGResourceMarker::setMarker):
492         * platform/graphics/svg/SVGResourceMarker.h:
493         * rendering/RenderForeignObject.cpp:
494         (WebCore::RenderForeignObject::calculateLocalTransform):
495         (WebCore::RenderForeignObject::layout):
496         * rendering/RenderForeignObject.h:
497         (WebCore::RenderForeignObject::localTransform):
498         * rendering/RenderObject.cpp:
499         * rendering/RenderObject.h:
500         * rendering/RenderPath.cpp:
501         (WebCore::RenderPath::RenderPath):
502         (WebCore::RenderPath::localTransform):
503         (WebCore::RenderPath::calculateLocalTransform):
504         (WebCore::RenderPath::layout):
505         * rendering/RenderPath.h:
506         * rendering/RenderSVGContainer.cpp:
507         (WebCore::RenderSVGContainer::localTransform):
508         (WebCore::RenderSVGContainer::calculateLocalTransform):
509         (WebCore::RenderSVGContainer::layout):
510         * rendering/RenderSVGContainer.h:
511         * rendering/RenderSVGImage.h:
512         (WebCore::RenderSVGImage::localTransform):
513         * rendering/RenderSVGText.cpp:
514         (WebCore::RenderSVGText::calculateLocalTransform):
515         (WebCore::RenderSVGText::layout):
516         * rendering/RenderSVGText.h:
517         (WebCore::RenderSVGText::isSVGText):
518         (WebCore::RenderSVGText::localTransform):
519         * rendering/RenderSVGTextPath.cpp:
520         (WebCore::RenderSVGTextPath::layoutPath):
521         (WebCore::RenderSVGTextPath::startOffset):
522         (WebCore::RenderSVGTextPath::exactAlignment):
523         (WebCore::RenderSVGTextPath::stretchMethod):
524         * rendering/RenderSVGTextPath.h:
525         * rendering/RenderSVGTransformableContainer.cpp: Added.
526         (WebCore::RenderSVGTransformableContainer::RenderSVGTransformableContainer):
527         (WebCore::RenderSVGTransformableContainer::calculateLocalTransform):
528         * rendering/RenderSVGTransformableContainer.h: Added.
529         * rendering/RenderSVGViewportContainer.h:
530
531 2007-10-10  Oliver Hunt  <oliver@apple.com>
532
533         Reviewed by Eric.
534
535         Bug 15451: SVGStyledElement must unregister itself from Resources on detach
536         
537         Use a global hashtable to maintain the relationship between the
538         various SVG resources and their clients, across dom updates, etc.
539
540         * ksvg2/svg/SVGStyledElement.cpp:
541         (WebCore::SVGStyledElement::detach):
542         * ksvg2/svg/SVGStyledElement.h:
543         * platform/graphics/svg/SVGPaintServer.h:
544         * platform/graphics/svg/SVGResource.cpp:
545         (WebCore::ResourceSet::ResourceSet):
546         (WebCore::clientMap):
547         (WebCore::SVGResource::~SVGResource):
548         (WebCore::SVGResource::invalidate):
549         (WebCore::SVGResource::removeClient):
550         (WebCore::SVGResource::addClient):
551         * platform/graphics/svg/SVGResource.h:
552         (WebCore::):
553         (WebCore::SVGResource::isPaintServer):
554         (WebCore::SVGResource::isFilter):
555         (WebCore::SVGResource::isClipper):
556         (WebCore::SVGResource::isMarker):
557         (WebCore::SVGResource::isMasker):
558         * platform/graphics/svg/SVGResourceClipper.h:
559         (WebCore::SVGResourceClipper::resourceType):
560         * platform/graphics/svg/SVGResourceFilter.h:
561         * platform/graphics/svg/SVGResourceMarker.h:
562         * platform/graphics/svg/SVGResourceMasker.h:
563
564 2007-10-10  Mark Rowe  <mrowe@apple.com>
565
566         Windows build fix after r26109.
567
568         * WebCore.vcproj/WebCore.vcproj:
569
570 2007-10-10  Oliver Hunt  <oliver@apple.com>
571
572         Reviewed by Eric.
573
574         Fix Bug 15433: Filters do not repaint when base resources change/update
575
576         SVGFEImage now actually responds to image updates, and triggers a repaint.
577
578         * platform/graphics/svg/SVGResource.h:
579         * platform/graphics/svg/filters/SVGFEImage.cpp:
580         (WebCore::SVGFEImage::setCachedImage):
581           Don't re-set the image lest we want to trigger infinite recursion.
582         (WebCore::SVGFEImage::imageChanged):
583           Image change means we need to tell our clients to repaint
584         * platform/graphics/svg/filters/SVGFEImage.h:
585         * rendering/SVGRenderSupport.cpp:
586         (WebCore::prepareToRenderSVGContent):
587           make sure that users of filters are registered.
588
589 2007-10-09  Eric Seidel  <eric@webkit.org>
590
591         Reviewed by Alp.
592
593         Track changes in r26109 to fix the Gtk+ build.
594
595         * WebCore.pro:
596
597 2007-10-09  Alexey Proskuryakov  <ap@webkit.org>
598
599         Reviewed by Anders.
600
601         http://bugs.webkit.org/show_bug.cgi?id=15436
602         Wrong node order for XPath reverse axes
603
604         Test: fast/xpath/reverse-axes.html
605
606         * xml/XPathStep.cpp:
607         (WebCore::XPath::Step::nodesInAxis): Do not prematurely sort reverse
608         axes. Generate preceding axis nodes in reversed document order.
609
610 2007-10-09  Alexey Proskuryakov  <ap@webkit.org>
611
612         Reviewed by Mitz.
613
614         http://bugs.webkit.org/show_bug.cgi?id=15437
615         XPath substring-after function is broken
616
617         Test: fast/xpath/substring-after.html
618
619         * xml/XPathFunctions.cpp:
620         (WebCore::XPath::FunSubstringAfter::evaluate): Fix it for real this time, hopefully.
621
622 2007-10-09  Rob Buis  <buis@kde.org>
623
624         Reviewed by Eric.
625
626         http://bugs.webkit.org/show_bug.cgi?id=15080
627         <use> element not refresh after adding objects by script in referrer
628
629         Update shadow tree when elements are added/removed from a tree
630         that is referenced by a <use>.
631
632         * ksvg2/svg/SVGStyledElement.cpp:
633         (WebCore::SVGStyledElement::childrenChanged):
634         * ksvg2/svg/SVGStyledElement.h:
635
636 2007-10-09  Rob Buis  <buis@kde.org>
637
638         Reviewed by Maciej.
639
640         http://bugs.webkit.org/show_bug.cgi?id=15088
641         HTMLOptionElement.selected returns false when parent HTMLSelectElement is "display: none" until parent's .selectedIndex is accessed
642
643         Make sure the list items are up to date when there is no renderer.
644
645         * html/HTMLSelectElement.cpp:
646         (WebCore::HTMLSelectElement::recalcStyle):
647
648 2007-10-08  Eric Seidel  <eric@webkit.org>
649
650         Reviewed by Oliver.
651
652         Build fix.  Fix circular build rule for CSS*.in files evident on clean build.
653
654         * DerivedSources.make:
655         * WebCore.xcodeproj/project.pbxproj:
656         * ksvg2/css/CSSPropertyNames.in: Removed.
657         * ksvg2/css/CSSValueKeywords.in: Removed.
658         * ksvg2/css/SVGCSSPropertyNames.in: Copied from ksvg2/css/CSSPropertyNames.in.
659         * ksvg2/css/SVGCSSValueKeywords.in: Copied from ksvg2/css/CSSValueKeywords.in.
660
661 2007-10-08  Eric Seidel  <eric@webkit.org>
662
663         Reviewed by hyatt.
664
665         Implement getComputedStyle support for SVG CSS values
666         http://bugs.webkit.org/show_bug.cgi?id=15422
667         
668         This also unifies SVG and non-SVG CSS hash lookups. A unified hash
669         solves correctness problems as well as offers improved speed.
670         
671         Test: svg/css/getComputedStyle-basic.xhtml
672
673         * DerivedSources.make: unify SVG and non-SVG CSS hash files
674         * WebCore.xcodeproj/project.pbxproj: remove old SVG CSS hash files
675         * css/CSSComputedStyleDeclaration.cpp:
676         (WebCore::):
677         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): call getPropertyCSSValue
678         * css/CSSComputedStyleDeclaration.h: add getPropertyCSSValue
679         * css/CSSGrammar.y:
680         * css/CSSParser.cpp:
681         (WebCore::CSSParser::parseValue):
682         * css/CSSStyleDeclaration.cpp:
683         (WebCore::propertyID):
684         * css/CSSStyleSelector.cpp:
685         (WebCore::CSSStyleSelector::applyProperty):
686         * ksvg2/css/CSSPropertyNames.in: remove font-size-adjust
687         * ksvg2/css/SVGCSSComputedStyleDeclaration.cpp: Added.
688         (WebCore::CSSComputedStyleDeclaration::getSVGPropertyCSSValue): added.
689         * ksvg2/css/SVGCSSParser.cpp:
690         (WebCore::CSSParser::parseSVGValue):
691         * ksvg2/css/SVGCSSStyleSelector.cpp:
692         (WebCore::CSSStyleSelector::applySVGProperty):
693         * ksvg2/scripts/cssmakeprops: Removed.
694         * ksvg2/scripts/cssmakevalues: Removed.
695         * ksvg2/svg/SVGAnimationElement.cpp:
696         * ksvg2/svg/SVGStyledElement.cpp:
697         (WebCore::mapAttributeToCSSProperty):
698         (WebCore::SVGStyledElement::cssPropertyIdForSVGAttributeName): remove font-size-adjust
699
700 2007-10-08  Sam Weinig  <sam@webkit.org>
701
702         Reviewed by Steve Falkenburg;
703
704         Fix for <rdar://problem/5519698> CrashTracer: [USER] 47 crashes in Safari at com.apple.WebCore: WebCore::XMLTokenizer::lineNumber const + 9
705
706         Test: fast/innerHTML/innerHTML-script-tag-crash.xhtml
707
708         * dom/XMLTokenizer.cpp:
709         (WebCore::XMLTokenizer::lineNumber): Return 1 when there is no context.
710         (WebCore::XMLTokenizer::columnNumber): ditto.
711
712 2007-10-08  Alexey Proskuryakov  <ap@webkit.org>
713
714         * platform/mac/FontPlatformDataMac.mm:
715         (WebCore::FontPlatformData::setFont): Restored one of the -1 checks removed in
716         the previous change - we do need to check m_font!
717
718 2007-10-08  Alexey Proskuryakov  <ap@webkit.org>
719
720         Reviewed by Darin.
721
722         http://bugs.webkit.org/show_bug.cgi?id=15397
723         Layout tests freeze in HashTable::lookup
724
725         Fixes a DRT freeze on PowerPC.
726
727         * platform/mac/FontPlatformDataMac.mm:
728         (WebCore::FontPlatformData::FontPlatformData): Don't ask for a size of a nil font,
729         the result is undefined.
730         (WebCore::FontPlatformData::setFont): Ditto. Also removed some checks for -1 that
731         were not sufficient, and thus likely unnecessary,
732
733 2007-10-07  Nikolas Zimmermann  <zimmermann@kde.org>
734
735         Reviewed by Eric.
736
737         Fix some issues with rotation & baseline-shift, when spanning
738         across <tspan> elements. Highlighted by the existing batik tests.
739
740         * rendering/SVGCharacterLayoutInfo.cpp:
741         (WebCore::SVGCharacterLayoutInfo::SVGCharacterLayoutInfo):
742         (WebCore::SVGCharacterLayoutInfo::processedChunk):
743         (WebCore::SVGChar::characterTransform):
744         * rendering/SVGCharacterLayoutInfo.h:
745         * rendering/SVGInlineTextBox.cpp:
746         (WebCore::SVGInlineTextBox::calculateGlyphBoundaries):
747         (WebCore::SVGInlineTextBox::paintCharacters):
748         (WebCore::SVGInlineTextBox::paintDecoration):
749         * rendering/SVGRootInlineBox.cpp:
750         (WebCore::SVGRootInlineBox::buildLayoutInformationForTextBox):
751
752 2007-10-07  Mark Rowe  <mrowe@apple.com>
753
754         Reviewed by Maciej.
755
756         Bug 5122: Need an equivalent of Mozilla's DOMContentLoaded event
757         http://bugs.webkit.org/show_bug.cgi?id=5122
758
759         This is based on a patch by Daniel Peebles (pumpkingod@gmail.com).
760
761         Test: http/tests/loading/DOMContentLoaded-event.html
762
763         * dom/Document.cpp:
764         (WebCore::Document::finishedParsing): Dispatch the DOMContentLoaded event when parsing completes.
765         * dom/EventNames.h:  Add DOMContentLoaded to the list of events.
766
767 2007-10-07  Alexey Proskuryakov  <ap@webkit.org>
768
769         Reviewed by Eric Seidel.
770
771         http://bugs.webkit.org/show_bug.cgi?id=15368
772         xsl:import fails when preceded by comment
773
774         Test: fast/xsl/import-after-comment.xml
775
776         * xml/XSLStyleSheet.cpp:
777         (WebCore::XSLStyleSheet::loadChildSheets): It's OK for xsl:import to be preceded by
778         non-element nodes.
779
780 2007-10-07  Vincent Ricard  <magic@magicninja.org>
781
782         Reviewed by Maciej.  Landed by eseidel.
783
784         http://bugs.webkit.org/show_bug.cgi?id=15062
785         Implement document.compatMode
786
787         Tests: fast/dom/compatMode-AlmostStrict.html
788                fast/dom/compatMode-Compat.html
789                fast/dom/compatMode-Strict.html
790
791         * html/HTMLDocument.cpp:
792         (WebCore::HTMLDocument::compatMode):
793         * html/HTMLDocument.h:
794         * html/HTMLDocument.idl:
795
796 2007-10-07  Sam Weinig  <sam@webkit.org>
797
798         Reviewed by Darin & Nikolas.  Landed by eseidel.
799
800         Patch for http://bugs.webkit.org/show_bug.cgi?id=14455
801         Autogenerate the JS bindings for the StyleSheetList
802
803         * DerivedSources.make:
804         * WebCore.pro:
805         * WebCore.vcproj/WebCore.vcproj:
806         * WebCore.xcodeproj/project.pbxproj:
807         * bindings/js/JSStyleSheetListCustom.cpp: Added.
808         (WebCore::JSStyleSheetList::canGetItemsForName):
809         (WebCore::JSStyleSheetList::nameGetter):
810         * bindings/js/kjs_css.cpp:
811         * bindings/js/kjs_css.h:
812         * bindings/objc/DOMUtility.mm:
813         * bindings/scripts/CodeGeneratorJS.pm:
814         * css/StyleSheetList.cpp:
815         (WebCore::StyleSheetList::StyleSheetList):
816         (WebCore::StyleSheetList::documentDestroyed):
817         (WebCore::StyleSheetList::getNamedItem):
818         * css/StyleSheetList.h: Add Document member variable and
819         getNamedItem function to accommodate the odd javascript 
820         name getter functionality.
821         * css/StyleSheetList.idl:
822         * dom/Document.cpp:
823         (WebCore::Document::Document):
824         (WebCore::Document::~Document):
825         * page/DOMWindow.idl: Add StyleSheetListConstructor
826
827 2007-10-07  Lars Naesbye Christensen  <lars@naesbye.dk>
828
829         Reviewed by Eric Seidel.
830
831         make CSS cell cursor more mac-like
832         http://bugs.webkit.org/show_bug.cgi?id=15325
833
834         * Resources/cellCursor.png:
835
836 2007-10-06  Eric Seidel  <eric@webkit.org>
837
838         Reviewed by Oliver.
839         
840         SVG does not correctly handle onfocusin, onfocusout or onactivate
841         http://bugs.webkit.org/show_bug.cgi?id=12573
842
843         Test: svg/W3C-SVG-1.1/script-handle-02-b.svg
844
845         * ksvg2/svg/SVGElement.cpp:
846         (WebCore::SVGElement::parseMappedAttribute):
847         * ksvg2/svg/svgattrs.in: add onfocusin, onfocusout and onactivate
848
849 2007-10-06  Nikolas Zimmermann  <zimmermann@kde.org>
850
851         Reviewed by Oliver.
852
853         Never pass null input images to CICrop filter.
854
855         * platform/graphics/svg/filters/cg/SVGFEComponentTransferCg.mm:
856         (WebCore::SVGFEComponentTransfer::getCIFilter):
857         * platform/graphics/svg/filters/cg/SVGFEHelpersCg.h:
858
859 2007-10-06  Mark Rowe  <mrowe@apple.com>
860
861         Reviewed by Alp Toker.
862
863         Gtk+ build fix and minor code cleanup.
864
865         * WebCore.pro:
866         * platform/gtk/FontCacheGtk.cpp:
867         (WebCore::FontCache::getLastResortFallbackFont):
868         (WebCore::FontCache::fontExists):
869
870 2007-10-06  Alexey Proskuryakov  <ap@webkit.org>
871
872         Reviewed by Mitz.
873
874         http://bugs.webkit.org/show_bug.cgi?id=15380
875         XPath: id('foo') doesn't resolve correctly
876
877         Test: fast/xpath/id-simple.html
878
879         * xml/XPathFunctions.cpp:
880         (WebCore::XPath::FunId::evaluate): Fixed a logic error in id() parameter parsing.
881
882 2007-10-06  Alexey Proskuryakov  <ap@webkit.org>
883
884         Reviewed by Darin.
885
886         Patch for http://bugs.webkit.org/show_bug.cgi?id=13707
887         REGRESSION: JavaScript exceptions on quotes.burntelectrons.org
888
889         http://bugs.webkit.org/show_bug.cgi?id=12628
890         document.body is not supported in XHTML documents
891
892         http://bugs.webkit.org/show_bug.cgi?id=14213
893         On page with MIME type application/xhtml+xml, cookie don't work
894
895         Moved a bunch of methods and properties from HTMLDocument down into Document to make
896         them available for all documents (xml, svg).
897         What was kept in HTMLDocument:
898         - some methods and properties that are not in HTML5 (yet?);
899         - open/write/writeln/close, as they will need to be modified to work on XML documents, and aren't
900         of much use for those anyway;
901         - designMode, because its definition in HTML5 is incompatible with our implementation.
902
903         Covered by existing tests.
904
905         * bindings/js/JSDocumentCustom.cpp:
906         (WebCore::JSDocument::location):
907         (WebCore::JSDocument::setLocation):
908         * bindings/js/JSHTMLDocumentCustom.cpp:
909         * bindings/objc/PublicDOMInterfaces.h:
910         * dom/Document.cpp:
911         (WebCore::Document::setBody):
912         (WebCore::Document::cookie):
913         (WebCore::Document::setCookie):
914         (WebCore::Document::lastModified):
915         * dom/Document.h:
916         (WebCore::Document::title):
917         * dom/Document.idl:
918         * html/HTMLDocument.cpp:
919         * html/HTMLDocument.h:
920         * html/HTMLDocument.idl:
921
922 2007-10-06  Eric Seidel  <eric@webkit.org>
923
924         Reviewed by Oliver Hunt.
925
926         RenderSVGContainer (<g>) should not repaint when its bounds change (unless it has a filter)
927         http://bugs.webkit.org/show_bug.cgi?id=15388
928         This makes the Sun Lively Kernel invalidate only what it should!
929         
930         No tests possible in DRT.
931
932         * ksvg2/svg/SVGCircleElement.cpp:
933         (WebCore::SVGCircleElement::notifyAttributeChange): replace call to rebuildRenderer
934         * ksvg2/svg/SVGEllipseElement.cpp:
935         (WebCore::SVGEllipseElement::notifyAttributeChange): replace call to rebuildRenderer
936         * ksvg2/svg/SVGImageElement.cpp:
937         (WebCore::SVGImageElement::notifyAttributeChange): replace call to rebuildRenderer
938         (WebCore::SVGImageElement::hasRelativeValues): implemented
939         * ksvg2/svg/SVGImageElement.h:
940         * ksvg2/svg/SVGLineElement.cpp:
941         (WebCore::SVGLineElement::notifyAttributeChange): replace call to rebuildRenderer
942         * ksvg2/svg/SVGPathElement.cpp:
943         (WebCore::SVGPathElement::notifyAttributeChange): replace call to rebuildRenderer
944         * ksvg2/svg/SVGPolyElement.cpp:
945         (WebCore::SVGPolyElement::notifyAttributeChange): replace call to rebuildRenderer
946         * ksvg2/svg/SVGRectElement.cpp:
947         (WebCore::SVGRectElement::notifyAttributeChange): replace call to rebuildRenderer
948         * ksvg2/svg/SVGStyledElement.cpp:
949         * ksvg2/svg/SVGStyledElement.h:
950         (WebCore::SVGStyledElement::hasRelativeValues): default to true instead
951         * ksvg2/svg/SVGStyledTransformableElement.cpp:
952         (WebCore::SVGStyledTransformableElement::updateLocalTransform): don't layout if no change
953         * ksvg2/svg/SVGStyledTransformableElement.h:
954         * ksvg2/svg/SVGTransform.h:
955         * rendering/RenderPath.cpp:
956         (WebCore::RenderPath::layout):
957         * rendering/RenderPath.h:
958         * rendering/RenderSVGContainer.cpp:
959         (WebCore::RenderSVGContainer::layout):
960         (WebCore::RenderSVGContainer::selfWillPaint): return true if have a filter
961         (WebCore::RenderSVGContainer::paint):
962         * rendering/RenderSVGContainer.h:
963         * rendering/RenderSVGHiddenContainer.cpp:
964         (WebCore::RenderSVGHiddenContainer::layout):
965         * rendering/RenderSVGRoot.cpp:
966         (WebCore::RenderSVGRoot::layout):
967         * rendering/RenderSVGViewportContainer.cpp:
968         (WebCore::RenderSVGViewportContainer::layout):
969         (WebCore::RenderSVGViewportContainer::calcViewport): use floats
970
971 2007-10-06  Rob Buis  <buis@kde.org>
972
973         Reviewed by Eric.
974
975         Use document() instead of ownerDocument() and a few other cleanups.
976
977         * ksvg2/misc/SVGDocumentExtensions.cpp:
978         (WebCore::SVGDocumentExtensions::mapInstanceToElement):
979         * ksvg2/svg/SVGCircleElement.cpp:
980         (WebCore::SVGCircleElement::notifyAttributeChange):
981         * ksvg2/svg/SVGClipPathElement.cpp:
982         (WebCore::SVGClipPathElement::notifyAttributeChange):
983         * ksvg2/svg/SVGElementInstance.cpp:
984         (WebCore::containsUseChildNode):
985         * ksvg2/svg/SVGEllipseElement.cpp:
986         (WebCore::SVGEllipseElement::notifyAttributeChange):
987         * ksvg2/svg/SVGGradientElement.cpp:
988         (WebCore::SVGGradientElement::notifyAttributeChange):
989         * ksvg2/svg/SVGImageElement.cpp:
990         (WebCore::SVGImageElement::notifyAttributeChange):
991         * ksvg2/svg/SVGLineElement.cpp:
992         (WebCore::SVGLineElement::notifyAttributeChange):
993         * ksvg2/svg/SVGMarkerElement.cpp:
994         (WebCore::SVGMarkerElement::notifyAttributeChange):
995         * ksvg2/svg/SVGMaskElement.cpp:
996         (WebCore::SVGMaskElement::notifyAttributeChange):
997         * ksvg2/svg/SVGPathElement.cpp:
998         (WebCore::SVGPathElement::notifyAttributeChange):
999         * ksvg2/svg/SVGPatternElement.cpp:
1000         (WebCore::SVGPatternElement::notifyAttributeChange):
1001         * ksvg2/svg/SVGPolyElement.cpp:
1002         (WebCore::SVGPolyElement::notifyAttributeChange):
1003         * ksvg2/svg/SVGRectElement.cpp:
1004         (WebCore::SVGRectElement::notifyAttributeChange):
1005         * ksvg2/svg/SVGStopElement.cpp:
1006         (WebCore::SVGStopElement::notifyAttributeChange):
1007
1008 2007-10-05  Eric Seidel  <eric@webkit.org>
1009
1010         Reviewed by Oliver Hunt.
1011
1012         SVG invalidates way too much during layout()
1013         http://bugs.webkit.org/show_bug.cgi?id=14003
1014
1015         * ksvg2/svg/SVGElement.cpp:
1016         (WebCore::SVGElement::ownerSVGElement): simplify if
1017         (WebCore::SVGElement::viewportElement): simplify if
1018         * rendering/RenderSVGContainer.cpp:
1019         (WebCore::RenderSVGContainer::layout): only layout children if parent changed
1020         * rendering/RenderSVGRoot.cpp:
1021         (WebCore::RenderSVGRoot::layout): only layout children when size changes
1022         * rendering/RenderSVGText.cpp:
1023         (WebCore::RenderSVGText::layout): hack to avoid bad RenderBlock::layout code
1024         * rendering/RenderSVGViewportContainer.cpp:
1025         (WebCore::RenderSVGViewportContainer::layout): don't use RenderSVGContainer::layout()
1026
1027 2007-10-05  Oliver Hunt  <oliver@apple.com>
1028
1029         Reviewed by Eric.
1030
1031         30%+ performance improvement for svg embedded in xhtml
1032
1033         Relayout internal to SVG was incorrectly being propagated to
1034         the containing xhtml element, which subsequently resulted in
1035         a full paint of the SVG, rather than just the dirty regions.
1036
1037         * rendering/RenderObject.cpp:
1038         (WebCore::objectIsRelayoutBoundary):
1039         (WebCore::RenderObject::markContainingBlocksForLayout):
1040
1041 2007-10-03  Eric Seidel  <eric@webkit.org>
1042
1043         Reviewed by Maciej.
1044         
1045         http://bugs.webkit.org/show_bug.cgi?id=12310
1046         Remove static variables from removeAllChildren causing crash.
1047         removeAllChildren now iterates over the entire tree instead of recursing.
1048         Also (according to Maciej) a possible 1-2% speedboost on HTML iBench.
1049
1050         Test: fast/images/svg-background-crash-on-refresh.html
1051
1052         * WebCore.xcodeproj/project.pbxproj:
1053         * dom/ContainerNode.cpp:
1054         (WebCore::addChildNodesToDeletionQueue):
1055         (WebCore::ContainerNode::removeAllChildren): use new addChildNodesToDeletionQueue
1056
1057 2007-10-03  David Hyatt  <hyatt@apple.com>
1058
1059         Land support for the CSS @font-face rule.  This patch allows custom fonts
1060         to be downloaded from the Web and rendered in Web pages.  Right now only
1061         TrueType fonts are supported.  Proprietary formats like .eot are not
1062         supported.
1063
1064         Reviewed by Eric Seidel
1065
1066         Many tests will be coming in a future landing.
1067
1068         * WebCore.base.exp:
1069         Expose some more stuff for WebKit, caused by font restructuring.
1070
1071         * WebCore.xcodeproj/project.pbxproj:
1072         Add all the new font face files.
1073
1074         * css/CSSComputedStyleDeclaration.cpp:
1075         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
1076         Make sure to ignore the 'src' property of @font-face rules.
1077
1078         * css/CSSFontFace.cpp: Added.
1079         (WebCore::CSSFontFace::CSSFontFace):
1080         (WebCore::CSSFontFace::~CSSFontFace):
1081         (WebCore::CSSFontFace::isLoaded):
1082         (WebCore::CSSFontFace::isValid):
1083         (WebCore::CSSFontFace::addSource):
1084         (WebCore::CSSFontFace::fontLoaded):
1085         (WebCore::CSSFontFace::getFontData):
1086         * css/CSSFontFace.h: Added.
1087         A CSSFontFace is a composite object.  It consists of multiple font-face sources, where each source represents either a remote or local
1088         file in a @font-face rule's src list.
1089
1090         * css/CSSFontFaceRule.cpp:
1091         (WebCore::CSSFontFaceRule::setDeclaration):
1092         (WebCore::CSSFontFaceRule::cssText):
1093         * css/CSSFontFaceRule.h:
1094         The implementation of the @font-face rule itself in the CSS sheet back end.
1095         
1096         * css/CSSFontFaceSource.cpp: Added.
1097         (WebCore::CSSFontFaceSource::CSSFontFaceSource):
1098         (WebCore::CSSFontFaceSource::~CSSFontFaceSource):
1099         (WebCore::CSSFontFaceSource::pruneTable):
1100         (WebCore::CSSFontFaceSource::isLoaded):
1101         (WebCore::CSSFontFaceSource::isValid):
1102         (WebCore::CSSFontFaceSource::fontLoaded):
1103         (WebCore::CSSFontFaceSource::getFontData):
1104         * css/CSSFontFaceSource.h: Added.
1105         (WebCore::CSSFontFaceSource::string):
1106         (WebCore::CSSFontFaceSource::setFontFace):
1107         A font face source represents a single remote or local font.  If it represents a remote font than it wraps a CachedFont.
1108         
1109         * css/CSSFontFaceSrcValue.cpp: Added.
1110         (WebCore::CSSFontFaceSrcValue::isSupportedFormat):
1111         (WebCore::CSSFontFaceSrcValue::cssText):
1112         * css/CSSFontFaceSrcValue.h: Added.
1113         (WebCore::CSSFontFaceSrcValue::m_isLocal):
1114         (WebCore::CSSFontFaceSrcValue::~CSSFontFaceSrcValue):
1115         (WebCore::CSSFontFaceSrcValue::resource):
1116         (WebCore::CSSFontFaceSrcValue::format):
1117         (WebCore::CSSFontFaceSrcValue::isLocal):
1118         (WebCore::CSSFontFaceSrcValue::setFormat):
1119         Used in parsing.  Represents the parsed form of the src value that can then be used to build up a CSSFontFace.
1120
1121         * css/CSSFontSelector.cpp: Added.
1122         (WebCore::CSSFontSelector::CSSFontSelector):
1123         (WebCore::CSSFontSelector::~CSSFontSelector):
1124         (WebCore::CSSFontSelector::isEmpty):
1125         (WebCore::CSSFontSelector::docLoader):
1126         (WebCore::hashForFont):
1127         (WebCore::CSSFontSelector::addFontFaceRule):
1128         (WebCore::CSSFontSelector::fontLoaded):
1129         (WebCore::CSSFontSelector::getFontData):
1130         * css/CSSFontSelector.h: Added.
1131         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
1132         back.
1133
1134         * css/CSSGrammar.y:
1135         * css/CSSParser.cpp:
1136         (WebCore::CSSParser::parseValue):
1137         (WebCore::CSSParser::parseFontFaceSrc):
1138         (WebCore::CSSParser::createFontFaceRule):
1139         * css/CSSParser.h:
1140         Modify the CSS grammar to now understand @font-face rules.
1141
1142         * css/CSSPropertyNames.in:
1143         Add the src property.
1144
1145         * css/CSSStyleSelector.cpp:
1146         (WebCore::CSSStyleSelector::CSSStyleSelector):
1147         (WebCore::CSSStyleSelector::styleForElement):
1148         (WebCore::CSSStyleSelector::updateFont):
1149         (WebCore::CSSRuleSet::addRulesFromSheet):
1150         (WebCore::CSSStyleSelector::applyProperty):
1151         (WebCore::CSSStyleSelector::ensureFontSelector):
1152         * css/CSSStyleSelector.h:
1153         (WebCore::CSSStyleSelector::fontSelector):
1154         The style selector now creates a font selector object and feeds it the appropriate information when @font-face rules are encountered.
1155     
1156         * dom/Document.cpp:
1157         (WebCore::Document::recalcStyle):
1158         Patch the update method now that it takes a font selector argument.
1159     
1160         * loader/Cache.cpp:
1161         (WebCore::createResource):
1162         (WebCore::Cache::getStatistics):
1163         * loader/Cache.h:
1164         Teach the Cache about CachedFonts.
1165
1166         * loader/CachedFont.cpp: Added.
1167         (WebCore::CachedFont::CachedFont):
1168         (WebCore::CachedFont::~CachedFont):
1169         (WebCore::CachedFont::ref):
1170         (WebCore::CachedFont::data):
1171         (WebCore::CachedFont::beginLoadIfNeeded):
1172         (WebCore::CachedFont::ensureCustomFontData):
1173         (WebCore::CachedFont::platformDataFromCustomData):
1174         (WebCore::CachedFont::allReferencesRemoved):
1175         (WebCore::CachedFont::checkNotify):
1176         (WebCore::CachedFont::error):
1177         * loader/CachedFont.h: Added.
1178         (WebCore::CachedFont::schedule):
1179         The implementation of CachedFont.  This represents the downloaded resource and has all the raw font data.
1180
1181         * loader/CachedResource.h:
1182         (WebCore::CachedResource::):
1183         * loader/CachedResourceClient.h:
1184         (WebCore::CachedResourceClient::fontLoaded):
1185         Add a new fontLoaded method for clients of cached resources to track when fonts finish downloading.
1186     
1187         * loader/DocLoader.cpp:
1188         (WebCore::DocLoader::requestFont):
1189         * loader/DocLoader.h:
1190          Add the ability to request a font.
1191
1192         * platform/Font.cpp:
1193         (WebCore::Font::operator==):
1194         (WebCore::Font::update):
1195         (WebCore::Font::drawText):
1196         * platform/Font.h:
1197         * platform/FontCache.cpp:
1198         (WebCore::FontCache::getFontData):
1199         * platform/FontCache.h:
1200         * platform/FontData.cpp:
1201         (WebCore::FontData::FontData):
1202         * platform/FontData.h:
1203         (WebCore::FontData::isCustomFont):
1204         (WebCore::FontData::isLoading):
1205         * platform/FontFallbackList.cpp:
1206         (WebCore::FontFallbackList::FontFallbackList):
1207         (WebCore::FontFallbackList::invalidate):
1208         (WebCore::FontFallbackList::fontDataAt):
1209         * platform/FontFallbackList.h:
1210         (WebCore::FontFallbackList::loadingCustomFonts):
1211         (WebCore::FontFallbackList::fontSelector):
1212         * platform/FontSelector.h: Added.
1213         (WebCore::FontSelector::~FontSelector):
1214         * platform/GlyphPageTreeNode.cpp:
1215         (WebCore::GlyphPageTreeNode::getRoot):
1216         (WebCore::GlyphPageTreeNode::pruneTreeCustomFontData):
1217         (WebCore::GlyphPageTreeNode::~GlyphPageTreeNode):
1218         (WebCore::GlyphPageTreeNode::initializePage):
1219         (WebCore::GlyphPageTreeNode::getChild):
1220         (WebCore::GlyphPageTreeNode::pruneCustomFontData):
1221         * platform/GlyphPageTreeNode.h:
1222         (WebCore::GlyphPageTreeNode::GlyphPageTreeNode):
1223         (WebCore::GlyphPageTreeNode::page):
1224         * platform/PopupMenuClient.h:
1225         * platform/mac/FontCacheMac.mm:
1226         (WebCore::FontCache::getFontDataForCharacters):
1227         (WebCore::FontCache::getLastResortFallbackFont):
1228         (WebCore::FontCache::fontExists):
1229         (WebCore::FontCache::createFontPlatformData):
1230         * platform/mac/FontCustomPlatformData.cpp: Added.
1231         (WebCore::FontCustomPlatformData::~FontCustomPlatformData):
1232         (WebCore::FontCustomPlatformData::fontPlatformData):
1233         (WebCore::createFontCustomPlatformData):
1234         * platform/mac/FontCustomPlatformData.h: Added.
1235         (WebCore::FontCustomPlatformData::FontCustomPlatformData):
1236         * platform/mac/FontDataMac.mm:
1237         (WebCore::initFontData):
1238         (WebCore::FontData::platformInit):
1239         (WebCore::FontData::smallCapsFontData):
1240         (WebCore::FontData::platformWidthForGlyph):
1241         (WebCore::FontData::checkShapesArabic):
1242         * platform/mac/FontMac.mm:
1243         (WebCore::initializeATSUStyle):
1244         (WebCore::Font::drawGlyphs):
1245         * platform/mac/FontPlatformData.h:
1246         (WebCore::FontPlatformData::FontPlatformData):
1247         (WebCore::FontPlatformData::hash):
1248         (WebCore::FontPlatformData::operator==):
1249         * platform/mac/FontPlatformDataMac.mm: Added.
1250         (WebCore::FontPlatformData::FontPlatformData):
1251         (WebCore::~FontPlatformData):
1252         (WebCore::FontPlatformData::setFont):
1253         * platform/mac/WebCoreSystemInterface.h:
1254         * platform/mac/WebCoreSystemInterface.mm:
1255         * platform/win/FontCacheWin.cpp:
1256         (WebCore::FontCache::getLastResortFallbackFont):
1257         (WebCore::FontCache::fontExists):
1258         * platform/win/FontCustomPlatformData.cpp: Added.
1259         (WebCore::FontCustomPlatformData::~FontCustomPlatformData):
1260         (WebCore::FontCustomPlatformData::fontPlatformData):
1261         (WebCore::getData):
1262         (WebCore::releaseData):
1263         (WebCore::getBytesWithOffset):
1264         (WebCore::createFontCustomPlatformData):
1265         * platform/win/FontCustomPlatformData.h: Added.
1266         (WebCore::FontCustomPlatformData::FontCustomPlatformData):
1267         * platform/win/FontDataWin.cpp:
1268         (WebCore::FontData::platformInit):
1269         (WebCore::FontData::platformDestroy):
1270         (WebCore::FontData::smallCapsFontData):
1271         (WebCore::FontData::containsCharacters):
1272         (WebCore::FontData::determinePitch):
1273         * platform/win/FontPlatformData.h:
1274         (WebCore::FontPlatformData::FontPlatformData):
1275         (WebCore::FontPlatformData::hash):
1276         (WebCore::FontPlatformData::operator==):
1277         * platform/win/FontPlatformDataWin.cpp:
1278         (WebCore::FontPlatformData::FontPlatformData):
1279         * platform/win/PopupMenuWin.cpp:
1280         (WebCore::PopupMenu::paint):
1281         Changes to platform to support rendering of custom fonts.  Too large to go into, but for ports, the relevant object to implement is
1282         FontCustomPlatformData (to get the data loaded into your native font format), and then you have to patch your other font objects to know
1283         how to use the font.
1284
1285         * rendering/RenderListBox.cpp:
1286         (WebCore::RenderListBox::updateFromElement):
1287         (WebCore::RenderListBox::paintItemForeground):
1288         * rendering/RenderMenuList.cpp:
1289         (WebCore::RenderMenuList::fontSelector):
1290         * rendering/RenderMenuList.h:
1291         * rendering/RenderTextControl.cpp:
1292         (WebCore::RenderTextControl::fontSelector):
1293         * rendering/RenderTextControl.h:
1294         * rendering/RenderThemeMac.mm:
1295         (WebCore::RenderThemeMac::setFontFromControlSize):
1296         * rendering/RenderThemeSafari.cpp:
1297         (WebCore::RenderThemeSafari::setFontFromControlSize):
1298         Patches for update now taking a font selector argument.
1299     
1300 2007-10-03  Rob Buis  <buis@kde.org>
1301
1302         Reviewed by Eric.
1303
1304         Remove unneeded code and other cleanups.
1305
1306         * ksvg2/svg/SVGScriptElement.cpp:
1307         (WebCore::SVGScriptElement::parseMappedAttribute):
1308         * ksvg2/svg/SVGScriptElement.h:
1309
1310 2007-10-03  Rob Buis  <buis@kde.org>
1311
1312         Reviewed by Maciej.
1313
1314         http://bugs.webkit.org/show_bug.cgi?id=15260
1315         Any styles defined after <element> {<property>:%} style are ignored by Safari
1316     
1317         Add dummy rule to skip constructions like width: %.
1318
1319         * css/CSSGrammar.y:
1320
1321 2007-10-03  Mark Rowe  <mrowe@apple.com>
1322
1323         Reviewed by Lars.
1324
1325         Get Gtk+ port building on the feature branch.
1326
1327         * WebCore.pro:
1328         * ksvg2/svg/SVGSVGElement.cpp:
1329         * platform/graphics/svg/cairo/RenderPathCairo.cpp:
1330         (WebCore::RenderPath::strokeContains):
1331         * platform/graphics/svg/cairo/SVGPaintServerCairo.cpp:
1332         (WebCore::SVGPaintServer::draw):
1333         (WebCore::SVGPaintServer::renderPath):
1334         * platform/graphics/svg/cairo/SVGPaintServerSolidCairo.cpp:
1335         (WebCore::SVGPaintServerSolid::setup):
1336         * platform/graphics/svg/cairo/SVGResourceMaskerCairo.cpp:
1337         (WebCore::SVGResourceMasker::applyMask):
1338         * rendering/SVGCharacterLayoutInfo.cpp:
1339         * rendering/SVGInlineTextBox.cpp:
1340         * rendering/SVGRootInlineBox.cpp:
1341
1342 2007-10-02  Alexey Proskuryakov  <ap@webkit.org>
1343
1344         Reviewed by Maciej.
1345
1346         http://bugs.webkit.org/show_bug.cgi?id=15102
1347         XMLHttpRequests should dispatch a readystatechange event.
1348
1349         Test: http/tests/xmlhttprequest/readystatechange.html
1350
1351         * xml/XMLHttpRequest.cpp:
1352         (WebCore::XMLHttpRequest::callReadyStateChangeListener): Added readystatechange
1353         event support. Fixed the function to dispatch the same event to all listeners
1354         instead of creating a new copy for each one. Changed bubbling/cancelability of
1355         load and readystatechange events to match Firefox.
1356
1357 2007-10-02  Eric Seidel  <eric@webkit.org>
1358
1359         Reviewed by Oliver Hunt.
1360
1361         http://bugs.webkit.org/show_bug.cgi?id=13828
1362         Fixes svg/custom/rootmost-svg-xy-attrs.xhtml
1363
1364         * WebCore.xcodeproj/project.pbxproj: fix warning about SVGDOM.h
1365         * ksvg2/svg/SVGSVGElement.cpp:
1366         (WebCore::SVGSVGElement::viewport): use new isOutermostSVG()
1367         (WebCore::SVGSVGElement::getCTM): use isOutermostSVG()
1368         (WebCore::SVGSVGElement::getScreenCTM): use isOutermostSVG()
1369         (WebCore::SVGSVGElement::createRenderer): use isOutermostSVG()
1370         (WebCore::SVGSVGElement::isOutermostSVG):
1371         * ksvg2/svg/SVGSVGElement.h: add isOutermostSVG
1372         * rendering/RenderSVGRoot.cpp:
1373         (WebCore::RenderSVGRoot::calcViewport): ignore x/y
1374
1375 2007-10-02  Maciej Stachowiak  <mjs@apple.com>
1376
1377         Reviewed by Mitz.
1378         
1379         - Avoid uselessly serializing CSS property values on replacement for 10% CK DOM speedup
1380         http://bugs.webkit.org/show_bug.cgi?id=15340
1381
1382         * css/CSSMutableStyleDeclaration.cpp:
1383         (WebCore::CSSMutableStyleDeclaration::removeProperty): Don't generate return value unless needed.
1384         (WebCore::CSSMutableStyleDeclaration::setProperty): Use the no-return version appropriately.
1385         * css/CSSMutableStyleDeclaration.h:
1386         (WebCore::CSSMutableStyleDeclaration::removeProperty): New version with no return value.
1387
1388 2007-10-02  Maciej Stachowiak  <mjs@apple.com>
1389
1390         Reviewed by Oliver.
1391
1392         - Use Vector<UChar> instead of DeprecatedString for innerHTML, for 35% speedup on CK DOM test
1393         http://bugs.webkit.org/show_bug.cgi?id=15339
1394
1395         Rewrote both versions of createMarkup to build based on
1396         Vector<UChar> instead of String. Also other miscellaneous
1397         speedups (mainly content strings are now encoded in a way that
1398         doesn't take a function call per character, and switch is avoided).
1399         
1400         This also causes a functional change - we no longer escape '>' since this was unnecessary and it's faster
1401         to avoid testing for it. See updated test results.
1402         
1403         * editing/markup.cpp:
1404         (WebCore::appendString):
1405         (WebCore::appendAttributeValue):
1406         (WebCore::escapeContentText):
1407         (WebCore::appendEscapedContent):
1408         (WebCore::appendDeprecatedString):
1409         (WebCore::appendQuotedURLAttributeValue):
1410         (WebCore::stringValueForRange):
1411         (WebCore::ucharRange):
1412         (WebCore::appendUCharRange):
1413         (WebCore::appendNamespace):
1414         (WebCore::appendStartMarkup):
1415         (WebCore::getStartMarkup):
1416         (WebCore::appendEndMarkup):
1417         (WebCore::getEndMarkup):
1418         (WebCore::appendMarkup):
1419         (WebCore::joinMarkups):
1420         (WebCore::createMarkup):
1421         * editing/markup.h:
1422         * page/mac/WebCoreFrameBridge.mm:
1423         (-[WebCoreFrameBridge markupStringFromNode:nodes:]):
1424         (-[WebCoreFrameBridge markupStringFromRange:nodes:]):
1425
1426 2007-10-02  Maciej Stachowiak  <mjs@apple.com>
1427
1428         Reviewed by Eric.
1429         
1430         - fixed "innerHTML updates layout every time (very bad if adding to it in a loop)"
1431         http://bugs.webkit.org/show_bug.cgi?id=15326
1432         (65% speedup on Celtic Kane JS 2007 DOM test)
1433
1434         * editing/markup.cpp:
1435         (WebCore::createMarkup): The Node version of this function currently never uses
1436         the render tree, so don't bother to update layout. This is the version used for
1437         innerHTML.
1438
1439 2007-10-02  Nicholas Shanks  <webkit@nickshanks.com>
1440
1441         Reviewed by eseidel & hyatt.
1442
1443         Add support for CSS3 values 'start' and 'end' to text-align property.
1444
1445         * css/cssparser.cpp:
1446         (WebCore::CSSParser::parseValue): allow start and end values
1447         * css/cssstyleselector.cpp:
1448         (WebCore::CSSStyleSelector::applyProperty): handle start and end values
1449
1450 2007-10-01  Oliver Hunt  <oliver@apple.com>
1451
1452         Reviewed by Mark.
1453
1454         Enable Experimental SVG features by default when building from Xcode
1455
1456         * Configurations/WebCore.xcconfig:
1457
1458 2007-10-01  Eric Seidel  <eric@webkit.org>
1459
1460         Reviewed by Oliver Hunt.
1461
1462         This only affects Debug builds, and the ability to save SVGs as WebArchives
1463         neither are testable via DumpRenderTree.
1464
1465         * Configurations/WebCore.xcconfig: change where Xcode looks for WebCore.exp
1466         * DerivedSources.make: adds SVG symbols to WebCore.exp when necessary
1467         * WebCore.SVG.exp: Added.
1468         * WebCore.exp: moved to WebCore.base.exp
1469         * WebCore.xcodeproj/project.pbxproj: updated to reflect moved files
1470         * bindings/objc/DOMSVGExecption.h: moved to DOMSVGException.h
1471
1472 2007-10-01  Eric Seidel  <eric@webkit.org>
1473
1474         Reviewed by olliej.
1475
1476         Make feature-branch build again with ENABLE_SVG_EXPERIMENTAL_FEATURES
1477         Needed a double -> float change to make the new filter types build.
1478
1479         Build fix, no test cases.
1480
1481         * ksvg2/svg/SVGComponentTransferFunctionElement.cpp:
1482         * ksvg2/svg/SVGComponentTransferFunctionElement.h:
1483         * ksvg2/svg/SVGFECompositeElement.cpp:
1484         * ksvg2/svg/SVGFECompositeElement.h:
1485         * ksvg2/svg/SVGFEDiffuseLightingElement.cpp:
1486         * ksvg2/svg/SVGFEDiffuseLightingElement.h:
1487         * ksvg2/svg/SVGFEDisplacementMapElement.cpp:
1488         * ksvg2/svg/SVGFEDisplacementMapElement.h:
1489         * ksvg2/svg/SVGFEGaussianBlurElement.cpp:
1490         * ksvg2/svg/SVGFEGaussianBlurElement.h:
1491         * ksvg2/svg/SVGFELightElement.cpp:
1492         * ksvg2/svg/SVGFELightElement.h:
1493         * ksvg2/svg/SVGFEOffsetElement.cpp:
1494         * ksvg2/svg/SVGFEOffsetElement.h:
1495         * ksvg2/svg/SVGFESpecularLightingElement.cpp:
1496         * ksvg2/svg/SVGFESpecularLightingElement.h:
1497         * ksvg2/svg/SVGFETurbulenceElement.cpp:
1498         * ksvg2/svg/SVGFETurbulenceElement.h:
1499
1500 2007-09-30  Julien  <julien.chaffraix@gmail.com>
1501
1502         Reviewed by aroben & eseidel.
1503
1504         fix http://bugs.webkit.org/show_bug.cgi?id=14898
1505
1506         getAllResponseHeaders() separates each header with a CR LF according to the specification
1507
1508         Test: http/tests/xmlhttprequest/xmlhttprequest-crlf-getAllResponseHeader.html
1509
1510         * xml/XMLHttpRequest.cpp:
1511         (WebCore::XMLHttpRequest::getAllResponseHeaders):
1512
1513 2007-09-28  Eric Seidel  <eric@webkit.org>
1514
1515         Reviewed by Sam Wenig.
1516
1517         ASSERT when dragging <svg:image> with non-null prefix
1518         http://bugs.webkit.org/show_bug.cgi?id=15308
1519
1520         * bindings/objc/DOM.mm:
1521         (WebCore::lookupElementClass): added
1522         (WebCore::elementClass): use new lookupElementClass function
1523
1524 2007-09-25  Eric Seidel  <eric@webkit.org>
1525
1526         Reviewed by Mark Rowe.
1527
1528         I managed to break the SVG build when fixing the --no-svg build for
1529         http://bugs.webkit.org/show_bug.cgi?id=15281
1530         This adds the appropriate DOMSVG headers to the copy headers phase
1531         (in fixing the no-svg build I mistakenly re-marked them project-only)
1532
1533         * WebCore.xcodeproj/project.pbxproj:
1534
1535 2007-09-25  Eric Seidel  <eric@webkit.org>
1536
1537         Reviewed by Rob Buis.
1538
1539         Already tested by SVG/W3C-SVG-1.1/linking-a-07-t.svg
1540
1541         * ksvg2/svg/SVGAElement.cpp:
1542         (WebCore::SVGAElement::defaultEventHandler): properly pass along target values
1543
1544 2007-09-22  Oliver Hunt  <oliver@apple.com>
1545
1546         Reviewed by NOBODY (Build fix).
1547
1548         * platform/graphics/svg/cg/SVGPaintServerGradientCg.cpp:
1549         (WebCore::SVGPaintServerGradient::teardown):
1550         (WebCore::SVGPaintServerGradient::renderPath):
1551         * rendering/SVGRootInlineBox.cpp:
1552         (WebCore::SVGRootInlineBoxPaintWalker::chunkPortionCallback):
1553
1554 2007-09-09  Nikolas Zimmermann  <zimmermann@kde.org>
1555
1556         Reviewed by Oliver.
1557
1558         Rework <pattern> support to take overflow & viewBox into account.
1559         Also fix all possible combinations of patternUnits/patternContentUnits, tested by several batik testcases.
1560         (Status: <mask>, <pattern>, <linearGradient>, <radialGradient>, <filter> regions work perfectly. <clipPath> is sill todo)
1561
1562         While I'm at it, add a very helpful debugging tool "dumpCGOutputImage" and rename "dumpOutputImage" to "dumpCIOutputImage".
1563         Also fix possible null image buffer problems. (ie. large alloc)
1564
1565         Fixes: http://bugs.webkit.org/show_bug.cgi?id=12221 (Webkit ToT fails to render this pattern example)
1566
1567         * ksvg2/svg/PatternAttributes.h:
1568         (WebCore::PatternAttributes::PatternAttributes):
1569         (WebCore::PatternAttributes::x):
1570         (WebCore::PatternAttributes::y):
1571         (WebCore::PatternAttributes::width):
1572         (WebCore::PatternAttributes::height):
1573         (WebCore::PatternAttributes::setX):
1574         (WebCore::PatternAttributes::setY):
1575         (WebCore::PatternAttributes::setWidth):
1576         (WebCore::PatternAttributes::setHeight):
1577         * ksvg2/svg/SVGPatternElement.cpp:
1578         (WebCore::SVGPatternElement::buildPattern):
1579         (WebCore::SVGPatternElement::collectPatternProperties):
1580         * platform/graphics/svg/cg/SVGPaintServerGradientCg.cpp:
1581         (WebCore::SVGPaintServerGradient::setup):
1582         * platform/graphics/svg/cg/SVGPaintServerPatternCg.cpp:
1583         (WebCore::patternCallback):
1584         (WebCore::SVGPaintServerPattern::setup):
1585         * platform/graphics/svg/cg/SVGResourceFilterCg.mm:
1586         (WebCore::dumpCIOutputImage):
1587         (WebCore::dumpCGOutputImage):
1588
1589 2007-09-05  Nikolas Zimmermann  <zimmermann@kde.org>
1590
1591         Reviewed by Oliver.
1592
1593         Fix <mask> in userSpaceOnUse coordinates. Verified by new testcase taken from Batik.
1594
1595         * ksvg2/svg/SVGMaskElement.cpp:
1596         (WebCore::SVGMaskElement::drawMaskerContent):
1597
1598 2007-09-03  Nikolas Zimmermann  <zimmermann@kde.org>
1599
1600         Reviewed by Oliver.
1601
1602         Rewrite text painting code path, to be based on "text chunks" instead of using the InlineBox* hierarchy.
1603         This allows us to reuse paint servers as long as possible - and to actually paint in the way didacted by the spec.
1604
1605         This also implements advanced SVG text decorations (ie. stroked/filled decos with gradient/pattern).
1606         Fixes: http://bugs.webkit.org/show_bug.cgi?id=7200 (Gradient appears and disappears in SVG when text is off screen)
1607
1608         Fixes paint server usage on text paths. (ie. styled text paths, with gradients/filters).
1609
1610         * platform/graphics/svg/SVGPaintServer.h:
1611         * platform/graphics/svg/SVGPaintServerGradient.h:
1612         * platform/graphics/svg/cg/SVGPaintServerCg.cpp:
1613         (WebCore::SVGPaintServer::draw):
1614         (WebCore::SVGPaintServer::renderPath):
1615         (WebCore::SVGPaintServer::strokePath):
1616         (WebCore::SVGPaintServer::clipToStrokePath):
1617         (WebCore::SVGPaintServer::fillPath):
1618         (WebCore::SVGPaintServer::clipToFillPath):
1619         * platform/graphics/svg/cg/SVGPaintServerGradientCg.cpp:
1620         (WebCore::findTextRootObject):
1621         (WebCore::SVGPaintServerGradient::teardown):
1622         (WebCore::SVGPaintServerGradient::renderPath):
1623         (WebCore::SVGPaintServerGradient::handleBoundingBoxModeAndGradientTransformation):
1624         (WebCore::SVGPaintServerGradient::setup):
1625         * platform/graphics/svg/cg/SVGPaintServerSolidCg.cpp:
1626         (WebCore::SVGPaintServerSolid::setup):
1627         * platform/graphics/svg/qt/SVGPaintServerQt.cpp:
1628         (WebCore::SVGPaintServer::draw):
1629         (WebCore::SVGPaintServer::renderPath):
1630         * rendering/RenderSVGInlineText.cpp:
1631         * rendering/RenderSVGTSpan.cpp:
1632         * rendering/RenderSVGText.cpp:
1633         * rendering/RenderSVGTextPath.cpp:
1634         * rendering/SVGCharacterLayoutInfo.h:
1635         (WebCore::SVGTextChunkWalkerBase::~SVGTextChunkWalkerBase):
1636         (WebCore::SVGTextChunkWalker::SVGTextChunkWalker):
1637         (WebCore::SVGTextChunkWalker::operator()):
1638         (WebCore::SVGTextChunkWalker::start):
1639         (WebCore::SVGTextChunkWalker::end):
1640         (WebCore::SVGTextChunkWalker::setupFill):
1641         (WebCore::SVGTextChunkWalker::setupStroke):
1642         * rendering/SVGInlineFlowBox.h:
1643         * rendering/SVGInlineTextBox.cpp:
1644         (WebCore::SVGInlineTextBoxClosestCharacterToPositionWalker::SVGInlineTextBoxClosestCharacterToPositionWalker):
1645         (WebCore::SVGInlineTextBoxClosestCharacterToPositionWalker::chunkPortionCallback):
1646         (WebCore::SVGInlineTextBoxClosestCharacterToPositionWalker::character):
1647         (WebCore::SVGInlineTextBoxClosestCharacterToPositionWalker::offset):
1648         (WebCore::SVGInlineTextBoxSelectionRectWalker::SVGInlineTextBoxSelectionRectWalker):
1649         (WebCore::SVGInlineTextBoxSelectionRectWalker::chunkPortionCallback):
1650         (WebCore::SVGInlineTextBoxSelectionRectWalker::selectionRect):
1651         (WebCore::SVGInlineTextBox::closestCharacterToPosition):
1652         (WebCore::SVGInlineTextBox::selectionRect):
1653         (WebCore::SVGInlineTextBox::paintCharacters):
1654         (WebCore::SVGInlineTextBox::paintSelection):
1655         (WebCore::pathForDecoration):
1656         (WebCore::SVGInlineTextBox::paintDecoration):
1657         * rendering/SVGInlineTextBox.h:
1658         * rendering/SVGRenderSupport.cpp:
1659         (WebCore::prepareToRenderSVGContent):
1660         * rendering/SVGRenderSupport.h:
1661         * rendering/SVGRootInlineBox.cpp:
1662         (WebCore::SVGRootInlineBoxPaintWalker::SVGRootInlineBoxPaintWalker):
1663         (WebCore::SVGRootInlineBoxPaintWalker::~SVGRootInlineBoxPaintWalker):
1664         (WebCore::SVGRootInlineBoxPaintWalker::teardownFillPaintServer):
1665         (WebCore::SVGRootInlineBoxPaintWalker::teardownStrokePaintServer):
1666         (WebCore::SVGRootInlineBoxPaintWalker::chunkStartCallback):
1667         (WebCore::SVGRootInlineBoxPaintWalker::chunkEndCallback):
1668         (WebCore::SVGRootInlineBoxPaintWalker::chunkSetupFillCallback):
1669         (WebCore::SVGRootInlineBoxPaintWalker::chunkSetupStrokeCallback):
1670         (WebCore::SVGRootInlineBoxPaintWalker::chunkPortionCallback):
1671         (WebCore::SVGRootInlineBox::paint):
1672         (WebCore::SVGRootInlineBox::buildLayoutInformationForTextBox):
1673         (WebCore::addPaintServerToTextDecorationInfo):
1674         (WebCore::SVGRootInlineBox::retrievePaintServersForTextDecoration):
1675         (WebCore::SVGRootInlineBox::walkTextChunks):
1676         * rendering/SVGRootInlineBox.h:
1677
1678 2007-08-27  Nikolas Zimmermann  <zimmermann@kde.org>
1679
1680         Reviewed by Mitz.
1681
1682         Expose unitsPerEm() in Font classes.
1683         This is needed to implement SVG's advanced text decorations. We won't draw lines for text-decorations
1684         but fillable & strokable rectangles with a certain height, computed through unitsPerEm & font size.
1685
1686         * platform/Font.cpp:
1687         (WebCore::Font::unitsPerEm):
1688         * platform/Font.h:
1689         * platform/FontData.h:
1690         (WebCore::FontData::unitsPerEm):
1691         * platform/gdk/FontDataGdk.cpp:
1692         (WebCore::FontData::platformInit):
1693         * platform/mac/FontDataMac.mm:
1694         (WebCore::FontData::platformInit):
1695         * platform/qt/FontDataQt.cpp:
1696         (WebCore::FontData::platformInit):
1697         * platform/win/FontDataWin.cpp:
1698         (WebCore::FontData::platformInit):
1699         * platform/wx/FontDataWx.cpp:
1700         (WebCore::FontData::platformInit):
1701
1702 2007-08-27  Oliver Hunt  <oliver@apple.com>
1703
1704         Reviewed by NOBODY (Build fix).
1705
1706         Initialise iterators to appease gcc
1707
1708         * rendering/SVGInlineTextBox.cpp:
1709         (WebCore::SVGInlineTextBox::closestCharacterToPosition):
1710
1711 2007-08-22  Rob Buis  <buis@kde.org>
1712
1713         Reviewed by Sam.
1714
1715         http://bugs.webkit.org/show_bug.cgi?id=12059
1716         SVG colors have two separate parsing paths (one CSS and one SVGColor::setRGBColor)
1717
1718         Reuse the css parser as much as possible in setRGBColor.
1719
1720         * css/cssparser.cpp:
1721         (WebCore::CSSParser::parseColor):
1722         * css/cssparser.h:
1723         * editing/ApplyStyleCommand.cpp:
1724         (WebCore::StyleChange::checkForLegacyHTMLStyleChange):
1725         * html/CanvasGradient.cpp:
1726         (WebCore::CanvasGradient::addColorStop):
1727         * html/CanvasRenderingContext2D.cpp:
1728         (WebCore::CanvasRenderingContext2D::setShadow):
1729         (WebCore::CanvasRenderingContext2D::applyShadow):
1730         * html/CanvasStyle.cpp:
1731         (WebCore::CanvasStyle::applyStrokeColor):
1732         (WebCore::CanvasStyle::applyFillColor):
1733         * ksvg2/svg/SVGColor.cpp:
1734         (WebCore::SVGColor::colorFromRGBColorString):
1735
1736 2007-08-21  Nikolas Zimmermann  <zimmermann@kde.org>
1737
1738         Reviewed by Oliver.
1739
1740         Large SVG filter rework. Bring it back in a useable state.
1741
1742         Fixes: http://bugs.webkit.org/show_bug.cgi?id=5527 (Filters need subregion support)
1743         Fixes: http://bugs.webkit.org/show_bug.cgi?id=5579 (WebKit+SVG renders full-filters-example incorrectly)
1744         Fixes: http://bugs.webkit.org/show_bug.cgi?id=5976 (filterUnits="userSpaceOnUse" is broken (breaking feTile test case))
1745         Fixes: http://bugs.webkit.org/show_bug.cgi?id=12064 (Need function for manual style-resolution for things like gradient stops)
1746
1747         filters-blend-01-b.svg & filters-example-01-b.svg & filters-displace-01-b.svg & filters-diffuse-01-f.svg are fixed now.
1748
1749         In detail:
1750         - flood-color & flood-opacity have been incorrectly resolved on the <feBlend> parent element!
1751         - 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
1752         - add subregion support to all filter primitives (primitiveUnits & filterUnits handled in all cases)
1753         - WKDisplacmentMap.cikernel incorrectly flipped the y-axis.
1754         - Correctly specify default values for all filter primitives in ksvg2/svg!
1755         - Initialize all variables of the SVGFE* classes in platform/graphics/svg/filters.
1756         - Fix 'flood-color' initial value (was set to the _stop_ color initial value)
1757           -> both initial values were pointing to 'black' though, so it was no visible problem.
1758         - Parse 'lighting-color' css property, no more hacking in SVGFEDiffuseLighting.
1759           -> Correct it's initial from black to white value fixes SVG lighting filters!
1760         - Add diffuseConstant support to feDiffuseLighting filter.
1761         - Centralize manual style resolution (needed for stop-color, flood-color & flood-opacity, lighting-color)
1762
1763         * ksvg2/css/SVGCSSParser.cpp:
1764         * ksvg2/css/SVGCSSStyleSelector.cpp:
1765         (WebCore::CSSStyleSelector::applySVGProperty):
1766         * ksvg2/css/SVGRenderStyle.h:
1767         * ksvg2/css/SVGRenderStyleDefs.cpp:
1768         (StyleMiscData::StyleMiscData):
1769         (StyleMiscData::operator==):
1770         * ksvg2/css/SVGRenderStyleDefs.h:
1771         * ksvg2/svg/SVGComponentTransferFunctionElement.cpp:
1772         (WebCore::SVGComponentTransferFunctionElement::SVGComponentTransferFunctionElement):
1773         * ksvg2/svg/SVGFEBlendElement.cpp:
1774         (WebCore::SVGFEBlendElement::SVGFEBlendElement):
1775         (WebCore::SVGFEBlendElement::filterEffect):
1776         * ksvg2/svg/SVGFEBlendElement.h:
1777         * ksvg2/svg/SVGFEColorMatrixElement.cpp:
1778         (WebCore::SVGFEColorMatrixElement::SVGFEColorMatrixElement):
1779         (WebCore::SVGFEColorMatrixElement::filterEffect):
1780         * ksvg2/svg/SVGFEColorMatrixElement.h:
1781         * ksvg2/svg/SVGFEComponentTransferElement.cpp:
1782         (WebCore::SVGFEComponentTransferElement::filterEffect):
1783         * ksvg2/svg/SVGFEComponentTransferElement.h:
1784         * ksvg2/svg/SVGFECompositeElement.cpp:
1785         (WebCore::SVGFECompositeElement::SVGFECompositeElement):
1786         (WebCore::SVGFECompositeElement::parseMappedAttribute):
1787         (WebCore::SVGFECompositeElement::filterEffect):
1788         * ksvg2/svg/SVGFECompositeElement.h:
1789         * ksvg2/svg/SVGFEDiffuseLightingElement.cpp:
1790         (WebCore::SVGFEDiffuseLightingElement::SVGFEDiffuseLightingElement):
1791         (WebCore::SVGFEDiffuseLightingElement::parseMappedAttribute):
1792         (WebCore::SVGFEDiffuseLightingElement::filterEffect):
1793         * ksvg2/svg/SVGFEDiffuseLightingElement.h:
1794         * ksvg2/svg/SVGFEDisplacementMapElement.cpp:
1795         (WebCore::SVGFEDisplacementMapElement::SVGFEDisplacementMapElement):
1796         (WebCore::SVGFEDisplacementMapElement::filterEffect):
1797         * ksvg2/svg/SVGFEDisplacementMapElement.h:
1798         * ksvg2/svg/SVGFEDistantLightElement.cpp:
1799         (WebCore::SVGFEDistantLightElement::SVGFEDistantLightElement):
1800         * ksvg2/svg/SVGFEDistantLightElement.h:
1801         * ksvg2/svg/SVGFEFloodElement.cpp:
1802         (WebCore::SVGFEFloodElement::filterEffect):
1803         * ksvg2/svg/SVGFEFloodElement.h:
1804         * ksvg2/svg/SVGFEFuncAElement.cpp:
1805         * ksvg2/svg/SVGFEFuncAElement.h:
1806         * ksvg2/svg/SVGFEFuncBElement.cpp:
1807         * ksvg2/svg/SVGFEFuncBElement.h:
1808         * ksvg2/svg/SVGFEFuncGElement.cpp:
1809         (WebCore::SVGFEFuncGElement::SVGFEFuncGElement):
1810         * ksvg2/svg/SVGFEFuncGElement.h:
1811         * ksvg2/svg/SVGFEFuncRElement.cpp:
1812         * ksvg2/svg/SVGFEFuncRElement.h:
1813         * ksvg2/svg/SVGFEGaussianBlurElement.cpp:
1814         (WebCore::SVGFEGaussianBlurElement::filterEffect):
1815         * ksvg2/svg/SVGFEGaussianBlurElement.h:
1816         * ksvg2/svg/SVGFEImageElement.cpp:
1817         (WebCore::SVGFEImageElement::notifyFinished):
1818         (WebCore::SVGFEImageElement::filterEffect):
1819         * ksvg2/svg/SVGFEImageElement.h:
1820         * ksvg2/svg/SVGFELightElement.cpp:
1821         (WebCore::SVGFELightElement::SVGFELightElement):
1822         * ksvg2/svg/SVGFELightElement.h:
1823         * ksvg2/svg/SVGFEMergeElement.cpp:
1824         (WebCore::SVGFEMergeElement::filterEffect):
1825         * ksvg2/svg/SVGFEMergeElement.h:
1826         * ksvg2/svg/SVGFEMergeNodeElement.cpp:
1827         * ksvg2/svg/SVGFEMergeNodeElement.h:
1828         * ksvg2/svg/SVGFEOffsetElement.cpp:
1829         (WebCore::SVGFEOffsetElement::filterEffect):
1830         * ksvg2/svg/SVGFEOffsetElement.h:
1831         * ksvg2/svg/SVGFEPointLightElement.h:
1832         * ksvg2/svg/SVGFESpecularLightingElement.cpp:
1833         (WebCore::SVGFESpecularLightingElement::SVGFESpecularLightingElement):
1834         (WebCore::SVGFESpecularLightingElement::parseMappedAttribute):
1835         (WebCore::SVGFESpecularLightingElement::filterEffect):
1836         (WebCore::SVGFESpecularLightingElement::updateLights):
1837         * ksvg2/svg/SVGFESpecularLightingElement.h:
1838         * ksvg2/svg/SVGFESpotLightElement.cpp:
1839         (WebCore::SVGFESpotLightElement::lightSource):
1840         * ksvg2/svg/SVGFESpotLightElement.h:
1841         * ksvg2/svg/SVGFETileElement.cpp:
1842         (WebCore::SVGFETileElement::filterEffect):
1843         * ksvg2/svg/SVGFETileElement.h:
1844         * ksvg2/svg/SVGFETurbulenceElement.cpp:
1845         (WebCore::SVGFETurbulenceElement::SVGFETurbulenceElement):
1846         (WebCore::SVGFETurbulenceElement::filterEffect):
1847         * ksvg2/svg/SVGFETurbulenceElement.h:
1848         * ksvg2/svg/SVGFilterElement.cpp:
1849         (WebCore::SVGFilterElement::canvasResource):
1850         * ksvg2/svg/SVGFilterElement.h:
1851         * ksvg2/svg/SVGFilterPrimitiveStandardAttributes.cpp:
1852         (WebCore::SVGFilterPrimitiveStandardAttributes::SVGFilterPrimitiveStandardAttributes):
1853         (WebCore::SVGFilterPrimitiveStandardAttributes::setStandardAttributes):
1854         * ksvg2/svg/SVGFilterPrimitiveStandardAttributes.h:
1855         * ksvg2/svg/SVGGradientElement.cpp:
1856         (WebCore::SVGGradientElement::buildStops):
1857         * ksvg2/svg/SVGStyledElement.cpp:
1858         (WebCore::SVGStyledElement::resolveStyle):
1859         * ksvg2/svg/SVGStyledElement.h:
1860         * platform/graphics/svg/SVGResourceFilter.cpp:
1861         (WebCore::SVGResourceFilter::addFilterEffect):
1862         (WebCore::SVGResourceFilter::filterBBoxForItemBBox):
1863         * platform/graphics/svg/SVGResourceFilter.h:
1864         (WebCore::SVGResourceFilter::xBoundingBoxMode):
1865         (WebCore::SVGResourceFilter::setXBoundingBoxMode):
1866         (WebCore::SVGResourceFilter::yBoundingBoxMode):
1867         (WebCore::SVGResourceFilter::setYBoundingBoxMode):
1868         * platform/graphics/svg/cg/SVGResourceFilterCg.mm:
1869         (WebCore::SVGResourceFilter::SVGResourceFilter):
1870         (WebCore::SVGResourceFilter::createFilterEffect):
1871         (WebCore::SVGResourceFilter::prepareFilter):
1872         (WebCore::dumpOutputImage):
1873         (WebCore::SVGResourceFilter::applyFilter):
1874         (WebCore::SVGResourceFilter::getCIFilterStack):
1875         (WebCore::SVGResourceFilter::imageForName):
1876         (WebCore::SVGResourceFilter::setImageForName):
1877         (WebCore::SVGResourceFilter::setOutputImage):
1878         (WebCore::alphaImageForImage):
1879         (WebCore::SVGResourceFilter::inputImage):
1880         * platform/graphics/svg/filters/SVGDistantLightSource.h:
1881         * platform/graphics/svg/filters/SVGFEBlend.cpp:
1882         (WebCore::SVGFEBlend::SVGFEBlend):
1883         * platform/graphics/svg/filters/SVGFEBlend.h:
1884         * platform/graphics/svg/filters/SVGFEColorMatrix.cpp:
1885         (WebCore::SVGFEColorMatrix::SVGFEColorMatrix):
1886         * platform/graphics/svg/filters/SVGFEColorMatrix.h:
1887         * platform/graphics/svg/filters/SVGFEComponentTransfer.cpp:
1888         (WebCore::SVGFEComponentTransfer::SVGFEComponentTransfer):
1889         * platform/graphics/svg/filters/SVGFEComponentTransfer.h:
1890         (WebCore::SVGComponentTransferFunction::SVGComponentTransferFunction):
1891         * platform/graphics/svg/filters/SVGFEComposite.cpp:
1892         (WebCore::SVGFEComposite::SVGFEComposite):
1893         * platform/graphics/svg/filters/SVGFEComposite.h:
1894         * platform/graphics/svg/filters/SVGFEConvolveMatrix.cpp:
1895         (WebCore::SVGFEConvolveMatrix::SVGFEConvolveMatrix):
1896         * platform/graphics/svg/filters/SVGFEConvolveMatrix.h:
1897         * platform/graphics/svg/filters/SVGFEDiffuseLighting.cpp:
1898         (WebCore::SVGFEDiffuseLighting::SVGFEDiffuseLighting):
1899         * platform/graphics/svg/filters/SVGFEDiffuseLighting.h:
1900         * platform/graphics/svg/filters/SVGFEDisplacementMap.cpp:
1901         (WebCore::SVGFEDisplacementMap::SVGFEDisplacementMap):
1902         * platform/graphics/svg/filters/SVGFEDisplacementMap.h:
1903         * platform/graphics/svg/filters/SVGFEFlood.cpp:
1904         (WebCore::SVGFEFlood::SVGFEFlood):
1905         * platform/graphics/svg/filters/SVGFEFlood.h:
1906         * platform/graphics/svg/filters/SVGFEGaussianBlur.cpp:
1907         (WebCore::SVGFEGaussianBlur::SVGFEGaussianBlur):
1908         * platform/graphics/svg/filters/SVGFEGaussianBlur.h:
1909         * platform/graphics/svg/filters/SVGFEImage.cpp:
1910         (WebCore::SVGFEImage::SVGFEImage):
1911         * platform/graphics/svg/filters/SVGFEImage.h:
1912         * platform/graphics/svg/filters/SVGFEMerge.cpp:
1913         * platform/graphics/svg/filters/SVGFEMerge.h:
1914         (WebCore::SVGFEMerge::SVGFEMerge):
1915         * platform/graphics/svg/filters/SVGFEMorphology.cpp:
1916         (WebCore::SVGFEMorphology::SVGFEMorphology):
1917         * platform/graphics/svg/filters/SVGFEMorphology.h:
1918         * platform/graphics/svg/filters/SVGFEOffset.cpp:
1919         (WebCore::SVGFEOffset::SVGFEOffset):
1920         * platform/graphics/svg/filters/SVGFEOffset.h:
1921         * platform/graphics/svg/filters/SVGFESpecularLighting.cpp:
1922         (WebCore::SVGFESpecularLighting::SVGFESpecularLighting):
1923         * platform/graphics/svg/filters/SVGFESpecularLighting.h:
1924         * platform/graphics/svg/filters/SVGFETile.h:
1925         (WebCore::SVGFETile::SVGFETile):
1926         * platform/graphics/svg/filters/SVGFETurbulence.cpp:
1927         (WebCore::SVGFETurbulence::SVGFETurbulence):
1928         * platform/graphics/svg/filters/SVGFETurbulence.h:
1929         * platform/graphics/svg/filters/SVGFilterEffect.cpp:
1930         (WebCore::SVGFilterEffect::SVGFilterEffect):
1931         (WebCore::SVGFilterEffect::primitiveBBoxForFilterBBox):
1932         (WebCore::SVGFilterEffect::filter):
1933         (WebCore::SVGFilterEffect::setFilter):
1934         * platform/graphics/svg/filters/SVGFilterEffect.h:
1935         (WebCore::SVGFilterEffect::xBoundingBoxMode):
1936         (WebCore::SVGFilterEffect::setXBoundingBoxMode):
1937         (WebCore::SVGFilterEffect::yBoundingBoxMode):
1938         (WebCore::SVGFilterEffect::setYBoundingBoxMode):
1939         (WebCore::SVGFilterEffect::widthBoundingBoxMode):
1940         (WebCore::SVGFilterEffect::setWidthBoundingBoxMode):
1941         (WebCore::SVGFilterEffect::heightBoundingBoxMode):
1942         (WebCore::SVGFilterEffect::setHeightBoundingBoxMode):
1943         * platform/graphics/svg/filters/SVGLightSource.cpp:
1944         * platform/graphics/svg/filters/SVGLightSource.h:
1945         * platform/graphics/svg/filters/SVGPointLightSource.h:
1946         (WebCore::SVGPointLightSource::SVGPointLightSource):
1947         * platform/graphics/svg/filters/SVGSpotLightSource.h:
1948         (WebCore::SVGSpotLightSource::SVGSpotLightSource):
1949         * platform/graphics/svg/filters/cg/SVGFEBlendCg.mm:
1950         (WebCore::SVGFEBlend::getCIFilter):
1951         * platform/graphics/svg/filters/cg/SVGFEColorMatrixCg.mm:
1952         (WebCore::SVGFEColorMatrix::getCIFilter):
1953         * platform/graphics/svg/filters/cg/SVGFEComponentTransferCg.mm:
1954         (WebCore::filterForComponentFunc):
1955         (WebCore::SVGFEComponentTransfer::getCIFilter):
1956         * platform/graphics/svg/filters/cg/SVGFECompositeCg.mm:
1957         (WebCore::SVGFEComposite::getCIFilter):
1958         * platform/graphics/svg/filters/cg/SVGFEDiffuseLightingCg.mm:
1959         (WebCore::SVGFEDiffuseLighting::getCIFilter):
1960         * platform/graphics/svg/filters/cg/SVGFEDisplacementMapCg.mm:
1961         (WebCore::SVGFEDisplacementMap::getCIFilter):
1962         * platform/graphics/svg/filters/cg/SVGFEFloodCg.mm:
1963         (WebCore::SVGFEFlood::getCIFilter):
1964         * platform/graphics/svg/filters/cg/SVGFEGaussianBlurCg.mm:
1965         (WebCore::SVGFEGaussianBlur::getCIFilter):
1966         * platform/graphics/svg/filters/cg/SVGFEHelpersCg.h:
1967         * platform/graphics/svg/filters/cg/SVGFEImageCg.mm:
1968         (WebCore::SVGFEImage::getCIFilter):
1969         * platform/graphics/svg/filters/cg/SVGFEMergeCg.mm:
1970         (WebCore::SVGFEMerge::getCIFilter):
1971         * platform/graphics/svg/filters/cg/SVGFEOffsetCg.mm:
1972         (WebCore::SVGFEOffset::getCIFilter):
1973         * platform/graphics/svg/filters/cg/SVGFESpecularLightingCg.mm:
1974         (WebCore::SVGFESpecularLighting::getCIFilter):
1975         * platform/graphics/svg/filters/cg/SVGFETileCg.mm:
1976         (WebCore::SVGFETile::getCIFilter):
1977         * platform/graphics/svg/filters/cg/SVGFilterEffectCg.mm:
1978         (WebCore::SVGFilterEffect::getCIFilter):
1979         * platform/graphics/svg/filters/cg/WKDiffuseLightingFilter.cikernel:
1980         * platform/graphics/svg/filters/cg/WKDisplacementMapFilter.cikernel:
1981         * platform/graphics/svg/filters/cg/WKSpotLightFilter.m:
1982         (-[WKSpotLightFilter outputImage]):
1983         * platform/graphics/svg/qt/SVGResourceFilterQt.cpp:
1984         (WebCore::SVGResourceFilter::createFilterEffect):
1985
1986 2007-08-20  Rob Buis  <buis@kde.org>
1987
1988         Reviewed by Nikolas.
1989
1990         http://bugs.webkit.org/show_bug.cgi?id=14924
1991         rotated rect with pattern draws incorrectly
1992
1993         Use the bounding box before transformation.
1994
1995         * platform/graphics/svg/cg/SVGPaintServerPatternCg.cpp:
1996         (WebCore::SVGPaintServerPattern::setup):
1997
1998 2007-08-19  Rob Buis  <buis@kde.org>
1999
2000         Reviewed by Nikolas.
2001
2002         http://bugs.webkit.org/show_bug.cgi?id=14926
2003         WebKit has 'em' length handling problems related to CSS properties
2004
2005         Parse the properties in inline style attributes non-strict for SVG.
2006
2007         * dom/StyledElement.cpp:
2008         (WebCore::StyledElement::createInlineStyleDecl):
2009
2010 2007-08-17  Rob Buis  <buis@kde.org>
2011
2012         Reviewed by Oliver.
2013
2014         http://bugs.webkit.org/show_bug.cgi?id=14927
2015         use element in SVG does not render after parent is displayed off and on
2016
2017         Also detach the shadow tree when detaching the <use>.
2018
2019         * ksvg2/svg/SVGUseElement.cpp:
2020         (WebCore::SVGUseElement::detach):
2021         * ksvg2/svg/SVGUseElement.h:
2022
2023 2007-08-10  Nikolas Zimmermann  <zimmermann@kde.org>
2024
2025         Reviewed by Rob.
2026
2027         Fixes: http://bugs.webkit.org/show_bug.cgi?id=14153
2028
2029         Final, long-awaited RenderSVGContainer split. Make RenderSVGContainer really a simple
2030         container without special cases for inner <svg> elements or <marker>. Create a new
2031         RenderSVGViewportContainer class handling these cases now.
2032
2033         * WebCore.xcodeproj/project.pbxproj:
2034         * ksvg2/svg/SVGMarkerElement.cpp:
2035         (WebCore::SVGMarkerElement::createRenderer):
2036         * ksvg2/svg/SVGSVGElement.cpp:
2037         (WebCore::SVGSVGElement::createRenderer):
2038         * ksvg2/svg/SVGSVGElement.h:
2039         * rendering/RenderSVGContainer.cpp:
2040         (WebCore::RenderSVGContainer::layout):
2041         (WebCore::RenderSVGContainer::applyContentTransforms):
2042         (WebCore::RenderSVGContainer::applyAdditionalTransforms):
2043         (WebCore::RenderSVGContainer::paint):
2044         (WebCore::RenderSVGContainer::viewportTransform):
2045         (WebCore::RenderSVGContainer::relativeBBox):
2046         (WebCore::RenderSVGContainer::nodeAtPoint):
2047         * rendering/RenderSVGContainer.h:
2048         * rendering/RenderSVGRoot.cpp:
2049         * rendering/RenderSVGViewportContainer.cpp: Added.
2050         (WebCore::RenderSVGViewportContainer::RenderSVGViewportContainer):
2051         (WebCore::RenderSVGViewportContainer::~RenderSVGViewportContainer):
2052         (WebCore::RenderSVGViewportContainer::layout):
2053         (WebCore::RenderSVGViewportContainer::paint):
2054         (WebCore::RenderSVGViewportContainer::applyContentTransforms):
2055         (WebCore::RenderSVGViewportContainer::applyAdditionalTransforms):
2056         (WebCore::RenderSVGViewportContainer::viewport):
2057         (WebCore::RenderSVGViewportContainer::calcViewport):
2058         (WebCore::RenderSVGViewportContainer::viewportTransform):
2059         (WebCore::RenderSVGViewportContainer::absoluteTransform):
2060         (WebCore::RenderSVGViewportContainer::nodeAtPoint):
2061         * rendering/RenderSVGViewportContainer.h: Added.
2062         (WebCore::RenderSVGViewportContainer::isSVGContainer):
2063         (WebCore::RenderSVGViewportContainer::renderName):
2064
2065 2007-08-10  Nikolas Zimmermann  <zimmermann@kde.org>
2066
2067         Reviewed by Oliver & Rob.
2068
2069         Fixes: http://bugs.webkit.org/show_bug.cgi?id=12501 (SVG Text fails to respect opacity, fill-opacity and stroke-opacity)
2070         Fixes: http://bugs.webkit.org/show_bug.cgi?id=14045 (Incorrect support for opacity, fill-opacity and stroke-opacity)
2071
2072         Based on an older patch from Rob, this fixes SVG text opacity as well as group opacity for solid fills & gradients.
2073         The pattern changes are still missing a testcase (need to wait for Antoine Quint for that).
2074
2075         * platform/graphics/svg/SVGResourceFilter.h:
2076         * platform/graphics/svg/cg/SVGPaintServerGradientCg.cpp:
2077         (WebCore::SVGPaintServerGradient::setup):
2078         * platform/graphics/svg/cg/SVGPaintServerPatternCg.cpp:
2079         (WebCore::SVGPaintServerPattern::setup):
2080         * platform/graphics/svg/cg/SVGPaintServerSolidCg.cpp:
2081         (WebCore::colorFromFloatComponents):
2082         (WebCore::SVGPaintServerSolid::setup):
2083         * platform/graphics/svg/cg/SVGResourceFilterCg.mm:
2084         (WebCore::SVGResourceFilter::SVGResourceFilter):
2085         (WebCore::SVGResourceFilter::prepareFilter):
2086         (WebCore::SVGResourceFilter::applyFilter):
2087         * rendering/RenderPath.cpp:
2088         (WebCore::RenderPath::paint):
2089         * rendering/RenderSVGContainer.cpp:
2090         (WebCore::RenderSVGContainer::paint):
2091         (WebCore::RenderSVGContainer::absoluteClippedOverflowRect):
2092         * rendering/RenderSVGImage.cpp:
2093         (WebCore::RenderSVGImage::paint):
2094         (WebCore::RenderSVGImage::absoluteClippedOverflowRect):
2095         * rendering/RenderSVGRoot.cpp:
2096         (WebCore::RenderSVGRoot::paint):
2097         * rendering/RenderSVGText.cpp:
2098         (WebCore::RenderSVGText::absoluteClippedOverflowRect):
2099         * rendering/SVGRenderSupport.cpp:
2100         (WebCore::prepareToRenderSVGContent):
2101         (WebCore::finishRenderSVGContent):
2102         * rendering/SVGRenderSupport.h:
2103         * rendering/SVGRootInlineBox.cpp:
2104         (WebCore::prepareTextRendering):
2105         (WebCore::SVGRootInlineBox::paint):
2106         (WebCore::SVGRootInlineBox::paintChildInlineFlowBox):
2107
2108 2007-08-08  Rob Buis  <buis@kde.org>
2109
2110         Reviewed by Nikolas.
2111
2112         http://bugs.webkit.org/show_bug.cgi?id=11909
2113         Regression: large SVG from Illustrator comes out blank
2114
2115         Fix last issue with the Illustrator file by making relativeBBox
2116         calculation take into account viewBox.
2117
2118         * rendering/RenderSVGContainer.cpp:
2119         (WebCore::RenderSVGContainer::relativeBBox):
2120         * rendering/RenderSVGRoot.cpp:
2121         (WebCore::RenderSVGRoot::relativeBBox):
2122
2123 2007-08-08  Nikolas Zimmermann  <zimmermann@kde.org>
2124
2125         Reviewed by Oliver.
2126
2127         Fixes: http://bugs.webkit.org/show_bug.cgi?id=14896 (SVG InlineText/Flow box sizes don't take rotated glyphs into account)
2128
2129         Introduce new helper function calculateGlyphBoundaries, which takes into account any per-character transformation.
2130         This fixes box size calculations in svg/W3C-SVG-1.1/text-text-07-t.svg, svg/batik/text/textEffect3.svg (rotated glyphs)
2131         -> These strings can be properly selected now, just as well as text path elements.
2132
2133         * rendering/SVGInlineTextBox.cpp:
2134         (WebCore::SVGInlineTextBox::calculateGlyphBoundaries):
2135         (WebCore::SVGInlineTextBox::closestCharacterToPosition):
2136         (WebCore::SVGInlineTextBox::nodeAtPoint):
2137         (WebCore::SVGInlineTextBox::selectionRect):
2138         * rendering/SVGInlineTextBox.h:
2139         * rendering/SVGRootInlineBox.cpp:
2140         (WebCore::SVGRootInlineBox::layoutInlineBoxes):
2141
2142 2007-08-08  Nikolas Zimmermann  <zimmermann@kde.org>
2143
2144         Reviewed by Oliver.
2145
2146         Fixes: http://bugs.webkit.org/show_bug.cgi?id=13909 (SVG text selection doesn't work with RTL text)
2147
2148         Use drawHighlightForText() to draw the selection, instead of my home-brewn solution.
2149         Affected code in SVGRootInlineBox::paintSelectionForTextBox. Removed not anymore needed
2150         helper function cummulatedWidthOfSelectionRange.
2151
2152         Dump all contained InlineTextBox(es) in SVGRenderTreeAsText, take into account multiple
2153         child text boxes in ie. a RenderSVGInlineText objects (which happens for RTL text and
2154         LTR text cases where newlines were involved - see changed testcase results.)
2155         This affects a lot of LTR tests which actually had more than one child text box, that
2156         wasn't taken properly into account before (in terms of selection, not rendering.)
2157
2158         Fix selection for RTL text by taking box start offsets into account in closestCharacterToPosition()
2159         and by offering RTL text selection special cases in svgCharacterHitsPosition().
2160
2161         Centralized the creation of a TextStyle object for text selection/painting in a new helper function
2162         svgTextStyleForInlineTextBox. Add new helper functions calculateGlyphWidth/calculateGlyphHeight to
2163         centralize these calculations -> use these new helpers everywhere to avoid code duplication.
2164
2165         A single fix in bidi.cpp was needed to fix SVG's unicode-bidi/direction handling, to fix text-intro-02-b.svg.
2166         SVG didacts that the 'direction' attribute is ignored if unicode-bidi is set to 'normal' (default).
2167         Discussed with Mitz.
2168
2169         * rendering/RenderSVGInlineText.cpp:
2170         (WebCore::RenderSVGInlineText::positionForCoordinates):
2171         * rendering/SVGInlineTextBox.cpp:
2172         (WebCore::SVGInlineTextBox::calculateGlyphWidth):
2173         (WebCore::SVGInlineTextBox::calculateGlyphHeight):
2174         (WebCore::SVGInlineTextBox::closestCharacterToPosition):
2175         (WebCore::SVGInlineTextBox::svgCharacterHitsPosition):
2176         (WebCore::SVGInlineTextBox::nodeAtPoint):
2177         (WebCore::SVGInlineTextBox::selectionRect):
2178         * rendering/SVGInlineTextBox.h:
2179         * rendering/SVGRenderTreeAsText.cpp:
2180         (WebCore::writeSVGInlineTextBox):
2181         (WebCore::writeSVGInlineText):
2182         * rendering/SVGRootInlineBox.cpp:
2183         (WebCore::cummulatedWidthOfInlineBoxCharacterRange): Take box start offset into account.
2184         (WebCore::svgTextStyleForInlineTextBox): New helper function.
2185         (WebCore::totalAdvanceOfInlineTextBox): Take box start offset into account.
2186         (WebCore::SVGRootInlineBox::buildLayoutInformationForTextBox): Ditto. (correctly calculate advance values in RTL mode!)
2187         (WebCore::SVGRootInlineBox::paintSelectionForTextBox): Use GraphicsContext drawHighlightForText() instead of self-made hacks.
2188         (WebCore::SVGRootInlineBox::paintCharacterRangeForTextBox): Use new helper function svgTextStyleForInlineTextBox.
2189         * rendering/SVGRootInlineBox.h:
2190         * rendering/bidi.cpp: Add special case for SVG.
2191         (WebCore::RenderBlock::layoutInlineChildren):
2192
2193 2007-07-30  Nikolas Zimmermann  <zimmermann@kde.org>
2194
2195         Reviewed by Oliver & Rob.
2196
2197         Enable SVG textPath selection. Actually build chunks for them instead of
2198         ignoring them - was easier than I thought. Respect per-character transformation
2199         when calculating the chunk boundaries for the selection rectangles. Also fixes
2200         selection rect drawing of rotated characters.
2201
2202         Next thing todo is to unify the glyph size calculations, as per-glyph transformations
2203         are not respected when calculating flow box sizes in SVGRootInlineBox.
2204  
2205         * rendering/RenderObject.h:
2206         (WebCore::RenderObject::isSVGHiddenContainer):
2207         * rendering/RenderSVGHiddenContainer.h:
2208         (WebCore::RenderSVGHiddenContainer::isSVGHiddenContainer):
2209         * rendering/RenderSVGInlineText.cpp:
2210         (WebCore::isChildOfHiddenContainer):
2211         (WebCore::RenderSVGInlineText::selectionRect):
2212         (WebCore::RenderSVGInlineText::computeAbsoluteRectForRange):
2213         * rendering/SVGCharacterLayoutInfo.h:
2214         (WebCore::SVGTextChunk::SVGTextChunk):
2215         (WebCore::SVGTextChunkLayoutInfo::SVGTextChunkLayoutInfo):
2216         * rendering/SVGInlineTextBox.cpp:
2217         (WebCore::SVGInlineTextBox::selectionRect):
2218         * rendering/SVGRootInlineBox.cpp:
2219         (WebCore::applyTextAnchorToTextChunk):
2220         (WebCore::SVGRootInlineBox::buildTextChunks):
2221
2222 2007-07-25  Rob Buis  <buis@kde.org>
2223
2224         Reviewed by Nikolas.
2225
2226         http://bugs.webkit.org/show_bug.cgi?id=14312
2227         Removing an attribute has no effect on SVG
2228
2229         Update the transform matrix also when transform attribute is empty.
2230
2231         * ksvg2/svg/SVGStyledTransformableElement.cpp:
2232         (WebCore::SVGStyledTransformableElement::updateLocalTransform):
2233
2234 2007-07-26  Nikolas Zimmermann  <zimmermann@kde.org>
2235
2236         Reviewed by Oliver.
2237
2238         Unify absoluteRects() of RenderSVGTSpan & RenderSVGTextPath.
2239         The RenderSVGTextPath one was still using the old, wrong concept.
2240
2241         * rendering/RenderSVGTSpan.cpp: Remove unused params tx, ty, while I'm at it.
2242         (WebCore::RenderSVGTSpan::absoluteRects):
2243         * rendering/RenderSVGTextPath.cpp:
2244         (WebCore::RenderSVGTextPath::absoluteRects):
2245
2246 2007-07-25  Nikolas Zimmermann  <zimmermann@kde.org>
2247
2248         Reviewed by Sam.
2249
2250         Let <textPath> be recognized within the ObjC bindings.
2251         Forgot to add that months ago.
2252
2253         * bindings/objc/DOM.mm:
2254         (WebCore::createElementClassMap):
2255         * bindings/objc/DOMInternal.h:
2256         * bindings/objc/DOMSVG.h:
2257
2258 2007-07-25  Nikolas Zimmermann  <zimmermann@kde.org>
2259
2260         Reviewed by Oliver.
2261
2262         Fixes: http://bugs.webkit.org/show_bug.cgi?id=14065
2263
2264         Fix all known bugs regarding to SVG text selection, when embedded in XHTML.
2265         Also fix inspecting <text> elements when embedded in XHTML. (WebInspector)
2266
2267         Short story: selectionRect() & friends are special in terms of the "HTML parent translation".
2268         Caused by ie. CSS translation like "left: 50px; top: 50px" when <svg> is a child of a <div>.
2269         For non-textual objects like RenderPath, we can easily add a translation to a new coordinate
2270         space in RenderSVGRoot::applyContentTransformations() and we're done with it.
2271
2272         Same for painting text, but text selection makes problems in this concept.
2273         We have to remove the 'html parent translation' from our selection rects that we return
2274         from RenderSVGText & RenderSVGInlineText. Hopefully all issues are fixed now.
2275
2276         Long story:
2277         - RenderSVGRoot::nodeAtPoint didn't take the parent 'scroll offset' into account. We exited
2278           too early, because the overflow rect wasn't correctly sized. Fixed.
2279         - RenderSVGRoot::absoluteRects() can't return the absoluteClippedOverflowRect() as it includes
2280           the 'html parent translation', which needs to be removed, otherwhise the painted rects are off
2281           when inspecting with WebInspector. -> Pass down absoluteRects() call to it's children..
2282         - RenderSVGText::absoluteRects() can't use absoluteClippedOverflowRect() for the same reason.
2283         - Add RenderSVGInlineText::computeAbsoluteRectForRange() function - shared by absoluteRects() and
2284           selectionRect() - and remove the 'html parent translation' there by asking the RenderSVGRoot
2285           object for the correct offsets.
2286
2287         This lead to nasty bugs showing that SVGInlineTextBox::selectionRect() wasn't actually returning
2288         correct rectangles. It couldn't work for text chunks the way it was implemented. Fixed by implementing
2289         it exactly the same way that closestCharacterToPosition() was done - could share more code later on.
2290
2291         * rendering/RenderSVGInlineText.cpp:
2292         (WebCore::RenderSVGInlineText::absoluteRects):
2293         (WebCore::RenderSVGInlineText::selectionRect):
2294         (WebCore::RenderSVGInlineText::computeAbsoluteRectForRange):
2295         * rendering/RenderSVGInlineText.h:
2296         * rendering/RenderSVGRoot.cpp:
2297         (WebCore::RenderSVGRoot::absoluteRects):
2298         (WebCore::RenderSVGRoot::nodeAtPoint):
2299         * rendering/RenderSVGText.cpp:
2300         (WebCore::RenderSVGText::absoluteRects):
2301         * rendering/SVGCharacterLayoutInfo.h: Removed unused variable 'bool selected'
2302         * rendering/SVGInlineTextBox.cpp:
2303         (WebCore::SVGInlineTextBox::closestCharacterToPosition):
2304         (WebCore::SVGInlineTextBox::nodeAtPoint):
2305         (WebCore::SVGInlineTextBox::selectionRect):
2306         * rendering/SVGRootInlineBox.cpp: Add 'findSVGRootObject' helper function.
2307         (WebCore::findSVGRootObject):
2308         (WebCore::SVGRootInlineBox::buildLayoutInformationForTextBox):
2309         (WebCore::SVGRootInlineBox::paintSelectionForTextBox): Remove unused tx/ty parameters.
2310         (WebCore::SVGRootInlineBox::paintChildInlineTextBox):
2311         (WebCore::SVGRootInlineBox::paintCharacterRangeForTextBox):
2312         * rendering/SVGRootInlineBox.h:
2313
2314 2007-07-17  Nikolas Zimmermann  <zimmermann@kde.org>
2315
2316         Build fix. Not reviewed.
2317
2318         Rob forgot to land the changes to SVGResourceMarker in his last commit.
2319
2320         * platform/graphics/svg/SVGResourceMarker.cpp:
2321         (WebCore::SVGResourceMarker::draw):
2322
2323 2007-07-17  Rob Buis  <buis@kde.org>
2324
2325         Reviewed by Nikolas.
2326
2327         http://bugs.webkit.org/show_bug.cgi?id=5996
2328         SVG <view> is unimplemented
2329
2330         Implement <view> and refactor the code in the svg renderer container classes.
2331
2332         * WebCore.xcodeproj/project.pbxproj:
2333         * ksvg2/svg/SVGDocument.cpp:
2334         (WebCore::SVGDocument::zoomAndPanEnabled): Take into account currentView for zoom/pan
2335         * ksvg2/svg/SVGDocument.h:
2336         * ksvg2/svg/SVGFEImageElement.cpp:
2337         (WebCore::SVGFEImageElement::parseMappedAttribute):
2338         * ksvg2/svg/SVGFitToViewBox.cpp:
2339         (WebCore::SVGFitToViewBox::parseViewBox):
2340         (WebCore::SVGFitToViewBox::parseMappedAttribute):
2341         * ksvg2/svg/SVGFitToViewBox.h:
2342         * ksvg2/svg/SVGImageElement.cpp:
2343         (WebCore::SVGImageElement::parseMappedAttribute):
2344         * ksvg2/svg/SVGLocatable.h:
2345         * ksvg2/svg/SVGMarkerElement.cpp:
2346         (WebCore::SVGMarkerElement::createRenderer):
2347         (WebCore::SVGMarkerElement::notifyAttributeChange):
2348         * ksvg2/svg/SVGPreserveAspectRatio.cpp:
2349         (WebCore::SVGPreserveAspectRatio::parsePreserveAspectRatio):
2350         * ksvg2/svg/SVGPreserveAspectRatio.h:
2351         * ksvg2/svg/SVGSVGElement.cpp:
2352         (WebCore::SVGSVGElement::SVGSVGElement):
2353         (WebCore::SVGSVGElement::currentView):
2354         (WebCore::SVGSVGElement::parseMappedAttribute):
2355         (WebCore::SVGSVGElement::createRenderer):
2356         (WebCore::SVGSVGElement::viewBoxToViewTransform):
2357         (WebCore::SVGSVGElement::inheritViewAttributes):
2358         * ksvg2/svg/SVGSVGElement.h:
2359         * ksvg2/svg/SVGTransformable.cpp:
2360         (WebCore::SVGTransformable::parseTransformAttribute):
2361         * ksvg2/svg/SVGTransformable.h:
2362         * ksvg2/svg/SVGViewElement.cpp:
2363         (WebCore::SVGViewElement::parseMappedAttribute):
2364         * ksvg2/svg/SVGViewElement.h:
2365         * ksvg2/svg/SVGViewSpec.cpp: Added.
2366         (WebCore::SVGViewSpec::SVGViewSpec):
2367         (WebCore::SVGViewSpec::~SVGViewSpec):
2368         (WebCore::SVGViewSpec::setTransform):
2369         (WebCore::SVGViewSpec::setViewBoxString):
2370         (WebCore::SVGViewSpec::setPreserveAspectRatioString):
2371         (WebCore::SVGViewSpec::setViewTargetString):
2372         (WebCore::SVGViewSpec::viewTarget):
2373         (WebCore::SVGViewSpec::contextElement):
2374         (WebCore::):
2375         (WebCore::SVGViewSpec::parseViewSpec):
2376         * ksvg2/svg/SVGViewSpec.h: Added.
2377         (WebCore::SVGViewSpec::transform):
2378         (WebCore::SVGViewSpec::viewTargetString):
2379         * ksvg2/svg/SVGZoomAndPan.cpp:
2380         (WebCore::SVGZoomAndPan::parseMappedAttribute):
2381         (WebCore::):
2382         (WebCore::SVGZoomAndPan::parseZoomAndPan):
2383         * ksvg2/svg/SVGZoomAndPan.h:
2384         * loader/FrameLoader.cpp:
2385         (WebCore::FrameLoader::gotoAnchor):
2386         * page/Frame.cpp:
2387         (WebCore::Frame::setZoomFactor): do not zoom when it is disabled
2388         * rendering/RenderSVGContainer.cpp:
2389         (WebCore::RenderSVGContainer::RenderSVGContainer):
2390         (WebCore::RenderSVGContainer::paint):
2391         (WebCore::RenderSVGContainer::viewportTransform):
2392         * rendering/RenderSVGContainer.h:
2393         * rendering/RenderSVGRoot.cpp:
2394         (WebCore::RenderSVGRoot::RenderSVGRoot):
2395         (WebCore::RenderSVGRoot::applyContentTransforms):
2396         (WebCore::RenderSVGRoot::paint):
2397         (WebCore::RenderSVGRoot::absoluteTransform):
2398         (WebCore::RenderSVGRoot::localTransform):
2399         * rendering/RenderSVGRoot.h:
2400
2401 2007-07-16  Nikolas Zimmermann  <zimmermann@kde.org>
2402
2403         Reviewed by Rob.
2404
2405         Fixes: http://bugs.webkit.org/show_bug.cgi?id=13611 (Crash in setAttributeNS setting href of SVG <use> to nonexistent symbol)
2406         Fixes: http://bugs.webkit.org/show_bug.cgi?id=14631 (<use> doesn't deep-expand <symbol> elements.)
2407
2408         Rework <use> on <foreignObject> cases, to not just ignore these cases, but actually proceed and skip <fO> objects
2409         from the resulting cloned tree. This fixes parts of "treasure_map.svg" (no bug report availabe on that one, private "testcase").
2410
2411         Fix assertion happening with <use> on <g> containing <symbol>. Introduce expandSymbolElementsInShadowTree()
2412         concept, just like it's done for <use> on <use>, to deep-replace all <symbol> elements by <svg>, as demanded
2413         by the spec. This only worked on <use> on <symbol> direct cases so far.
2414
2415         Added testcase: svg/custom/use-on-g-containing-foreignObject-and-image.svg (testcase for treasure_map.svg)
2416                         svg/custom/use-on-disallowed-foreign-object-5.svg (<use> on <symbol> containg <foreignObject>)
2417                         svg/custom/use-on-disallowed-foreign-object-6.svg (<use> on <g> containing <svg> containing <foreignObject>)
2418                         svg/custom/use-on-disallowed-foreign-object-7.svg (<use> on <g> containing <symbol> containing <foreignObject>)
2419                         svg/custom/use-scripting-changes-to-nonexistant-href.svg
2420
2421         * ksvg2/svg/SVGUseElement.cpp:
2422         (WebCore::isDisallowedElement):
2423         (WebCore::subtreeContainsDisallowedElement):
2424         (WebCore::SVGUseElement::buildPendingResource):
2425         (WebCore::SVGUseElement::buildInstanceTree):
2426         (WebCore::SVGUseElement::removeDisallowedElementsFromSubtree):
2427         (WebCore::SVGUseElement::buildShadowTree):
2428         (WebCore::SVGUseElement::expandUseElementsInShadowTree):
2429         (WebCore::SVGUseElement::expandSymbolElementsInShadowTree):
2430         * ksvg2/svg/SVGUseElement.h:
2431
2432 2007-07-15  Nikolas Zimmermann  <zimmermann@kde.org>
2433
2434         Reviewed by Rob.
2435
2436         Fix invisible-text-after-scrolling.xhtml regression. Scroll offset not
2437         taken into account properly. Also fix RenderSVGInlineText::selectionRect(),
2438         so that SVG text can be selected, when being embedded in XHTML.
2439
2440         * rendering/RenderSVGInlineText.cpp:
2441         (WebCore::RenderSVGInlineText::selectionRect):
2442         * rendering/RenderSVGRoot.cpp:
2443         (WebCore::RenderSVGRoot::applyContentTransforms):
2444
2445 2007-07-15  Nikolas Zimmermann  <zimmermann@kde.org>
2446
2447         Reviewed by Oliver.
2448
2449         Fixes: http://bugs.webkit.org/show_bug.cgi?id=5940 (<svg> inside <body> incorrectly extends over top/bottom borders)
2450         Fixes: http://bugs.webkit.org/show_bug.cgi?id=14145 (RenderSVGContainer should not inherit from RenderContainer)
2451
2452         Make RenderSVGContainer inherit from RenderObject directly, instead of RenderContainer.
2453         Itdoes a lot of things that we don't need for SVG, and by removing this inheritance
2454         we can finally fix the differences about SVG object positioning, as we don't need
2455         parent translation (tx/ty). Fixes SVG text rendering within XHTML.
2456
2457         Fix requireLayer() function on RenderSVGRoot, as it can actually be a layer now.
2458         This change is based on Rob's patch at 5940 - fixing z-order indexing.
2459
2460         Change RenderSVGRoot renderName() and update all layout tests, because of this change.
2461         
2462         Fix absoluteRects() function for RenderSVGInlineText & RenderSVGTSpan.
2463         Checked extensively using WebInspector, to assure all rects are correctly displayed.
2464
2465         Testcases fixed: junk-data.svg, missing-xlink.svg hixie/013.xml (all regressions!)
2466         (junk-data.svg & missing-xlink.svg previously relied on SVG text painting out of <svg> overflow rect.
2467          Fix these testcases, as within this new RenderSVGContainer concept, that bug is now fixed, and breaks them)
2468
2469         Testcases added: custom/absolute-sized-svg-in-xhtml.xhtml, custom/inline-svg-in-xhtml.xml (Mozilla XTech demo)
2470
2471         * ksvg2/svg/SVGSVGElement.cpp:
2472         (WebCore::SVGSVGElement::parseMappedAttribute):
2473         * rendering/RenderObject.cpp:
2474         (WebCore::RenderObject::containingBlock):
2475         * rendering/RenderObject.h:
2476         (WebCore::RenderObject::isSVGRoot):
2477         * rendering/RenderPath.cpp:
2478         (WebCore::RenderPath::paint):
2479         (WebCore::RenderPath::addFocusRingRects):
2480         * rendering/RenderSVGContainer.cpp:
2481         (WebCore::RenderSVGContainer::RenderSVGContainer):
2482         (WebCore::RenderSVGContainer::canHaveChildren):
2483         (WebCore::RenderSVGContainer::addChild):
2484         (WebCore::RenderSVGContainer::removeChild):
2485         (WebCore::RenderSVGContainer::destroy):
2486         (WebCore::RenderSVGContainer::destroyLeftoverChildren):
2487         (WebCore::RenderSVGContainer::removeChildNode):
2488         (WebCore::RenderSVGContainer::appendChildNode):
2489         (WebCore::RenderSVGContainer::insertChildNode):
2490         (WebCore::RenderSVGContainer::layout):
2491         (WebCore::RenderSVGContainer::calcReplacedWidth):
2492         (WebCore::RenderSVGContainer::calcReplacedHeight):
2493         (WebCore::RenderSVGContainer::applyContentTransforms):
2494         (WebCore::RenderSVGContainer::paint):
2495         (WebCore::RenderSVGContainer::absoluteTransform):
2496         (WebCore::RenderSVGContainer::nodeAtPoint):
2497         * rendering/RenderSVGContainer.h:
2498         (WebCore::RenderSVGContainer::firstChild):
2499         (WebCore::RenderSVGContainer::lastChild):
2500         (WebCore::RenderSVGContainer::width):
2501         (WebCore::RenderSVGContainer::height):
2502         (WebCore::RenderSVGContainer::moveChildNode):
2503         (WebCore::RenderSVGContainer::calcPrefWidths):
2504         * rendering/RenderSVGHiddenContainer.cpp:
2505         (WebCore::RenderSVGHiddenContainer::RenderSVGHiddenContainer):
2506         (WebCore::RenderSVGHiddenContainer::paint):
2507         (WebCore::RenderSVGHiddenContainer::absoluteRects):
2508         (WebCore::RenderSVGHiddenContainer::relativeBBox):
2509         * rendering/RenderSVGHiddenContainer.h:
2510         * rendering/RenderSVGImage.cpp:
2511         (WebCore::RenderSVGImage::paint):
2512         * rendering/RenderSVGInline.cpp:
2513         (WebCore::RenderSVGInline::RenderSVGInline):
2514         * rendering/RenderSVGInlineText.cpp:
2515         (WebCore::RenderSVGInlineText::absoluteRects):
2516         * rendering/RenderSVGRoot.cpp:
2517         (WebCore::RenderSVGRoot::applyContentTransforms):
2518         (WebCore::RenderSVGRoot::paint):
2519         (WebCore::RenderSVGRoot::addFocusRingRects):
2520         * rendering/RenderSVGRoot.h:
2521         (WebCore::RenderSVGRoot::isSVGRoot):
2522         (WebCore::RenderSVGRoot::renderName):
2523         * rendering/RenderSVGTSpan.cpp:
2524         (WebCore::RenderSVGTSpan::RenderSVGTSpan):
2525         (WebCore::RenderSVGTSpan::absoluteRects):
2526         * rendering/RenderSVGTextPath.cpp:
2527         (WebCore::RenderSVGTextPath::absoluteRects):
2528         * rendering/RenderTreeAsText.cpp:
2529         (WebCore::write):
2530         * rendering/SVGRenderTreeAsText.cpp:
2531         (WebCore::operator<<):
2532         (WebCore::write):
2533         * rendering/SVGRenderTreeAsText.h:
2534
2535 2007-07-11  Nikolas Zimmermann  <zimmermann@kde.org>
2536
2537         Reviewed by Sam.
2538
2539         Remove all "SVGElement* m_context" parameters spread over SVG primitives
2540         (like SVGAngle, SVGPreserveAspectRatio, SVGTransformList, ...)
2541
2542         This is all handled by the JS generation in the bindings now, leading
2543         to a faster static rendering codepaths, and easier handling of the dynamic
2544         parts like JS scripting. Remove the mystified genericContext() concept alltogether.
2545
2546         * bindings/js/JSSVGMatrixCustom.cpp: Adapt to the context() change.
2547         (WebCore::JSSVGMatrix::multiply):
2548         (WebCore::JSSVGMatrix::inverse):
2549         (WebCore::JSSVGMatrix::translate):
2550         (WebCore::JSSVGMatrix::scale):
2551         (WebCore::JSSVGMatrix::scaleNonUniform):
2552         (WebCore::JSSVGMatrix::rotate):
2553         (WebCore::JSSVGMatrix::rotateFromVector):
2554         (WebCore::JSSVGMatrix::flipX):
2555         (WebCore::JSSVGMatrix::flipY):
2556         (WebCore::JSSVGMatrix::skewX):
2557         (WebCore::JSSVGMatrix::skewY):
2558         * bindings/js/JSSVGPODTypeWrapper.h: Remove all nAC() calls here!
2559         (WebCore::JSSVGPODTypeWrapperCreatorReadWrite::commitChange):
2560         (WebCore::JSSVGPODTypeWrapperCreatorForList::JSSVGPODTypeWrapperCreatorForList):
2561         (WebCore::JSSVGPODTypeWrapperCreatorForList::~JSSVGPODTypeWrapperCreatorForList):
2562         * bindings/js/JSSVGPathSegCustom.cpp: Adapt to the context() change.
2563         (WebCore::toJS):
2564         * bindings/js/JSSVGPathSegListCustom.cpp: Ditto.
2565         (WebCore::JSSVGPathSegList::clear):
2566         (WebCore::JSSVGPathSegList::initialize):
2567         (WebCore::JSSVGPathSegList::getItem):
2568         (WebCore::JSSVGPathSegList::insertItemBefore):
2569         (WebCore::JSSVGPathSegList::replaceItem):
2570         (WebCore::JSSVGPathSegList::removeItem):
2571         (WebCore::JSSVGPathSegList::appendItem):
2572         * bindings/js/JSSVGPointListCustom.cpp: Ditto.
2573         (WebCore::JSSVGPointList::clear):
2574         (WebCore::JSSVGPointList::initialize):
2575         (WebCore::JSSVGPointList::getItem):
2576         (WebCore::JSSVGPointList::insertItemBefore):
2577         (WebCore::JSSVGPointList::replaceItem):
2578         (WebCore::JSSVGPointList::removeItem):
2579         (WebCore::JSSVGPointList::appendItem): 
2580         * bindings/js/JSSVGTransformListCustom.cpp: Ditto.
2581         (WebCore::JSSVGTransformList::clear):
2582         (WebCore::JSSVGTransformList::initialize):
2583         (WebCore::JSSVGTransformList::getItem):
2584         (WebCore::JSSVGTransformList::insertItemBefore):
2585         (WebCore::JSSVGTransformList::replaceItem):
2586         (WebCore::JSSVGTransformList::removeItem):
2587         (WebCore::JSSVGTransformList::appendItem):
2588         * bindings/js/kjs_binding.h: Add new cacheSVGDOMObject, taking third parameter: context.
2589         (KJS::cacheSVGDOMObject):
2590         * bindings/scripts/CodeGeneratorJS.pm: Change generation to step aways from genericContext().
2591         * ksvg2/misc/SVGDocumentExtensions.h: Kill all genericContext() stuff.
2592         (WebCore::SVGDocumentExtensions::hasBaseValue):
2593         * ksvg2/svg/SVGAngle.cpp: Kill context parameter.
2594         (WebCore::SVGAngle::SVGAngle):
2595         * ksvg2/svg/SVGAngle.h: ditto.
2596         * ksvg2/svg/SVGFEImageElement.cpp: SVG classes don't get context params passed anymore.
2597         (WebCore::SVGFEImageElement::SVGFEImageElement):
2598         * ksvg2/svg/SVGFitToViewBox.cpp: Ditto.
2599         (WebCore::SVGFitToViewBox::SVGFitToViewBox):
2600         * ksvg2/svg/SVGGradientElement.cpp: Ditto.
2601         (WebCore::SVGGradientElement::SVGGradientElement):
2602         * ksvg2/svg/SVGImageElement.cpp: Ditto.
2603         (WebCore::SVGImageElement::SVGImageElement):
2604         * ksvg2/svg/SVGMarkerElement.cpp: Ditto.
2605         (WebCore::SVGMarkerElement::SVGMarkerElement):
2606         (WebCore::SVGMarkerElement::parseMappedAttribute):
2607         * ksvg2/svg/SVGPathElement.cpp: Ditto.
2608         (WebCore::SVGPathElement::pathSegList):
2609         * ksvg2/svg/SVGPathSegList.cpp: Kill context parameter.
2610         (WebCore::SVGPathSegList::SVGPathSegList):
2611         * ksvg2/svg/SVGPathSegList.h:
2612         * ksvg2/svg/SVGPatternElement.cpp: SVG classes don't get context params passed anymore.
2613         (WebCore::SVGPatternElement::SVGPatternElement):
2614         * ksvg2/svg/SVGPointList.cpp: Kill context parameter.
2615         (SVGPointList::SVGPointList):
2616         * ksvg2/svg/SVGPointList.h:
2617         * ksvg2/svg/SVGPolyElement.cpp: SVG classes don't get context params passed anymore.
2618         (WebCore::SVGPolyElement::points):
2619         * ksvg2/svg/SVGPreserveAspectRatio.cpp: Kill context parameter.
2620         (WebCore::SVGPreserveAspectRatio::SVGPreserveAspectRatio):
2621         (WebCore::SVGPreserveAspectRatio::setAlign):
2622         (WebCore::SVGPreserveAspectRatio::setMeetOrSlice):
2623         (WebCore::SVGPreserveAspectRatio::parsePreserveAspectRatio):
2624         * ksvg2/svg/SVGPreserveAspectRatio.h:
2625         * ksvg2/svg/SVGSVGElement.cpp: SVG classes don't get cntext params passed anymore.
2626         (WebCore::SVGSVGElement::createSVGAngle):
2627         * ksvg2/svg/SVGStyledTransformableElement.cpp: Ditto.
2628         (WebCore::SVGStyledTransformableElement::SVGStyledTransformableElement):
2629         * ksvg2/svg/SVGTextElement.cpp: Ditto.
2630         (WebCore::SVGTextElement::SVGTextElement):
2631         * ksvg2/svg/SVGTransformList.cpp: Kill context parameter.
2632         (SVGTransformList::SVGTransformList):
2633         * ksvg2/svg/SVGTransformList.h:
2634
2635 2007-07-10  Nikolas Zimmermann  <zimmermann@kde.org>
2636
2637         Reviewed by Sam.
2638
2639         Fixes: http://bugs.webkit.org/show_bug.cgi?id=11167.
2640
2641         Recognize <textPath> in SVG JS bindings.
2642         Add JSSVGTextPathElement to JSSVGElementWrapperFactory.
2643
2644         Add SVGException.idl just for the JS generation.
2645         Turn on all SVG JS constructors and add them to DOMWindow.idl.
2646
2647         Testcase added: LayoutTests/svg/custom/js-svg-constructors.svg
2648     
2649         * DerivedSources.make: Add JSSVGException.h
2650         * WebCore.xcodeproj/project.pbxproj: Correct paths for DOM/JS*SVGTextPathElement
2651         * bindings/scripts/CodeGeneratorJS.pm: Forward port hash fix from trunk.
2652         * bindings/js/JSSVGElementWrapperFactory.cpp: Add JSSVGTextPathElement support
2653         * ksvg2/svg/SVGComponentTransferFunctionElement.idl:
2654         * ksvg2/svg/SVGTextPathElement.h:
2655         * ksvg2/svg/SVGException.h:
2656         * ksvg2/svg/SVGException.idl: Added.
2657         * ksvg2/svg/SVGFEBlendElement.idl:
2658         * ksvg2/svg/SVGFEColorMatrixElement.idl:
2659         * ksvg2/svg/SVGFECompositeElement.idl:
2660         * ksvg2/svg/SVGFEDisplacementMapElement.idl:
2661         * ksvg2/svg/SVGFETurbulenceElement.idl:
2662         * ksvg2/svg/SVGGradientElement.idl:
2663         * ksvg2/svg/SVGMarkerElement.idl:
2664         * ksvg2/svg/SVGTextContentElement.idl:
2665         * ksvg2/svg/SVGTextPathElement.idl:
2666         * page/DOMWindow.idl: Recognize new js svg constructors.
2667
2668 2007-06-28  Rob Buis  <buis@kde.org>
2669
2670         Reviewed by Maciej.
2671
2672         http://bugs.webkit.org/show_bug.cgi?id=14241
2673         SVG <image> with height or width less than 1 fails to render image
2674
2675         Keep extra member vars to get width/height as floats for accurate
2676         calculations.
2677
2678         * rendering/RenderSVGImage.cpp:
2679         (WebCore::RenderSVGImage::adjustRectsForAspectRatio):
2680         (WebCore::RenderSVGImage::paint):
2681         (WebCore::RenderSVGImage::calcWidth):
2682         (WebCore::RenderSVGImage::calcHeight):
2683         * rendering/RenderSVGImage.h:
2684
2685 2007-06-26  Rob Buis  <buis@kde.org>
2686
2687         Reviewed by Maciej.
2688
2689         http://bugs.webkit.org/show_bug.cgi?id=9976
2690         Fix negative width issue in Hixie's test
2691
2692         Refuse to render zero or negative width/height.
2693
2694         * rendering/RenderSVGContainer.cpp:
2695         (WebCore::RenderSVGContainer::paint):
2696         * rendering/RenderSVGRoot.cpp:
2697         (WebCore::RenderSVGRoot::paint):
2698
2699 2007-06-26  Rob Buis  <buis@kde.org>
2700
2701         Reviewed by Maciej.
2702
2703         http://bugs.webkit.org/show_bug.cgi?id=12062
2704         WebCore does not handle CSS-specified fill fallback correctly
2705
2706         Implement fallback for fill and stroke.
2707
2708         * ksvg2/css/SVGCSSParser.cpp:
2709         (WebCore::CSSParser::parseSVGValue):
2710         * ksvg2/svg/SVGPaint.cpp:
2711         (WebCore::SVGPaint::SVGPaint):
2712         * ksvg2/svg/SVGPaint.h:
2713         * platform/graphics/svg/SVGPaintServer.cpp:
2714         (WebCore::SVGPaintServer::fillPaintServer):
2715         (WebCore::SVGPaintServer::strokePaintServer):
2716
2717 2007-06-20  Rob Buis  <buis@kde.org>
2718
2719         Reviewed by Eric.
2720
2721         http://bugs.webkit.org/show_bug.cgi?id=14157
2722         Rotated shape has wrong gradient rendering
2723
2724         Use the untransformed bbox in objectBoundingBoxMode. Also
2725         don't do objectBoundingBoxMode should the bbox width ort height
2726         be zero.
2727
2728         * platform/graphics/svg/cg/SVGPaintServerGradientCg.cpp:
2729         (WebCore::SVGPaintServerGradient::teardown):
2730         (WebCore::SVGPaintServerGradient::renderPath):
2731
2732 2007-06-20  Nikolas Zimmermann  <zimmermann@kde.org>
2733
2734         Reviewed by Eric & Oliver.
2735
2736         Fixes: http://bugs.webkit.org/show_bug.cgi?id=14198
2737
2738         Reeanble <foreignObject>. Explicitely disallow <use> on <foreignObject>
2739         as it may lead to bad problems. 
2740
2741         While I'm at it disallow <use> on any non-svg element.
2742
2743         * bindings/js/JSSVGElementWrapperFactory.cpp:
2744         * bindings/objc/DOM.mm:
2745         (WebCore::createElementClassMap):
2746         * ksvg2/svg/SVGForeignObjectElement.cpp:
2747         * ksvg2/svg/SVGForeignObjectElement.h:
2748         * ksvg2/svg/SVGForeignObjectElement.idl:
2749         * ksvg2/svg/SVGLocatable.cpp:
2750         (WebCore::SVGLocatable::nearestViewportElement):
2751         (WebCore::SVGLocatable::farthestViewportElement):
2752         * ksvg2/svg/SVGUseElement.cpp:
2753         (WebCore::SVGUseElement::buildPendingResource):
2754         * ksvg2/svg/svgtags.in:
2755         * rendering/RenderForeignObject.cpp:
2756
2757 2007-06-19  Rob Buis  <buis@kde.org>
2758
2759         Reviewed by Oliver.
2760
2761         http://bugs.webkit.org/show_bug.cgi?id=14144
2762         All tx/ty (parentX/parentY) usage should be removed from SVG renders
2763         http://bugs.webkit.org/show_bug.cgi?id=13981
2764         <br> prevents click handler from firing
2765
2766         Fix the hit testing issues by making RenderSVGRoot take its m_x, m_y
2767         into account in the absolute transform.
2768
2769         * rendering/RenderPath.cpp:
2770         (WebCore::RenderPath::absoluteRects):
2771         (WebCore::RenderPath::nodeAtPoint):
2772         * rendering/RenderSVGImage.cpp:
2773         (WebCore::RenderSVGImage::nodeAtPoint):
2774         * rendering/RenderSVGRoot.cpp:
2775         (WebCore::RenderSVGRoot::absoluteTransform):
2776         (WebCore::RenderSVGRoot::nodeAtPoint):
2777
2778 2007-06-16  Nikolas Zimmermann  <zimmermann@kde.org>
2779
2780         Reviewed by Eric.
2781
2782         Fixes: http://bugs.webkit.org/show_bug.cgi?id=14015 (SVGTransformList::initialize() has no effect)
2783
2784         Fix SVGTransformList usage in SVG DOM exposed to JS.
2785         This also fixes SVG space invaders including most repainting issues. (still some unrelated ones left)
2786
2787         This is basically the _same_ fix applied to SVGPointList some months ago. We just forgot
2788         to add JSSVGTransformListCustom when switching from SVGTransform* -> SVGTransform (POD type).
2789
2790         * WebCore.xcodeproj/project.pbxproj:
2791         * bindings/js/JSSVGTransformListCustom.cpp: Added.
2792         (WebCore::JSSVGTransformList::clear):
2793         (WebCore::JSSVGTransformList::initialize):
2794         (WebCore::JSSVGTransformList::getItem):
2795         (WebCore::JSSVGTransformList::insertItemBefore):
2796         (WebCore::JSSVGTransformList::replaceItem):
2797         (WebCore::JSSVGTransformList::removeItem):
2798         (WebCore::JSSVGTransformList::appendItem):
2799         * ksvg2/svg/SVGCircleElement.cpp:
2800         (WebCore::SVGCircleElement::notifyAttributeChange):
2801         * ksvg2/svg/SVGEllipseElement.cpp:
2802         (WebCore::SVGEllipseElement::notifyAttributeChange):
2803         * ksvg2/svg/SVGGradientElement.cpp:
2804         (WebCore::SVGGradientElement::SVGGradientElement):
2805         * ksvg2/svg/SVGImageElement.cpp:
2806         (WebCore::SVGImageElement::notifyAttributeChange):
2807         * ksvg2/svg/SVGLineElement.cpp:
2808         (WebCore::SVGLineElement::notifyAttributeChange):
2809         * ksvg2/svg/SVGPathElement.cpp:
2810         (WebCore::SVGPathElement::notifyAttributeChange):
2811         * ksvg2/svg/SVGPatternElement.cpp:
2812         (WebCore::SVGPatternElement::SVGPatternElement):
2813         * ksvg2/svg/SVGPolyElement.cpp:
2814         (WebCore::SVGPolyElement::notifyAttributeChange):
2815         * ksvg2/svg/SVGRectElement.cpp:
2816         (WebCore::SVGRectElement::notifyAttributeChange):
2817         * ksvg2/svg/SVGStyledTransformableElement.cpp:
2818         (WebCore::SVGStyledTransformableElement::SVGStyledTransformableElement):
2819         (WebCore::SVGStyledTransformableElement::notifyAttributeChange):
2820         * ksvg2/svg/SVGStyledTransformableElement.h:
2821         * ksvg2/svg/SVGTextElement.cpp:
2822         (WebCore::SVGTextElement::SVGTextElement):
2823         * ksvg2/svg/SVGTransformList.cpp:
2824         (SVGTransformList::SVGTransformList):
2825         (SVGTransformList::context):
2826         * ksvg2/svg/SVGTransformList.h:
2827         * ksvg2/svg/SVGTransformList.idl:
2828
2829 2007-06-15  Nikolas Zimmermann  <zimmermann@kde.org>
2830
2831         Reviewed by Eric.
2832
2833         Fixes: http://bugs.webkit.org/show_bug.cgi?id=14155
2834
2835         JSSVGMatrix was not working properly.
2836         "matrix.translate(10, 10)" actually altered 'matrix' instead of returning a
2837         new SVGMatrix object, as described in SVG 1.1 specification.
2838
2839         * bindings/js/JSSVGMatrixCustom.cpp:
2840         (WebCore::JSSVGMatrix::multiply):
2841         (WebCore::JSSVGMatrix::inverse):
2842         (WebCore::JSSVGMatrix::translate):
2843         (WebCore::JSSVGMatrix::scale):
2844         (WebCore::JSSVGMatrix::scaleNonUniform):
2845         (WebCore::JSSVGMatrix::rotate):
2846         (WebCore::JSSVGMatrix::flipX):
2847         (WebCore::JSSVGMatrix::flipY):
2848         (WebCore::JSSVGMatrix::skewX):
2849         (WebCore::JSSVGMatrix::skewY):
2850         * ksvg2/svg/SVGMatrix.idl:
2851
2852 2007-06-15  Eric Seidel  <eric@webkit.org>
2853
2854         Reviewed by Niko.
2855
2856         Fix the release build.
2857
2858         * rendering/SVGRootInlineBox.cpp:
2859         (WebCore::applyTextAnchorToTextChunk):
2860
2861 2007-06-15  Rob Buis  <buis@kde.org>
2862
2863         Reviewed by Eric.
2864
2865         http://bugs.webkit.org/show_bug.cgi?id=14051
2866         <svg:image> fails to position correctly when <svg> is inside an inline <div>
2867
2868         Leave parent translation to the containers.
2869
2870         * rendering/RenderSVGImage.cpp:
2871         (WebCore::RenderSVGImage::paint):
2872
2873 2007-06-15  Nikolas Zimmermann  <zimmermann@kde.org>
2874
2875         Reviewed by Eric.
2876
2877         Fixes: http://bugs.webkit.org/show_bug.cgi?id=13963
2878
2879         Fix SVG space invaders. It actually highlighted a bad problem with our JSSVGPODTypeWrapper's.
2880         Introduce a new "2nd-level cache" for all readwrite POD properties. Subsequent calls to ie.
2881         myRect.x.baseVal.value don't create a new wrapper everytime, but are properly cached now.
2882         This leads to a massive reduction in created wrappers.
2883
2884         * bindings/js/JSSVGMatrixCustom.cpp:
2885         (WebCore::JSSVGMatrix::inverse):
2886         (WebCore::JSSVGMatrix::rotateFromVector):
2887         * bindings/js/JSSVGPODTypeWrapper.h:
2888         (WebCore::JSSVGPODTypeWrapperCreatorReadWrite::JSSVGPODTypeWrapperCreatorReadWrite):
2889         (WebCore::JSSVGPODTypeWrapperCreatorReadWrite::~JSSVGPODTypeWrapperCreatorReadWrite):
2890         (WebCore::JSSVGPODTypeWrapperCreatorReadWrite::operator PODType):
2891         (WebCore::JSSVGPODTypeWrapperCreatorReadWrite::commitChange):
2892         (WebCore::JSSVGPODTypeWrapperCreatorReadOnly::JSSVGPODTypeWrapperCreatorReadOnly):
2893         (WebCore::JSSVGPODTypeWrapperCreatorReadOnly::~JSSVGPODTypeWrapperCreatorReadOnly):
2894         (WebCore::JSSVGPODTypeWrapperCreatorReadOnly::operator PODType):
2895         (WebCore::JSSVGPODTypeWrapperCreatorReadOnly::commitChange):
2896         (WebCore::JSSVGPODTypeWrapperCreatorForList::JSSVGPODTypeWrapperCreatorForList):
2897         (WebCore::JSSVGPODTypeWrapperCreatorForList::commitChange):
2898         (WebCore::PODTypeReadWriteHashInfo::PODTypeReadWriteHashInfo):
2899         (WebCore::PODTypeReadWriteHashInfo::operator==):
2900         (WebCore::PODTypeReadWriteHashInfoHash::hash):
2901         (WebCore::PODTypeReadWriteHashInfoHash::equal):
2902         (WebCore::PODTypeReadWriteHashInfoTraits::deletedValue):
2903         (WebCore::PODTypeReadWriteHashInfoTraits::emptyValue):
2904         (WebCore::JSSVGPODTypeWrapperCache::readWriteHashMap):
2905         (WebCore::JSSVGPODTypeWrapperCache::lookupOrCreateWrapper):
2906         (WebCore::JSSVGPODTypeWrapperCache::forgetWrapper):
2907         * bindings/js/JSSVGPointListCustom.cpp:
2908         (WebCore::JSSVGPointList::removeItem):
2909         * bindings/scripts/CodeGeneratorJS.pm:
2910
2911 2007-06-14  Eric Seidel  <eric@webkit.org>
2912
2913         Reviewed by Niko.
2914
2915         Text gradients are broken on feature branch
2916         http://bugs.webkit.org/show_bug.cgi?id=14142
2917
2918         * rendering/SVGRenderSupport.cpp:
2919         (WebCore::prepareToRenderSVGContent):
2920         * rendering/SVGRootInlineBox.cpp:
2921         (WebCore::prepareTextRendering):
2922         (WebCore::SVGRootInlineBox::paint):
2923         (WebCore::SVGRootInlineBox::paintInlineBoxes):
2924         (WebCore::SVGRootInlineBox::paintChildInlineTextBox):
2925         (WebCore::SVGRootInlineBox::paintChildInlineFlowBox):
2926         * rendering/SVGRootInlineBox.h:
2927
2928 2007-06-14  Nikolas Zimmermann  <zimmermann@kde.org>
2929
2930         Reviewed by Sam.
2931
2932         Fixes: http://bugs.webkit.org/show_bug.cgi?id=11273
2933
2934         Implement pixelUnitToMillimeterX(), pixelUnitToMillimeterY() in SVGSVGElement.
2935         Use cssPixelsPerInch, just like done in CSSPrimitiveValue & SVGLength.
2936
2937         * ksvg2/svg/SVGSVGElement.cpp:
2938         (WebCore::SVGSVGElement::pixelUnitToMillimeterX):
2939         (WebCore::SVGSVGElement::pixelUnitToMillimeterY):
2940
2941 2007-06-14  Rob Buis  <buis@kde.org>
2942
2943         Reviewed by Eric.
2944
2945         http://bugs.webkit.org/show_bug.cgi?id=9752
2946         %-sizing of elements with a html parent is broken
2947
2948         Calculate width/height for length percentages when embedded in xhtml.
2949
2950         * ksvg2/svg/SVGLength.cpp:
2951         (WebCore::SVGLength::PercentageOfViewport):
2952
2953 2007-06-14  Rob Buis  <buis@kde.org>
2954
2955         Build fix.
2956
2957         * rendering/SVGCharacterLayoutInfo.cpp:
2958
2959 2007-06-14  Rob Buis  <buis@kde.org>
2960
2961         Reviewed by Eric.
2962
2963         http://bugs.webkit.org/show_bug.cgi?id=12207
2964         RenderSVGContainer should be split into multiple classes
2965         http://bugs.webkit.org/show_bug.cgi?id=14125
2966         KCanvasRenderingStyle should be removed
2967
2968         Introduce the RenderSVGRoot class and kill the KCanvas enums.
2969
2970         * WebCore.xcodeproj/project.pbxproj:
2971         * ksvg2/css/SVGRenderStyle.cpp:
2972         (WebCore::SVGRenderStyle::cssPrimitiveToLength):
2973         * ksvg2/css/SVGRenderStyle.h:
2974         * ksvg2/misc/KCanvasRenderingStyle.cpp: Removed.
2975         * ksvg2/misc/KCanvasRenderingStyle.h: Removed.
2976         * ksvg2/svg/SVGMarkerElement.cpp:
2977         (WebCore::SVGMarkerElement::createRenderer):
2978         (WebCore::SVGMarkerElement::notifyAttributeChange):
2979         * ksvg2/svg/SVGSVGElement.cpp:
2980         (WebCore::SVGSVGElement::createRenderer):
2981         * ksvg2/svg/SVGSVGElement.h:
2982         * platform/graphics/svg/SVGPaintServer.cpp:
2983         (WebCore::sharedSolidPaintServer):
2984         (WebCore::SVGPaintServer::fillPaintServer):
2985         (WebCore::SVGPaintServer::strokePaintServer):
2986         (WebCore::dashArrayFromRenderingStyle):
2987         * platform/graphics/svg/SVGPaintServer.h:
2988         * platform/graphics/svg/cg/CgSupport.cpp:
2989         (WebCore::applyStrokeStyleToContext):
2990         * platform/graphics/svg/cg/RenderPathCg.cpp:
2991         (WebCore::RenderPath::strokeContains):
2992         * rendering/RenderPath.cpp:
2993         (WebCore::RenderPath::fillContains):
2994         (WebCore::fillAndStrokePath):
2995         (WebCore::RenderPath::drawMarkersIfNeeded):
2996         * rendering/RenderSVGContainer.cpp:
2997         (WebCore::RenderSVGContainer::requiresLayer):
2998         (WebCore::RenderSVGContainer::layout):
2999         (WebCore::RenderSVGContainer::applyContentTransforms):
3000         (WebCore::RenderSVGContainer::paint):
3001         (WebCore::RenderSVGContainer::setAlign):
3002         (WebCore::RenderSVGContainer::align):
3003         (WebCore::RenderSVGContainer::viewportTransform):
3004         (WebCore::RenderSVGContainer::absoluteTransform):
3005         (WebCore::RenderSVGContainer::getAspectRatio):
3006         * rendering/RenderSVGContainer.h:
3007         * rendering/RenderSVGInlineText.cpp:
3008         * rendering/RenderSVGRoot.cpp: Added.
3009         (WebCore::RenderSVGRoot::RenderSVGRoot):
3010         (WebCore::RenderSVGRoot::~RenderSVGRoot):
3011         (WebCore::RenderSVGRoot::localTransform):
3012         (WebCore::RenderSVGRoot::setLocalTransform):
3013         (WebCore::RenderSVGRoot::requiresLayer):
3014         (WebCore::RenderSVGRoot::lineHeight):
3015         (WebCore::RenderSVGRoot::baselinePosition):
3016         (WebCore::RenderSVGRoot::layout):
3017         (WebCore::RenderSVGRoot::applyContentTransforms):
3018         (WebCore::RenderSVGRoot::paint):
3019         (WebCore::RenderSVGRoot::viewport):
3020         (WebCore::RenderSVGRoot::calcViewport):
3021         (WebCore::RenderSVGRoot::setViewBox):
3022         (WebCore::RenderSVGRoot::viewBox):
3023         (WebCore::RenderSVGRoot::setAlign):
3024         (WebCore::RenderSVGRoot::align):
3025         (WebCore::RenderSVGRoot::viewportTransform):
3026         (WebCore::RenderSVGRoot::absoluteClippedOverflowRect):
3027         (WebCore::RenderSVGRoot::addFocusRingRects):
3028         (WebCore::RenderSVGRoot::absoluteRects):
3029         (WebCore::RenderSVGRoot::absoluteTransform):
3030         (WebCore::RenderSVGRoot::fillContains):
3031         (WebCore::RenderSVGRoot::strokeContains):
3032         (WebCore::RenderSVGRoot::relativeBBox):
3033         (WebCore::RenderSVGRoot::setSlice):
3034         (WebCore::RenderSVGRoot::slice):
3035         (WebCore::RenderSVGRoot::getAspectRatio):
3036         (WebCore::RenderSVGRoot::nodeAtPoint):
3037         * rendering/RenderSVGRoot.h: Added.
3038         (WebCore::RenderSVGRoot::isSVGContainer):
3039         (WebCore::RenderSVGRoot::renderName):
3040         * rendering/RenderSVGTSpan.cpp:
3041         * rendering/RenderSVGText.cpp:
3042         (WebCore::RenderSVGText::relativeBBox):
3043         * rendering/SVGRenderTreeAsText.cpp:
3044         (WebCore::operator<<):
3045         (WebCore::writeStyle):
3046         * rendering/SVGRootInlineBox.cpp:
3047         (WebCore::SVGRootInlineBox::paint):
3048         (WebCore::SVGRootInlineBox::paintInlineBoxes):
3049
3050 2007-06-12  Nikolas Zimmermann  <zimmermann@kde.org>
3051
3052         Reviewed by Eric.
3053
3054         Fix regression: SVG images drawn in the wrong paint phase.
3055
3056         * rendering/RenderSVGImage.cpp:
3057         (WebCore::RenderSVGImage::paint):
3058
3059 2007-06-11  Rob Buis  <buis@kde.org>
3060
3061         Reviewed by weinig.
3062
3063         http://bugs.webkit.org/show_bug.cgi?id=14064
3064         fill property is reported as type SVGColor
3065
3066         Do the checks in the right order.
3067
3068         * bindings/js/kjs_css.cpp:
3069         (KJS::toJS):
3070
3071 2007-06-07  Rob Buis  <buis@kde.org>
3072
3073         Reviewed by Eric.
3074
3075         http://bugs.webkit.org/show_bug.cgi?id=12122
3076         SVGPathElement should not inherit from SVGPathParser
3077
3078         Use path builders for building Path and PathSegLists.
3079
3080         * ksvg2/svg/SVGAnimateMotionElement.cpp:
3081         (WebCore::SVGAnimateMotionElement::parseMappedAttribute):
3082         * ksvg2/svg/SVGParserUtilities.cpp:
3083         (WebCore::pointsListFromSVGData):
3084         (WebCore::SVGPathParser::~SVGPathParser):
3085         (WebCore::SVGPathParser::svgLineToHorizontal):
3086         (WebCore::SVGPathParser::svgLineToVertical):
3087         (WebCore::SVGPathParser::svgCurveToCubicSmooth):
3088         (WebCore::SVGPathParser::svgCurveToQuadratic):
3089         (WebCore::SVGPathParser::svgCurveToQuadraticSmooth):
3090         (WebCore::SVGPathParser::svgArcTo):
3091         (WebCore::PathBuilder::build):
3092         (WebCore::PathBuilder::svgMoveTo):
3093         (WebCore::PathBuilder::svgLineTo):
3094         (WebCore::PathBuilder::svgCurveToCubic):
3095         (WebCore::PathBuilder::svgClosePath):
3096         (WebCore::pathFromSVGData):
3097         (WebCore::SVGPathSegListBuilder::build):
3098         (WebCore::SVGPathSegListBuilder::svgMoveTo):
3099         (WebCore::SVGPathSegListBuilder::svgLineTo):
3100         (WebCore::SVGPathSegListBuilder::svgLineToHorizontal):
3101         (WebCore::SVGPathSegListBuilder::svgLineToVertical):
3102         (WebCore::SVGPathSegListBuilder::svgCurveToCubic):
3103         (WebCore::SVGPathSegListBuilder::svgCurveToCubicSmooth):
3104         (WebCore::SVGPathSegListBuilder::svgCurveToQuadratic):
3105         (WebCore::SVGPathSegListBuilder::svgCurveToQuadraticSmooth):
3106         (WebCore::SVGPathSegListBuilder::svgArcTo):
3107         (WebCore::SVGPathSegListBuilder::svgClosePath):
3108         (WebCore::pathSegListFromSVGData):
3109         * ksvg2/svg/SVGParserUtilities.h:
3110         * ksvg2/svg/SVGPathElement.cpp:
3111         (WebCore::SVGPathElement::SVGPathElement):
3112         (WebCore::SVGPathElement::parseMappedAttribute):
3113         * ksvg2/svg/SVGPathElement.h:
3114         * ksvg2/svg/SVGPolyElement.cpp:
3115         (WebCore::SVGPolyElement::SVGPolyElement):
3116         (WebCore::SVGPolyElement::parseMappedAttribute):
3117         * ksvg2/svg/SVGPolyElement.h:
3118
3119 2007-06-06  Eric Seidel  <eric@webkit.org>
3120
3121         Reviewed by olliej.
3122
3123         Add support for tabbing between links in an SVG file
3124         Also add support for drawing a focus ring around focused svg content.
3125         http://bugs.webkit.org/show_bug.cgi?id=8823
3126         
3127         Layout test is blocked by http://bugs.webkit.org/show_bug.cgi?id=14027
3128
3129         * css/svg.css:
3130         * ksvg2/svg/SVGAElement.cpp:
3131         (WebCore::SVGAElement::defaultEventHandler):
3132         (WebCore::SVGAElement::supportsFocus):
3133         (WebCore::SVGAElement::isFocusable):
3134         (WebCore::SVGAElement::isMouseFocusable):
3135         (WebCore::SVGAElement::isKeyboardFocusable):
3136         * ksvg2/svg/SVGAElement.h:
3137
3138 2007-06-06  Eric Seidel  <eric@webkit.org>
3139
3140         Reviewed by olliej.
3141
3142         Make SVG (mostly) support CSS outline property (and thus focus rings)
3143         http://bugs.webkit.org/show_bug.cgi?id=10849
3144
3145         Test: svg/custom/focus-ring.svg
3146
3147         * rendering/RenderPath.cpp:
3148         (WebCore::RenderPath::paint):
3149         (WebCore::RenderPath::addFocusRingRects):
3150         * rendering/RenderPath.h:
3151         * rendering/RenderSVGContainer.cpp:
3152         (WebCore::RenderSVGContainer::paint):
3153         (WebCore::RenderSVGContainer::addFocusRingRects):
3154         * rendering/RenderSVGContainer.h:
3155         * rendering/RenderSVGImage.cpp:
3156         (WebCore::RenderSVGImage::paint):
3157         (WebCore::RenderSVGImage::addFocusRingRects):
3158         * rendering/RenderSVGImage.h:
3159
3160 2007-06-06  Eric Seidel  <eric@webkit.org>
3161
3162         Reviewed by weinig.
3163         
3164         Break out common SVG rendering logic into prepareToRenderSVGContent in SVGRenderSupport
3165
3166         No test cases should be changed by this.
3167
3168         * WebCore.xcodeproj/project.pbxproj:
3169         * rendering/RenderPath.cpp:
3170         (WebCore::fillAndStrokePath):
3171         (WebCore::RenderPath::paint):
3172         * rendering/RenderSVGContainer.cpp:
3173         (WebCore::RenderSVGContainer::RenderSVGContainer):
3174         (WebCore::RenderSVGContainer::requiresLayer):
3175         (WebCore::RenderSVGContainer::isOutermostSVG):
3176         (WebCore::RenderSVGContainer::layout):
3177         (WebCore::RenderSVGContainer::applyContentTransforms):
3178         (WebCore::RenderSVGContainer::paint):
3179         (WebCore::RenderSVGContainer::viewportTransform):
3180         (WebCore::RenderSVGContainer::absoluteTransform):
3181         * rendering/RenderSVGContainer.h:
3182         * rendering/RenderSVGImage.cpp:
3183         (WebCore::RenderSVGImage::paint):
3184         (WebCore::RenderSVGImage::translationForAttributes):
3185         * rendering/SVGRenderSupport.cpp: Added.
3186         (WebCore::prepareToRenderSVGContent):
3187         * rendering/SVGRenderSupport.h: Added.
3188         * rendering/SVGRootInlineBox.cpp:
3189         (WebCore::prepareTextRendering):
3190         (WebCore::SVGRootInlineBox::paint):
3191         (WebCore::SVGRootInlineBox::paintInlineBoxes):
3192
3193 2007-06-06  Rob Buis  <buis@kde.org>
3194
3195         Reviewed by Eric.
3196
3197         http://bugs.webkit.org/show_bug.cgi?id=13976
3198         getPresentationAttribute not implemented
3199
3200         Implement getPresentationAttribute.
3201
3202         * ksvg2/svg/SVGStylable.h:
3203         * ksvg2/svg/SVGStylable.idl:
3204         * ksvg2/svg/SVGStyledElement.cpp:
3205         (WebCore::SVGStyledElement::getPresentationAttribute):
3206         * ksvg2/svg/SVGStyledElement.h:
3207
3208 2007-06-06  Rob Buis  <buis@kde.org>
3209
3210         Reviewed by olliej and eric.
3211
3212         http://bugs.webkit.org/show_bug.cgi?id=12430
3213         SVG has two transform parsers when it should have one.
3214
3215         Refactor SVGTransformable parser so SVGAnimateTransformElement can reuse it better.
3216
3217         * ksvg2/svg/SVGAnimateTransformElement.cpp:
3218         (WebCore::SVGAnimateTransformElement::calculateFromAndToValues):
3219         * ksvg2/svg/SVGAnimateTransformElement.h:
3220         * ksvg2/svg/SVGTransformable.cpp:
3221         (WebCore::):
3222         (WebCore::SVGTransformable::parseTransformValue):
3223         (WebCore::SVGTransformable::parseTransformAttribute):
3224         * ksvg2/svg/SVGTransformable.h:
3225
3226 2007-06-05  Eric Seidel  <eric@webkit.org>
3227
3228         Reviewed by olliej.
3229
3230         Commit files missing from previous commit, oops!
3231         
3232         * platform/graphics/svg/SVGResourceMasker.cpp:
3233         (WebCore::SVGResourceMasker::SVGResourceMasker):
3234         (WebCore::SVGResourceMasker::invalidate):
3235         * platform/graphics/svg/SVGResourceMasker.h:
3236         * platform/graphics/svg/cg/SVGResourceMaskerCg.mm:
3237         (WebCore::SVGResourceMasker::applyMask):
3238
3239 2007-06-01  Eric Seidel  <eric@webkit.org>
3240
3241         Reviewed by olliej.
3242
3243         Add support for maskUnits and maskContentUnits
3244         http://bugs.webkit.org/show_bug.cgi?id=12568
3245         
3246         This is covered by the W3C tests (including mask-intro01)
3247
3248         * ksvg2/svg/SVGMaskElement.cpp:
3249         (WebCore::SVGMaskElement::SVGMaskElement):
3250         (WebCore::SVGMaskElement::parseMappedAttribute):
3251         (WebCore::SVGMaskElement::drawMaskerContent):
3252         (WebCore::SVGMaskElement::canvasResource):
3253         (WebCore::SVGMaskElement::notifyAttributeChange):
3254         * ksvg2/svg/SVGMaskElement.h:
3255         * ksvg2/svg/SVGMaskElement.idl:
3256         * platform/graphics/svg/SVGResourceMasker.cpp:
3257         (WebCore::SVGResourceMasker::SVGResourceMasker):
3258         (WebCore::SVGResourceMasker::invalidate):
3259         * platform/graphics/svg/SVGResourceMasker.h:
3260         * platform/graphics/svg/cg/SVGResourceMaskerCg.mm:
3261         (WebCore::SVGResourceMasker::applyMask):
3262
3263 2007-06-01  Eric Seidel  <eric@webkit.org>
3264
3265         Reviewed by lars.
3266         
3267         Cursor does not change to hand over links containing <use>
3268         http://bugs.webkit.org/show_bug.cgi?id=12630
3269
3270         Test: manual-tests/svg-link-hover-use.svg
3271
3272         * manual-tests/svg-link-hover-use.svg: Added.
3273         * rendering/RenderLayer.cpp:
3274         (WebCore::RenderLayer::hitTest): use eventParentNode instead of parentNode
3275
3276 2007-06-01  Eric Seidel  <eric@webkit.org>
3277
3278         Reviewed by olliej.
3279
3280         SVG is not correctly respecting scroll during hit testing
3281         http://bugs.webkit.org/show_bug.cgi?id=13083
3282
3283         Test: svg/custom/scroll-hit-test.svg
3284
3285         * rendering/RenderPath.cpp:
3286         (WebCore::RenderPath::nodeAtPoint):
3287         * rendering/RenderSVGContainer.cpp:
3288         (WebCore::RenderSVGContainer::nodeAtPoint):
3289
3290 2007-06-01  Eric Seidel  <eric@webkit.org>
3291
3292         Reviewed by hyatt.
3293
3294         Fix for: http://bugs.webkit.org/show_bug.cgi?id=12187
3295
3296         Tests: fast/dom/attribute-case-sensitivity.html, fast/dom/attribute-case-sensitivity2.xhtml
3297
3298         * dom/Element.cpp:
3299         (WebCore::shouldIgnoreAttributeCase): check to make sure element is an HTMLElement
3300         (WebCore::Element::getAttribute):
3301         (WebCore::Element::setAttribute):
3302         (WebCore::Element::removeAttribute):
3303         (WebCore::Element::getAttributeNode):
3304         (WebCore::Element::hasAttribute):
3305         * dom/NamedAttrMap.cpp:
3306         (WebCore::shouldIgnoreAttributeCase):
3307         (WebCore::NamedAttrMap::getNamedItem):
3308         (WebCore::NamedAttrMap::removeNamedItem):
3309
3310 2007-05-31  Eric Seidel  <eric@webkit.org>
3311
3312         Reviewed by Niko.
3313
3314         Links are activated based on mouse down events instead of click events
3315         http://bugs.webkit.org/show_bug.cgi?id=12570
3316         
3317         Test: svg/custom/prevent-default.svg
3318
3319         * html/HTMLAnchorElement.cpp: use MiddleButton and RightButton instead of 1 and 2
3320         (WebCore::HTMLAnchorElement::defaultEventHandler):
3321         * ksvg2/svg/SVGAElement.cpp:
3322         (WebCore::SVGAElement::defaultEventHandler): make it function more like the HTML side
3323
3324 2007-05-30  Rob Buis  <buis@kde.org>
3325
3326         Reviewed by Darin.
3327
3328         http://bugs.webkit.org/show_bug.cgi?id=11272
3329         Implement currentScale(), setCurrentScale() and currentTranslate() in SVGSVGElement
3330
3331         Allow zooming and panning, thereby implementing the above methods.
3332
3333         * ksvg2/svg/SVGDocument.cpp:
3334         (WebCore::SVGDocument::zoomAndPanEnabled):
3335         (WebCore::SVGDocument::startPan):
3336         (WebCore::SVGDocument::updatePan):
3337         * ksvg2/svg/SVGDocument.h:
3338         * ksvg2/svg/SVGSVGElement.cpp:
3339         (WebCore::SVGSVGElement::currentScale):
3340         (WebCore::SVGSVGElement::setCurrentScale):
3341         (WebCore::SVGSVGElement::currentTranslate):
3342         (WebCore::SVGSVGElement::setCurrentTranslate):
3343         * ksvg2/svg/SVGSVGElement.h:
3344         * page/EventHandler.cpp:
3345         (WebCore::EventHandler::EventHandler):
3346         (WebCore::EventHandler::handleMousePressEvent):
3347         (WebCore::EventHandler::handleMouseMoveEvent):
3348         (WebCore::EventHandler::handleMouseReleaseEvent):
3349         * page/EventHandler.h:
3350         * page/Frame.cpp:
3351         (WebCore::Frame::setZoomFactor):