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