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