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