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