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