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