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