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