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