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