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