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