2008-12-18 Dimitri Glazkov <dglazkov@chromium.org>
[WebKit-https.git] / WebCore / ChangeLog
1 2008-12-18  Dimitri Glazkov  <dglazkov@chromium.org>
2
3         Reviewed by Geoffrey Garen.
4
5         https://bugs.webkit.org/show_bug.cgi?id=22859
6         Abstract away the use of JSDOMWindow in CachedPage and introduce
7         ScriptCachedPageData abstraction.
8
9         * GNUmakefile.am: Added ScriptCachedPageData to project.
10         * WebCore.pro: Added ScriptCachedPageData to project.
11         * WebCore.vcproj/WebCore.vcproj: Added ScriptCachedPageData to project.
12         * WebCore.xcodeproj/project.pbxproj: Added ScriptCachedPageData to
13             project.
14         * bindings/js/ScriptCachedPageData.cpp: Added.
15         (WebCore::ScriptCachedPageData::ScriptCachedPageData):
16         (WebCore::ScriptCachedPageData::~ScriptCachedPageData):
17         (WebCore::ScriptCachedPageData::restore):
18         (WebCore::ScriptCachedPageData::clear):
19         * bindings/js/ScriptCachedPageData.h: Added.
20         * history/CachedPage.cpp: Replaced JSDOMWindow and ProtectedPtr with
21             ScriptCachedPageData.
22         (WebCore::CachedPage::CachedPage):
23         (WebCore::CachedPage::domWindow):
24         (WebCore::CachedPage::restore):
25         (WebCore::CachedPage::clear):
26         * history/CachedPage.h: Replaced JSDOMWindow and ProtectedPtr with
27             ScriptCachedPageData.
28
29 2008-12-18  Chris Marrin  <cmarrin@apple.com>
30
31         Reviewed by Dave Hyatt.
32
33         https://bugs.webkit.org/show_bug.cgi?id=22888
34
35         To avoid future dependency issues, all the TransformOperations and Animation related files need to be moved to platform
36
37         * WebCore.xcodeproj/project.pbxproj:
38         * platform/animation: Added.
39         * platform/animation/Animation.cpp: Copied from WebCore/rendering/style/Animation.cpp.
40         * platform/animation/Animation.h: Copied from WebCore/rendering/style/Animation.h.
41         * platform/animation/AnimationList.cpp: Copied from WebCore/rendering/style/AnimationList.cpp.
42         * platform/animation/AnimationList.h: Copied from WebCore/rendering/style/AnimationList.h.
43         * platform/animation/TimingFunction.h: Copied from WebCore/rendering/style/TimingFunction.h.
44         * platform/graphics/AffineTransform.cpp: Removed.
45         * platform/graphics/AffineTransform.h: Removed.
46         * platform/graphics/transforms: Added.
47         * platform/graphics/transforms/AffineTransform.cpp: Copied from WebCore/platform/graphics/AffineTransform.cpp.
48         * platform/graphics/transforms/AffineTransform.h: Copied from WebCore/platform/graphics/AffineTransform.h.
49         * platform/graphics/transforms/IdentityTransformOperation.h: Copied from WebCore/rendering/style/IdentityTransformOperation.h.
50         * platform/graphics/transforms/MatrixTransformOperation.cpp: Copied from WebCore/rendering/style/MatrixTransformOperation.cpp.
51         * platform/graphics/transforms/MatrixTransformOperation.h: Copied from WebCore/rendering/style/MatrixTransformOperation.h.
52         * platform/graphics/transforms/RotateTransformOperation.cpp: Copied from WebCore/rendering/style/RotateTransformOperation.cpp.
53         * platform/graphics/transforms/RotateTransformOperation.h: Copied from WebCore/rendering/style/RotateTransformOperation.h.
54         * platform/graphics/transforms/ScaleTransformOperation.cpp: Copied from WebCore/rendering/style/ScaleTransformOperation.cpp.
55         * platform/graphics/transforms/ScaleTransformOperation.h: Copied from WebCore/rendering/style/ScaleTransformOperation.h.
56         * platform/graphics/transforms/SkewTransformOperation.cpp: Copied from WebCore/rendering/style/SkewTransformOperation.cpp.
57         * platform/graphics/transforms/SkewTransformOperation.h: Copied from WebCore/rendering/style/SkewTransformOperation.h.
58         * platform/graphics/transforms/TransformOperation.h: Copied from WebCore/rendering/style/TransformOperation.h.
59         * platform/graphics/transforms/TransformOperations.cpp: Copied from WebCore/rendering/style/TransformOperations.cpp.
60         * platform/graphics/transforms/TransformOperations.h: Copied from WebCore/rendering/style/TransformOperations.h.
61         * platform/graphics/transforms/TranslateTransformOperation.cpp: Copied from WebCore/rendering/style/TranslateTransformOperation.cpp.
62         * platform/graphics/transforms/TranslateTransformOperation.h: Copied from WebCore/rendering/style/TranslateTransformOperation.h.
63         * rendering/style/Animation.cpp: Removed.
64         * rendering/style/Animation.h: Removed.
65         * rendering/style/AnimationList.cpp: Removed.
66         * rendering/style/AnimationList.h: Removed.
67         * rendering/style/IdentityTransformOperation.h: Removed.
68         * rendering/style/MatrixTransformOperation.cpp: Removed.
69         * rendering/style/MatrixTransformOperation.h: Removed.
70         * rendering/style/RotateTransformOperation.cpp: Removed.
71         * rendering/style/RotateTransformOperation.h: Removed.
72         * rendering/style/ScaleTransformOperation.cpp: Removed.
73         * rendering/style/ScaleTransformOperation.h: Removed.
74         * rendering/style/SkewTransformOperation.cpp: Removed.
75         * rendering/style/SkewTransformOperation.h: Removed.
76         * rendering/style/TimingFunction.h: Removed.
77         * rendering/style/TransformOperation.h: Removed.
78         * rendering/style/TransformOperations.cpp: Removed.
79         * rendering/style/TransformOperations.h: Removed.
80         * rendering/style/TranslateTransformOperation.cpp: Removed.
81         * rendering/style/TranslateTransformOperation.h: Removed.
82
83 2008-12-18  Cameron Zwarich  <zwarich@apple.com>
84
85         Reviewed by Geoff Garen.
86
87         Bug 21855: REGRESSION (r37323): Gmail complains about popup blocking when opening a link
88         <https://bugs.webkit.org/show_bug.cgi?id=21855>
89         <rdar://problem/6278244>
90
91         If JavaScript is not currently executing, the handleEvent member function
92         of JSAbstractEventListener should set the dynamic global object to the
93         global object of the context in which the event occurred.
94         
95         If this is not set, then JavaScriptCore will simply take the global object
96         of the context where the event handler function was created, which may be
97         a different frame. This will cause the popup blocker to incorrectly block
98         windows opened from onclick events inside of an iframe whose handler was
99         created in the outer frame, as it will check the outer frame and see that
100         it is not processing any events.
101
102         * bindings/js/JSEventListener.cpp:
103         (WebCore::JSAbstractEventListener::handleEvent):
104
105 2008-12-17  Simon Fraser  <simon.fraser@apple.com>
106
107         Reviewed by Dave Hyatt
108
109         https://bugs.webkit.org/show_bug.cgi?id=22570
110         
111         Add the ability to compute clip rects independently from
112         caching them on the RenderLayer. When painting reflections, use 
113         such temporarily computed clipRects, otherwise the layer may cache
114         clipRects which are invalid, since they have been computed with
115         a rootLayer that is not the one usually used to paint.
116         
117         Test: fast/reflections/reflection-overflow-hidden.html
118
119         * rendering/RenderLayer.cpp:
120         (WebCore::RenderLayer::paintLayer):
121         (WebCore::RenderLayer::hitTestLayer):
122         (WebCore::RenderLayer::updateClipRects):
123         (WebCore::RenderLayer::calculateClipRects):
124         (WebCore::RenderLayer::calculateRects):
125         * rendering/RenderLayer.h:
126         (WebCore::ClipRects::ClipRects):
127         (WebCore::ClipRects::reset):
128         (WebCore::ClipRects::overflowClipRect):
129         (WebCore::ClipRects::setOverflowClipRect):
130         (WebCore::ClipRects::fixedClipRect):
131         (WebCore::ClipRects::setFixedClipRect):
132         (WebCore::ClipRects::posClipRect):
133         (WebCore::ClipRects::setPosClipRect):
134         (WebCore::ClipRects::setFixed):
135         (WebCore::ClipRects::operator==):
136         (WebCore::ClipRects::operator=):
137         * rendering/RenderReplica.cpp:
138         (WebCore::RenderReplica::paint):
139
140 2008-12-17  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
141
142         Reviewed by Simon Hausmann.
143
144         https://bugs.webkit.org/show_bug.cgi?id=22618
145
146         Fix MinGW QtWebKit linking problems and also make the 
147         QtWebKit build system more robust.
148
149         * WebCore.pro:
150
151 2008-12-17  Nikolas Zimmermann  <nikolas.zimmermann@torchmobile.com>
152
153         Reviewed by Maciej Stachowiak.
154
155         Fixes: https://bugs.webkit.org/show_bug.cgi?id=22866
156
157         wml.css is based on an older copy of html4.css. Synchronize them.
158         Remove all entries, that are irrelevant for WML.
159
160         Fix <do> appearance: should behave like HTMLs <button>.
161
162         * css/wml.css:
163
164 2008-12-17  Yury Semikhatsky <yurys@google.com>
165
166         Reviewed by Timothy Hatcher.
167         Landed by Adam Barth.
168
169         Added more checks that WebInspector.panels.{resources,scripts} are
170         defined where they are accessed from other panels and WebInspector
171         (some panels are not yet supported in Chrome).
172
173         * inspector/front-end/Console.js:
174         (WebInspector.Console.prototype.addMessage):
175         (WebInspector.Console.prototype.clearMessages):
176         (WebInspector.Console.prototype.completions):
177         * inspector/front-end/ObjectPropertiesSection.js:
178         (WebInspector.ObjectPropertyTreeElement.prototype.evaluateExpression):
179         * inspector/front-end/ScriptsPanel.js:
180         (WebInspector.ScriptsPanel.prototype.get searchableViews):
181         (WebInspector.ScriptsPanel.prototype._sourceViewForScriptOrResource):
182         (WebInspector.ScriptsPanel.prototype._sourceFrameForScriptOrResource):
183         (WebInspector.ScriptsPanel.prototype._showScriptOrResource):
184         * inspector/front-end/SourceView.js:
185         (WebInspector.SourceView.prototype._addBreakpoint):
186         * inspector/front-end/inspector.js:
187         (WebInspector.addResource):
188         (WebInspector.removeResource):
189         (WebInspector.showResourceForURL):
190
191 2008-12-17  Cary Clark  < caryclark@google.com>
192
193         Reviewed by Darin Adler.
194         Landed by Adam Barth.
195
196         Add ENABLE_TEXT_CARET to permit the ANDROID platform
197         to invalidate and draw the caret in a separate thread.
198
199         * page/Frame.cpp:
200         (WebCore::Frame::clearCaretRectIfNeeded): Body of
201         function does nothing if text caret is disabled.
202         (WebCore::Frame::selectionLayoutChanged): Do nothing
203         if text caret is disabled and the caret only blinked.
204         (WebCore::Frame::caretBlinkTimerFired):
205         (WebCore::Frame::paintCaret):
206         (WebCore::Frame::paintDragCaret): Body of
207         functions does nothing if text caret is disabled.
208
209 2008-12-16  Darin Adler  <darin@apple.com>
210
211         Reviewed and landed by Cameron Zwarich.
212
213         Change the style of AtomicString::add() to match Identifier:add().
214
215         * platform/text/AtomicString.cpp:
216         (WebCore::AtomicString::add):
217
218 2008-12-16  Adele Peterson  <adele@apple.com>
219
220         Reviewed by Darin Adler.
221
222         Fix for https://bugs.webkit.org/show_bug.cgi?id=22827
223         <rdar://problem/6247724> RenderThemeWin buttons have weird heavy text
224
225         * rendering/RenderThemeWin.cpp:
226         (WebCore::fillFontDescription): Add version that takes a font size.
227         (WebCore::RenderThemeWin::systemFont): Use the default GUI font for control fonts, but specify the size.
228         This will match Firefox.
229
230 2008-12-16  Stephanie Lewis  <slewis@apple.com>
231
232         Another build fix.
233
234         * platform/text/AtomicString.h:
235         (WebCore::AtomicString::AtomicString):
236
237 2008-12-16  Stephanie Lewis  <slewis@apple.com>
238
239         Windows Build Fix.
240
241         * platform/text/AtomicString.h:
242         (WebCore::AtomicString::AtomicString):
243         (WebCore::AtomicString::createCFString):
244
245 2008-12-16  Peter Kasting  <pkasting@google.com>
246
247         Reviewed by David Hyatt.
248
249         https://bugs.webkit.org/show_bug.cgi?id=22885
250         Fix memory corruption in GIFImageDecoder.cpp with certain GIFs.
251
252         * platform/image-decoders/gif/GIFImageDecoder.cpp:
253         (WebCore::GIFImageDecoder::frameComplete):
254
255 2008-12-16  Stephanie Lewis  <slewis@apple.com>
256
257         Reviewed by Geoff Garen.
258
259         Change HTTPHeaderMap to use an AtomicString as its key.  
260         Shaves ~1MB off of the Mozilla Memory Test
261         No functionality difference    
262
263         * WebCore.xcodeproj/project.pbxproj:
264         * inspector/InspectorController.cpp:
265         (WebCore::addHeaders):
266         * loader/appcache/ApplicationCacheStorage.cpp:
267         (WebCore::parseHeader):
268         * platform/network/HTTPHeaderMap.h:
269         * platform/network/ResourceRequestBase.cpp:
270         (WebCore::ResourceRequestBase::httpHeaderField):
271         (WebCore::ResourceRequestBase::setHTTPHeaderField):
272         (WebCore::ResourceRequestBase::addHTTPHeaderField):
273         * platform/network/ResourceRequestBase.h:
274         * platform/network/ResourceResponseBase.cpp:
275         (WebCore::ResourceResponseBase::httpHeaderField):
276         (WebCore::ResourceResponseBase::setHTTPHeaderField):
277         * platform/network/ResourceResponseBase.h:
278         * platform/text/StringHash.h:
279         (WebCore::CaseFoldingHash::hash):
280         (WebCore::CaseFoldingHash::equal):
281         * xml/XMLHttpRequest.cpp:
282         (WebCore::isSetCookieHeader):
283         (WebCore::XMLHttpRequest::setRequestHeader):
284         (WebCore::XMLHttpRequest::setRequestHeaderInternal):
285         (WebCore::XMLHttpRequest::getRequestHeader):
286         (WebCore::XMLHttpRequest::getResponseHeader):
287         * xml/XMLHttpRequest.h:
288
289 2008-12-16  Nikolas Zimmermann  <nikolas.zimmermann@torchmobile.com>
290
291         Reviewed by Darin Adler.
292
293         Fixes: https://bugs.webkit.org/show_bug.cgi?id=22876
294
295         Remove legacy randomNumber() functionality from HTMLFormElement, and use the new wtf/RandomNumber.h.
296         Also remove an uneeded QFileInfo include while I'm at it - there is no Qt usage in this file.
297
298         * ForwardingHeaders/wtf/RandomNumber.h: Added.
299         * html/HTMLFormElement.cpp:
300         (WebCore::getUniqueBoundaryString):
301
302 2008-12-16 Yael Aharon <yael.aharon@nokia.com>
303
304         Reviewed by Tor Arne Vestbø.
305
306         Qt/Win build fix
307
308         * platform/win/SystemTimeWin.cpp:
309
310 2008-12-16  Kalle Vahlman  <kalle.vahlman@movial.com>
311
312         Reviewed by Holger Freyther.
313
314         [CURL] memory leak of ResouceHandles
315         http://bugs.webkit.org/show_bug.cgi?id=20777
316
317         Fix ResourceHandle ref management to be consistent and correct.
318         Original patch from Marco Barisione.
319
320         * platform/network/curl/ResourceHandleCurl.cpp:
321         (WebCore::ResourceHandle::start):
322         * platform/network/curl/ResourceHandleManager.cpp:
323         (WebCore::ResourceHandleManager::removeFromCurl):
324         (WebCore::ResourceHandleManager::add):
325         (WebCore::ResourceHandleManager::removeScheduledJob):
326
327 2008-12-16  Simon Hausmann  <simon.hausmann@nokia.com>
328
329         Fix the Qt build.
330
331         * platform/graphics/qt/ImageSourceQt.cpp:
332         (WebCore::ImageSource::clear): Adjust to new signature.
333
334 2008-12-15  Mark Rowe  <mrowe@apple.com>
335
336         Rubber-stamped by Cameron Zwarich.
337
338         <rdar://problem/6289933> Change WebKit-related projects to build with GCC 4.2 on Leopard.
339
340         * Configurations/Base.xcconfig:
341         * Configurations/DebugRelease.xcconfig:
342
343 2008-12-15  Adele Peterson  <adele@apple.com>
344
345         Reviewed by Darin Adler.
346
347         Fix for https://bugs.webkit.org/show_bug.cgi?id=22871
348         <rdar://problem/6417316> RenderThemeWin buttons are too short/thin
349
350         * rendering/RenderButton.cpp: (WebCore::RenderButton::setupInnerStyle): 
351         Check if the button's style (not the new inner style) has appearance set to determine whether we should set padding on the inner style.
352
353 2008-12-15  Nikolas Zimmermann  <nikolas.zimmermann@torchmobile.com>
354
355         Reviewed by Oliver Hunt.
356
357         Fixes: https://bugs.webkit.org/show_bug.cgi?id=22865
358
359         Add complete WML <table> / <tr> / <td> element support.
360         Proper handling of all table related attributes, including tests.
361
362         Tests: fast/wml/table-element-align-attribute-invalid.wml (variable reference in 'align' attribute, raises error)
363                fast/wml/table-element-columns-attribute-invalid-number.wml (columns='0', raises error)
364                fast/wml/table-element-columns-attribute-invalid.wml (non-numeric 'columns' attribute value, raises error)
365                fast/wml/table-element-columns-attribute-missing.wml (missing 'columns')
366                fast/wml/table-element-columns-attribute.wml (test 'columns' attribute and <td> count mismatches)
367
368         * GNUmakefile.am:
369         * WebCore.pro:
370         * WebCore.vcproj/WebCore.vcproj:
371         * WebCore.xcodeproj/project.pbxproj:
372         * rendering/RenderObject.cpp:
373         (WebCore::RenderObject::offsetParent):
374         * rendering/RenderTableRow.cpp:
375         (WebCore::RenderTableRow::addChild):
376         * wml/WMLTableElement.cpp: Added.
377         (WebCore::WMLTableElement::WMLTableElement):
378         (WebCore::WMLTableElement::~WMLTableElement):
379         (WebCore::WMLTableElement::mapToEntry):
380         (WebCore::WMLTableElement::parseMappedAttribute):
381         (WebCore::WMLTableElement::finishParsingChildren):
382         * wml/WMLTableElement.h: Added.
383         * wml/WMLTagNames.in:
384
385 2008-12-15  Darin Adler  <darin@apple.com>
386
387         Reviewed by Sam Weinig.
388
389         - fix <rdar://problem/6427048> crash due to infinite recursion after setting window.__proto__ = window
390
391         Test: fast/dom/Window/window-custom-prototype.html
392
393         Replaced toGlobalObject with the more generally useful unwrappedObject.
394
395         * bindings/js/JSDOMWindowShell.cpp:
396         (WebCore::JSDOMWindowShell::unwrappedObject): Added.
397         * bindings/js/JSDOMWindowShell.h: Declared unwrappedObject.
398         * bindings/js/JSQuarantinedObjectWrapper.h:
399         (WebCore::JSQuarantinedObjectWrapper::unwrappedObject): Ditto.
400
401 2008-12-15  Gustavo Noronha Silva  <kov@kov.eti.br>
402
403         Reviewed by Mark Rowe.
404
405         https://bugs.webkit.org/show_bug.cgi?id=22686
406
407         GTK+ build fix.
408
409         * GNUmakefile.am:
410
411 2008-12-15  Sam Weinig  <sam@webkit.org>
412
413         Reviewed by Darin Adler.
414
415         Fix for https://bugs.webkit.org/show_bug.cgi?id=22847
416         Geolocation PositionOptions cannot be an arbitrary object.
417
418         Allow the PositionOptions to be a vanilla JS object and parse it
419         appropriately.
420
421         * DerivedSources.make: Remove PositionOptions.
422         * GNUmakefile.am: Ditto.
423         * WebCore.pro: Ditto.
424         * WebCore.vcproj/WebCore.vcproj: Ditto.
425         * WebCore.xcodeproj/project.pbxproj: Ditto.
426         * WebCoreSources.bkl: Ditto.
427
428         * bindings/js/JSGeolocationCustom.cpp:
429         (WebCore::createPositionOptions): Added. Extracts the enableHighAccuracy
430         and timeout fields from a vanilla JS object in order to create the 
431         PositionOptions object, checking for exceptions as necessary.
432         (WebCore::JSGeolocation::getCurrentPosition): Use createPositionOptions
433         instead of toPositionOptions.
434         (WebCore::JSGeolocation::watchPosition): Ditto.
435         * page/PositionOptions.idl: Removed
436
437 2008-12-15  Peter Kasting  <pkasting@google.com>
438
439         Reviewed by David Hyatt.
440
441         https://bugs.webkit.org/show_bug.cgi?id=22108
442         Large animated GIFs weren't always animating.  The code that deleted
443         the entire decoder after each frame of a large image was resulting in
444         us forgetting the loop count, breaking animations intermittently.
445
446         Instead of throwing the whole decoder away, we're more careful to just
447         delete frames we don't care about.  This additionally addresses
448         problems in the Cairo and Chromium ports with excessive peak memory
449         use and CPU use when decoding large animated GIFs because it leads to
450         much less redecoding (O(n) instead of O(n^2) CPU, and O(1) instead of
451         O(n) memory).
452
453         This change has less impact on the CG decoder, which seems to throw
454         away frames automatically when their external references are dropped;
455         this means the CG decoder didn't suffer from the peak memory usage
456         issue before (and still doesn't), but it also still burns excessive
457         CPU redecoding earlier frames, that in theory it wouldn't need to
458         redecode if it would judiciously save the most recent frames.  At
459         least this patch plumbs some useful info to the ImageSource so it can
460         help guide the CG decoder heuristics in the future.
461
462         * platform/graphics/BitmapImage.cpp:
463         (WebCore::frameBytes):
464         (WebCore::BitmapImage::destroyDecodedData):
465         (WebCore::BitmapImage::destroyDecodedDataIfNecessary):
466         (WebCore::BitmapImage::destroyMetadataAndNotify):
467         (WebCore::BitmapImage::clearFrame):
468         (WebCore::BitmapImage::cacheFrame):
469         (WebCore::BitmapImage::dataChanged):
470         (WebCore::BitmapImage::startAnimation):
471         (WebCore::BitmapImage::resetAnimation):
472         (WebCore::BitmapImage::internalAdvanceAnimation):
473         * platform/graphics/BitmapImage.h:
474         * platform/graphics/GeneratedImage.h:
475         (WebCore::GeneratedImage::destroyDecodedData):
476         * platform/graphics/Image.h:
477         * platform/graphics/ImageSource.h:
478         * platform/graphics/cairo/ImageSourceCairo.cpp:
479         (WebCore::ImageSource::~ImageSource):
480         (WebCore::ImageSource::clear):
481         * platform/graphics/cg/ImageSourceCG.cpp:
482         (WebCore::ImageSource::~ImageSource):
483         (WebCore::ImageSource::clear):
484         * platform/graphics/cg/PDFDocumentImage.h:
485         (WebCore::PDFDocumentImage::destroyDecodedData):
486         * platform/graphics/qt/StillImageQt.h:
487         (WebCore::StillImage::destroyDecodedData):
488         * platform/image-decoders/ImageDecoder.h:
489         (WebCore::RGBA32Buffer::clear):
490         (WebCore::ImageDecoder::clearFrameBufferCache):
491         * platform/image-decoders/gif/GIFImageDecoder.cpp:
492         (WebCore::GIFImageDecoder::repetitionCount):
493         (WebCore::GIFImageDecoder::clearFrameBufferCache):
494         (WebCore::GIFImageDecoder::initFrameBuffer):
495         * platform/image-decoders/gif/GIFImageDecoder.h:
496         * platform/image-decoders/gif/GIFImageReader.h:
497         (GIFImageReader::GIFImageReader):
498         * svg/graphics/SVGImage.h:
499         (WebCore::SVGImage::destroyDecodedData):
500
501 2008-12-15  Cameron Zwarich  <zwarich@apple.com>
502
503         Reviewed by Darin Adler.
504
505         Bug 22562: REGRESSION (r37971): events not firing after going back in back/forward cache
506         <https://bugs.webkit.org/show_bug.cgi?id=22562>
507         <rdar://problem/6414593>
508
509         Restore the Frame's DOMWindow to its previous value when going back in
510         the back/forward cache. The fact that it was not getting set before may
511         have always caused some subtle bugs with the back/forward cache, but
512         after r37971, it causes no events to fire after restoring a page.
513
514         Previously, ScriptController::clearScriptObjects() was calling
515         clearPlatformScriptObjects(), which was not actually clearing any
516         objects, only updating them to reflect some change in state. Since the
517         window shell was not updated until after the call to clearScriptObjects(),
518         this didn't actually make that much sense.
519
520         We rename clearPlatformScriptObjects() to reflect its actual purpose and
521         call it after the window shell has been updated rather than before.
522
523         Unfortunately, there is no way to test this with a layout test because
524         it involves the back/forward cache.
525
526         * bindings/js/ScriptController.cpp:
527         (WebCore::ScriptController::updatePlatformScriptObjects): Renamed from
528         clearPlatformScriptObjects(), because the only nonempty implementation
529         doesn't actually clear any objects, it updates them. Also made public.
530         (WebCore::ScriptController::clearScriptObjects): Remove the call to
531         clearPlatformScriptObjects().
532         * bindings/js/ScriptController.h:
533         * bindings/js/ScriptControllerMac.mm:
534         (WebCore::ScriptController::updatePlatformScriptObjects):
535         * history/CachedPage.cpp:
536         (WebCore::CachedPage::domWindow): Added.
537         * history/CachedPage.h:
538         * loader/FrameLoader.cpp:
539         (WebCore::FrameLoader::cancelAndClear): Added call to updatePlatformScriptObjects().
540         (WebCore::FrameLoader::begin): Added call to updatePlatformScriptObjects().
541         (WebCore::FrameLoader::open): Added call to updatePlatformScriptObjects().
542         * page/Frame.cpp:
543         (WebCore::Frame::setDOMWindow): Added.
544         (WebCore::Frame::pageDestroyed): Added call to updatePlatformScriptObjects().
545         * page/Frame.h:
546
547 2008-12-15  Antti Koivisto  <antti@apple.com>
548
549         Reviewed by Darin Adler.
550
551         When a resource is cached locally, WebKit should follow RFC 2616 "Specific end-to-end revalidation" instead of "Unspecified end-to-end revalidation"
552         https://bugs.webkit.org/show_bug.cgi?id=17998 
553         
554         - Enable conditional revalidation for reloads by default. 
555         - Add a parameter to FrameLoader::reload() for forcing end-to-end reload.
556         - To avoid duplicating state remove m_cachePolicy variables from FrameLoader and DocLoader. 
557           Instead synthezise the policy on demand.
558         
559         This speeds up reloads and makes them use way less bandwidth.
560
561         * WebCore.base.exp:
562         * loader/CachePolicy.h: Rename CachePolicyRefresh to CachePolicyRevalidate.
563         (WebCore::):
564         * loader/DocLoader.cpp:
565         (WebCore::DocLoader::DocLoader):
566         (WebCore::DocLoader::checkForReload): Support CachePolicyRevalidate.
567         (WebCore::DocLoader::requestResource):
568         (WebCore::DocLoader::cachePolicy):
569         * loader/DocLoader.h: Get rid of m_cachePolicy member. 
570         * loader/FrameLoader.cpp:
571         (WebCore::ScheduledRedirection::ScheduledRedirection): 
572             Add parameter to differentiate refresh from other types of redirects. 
573             m_cachePolicy was used for signaling this before.
574         (WebCore::isBackForwardLoadType):
575         (WebCore::FrameLoader::FrameLoader):
576         (WebCore::FrameLoader::changeLocation):
577         (WebCore::FrameLoader::stopLoading):
578         (WebCore::FrameLoader::receivedFirstData):
579         (WebCore::FrameLoader::write):
580         (WebCore::FrameLoader::startIconLoader):
581         (WebCore::FrameLoader::restoreDocumentState):
582         (WebCore::FrameLoader::scheduleHTTPRedirection):
583         (WebCore::FrameLoader::scheduleLocationChange):
584         (WebCore::FrameLoader::scheduleRefresh):
585         (WebCore::FrameLoader::redirectionTimerFired):
586         (WebCore::FrameLoader::canCachePage):
587         (WebCore::FrameLoader::loadURL):
588         (WebCore::FrameLoader::reload): 
589             Differentiate between revalidation and reload.
590             No need to use setHTTPHeaderField here, addExtraFieldsToRequest will set the headers.
591         (WebCore::FrameLoader::transitionToCommitted):
592         (WebCore::FrameLoader::cachePolicy): Determine the cache policy based on current load type. 
593         (WebCore::FrameLoader::checkLoadCompleteForThisFrame):
594         (WebCore::FrameLoader::addExtraFieldsToRequest): Set Cache-control: no-cache for FrameLoadTypeReloadFromOrigin
595         (WebCore::FrameLoader::shouldScrollToAnchor):
596         (WebCore::FrameLoader::loadItem):
597         (WebCore::FrameLoader::updateHistoryForReload):
598         (WebCore::FrameLoader::updateHistoryForCommit):
599         (WebCore::FrameLoader::switchOutLowBandwidthDisplayIfReady):
600         * loader/FrameLoader.h:
601         * loader/FrameLoaderTypes.h: Add FrameLoadTypeReloadFromOrigin
602         (WebCore::):
603         * loader/NavigationAction.cpp: 
604         (WebCore::navigationType):  Support FrameLoadTypeReloadFromOrigin
605         * loader/loader.cpp:
606         (WebCore::Loader::Host::servePendingRequests):
607
608 2008-12-15  Holger Hans Peter Freyther  <zecke@selfish.org>
609
610         Reviewed by Simon Hausmann.
611
612         Add null checks to PlatformScreenQt
613
614         The other ports do the null checks and JSDOMWindowBase is
615         at least one caller that is passing 0.
616
617         * platform/qt/PlatformScreenQt.cpp:
618         (WebCore::screenDepth):
619         (WebCore::screenDepthPerComponent):
620         (WebCore::screenIsMonochrome):
621         (WebCore::screenRect):
622         (WebCore::screenAvailableRect):
623
624 2008-12-15  Alexey Proskuryakov  <ap@webkit.org>
625
626         Reviewed by Oliver Hunt.
627
628         <rdar://problem/6444455> Worker Thread crash running multiple workers for a moderate amount of time
629
630         * dom/WorkerThread.cpp: (WebCore::WorkerThread::workerThread):
631         Detach the thread. Without this, one page of its stack was never unmmaped, and fragmentation
632         made RegisterFile allocaiton fail after a while.
633
634 2008-12-13  Darin Adler  <darin@apple.com>
635
636         Reviewed by Sam Weinig.
637
638         - half of https://bugs.webkit.org/show_bug.cgi?id=17425
639           eliminate DeprecatedPtrList
640
641         * dom/Document.cpp:
642         (WebCore::Document::removeImage): Change to set slots in the vector
643         to 0 rather than removing items from a list.
644         (WebCore::Document::dispatchImageLoadEventsNow): Rewrite to process
645         the list. Since we now use a "set to zero" design, we don't need to
646         be careful about where the iterator points while iterating the list,
647         instead we just have to skip zeros.
648
649         * dom/Document.h: Use Vector instead of DeprecatedPtrList.
650
651         * dom/EventTargetNode.cpp:
652         (WebCore::EventTargetNode::dispatchGenericEvent): Use a Vector instead
653         of a DeprecatedPtrList for the list of nodes to handle. Also streamlined
654         the logic a bit and used goto in a couple key places.
655
656         * dom/Node.cpp:
657         (WebCore::Node::eventParentNode): Moved this function into this file
658         because it's a virtual function so already can't be inlined. Also updated
659         to return a ContainerNode, so it needs to be in a place where the
660         definition of ContainerNode is visible, not the header file.
661
662         * dom/Node.h: Changed return type of eventParentNode to ContainerNode
663         and moved its definition into the cpp file.
664
665         * dom/XMLTokenizerLibxml2.cpp:
666         (WebCore::PendingCallbacks::~PendingCallbacks): Added a call to
667         deleteAllValues here instead of setAutoDelete in the constructor, since
668         we're using Deque instead of DeprecatedPtrList.
669         (WebCore::PendingCallbacks::callAndRemoveFirstCallback): Changed the
670         code to use an OwnPtr since the deque won't delete the callback object.
671
672         * editing/ApplyStyleCommand.cpp:
673         (WebCore::ApplyStyleCommand::applyRelativeFontStyleChange): Use a
674         Vector instead of a DeprecatedPtrList.
675
676         * svg/SVGElement.cpp:
677         (WebCore::SVGElement::eventParentNode): Moved this function into this file
678         because it's a virtual function so already can't be inlined. Also updated
679         to return a ContainerNode.
680
681         * svg/SVGElement.h: Changed setShadowParentNode to take a ContainerNode*,
682         made eventParentNode return a ContainerNode*, and made m_shadowParent a
683         ContainerNode*.
684
685 2008-12-14  Nikolas Zimmermann  <nikolas.zimmermann@torchmobile.com>
686
687         Reviewed by George Staikos.
688
689         Fixes: https://bugs.webkit.org/show_bug.cgi?id=22857
690
691         Jumps within a WML deck using <go> task elements fail. Manual reloading
692         is necessary to display the page - fix cache-policy in WMLGoElement::executeTask
693         to prevent the problem.
694
695         Refactor setActiveCardInDocument in two new functions: findNamedCardInDocument
696         and determineActiveCard, to fix a side-effect of executing a <go> task:
697         when switching cards within a deck the active card was changed before the load
698         was fired which resulted in a flash effect on the screen, and doing unnecessary work.
699
700         Test: wml/go-task-animation.html
701
702         * wml/WMLCardElement.cpp:
703         (WebCore::WMLCardElement::findNamedCardInDocument):
704         (WebCore::WMLCardElement::determineActiveCard):
705         * wml/WMLCardElement.h:
706         * wml/WMLDocument.cpp:
707         (WebCore::WMLDocument::finishedParsing):
708         * wml/WMLGoElement.cpp:
709         (WebCore::WMLGoElement::executeTask):
710         (WebCore::WMLGoElement::prepareGETRequest):
711         * wml/WMLGoElement.h:
712
713 2008-12-14  Dirk Schulze  <krit@webkit.org>
714
715         Reviewed by Oliver Hunt.
716
717         Fixes an issue in cairo. A fully transparent color can cause wrong
718         drawings on canvas' composite.
719
720         https://bugs.webkit.org/show_bug.cgi?id=22846
721         [CAIRO] Canvas: transparent color and composite
722
723         Test: fast/canvas/canvas-transparency-and-composite.html
724
725         * platform/graphics/cairo/GraphicsContextCairo.cpp:
726         (WebCore::GraphicsContext::fillPath):
727         (WebCore::GraphicsContext::strokePath):
728
729 2008-12-13  Julien Chaffraix  <jchaffraix@webkit.org>
730
731         Reviewed by Darin Adler.
732
733         Bug 22665: Remove setCreatedByParser(bool) from the few elements that use it
734         https://bugs.webkit.org/show_bug.cgi?id=22665
735
736         Remove setCreatedByParser from frame and iframe.
737
738         * html/HTMLElementFactory.cpp:
739         (WebCore::frameConstructor):
740         (WebCore::iframeConstructor):
741         (WebCore::objectConstructor):
742         * html/HTMLFrameElement.cpp:
743         (WebCore::HTMLFrameElement::HTMLFrameElement):
744         * html/HTMLFrameElement.h:
745         * html/HTMLFrameElementBase.cpp:
746         (WebCore::HTMLFrameElementBase::HTMLFrameElementBase):
747         * html/HTMLFrameElementBase.h:
748         * html/HTMLFrameOwnerElement.cpp:
749         (WebCore::HTMLFrameOwnerElement::HTMLFrameOwnerElement):
750         * html/HTMLFrameOwnerElement.h:
751         (WebCore::HTMLFrameOwnerElement::createdByParser):
752         * html/HTMLIFrameElement.cpp:
753         (WebCore::HTMLIFrameElement::HTMLIFrameElement):
754         * html/HTMLIFrameElement.h:
755         * html/HTMLPlugInElement.cpp:
756         (WebCore::HTMLPlugInElement::HTMLPlugInElement):
757         * html/HTMLTagNames.in:
758
759 2008-12-13  Alexey Proskuryakov  <ap@webkit.org>
760
761         Reviewed by Darin Adler.
762
763         https://bugs.webkit.org/show_bug.cgi?id=22843
764         Auto-generate JSWorkerContext
765
766         * bindings/scripts/CodeGeneratorJS.pm:
767         * dom/WorkerContext.idl: Added.
768         * page/DOMWindow.idl:
769         Added ExtendsDOMGlobalObject, a new attribute for behaviors common to DOMWindow and
770         WorkerContext.
771
772         * bindings/js/WorkerScriptController.cpp:
773         (WebCore::WorkerScriptController::initScript):
774         Made JSWorkerContext creation look more like JSDOMWindow creation, to work with generated code.
775
776         * DerivedSources.make:
777         * GNUmakefile.am:
778         * WebCore.pro:
779         * WebCore.scons:
780         * WebCore.vcproj/WebCore.vcproj:
781         * WebCore.xcodeproj/project.pbxproj:
782         * bindings/js/JSWorkerContext.cpp: Removed.
783         * bindings/js/JSWorkerContext.h: Removed.
784         * bindings/js/JSWorkerContextBase.cpp: Copied from WebCore/bindings/js/JSWorkerContext.cpp.
785         (WebCore::JSWorkerContextBase::JSWorkerContextBase):
786         (WebCore::JSWorkerContextBase::~JSWorkerContextBase):
787         (WebCore::JSWorkerContextBase::scriptExecutionContext):
788         (WebCore::getJSWorkerContextBaseTable):
789         (WebCore::):
790         (WebCore::JSWorkerContextBase::put):
791         * bindings/js/JSWorkerContextBase.h: Copied from WebCore/bindings/js/JSWorkerContext.h.
792         * bindings/js/JSWorkerContextCustom.cpp: Added.
793         (WebCore::JSWorkerContext::customGetOwnPropertySlot):
794         (WebCore::JSWorkerContext::mark):
795         (WebCore::JSWorkerContext::self):
796         (WebCore::JSWorkerContext::setSelf):
797         (WebCore::JSWorkerContext::addEventListener):
798         (WebCore::JSWorkerContext::removeEventListener):
799         Moved code around. Note that currently, JSWorkerContextBase lookup table is empty, but we'll
800         need to add some global objects to it in the future, as it is done in JSDOMWindowBase.
801
802         * page/WorkerNavigator.cpp:
803         * page/WorkerNavigator.h:
804         Added ENABLE(WORKERS) ifdefs.
805
806 2008-12-13  Darin Adler  <darin@apple.com>
807
808         - fix Release build
809
810         * dom/Node.cpp:
811         (WebCore::Node::rareData): Remove inappropriate inline directive.
812
813 2008-12-13  Darin Adler  <darin@apple.com>
814
815         Reviewed by Dan Bernstein.
816
817         - fix https://bugs.webkit.org/show_bug.cgi?id=18734
818           REGRESSION (r31081): Focus problems in Gmail 2/Plain text message text
819           <rdar://problem/5892415>
820
821         Test: fast/forms/textarea-selection-preservation.html
822
823         The regression reported was caused by the fact that the renderer code had
824         a bug where it would constantly think the newline at the end of text was
825         missing, and so it would replace all the text even though it wasn't changing,
826         which would destroy the selection.
827
828         When writing the regression test I discovered another problem: The value
829         property in HTMLTextAreaElement was intentionally changing the selection
830         to the end of the textarea, but doing that even when the value wasn't changing.
831
832         This patch fixes both and the test checks both.
833
834         * html/HTMLTextAreaElement.cpp:
835         (WebCore::HTMLTextAreaElement::setValue): Exit early if the value is
836         not changing.
837
838         * rendering/RenderTextControl.cpp:
839         (WebCore::RenderTextControl::text): Add a newline character for each <br>
840         element encountered in the control
841
842 2008-12-13  Darin Adler  <darin@apple.com>
843
844         - file deletion part of https://bugs.webkit.org/show_bug.cgi?id=17497
845           eliminate DeprecatedValueList
846
847         * GNUmakefile.am: Removed references to deleted files.
848         * WebCore.pro: Ditto.
849         * WebCore.scons: Ditto.
850         * WebCore.vcproj/WebCore.vcproj: Ditto.
851         * WebCore.xcodeproj/project.pbxproj: Ditto.
852         * WebCoreSources.bkl: Ditto.
853
854         * platform/DeprecatedPtrQueue.h: Removed.
855         * platform/DeprecatedValueList.h: Removed.
856         * platform/DeprecatedValueListImpl.cpp: Removed.
857         * platform/DeprecatedValueListImpl.h: Removed.
858
859 2008-12-13  Darin Adler  <darin@apple.com>
860
861         Reviewed by Anders Carlsson.
862
863         - https://bugs.webkit.org/show_bug.cgi?id=17497
864           eliminate DeprecatedValueList
865
866         * css/CSSStyleDeclaration.cpp: Removed unneeded include.
867
868         * dom/Document.cpp:
869         (WebCore::Document::removeAllEventListenersFromAllNodes):
870         Set the removed flag on the window event listeners in case we
871         are in the middle of dispatching events on this window.
872         (WebCore::Document::clear): Ditto.
873         (WebCore::Document::handleWindowEvent): Changed to use a vector
874         instead of a DeprecatedPtrList.
875         (WebCore::Document::windowInlineEventListenerForType): Ditto.
876         (WebCore::Document::removeWindowInlineEventListenerForType): Ditto.
877         Also added a call to setRemoved, which is needed here just as in
878         other functions that remove.
879         (WebCore::Document::removeWindowEventListener): Ditto.
880         (WebCore::Document::hasWindowEventListener): Ditto.
881
882         * dom/Document.h: Changed RegisteredEventListenerList to
883         RegisteredEventListeners.
884
885         * dom/Element.cpp:
886         (WebCore::Element::attach): Use a function to access rare data instead
887         of getting directly at the data field.
888         (WebCore::Element::focus): Ditto.
889         (WebCore::Element::cancelFocusAppearanceUpdate): Ditto.
890
891         * dom/ElementRareData.h: Use "using" to make things that are protected
892         in NodeRareData be public here.
893
894         * dom/EventTarget.h: Removed include of DeprecatedValueList and
895         related declearations that weren't needed. Tweaked the definitions
896         of the forbidEventDispatch functions too.
897
898         * dom/EventTargetNode.cpp:
899         (WebCore::EventTargetNode::EventTargetNode): Eliminated code that
900         was used to initialized m_regdListeners.
901         (WebCore::EventTargetNode::~EventTargetNode): Elminated delete of
902         m_regdListeners. Changed code to use eventListeners() instead of
903         m_regdListeners.
904         (WebCore::EventTargetNode::eventListeners): Added.
905         (WebCore::EventTargetNode::insertedIntoDocument): Use eventListeners.
906         (WebCore::EventTargetNode::removedFromDocument): Ditto.
907         (WebCore::EventTargetNode::willMoveToNewOwnerDocument): Ditto.
908         (WebCore::EventTargetNode::didMoveToNewOwnerDocument): Ditto.
909         (WebCore::EventTargetNode::addEventListener): Ditto.
910         (WebCore::EventTargetNode::removeEventListener): Ditto.
911         (WebCore::EventTargetNode::removeAllEventListeners): Ditto.
912         Also added code to call setRemoved on all the listeners.
913         (WebCore::EventTargetNode::handleLocalEvents): Ditto.
914         (WebCore::EventTargetNode::dispatchGenericEvent): Fixed indentation.
915         (WebCore::EventTargetNode::removeInlineEventListenerForType): Use
916         the new event listeners vector. Also added missing call to setRemoved.
917         (WebCore::EventTargetNode::inlineEventListenerForType): Ditto.
918
919         * dom/EventTargetNode.h: Added a new RegisteredEventListenerVector
920         type and replaced the old localEventListeners function with a new
921         eventListeners function. Removed m_regdListeners.
922
923         * dom/Node.cpp:
924         (WebCore::Node::childNodes): Removed unneeded std prefix.
925         (WebCore::Node::setFocus): Use function instead of going directly
926         at rare data.
927         (WebCore::Node::rareDataFocused): Ditto.
928         (WebCore::Node::registerDynamicNodeList): Removed unneeded std prefix.
929         (WebCore::Node::getElementsByName): Ditto.
930         (WebCore::Node::getElementsByClassName): Ditto.
931         (WebCore::Node::compareDocumentPosition): Ditto.
932
933         * dom/Node.h: Removed unneeded forward declaration of
934         RegisteredEventListener. This is now in EventTargetNode.
935
936         * dom/NodeRareData.h: Renamed m_focused to m_isFocused and made it
937         private. Made m_needsFocusAppearanceUpdateSoonAfterAttach private.
938         Added listeners and ensureListeners functions as well as isFocused,
939         setFocused, and focus-appearance functions. Made all data members private.
940
941         * dom/RegisteredEventListener.cpp: Removed operator ==.
942         * dom/RegisteredEventListener.h: Removed operator == and !=.
943
944         * svg/SVGElement.cpp:
945         (WebCore::hasLoadListener): Rewrote to work with the vector.
946         * svg/SVGUseElement.cpp:
947         (WebCore::SVGUseElement::transferEventListenersToShadowTree): Ditto.
948
949 2008-12-13  Holger Hans Peter Freyther  <zecke@selfish.org>
950
951         Reviewed by Dan Bernstein.
952
953         https://bugs.webkit.org/show_bug.cgi?id=22824
954
955         Change ENABLE(FONT_FAST_PATH) to USE(FONT_FAST_PATH). With r39206
956         floatWidth always used the complex path causing a regression
957         in the pixel tests.
958
959         * platform/graphics/Font.cpp:
960         (WebCore::Font::floatWidth): Use the fast path again
961
962 2008-12-13  Dirk Schulze  <krit@webkit.org>
963
964         Reviewed by Darin Adler.
965
966         Fixes behavior of gradients on empty path in canvas/Cg
967
968         https://bugs.webkit.org/show_bug.cgi?id=22844
969         [Cg] Canvas fill() draws gradients even without a path
970
971         Test: fast/canvas/canvas-gradient-without-path.html
972
973         * html/CanvasRenderingContext2D.cpp:
974         (WebCore::CanvasRenderingContext2D::fill):
975         (WebCore::CanvasRenderingContext2D::stroke):
976
977 2008-12-13  Kevin Ollivier  <kevino@theolliviers.com>
978
979         wx build fix.
980
981         * platform/graphics/wx/ImageSourceWx.cpp:
982         (WebCore::ImageSource::filenameExtension):
983
984 2008-12-12  Brent Fulgham  <bfulgham@gmail.com>
985
986         Reviewed by Oliver Hunt.
987
988         Fixes: https://bugs.webkit.org/show_bug.cgi?id=22805
989
990         Provides implementation of image dragging logic for Windows Cairo
991         back-end.
992
993         * platform/win/DragImageCGWin.cpp:
994         (WebCore::deallocContext): Add a generic CGContextRef destructor.
995         * platform/win/DragImageCairoWin.cpp:
996         (WebCore::deallocContext): Add a generic cairo_* destructor. 
997         (WebCore::allocImage):  New implementation to allocate a Cairo
998         surface of a specified size.
999         (WebCore::createCairoContextFromBitmap): New implementation to
1000         create a Cairo surface from a Windows BITMAP.
1001         (WebCore::scaleDragImage): Replace stub with implementation to
1002         actually create a scaled image.
1003         (WebCore::createDragImageFromImage): Replace stub with implementation
1004         to actually create an image.
1005
1006 2008-12-12  Dean Jackson  <dino@apple.com>
1007
1008         Reviewed by Darin Adler.
1009
1010         Expose WebKitAnimationEvent, WebKitTransitionEvent,
1011         WebKitCSSTransformValue, WebKitCSSKeyframeRule and
1012         WebKitCSSKeyframesRule to Window object.
1013         This required generating constructors for the event
1014         interfaces.
1015         
1016         https://bugs.webkit.org/show_bug.cgi?id=20560
1017
1018         * dom/WebKitAnimationEvent.idl:
1019         * dom/WebKitTransitionEvent.idl:
1020         * page/DOMWindow.idl:
1021
1022 2008-12-12  Dave Moore  <davemoore@google.com>
1023
1024         Reviewed by Eric Seidel.
1025
1026         Fixed https://bugs.webkit.org/show_bug.cgi?id=22798
1027
1028         In Font::drawTextUsingSVGFont() a variable of type SVGTextRunWalkerDrawTextData
1029         is created on the stack (called data). One of its fields, charsConsumed, is
1030         unitialized, leading to random values after calling walk() on the
1031         SVGTextRunWalker created with it. I now initialize the variable
1032
1033         This bug was revealed in our Purify run. I don't know of any specific incorrect
1034         behavior caused by it but it would lead to the charsConsumed field having a
1035         a wrong value.
1036
1037         * svg/SVGFont.cpp:
1038         (WebCore::Font::drawTextUsingSVGFont):
1039
1040 2008-12-12  Beth Dakin  <bdakin@apple.com>
1041
1042         Rubber Stamped by Steve Falkenburg.
1043
1044         Build fix.
1045
1046         * platform/KURL.h:
1047
1048 2008-12-12  Brett Wilson  <brettw@chromium.org>
1049
1050         Reviewed by Darin Adler.
1051
1052         Add the ability so that Google-URL can optionally be used in a build
1053         of WebKit without changing the shared header. The guts of KURL are
1054         optionally ifdefed out, and the replacement code goes in a different
1055         header to avoid polluting KURL.h
1056
1057         * platform/KURL.cpp:
1058         * platform/KURL.h:
1059         (WebCore::KURL::string):
1060         (WebCore::KURL::operator const String&):
1061         (WebCore::KURL::operator JSC::UString):
1062         (WebCore::KURL::operator NSString*):
1063         (WebCore::KURL::parsed):
1064         (WebCore::KURL::utf8String):
1065         (WebCore::KURL::isNull):
1066         (WebCore::KURL::isEmpty):
1067         (WebCore::KURL::isValid):
1068         (WebCore::KURL::hostStart):
1069         (WebCore::KURL::hostEnd):
1070         (WebCore::KURL::pathStart):
1071         (WebCore::KURL::pathEnd):
1072         (WebCore::KURL::pathAfterLastSlash):
1073
1074 2008-12-11  Steve Falkenburg  <sfalken@apple.com>
1075
1076         Delete the previous timer-queue timer in the main thread, just prior to scheduling a new timer.
1077         The code previously called DeleteTimerQueueTimer in the timer callback proc.
1078         
1079         The new technique simplifies the code, since we now create and delete timers on the
1080         same thread, and don't access the timer queue or timer handles in the callback.
1081         This allows us to remove some mutex use, and more importantly, it solves a race
1082         condition that was occuring between ChangeTimerQueueTimer and DeleteTimerQueueTimer.
1083         
1084         Since the timer callback isn't passed the timer handle, we were retrieving that handle
1085         via a global. If the timer callback code was entered, but then a new timer was immediately
1086         scheduled (prior to the callback acquiring the mutex and calling DeleteTimerQueueTimer),
1087         there was a small window where the timer could be re-scheduled via ChangeTimerQueueTimer
1088         and then immediately deleted once the already running callback acquired the mutex and
1089         then called DeleteTimerQueueTimer. This resulted in the newly scheduled timer never firing.
1090         
1091         Reviewed by Oliver Hunt.
1092
1093         * platform/win/SharedTimerWin.cpp:
1094         (WebCore::queueTimerProc): Don't delete the timer in the callback.
1095         (WebCore::setSharedTimerFireTime): Always delete and create the timer instead of using ChangeTimerQueueTimer.
1096         (WebCore::stopSharedTimer): Call DeleteTimerQueueTimer directly.
1097
1098 2008-12-12  Kai Brüning  <kai@granus.net>
1099
1100         Reviewed and tweaked by Darin Adler.
1101
1102         - fix https://bugs.webkit.org/show_bug.cgi?id=18205
1103           DOMNode objects are garbage collected although there are strong references
1104           <rdar://problem/6441200>
1105
1106         Fixes resurrection bug for wrapper objects by using an NSMapTable with zeroing weak
1107         memory for the wrapper reference for DOMWrapperCache (DOMInternal.mm),
1108         JSWrapperCache (WebScriptObject.mm) and wrapperCache (DOMRGBColor.mm).
1109         BUILDING_ON_TIGER is used to create a Leopard-only NSMapTable or an old-style
1110         procedural map table for Tiger systems.
1111
1112         No regression tests yet since we don't currently run any tests in GC mode.
1113
1114         * bindings/objc/DOMInternal.h: added WebCore::createWrapperCache for use by all three caches
1115         * bindings/objc/DOMInternal.mm:
1116         (WebCore::createWrapperCache): Contains the compile-time check for map table creation
1117         (WebCore::getDOMWrapper): HashMap -> NSMapTable
1118         (WebCore::addDOMWrapper): ditto
1119         (WebCore::removeDOMWrapper): ditto
1120         * bindings/objc/DOMObject.mm: removed [DOMObject finalize]
1121         * bindings/objc/DOMRGBColor.mm: removed [DOMRGBColor finalize]
1122         (WebCore::getWrapperForRGB): CFMutableDictionaryRef -> NSMapTable
1123         (WebCore::setWrapperForRGB): ditto
1124         (WebCore::removeWrapperForRGB): ditto
1125         * bindings/objc/WebScriptObject.mm:
1126         (WebCore::getJSWrapper): HashMap -> NSMapTable
1127         (WebCore::addJSWrapper): ditto
1128         (WebCore::removeJSWrapper): ditto
1129         (-[WebScriptObject finalize]): removed call of removeJSWrapper()
1130
1131 2008-12-12  Dimitri Glazkov  <dglazkov@chromium.org>
1132
1133         Reviewed by Alexey Proskuryakov.
1134
1135         https://bugs.webkit.org/show_bug.cgi?id=22813
1136         Remove unused references to JSDOMBinding, CallFrame, and JSLock.
1137
1138         * dom/Node.cpp: Removed CallFrame and JSLock header includes.
1139         * loader/FrameLoader.cpp: Removed JSDOMBinding header include.
1140
1141 2008-12-12  Holger Hans Peter Freyther  <zecke@selfish.org>
1142
1143         Reviewed by Simon Hausmann.
1144
1145         Update the WebKit.qrc and add a script to automatically generate the file.
1146
1147         With the way rcc and qmake work this can not be done at build time
1148         as the WebKit.qrc must sit inside the directory that contains the files
1149         and at build time we may not change the content of the source directory.
1150
1151         * inspector/front-end/WebKit.qrc: Updated with new script
1152
1153 2008-12-12  Oliver Hunt  <oliver@apple.com>
1154
1155         Reviewed by Alexey Proskuryakov.
1156
1157         REGRESSION: Canvas is broken in high dpi mode
1158         <rdar://problem/6432739> <https://bugs.webkit.org/show_bug.cgi?id=22823>
1159
1160         Simply made sure that we correctly scale the graphics context to
1161         account for the difference between logical and buffer resolution.
1162
1163         * html/HTMLCanvasElement.cpp:
1164         (WebCore::HTMLCanvasElement::createImageBuffer):
1165         (WebCore::HTMLCanvasElement::baseTransform):
1166
1167 2008-12-12  Tor Arne Vestbø  <tavestbo@trolltech.com>
1168
1169         Rubber-stamped by Oliver Hunt.
1170
1171         Share PluginView::paintMissingPluginIcon() between ports
1172
1173         Also, enable this feature for Qt/X11, Qt/Mac and GTK
1174
1175         * plugins/PluginView.cpp:
1176         (WebCore::PluginView::paintMissingPluginIcon):
1177         * plugins/gtk/PluginViewGtk.cpp:
1178         (WebCore::PluginView::paint):
1179         * plugins/mac/PluginViewMac.cpp:
1180         (WebCore::PluginView::paint):
1181         * plugins/qt/PluginViewQt.cpp:
1182         (WebCore::PluginView::paint):
1183         * plugins/win/PluginViewWin.cpp:
1184
1185 2008-12-12  Tor Arne Vestbø  <tavestbo@trolltech.com>
1186
1187         Reviewed by Simon Hausmann.
1188
1189         [Qt/Mac] Implement PluginView::updatePluginWidget()
1190
1191         We should update the window and clip rect regardless of whether or
1192         not the plugin has been loaded, for example to ensure that the
1193         missing plugin image is placed correctly.
1194
1195         * plugins/mac/PluginViewMac.cpp:
1196         (WebCore::PluginView::setNPWindowIfNeeded):
1197         (WebCore::PluginView::updatePluginWidget):
1198
1199 2008-12-12  Tor Arne Vestbø  <tavestbo@trolltech.com>
1200
1201         Rubber-stamped by Oliver Hunt.
1202
1203         Make PluginView::updatePluginWidget() non-const
1204
1205         We can do this now since frameRectsChanged() is no longer const. This
1206         also allows us to get rid of the mutables in the PluginView.
1207
1208         * platform/qt/TemporaryLinkStubs.cpp:
1209         (PluginView::updatePluginWidget):
1210         * plugins/PluginView.h:
1211         * plugins/gtk/PluginViewGtk.cpp:
1212         (WebCore::PluginView::updatePluginWidget):
1213         * plugins/mac/PluginViewMac.cpp:
1214         (WebCore::PluginView::updatePluginWidget):
1215         * plugins/qt/PluginViewQt.cpp:
1216         (WebCore::PluginView::updatePluginWidget):
1217         * plugins/win/PluginViewWin.cpp:
1218         (WebCore::PluginView::updatePluginWidget):
1219         * plugins/wx/PluginViewWx.cpp:
1220         (WebCore::PluginView::updatePluginWidget):
1221
1222 2008-12-12  Tor Arne Vestbø  <tavestbo@trolltech.com>
1223
1224         Reviewed by Simon Hausmann.
1225
1226         Implement ImageSource::filenameExtension() for the Qt port
1227         
1228         We're using QImageReader::imageFormat().toLower() to check
1229         that the image format is supported, and if it is we store
1230         the resulting extension when creating the ImageDecoderQt.
1231
1232         * platform/graphics/qt/ImageDecoderQt.cpp:
1233         (WebCore::ImageDecoderQt::create):
1234         (WebCore::ImageDecoderQt::ImageDecoderQt):
1235         (WebCore::ImageDecoderQt::imageFormat):
1236         * platform/graphics/qt/ImageDecoderQt.h:
1237         * platform/graphics/qt/ImageSourceQt.cpp:
1238         (WebCore::ImageSource::setData):
1239         (WebCore::ImageSource::filenameExtension):
1240
1241 2008-12-11  Stephanie Lewis  <slewis@apple.com>
1242
1243         Reviewed by Geoff Garen
1244
1245         Account for the size of the response and request headers as well as other overhead
1246         when calculating the size a resource takes up in the cache.  Halts unbounded 
1247         growth in the cache.  Reduced stress test memory high water marks by > 50%.
1248
1249         Uses estimates gathered from the stress test to set the overhead size.  
1250         A version of the patch was created that calculated most of the sizes, but it was 
1251         decided that the patch was still at a basic level an estimate.  What gains it made
1252         in accuracy was offset by the complexity involved in creating and updating the
1253         estimate.
1254
1255         * loader/Cache.cpp:
1256         (WebCore::Cache::resourceAccessed):
1257         (WebCore::Cache::TypeStatistic::addResource):
1258         (WebCore::Cache::dumpLRULists):
1259         * loader/CachedResource.cpp:
1260         (WebCore::CachedResource::overheadSize):
1261         * loader/CachedResource.h:
1262         (WebCore::CachedResource::size):
1263
1264 2008-12-11  Nikolas Zimmermann  <nikolas.zimmermann@torchmobile.com>
1265
1266         Reviewed by Holger Freyther.
1267
1268         Fixes: https://bugs.webkit.org/show_bug.cgi?id=22814
1269
1270         Add <wml> image element support. Based on HTML/SVGImage{Element/Loader}, with
1271         the only difference that WML defines a second source attribute 'localsrc', that
1272         takes precedence over the 'src' attribute. If loading the 'localsrc' attribute
1273         fails, the user agent should try loading the 'src' attribute. If both fail the
1274         'alt' fallback content will be used - just like in HTML.
1275
1276         Fixes: fast/wml/img-localsrc.wml (<img> and 'localsrc' attribute)
1277                fast/wml/img-src-localsrc-alt.wml ('localsrc'/'src' fallback handling)
1278                fast/wml/img-src.wml (<img> and 'src' attribute)
1279
1280         * GNUmakefile.am:
1281         * WebCore.vcproj/WebCore.vcproj:
1282         * WebCore.xcodeproj/project.pbxproj:
1283         * rendering/HitTestResult.cpp:
1284         (WebCore::HitTestResult::altDisplayString):
1285         (WebCore::HitTestResult::absoluteImageURL):
1286         * rendering/RenderImage.cpp:
1287         (WebCore::RenderImage::updateAltText):
1288         * wml/WMLImageElement.cpp: Added.
1289         (WebCore::WMLImageElement::WMLImageElement):
1290         (WebCore::WMLImageElement::~WMLImageElement):
1291         (WebCore::WMLImageElement::mapToEntry):
1292         (WebCore::WMLImageElement::parseMappedAttribute):
1293         (WebCore::WMLImageElement::attach):
1294         (WebCore::WMLImageElement::createRenderer):
1295         (WebCore::WMLImageElement::insertedIntoDocument):
1296         (WebCore::WMLImageElement::isURLAttribute):
1297         (WebCore::WMLImageElement::imageSourceAttributeName):
1298         (WebCore::WMLImageElement::altText):
1299         * wml/WMLImageElement.h: Added.
1300         (WebCore::WMLImageElement::useFallbackAttribute):
1301         (WebCore::WMLImageElement::setUseFallbackAttribute):
1302         * wml/WMLImageLoader.cpp: Added.
1303         (WebCore::WMLImageLoader::WMLImageLoader):
1304         (WebCore::WMLImageLoader::~WMLImageLoader):
1305         (WebCore::WMLImageLoader::dispatchLoadEvent):
1306         (WebCore::WMLImageLoader::sourceURI):
1307         (WebCore::WMLImageLoader::notifyFinished):
1308         * wml/WMLImageLoader.h: Added.
1309         * wml/WMLTagNames.in:
1310
1311 2008-12-11  Holger Hans Peter Freyther  <zecke@selfish.org>
1312
1313         Reviewed by Darin Adler.
1314
1315         https://bugs.webkit.org/show_bug.cgi?id=22043
1316
1317         Do not run into the WebCore::DocumentLoader::updateLoading
1318         ASSERT on Gtk+/CURL when trying to load tests from our LayoutTests.
1319
1320         Do not call setPrimaryLoadComplete when the
1321         activeDocumentLoader has already been replaced. This can happen
1322         when a script executed from within FramerLoader::didFinishLoading will
1323         navigate to another URL.
1324
1325         The assertion is caused by existing tests (e.g.
1326         fast/history/clicked-link-is-visited.html) reproducing this with
1327         network backends not equal to curl is tough or maybe not
1328         even possible.
1329
1330         * loader/DocumentLoader.cpp:
1331         (WebCore::DocumentLoader::setPrimaryLoadComplete):
1332
1333 2008-12-11  Nikolas Zimmermann  <nikolas.zimmermann@torchmobile.com>
1334
1335         Reviewed by Eric Seidel.
1336
1337         - Remove some dead, commented-out code from WMLAElement.
1338         - Add missing virtual destructor for <noop>, as suggested by Alexey.
1339         - Refactor addHTMLAlignment in a static helper function to share with WML.
1340
1341         * html/HTMLElement.cpp:
1342         (WebCore::HTMLElement::addHTMLAlignment):
1343         (WebCore::HTMLElement::addHTMLAlignmentToStyledElement):
1344         * html/HTMLElement.h:
1345         * wml/WMLAElement.cpp:
1346         (WebCore::WMLAElement::defaultEventHandler):
1347         * wml/WMLNoopElement.cpp:
1348         (WebCore::WMLNoopElement::~WMLNoopElement):
1349         * wml/WMLNoopElement.h:
1350
1351 2008-12-10  Oliver Hunt  <oliver@apple.com>
1352
1353         Reviewed by Adele Peterson.
1354
1355         <rdar://problem/6302405> Crash (null-deref) when using :before pseudoselector with content CSS rule in SVG
1356         <https://bugs.webkit.org/show_bug.cgi?id=22804>
1357
1358         This issue was caused by css generated content resulting in non-svg flowboxes
1359         being injected into SVG content.  As SVG spec does not describe behaviour in
1360         this case, and neither Opera nor Firefox displays such generated content, so
1361         now we make svg text layout and rendering just ignore any such content.
1362
1363         Test: svg/css/crash-css-generated-content.xhtml
1364
1365         * rendering/SVGRootInlineBox.cpp:
1366         (WebCore::SVGRootInlineBox::buildLayoutInformation):
1367         (WebCore::SVGRootInlineBox::layoutInlineBoxes):
1368         (WebCore::SVGRootInlineBox::buildTextChunks):
1369
1370 2008-12-11  Cameron Zwarich  <zwarich@apple.com>
1371
1372         Reviewed by Dave Hyatt.
1373
1374         Bug 21256: REGRESSION (r36906): horizontally repeating image leaves ghosts when vertical scrolling
1375         <https://bugs.webkit.org/show_bug.cgi?id=21256>
1376         <rdar://problem/6362978>
1377
1378         The ScrollView refactoring in r36906 caused the ScrollView and the
1379         platform widget to disagree about whether optimizing scrolling via
1380         blitting is allowed. The easiest way to fix this is to make ScrollView
1381         simply ask the platform widget whether this is safe on platforms that
1382         are affected.
1383
1384         It is not possible to write a layout test for this bug because it
1385         involves the back/forward cache.
1386
1387         * platform/ScrollView.cpp:
1388         (WebCore::ScrollView::ScrollView):
1389         (WebCore::ScrollView::setCanBlitOnScroll):
1390         (WebCore::ScrollView::canBlitOnScroll):
1391         (WebCore::ScrollView::platformSetCanBlitOnScroll):
1392         (WebCore::ScrollView::platformCanBlitOnScroll):
1393         * platform/ScrollView.h:
1394         * platform/mac/ScrollViewMac.mm:
1395         (WebCore::ScrollView::platformSetCanBlitOnScroll):
1396         (WebCore::ScrollView::platformCanBlitOnScroll):
1397         * platform/wx/ScrollViewWx.cpp:
1398         (WebCore::ScrollView::platformSetCanBlitOnScroll):
1399         (WebCore::ScrollView::platformCanBlitOnScroll):
1400
1401 2008-12-11  Brent Fulgham  <bfulgham@gmail.com>
1402
1403         Reviewed by Adam Roben.
1404
1405         https://bugs.webkit.org/show_bug.cgi?id=22808
1406
1407         Correct build break due to malformed XML in Visual Studio project
1408         following @r39205 change.
1409
1410         * WebCore.vcproj/WebCore.vcproj: Correct file entry so project loads.
1411
1412 2008-12-10  Chris Marrin  <cmarrin@apple.com>
1413
1414         Reviewed by Dave Hyatt.
1415
1416         Fixed https://bugs.webkit.org/show_bug.cgi?id=22738
1417
1418         This gets rid of the per-animation timers which were used when an animation
1419         started, ended and looped. Their job is now done by the main AnimationController's
1420         timer. It is now set to fire as needed. For instance, if there is a delay, it will
1421         fire after the delay time and then every 30ms to run the animation. The start, loop
1422         and end events are generated as needed during the firing of this timer.
1423
1424         I had to add one more bit of code. When animation timers used to fire the animation events.
1425         This would always happen from the RunLoop, so any style changes that happened in the
1426         event handler would get picked up on the next updateRendering() call. But now the start
1427         event is generated during the styleIsAvailable() call, which is in the middle of the 
1428         updateRendering() cycle. And calling an event handler in the middle of updateRendering()
1429         is not allowed and causes style changes to get missed. We already have a mechanism in
1430         AnimationController to defer updateRendering() calls. So I added logic to defer all
1431         event handling to there. Now, I put any request for event handling into a list and ask
1432         for a deferred updateRendering() call. When that deferred timer fires, I go through that
1433         list, send all the events and then call updateRendering().
1434
1435         * page/animation/AnimationBase.cpp:
1436         (WebCore::AnimationBase::AnimationBase):
1437         (WebCore::AnimationBase::updateStateMachine):
1438         (WebCore::AnimationBase::fireAnimationEventsIfNeeded):
1439         (WebCore::AnimationBase::willNeedService):
1440         (WebCore::AnimationBase::goIntoEndingOrLoopingState):
1441         * page/animation/AnimationBase.h:
1442         * page/animation/AnimationController.cpp:
1443         (WebCore::AnimationControllerPrivate::updateAnimationTimer):
1444         (WebCore::AnimationControllerPrivate::updateRenderingDispatcherFired):
1445         (WebCore::AnimationControllerPrivate::addEventToDispatch):
1446         (WebCore::AnimationControllerPrivate::animationTimerFired):
1447         (WebCore::AnimationController::addEventToDispatch):
1448         * page/animation/AnimationController.h:
1449         * page/animation/CompositeAnimation.cpp:
1450         (WebCore::CompositeAnimationPrivate::updateTransitions):
1451         (WebCore::CompositeAnimationPrivate::willNeedService):
1452         (WebCore::CompositeAnimationPrivate::getAnimationForProperty):
1453         (WebCore::CompositeAnimation::willNeedService):
1454         (WebCore::CompositeAnimation::getAnimationForProperty):
1455         * page/animation/CompositeAnimation.h:
1456         * page/animation/ImplicitAnimation.cpp:
1457         (WebCore::ImplicitAnimation::animate):
1458         (WebCore::ImplicitAnimation::onAnimationEnd):
1459         (WebCore::ImplicitAnimation::sendTransitionEvent):
1460         * page/animation/ImplicitAnimation.h:
1461         * page/animation/KeyframeAnimation.cpp:
1462         (WebCore::KeyframeAnimation::animate):
1463         (WebCore::KeyframeAnimation::sendAnimationEvent):
1464         * page/animation/KeyframeAnimation.h:
1465         (WebCore::KeyframeAnimation::setUnanimatedStyle):
1466
1467 2008-12-11  Simon Hausmann  <simon.hausmann@nokia.com>
1468
1469         Fix the Qt build with an empty filenameExtension() implementation.
1470
1471         * platform/graphics/qt/ImageSourceQt.cpp:
1472         (WebCore::ImageSource::filenameExtension):
1473
1474 2008-12-11  Holger Hans Peter Freyther  <zecke@selfish.org>
1475
1476         Reviewed by Simon Hausmann.
1477
1478         Fix crash in the cairo implementation of the SVGPaintServer
1479
1480         For SVGFonts the RenderObject can be zero. The existing SVGFont
1481         test cases is exposing this bug. Qt and other ports have fixed
1482         this issue by adding null checks as well.
1483
1484         * svg/graphics/cairo/SVGPaintServerCairo.cpp:
1485         (WebCore::SVGPaintServer::renderPath):
1486
1487 2008-12-11  Holger Freyther  <zecke@selfish.org>
1488
1489         Reviewed by Simon Hausmann.
1490
1491         https://bugs.webkit.org/show_bug.cgi?id=20953
1492
1493         Make the Qt port follow the Win, Mac, Gtk+ port in regard to Font
1494         handling. FontQt.cpp from now on is only implementing the complex path. Create
1495         FontFallbackListQt.cpp and FontPlatformDataQt.cpp to work within
1496         the framework set by the Font code.
1497
1498         Sharing the Font.cpp implementation allows the Qt port to support
1499         the CSS font faces and SVG fonts.
1500
1501         Split out the Qt4.3 Font handling into FonQt43.cpp to allow to more
1502         easily deprecate it.
1503
1504         This commit is removing a lot of #ifdefs from Font.h as the Qt Font
1505         implementation is now in line with the rest of WebCore.
1506
1507         * WebCore.pro:
1508         * platform/graphics/Font.h: Remove #ifdefs
1509         (WebCore::Font::letterSpacing):
1510         (WebCore::Font::setLetterSpacing):
1511         (WebCore::Font::isPlatformFont):
1512         * platform/graphics/FontFallbackList.h:
1513         * platform/graphics/SimpleFontData.cpp:
1514         (WebCore::SimpleFontData::SimpleFontData):
1515         (WebCore::SimpleFontData::platformGlyphInit): There is no GlyphCache
1516         on Qt, move the initialisation over.
1517         (WebCore::SimpleFontData::~SimpleFontData):
1518         * platform/graphics/SimpleFontData.h:
1519         (WebCore::SimpleFontData::getQtFont):
1520         * platform/graphics/qt/FontCacheQt.cpp:
1521         (WebCore::FontCache::getCachedFontPlatformData): Remove unused parameter
1522         (WebCore::FontCache::releaseFontData): Add to build
1523         * platform/graphics/qt/FontCustomPlatformData.cpp:
1524         (WebCore::FontCustomPlatformData::~FontCustomPlatformData):
1525         (WebCore::FontCustomPlatformData::fontPlatformData):
1526         (WebCore::createFontCustomPlatformData):
1527         * platform/graphics/qt/FontCustomPlatformData.h:
1528         * platform/graphics/qt/FontFallbackListQt.cpp: Added.
1529         (WebCore::FontFallbackList::FontFallbackList):
1530         (WebCore::FontFallbackList::invalidate):
1531         (WebCore::FontFallbackList::releaseFontData):
1532         (WebCore::FontFallbackList::determinePitch):
1533         (WebCore::FontFallbackList::fontDataAt):
1534         (WebCore::FontFallbackList::fontDataForCharacters):
1535         (WebCore::FontFallbackList::setPlatformFont):
1536         * platform/graphics/qt/FontPlatformData.h:
1537         (WebCore::FontPlatformData::font):
1538         (WebCore::FontPlatformData::size):
1539         * platform/graphics/qt/FontPlatformDataQt.cpp: Added.
1540         (WebCore::FontPlatformData::FontPlatformData):
1541         * platform/graphics/qt/FontQt.cpp:
1542         (WebCore::Font::drawComplexText):
1543         (WebCore::Font::floatWidthForComplexText):
1544         (WebCore::Font::offsetForPositionForComplexText):
1545         (WebCore::Font::selectionRectForComplexText):
1546         (WebCore::Font::font):
1547         * platform/graphics/qt/FontQt43.cpp: Added. Moved Qt4.3 code from FontQt.cpp
1548         (WebCore::Font::drawComplexText):
1549         (WebCore::Font::floatWidthForComplexText):
1550         (WebCore::Font::offsetForPositionForComplexText):
1551         (WebCore::Font::selectionRectForComplexText):
1552         * platform/graphics/qt/GlyphPageTreeNodeQt.cpp:
1553         (WebCore::GlyphPageTreeNode::pruneTreeCustomFontData):
1554         (WebCore::GlyphPageTreeNode::pruneTreeFontData):
1555         * platform/graphics/qt/SimpleFontDataQt.cpp:
1556         (WebCore::SimpleFontData::determinePitch):
1557         (WebCore::SimpleFontData::containsCharacters):
1558         (WebCore::SimpleFontData::platformInit):
1559         (WebCore::SimpleFontData::platformGlyphInit):
1560         (WebCore::SimpleFontData::platformDestroy):
1561         * platform/qt/RenderThemeQt.cpp:
1562         (WebCore::RenderThemeQt::adjustButtonStyle): Avoid crashes.
1563
1564 2008-12-11  Holger Freyther  <zecke@selfish.org>
1565
1566         Reviewed by Simon Hausmann.
1567
1568         https://bugs.webkit.org/show_bug.cgi?id=20953
1569
1570         For Qt it is not pratical to have a FontCache and GlyphPageTreeNode
1571         implementation. This is one of the reasons why the Qt port is currently not
1572         using WebCore/platform/graphics/Font.cpp. By allowing to not use
1573         the simple/fast-path the Qt port will be able to use it.
1574
1575         Introduce USE(FONT_FAST_PATH) and define it for every port but the
1576         Qt one.
1577
1578         * platform/graphics/Font.cpp:
1579         (WebCore::Font::drawText):
1580         (WebCore::Font::floatWidth):
1581         (WebCore::Font::selectionRectForText):
1582         (WebCore::Font::offsetForPosition):
1583         * platform/graphics/Font.h:
1584
1585 2008-12-11  Holger Hans Peter Freyther  <zecke@selfish.org>
1586
1587         Reviewed by Darin Adler.
1588
1589         https://bugs.webkit.org/show_bug.cgi?id=20953
1590
1591         Split out the font fast path from Fast.cpp into FontFastPath.cpp. This
1592         will allow the Qt port to share most of WebCore::Font
1593         implementation but the fast path. Qt does not provide the API to get
1594         individual Glyphs making the fast path hard to support.
1595
1596
1597         * GNUmakefile.am:
1598         * WebCore.vcproj/WebCore.vcproj:
1599         * WebCore.xcodeproj/project.pbxproj:
1600         * WebCoreSources.bkl:
1601         * platform/graphics/Font.cpp:
1602         * platform/graphics/FontFastPath.cpp: Added.
1603         (WebCore::Font::glyphDataForCharacter):
1604
1605 2008-12-11  Robert Carr  <racarr@svn.gnome.org>
1606
1607         Reviewed by Holger Freyther.
1608
1609         https://bugs.webkit.org/show_bug.cgi?id=22560
1610
1611         Code in PlatformScreenGtk for screenDepth and screenRect can not
1612         assume that the platformWindow for the widget has a valid "window"
1613         member. For example in the case of, a new browser view opening as a
1614         child of a GtkNotebook, but never being switched to, or manually
1615         realized. Solve by using the toplevel window of the widget, rather
1616         than the widget itself.
1617
1618         * platform/gtk/PlatformScreenGtk.cpp:
1619         (WebCore::screenDepth):
1620         (WebCore::screenRect):
1621
1622 2008-12-08  Tor Arne Vestbø  <tavestbo@trolltech.com>
1623
1624         Reviewed by Darin Adler and Holger Freyther.
1625
1626         Make Widget::frameRectsChanged() and overrides non-const
1627
1628         This will hopefully allow us to get rid of some of the mutables in
1629         the classes that react to the callback by changing their own state.
1630
1631         * platform/ScrollView.cpp:
1632         (WebCore::ScrollView::frameRectsChanged):
1633         * platform/ScrollView.h:
1634         * platform/Widget.h:
1635         (WebCore::Widget::frameRectsChanged):
1636         * platform/gtk/ScrollbarGtk.cpp: Remove non-const version since
1637         this was more complex and did the same thing, changed const of
1638         the leftover frameRectsChanged() method.
1639         (ScrollbarGtk::frameRectsChanged):
1640         * platform/gtk/ScrollbarGtk.h:
1641         * plugins/PluginView.cpp:
1642         (WebCore::PluginView::frameRectsChanged):
1643         * plugins/PluginView.h:
1644
1645 2008-12-11  Holger Hans Peter Freyther  <zecke@selfish.org>
1646
1647         Reviewed and implemented with Tor Arne Vestbø.
1648
1649         Reimplement RenderTheme::caretBlinkInterval for Qt.
1650
1651         The QApplication::cursorFlashTime is in milliseconds and describes
1652         the whole cycle while WebCore expects half a cycle.
1653
1654         * platform/qt/RenderThemeQt.cpp:
1655         (WebCore::RenderThemeQt::caretBlinkInterval):
1656         * platform/qt/RenderThemeQt.h:
1657
1658 2008-12-09  Trenton Schulz <trenton.schulz@nokia.com>
1659
1660         Reviewed by Tor Arne Vestbø.
1661
1662         [Qt/Mac] Don't call HIGetScaleFactor() if we're not on Tiger or better
1663
1664         * plugins/mac/PluginViewMac.cpp:
1665         (WebCore::tigerOrBetter):
1666         (WebCore::PluginView::globalMousePosForPlugin):
1667
1668 2008-12-10  Nikolas Zimmermann  <nikolas.zimmermann@torchmobile.com>
1669
1670         Reviewed by Eric Seidel and George Staikos.
1671
1672         Fixes: https://bugs.webkit.org/show_bug.cgi?id=22799
1673
1674         Add WML <template> support. The <template> element is specified at deck-level
1675         and declares a template for all <card> elements in the document.
1676
1677         * GNUmakefile.am:
1678         * WebCore.vcproj/WebCore.vcproj:
1679         * WebCore.xcodeproj/project.pbxproj:
1680         * editing/htmlediting.cpp:
1681         (WebCore::canHaveChildrenForEditing): Treat <do> just like a <button>.
1682         * wml/WMLCardElement.cpp:
1683         (WebCore::WMLCardElement::WMLCardElement):
1684         (WebCore::WMLCardElement::setTemplateElement):
1685         (WebCore::WMLCardElement::handleIntrinsicEventIfNeeded):
1686         (WebCore::WMLCardElement::handleDeckLevelTaskOverridesIfNeeded):
1687         * wml/WMLCardElement.h:
1688         (WebCore::WMLCardElement::templateElement):
1689         * wml/WMLDoElement.cpp:
1690         (WebCore::WMLDoElement::insertedIntoDocument):
1691         * wml/WMLDocument.cpp:
1692         (WebCore::WMLDocument::finishedParsing):
1693         * wml/WMLErrorHandling.cpp:
1694         (WebCore::errorMessageForErrorCode):
1695         * wml/WMLErrorHandling.h:
1696         (WebCore::):
1697         * wml/WMLEventHandlingElement.cpp:
1698         (WebCore::WMLEventHandlingElement::~WMLEventHandlingElement):
1699         * wml/WMLEventHandlingElement.h:
1700         (WebCore::WMLEventHandlingElement::doElements):
1701         * wml/WMLTagNames.in:
1702         * wml/WMLTemplateElement.cpp: Added.
1703         (WebCore::WMLTemplateElement::WMLTemplateElement):
1704         (WebCore::WMLTemplateElement::~WMLTemplateElement):
1705         (WebCore::WMLTemplateElement::parseMappedAttribute):
1706         (WebCore::WMLTemplateElement::registerTemplatesInDocument):
1707         * wml/WMLTemplateElement.h: Added.
1708         * wml/WMLTimerElement.cpp:
1709         (WebCore::WMLTimerElement::timerFired):
1710
1711 2008-12-09  Dmitry Titov  <dimich@chromium.org>
1712
1713         Reviewed by Darin Adler.
1714
1715         Fix memory leak - need to call stopActiveDOMObjects
1716         when cached pages get destroyed.
1717         https://bugs.webkit.org/show_bug.cgi?id=22753
1718
1719         * dom/Document.cpp:
1720         (WebCore::Document::detach):
1721
1722 2008-12-10  Alice Liu  <alice.liu@apple.com>
1723
1724         Manual test for https://bugs.webkit.org/show_bug.cgi?id=20685
1725
1726         Reviewed by Darin Adler.
1727
1728         * manual-tests/drag-image-to-desktop.html: Added.
1729
1730 2008-12-10  Alice Liu  <alice.liu@apple.com>
1731
1732         fixed https://bugs.webkit.org/show_bug.cgi?id=20685
1733
1734         Reviewed by Darin Adler.
1735
1736         Manual test case is manual-tests/drag-image-to-desktop.html
1737
1738         Added new files to projects
1739         * WebCore.vcproj/WebCore.vcproj:
1740         * WebCore.xcodeproj/project.pbxproj:
1741
1742         * page/DragController.cpp:
1743         (WebCore::DragController::startDrag):
1744         * platform/MIMETypeRegistry.cpp:
1745         (WebCore::initializeSupportedImageMIMETypes):
1746         (WebCore::initializeSupportedImageMIMETypesForEncoding):
1747
1748         These changes add a method to obtain the extension for an image
1749         * platform/graphics/BitmapImage.cpp:
1750         (WebCore::BitmapImage::filenameExtension):
1751         * platform/graphics/BitmapImage.h:
1752         * platform/graphics/Image.h:
1753         (WebCore::Image::filenameExtension):
1754         * platform/graphics/ImageSource.h:
1755         * platform/graphics/cairo/ImageSourceCairo.cpp:
1756         (WebCore::ImageSource::filenameExtension):
1757         * platform/graphics/cg/ImageSourceCG.cpp:
1758         (WebCore::ImageSource::filenameExtension):
1759
1760         These changes added a utility that returns the preferred extension for a UTI
1761         * platform/graphics/cg/ImageSourceCG.h: Added.
1762         * platform/graphics/cg/ImageSourceCGMac.mm: Added.
1763         (WebCore::MIMETypeForImageSourceType):
1764         (WebCore::preferredExtensionForImageSourceType):
1765         * platform/graphics/cg/ImageSourceCGWin.cpp: Added.
1766         (WebCore::MIMETypeForImageSourceType):
1767         (WebCore::preferredExtensionForImageSourceType):
1768
1769         * platform/mac/MIMETypeRegistryMac.mm:
1770         moved getMIMETypeForUTI to ImageSourceCGMac.mm
1771
1772         Ask image for its file extension instead of relying on MIME type and file path
1773         * platform/win/ClipboardWin.cpp:
1774         (WebCore::createGlobalImageFileDescriptor):
1775
1776         Remove extraneous code from getPreferredExtensionForMIMEType.
1777         Also moved getMIMETypeForUTI to ImageSourceCGWin.cpp
1778         * platform/win/MIMETypeRegistryWin.cpp:
1779         (WebCore::MIMETypeRegistry::getPreferredExtensionForMIMEType):
1780
1781 2008-12-10  Simon Fraser  <simon.fraser@apple.com>
1782
1783         Reviewed by Antti Koivisto
1784
1785         <rdar://problem/6431224>
1786         
1787         When updating the value of a slider, don't mark the parents
1788         as needing layout, because the size of the slider can never
1789         change. This fixes full-page repaints in some cases.
1790
1791         * rendering/RenderSlider.cpp:
1792         (WebCore::RenderSlider::updateFromElement):
1793
1794 2008-12-10  Simon Fraser  <simon.fraser@apple.com>
1795
1796         Potential build fix. The forward declaration of FloatPoint should
1797         be inside the WebCore namespace.
1798         
1799         * platform/graphics/FloatPoint3D.h:
1800
1801 2008-12-10  Simon Fraser  <simon.fraser@apple.com>
1802
1803         Reviewed by Sam Weinig.
1804
1805         https://bugs.webkit.org/show_bug.cgi?id=22793
1806
1807         Cleanup FloatPoint3D: inline the getters and setters,
1808         fix a potential divide-by-zero in normalize(), and add
1809         a FloatPoint constructor.
1810         
1811         * platform/graphics/FloatPoint3D.cpp:
1812         (WebCore::FloatPoint3D::FloatPoint3D):
1813         (WebCore::FloatPoint3D::normalize):
1814         * platform/graphics/FloatPoint3D.h:
1815         (WebCore::FloatPoint3D::x):
1816         (WebCore::FloatPoint3D::setX):
1817         (WebCore::FloatPoint3D::y):
1818         (WebCore::FloatPoint3D::setY):
1819         (WebCore::FloatPoint3D::z):
1820         (WebCore::FloatPoint3D::setZ):
1821
1822 2008-12-09  Julien Chaffraix  <jchaffraix@webkit.org>
1823
1824         Reviewed by Eric Seidel.
1825
1826         Bug 22665: Remove setCreatedByParser(bool) from the few elements that use it
1827         https://bugs.webkit.org/show_bug.cgi?id=22665
1828
1829         - Removed setCreatedByParser from style and link elements.
1830
1831         - Removed XMLTokenizer::eventuallyMarkAsCreatedByParser.
1832
1833         * dom/XMLTokenizer.cpp:
1834         * dom/XMLTokenizer.h:
1835         * dom/XMLTokenizerLibxml2.cpp:
1836         (WebCore::XMLTokenizer::startElementNs):
1837         * dom/XMLTokenizerQt.cpp:
1838         (WebCore::XMLTokenizer::parseStartElement):
1839         * html/HTMLElementFactory.cpp:
1840         (WebCore::linkConstructor):
1841         (WebCore::styleConstructor):
1842         * html/HTMLLinkElement.cpp:
1843         (WebCore::HTMLLinkElement::HTMLLinkElement):
1844         * html/HTMLLinkElement.h:
1845         * html/HTMLStyleElement.cpp:
1846         (WebCore::HTMLStyleElement::HTMLStyleElement):
1847         * html/HTMLStyleElement.h:
1848         * html/HTMLTagNames.in:
1849         * svg/SVGStyleElement.cpp:
1850         (WebCore::SVGStyleElement::SVGStyleElement):
1851         * svg/SVGStyleElement.h:
1852         * svg/svgtags.in:
1853
1854 2008-12-10  Brady Eidson  <beidson@apple.com>
1855
1856         Reviewed by Darin
1857
1858         https://bugs.webkit.org/show_bug.cgi?id=22194 and <rdar://problem/6388378> -
1859         Dialog when going back to a page from whence you submitted a form
1860
1861         http://trac.webkit.org/changeset/37317 changed the manner in which headers are added to
1862         http requests, which caused the networking layer to have an incomplete set of headers
1863         just before consulting the Policy Delegate.  This caused a cache miss and incorrectly made
1864         us believe we'd be resubmitting the form.
1865
1866         * loader/FrameLoader.cpp:
1867         (WebCore::FrameLoader::loadItem):  Being careful to maintain the new behavior required by
1868           the Origin header mechanism as discussed in bug 22194, restore the previous behavior of
1869           setting all the headers before the networking layer is asked about the cache lookup.
1870
1871 2008-12-10  Dimitri Glazkov  <dglazkov@chromium.org>
1872
1873         Reviewed by Timothy Hatcher.
1874
1875         Add back ability to end all profiling via console by invoking profileEnd
1876         with no arguments.
1877
1878         * page/Console.cpp:
1879         (WebCore::Console::profileEnd): Removed title null-checking and
1880             subsequent early exit.
1881
1882 2008-12-10  Pierre-Olivier Latour  <pol@apple.com>
1883
1884         Reviewed by Darin Adler.
1885
1886         KeyframeAnimation::animate() needs to compute the elapsed animation time
1887         properly taking into account its paused state.
1888
1889         https://bugs.webkit.org/show_bug.cgi?id=22773
1890
1891         Test: animations/animation-drt-api-multiple-keyframes.html
1892
1893         * page/animation/KeyframeAnimation.cpp:
1894         (WebCore::KeyframeAnimation::animate):
1895
1896 2008-12-10  Simon Fraser  <simon.fraser@apple.com>
1897
1898         Reviewed by Dan Bernstein
1899
1900         Part of
1901         https://bugs.webkit.org/show_bug.cgi?id=22570
1902         
1903         Rename methods on RenderLayer for clarity:
1904             clearClipRects -> clearClipRectsIncludingDescendants
1905             clearClipRect  -> clearClipRects
1906
1907         * rendering/RenderBox.cpp:
1908         (WebCore::RenderBox::destroy):
1909         * rendering/RenderLayer.cpp:
1910         (WebCore::RenderLayer::updateLayerPosition):
1911         (WebCore::RenderLayer::removeOnlyThisLayer):
1912         (WebCore::RenderLayer::insertOnlyThisLayer):
1913         (WebCore::RenderLayer::clearClipRectsIncludingDescendants):
1914         (WebCore::RenderLayer::clearClipRects):
1915         * rendering/RenderLayer.h:
1916         * rendering/RenderObject.cpp:
1917         (WebCore::RenderObject::styleWillChange):
1918         * rendering/RenderWidget.cpp:
1919         (WebCore::RenderWidget::destroy):
1920
1921 2008-12-10  Kevin Ollivier  <kevino@theolliviers.com>
1922
1923         wx build fix after the script call stack/frame additions.
1924         
1925         * WebCoreSources.bkl:
1926
1927 2008-12-10   Srinivasa Rao M. Hamse  <msrinirao@gmail.com>
1928
1929         Reviewed by Holger Freyther.
1930
1931         F1-F12 key mappings for WebKit Gtk Port
1932
1933         * platform/gtk/KeyEventGtk.cpp:
1934         (WebCore::windowsKeyCodeForKeyEvent):
1935
1936 2008-12-10  Enrico Ros  <enrico.ros@m31.com>
1937
1938         Reviewed by Simon Hausmann.
1939
1940         Fix the Qt build when SVG is disabled. A broken dependancy caused
1941         unnecessary rebuilds even with no changes.
1942
1943         * WebCore.pro: fix a broken build dependancy
1944
1945 2008-12-10  Hironori Bono  <hbono@chromium.org>
1946
1947         Reviewed by Alexey Proskuryakov.
1948
1949         Bug 21820: Unable to enter the Tamil UNICODE Characters via Thamizha Phonetic IME
1950         https://bugs.webkit.org/show_bug.cgi?id=21820
1951
1952         <rdar://problem/5683248> Typing backspace to delete a diacritical mark also deletes the character before (Arabic)
1953         <rdar://problem/5702038> Backspace removes Thai Character in wrong sequence
1954
1955         Tests: editing/deleting/delete-ligature-001.html
1956                editing/deleting/delete-ligature-002.html
1957                editing/deleting/delete-ligature-003.html
1958
1959         * editing/TypingCommand.cpp:
1960         (WebCore::TypingCommand::deleteKeyPressed): Delete only the last character
1961         of a ligature which consists of multiple Unicode characters when deleting it with
1962         a backspace key.
1963
1964 2008-12-10  David Levin  <levin@chromium.org>
1965
1966         Reviewed by Alexey Proskuryakov.
1967
1968         https://bugs.webkit.org/show_bug.cgi?id=22177
1969         Fix the windows build by removing calls to notifyFormStateChanged
1970         where they didn't appear in the original reviewed patch.
1971
1972         * html/HTMLInputElement.cpp:
1973         (WebCore::HTMLInputElement::type):
1974         (WebCore::HTMLInputElement::attach):
1975
1976 2008-12-09  Adam Barth  <abarth@webkit.org>
1977
1978         Reviewed by Sam Weinig.
1979
1980         Add ScriptController::updateSecurityOrigin to notify the bindings
1981         that a document's securityOrigin has been updated.  This is used by
1982         V8 to update its security context.
1983
1984         * bindings/js/ScriptController.cpp:
1985         (WebCore::ScriptController::updateSecurityOrigin):
1986         * bindings/js/ScriptController.h:
1987         * dom/Document.cpp:
1988         (WebCore::Document::setDomain):
1989
1990 2008-12-09  Eric Seidel  <eric@webkit.org>
1991
1992         No review, build fix only.
1993
1994         Fix a few config issues to let the Chromium Windows WebCore build get further.
1995
1996         * WebCore.scons:
1997
1998 2008-12-09  Brett Wilson  <brettw@chromium.org>
1999
2000         Reviewed by Dave Hyatt.
2001
2002         https://bugs.webkit.org/show_bug.cgi?id=22177
2003
2004         Add a callback on ChromeClient that the state of form elements on
2005         the page has changed. This is to allow clients implementing session
2006         saving to know when the current state is dirty.
2007
2008         * html/HTMLInputElement.cpp:
2009         (WebCore::notifyFormStateChanged):
2010         (WebCore::HTMLInputElement::setInputType):
2011         (WebCore::HTMLInputElement::type):
2012         (WebCore::HTMLInputElement::attach):
2013         (WebCore::HTMLInputElement::setValue):
2014         (WebCore::HTMLInputElement::setValueFromRenderer):
2015         (WebCore::HTMLInputElement::setFileListFromRenderer):
2016         * html/HTMLSelectElement.cpp:
2017         (WebCore::HTMLSelectElement::setSelectedIndex):
2018         * html/HTMLTextAreaElement.cpp:
2019         (WebCore::notifyFormStateChanged):
2020         (WebCore::HTMLTextAreaElement::HTMLTextAreaElement):
2021         (WebCore::HTMLTextAreaElement::updateValue):
2022         (WebCore::HTMLTextAreaElement::setValue):
2023         * loader/EmptyClients.h:
2024         (WebCore::EmptyChromeClient::formStateDidChange):
2025         * page/ChromeClient.h:
2026
2027 2008-12-09  Sam Weinig  <sam@webkit.org>
2028
2029         Reviewed by Darin Adler.
2030
2031         https://bugs.webkit.org/show_bug.cgi?id=19762
2032
2033         Fix intermittent crash in buildbot. The CSSCursorImageValues and
2034         SVGCursorElements held onto raw SVGElement pointers without any
2035         guarantee that the element is still around.
2036
2037         We did not fix the design that resulted in this issue, we just fixed
2038         the pointer lifetimes.
2039
2040         * css/CSSCursorImageValue.cpp:
2041         (WebCore::CSSCursorImageValue::~CSSCursorImageValue): Zero out the back pointers.
2042         (WebCore::CSSCursorImageValue::updateIfSVGCursorIsUsed): Set up a back pointer.
2043         (WebCore::CSSCursorImageValue::removeReferencedElement): Added. Used when the element
2044         is destroyed.
2045         * css/CSSCursorImageValue.h: Added removeReferencedElement.
2046
2047         * svg/SVGCursorElement.cpp:
2048         (WebCore::SVGCursorElement::~SVGCursorElement): Zero out the back pointers.
2049         (WebCore::SVGCursorElement::addClient): Set up a back pointer.
2050         (WebCore::SVGCursorElement::removeClient): Zero out the back pointer.
2051
2052         * svg/SVGElement.cpp:
2053         (WebCore::SVGElement::SVGElement): Initialize back pointers to zero.
2054         (WebCore::SVGElement::~SVGElement): Call both the element and cursor image value
2055         to remove the element from their sets.
2056         * svg/SVGElement.h:
2057         (WebCore::SVGElement::setCursorElement): Added.
2058         (WebCore::SVGElement::setCursorImageValue): Added.
2059
2060 2008-12-09  David Hyatt  <hyatt@apple.com>
2061
2062         Add code that will create custom CSS scrollbars from the <body>, the document element (<html>) and the owning
2063         frame/iframe.  If any of them set a custom style, it will be used.  The scrollbars do not update dynamically
2064         yet as you switch from page to page (until they are destroyed and recreated).
2065
2066         Reviewed by Adele
2067
2068         * page/FrameView.cpp:
2069         (WebCore::FrameView::createScrollbar):
2070
2071 2008-12-09  Ojan Vafai  <ojan@chromium.org>
2072
2073         Reviewed by Dave Hyatt.
2074
2075         https://bugs.webkit.org/show_bug.cgi?id=22689
2076         Match Firefox button metrics on Windows.
2077
2078         * rendering/RenderButton.cpp:
2079         (WebCore::RenderButton::addChild):
2080         (WebCore::RenderButton::styleDidChange):
2081         (WebCore::RenderButton::setupInnerStyle):
2082         * rendering/RenderButton.h:
2083         * rendering/RenderTheme.cpp:
2084         (WebCore::RenderTheme::adjustButtonInnerStyle):
2085         * rendering/RenderTheme.h:
2086         * rendering/RenderThemeWin.cpp:
2087         (WebCore::RenderThemeWin::adjustSliderThumbSize):
2088         (WebCore::RenderThemeWin::adjustButtonInnerStyle):
2089         * rendering/RenderThemeWin.h:
2090
2091 2008-12-09  Darin Fisher  <darin@chromium.org>
2092
2093         Fixes bustages.
2094
2095         https://bugs.webkit.org/show_bug.cgi?id=22631
2096         Adding missing files from previous commit.
2097
2098         * bindings/js/ScriptCallFrame.cpp: Added.
2099         (WebCore::ScriptCallFrame::ScriptCallFrame):
2100         (WebCore::ScriptCallFrame::~ScriptCallFrame):
2101         (WebCore::ScriptCallFrame::argumentAt):
2102         * bindings/js/ScriptCallFrame.h: Added.
2103         (WebCore::ScriptCallFrame::functionName):
2104         (WebCore::ScriptCallFrame::sourceURL):
2105         (WebCore::ScriptCallFrame::lineNumber):
2106         (WebCore::ScriptCallFrame::argumentCount):
2107         * bindings/js/ScriptCallStack.cpp: Added.
2108         (WebCore::ScriptCallStack::ScriptCallStack):
2109         (WebCore::ScriptCallStack::~ScriptCallStack):
2110         (WebCore::ScriptCallStack::at):
2111         (WebCore::ScriptCallStack::size):
2112         (WebCore::ScriptCallStack::initialize):
2113         * bindings/js/ScriptCallStack.h: Added.
2114         (WebCore::ScriptCallStack::state):
2115
2116 2008-12-09  Dimitri Glazkov  <dglazkov@chromium.org>
2117
2118         Reviewed by Timothy Hatcher.
2119
2120         https://bugs.webkit.org/show_bug.cgi?id=22631
2121         Streamline Console.cpp, abstract out the use of JSC::ExecState and
2122         JSC::ArgList by introducing ScriptCallFrame and ScriptCallStack
2123         abstractions.
2124
2125         * GNUmakefile.am: Added ScriptCallFrame and ScriptCallStack to build
2126         * WebCore.pro:  Added ScriptCallFrame and ScriptCallStack to build
2127         * WebCore.vcproj/WebCore.vcproj: Added ScriptCallFrame and
2128         ScriptCallStack to project
2129         * WebCore.xcodeproj/project.pbxproj: Added ScriptCallFrame and
2130         ScriptCallStack to project
2131         * bindings/js/JSConsoleCustom.cpp: Remove custom bindings.
2132         * bindings/js/ScriptCallFrame.cpp: Added.
2133         (WebCore::ScriptCallFrame::ScriptCallFrame):
2134         (WebCore::ScriptCallFrame::~ScriptCallFrame):
2135         (WebCore::ScriptCallFrame::argumentAt):
2136         * bindings/js/ScriptCallFrame.h: Added.
2137         (WebCore::ScriptCallFrame::functionName):
2138         (WebCore::ScriptCallFrame::sourceURL):
2139         (WebCore::ScriptCallFrame::lineNumber):
2140         (WebCore::ScriptCallFrame::argumentCount):
2141         * bindings/js/ScriptCallStack.cpp: Added.
2142         (WebCore::ScriptCallStack::ScriptCallStack):
2143         (WebCore::ScriptCallStack::~ScriptCallStack):
2144         (WebCore::ScriptCallStack::at):
2145         (WebCore::ScriptCallStack::size):
2146         (WebCore::ScriptCallStack::initialize):
2147         * bindings/js/ScriptCallStack.h: Added.
2148         (WebCore::ScriptCallStack::ScriptCallStack):
2149         (WebCore::ScriptCallStack::~ScriptCallStack):
2150         (WebCore::ScriptCallStack::state):
2151         (WebCore::ScriptCallStack::at):
2152         (WebCore::ScriptCallStack::size):
2153         (WebCore::ScriptCallStack::initialize):
2154         * bindings/js/ScriptString.h: Added missing PlatformString include.
2155         (WebCore::ScriptString::ScriptString): Added default constructor.
2156         (WebCore::ScriptString::operator==): Added equality operator.
2157         (WebCore::ScriptString::operator!=):
2158         * bindings/js/ScriptValue.cpp: Added isNull and isUndefined.
2159         (WebCore::ScriptValue::isNull):
2160         (WebCore::ScriptValue::isUndefined):
2161         * bindings/js/ScriptValue.h: Added isNull and isUndefined
2162         * bindings/scripts/CodeGeneratorJS.pm: Add handling for
2163         CustomArgumentHandling attribute.
2164         * inspector/InspectorController.cpp: Refactored to use 
2165         ScriptCallFrame and ScriptCallStack.
2166         (WebCore::ConsoleMessage::ConsoleMessage):
2167         (WebCore::InspectorController::addMessageToConsole):
2168         (WebCore::InspectorController::startGroup):
2169         (WebCore::InspectorController::addScriptConsoleMessage):
2170         (WebCore::InspectorController::count):
2171         (WebCore::InspectorController::startTiming):
2172         (WebCore::InspectorController::stopTiming):
2173         * inspector/InspectorController.h: Refactored to use ScriptCallFrame and
2174         ScriptCallStack.
2175         * inspector/front-end/Console.js: Modified to use argument value itself
2176         rather than f.name for stack trace.
2177         * page/Console.cpp: Refactored to use ScriptCallFrame and
2178         ScriptCallStack.
2179         (WebCore::getFirstArgumentAsString):
2180         (WebCore::Console::addMessage):
2181         (WebCore::Console::debug):
2182         (WebCore::Console::error):
2183         (WebCore::Console::info):
2184         (WebCore::Console::log):
2185         (WebCore::Console::dir):
2186         (WebCore::Console::dirxml):
2187         (WebCore::Console::trace):
2188         (WebCore::Console::assertCondition):
2189         (WebCore::Console::count):
2190         (WebCore::Console::profile):
2191         (WebCore::Console::profileEnd):
2192         (WebCore::Console::time):
2193         (WebCore::Console::timeEnd):
2194         (WebCore::Console::group):
2195         (WebCore::Console::warn):
2196         * page/Console.h:
2197         * page/Console.idl: Removed Custom attributes, added
2198         CustomArgumentHandling attributes, and tweaked argument defs.
2199
2200 2008-12-09  Darin Adler  <darin@apple.com>
2201
2202         Try to fix non-Mac builds.
2203
2204         * GNUmakefile.am: Added NavigatorBase.
2205         * WebCore.pro: Ditto.
2206         * WebCore.scons: Ditto.
2207         * WebCore.vcproj/WebCore.vcproj: Ditto.
2208         * WebCoreSources.bkl: Ditto.
2209
2210         Unrelated tweak sitting in my tree.
2211
2212         * bindings/objc/DOMAbstractView.mm: Remove pointless override of finalize method.
2213
2214 2008-12-09  Darin Adler  <darin@apple.com>
2215
2216         Try to fix Tiger build.
2217
2218         * platform/network/mac/NetworkStateNotifierMac.cpp: Declare CFRunLoopGetMain.
2219
2220 2008-12-09  Alexey Proskuryakov  <ap@webkit.org>
2221
2222         Reviewed by Darin Adler.
2223
2224         https://bugs.webkit.org/show_bug.cgi?id=22719
2225         Implement Navigator object in Workers
2226
2227         Test: fast/workers/worker-navigator.html
2228
2229         * DerivedSources.make:
2230         * GNUmakefile.am:
2231         * WebCore.pro:
2232         * WebCore.vcproj/WebCore.vcproj:
2233         * WebCore.xcodeproj/project.pbxproj:
2234         Added WorkerNavigator sources.
2235
2236         * bindings/js/JSWorkerContext.cpp: (WebCore::jsWorkerContextNavigator):
2237         Worker.navigator returns a WoerkerNavigator object (it is named just Navigator in the spec,
2238         but it is not the same interface that is available on Windows).
2239
2240         * dom/Worker.cpp:
2241         (WebCore::Worker::notifyFinished):
2242         * dom/WorkerContext.cpp:
2243         (WebCore::WorkerContext::WorkerContext):
2244         (WebCore::WorkerContext::navigator):
2245         * dom/WorkerContext.h:
2246         (WebCore::WorkerContext::create):
2247         * dom/WorkerThread.cpp:
2248         (WebCore::WorkerThread::create):
2249         (WebCore::WorkerThread::WorkerThread):
2250         (WebCore::WorkerThread::workerThread):
2251         * dom/WorkerThread.h:
2252         Pass a pre-computed user agent string into worker, because it cannot call a client method
2253         directly, and pre-computing is easier than sending a synchronous message to the main thread.
2254
2255         * page/Navigator.cpp:
2256         * page/Navigator.h:
2257         * page/NavigatorBase.cpp: Added.
2258         * page/NavigatorBase.h: Added.
2259         Factor out common (and uncommon, but very similar) functionality into a base class.
2260
2261         * page/WorkerNavigator.cpp: Added.
2262         * page/WorkerNavigator.h: Added.
2263         * page/WorkerNavigator.idl: Added.
2264         Per Web Workers and HTML5, implement a small subset of what we currently have in Window.Navigator.
2265
2266         * platform/network/NetworkStateNotifier.cpp: (WebCore::networkStateNotifier):
2267         Make networkStateNotifier() static constructor thread safe. The object is created on the
2268         thread it is first called from, while callbacks are registered on the main thread. Calls to
2269         onLine() from other threads are safe, because it is just loading a boolean.
2270
2271         * platform/network/mac/NetworkStateNotifierMac.cpp: (WebCore::NetworkStateNotifier::NetworkStateNotifier):
2272         Schedule notifications on main event loop, not the current one.
2273
2274 2008-12-09  Nikolas Zimmermann  <nikolas.zimmermann@torchmobile.com>
2275
2276         Rubber-stamped by Alexey Proskuryakov.
2277
2278         Forgot to update Qt/WML build - add some new files to the build.
2279
2280         * WebCore.pro:
2281
2282 2008-12-09  Nikolas Zimmermann  <nikolas.zimmermann@torchmobile.com>
2283
2284         Reviewed by Alexey Proskuryakov.
2285
2286         Fixes: https://bugs.webkit.org/show_bug.cgi?id=22637
2287
2288         Implement the GET method for WMLGoElement, and some test covering it's behaviour.
2289         Update all build systems supporting WML that haven't been updated since a while.
2290
2291         Add WMLPostField stub implementation, needed for implementing POST method.
2292
2293         Tests: wml/go-task-get-method-external-deck-with-href.html
2294                wml/go-task-get-method-external-deck.html
2295                wml/go-task-get-method-same-deck.html
2296
2297         * GNUmakefile.am:
2298         * WebCore.vcproj/WebCore.vcproj:
2299         * WebCore.xcodeproj/project.pbxproj:
2300         * dom/Document.cpp:
2301         (WebCore::Document::resetWMLPageState):
2302         * wml/WMLCardElement.cpp:
2303         * wml/WMLCardElement.h:
2304         * wml/WMLEventHandlingElement.cpp:
2305         (WebCore::WMLCardElement::registerDoElement):
2306         * wml/WMLEventHandlingElement.h:
2307         * wml/WMLGoElement.cpp:
2308         (WebCore::WMLGoElement::WMLGoElement):
2309         (WebCore::WMLGoElement::registerPostfieldElement):
2310         (WebCore::WMLGoElement::parseMappedAttribute):
2311         (WebCore::WMLGoElement::executeTask):
2312         (WebCore::WMLGoElement::parseContentType):
2313         (WebCore::WMLGoElement::preparePOSTRequest):
2314         (WebCore::WMLGoElement::prepareGETRequest):
2315         * wml/WMLGoElement.h:
2316         * wml/WMLPostfieldElement.cpp: Added.
2317         (WebCore::WMLPostfieldElement::WMLPostfieldElement):
2318         (WebCore::WMLPostfieldElement::parseMappedAttribute):
2319         (WebCore::WMLPostfieldElement::insertedIntoDocument):
2320         * wml/WMLPostfieldElement.h: Added.
2321         (WebCore::WMLPostfieldElement::name):
2322         (WebCore::WMLPostfieldElement::value):
2323         * wml/WMLTagNames.in:
2324
2325 2008-12-08  Peter Kasting  <pkasting@google.com>
2326
2327         Reviewed by Anders Carlsson.
2328
2329         https://bugs.webkit.org/show_bug.cgi?id=16814
2330         Allow ports to disable ActiveX->NPAPI conversion for Media Player.
2331         Improve handling of miscellaneous ActiveX objects.
2332
2333         * rendering/RenderPartObject.cpp:
2334         (WebCore::mapClassIdToServiceType):
2335         (WebCore::shouldUseChildEmbedOfObject):
2336         (WebCore::RenderPartObject::updateWidget):
2337
2338 2008-12-08  Darin Adler  <darin@apple.com>
2339
2340         Reviewed by John Sullivan.
2341
2342         - fix https://bugs.webkit.org/show_bug.cgi?id=22409
2343           REGRESSION: cmd-shift-left/right don't switch tabs, instead select text
2344
2345         Tests: editing/execCommand/enabling-and-selection-2.html
2346                editing/execCommand/enabling-and-selection.html
2347
2348         * editing/EditorCommand.cpp: Updated table to use these functions by their new names.
2349         (WebCore::enabledVisibleSelection): Renamed this to reflect its new algorithm.
2350         An invisible selection with a position that selects no characters doesn't count
2351         as a visible selection.
2352         (WebCore::enabledVisibleSelectionAndMark): Ditto.
2353
2354 2008-12-08  David Kilzer  <ddkilzer@apple.com>
2355
2356         Remove duplicate entries from WebCore project.
2357
2358         Reviewed by Eric Seidel.
2359
2360         Bug 22555: Sort "children" sections in Xcode project files.
2361         <https://bugs.webkit.org/show_bug.cgi?id=22555>
2362
2363         Recipe for removing duplicates:
2364         $ ./WebKitTools/Scripts/sort-Xcode-project-file project.pbxproj
2365         $ uniq < project.pbxproj | diff -u project.pbxproj - | patch -p0 project.pbxproj
2366
2367         * WebCore.xcodeproj/project.pbxproj: Removed duplicates.
2368
2369 2008-12-08  Julien Chaffraix  <jchaffraix@webkit.org>
2370
2371         Reviewed by Darin Adler.
2372
2373         Bug 22665: Remove setCreatedByParser(bool) from the few elements that use it
2374         https://bugs.webkit.org/show_bug.cgi?id=22665
2375
2376         Remove setCreatedByParser from the script elements (HTML and SVG).
2377
2378         * dom/XMLTokenizer.cpp:
2379         (WebCore::XMLTokenizer::eventuallyMarkAsParserCreated): Removed
2380         call to setCreatedByParser for the 2 elements.
2381
2382         * dom/make_names.pl: Modified to call the constructor with
2383         the createByParser parameter if 'constructorNeedsCreatedByParser'
2384         is set.
2385
2386         * html/HTMLElementFactory.cpp:
2387         (WebCore::scriptConstructor):
2388         * html/HTMLScriptElement.cpp:
2389         (WebCore::HTMLScriptElement::HTMLScriptElement):
2390         * html/HTMLScriptElement.h:
2391         * html/HTMLTagNames.in: Added constructorNeedsCreatedByParser
2392         to script.
2393         * svg/SVGScriptElement.cpp:
2394         (WebCore::SVGScriptElement::SVGScriptElement):
2395         * svg/SVGScriptElement.h:
2396         * svg/svgtags.in: Added constructorNeedsCreatedByParser
2397         to script.
2398
2399 2008-12-08  David Kilzer  <ddkilzer@apple.com>
2400
2401         Bug 22555: Sort "children" sections in Xcode project files
2402
2403         <https://bugs.webkit.org/show_bug.cgi?id=22555>
2404
2405         Reviewed by Eric Seidel.
2406
2407         * WebCore.xcodeproj/project.pbxproj: Sorted.
2408         * manual-tests/NPN_Invoke/NPN_Invoke.xcodeproj/project.pbxproj: Sorted.
2409
2410 2008-12-08  Tony Chang  <tony@chromium.org>
2411
2412         Reviewed by Eric Seidel.
2413
2414         Add a bool to GraphicsContext so that shadows can ignore
2415         transformations.  This is needed by HTML canvas element
2416         where the spec says shadows are applied w/o transformations.
2417         https://bugs.webkit.org/show_bug.cgi?id=22580
2418
2419         No functional changes, thus no tests.
2420
2421         * html/CanvasRenderingContext2D.cpp:
2422         (WebCore::CanvasRenderingContext2D::setShadow):
2423         (WebCore::CanvasRenderingContext2D::applyShadow):
2424         * html/HTMLCanvasElement.cpp:
2425         (WebCore::HTMLCanvasElement::createImageBuffer):
2426         * platform/graphics/GraphicsContext.cpp:
2427         (WebCore::GraphicsContext::setShadowsIgnoreTransforms):
2428         * platform/graphics/GraphicsContext.h:
2429         * platform/graphics/GraphicsContextPrivate.h:
2430         (WebCore::GraphicsContextState::GraphicsContextState):
2431         * platform/graphics/cg/GraphicsContextCG.cpp:
2432         (WebCore::GraphicsContext::setPlatformShadow):
2433
2434 2008-12-08  Julien Chaffraix  <jchaffraix@webkit.org>
2435
2436         Reviewed by Darin Adler.
2437
2438         Bug 17897: Not Rendering Images Imported from XHTML Document
2439         <rdar://problem/5827614>
2440
2441         When we were loading document with XMLHttpRequest that contained images, the images
2442         would not be fetched as they would not be displayed. However if we inserted such
2443         an image element into a rendered document, we would not fetch the image and thus never
2444         display it.
2445
2446         Now we check if the image has been loaded when we insert an HTMLImageElement into a
2447         document.
2448         To enable this, the image loader has an error flag. To avoid doing several attempts
2449         when we know that the image is in error, we store the failed URL.
2450         However Firefox and Opera ignore errors when the 'src' attribute changes and thus
2451         we also have an updateFromElementIgnoringPreviousError to match the other browser.
2452
2453         Tests: http/tests/misc/image-blocked-src-change.html
2454                http/tests/misc/image-blocked-src-no-change.html
2455                http/tests/xmlhttprequest/xmlhttprequest-image-not-loaded-svg.svg
2456                http/tests/xmlhttprequest/xmlhttprequest-image-not-loaded.html
2457
2458         * html/HTMLEmbedElement.cpp:
2459         (WebCore::HTMLEmbedElement::parseMappedAttribute): Changed to call updateFromElementIgnoringPreviousError.
2460         * html/HTMLImageElement.cpp:
2461         (WebCore::HTMLImageElement::parseMappedAttribute): Ditto.
2462         (WebCore::HTMLImageElement::insertedIntoDocument): Call updateFromElement if we do not have
2463         an image.
2464
2465         * html/HTMLInputElement.cpp:
2466         (WebCore::HTMLInputElement::parseMappedAttribute): Changed to call updateFromElementIgnoringPreviousError.
2467         * html/HTMLObjectElement.cpp:
2468         (WebCore::HTMLObjectElement::parseMappedAttribute): Ditto.
2469         * html/HTMLVideoElement.cpp:
2470         (WebCore::HTMLVideoElement::parseMappedAttribute): Ditto.
2471         * loader/ImageLoader.cpp:
2472         (WebCore::ImageLoader::setImage): Added an assertion.
2473         (WebCore::ImageLoader::updateFromElement): Added a check for load error (to avoid displaying
2474         multiple errors in the console for a single image load).
2475
2476         (WebCore::ImageLoader::updateFromElementIgnoringPreviousError): This method clears previous error
2477         before calling updateFromElement.
2478
2479         (WebCore::ImageLoader::notifyFinished): Added an assertion.
2480         * loader/ImageLoader.h:
2481         * svg/SVGImageElement.cpp:
2482         (WebCore::SVGImageElement::svgAttributeChanged): Changed to call updateFromElementIgnoringPreviousError.
2483
2484 2008-12-08  David Hyatt  <hyatt@apple.com>
2485
2486         Make scrollbar creation virtual on ScrollView so that FrameView can have the capability to create
2487         custom CSS scrollbars.
2488
2489         Reviewed by Eric Seidel
2490
2491         * page/FrameView.cpp:
2492         (WebCore::FrameView::createScrollbar):
2493         * page/FrameView.h:
2494         * platform/ScrollView.cpp:
2495         (WebCore::ScrollView::setHasHorizontalScrollbar):
2496         (WebCore::ScrollView::setHasVerticalScrollbar):
2497         (WebCore::ScrollView::createScrollbar):
2498         * platform/ScrollView.h:
2499
2500 2008-12-08  Dan Bernstein  <mitz@apple.com>
2501
2502         Reviewed by John Sullivan.
2503
2504         - WebCore part of tracking the global history item for a WebView
2505
2506         * loader/FrameLoader.cpp:
2507         (WebCore::FrameLoader::checkLoadCompleteForThisFrame): Set the page's
2508         global history item to the current back/forward list item, respecting
2509         private browsing mode.
2510         (WebCore::FrameLoader::continueLoadAfterNavigationPolicy): Ditto in this
2511         case.
2512         (WebCore::FrameLoader::goToItem): Ditto in this case.
2513         (WebCore::FrameLoader::updateHistoryForStandardLoad): If this load
2514         creates a new global history item, set the page's global history item
2515         to it.
2516         (WebCore::FrameLoader::updateHistoryForRedirectWithLockedHistory):
2517         Ditto.
2518         * page/Page.cpp:
2519         (WebCore::Page::setGlobalHistoryItem): Added this setter.
2520         * page/Page.h: Added a m_globalHistoryItem data member.
2521         (WebCore::Page::globalHistoryItem): Added this getter.
2522
2523 2008-12-08  Antti Koivisto  <antti@apple.com>
2524
2525         Reviewed by Dave Kilzer.
2526
2527         A few stylistic fixes suggested by Dave Kilzer.
2528
2529         * css/CSSPrimitiveValue.cpp:
2530         (WebCore::CSSPrimitiveValue::createIdentifier):
2531         (WebCore::CSSPrimitiveValue::create):
2532
2533 2008-12-08  Alexey Proskuryakov  <ap@webkit.org>
2534
2535         Reviewed by Darin Adler.
2536
2537         https://bugs.webkit.org/show_bug.cgi?id=22737
2538         Try debug version when locating CFNetwork
2539
2540         * platform/network/cf/ResourceRequestCFNet.cpp:
2541         (WebCore::findCFNetworkModule):
2542         (WebCore::findCFURLRequestSetContentDispositionEncodingFallbackArrayFunction):
2543         (WebCore::findCFURLRequestCopyContentDispositionEncodingFallbackArrayFunction):
2544         * platform/network/win/CookieJarCFNetWin.cpp:
2545         (WebCore::findCFNetworkModule):
2546         (WebCore::findIsHTTPOnlyFunction):
2547
2548 2008-12-08  Aaron Boodman  <aa@chromium.org>
2549
2550         Reviewed by Stephanie Lewis.
2551
2552         https://bugs.webkit.org/show_bug.cgi?id=22301
2553         Make dispatchDidFinishLoading() always fire before didFinishLoadForFrame().
2554
2555         * loader/FrameLoader.cpp:
2556         (WebCore::FrameLoader::finishedParsing):
2557
2558 2008-12-08  Trenton Schulz <trenton.schulz@nokia.com>
2559
2560         Rubber-stamped by Tor Arne Vestbø.
2561
2562         Fix build warning on Mac
2563
2564         * platform/text/mac/StringImplMac.mm:
2565
2566 2008-12-08  Simon Hausmann  <simon.hausmann@nokia.com>
2567
2568         Fix the Qt build.
2569
2570         * bridge/qt/qt_runtime.cpp:
2571         (JSC::Bindings::convertQVariantToValue): Pass JSGlobalData to RegExp
2572           constructor.
2573
2574 2008-12-08  Oliver Hunt  <oliver@apple.com>
2575
2576         Reviewed by Alexey Proskuryakov.
2577
2578         Bug 22398: r39059: Crash when clearing webkitTransitionDuration in webkitTransitionEnd event handler
2579         <rdar://problem/6426245> REGRESSION(r39059): Reproducible crash when clearing webkitTransitionDuration in webkitTransitionEnd event handler (22398)
2580
2581         This regression was caused by r39059 replacing the protector on the active
2582         animation with a protector on just the composition.  It turns out that both
2583         protectors are necessary.
2584
2585         Test: transitions/transition-duration-cleared-in-transitionend-crash.html
2586
2587         * page/animation/AnimationBase.cpp:
2588         (WebCore::AnimationBase::animationTimerCallbackFired):
2589
2590 2008-12-08  Dmitry Titov  <dimich@chromium.org>
2591
2592         Reviewed by Alexey Proskuryakov.
2593
2594         https://bugs.webkit.org/show_bug.cgi?id=22732
2595         Remove unused files PausedTimeouts.h,.cpp
2596         The change that deprecated this code was https://bugs.webkit.org/show_bug.cgi?id=22620
2597
2598         * GNUmakefile.am:
2599         * WebCore.pro:
2600         * WebCore.scons:
2601         * WebCore.vcproj/WebCore.vcproj:
2602         * WebCore.xcodeproj/project.pbxproj:
2603         * WebCoreSources.bkl:
2604           These are build files which had PausedTimeouts referenced.
2605
2606         * bindings/js/PausedTimeouts.cpp: Removed.
2607         * bindings/js/PausedTimeouts.h: Removed.
2608         * bindings/js/ScriptController.cpp: Removed '#include'
2609         * page/Chrome.cpp: Removed '#include' and unused variable.
2610
2611 2008-12-07  Simon Fraser  <simon.fraser@apple.com>
2612
2613         Reviewed by Dan Bernstein
2614
2615         https://bugs.webkit.org/show_bug.cgi?id=22594
2616
2617         Fix issues which break reading inline style for -webkit-transition
2618         and -webkit-transform-origin.
2619         
2620         Test: fast/css/transform-inline-style.html
2621
2622         * css/CSSMutableStyleDeclaration.cpp:
2623         (WebCore::CSSMutableStyleDeclaration::getPropertyValue): Add cases 
2624         for CSSPropertyWebkitTransformOrigin and CSSPropertyWebkitTransition
2625         so that these shorthand properties are returned correctly.
2626         * css/CSSParser.cpp:
2627         (WebCore::CSSParser::parseAnimationProperty): Create CSSPrimitiveValues
2628         with the correct CSSValueAll and CSSValueNone identifiers, not the
2629         RenderStyle-level cAnimateAll, cAnimateNone.
2630         * css/CSSStyleSelector.cpp:
2631         (WebCore::CSSStyleSelector::mapAnimationProperty): Special-case CSSValueAll
2632         and CSSValueNone values to set cAnimateAll and cAnimateNone transition properties.
2633
2634 2008-12-07  Antti Koivisto  <antti@apple.com>
2635
2636         Reviewed by Darin Adler.
2637
2638         https://bugs.webkit.org/show_bug.cgi?id=22717
2639         Make CSS values use less memory
2640         
2641         Share CSSPrimitiveValue objects for commonly used values including
2642         - idents
2643         - colors
2644         - small integers
2645         
2646         This reduces the amount CSSPrimitiveValue instances by > 80%.
2647
2648         * css/CSSPrimitiveValue.cpp:
2649         (WebCore::CSSPrimitiveValue::createIdentifier):
2650         (WebCore::CSSPrimitiveValue::createColor):
2651         (WebCore::CSSPrimitiveValue::create):
2652         * css/CSSPrimitiveValue.h:
2653         (WebCore::CSSPrimitiveValue::create):
2654
2655 2008-12-07  Antti Koivisto  <antti@apple.com>
2656
2657         Reviewed by Darin Adler.
2658
2659         https://bugs.webkit.org/show_bug.cgi?id=22717
2660         Make CSS values use less memory
2661
2662         Get CSSValues off from the common StyleBase base class. They don't
2663         need a parent pointer or anything else there and there is no real
2664         reason to have them in same data structures with other CSSOM objects.
2665         
2666         Disabled (instead of refactoring around the lack of common base) the ability 
2667         to have style declaration blocks as CSS variable values. They don't exist in 
2668         the spec so I wasn't sure if they have future or not. It would not be hard to 
2669         get them back. CSS variables are in any case an experimental feature and 
2670         not enabled by default.
2671
2672         * css/CSSInitialValue.h:
2673         (WebCore::CSSInitialValue::createExplicit):
2674         (WebCore::CSSInitialValue::createImplicit):
2675         * css/CSSParser.cpp:
2676         (WebCore::CSSParser::addVariableDeclarationBlock):
2677         * css/CSSParser.h:
2678         * css/CSSValue.h:
2679         (WebCore::CSSValue::~CSSValue):
2680         (WebCore::CSSValue::parserValue):
2681         * css/CSSVariablesDeclaration.cpp:
2682         (WebCore::CSSVariablesDeclaration::CSSVariablesDeclaration):
2683         (WebCore::CSSVariablesDeclaration::getVariableValue):
2684         (WebCore::CSSVariablesDeclaration::removeVariable):
2685         (WebCore::CSSVariablesDeclaration::addParsedVariable):
2686         (WebCore::CSSVariablesDeclaration::getParsedVariable):
2687         (WebCore::CSSVariablesDeclaration::getParsedVariableDeclarationBlock):
2688         * css/CSSVariablesDeclaration.h:
2689         (WebCore::CSSVariablesDeclaration::create):
2690         * css/StyleBase.h:
2691
2692 2008-12-07  Dirk Schulze  <krit@webkit.org>
2693
2694         Reviewed by Oliver Hunt.
2695
2696         Add gradient and pattern support for strokeRect on canvas/Cg.
2697
2698         Canvas strokeRect() doesn't support gradients
2699         https://bugs.webkit.org/show_bug.cgi?id=19790
2700
2701         Test: fast/canvas/canvas-strokeRect.html
2702
2703         * platform/graphics/cg/GraphicsContextCG.cpp:
2704         (WebCore::GraphicsContext::strokeRect):
2705
2706 2008-12-06  Dirk Schulze  <krit@webkit.org>
2707
2708         Reviewed by Oliver Hunt.
2709
2710         Add support for setTransform() in canvas.
2711
2712         <canvas> lacks transform() and setTransform()
2713         https://bugs.webkit.org/show_bug.cgi?id=16604
2714
2715         Test: fast/canvas/canvas-setTransform.html
2716
2717         * html/CanvasRenderingContext2D.cpp:
2718         (WebCore::CanvasRenderingContext2D::State::State):
2719         (WebCore::CanvasRenderingContext2D::setStrokeStyle):
2720         (WebCore::CanvasRenderingContext2D::setFillStyle):
2721         (WebCore::CanvasRenderingContext2D::scale):
2722         (WebCore::CanvasRenderingContext2D::rotate):
2723         (WebCore::CanvasRenderingContext2D::translate):
2724         (WebCore::CanvasRenderingContext2D::transform):
2725         (WebCore::CanvasRenderingContext2D::setTransform):
2726         (WebCore::CanvasRenderingContext2D::beginPath):
2727         (WebCore::CanvasRenderingContext2D::closePath):
2728         (WebCore::CanvasRenderingContext2D::moveTo):
2729         (WebCore::CanvasRenderingContext2D::lineTo):
2730         (WebCore::CanvasRenderingContext2D::quadraticCurveTo):
2731         (WebCore::CanvasRenderingContext2D::bezierCurveTo):
2732         (WebCore::CanvasRenderingContext2D::arcTo):
2733         (WebCore::CanvasRenderingContext2D::arc):
2734         (WebCore::CanvasRenderingContext2D::rect):
2735         (WebCore::CanvasRenderingContext2D::fill):
2736         (WebCore::CanvasRenderingContext2D::stroke):
2737         (WebCore::CanvasRenderingContext2D::clip):
2738         (WebCore::CanvasRenderingContext2D::isPointInPath):
2739         (WebCore::CanvasRenderingContext2D::clearRect):
2740         (WebCore::CanvasRenderingContext2D::fillRect):
2741         (WebCore::CanvasRenderingContext2D::strokeRect):
2742         (WebCore::CanvasRenderingContext2D::drawImage):
2743         (WebCore::CanvasRenderingContext2D::drawImageFromRect):
2744         (WebCore::CanvasRenderingContext2D::willDraw):
2745         (WebCore::CanvasRenderingContext2D::drawTextInternal):
2746         * html/CanvasRenderingContext2D.h:
2747         * html/CanvasRenderingContext2D.idl:
2748         * html/HTMLCanvasElement.cpp:
2749         (WebCore::HTMLCanvasElement::baseTransform):
2750         * html/HTMLCanvasElement.h:
2751         * platform/graphics/ImageBuffer.h:
2752         (WebCore::ImageBuffer::baseTransform):
2753
2754 2008-12-06  Antti Koivisto  <antti@apple.com>
2755
2756         Reviewed by Darin Adler.
2757
2758         Also copy m_implicit field. Darin wanted this change commited separately.
2759
2760         * css/CSSProperty.h:
2761         (WebCore::CSSProperty::operator=):
2762
2763 2008-12-06  Antti Koivisto  <antti@apple.com>
2764
2765         Reviewed by Darin Adler.
2766
2767         https://bugs.webkit.org/show_bug.cgi?id=22379
2768         Make CSSOM use less memory
2769         
2770         Use vector instead of a double linked list for properties in CSSMutableStyleDeclaration.
2771         
2772         Taught setter functions to use existing slots to avoid memory moves, plus some
2773         other optimizations.
2774
2775         * WebCore.xcodeproj/project.pbxproj:
2776         * css/CSSMutableStyleDeclaration.cpp:
2777         (WebCore::CSSMutableStyleDeclaration::CSSMutableStyleDeclaration):
2778         (WebCore::CSSMutableStyleDeclaration::operator=):
2779         (WebCore::CSSMutableStyleDeclaration::getPropertyCSSValue):
2780         (WebCore::CSSMutableStyleDeclaration::removeShorthandProperty):
2781         (WebCore::CSSMutableStyleDeclaration::removeProperty):
2782         (WebCore::CSSMutableStyleDeclaration::getPropertyPriority):
2783         (WebCore::CSSMutableStyleDeclaration::getPropertyShorthand):
2784         (WebCore::CSSMutableStyleDeclaration::isPropertyImplicit):
2785         (WebCore::CSSMutableStyleDeclaration::setProperty):
2786         (WebCore::CSSMutableStyleDeclaration::setPropertyInternal):
2787         (WebCore::CSSMutableStyleDeclaration::setStringProperty):
2788         (WebCore::CSSMutableStyleDeclaration::setImageProperty):
2789         (WebCore::CSSMutableStyleDeclaration::parseDeclaration):
2790         (WebCore::CSSMutableStyleDeclaration::addParsedProperties):
2791         (WebCore::CSSMutableStyleDeclaration::addParsedProperty):
2792         (WebCore::CSSMutableStyleDeclaration::setLengthProperty):
2793         (WebCore::CSSMutableStyleDeclaration::length):
2794         (WebCore::CSSMutableStyleDeclaration::item):
2795         (WebCore::CSSMutableStyleDeclaration::cssText):
2796         (WebCore::CSSMutableStyleDeclaration::setCssText):
2797         (WebCore::CSSMutableStyleDeclaration::merge):
2798         (WebCore::CSSMutableStyleDeclaration::removePropertiesInSet):
2799         (WebCore::CSSMutableStyleDeclaration::copy):
2800         (WebCore::CSSMutableStyleDeclaration::findPropertyWithId):
2801         * css/CSSMutableStyleDeclaration.h:
2802         (WebCore::CSSMutableStyleDeclarationConstIterator::operator*):
2803         (WebCore::CSSMutableStyleDeclarationConstIterator::operator->):
2804         (WebCore::CSSMutableStyleDeclarationConstIterator::operator!=):
2805         (WebCore::CSSMutableStyleDeclarationConstIterator::operator==):
2806         (WebCore::CSSMutableStyleDeclaration::create):
2807         (WebCore::CSSMutableStyleDeclaration::begin):
2808         (WebCore::CSSMutableStyleDeclaration::end):
2809         (WebCore::CSSMutableStyleDeclarationConstIterator::CSSMutableStyleDeclarationConstIterator):
2810         (WebCore::CSSMutableStyleDeclarationConstIterator::~CSSMutableStyleDeclarationConstIterator):
2811         (WebCore::CSSMutableStyleDeclarationConstIterator::operator=):
2812         (WebCore::CSSMutableStyleDeclarationConstIterator::operator++):
2813         (WebCore::CSSMutableStyleDeclarationConstIterator::operator--):
2814         * css/CSSProperty.h:
2815         (WTF::):
2816         * css/CSSStyleDeclaration.cpp:
2817         (WebCore::CSSStyleDeclaration::diff):
2818         (WebCore::CSSStyleDeclaration::copyPropertiesInSet):
2819         * css/CSSStyleSelector.cpp:
2820         (WebCore::CSSStyleSelector::resolveVariablesForDeclaration):
2821         (WebCore::CSSStyleSelector::keyframeStylesForAnimation):
2822         (WebCore::CSSStyleSelector::applyDeclarations):
2823         * dom/EventTarget.h:
2824         * editing/ApplyStyleCommand.cpp:
2825         (WebCore::StyleChange::init):
2826         (WebCore::ApplyStyleCommand::isHTMLStyleNode):
2827         (WebCore::ApplyStyleCommand::removeHTMLFontStyle):
2828         (WebCore::ApplyStyleCommand::removeCSSStyle):
2829         * editing/Editor.cpp:
2830         (WebCore::Editor::selectionStartHasStyle):
2831         (WebCore::updateState):
2832         * editing/ReplaceSelectionCommand.cpp:
2833         (WebCore::ReplaceSelectionCommand::handleStyleSpans):
2834         * editing/markup.cpp:
2835         (WebCore::appendStartMarkup):
2836
2837 2008-12-06  Simon Fraser  <simon.fraser@apple.com>
2838
2839         Reviewed by Antti Koivisto, Dan Bernstein
2840
2841         https://bugs.webkit.org/show_bug.cgi?id=22088
2842
2843         Fix logic related to repainting when transform changes:
2844         If an object has a layer, and the transform changes, then we need
2845         to do a repaintIncludingDescendants(), not just a repaint.
2846         
2847         Test: fast/repaint/transform-repaint-descendants.html
2848
2849         * rendering/RenderObject.cpp:
2850         (WebCore::RenderObject::styleWillChange):
2851
2852 2008-12-06  Simon Fraser  <simon.fraser@apple.com>
2853
2854         Reviewed by Dan Bernstein
2855
2856         https://bugs.webkit.org/show_bug.cgi?id=15739
2857
2858         When painting the selection on a replaced element, paint
2859         using local coordinates so that the selection is correctly
2860         painted for transformed elements.
2861
2862         Test: fast/replaced/selection-rect-transform.html
2863
2864         * rendering/RenderReplaced.cpp:
2865         (WebCore::RenderReplaced::paint):
2866
2867 2008-12-06  Simon Fraser  <simon.fraser@apple.com>
2868
2869         Reviewed by Dave Hyatt
2870
2871         https://bugs.webkit.org/show_bug.cgi?id=15671
2872         
2873         Fix caret rendering to behave correctly with transforms:
2874         * Rename caretRect() methods to localCaretRect() and
2875           absoluteCaretBounds() as appropriate
2876         * Fix localCaretRect() methods to return a rect in the
2877           appropriate coordinates.
2878         * Pass tx, ty down through the paintCaret() methods, after fixing them
2879           up to account for differences between contents coords, and renderer-local
2880           coords (via RenderBlock::offsetForContents()).
2881         * Remove m_caretPositionOnLayout from SelectionController, and instead
2882           call invalidateSelection() from RenderLayer::scrollToOffset(), because
2883           we can no longer assume simple x/y offsets from scrolling with transforms.
2884         * Move the logic to compute which RenderObject actually paints the caret into
2885           SelectionController::caretRenderer(), rather than having it in RenderBlock.
2886         * SelectionController now computes and caches a local caret rect. For invalidation,
2887           it computes the absolute bounds of that (possibly transformed) local rect.
2888           The local rect is computed in the coordinate system of the RenderObject that
2889           will paint the caret (this may require offsetting from the actual renderer
2890           at the start of the selection).
2891         * Fix LayoutState(RenderObject* root) to take transforms into account
2892         * Make offsetFromContainer() a virtual method on RenderObject, and implement
2893           the RenderObject version. It's used to map from selection start renderer
2894           to caret renderer.
2895
2896         Test: fast/transforms/transformed-caret.html
2897
2898         * WebCore.base.exp:
2899         * editing/DeleteSelectionCommand.cpp:
2900         (WebCore::DeleteSelectionCommand::mergeParagraphs):
2901         * editing/SelectionController.cpp:
2902         (WebCore::SelectionController::SelectionController):
2903         (WebCore::absoluteCaretY):
2904         (WebCore::SelectionController::modify):
2905         (WebCore::SelectionController::xPosForVerticalArrowNavigation):
2906         (WebCore::SelectionController::layout):
2907         (WebCore::SelectionController::caretRenderer):
2908         (WebCore::SelectionController::localCaretRect):
2909         (WebCore::SelectionController::absoluteCaretBounds):
2910         (WebCore::SelectionController::caretRepaintRect):
2911         (WebCore::SelectionController::recomputeCaretRect):
2912         (WebCore::SelectionController::invalidateCaretRect):
2913         (WebCore::SelectionController::paintCaret):
2914         (WebCore::SelectionController::caretRendersInsideNode):
2915         * editing/SelectionController.h:
2916         * editing/VisiblePosition.cpp:
2917         (WebCore::VisiblePosition::localCaretRect):
2918         (WebCore::VisiblePosition::absoluteCaretBounds):
2919         (WebCore::VisiblePosition::xOffsetForVerticalNavigation):
2920         * editing/VisiblePosition.h:
2921         * editing/mac/SelectionControllerMac.mm:
2922         (WebCore::SelectionController::notifyAccessibilityForSelectionChange):
2923         * html/HTMLElement.cpp:
2924         (WebCore::HTMLElement::isContentEditable):
2925         * page/AccessibilityRenderObject.cpp:
2926         (WebCore::AccessibilityRenderObject::boundsForVisiblePositionRange):
2927         * page/Frame.cpp:
2928         (WebCore::Frame::firstRectForRange):
2929         (WebCore::Frame::selectionLayoutChanged):
2930         (WebCore::Frame::paintCaret):
2931         (WebCore::Frame::paintDragCaret):
2932         (WebCore::Frame::revealSelection):
2933         (WebCore::Frame::revealCaret):
2934         * page/Frame.h:
2935         * rendering/LayoutState.cpp:
2936         (WebCore::LayoutState::LayoutState):
2937         * rendering/RenderBlock.cpp:
2938         (WebCore::RenderBlock::paintCaret):
2939         (WebCore::RenderBlock::paintObject):
2940         (WebCore::RenderBlock::positionForCoordinates):
2941         (WebCore::RenderBlock::offsetForContents):
2942         * rendering/RenderBlock.h:
2943         * rendering/RenderBox.cpp:
2944         (WebCore::RenderBox::localCaretRect):
2945         * rendering/RenderBox.h:
2946         * rendering/RenderFlow.cpp:
2947         (WebCore::RenderFlow::localCaretRect):
2948         * rendering/RenderFlow.h:
2949         * rendering/RenderLayer.cpp:
2950         (WebCore::RenderLayer::scrollToOffset):
2951         * rendering/RenderObject.cpp:
2952         (WebCore::RenderObject::localCaretRect):
2953         * rendering/RenderObject.h:
2954         * rendering/RenderSVGInlineText.cpp:
2955         (WebCore::RenderSVGInlineText::localCaretRect):
2956         * rendering/RenderSVGInlineText.h:
2957         * rendering/RenderText.cpp:
2958         (WebCore::RenderText::RenderText):
2959         (WebCore::RenderText::localCaretRect):
2960         * rendering/RenderText.h:
2961
2962 2008-12-06  David Kilzer  <ddkilzer@apple.com>
2963
2964         Bug 22711: Current svn (build 39065) fails to compile
2965
2966         <https://bugs.webkit.org/show_bug.cgi?id=22711>
2967
2968         BUILD FIX for r39065: Forgot parentheses after "document".
2969
2970         Bug 22666: Clean up data structures used when collecting URLs of subresources for webarchives
2971         <https://bugs.webkit.org/show_bug.cgi?id=22666>
2972
2973         * svg/SVGFEImageElement.cpp:
2974         (WebCore::SVGFEImageElement::addSubresourceAttributeURLs): Changed
2975         document to document().
2976
2977 2008-12-06  Dmitry Titov  <dimich@chromium.org>
2978
2979         Reviewed by Alexey Proskuryakov.
2980
2981         https://bugs.webkit.org/show_bug.cgi?id=22710
2982         Memory leak due to circular reference Document->DOMTimer->ScheduledAction->[JS objects]->Document
2983
2984         * bindings/js/DOMTimer.cpp:
2985         (WebCore::DOMTimer::stop): Delete ScheduledAction, which contains a protected object.
2986
2987 2008-12-06  David Kilzer  <ddkilzer@apple.com>
2988
2989         Bug 22666: Clean up data structures used when collecting URLs of subresources for webarchives
2990
2991         <https://bugs.webkit.org/show_bug.cgi?id=22666>
2992
2993         Reviewed by Darin Adler.
2994
2995         When creating a webarchive from WebCore::LegacyWebArchive::create(),
2996         HashSet<String>, Vector<KURL> and Vector<String> were all used to
2997         store a list of URLs for resources found in the document.  Instead
2998         use a single ListHashSet<KURL> to store the list and resolve the
2999         relative URLs as they're added.  We use a new inline method called
3000         WebCore::addSubresourceURL() to add KURL objects to the ListHashSet
3001         to prevent "null" KURL objects from crashing in the KURL hashing
3002         function.
3003
3004         * WebCore.base.exp: Changed export of
3005         WebCore::Node::getSubresourceURLs() to take a ListHashSet<KURL>
3006         argument instead of a Vector<KURL>.
3007
3008         * WebCore.xcodeproj/project.pbxproj: Marked KURLHash.h as a private
3009         header for use in WebKit.
3010
3011         * css/CSSStyleSheet.cpp:
3012         (WebCore::CSSStyleSheet::addSubresourceStyleURLs): Renamed from
3013         addSubresourceURLStrings().  Changed to use ListHashSet<KURL>
3014         instead of HashSet<String>.  Cleaned up code.
3015         * css/CSSStyleSheet.h:
3016         (WebCore::CSSStyleSheet::addSubresourceStyleURLs): Ditto.
3017         * css/StyleSheet.h:
3018         (WebCore::StyleSheet::addSubresourceStyleURLs): Ditto.
3019
3020         * dom/Node.cpp:
3021         (WebCore::Node::getSubresourceURLs): Changed to use
3022         ListHashSet<KURL> instead of Vector<KURL>.  Cleaned up code.
3023         * dom/Node.h:
3024         (WebCore::Node::getSubresourceURLs): Ditto.
3025         (WebCore::Node::addSubresourceAttributeURLs): Renamed from
3026         getSubresourceAttributeStrings().  Changed to use ListHashSet<KURL>
3027         instead of Vector<String>.
3028         (WebCore::addSubresourceURL): Added.  Safely adds new KURL objects
3029         to a ListHashSet<KURL> object.  A "null" KURL object will cause the
3030         hash function to crash since it contains a null StringImpl.  Used in
3031         Node::addSubresourceAttributeURLs() and addSubresourceStyleURLs() in
3032         the style subsystem.
3033
3034         * dom/ProcessingInstruction.cpp:
3035         (WebCore::ProcessingInstruction::addSubresourceAttributeURLs):
3036         Renamed from getSubresourceAttributeStrings().  Changed to use
3037         ListHashSet<KURL> instead of Vector<String>.  Use
3038         WebCore::addSubresourceURL() to add new KURL objects.
3039         * dom/ProcessingInstruction.h: Ditto.
3040         * html/HTMLBodyElement.cpp:
3041         (WebCore::HTMLBodyElement::addSubresourceAttributeURLs): Ditto.
3042         * html/HTMLBodyElement.h: Ditto.
3043         * html/HTMLEmbedElement.cpp:
3044         (WebCore::HTMLEmbedElement::addSubresourceAttributeURLs): Ditto.
3045         * html/HTMLEmbedElement.h: Ditto.
3046         * html/HTMLImageElement.cpp:
3047         (WebCore::HTMLImageElement::addSubresourceAttributeURLs): Ditto.
3048         * html/HTMLImageElement.h: Ditto.
3049         * html/HTMLInputElement.cpp:
3050         (WebCore::HTMLInputElement::addSubresourceAttributeURLs): Ditto.
3051         * html/HTMLInputElement.h: Ditto.
3052         * html/HTMLLinkElement.cpp:
3053         (WebCore::HTMLLinkElement::addSubresourceAttributeURLs): Ditto.
3054         * html/HTMLLinkElement.h: Ditto.
3055         * html/HTMLObjectElement.cpp:
3056         (WebCore::HTMLObjectElement::addSubresourceAttributeURLs): Ditto.
3057         * html/HTMLObjectElement.h: Ditto.
3058         * html/HTMLParamElement.cpp:
3059         (WebCore::HTMLParamElement::addSubresourceAttributeURLs): Ditto.
3060         * html/HTMLParamElement.h: Ditto.
3061         * html/HTMLScriptElement.cpp:
3062         (WebCore::HTMLScriptElement::addSubresourceAttributeURLs): Ditto.
3063         * html/HTMLScriptElement.h: Ditto.
3064         * html/HTMLStyleElement.cpp:
3065         (WebCore::HTMLStyleElement::addSubresourceAttributeURLs): Ditto.
3066         * html/HTMLStyleElement.h: Ditto.
3067         * html/HTMLTableCellElement.cpp:
3068         (WebCore::HTMLTableCellElement::addSubresourceAttributeURLs): Ditto.
3069         * html/HTMLTableCellElement.h: Ditto.
3070         * html/HTMLTableElement.cpp:
3071         (WebCore::HTMLTableElement::addSubresourceAttributeURLs): Ditto.
3072         * html/HTMLTableElement.h: Ditto.
3073
3074         * loader/archive/cf/LegacyWebArchive.cpp:
3075         (WebCore::LegacyWebArchive::create): Changed from using
3076         HashSet<String> to ListHashSet<KURL> for tracking unique
3077         subresources.  Changed from using Vector<KURL> to ListHashSet<KURL>
3078         when calling WebCore::Node::getSubresourceURLs().  Cleaned up code.
3079
3080         * svg/SVGCursorElement.cpp:
3081         (WebCore::SVGCursorElement::addSubresourceAttributeURLs): Renamed
3082         from getSubresourceAttributeStrings().  Changed to use
3083         ListHashSet<KURL> instead of Vector<String>.  Use
3084         WebCore::addSubresourceURL() to add new KURL objects.
3085         * svg/SVGCursorElement.h: Ditto.
3086         * svg/SVGFEImageElement.cpp:
3087         (WebCore::SVGFEImageElement::addSubresourceAttributeURLs): Ditto.
3088         * svg/SVGFEImageElement.h: Ditto.
3089         * svg/SVGImageElement.cpp:
3090         (WebCore::SVGImageElement::addSubresourceAttributeURLs): Ditto.
3091         * svg/SVGImageElement.h: Ditto.
3092         * svg/SVGScriptElement.cpp:
3093         (WebCore::SVGScriptElement::addSubresourceAttributeURLs): Ditto.
3094         * svg/SVGScriptElement.h: Ditto.
3095
3096 2008-12-05  Brett Wilson  <brettw@chromium.org>
3097
3098         Reviewed by Darin Adler.
3099
3100         Make the page group use the proper link hashing functions rather than
3101         calling the string hash functions directly. Add Chromium-specfic ifdefs
3102         in the visited link computation functions to allow integration.
3103
3104         * page/PageGroup.cpp:
3105         (WebCore::PageGroup::isLinkVisited):
3106         (WebCore::PageGroup::addVisitedLink):
3107         * platform/LinkHash.cpp:
3108         (WebCore::visitedLinkHash):
3109         * platform/LinkHash.h:
3110
3111 2008-12-05  Chris Marrin  <cmarrin@apple.com>
3112
3113         Reviewed by Dave Hyatt.
3114
3115         Fix for https://bugs.webkit.org/show_bug.cgi?id=22635
3116         For iteration and end events, previous fixes to prevent the deletion of
3117         Animation objects (ref counting and hanging onto a ref during event callbacks)
3118         was sufficient to prevent dangling pointers. But start events are sent in
3119         the styleAvailable() call, which iterates over CompositeAnimation objects,
3120         which are not ref counted. So that object can get destroyed in the event
3121         handler while still active. So I added refcounting for CompositeAnimations.
3122
3123         Additionally, when am iterating over the CompositingAnimation list, it can
3124         be deleted, which mutates the list. So I now make one pass over the list
3125         building a vector of CompositeAnimation objects that need to be called and
3126         then iterate over that vector to make the actual calls.
3127
3128         Finally, to make sure the lifetime of the CompositeAnimation exceeds that of
3129         the Animation objects it owns, I now keep a ref to the CompositeAnimation
3130         in the timer callback for the iteration and end events. That means I no
3131         longer need to keep a ref to the Animation objects themselves in that timer
3132         callback, since the CompositeAnimation already has one.
3133
3134         Tests: animations/animation-iteration-event-destroy-renderer.html
3135                animations/animation-start-event-destroy-renderer.html
3136
3137         * page/animation/AnimationBase.cpp:
3138         (WebCore::AnimationBase::updateStateMachine):
3139         (WebCore::AnimationBase::animationTimerCallbackFired):
3140         * page/animation/AnimationController.cpp:
3141         (WebCore::AnimationControllerPrivate::~AnimationControllerPrivate):
3142         (WebCore::AnimationControllerPrivate::accessCompositeAnimation):
3143         (WebCore::AnimationControllerPrivate::clear):
3144         (WebCore::AnimationControllerPrivate::styleAvailable):
3145         (WebCore::AnimationControllerPrivate::updateAnimationTimer):
3146         (WebCore::AnimationControllerPrivate::animationTimerFired):
3147         (WebCore::AnimationControllerPrivate::isAnimatingPropertyOnRenderer):
3148         (WebCore::AnimationControllerPrivate::suspendAnimations):
3149         (WebCore::AnimationControllerPrivate::resumeAnimations):
3150         (WebCore::AnimationControllerPrivate::pauseAnimationAtTime):
3151         (WebCore::AnimationControllerPrivate::pauseTransitionAtTime):
3152         (WebCore::AnimationController::updateAnimations):
3153         (WebCore::AnimationController::setAnimationStartTime):
3154         (WebCore::AnimationController::setTransitionStartTime):
3155         * page/animation/CompositeAnimation.cpp:
3156         (WebCore::CompositeAnimationPrivate::animationController):
3157         (WebCore::CompositeAnimationPrivate::isWaitingForStyleAvailable):
3158         (WebCore::CompositeAnimationPrivate::~CompositeAnimationPrivate):
3159         (WebCore::CompositeAnimationPrivate::clearRenderer):
3160         (WebCore::CompositeAnimation::clearRenderer):
3161         (WebCore::CompositeAnimation::animationController):
3162         (WebCore::CompositeAnimation::isWaitingForStyleAvailable):
3163         * page/animation/CompositeAnimation.h:
3164         (WebCore::CompositeAnimation::create):
3165
3166 2008-12-05  David Kilzer  <ddkilzer@apple.com>
3167
3168         Bug 22609: Provide a build-time choice when generating hash tables for properties of built-in DOM objects
3169
3170         <https://bugs.webkit.org/show_bug.cgi?id=22609>
3171         <rdar://problem/6331749>
3172
3173         Reviewed by Darin Adler.
3174
3175         Initial patch by Yosen Lin.  Adapted for ToT WebKit by David Kilzer.
3176
3177         Added back the code that generates a "compact" hash (instead of a
3178         perfect hash) as a build-time option using the
3179         ENABLE(PERFECT_HASH_SIZE) macro as defined in Lookup.h.
3180
3181         * bindings/scripts/CodeGeneratorJS.pm:
3182         (GenerateImplementation): Compute the number of elements that will
3183         be stored in each hash table and pass it to GenerateHashTable().
3184         (GenerateHashTable): Added new second parameter representing the
3185         number of elements to store in the compact hash table.  Added back
3186         code to compute compact hash tables.  Generate both hash table sizes
3187         and emit conditionalized code based on ENABLE(PERFECT_HASH_SIZE).
3188
3189 2008-12-05  Brett Wilson  <brettw@chromium.org>
3190
3191         Fix build bustage from previous patch.
3192
3193         * css/CSSSelector.h:
3194
3195 2008-12-05  Brett Wilson  <brettw@chromium.org>
3196
3197         Reviewed by Eric Seidel.
3198
3199         Add a missing include for OwnPtr to make CSSSelector compile without
3200         precompiled headers.
3201
3202         * css/CSSSelector.h:
3203
3204 2008-12-05  Finnur Thorarinsson  <finnur.webkit@gmail.com>
3205
3206         Reviewed by Darin Adler.
3207
3208         Bug 22579: Providing a function to ScrollbarClient.h which allows us to get at the tickmarks
3209         without relying on high-level WebCore types, as requested by Dave Hyatt.
3210         
3211         No functional changes, thus no test cases.
3212
3213         * page/FrameView.cpp:
3214         (WebCore::FrameView::getTickmarks):
3215         * page/FrameView.h:
3216         * platform/ScrollbarClient.h:
3217
3218 2008-12-05  Dean Jackson  <dino@apple.com>
3219
3220         Reviewed by David Hyatt.
3221
3222         Make sure Window event listeners also tell the
3223         Document about the event type, so noisy events
3224         will be dispatched even if nothing in the document
3225         is listening.
3226         https://bugs.webkit.org/show_bug.cgi?id=20572
3227
3228         * dom/Document.cpp:
3229         (WebCore::Document::addWindowEventListener):
3230
3231 2008-12-05  Adam Roben  <aroben@apple.com>
3232
3233         Windows build fix after r39026
3234
3235         * platform/network/cf/ResourceRequestCFNet.cpp:
3236         (WebCore::ResourceRequest::doUpdatePlatformRequest):
3237         (WebCore::ResourceRequest::doUpdateResourceRequest):
3238         Add some missing .get()s.
3239
3240 2008-12-05  Alexey Proskuryakov  <ap@webkit.org>
3241
3242         Tiger build fix.
3243
3244         * platform/network/mac/ResourceRequestMac.mm: Define NSUInteger.
3245
3246 2008-12-05  Alexey Proskuryakov  <ap@webkit.org>
3247
3248         Reviewed by Darin Adler.
3249
3250         <rdar://problem/6405599> Tiger Mail crashes when using "Mail Contents of This Page"
3251         in Safari before opening a mail message in Mail
3252
3253         * platform/mac/WebCoreObjCExtras.mm:
3254         (WebCoreObjCFinalizeOnMainThread):
3255         Don't call initializeThreading: we now expect the caller to do it, to simplify keeping
3256         Tiger and post-Tiger behavior in line.
3257
3258         * bindings/objc/DOMRGBColor.mm:
3259         (+[DOMRGBColor initialize]):
3260         * bindings/objc/WebScriptObject.mm:
3261         (+[WebScriptObject initialize]):
3262         * page/mac/AccessibilityObjectWrapper.mm:
3263         (+[AccessibilityObjectWrapper initialize]):
3264         * platform/mac/SharedBufferMac.mm:
3265         (+[WebCoreSharedBufferData initialize]):
3266         Call JSC::initializeThreading();
3267
3268 2008-12-05  Alexey Proskuryakov  <ap@webkit.org>
3269
3270         Reviewed by Darin Adler.
3271
3272         <rdar://problem/4072827> Downloaded non-ASCII file name becomes garbled
3273
3274         * platform/network/ResourceRequestBase.cpp:
3275         (WebCore::ResourceRequestBase::setResponseContentDispositionEncodingFallbackArray):
3276         * platform/network/ResourceRequestBase.h:
3277         * platform/network/cf/ResourceRequestCFNet.cpp:
3278         (WebCore::findCFURLRequestSetContentDispositionEncodingFallbackArrayFunction):
3279         (WebCore::findCFURLRequestCopyContentDispositionEncodingFallbackArrayFunction):
3280         (WebCore::setContentDispositionEncodingFallbackArray):
3281         (WebCore::copyContentDispositionEncodingFallbackArray):
3282         (WebCore::ResourceRequest::doUpdatePlatformRequest):
3283         (WebCore::ResourceRequest::doUpdateResourceRequest):
3284         * platform/network/mac/ResourceRequestMac.mm:
3285         (WebCore::ResourceRequest::doUpdateResourceRequest):
3286         (WebCore::ResourceRequest::doUpdatePlatformRequest):
3287         Added a way to specify encoding fallback list for Content-Disposition header.
3288
3289         * loader/FrameLoader.cpp: (WebCore::FrameLoader::addExtraFieldsToRequest): Generate and
3290         pass a list of encodings to try when decoding Content-Disposition header, as described
3291         in comments.
3292
3293 2008-12-05  Alexey Proskuryakov  <ap@webkit.org>
3294
3295         Reviewed by Darin Adler.
3296
3297         https://bugs.webkit.org/show_bug.cgi?id=22672
3298         ASSERT(m_table) when xhr.onabort creates another xhr or calls setTimeout
3299
3300         Test: http/tests/xmlhttprequest/send-on-abort.html
3301
3302         * dom/ScriptExecutionContext.cpp:
3303         (WebCore::ScriptExecutionContext::canSuspendActiveDOMObjects):
3304         (WebCore::ScriptExecutionContext::suspendActiveDOMObjects):
3305         (WebCore::ScriptExecutionContext::resumeActiveDOMObjects):
3306         (WebCore::ScriptExecutionContext::stopActiveDOMObjects):
3307         Add a comment explaining that ActiveDOMObject methods shouldn't execute arbitrary JS.
3308
3309         * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::stop): Don't dispatch events. This
3310         reverts a recent change that made the behavior slightly closer to Firefox - but the
3311         compatibility effect should be very minor if any, and Firefox itself behaves inconsistently.
3312
3313 2008-12-05  Tobias König <tobias.koenig@nokia.com>
3314
3315         Reviewed by Simon Hausmann.
3316
3317         Record required package dependencies for the Qt build for a correct
3318         pkg-config file.
3319
3320         * WebCore.pro:
3321
3322 2008-12-05  Tor Arne Vestbø  <tavestbo@trolltech.com>
3323
3324         Rubber-stamped by Simon Hausmann.
3325
3326         [Qt/Mac] Blacklist QuickTime plugin until we support the QuickDraw drawing model
3327
3328         * plugins/mac/PluginPackageMac.cpp:
3329         (WebCore::PluginPackage::fetchInfo):
3330         (WebCore::PluginPackage::isPluginBlacklisted):
3331
3332 2008-12-05  Jungshik Shin  <jshin@chromium.org>
3333
3334         Reviewed by Alexey Proskuryakov.
3335
3336         https://bugs.webkit.org/show_bug.cgi?id=22472
3337
3338         Revises charset alias map for TextCodecICU.
3339         - Uses windows-949 and windows-874 instead of windows-949-2000 and windows-874-2000
3340         - Replaces 'windows874' in a couple of place with 'windows-874' (for the canonical name)
3341         - Maps 'dos-874' to 'windows-874'. Currently, it's aliases to 'cp874', which is in turn
3342           mapped to 'TIS-620'. 'TIS-620' is manually aliased to 'windows-874'. We'd better directly
3343           alias 'dos-874' to 'windows-874'.
3344         - Replaces 'EUC-CN' with 'GBK' when it's used as the canonical name.
3345           Similar to the above case, we're getting rid of indirection that eventually leads to 'GBK' by
3346           directly going to 'GBK'.
3347         - Adds 'x-uhc' as an alias for 'windows-949'. It's used in some web pages.
3348
3349         Tests: fast/encoding/char-decoding-mac.html
3350                fast/encoding/char-decoding.html
3351
3352         * platform/text/TextCodecICU.cpp:
3353         (WebCore::TextCodecICU::registerExtendedEncodingNames):
3354
3355 2008-12-04  Kevin Watters  <kevinwatters@gmail.com>
3356
3357         Reviewed by Kevin Ollivier.
3358
3359         Add a MIME mapping for the .htm extension to wx and GTK ports.
3360         
3361         https://bugs.webkit.org/show_bug.cgi?id=22668
3362         
3363         * platform/gtk/MIMETypeRegistryGtk.cpp:
3364         (WebCore::):
3365         * platform/wx/MimeTypeRegistryWx.cpp:
3366         (WebCore::):
3367
3368 2008-12-04  Kevin Watters  <kevinwatters@gmail.com>
3369
3370         Reviewed by Kevin Ollivier.
3371
3372         Implement basic text paste support in wx and add notImplemented stubs
3373         to catch other methods.
3374         
3375         https://bugs.webkit.org/show_bug.cgi?id=22667
3376
3377         * platform/wx/PasteboardWx.cpp:
3378         (WebCore::Pasteboard::canSmartReplace):
3379         (WebCore::Pasteboard::plainText):
3380         (WebCore::Pasteboard::documentFragment):
3381         (WebCore::Pasteboard::writeImage):
3382
3383 2008-12-04  Kevin Ollivier  <kevino@theolliviers.com>
3384
3385         wx build fix for !USE(WXGC) build config.
3386
3387         * platform/graphics/wx/PathWx.cpp:
3388         (WebCore::Path::contains):
3389         (WebCore::Path::addLineTo):
3390         (WebCore::Path::addQuadCurveTo):
3391         (WebCore::Path::addBezierCurveTo):
3392         (WebCore::Path::addArcTo):
3393         (WebCore::Path::closeSubpath):
3394         (WebCore::Path::addArc):
3395         (WebCore::Path::addRect):
3396         (WebCore::Path::addEllipse):
3397         (WebCore::Path::transform):
3398         (WebCore::Path::apply):
3399         (WebCore::Path::isEmpty):
3400
3401 2008-12-04  Kevin Watters  <kevinwatters@gmail.com>
3402
3403         Reviewed by Kevin Ollivier.
3404
3405         Turn off styled controls until we can implement them properly.
3406         
3407         https://bugs.webkit.org/show_bug.cgi?id=22662
3408
3409         * platform/wx/RenderThemeWx.cpp:
3410         (WebCore::RenderThemeWx::isControlStyled):
3411
3412 2008-12-04  Kevin Watters  <kevinwatters@gmail.com>
3413
3414         Reviewed by Kevin Ollivier.
3415
3416         wx implementations for Path API.
3417
3418         https://bugs.webkit.org/show_bug.cgi?id=22661
3419
3420         * platform/graphics/wx/PathWx.cpp:
3421         (WebCore::Path::~Path):
3422         (WebCore::Path::contains):
3423         (WebCore::Path::addLineTo):
3424         (WebCore::Path::addQuadCurveTo):
3425         (WebCore::Path::addBezierCurveTo):
3426         (WebCore::Path::addArcTo):
3427         (WebCore::Path::closeSubpath):
3428         (WebCore::Path::addArc):
3429         (WebCore::Path::addRect):
3430         (WebCore::Path::addEllipse):
3431         (WebCore::Path::transform):
3432         (WebCore::Path::isEmpty):
3433
3434 2008-12-04  Julien Chaffraix  <jchaffraix@webkit.org>
3435
3436         Reviewed by Eric Seidel.
3437
3438         Bug 22564: Make HTML elements' constructors take a QualifiedName
3439         https://bugs.webkit.org/show_bug.cgi?id=22564
3440
3441         Updated the remaining constructors.
3442
3443         * bindings/js/JSImageConstructor.cpp:
3444         (WebCore::constructImage):
3445         * dom/Document.cpp:
3446         (WebCore::Document::getCSSCanvasElement):
3447         * editing/DeleteButton.cpp:
3448         (WebCore::DeleteButton::DeleteButton):
3449         * html/HTMLAppletElement.cpp:
3450         (WebCore::HTMLAppletElement::HTMLAppletElement):
3451         * html/HTMLAppletElement.h:
3452         * html/HTMLAreaElement.cpp:
3453         (WebCore::HTMLAreaElement::HTMLAreaElement):
3454         * html/HTMLAreaElement.h:
3455         * html/HTMLBaseFontElement.cpp:
3456         (WebCore::HTMLBaseFontElement::HTMLBaseFontElement):
3457         * html/HTMLBaseFontElement.h:
3458         * html/HTMLCanvasElement.cpp:
3459         (WebCore::HTMLCanvasElement::HTMLCanvasElement):
3460         * html/HTMLCanvasElement.h:
3461         * html/HTMLElementFactory.cpp:
3462         (WebCore::hrConstructor):
3463         (WebCore::paragraphConstructor):
3464         (WebCore::basefontConstructor):
3465         (WebCore::fontConstructor):
3466         (WebCore::anchorConstructor):
3467         (WebCore::imageConstructor):
3468         (WebCore::mapConstructor):
3469         (WebCore::areaConstructor):
3470         (WebCore::canvasConstructor):
3471         (WebCore::appletConstructor):
3472         (WebCore::embedConstructor):
3473         (WebCore::objectConstructor):
3474         (WebCore::paramConstructor):
3475         (WebCore::scriptConstructor):
3476         (WebCore::tableConstructor):
3477         (WebCore::tableCaptionConstructor):
3478         (WebCore::tableRowConstructor):
3479         * html/HTMLEmbedElement.cpp:
3480         (WebCore::HTMLEmbedElement::HTMLEmbedElement):
3481         * html/HTMLEmbedElement.h:
3482         * html/HTMLFontElement.cpp:
3483         (WebCore::HTMLFontElement::HTMLFontElement):
3484         * html/HTMLFontElement.h:
3485         * html/HTMLHRElement.cpp:
3486         (WebCore::HTMLHRElement::HTMLHRElement):
3487         * html/HTMLHRElement.h:
3488         * html/HTMLImageElement.cpp:
3489         (WebCore::HTMLImageElement::HTMLImageElement):
3490         * html/HTMLImageElement.h:
3491         * html/HTMLMapElement.cpp:
3492         (WebCore::HTMLMapElement::HTMLMapElement):
3493         * html/HTMLMapElement.h:
3494         * html/HTMLObjectElement.cpp:
3495         (WebCore::HTMLObjectElement::HTMLObjectElement):
3496         * html/HTMLObjectElement.h:
3497         * html/HTMLParagraphElement.cpp:
3498         (WebCore::HTMLParagraphElement::HTMLParagraphElement):
3499         * html/HTMLParagraphElement.h:
3500         * html/HTMLParamElement.cpp:
3501         (WebCore::HTMLParamElement::HTMLParamElement):
3502         * html/HTMLParamElement.h:
3503         * html/HTMLParser.cpp:
3504         (WebCore::HTMLParser::handleError):
3505         (WebCore::HTMLParser::mapCreateErrorCheck):
3506         (WebCore::HTMLParser::handleIsindex):
3507         * html/HTMLScriptElement.cpp:
3508         (WebCore::HTMLScriptElement::HTMLScriptElement):
3509         * html/HTMLScriptElement.h:
3510         * html/HTMLTableCaptionElement.cpp:
3511         (WebCore::HTMLTableCaptionElement::HTMLTableCaptionElement):
3512         * html/HTMLTableCaptionElement.h:
3513         * html/HTMLTableElement.cpp:
3514         (WebCore::HTMLTableElement::HTMLTableElement):
3515         (WebCore::HTMLTableElement::createCaption):
3516         (WebCore::HTMLTableElement::insertRow):
3517         * html/HTMLTableElement.h:
3518         * html/HTMLTableRowElement.cpp:
3519         (WebCore::HTMLTableRowElement::HTMLTableRowElement):
3520         * html/HTMLTableRowElement.h:
3521         * html/HTMLTableSectionElement.cpp:
3522         (WebCore::HTMLTableSectionElement::insertRow):
3523         * html/HTMLViewSourceDocument.cpp:
3524         (WebCore::HTMLViewSourceDocument::createContainingTable):
3525         (WebCore::HTMLViewSourceDocument::addLine):
3526         * loader/ImageDocument.cpp:
3527         (WebCore::ImageDocumentElement::ImageDocumentElement):
3528
3529 2008-12-04  Eric Seidel  <eric@webkit.org>
3530
3531         No review, build fix only.
3532
3533         Add file missing from last commit.
3534
3535         * bindings/js/ScriptState.h: Added.
3536
3537 2008-12-04  Dimitri Glazkov  <dglazkov@chromium.org>
3538
3539         Reviewed by Geoff Garen.
3540
3541         Implement ScriptState abstraction (initially, a simple typedef)
3542         as means of carrying exception information across bindings boundaries
3543         and in a script engine-independent way.
3544
3545         * WebCore.vcproj/WebCore.vcproj:
3546         * WebCore.xcodeproj/project.pbxproj:
3547         * bindings/js/JSDOMBinding.cpp:
3548         (WebCore::scriptStateFromNode):
3549         * bindings/js/JSDOMBinding.h:
3550         * bindings/js/JSNodeFilterCondition.h:
3551         * bindings/js/ScriptState.h: Added.
3552         * dom/NodeFilter.cpp:
3553         (WebCore::NodeFilter::acceptNode):
3554         * dom/NodeFilter.h:
3555         (WebCore::NodeFilter::acceptNode):
3556         * dom/NodeFilterCondition.cpp:
3557         (WebCore::NodeFilterCondition::acceptNode):
3558         * dom/NodeFilterCondition.h:
3559         * dom/NodeIterator.cpp:
3560         (WebCore::NodeIterator::nextNode):
3561         (WebCore::NodeIterator::previousNode):
3562         * dom/NodeIterator.h:
3563         (WebCore::NodeIterator::nextNode):