2008-08-13 Thiago Macieira <tjmaciei@trolltech.com>
[WebKit-https.git] / WebCore / ChangeLog
1 2008-08-13  Thiago Macieira  <tjmaciei@trolltech.com>
2
3         Reviewed by Simon.
4
5         Fix encoding of [ and ] in the host part of the URL
6
7         Until QUrl is fixed (making QUrl's tolerant parser more tolerant), we have to
8         add this workaround to the QUrl <> WebCore::KURL conversion operator so that it
9         doesn't encode [ and ] when they are found in the host part. That is, the
10         following URL:
11         http://[::1]/
12         is valid and should not be reencoded to:
13         http://%5b::1%5d/
14
15         * platform/qt/KURLQt.cpp:
16         (WebCore::KURL::operator QUrl):
17
18 2008-08-12  Mihnea Ovidenie  <mihnea@adobe.com>
19
20         Fix for https://bugs.webkit.org/show_bug.cgi?id=19891
21         Broken HTML object elements cause de-reference of pointer to freed memory.
22         If we fail to load an image for an object tag and we no longer believe the object tag points at
23         an image, then clear m_imageLoader in the HTMLObjectElement so that we attempt to render the
24         fall back content.
25
26         Reviewed by Dave Hyatt and Alexey Proskuryakov.
27
28         Test: http/tests/misc/object-image-error-with-onload.html
29
30         * html/HTMLObjectElement.cpp:
31         (WebCore::HTMLObjectElement::renderFallbackContent):
32         * page/Frame.cpp:
33         (WebCore::Frame::Frame):
34
35 2008-08-12  Nikolas Zimmermann  <zimmermann@kde.org>
36
37         Reviewed by Dave.
38     
39         Fixes: https://bugs.webkit.org/show_bug.cgi?id=19798
40         Masks are translated, and the mask images are swapped on the y-axis.
41
42         Turned out that http://trac.webkit.org/changeset/31830/trunk/WebCore/svg/graphics/cg/SVGResourceMaskerCg.mm
43         is guilty. GraphicsContext::clipToImageBuffer() does some extra transformations that SVGResourcesMaskerCg does not want.
44
45         Long term goal is to remove the SVGResource*/SVGPaintServer* classes anyway, so it's okay to duplicate
46         the "clip to image buffer" functionality, in the CG specific SVGResourceMaskerCg class - as it was before.
47
48         * svg/graphics/cg/SVGResourceMaskerCg.mm:
49         (WebCore::SVGResourceMasker::applyMask): Changed back to use CG clipping again.
50
51 2008-08-12  Dan Bernstein  <mitz@apple.com>
52
53         - WebCore part of <rdar://problem/6121636>
54           Make fast*alloc() abort() on failure and add "try" variants that
55           return NULL on failure.
56
57         Reviewed by Darin Adler.
58
59         * platform/Arena.cpp:
60         (WebCore::ArenaAllocate): Removed null checking of fastMalloc()'s
61         result.
62         * platform/graphics/cg/ImageBufferCG.cpp:
63         (WebCore::ImageBuffer::create): Changed to use tryFastCalloc().
64
65 2008-08-12  Dan Bernstein  <mitz@apple.com>
66
67         Reviewed by Darin Adler.
68
69         - fix https://bugs.webkit.org/show_bug.cgi?id=19348
70           <rdar://problem/5978447> REGRESSION (r34193): Setting the size of a frame with javascript document.body.row no longer works
71
72         Test: fast/frames/frameset-style-recalc.html
73
74         * html/HTMLFrameSetElement.cpp:
75         (WebCore::HTMLFrameSetElement::recalcStyle): Changed to call the base
76         class implementation after marking for layout.
77
78 2008-08-12  Dan Bernstein  <mitz@apple.com>
79
80         Reviewed by John Sullivan.
81
82         - move shouldUpdateWhenOffscreen from Settings to FrameView and rename it shouldUpdateWhileHidden
83
84         * WebCore.base.exp:
85         * page/FrameView.cpp:
86         (WebCore::FrameViewPrivate::FrameViewPrivate):
87         (WebCore::FrameView::shouldUpdateWhileHidden):
88         (WebCore::FrameView::setShouldUpdateWhileHidden):
89         * page/FrameView.h:
90         * page/Settings.cpp:
91         * page/Settings.h:
92
93 2008-08-12  Adam Roben  <aroben@apple.com>
94
95         Windows build fix
96
97         * bindings/js/JSSVGPODTypeWrapper.h: Align
98         JSSVGDynamicPODTypeWrapper's and JSSVGStaticPODTypeWrapperWithParent's
99         members on 16-byte boundaries to avoid an alignment warning.
100
101 2008-08-12  Nikolas Zimmermann  <zimmermann@kde.org>
102
103         Reviewed by Oliver.
104
105         Add new dynamice-update layout tests covering SVGMarkerElement.
106         Fix bug: SVGMarkerElement's SVG DOM function calls don't update rendering.
107         Fix orientAngle/orientType confusion: "auto" orient should always return "0" as angle.
108
109         Tests: svg/dynamic-updates/SVGMarkerElement-dom-markerHeight-attr.html
110                svg/dynamic-updates/SVGMarkerElement-dom-markerUnits-attr.html
111                svg/dynamic-updates/SVGMarkerElement-dom-markerWidth-attr.html
112                svg/dynamic-updates/SVGMarkerElement-dom-orient-attr.html
113                svg/dynamic-updates/SVGMarkerElement-dom-refX-attr.html
114                svg/dynamic-updates/SVGMarkerElement-dom-refY-attr.html
115                svg/dynamic-updates/SVGMarkerElement-svgdom-markerHeight-prop.html
116                svg/dynamic-updates/SVGMarkerElement-svgdom-markerUnits-prop.html
117                svg/dynamic-updates/SVGMarkerElement-svgdom-markerWidth-prop.html
118                svg/dynamic-updates/SVGMarkerElement-svgdom-orientAngle-prop.html
119                svg/dynamic-updates/SVGMarkerElement-svgdom-orientType-prop.html
120                svg/dynamic-updates/SVGMarkerElement-svgdom-refX-prop.html
121                svg/dynamic-updates/SVGMarkerElement-svgdom-refY-prop.html
122                svg/dynamic-updates/SVGMarkerElement-svgdom-setOrientToAngle-call.html
123                svg/dynamic-updates/SVGMarkerElement-svgdom-setOrientToAuto-call.html
124
125         * svg/SVGMarkerElement.cpp:
126         (WebCore::SVGMarkerElement::SVGMarkerElement):
127         (WebCore::SVGMarkerElement::parseMappedAttribute):
128         (WebCore::SVGMarkerElement::svgAttributeChanged):
129         (WebCore::SVGMarkerElement::childrenChanged):
130         (WebCore::SVGMarkerElement::setOrientToAuto):
131         (WebCore::SVGMarkerElement::setOrientToAngle):
132         (WebCore::SVGMarkerElement::canvasResource):
133
134 2008-08-12  Nikolas Zimmermann  <zimmermann@kde.org>
135
136         Reviewed by Oliver.
137
138         Add new dynamic-update layout tests covering SVGImageElement.
139         Fix bug: SVGImageElement doesn't react on 'preserveAspectRatio' changes.
140
141         Tests: svg/dynamic-updates/SVGImageElement-dom-height-attr.html
142                svg/dynamic-updates/SVGImageElement-dom-preserveAspectRatio-attr.html
143                svg/dynamic-updates/SVGImageElement-dom-width-attr.html
144                svg/dynamic-updates/SVGImageElement-dom-x-attr.html
145                svg/dynamic-updates/SVGImageElement-dom-y-attr.html
146                svg/dynamic-updates/SVGImageElement-svgdom-height-prop.html
147                svg/dynamic-updates/SVGImageElement-svgdom-preserveAspectRatio-prop.html
148                svg/dynamic-updates/SVGImageElement-svgdom-width-prop.html
149                svg/dynamic-updates/SVGImageElement-svgdom-x-prop.html
150                svg/dynamic-updates/SVGImageElement-svgdom-y-prop.html
151
152         * svg/SVGImageElement.cpp:
153         (WebCore::SVGImageElement::svgAttributeChanged):
154
155 2008-08-11  Anthony Ricaud  <rik24d@gmail.com>
156
157         Changed Option/Alt-Up or Down in CSS editing when the value is
158         near zero to jump to the next integer.
159
160         Reviewed by Tim Hatcher.
161
162         https://bugs.webkit.org/show_bug.cgi?id=20326
163
164         * page/inspector/StylesSidebarPane.js:
165
166 2008-08-11  Anthony Ricaud  <rik24d@gmail.com>
167
168         Changed the line highlight transition for an easier animation.
169
170         Reviewed by Tim Hatcher.
171
172         * page/inspector/SourceFrame.js:
173
174 2008-08-11  Keishi Hattori  <casey.hattori@gmail.com>
175
176         Added support for some Firebug Command Line APIs.
177
178         Reviewed by Tim Hatcher.
179
180         https://bugs.webkit.org/show_bug.cgi?id=19867
181         https://bugs.webkit.org/show_bug.cgi?id=19868
182         https://bugs.webkit.org/show_bug.cgi?id=19869
183         https://bugs.webkit.org/show_bug.cgi?id=19875
184         https://bugs.webkit.org/show_bug.cgi?id=19876
185         https://bugs.webkit.org/show_bug.cgi?id=19880
186
187         * page/inspector/Console.js:
188         (WebInspector.Console.prototype._evalInInspectedWindow):
189         Create an object on the inspected window that holds the console
190         command line API functions. This object is used in a with statement
191         around the typed expression.
192
193 2008-08-11  Nikolas Zimmermann  <zimmermann@kde.org>
194
195         Reviewed by Antti.
196
197         Fixes: http://bugs.webkit.org/show_bug.cgi?id=17736
198
199         JS wrapper objects around SVG POD types, that contain other SVG POD types with writable properties
200         failed to update. Modification of the values were completly ignored (ie. transform.matrix.a = 50, didn't take any effect)
201
202         Added tests: svg/custom/svg-modify-currentTranslate.html
203                      svg/custom/tearoffs-with-tearoffs.html
204                      svg/custom/immutable-properties.html
205
206         Fixed tests: svg/dynamic-updates/SVGLinearGradientElement-svgdom-gradientTransform-prop.html
207
208         * bindings/js/JSSVGPODTypeWrapper.h:
209         (WebCore::JSSVGDynamicPODTypeWrapper::commitChange):
210         (WebCore::JSSVGStaticPODTypeWrapperWithPODTypeParent::create):
211         (WebCore::JSSVGStaticPODTypeWrapperWithPODTypeParent::commitChange):
212         (WebCore::JSSVGStaticPODTypeWrapperWithPODTypeParent::JSSVGStaticPODTypeWrapperWithPODTypeParent):
213         (WebCore::JSSVGStaticPODTypeWrapperWithParent::create):
214         (WebCore::JSSVGStaticPODTypeWrapperWithParent::operator PODType):
215         (WebCore::JSSVGStaticPODTypeWrapperWithParent::commitChange):
216         (WebCore::JSSVGStaticPODTypeWrapperWithParent::JSSVGStaticPODTypeWrapperWithParent):
217         * bindings/scripts/CodeGenerator.pm:
218         * bindings/scripts/CodeGeneratorJS.pm:
219         * svg/SVGSVGElement.idl: Add [Immutable] markers to SVG POD attributes, that contain POD types with writable attributes.
220         * svg/SVGZoomEvent.idl:  SVG specification explicitely demands these attributes to be readonly, even its content.
221
222 2008-08-11  Brady Eidson  <beidson@apple.com>
223
224         Reviewed by John and Anders
225
226         Fix for <rdar://problem/6141797>
227
228         When WebArchives were entirely a WebKit concept, there was a guarantee that a WebResource
229         would never have nil data.
230
231         When they were pushed down into WebCore, that guarantee was lost, subtly changing a few
232         semantics with some WebKit applications.
233
234         The guarantee was a good one and should be restored.
235
236         Note that ApplicationCacheResource doesn't need any updates to follow this rule as it already
237         creates an empty data object in the case of null data for its own purposes.
238
239         * loader/SubstituteResource.h:
240         (WebCore::SubstituteResource::SubstituteResource): ASSERT that the data is not null.  This
241           well help any future subclassers not make this mistake.
242
243         * loader/archive/ArchiveResource.cpp:
244         (WebCore::ArchiveResource::create): Return 0 if the data is null.
245
246 2008-08-11  Simon Fraser  <simon.fraser@apple.com>
247
248         Reviewed by Dave Hyatt
249
250         https://bugs.webkit.org/show_bug.cgi?id=20328
251         Fix a problem when an 'all' transition transition with more than
252         one property changing is interrupted, and did some AnimationController
253         cleanup.
254
255         Test: transitions/interrupted-all-transition.html
256
257         * page/AnimationController.cpp:
258         (WebCore::ImplicitAnimation::ImplicitAnimation):
259         (WebCore::AnimationControllerPrivate::blendProperties):
260         (WebCore::CompositeAnimation::updateTransitions):
261         (WebCore::CompositeAnimation::cleanupFinishedAnimations):
262         (WebCore::CompositeAnimation::setTransitionStartTime):
263         (WebCore::CompositeAnimation::overrideImplicitAnimations):
264         (WebCore::CompositeAnimation::resumeOverriddenImplicitAnimations):
265         (WebCore::ImplicitAnimation::animate):
266         (WebCore::ImplicitAnimation::onAnimationEnd):
267         (WebCore::ImplicitAnimation::sendTransitionEvent):
268         (WebCore::ImplicitAnimation::affectsProperty):
269         (WebCore::KeyframeAnimation::endAnimation):
270         (WebCore::KeyframeAnimation::onAnimationEnd):
271
272 2008-08-11  Kevin McCullough  <kmccullough@apple.com>
273
274         Reviewed by Tim.
275
276         - Because console messages have group levels now, newly created messages
277         that do not specify the level lose their message since the number of
278         arguments is wrong.
279  
280         * page/inspector/Console.js:
281         * page/inspector/Resource.js:
282
283 2008-08-11  Alp Toker  <alp@nuanti.com>
284
285         Build fix. Add new files from r35666 (WebKitAnimationEvent). Also take
286         the opportunity to sort the sources lists.
287
288         * GNUmakefile.am:
289
290 2008-08-11  Timothy Hatcher  <timothy@apple.com>
291
292         Speed up the the JavaScript syntax highlighter by generating
293         the finders only once per script instead of per line.
294
295         https://bugs.webkit.org/show_bug.cgi?id=20346
296
297         Reviewed by Adam Roben.
298
299         * page/inspector/SourceFrame.js:
300         (WebInspector.SourceFrame.prototype._syntaxHighlightJavascriptLine):
301         Removed, factored into syntaxHighlightJavascript as an inline function.
302         (WebInspector.SourceFrame.prototype.syntaxHighlightJavascript):
303         Pulled in the _syntaxHighlightJavascriptLine so it will create a closure.
304         Generate the finders before iterating the lines.
305
306 2008-08-11  Adam Roben  <aroben@apple.com>
307
308         Windows build fix
309
310         * WebCore.vcproj/WebCore.vcproj: Added JSWebKitAnimationEvent.cpp and
311         JSWebKitTransitionEvent.cpp to the project. Let VS reformat the file,
312         too.
313
314 2008-08-11  Dan Bernstein  <mitz@apple.com>
315
316         Reviewed by Darin Adler.
317
318         - fix <rdar://problem/6131096> Reproducible crash in CounterNode::isReset under guard malloc
319
320         Test: fast/css/counters/invalidate-cached-counter-node.html
321
322         * rendering/RenderContainer.cpp:
323         (WebCore::RenderContainer::invalidateCounters): Added. Invalidates all
324         RenderCounters in :before and :after content.
325         * rendering/RenderContainer.h:
326         * rendering/RenderCounter.cpp:
327         (WebCore::RenderCounter::isCounter): Renamed isRenderCounter() to this
328         to match the RenderObject method.
329         (WebCore::RenderCounter::invalidate): Added. Resets the cached
330         CounterNode and invalidates the object's layout and preferred widths.
331         (WebCore::destroyCounterNodeChildren): Added a call to
332         invalidateCounters().
333         * rendering/RenderCounter.h:
334         * rendering/RenderObject.h:
335         (WebCore::RenderObject::invalidateCounters):
336
337 2008-08-11  Dean Jackson  <dino@apple.com>
338
339         Implement CSS Animation and Transition Events
340         https://bugs.webkit.org/show_bug.cgi?id=20337
341
342         Implement the events defined in the CSS Animations
343         and Transitions specifications so code can react
344         to animations and transitions.
345
346         Reviewed by Tim Hatcher and Dave Hyatt.
347
348         * DerivedSources.make:
349         * GNUmakefile.am:
350         * WebCore.pro:
351         * WebCore.vcproj/WebCore.vcproj:
352         * WebCore.xcodeproj/project.pbxproj:
353         * WebCoreSources.bkl:
354             Build configs for new files
355
356         * bindings/js/JSDOMWindowBase.cpp:
357         * bindings/js/JSDOMWindowBase.h:
358         * bindings/js/JSEventCustom.cpp:
359         * dom/Document.h:
360         * dom/Event.cpp:
361         * dom/Event.h:
362         * dom/EventTarget.cpp:
363         * dom/EventTargetNode.cpp:
364         * dom/EventTargetNode.h:
365         * html/HTMLElement.cpp:
366         * page/AnimationController.cpp:
367             do all the new event stuff
368             
369         * html/HTMLAttributeNames.in:
370             the onwebkitanimation* and onwebkittransitionend attrs
371
372         * dom/WebKitAnimationEvent.cpp: Added.
373         * dom/WebKitAnimationEvent.h: Added.
374         * dom/WebKitAnimationEvent.idl: Added.
375         * dom/WebKitTransitionEvent.cpp: Added.
376         * dom/WebKitTransitionEvent.h: Added.
377         * dom/WebKitTransitionEvent.idl: Added.
378             New files for the events
379
380         * manual-tests/transition-events.html: Added.
381             New testfile
382
383 2008-08-11  Adam Roben  <aroben@apple.com>
384
385         Add a ForwardingHeader for wtf/NotFound.h
386
387         Rubberstamped by Darin Adler.
388
389         * ForwardingHeaders/wtf/NotFound.h: Added.
390
391 2008-08-11  Timothy Hatcher  <timothy@apple.com>
392
393         Fixes a bug where error bubbles in JavaScript resources would
394         be clobbered by the syntax highlighter.
395
396         https://bugs.webkit.org/show_bug.cgi?id=20345
397
398         Reviewed by Adam Roben.
399
400         * manual-tests/inspector/resources/script-error.js: Added.
401         * manual-tests/inspector/styled-error-bubbles-in-scripts.html: Added.
402         * page/inspector/SourceFrame.js:
403         (WebInspector.SourceFrame.prototype._addMessageToSource):
404         Check the nodeType and not the nodeName, this is less fragile.
405         (WebInspector.SourceFrame.prototype._syntaxHighlightJavascriptLine):
406         Check if the lastChild is an error bubble, if so remove it before
407         getting the line's textContent. Add the error bubble back at the end.
408
409 == Rolled over to ChangeLog-2008-08-10 ==