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