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