1526d104db2585fef6ea67dfcfee41a8a12fcb49
[WebKit-https.git] / WebCore / ChangeLog
1 2007-12-19  Alp Toker  <alp@atoker.com>
2
3         Reviewed by Holger Freyther.
4
5         Improve graphics operator approximations
6         
7         These changes match Cairo's own CG approximations.
8
9         * platform/graphics/cairo/GraphicsContextCairo.cpp:
10         (WebCore::toCairoOperator):
11
12 2007-12-19  Alp Toker  <alp@atoker.com>
13
14         Reviewed by Holger Freyther.
15
16         Check the bounding box before doing a full hit test
17
18         * platform/graphics/cairo/PathCairo.cpp:
19         (WebCore::Path::contains):
20
21 2007-12-18  Sam Weinig  <sam@webkit.org>
22
23         Reviewed by Geoff.
24
25         Fix for <rdar://problem/5646478>
26         REGRESSION: fast/events/event-view-toString fails on Leopard
27
28         This fixes an issue where we were incorrectly setting the lastInPrototypeChain
29         for the JSDOMWindow (the global object) before a call to setPrototype overwrote
30         it. This fixes it by passing the prototype up the constructor chain so that it
31         is set before any calls can be made.
32
33         * bindings/js/kjs_window.cpp:
34         (KJS::Window::Window):
35         * bindings/js/kjs_window.h:
36         * bindings/scripts/CodeGeneratorJS.pm:
37
38 2007-12-18  Beth Dakin  <bdakin@apple.com>
39
40         Reviewed by Oliver.
41
42         Fix for <rdar://problem/5616982> SVGs with width and height 100% 
43         fail to render when used as <img> or CSS image (16167)
44
45         This final part of the work fixes the <img> tag.
46
47         This is the real fix. 
48         * rendering/RenderImage.cpp:
49         (WebCore::RenderImage::calcReplacedWidth): Set the container size 
50         on the image. Setting the container size only actually sticks if 
51         the values are non-zero, so if the container size really was set, 
52         use the imageSize that is calculated using the container size. If 
53         it did not stick but the image does have relative width (meaning 
54         that the container size is 0), set the width to 0 by hand. We want 
55         to avoid setting the width before we have a container size or we 
56         will end up incorrectly using the default size of 300x150.
57         (WebCore::RenderImage::calcReplacedHeight): Same as above, but for 
58         height.
59
60         A few more pieces of information have to be exposed through cached 
61         image to make this happen.
62         * loader/CachedImage.cpp:
63         (WebCore::CachedImage::usesImageContainerSize): As mentioned above, 
64         when setContainerSize() is called, the container size is only 
65         actually set if the values are non-zero. This call tells you if it 
66         was set.
67         (WebCore::CachedImage::imageHasRelativeWidth):
68         (WebCore::CachedImage::imageHasRelativeHeight):
69         * loader/CachedImage.h:
70         * platform/graphics/Image.h:
71         (WebCore::Image::usesContainerSize):
72         * svg/graphics/SVGImage.cpp:
73         (WebCore::SVGImage::usesContainerSize):
74         * svg/graphics/SVGImage.h:
75
76 2007-12-18  Mark Rowe  <mrowe@apple.com>
77
78         Rubber-stamped by Maciej Stachowiak.
79
80         Remove outdated and non-functioning project files for the Apollo port.
81
82         * WebCore.apolloproj: Removed.
83
84 2007-12-18  Steve Falkenburg  <sfalken@apple.com>
85
86         <rdar://problem/5649911> REGRESSION (304-306A9): Typing 'p' in popup menu for type-to-select brings up Safari Help
87         
88         Need to translate the char back into a key code for posting our WM_KEYDOWN.
89         
90         Reviewed by Ada.
91
92         * platform/win/PopupMenuWin.cpp:
93         (WebCore::PopupWndProc):
94
95 2007-12-18  Steve Falkenburg  <sfalken@apple.com>
96
97         <rdar://problem/5651534> REGRESSION(r28764-r28765): GDI leak drawing text when no appropriate font is available
98         
99         Our captured metafile from Uniscribe may contain multiple calls to CreateFontIndirect.
100         Only create a font with the last one.
101         
102         Reviewed by Mitz, Darin.
103
104         * platform/graphics/win/FontCacheWin.cpp:
105         (WebCore::metaFileEnumProc):
106         (WebCore::FontCache::getFontDataForCharacters):
107
108 2007-12-17  Brent Fulgham  <bfulgham@gmail.com>
109
110         Reviewed by Darin.
111
112         http://bugs.webkit.org/show_bug.cgi?id=16464
113         Modify WebCore to use win32 thread primitives
114
115         Updates to support native windows threading primitives
116         rather than pthreads emulation library.
117
118         * WebCore.vcproj/WebCore.vcproj:
119         * config.h:
120         * platform/Threading.h:
121         * platform/win/MutexWin.cpp: Added.
122         (WebCore::Mutex::Mutex):
123         (WebCore::Mutex::~Mutex):
124         (WebCore::Mutex::lock):
125         (WebCore::Mutex::tryLock):
126         (WebCore::Mutex::unlock):
127         * platform/win/ThreadConditionWin.cpp: Added.
128         (WebCore::ThreadCondition::ThreadCondition):
129         (WebCore::ThreadCondition::~ThreadCondition):
130         (WebCore::ThreadCondition::wait):
131         (WebCore::ThreadCondition::signal):
132         (WebCore::ThreadCondition::broadcast):
133         * platform/win/ThreadingWin.cpp:
134         (WebCore::threadMapMutex):
135         (WebCore::threadMap):
136         (WebCore::storeThreadHandleByIdentifier):
137         (WebCore::identifierByThreadHandle):
138         (WebCore::threadHandleForIdentifier):
139         (WebCore::clearThreadHandleForIdentifier):
140         (WebCore::createThread):
141         (WebCore::waitForThreadCompletion):
142         (WebCore::detachThread):
143         (WebCore::currentThread):
144
145 2007-12-18  Rodney Dawes  <dobey@wayofthemonkey.com>
146
147         Reviewed by Darin Adler.
148
149         Handle EINTR when set by select() and try the select() again
150         http://bugs.webkit.org/show_bug.cgi?id=16071
151
152         * platform/network/curl/ResourceHandleManager.cpp:
153         (ResourceHandleManager::downloadTimerCallback):
154
155 2007-12-18  Dan Bernstein  <mitz@apple.com>
156
157         Reviewed by Dave Hyatt.
158
159         - avoid the simplified Chinese font linking code for characters that are
160           not in any Windows code page
161
162         * platform/graphics/win/FontCacheWin.cpp:
163         (WebCore::FontCache::getFontDataForCharacters):
164
165 2007-12-18  Brady Eidson <beidson@apple.com>
166
167         Reviewed by Adele
168
169         <rdar://problem/5525770> REGRESSION: HTTP Auth protected favicon request results in a password sheet
170
171         Some http-auth protected sites have the main resource(s) unprotected, but many subresources are
172         protected by authentication.  Occasionally one can view the main page of a site but the favicon
173         is behind the iron curtain - in these cases, we should *not* prompt for a username and password
174         solely for the favicon.
175
176         * loader/ResourceLoader.h: Make didReceiveAuthenticationChallenge virtual
177
178         * loader/SubresourceLoader.cpp:
179         (WebCore::SubresourceLoader::didReceiveAuthenticationChallenge): Now that this method
180           is virtual from ResourceLoader, SubresourceLoader can override.  First call to the 
181           SubresourceLoaderClient.  If they cancel the resource load, return early. Otherwise, let
182           ResourceLoader work its magic (resulting in the auth sheet coming down)
183         * loader/SubresourceLoader.h:
184
185         * loader/SubresourceLoaderClient.h:
186         (WebCore::SubresourceLoaderClient::didReceiveAuthenticationChallenge):
187
188         * loader/icon/IconLoader.cpp:
189         (WebCore::IconLoader::didReceiveAuthenticationChallenge): Cancel the resource load, since we should
190           never prompt the user for credentials just for a favicon.
191         * loader/icon/IconLoader.h:
192
193 2007-12-18  John Sullivan  <sullivan@apple.com>
194
195         Reviewed by Brady
196         
197         - fixed <rdar://problem/5652380> Initial prompt shows "" for databases with no user-visible name
198
199         * storage/DatabaseTracker.cpp:
200         (WebCore::DatabaseTracker::canEstablishDatabase):
201         pass "name" instead of "displayName" if there's no displayName
202
203 2007-12-17  Dan Bernstein  <mitz@apple.com>
204
205         Reviewed by Maciej Stachowiak.
206
207         - restore ButtonFace and ThreeDFace to their previous values for non-Mac
208           platforms. The Mac port also uses the same values for now instead
209           of NSColor-based ones.
210
211         * rendering/RenderTheme.cpp:
212         (WebCore::RenderTheme::systemColor):
213
214 2007-12-17  Rodney Dawes  <dobey@wayofthemonkey.com>
215
216         Reviewed by Maciej Stachowiak.
217
218         Define WTF_USE_NPOBJECT and WTF_USE_JAVASCRIPTCORE_BINDINGS for GTK+
219         Add required Frame::createScriptInstanceForWidget to FrameGtk
220
221         * config.h:
222         * page/gtk/FrameGtk.cpp (Frame::createScriptInstanceForWidget):
223
224 2007-12-17  Alice Liu  <alice.liu@apple.com>
225
226         Reviewed by Adam.
227
228         Fixed <rdar://5566435> window with no scrollbars can be scrolled
229
230         * platform/win/ScrollViewWin.cpp:
231         (WebCore::ScrollView::maximumScroll):
232         corrected maximumScroll() to account for scrolling not allowed.
233         (WebCore::ScrollView::wheelEvent):
234
235 2007-12-14  Juan A. Suarez Romero  <jasuarez@igalia.com>
236
237         Reviewed by Alp Toker.
238
239         http://bugs.webkit.org/show_bug.cgi?id=16042
240         [GTK] Eliminate webkit_init()
241
242         Move webkit initialization to WebView class init.
243
244         * WebCore.pro:
245
246 2007-12-17  Jon Honeycutt  <jhoneycutt@apple.com>
247
248         Reviewed by Darin.
249
250         <rdar://problem/5651291> REGRESSION: Flash content doesn't display
251         (www.adobe.com)
252
253         We were passing NPEvent** instead of NPEvent* to NPP_HandleEvent.
254
255         * plugins/win/PluginViewWin.cpp:
256         (WebCore::PluginViewWin::dispatchNPEvent): Changed to take NPEvent&, not
257         NPEvent*
258         (WebCore::PluginViewWin::paint): Pass NPEvent, not NPEvent*
259         (WebCore::PluginViewWin::handleKeyboardEvent): same
260         (WebCore::PluginViewWin::handleMouseEvent): same
261         * plugins/win/PluginViewWin.h:
262
263 2007-12-17  Alexey Proskuryakov  <ap@webkit.org>
264
265         Reviewed by Darin.
266
267         Live to the promise of never making AppKit special character codes visible via DOM.
268
269         Test: fast/events/arrow-keys-on-body.html
270
271         * page/EventHandler.cpp:
272         (WebCore::EventHandler::keyEvent): Check for empty keypress characters after disambiguation,
273         to let quirks-aware code strip special charactrers.
274         * platform/mac/KeyEventMac.mm:
275         (WebCore::PlatformKeyboardEvent::disambiguateKeyDownEvent): If not in keyboard event quirks
276         mode, remove the text if it's a special character.
277
278 2007-12-17  Mark Rowe  <mrowe@apple.com>
279
280         Reviewed by Darin Adler.
281
282         Fix incorrect array size and incorrect array index in convertNSColorToColor.
283
284         * rendering/RenderThemeMac.mm:
285         (WebCore::convertNSColorToColor):
286
287 2007-12-17  Darin Adler  <darin@apple.com>
288
289         Reviewed by Mark Rowe.
290
291         - fix http://bugs.webkit.org/show_bug.cgi?id=16468
292           REGRESSION(r28781): Crash running storage/transaction_callback_exception_crash.html
293
294         * storage/DatabaseThread.cpp:
295         (WebCore::DatabaseThread::dispatchNextTaskIdentifier): Use a RefPtr for the database
296         because there's no guarantee it won't lose its last reference otherwise.
297
298 2007-12-17  Dan Bernstein  <mitz@apple.com>
299
300         Reviewed by Maciej Stachowiak.
301
302         - fix <rdar://problem/5333260> Some Chinese characters in Text Encoding menu are bold, others are not
303           and <rdar://problem/5280188> Chinese text looks worse on Safari for Windows cf. Safari for Mac
304
305         * platform/graphics/win/FontCacheWin.cpp:
306         (WebCore::FontCache::getFontDataForCharacters): To ensure that font
307         linking gives consistent results for characters that are exclusive to
308         the simplified Chinese code page and characters that belong to that
309         code page and other code pages, always ask to map to simplified Chinese
310         alone first.
311
312 2007-12-17  Christian Dywan  <christian@twotoasts.de>
313
314         Reviewed by Alp Toker.
315
316         http://bugs.webkit.org/show_bug.cgi?id=16378
317         Implement Icon for Gtk
318
319         Icon provides a GdkPixbuf containing a themed icon.
320         The icon theme is probed for an icon name according to the
321         Icon Naming Specification or conventional Gnome icon names respectively.
322
323         See http://standards.freedesktop.org/icon-naming-spec/icon-naming-spec-latest.html
324
325         * platform/graphics/Icon.h:
326         * platform/graphics/gtk/IconGtk.cpp:
327         (WebCore::Icon::~Icon):
328         (WebCore::lookupIconName):
329         (WebCore::Icon::newIconForFile):
330         (WebCore::Icon::paint):
331
332 2007-12-16  Sam Weinig  <sam@webkit.org>
333
334         Reviewed by Mitz.
335
336         Fix for http://bugs.webkit.org/show_bug.cgi?id=16466
337         Move the JS Location object to its own file
338
339         - Move Location into its own file and rename it JSLocation.
340
341         * DerivedSources.make:
342         * WebCore.pro:
343         * WebCore.vcproj/WebCore.vcproj:
344         * WebCore.xcodeproj/project.pbxproj:
345         * WebCoreSources.bkl:
346         * bindings/js/JSDocumentCustom.cpp:
347         * bindings/js/JSLocation.cpp: Copied from WebCore/bindings/js/kjs_window.cpp.
348         (WebCore::):
349         (WebCore::JSLocation::JSLocation):
350         (WebCore::JSLocation::getValueProperty):
351         (WebCore::JSLocation::getOwnPropertySlot):
352         (WebCore::JSLocation::put):
353         (WebCore::JSLocationProtoFuncReplace::callAsFunction):
354         (WebCore::JSLocationProtoFuncReload::callAsFunction):
355         (WebCore::JSLocationProtoFuncAssign::callAsFunction):
356         (WebCore::JSLocationProtoFuncToString::callAsFunction):
357         * bindings/js/JSLocation.h: Copied from WebCore/bindings/js/kjs_window.h.
358         (WebCore::JSLocation::):
359         (WebCore::JSLocation::frame):
360         (WebCore::JSLocation::classInfo):
361         * bindings/js/kjs_window.cpp:
362         (KJS::Window::location):
363         * bindings/js/kjs_window.h:
364         * history/CachedPage.cpp:
365
366 2007-12-16  Dan Bernstein  <mitz@apple.com>
367
368         Reviewed by Sam Weinig.
369
370         - make 'cursor: copy' and 'cursor: none' work.
371
372         Already covered by manual-tests/cursor.html
373
374         * rendering/RenderStyle.h: Increase the _cursor_style field to 6 bits,
375         needed for the 33rd and 34th cursor values.
376
377 2007-12-16  Mark Rowe  <mrowe@apple.com>
378
379         Reviewed by Maciej Stachowiak.
380
381         Refactor Mac plugin stream code to use the shared NetscapePlugInStreamLoader implementation.
382
383         * WebCore.base.exp:
384         * WebCore.xcodeproj/project.pbxproj:
385         * loader/NetscapePlugInStreamLoader.h:
386         * loader/mac/NetscapePlugInStreamLoaderMac.mm: Removed.
387         * loader/mac/WebPlugInStreamLoaderDelegate.h: Moved to WebKit.
388
389 2007-12-16  Sam Weinig  <sam@webkit.org>
390
391         Reviewed by Maciej.
392
393         Yet more of http://bugs.webkit.org/show_bug.cgi?id=16385
394         Cleanup kjs_window
395
396         - Move ScheduledAction into its own file and put it in the WebCore namespace.
397
398         * WebCore.pro:
399         * WebCore.vcproj/WebCore.vcproj:
400         * WebCore.xcodeproj/project.pbxproj:
401         * WebCoreSources.bkl:
402         * bindings/js/PausedTimeouts.cpp:
403         * bindings/js/PausedTimeouts.h:
404         * bindings/js/ScheduledAction.cpp: Copied from bindings/js/kjs_window.cpp.
405         (WebCore::ScheduledAction::ScheduledAction):
406         (WebCore::ScheduledAction::execute):
407         * bindings/js/ScheduledAction.h: Copied from bindings/js/kjs_window.h.
408         (WebCore::ScheduledAction::ScheduledAction):
409         * bindings/js/kjs_window.cpp:
410         (KJS::DOMWindowTimer::DOMWindowTimer):
411         (KJS::DOMWindowTimer::action):
412         (KJS::DOMWindowTimer::takeAction):
413         (KJS::Window::installTimeout):
414         (KJS::Window::timerFired):
415         * bindings/js/kjs_window.h:
416
417 2007-12-16  Alp Toker  <alp@atoker.com>
418
419         Reviewed by Maciej.
420
421         http://bugs.webkit.org/show_bug.cgi?id=16356
422         [GTK] Integrate GStreamer video with the graphics backend
423
424         Integrate the GStreamer media backend with the Cairo graphics backend.
425         There are still some issues: Data is copied more often than necessary,
426         and repaint() is not called, causing transformed video not to update
427         sometimes.
428
429         * WebCore.pro:
430         * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
431         (WebCore::MediaPlayerPrivate::MediaPlayerPrivate):
432         (WebCore::MediaPlayerPrivate::~MediaPlayerPrivate):
433         (WebCore::MediaPlayerPrivate::currentTime):
434         (WebCore::MediaPlayerPrivate::setEndTime):
435         (WebCore::MediaPlayerPrivate::seeking):
436         (WebCore::MediaPlayerPrivate::naturalSize):
437         (WebCore::MediaPlayerPrivate::setMuted):
438         (WebCore::MediaPlayerPrivate::setRect):
439         (WebCore::MediaPlayerPrivate::setVisible):
440         (WebCore::MediaPlayerPrivate::repaint):
441         (WebCore::MediaPlayerPrivate::paint):
442         (WebCore::MediaPlayerPrivate::createGSTPlayBin):
443         * platform/graphics/gtk/MediaPlayerPrivateGStreamer.h:
444         * platform/graphics/gtk/VideoSinkGStreamer.cpp: Added.
445         (webkit_video_sink_base_init):
446         (webkit_video_sink_init):
447         (webkit_video_sink_idle_func):
448         (webkit_video_sink_render):
449         (webkit_video_sink_set_caps):
450         (webkit_video_sink_dispose):
451         (webkit_video_sink_finalize):
452         (webkit_video_sink_set_property):
453         (webkit_video_sink_get_property):
454         (webkit_video_sink_stop):
455         (webkit_video_sink_class_init):
456         (webkit_video_sink_new):
457         (webkit_video_sink_set_surface):
458         (plugin_init):
459         * platform/graphics/gtk/VideoSinkGStreamer.h: Added.
460
461 2007-12-16  Mark Rowe  <mrowe@apple.com>
462
463         Mac build fix.
464
465         * WebCore.xcodeproj/project.pbxproj: Remove NetscapePlugInStreamLoader.cpp from the WebCore target.
466         Mac currently has its own implementation in NetscapePlugInStreamLoaderMac.mm which conflicts with the
467         new shared implementation.
468
469 2007-12-16  Rodney Dawes  <dobey@wayofthemonkey.com>
470
471         Reviewed by Maciej Stachowiak.
472
473         http://bugs.webkit.org/show_bug.cgi?id=16389
474         Bug 16389: Common Implementation of NetscapePlugInStreamLoader
475
476         * WebCore.vcproj/WebCore.vcproj: Remove NetscapePlugInStreamLoaderWin.cpp.
477         * loader/NetscapePlugInStreamLoader.cpp: Copy method implementations from NetscapePlugInStreamLoaderWin.cpp.
478         * loader/win/NetscapePlugInStreamLoaderWin.cpp: Removed.
479
480 2007-12-16  Grace Kloba  <klobag@gmail.com>
481
482         Reviewed by Darin Adler.
483
484         Fix http://bugs.webkit.org/show_bug.cgi?id=16433.
485         Bug 16433: LOW_BANDWIDTH_DISPLAY build is broken
486
487         * dom/Document.cpp:
488         (WebCore::Document::Document):
489         * loader/FrameLoader.cpp:
490         (WebCore::FrameLoader::addLowBandwidthDisplayRequest):
491         (WebCore::FrameLoader::switchOutLowBandwidthDisplayIfReady):
492
493 2007-12-16  Darin Adler  <darin@apple.com>
494
495         Reviewed by Maciej.
496
497         - fix <rdar://problem/5636065> First form of SQLTransaction.executeSql() fails with TYPE_ERROR dom exception
498
499         Test: storage/execute-sql-args.html
500
501         * bindings/js/JSSQLTransactionCustom.cpp:
502         (WebCore::JSSQLTransaction::executeSql): Added exception handling code so that once an
503         exception happens, we won't try to do any more argument processing. Changed processing
504         of the second argument so that we allow an undefined value or null, and simply omit the
505         array. Changed processing of the second argument so that we don't require an actual
506         JavaScript array. Instead, as with the JavaScript array operations themselves, we use
507         the length property and corresponding numeric properties of the object, allowing other
508         objects to act as arrays. Changed processing of the third and fourth arguments to
509         allow the undefined value as well as null; we check the value of the argument rather
510         than looking at the size of the passed-in arguments list.
511
512 2007-12-16  Sam Weinig  <sam@webkit.org>
513
514         Reviewed by Darin.
515
516         More of http://bugs.webkit.org/show_bug.cgi?id=16385
517         Cleanup kjs_window
518
519         - Move PausedTimeouts into its own file and put it in the WebCore namespace.
520
521         * WebCore.pro:
522         * WebCore.vcproj/WebCore.vcproj:
523         * WebCore.xcodeproj/project.pbxproj:
524         * WebCoreSources.bkl:
525         * bindings/js/PausedTimeouts.cpp: Copied from bindings/js/kjs_window.cpp.
526         * bindings/js/PausedTimeouts.h: Copied from bindings/js/kjs_window.h.
527         * bindings/js/kjs_window.cpp:
528         (KJS::Window::pauseTimeouts):
529         * bindings/js/kjs_window.h:
530         * history/CachedPage.cpp:
531         * history/CachedPage.h:
532         * page/Chrome.cpp:
533
534 2007-12-16  Beth Dakin  <bdakin@apple.com>
535
536         Reviewed by Geoff.
537
538         Make relative-size SVGs work in border-image.
539
540         * rendering/RenderBox.cpp:
541         (WebCore::RenderBox::calculateBackgroundSize):
542         * rendering/RenderObject.cpp:
543         (WebCore::RenderObject::paintBorderImage):
544
545 2007-12-16  Darin Adler  <darin@apple.com>
546
547         - fix Tiger build (my fault it was broken)
548
549         * rendering/RenderThemeMac.mm: Define NSUInteger if on Tiger.
550
551 2007-12-16  Andrew Wellington  <proton@wiretapped.net>
552
553         Reviewed by Darin.
554         
555         http://bugs.webkit.org/show_bug.cgi?id=6129
556         Incomplete implementation of CSS 2.1 system colors
557
558         Test: fast/css/css2-system-color.html
559         
560         Based on original patch by Rob Buis.
561         
562         System colors are retrieved from NSColor as appropriate. If the color is a pattern color
563         (and therefore NSColor won't let us retrieve a color from it) we draw a 1x1 image of the
564         color and sample that to get a solid color.
565
566         * css/CSSStyleSelector.cpp:
567         (WebCore::):
568         (WebCore::colorForCSSValue):
569         * rendering/RenderTheme.cpp:
570         (WebCore::RenderTheme::systemColor):
571         * rendering/RenderTheme.h:
572         * rendering/RenderThemeMac.h:
573         * rendering/RenderThemeMac.mm:
574         (WebCore::getSystemColor):
575         (WebCore::RenderThemeMac::platformColorsDidChange):
576         (WebCore::RenderThemeMac::systemColor):
577
578 2007-12-16  Dan Bernstein  <mitz@apple.com>
579
580         Reviewed by Darin Adler.
581
582         - fix http://bugs.webkit.org/show_bug.cgi?id=16426
583           Divs with overflow:auto: scrollbars not correctly updated when contents change
584
585         Test: fast/overflow/scrollbar-position-update.html
586
587         * platform/mac/PlatformScrollBarMac.mm:
588         (WebCore::PlatformScrollbar::updateThumbProportion): Update the
589         NSScroller's value for the new proportions.
590         * rendering/RenderLayer.cpp:
591         (WebCore::RenderLayer::updateScrollInfoAfterLayout): Removed unnecessary
592         repaint(). Scrollbars repaint themselves as needed.
593
594 2007-12-16  Alexey Proskuryakov  <ap@webkit.org>
595
596         Reviewed by Darin.
597
598         http://bugs.webkit.org/show_bug.cgi?id=14140
599         <rdar://problem/5270958> REGRESSION: Complex system KeyBindings don't work properly
600
601         * dom/KeyboardEvent.h:
602         (WebCore::KeypressCommand::KeypressCommand):
603         (WebCore::KeyboardEvent::keypressCommands):
604         Change stored command class to preserve complete information about commands.
605
606         * editing/EditorCommand.cpp: (WebCore::CommandEntry::): Mark InsertText as a text insertion
607         command, which it is. Previously, we couldn't do it because WebKit didn't really treat insertText:
608         as a command.
609
610         * page/EventHandler.cpp: (WebCore::EventHandler::keyEvent): Copy commands saved while interpreting
611         a keydown event into keypress, to avoid losing state when running interpretKeyEvents: again.
612
613 2007-12-16  Alexey Proskuryakov  <ap@webkit.org>
614
615         Reviewed by Darin.
616
617         http://bugs.webkit.org/show_bug.cgi?id=16462
618         REGRESSION: access keys broken on Windows
619
620         * page/EventHandler.cpp:
621         (WebCore::EventHandler::handleAccessKey):
622         (WebCore::EventHandler::keyEvent):
623         * page/EventHandler.h:
624         Make handleAccessKey a class method; rely on WebKit to call it on Windows and wxWidgets.
625
626 2007-12-16  Xan Lopez  <xan@gnome.org>
627
628         Reviewed by Alexey Proskuryakov.
629
630         http://bugs.webkit.org/show_bug.cgi?id=16454
631         [GTK] Text input doesn't work consistently on PPC
632
633         * platform/gtk/KeyEventGtk.cpp:
634         (WebCore::singleCharacterString):
635
636         UChar is 2 bytes (UTF-16), so transform accordingly from
637         gunichar (UCS-4). Fixes keyboard input on big endian systems.
638
639 2007-12-15  Darin Adler  <darin@apple.com>
640
641         Reviewed by Mark Rowe.
642
643         - better build fix for the problem affecting GTK and some other platforms
644           "this time for sure"
645
646         * WebCore.xcodeproj/project.pbxproj:
647         * bindings/js/JSEventTargetBase.cpp: Move the include of the .lut.h file here.
648         * bindings/js/JSEventTargetBase.h: Instead of including the .lut.h file in the header,
649         which won't work, declare the tables that are in the .lut.h file in the header.
650
651 2007-12-12  Kevin Watters  <kevin@dotsyntax.com>
652
653         Reviewed by Darin Adler.
654
655         Fixed the Wx port's FontPlatformData for use in HashTable.
656         - FontPlatformData(Deleted) made unequal to FontPlatformData()
657
658         * platform/graphics/wx/FontPlatformData
659
660 2007-12-15  Dan Bernstein  <mitz@apple.com>
661
662         Reviewed by Darin Adler.
663
664         - fix <rdar://problem/5636090> Text in Georgia, Armenian, Inuktitut, Cree, or Cherokee (KA, HY, IU, CR, CHR) draws as all missing glyphs
665
666         * platform/graphics/win/FontCacheWin.cpp:
667         (WebCore::metaFileEnumProc): Added. Called during metafile record
668         enumeration and extracts the font from the create font record.
669         (WebCore::FontCache::getFontDataForCharacters): If font linking fails,
670         let Uniscribe draw the characters and see what font it chooses.
671
672 2007-12-15  Darin Adler  <darin@apple.com>
673
674         * WebCore.pro: Roll my last change out. Was wrong and didn't fix the build.
675
676 2007-12-15  Darin Adler  <darin@apple.com>
677
678         Another try at a GTK build fix.
679
680         * WebCore.pro: Add JSEventTargetBase.cpp to LUT_TABLE_FILES instead of LUT_FILES.
681
682 2007-12-15  Sam Weinig  <sam@webkit.org>
683
684         Force windows to regenerate COM DOM bindings.
685
686         * WebCore.vcproj/build-generated-files.sh: Add license. 
687         * bindings/scripts/CodeGeneratorCOM.pm: Use shared WK_ucfirst.
688
689 2007-12-15  Sam Weinig  <sam@webkit.org>
690
691         Fix Windows and wx builds.
692
693         * WebCore.vcproj/WebCore.vcproj:
694         * WebCoreSources.bkl:
695
696 2007-12-15  Mark Rowe  <mrowe@apple.com>
697
698         Gtk build fix.  Add JSEventTargetBase.cpp to SOURCES.
699
700         * WebCore.pro:
701
702 2007-12-15  Sam Weinig  <sam@webkit.org>
703
704         Fix wx build.
705
706         * WebCoreSources.bkl:
707
708 2007-12-15  Nikolas Zimmermann  <zimmermann@kde.org>
709
710         Not reviewed. Build fix for Qt/Gtk.
711
712         * WebCore.pro: Include JSEventTargetBase.lut.h in generation
713
714 2007-12-15  Nikolas Zimmermann  <zimmermann@kde.org>
715
716         Reviewed by Eric.
717
718         Fixes: http://bugs.webkit.org/show_bug.cgi?id=16445 (Refactor EventTargetNode & JSEventTargetNode for an upcoming SVG patch)
719
720         Split up JSEventTargetNode in JSEventTargetNode & JSEventTargetBase - where most functionality has been moved down
721         in the base class. Applied the same refactorization to EventTargetNode.
722
723         This makes it possible for the upcoming patch implementing the EventTarget interface for SVGElementInstance
724         to share as much code as possible with the EventTargetNode classes.
725
726         * DerivedSources.make:
727         * WebCore.xcodeproj/project.pbxproj:
728         * bindings/js/JSEventTargetBase.cpp: Added.
729         (WebCore::retrieveEventTargetAndCorrespondingNode):
730         (WebCore::eventNameForPropertyToken):
731         * bindings/js/JSEventTargetBase.h: Added.
732         (WebCore::JSEventTargetProperties::):
733         (WebCore::JSEventTargetPrototypeFunctionBase::JSEventTargetPrototypeFunctionBase):
734         (WebCore::JSEventTargetPrototypeFunction::JSEventTargetPrototypeFunction):
735         (WebCore::):
736         (WebCore::::create):
737         (WebCore::JSEventTargetBase::JSEventTargetBase):
738         (WebCore::JSEventTargetBase::getValueProperty):
739         (WebCore::JSEventTargetBase::putValueProperty):
740         (WebCore::JSEventTargetBase::getOwnPropertySlot):
741         (WebCore::JSEventTargetBase::put):
742         (WebCore::JSEventTargetPrototype::JSEventTargetPrototype):
743         (WebCore::JSEventTargetPrototype::self):
744         (WebCore::JSEventTargetPrototype::getOwnPropertySlot):
745         (WebCore::JSEventTargetPrototype::classInfo):
746         * bindings/js/JSEventTargetNode.cpp:
747         (WebCore::JSEventTargetNode::getOwnPropertySlot):
748         (WebCore::JSEventTargetNode::getValueProperty):
749         (WebCore::JSEventTargetNode::put):
750         (WebCore::JSEventTargetNode::putValueProperty):
751         (WebCore::JSEventTargetNode::setListener):
752         (WebCore::toEventTargetNode):
753         * bindings/js/JSEventTargetNode.h:
754         (WebCore::JSEventTargetPrototypeInformation::prototypeClassName):
755         (WebCore::JSEventTargetPrototypeInformation::prototypeIdentifier):
756         * dom/EventTarget.cpp:
757         (WebCore::EventTarget::addEventListener):
758         (WebCore::EventTarget::removeEventListener):
759         (WebCore::EventTarget::dispatchGenericEvent):
760         (WebCore::EventTarget::removeAllEventListeners):
761         (WebCore::EventTarget::insertedIntoDocument):
762         (WebCore::EventTarget::removedFromDocument):
763         (WebCore::EventTarget::handleLocalEvents):
764         (WebCore::EventTarget::applySVGEventTargetRules):
765         (WebCore::forbidEventDispatch):
766         (WebCore::allowEventDispatch):
767         (WebCore::eventDispatchForbidden):
768         * dom/EventTarget.h:
769         (WebCore::EventTarget::preDispatchEventHandler):
770         (WebCore::EventTarget::postDispatchEventHandler):
771         (WebCore::forbidEventDispatch):
772         (WebCore::allowEventDispatch):
773         * dom/EventTargetNode.cpp:
774         (WebCore::EventTargetNode::~EventTargetNode):
775         (WebCore::EventTargetNode::insertedIntoDocument):
776         (WebCore::EventTargetNode::removedFromDocument):
777         (WebCore::EventTargetNode::addEventListener):
778         (WebCore::EventTargetNode::removeEventListener):
779         (WebCore::EventTargetNode::removeAllEventListeners):
780         (WebCore::EventTargetNode::handleLocalEvents):
781         (WebCore::EventTargetNode::dispatchEvent):
782         (WebCore::EventTargetNode::dispatchWindowEvent):
783         * dom/EventTargetNode.h:
784         (WebCore::EventTargetNode::localEventListeners):
785         * svg/SVGElement.cpp:
786         (WebCore::SVGElement::sendSVGLoadEventIfPossible):
787         (WebCore::SVGElement::dispatchEvent):
788
789 2007-12-15  Eric Seidel  <eric@webkit.org>
790
791         Reviewed by Oliver.
792         
793         Width of SVG elements not applied to container elements
794         http://bugs.webkit.org/show_bug.cgi?id=16305
795         Added calcPrefWidths for RenderSVGRoot (copied from RenderReplaced)
796         This is caused by poor factoring in the render tree.  RenderContainer probably should be a template.
797
798         svg/css/css-box-min-width.html
799
800         * rendering/RenderSVGRoot.cpp:
801         (WebCore::RenderSVGRoot::calcPrefWidths): Added.
802         * rendering/RenderSVGRoot.h:
803         * css/SVGCSSStyleSelector::applySVGProperty: fixed ASSERT in debug builds
804
805 2007-12-15  David Kilzer  <ddkilzer@apple.com>
806
807         Fix comment after isSafeScript() was renamed to allowsAccessFrom().
808
809         * bindings/js/kjs_window.cpp:
810         (KJS::createWindow):
811
812 2007-12-15  Alp Toker  <alp@atoker.com>
813
814         Reviewed by Mark Rowe.
815
816         http://bugs.webkit.org/show_bug.cgi?id=16449
817         cairo_arc() functions hang or crash when passed inf as radius or start/end angle
818
819         Add checks. This matches a similar workaround for a CG bug in the CG
820         graphics backend: <rdar://problem/5189233>
821
822         Fixes:
823           fast/canvas/arc-crash.html
824           fast/canvas/canvas-with-incorrect-args.html
825
826         * platform/graphics/cairo/PathCairo.cpp:
827         (WebCore::Path::addArc):
828
829 2007-12-15  Alexey Proskuryakov  <ap@webkit.org>
830
831         Reviewed by Darin.
832
833         http://bugs.webkit.org/show_bug.cgi?id=16078
834         Google Maps zooming via the scroll wheel (almost) always zooms IN only.
835
836         * dom/WheelEvent.cpp: (WebCore::WheelEvent::WheelEvent):
837         Ensure that delta is never rounded down to zero - we are getting values less than 1 from 
838         many mice on OS X, and Google Maps code assumes scrolling up if event.wheelDelta is zero.
839
840 2007-12-14  Dan Bernstein  <mitz@apple.com>
841
842         - Windows build fix
843
844         * WebCore.vcproj/WebCore.vcproj:
845
846 2007-12-14  Alp Toker  <alp@atoker.com>
847
848         GTK+/Qt build fix. Track added files in r28722.
849
850         * WebCore.pro:
851
852 2007-12-14  Sam Weinig  <sam@webkit.org>
853
854         Reviewed by Geoff.
855
856         Speed up getElementByClassName.
857         - This makes getElementByClassName 33% faster on the stress test
858           linked to at http://bugs.webkit.org/show_bug.cgi?id=15760.
859
860         * platform/text/StringImpl.cpp:
861         (WebCore::StringImpl::foldCase): Optimize the case when all the characters are ASCII.
862
863 2007-12-14  Alp Toker  <alp@atoker.com>
864
865         Reviewed by Maciej.
866
867         http://bugs.webkit.org/show_bug.cgi?id=16432
868         [GTK] Update license headers
869
870         Consent has been given by the authors of these files to change license
871         to the LGPL as outlined in the bug report.
872
873         * platform/gtk/ClipboardGtk.cpp:
874         * platform/gtk/ContextMenuGtk.cpp:
875         * platform/gtk/ContextMenuItemGtk.cpp:
876         * platform/gtk/CookieJarGtk.cpp:
877         * platform/gtk/CursorGtk.cpp:
878         * platform/gtk/DragDataGtk.cpp:
879         * platform/gtk/DragImageGtk.cpp:
880         * platform/gtk/PasteboardGtk.cpp:
881         * platform/gtk/PlatformScreenGtk.cpp:
882         * platform/gtk/PlatformScrollBarGtk.cpp:
883         * platform/gtk/SearchPopupMenuGtk.cpp:
884         * platform/gtk/WidgetGtk.cpp:
885
886 2007-12-14  Darin Adler  <darin@apple.com>
887
888         Reviewed by Adele.
889
890         - fix http://bugs.webkit.org/show_bug.cgi?id=16442
891           navigation policy delegate gets called twice for each load
892
893         * loader/MainResourceLoader.cpp:
894         (WebCore::MainResourceLoader::willSendRequest): Removed call to checkNavigationPolicy.
895         That's handled by FrameLoader.
896
897         * loader/MainResourceLoader.h: Removed callContinueAfterNavigationPolicy
898         and continueAfterNavigationPolicy.
899
900 2007-12-14  Anders Carlsson  <andersca@apple.com>
901
902         Reviewed by Brady.
903
904         Make document.open count as committing a document load, so that -[WebFrame dataSource:] won't
905         return nil in that case.
906         
907         * loader/FrameLoader.cpp:
908         (WebCore::FrameLoader::didExplicitOpen):
909
910 2007-12-14  David Smith  <catfish.man@gmail.com>
911
912         Reviewed by Mitz.
913
914         - fix http://bugs.webkit.org/show_bug.cgi?id=14955
915           Implement getElementsByClassName.
916
917         This patch also renames AtomicStringList to ClassNames to better reflect its actual use,
918         and takes advantage of admitting that it's class-specific to encapsulate class attribute 
919         parsing so it can be shared.  It also changes the class to use a Vector, rather than a linked
920         list to store the class names.
921
922         Tests: fast/dom/getElementsByClassName/001.html
923                fast/dom/getElementsByClassName/002.html
924                fast/dom/getElementsByClassName/003.html
925                fast/dom/getElementsByClassName/004.html
926                fast/dom/getElementsByClassName/005.html
927                fast/dom/getElementsByClassName/006.html
928                fast/dom/getElementsByClassName/007.html
929                fast/dom/getElementsByClassName/008.html
930                fast/dom/getElementsByClassName/009.html
931                fast/dom/getElementsByClassName/010.xml
932                fast/dom/getElementsByClassName/011.xml
933                fast/dom/getElementsByClassName/012.html
934                fast/dom/getElementsByClassName/013.html
935                fast/dom/getElementsByClassName/014.html
936                fast/dom/getElementsByClassName/array/001.html
937                fast/dom/getElementsByClassName/array/002.html
938                fast/dom/getElementsByClassName/array/003.html
939                fast/dom/getElementsByClassName/array/004.html
940                fast/dom/getElementsByClassName/dumpNodeList.html
941
942         * WebCore.xcodeproj/project.pbxproj:
943         * css/CSSStyleSelector.cpp:
944         (WebCore::CSSStyleSelector::matchRules):
945         (WebCore::CSSStyleSelector::checkOneSelector):
946         * dom/AtomicStringList.h: Removed.
947         * dom/ClassNames.cpp: Added.
948         (WebCore::ClassNames::contains):
949         (WebCore::ClassNames::parseClassAttribute):
950         * dom/ClassNames.h: Copied from WebCore/dom/AtomicStringList.h.
951         (WebCore::ClassNames::ClassNames):
952         (WebCore::ClassNames::size):
953         (WebCore::ClassNames::clear):
954         (WebCore::ClassNames::operator[]):
955         (WebCore::isClassWhitespace):
956         * dom/ClassNodeList.cpp: Added.
957         (WebCore::ClassNodeList::ClassNodeList):
958         (WebCore::ClassNodeList::length):
959         (WebCore::ClassNodeList::item):
960         (WebCore::ClassNodeList::nodeMatches):
961         * dom/ClassNodeList.h: Added.
962         * dom/Document.cpp:
963         (WebCore::Document::getElementsByName):
964         (WebCore::Document::getElementsByClassName):
965         * dom/Document.h:
966         * dom/Document.idl:
967         * dom/Element.cpp:
968         (WebCore::Element::getClassNames):
969         (WebCore::Element::getElementsByClassName):
970         * dom/Element.h:
971         * dom/Element.idl:
972         * dom/NameNodeList.cpp:
973         (WebCore::NameNodeList::NameNodeList):
974         (WebCore::NameNodeList::item):
975         (WebCore::NameNodeList::nodeMatches):
976         * dom/NameNodeList.h:
977         * dom/NamedMappedAttrMap.cpp:
978         (WebCore::NamedMappedAttrMap::clearAttributes):
979         (WebCore::NamedMappedAttrMap::parseClassAttribute):
980         * dom/NamedMappedAttrMap.h:
981         (WebCore::NamedMappedAttrMap::getClassNames):
982         * dom/StyledElement.cpp:
983         (WebCore::StyledElement::getClassNames):
984         * dom/StyledElement.h:
985
986 2007-12-14  Darin Adler  <darin@apple.com>
987
988         Reviewed by Sam.
989
990         - fix http://bugs.webkit.org/show_bug.cgi?id=16351
991           FontFallbackList.h doesn't include wtf/PassRefPtr.h
992           
993         * platform/graphics/FontFallbackList.h: Added include of <wtf/Forward.h>
994         * platform/graphics/GlyphPageTreeNode.h: Removed an unneeded include.
995
996 2007-12-14  Darin Adler  <darin@apple.com>
997
998         Reviewed by Alexey.
999
1000         - http://bugs.webkit.org/show_bug.cgi?id=16420
1001           change regression tests to use document.execCommand instead of textInputController.doCommand
1002
1003         Add a few more operations to document.execCommand.
1004
1005         Finished up the transition to the new Editor::Command, including removing
1006         the Editor::execCommand function.
1007
1008         * WebCore.base.exp: Added Editor::Command::isSupported.
1009         * editing/Editor.h: Removed execCommand.
1010         * editing/EditorCommand.cpp:
1011         (WebCore::expandSelectionToGranularity): Added.
1012         (WebCore::verticalScrollDistance): Added; replaces canScroll.
1013         (WebCore::executeDeleteBackward): Added. Moved code here from WebHTMLView.
1014         (WebCore::executeDeleteBackwardByDecomposingPreviousCharacter): Ditto.
1015         (WebCore::executeDeleteForward): Ditto.
1016         (WebCore::executeDeleteToBeginningOfLine): Ditto.
1017         (WebCore::executeDeleteToBeginningOfParagraph): Ditto.
1018         (WebCore::executeDeleteToEndOfLine): Ditto.
1019         (WebCore::executeDeleteToEndOfParagraph): Ditto.
1020         (WebCore::executeMovePageDown): Renamed this command to be consistent with all the other
1021         Move commands. They all modify the caret. Reimplemented to match the Mac OS X version by
1022         removing the explicit scrolling, and letting it be done automatically by code that makes
1023         the caret visible. In some cases the old code would scroll twice which was harmless but
1024         unnecessary.
1025         (WebCore::executeMovePageDownAndModifySelection): Added. Moved code here from WebHTMLView.
1026         (WebCore::executeMovePageUp): See MovePageDown above.
1027         (WebCore::executeMovePageUpAndModifySelection): Added. Moved code here from WebHTMLView.
1028         (WebCore::executeSelectLine): Ditto.
1029         (WebCore::executeSelectParagraph): Ditto.
1030         (WebCore::executeSelectSentence): Ditto.
1031         (WebCore::executeSelectWord): Ditto.
1032         (WebCore::executeSwapWithMark): Some small tweaks.
1033
1034         * page/ContextMenuController.cpp:
1035         (WebCore::ContextMenuController::contextMenuItemSelected): Changed to use Editor::command()
1036         instead of Editor::execCommand(). This code could be changed to use Editor::Command quite a
1037         bit more, but I didn't do that this time.
1038
1039         - Removed some obsolete unused code.
1040
1041         * page/mac/EventHandlerMac.mm:
1042         (WebCore::EventHandler::passMouseDownEventToWidget): Removed the special case code for
1043         NSTextView. This was left over from when we used NSTextField and NSTextView for form
1044         elements and is no longer used at all.
1045
1046         * page/mac/WebCoreFrameBridge.h: Removed 20 unused methods that were still on one side
1047         of the bridge or another. We really need to find a time to tear down the rest of the
1048         bridge, but that's not this patch.
1049
1050         * page/mac/WebCoreFrameBridge.mm:
1051         (-[WebCoreFrameBridge addData:]): Changed to get at the _shouldCreateRenderers field directly
1052         instead of using a method.
1053         (-[WebCoreFrameBridge rangeByAlteringCurrentSelection:SelectionController::direction:SelectionController::granularity:]):
1054         Took out obsolete comment about matching enums (we use a single enum now and have for some
1055         time).
1056         (-[WebCoreFrameBridge selectionGranularity]): Ditto.
1057
1058 2007-12-14  Justin Garcia  <justin.garcia@apple.com>
1059
1060         Reviewed by Darin Adler.
1061
1062         <rdar://problem/5575101> GoogleDocs: Hang in SplitElementCommand::doApply when outdenting a list item in a particular list
1063
1064         * editing/CompositeEditCommand.cpp:
1065         (WebCore::CompositeEditCommand::splitTreeToNode): Moved here.
1066         * editing/CompositeEditCommand.h:
1067         * editing/IndentOutdentCommand.cpp: Moved splitTreeToNode.
1068         * editing/IndentOutdentCommand.h: Ditto, and removed unimplemented splitTreeTo.
1069         * editing/InsertListCommand.cpp:
1070         (WebCore::InsertListCommand::doApply): Split ancestors of listChildNode between
1071         it and listNode, if they exists, so that moving listChildNode doesn't put it out
1072         of order.  Added a test case to cover each change.
1073         * editing/SplitElementCommand.cpp:
1074         (WebCore::SplitElementCommand::doApply): Added an ASSERT to catch code that
1075         tries to split a container at a bogus child, and an early return to avoid a
1076         hang in that case.
1077
1078 2007-12-14  Anders Carlsson  <andersca@apple.com>
1079
1080         Reviewed by Darin and Geoff.
1081
1082         <rdar://problem/5619295> 
1083         REGRESSION: 303-304: Embedded YouTube video fails to render- JS errors (16150) (Flash 9)
1084
1085         _NPN_CreateScriptObject doesn't take an origin root object anymore.
1086         
1087         * html/HTMLPlugInElement.cpp:
1088         (WebCore::HTMLPlugInElement::createNPObject):
1089         * page/Frame.cpp:
1090         (WebCore::Frame::windowScriptNPObject):
1091
1092 2007-12-14  Dan Bernstein  <mitz@apple.com>
1093
1094         Reviewed by Darin Adler.
1095
1096         - fix <rdar://problem/5643663> text-shadow and box-shadow offsets 1px smaller than specified
1097           which is the root cause of:
1098           http://bugs.webkit.org/show_bug.cgi?id=12943
1099           box-shadow: small values don't affect shadow position
1100           http://bugs.webkit.org/show_bug.cgi?id=14736
1101           Safari implementation of text-shadow off by 1px
1102
1103         * platform/graphics/cg/GraphicsContextCG.cpp:
1104         (WebCore::GraphicsContext::setShadow): Slightly increase the magnitude
1105         of the offsets passed to CGContextSetShadow* to ensure that the end
1106         result after truncation is the desired integer offsets.
1107
1108 2007-12-13  Alp Toker  <alp@atoker.com>
1109
1110         curl backend build fix for breakage introduced in r28709.
1111
1112         * platform/network/ResourceHandleInternal.h:
1113         (WebCore::ResourceHandleInternal::ResourceHandleInternal):
1114
1115 2007-12-13  Justin Garcia  <justin.garcia@apple.com>
1116
1117         Reviewed by Oliver Hunt.
1118
1119         <rdar://problem/5607069> In Mail, a crash occurs at WebCore::AppendNodeCommand() after dragging image into a <FORM> element
1120
1121         * editing/InsertLineBreakCommand.cpp:
1122         (WebCore::InsertLineBreakCommand::shouldUseBreakElement): Equip this function to
1123         handle editing positions, like [input, 0];
1124         * editing/InsertParagraphSeparatorCommand.cpp:
1125         (WebCore::InsertParagraphSeparatorCommand::doApply): Pass enclosingBlock a node peeled
1126         off of a non-editing position, to fix a bug where the enclosing block of [input, 0] was
1127         the input element itself.
1128         Insert a <br> when a <form> element is the enclosing block instead of splitting/cloning or
1129         nesting a <div>.
1130
1131 2007-12-13  Alp Toker  <alp@atoker.com>
1132
1133         Reviewed by Oliver Hunt.
1134
1135         http://bugs.webkit.org/show_bug.cgi?id=16365
1136         [cURL] Acid2 test segmentation fault
1137
1138         This patch makes the Acid2 test pass.
1139
1140         Defer the cleanup of cancelled jobs and halt further transfer as early
1141         as possible.
1142
1143         Bug found by and initial patch provided by Luca Bruno.
1144
1145         * platform/network/curl/ResourceHandleManager.cpp:
1146         (WebCore::writeCallback):
1147         (WebCore::headerCallback):
1148         (WebCore::ResourceHandleManager::downloadTimerCallback):
1149         (WebCore::ResourceHandleManager::cancel):
1150
1151 2007-12-13  Sam Weinig  <sam@webkit.org>
1152
1153         Reviewed by Mark Rowe.
1154
1155         Fix typos and rename InspectorController::moveByUnrestricted to InspectorController::moveWindowBy.
1156
1157         * page/InspectorController.cpp:
1158         (WebCore::moveByUnrestricted):
1159         (WebCore::InspectorController::windowScriptObjectAvailable):
1160         (WebCore::InspectorController::moveWindowBy):
1161         * page/InspectorController.h:
1162         * page/inspector/inspector.js:
1163
1164 2007-12-13  Dan Bernstein  <mitz@apple.com>
1165
1166         Reviewed by Dave Hyatt.
1167
1168         - fix <rdar://problem/5642426> explicit cubic-bezier curves all treated as "default" for transition-timing-function
1169
1170         Test: fast/css/transition-timing-function.html
1171
1172         * css/CSSStyleSelector.cpp: Changed the HANDLE_MULTILAYER_VALUE macro to
1173         not reject non-primitive non-list values, and instead made sure that the
1174         mapping functions rejected them if necessary. This allows non-primitive
1175         timing functions to be mapped.
1176         (WebCore::CSSStyleSelector::mapBackgroundAttachment):
1177         (WebCore::CSSStyleSelector::mapBackgroundClip):
1178         (WebCore::CSSStyleSelector::mapBackgroundComposite):
1179         (WebCore::CSSStyleSelector::mapBackgroundOrigin):
1180         (WebCore::CSSStyleSelector::mapBackgroundImage):
1181         (WebCore::CSSStyleSelector::mapBackgroundRepeat):
1182         (WebCore::CSSStyleSelector::mapBackgroundXPosition):
1183         (WebCore::CSSStyleSelector::mapBackgroundYPosition):
1184         (WebCore::CSSStyleSelector::mapTransitionDuration):
1185         (WebCore::CSSStyleSelector::mapTransitionRepeatCount):
1186         (WebCore::CSSStyleSelector::mapTransitionTimingFunction):
1187         (WebCore::CSSStyleSelector::mapTransitionProperty):
1188         * css/CSSTimingFunctionValue.cpp:
1189         (WebCore::CSSTimingFunctionValue::cssText): Implemented for use in the
1190         regression test.
1191         * css/CSSTimingFunctionValue.h:
1192         (WebCore::CSSTimingFunctionValue::isTransitionTimingFunctionValue):
1193         Added. Returns true.
1194         * css/CSSValue.h:
1195         (WebCore::CSSValue::isTransitionTimingFunctionValue): Added. Returns
1196         false.
1197
1198 2007-12-13  Steve Falkenburg  <sfalken@apple.com>
1199
1200         Move source file generation into its own vcproj to fix build dependencies.
1201
1202         Reviewed by Adam.
1203
1204         * WebCore.vcproj/WebCore.make:
1205         * WebCore.vcproj/WebCore.sln:
1206         * WebCore.vcproj/WebCore.submit.sln:
1207         * WebCore.vcproj/WebCore.vcproj:
1208         * WebCore.vcproj/WebCoreGenerated.vcproj: Added.
1209
1210 2007-12-13  Justin Garcia  <justin.garcia@apple.com>
1211
1212         Reviewed by Oliver Hunt.
1213         
1214         <rdar://problem/4145786> Undoing a color change of text in a compose window always changes it back to black
1215         
1216         Some of the operations performed in removeHTMLFontStyle were non-undoable.
1217         
1218         I'm having trouble writing a layout test for this because I can't get DRT to
1219         perform editing operations in separate Undo steps without adding unacceptably long
1220         wait times between operations.  I filed:
1221         
1222         <rdar://problem/5646779> Can't get DRT to perform editing operations in separate Undo steps
1223
1224         * editing/ApplyStyleCommand.cpp:
1225         (WebCore::ApplyStyleCommand::removeHTMLFontStyle):
1226
1227 2007-12-13  Sam Weinig  <sam@webkit.org>
1228
1229         Reviewed by Anders.
1230
1231         Fix for http://bugs.webkit.org/show_bug.cgi?id=16352
1232         Toolbar dragged inspector cannot be moved beyond screen edges
1233
1234         * page/InspectorController.cpp:
1235         (WebCore::moveByUnrestricted):
1236         (WebCore::InspectorController::windowScriptObjectAvailable):
1237         (WebCore::InspectorController::moveByUnrestricted):
1238         * page/InspectorController.h:
1239         * page/inspector/inspector.js:
1240
1241 2007-12-13  Adam Roben  <aroben@apple.com>
1242
1243         Fix <rdar://5517707> Crash on wptv.wp.pl when "make bigger" button is clicked
1244
1245         Windows Media Player has a modal message loop that will deliver
1246         messages to us at inappropriate times and we will crash if we handle
1247         them when they are delivered. In PluginViewWin, we add a quirk for
1248         Media Player to set a flag whenever we give the plugin a chance to
1249         execute code, and in SharedTimerWin we check if the plugin is
1250         executing code and repost messages if so.
1251
1252         Reviewed by Anders.
1253
1254         * platform/win/SharedTimerWin.cpp:
1255         (WebCore::TimerWindowWndProc): Repost messages if we're calling a
1256         plugin.
1257         * plugins/win/PluginViewWin.cpp: Surround all calls to the plugin with
1258         setCallingPlugin(true/false).
1259         (WebCore::PluginViewWin::updateWindow):
1260         (WebCore::PluginViewWin::dispatchNPEvent):
1261         (WebCore::PluginViewWin::setNPWindowRect):
1262         (WebCore::PluginViewWin::start):
1263         (WebCore::PluginViewWin::stop):
1264         (WebCore::PluginViewWin::performRequest):
1265         (WebCore::PluginViewWin::bindingInstance):
1266         (WebCore::PluginViewWin::determineQuirks):
1267         (WebCore::PluginViewWin::setCallingPlugin): Added.
1268         (WebCore::PluginViewWin::isCallingPlugin): Added.
1269         * plugins/win/PluginViewWin.h: Added a new quirk.
1270
1271 2007-12-13  Alp Toker  <alp@atoker.com>
1272
1273         Add a missing DEPENDPATH. Fixes non-clean builds following networking
1274         header changes.
1275
1276         * WebCore.pro:
1277
1278 2007-12-13  Dan Bernstein  <mitz@apple.com>
1279
1280         Reviewed by Anders Carlsson.
1281
1282         - fix regression in fast/text/international/bidi-override on Tiger
1283
1284         * platform/graphics/GlyphPageTreeNode.cpp:
1285         (WebCore::GlyphPageTreeNode::initializePage): Add bidi overrides here
1286         too. I forgot to add them when I added them to treatAsZeroWidthSpace in
1287         an earlier patch.
1288
1289 2007-12-13  Justin Garcia  <justin.garcia@apple.com>
1290
1291         Reviewed by Darin Adler.
1292
1293         <rdar://problem/5601583> GMail Editor: Copied link doesn't paste as a link, just colored text
1294         
1295         The code that checks the selected Range to see if it's inside an anchor
1296         checks ancestors of the Range's commonAncestor() but not the
1297         commonAncestor() itself, and so we'd fail to add markup for the enclosing
1298         anchor to the pasteboard.
1299         
1300         Some enclosing element getters check the node passed to the getter and some
1301         don't.  There were a few places where we incorrectly assumed that enclosing 
1302         element getters check the node passed to the getter, but this is the only 
1303         case that I'm able to write a test case for at the moment.
1304         
1305         In this patch I've:
1306         Changed enclosingNodeWithType and enclosingNodeWithTag to take in positions,
1307         like the newer enclosing element getters.  This is important because we must
1308         soon add code to the getters so that they understand that some editing positions
1309         inside nodes don't actually refer to positions inside those nodes but positions
1310         before and after them.  Like [table, 0].
1311         Changed enclosingNodeWithType and enclosingNodeWithTag to check nodes starting with
1312         n where [n, o] is the position passed to the getter, instead of starting the the parent
1313         of n.  This makes all but a few of the enclosing element getters behave consistently.
1314         Changed enclosingNodeWithType and enclosingNodeWithTag to not return non-editable 
1315         nodes if the input position was editable.  This fixes a bug that that the above change
1316         exposed.
1317         Changed enclosingTableCell to simply call enclosingNodeWithType.  We should do
1318         this for the rest of the getters, or simply remove them in favor of enclosingNodeWithType
1319         unless doing so would affect readability, like it would in the case of enclosingTableCell.
1320         Ditto for enclosingBlock.
1321
1322         * editing/AppendNodeCommand.cpp:
1323         (WebCore::AppendNodeCommand::doApply):
1324         * editing/DeleteButtonController.cpp:
1325         (WebCore::enclosingDeletableElement):
1326         * editing/DeleteSelectionCommand.cpp:
1327         (WebCore::DeleteSelectionCommand::initializePositionData):
1328         (WebCore::DeleteSelectionCommand::saveFullySelectedAnchor):
1329         * editing/Editor.cpp:
1330         (WebCore::Editor::selectionUnorderedListState):
1331         (WebCore::Editor::selectionOrderedListState):
1332         * editing/IndentOutdentCommand.cpp:
1333         (WebCore::IndentOutdentCommand::prepareBlockquoteLevelForInsertion):
1334         (WebCore::IndentOutdentCommand::outdentParagraph):
1335         * editing/InsertNodeBeforeCommand.cpp:
1336         (WebCore::InsertNodeBeforeCommand::doApply):
1337         * editing/InsertParagraphSeparatorCommand.cpp:
1338         (WebCore::InsertParagraphSeparatorCommand::doApply):
1339         * editing/ReplaceSelectionCommand.cpp:
1340         (WebCore::ReplaceSelectionCommand::shouldMerge):
1341         (WebCore::ReplaceSelectionCommand::removeUnrenderedTextNodesAtEnds):
1342         (WebCore::ReplaceSelectionCommand::positionAtEndOfInsertedContent):
1343         * editing/TextIterator.cpp:
1344         * editing/htmlediting.cpp:
1345         (WebCore::enclosingBlock):
1346         (WebCore::enclosingNodeWithTag):
1347         (WebCore::enclosingNodeOfType):
1348         (WebCore::enclosingTableCell):
1349         (WebCore::isTableCell):
1350         * editing/htmlediting.h:
1351         * editing/markup.cpp:
1352         (WebCore::appendStartMarkup):
1353         (WebCore::createMarkup):
1354
1355 2007-12-13  Alexey Proskuryakov  <ap@webkit.org>
1356
1357         Reviewed by Darin.
1358
1359         Turn on keyboard event processing quirks for feed views and old applications on Mac OS X.
1360
1361         * WebCore.base.exp:
1362         * dom/KeyboardEvent.cpp:
1363         (WebCore::KeyboardEvent::charCode):
1364         * page/EventHandler.cpp:
1365         (WebCore::EventHandler::needsKeyboardEventDisambiguationQuirks):
1366         (WebCore::EventHandler::keyEvent):
1367         * page/EventHandler.h:
1368         * page/Settings.cpp:
1369         (WebCore::Settings::Settings):
1370         (WebCore::Settings::setNeedsKeyboardEventDisambiguationQuirks):
1371         * page/Settings.h:
1372         (WebCore::Settings::needsKeyboardEventDisambiguationQuirks):
1373         * page/mac/EventHandlerMac.mm:
1374         (WebCore::EventHandler::needsKeyboardEventDisambiguationQuirks):
1375         * platform/PlatformKeyboardEvent.h:
1376         * platform/mac/KeyEventMac.mm:
1377         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
1378         (WebCore::PlatformKeyboardEvent::disambiguateKeyDownEvent):
1379
1380 2007-12-13  Dan Bernstein  <mitz@apple.com>
1381
1382         - build fix
1383
1384         * platform/network/cf/ResourceErrorCF.cpp:
1385
1386 2007-12-13  Antti Koivisto  <antti@apple.com>
1387
1388         Reviewed by Tim Hatcher.
1389
1390         Fix <rdar://problem/5605674> 
1391         Make <video> display WebKit context menu instead of the QTKit one.
1392     
1393         It doesn't really matter where the QTMovieView is.
1394
1395         * ChangeLog:
1396         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
1397         (WebCore::MediaPlayerPrivate::createQTMovieView):
1398         (WebCore::MediaPlayerPrivate::setRect):
1399
1400 2007-12-13  Dan Bernstein  <mitz@apple.com>
1401
1402         Reviewed by Adam Roben.
1403
1404         - ensure that Unicode bidi control characters are rendered as zero width
1405           spaces
1406
1407         Test: fast/text/international/bidi-control-chars-treated-as-ZWS.html
1408
1409         * platform/graphics/Font.h:
1410         (WebCore::Font::treatAsZeroWidthSpace):
1411         * platform/graphics/GlyphPageTreeNode.cpp:
1412         (WebCore::GlyphPageTreeNode::initializePage):
1413         * platform/text/CharacterNames.h:
1414
1415 2007-12-13  Brady Eidson  <beidson@apple.com>
1416
1417         Build fix
1418
1419         * platform/wx/TemporaryLinkStubs.cpp:
1420
1421 2007-12-12  Brady Eidson  <beidson@apple.com>
1422
1423         Build fix
1424
1425         * platform/gtk/TemporaryLinkStubs.cpp:
1426
1427 2007-12-12  Brady Eidson  <beidson@apple.com>
1428
1429         Build fix
1430
1431         * WebCore.pro:
1432         * history/qt/CachedPageQt.cpp: Removed. Whole purpose for this method being platform-specific has been removed
1433
1434 2007-12-12  Brady Eidson  <beidson@apple.com>
1435
1436         Build fix
1437
1438         * platform/win/TemporaryLinkStubs.cpp:
1439
1440 2007-12-12  Brady Eidson  <beidson@apple.com>
1441
1442         Reviewed by Sam Weinig
1443
1444         Fix for <rdar://problem/4886844> and lay groundwork for <rdar://problem/4516170> (Back/Forward Cache on Windows)
1445
1446         All back/forward list and page cache related items used to be in WebKit.
1447         When they were pushed into WebCore, some sloppy compromises were made to keep the Back/Forward cache working on Mac.
1448         Namely, a WebCore::HistoryItem had to know how to keep a WebDocumentView alive.  We accomplished this via some #ifdefs
1449         in CachedPage and having the Mac-only CachedPageMac.mm
1450
1451         To get rid of that nastiness and pave the way for adding Back/Forward cache on other platforms, this patch adds the 
1452         concept of "CachedPagePlatformData" which can contain anything the platform API wants.  
1453
1454         I also took the opportunity to do other cleanup and renaming client methods to better fit their new purposes.
1455
1456         * WebCore.base.exp:
1457         * WebCore.xcodeproj/project.pbxproj:
1458
1459         * history/CachedPage.cpp:
1460         (WebCore::CachedPage::~CachedPage): Combined "close()" and "clear()" to just "clear()" - call it from here.
1461         (WebCore::CachedPage::clear): Call clear() on the CachedPagePlatformData if it exists.  Also delete the CachedPagePlatformData.
1462         (WebCore::CachedPage::setCachedPagePlatformData):
1463         (WebCore::CachedPage::cachedPagePlatformData):
1464         * history/CachedPage.h:
1465
1466         * history/CachedPagePlatformData.h: Added.
1467         (WebCore::CachedPagePlatformData::~CachedPagePlatformData): Virtual d'tor.
1468         (WebCore::CachedPagePlatformData::clear): Virtual method for platforms that need to do cleanup at the same time as CachedPage::clear().
1469
1470         * history/PageCache.cpp:
1471         (WebCore::PageCache::releaseAutoreleasedPagesNow): Call "clear()" instead of "close()"
1472
1473         * history/mac/CachedPageMac.mm: Removed. Functionality replaced with CachedPagePlatformData.
1474
1475         * loader/FrameLoader.cpp:
1476         (WebCore::FrameLoader::transitionToCommitted): Call the new client methods.  Make some work previously done by WebKitMac cross platform 
1477           (setting the cached DocumentLoader to the Frame).
1478         (WebCore::FrameLoader::cachePageForHistoryItem):  Renamed the client methods
1479
1480         * loader/FrameLoaderClient.h:  The very Mac-centric "makeDocumentView", "setDocumentViewFromCachedPage", and "saveDocumentViewToCachedPage"
1481           become "transitionToCommittedForNewPage", "transitionToCommittedFromCachedPage", and "savePlatformDataToCachedPage" accordingly
1482
1483         * svg/graphics/SVGImageEmptyClients.h:
1484         (WebCore::SVGEmptyFrameLoaderClient::savePlatformDataToCachedPage):
1485         (WebCore::SVGEmptyFrameLoaderClient::transitionToCommittedFromCachedPage):
1486         (WebCore::SVGEmptyFrameLoaderClient::transitionToCommittedForNewPage):
1487
1488 2007-12-12  Dan Bernstein  <mitz@apple.com>
1489
1490         Reviewed by Oliver Hunt.
1491
1492         - fix <rdar://problem/5074620> text with font:initial; fails to appear (causes fast/text/font-initial.html to fail)
1493
1494         * css/CSSStyleSelector.cpp:
1495         (WebCore::CSSStyleSelector::applyProperty): When the font property is
1496         set to 'initial', set the font size to its initial value, 'medium',
1497         and the font family to the standard family.
1498
1499 2007-12-12  Justin Garcia  <justin.garcia@apple.com>
1500
1501         Reviewed by Darin Adler.
1502
1503         <rdar://problem/5433862> Mail crashes at WebCore::highestAncestor() when deleting a particular selection
1504
1505         * editing/DeleteSelectionCommand.cpp:
1506         (WebCore::DeleteSelectionCommand::removePreviouslySelectedEmptyTableRows):
1507         Don't remove the table row that contained the end of the selection if it is where we are
1508         about to place the ending selection.
1509         Don't remove all empty rows after the row that contained the start of the selection,
1510         they might come after the row that contained the end of the selection.
1511
1512 2007-12-12  Sam Weinig  <sam@webkit.org>
1513
1514         Reviewed by Anders Carlsson.
1515
1516         Add button to clear the Web Inspector's console.
1517
1518         * English.lproj/InspectorLocalizedStrings.js:
1519         * page/inspector/ConsolePanel.js:
1520         * page/inspector/inspector.css:
1521
1522 2007-12-12  Anders Carlsson  <andersca@apple.com>
1523
1524         Reviewed by Adam and Jon.
1525
1526         <rdar://problem/5349282>
1527         popup blocking is not applied to plugins on Windows.
1528         
1529         Implement popup blocking. If the plug-in supports the new 
1530         NPN_PushPopupsEnabledState/NPN_PopPopupsEnabledState API we just use that
1531         to determine if a plug-in request can open new windows.
1532         
1533         If a plug-in does not support the new API, we assume that a plug-in can open new windows
1534         in response to either mouse click or key press events.
1535         
1536         * plugins/win/PluginViewWin.cpp:
1537         (WebCore::PluginRequestWin::PluginRequestWin):
1538         (WebCore::PluginRequestWin::shouldAllowPopups):
1539         Add new shouldAllowPopups member.
1540         
1541         (WebCore::PluginViewWin::popPopupsStateTimerFired):
1542         Reset the popup state.
1543         
1544         (WebCore::isWindowsMessageUserGesture):
1545         New function that given a windows message id returns whether it's a user gesture or not.
1546         
1547         (WebCore::PluginViewWin::wndProc):
1548         Allow popups if the window message is a user gesture.
1549         
1550         (WebCore::PluginViewWin::dispatchNPEvent):
1551         New method that dispatches an NPEvent, turning on popups if necessary.
1552         
1553         (WebCore::PluginViewWin::paint):
1554         (WebCore::PluginViewWin::handleKeyboardEvent):
1555         (WebCore::PluginViewWin::handleMouseEvent):
1556         Call dispatchNPEvent().
1557         
1558         (WebCore::PluginViewWin::performRequest):
1559         (WebCore::PluginViewWin::load):
1560         Add calls to shouldAllowPopups().
1561         
1562         (WebCore::PluginViewWin::pushPopupsEnabledState):
1563         (WebCore::PluginViewWin::popPopupsEnabledState):
1564         New methods that maintain the popup state stack.
1565         
1566         (WebCore::PluginViewWin::arePopupsAllowed):
1567         New method that returns whether popups are allowed.
1568         
1569         (WebCore::PluginViewWin::PluginViewWin):
1570         * plugins/win/PluginViewWin.h:
1571         Add new instance variables.
1572         
1573         * plugins/win/npapi.cpp:
1574         (NPN_PushPopupsEnabledState):
1575         (NPN_PopPopupsEnabledState):
1576         Implement these.
1577
1578 2007-12-12  Dan Bernstein  <mitz@apple.com>
1579
1580         Reviewed by John Sullivan.
1581
1582         - fix a bug in debug builds only where selecting an earlier item in
1583           a popup selects the first item
1584
1585         Test: fast/forms/menulist-selection-reset.html
1586
1587         * html/HTMLSelectElement.cpp:
1588         (WebCore::HTMLSelectElement::recalcListItems): Added an argument that
1589         tells that function whether it should update the selected state of
1590         option elements.
1591         (WebCore::HTMLSelectElement::checkListItems): Changed to pass false
1592         as the above argument.
1593         * html/HTMLSelectElement.h:
1594
1595 2007-12-12  Adele Peterson  <adele@apple.com>
1596
1597         Reviewed by Geoff.
1598
1599         Fix for <rdar://problem/5643054> Remove cue point implementation for media elements
1600
1601         When the specification for cue ranges is more final, we will implement those.
1602
1603         * html/HTMLMediaElement.cpp:
1604         (WebCore::HTMLMediaElement::~HTMLMediaElement):
1605         (WebCore::HTMLMediaElement::load):
1606         * html/HTMLMediaElement.h:
1607         * html/HTMLMediaElement.idl:
1608         * platform/graphics/MediaPlayer.cpp:
1609         * platform/graphics/MediaPlayer.h:
1610         (WebCore::MediaPlayerClient::mediaPlayerTimeChanged):
1611         * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
1612         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
1613         (WebCore::MediaPlayerPrivate::MediaPlayerPrivate):
1614         (WebCore::MediaPlayerPrivate::load):
1615         (WebCore::MediaPlayerPrivate::play):
1616         (WebCore::MediaPlayerPrivate::pause):
1617         (WebCore::MediaPlayerPrivate::setEndTime):
1618         (WebCore::MediaPlayerPrivate::startEndPointTimerIfNeeded):
1619         (WebCore::MediaPlayerPrivate::endPointTimerFired):
1620         (WebCore::MediaPlayerPrivate::timeChanged):
1621         (WebCore::MediaPlayerPrivate::didEnd):
1622         * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
1623         (WebCore::MediaPlayerPrivate::MediaPlayerPrivate):
1624         (WebCore::MediaPlayerPrivate::startEndPointTimerIfNeeded):
1625         (WebCore::MediaPlayerPrivate::endPointTimerFired):
1626         * platform/graphics/gtk/MediaPlayerPrivateGStreamer.h:
1627
1628 2007-12-12  MorganL  <morganl.webkit@yahoo.com>
1629
1630         Reviewed by Maciej.
1631
1632         Fixes:
1633         http://bugs.webkit.org/show_bug.cgi?id=16408
1634
1635         When navigating back/forward to a http:// link, we should prefer to
1636         load from cache if possible.
1637
1638         * loader/FrameLoader.cpp:
1639
1640 2007-12-12  Anders Carlsson  <andersca@apple.com>
1641
1642         Reviewed by Sam.
1643
1644         <rdar://problem/5132003>
1645         dumpResourceLoadCallbacks is not implemented in DRT on Windows.
1646         
1647         * platform/network/cf/ResourceErrorCF.cpp:
1648         (WebCore::ResourceError::unpackPlatformError):
1649         Handle kCFErrorDomainWinSock.
1650         
1651         * platform/network/cf/ResourceHandleCFNet.cpp:
1652         (WebCore::willSendRequest):
1653         Ignore willSendRequest calls where the redirect response is null, like we do in 
1654         the Mac version.
1655
1656 2007-12-12  Steve Falkenburg  <sfalken@apple.com>
1657
1658         <rdar://problem/5643785> Fix iBench regression caused by mis-placed nested timer check.
1659         
1660         Reviewed by Anders.
1661
1662         * platform/win/SharedTimerWin.cpp:
1663         (WebCore::TimerWindowWndProc): Don't set high-resolution timer flag inside non-high-resolution timer proc.
1664
1665 2007-12-12  Beth Dakin  <bdakin@apple.com>
1666
1667         Reviewed by Oliver.
1668
1669         Fix for <rdar://problem/5643770> REGRESSION: Free-standing SVGs 
1670         with width and height 100% clip to 300 x 150
1671
1672         Though it was correct in an earlier iteration of my patch, it is 
1673         not sufficient in the final, committed version to ask if the 
1674         relativeWidthValue() or relativeHeightValue() is greater than 0 
1675         just to determine if one has been set, for, they are now 
1676         initialized to 300 and 150 respectively! This patch instead adds a 
1677         bool to keep track of whether a container size has been set, and 
1678         only used the relative value if it has.
1679
1680         * rendering/RenderSVGRoot.cpp:
1681         (WebCore::RenderSVGRoot::calcViewport):
1682         * svg/SVGSVGElement.cpp:
1683         (WebCore::SVGSVGElement::SVGSVGElement):
1684         * svg/SVGSVGElement.h:
1685         (WebCore::SVGSVGElement::setContainerSize):
1686         (WebCore::SVGSVGElement::hasSetContainerSize):
1687
1688 2007-12-12  Brady Eidson  <beidson@apple.com>
1689
1690         Reviewed by Steve Falkenburg 
1691
1692         <rdar://problem/5012636> - WebURLProtectionSpace::realm returns the hostname rather than the authentication realm
1693
1694         * platform/network/ProtectionSpace.cpp:
1695         (WebCore::ProtectionSpace::ProtectionSpace): Assign the realm to m_realm, instead of the host
1696
1697 2007-12-12  Alp Toker  <alp@atoker.com>
1698
1699         Reviewed by Maciej.
1700
1701         http://bugs.webkit.org/show_bug.cgi?id=16388
1702         [GTK] Widget::setCursor() gets called frequently
1703
1704         Cache the current cursor to avoid calling gdk_window_set_cursor() when
1705         there's no change in cursor.
1706
1707         * platform/gtk/WidgetGtk.cpp:
1708         (WebCore::Widget::Widget):
1709         (WebCore::Widget::cursor):
1710         (WebCore::Widget::setCursor):
1711
1712 2007-12-12  Rodney Dawes  <dobey@wayofthemonkey.com>
1713
1714         Reviewed by Maciej.
1715
1716         http://bugs.webkit.org/show_bug.cgi?id=16342
1717         Build Warning and Error fixes in WebCore GTK+
1718
1719         Use C-style casts for casting function pointers to gpointer
1720         Use static_cast<int> to cast a float to int to fix a warning
1721
1722         * platform/gtk/PlatformScrollBarGtk.cpp:
1723         (PlatformScrollbar::PlatformScrollbar):
1724         (PlatformScrollbar::~PlatformScrollbar):
1725         (PlatformScrollbar::gtkValueChanged):
1726         * platform/gtk/ThreadingGtk.cpp:
1727         (callFunctionOnMainThread):
1728         (callOnMainThread):
1729
1730 2007-12-12  Dan Bernstein  <mitz@apple.com>
1731
1732         Reviewed by Darin Adler.
1733
1734         - better fix for a crash when pressing a key that is not associated
1735           with a command
1736
1737         * editing/EditorCommand.cpp:
1738         (WebCore::Editor::command): Return the empty command if the command name
1739         is empty.
1740
1741 2007-12-12  Alexey Proskuryakov  <ap@webkit.org>
1742
1743         Reviewed by Darin.
1744
1745         http://bugs.webkit.org/show_bug.cgi?id=16410
1746         Implement isKeypadEvent() on Windows
1747
1748         Test: platform/win/fast/events/keyLocation-numpad.html
1749
1750         * platform/win/KeyEventWin.cpp:
1751         (WebCore::isKeypadEvent): Added.
1752         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent): Also fixed a mistake with autorepeat.
1753
1754 2007-12-12  Oliver Hunt  <oliver@apple.com>
1755
1756         Reviewed by Maciej.
1757
1758         <rdar://problem/5071781> window.mouseout events are not sent 
1759         to window when mouse moves out of window 
1760
1761         Make PlatformMouseEvent recognise WM_MOUSELEAVE.
1762
1763         * platform/win/PlatformMouseEventWin.cpp:
1764         (WebCore::messageToEventType):
1765         (WebCore::PlatformMouseEvent::PlatformMouseEvent):
1766
1767 2007-12-12  Sam Weinig  <sam@webkit.org>
1768
1769         Fix Mac release build.
1770
1771         * WebCore.base.exp:
1772
1773 2007-12-12  Sam Weinig  <sam@webkit.org>
1774
1775         Build fix for Qt, Gtk, and Wx.
1776
1777         * css/CSSParser.cpp:
1778         (WebCore::CSSParser::parseValue):
1779         * loader/win/FrameLoaderWin.cpp:
1780         (WebCore::FrameLoader::urlSelected):
1781         * platform/network/curl/ResourceHandleManager.cpp:
1782         (WebCore::parseDataUrl):
1783         (WebCore::ResourceHandleManager::startJob):
1784         * platform/network/win/CookieJarWin.cpp:
1785         (WebCore::setCookies):
1786         (WebCore::cookies):
1787         * platform/network/win/ResourceHandleWin.cpp:
1788         (WebCore::ResourceHandle::start):
1789         * platform/qt/PasteboardQt.cpp:
1790         (WebCore::Pasteboard::writeURL):
1791
1792 2007-12-11  Dan Bernstein  <mitz@apple.com>
1793
1794         Reviewed by Maciej Stachowiak.
1795
1796         - allow non-integer font sizes on Windows for small caps
1797
1798         * platform/graphics/win/FontDataWin.cpp:
1799         (WebCore::FontData::smallCapsFontData):
1800         * platform/graphics/win/FontPlatformData.h:
1801         (WebCore::FontPlatformData::size):
1802         (WebCore::FontPlatformData::setSize):
1803         * platform/graphics/win/FontPlatformDataWin.cpp:
1804         (WebCore::FontPlatformData::FontPlatformData):
1805
1806 2007-12-11  Sam Weinig  <sam@webkit.org>
1807
1808         Build fix for Qt, Gtk, and Wx.
1809
1810         * platform/gtk/CookieJarGtk.cpp:
1811         (WebCore::setCookies):
1812         (WebCore::cookies):
1813         * platform/qt/ClipboardQt.cpp:
1814         (WebCore::ClipboardQt::writeURL):
1815         * platform/qt/CookieJarQt.cpp:
1816         (WebCore::setCookies):
1817         (WebCore::cookies):
1818         * platform/wx/PasteboardWx.cpp:
1819         (WebCore::Pasteboard::writeURL):
1820
1821 2007-12-11  Sam Weinig  <sam@webkit.org>
1822
1823         Reviewed by Darin Adler.
1824
1825         Scrub URL out of the tree in preparation for renaming KURL to URL.
1826             - Renames Document::URL() -> Document::url()
1827             - Renames DocumentLoader::URL() -> DocumentLoader::url()
1828             - Renames KURL::url() to KURL::string() and KURL::deprecatedString()
1829             - Remove FrameLoader::URL()
1830             - Various variable renames.
1831
1832         The change from Document::URL() to Document::url() required changes
1833         to the bindings scripts as well, because URL() is the name of a DOM
1834         method.  The code generation scripts now have code to special case URL()
1835         to url().
1836
1837         * WebCore.base.exp:
1838         * bindings/js/kjs_events.cpp:
1839         (WebCore::JSLazyEventListener::parseCode):
1840         * bindings/js/kjs_navigator.cpp:
1841         (KJS::Navigator::getValueProperty):
1842         * bindings/js/kjs_proxy.cpp:
1843         (WebCore::KJSProxy::initScript):
1844         * bindings/js/kjs_window.cpp:
1845         (KJS::Window::put):
1846         (KJS::Window::allowsAccessFrom):
1847         (KJS::Location::put):
1848         (KJS::LocationProtoFuncReplace::callAsFunction):
1849         (KJS::LocationProtoFuncReload::callAsFunction):
1850         (KJS::LocationProtoFuncAssign::callAsFunction):
1851         * bindings/scripts/CodeGenerator.pm:
1852         * bindings/scripts/CodeGeneratorCOM.pm:
1853         * bindings/scripts/CodeGeneratorJS.pm:
1854         * bindings/scripts/CodeGeneratorObjC.pm:
1855         * css/CSSImportRule.cpp:
1856         (WebCore::CSSImportRule::insertedIntoParent):
1857         * css/CSSParser.cpp:
1858         (WebCore::CSSParser::parseValue):
1859         (WebCore::CSSParser::parseContent):
1860         (WebCore::CSSParser::parseBackgroundImage):
1861         (WebCore::CSSParser::parseFontFaceSrc):
1862         (WebCore::CSSParser::parseBorderImage):
1863         (WebCore::CSSParser::createImportRule):
1864         * css/CSSStyleSelector.cpp:
1865         (WebCore::CSSStyleSelector::setEncodedURL):
1866         * dom/Document.cpp:
1867         (WebCore::Document::processHttpEquiv):
1868         (WebCore::Document::cookie):
1869         (WebCore::Document::setCookie):
1870         (WebCore::Document::domain):
1871         (WebCore::Document::setDomain):
1872         (WebCore::Document::getImageMap):
1873         (WebCore::Document::completeURL):
1874         * dom/Document.h:
1875         (WebCore::Document::url):
1876         (WebCore::Document::baseURL):
1877         * dom/Element.cpp:
1878         (WebCore::Element::baseURI):
1879         * dom/ProcessingInstruction.h:
1880         * dom/StyledElement.cpp:
1881         (WebCore::StyledElement::addCSSImageProperty):
1882         * dom/StyledElement.h:
1883         * dom/XMLTokenizer.cpp:
1884         (WebCore::XMLTokenizer::endElementNs):
1885         (WebCore::XMLTokenizer::end):
1886         (WebCore::):
1887         * dom/XMLTokenizer.h:
1888         * editing/Editor.cpp:
1889         (WebCore::Editor::copy):
1890         * editing/markup.cpp:
1891         (WebCore::completeURLs):
1892         * history/CachedPage.h:
1893         (WebCore::CachedPage::url):
1894         * history/HistoryItem.cpp:
1895         (WebCore::HistoryItem::HistoryItem):
1896         (WebCore::HistoryItem::setURL):
1897         (WebCore::HistoryItem::isCurrentDocument):
1898         * html/HTMLBaseElement.cpp:
1899         (WebCore::HTMLBaseElement::process):
1900         * html/HTMLParser.cpp:
1901         (WebCore::HTMLParser::reportErrorToConsole):
1902         * html/HTMLScriptElement.cpp:
1903         (WebCore::HTMLScriptElement::childrenChanged):
1904         (WebCore::HTMLScriptElement::insertedIntoDocument):
1905         (WebCore::HTMLScriptElement::evaluateScript):
1906         * html/HTMLScriptElement.h:
1907         * html/HTMLTokenizer.cpp:
1908         (WebCore::HTMLTokenizer::scriptExecution):
1909         * loader/Cache.cpp:
1910         (WebCore::createResource):
1911         (WebCore::Cache::requestResource):
1912         * loader/CachedCSSStyleSheet.cpp:
1913         (WebCore::CachedCSSStyleSheet::checkNotify):
1914         * loader/CachedResource.cpp:
1915         (WebCore::CachedResource::CachedResource):
1916         * loader/CachedResource.h:
1917         (WebCore::CachedResource::):
1918         * loader/CachedScript.h:
1919         * loader/DocLoader.cpp:
1920         (WebCore::DocLoader::checkForReload):
1921         (WebCore::DocLoader::requestResource):
1922         * loader/DocumentLoader.cpp:
1923         (WebCore::DocumentLoader::url):
1924         (WebCore::DocumentLoader::replaceRequestURLForAnchorScroll):
1925         (WebCore::DocumentLoader::setRequest):
1926         (WebCore::DocumentLoader::startLoadingMainResource):
1927         * loader/DocumentLoader.h:
1928         * loader/FrameLoader.cpp:
1929         (WebCore::FormSubmission::FormSubmission):
1930         (WebCore::ScheduledRedirection::ScheduledRedirection):
1931         (WebCore::FrameLoader::changeLocation):
1932         (WebCore::FrameLoader::urlSelected):
1933         (WebCore::FrameLoader::requestFrame):
1934         (WebCore::FrameLoader::loadSubframe):
1935         (WebCore::FrameLoader::submitFormAgain):
1936         (WebCore::FrameLoader::submitForm):
1937         (WebCore::FrameLoader::didExplicitOpen):
1938         (WebCore::FrameLoader::replaceContentsWithScriptResult):
1939         (WebCore::FrameLoader::executeScript):
1940         (WebCore::FrameLoader::receivedFirstData):
1941         (WebCore::FrameLoader::begin):
1942         (WebCore::FrameLoader::startIconLoader):
1943         (WebCore::FrameLoader::commitIconURLToIconDatabase):
1944         (WebCore::FrameLoader::scheduleRefresh):
1945         (WebCore::FrameLoader::redirectionTimerFired):
1946         (WebCore::FrameLoader::loadPlugin):
1947         (WebCore::FrameLoader::didNotOpenURL):
1948         (WebCore::FrameLoader::updatePolicyBaseURL):
1949         (WebCore::FrameLoader::scrollToAnchor):
1950         (WebCore::FrameLoader::startRedirectionTimer):
1951         (WebCore::FrameLoader::load):
1952         (WebCore::FrameLoader::canLoad):
1953         (WebCore::FrameLoader::shouldHideReferrer):
1954         (WebCore::FrameLoader::shouldAllowNavigation):
1955         (WebCore::FrameLoader::commitProvisionalLoad):
1956         (WebCore::FrameLoader::clientRedirected):
1957         (WebCore::FrameLoader::open):
1958         (WebCore::FrameLoader::didTellBridgeAboutLoad):
1959         (WebCore::FrameLoader::haveToldBridgeAboutLoad):
1960         (WebCore::FrameLoader::post):
1961         (WebCore::FrameLoader::loadResourceSynchronously):
1962         (WebCore::FrameLoader::continueFragmentScrollAfterNavigationPolicy):
1963         (WebCore::FrameLoader::shouldTreatURLAsSameAsCurrent):
1964         (WebCore::FrameLoader::createHistoryItem):
1965         (WebCore::FrameLoader::addBackForwardItemClippedAtTarget):
1966         (WebCore::FrameLoader::loadItem):
1967         (WebCore::FrameLoader::urlsMatchItem):
1968         (WebCore::FrameLoader::recursiveGoToItem):
1969         (WebCore::FrameLoader::updateHistoryForStandardLoad):
1970         (WebCore::FrameLoader::updateHistoryForRedirectWithLockedHistory):
1971         * loader/FrameLoader.h:
1972         (WebCore::FrameLoader::url):
1973         * loader/ImageDocument.cpp:
1974         (WebCore::ImageDocument::createDocumentStructure):
1975         * loader/MainResourceLoader.cpp:
1976         (WebCore::shouldLoadAsEmptyDocument):
1977         (WebCore::MainResourceLoader::didFinishLoading):
1978         * loader/NavigationAction.cpp:
1979         (WebCore::NavigationAction::NavigationAction):
1980         * loader/NavigationAction.h:
1981         (WebCore::NavigationAction::url):
1982         * loader/PluginDocument.cpp:
1983         (WebCore::PluginTokenizer::createDocumentStructure):
1984         * loader/SubresourceLoader.cpp:
1985         (WebCore::SubresourceLoader::load):
1986         (WebCore::SubresourceLoader::create):
1987         * loader/icon/IconLoader.cpp:
1988         (WebCore::IconLoader::startLoading):
1989         (WebCore::IconLoader::finishLoading):
1990         * loader/loader.cpp:
1991         (WebCore::Loader::servePendingRequests):
1992         * loader/mac/LoaderNSURLExtras.m:
1993         (urlOriginalData):
1994         * page/Chrome.cpp:
1995         (WebCore::Chrome::setToolTip):
1996         * page/ContextMenuController.cpp:
1997         (WebCore::ContextMenuController::contextMenuItemSelected):
1998         * page/Frame.cpp:
1999         (WebCore::Frame::setUserStyleSheetLocation):
2000         * page/InspectorController.cpp:
2001         (WebCore::InspectorResource::type):
2002         (WebCore::addSourceToFrame):
2003         (WebCore::InspectorController::addScriptResource):
2004         (WebCore::InspectorController::updateScriptResourceRequest):
2005         (WebCore::InspectorController::didCommitLoad):
2006         * page/mac/WebCoreFrameBridge.mm:
2007         (-[WebCoreFrameBridge getData:andResponse:forURL:]):
2008         * platform/KURL.h:
2009         (WebCore::KURL::string):
2010         (WebCore::KURL::deprecatedString):
2011         * platform/mac/ClipboardMac.mm:
2012         (WebCore::ClipboardMac::getData):
2013         * platform/mac/CookieJar.mm:
2014         (WebCore::cookies):
2015         (WebCore::setCookies):
2016         * platform/mac/PasteboardMac.mm:
2017         (WebCore::Pasteboard::writeURL):
2018         (WebCore::fileWrapperForImage):
2019         (WebCore::Pasteboard::writeImage):
2020         (WebCore::Pasteboard::plainText):
2021         * platform/network/ResourceHandle.cpp:
2022         (WebCore::ResourceHandle::portAllowed):
2023         * platform/network/ResourceRequestBase.cpp:
2024         (WebCore::ResourceRequestBase::isNull):
2025         * platform/network/cf/ResourceHandleCFNet.cpp:
2026         (WebCore::willSendRequest):
2027         (WebCore::didReceiveResponse):
2028         (WebCore::didReceiveData):
2029         (WebCore::didFinishLoading):
2030         (WebCore::didFail):
2031         (WebCore::didReceiveChallenge):
2032         (WebCore::ResourceHandleInternal::~ResourceHandleInternal):
2033         (WebCore::ResourceHandle::~ResourceHandle):
2034         (WebCore::ResourceHandle::start):
2035         * platform/win/ClipboardUtilitiesWin.cpp:
2036         (WebCore::createGlobalData):
2037         (WebCore::urlToMarkup):
2038         * platform/win/ClipboardWin.cpp:
2039         (WebCore::writeURL):
2040         (WebCore::writeImageToDataObject):
2041         (WebCore::ClipboardWin::writeURL):
2042         (WebCore::ClipboardWin::writeRange):
2043         * platform/win/PasteboardWin.cpp:
2044         (WebCore::Pasteboard::writeSelection):
2045         (WebCore::Pasteboard::writeURL):
2046         * plugins/win/PluginDatabaseWin.cpp:
2047         (WebCore::PluginDatabaseWin::findPlugin):
2048         * plugins/win/PluginStreamWin.cpp:
2049         (WebCore::PluginStreamWin::startStream):
2050         (WebCore::PluginStreamWin::destroyStream):
2051         * plugins/win/PluginViewWin.cpp:
2052         (WebCore::scriptStringIfJavaScriptURL):
2053         (WebCore::PluginViewWin::performRequest):
2054         * svg/SVGImageLoader.cpp:
2055         (WebCore::SVGImageLoader::updateFromElement):
2056         * xml/XMLHttpRequest.cpp:
2057         (WebCore::XMLHttpRequest::getResponseXML):
2058         (WebCore::XMLHttpRequest::urlMatchesDocumentDomain):
2059         * xml/XSLImportRule.cpp:
2060         (WebCore::XSLImportRule::loadSheet):
2061         * xml/XSLTProcessor.cpp:
2062         (WebCore::XSLTProcessor::createDocumentFromSource):
2063         (WebCore::xsltStylesheetPointer):
2064         (WebCore::xmlDocPtrFromNode):
2065
2066 2007-12-11  Beth Dakin  <bdakin@apple.com>
2067
2068         Reviewed by Darin.
2069
2070         Fix for <rdar://problem/5641255> SVGs with width and height 100% 
2071         fail to render when used as background images
2072
2073         CachedImage now has a setImageContainerSize function. It is only 
2074         needed for SVG right now.
2075         * loader/CachedImage.cpp:
2076         (WebCore::CachedImage::setImageContainerSize):
2077         * loader/CachedImage.h:
2078
2079         Relatively sized SVGs have no intrinsic size. Because this call is 
2080         low-level enough that we cannot pass in the container size and get 
2081         the real size of the SVG, we need to know if it has relative 
2082         dimensions, and if so, we need to get the size from scaledTileSize.
2083         * platform/graphics/Image.cpp:
2084         (WebCore::Image::drawTiled):
2085         * platform/graphics/Image.h:
2086         (WebCore::Image::setContainerSize):
2087         (WebCore::Image::hasRelativeWidth):
2088         (WebCore::Image::hasRelativeHeight):
2089
2090         Re-factored calculateBackgroundSize a bit so that it returns an 
2091         IntSize. Made it a member function so that it can send m_width and 
2092         m_height along to setImageContainerSize.
2093         * rendering/RenderBox.cpp:
2094         (WebCore::RenderBox::calculateBackgroundSize):
2095         (WebCore::RenderBox::calculateBackgroundImageGeometry):
2096         * rendering/RenderBox.h:
2097
2098         Need to account for relatively sized SVGs in calcViewport()
2099         * rendering/RenderSVGRoot.cpp:
2100         (WebCore::RenderSVGRoot::calcViewport):
2101         
2102         Added new member variables to store the size of the SVG container. 
2103         relativeWidthValue() and relativeHeightValue() use the stored SVG 
2104         container size to correctly calculate the width and height of a 
2105         relatively sized SVG.
2106         * svg/SVGSVGElement.cpp:
2107         (WebCore::SVGSVGElement::SVGSVGElement):
2108         (WebCore::SVGSVGElement::setContainerSize):
2109         (WebCore::SVGSVGElement::relativeWidthValue):
2110         (WebCore::SVGSVGElement::relativeHeightValue):
2111         * svg/SVGSVGElement.h:
2112         (WebCore::SVGSVGElement::containerSize):
2113         
2114         Re-factored size calculations to use the size of the container.
2115         * svg/graphics/SVGImage.cpp:
2116         (WebCore::SVGImage::setContainerSize):
2117         (WebCore::SVGImage::size):
2118         (WebCore::SVGImage::hasRelativeWidth):
2119         (WebCore::SVGImage::hasRelativeHeight):
2120         * svg/graphics/SVGImage.h:
2121
2122 2007-12-11  Darin Adler  <darin@apple.com>
2123
2124         * editing/Editor.cpp:
2125         (WebCore::Editor::yankFromKillRing): Try to fix non-Mac builds by adding
2126         a missing return statement.
2127
2128 2007-12-11  Darin Adler  <darin@apple.com>
2129
2130         Reviewed by Geoff.
2131
2132         - exposed many new commands to the DOM Document executeCommand function by
2133           merging the JSEditor and Editor executeCommand implementations
2134         - replaced the execCommand function with a EditorCommand class
2135         - replaced the WTF::StrHash<> class template with the WebCore::StringHash class
2136         - replaced the WTF::CaseInsensitiveHash<> class template with the
2137           WebCore::CaseFoldingHash class
2138
2139         * WebCore.base.exp: Updated.
2140         * WebCore.pro: Added EditorCommand.cpp, removed JSEditor.cpp.
2141         * WebCore.vcproj/WebCore.vcproj: Ditto.
2142         * WebCore.xcodeproj/project.pbxproj: Ditto.
2143         * WebCoreSources.bkl: Ditto.
2144
2145         * dom/Document.cpp:
2146         (WebCore::Document::Document): Removed code to set up m_jsEditor.
2147         (WebCore::Document::~Document): Removed code to delete m_jsEditor.
2148         (WebCore::command): Added. Helper function that gets an Editor::Command.
2149         (WebCore::Document::executeCommand): Changed to use Editor::Command instead of
2150         JSEditor.
2151         (WebCore::Document::queryCommandEnabled): Ditto.
2152         (WebCore::Document::queryCommandIndeterm):
2153         (WebCore::Document::queryCommandState): Ditto.
2154         (WebCore::Document::queryCommandSupported): Ditto.
2155         (WebCore::Document::queryCommandValue): Ditto.
2156
2157         * dom/Document.h: Removed JSEditor, jsEditor, m_jsEditor. Changed to
2158         use CaseFoldingHash.
2159
2160         * editing/Editor.cpp:
2161         (WebCore::Editor::selectionForCommand): Renamed from selectionForEvent and
2162         made into a member function so it is accessible from the new EditorCommand.cpp file.
2163         Also changed to get the selection from the passed-in frame instead of from the
2164         page, because this should work on the targeted frame unless the event overrides it.
2165         (WebCore::Editor::handleKeypress): Updated for selectionForCommand change.
2166         (WebCore::Editor::handleInputMethodKeypress): Ditto.
2167         (WebCore::imageElementFromImageDocument): Renamed and changed to return
2168         a HTMLImageElement instead of a Node*.
2169         (WebCore::Editor::canCopy): Updated for name change.
2170         (WebCore::Editor::selectionUnorderedListState): Updated for TriState change.
2171         (WebCore::Editor::selectionOrderedListState): Ditto.
2172         (WebCore::Editor::selectionStartHasStyle): Make type of local more specific.
2173         (WebCore::updateState): Moved here from Frame.
2174         (WebCore::Editor::selectionHasStyle): Ditto.
2175         (WebCore::Editor::Editor): Initialize m_shouldStartNewKillRingSequence.
2176         (WebCore::Editor::insertTextWithoutSendingTextEvent): Updated for
2177         selectionForCommand change.
2178         (WebCore::Editor::copy): Updated for imageElementFromImageDocument change.
2179         (WebCore::Editor::toggleBold): Call the ToggleBold command via the command
2180         machinery since it's no longer in this file as a local function.
2181         (WebCore::Editor::toggleUnderline): Call the ToggleUnderline command.
2182         (WebCore::Editor::setBaseWritingDirection): Change type of argument and of
2183         local variable.
2184         (WebCore::Editor::addToKillRing): Moved here from EditorMac. Not useful
2185         without a kill ring, but it's relatively straightforward to implement one.
2186         (WebCore::Editor::appendToKillRing): Put default implementation here for
2187         platforms other than Mac. We should probably put a simple kill ring
2188         implementation here -- doesn't need to be shared with the OS oh platforms
2189         other than Mac.
2190         (WebCore::Editor::prependToKillRing): Ditto.
2191         (WebCore::Editor::yankFromKillRing): Ditto.
2192         (WebCore::Editor::startNewKillRingSequence): Ditto.
2193         (WebCore::Editor::setKillRingToYankedState): Ditto.
2194
2195         * editing/Editor.h: Moved the TriState enum here instead of inside the
2196         Frame class. Added EditorCommandSource enum. Moved selectionHasStyle
2197         here from the Frame class. Added Editor::Command class with five functions
2198         for the various things you can do with a command (execute it, check if it
2199         can be used, and its state and value). Changed hte parameter of
2200         setBaseWritingDirection to be a const String& rather than a String.
2201         Got rid of the kill-ring-related operations, but added the kill ring
2202         functions themselves. Made selectedRange() public. Made the
2203         m_startNewKillRingSequence not Mac-specific and added "should" to its
2204         name.
2205
2206         * editing/EditorCommand.cpp: Copied from WebCore/editing/Editor.cpp.
2207         Retained only the editing commands.
2208         (WebCore::targetFrame): Moved to the top of the file.
2209         (WebCore::executeApplyStyle): Added. Helper function for commands
2210         that need to apply styles.
2211         (WebCore::executeToggleStyle): Added. Helper function for commands
2212         that need to toggle styles based on the style of the start of selection.
2213         (WebCore::executeApplyParagraphStyle): Added. Like executeApplyStyle, but
2214         for paragraph styles.
2215         (WebCore::executeInsertFragment): Added. Helper function for commands
2216         that need to insert a DOM fragment.
2217         (WebCore::executeInsertNode): Added. Helper function for commands that
2218         need to insert a tree rooted in a single DOM node.
2219         (WebCore::stateStyle): Added. Helper function for the state of commands
2220         that represent style.
2221         (WebCore::valueStyle): Added. Helper function for the value of commands
2222         that represent style.
2223         (WebCore::canScroll): Added. Helper functions for some move and scroll
2224         commands that need to determine if the renderer they are in can scroll.
2225         (WebCore::unionDOMRanges): Moved here from EditorMac.
2226         (WebCore::executeBackColor):
2227         (WebCore::executeBackwardDelete):
2228         (WebCore::executeCopy):
2229         (WebCore::executeCreateLink):
2230         (WebCore::executeCut):
2231         (WebCore::executeDelete):
2232         (WebCore::executeDeleteToMark):
2233         (WebCore::executeDeleteWordBackward):
2234         (WebCore::executeDeleteWordForward):
2235         (WebCore::executeFindString):
2236         (WebCore::executeFontName):
2237         (WebCore::executeFontSize):
2238         (WebCore::executeFontSizeDelta):
2239         (WebCore::executeForeColor):
2240         (WebCore::executeFormatBlock):
2241         (WebCore::executeForwardDelete):
2242         (WebCore::executeIndent):
2243         (WebCore::executeInsertBacktab):
2244         (WebCore::executeInsertHorizontalRule):
2245         (WebCore::executeInsertHTML):
2246         (WebCore::executeInsertImage):
2247         (WebCore::executeInsertLineBreak):
2248         (WebCore::executeInsertNewline):
2249         (WebCore::executeInsertNewlineInQuotedContent):
2250         (WebCore::executeInsertOrderedList):
2251         (WebCore::executeInsertParagraph):
2252         (WebCore::executeInsertTab):
2253         (WebCore::executeInsertText):
2254         (WebCore::executeInsertUnorderedList):
2255         (WebCore::executeJustifyCenter):
2256         (WebCore::executeJustifyFull):
2257         (WebCore::executeJustifyLeft):
2258         (WebCore::executeJustifyRight):
2259         (WebCore::executeMoveBackward):
2260         (WebCore::executeMoveBackwardAndModifySelection):
2261         (WebCore::executeMoveDown):
2262         (WebCore::executeMoveDownAndModifySelection):
2263         (WebCore::executeMoveDownByPageAndModifyCaret):
2264         (WebCore::executeMoveForward):
2265         (WebCore::executeMoveForwardAndModifySelection):
2266         (WebCore::executeMoveLeft):
2267         (WebCore::executeMoveLeftAndModifySelection):
2268         (WebCore::executeMoveRight):
2269         (WebCore::executeMoveRightAndModifySelection):
2270         (WebCore::executeMoveToBeginningOfDocument):
2271         (WebCore::executeMoveToBeginningOfDocumentAndModifySelection):
2272         (WebCore::executeMoveToBeginningOfLine):
2273         (WebCore::executeMoveToBeginningOfLineAndModifySelection):
2274         (WebCore::executeMoveToBeginningOfParagraph):
2275         (WebCore::executeMoveToBeginningOfParagraphAndModifySelection):
2276         (WebCore::executeMoveToBeginningOfSentence):
2277         (WebCore::executeMoveToBeginningOfSentenceAndModifySelection):
2278         (WebCore::executeMoveToEndOfDocument):
2279         (WebCore::executeMoveToEndOfDocumentAndModifySelection):
2280         (WebCore::executeMoveToEndOfSentence):
2281         (WebCore::executeMoveToEndOfSentenceAndModifySelection):
2282         (WebCore::executeMoveToEndOfLine):
2283         (WebCore::executeMoveToEndOfLineAndModifySelection):
2284         (WebCore::executeMoveToEndOfParagraph):
2285         (WebCore::executeMoveToEndOfParagraphAndModifySelection):
2286         (WebCore::executeMoveParagraphBackwardAndModifySelection):
2287         (WebCore::executeMoveParagraphForwardAndModifySelection):
2288         (WebCore::executeMoveUp):
2289         (WebCore::executeMoveUpAndModifySelection):
2290         (WebCore::executeMoveUpByPageAndModifyCaret):
2291         (WebCore::executeMoveWordBackward):
2292         (WebCore::executeMoveWordBackwardAndModifySelection):
2293         (WebCore::executeMoveWordForward):
2294         (WebCore::executeMoveWordForwardAndModifySelection):
2295         (WebCore::executeMoveWordLeft):
2296         (WebCore::executeMoveWordLeftAndModifySelection):
2297         (WebCore::executeMoveWordRight):
2298         (WebCore::executeMoveWordRightAndModifySelection):
2299         (WebCore::executeOutdent):
2300         (WebCore::executePaste):
2301         (WebCore::executePasteAndMatchStyle):
2302         (WebCore::executePrint):
2303         (WebCore::executeRedo):
2304         (WebCore::executeRemoveFormat):
2305         (WebCore::executeSelectAll):
2306         (WebCore::executeSelectToMark):
2307         (WebCore::executeSetMark):
2308         (WebCore::executeStrikethrough):
2309         (WebCore::executeSubscript):
2310         (WebCore::executeSuperscript):
2311         (WebCore::executeSwapWithMark):
2312         (WebCore::executeToggleBold):
2313         (WebCore::executeToggleItalic):
2314         (WebCore::executeTranspose):
2315         (WebCore::executeUnderline):
2316         (WebCore::executeUndo):
2317         (WebCore::executeUnlink):
2318         (WebCore::executeUnscript):
2319         (WebCore::executeUnselect):
2320         (WebCore::executeYank):
2321         (WebCore::executeYankAndSelect):
2322         (WebCore::supported):
2323         (WebCore::supportedPaste):
2324         (WebCore::enabled):
2325         (WebCore::enabledAnySelection):
2326         (WebCore::enabledAnySelectionAndMark):
2327         (WebCore::enableCaretInEditableText):
2328         (WebCore::enabledCopy):
2329         (WebCore::enabledCut):
2330         (WebCore::enabledInEditableText):
2331         (WebCore::enabledInRichlyEditableText):
2332         (WebCore::enabledPaste):
2333         (WebCore::enabledRangeInEditableText):
2334         (WebCore::enabledRangeInRichlyEditableText):
2335         (WebCore::enabledRedo):
2336         (WebCore::enabledUndo):
2337         (WebCore::stateNone):
2338         (WebCore::stateBold):
2339         (WebCore::stateItalic):
2340         (WebCore::stateOrderedList):
2341         (WebCore::stateStrikethrough):
2342         (WebCore::stateSubscript):
2343         (WebCore::stateSuperscript):
2344         (WebCore::stateUnderline):
2345         (WebCore::stateUnorderedList):
2346         (WebCore::valueNull):
2347         (WebCore::valueBackColor):
2348         (WebCore::valueFontName):
2349         (WebCore::valueFontSize):
2350         (WebCore::valueFontSizeDelta):
2351         (WebCore::valueForeColor):
2352         (WebCore::createCommandMap): Added lots of commands, including all the commands
2353         from JSEditor. A few commands needed different behavior based on whether they are
2354         invoked from the DOM or a keyboard binding.
2355         (WebCore::Editor::command): Added. Gets a command object given a name.
2356         (WebCore::Editor::Command::Command): Added.
2357         (WebCore::Editor::Command::execute): Added.
2358         (WebCore::Editor::Command::isSupported): Added.
2359         (WebCore::Editor::Command::isEnabled): Added.
2360         (WebCore::Editor::Command::state): Added.
2361         (WebCore::Editor::Command::value): Added.
2362         (WebCore::Editor::execCommand): Changed to call command().execute().
2363
2364         * editing/JSEditor.cpp: Removed.
2365         * editing/JSEditor.h: Removed.
2366
2367         * editing/mac/EditorMac.mm: Changed to provide kill ring primitives intead of
2368         kill ring commands, so the kill ring commands can be cross-platform.
2369         (WebCore::Editor::appendToKillRing): Added.
2370         (WebCore::Editor::prependToKillRing): Added.
2371         (WebCore::Editor::yankFromKillRing): Added.
2372         (WebCore::Editor::startNewKillRingSequence): Added.
2373         (WebCore::Editor::setKillRingToYankedState): Added.
2374
2375         * page/Frame.cpp: Removed selectionHasStyle, TriState, and updateState.
2376         * page/Frame.h: Ditto.
2377
2378         * page/mac/WebCoreFrameBridge.mm: Removed selectionHasStyle.
2379         * page/mac/WebCoreFrameBridge.h: Ditto.
2380
2381         * platform/ContextMenu.cpp:
2382         (WebCore::ContextMenu::checkOrEnableIfNeeded): Updated for TriState change.
2383
2384         * platform/text/StringHash.h:
2385         (WebCore::StringHash::hash): Merged the StrHash<> template classes into this.
2386         (WebCore::StringHash::equal): Ditto.
2387         (WebCore::CaseFoldingHash::hash): Merged the CaseInsensitiveHash<> template
2388         classes into this.
2389         (WebCore::CaseFoldingHash::equal): Ditto.
2390
2391         * platform/text/StringImpl.cpp:
2392         (WebCore::equal): Changed to invoke StringHash.
2393         (WebCore::equalIgnoringCase): Changed to invoke CaseFoldingHash.
2394
2395         * dom/DOMImplementation.cpp:
2396         (WebCore::addString): Updated to use StringHash and CaseFoldingHash.
2397         (WebCore::isSVG10Feature): Ditto.
2398         (WebCore::isSVG11Feature): Ditto.
2399         * loader/FrameLoader.cpp:
2400         (WebCore::localSchemes): Ditto.
2401         * platform/graphics/FontCache.cpp:
2402         (WebCore::computeHash): Ditto.
2403         * platform/network/HTTPHeaderMap.h: Ditto.
2404         * platform/text/PlatformString.h: Ditto.
2405         * platform/text/StringImpl.h: Ditto.
2406         * rendering/RenderPartObject.cpp:
2407         (WebCore::RenderPartObject::updateWidget): Ditto.
2408         * xml/XMLHttpRequest.cpp:
2409         (WebCore::canSetRequestHeader): Ditto.
2410
2411         * rendering/RenderTreeAsText.cpp: Removed stray include of JSEditor.h.
2412
2413 2007-12-11  Darin Adler  <darin@apple.com>
2414
2415         * platform/wx/KeyboardEventWx.cpp:
2416         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent): Another try at fixing the
2417         WX build. Changes the code around a little bit.
2418
2419 2007-12-11  Darin Adler  <darin@apple.com>
2420
2421         * platform/wx/KeyboardEventWx.cpp:
2422         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent): Quick try at fixing build.
2423
2424 2007-12-11  Dan Bernstein  <mitz@apple.com>
2425
2426         Reviewed by Darin Adler.
2427
2428         - fix <rdar://problem/5631507> Text doesn't wrap properly at Tamil version of Wikipedia
2429
2430         Test: fast/text/international/complex-character-based-fallback.html
2431
2432         * platform/graphics/Font.cpp:
2433         (WebCore::Font::glyphDataForCharacter): Added a forceSmallCaps argument
2434         that forces this function to use the small caps font. It is used for
2435         combining marks that need to combine with a small cap.
2436         * platform/graphics/Font.h:
2437         * platform/win/UniscribeController.cpp:
2438         (WebCore::UniscribeController::advance): Changed to split the string
2439         into runs of characters that will be rendered using the same FontData.
2440         This is done by calling glyphDataForCharacter() for each cahracter to
2441         find the FontData it should be rendered with.
2442         (WebCore::UniscribeController::itemizeShapeAndPlace): Added a fontData
2443         argument that is passed on to shapeAndPlaceItem() instead of the
2444         smallCaps argument.
2445         (WebCore::UniscribeController::shapeAndPlaceItem): Added a fontData
2446         argument and removed the font fallback logic from this function, as
2447         it is now expected to be called with an item all of whose characters
2448         can be rendered with the given fontData.
2449         * platform/win/UniscribeController.h:
2450
2451 2007-12-07  Alexey Proskuryakov  <ap@webkit.org>
2452
2453         Reviewed by Darin.
2454
2455         <rdar://problem/5535636>
2456         Have to press 4 times instead of 2 times to get the expected result of ^^ with german keyboard.
2457
2458         http://bugs.webkit.org/show_bug.cgi?id=13916
2459         JavaScript detects Tab as a character input on a textfield validation
2460
2461         Test: platform/win/fast/events/double-dead-char.html
2462
2463         * platform/PlatformKeyboardEvent.h:
2464         (WebCore::PlatformKeyboardEvent::):
2465         (WebCore::PlatformKeyboardEvent::type):
2466         (WebCore::PlatformKeyboardEvent::windowsVirtualKeyCode):
2467         (WebCore::PlatformKeyboardEvent::setWindowsVirtualKeyCode):
2468         (WebCore::PlatformKeyboardEvent::keyIdentifier):
2469         (WebCore::PlatformKeyboardEvent::setIsAutoRepeat):
2470         Added an explicit type member to differentiate different kinds of events:
2471           RawKeyDown == keydown == WM_KEYDOWN
2472           KeyUp == keyup == WM_KEYUP
2473           Char == keypress == WM_CHAR
2474           KeyDown == e.g. NSKeyDown or NSFlagsChanged, used on platforms that have a different model for
2475           event processing, and needs to be converted to RawKeyDown (+ Char) for processing in DOM.
2476
2477         * platform/mac/KeyEventMac.mm:
2478         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent): Updated for changed data members.
2479         Fix Enter (numeric keypad) charCode to match Return, as we check for it from keypress default handlers.
2480         (WebCore::windowsKeyCodeForKeyEvent): 
2481         (WebCore::isKeyUpEvent): Made it do something closer to what it claims; added a FIXME explaining
2482         that it still fails.
2483         (WebCore::disambiguateKeyDownEvent): Downgrade from KeyDown to RawKeyDown or Char, removing information that
2484         should not be available in those (because it cannot be provided on Windows).
2485
2486         * platform/win/KeyEventWin.cpp:
2487         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent): Updated for changed data members.
2488         Used standard Windows constants for bit masks instead of our own ones.
2489         (WebCore::PlatformKeyboardEvent::disambiguateKeyDownEvent): Should never be called on Windows.
2490
2491         * platform/gtk/KeyEventGtk.cpp:
2492         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
2493         (WebCore::PlatformKeyboardEvent::disambiguateKeyDownEvent):
2494         * platform/qt/PlatformKeyboardEventQt.cpp:
2495         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
2496         (WebCore::PlatformKeyboardEvent::disambiguateKeyDownEvent):
2497         * platform/wx/KeyboardEventWx.cpp:
2498         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
2499         (WebCore::PlatformKeyboardEvent::disambiguateKeyDownEvent):
2500         Updated for cross-platform changes as much as it was possible without appropriate build
2501         environments.
2502
2503         * WebCore.base.exp: Export PlatformKeyboardEvent::disambiguateKeyDownEvent(), used by platforms that need to
2504         convert their fancy key events to RawKeyDown/Char pairs. Export Editor::isTextInsertionCommand().
2505
2506         * bridge/EditorClient.h:
2507         Renamed handleKeypress() to handleKeyboardEvent(), as it gets both keydowns and keypresses.
2508         Renamed handleInputMethodKeypress() to handleInputMethodKeydown(), as IMs work with raw keydowns.
2509
2510         * dom/Document.h:
2511         * dom/Document.cpp:
2512         (WebCore::Document::defaultEventHandler): Moved accesskey processing to EventHandler.
2513
2514         * dom/KeyboardEvent.h: Added comments describing keyCode/charCode behavior.
2515
2516         * dom/KeyboardEvent.cpp:
2517         (WebCore::eventTypeForKeyboardEventType):
2518         (WebCore::KeyboardEvent::KeyboardEvent): Conversion between platform and DOM event types is
2519         now straightforward, so scary hacks such as using autorepeat to distinguish types are
2520         not needed.
2521         (WebCore::KeyboardEvent::keyCode): Added a comment describing other browsers' behavior.
2522         (WebCore::KeyboardEvent::charCode): Added a comment describing other browsers' behavior.
2523         Changed to a more compatible behavior: raw keydown/keyup events do not and can not have
2524         character codes.
2525
2526         * editing/Editor.h:
2527         * editing/Editor.cpp:
2528         (WebCore::Editor::isTextInsertionCommand): Is this command actually text input in disguise?
2529         (WebCore::Editor::handleKeyboardEvent): Updated for new function names.
2530         (WebCore::Editor::handleInputMethodKeydown): Ditto.
2531
2532         * html/HTMLButtonElement.cpp:
2533         (WebCore::HTMLButtonElement::defaultEventHandler): Perform the default action when handling an
2534         appropriate event. Enter is processed on keypress (and thus should be checked for via charCode,
2535         not keyIdentifier), Space is processed on keydown+keyup! We now match IE in that a button is
2536         highlighted when Space is pressed.
2537
2538         * html/HTMLInputElement.cpp:
2539         (WebCore::HTMLInputElement::defaultEventHandler):
2540         * html/HTMLSelectElement.cpp:
2541         (WebCore::HTMLSelectElement::menuListDefaultEventHandler):
2542         (WebCore::HTMLSelectElement::listBoxDefaultEventHandler):
2543         Made a number of fixes to when default actions take place, similar to HTMLButtonElement ones
2544         described above.
2545
2546         * page/EventHandler.cpp:
2547         (WebCore::EventHandler::keyEvent): Unless we have a combined KeyDown, just forward the event
2548         to the target. Call accesskey handling directly, as it doesn't seem to be part of normal event
2549         handling in IE. Also streamlined the code in KeyDown case, thanks to handleInputMethodKeypress()
2550         now being handleInputMethodKeydown().
2551         (WebCore::EventHandler::handleTextInputEvent): Check that we were not called from keydown.
2552         (WebCore::EventHandler::defaultTextInputEventHandler): Removed a call to defaultTabEventHandler,
2553         as default tab handling happens when processing keydown.
2554         (WebCore::handleAccessKey): Moved from Document, as access keys are processed outside normal
2555         event handling. Fixed accesskey processing to use information that's available in a raw keydown
2556         event.
2557
2558         (WebCore::EventHandler::defaultKeyboardEventHandler): Do not ignore keydown; in particular,
2559         handle tabs during keydown processing.
2560
2561         * page/mac/EventHandlerMac.mm:
2562         (WebCore::EventHandler::currentKeyboardEvent): Disambiguate KeyDown as RawKeyDown, as this is
2563         what callers want.
2564
2565         * platform/text/PlatformString.h:
2566         * platform/text/String.cpp:
2567         (WebCore::String::characterStartingAt):
2568         * platform/text/StringImpl.cpp:
2569         (WebCore::StringImpl::characterStartingAt):
2570         * platform/text/StringImpl.h:
2571         Added a UChar32 accessor.
2572
2573         * svg/graphics/SVGImageEmptyClients.h:
2574         (WebCore::SVGEmptyEditorClient::handleKeyboardEvent):
2575         (WebCore::SVGEmptyEditorClient::handleInputMethodKeydown):
2576         Updated for new function names.
2577
2578 2007-12-11  John Sullivan  <sullivan@apple.com>
2579
2580         Reviewed by Adele
2581
2582         Tiger build fix -- don't call QTMovieView setDelegate: directly because it's not public
2583
2584         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
2585         (WebCore::MediaPlayerPrivate::createQTMovieView):
2586         (WebCore::MediaPlayerPrivate::detachQTMovieView):
2587
2588 2007-12-11  Alexey Proskuryakov  <ap@webkit.org>
2589
2590         Reviewed by Darin.
2591
2592         http://bugs.webkit.org/show_bug.cgi?id=16325
2593         <rdar://problem/5632997> REGRESSION: www.xerox.ru doesn't work
2594
2595         Fix this on Windows, too!
2596
2597         Test: http/tests/misc/empty-cookie.html
2598
2599         * platform/network/win/CookieJarWin.cpp:
2600         (WebCore::setCookies):
2601         (WebCore::cookies):
2602         Same fix as on Mac, translated into CF.
2603
2604         * platform/win/CookieJarWin.cpp: Removed - the real one is in platform/network/win.
2605
2606 2007-12-11  Christian Dywan  <christian@twotoasts.de>
2607
2608         Reviewed by Alp Toker.
2609
2610         http://bugs.webkit.org/show_bug.cgi?id=16371
2611         Implement additional mouse cursors for Gtk
2612
2613         Added cursor bitmaps from Mozilla:
2614         http://lxr.mozilla.org/mozilla1.8/source/widget/src/gtk2/nsGtkCursors.h
2615
2616         * platform/gtk/CursorGtk.cpp:
2617         (WebCore::customCursorNew):
2618         (WebCore::verticalTextCursor):
2619         (WebCore::cellCursor):
2620         (WebCore::contextMenuCursor):
2621         (WebCore::noDropCursor):
2622         (WebCore::copyCursor):
2623         (WebCore::progressCursor):
2624         (WebCore::aliasCursor):
2625         (WebCore::noneCursor):
2626         (WebCore::notAllowedCursor):
2627         (WebCore::zoomInCursor):
2628         (WebCore::zoomOutCursor):
2629         * platform/gtk/CursorGtk.h: Added.
2630
2631 2007-12-10  Oliver Hunt  <oliver@apple.com>
2632
2633         Reviewed by Weinig, Dan, and Alexey.
2634
2635         Fix character set used for dynamically loaded scripts.
2636
2637         Fix for:
2638             <rdar://problem/5333163> Safari can not display the mouse over pop menu on ChinaTimes News site correctly.
2639             <rdar://problem/5530048> [Safari]? :Leopard9A576: The typed CH characters displays as garbage in Sina website after reloading the webpage.
2640             <rdar://problem/5416588> All menus for chinese IBM site have wrong encoding
2641             
2642         Use the same logic to determine the charset for a script loaded dynamically
2643         as we do for a statically loaded script.
2644
2645         * html/HTMLScriptElement.cpp:
2646         (WebCore::HTMLScriptElement::insertedIntoDocument):
2647
2648 2007-12-10  Justin Garcia  <justin.garcia@apple.com>
2649
2650         Reviewed by Oliver Hunt.
2651
2652         <rdar://problem/5482023> GoogleDocs: After FormatBlock in an empty document, certain functions are disabled
2653         
2654         We were trying to insert a block of the requested type before the body element.
2655         
2656         * editing/FormatBlockCommand.cpp:
2657         (WebCore::FormatBlockCommand::doApply): 
2658         Removed unnecessary ()s in the if condition.
2659         Removed "|| !upstreamStart.node()->isDescendantOf(root)" from the if condition, since
2660         a) upstreamStart will never be outside the root editable element, since in that case
2661         there would be no block inside the editable root to Format, and b) if upstreamStart.node() 
2662         *is* the root, then refNode is the root, and we shouldn't insert before the root, we should insert
2663         at [root, 0].
2664         Added comments to explain the use of upstream() in the second if-clause.
2665         Added an early return for case where there is nothing selected, in that case, there is nothing
2666         to move.
2667
2668 2007-12-10  Adele Peterson  <adele@apple.com>
2669
2670         Reviewed and partially fixed by Tim Hatcher.
2671
2672         Remaining part of fix for <rdar://problem/5633400>
2673         Transformed <video> is not clipped correctly until a repaint is forced
2674
2675         Replace the implementation of a QTKit method to avoid repaints from the NSView system associated with the QTMovie
2676         from clobbering the WebCore repaints.
2677
2678         * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::mediaPlayerRepaint): Added.
2679         * html/HTMLMediaElement.h:
2680         * platform/graphics/MediaPlayer.cpp: (WebCore::MediaPlayer::repaint): Added.
2681         * platform/graphics/MediaPlayer.h: (WebCore::MediaPlayerClient::mediaPlayerRepaint): Added.
2682
2683         * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
2684         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
2685         (method_setImplementation): Added for Tiger.
2686
2687         (WebCore::MediaPlayerPrivate::~MediaPlayerPrivate): Call detachQTMovieView, which now does more cleanup.
2688         (WebCore::MediaPlayerPrivate::cancelLoad): ditto.
2689         (WebCore::MediaPlayerPrivate::setVisible): ditto.
2690         (WebCore::MediaPlayerPrivate::detachQTMovieView): Clear the delegate as well as m_qtMovieView pointer.
2691
2692         (WebCore::MediaPlayerPrivate::repaint): Added.  Triggers a repaint on the video renderer.
2693         (-[WebCoreMovieObserver repaint]): ditto.
2694
2695         (WebCore::mainThreadSetNeedsDisplay): Added.
2696          Does a WebCore repaint instead of going through the view repaint system for QTMovieView.
2697         (WebCore::MediaPlayerPrivate::createQTMovieView): Replace the implementation of _mainThreadSetNeedsDisplay.
2698
2699 2007-12-10  Geoffrey Garen  <ggaren@apple.com>
2700
2701         Reviewed by Sam Weinig.
2702
2703         Updated for rename in JavaScriptCore.
2704
2705         * bridge/mac/WebCoreScriptDebugger.mm:
2706         (-[WebCoreScriptCallFrame scopeChain]):
2707         (-[WebCoreScriptCallFrame functionName]):
2708         (-[WebCoreScriptCallFrame evaluateWebScript:]):
2709
2710 2007-12-10  Rodney Dawes  <dobey@wayofthemonkey.com>
2711
2712         Bug 16383: Ambiguous Window Usage in kjs_dom.cpp
2713         <http://bugs.webkit.org/show_bug.cgi?id=16383>
2714
2715         Use KJS::Window not the ambiguous Window
2716
2717         Reviewed by ddkilzer.
2718
2719         * bindings/js/kjs_dom.cpp (checkNodeSecurity):
2720
2721 2007-12-10  Sam Weinig  <sam@webkit.org>
2722
2723         Fix non-mac builds.
2724
2725         * page/WindowFeatures.cpp: #include <wtf/MathExtras.h> for isnan.
2726
2727 2007-12-10  Marvin Decker  <marv.decker@gmail.com>
2728
2729         Reviewed by Darin.
2730
2731         Fix a divide by 0 in the progress tracker.
2732         http://bugs.webkit.org/show_bug.cgi?id=15055
2733
2734         * loader/ProgressTracker.cpp:
2735         (WebCore::ProgressTracker::incrementProgress):
2736
2737 2007-12-09  Sam Weinig  <sam@webkit.org>
2738
2739         Reviewed by Darin.
2740
2741         More cleanup of kjs_window.
2742         - Move WindowFeatures from bridge/ to page/
2743         - Move functions related to WindowFeatures (boolFeature,
2744           floatFeature, setWindowFeature, parseWindowFeatures) into the class.
2745         - Fix up whitespace.
2746
2747         * WebCore.vcproj/WebCore.vcproj:
2748         * WebCore.xcodeproj/project.pbxproj:
2749         * bindings/js/kjs_window.cpp:
2750         (KJS::DOMWindowTimer::~DOMWindowTimer):
2751         (KJS::createWindow):
2752         (KJS::showModalDialog):
2753         (KJS::Window::getOwnPropertySlot):
2754         (KJS::Window::allowsAccessFrom):
2755         (KJS::Window::shouldInterruptScript):
2756         (KJS::WindowProtoFuncAToB::callAsFunction):
2757         (KJS::WindowProtoFuncOpen::callAsFunction):
2758         (KJS::Window::setReturnValueSlot):
2759         (KJS::ScheduledAction::execute):
2760         (KJS::Window::timerFired):
2761         (KJS::Location::Location):
2762         (KJS::Location::getValueProperty):
2763         (KJS::Location::getOwnPropertySlot):
2764         (KJS::Location::put):
2765         (KJS::LocationProtoFuncReplace::callAsFunction): Use better variable names.
2766         (KJS::LocationProtoFuncAssign::callAsFunction): Ditto.
2767         (KJS::LocationProtoFuncToString::callAsFunction): Remove extraneous calls to
2768         allowsAccessFrom, cleanup the function a little.
2769         (KJS::PausedTimeouts::~PausedTimeouts):
2770         * bridge/WindowFeatures.h: Removed.
2771         * page/WindowFeatures.cpp: Added.
2772         (WebCore::isSeparator):
2773         (WebCore::WindowFeatures::WindowFeatures):
2774         (WebCore::WindowFeatures::setWindowFeature):
2775         (WebCore::WindowFeatures::boolFeature):
2776         (WebCore::WindowFeatures::floatFeature):
2777         * page/WindowFeatures.h: Copied from WebCore/bridge/WindowFeatures.h.
2778         (WebCore::WindowFeatures::WindowFeatures):
2779
2780 2007-12-10  Timothy Hatcher  <timothy@apple.com>
2781
2782         Reviewed by Mark Rowe.
2783
2784         <rdar://problem/5639463> Bundle versions on Tiger should be 4523.x not 523.x
2785
2786         * Configurations/Version.xcconfig: Some Tiger versions of Xcode don't set MAC_OS_X_VERSION_MAJOR,
2787           so assume Tiger and use a 4 for the SYSTEM_VERSION_PREFIX.
2788
2789 2007-12-10  Alp Toker  <alp@atoker.com>
2790
2791         Reviewed by Niko.
2792
2793         Cairo implementation of GraphicsContext::setUseAntialiasing().
2794
2795         * platform/graphics/cairo/GraphicsContextCairo.cpp:
2796         (WebCore::GraphicsContext::setUseAntialiasing):
2797
2798 2007-12-10  Rob Buis  <buis@kde.org>
2799
2800         Reviewed by Darin.
2801
2802         http://bugs.webkit.org/show_bug.cgi?id=16182
2803         SVG should disable antialiasing for shape-rendering="crispEdges"
2804
2805         Turn off anti-aliasing of shapes when shape-rendering="crispEdges".
2806
2807         * platform/graphics/GraphicsContext.h:
2808         * platform/graphics/cairo/GraphicsContextCairo.cpp:
2809         (WebCore::GraphicsContext::setUseAntialiasing):
2810         * platform/graphics/cg/GraphicsContextCG.cpp:
2811         (WebCore::GraphicsContext::setUseAntialiasing):
2812         * platform/graphics/qt/GraphicsContextQt.cpp:
2813         (WebCore::GraphicsContext::setUseAntialiasing):
2814         * platform/graphics/wx/GraphicsContextWx.cpp:
2815         (WebCore::GraphicsContext::setUseAntialiasing):
2816         * rendering/RenderPath.cpp:
2817         (WebCore::RenderPath::paint):
2818
2819 2007-12-09  Rob Buis  <buis@kde.org>
2820
2821         Reviewed by Niko.
2822
2823         http://bugs.webkit.org/show_bug.cgi?id=16163
2824         SVG crash in Node::setChanged() on Debug builds only (trashed parent)
2825
2826         Fix the crash by properly unregistering as client from SVGResource
2827         when deleting a styled svg node.
2828
2829         * svg/SVGStyledElement.cpp:
2830         (WebCore::SVGStyledElement::~SVGStyledElement):
2831
2832 2007-12-10  Brady Eidson  <beidson@apple.com>
2833
2834         Rubberstamped by John
2835
2836         * storage/DatabaseTracker.cpp:
2837         (WebCore::DatabaseTracker::canEstablishDatabase): If the UI Delegate returns *exactly* the estimated size
2838           for the new quota, we should allow the database to be created
2839
2840 2007-12-10  David D. Kilzer  <ddkilzer@webkit.org>
2841
2842         Bug 9683: Implement select.options.remove() method
2843         <http://bugs.webkit.org/show_bug.cgi?id=9683>
2844
2845         Reviewed by Maciej.
2846
2847         Implement select.options.remove() by calling select.remove()
2848         with the same arguments.  This is what MSIE 7 does, although its
2849         select.remove() method differs from WebKit's by throwing an
2850         exception when called with no arguments or with a negative
2851         integer argument.  Note that the DOM Level 1 documentation
2852         specifies that select.remove() does not throw an exception.
2853
2854         Tests: fast/js/select-options-remove-gc.html
2855                fast/js/select-options-remove.html
2856
2857         * bindings/js/JSHTMLOptionsCollectionCustom.cpp:
2858         (WebCore::JSHTMLOptionsCollection::remove): Added.
2859         * html/HTMLOptionsCollection.cpp:
2860         (WebCore::HTMLOptionsCollection::remove): Added.
2861         * html/HTMLOptionsCollection.h:
2862         * html/HTMLOptionsCollection.idl:
2863
2864 2007-12-09  Sam Weinig  <sam@webkit.org>
2865
2866         Rubber stamped by Mark Rowe.
2867
2868         * WebCore.xcodeproj/project.pbxproj: Add missing DerivedSources files.
2869
2870 2007-12-09  Oliver Hunt  <oliver@apple.com>
2871
2872         Reviewed by Niko.
2873
2874         Correction, 'z' and 'Z' are the only commands that cannot have an extended
2875         list of arguments.
2876
2877         * svg/SVGParserUtilities.cpp:
2878         (WebCore::SVGPathParser::parseSVG):
2879
2880 2007-12-09  Oliver Hunt  <oliver@apple.com>
2881
2882         Reviewed by Niko.
2883
2884         Prevent unlimited iteration in the case of invalid path data.
2885         
2886         The only path commands that can leave numbers trailing the command processing
2887         are 'm' and 'M', in which trailing numbers are parsed as arguments to an
2888         implicit lineto command.  In any case we should just terminate as an invalid
2889         path.
2890
2891         * svg/SVGParserUtilities.cpp:
2892         (WebCore::SVGPathParser::parseSVG):
2893
2894 2007-12-09  Luca Bruno  <lethalman88@gmail.com>
2895
2896         Reviewed by Alp Toker.
2897
2898         http://bugs.webkit.org/show_bug.cgi?id=15825
2899         [GTK] curl - slow dns causing hangs.
2900
2901         Create a vector of jobs, to satisfy requests in the right order.
2902         Set a limit to the number of simultaneous connections.
2903
2904         * platform/network/curl/ResourceHandleManager.cpp:
2905         (WebCore::maxRunningJobs): added
2906         (WebCore::ResourceHandleManager::ResourceHandleManager):
2907         (WebCore::ResourceHandleManager::removeFromCurl):
2908         (WebCore::ResourceHandleManager::startScheduledJobs):
2909
2910         * platform/network/curl/ResourceHandleManager.h:
2911         (WebCore::ResourceHandleList): removed
2912         (WebCore::ResourceHandleManager::m_runningJobs): added
2913         (WebCore::ResourceHandleManager::m_resourceHandleListHead): removed
2914         (WebCore::ResourceHandleManager::m_resourceHandleList): added
2915
2916 2007-12-08  Sam Weinig  <sam@webkit.org>
2917
2918         Reviewed by Oliver.
2919
2920         Cleanup kjs_window.h/cpp.
2921
2922         * bindings/js/kjs_window.cpp:
2923         (KJS::WindowPrivate::WindowPrivate):
2924         (KJS::DOMWindowTimer::DOMWindowTimer):
2925         (KJS::Window::Window):
2926         (KJS::Window::retrieveWindow):
2927         (KJS::Window::retrieveActive):
2928         (KJS::Window::retrieve):
2929         (KJS::Window::location):
2930         (KJS::Window::mark):
2931         (KJS::allowPopUp):
2932         (KJS::parseModalDialogFeatures):
2933         (KJS::floatFeature):
2934         (KJS::canShowModalDialog):
2935         (KJS::canShowModalDialogNow):
2936         (KJS::showModalDialog):
2937         (KJS::Window::getValueProperty):
2938         (KJS::Window::getOwnPropertySlot):
2939         (KJS::Window::globalExec):
2940         (KJS::Window::setListener):
2941         (KJS::Window::getListener):
2942         (KJS::Window::findOrCreateJSEventListener):
2943         (KJS::Window::findOrCreateJSUnprotectedEventListener):
2944         (KJS::Window::clearHelperObjectProperties):
2945         (KJS::Window::setCurrentEvent):
2946         (KJS::WindowProtoFuncAToB::callAsFunction):
2947         (KJS::WindowProtoFuncBToA::callAsFunction):
2948         (KJS::WindowProtoFuncOpen::callAsFunction):
2949         (KJS::WindowProtoFuncSetTimeout::callAsFunction):
2950         (KJS::WindowProtoFuncClearTimeout::callAsFunction):
2951         (KJS::WindowProtoFuncSetInterval::callAsFunction):
2952         (KJS::WindowProtoFuncAddEventListener::callAsFunction):
2953         (KJS::WindowProtoFuncRemoveEventListener::callAsFunction):
2954         (KJS::WindowProtoFuncShowModalDialog::callAsFunction):
2955         (KJS::WindowProtoFuncNotImplemented::callAsFunction):
2956         * bindings/js/kjs_window.h:
2957         (KJS::PausedTimeouts::PausedTimeouts):
2958         (KJS::PausedTimeouts::takeTimeouts):
2959         (KJS::ScheduledAction::ScheduledAction):
2960
2961 2007-12-08  Sam Weinig  <sam@webkit.org>
2962
2963         Reviewed by Mitz.
2964
2965         Move window scrolling, moving and resizing methods from KJS::Window
2966         to WebCore::DOMWindow so that there bindings can be autogenerated.
2967
2968         Tests: fast/dom/Window/window-resize-and-move-arguments.html
2969                fast/dom/Window/window-scroll-arguments.html
2970
2971         * WebCore.xcodeproj/project.pbxproj:
2972         * bindings/js/kjs_window.cpp:
2973         (KJS::Window::getValueProperty): Remove extraneous allowsAccessFrom check.
2974         (KJS::WindowProtoFuncOpen::callAsFunction):
2975         (KJS::WindowProtoFuncNotImplemented::callAsFunction): Remove extraneous allowsAccessFrom check.
2976         * bindings/js/kjs_window.h:
2977         * bindings/scripts/CodeGeneratorJS.pm: Add new extended attribute
2978         to ensure that the no less than the declared number of attributes
2979         is allowed.
2980         * page/DOMWindow.cpp:
2981         (WebCore::DOMWindow::adjustWindowRect): Moved from kjs_window.
2982         (WebCore::DOMWindow::scrollBy):
2983         (WebCore::DOMWindow::scrollTo):
2984         (WebCore::DOMWindow::moveBy):
2985         (WebCore::DOMWindow::moveTo):
2986         (WebCore::DOMWindow::resizeBy):
2987         (WebCore::DOMWindow::resizeTo):
2988         * page/DOMWindow.h:
2989         (WebCore::DOMWindow::scroll):
2990         * page/DOMWindow.idl:
2991
2992 2007-12-08  Kevin Ollivier  <kevino@theolliviers.com>
2993
2994         Reviewed by Alp Toker.
2995
2996         http://bugs.webkit.org/show_bug.cgi?id=14651
2997         [CURL] didReceiveResponse() only called for HTTP loads
2998
2999         http://bugs.webkit.org/show_bug.cgi?id=14583
3000         [GDK] file:// relative CSS include URLs handled incorrectly
3001
3002         Make sure CURL sets the ResourceResponse URL and calls
3003         didReceiveResponse for local files too. 
3004
3005         * platform/network/curl/ResourceHandleManager.cpp:
3006         (WebCore::writeCallback):
3007
3008 2007-12-08  Oliver Hunt  <oliver@apple.com>
3009
3010         Reviewed by Sam W.
3011
3012         Split the ENABLE_SVG_EXPERIMENTAL_FEATURES flag into separate flags.
3013         
3014         Fixes <rdar://problem/5620249> Must disable SVG animation
3015         <rdar://problem/5612772> Disable SVG filters on Mac to match Windows behavior
3016         
3017         In order to allow finer grained control over the set of SVG features
3018         this patch splits ENABLE_SVG_EXPERIMENTAL_FEATURES into the following
3019         distinct flags:
3020         ENABLE_SVG_ANIMATION
3021         ENABLE_SVG_FILTERS
3022         ENABLE_SVG_FONTS
3023         ENABLE_SVG_AS_IMAGE
3024         ENABLE_SVG_USE
3025         
3026         by default only ENABLE_SVG_AS_IMAGE and ENABLE_SVG_USE are set.
3027
3028         * Configurations/WebCore.xcconfig:
3029         * DerivedSources.make:
3030           Handle the increased number of build flags that may be necessary
3031           
3032         * WebCore.SVG.Animation.exp: Added.
3033         * WebCore.SVG.Filters.exp: Added.
3034         * WebCore.SVG.exp:
3035           We now may not need the animation or filter exports so 
3036           these need to be separate.
3037           
3038         * WebCore.vcproj/WebCore.vcproj:
3039         * WebCore.vcproj/build-generated-files.sh:
3040           Update for new flags
3041           
3042         Remainder of changes are to swap ENABLE(SVG_EXPERIMENTAL_FEATURES) 
3043         with the appropriate specific feature flag.  
3044         * bindings/js/JSSVGElementWrapperFactory.cpp:
3045         (WebCore::createJSSVGWrapper):
3046         * bindings/objc/DOM.mm:
3047         (WebCore::createElementClassMap):
3048         * dom/make_names.pl:
3049         * loader/CachedImage.cpp:
3050         (WebCore::CachedImage::createImage):
3051         * page/DOMWindow.idl:
3052         * rendering/RenderPath.cpp:
3053         (WebCore::RenderPath::absoluteClippedOverflowRect):
3054         * rendering/RenderSVGContainer.cpp:
3055         (WebCore::RenderSVGContainer::absoluteClippedOverflowRect):
3056         * rendering/RenderSVGImage.cpp:
3057         (WebCore::RenderSVGImage::absoluteClippedOverflowRect):
3058         * rendering/RenderSVGRoot.cpp:
3059         (WebCore::RenderSVGRoot::paint):
3060         (WebCore::RenderSVGRoot::absoluteClippedOverflowRect):
3061         * rendering/RenderSVGText.cpp:
3062         (WebCore::RenderSVGText::absoluteClippedOverflowRect):
3063         * rendering/SVGRenderSupport.cpp:
3064         (WebCore::prepareToRenderSVGContent):
3065         (WebCore::finishRenderSVGContent):
3066         * svg/SVGAnimateElement.cpp:
3067         * svg/SVGAnimateElement.h:
3068         * svg/SVGAnimateElement.idl:
3069         * svg/SVGAnimateMotionElement.cpp:
3070         * svg/SVGAnimateMotionElement.h:
3071         * svg/SVGAnimateTransformElement.cpp:
3072         * svg/SVGAnimateTransformElement.h:
3073         * svg/SVGAnimateTransformElement.idl:
3074         * svg/SVGComponentTransferFunctionElement.cpp:
3075         * svg/SVGComponentTransferFunctionElement.h:
3076         * svg/SVGComponentTransferFunctionElement.idl:
3077         * svg/SVGDocumentExtensions.cpp:
3078         (WebCore::SVGDocumentExtensions::startAnimations):
3079         * svg/SVGFEBlendElement.cpp:
3080         * svg/SVGFEBlendElement.h:
3081         * svg/SVGFEBlendElement.idl:
3082         * svg/SVGFEColorMatrixElement.cpp:
3083         * svg/SVGFEColorMatrixElement.h:
3084         * svg/SVGFEColorMatrixElement.idl:
3085         * svg/SVGFEComponentTransferElement.cpp:
3086         * svg/SVGFEComponentTransferElement.h:
3087         * svg/SVGFEComponentTransferElement.idl:
3088         * svg/SVGFECompositeElement.cpp:
3089         * svg/SVGFECompositeElement.h:
3090         * svg/SVGFECompositeElement.idl:
3091         * svg/SVGFEDiffuseLightingElement.cpp:
3092         * svg/SVGFEDiffuseLightingElement.h:
3093         * svg/SVGFEDiffuseLightingElement.idl:
3094         * svg/SVGFEDisplacementMapElement.cpp:
3095         * svg/SVGFEDisplacementMapElement.h:
3096         * svg/SVGFEDisplacementMapElement.idl:
3097         * svg/SVGFEDistantLightElement.cpp:
3098         * svg/SVGFEDistantLightElement.h:
3099         * svg/SVGFEDistantLightElement.idl:
3100         * svg/SVGFEFloodElement.cpp:
3101         * svg/SVGFEFloodElement.h:
3102         * svg/SVGFEFloodElement.idl:
3103         * svg/SVGFEFuncAElement.cpp:
3104         * svg/SVGFEFuncAElement.h:
3105         * svg/SVGFEFuncAElement.idl:
3106         * svg/SVGFEFuncBElement.cpp:
3107         * svg/SVGFEFuncBElement.h:
3108         * svg/SVGFEFuncBElement.idl:
3109         * svg/SVGFEFuncGElement.cpp:
3110         * svg/SVGFEFuncGElement.h:
3111         * svg/SVGFEFuncGElement.idl:
3112         * svg/SVGFEFuncRElement.cpp:
3113         * svg/SVGFEFuncRElement.h:
3114         * svg/SVGFEFuncRElement.idl:
3115         * svg/SVGFEGaussianBlurElement.cpp:
3116         * svg/SVGFEGaussianBlurElement.h:
3117         * svg/SVGFEGaussianBlurElement.idl:
3118         * svg/SVGFEImageElement.cpp:
3119         * svg/SVGFEImageElement.h:
3120         * svg/SVGFEImageElement.idl:
3121         * svg/SVGFELightElement.cpp:
3122         * svg/SVGFELightElement.h:
3123         * svg/SVGFEMergeElement.cpp:
3124         * svg/SVGFEMergeElement.h:
3125         * svg/SVGFEMergeElement.idl:
3126         * svg/SVGFEMergeNodeElement.cpp:
3127         * svg/SVGFEMergeNodeElement.h:
3128         * svg/SVGFEMergeNodeElement.idl:
3129         * svg/SVGFEOffsetElement.cpp:
3130         * svg/SVGFEOffsetElement.h:
3131         * svg/SVGFEOffsetElement.idl:
3132         * svg/SVGFEPointLightElement.cpp:
3133         * svg/SVGFEPointLightElement.h:
3134         * svg/SVGFEPointLightElement.idl:
3135         * svg/SVGFESpecularLightingElement.cpp:
3136         * svg/SVGFESpecularLightingElement.h:
3137         * svg/SVGFESpecularLightingElement.idl:
3138         * svg/SVGFESpotLightElement.cpp:
3139         * svg/SVGFESpotLightElement.h:
3140         * svg/SVGFESpotLightElement.idl:
3141         * svg/SVGFETileElement.cpp:
3142         * svg/SVGFETileElement.h:
3143         * svg/SVGFETileElement.idl:
3144         * svg/SVGFETurbulenceElement.cpp:
3145         * svg/SVGFETurbulenceElement.h:
3146         * svg/SVGFETurbulenceElement.idl:
3147         * svg/SVGFilterElement.cpp:
3148         * svg/SVGFilterElement.h:
3149         * svg/SVGFilterElement.idl:
3150         * svg/SVGFilterPrimitiveStandardAttributes.cpp:
3151         * svg/SVGTimer.cpp:
3152         (WebCore::SVGTimer::animationsByElement):
3153         * svg/SVGUseElement.cpp:
3154         (WebCore::SVGUseElement::buildPendingResource):
3155         (WebCore::SVGUseElement::associateInstancesWithShadowTreeElements):
3156         * svg/SVGUseElement.h:
3157         * svg/TimeScheduler.cpp:
3158         (WebCore::TimeScheduler::connectIntervalTimer):
3159         (WebCore::TimeScheduler::disconnectIntervalTimer):
3160         * svg/graphics/SVGResourceFilter.cpp:
3161         * svg/graphics/SVGResourceFilter.h:
3162         * svg/graphics/cg/SVGResourceFilterCg.cpp:
3163         * svg/graphics/cg/SVGResourceFilterCg.mm:
3164         * svg/graphics/filters/SVGDistantLightSource.h:
3165         * svg/graphics/filters/SVGFEBlend.cpp:
3166         * svg/graphics/filters/SVGFEBlend.h:
3167         * svg/graphics/filters/SVGFEColorMatrix.cpp:
3168         * svg/graphics/filters/SVGFEColorMatrix.h:
3169         * svg/graphics/filters/SVGFEComponentTransfer.cpp:
3170         * svg/graphics/filters/SVGFEComponentTransfer.h:
3171         * svg/graphics/filters/SVGFEComposite.cpp:
3172         * svg/graphics/filters/SVGFEComposite.h:
3173         * svg/graphics/filters/SVGFEConvolveMatrix.cpp:
3174         * svg/graphics/filters/SVGFEConvolveMatrix.h:
3175         * svg/graphics/filters/SVGFEDiffuseLighting.cpp:
3176         * svg/graphics/filters/SVGFEDiffuseLighting.h:
3177         * svg/graphics/filters/SVGFEDisplacementMap.cpp:
3178         * svg/graphics/filters/SVGFEDisplacementMap.h:
3179         * svg/graphics/filters/SVGFEFlood.cpp:
3180         * svg/graphics/filters/SVGFEFlood.h:
3181         * svg/graphics/filters/SVGFEGaussianBlur.cpp:
3182         * svg/graphics/filters/SVGFEGaussianBlur.h:
3183         * svg/graphics/filters/SVGFEImage.cpp:
3184         * svg/graphics/filters/SVGFEImage.h:
3185         * svg/graphics/filters/SVGFEMerge.cpp:
3186         * svg/graphics/filters/SVGFEMerge.h:
3187         * svg/graphics/filters/SVGFEMorphology.cpp:
3188         * svg/graphics/filters/SVGFEMorphology.h:
3189         * svg/graphics/filters/SVGFEOffset.cpp:
3190         * svg/graphics/filters/SVGFEOffset.h:
3191         * svg/graphics/filters/SVGFESpecularLighting.cpp:
3192         * svg/graphics/filters/SVGFESpecularLighting.h:
3193         * svg/graphics/filters/SVGFETile.h:
3194         * svg/graphics/filters/SVGFETurbulence.cpp:
3195         * svg/graphics/filters/SVGFETurbulence.h:
3196         * svg/graphics/filters/SVGFilterEffect.cpp:
3197         * svg/graphics/filters/SVGFilterEffect.h:
3198         * svg/graphics/filters/SVGLightSource.cpp:
3199         * svg/graphics/filters/SVGLightSource.h:
3200         * svg/graphics/filters/SVGPointLightSource.h:
3201         * svg/graphics/filters/SVGSpotLightSource.h:
3202         * svg/graphics/filters/cg/SVGFEBlendCg.mm:
3203         * svg/graphics/filters/cg/SVGFEColorMatrixCg.mm:
3204         * svg/graphics/filters/cg/SVGFEComponentTransferCg.mm:
3205         * svg/graphics/filters/cg/SVGFECompositeCg.mm:
3206         * svg/graphics/filters/cg/SVGFEDiffuseLightingCg.mm:
3207         * svg/graphics/filters/cg/SVGFEDisplacementMapCg.mm:
3208         * svg/graphics/filters/cg/SVGFEFloodCg.mm:
3209         * svg/graphics/filters/cg/SVGFEGaussianBlurCg.mm:
3210         * svg/graphics/filters/cg/SVGFEHelpersCg.h:
3211         * svg/graphics/filters/cg/SVGFEHelpersCg.mm:
3212         * svg/graphics/filters/cg/SVGFEImageCg.mm:
3213         * svg/graphics/filters/cg/SVGFEMergeCg.mm:
3214         * svg/graphics/filters/cg/SVGFEOffsetCg.mm:
3215         * svg/graphics/filters/cg/SVGFESpecularLightingCg.mm:
3216         * svg/graphics/filters/cg/SVGFETileCg.mm:
3217         * svg/graphics/filters/cg/SVGFilterEffectCg.mm:
3218         * svg/graphics/filters/cg/WKArithmeticFilter.h:
3219         * svg/graphics/filters/cg/WKArithmeticFilter.m:
3220         * svg/graphics/filters/cg/WKComponentMergeFilter.h:
3221         * svg/graphics/filters/cg/WKComponentMergeFilter.m:
3222         * svg/graphics/filters/cg/WKDiffuseLightingFilter.h:
3223         * svg/graphics/filters/cg/WKDiffuseLightingFilter.m:
3224         * svg/graphics/filters/cg/WKDiscreteTransferFilter.h:
3225         * svg/graphics/filters/cg/WKDiscreteTransferFilter.m:
3226         * svg/graphics/filters/cg/WKDisplacementMapFilter.h:
3227         * svg/graphics/filters/cg/WKDisplacementMapFilter.m:
3228         * svg/graphics/filters/cg/WKDistantLightFilter.h:
3229         * svg/graphics/filters/cg/WKDistantLightFilter.m:
3230         * svg/graphics/filters/cg/WKGammaTransferFilter.h:
3231         * svg/graphics/filters/cg/WKGammaTransferFilter.m:
3232         * svg/graphics/filters/cg/WKIdentityTransferFilter.h:
3233         * svg/graphics/filters/cg/WKIdentityTransferFilter.m:
3234         * svg/graphics/filters/cg/WKLinearTransferFilter.h:
3235         * svg/graphics/filters/cg/WKLinearTransferFilter.m:
3236         * svg/graphics/filters/cg/WKNormalMapFilter.h:
3237         * svg/graphics/filters/cg/WKNormalMapFilter.m:
3238         * svg/graphics/filters/cg/WKPointLightFilter.h:
3239         * svg/graphics/filters/cg/WKPointLightFilter.m:
3240         * svg/graphics/filters/cg/WKSpecularLightingFilter.h:
3241         * svg/graphics/filters/cg/WKSpecularLightingFilter.m:
3242         * svg/graphics/filters/cg/WKSpotLightFilter.h:
3243         * svg/graphics/filters/cg/WKSpotLightFilter.m:
3244         * svg/graphics/filters/cg/WKTableTransferFilter.h:
3245         * svg/graphics/filters/cg/WKTableTransferFilter.m:
3246         * svg/graphics/mac/SVGResourceFilterPlatformDataMac.h:
3247         * svg/graphics/mac/SVGResourceFilterPlatformDataMac.mm:
3248         * svg/svgtags.in:
3249
3250 2007-12-08  Dan Bernstein  <mitz@apple.com>
3251
3252         Reviewed by Adele Peterson.
3253
3254         - fix two bugs in parsing of stylesheets in <style> elements created by
3255           the parser:
3256           1. each such stylesheet is parsed twice, once when the text node is
3257              added and again when the </style> tag is reached
3258           2. re-inserting such a <style> element into the document fails to
3259              re-parse and apply its stylesheet.
3260
3261         Test for bug #2: fast/dom/HTMLStyleElement/insert-parser-generated.html
3262
3263         * html/HTMLStyleElement.cpp:
3264         (WebCore::HTMLStyleElement::finishedParsing):
3265         * svg/SVGStyleElement.cpp:
3266         (WebCore::SVGStyleElement::finishedParsing):
3267
3268 2007-12-07  Sam Weinig  <sam@webkit.org>
3269
3270         Reviewed by Darin.
3271
3272         - Removes the faulty isSafeScript implementation that was only
3273           used for plugins.
3274         - Renames isSafeScript to allowsAccessFrom.
3275
3276         * bindings/js/JSDOMWindowCustom.cpp:
3277         (WebCore::JSDOMWindow::customGetOwnPropertySlot):
3278         (WebCore::JSDOMWindow::customPut):
3279         * bindings/js/kjs_dom.cpp:
3280         (WebCore::checkNodeSecurity):
3281         * bindings/js/kjs_window.cpp:
3282         (KJS::createWindow):
3283         (KJS::Window::getValueProperty):
3284         (KJS::Window::namedItemGetter):
3285         (KJS::Window::getOwnPropertySlot):
3286         (KJS::Window::put):
3287         (KJS::Window::allowsAccessFrom):
3288         (KJS::Window::setListener):
3289         (KJS::Window::getListener):
3290         (KJS::WindowProtoFuncOpen::callAsFunction):
3291         (KJS::WindowProtoFuncSetTimeout::callAsFunction):
3292         (KJS::WindowProtoFuncClearTimeout::callAsFunction):
3293         (KJS::WindowProtoFuncSetInterval::callAsFunction):
3294         (KJS::WindowProtoFuncAddEventListener::callAsFunction):
3295         (KJS::WindowProtoFuncRemoveEventListener::callAsFunction):
3296         (KJS::WindowProtoFuncNotImplemented::callAsFunction):
3297         (KJS::Location::getOwnPropertySlot):
3298         (KJS::Location::put):
3299         (KJS::LocationProtoFuncReplace::callAsFunction):
3300         (KJS::LocationProtoFuncReload::callAsFunction):
3301         (KJS::LocationProtoFuncAssign::callAsFunction):
3302         (KJS::LocationProtoFuncToString::callAsFunction):
3303         * bindings/js/kjs_window.h:
3304         (KJS::Window::allowsAccessFrom):
3305         * bindings/objc/WebScriptObject.mm:
3306         (-[WebScriptObject _isSafeScript]): Reverse caller/argument of allowsAccessFrom to match
3307         the new call.
3308         * bindings/scripts/CodeGeneratorJS.pm:
3309
3310 2007-12-08  Rob Buis  <buis@kde.org>
3311
3312         Reviewed by Darin.
3313
3314         http://bugs.webkit.org/show_bug.cgi?id=15464
3315         SVGLengthList allows bad values
3316
3317         Be more strict with svg lengths without a unit identifier.
3318
3319         Test: svg/custom/invalid-lengthlist.svg
3320
3321         * svg/SVGLength.cpp:
3322         (WebCore::SVGLength::setValueAsString):
3323
3324 2007-12-08  Rob Buis  <buis@kde.org>
3325
3326         Mac Tiger build fix.
3327
3328         Use the wtf prefix when including MathExtras.h.
3329
3330         * rendering/RenderMedia.cpp:
3331
3332 2007-12-08  Alp Toker  <alp@atoker.com>
3333
3334         GTK+ build fix (for ENABLE_VIDEO builds):
3335
3336         Include MathExtras.h to get isfinite().
3337
3338         * rendering/RenderMedia.cpp:
3339
3340 2007-12-08  Rob Buis  <buis@kde.org>
3341
3342         Reviewed by Darin.
3343
3344         http://bugs.webkit.org/show_bug.cgi?id=15528
3345         svg_dynamic_cast should be removed
3346
3347         Replace svg_dynamic_cast with a combination of
3348         isSVGElement and static_cast.
3349
3350         * rendering/SVGRootInlineBox.cpp:
3351         (WebCore::SVGRootInlineBox::buildLayoutInformation):
3352         (WebCore::SVGRootInlineBox::buildTextChunks):
3353         * svg/SVGAnimationElement.cpp:
3354         (WebCore::SVGAnimationElement::targetElement):
3355         * svg/SVGElement.h:
3356         * svg/SVGElementInstance.cpp:
3357         (WebCore::SVGElementInstance::updateInstance):
3358         * svg/SVGFilterElement.cpp:
3359         (WebCore::SVGFilterElement::canvasResource):
3360         * svg/SVGGradientElement.cpp:
3361         (WebCore::SVGGradientElement::buildStops):
3362         * svg/SVGLocatable.cpp:
3363         (WebCore::SVGLocatable::getTransformToElement):
3364         * svg/SVGMaskElement.cpp:
3365         (WebCore::SVGMaskElement::drawMaskerContent):
3366         * svg/SVGSwitchElement.cpp:
3367         (WebCore::SVGSwitchElement::childShouldCreateRenderer):
3368         * svg/SVGUseElement.cpp:
3369         (WebCore::SVGUseElement::insertedIntoDocument):
3370         (WebCore::SVGUseElement::buildPendingResource):
3371         (WebCore::SVGUseElement::buildInstanceTree):
3372         (WebCore::SVGUseElement::handleDeepUseReferencing):
3373         (WebCore::SVGUseElement::buildShadowTree):
3374         (WebCore::SVGUseElement::expandUseElementsInShadowTree):
3375         (WebCore::SVGUseElement::associateInstancesWithShadowTreeElements):
3376         * svg/graphics/SVGResource.cpp:
3377         (WebCore::getResourceById):
3378
3379 2007-12-07  Antti Koivisto  <antti@apple.com>
3380
3381         Reviewed by Adele.
3382         
3383         Partial fix for <rdar://problem/5633400>
3384         Transformed <video>, <img>, <embed> are not clipped correctly until a repaint is forced
3385         
3386         Fix video painting when transform is applied.
3387
3388         Test: media/video-transformed.html
3389
3390         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
3391         (WebCore::MediaPlayerPrivate::paint):
3392
3393 2007-12-07  Dan Bernstein  <mitz@apple.com>
3394
3395         Reviewed by Sam Weinig.
3396
3397         - fix http://bugs.webkit.org/show_bug.cgi?id=16348
3398           @font-face does not affect the default style
3399
3400         Test: fast/css/font-face-default-font.html
3401
3402         * dom/Document.cpp:
3403         (WebCore::Document::recalcStyle): Pass our font selector to
3404         Font::update() if we already have one.
3405
3406 2007-12-07  Darin Adler  <darin@apple.com>
3407
3408         - fix Windows build
3409
3410         * bridge/win/GlobalHistoryWin.cpp:
3411         (WebCore::historyContains): Missed a rename.
3412
3413 2007-12-07  Brady Eidson  <beidson@apple.com>
3414
3415         Reviewed by Anders and Darin
3416
3417         When a statement bumps up against the quota and the UI Delegate grants more space, we need to
3418         actually set the new maximum size on the SQLiteDatabase (in addition to storing the new max quota
3419         in the DatabaseTracker, which was already done)
3420
3421         * storage/SQLTransaction.cpp:
3422         (WebCore::SQLTransaction::runStatements): If a statement is being retried, set the maximum size on
3423           the SQLiteDatabase to the new maximum size
3424
3425 2007-12-07  Darin Adler  <darin@apple.com>
3426
3427         - fix Tiger build
3428
3429         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm: Tiger didn't even have
3430         QTKIT_VERSION_MAX_ALLOWED, so add logic to work without that.
3431
3432 2007-12-07  Darin Adler  <darin@apple.com>
3433
3434         - fix 64-bit build, hopefully without breaking Tiger build
3435
3436         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
3437         (WebCore::MediaPlayerPrivate::updateStates):
3438         Don't use Movies.h constants that are nonexistent in 64-bit.
3439         Define the new QTMovie.h constants, though, when using an older QTKit.
3440
3441 2007-12-07  Brady Eidson  <beidson@apple.com>
3442
3443         Reviewed by Anders
3444
3445         Fix <rdar://problem/5636115> - Prompted for quota increase to create database when it already existed
3446
3447         * storage/DatabaseTracker.cpp:
3448         (WebCore::DatabaseTracker::canEstablishDatabase): Check hasEntryForDatabase before doing any prompting
3449         (WebCore::DatabaseTracker::hasEntryForDatabase): Check and see if this database already exists
3450         * storage/DatabaseTracker.h:
3451
3452 2007-12-07  Darin Adler  <darin@apple.com>
3453
3454         Reviewed by Mitz.
3455
3456         - http://bugs.webkit.org/show_bug.cgi?id=15981
3457           speed up visited-link code a bit
3458
3459         * bridge/GlobalHistory.h: Change historyContains to take a character pointer plus length
3460         instead of requiring a DeprecatedString.
3461
3462         * bridge/mac/GlobalHistoryMac.mm: (WebCore::historyContains): Updated for above change.
3463         Also removes pointless "fast Latin-1" case that was never used.
3464         * bridge/win/GlobalHistoryWin.cpp: (WebCore::historyContains): Ditto.
3465         * platform/gtk/TemporaryLinkStubs.cpp: (WebCore::historyContains): Ditto.
3466         * platform/wx/TemporaryLinkStubs.cpp: (WebCore::historyContains): Ditto.
3467
3468         * css/CSSStyleSelector.cpp:
3469         (WebCore::findHash): Added. Helper for cleanpath.
3470         (WebCore::findSlashDotDotSlash): Ditto.
3471         (WebCore::findSlashSlash): Ditto.
3472         (WebCore::findSlashDotSlash): Ditto.
3473         (WebCore::cleanpath): Changed to use fast helper functions instead of slower general-purpose
3474         DeprecatedString find function.
3475         (WebCore::containsColonSlashSlash): Added. Helper for checkPseudoState.
3476         (WebCore::checkPseudoState): Got rid of reference count churn by using an AtomicString*
3477         instead of an AtomicString for the attribute value. Changed to use fast helper function
3478         instead of slower DeprecatedString::contains function, and also made the fast case not
3479         bother allocating a DeprecatedConstString.
3480
3481         - unrelated tiny cleanup
3482
3483         * platform/graphics/svg/cg/SVGPaintServerGradientCg.cpp:
3484         (WebCore::releaseCachedStops): Use static_cast instead of reinterpret_cast.
3485         (WebCore::cgGradientCallback): Ditto.
3486
3487 2007-12-07  Darin Adler  <darin@apple.com>
3488
3489         Fix build on Tiger (Mark Rowe told me how).
3490
3491         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
3492         Include <objc/objc-runtime.h>, which existed back on Tiger,
3493         rather than <objc/runtime.h>, which did not.
3494
3495 2007-12-07  Geoffrey Garen  <ggaren@apple.com>
3496
3497         Build fix: rolling out last build fix to change #include path.
3498
3499         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
3500
3501 2007-12-07  Steve Falkenburg  <sfalken@apple.com>
3502
3503         Re-named our B&I flag from BUILDBOT to PRODUCTION.
3504
3505         Reviewed by Sam Weinig.
3506
3507         * WebCore.vcproj/WebCore.make:
3508
3509 2007-12-07  Geoffrey Garen  <ggaren@apple.com>
3510
3511         Build fix: corrected #include path.
3512
3513         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
3514
3515 2007-12-07  Geoffrey Garen  <ggaren@apple.com>
3516
3517         Reviewed by Sam Weinig.
3518
3519         Added some namespace qualifications and a forwarding header, now that
3520         KJS::Node is sometimes #included in WebCore by JavaScriptCore headers.
3521
3522         * ForwardingHeaders/wtf/ListRefPtr.h: Added.
3523         * bindings/js/JSXSLTProcessor.cpp:
3524         (KJS::JSXSLTProcessorPrototypeFunctionTransformToFragment::callAsFunction):
3525         * bindings/js/kjs_binding.cpp:
3526         (KJS::ScriptInterpreter::getDOMNodeForDocument):
3527         (KJS::ScriptInterpreter::forgetDOMNodeForDocument):
3528         (KJS::ScriptInterpreter::putDOMNodeForDocument):
3529         (KJS::ScriptInterpreter::markDOMNodesForDocument):
3530         (KJS::ScriptInterpreter::updateDOMNodeDocument):
3531
3532 2007-12-07  Adam Roben  <aroben@apple.com>
3533
3534         Add SoftLinking.h for Windows and use it in a few places
3535
3536         Reviewed by Oliver.
3537
3538         * WebCore.vcproj/WebCore.vcproj: Added new file to project.
3539         * platform/win/PlatformScrollBarSafari.cpp: Use SoftLinking.h.
3540         (WebCore::PlatformScrollbar::PlatformScrollbar): Removed manual
3541         soft-linking calls.
3542         (WebCore::PlatformScrollbar::paintButton): Check for the presence of
3543         the SafariTheme library now that we can't check for the presence of
3544         paintThemePart directly.
3545         (WebCore::PlatformScrollbar::paintTrack): Ditto.
3546         (WebCore::PlatformScrollbar::paintThumb): Ditto.
3547         * platform/win/SoftLinking.h: Copied from WebCore/platform/mac/SoftLinking.h.
3548         * rendering/RenderThemeSafari.cpp: Same basic changes as to
3549         PlatformScrollBarSafari.cpp.
3550         (WebCore::RenderThemeSafari::RenderThemeSafari):
3551         (WebCore::RenderThemeSafari::isControlStyled):
3552         (WebCore::RenderThemeSafari::paintCapsLockIndicator):
3553         * rendering/RenderThemeSafari.h: Removed m_themeDLL member.
3554
3555 2007-12-07  Darin Adler  <darin@apple.com>
3556
3557         Reviewed by Adele.
3558
3559         - fix <rdar://problem/5608795> CrashTracer: 481 crashes in Safari
3560           at WebCore::HTMLSelectElement::saveState const + 152
3561
3562         Test: fast/forms/select-set-inner.html
3563
3564         * dom/ContainerNode.cpp:
3565         (WebCore::ContainerNode::removeChildren): Added a return value, as with other
3566         calls that change children, so we can optimize for the case where it does nothing.
3567         (WebCore::ContainerNode::cloneChildNodes): Changed parameter type to ContainerNode.
3568         * dom/ContainerNode.h: See above.
3569
3570         * html/HTMLOptGroupElement.cpp:
3571         (WebCore::HTMLOptGroupElement::removeChildren): Override removeChildren and call
3572         recalcSelectOptions in that case.
3573         (WebCore::HTMLOptGroupElement::childrenChanged): Override childrenChanged instead of
3574         addChild, for consistency with HTMLSelectElement; no need to override both.
3575         (WebCore::HTMLOptGroupElement::groupLabelText): Made const.
3576         * html/HTMLOptGroupElement.h: See above.
3577
3578         * html/HTMLSelectElement.cpp: Don't override addChild any more, because we already
3579         override childrenChanged, and addChild calls that.
3580         (WebCore::HTMLSelectElement::removeChildren): Override removeChildren and call
3581         recalcSelectOptions in that case.
3582         (WebCore::HTMLSelectElement::recalcListItems): Tightened up the code a little bit
3583         by using a for loop and traverseNextSibling. Also added some new comments and
3584         removed some obsolete ones.
3585         (WebCore::HTMLSelectElement::checkListItems): Added. Debug-only check to make
3586         sure we don't have a stale list items vector.
3587         * html/HTMLSelectElement.h: Changed listItems() to invoke checkListItems().
3588         This will help us catch cases where we have too few calls to setRecalcListItems.
3589
3590 2007-12-07  Dan Bernstein  <mitz@apple.com>
3591
3592         Reviewed by Darin Adler.
3593
3594         - WebCore part of fixing <rdar://problem/5499918> REGRESSION: insertion point in input field with custom border cuts holes in focus ring interior edges
3595
3596         Test: fast/repaint/focus-ring.html
3597
3598         * editing/SelectionController.cpp:
3599         (WebCore::SelectionController::caretRepaintRect): Changed to return just
3600         the caret rect without any padding.
3601         (WebCore::SelectionController::recomputeCaretRect): Changed to repaint
3602         just the caret rect without any padding.
3603         * platform/graphics/GraphicsContext.h: Removed setFocusRingClip() and
3604         clearFocusRingClip().
3605         * platform/graphics/cairo/GraphicsContextCairo.cpp: Ditto.
3606         * platform/graphics/cg/GraphicsContextCG.cpp: Ditto.
3607         * platform/graphics/cg/GraphicsContextPlatformPrivate.h: Removed
3608         m_focusRingClip member.
3609         * platform/graphics/mac/GraphicsContextMac.mm:
3610         (WebCore::GraphicsContext::drawFocusRing): Changed to call
3611         wkDrawFocusRing() once without setting up additional clip. On Leopard,
3612         wkDrawFocusRing() respects the context clip now. On Tiger, a
3613         transparency layer is used to apply clipping to the focus ring.
3614         * platform/graphics/qt/GraphicsContextQt.cpp: Removed focus ring clip
3615         methods and member.
3616         * platform/graphics/wx/GraphicsContextWx.cpp: Ditto.
3617         * platform/mac/WebCoreSystemInterface.h: Removed the clipRect argument
3618         to wkDrawFocusRing().
3619         * platform/mac/WebCoreSystemInterface.mm: Ditto.
3620         * rendering/RenderLayer.cpp:
3621         (WebCore::setClip): Removed call to set the focus ring clip.
3622         (WebCore::restoreClip): Removed call to reset the focus ring clip.
3623
3624 2007-12-07  Darin Adler  <darin@apple.com>
3625
3626         Reviewed by Antti Koivisto and Kevin Decker.
3627
3628         - fix <rdar://problem/5601586> QtKit should be dynamically loaded upon need, not linked at startup
3629
3630         Also did a lot of small tweaks to MediaPlayerPrivateQTKit.
3631
3632         * WebCore.xcodeproj/project.pbxproj: Don't link to QTKit.
3633
3634         * platform/graphics/mac/MediaPlayerPrivateQTKit.h: Omit unneeded includes and declarations.
3635         Made a lot more functions const. Made a few more members private and a couple inline.
3636         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm: Added soft linking machinery for all the
3637         things we currently use in QTKit. It's a little more awkward for classes and other data objects
3638         than it is for functions, but still relatively straightforward, with no changes needed to the
3639         client code. Added using namespace directives. Made a cuePointTimerInterval constant and put
3640         it at the top of the file. Use 0 consistently instead of sometimes 0 and sometimes 0.0f.
3641         (WebCore::MediaPlayerPrivate::MediaPlayerPrivate): Removed unneeded initialization of RetainPtr
3642         members to nil.
3643         (WebCore::MediaPlayerPrivate::createQTMovie): Use adoptNS instead of autorelease.
3644         (WebCore::MediaPlayerPrivate::createQTMovieView): Ditto. Also use -[NSColor clearColor].
3645         (WebCore::MediaPlayerPrivate::createQTTime): Remove an unneeded type cast that had no effect.
3646         Changed to use long instead of int because that's the type for a QTTime time scale anyway.
3647         (WebCore::MediaPlayerPrivate::duration): Use a static_cast instead of a C-style cast.
3648         (WebCore::MediaPlayerPrivate::currentTime): Ditto. Also merged into a single expression.
3649         (WebCore::MediaPlayerPrivate::cuePointTimerFired): Added code to make a copy of the cue
3650         points set to avoid a potential problem with a set being modified as we iterate it.
3651         (WebCore::MediaPlayerPrivate::bytesLoaded): Removed unneeded null check of m_qtMovie.
3652         (WebCore::MediaPlayerPrivate::updateStates): Instead of comments explaining the numeric
3653         values, used the constants from the headers directly.
3654         (WebCore::MediaPlayerPrivate::getSupportedTypes): Instead of (QTMovieFileTypeOptions)0,
3655         pass the named constant with value 0, QTIncludeCommonTypes. Skipped the intermediate type
3656         of NSString to remove one cast. Replaced C-style cast with reinterpret_cast (arguably
3657         no better). Used RetainPtr instead of explicit CFRelease calls.
3658
3659         * platform/mac/SoftLinking.h: Added macros to do soft linking for classes and for pointers.
3660         It's not quite as automatic as the soft linking we can do for functions, since these define
3661         functions to get the values, so you need to define macros to make what look like variable
3662         accesses turn into function calls. See MediaPlayerPrivateQTKit for the details.
3663
3664         * html/HTMLMediaElement.h:
3665         * html/TimeRanges.h:
3666         * html/VoidCallback.h:
3667         * platform/graphics/MediaPlayer.h:
3668         Use angle brackets for wtf includes. Omit unneeded includes.
3669
3670 2007-12-07  Dan Bernstein  <mitz@apple.com>
3671
3672         Reviewed by Darin Adler.
3673
3674         - fix http://bugs.webkit.org/show_bug.cgi?id=16334
3675           <rdar://problem/5634923> REGRESSION (r28299): Homepage of any DotMac Web Gallery won't load completely
3676
3677         Test: fast/dynamic/subtree-no-common-root-static-y.html
3678
3679         * rendering/RenderObject.cpp:
3680         (WebCore::RenderObject::markContainingBlocksForLayout): Changed the call
3681         to setChildNeedsLayout() to not mark containing blocks and added a
3682         separate call to markContainingBlocksForLayout() that will not schedule
3683         a layout if we are already in the middle of scheduleRelayoutOfSubtree().
3684
3685 2007-12-07  Alexey Proskuryakov  <ap@webkit.org>
3686
3687         Reviewed by Darin.
3688
3689         http://bugs.webkit.org/show_bug.cgi?id=16325
3690         <rdar://problem/5632997> REGRESSION: www.xerox.ru doesn't work
3691         
3692         Test: http/tests/misc/empty-cookie.html
3693
3694         * platform/mac/CookieJar.mm:
3695         (WebCore::setCookies): Don't store empty cookies.
3696         (WebCore::cookies): Filter out empty cookies if we have them, as they could have been set
3697         with an earlier version of Leopard!
3698
3699 2007-12-06  Ada Chan  <adachan@apple.com>
3700
3701         Fixed the if statement (ERROR_SUCCESS is 0 and we were actually
3702         returning true when there's an error).
3703
3704         Reviewed by Steve.
3705
3706         * platform/win/FileSystemWin.cpp:
3707         (WebCore::makeAllDirectories):
3708
3709 2007-12-06  Darin Adler  <darin@apple.com>
3710
3711         - fix broken regression test
3712
3713         * bindings/js/kjs_binding.cpp:
3714         (KJS::setDOMException): Oops, this was just supposed to be PERMISSION_DENIED.
3715
3716 2007-12-06  Darin Adler  <darin@apple.com>
3717
3718         Reviewed by Sam Weinig.
3719
3720         - fix http://bugs.webkit.org/show_bug.cgi?id=16332
3721           ObjC DOM exception object descriptions should include the exception name
3722
3723         * WebCore.pro: Added ExceptionCode.cpp.
3724         * WebCore.vcproj/WebCore.vcproj: Added ExceptionCode.cpp.
3725         * WebCore.xcodeproj/project.pbxproj: Added ExceptionCode.cpp.
3726         * WebCoreSources.bkl: Added ExceptionCode.cpp.
3727
3728         * bindings/js/kjs_binding.cpp: (KJS::setDOMException): Moved the code to decompose an
3729         ExceptionCode into ExceptionCode.h/cpp -- getExceptionCodeDescription. Also removed
3730         the many unneeded includes that were here. Had to keep one special case here, for
3731         SECURITY_ERR.
3732
3733         * bindings/objc/ExceptionHandlers.mm: (WebCore::raiseDOMException): Changed to use the
3734         new getExceptionCodeDescription function so that this shares the exception name
3735         information that was previously only available to JavaScript.
3736
3737         * dom/ExceptionCode.cpp: Copied from bindings/js/kjs_binding.cpp.
3738         (WebCore::getExceptionCodeDescription): Added some assertions, and made the function
3739         handle exception names in a slightly more robust way that is not subject to integer
3740         overflow. (Not a real world issue since we should never receive a bad exception code.)
3741
3742         * dom/ExceptionCode.h: Added the ExceptionCodeDescription struct and the
3743         getExceptionCodeDescription function.
3744
3745         * svg/SVGException.h: Added a missing #include and got rid of some comments. Some of
3746         the comments were mildly helpful, but others were incorrect. This now matches the other
3747         exception-related headers such as RangeException.h.
3748
3749 2007-12-06  Brady Eidson  <beidson@apple.com>
3750
3751         Reviewed by Darin
3752
3753         Fixed a glaring bug that would prevent a statement from getting run a second time
3754
3755         * storage/SQLStatement.cpp:
3756         (WebCore::SQLStatement::execute): Clear failure due to quota *before* we check the error
3757           and return early
3758         (WebCore::SQLStatement::clearFailureDueToQuota): Only clear the error if it was a quota error
3759
3760 2007-12-06  Timothy Hatcher  <timothy@apple.com>
3761
3762         Reviewed by Oliver Hunt.
3763
3764         Use keydown instead of keypress so keyIdentifier can be used.
3765
3766         * page/inspector/ConsolePanel.js: Use keydown instead of keypress.
3767         * page/inspector/DatabasePanel.js: Ditto.
3768         * page/inspector/inspector.js: Ditto. Plus call removeEventListener
3769         before deleting windowLoaded.
3770
3771 2007-12-06  Adam Roben  <aroben@apple.com>
3772
3773         Rename FontsTable.plist to FontsList.plist
3774
3775         Rubberstamped by Hyatt.
3776
3777         * platform/graphics/win/FontDatabase.cpp:
3778
3779 2007-12-06  Brady Eidson  <beidson@apple.com>
3780
3781         Reviewed by Darin
3782
3783         Tweaked a comment and a few assertions from my last checkin
3784
3785         * storage/SQLStatement.cpp:
3786         (WebCore::SQLStatement::execute):
3787         (WebCore::SQLStatement::clearFailureDueToQuota):
3788         (WebCore::SQLStatement::lastExecutionFailedDueToQuota):
3789
3790 2007-12-06  Brady Eidson <beidson@apple.com>
3791
3792         Reviewed by Darin
3793
3794         Finished hooking up UI Delegate for databases - Database operations will now enforce a size quota and
3795         will ask the UI Delegate for more space when that quota is met
3796
3797         * platform/sql/SQLiteDatabase.cpp: Add the new SQLResultFull constant
3798         * platform/sql/SQLiteDatabase.h: Ditto
3799
3800         * storage/Database.cpp:
3801         (WebCore::Database::securityOriginData): Added this accessor, copying for thread safety
3802         (WebCore::Database::stringIdentifier): Ditto
3803         * storage/Database.h:
3804
3805         * storage/SQLStatement.cpp:
3806         (WebCore::SQLStatement::SQLStatement):
3807         (WebCore::SQLStatement::execute): Change to return an enum that represents 3 states - success, error, and quota.
3808           If the result is quota, this statement expects that it might be run again, presumably after the user increases 
3809           the quota
3810         (WebCore::SQLStatement::setFailureDueToQuota): Setup a quota failure, including a flag and the error
3811         (WebCore::SQLStatement::clearFailureDueToQuota): Clear a quota failure, for when the statement is rerun
3812         (WebCore::SQLStatement::lastExecutionFailedDueToQuota):
3813         * storage/SQLStatement.h:
3814
3815         * storage/SQLTransaction.cpp:
3816         (WebCore::SQLTransaction::SQLTransaction):
3817         (WebCore::SQLTransaction::performPendingCallback): Added an acceptable callback pointer
3818         (WebCore::SQLTransaction::openTransactionAndPreflight): Setup the quota in the database that will remain for this 
3819           transaction.  Note that in this patch, the quota being set is wrong - it makes sense to fix that in a follow up patch
3820         (WebCore::SQLTransaction::runStatements): Modified to add the ability to re-run a statement based on the UI delegate
3821           decision and whether the current statement was already run
3822         (WebCore::SQLTransaction::runCurrentStatement): Added another result condition - the Quota result - and handle it
3823         (WebCore::SQLTransaction::handleCurrentStatementError): Statements can now error-out from two places, so the code
3824           that handles a statement error was moved here
3825         (WebCore::SQLTransaction::deliverQuotaIncreaseCallback): Added - Consult the UI delegate for more quota, then 
3826           reschedule the current statement on the database thread
3827         * storage/SQLTransaction.h:
3828
3829 2007-12-06  Steve Falkenburg  <sfalken@apple.com>
3830
3831         <rdar://problem/5614257> Crash in timer / hashtable code due to uncaught exception
3832         
3833         Don't use callback-based timers, since these cause Windows to eat Windows crashes
3834         in code the timers call.
3835         
3836         Windows appears to be defending against "shatter" attacks partially by setting
3837         up a structured exception block while dispatching callback-based WM_TIMERs.
3838         
3839         I verified this by adding a divide by zero into some timer callback code.
3840         In the case where the timer was dispatched via a callback, the divide by zero
3841         exception was silently handled and ignored, with execution continuing after
3842         our call to DispatchMessage.  When processed via the WNDPROC, no SEH
3843         block was established by Windows, and our divide by zero generated a real
3844         crash (which is what we wanted).
3845         
3846         Windows handling our crashes for us led us to leave the timer data structures
3847         in an invalid state so the next time a timer was set, we'd crash accessing an
3848         invalid HashMap of timer data.
3849         
3850         Reviewed by Hyatt.
3851
3852         * platform/win/SharedTimerWin.cpp:
3853         (WebCore::TimerWindowWndProc):
3854         (WebCore::setSharedTimerFireTime):
3855
3856 2007-12-06  Adam Roben  <aroben@apple.com>
3857
3858         Fix <rdar://5108390> Feed title is too low in blue banner
3859
3860         Way back in r23069 we started applying the same font ascent hack that
3861         Mac WebKit applies to Helvetica, Times, and Courier. We did this so
3862         that those fonts would match the Mac metrics when we run the
3863         regression tests. However, this hack was applying to Arial on Windows
3864         when a site would specify the Helvetica font face because Windows will
3865         alias the font names. Instead of removing the hack entirely, we
3866         turn it off by default but provide some SPI so that DumpRenderTree can
3867         turn it on.
3868
3869         Reviewed by Hyatt.
3870
3871         All tests pass.
3872
3873         * platform/graphics/FontData.h: Add a new static method to turn on the
3874         hack on Windows only.
3875         * platform/graphics/win/FontDataWin.cpp:
3876         (WebCore::FontData::setShouldApplyMacAscentHack): Added.
3877         (WebCore::FontData::platformInit): Only perform the hack if
3878         shouldApplyMacAscentHack is true.
3879
3880 2007-12-06  Geoffrey Garen  <ggaren@apple.com>
3881
3882         Reviewed by Sam Weinig.
3883
3884         Fixed http://bugs.webkit.org/show_bug.cgi?id=16328
3885         REGRESSION (r28470): Crash expanding a GMail conversation
3886         
3887         * page/Frame.cpp:
3888         (WebCore::Frame::scriptProxy): Only return 0 if JS seems disabled *and*
3889         we haven't created the proxy yet. If we've created the proxy already, a
3890         script may be in the midst of execution, even though we've lost our
3891         settings object. During execution, scripts assume they have free access
3892         to the proxy.
3893
3894 2007-12-06  Adele Peterson  <adele@apple.com>
3895
3896         Reviewed by Oliver.
3897
3898         Fix for <rdar://problem/5631356> Toggling display property on video causes controls to get lost
3899
3900         * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::attach): Call updateFromElement.
3901         * html/HTMLMediaElement.h:
3902
3903 2007-12-05  Antti Koivisto  <antti@apple.com>
3904
3905         Reviewed by Oliver.
3906
3907         Rename
3908
3909         Movie -> MediaPlayer
3910         MoviePrivate -> MediaPlayerPrivate
3911         
3912         Movie is QuickTime terminology and clashes with its C API.
3913
3914         * WebCore.xcodeproj/project.pbxproj:
3915         * html/HTMLMediaElement.cpp:
3916         (WebCore::HTMLMediaElement::HTMLMediaElement):
3917         (WebCore::HTMLMediaElement::~HTMLMediaElement):
3918         (WebCore::HTMLMediaElement::initAndDispatchProgressEvent):
3919         (WebCore::HTMLMediaElement::bufferingRate):
3920         (WebCore::HTMLMediaElement::load):
3921         (WebCore::HTMLMediaElement::mediaPlayerNetworkStateChanged):
3922         (WebCore::HTMLMediaElement::mediaPlayerReadyStateChanged):
3923         (WebCore::HTMLMediaElement::setReadyState):
3924         (WebCore::HTMLMediaElement::progressEventTimerFired):
3925         (WebCore::HTMLMediaElement::seek):
3926         (WebCore::HTMLMediaElement::currentTime):
3927         (WebCore::HTMLMediaElement::duration):
3928         (WebCore::HTMLMediaElement::playbackRate):
3929         (WebCore::HTMLMediaElement::setPlaybackRate):
3930         (WebCore::HTMLMediaElement::play):
3931         (WebCore::HTMLMediaElement::pause):
3932         (WebCore::HTMLMediaElement::setVolume):
3933         (WebCore::HTMLMediaElement::setMuted):
3934         (WebCore::HTMLMediaElement::pickMedia):
3935         (WebCore::HTMLMediaElement::checkIfSeekNeeded):
3936         (WebCore::HTMLMediaElement::mediaPlayerVolumeChanged):
3937         (WebCore::HTMLMediaElement::mediaPlayerTimeChanged):
3938         (WebCore::HTMLMediaElement::mediaPlayerCuePointReached):
3939         (WebCore::HTMLMediaElement::addCuePoint):
3940         (WebCore::HTMLMediaElement::buffered):
3941         (WebCore::HTMLMediaElement::seekable):
3942         (WebCore::HTMLMediaElement::effectiveStart):
3943         (WebCore::HTMLMediaElement::effectiveEnd):
3944         (WebCore::HTMLMediaElement::effectiveLoopStart):
3945         (WebCore::HTMLMediaElement::effectiveLoopEnd):
3946         (WebCore::HTMLMediaElement::updateMediaPlayer):
3947         (WebCore::HTMLMediaElement::willSaveToCache):
3948         * html/HTMLMediaElement.h:
3949         (WebCore::HTMLMediaElement::player):
3950         * html/HTMLVideoElement.cpp:
3951         (WebCore::HTMLVideoElement::videoWidth):
3952         (WebCore::HTMLVideoElement::videoHeight):
3953         * platform/MIMETypeRegistry.cpp:
3954         (WebCore::initialiseSupportedMediaMIMETypes):
3955         (WebCore::MIMETypeRegistry::isSupportedMediaMIMEType):
3956         (WebCore::MIMETypeRegistry::getSupportedMediaMIMETypes):
3957         * platform/MIMETypeRegistry.h:
3958         * platform/graphics/MediaPlayer.cpp: Copied from WebCore/platform/graphics/Movie.cpp.
3959         (WebCore::MediaPlayer::MediaPlayer):
3960         (WebCore::MediaPlayer::~MediaPlayer):
3961         (WebCore::MediaPlayer::load):
3962         (WebCore::MediaPlayer::cancelLoad):
3963         (WebCore::MediaPlayer::play):
3964         (WebCore::MediaPlayer::pause):
3965         (WebCore::MediaPlayer::duration):
3966         (WebCore::MediaPlayer::currentTime):
3967         (WebCore::MediaPlayer::seek):
3968         (WebCore::MediaPlayer::paused):
3969         (WebCore::MediaPlayer::seeking):
3970         (WebCore::MediaPlayer::naturalSize):
3971         (WebCore::MediaPlayer::hasVideo):
3972         (WebCore::MediaPlayer::networkState):
3973         (WebCore::MediaPlayer::readyState):
3974         (WebCore::MediaPlayer::volume):
3975         (WebCore::MediaPlayer::setVolume):
3976         (WebCore::MediaPlayer::rate):
3977         (WebCore::MediaPlayer::setRate):
3978         (WebCore::MediaPlayer::muted):
3979         (WebCore::MediaPlayer::setMuted):
3980         (WebCore::MediaPlayer::dataRate):
3981         (WebCore::MediaPlayer::setEndTime):
3982         (WebCore::MediaPlayer::addCuePoint):
3983         (WebCore::MediaPlayer::removeCuePoint):
3984         (WebCore::MediaPlayer::clearCuePoints):
3985         (WebCore::MediaPlayer::maxTimeBuffered):
3986         (WebCore::MediaPlayer::maxTimeSeekable):
3987         (WebCore::MediaPlayer::bytesLoaded):
3988         (WebCore::MediaPlayer::totalBytesKnown):
3989         (WebCore::MediaPlayer::totalBytes):
3990         (WebCore::MediaPlayer::setRect):
3991         (WebCore::MediaPlayer::visible):
3992         (WebCore::MediaPlayer::setVisible):
3993         (WebCore::MediaPlayer::paint):
3994         (WebCore::MediaPlayer::getSupportedTypes):
3995         (WebCore::MediaPlayer::networkStateChanged):
3996         (WebCore::MediaPlayer::readyStateChanged):
3997         (WebCore::MediaPlayer::volumeChanged):
3998         (WebCore::MediaPlayer::timeChanged):
3999         (WebCore::MediaPlayer::cuePointReached):
4000         * platform/graphics/MediaPlayer.h: Copied from WebCore/platform/graphics/Movie.h.
4001         (WebCore::MediaPlayerClient::~MediaPlayerClient):
4002         (WebCore::MediaPlayerClient::mediaPlayerNetworkStateChanged):
4003         (WebCore::MediaPlayerClient::mediaPlayerReadyStateChanged):
4004         (WebCore::MediaPlayerClient::mediaPlayerVolumeChanged):
4005         (WebCore::MediaPlayerClient::mediaPlayerTimeChanged):
4006         (WebCore::MediaPlayerClient::mediaPlayerCuePointReached):
4007         * platform/graphics/Movie.cpp: Removed.
4008         * platform/graphics/Movie.h: Removed.
4009         * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp: Copied from WebCore/platform/graphics/gtk/MoviePrivateGStreamer.cpp.
4010         (WebCore::mediaPlayerPrivateErrorCallback):
4011         (WebCore::mediaPlayerPrivateEOSCallback):
4012         (WebCore::mediaPlayerPrivateStateCallback):
4013         (WebCore::mediaPlayerPrivateBufferingCallback):
4014         (WebCore::MediaPlayerPrivate::MediaPlayerPrivate):
4015         (WebCore::MediaPlayerPrivate::~MediaPlayerPrivate):
4016         (WebCore::MediaPlayerPrivate::load):
4017         (WebCore::MediaPlayerPrivate::play):
4018         (WebCore::MediaPlayerPrivate::pause):
4019         (WebCore::MediaPlayerPrivate::duration):
4020         (WebCore::MediaPlayerPrivate::currentTime):
4021         (WebCore::MediaPlayerPrivate::seek):
4022         (WebCore::MediaPlayerPrivate::setEndTime):
4023         (WebCore::MediaPlayerPrivate::addCuePoint):
4024         (WebCore::MediaPlayerPrivate::removeCuePoint):
4025         (WebCore::MediaPlayerPrivate::clearCuePoints):
4026         (WebCore::MediaPlayerPrivate::startCuePointTimerIfNeeded):
4027         (WebCore::MediaPlayerPrivate::cancelSeek):
4028         (WebCore::MediaPlayerPrivate::cuePointTimerFired):
4029         (WebCore::MediaPlayerPrivate::paused):
4030         (WebCore::MediaPlayerPrivate::seeking):
4031         (WebCore::MediaPlayerPrivate::naturalSize):
4032         (WebCore::MediaPlayerPrivate::hasVideo):
4033         (WebCore::MediaPlayerPrivate::setVolume):
4034         (WebCore::MediaPlayerPrivate::setMuted):
4035         (WebCore::MediaPlayerPrivate::setRate):
4036         (WebCore::MediaPlayerPrivate::dataRate):
4037         (WebCore::MediaPlayerPrivate::networkState):
4038         (WebCore::MediaPlayerPrivate::readyState):
4039         (WebCore::MediaPlayerPrivate::maxTimeBuffered):
4040         (WebCore::MediaPlayerPrivate::maxTimeSeekable):
4041         (WebCore::MediaPlayerPrivate::maxTimeLoaded):
4042         (WebCore::MediaPlayerPrivate::bytesLoaded):
4043         (WebCore::MediaPlayerPrivate::totalBytesKnown):
4044         (WebCore::MediaPlayerPrivate::totalBytes):
4045         (WebCore::MediaPlayerPrivate::cancelLoad):
4046         (WebCore::MediaPlayerPrivate::updateStates):
4047         (WebCore::MediaPlayerPrivate::loadStateChanged):
4048         (WebCore::MediaPlayerPrivate::rateChanged):
4049         (WebCore::MediaPlayerPrivate::sizeChanged):
4050         (WebCore::MediaPlayerPrivate::timeChanged):
4051         (WebCore::MediaPlayerPrivate::volumeChanged):
4052         (WebCore::MediaPlayerPrivate::didEnd):
4053         (WebCore::MediaPlayerPrivate::loadingFailed):
4054         (WebCore::MediaPlayerPrivate::setRect):
4055         (WebCore::MediaPlayerPrivate::setVisible):
4056         (WebCore::MediaPlayerPrivate::paint):
4057         (WebCore::MediaPlayerPrivate::getSupportedTypes):
4058         (WebCore::MediaPlayerPrivate::createGSTPlayBin):
4059         * platform/graphics/gtk/MediaPlayerPrivateGStreamer.h: Copied from WebCore/platform/graphics/gtk/MoviePrivateGStreamer.h.
4060         * platform/graphics/gtk/MoviePrivateGStreamer.cpp: Removed.
4061         * platform/graphics/gtk/MoviePrivateGStreamer.h: Removed.
4062         * platform/graphics/mac/MediaPlayerPrivateQTKit.h: Copied from WebCore/platform/graphics/mac/MoviePrivateQTKit.h.
4063         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm: Copied from WebCore/platform/graphics/mac/MoviePrivateQTKit.mm.
4064         (WebCore::MediaPlayerPrivate::MediaPlayerPrivate):
4065         (WebCore::MediaPlayerPrivate::~MediaPlayerPrivate):
4066         (WebCore::MediaPlayerPrivate::createQTMovie):
4067         (WebCore::MediaPlayerPrivate::createQTMovieView):
4068         (WebCore::MediaPlayerPrivate::createQTTime):
4069         (WebCore::MediaPlayerPrivate::load):
4070         (WebCore::MediaPlayerPrivate::play):
4071         (WebCore::MediaPlayerPrivate::pause):
4072         (WebCore::MediaPlayerPrivate::duration):
4073         (WebCore::MediaPlayerPrivate::currentTime):
4074         (WebCore::MediaPlayerPrivate::seek):
4075         (WebCore::MediaPlayerPrivate::doSeek):
4076         (WebCore::MediaPlayerPrivate::cancelSeek):
4077         (WebCore::MediaPlayerPrivate::seekTimerFired):
4078         (WebCore::MediaPlayerPrivate::setEndTime):
4079         (WebCore::MediaPlayerPrivate::addCuePoint):
4080         (WebCore::MediaPlayerPrivate::removeCuePoint):
4081         (WebCore::MediaPlayerPrivate::clearCuePoints):
4082         (WebCore::MediaPlayerPrivate::startCuePointTimerIfNeeded):
4083         (WebCore::MediaPlayerPrivate::cuePointTimerFired):
4084         (WebCore::MediaPlayerPrivate::paused):
4085         (WebCore::MediaPlayerPrivate::seeking):
4086         (WebCore::MediaPlayerPrivate::naturalSize):
4087         (WebCore::MediaPlayerPrivate::hasVideo):
4088         (WebCore::MediaPlayerPrivate::setVolume):
4089         (WebCore::MediaPlayerPrivate::setMuted):
4090         (WebCore::MediaPlayerPrivate::setRate):
4091         (WebCore::MediaPlayerPrivate::dataRate):
4092         (WebCore::MediaPlayerPrivate::networkState):
4093         (WebCore::MediaPlayerPrivate::readyState):
4094         (WebCore::MediaPlayerPrivate::maxTimeBuffered):
4095         (WebCore::MediaPlayerPrivate::maxTimeSeekable):
4096         (WebCore::MediaPlayerPrivate::maxTimeLoaded):
4097         (WebCore::MediaPlayerPrivate::bytesLoaded):
4098         (WebCore::MediaPlayerPrivate::totalBytesKnown):
4099         (WebCore::MediaPlayerPrivate::totalBytes):
4100         (WebCore::MediaPlayerPrivate::cancelLoad):
4101         (WebCore::MediaPlayerPrivate::updateStates):
4102         (WebCore::MediaPlayerPrivate::loadStateChanged):
4103         (WebCore::MediaPlayerPrivate::rateChanged):
4104         (WebCore::MediaPlayerPrivate::sizeChanged):
4105         (WebCore::MediaPlayerPrivate::timeChanged):
4106         (WebCore::MediaPlayerPrivate::volumeChanged):
4107         (WebCore::MediaPlayerPrivate::didEnd):
4108         (WebCore::MediaPlayerPrivate::setRect):
4109         (WebCore::MediaPlayerPrivate::setVisible):
4110         (WebCore::MediaPlayerPrivate::paint):
4111         (WebCore::MediaPlayerPrivate::getSupportedTypes):
4112         (-[WebCoreMovieObserver initWithCallback:WebCore::]):
4113         * platform/graphics/mac/MoviePrivateQTKit.h: Removed.
4114         * platform/graphics/mac/MoviePrivateQTKit.mm: Removed.
4115         * rendering/RenderMedia.cpp:
4116         (WebCore::RenderMedia::player):
4117         * rendering/RenderMedia.h:
4118         * rendering/RenderVideo.cpp:
4119         (WebCore::RenderVideo::RenderVideo):
4120         (WebCore::RenderVideo::~RenderVideo):
4121         (WebCore::RenderVideo::videoSizeChanged):
4122         (WebCore::RenderVideo::paintReplaced):
4123         (WebCore::RenderVideo::layout):
4124         (WebCore::RenderVideo::updateFromElement):
4125         (WebCore::RenderVideo::updatePlayer):
4126         * rendering/RenderVideo.h:
4127
4128 2007-12-06  Geoffrey Garen  <ggaren@apple.com>
4129
4130         Build fix: access global object directly.
4131
4132         * plugins/win/PluginViewWin.cpp:
4133         (WebCore::PluginViewWin::bindingInstance):
4134
4135 2007-12-06  Mark Rowe  <mrowe@apple.com>
4136
4137         Reviewed by Eric.
4138
4139         Fix bug spotted by GCC 4.2.
4140
4141         * bindings/js/kjs_window.cpp:
4142         (KJS::allowPopUp): Remove extraneous semicolon that completely changed the meaning of allowPopUp.
4143
4144 2007-12-06  Holger Hans Peter Freyther <holger.freyther@trolltech.com>
4145
4146         Reviewed by Alp Toker.
4147
4148         http://bugs.webkit.org/show_bug.cgi?id=16173
4149         Licensing change
4150
4151         Change license from BSD to LGPL.
4152
4153         * platform/gtk/FileSystemGtk.cpp:
4154
4155 2007-12-05  Rob Buis  <buis@kde.org>
4156
4157         Reviewed by Mitz.
4158
4159         http://bugs.webkit.org/show_bug.cgi?id=15289
4160         WebKit does not respect clip paths of a 0x0 rect
4161
4162         Make empty clip paths clip the whole referencing graphic.
4163
4164         * svg/SVGClipPathElement.cpp:
4165         (WebCore::SVGClipPathElement::canvasResource):
4166         * svg/graphics/SVGResourceClipper.h:
4167         (WebCore::ClipDataList::isEmpty):
4168
4169 2007-12-05  Darin Adler  <darin@apple.com>
4170
4171         Reviewed by Maciej.
4172
4173         - fix http://bugs.webkit.org/show_bug.cgi?id=16266
4174           <rdar://problem/5625279> REGRESSION: crash loading CNN.com at
4175           Interpreter::createObjectsForGlobalObjectProperties()
4176
4177         I don't know how to reproduce this in a test.
4178
4179         * bindings/js/JSDocumentCustom.cpp: (WebCore::JSDocument::mark):
4180         Call JSEventTargetNode::mark instead of DOMObject::mark. There's no difference
4181         r