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