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