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