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