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