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