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