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