Reviewed by Mark Rowe.
[WebKit-https.git] / WebCore / ChangeLog
1 2007-12-13  Sam Weinig  <sam@webkit.org>
2
3         Reviewed by Mark Rowe.
4
5         Fix typos and rename InspectorController::moveByUnrestricted to InspectorController::moveWindowBy.
6
7         * page/InspectorController.cpp:
8         (WebCore::moveByUnrestricted):
9         (WebCore::InspectorController::windowScriptObjectAvailable):
10         (WebCore::InspectorController::moveWindowBy):
11         * page/InspectorController.h:
12         * page/inspector/inspector.js:
13
14 2007-12-13  Dan Bernstein  <mitz@apple.com>
15
16         Reviewed by Dave Hyatt.
17
18         - fix <rdar://problem/5642426> explicit cubic-bezier curves all treated as "default" for transition-timing-function
19
20         Test: fast/css/transition-timing-function.html
21
22         * css/CSSStyleSelector.cpp: Changed the HANDLE_MULTILAYER_VALUE macro to
23         not reject non-primitive non-list values, and instead made sure that the
24         mapping functions rejected them if necessary. This allows non-primitive
25         timing functions to be mapped.
26         (WebCore::CSSStyleSelector::mapBackgroundAttachment):
27         (WebCore::CSSStyleSelector::mapBackgroundClip):
28         (WebCore::CSSStyleSelector::mapBackgroundComposite):
29         (WebCore::CSSStyleSelector::mapBackgroundOrigin):
30         (WebCore::CSSStyleSelector::mapBackgroundImage):
31         (WebCore::CSSStyleSelector::mapBackgroundRepeat):
32         (WebCore::CSSStyleSelector::mapBackgroundXPosition):
33         (WebCore::CSSStyleSelector::mapBackgroundYPosition):
34         (WebCore::CSSStyleSelector::mapTransitionDuration):
35         (WebCore::CSSStyleSelector::mapTransitionRepeatCount):
36         (WebCore::CSSStyleSelector::mapTransitionTimingFunction):
37         (WebCore::CSSStyleSelector::mapTransitionProperty):
38         * css/CSSTimingFunctionValue.cpp:
39         (WebCore::CSSTimingFunctionValue::cssText): Implemented for use in the
40         regression test.
41         * css/CSSTimingFunctionValue.h:
42         (WebCore::CSSTimingFunctionValue::isTransitionTimingFunctionValue):
43         Added. Returns true.
44         * css/CSSValue.h:
45         (WebCore::CSSValue::isTransitionTimingFunctionValue): Added. Returns
46         false.
47
48 2007-12-13  Steve Falkenburg  <sfalken@apple.com>
49
50         Move source file generation into its own vcproj to fix build dependencies.
51
52         Reviewed by Adam.
53
54         * WebCore.vcproj/WebCore.make:
55         * WebCore.vcproj/WebCore.sln:
56         * WebCore.vcproj/WebCore.submit.sln:
57         * WebCore.vcproj/WebCore.vcproj:
58         * WebCore.vcproj/WebCoreGenerated.vcproj: Added.
59
60 2007-12-13  Justin Garcia  <justin.garcia@apple.com>
61
62         Reviewed by Oliver Hunt.
63         
64         <rdar://problem/4145786> Undoing a color change of text in a compose window always changes it back to black
65         
66         Some of the operations performed in removeHTMLFontStyle were non-undoable.
67         
68         I'm having trouble writing a layout test for this because I can't get DRT to
69         perform editing operations in separate Undo steps without adding unacceptably long
70         wait times between operations.  I filed:
71         
72         <rdar://problem/5646779> Can't get DRT to perform editing operations in separate Undo steps
73
74         * editing/ApplyStyleCommand.cpp:
75         (WebCore::ApplyStyleCommand::removeHTMLFontStyle):
76
77 2007-12-13  Sam Weinig  <sam@webkit.org>
78
79         Reviewed by Anders.
80
81         Fix for http://bugs.webkit.org/show_bug.cgi?id=16352
82         Toolbar dragged inspector cannot be moved beyond screen edges
83
84         * page/InspectorController.cpp:
85         (WebCore::moveByUnrestricted):
86         (WebCore::InspectorController::windowScriptObjectAvailable):
87         (WebCore::InspectorController::moveByUnrestricted):
88         * page/InspectorController.h:
89         * page/inspector/inspector.js:
90
91 2007-12-13  Adam Roben  <aroben@apple.com>
92
93         Fix <rdar://5517707> Crash on wptv.wp.pl when "make bigger" button is clicked
94
95         Windows Media Player has a modal message loop that will deliver
96         messages to us at inappropriate times and we will crash if we handle
97         them when they are delivered. In PluginViewWin, we add a quirk for
98         Media Player to set a flag whenever we give the plugin a chance to
99         execute code, and in SharedTimerWin we check if the plugin is
100         executing code and repost messages if so.
101
102         Reviewed by Anders.
103
104         * platform/win/SharedTimerWin.cpp:
105         (WebCore::TimerWindowWndProc): Repost messages if we're calling a
106         plugin.
107         * plugins/win/PluginViewWin.cpp: Surround all calls to the plugin with
108         setCallingPlugin(true/false).
109         (WebCore::PluginViewWin::updateWindow):
110         (WebCore::PluginViewWin::dispatchNPEvent):
111         (WebCore::PluginViewWin::setNPWindowRect):
112         (WebCore::PluginViewWin::start):
113         (WebCore::PluginViewWin::stop):
114         (WebCore::PluginViewWin::performRequest):
115         (WebCore::PluginViewWin::bindingInstance):
116         (WebCore::PluginViewWin::determineQuirks):
117         (WebCore::PluginViewWin::setCallingPlugin): Added.
118         (WebCore::PluginViewWin::isCallingPlugin): Added.
119         * plugins/win/PluginViewWin.h: Added a new quirk.
120
121 2007-12-13  Alp Toker  <alp@atoker.com>
122
123         Add a missing DEPENDPATH. Fixes non-clean builds following networking
124         header changes.
125
126         * WebCore.pro:
127
128 2007-12-13  Dan Bernstein  <mitz@apple.com>
129
130         Reviewed by Anders Carlsson.
131
132         - fix regression in fast/text/international/bidi-override on Tiger
133
134         * platform/graphics/GlyphPageTreeNode.cpp:
135         (WebCore::GlyphPageTreeNode::initializePage): Add bidi overrides here
136         too. I forgot to add them when I added them to treatAsZeroWidthSpace in
137         an earlier patch.
138
139 2007-12-13  Justin Garcia  <justin.garcia@apple.com>
140
141         Reviewed by Darin Adler.
142
143         <rdar://problem/5601583> GMail Editor: Copied link doesn't paste as a link, just colored text
144         
145         The code that checks the selected Range to see if it's inside an anchor
146         checks ancestors of the Range's commonAncestor() but not the
147         commonAncestor() itself, and so we'd fail to add markup for the enclosing
148         anchor to the pasteboard.
149         
150         Some enclosing element getters check the node passed to the getter and some
151         don't.  There were a few places where we incorrectly assumed that enclosing 
152         element getters check the node passed to the getter, but this is the only 
153         case that I'm able to write a test case for at the moment.
154         
155         In this patch I've:
156         Changed enclosingNodeWithType and enclosingNodeWithTag to take in positions,
157         like the newer enclosing element getters.  This is important because we must
158         soon add code to the getters so that they understand that some editing positions
159         inside nodes don't actually refer to positions inside those nodes but positions
160         before and after them.  Like [table, 0].
161         Changed enclosingNodeWithType and enclosingNodeWithTag to check nodes starting with
162         n where [n, o] is the position passed to the getter, instead of starting the the parent
163         of n.  This makes all but a few of the enclosing element getters behave consistently.
164         Changed enclosingNodeWithType and enclosingNodeWithTag to not return non-editable 
165         nodes if the input position was editable.  This fixes a bug that that the above change
166         exposed.
167         Changed enclosingTableCell to simply call enclosingNodeWithType.  We should do
168         this for the rest of the getters, or simply remove them in favor of enclosingNodeWithType
169         unless doing so would affect readability, like it would in the case of enclosingTableCell.
170         Ditto for enclosingBlock.
171
172         * editing/AppendNodeCommand.cpp:
173         (WebCore::AppendNodeCommand::doApply):
174         * editing/DeleteButtonController.cpp:
175         (WebCore::enclosingDeletableElement):
176         * editing/DeleteSelectionCommand.cpp:
177         (WebCore::DeleteSelectionCommand::initializePositionData):
178         (WebCore::DeleteSelectionCommand::saveFullySelectedAnchor):
179         * editing/Editor.cpp:
180         (WebCore::Editor::selectionUnorderedListState):
181         (WebCore::Editor::selectionOrderedListState):
182         * editing/IndentOutdentCommand.cpp:
183         (WebCore::IndentOutdentCommand::prepareBlockquoteLevelForInsertion):
184         (WebCore::IndentOutdentCommand::outdentParagraph):
185         * editing/InsertNodeBeforeCommand.cpp:
186         (WebCore::InsertNodeBeforeCommand::doApply):
187         * editing/InsertParagraphSeparatorCommand.cpp:
188         (WebCore::InsertParagraphSeparatorCommand::doApply):
189         * editing/ReplaceSelectionCommand.cpp:
190         (WebCore::ReplaceSelectionCommand::shouldMerge):
191         (WebCore::ReplaceSelectionCommand::removeUnrenderedTextNodesAtEnds):
192         (WebCore::ReplaceSelectionCommand::positionAtEndOfInsertedContent):
193         * editing/TextIterator.cpp:
194         * editing/htmlediting.cpp:
195         (WebCore::enclosingBlock):
196         (WebCore::enclosingNodeWithTag):
197         (WebCore::enclosingNodeOfType):
198         (WebCore::enclosingTableCell):
199         (WebCore::isTableCell):
200         * editing/htmlediting.h:
201         * editing/markup.cpp:
202         (WebCore::appendStartMarkup):
203         (WebCore::createMarkup):
204
205 2007-12-13  Alexey Proskuryakov  <ap@webkit.org>
206
207         Reviewed by Darin.
208
209         Turn on keyboard event processing quirks for feed views and old applications on Mac OS X.
210
211         * WebCore.base.exp:
212         * dom/KeyboardEvent.cpp:
213         (WebCore::KeyboardEvent::charCode):
214         * page/EventHandler.cpp:
215         (WebCore::EventHandler::needsKeyboardEventDisambiguationQuirks):
216         (WebCore::EventHandler::keyEvent):
217         * page/EventHandler.h:
218         * page/Settings.cpp:
219         (WebCore::Settings::Settings):
220         (WebCore::Settings::setNeedsKeyboardEventDisambiguationQuirks):
221         * page/Settings.h:
222         (WebCore::Settings::needsKeyboardEventDisambiguationQuirks):
223         * page/mac/EventHandlerMac.mm:
224         (WebCore::EventHandler::needsKeyboardEventDisambiguationQuirks):
225         * platform/PlatformKeyboardEvent.h:
226         * platform/mac/KeyEventMac.mm:
227         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
228         (WebCore::PlatformKeyboardEvent::disambiguateKeyDownEvent):
229
230 2007-12-13  Dan Bernstein  <mitz@apple.com>
231
232         - build fix
233
234         * platform/network/cf/ResourceErrorCF.cpp:
235
236 2007-12-13  Antti Koivisto  <antti@apple.com>
237
238         Reviewed by Tim Hatcher.
239
240         Fix <rdar://problem/5605674> 
241         Make <video> display WebKit context menu instead of the QTKit one.
242     
243         It doesn't really matter where the QTMovieView is.
244
245         * ChangeLog:
246         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
247         (WebCore::MediaPlayerPrivate::createQTMovieView):
248         (WebCore::MediaPlayerPrivate::setRect):
249
250 2007-12-13  Dan Bernstein  <mitz@apple.com>
251
252         Reviewed by Adam Roben.
253
254         - ensure that Unicode bidi control characters are rendered as zero width
255           spaces
256
257         Test: fast/text/international/bidi-control-chars-treated-as-ZWS.html
258
259         * platform/graphics/Font.h:
260         (WebCore::Font::treatAsZeroWidthSpace):
261         * platform/graphics/GlyphPageTreeNode.cpp:
262         (WebCore::GlyphPageTreeNode::initializePage):
263         * platform/text/CharacterNames.h:
264
265 2007-12-13  Brady Eidson  <beidson@apple.com>
266
267         Build fix
268
269         * platform/wx/TemporaryLinkStubs.cpp:
270
271 2007-12-12  Brady Eidson  <beidson@apple.com>
272
273         Build fix
274
275         * platform/gtk/TemporaryLinkStubs.cpp:
276
277 2007-12-12  Brady Eidson  <beidson@apple.com>
278
279         Build fix
280
281         * WebCore.pro:
282         * history/qt/CachedPageQt.cpp: Removed. Whole purpose for this method being platform-specific has been removed
283
284 2007-12-12  Brady Eidson  <beidson@apple.com>
285
286         Build fix
287
288         * platform/win/TemporaryLinkStubs.cpp:
289
290 2007-12-12  Brady Eidson  <beidson@apple.com>
291
292         Reviewed by Sam Weinig
293
294         Fix for <rdar://problem/4886844> and lay groundwork for <rdar://problem/4516170> (Back/Forward Cache on Windows)
295
296         All back/forward list and page cache related items used to be in WebKit.
297         When they were pushed into WebCore, some sloppy compromises were made to keep the Back/Forward cache working on Mac.
298         Namely, a WebCore::HistoryItem had to know how to keep a WebDocumentView alive.  We accomplished this via some #ifdefs
299         in CachedPage and having the Mac-only CachedPageMac.mm
300
301         To get rid of that nastiness and pave the way for adding Back/Forward cache on other platforms, this patch adds the 
302         concept of "CachedPagePlatformData" which can contain anything the platform API wants.  
303
304         I also took the opportunity to do other cleanup and renaming client methods to better fit their new purposes.
305
306         * WebCore.base.exp:
307         * WebCore.xcodeproj/project.pbxproj:
308
309         * history/CachedPage.cpp:
310         (WebCore::CachedPage::~CachedPage): Combined "close()" and "clear()" to just "clear()" - call it from here.
311         (WebCore::CachedPage::clear): Call clear() on the CachedPagePlatformData if it exists.  Also delete the CachedPagePlatformData.
312         (WebCore::CachedPage::setCachedPagePlatformData):
313         (WebCore::CachedPage::cachedPagePlatformData):
314         * history/CachedPage.h:
315
316         * history/CachedPagePlatformData.h: Added.
317         (WebCore::CachedPagePlatformData::~CachedPagePlatformData): Virtual d'tor.
318         (WebCore::CachedPagePlatformData::clear): Virtual method for platforms that need to do cleanup at the same time as CachedPage::clear().
319
320         * history/PageCache.cpp:
321         (WebCore::PageCache::releaseAutoreleasedPagesNow): Call "clear()" instead of "close()"
322
323         * history/mac/CachedPageMac.mm: Removed. Functionality replaced with CachedPagePlatformData.
324
325         * loader/FrameLoader.cpp:
326         (WebCore::FrameLoader::transitionToCommitted): Call the new client methods.  Make some work previously done by WebKitMac cross platform 
327           (setting the cached DocumentLoader to the Frame).
328         (WebCore::FrameLoader::cachePageForHistoryItem):  Renamed the client methods
329
330         * loader/FrameLoaderClient.h:  The very Mac-centric "makeDocumentView", "setDocumentViewFromCachedPage", and "saveDocumentViewToCachedPage"
331           become "transitionToCommittedForNewPage", "transitionToCommittedFromCachedPage", and "savePlatformDataToCachedPage" accordingly
332
333         * svg/graphics/SVGImageEmptyClients.h:
334         (WebCore::SVGEmptyFrameLoaderClient::savePlatformDataToCachedPage):
335         (WebCore::SVGEmptyFrameLoaderClient::transitionToCommittedFromCachedPage):
336         (WebCore::SVGEmptyFrameLoaderClient::transitionToCommittedForNewPage):
337
338 2007-12-12  Dan Bernstein  <mitz@apple.com>
339
340         Reviewed by Oliver Hunt.
341
342         - fix <rdar://problem/5074620> text with font:initial; fails to appear (causes fast/text/font-initial.html to fail)
343
344         * css/CSSStyleSelector.cpp:
345         (WebCore::CSSStyleSelector::applyProperty): When the font property is
346         set to 'initial', set the font size to its initial value, 'medium',
347         and the font family to the standard family.
348
349 2007-12-12  Justin Garcia  <justin.garcia@apple.com>
350
351         Reviewed by Darin Adler.
352
353         <rdar://problem/5433862> Mail crashes at WebCore::highestAncestor() when deleting a particular selection
354
355         * editing/DeleteSelectionCommand.cpp:
356         (WebCore::DeleteSelectionCommand::removePreviouslySelectedEmptyTableRows):
357         Don't remove the table row that contained the end of the selection if it is where we are
358         about to place the ending selection.
359         Don't remove all empty rows after the row that contained the start of the selection,
360         they might come after the row that contained the end of the selection.
361
362 2007-12-12  Sam Weinig  <sam@webkit.org>
363
364         Reviewed by Anders Carlsson.
365
366         Add button to clear the Web Inspector's console.
367
368         * English.lproj/InspectorLocalizedStrings.js:
369         * page/inspector/ConsolePanel.js:
370         * page/inspector/inspector.css:
371
372 2007-12-12  Anders Carlsson  <andersca@apple.com>
373
374         Reviewed by Adam and Jon.
375
376         <rdar://problem/5349282>
377         popup blocking is not applied to plugins on Windows.
378         
379         Implement popup blocking. If the plug-in supports the new 
380         NPN_PushPopupsEnabledState/NPN_PopPopupsEnabledState API we just use that
381         to determine if a plug-in request can open new windows.
382         
383         If a plug-in does not support the new API, we assume that a plug-in can open new windows
384         in response to either mouse click or key press events.
385         
386         * plugins/win/PluginViewWin.cpp:
387         (WebCore::PluginRequestWin::PluginRequestWin):
388         (WebCore::PluginRequestWin::shouldAllowPopups):
389         Add new shouldAllowPopups member.
390         
391         (WebCore::PluginViewWin::popPopupsStateTimerFired):
392         Reset the popup state.
393         
394         (WebCore::isWindowsMessageUserGesture):
395         New function that given a windows message id returns whether it's a user gesture or not.
396         
397         (WebCore::PluginViewWin::wndProc):
398         Allow popups if the window message is a user gesture.
399         
400         (WebCore::PluginViewWin::dispatchNPEvent):
401         New method that dispatches an NPEvent, turning on popups if necessary.
402         
403         (WebCore::PluginViewWin::paint):
404         (WebCore::PluginViewWin::handleKeyboardEvent):
405         (WebCore::PluginViewWin::handleMouseEvent):
406         Call dispatchNPEvent().
407         
408         (WebCore::PluginViewWin::performRequest):
409         (WebCore::PluginViewWin::load):
410         Add calls to shouldAllowPopups().
411         
412         (WebCore::PluginViewWin::pushPopupsEnabledState):
413         (WebCore::PluginViewWin::popPopupsEnabledState):
414         New methods that maintain the popup state stack.
415         
416         (WebCore::PluginViewWin::arePopupsAllowed):
417         New method that returns whether popups are allowed.
418         
419         (WebCore::PluginViewWin::PluginViewWin):
420         * plugins/win/PluginViewWin.h:
421         Add new instance variables.
422         
423         * plugins/win/npapi.cpp:
424         (NPN_PushPopupsEnabledState):
425         (NPN_PopPopupsEnabledState):
426         Implement these.
427
428 2007-12-12  Dan Bernstein  <mitz@apple.com>
429
430         Reviewed by John Sullivan.
431
432         - fix a bug in debug builds only where selecting an earlier item in
433           a popup selects the first item
434
435         Test: fast/forms/menulist-selection-reset.html
436
437         * html/HTMLSelectElement.cpp:
438         (WebCore::HTMLSelectElement::recalcListItems): Added an argument that
439         tells that function whether it should update the selected state of
440         option elements.
441         (WebCore::HTMLSelectElement::checkListItems): Changed to pass false
442         as the above argument.
443         * html/HTMLSelectElement.h:
444
445 2007-12-12  Adele Peterson  <adele@apple.com>
446
447         Reviewed by Geoff.
448
449         Fix for <rdar://problem/5643054> Remove cue point implementation for media elements
450
451         When the specification for cue ranges is more final, we will implement those.
452
453         * html/HTMLMediaElement.cpp:
454         (WebCore::HTMLMediaElement::~HTMLMediaElement):
455         (WebCore::HTMLMediaElement::load):
456         * html/HTMLMediaElement.h:
457         * html/HTMLMediaElement.idl:
458         * platform/graphics/MediaPlayer.cpp:
459         * platform/graphics/MediaPlayer.h:
460         (WebCore::MediaPlayerClient::mediaPlayerTimeChanged):
461         * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
462         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
463         (WebCore::MediaPlayerPrivate::MediaPlayerPrivate):
464         (WebCore::MediaPlayerPrivate::load):
465         (WebCore::MediaPlayerPrivate::play):
466         (WebCore::MediaPlayerPrivate::pause):
467         (WebCore::MediaPlayerPrivate::setEndTime):
468         (WebCore::MediaPlayerPrivate::startEndPointTimerIfNeeded):
469         (WebCore::MediaPlayerPrivate::endPointTimerFired):
470         (WebCore::MediaPlayerPrivate::timeChanged):
471         (WebCore::MediaPlayerPrivate::didEnd):
472         * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
473         (WebCore::MediaPlayerPrivate::MediaPlayerPrivate):
474         (WebCore::MediaPlayerPrivate::startEndPointTimerIfNeeded):
475         (WebCore::MediaPlayerPrivate::endPointTimerFired):
476         * platform/graphics/gtk/MediaPlayerPrivateGStreamer.h:
477
478 2007-12-12  MorganL  <morganl.webkit@yahoo.com>
479
480         Reviewed by Maciej.
481
482         Fixes:
483         http://bugs.webkit.org/show_bug.cgi?id=16408
484
485         When navigating back/forward to a http:// link, we should prefer to
486         load from cache if possible.
487
488         * loader/FrameLoader.cpp:
489
490 2007-12-12  Anders Carlsson  <andersca@apple.com>
491
492         Reviewed by Sam.
493
494         <rdar://problem/5132003>
495         dumpResourceLoadCallbacks is not implemented in DRT on Windows.
496         
497         * platform/network/cf/ResourceErrorCF.cpp:
498         (WebCore::ResourceError::unpackPlatformError):
499         Handle kCFErrorDomainWinSock.
500         
501         * platform/network/cf/ResourceHandleCFNet.cpp:
502         (WebCore::willSendRequest):
503         Ignore willSendRequest calls where the redirect response is null, like we do in 
504         the Mac version.
505
506 2007-12-12  Steve Falkenburg  <sfalken@apple.com>
507
508         <rdar://problem/5643785> Fix iBench regression caused by mis-placed nested timer check.
509         
510         Reviewed by Anders.
511
512         * platform/win/SharedTimerWin.cpp:
513         (WebCore::TimerWindowWndProc): Don't set high-resolution timer flag inside non-high-resolution timer proc.
514
515 2007-12-12  Beth Dakin  <bdakin@apple.com>
516
517         Reviewed by Oliver.
518
519         Fix for <rdar://problem/5643770> REGRESSION: Free-standing SVGs 
520         with width and height 100% clip to 300 x 150
521
522         Though it was correct in an earlier iteration of my patch, it is 
523         not sufficient in the final, committed version to ask if the 
524         relativeWidthValue() or relativeHeightValue() is greater than 0 
525         just to determine if one has been set, for, they are now 
526         initialized to 300 and 150 respectively! This patch instead adds a 
527         bool to keep track of whether a container size has been set, and 
528         only used the relative value if it has.
529
530         * rendering/RenderSVGRoot.cpp:
531         (WebCore::RenderSVGRoot::calcViewport):
532         * svg/SVGSVGElement.cpp:
533         (WebCore::SVGSVGElement::SVGSVGElement):
534         * svg/SVGSVGElement.h:
535         (WebCore::SVGSVGElement::setContainerSize):
536         (WebCore::SVGSVGElement::hasSetContainerSize):
537
538 2007-12-12  Brady Eidson  <beidson@apple.com>
539
540         Reviewed by Steve Falkenburg 
541
542         <rdar://problem/5012636> - WebURLProtectionSpace::realm returns the hostname rather than the authentication realm
543
544         * platform/network/ProtectionSpace.cpp:
545         (WebCore::ProtectionSpace::ProtectionSpace): Assign the realm to m_realm, instead of the host
546
547 2007-12-12  Alp Toker  <alp@atoker.com>
548
549         Reviewed by Maciej.
550
551         http://bugs.webkit.org/show_bug.cgi?id=16388
552         [GTK] Widget::setCursor() gets called frequently
553
554         Cache the current cursor to avoid calling gdk_window_set_cursor() when
555         there's no change in cursor.
556
557         * platform/gtk/WidgetGtk.cpp:
558         (WebCore::Widget::Widget):
559         (WebCore::Widget::cursor):
560         (WebCore::Widget::setCursor):
561
562 2007-12-12  Rodney Dawes  <dobey@wayofthemonkey.com>
563
564         Reviewed by Maciej.
565
566         http://bugs.webkit.org/show_bug.cgi?id=16342
567         Build Warning and Error fixes in WebCore GTK+
568
569         Use C-style casts for casting function pointers to gpointer
570         Use static_cast<int> to cast a float to int to fix a warning
571
572         * platform/gtk/PlatformScrollBarGtk.cpp:
573         (PlatformScrollbar::PlatformScrollbar):
574         (PlatformScrollbar::~PlatformScrollbar):
575         (PlatformScrollbar::gtkValueChanged):
576         * platform/gtk/ThreadingGtk.cpp:
577         (callFunctionOnMainThread):
578         (callOnMainThread):
579
580 2007-12-12  Dan Bernstein  <mitz@apple.com>
581
582         Reviewed by Darin Adler.
583
584         - better fix for a crash when pressing a key that is not associated
585           with a command
586
587         * editing/EditorCommand.cpp:
588         (WebCore::Editor::command): Return the empty command if the command name
589         is empty.
590
591 2007-12-12  Alexey Proskuryakov  <ap@webkit.org>
592
593         Reviewed by Darin.
594
595         http://bugs.webkit.org/show_bug.cgi?id=16410
596         Implement isKeypadEvent() on Windows
597
598         Test: platform/win/fast/events/keyLocation-numpad.html
599
600         * platform/win/KeyEventWin.cpp:
601         (WebCore::isKeypadEvent): Added.
602         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent): Also fixed a mistake with autorepeat.
603
604 2007-12-12  Oliver Hunt  <oliver@apple.com>
605
606         Reviewed by Maciej.
607
608         <rdar://problem/5071781> window.mouseout events are not sent 
609         to window when mouse moves out of window 
610
611         Make PlatformMouseEvent recognise WM_MOUSELEAVE.
612
613         * platform/win/PlatformMouseEventWin.cpp:
614         (WebCore::messageToEventType):
615         (WebCore::PlatformMouseEvent::PlatformMouseEvent):
616
617 2007-12-12  Sam Weinig  <sam@webkit.org>
618
619         Fix Mac release build.
620
621         * WebCore.base.exp:
622
623 2007-12-12  Sam Weinig  <sam@webkit.org>
624
625         Build fix for Qt, Gtk, and Wx.
626
627         * css/CSSParser.cpp:
628         (WebCore::CSSParser::parseValue):
629         * loader/win/FrameLoaderWin.cpp:
630         (WebCore::FrameLoader::urlSelected):
631         * platform/network/curl/ResourceHandleManager.cpp:
632         (WebCore::parseDataUrl):
633         (WebCore::ResourceHandleManager::startJob):
634         * platform/network/win/CookieJarWin.cpp:
635         (WebCore::setCookies):
636         (WebCore::cookies):
637         * platform/network/win/ResourceHandleWin.cpp:
638         (WebCore::ResourceHandle::start):
639         * platform/qt/PasteboardQt.cpp:
640         (WebCore::Pasteboard::writeURL):
641
642 2007-12-11  Dan Bernstein  <mitz@apple.com>
643
644         Reviewed by Maciej Stachowiak.
645
646         - allow non-integer font sizes on Windows for small caps
647
648         * platform/graphics/win/FontDataWin.cpp:
649         (WebCore::FontData::smallCapsFontData):
650         * platform/graphics/win/FontPlatformData.h:
651         (WebCore::FontPlatformData::size):
652         (WebCore::FontPlatformData::setSize):
653         * platform/graphics/win/FontPlatformDataWin.cpp:
654         (WebCore::FontPlatformData::FontPlatformData):
655
656 2007-12-11  Sam Weinig  <sam@webkit.org>
657
658         Build fix for Qt, Gtk, and Wx.
659
660         * platform/gtk/CookieJarGtk.cpp:
661         (WebCore::setCookies):
662         (WebCore::cookies):
663         * platform/qt/ClipboardQt.cpp:
664         (WebCore::ClipboardQt::writeURL):
665         * platform/qt/CookieJarQt.cpp:
666         (WebCore::setCookies):
667         (WebCore::cookies):
668         * platform/wx/PasteboardWx.cpp:
669         (WebCore::Pasteboard::writeURL):
670
671 2007-12-11  Sam Weinig  <sam@webkit.org>
672
673         Reviewed by Darin Adler.
674
675         Scrub URL out of the tree in preparation for renaming KURL to URL.
676             - Renames Document::URL() -> Document::url()
677             - Renames DocumentLoader::URL() -> DocumentLoader::url()
678             - Renames KURL::url() to KURL::string() and KURL::deprecatedString()
679             - Remove FrameLoader::URL()
680             - Various variable renames.
681
682         The change from Document::URL() to Document::url() required changes
683         to the bindings scripts as well, because URL() is the name of a DOM
684         method.  The code generation scripts now have code to special case URL()
685         to url().
686
687         * WebCore.base.exp:
688         * bindings/js/kjs_events.cpp:
689         (WebCore::JSLazyEventListener::parseCode):
690         * bindings/js/kjs_navigator.cpp:
691         (KJS::Navigator::getValueProperty):
692         * bindings/js/kjs_proxy.cpp:
693         (WebCore::KJSProxy::initScript):
694         * bindings/js/kjs_window.cpp:
695         (KJS::Window::put):
696         (KJS::Window::allowsAccessFrom):
697         (KJS::Location::put):
698         (KJS::LocationProtoFuncReplace::callAsFunction):
699         (KJS::LocationProtoFuncReload::callAsFunction):
700         (KJS::LocationProtoFuncAssign::callAsFunction):
701         * bindings/scripts/CodeGenerator.pm:
702         * bindings/scripts/CodeGeneratorCOM.pm:
703         * bindings/scripts/CodeGeneratorJS.pm:
704         * bindings/scripts/CodeGeneratorObjC.pm:
705         * css/CSSImportRule.cpp:
706         (WebCore::CSSImportRule::insertedIntoParent):
707         * css/CSSParser.cpp:
708         (WebCore::CSSParser::parseValue):
709         (WebCore::CSSParser::parseContent):
710         (WebCore::CSSParser::parseBackgroundImage):
711         (WebCore::CSSParser::parseFontFaceSrc):
712         (WebCore::CSSParser::parseBorderImage):
713         (WebCore::CSSParser::createImportRule):
714         * css/CSSStyleSelector.cpp:
715         (WebCore::CSSStyleSelector::setEncodedURL):
716         * dom/Document.cpp:
717         (WebCore::Document::processHttpEquiv):
718         (WebCore::Document::cookie):
719         (WebCore::Document::setCookie):
720         (WebCore::Document::domain):
721         (WebCore::Document::setDomain):
722         (WebCore::Document::getImageMap):
723         (WebCore::Document::completeURL):
724         * dom/Document.h:
725         (WebCore::Document::url):
726         (WebCore::Document::baseURL):
727         * dom/Element.cpp:
728         (WebCore::Element::baseURI):
729         * dom/ProcessingInstruction.h:
730         * dom/StyledElement.cpp:
731         (WebCore::StyledElement::addCSSImageProperty):
732         * dom/StyledElement.h:
733         * dom/XMLTokenizer.cpp:
734         (WebCore::XMLTokenizer::endElementNs):
735         (WebCore::XMLTokenizer::end):
736         (WebCore::):
737         * dom/XMLTokenizer.h:
738         * editing/Editor.cpp:
739         (WebCore::Editor::copy):
740         * editing/markup.cpp:
741         (WebCore::completeURLs):
742         * history/CachedPage.h:
743         (WebCore::CachedPage::url):
744         * history/HistoryItem.cpp:
745         (WebCore::HistoryItem::HistoryItem):
746         (WebCore::HistoryItem::setURL):
747         (WebCore::HistoryItem::isCurrentDocument):
748         * html/HTMLBaseElement.cpp:
749         (WebCore::HTMLBaseElement::process):
750         * html/HTMLParser.cpp:
751         (WebCore::HTMLParser::reportErrorToConsole):
752         * html/HTMLScriptElement.cpp:
753         (WebCore::HTMLScriptElement::childrenChanged):
754         (WebCore::HTMLScriptElement::insertedIntoDocument):
755         (WebCore::HTMLScriptElement::evaluateScript):
756         * html/HTMLScriptElement.h:
757         * html/HTMLTokenizer.cpp:
758         (WebCore::HTMLTokenizer::scriptExecution):
759         * loader/Cache.cpp:
760         (WebCore::createResource):
761         (WebCore::Cache::requestResource):
762         * loader/CachedCSSStyleSheet.cpp:
763         (WebCore::CachedCSSStyleSheet::checkNotify):
764         * loader/CachedResource.cpp:
765         (WebCore::CachedResource::CachedResource):
766         * loader/CachedResource.h:
767         (WebCore::CachedResource::):
768         * loader/CachedScript.h:
769         * loader/DocLoader.cpp:
770         (WebCore::DocLoader::checkForReload):
771         (WebCore::DocLoader::requestResource):
772         * loader/DocumentLoader.cpp:
773         (WebCore::DocumentLoader::url):
774         (WebCore::DocumentLoader::replaceRequestURLForAnchorScroll):
775         (WebCore::DocumentLoader::setRequest):
776         (WebCore::DocumentLoader::startLoadingMainResource):
777         * loader/DocumentLoader.h:
778         * loader/FrameLoader.cpp:
779         (WebCore::FormSubmission::FormSubmission):
780         (WebCore::ScheduledRedirection::ScheduledRedirection):
781         (WebCore::FrameLoader::changeLocation):
782         (WebCore::FrameLoader::urlSelected):
783         (WebCore::FrameLoader::requestFrame):
784         (WebCore::FrameLoader::loadSubframe):
785         (WebCore::FrameLoader::submitFormAgain):
786         (WebCore::FrameLoader::submitForm):
787         (WebCore::FrameLoader::didExplicitOpen):
788         (WebCore::FrameLoader::replaceContentsWithScriptResult):
789         (WebCore::FrameLoader::executeScript):
790         (WebCore::FrameLoader::receivedFirstData):
791         (WebCore::FrameLoader::begin):
792         (WebCore::FrameLoader::startIconLoader):
793         (WebCore::FrameLoader::commitIconURLToIconDatabase):
794         (WebCore::FrameLoader::scheduleRefresh):
795         (WebCore::FrameLoader::redirectionTimerFired):
796         (WebCore::FrameLoader::loadPlugin):
797         (WebCore::FrameLoader::didNotOpenURL):
798         (WebCore::FrameLoader::updatePolicyBaseURL):
799         (WebCore::FrameLoader::scrollToAnchor):
800         (WebCore::FrameLoader::startRedirectionTimer):
801         (WebCore::FrameLoader::load):
802         (WebCore::FrameLoader::canLoad):
803         (WebCore::FrameLoader::shouldHideReferrer):
804         (WebCore::FrameLoader::shouldAllowNavigation):
805         (WebCore::FrameLoader::commitProvisionalLoad):
806         (WebCore::FrameLoader::clientRedirected):
807         (WebCore::FrameLoader::open):
808         (WebCore::FrameLoader::didTellBridgeAboutLoad):
809         (WebCore::FrameLoader::haveToldBridgeAboutLoad):
810         (WebCore::FrameLoader::post):
811         (WebCore::FrameLoader::loadResourceSynchronously):
812         (WebCore::FrameLoader::continueFragmentScrollAfterNavigationPolicy):
813         (WebCore::FrameLoader::shouldTreatURLAsSameAsCurrent):
814         (WebCore::FrameLoader::createHistoryItem):
815         (WebCore::FrameLoader::addBackForwardItemClippedAtTarget):
816         (WebCore::FrameLoader::loadItem):
817         (WebCore::FrameLoader::urlsMatchItem):
818         (WebCore::FrameLoader::recursiveGoToItem):
819         (WebCore::FrameLoader::updateHistoryForStandardLoad):
820         (WebCore::FrameLoader::updateHistoryForRedirectWithLockedHistory):
821         * loader/FrameLoader.h:
822         (WebCore::FrameLoader::url):
823         * loader/ImageDocument.cpp:
824         (WebCore::ImageDocument::createDocumentStructure):
825         * loader/MainResourceLoader.cpp:
826         (WebCore::shouldLoadAsEmptyDocument):
827         (WebCore::MainResourceLoader::didFinishLoading):
828         * loader/NavigationAction.cpp:
829         (WebCore::NavigationAction::NavigationAction):
830         * loader/NavigationAction.h:
831         (WebCore::NavigationAction::url):
832         * loader/PluginDocument.cpp:
833         (WebCore::PluginTokenizer::createDocumentStructure):
834         * loader/SubresourceLoader.cpp:
835         (WebCore::SubresourceLoader::load):
836         (WebCore::SubresourceLoader::create):
837         * loader/icon/IconLoader.cpp:
838         (WebCore::IconLoader::startLoading):
839         (WebCore::IconLoader::finishLoading):
840         * loader/loader.cpp:
841         (WebCore::Loader::servePendingRequests):
842         * loader/mac/LoaderNSURLExtras.m:
843         (urlOriginalData):
844         * page/Chrome.cpp:
845         (WebCore::Chrome::setToolTip):
846         * page/ContextMenuController.cpp:
847         (WebCore::ContextMenuController::contextMenuItemSelected):
848         * page/Frame.cpp:
849         (WebCore::Frame::setUserStyleSheetLocation):
850         * page/InspectorController.cpp:
851         (WebCore::InspectorResource::type):
852         (WebCore::addSourceToFrame):
853         (WebCore::InspectorController::addScriptResource):
854         (WebCore::InspectorController::updateScriptResourceRequest):
855         (WebCore::InspectorController::didCommitLoad):
856         * page/mac/WebCoreFrameBridge.mm:
857         (-[WebCoreFrameBridge getData:andResponse:forURL:]):
858         * platform/KURL.h:
859         (WebCore::KURL::string):
860         (WebCore::KURL::deprecatedString):
861         * platform/mac/ClipboardMac.mm:
862         (WebCore::ClipboardMac::getData):
863         * platform/mac/CookieJar.mm:
864         (WebCore::cookies):
865         (WebCore::setCookies):
866         * platform/mac/PasteboardMac.mm:
867         (WebCore::Pasteboard::writeURL):
868         (WebCore::fileWrapperForImage):
869         (WebCore::Pasteboard::writeImage):
870         (WebCore::Pasteboard::plainText):
871         * platform/network/ResourceHandle.cpp:
872         (WebCore::ResourceHandle::portAllowed):
873         * platform/network/ResourceRequestBase.cpp:
874         (WebCore::ResourceRequestBase::isNull):
875         * platform/network/cf/ResourceHandleCFNet.cpp:
876         (WebCore::willSendRequest):
877         (WebCore::didReceiveResponse):
878         (WebCore::didReceiveData):
879         (WebCore::didFinishLoading):
880         (WebCore::didFail):
881         (WebCore::didReceiveChallenge):
882         (WebCore::ResourceHandleInternal::~ResourceHandleInternal):
883         (WebCore::ResourceHandle::~ResourceHandle):
884         (WebCore::ResourceHandle::start):
885         * platform/win/ClipboardUtilitiesWin.cpp:
886         (WebCore::createGlobalData):
887         (WebCore::urlToMarkup):
888         * platform/win/ClipboardWin.cpp:
889         (WebCore::writeURL):
890         (WebCore::writeImageToDataObject):
891         (WebCore::ClipboardWin::writeURL):
892         (WebCore::ClipboardWin::writeRange):
893         * platform/win/PasteboardWin.cpp:
894         (WebCore::Pasteboard::writeSelection):
895         (WebCore::Pasteboard::writeURL):
896         * plugins/win/PluginDatabaseWin.cpp:
897         (WebCore::PluginDatabaseWin::findPlugin):
898         * plugins/win/PluginStreamWin.cpp:
899         (WebCore::PluginStreamWin::startStream):
900         (WebCore::PluginStreamWin::destroyStream):
901         * plugins/win/PluginViewWin.cpp:
902         (WebCore::scriptStringIfJavaScriptURL):
903         (WebCore::PluginViewWin::performRequest):
904         * svg/SVGImageLoader.cpp:
905         (WebCore::SVGImageLoader::updateFromElement):
906         * xml/XMLHttpRequest.cpp:
907         (WebCore::XMLHttpRequest::getResponseXML):
908         (WebCore::XMLHttpRequest::urlMatchesDocumentDomain):
909         * xml/XSLImportRule.cpp:
910         (WebCore::XSLImportRule::loadSheet):
911         * xml/XSLTProcessor.cpp:
912         (WebCore::XSLTProcessor::createDocumentFromSource):
913         (WebCore::xsltStylesheetPointer):
914         (WebCore::xmlDocPtrFromNode):
915
916 2007-12-11  Beth Dakin  <bdakin@apple.com>
917
918         Reviewed by Darin.
919
920         Fix for <rdar://problem/5641255> SVGs with width and height 100% 
921         fail to render when used as background images
922
923         CachedImage now has a setImageContainerSize function. It is only 
924         needed for SVG right now.
925         * loader/CachedImage.cpp:
926         (WebCore::CachedImage::setImageContainerSize):
927         * loader/CachedImage.h:
928
929         Relatively sized SVGs have no intrinsic size. Because this call is 
930         low-level enough that we cannot pass in the container size and get 
931         the real size of the SVG, we need to know if it has relative 
932         dimensions, and if so, we need to get the size from scaledTileSize.
933         * platform/graphics/Image.cpp:
934         (WebCore::Image::drawTiled):
935         * platform/graphics/Image.h:
936         (WebCore::Image::setContainerSize):
937         (WebCore::Image::hasRelativeWidth):
938         (WebCore::Image::hasRelativeHeight):
939
940         Re-factored calculateBackgroundSize a bit so that it returns an 
941         IntSize. Made it a member function so that it can send m_width and 
942         m_height along to setImageContainerSize.
943         * rendering/RenderBox.cpp:
944         (WebCore::RenderBox::calculateBackgroundSize):
945         (WebCore::RenderBox::calculateBackgroundImageGeometry):
946         * rendering/RenderBox.h:
947
948         Need to account for relatively sized SVGs in calcViewport()
949         * rendering/RenderSVGRoot.cpp:
950         (WebCore::RenderSVGRoot::calcViewport):
951         
952         Added new member variables to store the size of the SVG container. 
953         relativeWidthValue() and relativeHeightValue() use the stored SVG 
954         container size to correctly calculate the width and height of a 
955         relatively sized SVG.
956         * svg/SVGSVGElement.cpp:
957         (WebCore::SVGSVGElement::SVGSVGElement):
958         (WebCore::SVGSVGElement::setContainerSize):
959         (WebCore::SVGSVGElement::relativeWidthValue):
960         (WebCore::SVGSVGElement::relativeHeightValue):
961         * svg/SVGSVGElement.h:
962         (WebCore::SVGSVGElement::containerSize):
963         
964         Re-factored size calculations to use the size of the container.
965         * svg/graphics/SVGImage.cpp:
966         (WebCore::SVGImage::setContainerSize):
967         (WebCore::SVGImage::size):
968         (WebCore::SVGImage::hasRelativeWidth):
969         (WebCore::SVGImage::hasRelativeHeight):
970         * svg/graphics/SVGImage.h:
971
972 2007-12-11  Darin Adler  <darin@apple.com>
973
974         * editing/Editor.cpp:
975         (WebCore::Editor::yankFromKillRing): Try to fix non-Mac builds by adding
976         a missing return statement.
977
978 2007-12-11  Darin Adler  <darin@apple.com>
979
980         Reviewed by Geoff.
981
982         - exposed many new commands to the DOM Document executeCommand function by
983           merging the JSEditor and Editor executeCommand implementations
984         - replaced the execCommand function with a EditorCommand class
985         - replaced the WTF::StrHash<> class template with the WebCore::StringHash class
986         - replaced the WTF::CaseInsensitiveHash<> class template with the
987           WebCore::CaseFoldingHash class
988
989         * WebCore.base.exp: Updated.
990         * WebCore.pro: Added EditorCommand.cpp, removed JSEditor.cpp.
991         * WebCore.vcproj/WebCore.vcproj: Ditto.
992         * WebCore.xcodeproj/project.pbxproj: Ditto.
993         * WebCoreSources.bkl: Ditto.
994
995         * dom/Document.cpp:
996         (WebCore::Document::Document): Removed code to set up m_jsEditor.
997         (WebCore::Document::~Document): Removed code to delete m_jsEditor.
998         (WebCore::command): Added. Helper function that gets an Editor::Command.
999         (WebCore::Document::executeCommand): Changed to use Editor::Command instead of
1000         JSEditor.
1001         (WebCore::Document::queryCommandEnabled): Ditto.
1002         (WebCore::Document::queryCommandIndeterm):
1003         (WebCore::Document::queryCommandState): Ditto.
1004         (WebCore::Document::queryCommandSupported): Ditto.
1005         (WebCore::Document::queryCommandValue): Ditto.
1006
1007         * dom/Document.h: Removed JSEditor, jsEditor, m_jsEditor. Changed to
1008         use CaseFoldingHash.
1009
1010         * editing/Editor.cpp:
1011         (WebCore::Editor::selectionForCommand): Renamed from selectionForEvent and
1012         made into a member function so it is accessible from the new EditorCommand.cpp file.
1013         Also changed to get the selection from the passed-in frame instead of from the
1014         page, because this should work on the targeted frame unless the event overrides it.
1015         (WebCore::Editor::handleKeypress): Updated for selectionForCommand change.
1016         (WebCore::Editor::handleInputMethodKeypress): Ditto.
1017         (WebCore::imageElementFromImageDocument): Renamed and changed to return
1018         a HTMLImageElement instead of a Node*.
1019         (WebCore::Editor::canCopy): Updated for name change.
1020         (WebCore::Editor::selectionUnorderedListState): Updated for TriState change.
1021         (WebCore::Editor::selectionOrderedListState): Ditto.
1022         (WebCore::Editor::selectionStartHasStyle): Make type of local more specific.
1023         (WebCore::updateState): Moved here from Frame.
1024         (WebCore::Editor::selectionHasStyle): Ditto.
1025         (WebCore::Editor::Editor): Initialize m_shouldStartNewKillRingSequence.
1026         (WebCore::Editor::insertTextWithoutSendingTextEvent): Updated for
1027         selectionForCommand change.
1028         (WebCore::Editor::copy): Updated for imageElementFromImageDocument change.
1029         (WebCore::Editor::toggleBold): Call the ToggleBold command via the command
1030         machinery since it's no longer in this file as a local function.
1031         (WebCore::Editor::toggleUnderline): Call the ToggleUnderline command.
1032         (WebCore::Editor::setBaseWritingDirection): Change type of argument and of
1033         local variable.
1034         (WebCore::Editor::addToKillRing): Moved here from EditorMac. Not useful
1035         without a kill ring, but it's relatively straightforward to implement one.
1036         (WebCore::Editor::appendToKillRing): Put default implementation here for
1037         platforms other than Mac. We should probably put a simple kill ring
1038         implementation here -- doesn't need to be shared with the OS oh platforms
1039         other than Mac.
1040         (WebCore::Editor::prependToKillRing): Ditto.
1041         (WebCore::Editor::yankFromKillRing): Ditto.
1042         (WebCore::Editor::startNewKillRingSequence): Ditto.
1043         (WebCore::Editor::setKillRingToYankedState): Ditto.
1044
1045         * editing/Editor.h: Moved the TriState enum here instead of inside the
1046         Frame class. Added EditorCommandSource enum. Moved selectionHasStyle
1047         here from the Frame class. Added Editor::Command class with five functions
1048         for the various things you can do with a command (execute it, check if it
1049         can be used, and its state and value). Changed hte parameter of
1050         setBaseWritingDirection to be a const String& rather than a String.
1051         Got rid of the kill-ring-related operations, but added the kill ring
1052         functions themselves. Made selectedRange() public. Made the
1053         m_startNewKillRingSequence not Mac-specific and added "should" to its
1054         name.
1055
1056         * editing/EditorCommand.cpp: Copied from WebCore/editing/Editor.cpp.
1057         Retained only the editing commands.
1058         (WebCore::targetFrame): Moved to the top of the file.
1059         (WebCore::executeApplyStyle): Added. Helper function for commands
1060         that need to apply styles.
1061         (WebCore::executeToggleStyle): Added. Helper function for commands
1062         that need to toggle styles based on the style of the start of selection.
1063         (WebCore::executeApplyParagraphStyle): Added. Like executeApplyStyle, but
1064         for paragraph styles.
1065         (WebCore::executeInsertFragment): Added. Helper function for commands
1066         that need to insert a DOM fragment.
1067         (WebCore::executeInsertNode): Added. Helper function for commands that
1068         need to insert a tree rooted in a single DOM node.
1069         (WebCore::stateStyle): Added. Helper function for the state of commands
1070         that represent style.
1071         (WebCore::valueStyle): Added. Helper function for the value of commands
1072         that represent style.
1073         (WebCore::canScroll): Added. Helper functions for some move and scroll
1074         commands that need to determine if the renderer they are in can scroll.
1075         (WebCore::unionDOMRanges): Moved here from EditorMac.
1076         (WebCore::executeBackColor):
1077         (WebCore::executeBackwardDelete):
1078         (WebCore::executeCopy):
1079         (WebCore::executeCreateLink):
1080         (WebCore::executeCut):
1081         (WebCore::executeDelete):
1082         (WebCore::executeDeleteToMark):
1083         (WebCore::executeDeleteWordBackward):
1084         (WebCore::executeDeleteWordForward):
1085         (WebCore::executeFindString):
1086         (WebCore::executeFontName):
1087         (WebCore::executeFontSize):
1088         (WebCore::executeFontSizeDelta):
1089         (WebCore::executeForeColor):
1090         (WebCore::executeFormatBlock):
1091         (WebCore::executeForwardDelete):
1092         (WebCore::executeIndent):
1093         (WebCore::executeInsertBacktab):
1094         (WebCore::executeInsertHorizontalRule):
1095         (WebCore::executeInsertHTML):
1096         (WebCore::executeInsertImage):
1097         (WebCore::executeInsertLineBreak):
1098         (WebCore::executeInsertNewline):
1099         (WebCore::executeInsertNewlineInQuotedContent):
1100         (WebCore::executeInsertOrderedList):
1101         (WebCore::executeInsertParagraph):
1102         (WebCore::executeInsertTab):
1103         (WebCore::executeInsertText):
1104         (WebCore::executeInsertUnorderedList):
1105         (WebCore::executeJustifyCenter):
1106         (WebCore::executeJustifyFull):
1107         (WebCore::executeJustifyLeft):
1108         (WebCore::executeJustifyRight):
1109         (WebCore::executeMoveBackward):
1110         (WebCore::executeMoveBackwardAndModifySelection):
1111         (WebCore::executeMoveDown):
1112         (WebCore::executeMoveDownAndModifySelection):
1113         (WebCore::executeMoveDownByPageAndModifyCaret):
1114         (WebCore::executeMoveForward):
1115         (WebCore::executeMoveForwardAndModifySelection):
1116         (WebCore::executeMoveLeft):
1117         (WebCore::executeMoveLeftAndModifySelection):
1118         (WebCore::executeMoveRight):
1119         (WebCore::executeMoveRightAndModifySelection):
1120         (WebCore::executeMoveToBeginningOfDocument):
1121         (WebCore::executeMoveToBeginningOfDocumentAndModifySelection):
1122         (WebCore::executeMoveToBeginningOfLine):
1123         (WebCore::executeMoveToBeginningOfLineAndModifySelection):
1124         (WebCore::executeMoveToBeginningOfParagraph):
1125         (WebCore::executeMoveToBeginningOfParagraphAndModifySelection):
1126         (WebCore::executeMoveToBeginningOfSentence):
1127         (WebCore::executeMoveToBeginningOfSentenceAndModifySelection):
1128         (WebCore::executeMoveToEndOfDocument):
1129         (WebCore::executeMoveToEndOfDocumentAndModifySelection):
1130         (WebCore::executeMoveToEndOfSentence):
1131         (WebCore::executeMoveToEndOfSentenceAndModifySelection):
1132         (WebCore::executeMoveToEndOfLine):
1133         (WebCore::executeMoveToEndOfLineAndModifySelection):
1134         (WebCore::executeMoveToEndOfParagraph):
1135         (WebCore::executeMoveToEndOfParagraphAndModifySelection):
1136         (WebCore::executeMoveParagraphBackwardAndModifySelection):
1137         (WebCore::executeMoveParagraphForwardAndModifySelection):
1138         (WebCore::executeMoveUp):
1139         (WebCore::executeMoveUpAndModifySelection):
1140         (WebCore::executeMoveUpByPageAndModifyCaret):
1141         (WebCore::executeMoveWordBackward):
1142         (WebCore::executeMoveWordBackwardAndModifySelection):
1143         (WebCore::executeMoveWordForward):
1144         (WebCore::executeMoveWordForwardAndModifySelection):
1145         (WebCore::executeMoveWordLeft):
1146         (WebCore::executeMoveWordLeftAndModifySelection):
1147         (WebCore::executeMoveWordRight):
1148         (WebCore::executeMoveWordRightAndModifySelection):
1149         (WebCore::executeOutdent):
1150         (WebCore::executePaste):
1151         (WebCore::executePasteAndMatchStyle):
1152         (WebCore::executePrint):
1153         (WebCore::executeRedo):
1154         (WebCore::executeRemoveFormat):
1155         (WebCore::executeSelectAll):
1156         (WebCore::executeSelectToMark):
1157         (WebCore::executeSetMark):
1158         (WebCore::executeStrikethrough):
1159         (WebCore::executeSubscript):
1160         (WebCore::executeSuperscript):
1161         (WebCore::executeSwapWithMark):
1162         (WebCore::executeToggleBold):
1163         (WebCore::executeToggleItalic):
1164         (WebCore::executeTranspose):
1165         (WebCore::executeUnderline):
1166         (WebCore::executeUndo):
1167         (WebCore::executeUnlink):
1168         (WebCore::executeUnscript):
1169         (WebCore::executeUnselect):
1170         (WebCore::executeYank):
1171         (WebCore::executeYankAndSelect):
1172         (WebCore::supported):
1173         (WebCore::supportedPaste):
1174         (WebCore::enabled):
1175         (WebCore::enabledAnySelection):
1176         (WebCore::enabledAnySelectionAndMark):
1177         (WebCore::enableCaretInEditableText):
1178         (WebCore::enabledCopy):
1179         (WebCore::enabledCut):
1180         (WebCore::enabledInEditableText):
1181         (WebCore::enabledInRichlyEditableText):
1182         (WebCore::enabledPaste):
1183         (WebCore::enabledRangeInEditableText):
1184         (WebCore::enabledRangeInRichlyEditableText):
1185         (WebCore::enabledRedo):
1186         (WebCore::enabledUndo):
1187         (WebCore::stateNone):
1188         (WebCore::stateBold):
1189         (WebCore::stateItalic):
1190         (WebCore::stateOrderedList):
1191         (WebCore::stateStrikethrough):
1192         (WebCore::stateSubscript):
1193         (WebCore::stateSuperscript):
1194         (WebCore::stateUnderline):
1195         (WebCore::stateUnorderedList):
1196         (WebCore::valueNull):
1197         (WebCore::valueBackColor):
1198         (WebCore::valueFontName):
1199         (WebCore::valueFontSize):
1200         (WebCore::valueFontSizeDelta):
1201         (WebCore::valueForeColor):
1202         (WebCore::createCommandMap): Added lots of commands, including all the commands
1203         from JSEditor. A few commands needed different behavior based on whether they are
1204         invoked from the DOM or a keyboard binding.
1205         (WebCore::Editor::command): Added. Gets a command object given a name.
1206         (WebCore::Editor::Command::Command): Added.
1207         (WebCore::Editor::Command::execute): Added.
1208         (WebCore::Editor::Command::isSupported): Added.
1209         (WebCore::Editor::Command::isEnabled): Added.
1210         (WebCore::Editor::Command::state): Added.
1211         (WebCore::Editor::Command::value): Added.
1212         (WebCore::Editor::execCommand): Changed to call command().execute().
1213
1214         * editing/JSEditor.cpp: Removed.
1215         * editing/JSEditor.h: Removed.
1216
1217         * editing/mac/EditorMac.mm: Changed to provide kill ring primitives intead of
1218         kill ring commands, so the kill ring commands can be cross-platform.
1219         (WebCore::Editor::appendToKillRing): Added.
1220         (WebCore::Editor::prependToKillRing): Added.
1221         (WebCore::Editor::yankFromKillRing): Added.
1222         (WebCore::Editor::startNewKillRingSequence): Added.
1223         (WebCore::Editor::setKillRingToYankedState): Added.
1224
1225         * page/Frame.cpp: Removed selectionHasStyle, TriState, and updateState.
1226         * page/Frame.h: Ditto.
1227
1228         * page/mac/WebCoreFrameBridge.mm: Removed selectionHasStyle.
1229         * page/mac/WebCoreFrameBridge.h: Ditto.
1230
1231         * platform/ContextMenu.cpp:
1232         (WebCore::ContextMenu::checkOrEnableIfNeeded): Updated for TriState change.
1233
1234         * platform/text/StringHash.h:
1235         (WebCore::StringHash::hash): Merged the StrHash<> template classes into this.
1236         (WebCore::StringHash::equal): Ditto.
1237         (WebCore::CaseFoldingHash::hash): Merged the CaseInsensitiveHash<> template
1238         classes into this.
1239         (WebCore::CaseFoldingHash::equal): Ditto.
1240
1241         * platform/text/StringImpl.cpp:
1242         (WebCore::equal): Changed to invoke StringHash.
1243         (WebCore::equalIgnoringCase): Changed to invoke CaseFoldingHash.
1244
1245         * dom/DOMImplementation.cpp:
1246         (WebCore::addString): Updated to use StringHash and CaseFoldingHash.
1247         (WebCore::isSVG10Feature): Ditto.
1248         (WebCore::isSVG11Feature): Ditto.
1249         * loader/FrameLoader.cpp:
1250         (WebCore::localSchemes): Ditto.
1251         * platform/graphics/FontCache.cpp:
1252         (WebCore::computeHash): Ditto.
1253         * platform/network/HTTPHeaderMap.h: Ditto.
1254         * platform/text/PlatformString.h: Ditto.
1255         * platform/text/StringImpl.h: Ditto.
1256         * rendering/RenderPartObject.cpp:
1257         (WebCore::RenderPartObject::updateWidget): Ditto.
1258         * xml/XMLHttpRequest.cpp:
1259         (WebCore::canSetRequestHeader): Ditto.
1260
1261         * rendering/RenderTreeAsText.cpp: Removed stray include of JSEditor.h.
1262
1263 2007-12-11  Darin Adler  <darin@apple.com>
1264
1265         * platform/wx/KeyboardEventWx.cpp:
1266         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent): Another try at fixing the
1267         WX build. Changes the code around a little bit.
1268
1269 2007-12-11  Darin Adler  <darin@apple.com>
1270
1271         * platform/wx/KeyboardEventWx.cpp:
1272         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent): Quick try at fixing build.
1273
1274 2007-12-11  Dan Bernstein  <mitz@apple.com>
1275
1276         Reviewed by Darin Adler.
1277
1278         - fix <rdar://problem/5631507> Text doesn't wrap properly at Tamil version of Wikipedia
1279
1280         Test: fast/text/international/complex-character-based-fallback.html
1281
1282         * platform/graphics/Font.cpp:
1283         (WebCore::Font::glyphDataForCharacter): Added a forceSmallCaps argument
1284         that forces this function to use the small caps font. It is used for
1285         combining marks that need to combine with a small cap.
1286         * platform/graphics/Font.h:
1287         * platform/win/UniscribeController.cpp:
1288         (WebCore::UniscribeController::advance): Changed to split the string
1289         into runs of characters that will be rendered using the same FontData.
1290         This is done by calling glyphDataForCharacter() for each cahracter to
1291         find the FontData it should be rendered with.
1292         (WebCore::UniscribeController::itemizeShapeAndPlace): Added a fontData
1293         argument that is passed on to shapeAndPlaceItem() instead of the
1294         smallCaps argument.
1295         (WebCore::UniscribeController::shapeAndPlaceItem): Added a fontData
1296         argument and removed the font fallback logic from this function, as
1297         it is now expected to be called with an item all of whose characters
1298         can be rendered with the given fontData.
1299         * platform/win/UniscribeController.h:
1300
1301 2007-12-07  Alexey Proskuryakov  <ap@webkit.org>
1302
1303         Reviewed by Darin.
1304
1305         <rdar://problem/5535636>
1306         Have to press 4 times instead of 2 times to get the expected result of ^^ with german keyboard.
1307
1308         http://bugs.webkit.org/show_bug.cgi?id=13916
1309         JavaScript detects Tab as a character input on a textfield validation
1310
1311         Test: platform/win/fast/events/double-dead-char.html
1312
1313         * platform/PlatformKeyboardEvent.h:
1314         (WebCore::PlatformKeyboardEvent::):
1315         (WebCore::PlatformKeyboardEvent::type):
1316         (WebCore::PlatformKeyboardEvent::windowsVirtualKeyCode):
1317         (WebCore::PlatformKeyboardEvent::setWindowsVirtualKeyCode):
1318         (WebCore::PlatformKeyboardEvent::keyIdentifier):
1319         (WebCore::PlatformKeyboardEvent::setIsAutoRepeat):
1320         Added an explicit type member to differentiate different kinds of events:
1321           RawKeyDown == keydown == WM_KEYDOWN
1322           KeyUp == keyup == WM_KEYUP
1323           Char == keypress == WM_CHAR
1324           KeyDown == e.g. NSKeyDown or NSFlagsChanged, used on platforms that have a different model for
1325           event processing, and needs to be converted to RawKeyDown (+ Char) for processing in DOM.
1326
1327         * platform/mac/KeyEventMac.mm:
1328         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent): Updated for changed data members.
1329         Fix Enter (numeric keypad) charCode to match Return, as we check for it from keypress default handlers.
1330         (WebCore::windowsKeyCodeForKeyEvent): 
1331         (WebCore::isKeyUpEvent): Made it do something closer to what it claims; added a FIXME explaining
1332         that it still fails.
1333         (WebCore::disambiguateKeyDownEvent): Downgrade from KeyDown to RawKeyDown or Char, removing information that
1334         should not be available in those (because it cannot be provided on Windows).
1335
1336         * platform/win/KeyEventWin.cpp:
1337         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent): Updated for changed data members.
1338         Used standard Windows constants for bit masks instead of our own ones.
1339         (WebCore::PlatformKeyboardEvent::disambiguateKeyDownEvent): Should never be called on Windows.
1340
1341         * platform/gtk/KeyEventGtk.cpp:
1342         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
1343         (WebCore::PlatformKeyboardEvent::disambiguateKeyDownEvent):
1344         * platform/qt/PlatformKeyboardEventQt.cpp:
1345         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
1346         (WebCore::PlatformKeyboardEvent::disambiguateKeyDownEvent):
1347         * platform/wx/KeyboardEventWx.cpp:
1348         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
1349         (WebCore::PlatformKeyboardEvent::disambiguateKeyDownEvent):
1350         Updated for cross-platform changes as much as it was possible without appropriate build
1351         environments.
1352
1353         * WebCore.base.exp: Export PlatformKeyboardEvent::disambiguateKeyDownEvent(), used by platforms that need to
1354         convert their fancy key events to RawKeyDown/Char pairs. Export Editor::isTextInsertionCommand().
1355
1356         * bridge/EditorClient.h:
1357         Renamed handleKeypress() to handleKeyboardEvent(), as it gets both keydowns and keypresses.
1358         Renamed handleInputMethodKeypress() to handleInputMethodKeydown(), as IMs work with raw keydowns.
1359
1360         * dom/Document.h:
1361         * dom/Document.cpp:
1362         (WebCore::Document::defaultEventHandler): Moved accesskey processing to EventHandler.
1363
1364         * dom/KeyboardEvent.h: Added comments describing keyCode/charCode behavior.
1365
1366         * dom/KeyboardEvent.cpp:
1367         (WebCore::eventTypeForKeyboardEventType):
1368         (WebCore::KeyboardEvent::KeyboardEvent): Conversion between platform and DOM event types is
1369         now straightforward, so scary hacks such as using autorepeat to distinguish types are
1370         not needed.
1371         (WebCore::KeyboardEvent::keyCode): Added a comment describing other browsers' behavior.
1372         (WebCore::KeyboardEvent::charCode): Added a comment describing other browsers' behavior.
1373         Changed to a more compatible behavior: raw keydown/keyup events do not and can not have
1374         character codes.
1375
1376         * editing/Editor.h:
1377         * editing/Editor.cpp:
1378         (WebCore::Editor::isTextInsertionCommand): Is this command actually text input in disguise?
1379         (WebCore::Editor::handleKeyboardEvent): Updated for new function names.
1380         (WebCore::Editor::handleInputMethodKeydown): Ditto.
1381
1382         * html/HTMLButtonElement.cpp:
1383         (WebCore::HTMLButtonElement::defaultEventHandler): Perform the default action when handling an
1384         appropriate event. Enter is processed on keypress (and thus should be checked for via charCode,
1385         not keyIdentifier), Space is processed on keydown+keyup! We now match IE in that a button is
1386         highlighted when Space is pressed.
1387
1388         * html/HTMLInputElement.cpp:
1389         (WebCore::HTMLInputElement::defaultEventHandler):
1390         * html/HTMLSelectElement.cpp:
1391         (WebCore::HTMLSelectElement::menuListDefaultEventHandler):
1392         (WebCore::HTMLSelectElement::listBoxDefaultEventHandler):
1393         Made a number of fixes to when default actions take place, similar to HTMLButtonElement ones
1394         described above.
1395
1396         * page/EventHandler.cpp:
1397         (WebCore::EventHandler::keyEvent): Unless we have a combined KeyDown, just forward the event
1398         to the target. Call accesskey handling directly, as it doesn't seem to be part of normal event
1399         handling in IE. Also streamlined the code in KeyDown case, thanks to handleInputMethodKeypress()
1400         now being handleInputMethodKeydown().
1401         (WebCore::EventHandler::handleTextInputEvent): Check that we were not called from keydown.
1402         (WebCore::EventHandler::defaultTextInputEventHandler): Removed a call to defaultTabEventHandler,
1403         as default tab handling happens when processing keydown.
1404         (WebCore::handleAccessKey): Moved from Document, as access keys are processed outside normal
1405         event handling. Fixed accesskey processing to use information that's available in a raw keydown
1406         event.
1407
1408         (WebCore::EventHandler::defaultKeyboardEventHandler): Do not ignore keydown; in particular,
1409         handle tabs during keydown processing.
1410
1411         * page/mac/EventHandlerMac.mm:
1412         (WebCore::EventHandler::currentKeyboardEvent): Disambiguate KeyDown as RawKeyDown, as this is
1413         what callers want.
1414
1415         * platform/text/PlatformString.h:
1416         * platform/text/String.cpp:
1417         (WebCore::String::characterStartingAt):
1418         * platform/text/StringImpl.cpp:
1419         (WebCore::StringImpl::characterStartingAt):
1420         * platform/text/StringImpl.h:
1421         Added a UChar32 accessor.
1422
1423         * svg/graphics/SVGImageEmptyClients.h:
1424         (WebCore::SVGEmptyEditorClient::handleKeyboardEvent):
1425         (WebCore::SVGEmptyEditorClient::handleInputMethodKeydown):
1426         Updated for new function names.
1427
1428 2007-12-11  John Sullivan  <sullivan@apple.com>
1429
1430         Reviewed by Adele
1431
1432         Tiger build fix -- don't call QTMovieView setDelegate: directly because it's not public
1433
1434         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
1435         (WebCore::MediaPlayerPrivate::createQTMovieView):
1436         (WebCore::MediaPlayerPrivate::detachQTMovieView):
1437
1438 2007-12-11  Alexey Proskuryakov  <ap@webkit.org>
1439
1440         Reviewed by Darin.
1441
1442         http://bugs.webkit.org/show_bug.cgi?id=16325
1443         <rdar://problem/5632997> REGRESSION: www.xerox.ru doesn't work
1444
1445         Fix this on Windows, too!
1446
1447         Test: http/tests/misc/empty-cookie.html
1448
1449         * platform/network/win/CookieJarWin.cpp:
1450         (WebCore::setCookies):
1451         (WebCore::cookies):
1452         Same fix as on Mac, translated into CF.
1453
1454         * platform/win/CookieJarWin.cpp: Removed - the real one is in platform/network/win.
1455
1456 2007-12-11  Christian Dywan  <christian@twotoasts.de>
1457
1458         Reviewed by Alp Toker.
1459
1460         http://bugs.webkit.org/show_bug.cgi?id=16371
1461         Implement additional mouse cursors for Gtk
1462
1463         Added cursor bitmaps from Mozilla:
1464         http://lxr.mozilla.org/mozilla1.8/source/widget/src/gtk2/nsGtkCursors.h
1465
1466         * platform/gtk/CursorGtk.cpp:
1467         (WebCore::customCursorNew):
1468         (WebCore::verticalTextCursor):
1469         (WebCore::cellCursor):
1470         (WebCore::contextMenuCursor):
1471         (WebCore::noDropCursor):
1472         (WebCore::copyCursor):
1473         (WebCore::progressCursor):
1474         (WebCore::aliasCursor):
1475         (WebCore::noneCursor):
1476         (WebCore::notAllowedCursor):
1477         (WebCore::zoomInCursor):
1478         (WebCore::zoomOutCursor):
1479         * platform/gtk/CursorGtk.h: Added.
1480
1481 2007-12-10  Oliver Hunt  <oliver@apple.com>
1482
1483         Reviewed by Weinig, Dan, and Alexey.
1484
1485         Fix character set used for dynamically loaded scripts.
1486
1487         Fix for:
1488             <rdar://problem/5333163> Safari can not display the mouse over pop menu on ChinaTimes News site correctly.
1489             <rdar://problem/5530048> [Safari]? :Leopard9A576: The typed CH characters displays as garbage in Sina website after reloading the webpage.
1490             <rdar://problem/5416588> All menus for chinese IBM site have wrong encoding
1491             
1492         Use the same logic to determine the charset for a script loaded dynamically
1493         as we do for a statically loaded script.
1494
1495         * html/HTMLScriptElement.cpp:
1496         (WebCore::HTMLScriptElement::insertedIntoDocument):
1497
1498 2007-12-10  Justin Garcia  <justin.garcia@apple.com>
1499
1500         Reviewed by Oliver Hunt.
1501
1502         <rdar://problem/5482023> GoogleDocs: After FormatBlock in an empty document, certain functions are disabled
1503         
1504         We were trying to insert a block of the requested type before the body element.
1505         
1506         * editing/FormatBlockCommand.cpp:
1507         (WebCore::FormatBlockCommand::doApply): 
1508         Removed unnecessary ()s in the if condition.
1509         Removed "|| !upstreamStart.node()->isDescendantOf(root)" from the if condition, since
1510         a) upstreamStart will never be outside the root editable element, since in that case
1511         there would be no block inside the editable root to Format, and b) if upstreamStart.node() 
1512         *is* the root, then refNode is the root, and we shouldn't insert before the root, we should insert
1513         at [root, 0].
1514         Added comments to explain the use of upstream() in the second if-clause.
1515         Added an early return for case where there is nothing selected, in that case, there is nothing
1516         to move.
1517
1518 2007-12-10  Adele Peterson  <adele@apple.com>
1519
1520         Reviewed and partially fixed by Tim Hatcher.
1521
1522         Remaining part of fix for <rdar://problem/5633400>
1523         Transformed <video> is not clipped correctly until a repaint is forced
1524
1525         Replace the implementation of a QTKit method to avoid repaints from the NSView system associated with the QTMovie
1526         from clobbering the WebCore repaints.
1527
1528         * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::mediaPlayerRepaint): Added.
1529         * html/HTMLMediaElement.h:
1530         * platform/graphics/MediaPlayer.cpp: (WebCore::MediaPlayer::repaint): Added.
1531         * platform/graphics/MediaPlayer.h: (WebCore::MediaPlayerClient::mediaPlayerRepaint): Added.
1532
1533         * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
1534         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
1535         (method_setImplementation): Added for Tiger.
1536
1537         (WebCore::MediaPlayerPrivate::~MediaPlayerPrivate): Call detachQTMovieView, which now does more cleanup.
1538         (WebCore::MediaPlayerPrivate::cancelLoad): ditto.
1539         (WebCore::MediaPlayerPrivate::setVisible): ditto.
1540         (WebCore::MediaPlayerPrivate::detachQTMovieView): Clear the delegate as well as m_qtMovieView pointer.
1541
1542         (WebCore::MediaPlayerPrivate::repaint): Added.  Triggers a repaint on the video renderer.
1543         (-[WebCoreMovieObserver repaint]): ditto.
1544
1545         (WebCore::mainThreadSetNeedsDisplay): Added.
1546          Does a WebCore repaint instead of going through the view repaint system for QTMovieView.
1547         (WebCore::MediaPlayerPrivate::createQTMovieView): Replace the implementation of _mainThreadSetNeedsDisplay.
1548
1549 2007-12-10  Geoffrey Garen  <ggaren@apple.com>
1550
1551         Reviewed by Sam Weinig.
1552
1553         Updated for rename in JavaScriptCore.
1554
1555         * bridge/mac/WebCoreScriptDebugger.mm:
1556         (-[WebCoreScriptCallFrame scopeChain]):
1557         (-[WebCoreScriptCallFrame functionName]):
1558         (-[WebCoreScriptCallFrame evaluateWebScript:]):
1559
1560 2007-12-10  Rodney Dawes  <dobey@wayofthemonkey.com>
1561
1562         Bug 16383: Ambiguous Window Usage in kjs_dom.cpp
1563         <http://bugs.webkit.org/show_bug.cgi?id=16383>
1564
1565         Use KJS::Window not the ambiguous Window
1566
1567         Reviewed by ddkilzer.
1568
1569         * bindings/js/kjs_dom.cpp (checkNodeSecurity):
1570
1571 2007-12-10  Sam Weinig  <sam@webkit.org>
1572
1573         Fix non-mac builds.
1574
1575         * page/WindowFeatures.cpp: #include <wtf/MathExtras.h> for isnan.
1576
1577 2007-12-10  Marvin Decker  <marv.decker@gmail.com>
1578
1579         Reviewed by Darin.
1580
1581         Fix a divide by 0 in the progress tracker.
1582         http://bugs.webkit.org/show_bug.cgi?id=15055
1583
1584         * loader/ProgressTracker.cpp:
1585         (WebCore::ProgressTracker::incrementProgress):
1586
1587 2007-12-09  Sam Weinig  <sam@webkit.org>
1588
1589         Reviewed by Darin.
1590
1591         More cleanup of kjs_window.
1592         - Move WindowFeatures from bridge/ to page/
1593         - Move functions related to WindowFeatures (boolFeature,
1594           floatFeature, setWindowFeature, parseWindowFeatures) into the class.
1595         - Fix up whitespace.
1596
1597         * WebCore.vcproj/WebCore.vcproj:
1598         * WebCore.xcodeproj/project.pbxproj:
1599         * bindings/js/kjs_window.cpp:
1600         (KJS::DOMWindowTimer::~DOMWindowTimer):
1601         (KJS::createWindow):
1602         (KJS::showModalDialog):
1603         (KJS::Window::getOwnPropertySlot):
1604         (KJS::Window::allowsAccessFrom):
1605         (KJS::Window::shouldInterruptScript):
1606         (KJS::WindowProtoFuncAToB::callAsFunction):
1607         (KJS::WindowProtoFuncOpen::callAsFunction):
1608         (KJS::Window::setReturnValueSlot):
1609         (KJS::ScheduledAction::execute):
1610         (KJS::Window::timerFired):
1611         (KJS::Location::Location):
1612         (KJS::Location::getValueProperty):
1613         (KJS::Location::getOwnPropertySlot):
1614         (KJS::Location::put):
1615         (KJS::LocationProtoFuncReplace::callAsFunction): Use better variable names.
1616         (KJS::LocationProtoFuncAssign::callAsFunction): Ditto.
1617         (KJS::LocationProtoFuncToString::callAsFunction): Remove extraneous calls to
1618         allowsAccessFrom, cleanup the function a little.
1619         (KJS::PausedTimeouts::~PausedTimeouts):
1620         * bridge/WindowFeatures.h: Removed.
1621         * page/WindowFeatures.cpp: Added.
1622         (WebCore::isSeparator):
1623         (WebCore::WindowFeatures::WindowFeatures):
1624         (WebCore::WindowFeatures::setWindowFeature):
1625         (WebCore::WindowFeatures::boolFeature):
1626         (WebCore::WindowFeatures::floatFeature):
1627         * page/WindowFeatures.h: Copied from WebCore/bridge/WindowFeatures.h.
1628         (WebCore::WindowFeatures::WindowFeatures):
1629
1630 2007-12-10  Timothy Hatcher  <timothy@apple.com>
1631
1632         Reviewed by Mark Rowe.
1633
1634         <rdar://problem/5639463> Bundle versions on Tiger should be 4523.x not 523.x
1635
1636         * Configurations/Version.xcconfig: Some Tiger versions of Xcode don't set MAC_OS_X_VERSION_MAJOR,
1637           so assume Tiger and use a 4 for the SYSTEM_VERSION_PREFIX.
1638
1639 2007-12-10  Alp Toker  <alp@atoker.com>
1640
1641         Reviewed by Niko.
1642
1643         Cairo implementation of GraphicsContext::setUseAntialiasing().
1644
1645         * platform/graphics/cairo/GraphicsContextCairo.cpp:
1646         (WebCore::GraphicsContext::setUseAntialiasing):
1647
1648 2007-12-10  Rob Buis  <buis@kde.org>
1649
1650         Reviewed by Darin.
1651
1652         http://bugs.webkit.org/show_bug.cgi?id=16182
1653         SVG should disable antialiasing for shape-rendering="crispEdges"
1654
1655         Turn off anti-aliasing of shapes when shape-rendering="crispEdges".
1656
1657         * platform/graphics/GraphicsContext.h:
1658         * platform/graphics/cairo/GraphicsContextCairo.cpp:
1659         (WebCore::GraphicsContext::setUseAntialiasing):
1660         * platform/graphics/cg/GraphicsContextCG.cpp:
1661         (WebCore::GraphicsContext::setUseAntialiasing):
1662         * platform/graphics/qt/GraphicsContextQt.cpp:
1663         (WebCore::GraphicsContext::setUseAntialiasing):
1664         * platform/graphics/wx/GraphicsContextWx.cpp:
1665         (WebCore::GraphicsContext::setUseAntialiasing):
1666         * rendering/RenderPath.cpp:
1667         (WebCore::RenderPath::paint):
1668
1669 2007-12-09  Rob Buis  <buis@kde.org>
1670
1671         Reviewed by Niko.
1672
1673         http://bugs.webkit.org/show_bug.cgi?id=16163
1674         SVG crash in Node::setChanged() on Debug builds only (trashed parent)
1675
1676         Fix the crash by properly unregistering as client from SVGResource
1677         when deleting a styled svg node.
1678
1679         * svg/SVGStyledElement.cpp:
1680         (WebCore::SVGStyledElement::~SVGStyledElement):
1681
1682 2007-12-10  Brady Eidson  <beidson@apple.com>
1683
1684         Rubberstamped by John
1685
1686         * storage/DatabaseTracker.cpp:
1687         (WebCore::DatabaseTracker::canEstablishDatabase): If the UI Delegate returns *exactly* the estimated size
1688           for the new quota, we should allow the database to be created
1689
1690 2007-12-10  David D. Kilzer  <ddkilzer@webkit.org>
1691
1692         Bug 9683: Implement select.options.remove() method
1693         <http://bugs.webkit.org/show_bug.cgi?id=9683>
1694
1695         Reviewed by Maciej.
1696
1697         Implement select.options.remove() by calling select.remove()
1698         with the same arguments.  This is what MSIE 7 does, although its
1699         select.remove() method differs from WebKit's by throwing an
1700         exception when called with no arguments or with a negative
1701         integer argument.  Note that the DOM Level 1 documentation
1702         specifies that select.remove() does not throw an exception.
1703
1704         Tests: fast/js/select-options-remove-gc.html
1705                fast/js/select-options-remove.html
1706
1707         * bindings/js/JSHTMLOptionsCollectionCustom.cpp:
1708         (WebCore::JSHTMLOptionsCollection::remove): Added.
1709         * html/HTMLOptionsCollection.cpp:
1710         (WebCore::HTMLOptionsCollection::remove): Added.
1711         * html/HTMLOptionsCollection.h:
1712         * html/HTMLOptionsCollection.idl:
1713
1714 2007-12-09  Sam Weinig  <sam@webkit.org>
1715
1716         Rubber stamped by Mark Rowe.
1717
1718         * WebCore.xcodeproj/project.pbxproj: Add missing DerivedSources files.
1719
1720 2007-12-09  Oliver Hunt  <oliver@apple.com>
1721
1722         Reviewed by Niko.
1723
1724         Correction, 'z' and 'Z' are the only commands that cannot have an extended
1725         list of arguments.
1726
1727         * svg/SVGParserUtilities.cpp:
1728         (WebCore::SVGPathParser::parseSVG):
1729
1730 2007-12-09  Oliver Hunt  <oliver@apple.com>
1731
1732         Reviewed by Niko.
1733
1734         Prevent unlimited iteration in the case of invalid path data.
1735         
1736         The only path commands that can leave numbers trailing the command processing
1737         are 'm' and 'M', in which trailing numbers are parsed as arguments to an
1738         implicit lineto command.  In any case we should just terminate as an invalid
1739         path.
1740
1741         * svg/SVGParserUtilities.cpp:
1742         (WebCore::SVGPathParser::parseSVG):
1743
1744 2007-12-09  Luca Bruno  <lethalman88@gmail.com>
1745
1746         Reviewed by Alp Toker.
1747
1748         http://bugs.webkit.org/show_bug.cgi?id=15825
1749         [GTK] curl - slow dns causing hangs.
1750
1751         Create a vector of jobs, to satisfy requests in the right order.
1752         Set a limit to the number of simultaneous connections.
1753
1754         * platform/network/curl/ResourceHandleManager.cpp:
1755         (WebCore::maxRunningJobs): added
1756         (WebCore::ResourceHandleManager::ResourceHandleManager):
1757         (WebCore::ResourceHandleManager::removeFromCurl):
1758         (WebCore::ResourceHandleManager::startScheduledJobs):
1759
1760         * platform/network/curl/ResourceHandleManager.h:
1761         (WebCore::ResourceHandleList): removed
1762         (WebCore::ResourceHandleManager::m_runningJobs): added
1763         (WebCore::ResourceHandleManager::m_resourceHandleListHead): removed
1764         (WebCore::ResourceHandleManager::m_resourceHandleList): added
1765
1766 2007-12-08  Sam Weinig  <sam@webkit.org>
1767
1768         Reviewed by Oliver.
1769
1770         Cleanup kjs_window.h/cpp.
1771
1772         * bindings/js/kjs_window.cpp:
1773         (KJS::WindowPrivate::WindowPrivate):
1774         (KJS::DOMWindowTimer::DOMWindowTimer):
1775         (KJS::Window::Window):
1776         (KJS::Window::retrieveWindow):
1777         (KJS::Window::retrieveActive):
1778         (KJS::Window::retrieve):
1779         (KJS::Window::location):
1780         (KJS::Window::mark):
1781         (KJS::allowPopUp):
1782         (KJS::parseModalDialogFeatures):
1783         (KJS::floatFeature):
1784         (KJS::canShowModalDialog):
1785         (KJS::canShowModalDialogNow):
1786         (KJS::showModalDialog):
1787         (KJS::Window::getValueProperty):
1788         (KJS::Window::getOwnPropertySlot):
1789         (KJS::Window::globalExec):
1790         (KJS::Window::setListener):
1791         (KJS::Window::getListener):
1792         (KJS::Window::findOrCreateJSEventListener):
1793         (KJS::Window::findOrCreateJSUnprotectedEventListener):
1794         (KJS::Window::clearHelperObjectProperties):
1795         (KJS::Window::setCurrentEvent):
1796         (KJS::WindowProtoFuncAToB::callAsFunction):
1797         (KJS::WindowProtoFuncBToA::callAsFunction):
1798         (KJS::WindowProtoFuncOpen::callAsFunction):
1799         (KJS::WindowProtoFuncSetTimeout::callAsFunction):
1800         (KJS::WindowProtoFuncClearTimeout::callAsFunction):
1801         (KJS::WindowProtoFuncSetInterval::callAsFunction):
1802         (KJS::WindowProtoFuncAddEventListener::callAsFunction):
1803         (KJS::WindowProtoFuncRemoveEventListener::callAsFunction):
1804         (KJS::WindowProtoFuncShowModalDialog::callAsFunction):
1805         (KJS::WindowProtoFuncNotImplemented::callAsFunction):
1806         * bindings/js/kjs_window.h:
1807         (KJS::PausedTimeouts::PausedTimeouts):
1808         (KJS::PausedTimeouts::takeTimeouts):
1809         (KJS::ScheduledAction::ScheduledAction):
1810
1811 2007-12-08  Sam Weinig  <sam@webkit.org>
1812
1813         Reviewed by Mitz.
1814
1815         Move window scrolling, moving and resizing methods from KJS::Window
1816         to WebCore::DOMWindow so that there bindings can be autogenerated.
1817
1818         Tests: fast/dom/Window/window-resize-and-move-arguments.html
1819                fast/dom/Window/window-scroll-arguments.html
1820
1821         * WebCore.xcodeproj/project.pbxproj:
1822         * bindings/js/kjs_window.cpp:
1823         (KJS::Window::getValueProperty): Remove extraneous allowsAccessFrom check.
1824         (KJS::WindowProtoFuncOpen::callAsFunction):
1825         (KJS::WindowProtoFuncNotImplemented::callAsFunction): Remove extraneous allowsAccessFrom check.
1826         * bindings/js/kjs_window.h:
1827         * bindings/scripts/CodeGeneratorJS.pm: Add new extended attribute
1828         to ensure that the no less than the declared number of attributes
1829         is allowed.
1830         * page/DOMWindow.cpp:
1831         (WebCore::DOMWindow::adjustWindowRect): Moved from kjs_window.
1832         (WebCore::DOMWindow::scrollBy):
1833         (WebCore::DOMWindow::scrollTo):
1834         (WebCore::DOMWindow::moveBy):
1835         (WebCore::DOMWindow::moveTo):
1836         (WebCore::DOMWindow::resizeBy):
1837         (WebCore::DOMWindow::resizeTo):
1838         * page/DOMWindow.h:
1839         (WebCore::DOMWindow::scroll):
1840         * page/DOMWindow.idl:
1841
1842 2007-12-08  Kevin Ollivier  <kevino@theolliviers.com>
1843
1844         Reviewed by Alp Toker.
1845
1846         http://bugs.webkit.org/show_bug.cgi?id=14651
1847         [CURL] didReceiveResponse() only called for HTTP loads
1848
1849         http://bugs.webkit.org/show_bug.cgi?id=14583
1850         [GDK] file:// relative CSS include URLs handled incorrectly
1851
1852         Make sure CURL sets the ResourceResponse URL and calls
1853         didReceiveResponse for local files too. 
1854
1855         * platform/network/curl/ResourceHandleManager.cpp:
1856         (WebCore::writeCallback):
1857
1858 2007-12-08  Oliver Hunt  <oliver@apple.com>
1859
1860         Reviewed by Sam W.
1861
1862         Split the ENABLE_SVG_EXPERIMENTAL_FEATURES flag into separate flags.
1863         
1864         Fixes <rdar://problem/5620249> Must disable SVG animation
1865         <rdar://problem/5612772> Disable SVG filters on Mac to match Windows behavior
1866         
1867         In order to allow finer grained control over the set of SVG features
1868         this patch splits ENABLE_SVG_EXPERIMENTAL_FEATURES into the following
1869         distinct flags:
1870         ENABLE_SVG_ANIMATION
1871         ENABLE_SVG_FILTERS
1872         ENABLE_SVG_FONTS
1873         ENABLE_SVG_AS_IMAGE
1874         ENABLE_SVG_USE
1875         
1876         by default only ENABLE_SVG_AS_IMAGE and ENABLE_SVG_USE are set.
1877
1878         * Configurations/WebCore.xcconfig:
1879         * DerivedSources.make:
1880           Handle the increased number of build flags that may be necessary
1881           
1882         * WebCore.SVG.Animation.exp: Added.
1883         * WebCore.SVG.Filters.exp: Added.
1884         * WebCore.SVG.exp:
1885           We now may not need the animation or filter exports so 
1886           these need to be separate.
1887           
1888         * WebCore.vcproj/WebCore.vcproj:
1889         * WebCore.vcproj/build-generated-files.sh:
1890           Update for new flags
1891           
1892         Remainder of changes are to swap ENABLE(SVG_EXPERIMENTAL_FEATURES) 
1893         with the appropriate specific feature flag.  
1894         * bindings/js/JSSVGElementWrapperFactory.cpp:
1895         (WebCore::createJSSVGWrapper):
1896         * bindings/objc/DOM.mm:
1897         (WebCore::createElementClassMap):
1898         * dom/make_names.pl:
1899         * loader/CachedImage.cpp:
1900         (WebCore::CachedImage::createImage):
1901         * page/DOMWindow.idl:
1902         * rendering/RenderPath.cpp:
1903         (WebCore::RenderPath::absoluteClippedOverflowRect):
1904         * rendering/RenderSVGContainer.cpp:
1905         (WebCore::RenderSVGContainer::absoluteClippedOverflowRect):
1906         * rendering/RenderSVGImage.cpp:
1907         (WebCore::RenderSVGImage::absoluteClippedOverflowRect):
1908         * rendering/RenderSVGRoot.cpp:
1909         (WebCore::RenderSVGRoot::paint):
1910         (WebCore::RenderSVGRoot::absoluteClippedOverflowRect):
1911         * rendering/RenderSVGText.cpp:
1912         (WebCore::RenderSVGText::absoluteClippedOverflowRect):
1913         * rendering/SVGRenderSupport.cpp:
1914         (WebCore::prepareToRenderSVGContent):
1915         (WebCore::finishRenderSVGContent):
1916         * svg/SVGAnimateElement.cpp:
1917         * svg/SVGAnimateElement.h:
1918         * svg/SVGAnimateElement.idl:
1919         * svg/SVGAnimateMotionElement.cpp:
1920         * svg/SVGAnimateMotionElement.h:
1921         * svg/SVGAnimateTransformElement.cpp:
1922         * svg/SVGAnimateTransformElement.h:
1923         * svg/SVGAnimateTransformElement.idl:
1924         * svg/SVGComponentTransferFunctionElement.cpp:
1925         * svg/SVGComponentTransferFunctionElement.h:
1926         * svg/SVGComponentTransferFunctionElement.idl:
1927         * svg/SVGDocumentExtensions.cpp:
1928         (WebCore::SVGDocumentExtensions::startAnimations):
1929         * svg/SVGFEBlendElement.cpp:
1930         * svg/SVGFEBlendElement.h:
1931         * svg/SVGFEBlendElement.idl:
1932         * svg/SVGFEColorMatrixElement.cpp:
1933         * svg/SVGFEColorMatrixElement.h:
1934         * svg/SVGFEColorMatrixElement.idl:
1935         * svg/SVGFEComponentTransferElement.cpp:
1936         * svg/SVGFEComponentTransferElement.h:
1937         * svg/SVGFEComponentTransferElement.idl:
1938         * svg/SVGFECompositeElement.cpp:
1939         * svg/SVGFECompositeElement.h:
1940         * svg/SVGFECompositeElement.idl:
1941         * svg/SVGFEDiffuseLightingElement.cpp:
1942         * svg/SVGFEDiffuseLightingElement.h:
1943         * svg/SVGFEDiffuseLightingElement.idl:
1944         * svg/SVGFEDisplacementMapElement.cpp:
1945         * svg/SVGFEDisplacementMapElement.h:
1946         * svg/SVGFEDisplacementMapElement.idl:
1947         * svg/SVGFEDistantLightElement.cpp:
1948         * svg/SVGFEDistantLightElement.h:
1949         * svg/SVGFEDistantLightElement.idl:
1950         * svg/SVGFEFloodElement.cpp:
1951         * svg/SVGFEFloodElement.h:
1952         * svg/SVGFEFloodElement.idl:
1953         * svg/SVGFEFuncAElement.cpp:
1954         * svg/SVGFEFuncAElement.h:
1955         * svg/SVGFEFuncAElement.idl:
1956         * svg/SVGFEFuncBElement.cpp:
1957         * svg/SVGFEFuncBElement.h:
1958         * svg/SVGFEFuncBElement.idl:
1959         * svg/SVGFEFuncGElement.cpp:
1960         * svg/SVGFEFuncGElement.h:
1961         * svg/SVGFEFuncGElement.idl:
1962         * svg/SVGFEFuncRElement.cpp:
1963         * svg/SVGFEFuncRElement.h:
1964         * svg/SVGFEFuncRElement.idl:
1965         * svg/SVGFEGaussianBlurElement.cpp:
1966         * svg/SVGFEGaussianBlurElement.h:
1967         * svg/SVGFEGaussianBlurElement.idl:
1968         * svg/SVGFEImageElement.cpp:
1969         * svg/SVGFEImageElement.h:
1970         * svg/SVGFEImageElement.idl:
1971         * svg/SVGFELightElement.cpp:
1972         * svg/SVGFELightElement.h:
1973         * svg/SVGFEMergeElement.cpp:
1974         * svg/SVGFEMergeElement.h:
1975         * svg/SVGFEMergeElement.idl:
1976         * svg/SVGFEMergeNodeElement.cpp:
1977         * svg/SVGFEMergeNodeElement.h:
1978         * svg/SVGFEMergeNodeElement.idl:
1979         * svg/SVGFEOffsetElement.cpp:
1980         * svg/SVGFEOffsetElement.h:
1981         * svg/SVGFEOffsetElement.idl:
1982         * svg/SVGFEPointLightElement.cpp:
1983         * svg/SVGFEPointLightElement.h:
1984         * svg/SVGFEPointLightElement.idl:
1985         * svg/SVGFESpecularLightingElement.cpp:
1986         * svg/SVGFESpecularLightingElement.h:
1987         * svg/SVGFESpecularLightingElement.idl:
1988         * svg/SVGFESpotLightElement.cpp:
1989         * svg/SVGFESpotLightElement.h:
1990         * svg/SVGFESpotLightElement.idl:
1991         * svg/SVGFETileElement.cpp:
1992         * svg/SVGFETileElement.h:
1993         * svg/SVGFETileElement.idl:
1994         * svg/SVGFETurbulenceElement.cpp:
1995         * svg/SVGFETurbulenceElement.h:
1996         * svg/SVGFETurbulenceElement.idl:
1997         * svg/SVGFilterElement.cpp:
1998         * svg/SVGFilterElement.h:
1999         * svg/SVGFilterElement.idl:
2000         * svg/SVGFilterPrimitiveStandardAttributes.cpp:
2001         * svg/SVGTimer.cpp:
2002         (WebCore::SVGTimer::animationsByElement):
2003         * svg/SVGUseElement.cpp:
2004         (WebCore::SVGUseElement::buildPendingResource):
2005         (WebCore::SVGUseElement::associateInstancesWithShadowTreeElements):
2006         * svg/SVGUseElement.h:
2007         * svg/TimeScheduler.cpp:
2008         (WebCore::TimeScheduler::connectIntervalTimer):
2009         (WebCore::TimeScheduler::disconnectIntervalTimer):
2010         * svg/graphics/SVGResourceFilter.cpp:
2011         * svg/graphics/SVGResourceFilter.h:
2012         * svg/graphics/cg/SVGResourceFilterCg.cpp:
2013         * svg/graphics/cg/SVGResourceFilterCg.mm:
2014         * svg/graphics/filters/SVGDistantLightSource.h:
2015         * svg/graphics/filters/SVGFEBlend.cpp:
2016         * svg/graphics/filters/SVGFEBlend.h:
2017         * svg/graphics/filters/SVGFEColorMatrix.cpp:
2018         * svg/graphics/filters/SVGFEColorMatrix.h:
2019         * svg/graphics/filters/SVGFEComponentTransfer.cpp:
2020         * svg/graphics/filters/SVGFEComponentTransfer.h:
2021         * svg/graphics/filters/SVGFEComposite.cpp:
2022         * svg/graphics/filters/SVGFEComposite.h:
2023         * svg/graphics/filters/SVGFEConvolveMatrix.cpp:
2024         * svg/graphics/filters/SVGFEConvolveMatrix.h:
2025         * svg/graphics/filters/SVGFEDiffuseLighting.cpp:
2026         * svg/graphics/filters/SVGFEDiffuseLighting.h:
2027         * svg/graphics/filters/SVGFEDisplacementMap.cpp:
2028         * svg/graphics/filters/SVGFEDisplacementMap.h:
2029         * svg/graphics/filters/SVGFEFlood.cpp:
2030         * svg/graphics/filters/SVGFEFlood.h:
2031         * svg/graphics/filters/SVGFEGaussianBlur.cpp:
2032         * svg/graphics/filters/SVGFEGaussianBlur.h:
2033         * svg/graphics/filters/SVGFEImage.cpp:
2034         * svg/graphics/filters/SVGFEImage.h:
2035         * svg/graphics/filters/SVGFEMerge.cpp:
2036         * svg/graphics/filters/SVGFEMerge.h:
2037         * svg/graphics/filters/SVGFEMorphology.cpp:
2038         * svg/graphics/filters/SVGFEMorphology.h:
2039         * svg/graphics/filters/SVGFEOffset.cpp:
2040         * svg/graphics/filters/SVGFEOffset.h:
2041         * svg/graphics/filters/SVGFESpecularLighting.cpp:
2042         * svg/graphics/filters/SVGFESpecularLighting.h:
2043         * svg/graphics/filters/SVGFETile.h:
2044         * svg/graphics/filters/SVGFETurbulence.cpp:
2045         * svg/graphics/filters/SVGFETurbulence.h:
2046         * svg/graphics/filters/SVGFilterEffect.cpp:
2047         * svg/graphics/filters/SVGFilterEffect.h:
2048         * svg/graphics/filters/SVGLightSource.cpp:
2049         * svg/graphics/filters/SVGLightSource.h:
2050         * svg/graphics/filters/SVGPointLightSource.h:
2051         * svg/graphics/filters/SVGSpotLightSource.h:
2052         * svg/graphics/filters/cg/SVGFEBlendCg.mm:
2053         * svg/graphics/filters/cg/SVGFEColorMatrixCg.mm:
2054         * svg/graphics/filters/cg/SVGFEComponentTransferCg.mm:
2055         * svg/graphics/filters/cg/SVGFECompositeCg.mm:
2056         * svg/graphics/filters/cg/SVGFEDiffuseLightingCg.mm:
2057         * svg/graphics/filters/cg/SVGFEDisplacementMapCg.mm:
2058         * svg/graphics/filters/cg/SVGFEFloodCg.mm:
2059         * svg/graphics/filters/cg/SVGFEGaussianBlurCg.mm:
2060         * svg/graphics/filters/cg/SVGFEHelpersCg.h:
2061         * svg/graphics/filters/cg/SVGFEHelpersCg.mm:
2062         * svg/graphics/filters/cg/SVGFEImageCg.mm:
2063         * svg/graphics/filters/cg/SVGFEMergeCg.mm:
2064         * svg/graphics/filters/cg/SVGFEOffsetCg.mm:
2065         * svg/graphics/filters/cg/SVGFESpecularLightingCg.mm:
2066         * svg/graphics/filters/cg/SVGFETileCg.mm:
2067         * svg/graphics/filters/cg/SVGFilterEffectCg.mm:
2068         * svg/graphics/filters/cg/WKArithmeticFilter.h:
2069         * svg/graphics/filters/cg/WKArithmeticFilter.m:
2070         * svg/graphics/filters/cg/WKComponentMergeFilter.h:
2071         * svg/graphics/filters/cg/WKComponentMergeFilter.m:
2072         * svg/graphics/filters/cg/WKDiffuseLightingFilter.h:
2073         * svg/graphics/filters/cg/WKDiffuseLightingFilter.m:
2074         * svg/graphics/filters/cg/WKDiscreteTransferFilter.h:
2075         * svg/graphics/filters/cg/WKDiscreteTransferFilter.m:
2076         * svg/graphics/filters/cg/WKDisplacementMapFilter.h:
2077         * svg/graphics/filters/cg/WKDisplacementMapFilter.m:
2078         * svg/graphics/filters/cg/WKDistantLightFilter.h:
2079         * svg/graphics/filters/cg/WKDistantLightFilter.m:
2080         * svg/graphics/filters/cg/WKGammaTransferFilter.h:
2081         * svg/graphics/filters/cg/WKGammaTransferFilter.m:
2082         * svg/graphics/filters/cg/WKIdentityTransferFilter.h:
2083         * svg/graphics/filters/cg/WKIdentityTransferFilter.m:
2084         * svg/graphics/filters/cg/WKLinearTransferFilter.h:
2085         * svg/graphics/filters/cg/WKLinearTransferFilter.m:
2086         * svg/graphics/filters/cg/WKNormalMapFilter.h:
2087         * svg/graphics/filters/cg/WKNormalMapFilter.m:
2088         * svg/graphics/filters/cg/WKPointLightFilter.h:
2089         * svg/graphics/filters/cg/WKPointLightFilter.m:
2090         * svg/graphics/filters/cg/WKSpecularLightingFilter.h:
2091         * svg/graphics/filters/cg/WKSpecularLightingFilter.m:
2092         * svg/graphics/filters/cg/WKSpotLightFilter.h:
2093         * svg/graphics/filters/cg/WKSpotLightFilter.m:
2094         * svg/graphics/filters/cg/WKTableTransferFilter.h:
2095         * svg/graphics/filters/cg/WKTableTransferFilter.m:
2096         * svg/graphics/mac/SVGResourceFilterPlatformDataMac.h:
2097         * svg/graphics/mac/SVGResourceFilterPlatformDataMac.mm:
2098         * svg/svgtags.in:
2099
2100 2007-12-08  Dan Bernstein  <mitz@apple.com>
2101
2102         Reviewed by Adele Peterson.
2103
2104         - fix two bugs in parsing of stylesheets in <style> elements created by
2105           the parser:
2106           1. each such stylesheet is parsed twice, once when the text node is
2107              added and again when the </style> tag is reached
2108           2. re-inserting such a <style> element into the document fails to
2109              re-parse and apply its stylesheet.
2110
2111         Test for bug #2: fast/dom/HTMLStyleElement/insert-parser-generated.html
2112
2113         * html/HTMLStyleElement.cpp:
2114         (WebCore::HTMLStyleElement::finishedParsing):
2115         * svg/SVGStyleElement.cpp:
2116         (WebCore::SVGStyleElement::finishedParsing):
2117
2118 2007-12-07  Sam Weinig  <sam@webkit.org>
2119
2120         Reviewed by Darin.
2121
2122         - Removes the faulty isSafeScript implementation that was only
2123           used for plugins.
2124         - Renames isSafeScript to allowsAccessFrom.
2125
2126         * bindings/js/JSDOMWindowCustom.cpp:
2127         (WebCore::JSDOMWindow::customGetOwnPropertySlot):
2128         (WebCore::JSDOMWindow::customPut):
2129         * bindings/js/kjs_dom.cpp:
2130         (WebCore::checkNodeSecurity):
2131         * bindings/js/kjs_window.cpp:
2132         (KJS::createWindow):
2133         (KJS::Window::getValueProperty):
2134         (KJS::Window::namedItemGetter):
2135         (KJS::Window::getOwnPropertySlot):
2136         (KJS::Window::put):
2137         (KJS::Window::allowsAccessFrom):
2138         (KJS::Window::setListener):
2139         (KJS::Window::getListener):
2140         (KJS::WindowProtoFuncOpen::callAsFunction):
2141         (KJS::WindowProtoFuncSetTimeout::callAsFunction):
2142         (KJS::WindowProtoFuncClearTimeout::callAsFunction):
2143         (KJS::WindowProtoFuncSetInterval::callAsFunction):
2144         (KJS::WindowProtoFuncAddEventListener::callAsFunction):
2145         (KJS::WindowProtoFuncRemoveEventListener::callAsFunction):
2146         (KJS::WindowProtoFuncNotImplemented::callAsFunction):
2147         (KJS::Location::getOwnPropertySlot):
2148         (KJS::Location::put):
2149         (KJS::LocationProtoFuncReplace::callAsFunction):
2150         (KJS::LocationProtoFuncReload::callAsFunction):
2151         (KJS::LocationProtoFuncAssign::callAsFunction):
2152         (KJS::LocationProtoFuncToString::callAsFunction):
2153         * bindings/js/kjs_window.h:
2154         (KJS::Window::allowsAccessFrom):
2155         * bindings/objc/WebScriptObject.mm:
2156         (-[WebScriptObject _isSafeScript]): Reverse caller/argument of allowsAccessFrom to match
2157         the new call.
2158         * bindings/scripts/CodeGeneratorJS.pm:
2159
2160 2007-12-08  Rob Buis  <buis@kde.org>
2161
2162         Reviewed by Darin.
2163
2164         http://bugs.webkit.org/show_bug.cgi?id=15464
2165         SVGLengthList allows bad values
2166
2167         Be more strict with svg lengths without a unit identifier.
2168
2169         Test: svg/custom/invalid-lengthlist.svg
2170
2171         * svg/SVGLength.cpp:
2172         (WebCore::SVGLength::setValueAsString):
2173
2174 2007-12-08  Rob Buis  <buis@kde.org>
2175
2176         Mac Tiger build fix.
2177
2178         Use the wtf prefix when including MathExtras.h.
2179
2180         * rendering/RenderMedia.cpp:
2181
2182 2007-12-08  Alp Toker  <alp@atoker.com>
2183
2184         GTK+ build fix (for ENABLE_VIDEO builds):
2185
2186         Include MathExtras.h to get isfinite().
2187
2188         * rendering/RenderMedia.cpp:
2189
2190 2007-12-08  Rob Buis  <buis@kde.org>
2191
2192         Reviewed by Darin.
2193
2194         http://bugs.webkit.org/show_bug.cgi?id=15528
2195         svg_dynamic_cast should be removed
2196
2197         Replace svg_dynamic_cast with a combination of
2198         isSVGElement and static_cast.
2199
2200         * rendering/SVGRootInlineBox.cpp:
2201         (WebCore::SVGRootInlineBox::buildLayoutInformation):
2202         (WebCore::SVGRootInlineBox::buildTextChunks):
2203         * svg/SVGAnimationElement.cpp:
2204         (WebCore::SVGAnimationElement::targetElement):
2205         * svg/SVGElement.h:
2206         * svg/SVGElementInstance.cpp:
2207         (WebCore::SVGElementInstance::updateInstance):
2208         * svg/SVGFilterElement.cpp:
2209         (WebCore::SVGFilterElement::canvasResource):
2210         * svg/SVGGradientElement.cpp:
2211         (WebCore::SVGGradientElement::buildStops):
2212         * svg/SVGLocatable.cpp:
2213         (WebCore::SVGLocatable::getTransformToElement):
2214         * svg/SVGMaskElement.cpp:
2215         (WebCore::SVGMaskElement::drawMaskerContent):
2216         * svg/SVGSwitchElement.cpp:
2217         (WebCore::SVGSwitchElement::childShouldCreateRenderer):
2218         * svg/SVGUseElement.cpp:
2219         (WebCore::SVGUseElement::insertedIntoDocument):
2220         (WebCore::SVGUseElement::buildPendingResource):
2221         (WebCore::SVGUseElement::buildInstanceTree):
2222         (WebCore::SVGUseElement::handleDeepUseReferencing):
2223         (WebCore::SVGUseElement::buildShadowTree):
2224         (WebCore::SVGUseElement::expandUseElementsInShadowTree):
2225         (WebCore::SVGUseElement::associateInstancesWithShadowTreeElements):
2226         * svg/graphics/SVGResource.cpp:
2227         (WebCore::getResourceById):
2228
2229 2007-12-07  Antti Koivisto  <antti@apple.com>
2230
2231         Reviewed by Adele.
2232         
2233         Partial fix for <rdar://problem/5633400>
2234         Transformed <video>, <img>, <embed> are not clipped correctly until a repaint is forced
2235         
2236         Fix video painting when transform is applied.
2237
2238         Test: media/video-transformed.html
2239
2240         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
2241         (WebCore::MediaPlayerPrivate::paint):
2242
2243 2007-12-07  Dan Bernstein  <mitz@apple.com>
2244
2245         Reviewed by Sam Weinig.
2246
2247         - fix http://bugs.webkit.org/show_bug.cgi?id=16348
2248           @font-face does not affect the default style
2249
2250         Test: fast/css/font-face-default-font.html
2251
2252         * dom/Document.cpp:
2253         (WebCore::Document::recalcStyle): Pass our font selector to
2254         Font::update() if we already have one.
2255
2256 2007-12-07  Darin Adler  <darin@apple.com>
2257
2258         - fix Windows build
2259
2260         * bridge/win/GlobalHistoryWin.cpp:
2261         (WebCore::historyContains): Missed a rename.
2262
2263 2007-12-07  Brady Eidson  <beidson@apple.com>
2264
2265         Reviewed by Anders and Darin
2266
2267         When a statement bumps up against the quota and the UI Delegate grants more space, we need to
2268         actually set the new maximum size on the SQLiteDatabase (in addition to storing the new max quota
2269         in the DatabaseTracker, which was already done)
2270
2271         * storage/SQLTransaction.cpp:
2272         (WebCore::SQLTransaction::runStatements): If a statement is being retried, set the maximum size on
2273           the SQLiteDatabase to the new maximum size
2274
2275 2007-12-07  Darin Adler  <darin@apple.com>
2276
2277         - fix Tiger build
2278
2279         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm: Tiger didn't even have
2280         QTKIT_VERSION_MAX_ALLOWED, so add logic to work without that.
2281
2282 2007-12-07  Darin Adler  <darin@apple.com>
2283
2284         - fix 64-bit build, hopefully without breaking Tiger build
2285
2286         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
2287         (WebCore::MediaPlayerPrivate::updateStates):
2288         Don't use Movies.h constants that are nonexistent in 64-bit.
2289         Define the new QTMovie.h constants, though, when using an older QTKit.
2290
2291 2007-12-07  Brady Eidson  <beidson@apple.com>
2292
2293         Reviewed by Anders
2294
2295         Fix <rdar://problem/5636115> - Prompted for quota increase to create database when it already existed
2296
2297         * storage/DatabaseTracker.cpp:
2298         (WebCore::DatabaseTracker::canEstablishDatabase): Check hasEntryForDatabase before doing any prompting
2299         (WebCore::DatabaseTracker::hasEntryForDatabase): Check and see if this database already exists
2300         * storage/DatabaseTracker.h:
2301
2302 2007-12-07  Darin Adler  <darin@apple.com>
2303
2304         Reviewed by Mitz.
2305
2306         - http://bugs.webkit.org/show_bug.cgi?id=15981
2307           speed up visited-link code a bit
2308
2309         * bridge/GlobalHistory.h: Change historyContains to take a character pointer plus length
2310         instead of requiring a DeprecatedString.
2311
2312         * bridge/mac/GlobalHistoryMac.mm: (WebCore::historyContains): Updated for above change.
2313         Also removes pointless "fast Latin-1" case that was never used.
2314         * bridge/win/GlobalHistoryWin.cpp: (WebCore::historyContains): Ditto.
2315         * platform/gtk/TemporaryLinkStubs.cpp: (WebCore::historyContains): Ditto.
2316         * platform/wx/TemporaryLinkStubs.cpp: (WebCore::historyContains): Ditto.
2317
2318         * css/CSSStyleSelector.cpp:
2319         (WebCore::findHash): Added. Helper for cleanpath.
2320         (WebCore::findSlashDotDotSlash): Ditto.
2321         (WebCore::findSlashSlash): Ditto.
2322         (WebCore::findSlashDotSlash): Ditto.
2323         (WebCore::cleanpath): Changed to use fast helper functions instead of slower general-purpose
2324         DeprecatedString find function.
2325         (WebCore::containsColonSlashSlash): Added. Helper for checkPseudoState.
2326         (WebCore::checkPseudoState): Got rid of reference count churn by using an AtomicString*
2327         instead of an AtomicString for the attribute value. Changed to use fast helper function
2328         instead of slower DeprecatedString::contains function, and also made the fast case not
2329         bother allocating a DeprecatedConstString.
2330
2331         - unrelated tiny cleanup
2332
2333         * platform/graphics/svg/cg/SVGPaintServerGradientCg.cpp:
2334         (WebCore::releaseCachedStops): Use static_cast instead of reinterpret_cast.
2335         (WebCore::cgGradientCallback): Ditto.
2336
2337 2007-12-07  Darin Adler  <darin@apple.com>
2338
2339         Fix build on Tiger (Mark Rowe told me how).
2340
2341         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
2342         Include <objc/objc-runtime.h>, which existed back on Tiger,
2343         rather than <objc/runtime.h>, which did not.
2344
2345 2007-12-07  Geoffrey Garen  <ggaren@apple.com>
2346
2347         Build fix: rolling out last build fix to change #include path.
2348
2349         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
2350
2351 2007-12-07  Steve Falkenburg  <sfalken@apple.com>
2352
2353         Re-named our B&I flag from BUILDBOT to PRODUCTION.
2354
2355         Reviewed by Sam Weinig.
2356
2357         * WebCore.vcproj/WebCore.make:
2358
2359 2007-12-07  Geoffrey Garen  <ggaren@apple.com>
2360
2361         Build fix: corrected #include path.
2362
2363         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
2364
2365 2007-12-07  Geoffrey Garen  <ggaren@apple.com>
2366
2367         Reviewed by Sam Weinig.
2368
2369         Added some namespace qualifications and a forwarding header, now that
2370         KJS::Node is sometimes #included in WebCore by JavaScriptCore headers.
2371
2372         * ForwardingHeaders/wtf/ListRefPtr.h: Added.
2373         * bindings/js/JSXSLTProcessor.cpp:
2374         (KJS::JSXSLTProcessorPrototypeFunctionTransformToFragment::callAsFunction):
2375         * bindings/js/kjs_binding.cpp:
2376         (KJS::ScriptInterpreter::getDOMNodeForDocument):
2377         (KJS::ScriptInterpreter::forgetDOMNodeForDocument):
2378         (KJS::ScriptInterpreter::putDOMNodeForDocument):
2379         (KJS::ScriptInterpreter::markDOMNodesForDocument):
2380         (KJS::ScriptInterpreter::updateDOMNodeDocument):
2381
2382 2007-12-07  Adam Roben  <aroben@apple.com>
2383
2384         Add SoftLinking.h for Windows and use it in a few places
2385
2386         Reviewed by Oliver.
2387
2388         * WebCore.vcproj/WebCore.vcproj: Added new file to project.
2389         * platform/win/PlatformScrollBarSafari.cpp: Use SoftLinking.h.
2390         (WebCore::PlatformScrollbar::PlatformScrollbar): Removed manual
2391         soft-linking calls.
2392         (WebCore::PlatformScrollbar::paintButton): Check for the presence of
2393         the SafariTheme library now that we can't check for the presence of
2394         paintThemePart directly.
2395         (WebCore::PlatformScrollbar::paintTrack): Ditto.
2396         (WebCore::PlatformScrollbar::paintThumb): Ditto.
2397         * platform/win/SoftLinking.h: Copied from WebCore/platform/mac/SoftLinking.h.
2398         * rendering/RenderThemeSafari.cpp: Same basic changes as to
2399         PlatformScrollBarSafari.cpp.
2400         (WebCore::RenderThemeSafari::RenderThemeSafari):
2401         (WebCore::RenderThemeSafari::isControlStyled):
2402         (WebCore::RenderThemeSafari::paintCapsLockIndicator):
2403         * rendering/RenderThemeSafari.h: Removed m_themeDLL member.
2404
2405 2007-12-07  Darin Adler  <darin@apple.com>
2406
2407         Reviewed by Adele.
2408
2409         - fix <rdar://problem/5608795> CrashTracer: 481 crashes in Safari
2410           at WebCore::HTMLSelectElement::saveState const + 152
2411
2412         Test: fast/forms/select-set-inner.html
2413
2414         * dom/ContainerNode.cpp:
2415         (WebCore::ContainerNode::removeChildren): Added a return value, as with other
2416         calls that change children, so we can optimize for the case where it does nothing.
2417         (WebCore::ContainerNode::cloneChildNodes): Changed parameter type to ContainerNode.
2418         * dom/ContainerNode.h: See above.
2419
2420         * html/HTMLOptGroupElement.cpp:
2421         (WebCore::HTMLOptGroupElement::removeChildren): Override removeChildren and call
2422         recalcSelectOptions in that case.
2423         (WebCore::HTMLOptGroupElement::childrenChanged): Override childrenChanged instead of
2424         addChild, for consistency with HTMLSelectElement; no need to override both.
2425         (WebCore::HTMLOptGroupElement::groupLabelText): Made const.
2426         * html/HTMLOptGroupElement.h: See above.
2427
2428         * html/HTMLSelectElement.cpp: Don't override addChild any more, because we already
2429         override childrenChanged, and addChild calls that.
2430         (WebCore::HTMLSelectElement::removeChildren): Override removeChildren and call
2431         recalcSelectOptions in that case.
2432         (WebCore::HTMLSelectElement::recalcListItems): Tightened up the code a little bit
2433         by using a for loop and traverseNextSibling. Also added some new comments and
2434         removed some obsolete ones.
2435         (WebCore::HTMLSelectElement::checkListItems): Added. Debug-only check to make
2436         sure we don't have a stale list items vector.
2437         * html/HTMLSelectElement.h: Changed listItems() to invoke checkListItems().
2438         This will help us catch cases where we have too few calls to setRecalcListItems.
2439
2440 2007-12-07  Dan Bernstein  <mitz@apple.com>
2441
2442         Reviewed by Darin Adler.
2443
2444         - WebCore part of fixing <rdar://problem/5499918> REGRESSION: insertion point in input field with custom border cuts holes in focus ring interior edges
2445
2446         Test: fast/repaint/focus-ring.html
2447
2448         * editing/SelectionController.cpp:
2449         (WebCore::SelectionController::caretRepaintRect): Changed to return just
2450         the caret rect without any padding.
2451         (WebCore::SelectionController::recomputeCaretRect): Changed to repaint
2452         just the caret rect without any padding.
2453         * platform/graphics/GraphicsContext.h: Removed setFocusRingClip() and
2454         clearFocusRingClip().
2455         * platform/graphics/cairo/GraphicsContextCairo.cpp: Ditto.
2456         * platform/graphics/cg/GraphicsContextCG.cpp: Ditto.
2457         * platform/graphics/cg/GraphicsContextPlatformPrivate.h: Removed
2458         m_focusRingClip member.
2459         * platform/graphics/mac/GraphicsContextMac.mm:
2460         (WebCore::GraphicsContext::drawFocusRing): Changed to call
2461         wkDrawFocusRing() once without setting up additional clip. On Leopard,
2462         wkDrawFocusRing() respects the context clip now. On Tiger, a
2463         transparency layer is used to apply clipping to the focus ring.
2464         * platform/graphics/qt/GraphicsContextQt.cpp: Removed focus ring clip
2465         methods and member.
2466         * platform/graphics/wx/GraphicsContextWx.cpp: Ditto.
2467         * platform/mac/WebCoreSystemInterface.h: Removed the clipRect argument
2468         to wkDrawFocusRing().
2469         * platform/mac/WebCoreSystemInterface.mm: Ditto.
2470         * rendering/RenderLayer.cpp:
2471         (WebCore::setClip): Removed call to set the focus ring clip.
2472         (WebCore::restoreClip): Removed call to reset the focus ring clip.
2473
2474 2007-12-07  Darin Adler  <darin@apple.com>
2475
2476         Reviewed by Antti Koivisto and Kevin Decker.
2477
2478         - fix <rdar://problem/5601586> QtKit should be dynamically loaded upon need, not linked at startup
2479
2480         Also did a lot of small tweaks to MediaPlayerPrivateQTKit.
2481
2482         * WebCore.xcodeproj/project.pbxproj: Don't link to QTKit.
2483
2484         * platform/graphics/mac/MediaPlayerPrivateQTKit.h: Omit unneeded includes and declarations.
2485         Made a lot more functions const. Made a few more members private and a couple inline.
2486         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm: Added soft linking machinery for all the
2487         things we currently use in QTKit. It's a little more awkward for classes and other data objects
2488         than it is for functions, but still relatively straightforward, with no changes needed to the
2489         client code. Added using namespace directives. Made a cuePointTimerInterval constant and put
2490         it at the top of the file. Use 0 consistently instead of sometimes 0 and sometimes 0.0f.
2491         (WebCore::MediaPlayerPrivate::MediaPlayerPrivate): Removed unneeded initialization of RetainPtr
2492         members to nil.
2493         (WebCore::MediaPlayerPrivate::createQTMovie): Use adoptNS instead of autorelease.
2494         (WebCore::MediaPlayerPrivate::createQTMovieView): Ditto. Also use -[NSColor clearColor].
2495         (WebCore::MediaPlayerPrivate::createQTTime): Remove an unneeded type cast that had no effect.
2496         Changed to use long instead of int because that's the type for a QTTime time scale anyway.
2497         (WebCore::MediaPlayerPrivate::duration): Use a static_cast instead of a C-style cast.
2498         (WebCore::MediaPlayerPrivate::currentTime): Ditto. Also merged into a single expression.
2499         (WebCore::MediaPlayerPrivate::cuePointTimerFired): Added code to make a copy of the cue
2500         points set to avoid a potential problem with a set being modified as we iterate it.
2501         (WebCore::MediaPlayerPrivate::bytesLoaded): Removed unneeded null check of m_qtMovie.
2502         (WebCore::MediaPlayerPrivate::updateStates): Instead of comments explaining the numeric
2503         values, used the constants from the headers directly.
2504         (WebCore::MediaPlayerPrivate::getSupportedTypes): Instead of (QTMovieFileTypeOptions)0,
2505         pass the named constant with value 0, QTIncludeCommonTypes. Skipped the intermediate type
2506         of NSString to remove one cast. Replaced C-style cast with reinterpret_cast (arguably
2507         no better). Used RetainPtr instead of explicit CFRelease calls.
2508
2509         * platform/mac/SoftLinking.h: Added macros to do soft linking for classes and for pointers.
2510         It's not quite as automatic as the soft linking we can do for functions, since these define
2511         functions to get the values, so you need to define macros to make what look like variable
2512         accesses turn into function calls. See MediaPlayerPrivateQTKit for the details.
2513
2514         * html/HTMLMediaElement.h:
2515         * html/TimeRanges.h:
2516         * html/VoidCallback.h:
2517         * platform/graphics/MediaPlayer.h:
2518         Use angle brackets for wtf includes. Omit unneeded includes.
2519
2520 2007-12-07  Dan Bernstein  <mitz@apple.com>
2521
2522         Reviewed by Darin Adler.
2523
2524         - fix http://bugs.webkit.org/show_bug.cgi?id=16334
2525           <rdar://problem/5634923> REGRESSION (r28299): Homepage of any DotMac Web Gallery won't load completely
2526
2527         Test: fast/dynamic/subtree-no-common-root-static-y.html
2528
2529         * rendering/RenderObject.cpp:
2530         (WebCore::RenderObject::markContainingBlocksForLayout): Changed the call
2531         to setChildNeedsLayout() to not mark containing blocks and added a
2532         separate call to markContainingBlocksForLayout() that will not schedule
2533         a layout if we are already in the middle of scheduleRelayoutOfSubtree().
2534
2535 2007-12-07  Alexey Proskuryakov  <ap@webkit.org>
2536
2537         Reviewed by Darin.
2538
2539         http://bugs.webkit.org/show_bug.cgi?id=16325
2540         <rdar://problem/5632997> REGRESSION: www.xerox.ru doesn't work
2541         
2542         Test: http/tests/misc/empty-cookie.html
2543
2544         * platform/mac/CookieJar.mm:
2545         (WebCore::setCookies): Don't store empty cookies.
2546         (WebCore::cookies): Filter out empty cookies if we have them, as they could have been set
2547         with an earlier version of Leopard!
2548
2549 2007-12-06  Ada Chan  <adachan@apple.com>
2550
2551         Fixed the if statement (ERROR_SUCCESS is 0 and we were actually
2552         returning true when there's an error).
2553
2554         Reviewed by Steve.
2555
2556         * platform/win/FileSystemWin.cpp:
2557         (WebCore::makeAllDirectories):
2558
2559 2007-12-06  Darin Adler  <darin@apple.com>
2560
2561         - fix broken regression test
2562
2563         * bindings/js/kjs_binding.cpp:
2564         (KJS::setDOMException): Oops, this was just supposed to be PERMISSION_DENIED.
2565
2566 2007-12-06  Darin Adler  <darin@apple.com>
2567
2568         Reviewed by Sam Weinig.
2569
2570         - fix http://bugs.webkit.org/show_bug.cgi?id=16332
2571           ObjC DOM exception object descriptions should include the exception name
2572
2573         * WebCore.pro: Added ExceptionCode.cpp.
2574         * WebCore.vcproj/WebCore.vcproj: Added ExceptionCode.cpp.
2575         * WebCore.xcodeproj/project.pbxproj: Added ExceptionCode.cpp.
2576         * WebCoreSources.bkl: Added ExceptionCode.cpp.
2577
2578         * bindings/js/kjs_binding.cpp: (KJS::setDOMException): Moved the code to decompose an
2579         ExceptionCode into ExceptionCode.h/cpp -- getExceptionCodeDescription. Also removed
2580         the many unneeded includes that were here. Had to keep one special case here, for
2581         SECURITY_ERR.
2582
2583         * bindings/objc/ExceptionHandlers.mm: (WebCore::raiseDOMException): Changed to use the
2584         new getExceptionCodeDescription function so that this shares the exception name
2585         information that was previously only available to JavaScript.
2586
2587         * dom/ExceptionCode.cpp: Copied from bindings/js/kjs_binding.cpp.
2588         (WebCore::getExceptionCodeDescription): Added some assertions, and made the function
2589         handle exception names in a slightly more robust way that is not subject to integer
2590         overflow. (Not a real world issue since we should never receive a bad exception code.)
2591
2592         * dom/ExceptionCode.h: Added the ExceptionCodeDescription struct and the
2593         getExceptionCodeDescription function.
2594
2595         * svg/SVGException.h: Added a missing #include and got rid of some comments. Some of
2596         the comments were mildly helpful, but others were incorrect. This now matches the other
2597         exception-related headers such as RangeException.h.
2598
2599 2007-12-06  Brady Eidson  <beidson@apple.com>
2600
2601         Reviewed by Darin
2602
2603         Fixed a glaring bug that would prevent a statement from getting run a second time
2604
2605         * storage/SQLStatement.cpp:
2606         (WebCore::SQLStatement::execute): Clear failure due to quota *before* we check the error
2607           and return early
2608         (WebCore::SQLStatement::clearFailureDueToQuota): Only clear the error if it was a quota error
2609
2610 2007-12-06  Timothy Hatcher  <timothy@apple.com>
2611
2612         Reviewed by Oliver Hunt.
2613
2614         Use keydown instead of keypress so keyIdentifier can be used.
2615
2616         * page/inspector/ConsolePanel.js: Use keydown instead of keypress.
2617         * page/inspector/DatabasePanel.js: Ditto.
2618         * page/inspector/inspector.js: Ditto. Plus call removeEventListener
2619         before deleting windowLoaded.
2620
2621 2007-12-06  Adam Roben  <aroben@apple.com>
2622
2623         Rename FontsTable.plist to FontsList.plist
2624
2625         Rubberstamped by Hyatt.
2626
2627         * platform/graphics/win/FontDatabase.cpp:
2628
2629 2007-12-06  Brady Eidson  <beidson@apple.com>
2630
2631         Reviewed by Darin
2632
2633         Tweaked a comment and a few assertions from my last checkin
2634
2635         * storage/SQLStatement.cpp:
2636         (WebCore::SQLStatement::execute):
2637         (WebCore::SQLStatement::clearFailureDueToQuota):
2638         (WebCore::SQLStatement::lastExecutionFailedDueToQuota):
2639
2640 2007-12-06  Brady Eidson <beidson@apple.com>
2641
2642         Reviewed by Darin
2643
2644         Finished hooking up UI Delegate for databases - Database operations will now enforce a size quota and
2645         will ask the UI Delegate for more space when that quota is met
2646
2647         * platform/sql/SQLiteDatabase.cpp: Add the new SQLResultFull constant
2648         * platform/sql/SQLiteDatabase.h: Ditto
2649
2650         * storage/Database.cpp:
2651         (WebCore::Database::securityOriginData): Added this accessor, copying for thread safety
2652         (WebCore::Database::stringIdentifier): Ditto
2653         * storage/Database.h:
2654
2655         * storage/SQLStatement.cpp:
2656         (WebCore::SQLStatement::SQLStatement):
2657         (WebCore::SQLStatement::execute): Change to return an enum that represents 3 states - success, error, and quota.
2658           If the result is quota, this statement expects that it might be run again, presumably after the user increases 
2659           the quota
2660         (WebCore::SQLStatement::setFailureDueToQuota): Setup a quota failure, including a flag and the error
2661         (WebCore::SQLStatement::clearFailureDueToQuota): Clear a quota failure, for when the statement is rerun
2662         (WebCore::SQLStatement::lastExecutionFailedDueToQuota):
2663         * storage/SQLStatement.h:
2664
2665         * storage/SQLTransaction.cpp:
2666         (WebCore::SQLTransaction::SQLTransaction):
2667         (WebCore::SQLTransaction::performPendingCallback): Added an acceptable callback pointer
2668         (WebCore::SQLTransaction::openTransactionAndPreflight): Setup the quota in the database that will remain for this 
2669           transaction.  Note that in this patch, the quota being set is wrong - it makes sense to fix that in a follow up patch
2670         (WebCore::SQLTransaction::runStatements): Modified to add the ability to re-run a statement based on the UI delegate
2671           decision and whether the current statement was already run
2672         (WebCore::SQLTransaction::runCurrentStatement): Added another result condition - the Quota result - and handle it
2673         (WebCore::SQLTransaction::handleCurrentStatementError): Statements can now error-out from two places, so the code
2674           that handles a statement error was moved here
2675         (WebCore::SQLTransaction::deliverQuotaIncreaseCallback): Added - Consult the UI delegate for more quota, then 
2676           reschedule the current statement on the database thread
2677         * storage/SQLTransaction.h:
2678
2679 2007-12-06  Steve Falkenburg  <sfalken@apple.com>
2680
2681         <rdar://problem/5614257> Crash in timer / hashtable code due to uncaught exception
2682         
2683         Don't use callback-based timers, since these cause Windows to eat Windows crashes
2684         in code the timers call.
2685         
2686         Windows appears to be defending against "shatter" attacks partially by setting
2687         up a structured exception block while dispatching callback-based WM_TIMERs.
2688         
2689         I verified this by adding a divide by zero into some timer callback code.
2690         In the case where the timer was dispatched via a callback, the divide by zero
2691         exception was silently handled and ignored, with execution continuing after
2692         our call to DispatchMessage.  When processed via the WNDPROC, no SEH
2693         block was established by Windows, and our divide by zero generated a real
2694         crash (which is what we wanted).
2695         
2696         Windows handling our crashes for us led us to leave the timer data structures
2697         in an invalid state so the next time a timer was set, we'd crash accessing an
2698         invalid HashMap of timer data.
2699         
2700         Reviewed by Hyatt.
2701
2702         * platform/win/SharedTimerWin.cpp:
2703         (WebCore::TimerWindowWndProc):
2704         (WebCore::setSharedTimerFireTime):
2705
2706 2007-12-06  Adam Roben  <aroben@apple.com>
2707
2708         Fix <rdar://5108390> Feed title is too low in blue banner
2709
2710         Way back in r23069 we started applying the same font ascent hack that
2711         Mac WebKit applies to Helvetica, Times, and Courier. We did this so
2712         that those fonts would match the Mac metrics when we run the
2713         regression tests. However, this hack was applying to Arial on Windows
2714         when a site would specify the Helvetica font face because Windows will
2715         alias the font names. Instead of removing the hack entirely, we
2716         turn it off by default but provide some SPI so that DumpRenderTree can
2717         turn it on.
2718
2719         Reviewed by Hyatt.
2720
2721         All tests pass.
2722
2723         * platform/graphics/FontData.h: Add a new static method to turn on the
2724         hack on Windows only.
2725         * platform/graphics/win/FontDataWin.cpp:
2726         (WebCore::FontData::setShouldApplyMacAscentHack): Added.
2727         (WebCore::FontData::platformInit): Only perform the hack if
2728         shouldApplyMacAscentHack is true.
2729
2730 2007-12-06  Geoffrey Garen  <ggaren@apple.com>
2731
2732         Reviewed by Sam Weinig.
2733
2734         Fixed http://bugs.webkit.org/show_bug.cgi?id=16328
2735         REGRESSION (r28470): Crash expanding a GMail conversation
2736         
2737         * page/Frame.cpp:
2738         (WebCore::Frame::scriptProxy): Only return 0 if JS seems disabled *and*
2739         we haven't created the proxy yet. If we've created the proxy already, a
2740         script may be in the midst of execution, even though we've lost our
2741         settings object. During execution, scripts assume they have free access
2742         to the proxy.
2743
2744 2007-12-06  Adele Peterson  <adele@apple.com>
2745
2746         Reviewed by Oliver.
2747
2748         Fix for <rdar://problem/5631356> Toggling display property on video causes controls to get lost
2749
2750         * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::attach): Call updateFromElement.
2751         * html/HTMLMediaElement.h:
2752
2753 2007-12-05  Antti Koivisto  <antti@apple.com>
2754
2755         Reviewed by Oliver.
2756
2757         Rename
2758
2759         Movie -> MediaPlayer
2760         MoviePrivate -> MediaPlayerPrivate
2761         
2762         Movie is QuickTime terminology and clashes with its C API.
2763
2764         * WebCore.xcodeproj/project.pbxproj:
2765         * html/HTMLMediaElement.cpp:
2766         (WebCore::HTMLMediaElement::HTMLMediaElement):
2767         (WebCore::HTMLMediaElement::~HTMLMediaElement):
2768         (WebCore::HTMLMediaElement::initAndDispatchProgressEvent):
2769         (WebCore::HTMLMediaElement::bufferingRate):
2770         (WebCore::HTMLMediaElement::load):
2771         (WebCore::HTMLMediaElement::mediaPlayerNetworkStateChanged):
2772         (WebCore::HTMLMediaElement::mediaPlayerReadyStateChanged):
2773         (WebCore::HTMLMediaElement::setReadyState):
2774         (WebCore::HTMLMediaElement::progressEventTimerFired):
2775         (WebCore::HTMLMediaElement::seek):
2776         (WebCore::HTMLMediaElement::currentTime):
2777         (WebCore::HTMLMediaElement::duration):
2778         (WebCore::HTMLMediaElement::playbackRate):
2779         (WebCore::HTMLMediaElement::setPlaybackRate):
2780         (WebCore::HTMLMediaElement::play):
2781         (WebCore::HTMLMediaElement::pause):
2782         (WebCore::HTMLMediaElement::setVolume):
2783         (WebCore::HTMLMediaElement::setMuted):
2784         (WebCore::HTMLMediaElement::pickMedia):
2785         (WebCore::HTMLMediaElement::checkIfSeekNeeded):
2786         (WebCore::HTMLMediaElement::mediaPlayerVolumeChanged):
2787         (WebCore::HTMLMediaElement::mediaPlayerTimeChanged):
2788         (WebCore::HTMLMediaElement::mediaPlayerCuePointReached):
2789         (WebCore::HTMLMediaElement::addCuePoint):
2790         (WebCore::HTMLMediaElement::buffered):
2791         (WebCore::HTMLMediaElement::seekable):
2792         (WebCore::HTMLMediaElement::effectiveStart):
2793         (WebCore::HTMLMediaElement::effectiveEnd):
2794         (WebCore::HTMLMediaElement::effectiveLoopStart):
2795         (WebCore::HTMLMediaElement::effectiveLoopEnd):
2796         (WebCore::HTMLMediaElement::updateMediaPlayer):
2797         (WebCore::HTMLMediaElement::willSaveToCache):
2798         * html/HTMLMediaElement.h:
2799         (WebCore::HTMLMediaElement::player):
2800         * html/HTMLVideoElement.cpp:
2801         (WebCore::HTMLVideoElement::videoWidth):
2802         (WebCore::HTMLVideoElement::videoHeight):
2803         * platform/MIMETypeRegistry.cpp:
2804         (WebCore::initialiseSupportedMediaMIMETypes):
2805         (WebCore::MIMETypeRegistry::isSupportedMediaMIMEType):
2806         (WebCore::MIMETypeRegistry::getSupportedMediaMIMETypes):
2807         * platform/MIMETypeRegistry.h:
2808         * platform/graphics/MediaPlayer.cpp: Copied from WebCore/platform/graphics/Movie.cpp.
2809         (WebCore::MediaPlayer::MediaPlayer):
2810         (WebCore::MediaPlayer::~MediaPlayer):
2811         (WebCore::MediaPlayer::load):
2812         (WebCore::MediaPlayer::cancelLoad):
2813         (WebCore::MediaPlayer::play):
2814         (WebCore::MediaPlayer::pause):
2815         (WebCore::MediaPlayer::duration):
2816         (WebCore::MediaPlayer::currentTime):
2817         (WebCore::MediaPlayer::seek):
2818         (WebCore::MediaPlayer::paused):
2819         (WebCore::MediaPlayer::seeking):
2820         (WebCore::MediaPlayer::naturalSize):
2821         (WebCore::MediaPlayer::hasVideo):
2822         (WebCore::MediaPlayer::networkState):
2823         (WebCore::MediaPlayer::readyState):
2824         (WebCore::MediaPlayer::volume):
2825         (WebCore::MediaPlayer::setVolume):
2826         (WebCore::MediaPlayer::rate):
2827         (WebCore::MediaPlayer::setRate):
2828         (WebCore::MediaPlayer::muted):
2829         (WebCore::MediaPlayer::setMuted):
2830         (WebCore::MediaPlayer::dataRate):
2831         (WebCore::MediaPlayer::setEndTime):
2832         (WebCore::MediaPlayer::addCuePoint):
2833         (WebCore::MediaPlayer::removeCuePoint):
2834         (WebCore::MediaPlayer::clearCuePoints):
2835         (WebCore::MediaPlayer::maxTimeBuffered):
2836         (WebCore::MediaPlayer::maxTimeSeekable):
2837         (WebCore::MediaPlayer::bytesLoaded):
2838         (WebCore::MediaPlayer::totalBytesKnown):
2839         (WebCore::MediaPlayer::totalBytes):
2840         (WebCore::MediaPlayer::setRect):
2841         (WebCore::MediaPlayer::visible):
2842         (WebCore::MediaPlayer::setVisible):
2843         (WebCore::MediaPlayer::paint):
2844         (WebCore::MediaPlayer::getSupportedTypes):
2845         (WebCore::MediaPlayer::networkStateChanged):
2846         (WebCore::MediaPlayer::readyStateChanged):
2847         (WebCore::MediaPlayer::volumeChanged):
2848         (WebCore::MediaPlayer::timeChanged):
2849         (WebCore::MediaPlayer::cuePointReached):
2850         * platform/graphics/MediaPlayer.h: Copied from WebCore/platform/graphics/Movie.h.
2851         (WebCore::MediaPlayerClient::~MediaPlayerClient):
2852         (WebCore::MediaPlayerClient::mediaPlayerNetworkStateChanged):
2853         (WebCore::MediaPlayerClient::mediaPlayerReadyStateChanged):
2854         (WebCore::MediaPlayerClient::mediaPlayerVolumeChanged):
2855         (WebCore::MediaPlayerClient::mediaPlayerTimeChanged):
2856         (WebCore::MediaPlayerClient::mediaPlayerCuePointReached):
2857         * platform/graphics/Movie.cpp: Removed.
2858         * platform/graphics/Movie.h: Removed.
2859         * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp: Copied from WebCore/platform/graphics/gtk/MoviePrivateGStreamer.cpp.
2860         (WebCore::mediaPlayerPrivateErrorCallback):
2861         (WebCore::mediaPlayerPrivateEOSCallback):
2862         (WebCore::mediaPlayerPrivateStateCallback):
2863         (WebCore::mediaPlayerPrivateBufferingCallback):
2864         (WebCore::MediaPlayerPrivate::MediaPlayerPrivate):
2865         (WebCore::MediaPlayerPrivate::~MediaPlayerPrivate):
2866         (WebCore::MediaPlayerPrivate::load):
2867         (WebCore::MediaPlayerPrivate::play):
2868         (WebCore::MediaPlayerPrivate::pause):
2869         (WebCore::MediaPlayerPrivate::duration):
2870         (WebCore::MediaPlayerPrivate::currentTime):
2871         (WebCore::MediaPlayerPrivate::seek):
2872         (WebCore::MediaPlayerPrivate::setEndTime):
2873         (WebCore::MediaPlayerPrivate::addCuePoint):
2874         (WebCore::MediaPlayerPrivate::removeCuePoint):
2875         (WebCore::MediaPlayerPrivate::clearCuePoints):
2876         (WebCore::MediaPlayerPrivate::startCuePointTimerIfNeeded):
2877         (WebCore::MediaPlayerPrivate::cancelSeek):
2878         (WebCore::MediaPlayerPrivate::cuePointTimerFired):
2879         (WebCore::MediaPlayerPrivate::paused):
2880         (WebCore::MediaPlayerPrivate::seeking):
2881         (WebCore::MediaPlayerPrivate::naturalSize):
2882         (WebCore::MediaPlayerPrivate::hasVideo):
2883         (WebCore::MediaPlayerPrivate::setVolume):
2884         (WebCore::MediaPlayerPrivate::setMuted):
2885         (WebCore::MediaPlayerPrivate::setRate):
2886         (WebCore::MediaPlayerPrivate::dataRate):
2887         (WebCore::MediaPlayerPrivate::networkState):
2888         (WebCore::MediaPlayerPrivate::readyState):
2889         (WebCore::MediaPlayerPrivate::maxTimeBuffered):
2890         (WebCore::MediaPlayerPrivate::maxTimeSeekable):
2891         (WebCore::MediaPlayerPrivate::maxTimeLoaded):
2892         (WebCore::MediaPlayerPrivate::bytesLoaded):
2893         (WebCore::MediaPlayerPrivate::totalBytesKnown):
2894         (WebCore::MediaPlayerPrivate::totalBytes):
2895         (WebCore::MediaPlayerPrivate::cancelLoad):
2896         (WebCore::MediaPlayerPrivate::updateStates):
2897         (WebCore::MediaPlayerPrivate::loadStateChanged):
2898         (WebCore::MediaPlayerPrivate::rateChanged):
2899         (WebCore::MediaPlayerPrivate::sizeChanged):
2900         (WebCore::MediaPlayerPrivate::timeChanged):
2901         (WebCore::MediaPlayerPrivate::volumeChanged):
2902         (WebCore::MediaPlayerPrivate::didEnd):
2903         (WebCore::MediaPlayerPrivate::loadingFailed):
2904         (WebCore::MediaPlayerPrivate::setRect):
2905         (WebCore::MediaPlayerPrivate::setVisible):
2906         (WebCore::MediaPlayerPrivate::paint):
2907         (WebCore::MediaPlayerPrivate::getSupportedTypes):
2908         (WebCore::MediaPlayerPrivate::createGSTPlayBin):
2909         * platform/graphics/gtk/MediaPlayerPrivateGStreamer.h: Copied from WebCore/platform/graphics/gtk/MoviePrivateGStreamer.h.
2910         * platform/graphics/gtk/MoviePrivateGStreamer.cpp: Removed.
2911         * platform/graphics/gtk/MoviePrivateGStreamer.h: Removed.
2912         * platform/graphics/mac/MediaPlayerPrivateQTKit.h: Copied from WebCore/platform/graphics/mac/MoviePrivateQTKit.h.
2913         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm: Copied from WebCore/platform/graphics/mac/MoviePrivateQTKit.mm.
2914         (WebCore::MediaPlayerPrivate::MediaPlayerPrivate):
2915         (WebCore::MediaPlayerPrivate::~MediaPlayerPrivate):
2916         (WebCore::MediaPlayerPrivate::createQTMovie):
2917         (WebCore::MediaPlayerPrivate::createQTMovieView):
2918         (WebCore::MediaPlayerPrivate::createQTTime):
2919         (WebCore::MediaPlayerPrivate::load):
2920         (WebCore::MediaPlayerPrivate::play):
2921         (WebCore::MediaPlayerPrivate::pause):
2922         (WebCore::MediaPlayerPrivate::duration):
2923         (WebCore::MediaPlayerPrivate::currentTime):
2924         (WebCore::MediaPlayerPrivate::seek):
2925         (WebCore::MediaPlayerPrivate::doSeek):
2926         (WebCore::MediaPlayerPrivate::cancelSeek):
2927         (WebCore::MediaPlayerPrivate::seekTimerFired):
2928         (WebCore::MediaPlayerPrivate::setEndTime):
2929         (WebCore::MediaPlayerPrivate::addCuePoint):
2930         (WebCore::MediaPlayerPrivate::removeCuePoint):
2931         (WebCore::MediaPlayerPrivate::clearCuePoints):
2932         (WebCore::MediaPlayerPrivate::startCuePointTimerIfNeeded):
2933         (WebCore::MediaPlayerPrivate::cuePointTimerFired):
2934         (WebCore::MediaPlayerPrivate::paused):
2935         (WebCore::MediaPlayerPrivate::seeking):
2936         (WebCore::MediaPlayerPrivate::naturalSize):
2937         (WebCore::MediaPlayerPrivate::hasVideo):
2938         (WebCore::MediaPlayerPrivate::setVolume):
2939         (WebCore::MediaPlayerPrivate::setMuted):
2940         (WebCore::MediaPlayerPrivate::setRate):
2941         (WebCore::MediaPlayerPrivate::dataRate):
2942         (WebCore::MediaPlayerPrivate::networkState):
2943         (WebCore::MediaPlayerPrivate::readyState):
2944         (WebCore::MediaPlayerPrivate::maxTimeBuffered):
2945         (WebCore::MediaPlayerPrivate::maxTimeSeekable):
2946         (WebCore::MediaPlayerPrivate::maxTimeLoaded):
2947         (WebCore::MediaPlayerPrivate::bytesLoaded):
2948         (WebCore::MediaPlayerPrivate::totalBytesKnown):
2949         (WebCore::MediaPlayerPrivate::totalBytes):
2950         (WebCore::MediaPlayerPrivate::cancelLoad):
2951         (WebCore::MediaPlayerPrivate::updateStates):
2952         (WebCore::MediaPlayerPrivate::loadStateChanged):
2953         (WebCore::MediaPlayerPrivate::rateChanged):
2954         (WebCore::MediaPlayerPrivate::sizeChanged):
2955         (WebCore::MediaPlayerPrivate::timeChanged):
2956         (WebCore::MediaPlayerPrivate::volumeChanged):
2957         (WebCore::MediaPlayerPrivate::didEnd):
2958         (WebCore::MediaPlayerPrivate::setRect):
2959         (WebCore::MediaPlayerPrivate::setVisible):
2960         (WebCore::MediaPlayerPrivate::paint):
2961         (WebCore::MediaPlayerPrivate::getSupportedTypes):
2962         (-[WebCoreMovieObserver initWithCallback:WebCore::]):
2963         * platform/graphics/mac/MoviePrivateQTKit.h: Removed.
2964         * platform/graphics/mac/MoviePrivateQTKit.mm: Removed.
2965         * rendering/RenderMedia.cpp:
2966         (WebCore::RenderMedia::player):
2967         * rendering/RenderMedia.h:
2968         * rendering/RenderVideo.cpp:
2969         (WebCore::RenderVideo::RenderVideo):
2970         (WebCore::RenderVideo::~RenderVideo):
2971         (WebCore::RenderVideo::videoSizeChanged):
2972         (WebCore::RenderVideo::paintReplaced):
2973         (WebCore::RenderVideo::layout):
2974         (WebCore::RenderVideo::updateFromElement):
2975         (WebCore::RenderVideo::updatePlayer):
2976         * rendering/RenderVideo.h:
2977
2978 2007-12-06  Geoffrey Garen  <ggaren@apple.com>
2979
2980         Build fix: access global object directly.
2981
2982         * plugins/win/PluginViewWin.cpp:
2983         (WebCore::PluginViewWin::bindingInstance):
2984
2985 2007-12-06  Mark Rowe  <mrowe@apple.com>
2986
2987         Reviewed by Eric.
2988
2989         Fix bug spotted by GCC 4.2.
2990
2991         * bindings/js/kjs_window.cpp:
2992         (KJS::allowPopUp): Remove extraneous semicolon that completely changed the meaning of allowPopUp.
2993
2994 2007-12-06  Holger Hans Peter Freyther <holger.freyther@trolltech.com>
2995
2996         Reviewed by Alp Toker.
2997
2998         http://bugs.webkit.org/show_bug.cgi?id=16173
2999         Licensing change
3000
3001         Change license from BSD to LGPL.
3002
3003         * platform/gtk/FileSystemGtk.cpp:
3004
3005 2007-12-05  Rob Buis  <buis@kde.org>
3006
3007         Reviewed by Mitz.
3008
3009         http://bugs.webkit.org/show_bug.cgi?id=15289
3010         WebKit does not respect clip paths of a 0x0 rect
3011
3012         Make empty clip paths clip the whole referencing graphic.
3013
3014         * svg/SVGClipPathElement.cpp:
3015         (WebCore::SVGClipPathElement::canvasResource):
3016         * svg/graphics/SVGResourceClipper.h:
3017         (WebCore::ClipDataList::isEmpty):
3018
3019 2007-12-05  Darin Adler  <darin@apple.com>
3020
3021         Reviewed by Maciej.
3022
3023         - fix http://bugs.webkit.org/show_bug.cgi?id=16266
3024           <rdar://problem/5625279> REGRESSION: crash loading CNN.com at
3025           Interpreter::createObjectsForGlobalObjectProperties()
3026
3027         I don't know how to reproduce this in a test.
3028
3029         * bindings/js/JSDocumentCustom.cpp: (WebCore::JSDocument::mark):
3030         Call JSEventTargetNode::mark instead of DOMObject::mark. There's no difference
3031         right now, but it's best to call your base class, not your base's base.
3032
3033         * bindings/js/kjs_events.h: Removed unneeded virtual from the
3034         JSUnprotectedEventListener::mark() function; it neither derives from or is
3035         derived from anyone else with a mark() function so there's no need for virtual.
3036
3037         * bindings/js/kjs_window.cpp: (KJS::Window::mark): Call JSGlobalObject::mark,
3038         not JSObject::mark. This is the actual bug fix.
3039
3040 2007-12-05  Pierre-Luc Beaudoin  <pierre-luc.beaudoin@collabora.co.uk>
3041
3042         http://bugs.webkit.org/show_bug.cgi?id=16145
3043         [gtk] Implement media support in GTK backend
3044
3045         Reviewed by Alp Toker.
3046
3047         Remove old comments, fix variable names, match WebKit coding style.
3048
3049         * platform/graphics/gtk/MoviePrivateGStreamer.cpp:
3050         (WebCore::moviePrivateEOSCallback):
3051         (WebCore::MoviePrivate::MoviePrivate):
3052         (WebCore::MoviePrivate::load):
3053         (WebCore::MoviePrivate::play):
3054         (WebCore::MoviePrivate::pause):
3055         (WebCore::MoviePrivate::currentTime):
3056         (WebCore::MoviePrivate::seek):
3057         (WebCore::MoviePrivate::cancelSeek):
3058         (WebCore::MoviePrivate::seeking):
3059         (WebCore::MoviePrivate::naturalSize):
3060         (WebCore::MoviePrivate::setVolume):
3061         (WebCore::MoviePrivate::setMuted):
3062         (WebCore::MoviePrivate::maxTimeBuffered):
3063         (WebCore::MoviePrivate::bytesLoaded):
3064         (WebCore::MoviePrivate::totalBytesKnown):
3065         (WebCore::MoviePrivate::totalBytes):
3066         (WebCore::MoviePrivate::updateStates):
3067         (WebCore::MoviePrivate::didEnd):
3068         (WebCore::MoviePrivate::paint):
3069         (WebCore::MoviePrivate::createGSTPlayBin):
3070         * platform/graphics/gtk/MoviePrivateGStreamer.h:
3071
3072 2007-12-05  Mark Rowe  <mrowe@apple.com>
3073
3074         Speculative wx build fix.  Add PlugInInfoStore::pluginNameForMIMEType to the temporary link stubs.
3075
3076         * platform/wx/TemporaryLinkStubs.cpp:
3077
3078 2007-12-05  Alp Toker  <alp@atoker.com>
3079
3080         Rubber stamped by Mark Rowe.
3081
3082         Remove DEPENDPATH on the generated sources directory. This causes
3083         trouble and is no longer necessary following the glib-genmarshal
3084         generator split.
3085
3086         * WebCore.pro:
3087
3088 2007-12-04  Geoffrey Garen  <ggaren@apple.com>
3089
3090         Reviewed by Darin Adler.
3091
3092         Third step in refactoring JSGlobalObject: Moved data members and data
3093         member access from Interpreter to JSGlobalObject. Changed Interpreter
3094         member functions to static functions. Same for the subclass, 
3095         ScriptInterpreter.
3096         
3097         This is a big change, but it's mostly code motion and renaming.
3098         
3099 2007-12-05  Darin Adler  <darin@apple.com>
3100
3101         "Reviewed" by Geoff.
3102
3103         * loader/FrameLoader.cpp:
3104         (WebCore::FrameLoader::checkLoadCompleteForThisFrame): Removed assertion.
3105         (WebCore::FrameLoader::dispatchDidCommitLoad): This one too.
3106         The assertions are firing like crazy. Not sure why yet.
3107
3108 2007-12-05  Darin Adler  <darin@apple.com>
3109
3110         Reviewed by Adam Roben.
3111
3112         - fix http://bugs.webkit.org/show_bug.cgi?id=16306
3113           Assertion failed in WebCore/loader/FrameLoader.cpp:4642
3114
3115         * loader/FrameLoader.cpp:
3116         (WebCore::FrameLoader::dispatchDidCommitLoad): Check m_creatingInitialEmptyDocument
3117         and don't deliver the client call in that case.
3118
3119 2007-12-05  Mark Rowe  <mrowe@apple.com>
3120
3121         Reviewed by Kevin Decker.
3122
3123         Fix 64-bit debug build.
3124
3125         * platform/text/mac/TextCodecMac.cpp:
3126         (WebCore::TextCodecMac::decode): OSStatus is a long for 32-bit but int on 64-bit,
3127         so we need to cast it to be able to use a single format specifier on both.
3128
3129 2007-12-05  Kevin Decker  <kdecker@apple.com>
3130
3131         Reviewed by Hyatt.
3132
3133         <rdar://problem/5613106> Acordex: REGRESSION (Tiger-Leopard): plug-ins can no longer take over TIFF images (affects uspto.gov)
3134        
3135         * loader/FrameLoader.cpp:
3136         (WebCore::FrameLoader::shouldUsePlugin): Allow plug-ins (with the exception of QuickTime) to
3137         takeover TIFF once again.
3138         
3139 2007-12-05  Luca Bruno  <lethalman88@gmail.com>
3140
3141         Reviewed by Alp Toker.
3142
3143         http://bugs.webkit.org/show_bug.cgi?id=16290
3144         [GTK] Pasting clipboard in rich text.
3145
3146         * platform/gtk/PasteboardGtk.cpp:
3147         (Pasteboard::documentFragment): Implement rich text paste support.
3148
3149 2007-12-05  Adele Peterson  <adele@apple.com>
3150
3151         Reviewed by Hyatt.
3152
3153         Reverting fix for <rdar://problem/5499918> REGRESSION: insertion point in input field with custom border cuts holes in focus ring interior edges
3154
3155         We need to just fix the underlying focus ring repaint problem.
3156
3157         * rendering/RenderTextControl.cpp: (WebCore::RenderTextControl::setStyle):
3158
3159 2007-12-04  Kevin McCullough  <kmccullough@apple.com>
3160
3161         Reviewed by Darin.
3162
3163         - <rdar://5621435>
3164         - Security Fix. Instead of having it off by default, WebKit now must
3165         explicitly turn off local-resource restriction when needed for backwards
3166         compatibility reasons.
3167
3168         * loader/FrameLoader.cpp:
3169
3170 2007-12-05  Adam Roben  <aroben@apple.com>
3171
3172         Set the menu item identifier for all menu items
3173
3174         This allows WebKit clients to distinguish between submenus in the
3175         context menu.
3176
3177         Reviewed by Darin.
3178
3179         No test possible.
3180
3181         * platform/win/ContextMenuItemWin.cpp:
3182         (WebCore::ContextMenuItem::ContextMenuItem):
3183
3184 2007-12-05  Dan Bernstein  <mitz@apple.com>
3185
3186         Reviewed by Darin Adler.
3187
3188         - WebCore part of fixing <rdar://problem/5111082> Flash popup video ad doesn't close when clicked at http://www.firestonecompleteautocare.com/
3189
3190         * manual-tests/nested-plug-ins.html: Added.
3191         * manual-tests/resources/nested-plug-ins-inner-frame.html: Added.
3192         * manual-tests/resources/nested-plug-ins-outer-frame.html: Added.
3193         * platform/ScrollView.h:
3194         * platform/Widget.h:
3195         (WebCore::Widget::attachToWindow): Added. Tells the widget that it is connected
3196         via visible ScrollViews to the root ScrollView of the WebView.
3197         (WebCore::Widget::detachFromWindow): Added. Tells the widget that it is no longer
3198         connected via visible ScrollViews to the root ScrollView of the WebView.
3199         * platform/win/ScrollViewWin.cpp:
3200         (WebCore::ScrollView::ScrollViewPrivate::ScrollViewPrivate): Added
3201         m_visible and m_attachedToWindow members.
3202         (WebCore::ScrollView::attachToWindow): Added. Attaches all children if this
3203         view is visible.
3204         (WebCore::ScrollView::detachFromWindow): Added. Detaches all children if this
3205         view is visible (otherwise they would be detached already).
3206         (WebCore::ScrollView::show): Added. Attaches all children if this view
3207         is attached.
3208         (WebCore::ScrollView::hide): Added. Detaches all children if this view
3209         is attached (otherwise they would be detached already).
3210         (WebCore::ScrollView::isAttachedToWindow): Added.
3211         * platform/win/WidgetWin.cpp:
3212         (WebCore::Widget::setParent): Added calls to attachToWindow() and detachFromWindow()
3213         depending on whether the parent is set and attached or not.
3214         * plugins/win/PluginViewWin.cpp:
3215         (WebCore::PluginViewWin::setFocus):
3216         (WebCore::PluginViewWin::show): Changed to show the plug-in only if
3217         this view is attached.
3218         (WebCore::PluginViewWin::hide): Changed to hide the plug-in only if this
3219         view is attached (otherwise it would be hidden already).
3220         (WebCore::PluginViewWin::attachToWindow): Added. Shows the plug-in if this view
3221         is visible.
3222         (WebCore::PluginViewWin::detachFromWindow): Added. Hides the plug-in if this view
3223         is visible (otherwise it would be hidden already).
3224         (WebCore::PluginViewWin::PluginViewWin):
3225         * plugins/win/PluginViewWin.h: Added m_attachedToWindow member.
3226
3227 2007-12-04  Alp Toker  <alp@atoker.com>
3228
3229         Potential GTK+ build fix for the glib-genmarshal issue.
3230
3231         Split the glib-genmarshal qmake generator in two; one for the source
3232         file, another for the header.
3233
3234         * WebCore.pro:
3235
3236 2007-12-04  Alp Toker  <alp@atoker.com>
3237
3238         GTK+ build fix.
3239
3240         * platform/PlugInInfoStore.h:
3241
3242 2007-12-04  Kevin Decker  <kdecker@apple.com>
3243
3244         Reviewed by Anders.
3245
3246         <rdar://problem/5629125> PluginInfoStore needs the ability to return the name of a plug-in for a given MIME type
3247
3248         * page/mac/WebCoreViewFactory.h: Added pluginNameForMIMEType: method.
3249         * platform/PlugInInfoStore.h:
3250         * platform/gtk/TemporaryLinkStubs.cpp: Added stub version of pluginNameForMIMEType.
3251         (PlugInInfoStore::pluginNameForMIMEType):
3252         * platform/mac/PlugInInfoStoreMac.mm:
3253         (WebCore::PlugInInfoStore::pluginNameForMIMEType): Added.
3254         * platform/qt/PlugInInfoStoreQt.cpp: 
3255         (WebCore::PlugInInfoStore::pluginNameForMIMEType): Added stub version of pluginNameForMIMEType.
3256         * plugins/win/PlugInInfoStoreWin.cpp: 
3257         (WebCore::PlugInInfoStore::pluginNameForMIMEType): Added stub version of pluginNameForMIMEType.
3258
3259 2007-12-04  Adele Peterson  <adele@apple.com>
3260
3261         Reviewed by Darin.
3262
3263         Fix for <rdar://problem/5499918> REGRESSION: insertion point in input field with custom border cuts holes in focus ring interior edges
3264
3265         * rendering/RenderTextControl.cpp: (WebCore::RenderTextControl::setStyle):
3266         Adjust outline-offset so it doesn't extend beyond the border to interfere with typing
3267
3268 2007-12-04  Anders Carlsson  <andersca@apple.com>
3269
3270         Reviewed by Jon.
3271
3272         Always call NPP_NewStream, NPP_DestroyStream and NPP_URLNotify for JavaScript
3273         result streams, even if the JavaScript expression threw an exception or returned undefined.
3274         This matches what Firefox does.
3275         
3276         * plugins/win/PluginStreamWin.cpp:
3277         (WebCore::PluginStreamWin::sendJavaScriptStream):
3278         Handle the result string being null, and set the correct NPReason if it is.
3279         
3280         * plugins/win/PluginViewWin.cpp:
3281         (WebCore::PluginViewWin::performRequest):
3282         Always send the JavaScript stream, regardless of the result could be converted to a string or not.
3283
3284 2007-12-04  Adele Peterson  <adele@apple.com>
3285
3286         Reviewed by Hyatt.
3287
3288         Fix for <rdar://problem/5622464> controls should show up for audio element
3289
3290         * css/html4.css: Added styles for audio controls.  This will need to be refined, since we may want a different look for audio controls.
3291         * html/HTMLMediaElement.cpp:
3292         (WebCore::HTMLMediaElement::attributeChanged): When the controls attribute changes detach and reattach if necessary. 
3293         (WebCore::HTMLMediaElement::rendererIsNeeded): Added.
3294         (WebCore::HTMLMediaElement::createRenderer): Added.  Uses RenderMedia.
3295         * html/HTMLMediaElement.h:
3296         * rendering/RenderMedia.cpp: (WebCore::RenderMedia::RenderMedia): Added constructor that doesn't take intrinsic size.
3297         * rendering/RenderMedia.h:
3298
3299 2007-12-04  Anders Carlsson  <andersca@apple.com>
3300
3301         Reviewed by Sam.
3302
3303         Add isSafeScript(const JSGlobalObject*) so we won't get the JSGlobalObject
3304         implementation, which always returns true(!).
3305         
3306         * bindings/js/kjs_window.cpp:
3307         (KJS::Window::isSafeScript):
3308         Make the static isSafeScript method take two JSGlobalObjects.
3309         
3310         * bindings/js/kjs_window.h:
3311         (KJS::Window::isSafeScript):
3312         Implement isSafeScript and have it call the static method.
3313
3314 2007-11-27  Adam Roben  <aroben@apple.com>
3315
3316         Make the implementation of Frame::setNeedsReapplyStyles cross-platform
3317
3318         Reviewed by Hyatt.
3319
3320         No change in functionality.
3321
3322         * page/Frame.cpp:
3323         (WebCore::Frame::setNeedsReapplyStyles): Added. Invalidates the
3324         FrameView so that FrameView::layout will be called, which ends up
3325         calling reapplyStyles.
3326         (WebCore::Frame::needsReapplyStyles): Added.
3327         (WebCore::Frame::reapplyStyles): Renamed from reparseConfiguration.
3328         (WebCore::FramePrivate::FramePrivate):
3329         * page/Frame.h:
3330         * page/FramePrivate.h: Added new boolean member.
3331         * page/FrameView.cpp:
3332         (WebCore::FrameView::layout): Call Frame::reapplyStyles if needed.
3333         (WebCore::FrameView::needsLayout): Say that we need layout if the
3334         Frame needs styles reapplied.
3335         * page/mac/WebCoreFrameBridge.h: Removed setNeedsReapplyStyles.
3336         * page/mac/WebCoreFrameBridge.mm:
3337         (-[WebCoreFrameBridge reapplyStylesForDeviceType:]): Updated for
3338         rename.
3339
3340         * bridge/win/FrameWin.cpp: Removed Frame::setNeedsReapplyStyles.
3341         * page/gtk/FrameGtk.cpp: Ditto.
3342         * page/mac/FrameMac.mm: Ditto.
3343         * page/qt/FrameQt.cpp: Ditto.
3344         * platform/wx/TemporaryLinkStubs.cpp: Ditto.
3345
3346 2007-12-04  Antti Koivisto  <antti@apple.com>
3347
3348         Reviewed by Adele.
3349
3350         Pass intrinsic size to the base class.
3351
3352         * rendering/RenderMedia.cpp:
3353         (WebCore::RenderMedia::RenderMedia):
3354
3355 2007-12-04  Adele Peterson  <adele@apple.com>
3356
3357         Reviewed by Darin.
3358
3359         Fix for <rdar://problem/5578209> REGRESSION: Crash in WebCore::DeprecatedValueListImpl::Private::copyList when going back on zoomerang.com/survey
3360
3361         * loader/FrameLoader.cpp: (WebCore::FrameLoader::scheduleHistoryNavigation):
3362           When the new url is exactly the same as the old url, don't treat it like a fragment navigation, since its going to cause a reload.
3363
3364 2007-12-04  Darin Adler  <darin@apple.com>
3365
3366         Reviewed by Kevin Decker.
3367
3368         - added an assertion for a situation that leads to a Safari assertion:
3369           a commit that is not followed by a load completion
3370
3371         - removed some unneeded FrameLoader stuff -- maybe some day we'll get this
3372           class cut down to size
3373
3374         * loader/FrameLoader.cpp:
3375         (WebCore::FrameLoader::FrameLoader): Added boolean for assertion.
3376         (WebCore::FrameLoader::checkLoadCompleteForThisFrame): Added code to assert
3377         that we already sent a commit before sending a complete.
3378         (WebCore::FrameLoader::continueFragmentScrollAfterNavigationPolicy): Call
3379         client directly instead of indirecting through a function.
3380         (WebCore::FrameLoader::loadItem): Ditto.
3381         (WebCore::FrameLoader::goToItem): Ditto.
3382         (WebCore::FrameLoader::addHistoryForCurrentLocation): Get the private browsing
3383         state from Settings instead of FrameLoaderClient. Also call client directly
3384         instead of indirecting through a function.
3385         (WebCore::FrameLoader::updateHistoryForReload): Call client directly instead
3386         of indirecting through a function.
3387         (WebCore::FrameLoader::dispatchDidCommitLoad): Added code to assert
3388         that we did not yet send a commit and set the flag that will be used to check
3389         that we don't do this twice in a row without an intervening completion call.
3390
3391         * loader/FrameLoader.h: Added a boolean for the assertion. Removed six
3392         now-unneeded functions.
3393
3394         * loader/FrameLoaderClient.h: Removed now-unneeded privateBrowsingEnabled function.
3395
3396         * loader/ResourceLoader.cpp: (WebCore::ResourceLoader::willCacheResponse): Get
3397         the private browsing state from Settings instead of FrameLoaderClient.
3398
3399         * svg/graphics/SVGImageEmptyClients.h: Removed obsolete privateBrowsingEnabled.
3400
3401 2007-12-03  Antti Koivisto  <antti@apple.com>
3402
3403         Reviewed by Adele.
3404         
3405         Fix <rdar://problem/5624802> 
3406         Controller displays outside of <video> element when width and height aren't specified 
3407
3408         - Explicitly adjust size of the controls tree root.
3409         - Switch RenderMedia base class back to RenderReplaced. It is easier to manage the shadow tree
3410           by hand. This also allows better code sharing with other replaced element classes.
3411         - Move duplicated layout and painting code from subclasses up to RenderReplaced.
3412
3413         Test: media/video-controls-rendering.html
3414
3415         * rendering/RenderHTMLCanvas.cpp:
3416         (WebCore::RenderHTMLCanvas::paintReplaced):
3417         * rendering/RenderHTMLCanvas.h:
3418             Share code.
3419         * rendering/RenderImage.cpp:
3420         (WebCore::RenderImage::paintReplaced):
3421         (WebCore::RenderImage::minimumReplacedHeight):
3422         * rendering/RenderImage.h:
3423             Share code.
3424         * rendering/RenderMedia.cpp:
3425         (WebCore::RenderMediaControlShadowRoot::RenderMediaControlShadowRoot):
3426         (WebCore::RenderMediaControlShadowRoot::setParent):
3427             Add a subclass just to get through encapsulation to use setParent().
3428         (WebCore::MediaControlShadowRootElement::MediaControlShadowRootElement):
3429             Move initialization to the constructor.
3430         (WebCore::RenderMedia::RenderMedia):
3431         (WebCore::RenderMedia::~RenderMedia):
3432         (WebCore::RenderMedia::layout):
3433             Resize and layout the controller root by hand.
3434         (WebCore::RenderMedia::firstChild):
3435         (WebCore::RenderMedia::lastChild):
3436         (WebCore::RenderMedia::removeChild):
3437             Support one child renderer for controls.
3438         (WebCore::RenderMedia::createControlsShadowRoot):
3439         * rendering/RenderMedia.h:
3440         (WebCore::RenderMedia::isMedia):
3441             Switch base class to RenderReplaced, delete the now unnecessary stuff.
3442         * rendering/RenderReplaced.cpp:
3443         (WebCore::RenderReplaced::layout):
3444         (WebCore::RenderReplaced::paint):
3445         * rendering/RenderReplaced.h:
3446         (WebCore::RenderReplaced::minimumReplacedHeight):
3447         (WebCore::RenderReplaced::paintReplaced):
3448             Share code.
3449         * rendering/RenderVideo.cpp:
3450         (WebCore::RenderVideo::videoSizeChanged):
3451             Simplify, just request relayout.
3452         (WebCore::RenderVideo::paintReplaced):
3453         (WebCore::RenderVideo::layout):
3454         * rendering/RenderVideo.h:
3455             Share code.
3456
3457 2007-12-04  Michael Natterer  <mitch@imendio.com>
3458
3459         Reviewed by Alp Toker.
3460
3461         * WebCore.pro: fix build of webkit-marshal by building the
3462         functions into a separate .cpp file instead of including them in
3463         the header. This way we can use the marshallers from more than one
3464         file without using bad hacks.
3465
3466         Add the generated sources directory to DEPENDPATH.
3467
3468 2007-12-04  Pierre-Luc Beaudoin  <pierre-luc.beaudoin@collabora.co.uk>
3469
3470         Reviewed by Alp Toker.
3471
3472         http://bugs.webkit.org/show_bug.cgi?id=16145
3473         [gtk] Implement media support in GTK backend
3474
3475         This implements the media tags of HTML5 on the GTK+ port based on the 
3476         Mac port. Media tests pass although some tests required a small modifications: 
3477         As per the HTML5 spec, the loading of the clip should start only after 
3478         all script are done.  But in the case of the tests, the loading starts 
3479         before some callbacks get registered.  This has been discussed with 
3480         Antti Koivisto, and the tests should be updated.
3481
3482         There is only one known issue: one time in 10 tries, loading a buffered 
3483         clip will never end buffering.  The buffering will stall at 97% for no 
3484         apparent reasons.  Reloading the page usually works around the problem.
3485         On the GStreamer side, some codecs don't return correct values, therefore
3486         they make the tests fail.  For instance H.264 will make the video-end 
3487         test fail.  This should be fixed in GStreamer 0.10.15.
3488
3489         This version displays video in a pop up window.  A place holder is drawn
3490         on the page where the video should appear.
3491
3492         By default, it is turned off in WebCore.pro until GStreamer/X
3493         detection issues are sorted out.
3494
3495         * WebCore.pro:
3496         Disable video for now
3497         * platform/Logging.cpp:
3498         (WebCore::):
3499         * platform/Logging.h:
3500         Added a logging level for Media stuff
3501         * platform/graphics/Movie.cpp:
3502         * platform/graphics/gtk/MoviePrivateGStreamer.cpp: Added.
3503         (WebCore::moviePrivateErrorCallback):
3504         (WebCore::moviePrivateEOSCallback):
3505         (WebCore::moviePrivateStateCallback):
3506         (WebCore::moviePrivateBufferingCallback):
3507         (WebCore::moviePrivateWindowIDCallback):
3508         (WebCore::MoviePrivate::MoviePrivate):
3509         (WebCore::MoviePrivate::~MoviePrivate):
3510         (WebCore::MoviePrivate::load):
3511         (WebCore::MoviePrivate::play):
3512         (WebCore::MoviePrivate::pause):
3513         (WebCore::MoviePrivate::duration):
3514         (WebCore::MoviePrivate::currentTime):
3515         (WebCore::MoviePrivate::seek):
3516         (WebCore::MoviePrivate::setEndTime):
3517         (WebCore::MoviePrivate::addCuePoint):
3518         (WebCore::MoviePrivate::removeCuePoint):
3519         (WebCore::MoviePrivate::clearCuePoints):
3520         (WebCore::MoviePrivate::startCuePointTimerIfNeeded):
3521         (WebCore::MoviePrivate::cancelSeek):
3522         (WebCore::MoviePrivate::cuePointTimerFired):
3523         (WebCore::MoviePrivate::paused):
3524         (WebCore::MoviePrivate::seeking):
3525         (WebCore::MoviePrivate::naturalSize):
3526         (WebCore::MoviePrivate::hasVideo):
3527         (WebCore::MoviePrivate::setVolume):
3528         (WebCore::MoviePrivate::setMuted):
3529         (WebCore::MoviePrivate::setRate):
3530         (WebCore::MoviePrivate::dataRate):
3531         (WebCore::MoviePrivate::networkState):