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