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